Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
g2.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], date: YYYY-MM-DD }
3// external_1: { status: not started, auditors: [], date: YYYY-MM-DD }
4// external_2: { status: not started, auditors: [], date: YYYY-MM-DD }
5// =====================
6
7#pragma once
8
9#include "../../groups/group.hpp"
10#include "./fq2.hpp"
11#include "./fr.hpp"
12
13namespace bb {
15 static constexpr bool USE_ENDOMORPHISM = false;
16 static constexpr bool can_hash_to_curve = false;
17 static constexpr bool small_elements = false;
18 static constexpr bool has_a = false;
19
20#if defined(__SIZEOF_INT128__) && !defined(__wasm__)
21 static constexpr fq2 one_x{ { 0x8e83b5d102bc2026, 0xdceb1935497b0172, 0xfbb8264797811adf, 0x19573841af96503b },
22 { 0xafb4737da84c6140, 0x6043dd5a5802d8c4, 0x09e950fc52a02f86, 0x14fef0833aea7b6b } };
23 static constexpr fq2 one_y{ { 0x619dfa9d886be9f6, 0xfe7fd297f59e9b78, 0xff9e1a62231b7dfe, 0x28fd7eebae9e4206 },
24 { 0x64095b56c71856ee, 0xdc57f922327d3cbb, 0x55f935be33351076, 0x0da4a0e693fd6482 } };
25#else
26 static constexpr fq2 one_x{
27 { 0xe6df8b2cfb43050UL, 0x254c7d92a843857eUL, 0xf2006d8ad80dd622UL, 0x24a22107dfb004e3UL },
28 { 0xe8e7528c0b334b65UL, 0x56e941e8b293cf69UL, 0xe1169545c074740bUL, 0x2ac61491edca4b42UL }
29 };
30 static constexpr fq2 one_y{
31 { 0xdc508d48384e8843UL, 0xd55415a8afd31226UL, 0x834bf204bacb6e00UL, 0x51b9758138c5c79UL },
32 { 0x64067e0b46a5f641UL, 0x37726529a3a77875UL, 0x4454445bd915f391UL, 0x10d5ac894edeed3UL }
33 };
34#endif
35 static constexpr fq2 a = fq2::zero();
36 static constexpr fq2 b = fq2::twist_coeff_b();
37};
38
40} // namespace bb
group class. Represents an elliptic curve group element. Group is parametrised by Fq and Fr
Definition group.hpp:36
Entry point for Barretenberg command-line interface.
static constexpr bool USE_ENDOMORPHISM
Definition g2.hpp:15
static constexpr bool has_a
Definition g2.hpp:18
static constexpr fq2 one_y
Definition g2.hpp:30
static constexpr fq2 b
Definition g2.hpp:36
static constexpr bool can_hash_to_curve
Definition g2.hpp:16
static constexpr fq2 a
Definition g2.hpp:35
static constexpr bool small_elements
Definition g2.hpp:17
static constexpr fq2 one_x
Definition g2.hpp:26
static constexpr field2 zero()
static constexpr field2 twist_coeff_b()