Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
poseidon2.cpp
Go to the documentation of this file.
1
// === AUDIT STATUS ===
2
// internal: { status: not started, auditors: [], date: YYYY-MM-DD }
3
// external_1: { status: not started, auditors: [], date: YYYY-MM-DD }
4
// external_2: { status: not started, auditors: [], date: YYYY-MM-DD }
5
// =====================
6
7
#include "
barretenberg/stdlib/hash/poseidon2/poseidon2.hpp
"
8
#include "
barretenberg/ecc/curves/grumpkin/grumpkin.hpp
"
9
namespace
bb::stdlib
{
10
11
using namespace
bb
;
12
16
template
<
typename
C>
field_t<C>
poseidon2<C>::hash
(
C
&
builder
,
const
std::vector<field_ct>
& inputs)
17
{
18
19
/* Run the sponge by absorbing all the input and squeezing one output.
20
* This should just call the sponge variable length hash function
21
*
22
*/
23
return
Sponge::hash_internal(
builder
, inputs);
24
}
25
26
template
class
poseidon2<bb::MegaCircuitBuilder>
;
27
template
class
poseidon2<bb::UltraCircuitBuilder>
;
28
29
}
// namespace bb::stdlib
bb::crypto::Poseidon2::hash
static FF hash(const std::vector< FF > &input)
Hashes a vector of field elements.
bb::stdlib::field_t
Definition
field.hpp:45
bb::stdlib::poseidon2
stdlib class that evaluates in-circuit poseidon2 hashes, consistent with behavior in crypto::poseidon...
Definition
poseidon2.hpp:23
builder
AluTraceBuilder builder
Definition
alu.test.cpp:123
grumpkin.hpp
bb::avm2::Column
Column
Definition
columns.hpp:32
bb::stdlib
Definition
graph_description_goblin.test.cpp:13
bb
Entry point for Barretenberg command-line interface.
Definition
acir_format_getters.cpp:6
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
poseidon2.hpp
src
barretenberg
stdlib
hash
poseidon2
poseidon2.cpp
Generated by
1.9.8