Builders Academy
HTTPS & TLS — Chiffrement des Communications
1 of 1

Chapitre 1 · Leçon 1

TLS Handshake

Comment TLS établit une connexion sécurisée

Section 1

Le TLS Handshake en détail

Step 1

Les étapes du handshake TLS 1.3

TLS 1.3 simplifie le handshake en 1-RTT (1 round-trip time) contre 2-RTT pour TLS 1.2. Voici les étapes de l'établissement de la connexion sécurisée.

snippet.typescript

typescript
1/*
2 * TLS 1.3 Handshake (simplifié)
3 *
4 * Client                              Serveur
5 *   │                                    │
6 *   │── ClientHello ──────────────────►  │
7 *   │   - Version TLS supportée (1.3)    │
8 *   │   - Cipher suites proposés         │
9 *   │   - Client random (32 bytes)       │
10 *   │   - Key Share (Diffie-Hellman)     │
11 *   │                                    │
12 *   │  ◄──────────────── ServerHello ────│
13 *   │                                    │
14 *   │  ◄──── Certificate + CertVerify ───│
15 *   │        (Certificat du serveur)     │
16 *   │                                    │
17 *   │  ◄──────────────────── Finished ───│
18 *   │                                    │
19 *   │── Finished ───────────────────►   │
20 *   │                                    │
21 *   │══════ Connexion chiffrée ══════════│
22 *   │   (HTTP/2 ou HTTP/1.1 via TLS)     │
23 *
24 * Ce qui est établi après le handshake :
25 * - Session keys symétriques (AES-256-GCM)
26 * - Perfect Forward Secrecy (ECDHE)
27 * - Authentification du serveur (certificat)
28 *
29 * TLS 1.3 vs TLS 1.2 :
30 * - 1-RTT vs 2-RTT (plus rapide)
31 * - 0-RTT pour les reconnexions (session resumption)
32 * - Cipher suites faibles retirées (RC4, DES, 3DES, MD5)
33 * - Tous les échanges de clés via (EC)DHE → PFS obligatoire
34 */

Step 2

Anatomie d'un certificat X.509

Un certificat SSL/TLS est un document signé numériquement qui lie une clé publique à un domaine. La chaîne de confiance remonte jusqu'à une Autorité de Certification (CA) racine.

snippet.typescript

typescript
1/*
2 * TLS 1.3 Handshake (simplifié)
3 *
4 * Client                              Serveur
5 *   │                                    │
6 *   │── ClientHello ──────────────────►  │
7 *   │   - Version TLS supportée (1.3)    │
8 *   │   - Cipher suites proposés         │
9 *   │   - Client random (32 bytes)       │
10 *   │   - Key Share (Diffie-Hellman)     │
11 *   │                                    │
12 *   │  ◄──────────────── ServerHello ────│
13 *   │                                    │
14 *   │  ◄──── Certificate + CertVerify ───│
15 *   │        (Certificat du serveur)     │
16 *   │                                    │
17 *   │  ◄──────────────────── Finished ───│
18 *   │                                    │
19 *   │── Finished ───────────────────►   │
20 *   │                                    │
21 *   │══════ Connexion chiffrée ══════════│
22 *   │   (HTTP/2 ou HTTP/1.1 via TLS)     │
23 *
24 * Ce qui est établi après le handshake :
25 * - Session keys symétriques (AES-256-GCM)
26 * - Perfect Forward Secrecy (ECDHE)
27 * - Authentification du serveur (certificat)
28 *
29 * TLS 1.3 vs TLS 1.2 :
30 * - 1-RTT vs 2-RTT (plus rapide)
31 * - 0-RTT pour les reconnexions (session resumption)
32 * - Cipher suites faibles retirées (RC4, DES, 3DES, MD5)
33 * - Tous les échanges de clés via (EC)DHE → PFS obligatoire
34 */

Topics and skills covered

  • TLS
  • HTTPS
  • PKI
  • Certificats
  • Chiffrement