Poseidon is a hash function designed to minimize prover and verifier complexities when zero-knowledge proofs are generated and validated.

Until recently, developers using the Python programming language weren’t able to utilize Poseidon Hash, a ZK friendly hashing algorithm.

No Longer.

The first Python implementation of Poseidon hash is now Open Source and ready for exploration.

pypi.org

The repository contains a reference implementations for the original version of Poseidon [1] and the instantiation as a hash function tuned for Filecoin [2]. Moreover, scripts to calculate the round numbers, the round constants, and the MDS matrices are also included.

[1] Poseidon: A New Hash Function for Zero-Knowledge Proof Systems. Cryptology ePrint Archive, Report 2019/458. https://eprint.iacr.org/2019/458. Accepted at USENIX’21.

[2] Neptune specification https://github.com/filecoin-project/neptune/tree/master/spec