Alexis Bruneteau 55995365be docs: Add proper openspec configuration for MVP
Created comprehensive openspec structure:

openspec/specs/:
- mvp.md: MVP feature overview
- architecture.md: System architecture and data flows

openspec/changes/add-pqc-voting-mvp/:
- proposal.md: Project proposal with scope and rationale
- tasks.md: Detailed implementation tasks (6 phases, 30+ tasks)
- design.md: Complete design document
  - Cryptographic algorithms (Paillier, Kyber, Dilithium, ZKP)
  - Data structures (Block, Blockchain, Ballot)
  - API endpoint specifications
  - Security properties matrix
  - Threat model and mitigations

Follows openspec three-stage workflow:
1. Creating changes (proposal-based)
2. Implementation (tracked via tasks)
3. Completion (with validation)

Ready for implementation phase with clear requirements.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 18:02:33 +01:00

2.5 KiB

MVP Specification - E-Voting System

Overview

Minimum Viable Product for secure electronic voting with blockchain and post-quantum cryptography.

Features

Core Cryptographic Components

  • Paillier Homomorphic Encryption: Vote encryption and homomorphic summation
  • Kyber (ML-KEM): Post-quantum key encapsulation for private key protection
  • Dilithium (ML-DSA): Post-quantum digital signatures for ballots and blocks
  • Zero-Knowledge Proofs: Ballot validity without revealing vote
  • Blockchain: Immutable vote recording with SHA-256 hashing

API Endpoints

POST   /api/votes/setup                 # Initialize election
GET    /api/votes/public-keys           # Retrieve public keys
POST   /api/votes/register-voter        # Register voter with keys
POST   /api/votes/submit                # Submit encrypted ballot
GET    /api/votes/blockchain            # Get blockchain state
GET    /api/votes/results               # Get homomorphic vote count

Frontend Features

  • Election details display
  • Client-side ballot encryption
  • Ballot signing and submission
  • Blockchain visualization
  • Chain integrity verification
  • Results display with proofs

Backend Modules

  • crypto_tools.py: Cryptographic operations
  • blockchain.py: Blockchain data structure
  • routes/votes.py: Voting API
  • scripts/scrutator.py: Vote counting

Security Properties

Property Mechanism Guarantee
Vote Secrecy Paillier Encryption Votes encrypted before submission
Vote Integrity Blockchain + Dilithium Immutable, signed blocks
Anonymity Transaction ID Voter ID verified once, not stored
Verifiability ZKP + Chain Ballot and chain verification
Post-Quantum Kyber + Dilithium Quantum-resistant algorithms

Implementation Timeline

Phase 1: Cryptographic Foundations

  • Implement Paillier homomorphic encryption
  • Integrate Kyber and Dilithium
  • Create blockchain module
  • Write unit tests

Phase 2: Backend API

  • Implement voting endpoints
  • Database models for crypto keys
  • Blockchain persistence
  • Scrutator module

Phase 3: Frontend Interface

  • Voting component
  • Client-side crypto operations
  • Vote submission workflow

Phase 4: Blockchain Visualization

  • Display blockchain blocks
  • Chain verification UI
  • Vote progress tracking

Phase 5: Results & Reporting

  • Results display page
  • Verification proofs
  • Audit trail

Phase 6: Testing & Report

  • Technical & scientific report
  • Unit and integration tests
  • Docker deployment verification