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

Initial-linear-layer relation for Poseidon2 (Mega). More...

#include <poseidon2_initial_external_relation.hpp>

Public Types

using FF = FF_
 

Static Public Member Functions

template<typename AllEntities >
static bool skip (const AllEntities &in)
 
template<typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
static void accumulate (ContainerOverSubrelations &evals, const AllEntities &in, const Parameters &, const FF &scaling_factor)
 

Static Public Attributes

static constexpr std::array< size_t, 4 > SUBRELATION_PARTIAL_LENGTHS
 

Detailed Description

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

Initial-linear-layer relation for Poseidon2 (Mega).

Poseidon2 begins with a linear-only application of the external matrix. Given input \( \mathbf{x} = (x_0, x_1, x_2, x_3) \), this relation enforces \( \mathbf{y} = M_E \cdot \mathbf{x} \).

The row's wires hold the raw input; the next row's wires hold M_E · input. That next row is the first external-round row, which consumes M_E · input as its starting state.

Subrelations (each × q_poseidon2_external_initial × gate separator, partial degree 3): A_0: 5 w_l + 7 w_r + w_o + 3 w_4 = w_l_shift A_1: 4 w_l + 6 w_r + w_o + w_4 = w_r_shift A_2: w_l + 3 w_r + 5 w_o + 7 w_4 = w_o_shift A_3: w_l + w_r + 4 w_o + 6 w_4 = w_4_shift

Definition at line 22 of file poseidon2_initial_external_relation.hpp.

Member Typedef Documentation

◆ FF

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

Definition at line 24 of file poseidon2_initial_external_relation.hpp.

Member Function Documentation

◆ accumulate()

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

Definition at line 39 of file poseidon2_initial_external_relation.hpp.

◆ skip()

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

Definition at line 33 of file poseidon2_initial_external_relation.hpp.

Member Data Documentation

◆ SUBRELATION_PARTIAL_LENGTHS

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

Definition at line 26 of file poseidon2_initial_external_relation.hpp.


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