Poseidon
Overview
This is Starkom's implementation of the Poseidon algebraic hash.
The implementation is generic and works on any prime field.
Configurations for the BLS12-381 and BlueSky prime fields are provided; they support T=3 (R=2, C=1) and T=4 (R=3, C=1).
[!NOTE] The BLS12-381 configurations are controlled by the
bls12_381feature flag, which is disabled by default.
Usage
The following example functions instantiate Poseidon with T=3 and T=4 respectively, squeezing a single element from the output. Both use a single element for capacity.
use Scalar;
use starkom_poseidon;