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

#include <poseidon2_internal_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 internal round relation, based on I_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::Poseidon2InternalRelationImpl< FF_ >

Definition at line 13 of file poseidon2_internal_relation.hpp.

Member Typedef Documentation

◆ FF

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

Definition at line 15 of file poseidon2_internal_relation.hpp.

Member Function Documentation

◆ accumulate()

template<typename FF_ >
template<typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
static void bb::Poseidon2InternalRelationImpl< FF_ >::accumulate ( ContainerOverSubrelations &  evals,
const AllEntities &  in,
const Parameters &  ,
const FF scaling_factor 
)
inlinestatic

Expression for the poseidon2 internal round relation, based on I_i in Section 6 of https://eprint.iacr.org/2023/323.pdf.

This relation is defined as C(in(X)...) := q_poseidon2_internal * ( (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 sum := u1 + w_2 + w_3 + w_4 v1 := u1 * D1 + sum v2 := w_2 * D2 + sum v3 := w_3 * D3 + sum v4 := w_4 * D4 + sum Di is the ith internal diagonal value - 1 of the internal matrix M_I

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 53 of file poseidon2_internal_relation.hpp.

◆ skip()

template<typename FF_ >
template<typename AllEntities >
static bool bb::Poseidon2InternalRelationImpl< FF_ >::skip ( const AllEntities &  in)
inlinestatic

Returns true if the contribution from all subrelations for the provided inputs is identically zero.

Definition at line 28 of file poseidon2_internal_relation.hpp.

Member Data Documentation

◆ SUBRELATION_PARTIAL_LENGTHS

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

Definition at line 17 of file poseidon2_internal_relation.hpp.


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