Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
g1.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 "./fq.hpp"
11#include "./fr.hpp"
12
13namespace bb {
15 static constexpr bool USE_ENDOMORPHISM = true;
16 static constexpr bool can_hash_to_curve = true;
17 static constexpr bool small_elements = true;
18 static constexpr bool has_a = false;
19 static constexpr fq one_x = fq::one();
20#if defined(__SIZEOF_INT128__) && !defined(__wasm__)
21 static constexpr fq one_y{ 0xa6ba871b8b1e1b3aUL, 0x14f1d651eb8e167bUL, 0xccdd46def0f28c58UL, 0x1c14ef83340fbe5eUL };
22#else
23 static constexpr fq one_y{ 0x9d0709d62af99842UL, 0xf7214c0419c29186UL, 0xa603f5090339546dUL, 0x1b906c52ac7a88eaUL };
24#endif
25 static constexpr fq a{ 0UL, 0UL, 0UL, 0UL };
26#if defined(__SIZEOF_INT128__) && !defined(__wasm__)
27 static constexpr fq b{ 0x7a17caa950ad28d7UL, 0x1f6ac17ae15521b9UL, 0x334bea4e696bd284UL, 0x2a1f6744ce179d8eUL };
28#else
29 static constexpr fq b{ 0xeb8a8ec140766463UL, 0xf2b1f20626a3da49UL, 0xf905ef8d84d5fea4UL, 0x2958a27c02b7cd5fUL };
30#endif
31};
32
34
35} // namespace bb
36
37// specialize the name in msgpack schema generation
38// consumed by the typescript schema compiler, helps disambiguate templates
39inline std::string msgpack_schema_name(bb::g1::affine_element const& /*unused*/)
40{
41 return "G1AffineElement";
42}
group class. Represents an elliptic curve group element. Group is parametrised by Fq and Fr
Definition group.hpp:36
std::string msgpack_schema_name(bb::g1::affine_element const &)
Definition g1.hpp:39
Entry point for Barretenberg command-line interface.
static constexpr fq b
Definition g1.hpp:29
static constexpr bool small_elements
Definition g1.hpp:17
static constexpr bool USE_ENDOMORPHISM
Definition g1.hpp:15
static constexpr fq one_x
Definition g1.hpp:19
static constexpr bool can_hash_to_curve
Definition g1.hpp:16
static constexpr fq a
Definition g1.hpp:25
static constexpr bool has_a
Definition g1.hpp:18
static constexpr fq one_y
Definition g1.hpp:23
static constexpr field one()