Skip to content

Title: Feature: Implement Zero-Knowledge Proofs (zk-SNARKs) for Confidential Evidence Verification #356

@Adithyakp86

Description

@Adithyakp86

Description

Currently, the system anchors evidence hashes (SHA-256) directly to the Polygon blockchain using the EvidenceStorage.sol contract. While this ensures immutability, it potentially exposes metadata fingerprints of highly sensitive judicial evidence on a public ledger.

To achieve true "Zero-Trust Architecture" (as outlined in Phase 2) and enhance privacy, we need to implement Zero-Knowledge Proofs (zk-SNARKs). This will allow investigators and courts to cryptographically prove that a specific piece of evidence exists and remains untampered with, without ever exposing the actual hash or metadata on the public chain.

Proposed Solution

  1. Circuit Generation: Write a circom circuit that takes the original evidence hash as a private input and a public commitment (e.g., a Pedersen hash) representing the case/organization.
  2. Smart Contract Update: Upgrade EvidenceStorage.sol to include a verifyProof function using a generated Solidity verifier contract.
  3. Backend Integration: Update the Express.js API to generate zk-proofs off-chain using snarkjs before submitting the transaction via ethers.js.
  4. Verification Flow: Update the evidence-verification.js frontend module to validate the zk-proof against the blockchain state instead of doing raw hash comparisons.

Technical Stack

  • circom / snarkjs
  • Solidity (Verifier Smart Contract)
  • Node.js / ethers.js

Acceptance Criteria

  • ZK circuit compiled and verifier smart contract deployed to Polygon Amoy.
  • EvidenceStorage.sol successfully upgraded to accept and verify proofs.
  • Backend generates proofs dynamically upon evidence upload.
  • Verification times remain under 5 seconds on the frontend.
  • Comprehensive unit tests added to Hardhat (tests/).

Labels: enhancement, blockchain, hard, security

Assign this issue to me under the OSCG

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions