-
Notifications
You must be signed in to change notification settings - Fork 16
Description
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.