Skip to content

feat(groth16): validate data committed onchain before groth16-verify #76

Description

@manishbista28

Prover commits groth16 proof and public input(s) onchain. These need to be deserialized into appropriate data structure and validated.
For example, BigInteger needs to be a valid scalar field element, group element(s) need to lie in the correct group and subgroup(s), etc.
Existing implementation for groth16_verify* functions don't seem to validate these properties.

The suggested solution is as follows:

  1. Specify a format for data committed on-chain e.g.
    | bits of G1 element(s) | bits of G2 element(s) | bits of public input |
  2. GC Input wires assume input in this format
  3. Validate that these inputs are correctly formed. If they don't proceed to slashing condition
  4. After validation, we proceed as is being done right now with groth16_verify* functions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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