Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| 160-tls:040-tls1_2 [le 14/06/2026 à 14:31] – créée prof | 160-tls:040-tls1_2 [le 14/06/2026 à 14:34] (Version actuelle) – [TLS1.2] prof | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ====== | + | ====== |
| - | En français | + | Décrit initialement dans la [[https://www.rfc-editor.org/info/ |
| + | {{: | ||
| + | - Le client s' | ||
| + | - le serveur répond en indiquant la suite sélectionnée et envoie son certificat X509. Une valeur (pseudo)aléatoire est calculée et envoyée également au client:\\ \\ | ||
| + | - le client, avec les informations reçues, finalise une clé de session et l' | ||
| + | - le serveur entérine la clé\\ \\ | ||
| + | - le dialogue chiffré avec la clé de session s' | ||
| - | //Une suite cryptographique (cipher suite en anglais) est le nom de la combinaison des algorithmes d' | ||
| - | Le site [[https:// | ||
| - | ===== Exemples | + | ===== Dialogue client/ |
| - | Voici quelques exemples parmi les plus recommandés: | + | Dans ce qui suit, HTTPS est espionné avec **Wireshark**. Le serveur **nginx** est paramétré pour n' |
| + | * le client : '' | ||
| + | * le serveur: '' | ||
| + | (Oui, ils sont dans la même délégation). | ||
| + | ==== Client Hello ==== | ||
| + | Dans un premier temps, le client s' | ||
| + | * les versions TLS possibles (actuellement (juin 2026) 1.2 ou 1.3, les versions précédentes étant dépassées), | ||
| + | * les suites de chiffrement, | ||
| + | L' | ||
| + | * les suites cryptographiques que le client sait gérer, | ||
| + | * les versions TLS supportées, | ||
| + | * les algorithmes de signature qu'il accepte. | ||
| + | Les parties en italique bleu ne concernent pas TLS1.2, le client supportant également TLS1.3. | ||
| + | < | ||
| + | Transport Layer Security | ||
| + | TLSv1.2 Record Layer: Handshake Protocol: Client Hello | ||
| + | ... | ||
| + | Handshake Protocol: Client Hello | ||
| + | ... | ||
| + | <span class=" | ||
| + | < | ||
| + | Cipher Suite: TLS_CHACHA20_POLY1305_SHA256 (0x1303) | ||
| + | Cipher Suite: TLS_AES_256_GCM_SHA384 (0x1302) | ||
| + | Cipher Suite: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (0xc02b)</ | ||
| + | Cipher Suite: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f) | ||
| + | Cipher Suite: TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 (0xcca9) | ||
| + | Cipher Suite: TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (0xcca8) | ||
| + | Cipher Suite: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (0xc02c) | ||
| + | Cipher Suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030) | ||
| + | Cipher Suite: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA (0xc00a) | ||
| + | Cipher Suite: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA (0xc009) | ||
| + | Cipher Suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013) | ||
| + | Cipher Suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (0xc014) | ||
| + | Cipher Suite: TLS_RSA_WITH_AES_128_GCM_SHA256 (0x009c) | ||
| + | Cipher Suite: TLS_RSA_WITH_AES_256_GCM_SHA384 (0x009d) | ||
| + | Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA (0x002f) | ||
| + | Cipher Suite: TLS_RSA_WITH_AES_256_CBC_SHA (0x0035)</ | ||
| + | ... | ||
| + | <span class=" | ||
| + | Type: key_share (51) | ||
| + | Length: 1327 | ||
| + | Key Share extension | ||
| + | Client Key Share Length: 1325 | ||
| + | Key Share Entry: Group: Unknown (4588), Key Exchange length: 1216 | ||
| + | Group: Unknown (4588) | ||
| + | Key Exchange Length: 1216 | ||
| + | Key Exchange: 8a8a4f6c01bacd7873cae7c51169be733813e0f4c6b4a45d23d8531f10a4eb6c8de97b1b… | ||
| + | Key Share Entry: Group: x25519, Key Exchange length: 32 | ||
| + | Group: x25519 (29) | ||
| + | Key Exchange Length: 32 | ||
| + | Key Exchange: c39ce197b6a7a135754f23d833a6b0863170cb3ca44ffa591bde4e1675c7ea52 | ||
| + | Key Share Entry: Group: secp256r1, Key Exchange length: 65 | ||
| + | Group: secp256r1 (23) | ||
| + | Key Exchange Length: 65 | ||
| + | Key Exchange: 04eccfde6261d958052e6814a124b44da2717536a5d004b3daefaad7cd7b2cf7d75477de…</ | ||
| + | ... | ||
| + | <span class=" | ||
| + | Type: supported_versions (43) | ||
| + | Length: 5 | ||
| + | Supported Versions length: 4 | ||
| + | < | ||
| + | Supported Version: TLS 1.2 (0x0303)</ | ||
| + | <span class=" | ||
| + | Type: signature_algorithms (13) | ||
| + | Length: 24 | ||
| + | Signature Hash Algorithms Length: 22 | ||
| + | Signature Hash Algorithms (11 algorithms) | ||
| + | Signature Algorithm: ecdsa_secp256r1_sha256 (0x0403) | ||
| + | Signature Algorithm: ecdsa_secp384r1_sha384 (0x0503) | ||
| + | Signature Algorithm: ecdsa_secp521r1_sha512 (0x0603) | ||
| + | Signature Algorithm: rsa_pss_rsae_sha256 (0x0804) | ||
| + | Signature Algorithm: rsa_pss_rsae_sha384 (0x0805) | ||
| + | Signature Algorithm: rsa_pss_rsae_sha512 (0x0806) | ||
| + | Signature Algorithm: rsa_pkcs1_sha256 (0x0401) | ||
| + | Signature Algorithm: rsa_pkcs1_sha384 (0x0501) | ||
| + | Signature Algorithm: rsa_pkcs1_sha512 (0x0601) | ||
| + | Signature Algorithm: ecdsa_sha1 (0x0203) | ||
| + | Signature Algorithm: rsa_pkcs1_sha1 (0x0201)</ | ||
| + | <span class=" | ||
| + | Type: psk_key_exchange_modes (45) | ||
| + | Length: 2 | ||
| + | PSK Key Exchange Modes Length: 1 | ||
| + | PSK Key Exchange Mode: PSK with (EC)DHE key establishment (psk_dhe_ke) (1)</ | ||
| + | ... | ||
| + | </ | ||
| + | Le client annonce les suites cryptographiques qu'il sait manipuler, par ordre de préférence. En TLS1.2 seules la seconde et la quatrième sont compatibles. | ||
| + | ==== Server Hello ==== | ||
| + | Le serveur choisit la suite cryptographique dans la liste proposée par le client, envoie son certificat et la clé publique de la parie publique/ | ||
| + | < | ||
| + | Transport Layer Security | ||
| + | TLSv1.2 Record Layer: Handshake Protocol: Server Hello | ||
| + | Content Type: Handshake (22) | ||
| + | Version: TLS 1.2 (0x0303) | ||
| + | Length: 82 | ||
| + | Handshake Protocol: Server Hello | ||
| + | Handshake Type: Server Hello (2) | ||
| + | Length: 78 | ||
| + | <span class=" | ||
| + | ... | ||
| + | <span class=" | ||
| + | ... | ||
| + | <span class=" | ||
| + | Content Type: Handshake (22) | ||
| + | Version: TLS 1.2 (0x0303) | ||
| + | Length: 2056 | ||
| + | Handshake Protocol: Certificate | ||
| + | ... | ||
| + | ... | ||
| + | ... | ||
| + | ...</ | ||
| + | <span class=" | ||
| + | Content Type: Handshake (22) | ||
| + | Version: TLS 1.2 (0x0303) | ||
| + | Length: 115 | ||
| + | Handshake Protocol: Server Key Exchange | ||
| + | Handshake Type: Server Key Exchange (12) | ||
| + | Length: 111 | ||
| + | EC Diffie-Hellman Server Params | ||
| + | Curve Type: named_curve (0x03) | ||
| + | Named Curve: x25519 (0x001d) | ||
| + | Pubkey Length: 32 | ||
| + | < | ||
| + | Signature Algorithm: ecdsa_secp256r1_sha256 (0x0403) | ||
| + | Signature Hash Algorithm Hash: SHA256 (4) | ||
| + | Signature Hash Algorithm Signature: ECDSA (3) | ||
| + | Signature Length: 71 | ||
| + | < | ||
| + | TLSv1.2 Record Layer: Handshake Protocol: Server Hello Done | ||
| + | Content Type: Handshake (22) | ||
| + | Version: TLS 1.2 (0x0303) | ||
| + | Length: 4 | ||
| + | Handshake Protocol: Server Hello Done | ||
| + | Handshake Type: Server Hello Done (14) | ||
| + | Length: 0 | ||
| + | </ | ||
| + | Pour la suite de la capture, une astuce permet à **firefox** de sauvegarder les clés de session et de les transmettre à **wireshark**, | ||
| + | ==== Client Key Exchange ==== | ||
| + | Le client envoie sa clé publique au serveur et conclue. | ||
| + | < | ||
| + | Transport Layer Security | ||
| + | TLSv1.2 Record Layer: Handshake Protocol: Client Key Exchange | ||
| + | ... | ||
| + | Handshake Protocol: Client Key Exchange | ||
| + | EC Diffie-Hellman Client Params | ||
| + | Pubkey Length: 32 | ||
| + | <span class=" | ||
| + | ... | ||
| + | TLSv1.2 Record Layer: Handshake Protocol: Finished | ||
| + | </ | ||
| - | [[https:// | ||
| - | ^ TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 ^^ | ||
| - | | Protocole | ||
| - | | Échange de clés | Elliptic Curve Diffie-Hellman Ephemeral (ECDHE) | | ||
| - | | Authentification | Elliptic Curve Digital Signature Algorithm (ECDSA) | | ||
| - | | Chiffrement | ||
| - | | Hachage | ||
| - | ^ TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ^^ | ||
| - | | Protocole | ||
| - | | Échange de clés | Elliptic Curve Diffie-Hellman Ephemeral (ECDHE) | | ||
| - | | Authentification | Elliptic Curve Digital Signature Algorithm (ECDSA) | | ||
| - | | Chiffrement | ||
| - | | Hachage | ||
| - | |||
| - | [[https:// | ||
| - | |||
| - | ^ TLS_AES_256_GCM_SHA384 ^^ | ||
| - | | Protocole | ||
| - | | Chiffrement | ||
| - | | Hachage | ||
| - | |||
| - | ^ TLS_AES_128_GCM_SHA256 ^^ | ||
| - | | Protocole | ||
| - | | Chiffrement | ||
| - | | Hachage | ||
| - | Parmi les protocoles considérés comme faibles: | ||
| - | ^ TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384 ^^ | ||
| - | | Protocole | ||
| - | | Échange de clés | Diffie-Hellman (DH) | | ||
| - | | Authentification | Digital Signature Standard (DSS) | | ||
| - | | Chiffrement | ||
| - | | Hachage | ||
| - | |||
| - | ===== Les différents algorithmes ===== | ||
| - | Dans les suites utilisables par TLS1.2, nous trouvons les besoins suivants: | ||
| - | - Un échange de clés, la ou les clés de session pour le chiffrement symétrique, | ||
| - | - une authentification, | ||
| - | - le chiffrement proprement dit, | ||
| - | - le hachage. | ||
| - | Pour ce qui est des suites utilisables seulement par TLS 1.3, les opérations sont plus condensées, | ||
TLS1.2: Dernière modification le: 14/06/2026 à 14:31 par prof