Skip to content

Latest commit

 

History

History
437 lines (326 loc) · 11.6 KB

File metadata and controls

437 lines (326 loc) · 11.6 KB

QS-PPI Hackathon Submission Package

Project: Quantum-Safe Privacy-Preserving Income Verification
Team: Rahul Pal & Akash Dutta
Date: March 2026


📦 Package Contents

This ZIP file contains the complete QS-PPI system ready to run locally:

QS-PPI/
├── README.md                    # Project overview
├── SUBMISSION.md                # This file (setup guide)
├── package.json                 # Node.js dependencies
├── circuits/                    # Zero-knowledge circuits
├── src/                         # Core implementation
├── tests/                       # Test suites (28 tests)
├── build/                       # Compiled circuits & keys
├── web/                         # Interactive demo UI
└── docs/                        # Technical documentation

🚀 Quick Start (5 Minutes)

Step 1: Extract ZIP File

# Extract to your preferred location
unzip QS-PPI.zip
cd QS-PPI

Step 2: Install Dependencies

Prerequisites:

  • Node.js >= 18.x (Download)
  • npm >= 9.x (comes with Node.js)
npm install

Installation time: ~2-3 minutes (downloads ~50 MB of packages)

Step 3: Run Tests (Verify Setup)

npm run test:all

Expected output:

✓ Core ZKP Tests: 10/10 passing
✓ W3C VC 2.0 Tests: 8/8 passing
✓ Post-Quantum Tests: 8/8 passing
✓ Security Audit: 14/14 passing

Total: 28/28 tests passing ✓

Step 4: Open Web Demo

Option A: Direct Open (Easiest)

# Windows
cd web
start index.html

# macOS
cd web
open index.html

# Linux
cd web
xdg-open index.html

Option B: Local Server (Recommended)

# Using Node.js http-server
npm install -g http-server
cd web
http-server -p 8000
# Visit http://localhost:8000

# OR using Python
cd web
python3 -m http.server 8000
# Visit http://localhost:8000

🎬 Demo Walkthrough

Scenario 1: Valid Income Proof

  1. Prover Panel (Left):

    • Income: 750000000 (₹7.5 LPA in paisa)
    • Threshold: 500000000 (₹5 LPA)
    • Click "Generate Zero-Knowledge Proof"
    • Result: ✅ Proof generated (isValid = TRUE)
  2. Copy Proof:

    • Click "Copy Proof JSON" button
  3. Verifier Panel (Right):

    • Paste proof JSON
    • Verifier ID: demo-verifier-001
    • Click "Verify Proof"
    • Result: ✅ Valid (income exceeds threshold)
    • Key observation: Verifier sees threshold = ₹5 LPA but NOT income = ₹7.5 LPA

Scenario 2: Invalid Income Proof

  1. Prover Panel:

    • Income: 400000000 (₹4 LPA)
    • Threshold: 500000000 (₹5 LPA)
    • Generate proof
    • Result: ⚠️ Proof generated (isValid = FALSE)
  2. Verify:

    • Paste proof → Verify
    • Result: ❌ Proof verification failed (income does not exceed threshold)

Scenario 3: Unlinkability (Privacy Feature)

  1. Generate 3 proofs with same income:

    • Proof 1: Income = 700000000, Threshold = 500000000 → Generate
    • Proof 2: Same income, same threshold → Generate again
    • Proof 3: Same income, same threshold → Generate again
  2. Compare commitments (in proof JSON):

    Proof 1: "incomeHashCommit": "0x1a2b3c4d..."
    Proof 2: "incomeHashCommit": "0x9f8e7d6c..."
    Proof 3: "incomeHashCommit": "0x3c9b8a7f..."

    All different! → Unlinkable across verifiers (no tracking)


🧪 Running Tests Individually

# Core zero-knowledge proof tests
npm test

# W3C Verifiable Credentials 2.0 tests
npm run test:vc

# Post-quantum cryptography tests
npm run test:pq

# Security audit tests
npm run test:security

📊 Key Metrics to Showcase

Metric Value Significance
Test Coverage 28/28 (100%) Production-ready
Proof Generation ~200ms Real-time performance
Proof Verification ~18ms Constant-time
Proof Size ~1KB Groth16 constant size
Privacy 100% Income never disclosed
Unlinkability 100% No cross-verifier tracking
Post-Quantum Ready ML-DSA migration plan

📖 Documentation Structure

Main Documentation

  1. README.md: Project overview, quick start, features

  2. docs/ARCHITECTURE.md: System design (19.6 KB)

    • Layer-by-layer breakdown
    • Component architecture
    • Data flow diagrams
    • Performance analysis
  3. docs/SECURITY.md: Security model (20.9 KB)

    • Threat model (5 adversary types)
    • Cryptographic guarantees
    • Attack scenarios with mitigations
    • Security audit results
  4. docs/PQ-MIGRATION.md: Post-quantum roadmap (18.8 KB)

    • 4-phase migration plan
    • ML-DSA integration
    • Quantum threat timeline
    • Adoption tracking
  5. docs/DEMO-SCRIPT.md: Presentation guide (13.4 KB)

    • 3-5 minute demo flow
    • Live demo scenarios
    • Recording tips
  6. web/README.md: Web UI documentation (9.2 KB)

    • Usage tutorials
    • Deployment options
    • Customization guide

Total documentation: 113 KB (6 comprehensive files)


🎯 Innovation Highlights

1. Zero-Knowledge Privacy

  • Technology: Groth16 SNARKs (constant-size proofs)
  • Circuit: ~100 R1CS constraints (lightweight)
  • Guarantee: Verifier learns nothing beyond validity
  • Use case: Prove income > ₹5 LPA without revealing exact salary

2. Unlinkability (Anti-Tracking)

  • Mechanism: Random blinding factors per proof
  • Result: Same income → different commitments
  • Impact: Multiple verifiers cannot correlate user across applications
  • Real-world: Apply to 3 banks → 3 unlinkable proofs

3. Tamper-Proof Security

  • Technique: Fiat-Shamir binding
  • Protection: Any modification to public signals detected
  • Challenge: SHA-256 over all public values
  • Security: Collision-resistant (256-bit)

4. Post-Quantum Ready

  • Standard: NIST FIPS 204 (ML-DSA)
  • Migration: 4-phase plan (ECDSA → Hybrid → ML-DSA)
  • Timeline: 18 months (Q1 2025 → Q2 2026)
  • Goal: 100% quantum-resistant credentials by 2026

5. Standards Compliance

  • W3C VC 2.0: Verifiable Credentials Data Model
  • Interoperability: Compatible with existing VC ecosystems
  • DID Method: did:key support
  • Revocation: StatusList2021 (on-chain + off-chain)

🌍 Real-World Applications

Financial Services

  • Loan Applications: Prove income eligibility without salary disclosure
  • Credit Cards: Verify income tier (e.g., Platinum card requires >₹10 LPA)
  • Insurance: Income-based premiums without exposing exact amount

Housing & Rentals

  • Tenant Screening: Prove income > 3x rent (landlord requirement)
  • Housing Subsidies: Verify income below threshold for government aid

Employment

  • Job Applications: Prove salary range without discrimination risk
  • Background Checks: Income verification for security clearances

Government

  • Tax Compliance: Prove income bracket without full disclosure
  • Social Welfare: Means testing for benefits eligibility

🔬 Technical Architecture

Layer 1: Circom Circuit (ZK Logic)

template IncomeProof() {
    signal input income;           // Private
    signal input threshold;        // Public
    signal input blindingFactor;   // Private
    signal input nonce;            // Private
    
    signal output isValid;         // Public
    signal output incomeHashCommit;// Public
    
    // Constraint: income > threshold
    component gt = GreaterThan(32);
    gt.in[0] <== income;
    gt.in[1] <== threshold;
    isValid <== gt.out;
    
    // Commitment: Hash(income || blinding || nonce)
    component hash = Poseidon(3);
    hash.inputs[0] <== income;
    hash.inputs[1] <== blindingFactor;
    hash.inputs[2] <== nonce;
    incomeHashCommit <== hash.out;
}

Layer 2: Groth16 Proof System

  • Proving key: build/incomeProof.zkey (3.2 MB)
  • Verification key: build/verification_key.json (1 KB)
  • Trusted setup: Powers of Tau ceremony
  • Proof generation: ~200ms (WASM witness + elliptic curve ops)
  • Verification: ~18ms (constant pairing check)

Layer 3: W3C Verifiable Credentials

  • Format: JSON-LD (context + type + proof)
  • Signing: ECDSA-Secp256k1 (current) / ML-DSA-65 (future)
  • Presentation: Holder-controlled sharing (challenge-response)
  • Revocation: StatusList2021 bitstring

🛡️ Security Validation

Automated Security Audits

Test Suite: tests/testSecurityAudit.js

Test Category Tests Status
Fiat-Shamir Binding 7 ✅ 7/7 passing
ML-DSA Key Security 3 ✅ 3/3 passing
Replay Protection 2 ✅ 2/2 passing
Input Validation 2 ✅ 2/2 passing
Total 14 ✅ 14/14 passing

Security Properties Verified

  1. Zero-Knowledge: Income hidden in all test cases
  2. Soundness: Invalid proofs correctly rejected (4 LPA < 5 LPA)
  3. Unlinkability: 3 proofs for same income all unique
  4. Non-Malleability: Tampered public signals detected
  5. Replay Resistance: Nonce reuse blocked

📦 Submission Checklist

For Judges/Evaluators

  • README.md: Clear project overview
  • Quick Start: 5-minute setup guide (this file)
  • Tests: All 28 tests passing
  • Web Demo: Interactive UI (no backend needed)
  • Documentation: 113 KB of technical specs
  • Code Quality: Clean, well-commented, modular
  • Innovation: Novel application of ZKP to income verification
  • Impact: Solves real-world privacy problem

Running Evaluation

Time required: 10-15 minutes

  1. Setup (3 min):

    npm install
  2. Verify Tests (2 min):

    npm run test:all
  3. Try Web Demo (5 min):

    • Generate valid proof
    • Verify proof
    • Test unlinkability (3 proofs)
  4. Review Docs (5 min):

    • Browse ARCHITECTURE.md
    • Check SECURITY.md
    • Scan PQ-MIGRATION.md

🎬 Demo Video Script

See docs/DEMO-SCRIPT.md for complete 3-5 minute presentation script with:

  • Problem statement (30s)
  • Live demo (2m)
  • Technical highlights (1m)
  • Use cases & impact (1m)

🏆 Competitive Advantages

vs. Traditional KYC

  • Privacy: Income hidden (traditional: fully disclosed)
  • Unlinkability: No tracking (traditional: linkable)
  • Speed: 220ms (traditional: minutes/hours)
  • Cost: Cryptographic (traditional: manual verification)

vs. Other ZKP Solutions

  • Standards: W3C VC 2.0 compliant (others: proprietary)
  • Post-Quantum: ML-DSA ready (others: vulnerable)
  • Performance: <250ms (others: seconds)
  • Proof Size: 1KB (others: 10-100KB)

📧 Contact & Support

Team:

GitHub: https://github.com/GoldLion123RP/QS-PPI

Issues: QS-PPI/issues


📜 License

MIT License - Open source, free to use and modify


🙏 Acknowledgments

  • Groth16 Implementation: snarkjs by iden3
  • Circom Compiler: iden3 team
  • W3C VC Spec: W3C Credentials Community Group
  • ML-DSA Standard: NIST (FIPS 204)
  • Powers of Tau: Privacy & Scaling Explorations

Thank you for evaluating QS-PPI!
Built with 🔐 for a privacy-first future