# 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