Skip to content
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

How gnark is compatible with bellman? #10

Closed
alexeykiselev opened this issue Mar 5, 2020 · 1 comment
Closed

How gnark is compatible with bellman? #10

alexeykiselev opened this issue Mar 5, 2020 · 1 comment

Comments

@alexeykiselev
Copy link

Hello!

I've tried to verify Groth16 proof created with bellman using gnark. But soon I realised that my VK, Proof and Inputs are represented in form of compressed points.

So, here is my questions:

  1. Do you have any plans to support bellman's binary formats as inputs for hight level functions?
  2. Can you outline what I have to do to convert bellman's format to gnark's structures? (I've tried to it myself but failed, because it seems to me like goff lacks some functions, or may be I'm wrong).

Thank you in advance!

@gbotrel
Copy link
Collaborator

gbotrel commented Mar 5, 2020

Hi --
0. compressed points is on the short term roadmap of gnark

  1. we do not plan to provide interop at the gnark level with other ZKP libraries for the moment
  2. the 3 data-structures for interop are Proof, ProvingKey and VerifyingKey. They contains ecc points (G1 or G2) in Affine or Jacobian coordinates. So first step would be to ensure the data struct you're converting from (ie bellman) stores points in the same format. Probably make a mapping with the notation we use (from DIZK).
    Second step, if you use gnark CLI, the disk serialization contains few bits indicating which Curve these objects were built for. See line 72 of gob.go:
if err := encoder.Encode(curve.CurveID); err != nil {
	return err
}

Last, the VerifyingKey stores an ordered list of input names.

Please note that future developments (point compression, new proving schemes, optimization / pre-computing data) may impact these data structures.

@gbotrel gbotrel closed this as completed Mar 5, 2020
ruslangm pushed a commit to ruslangm/gnark that referenced this issue Dec 29, 2022
Co-authored-by: ZhAnGeek <lecky.z@nodereal.io>
ThomasPiellard added a commit to ThomasPiellard/gnark that referenced this issue Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants