#include <poseidon2.hpp>
Definition at line 17 of file poseidon2.hpp.
◆ Poseidon2()
◆ hash()
| FF bb::avm2::simulation::Poseidon2::hash |
( |
const std::vector< FF > & |
input | ) |
|
|
overridevirtual |
Hashes a vector of field elements using the Poseidon2 permutation function in a sponge-like manner with capacity 1 and rate 3.
- Parameters
-
| input | The input vector of field elements to hash. |
- Returns
- The hash of the input vector as a field element.
Implements bb::avm2::simulation::Poseidon2Interface.
Definition at line 35 of file poseidon2.cpp.
◆ permutation() [1/2]
| std::array< FF, 4 > bb::avm2::simulation::Poseidon2::permutation |
( |
const std::array< FF, 4 > & |
input | ) |
|
|
overridevirtual |
Applies the Poseidon2 permutation function to a single input state.
- Parameters
-
| input | The input state as an array of 4 field elements to apply the permutation function to. |
- Returns
- The output state as an array of 4 field elements after the permutation function has been applied.
Implements bb::avm2::simulation::Poseidon2Interface.
Definition at line 74 of file poseidon2.cpp.
◆ permutation() [2/2]
Applies the Poseidon2 permutation function to a single input state from memory. This function reads 4 sequential elements from memory and writes 4 sequential elements to memory.
- Parameters
-
| memory | The memory interface to read and write from. |
| src_address | The source memory address to read from. |
| dst_address | The destination memory address to write to. |
- Exceptions
-
| Poseidon2Exception |
- if the source or destination memory slice is out of range.
- if the tags of the input memory slice are not FF.
|
Implements bb::avm2::simulation::Poseidon2Interface.
Definition at line 92 of file poseidon2.cpp.
◆ execution_id_manager
◆ gt
◆ hash_events
◆ perm_events
◆ perm_mem_events
The documentation for this class was generated from the following files: