Expand description
Generic implementations of Poseidon1 linear layers.
This module provides two things:
-
GenericPoseidon1LinearLayers— a trait with default dense/sparse linear layer methods, used by field-specific implementations that only need to override individual operations. -
Poseidon1ExternalLayerGenericandPoseidon1InternalLayerGeneric— ready-to-use layer structs that implementFullRoundLayerandPartialRoundLayerfor any field with a conforming MDS permutation. These are suitable for fields without hand-tuned SIMD implementations (e.g., Goldilocks, Mersenne-31).
Structs§
- Poseidon1
External Layer Generic - Generic external (full round) layer for the Poseidon1 permutation.
- Poseidon1
Internal Layer Generic - Generic internal (partial round) layer for the Poseidon1 permutation.
- Poseidon1
Internal Layer Textbook - Textbook internal (partial round) layer for the Poseidon1 permutation.
Traits§
- Generic
Poseidon1 Linear Layers - Generic linear layer trait for Poseidon1.
Functions§
- add_
rc_ and_ sbox_ generic - Generic round-constant addition followed by S-box evaluation:
val <- (val + rc)^D.