penumbra-zone / poseidon377

An instantiation of the Poseidon hash for use with decaf377
https://protocol.penumbra.zone/main/crypto/poseidon.html
Other
28 stars 10 forks source link

replace `ark-sponge` #22

Closed redshiftzero closed 2 years ago

redshiftzero commented 2 years ago

Closes #18

This replaces ark-sponge with poseidon-permutation without making parameter changes: it instead adds logic to derive the optimized parameters from the existing parameter set (see benchmarks in #21).

There are proptests comparing the old implementation to the new as a check that we're not breaking hashes out in the wild.

After this is merged, the oldparams branch should be updated to "deploy" this given that the other penumbra repositories are pinned to that branch (ref: https://github.com/penumbra-zone/penumbra/pull/1102)