MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.
https://minaprotocol.com
Apache License 2.0
1.97k stars 523 forks source link

Fiat Shamir consistency #14173

Open joseandro opened 9 months ago

joseandro commented 9 months ago

Implementing Fiat Shamir transformation is very subtle. There have been bugs in the past in implementations. We must be sure we add to the transcript all the prover outputs, and also we can have some optimisations regarding the sponge mode (instead of absorbing with a small state 10 elements, we could have a permutation with 10 elements directly). With customizable kimchi, we will need to be sure to add all commitments and all evaluations, which might be error-prone.

Merlin has been created in 22' (I think) as a Rust library to solve some issues. And there is a WIP to improve it called nimue. It reminded me a past project I had in mind. I suggest to implement some of the ideas of Merlin and nimue, including, but not restricted to:

This is the top of my mind night ideas. Most of the properties must be verifiable at compile time to forbid unsound FS transformation. The first step would be to have a look at merlin and nimue.

dannywillems commented 9 months ago

For the vulnerability: https://blog.trailofbits.com/2022/04/18/the-frozen-heart-vulnerability-in-plonk/.