pub struct Poseidon<F>(PhantomData<F>);Expand description
Implementation of the Poseidon gate
Poseidon quotient poly contribution computation f^7 + c(x) - f(wx)
Conjunction of:
ⓘ
curr[round_range(1)] = round(curr[round_range(0)])
curr[round_range(2)] = round(curr[round_range(1)])
curr[round_range(3)] = round(curr[round_range(2)])
curr[round_range(4)] = round(curr[round_range(3)])
next[round_range(0)] = round(curr[round_range(4)])
which expands e.g., to
curr[round_range(1)][0] =
mds[0][0] * sbox(curr[round_range(0)][0])
+ mds[0][1] * sbox(curr[round_range(0)][1])
+ mds[0][2] * sbox(curr[round_range(0)][2])
+ rcm[round_range(1)][0]
curr[round_range(1)][1] =
mds[1][0] * sbox(curr[round_range(0)][0])
+ mds[1][1] * sbox(curr[round_range(0)][1])
+ mds[1][2] * sbox(curr[round_range(0)][2])
+ rcm[round_range(1)][1]
...The rth position in this array contains the alphas used for the equations that constrain the values of the (r+1)th state.
Tuple Fields§
§0: PhantomData<F>Trait Implementations§
Source§impl<F> Argument<F> for Poseidon<F>where
F: PrimeField,
impl<F> Argument<F> for Poseidon<F>where
F: PrimeField,
Source§const ARGUMENT_TYPE: ArgumentType
const ARGUMENT_TYPE: ArgumentType
The type of constraints that this will produce.
This is important to enforce that we don’t combine the constraints
with powers of alpha that collide with other mutually inclusive arguments.
Source§const CONSTRAINTS: u32 = 15
const CONSTRAINTS: u32 = 15
The number of constraints created by the argument.
Source§fn constraint_checks<T: ExprOps<F, BerkeleyChallengeTerm>>(
env: &ArgumentEnv<F, T>,
cache: &mut Cache,
) -> Vec<T>
fn constraint_checks<T: ExprOps<F, BerkeleyChallengeTerm>>( env: &ArgumentEnv<F, T>, cache: &mut Cache, ) -> Vec<T>
Constraints for this argument
Auto Trait Implementations§
impl<F> Freeze for Poseidon<F>where
PhantomData<F>: Freeze,
impl<F> RefUnwindSafe for Poseidon<F>where
PhantomData<F>: RefUnwindSafe,
impl<F> Send for Poseidon<F>where
PhantomData<F>: Send,
impl<F> Sync for Poseidon<F>where
PhantomData<F>: Sync,
impl<F> Unpin for Poseidon<F>where
PhantomData<F>: Unpin,
impl<F> UnsafeUnpin for Poseidon<F>where
PhantomData<F>: UnsafeUnpin,
impl<F> UnwindSafe for Poseidon<F>where
PhantomData<F>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more