-
Notifications
You must be signed in to change notification settings - Fork 420
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
groth16.Verify should be able to verify bellman-generated proof #30
Comments
Anything I can do to put this on the roadmap? |
https://github.com/esuwu/groth16-verifier-bls12381 |
@whyrusleeping This is already on the roadmap :-) Unless we hit some unexpected issues, should be on a
@esuwu interesting thanks for the link --> I see you added |
@gbotrel Actually I tried to use gurvy at the beginning but after I realised I don't need it. Decompression based on |
@whyrusleeping can you point me to the code for the circuit you want to verify? (+VerifyingKey and curve) |
@gbotrel seems like it's not finished yet, you're still working on it I mean bellman-generated {vk,proof, inputs}, are you? |
@esuwu didn't start yet, few other things to wrap up first. |
@esuwu did a first pass, things went quite well. I re-used your test vectors, and some are failing, will investigate, it might be coming from a slight difference in pairing implementation. Code is here Our
@esuwu where did you get your test vectors from? Encoding of the bellman For benchmarks, did compare with your code on BLS381 (unfair, as you didn't use a MultiExp but unitary ScalarMultiplication, and pairing check could be optimized):
This is the measurement that accounts for point decompression. If we don't benchmark point decompression but only the verifier:
notes on perf; should likely be twice faster on bn256, didn't bench. @whyrusleeping --> so, I'm wondering if Bottom line; verifying a |
@gbotrel hello again. The test vectors are generated from this repo: You don't have to encode
Our way of serializing objects is for Ride, it's slightly different. Bellman way of serializing is LE, but we have BE.
Actually it's not going to be a problem to convert from LE to BE and vice-versa. It's a uint256 array, so you should cut into chunks, convert every chunk and it will be like in bellman. Finally, you might have noticed that points are compressed, didn't you forget to uncompress them? Anyway you can always find methods FromCompressed() in Waves repo for both curves. https://github.com/wavesplatform/gowaves/blob/master/pkg/crypto/groth16.go |
fix: copy constraints issues causing memory grow
See #29 for more context.
Need to parse
bellman
verifying key and proof data structures, and ensure 100% compatibility withgroth16.Verify
(and the pairing check).The text was updated successfully, but these errors were encountered: