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

#300 in Math

Download history 237/week @ 2023-06-14 347/week @ 2023-06-21 326/week @ 2023-06-28 597/week @ 2023-07-05 368/week @ 2023-07-12 389/week @ 2023-07-19 390/week @ 2023-07-26 325/week @ 2023-08-02 358/week @ 2023-08-09 408/week @ 2023-08-16 184/week @ 2023-08-23 160/week @ 2023-08-30 432/week @ 2023-09-06 527/week @ 2023-09-13 553/week @ 2023-09-20 378/week @ 2023-09-27

1,908 downloads per month
Used in poseidon377

MIT/Apache

115KB
2.5K 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

~2.6–3.5MB
~75K SLoC