Skip to content

Design and Implement Circom Circuits for Vaccination Status Proof #117

Description

@grantfox-oss

Description: Implement production-ready Circom circuits that enable users to generate zero-knowledge proofs of their vaccination status without revealing any personal health information. This task focuses solely on circuit design, implementation, and testing.

Requirements:

Circuit Design:
Design a main circuit VaccinationProof.circom that proves:
User has a valid vaccination credential
Vaccination date is within a specified time window
Vaccine type matches the required type
Booster shot requirements are met (if applicable)
Implement sub-circuits for:
Merkle tree membership proof (credential exists in registry)
Date range verification
Vaccine type matching
Nullifier generation (to prevent proof replay)
Circuit Implementation:
Use Circom 2.0+ syntax
Optimize for constraint count (< 500k constraints)
Implement custom templates for common operations
Add comprehensive comments for circuit logic
Ensure circuits are deterministic and reproducible
Testing:
Write Circom test cases for all circuit components
Test with edge cases (invalid dates, wrong vaccine types, missing boosters)
Measure proving time and constraint count
Verify proof generation and verification locally
Achieve >95% test coverage
Documentation:
Document circuit architecture and signal flow
Create input/output specification
Explain security assumptions and guarantees
Provide usage examples with sample inputs
Technical Constraints:

Maximum circuit size: 500k constraints
Proving time: < 30s on consumer hardware
Proof size: < 2KB
Must use Circom 2.0+ compatible libraries
Acceptance Criteria:

Main circuit VaccinationProof.circom implemented and compiles successfully
All sub-circuits implemented and tested
Circuit constraint count < 500k
Proving time < 30s on average hardware
Test suite with >95% coverage
Documentation complete (architecture, inputs/outputs, usage)
Sample proof generation and verification working
Security review checklist completed
Priority: High Difficulty: Hard Estimated Effort: 2-3 weeks

Dependencies:

Circom compiler installed
Circomlib available for common templates
Basic understanding of zk-SNARKs
Resources:

Circom documentation: https://docs.circom.io/
Circomlib: https://github.com/iden3/circomlib
Existing zk/README.md in project

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions