mirror of
https://github.com/luxfi/crypto.git
synced 2026-10-30 16:59:13 +00:00
Canonical Rust binding for the Poseidon2 t=2 BN254 Merkle-Damgard hasher landed in luxcpp/crypto/poseidon. Links statically against libposeidon.a + libposeidon_cpu.a and exposes: hash(input) -> [u8; 32] hash_into(input, output) -> in-place fill of caller buffer Byte-equal to upstream gnark-crypto v0.20.1 (NewMerkleDamgardHasher over NewParameters(2, 6, 50)). 10 spec-vector integration tests pass, including the canonical 32B/64B/96B block-boundary cases and trivial avalanche/determinism checks. Crate is no_std + forbid(unsafe_op_in_unsafe_fn) and follows the existing per-algorithm crate layout.