Switch inner product proofs to Merlin for Fiat-Shamir transform#39
Switch inner product proofs to Merlin for Fiat-Shamir transform#39rozbb wants to merge 8 commits intoarkworks-rs:masterfrom
Conversation
|
Ope I forgot to update |
|
Side note: this obsoletes the other two pending PRs, as those dependencies no longer exist |
|
Hey Michael, thanks for the great PR! Quick question: do you think it is worthwhile to integrate this as is, or to use |
|
Oh this is an interesting point I hadn't considered. The long and the short of it is: So the downside of these changes is that, if you wanted to write an IPP protocol in a circuit, you'd have no way of doing it now. Versus previously, you could theoretically replace That said, for now I think it's worth it to go with the current, non-parameterized transcript method, at the very least because of the soundness issue. And then going forward, the next steps would be to implement a |
|
Thanks for the analysis! That would probably be helpful for other SNARK-related protocols too. So I'll merge this with the current design, and if you'd like we can collaborate on extending |
|
Went down a rabbithole again and left a PR on |
|
This went really stale lol. We can merge this if you're inclined to update it, but obviously no pressure |
|
I 100% forgot I wrote this. Looks like a slog lol. Feel free to close and I'll resubmit when I get some time. Obv this is a necessary change before ripp gets used in any serious context. |
Previously, the way F-S transcripts were done was manually with a hash function and
to_bytes!calls on the transcript values. I switched everything to use the Merlin transcript constructor instead. The changes have a few benefits:Dis no longer a type parameter for any of the proof structs because it's now fixed to be a Keccak backend. I also added helper functionsappend_serializableandchallenge_scalarto clean up the proof code itself.to_bytes!works, butCanonicalSerializeuses compressed representation by default. So if that's not whatto_bytes!does, then the new way is faster.One downside: the API has changed. Every
proveandverifyfunction now takes atranscript: &mut merlin::Transcript. This is necessary though if you want to allow sound composability.Let me know if anything looks not quite right