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

#933 in Math

Download history 375/week @ 2024-01-05 518/week @ 2024-01-12 693/week @ 2024-01-19 856/week @ 2024-01-26 1087/week @ 2024-02-02 1016/week @ 2024-02-09 507/week @ 2024-02-16 713/week @ 2024-02-23 795/week @ 2024-03-01 773/week @ 2024-03-08 737/week @ 2024-03-15 1072/week @ 2024-03-22 1224/week @ 2024-03-29 2004/week @ 2024-04-05 1879/week @ 2024-04-12 633/week @ 2024-04-19

5,947 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

~2.7–4MB
~80K SLoC