2026-01-23 19:37:04 +01:00
2026-01-22 22:36:25 +01:00
2026-01-22 21:18:41 +01:00
2026-01-23 19:37:04 +01:00
2026-01-23 16:13:57 +01:00
2026-01-23 16:13:57 +01:00
2026-01-23 16:13:57 +01:00
2026-01-23 19:37:04 +01:00

rust-poseidon-bn254-pure

Self-contained (no external dependencies), pure Rust implementation of Poseidon and Poseidon2 hash functions over the BN254 curve's scalar field, using 32 bit limbs internally.

It's intended to be used on 32-bit platforms, eg. 32-bit RISC-V (rv32im) (though porting to 64 bits shouldn't be a big effort).

The algebra implementation is based on zikkurat-algebra and staging-agda.

Status

Currently, only Poseidon2 with t=3 is implemented.

TODO

  • optimize squaring to use less multiplications (?)
  • benchmark RISC-V cycles
  • add more Poseidon2 state widths (not just t=3)
  • implement circomlib-compatible Poseidon
  • add a test-suite; in particular, more complete testing of the field operations
  • add a 64 bit version
  • further optimizations
Description
Self-contained Rust implementation of Poseidon hashes over BN254
Readme
Languages
Haskell 46.4%
Circom 43.9%
Rust 9.1%
Sage 0.6%