Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bn254_crs_data.hpp
Go to the documentation of this file.
1#pragma once
6
7namespace bb::srs {
8
15
22{
23 // Hardcoded second G1 element (64 bytes) - see reference URL above
24 static constexpr uint8_t g1_second_data[64] = { 0x2d, 0x36, 0x06, 0x28, 0x28, 0x9f, 0xf9, 0x43, 0xff, 0x6b, 0xd1,
25 0xa8, 0x7b, 0xbe, 0x4e, 0x62, 0xab, 0xe7, 0xfb, 0x61, 0xba, 0x83,
26 0xef, 0xfd, 0x26, 0x6f, 0x22, 0xbd, 0xcf, 0x31, 0xe6, 0xf9, 0x26,
27 0xb9, 0x2a, 0x79, 0xe5, 0x63, 0xc3, 0xf4, 0x82, 0x52, 0xcc, 0xe7,
28 0xfe, 0xec, 0xa2, 0xf0, 0xf8, 0xd3, 0x3d, 0xcb, 0x4e, 0xf7, 0xb0,
29 0x64, 0x3b, 0xf0, 0x7b, 0xd4, 0x05, 0x70, 0x0a, 0xaa };
30 return from_buffer<g1::affine_element>(g1_second_data);
31}
32
40 0x01, 0x18, 0xc4, 0xd5, 0xb8, 0x37, 0xbc, 0xc2, 0xbc, 0x89, 0xb5, 0xb3, 0x98, 0xb5, 0x97, 0x4e, 0x9f, 0x59, 0x44,
41 0x07, 0x3b, 0x32, 0x07, 0x8b, 0x7e, 0x23, 0x1f, 0xec, 0x93, 0x88, 0x83, 0xb0, 0x26, 0x0e, 0x01, 0xb2, 0x51, 0xf6,
42 0xf1, 0xc7, 0xe7, 0xff, 0x4e, 0x58, 0x07, 0x91, 0xde, 0xe8, 0xea, 0x51, 0xd8, 0x7a, 0x35, 0x8e, 0x03, 0x8b, 0x4e,
43 0xfe, 0x30, 0xfa, 0xc0, 0x93, 0x83, 0xc1, 0x22, 0xfe, 0xbd, 0xa3, 0xc0, 0xc0, 0x63, 0x2a, 0x56, 0x47, 0x5b, 0x42,
44 0x14, 0xe5, 0x61, 0x5e, 0x11, 0xe6, 0xdd, 0x3f, 0x96, 0xe6, 0xce, 0xa2, 0x85, 0x4a, 0x87, 0xd4, 0xda, 0xcc, 0x5e,
45 0x55, 0x04, 0xfc, 0x63, 0x69, 0xf7, 0x11, 0x0f, 0xe3, 0xd2, 0x51, 0x56, 0xc1, 0xbb, 0x9a, 0x72, 0x85, 0x9c, 0xf2,
46 0xa0, 0x46, 0x41, 0xf9, 0x9b, 0xa4, 0xee, 0x41, 0x3c, 0x80, 0xda, 0x6a, 0x5f, 0xe4
47};
48
56inline constexpr std::array<uint8_t, 32> BN254_G2_ELEMENT_SHA256 = { 0x01, 0x79, 0x7b, 0xfc, 0x4d, 0xe5, 0xa9, 0x6f,
57 0x0e, 0x51, 0x6a, 0x9e, 0xa4, 0x53, 0x7d, 0x18,
58 0x78, 0x6d, 0xc3, 0x0c, 0xb9, 0x91, 0xac, 0xa4,
59 0x27, 0x4c, 0x95, 0x82, 0x2b, 0x69, 0xc3, 0x2f };
60
67{
68 return from_buffer<g2::affine_element>(BN254_G2_ELEMENT_BYTES.data());
69}
70
76
83 uint256_t(0x266f22bdcf31e6f9ULL, 0xabe7fb61ba83effdULL, 0xff6bd1a87bbe4e62ULL, 0x2d360628289ff943ULL);
84
85} // namespace bb::srs
static constexpr affine_element affine_one
Definition group.hpp:50
g2::affine_element get_bn254_g2_crs_element()
Reference BN254 G2 element from the trusted setup CRS.
constexpr uint256_t BN254_G1_FIRST_ELEMENT_COMPRESSED
Compressed form of the first G1 element (generator point).
constexpr std::array< uint8_t, 128 > BN254_G2_ELEMENT_BYTES
Raw 128-byte serialization of the BN254 G2 trusted-setup point [x]_2.
constexpr std::array< uint8_t, 32 > BN254_G2_ELEMENT_SHA256
SHA-256 hash of BN254_G2_ELEMENT_BYTES.
constexpr g1::affine_element BN254_G1_FIRST_ELEMENT
Expected first G1 element from BN254 CRS.
g1::affine_element get_bn254_g1_second_element()
Expected second G1 element from BN254 CRS.
constexpr uint256_t BN254_G1_SECOND_ELEMENT_COMPRESSED
Compressed form of the second G1 element from the trusted setup.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13