Refactor technical report formatting and enhance clarity of server actions and cryptographic processes in the e-voting system documentation.

This commit is contained in:
E-Voting Developer 2025-11-11 23:06:48 +01:00
parent 3094b9f01b
commit 5933834627
3 changed files with 4735 additions and 4901 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
#set page(margin: (top: 2cm, bottom: 2cm, left: 2.5cm, right: 2.5cm)) #set page(margin: (top: 2cm, bottom: 2cm, left: 2.5cm, right: 2.5cm))
#set text(font: "New Computer Modern", size: 10pt, lang: "fr") #set text(font: "New Computer Modern", size: 10pt, lang: "fr")
#set heading(numbering: "1.1") #set heading(numbering: none)
#show heading: it => { #show heading: it => {
it it
v(0.3em) v(0.3em)
@ -190,14 +190,14 @@ Entrée : email, password, nom, prénom, CNI
Actions serveur : Actions serveur :
1. Valider contraintes : email unique, password policy (8+ chars) - Valider contraintes : email unique, password policy (8+ chars)
2. Générer clés : - Générer clés :
- RSA 2048 (clé publique 294 bytes) - RSA 2048 (clé publique 294 bytes)
- Dilithium ML-DSA-65 (clé publique 1312 bytes) - Dilithium ML-DSA-65 (clé publique 1312 bytes)
- ElGamal (clés publique ~1024 bytes) - ElGamal (clés publique ~1024 bytes)
- Kyber ML-KEM-768 (clé publique 1184 bytes) - Kyber ML-KEM-768 (clé publique 1184 bytes)
3. Hash password : bcrypt 12 rounds - Hash password : bcrypt 12 rounds
4. Stocker en BD : voter_id, email, password_hash, clés publiques - Stocker en BD : voter_id, email, password_hash, clés publiques
Résultat : JWT token + voter_id Résultat : JWT token + voter_id
@ -207,9 +207,9 @@ Entrée : email + password
Actions serveur : Actions serveur :
1. Lookup voter par email - Lookup voter par email
2. bcrypt.verify(password) - bcrypt.verify(password)
3. JWT.sign(payload={voter_id, exp=now+30min}) - JWT.sign(payload={voter_id, exp=now+30min})
JWT inclut : voter_id, timestamp d'expiration, signature HMAC-SHA256 JWT inclut : voter_id, timestamp d'expiration, signature HMAC-SHA256
@ -224,39 +224,39 @@ Chaque élection inclut : ID, nom, candidats, clés publiques
Processus cryptographique côté client : Processus cryptographique côté client :
1. Obtenir clés publiques élection (ElGamal, Kyber) - Obtenir clés publiques élection (ElGamal, Kyber)
2. Chiffrer candidate_id avec ElGamal : - Chiffrer candidate_id avec ElGamal :
- Générer r aléatoire - Générer r aléatoire
- (c1, c2) = (g^r mod p, candidate_id times h^r mod p) - (c1, c2) = (g^r mod p, candidate_id times h^r mod p)
3. Encapsuler clé avec Kyber : - Encapsuler clé avec Kyber :
- kyber_ct, kyber_ss = Kyber.encap(kyber_pk) - kyber_ct, kyber_ss = Kyber.encap(kyber_pk)
4. Dériver clé symétrique hybride : - Dériver clé symétrique hybride :
- symmetric_key = SHA256(kyber_ss || c1 || c2) - symmetric_key = SHA256(kyber_ss || c1 || c2)
5. Chiffrer vote avec AES-256-GCM : - Chiffrer vote avec AES-256-GCM :
- vote_data = {election_id, (c1,c2), timestamp} - vote_data = {election_id, (c1,c2), timestamp}
- iv = random(12 bytes) - iv = random(12 bytes)
- ciphertext = AES_GCM.encrypt(symmetric_key, iv, vote_data) - ciphertext = AES_GCM.encrypt(symmetric_key, iv, vote_data)
6. Signer avec Dilithium : - Signer avec Dilithium :
- sig_dilithium = Dilithium.sign(SHA256(ciphertext || iv)) - sig_dilithium = Dilithium.sign(SHA256(ciphertext || iv))
7. Signer avec RSA-PSS 2048 : - Signer avec RSA-PSS 2048 :
- sig_rsa = RSA_PSS.sign(SHA256(ciphertext || iv)) - sig_rsa = RSA_PSS.sign(SHA256(ciphertext || iv))
8. Transmettre serveur : ciphertext, iv, signatures hybrides, kyber_ct - Transmettre serveur : ciphertext, iv, signatures hybrides, kyber_ct
Vérification serveur (6 étapes) : Vérification serveur (6 étapes) :
1. Vérifier JWT (authenticité électeur) - Vérifier JWT (authenticité électeur)
2. Vérifier non-double-vote (DB constraint) - Vérifier non-double-vote (DB constraint)
3. Vérifier signature Dilithium - Vérifier signature Dilithium
4. Vérifier signature RSA - Vérifier signature RSA
5. Déchiffrer avec clé privée Kyber serveur - Déchiffrer avec clé privée Kyber serveur
6. Enregistrer vote chiffré en BD - Enregistrer vote chiffré en BD
== 4.5 Phase 5 : Dépouillement == 4.5 Phase 5 : Dépouillement
@ -281,10 +281,10 @@ Vérifier intégrité chaîne :
``` ```
Pour chaque bloc : Pour chaque bloc :
1. Recalculer hash = SHA256(bloc) Recalculer hash = SHA256(bloc)
2. Vérifier hash correspond Vérifier hash correspond
3. Vérifier prev_hash de bloc i = hash de bloc i-1 Vérifier prev_hash de bloc i = hash de bloc i-1
4. Vérifier signature Dilithium du mineur Vérifier signature Dilithium du mineur
Si un vote modifié hash change chaîne invalide Si un vote modifié hash change chaîne invalide
``` ```
@ -552,11 +552,11 @@ def tally_election(election_id, db):
7 services orchestrés : 7 services orchestrés :
1. MariaDB : Port 3306, volumes persistants - MariaDB : Port 3306, volumes persistants
2. Backend : Port 8000, dépend MariaDB - Backend : Port 8000, dépend MariaDB
3. Bootnode : Port 8546 (blockchain) - Bootnode : Port 8546 (blockchain)
4. Validator1/2/3 : Ports 8001/8002/8003 - Validator1/2/3 : Ports 8001/8002/8003
5. Frontend : Port 3000, dépend Backend - Frontend : Port 3000, dépend Backend
Déploiement : Déploiement :
``` ```
@ -597,21 +597,13 @@ Signature verification : Signature invalide → vote rejeté
== 9.1 Limitations Actuelles == 9.1 Limitations Actuelles
1. Pas de Threshold Cryptography - *Pas de Threshold Cryptography* : Clé privée trésorier centralisée. Solution future : Shamir's Secret Sharing (k-of-n)
- Clé privée trésorier centralisée
- Solution future : Shamir's Secret Sharing (k-of-n)
2. PoA Simple - *PoA Simple* : 3 validators seulement. Solution future : PoS / Hybrid consensus
- 3 validators seulement
- Solution future : PoS / Hybrid consensus
3. Pas de Vérification Client Étendue - *Pas de Vérification Client Étendue* : Vérification basique du chiffrement seulement. Impact : Serveur vérifie signature et format, mais pas contenu ballot
- Vérification basique du chiffrement seulement
- Impact : Serveur vérifie signature et format, mais pas contenu ballot
4. Pas d'Attestation de Vote - *Pas d'Attestation de Vote* : Électeur ne reçoit pas récépissé vérifiable. Raison : Anonymat = impossible associer vote à électeur
- Électeur ne reçoit pas récépissé vérifiable
- Raison : Anonymat = impossible associer vote à électeur
== 9.2 Perspectives Futures (1-6 mois) == 9.2 Perspectives Futures (1-6 mois)
@ -650,9 +642,9 @@ Ce système de vote électronique démontre la faisabilité d'une architecture s
Contributions : Contributions :
1. *Architecture complète* : Backend FastAPI + Frontend Next.js + Blockchain - *Architecture complète* : Backend FastAPI + Frontend Next.js + Blockchain
2. *Implémentation robuste* : 3000+ lignes cryptographie validée - *Implémentation robuste* : 3000+ lignes cryptographie validée
3. *Déploiement autonome* : Docker Compose reproductible - *Déploiement autonome* : Docker Compose reproductible
4. *Documentation technique* : Rapport détaillé explications formelles - *Documentation technique* : Rapport détaillé explications formelles
Le système est production-ready pour prototype/test électoral. Déploiement réel nécessiterait audit sécurité indépendant et certification (CNIL/ANSSI). Le système est production-ready pour prototype/test électoral. Déploiement réel nécessiterait audit sécurité indépendant et certification (CNIL/ANSSI).