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

update Grobner basis round calculation #45

Closed redshiftzero closed 1 year ago

redshiftzero commented 1 year ago

In a recent work Algebraic cryptanalysis of POSEIDON, the authors Ashur, Buschman, and Mahzoun demonstrate that the Grobner basis bounds in the original Poseidon paper are insufficient for high security bit levels.

In RoundNumbersBuilder::algebraic_attack_grobner_basis we compute the number of rounds to defend against Grobner basis attacks. We should update this based on the new result (see P. 12). The authors note that they were unable to find issues for the 128- or 256-bit security level so the round numbers shouldn't change for poseidon377, but since this parameter generation code is intended to be generic, we should update for the larger security level.

hdevalence commented 1 year ago

Won't this be a breaking change to the parameter generation? I'm not sure anyone is using other parameters generated from this crate but I'm a bit leery of changing the generation algorithm without versioning and giving access to the old implementation.

Maybe we should just roll the change into the ::v2 parameter generation codepaths, and leave ::v1 unchanged?

redshiftzero commented 1 year ago

Yep for high bit security levels it will be a breaking change, so we could for v1:

I'm cool with Option 2 and then folding in the updated Grobner basis constraint in with the v2 parameter generation.