Crate openvm_poseidon2_air

Source
Expand description

This is a wrapper around the Plonky3 p3_poseidon2_air used only for integration convenience to get around some complications with field-specific generics associated with Poseidon2. Currently it is only intended for use in OpenVM with BabyBear.

We do not recommend external use of this crate, and suggest using the p3_poseidon2_air crate directly.

Re-exports§

pub use openvm_stark_sdk::p3_baby_bear;
pub use p3_poseidon2;
pub use p3_poseidon2_air;
pub use p3_symmetric;

Structs§

BABYBEAR_BEGIN_EXT_CONSTS
BABYBEAR_END_EXT_CONSTS
BABYBEAR_PARTIAL_CONSTS
BabyBearPoseidon2LinearLayers
Linear layers for BabyBear Poseidon2 using the Plonky3 interfaces, but with a hand-rolled internal layer to preserve the previous constraint DAG.
Poseidon2Air
Assumes the field size is at least 16 bits.
Poseidon2Config
Poseidon2Constants
Poseidon2ExternalLayer
Poseidon2InternalLayer
Poseidon2SubChip
SBOX_REGISTERS affects the max constraint degree of the AIR. See p3_poseidon2_air for more details.

Enums§

Poseidon2Executor
Poseidon2SubAir

Constants§

BABY_BEAR_POSEIDON2_FULL_ROUNDS
BABY_BEAR_POSEIDON2_HALF_FULL_ROUNDS
BABY_BEAR_POSEIDON2_PARTIAL_ROUNDS
BABY_BEAR_POSEIDON2_SBOX_DEGREE
INTERNAL_DIAG_MONTY_16
The vector [-2, 1, 2, 1/2, 3, 4, -1/2, -3, -4, 1/2^8, 1/4, 1/8, 1/2^27, -1/2^8, -1/16, -1/2^27] saved as an array of BabyBear elements. Copied from plonky3’s Poseidon2 implementation to preserve the exact constraint structure.
POSEIDON2_WIDTH

Traits§

Permutation
A permutation in the mathematical sense.

Type Aliases§

Plonky3Poseidon2Air
Plonky3Poseidon2Executor
Plonky3RoundConstants
Poseidon2SubCols