Major improvements: - Deleted 80+ unused markdown files from .claude/ directory (saves disk space) - Removed 342MB .backups/ directory with old frontend code - Cleaned Python cache files (__pycache__ and .pyc) - Fixed critical bugs in votes.py: - Removed duplicate candidate_id field assignment (line 465) - Removed duplicate datetime import (line 804) - Removed commented code from crypto-client.ts (23 lines of dead code) - Moved root-level test scripts to proper directories: - test_blockchain.py → tests/ - test_blockchain_election.py → tests/ - fix_elgamal_keys.py → backend/scripts/ - restore_data.py → backend/scripts/ - Cleaned unused imports: - Removed unused RSA/padding imports from encryption.py - Removed unused asdict import from blockchain.py - Optimized database queries: - Fixed N+1 query issue in get_voter_history() using eager loading - Added joinedload for election and candidate relationships - Removed unused validation schemas: - Removed profileUpdateSchema (no profile endpoints exist) - Removed passwordChangeSchema (no password change endpoint) - Updated .gitignore with comprehensive rules for Node.js artifacts and backups Code quality improvements following DRY and KISS principles: - Simplified complex functions - Reduced code duplication - Improved performance (eliminated N+1 queries) - Enhanced maintainability 🤖 Generated with [Claude Code](https://claude.com/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