Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::Poseidon2ExternalRelationImpl< FF_ > Class Template Reference

#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
 

Detailed Description

template<typename FF_>
class bb::Poseidon2ExternalRelationImpl< FF_ >

Definition at line 11 of file poseidon2_external_relation.hpp.

Member Typedef Documentation

◆ FF

template<typename FF_ >
using bb::Poseidon2ExternalRelationImpl< FF_ >::FF = FF_

Definition at line 13 of file poseidon2_external_relation.hpp.

Member Function Documentation

◆ accumulate()

template<typename FF_ >
template<typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
static void bb::Poseidon2ExternalRelationImpl< FF_ >::accumulate ( ContainerOverSubrelations &  evals,
const AllEntities &  in,
const Parameters &  ,
const FF scaling_factor 
)
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)

Parameters
evalstransformed to evals + C(in(X)...)*scaling_factor
inan std::array containing the fully extended Univariate edges.
parameterscontains beta, gamma, and public_input_delta, ....
scaling_factoroptional term to scale the evaluation before adding to evals.

Definition at line 56 of file poseidon2_external_relation.hpp.

◆ skip()

template<typename FF_ >
template<typename AllEntities >
static bool bb::Poseidon2ExternalRelationImpl< FF_ >::skip ( const AllEntities &  in)
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.

Member Data Documentation

◆ SUBRELATION_PARTIAL_LENGTHS

template<typename FF_ >
constexpr std::array<size_t, 4> bb::Poseidon2ExternalRelationImpl< FF_ >::SUBRELATION_PARTIAL_LENGTHS
staticconstexpr
Initial value:
{
7,
7,
7,
7,
}

Definition at line 15 of file poseidon2_external_relation.hpp.


The documentation for this class was generated from the following file: