|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <field_conversion.hpp>
Public Types | |
| using | DataType = uint256_t |
| using | fr = bb::fr |
| using | fq = grumpkin::fr |
| using | bn254_point = curve::BN254::AffineElement |
| using | grumpkin_point = curve::Grumpkin::AffineElement |
Static Public Member Functions | |
| template<typename T > | |
| static constexpr size_t | calc_num_fields () |
| template<typename T > | |
| static T | deserialize_from_fields (std::span< const uint256_t > vec) |
| template<typename T > | |
| static std::vector< uint256_t > | serialize_to_fields (const T &val) |
Conversion from transcript values to uint256_ts. | |
| static std::array< uint256_t, 2 > | split_challenge (const uint256_t &challenge) |
| Split a challenge field element into two half-width challenges. | |
| template<typename T > | |
| static T | convert_challenge (const bb::fr &challenge) |
Convert an fr challenge to a target type (fr or fq). Assumes challenge is "short". | |
Definition at line 192 of file field_conversion.hpp.
Definition at line 197 of file field_conversion.hpp.
| using bb::U256Codec::DataType = uint256_t |
Definition at line 194 of file field_conversion.hpp.
| using bb::U256Codec::fq = grumpkin::fr |
Definition at line 196 of file field_conversion.hpp.
| using bb::U256Codec::fr = bb::fr |
Definition at line 195 of file field_conversion.hpp.
Definition at line 198 of file field_conversion.hpp.
|
inlinestaticconstexpr |
Definition at line 201 of file field_conversion.hpp.
|
inlinestatic |
Convert an fr challenge to a target type (fr or fq). Assumes challenge is "short".
Definition at line 305 of file field_conversion.hpp.
|
inlinestatic |
Definition at line 217 of file field_conversion.hpp.
|
inlinestatic |
Conversion from transcript values to uint256_ts.
Definition at line 251 of file field_conversion.hpp.
|
inlinestatic |
Split a challenge field element into two half-width challenges.
lo is 128 bits and hi is 126 bits which should provide significantly more than our security parameter bound: 100 bits. The decomposition is constrained to be unique.
| challenge |
Definition at line 290 of file field_conversion.hpp.