-
Notifications
You must be signed in to change notification settings - Fork 200
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
feat: add dory commitment scheme #586
base: main
Are you sure you want to change the base?
Conversation
8f76867
to
f887d89
Compare
Hi @g1684774 ! Thanks for taking this on! I haven't had a chance to thoroughly review your PR yet, but let me try to answer some of your questions first:
Our Transcript struct should be used for the "reduce" steps in the Dory code. Both are used to implement the Fiat-Shamir transform –– we have some running "digest" or "state", and whenever the prover makes a commitment of some sort, the commitment has to be "absorbed" into the digest (aka appended to the transcript) by making (in broad strokes) the following update:
See inline comment
What you have is fine for now!
Yes, panic is ok
See above answer about the Transcript; note that we have a
See above answer about the Transcript Btw, if you haven't already you might want to check out Section 15.4 of Justin's book, which covers Dory. There may be some discrepancies between the description there and the Go implementation, but it should provide some high-level context for why things work the way they do. |
let v1 = params | ||
.g1v | ||
.iter() | ||
.zip(poly.iter()) | ||
.map(|(a, b)| *a * *b) | ||
.collect::<Vec<G1<P>>>(); | ||
|
||
let v2 = params | ||
.g2v | ||
.iter() | ||
.zip(poly.iter()) | ||
.map(|(a, b)| *a * *b) | ||
.collect::<Vec<G2<P>>>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are multi-scalar multiplications (MSMs), which we have our own optimized implementation for: https://github.com/a16z/jolt/blob/main/jolt-core/src/msm/mod.rs#L176-L220
Note that it supports all types of MultilinearPolynomials
Signed-off-by: Ray <[email protected]>
Thanks for the response. I have a few more questions:
|
I have a rewrite from DualDory (go) and I'm currently porting it to jolt.
I'd like some help to understand:
I'm new to jolt and I don't understand if the API is already defined or it needs to change to fit Dory.
I'm also currently learning about ZK and Snarks cryptography, so please let me know if there's something wrong.