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

Propagate new backend changes through `poseidon377` #53

Closed redshiftzero closed 5 months ago

redshiftzero commented 7 months ago

Work towards #3675

One of the changes that will need to happen here to propagate the backend changes through poseidon377 is making decaf377 a dependency of poseidon-parameters and poseidon-permutation instead of ark-ff (previously these two crates were generic over ark_ff::PrimeField)

TODO

Followups

  1. Once generic_const_exprs is stabilized, these crates can be simplified significantly, e.g. the structs with parameters STATE_SIZE and STATE_SIZE_MINUS_1 can be STATE_SIZE, STATE_SIZE - 1. Similarly, NUM_ELEMENTS can be removed in favor of computing NUM_ROWS * NUM_COLS - filed as #57
  2. Followup to restore poseidon-paramgen - #58

Test Plan

We're testing each package builds in the target environment via:

cargo build --package $PACKAGE --no-default-features --target thumbv8m.main-none-eabi