|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Static Public Member Functions | |
| static field_ct | w_hex (Builder &builder, const char *hex) |
| static field_ct | w_u64 (Builder &builder, uint64_t v) |
| static std::size_t | gate_count (std::size_t N) |
| static void | test_hash (size_t num_inputs) |
| Call poseidon2 on a vector of inputs. | |
| static void | test_hash_repeated_pairs (size_t num_inputs) |
| Call poseidon2 on two inputs repeatedly. | |
| static void | test_hash_zeros (size_t num_inputs) |
| static void | test_hash_constants () |
| static void | test_hash_aliased_points () |
| Test that bn254 point coordinates with alias values produce different hashes. | |
| static void | test_padding_collisions () |
| static void | test_against_independent_values () |
Private Types | |
| using | curve = stdlib::bn254< Builder > |
| using | byte_array_ct = stdlib::byte_array< Builder > |
| using | field_ct = stdlib::field_t< Builder > |
| using | witness_ct = stdlib::witness_t< Builder > |
| using | public_witness_ct = stdlib::public_witness_t< Builder > |
| using | poseidon2 = typename stdlib::poseidon2< Builder > |
| using | native_poseidon2 = crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams > |
Definition at line 14 of file poseidon2.test.cpp.
|
private |
Definition at line 17 of file poseidon2.test.cpp.
|
private |
Definition at line 15 of file poseidon2.test.cpp.
|
private |
Definition at line 18 of file poseidon2.test.cpp.
|
private |
Definition at line 22 of file poseidon2.test.cpp.
|
private |
Definition at line 21 of file poseidon2.test.cpp.
|
private |
Definition at line 20 of file poseidon2.test.cpp.
|
private |
Definition at line 19 of file poseidon2.test.cpp.
|
inlinestatic |
Definition at line 28 of file poseidon2.test.cpp.
|
inlinestatic |
Definition at line 258 of file poseidon2.test.cpp.
|
inlinestatic |
Call poseidon2 on a vector of inputs.
| num_inputs |
Definition at line 51 of file poseidon2.test.cpp.
|
inlinestatic |
Test that bn254 point coordinates with alias values produce different hashes.
When a bn254 point is deserialized with alias x-coordinate (x + modulus), the resulting hash must be different from the canonical representation. Also verifies consistency between stdlib and native Poseidon2 implementations.
Definition at line 149 of file poseidon2.test.cpp.
|
inlinestatic |
Definition at line 123 of file poseidon2.test.cpp.
|
inlinestatic |
Call poseidon2 on two inputs repeatedly.
| num_inputs |
Definition at line 81 of file poseidon2.test.cpp.
|
inlinestatic |
Definition at line 104 of file poseidon2.test.cpp.
|
inlinestatic |
Definition at line 233 of file poseidon2.test.cpp.
|
inlinestatic |
Definition at line 25 of file poseidon2.test.cpp.
|
inlinestatic |
Definition at line 26 of file poseidon2.test.cpp.