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

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

#include <fq2.hpp>

Static Public Attributes

static constexpr fq twist_coeff_b_0
 
static constexpr fq twist_coeff_b_1
 
static constexpr fq frobenius_on_twisted_curve_x_0
 
static constexpr fq frobenius_on_twisted_curve_x_1
 
static constexpr fq frobenius_on_twisted_curve_y_0
 
static constexpr fq frobenius_on_twisted_curve_y_1
 

Detailed Description

Quadratic extension of the base field of BN254.

The quadratic extension Fq2 is defined as Fq[u] / (u^2 + 1). Fq2 is the base field of the twist of BN254, thus points in G2 have coordinates in Fq2.

Inside this struct we define the parameters of the twist:

  • the coefficient twist_b = 3 / (9 + u) defining the equation of the twist: y^2 = x^3 + twist_b. The coefficient is derived as b / \xi, where b = 3 is the coefficient of BN254 in short-Weierstrass form, and \xi = 9 + u is not a sixth residue in Fq2.
  • the coefficients required to compute the frobenius map on the twisted curve: if \Psi : E' --> E is the isomorphism between the twist E' and the base curve E, then the frobenius map on E' is \Psi^{-1} \circ Frobenius \circ \Psi. This map is given by (x, y) --> (\xi^{(q-1)/3} * x^q, \xi^{(q-1)/2}} * y^q). We precompute the two powers of \xi and store them as frobenius_on_twisted_curve_x and frobenius_on_twisted_curve_y.

Definition at line 29 of file fq2.hpp.

Member Data Documentation

◆ frobenius_on_twisted_curve_x_0

constexpr fq bb::Bn254Fq2Params::frobenius_on_twisted_curve_x_0
staticconstexpr
Initial value:
{
0xecdea09b24a59190UL, 0x17db8ffeae2fe1c2UL, 0xbb09c97c6dabac4dUL, 0x2492b3d41d289af3UL
}

Definition at line 56 of file fq2.hpp.

◆ frobenius_on_twisted_curve_x_1

constexpr fq bb::Bn254Fq2Params::frobenius_on_twisted_curve_x_1
staticconstexpr
Initial value:
{
0xf1663598f1142ef1UL, 0x77ec057e0bf56062UL, 0xdd0baaecb677a631UL, 0x135e4e31d284d463UL
}

Definition at line 59 of file fq2.hpp.

◆ frobenius_on_twisted_curve_y_0

constexpr fq bb::Bn254Fq2Params::frobenius_on_twisted_curve_y_0
staticconstexpr
Initial value:
{
0xf46e7f60db1f0678UL, 0x31fc2eba5bcc5c3eUL, 0xedb3adc3086a2411UL, 0x1d46bd0f837817bcUL
}

Definition at line 62 of file fq2.hpp.

◆ frobenius_on_twisted_curve_y_1

constexpr fq bb::Bn254Fq2Params::frobenius_on_twisted_curve_y_1
staticconstexpr
Initial value:
{
0x6b3fbdf579a647d5UL, 0xcc568fb62ff64974UL, 0xc1bfbf4ac4348ac6UL, 0x15871d4d3940b4d3UL
}

Definition at line 65 of file fq2.hpp.

◆ twist_coeff_b_0

constexpr fq bb::Bn254Fq2Params::twist_coeff_b_0
staticconstexpr
Initial value:
{
0xdc19fa4aab489658UL, 0xd416744fbbf6e69UL, 0x8f7734ed0a8a033aUL, 0x19316b8353ee09bbUL
}

Definition at line 50 of file fq2.hpp.

◆ twist_coeff_b_1

constexpr fq bb::Bn254Fq2Params::twist_coeff_b_1
staticconstexpr
Initial value:
{
0x1cfd999a3b9fece0UL, 0xbe166fb279c1a7c7UL, 0xe93a1ba45580154cUL, 0x283739c94d11a9baUL
}

Definition at line 53 of file fq2.hpp.


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