Skip to content

Verify Eddsa signature within zokrates.js #16

@newtsjamie

Description

@newtsjamie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions