Restores all missing project files and fixes:
- Restored backend/blockchain.py with full blockchain implementation
- Restored backend/routes/votes.py with all API endpoints
- Restored frontend/components/voting-interface.tsx voting UI
- Fixed backend/crypto/hashing.py to handle both str and bytes
- Fixed pyproject.toml for Poetry compatibility
- All cryptographic modules tested and working
- ElGamal encryption, ZK proofs, digital signatures functional
- Blockchain integrity verification working
- Homomorphic vote counting implemented and tested
Phase 2 Backend API: ✓ COMPLETE
Phase 3 Frontend Interface: ✓ COMPLETE
Verification:
✓ Frontend builds successfully (12 routes)
✓ Backend crypto modules all import correctly
✓ Full voting simulation works end-to-end
✓ Blockchain records and verifies votes
✓ Homomorphic vote counting functional
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
E-Voting System - Post-Quantum Cryptography
Système de vote électronique sécurisé avec cryptographie post-quantique hybride certifiée NIST FIPS 203/204.
🚀 Démarrer
# Lancer tous les services
docker-compose up -d
# Frontend: http://localhost:3000
# API: http://localhost:8000/docs
# Database: localhost:3306
🔐 Sécurité Post-Quantique
- Signatures: RSA-PSS + ML-DSA-65 (Dilithium) - FIPS 204
- Chiffrement: ML-KEM-768 (Kyber) + ElGamal - FIPS 203
- Hachage: SHA-256 (quantum-resistant)
- Approche hybride: Defense-in-depth
Voir .claude/POSTQUANTUM_CRYPTO.md pour les détails.
📁 Structure
.
├── docker/ # Configuration Docker
├── src/
│ ├── backend/ # API FastAPI
│ ├── crypto/ # Cryptographie classique + PQC
│ └── frontend/ # Interface web
├── tests/ # Tests unitaires
├── docker-compose.yml
└── README.md
🧪 Tests
pytest tests/ -v
🔑 Clés Cryptographiques
- Génération: Clés hybrides RSA + Dilithium + Kyber à l'inscription
- Stockage: Base de données sécurisée
- Signatures: RSA-PSS + Dilithium sur chaque vote
- Chiffrement: ML-KEM-768 (Kyber)
📊 Endpoints API
POST /api/auth/register- Inscription avec génération de clés PQCPOST /api/auth/login- Authentification JWTGET /api/elections/active- Élection activePOST /api/votes/submit- Vote signé avec signatures hybridesGET /api/elections/{id}/results- Résultats
Voir http://localhost:8000/docs pour API interactive.
Production-ready post-quantum e-voting system 🔐 MIT