4 releases (breaking)

0.4.0 Jul 5, 2023
0.3.0 Apr 27, 2023
0.2.0 Apr 19, 2023
0.1.0 Dec 1, 2022

#1562 in Math

Download history 79/week @ 2024-08-31 6/week @ 2024-09-07 2/week @ 2024-09-14 21/week @ 2024-09-21 13/week @ 2024-09-28 3/week @ 2024-10-05 4/week @ 2024-10-12 11/week @ 2024-10-19 4/week @ 2024-10-26 1/week @ 2024-11-02 2/week @ 2024-11-16 1/week @ 2024-11-23 125/week @ 2024-11-30 69/week @ 2024-12-07 16/week @ 2024-12-14

212 downloads per month

MIT/Apache

110KB
2K SLoC

poseidon-paramgen

Crates.io

This crate is an independent implementation of Poseidon parameter generation.


lib.rs:

Module for generating parameters for the Poseidon SNARK-friendly hash function.

This crate will, given a choice of:

  • M, the desired security level (in bits),
  • t, the width of the desired hash function, e.g. $t=3$ corresponds to 2-to-1 hash.
  • p, the prime modulus,
  • allow_inverse, whether or not to allow an inverse alpha for the Sbox layer.

generate the best choice of parameters, for both the unoptimized version of Poseidon specified in the Poseidon paper, as well as the optimizations described in Appendix B.

Dependencies

~3–4.5MB
~85K SLoC