Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::Bn254Fq6Params Struct Reference

Sextic extension of the base field of BN254. More...

#include <fq6.hpp>

Static Public Member Functions

static constexpr fq2 mul_by_non_residue (const fq2 &a)
 

Static Public Attributes

static constexpr fq2 frobenius_coeffs_c1_1
 
static constexpr fq2 frobenius_coeffs_c1_2
 
static constexpr fq2 frobenius_coeffs_c1_3
 
static constexpr fq2 frobenius_coeffs_c2_1
 
static constexpr fq2 frobenius_coeffs_c2_2
 
static constexpr fq2 frobenius_coeffs_c2_3
 

Detailed Description

Sextic extension of the base field of BN254.

Fq6 is defined as Fq2[v] / (v^3 - \xi), where \xi = 9 + u is not a cubic residue in Fq2. We store in the struct the coefficients to compute the frobenius morphism (we need powers up to q^3 to compute the final exponentiation in the pairing calculation)

  1. Power q

    \[ (a + bv + cv^2)^q = a^q + b^q * v^q + c^q * v^{2q} = a^q + b^q * \xi^{(q-1)/3} * v + c^q * \xi^{2(q-1)/3} * v^2 \]

  2. Power q^2

    \[ (a + bv + cv^2)^{q^2} = a^{q^2} + b^{q^2} * v^{q^2} + c^{q^2} * v^{2q^2} = a + b * \xi^{(q^2-1)/3} * v + c * \xi^{2(q^2-1)/3} * v^2 \]

  3. Power q^3

    \[ (a + bv + cv^2)^{q^3} = a^{q^3} + b^{q^3} * v^{q^3} + c^{q^3} * v^{2q^3} = a^q + b^q * \xi^{(q^3-1)/3} * v + c^q * \xi^{2(q^3-1)/3} * v^2 \]

Definition at line 37 of file fq6.hpp.

Member Function Documentation

◆ mul_by_non_residue()

static constexpr fq2 bb::Bn254Fq6Params::mul_by_non_residue ( const fq2 a)
inlinestaticconstexpr

Definition at line 100 of file fq6.hpp.

Member Data Documentation

◆ frobenius_coeffs_c1_1

constexpr fq2 bb::Bn254Fq6Params::frobenius_coeffs_c1_1
staticconstexpr
Initial value:
{
{ 0xecdea09b24a59190UL, 0x17db8ffeae2fe1c2UL, 0xbb09c97c6dabac4dUL, 0x2492b3d41d289af3UL },
{ 0xf1663598f1142ef1UL, 0x77ec057e0bf56062UL, 0xdd0baaecb677a631UL, 0x135e4e31d284d463UL }
}

Definition at line 70 of file fq6.hpp.

◆ frobenius_coeffs_c1_2

constexpr fq2 bb::Bn254Fq6Params::frobenius_coeffs_c1_2
staticconstexpr
Initial value:
{
{ 0x8aeb638758ccb791UL, 0xee27476838ae0f5bUL, 0x5fc8441d09282bUL, 0x169119a8426a57f9UL }, { 0UL, 0UL, 0UL, 0UL }
}

Definition at line 75 of file fq6.hpp.

◆ frobenius_coeffs_c1_3

constexpr fq2 bb::Bn254Fq6Params::frobenius_coeffs_c1_3
staticconstexpr
Initial value:
{
{ 0x4738e103136caecdUL, 0xf491475bc376b8c3UL, 0x1f4034a3a97cbee8UL, 0xcad5f8fef61ccd7UL },
{ 0x2f41c395e6e485d6UL, 0x997230c70242aa46UL, 0xeae16f2184887ab5UL, 0x266696f73bcfc9b2UL }
}

Definition at line 79 of file fq6.hpp.

◆ frobenius_coeffs_c2_1

constexpr fq2 bb::Bn254Fq6Params::frobenius_coeffs_c2_1
staticconstexpr
Initial value:
{
{ 0x227346b0b081f85eUL, 0x6e51a67130492bb5UL, 0x7e20162e52b19e16UL, 0x1677516f2343bb4bUL },
{ 0x18b280852f616a78UL, 0x25433712bde06eceUL, 0xb00a58256b9a0e66UL, 0x6f9f8e111971bbdUL }
}

Definition at line 84 of file fq6.hpp.

◆ frobenius_coeffs_c2_2

constexpr fq2 bb::Bn254Fq6Params::frobenius_coeffs_c2_2
staticconstexpr
Initial value:
{
{ 0x62b1a3a46a337995UL, 0xadc97d2722e2726eUL, 0x64ee82ede2db85faUL, 0xc0afea1488a03bbUL },
{ 0UL, 0UL, 0UL, 0UL }
}

Definition at line 89 of file fq6.hpp.

◆ frobenius_coeffs_c2_3

constexpr fq2 bb::Bn254Fq6Params::frobenius_coeffs_c2_3
staticconstexpr
Initial value:
{
{ 0xa0d044540af866c4UL, 0x9cc0145f7df631b3UL, 0x29dda327cd752de1UL, 0x14766fdb0a170a74UL },
{ 0xdd532940e9d402f7UL, 0x541490c5bfda559eUL, 0xd9c9c659c541b0b8UL, 0xbaf8cb569cbb3e4UL }
}

Definition at line 94 of file fq6.hpp.


The documentation for this struct was generated from the following file: