Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <poseidon2_external_relation.hpp>
Public Types | |
using | FF = FF_ |
Static Public Member Functions | |
template<typename AllEntities > | |
static bool | skip (const AllEntities &in) |
Returns true if the contribution from all subrelations for the provided inputs is identically zero. | |
template<typename ContainerOverSubrelations , typename AllEntities , typename Parameters > | |
static void | accumulate (ContainerOverSubrelations &evals, const AllEntities &in, const Parameters &, const FF &scaling_factor) |
Expression for the poseidon2 external round relation, based on E_i in Section 6 of https://eprint.iacr.org/2023/323.pdf. | |
Static Public Attributes | |
static constexpr std::array< size_t, 4 > | SUBRELATION_PARTIAL_LENGTHS |
Definition at line 11 of file poseidon2_external_relation.hpp.
using bb::Poseidon2ExternalRelationImpl< FF_ >::FF = FF_ |
Definition at line 13 of file poseidon2_external_relation.hpp.
|
inlinestatic |
Expression for the poseidon2 external round relation, based on E_i in Section 6 of https://eprint.iacr.org/2023/323.pdf.
This relation is defined as C(in(X)...) := q_poseidon2_external * ( (v1 - w_1_shift) + \alpha * (v2 - w_2_shift) + \alpha^2 * (v3 - w_3_shift) + \alpha^3 * (v4 - w_4_shift) ) = 0 where: u1 := (w_1 + q_1)^5 u2 := (w_2 + q_2)^5 u3 := (w_3 + q_3)^5 u4 := (w_4 + q_4)^5 t0 := u1 + u2 (1, 1, 0, 0) t1 := u3 + u4 (0, 0, 1, 1) t2 := 2 * u2 + t1 = 2 * u2 + u3 + u4 (0, 2, 1, 1) t3 := 2 * u4 + t0 = u1 + u2 + 2 * u4 (1, 1, 0, 2) v4 := 4 * t1 + t3 = u1 + u2 + 4 * u3 + 6 * u4 (1, 1, 4, 6) v2 := 4 * t0 + t2 = 4 * u1 + 6 * u2 + u3 + u4 (4, 6, 1, 1) v1 := t3 + v2 = 5 * u1 + 7 * u2 + 1 * u3 + 3 * u4 (5, 7, 1, 3) v3 := t2 + v4 (1, 3, 5, 7)
evals | transformed to evals + C(in(X)...)*scaling_factor |
in | an std::array containing the fully extended Univariate edges. |
parameters | contains beta, gamma, and public_input_delta, .... |
scaling_factor | optional term to scale the evaluation before adding to evals. |
Definition at line 56 of file poseidon2_external_relation.hpp.
|
inlinestatic |
Returns true if the contribution from all subrelations for the provided inputs is identically zero.
Definition at line 26 of file poseidon2_external_relation.hpp.
|
staticconstexpr |
Definition at line 15 of file poseidon2_external_relation.hpp.