|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Mock transcript class used by IPA tests and fuzzer. More...
#include <mock_transcript.hpp>
Public Member Functions | |
| void | initialize (std::vector< uint256_t > challenges_, std::vector< bb::curve::Grumpkin::AffineElement > group_elements_={}, std::vector< uint256_t > field_elements_={}) |
| Initialize the transcript (requires to submit the challenges) | |
| void | reset_indices () |
| Reset the indices of elements sampled after using the transcript with the prover. | |
| template<typename T > | |
| void | send_to_verifier (const std::string &, const T &element) |
| Send something that can be converted to uint256_t to the verifier (used for field elements) | |
| template<typename T > | |
| void | add_to_hash_buffer (const std::string &, const T &element) |
| Add something to the hash buffer(s). | |
| template<typename T > | |
| T | get_challenge (const std::string &) |
| Get a challenge from the verifier. | |
| template<typename T > | |
| T | receive_from_prover (const std::string &) |
| Receive elements from the prover. | |
Public Attributes | |
| std::vector< uint256_t > | challenges |
| std::vector< bb::curve::Grumpkin::AffineElement > | group_elements |
| std::vector< uint256_t > | field_elements |
| std::vector< bb::curve::Grumpkin::AffineElement > | hash_buffer_group_elements |
| std::vector< uint256_t > | hash_buffer_field_elements |
| size_t | current_challenge_index = 0 |
| size_t | current_field_index = 0 |
| size_t | current_group_index = 0 |
Mock transcript class used by IPA tests and fuzzer.
This transcript can send previously determined challenges instead of ones generated by Fiat Shamir. It can also store elements received from the prover. It also has symbolic hash buffers. (The hash buffers exist only because ipa uses them, as they are methods for the Transcript class.)
Definition at line 13 of file mock_transcript.hpp.
|
inline |
Add something to the hash buffer(s).
Definition at line 81 of file mock_transcript.hpp.
|
inline |
Get a challenge from the verifier.
Definition at line 94 of file mock_transcript.hpp.
|
inline |
Initialize the transcript (requires to submit the challenges)
| challenges_ | Challenges that will be sent to the prover/verifier |
| group_elements_ | Group elements sent to the verifier |
| field_elements_ | Field elements sent to the verifier |
Definition at line 39 of file mock_transcript.hpp.
|
inline |
Receive elements from the prover.
Definition at line 106 of file mock_transcript.hpp.
|
inline |
Reset the indices of elements sampled after using the transcript with the prover.
After the transcipt received elements from the prover, this method allows to reset counters so that the verifier can receive those elements
Definition at line 56 of file mock_transcript.hpp.
|
inline |
Send something that can be converted to uint256_t to the verifier (used for field elements)
Definition at line 66 of file mock_transcript.hpp.
| std::vector<uint256_t> bb::MockTranscript::challenges |
Definition at line 16 of file mock_transcript.hpp.
| size_t bb::MockTranscript::current_challenge_index = 0 |
Definition at line 28 of file mock_transcript.hpp.
| size_t bb::MockTranscript::current_field_index = 0 |
Definition at line 29 of file mock_transcript.hpp.
| size_t bb::MockTranscript::current_group_index = 0 |
Definition at line 30 of file mock_transcript.hpp.
| std::vector<uint256_t> bb::MockTranscript::field_elements |
Definition at line 20 of file mock_transcript.hpp.
| std::vector<bb::curve::Grumpkin::AffineElement> bb::MockTranscript::group_elements |
Definition at line 18 of file mock_transcript.hpp.
| std::vector<uint256_t> bb::MockTranscript::hash_buffer_field_elements |
Definition at line 25 of file mock_transcript.hpp.
| std::vector<bb::curve::Grumpkin::AffineElement> bb::MockTranscript::hash_buffer_group_elements |
Definition at line 23 of file mock_transcript.hpp.