Expand description
Poseidon2 hash over the Goldilocks field used by the Lighter signer.
Exposes the fixed-width permutation permute together with the sponge
API the Lighter Schnorr binding consumes (hash_no_pad,
hash_two_to_one, hash_n_to_one, hash_to_quintic_extension).
Parameter constants live in params and were transcribed from the
Apache-2.0 Go reference; equivalence is verified by fixture vectors under
test_data/.
Re-exports§
pub use params::RATE;pub use params::ROUNDS_F;pub use params::ROUNDS_F_HALF;pub use params::ROUNDS_P;pub use params::WIDTH;
Modules§
- params
- Lighter Poseidon2 parameter set, defined verbatim from the Apache-2.0 Go
reference implementation
elliottech/poseidon_cryptoat the pinned revision recorded in the fixture metadata. Each round constant, the diagonal of the internal MDS matrix, and the round counts must agree byte-for-byte with that reference; the fixture vectors undertest_data/verify equivalence.
Constants§
Functions§
- hash_
n_ to_ hash_ no_ pad - Compress an arbitrary-length input to a fixed
HASH_OUT-element digest. - hash_
n_ to_ m_ no_ pad - Variable-length absorb / variable-length squeeze sponge built on
permute. - hash_
n_ to_ one - Iteratively compress
inputsleft-to-right viahash_two_to_one. - hash_
no_ pad - Convenience alias for
hash_n_to_hash_no_padmatching the Lighter Go API. - hash_
to_ quintic_ extension - Hash an arbitrary-length input into the quintic extension
Fp5. - hash_
two_ to_ one - Two-to-one compression of two
HASH_OUT-element digests. - hash_
two_ to_ quintic - Hash a
(Fp5, Fp5)pair as a 10-element preimage into a singleFp5. - permute
- In-place Poseidon2 permutation over a
WIDTH-element state.