-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch inner product proofs to Merlin for Fiat-Shamir transform #39
base: master
Are you sure you want to change the base?
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:D
is 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_serializable
andchallenge_scalar
to clean up the proof code itself.to_bytes!
works, butCanonicalSerialize
uses 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
prove
andverify
function 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