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

Verify Eddsa signature within zokrates.js #16

Open
jammydodga1 opened this issue Apr 7, 2022 · 0 comments
Open

Verify Eddsa signature within zokrates.js #16

jammydodga1 opened this issue Apr 7, 2022 · 0 comments

Comments

@jammydodga1
Copy link

jammydodga1 commented Apr 7, 2022

Hi.

I am trying to verify an Eddsa signature within the zokrates.js wrapper but struggling with computing a witness using zokrates_inputs.txt inputs. The issue relates specifically to arranging the input data inside const { witness, output } = zokratesProvider.computeWitness() so that it corresponds with private field[2] R, private field S, field[2] A, u32[8] M0, u32[8] M1 in the verify function. I have tried manually passing the contents of zokrates_inputs.txt in the format specified above but I can only get as far as field[2] before the rest of the witness fails to compute. Ideally looking for a solution where I can pass the full zokrates_inputs.txt file into zokratesProvider.computeWitness() seamlessly, akin to cat zokrates_inputs.txt | zokrates compute-witness --stdin were this outside zokrates.js. I understand this might mean tinkering with path = 'zokrates_inputs.txt' write_signature_for_zokrates_cli(pk, sig, msg, path) to create an output readily useable with zokratesProvider.computeWitness().
Would appreciate some guidance. Thank you.

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

1 participant