|
| 1 | +# Post Quantum (PQ) Support |
| 2 | + |
| 3 | +s2n-tls supports post-quantum key exchange for TLS1.3. Currently, only [Kyber](https://pq-crystals.org/kyber/) is supported. See the draft IETF standard: https://datatracker.ietf.org/doc/html/draft-ietf-tls-hybrid-design |
| 4 | + |
| 5 | +Specifically, s2n-tls supports hybrid key exchange. PQ hybrid key exchange involves performing both classic ECDH key exchange and post-quantum Kyber key exchange, then combining the two resultant secrets. This strategy combines the high assurance of the classical key exchange algorithms with the quantum-resistance of the new post-quantum key exchange algorithms. If one of the two algorithms is compromised, either because advances in quantum computing make the classic algorithms insecure or because cryptographers find a flaw in the relatively new post-quantum algorithms, the secret is still secure. Hybrid post-quantum key exchange is more secure than standard key exchange, but is slower and requires more processing and more network bandwidth. |
| 6 | + |
| 7 | +Careful: if an s2n-tls server is configured to support post-quantum key exchange, the server will require that any client that advertises support ultimately uses post-quantum key exchange. That will result in a retry and an extra round trip if the client does not intially provide a post-quantum key share. |
| 8 | + |
| 9 | +## Requirements |
| 10 | + |
| 11 | +### AWS-LC |
| 12 | + |
| 13 | +s2n-tls must be built with aws-lc to use post-quantum key exchange. See the [s2n-tls build documentation](https://github.com/aws/s2n-tls/blob/main/docs/BUILD.md#building-with-a-specific-libcrypto) for how to build with aws-lc. |
| 14 | + |
| 15 | +If you're unsure what cryptography library s2n-tls is built against, trying running s2nd or s2nc: |
| 16 | +``` |
| 17 | +> s2nd localhost 8000 |
| 18 | +libcrypto: AWS-LC |
| 19 | +Listening on localhost:8000 |
| 20 | +``` |
| 21 | + |
| 22 | +### Security Policy |
| 23 | + |
| 24 | +Post-quantum key exchange is enabled by configuring a security policy (see [Security Policies](./ch06-security-policies.md)) that supports post-quantum key exchange algorithms. |
| 25 | + |
| 26 | +"default_pq" is the equivalent of "default_tls13", but with PQ support. Like the other default policies, "default_pq" may change as a result of library updates. The fixed, numbered equivalent of "default_pq" is currently "20240730". For previous defaults, see the "Default Policy History" section below. |
| 27 | + |
| 28 | +Other available PQ policies are compared in the tables below. |
| 29 | + |
| 30 | +### Chart: Security Policy Version To PQ Hybrid Key Exchange Methods |
| 31 | + |
| 32 | +| Version | secp256r1+kyber768 | x25519+kyber768 | secp384r1+kyber768 | secp521r1+kyber1024 | secp256r1+kyber512 | x25519+kyber512 | |
| 33 | +|-----------------------|--------------------|-----------------|--------------------|---------------------|--------------------|-----------------| |
| 34 | +| default_pq / 20240730 | X | X | X | X | X | X | |
| 35 | +| PQ-TLS-1-2-2023-12-15 | X | | X | X | X | | |
| 36 | +| PQ-TLS-1-2-2023-12-14 | X | | X | X | X | | |
| 37 | +| PQ-TLS-1-2-2023-12-13 | X | | X | X | X | | |
| 38 | +| PQ-TLS-1-2-2023-10-10 | X | X | X | X | X | X | |
| 39 | +| PQ-TLS-1-2-2023-10-09 | X | X | X | X | X | X | |
| 40 | +| PQ-TLS-1-2-2023-10-08 | X | X | X | X | X | X | |
| 41 | +| PQ-TLS-1-2-2023-10-07 | X | X | X | X | X | X | |
| 42 | +| PQ-TLS-1-3-2023-06-01 | X | X | X | X | X | X | |
| 43 | + |
| 44 | +### Chart: Security Policy Version To Classic Key Exchange |
| 45 | + |
| 46 | +If the peer doesn't support a PQ hybrid key exchange method, s2n-tls will fall back to a classical option. |
| 47 | + |
| 48 | +| Version | secp256r1 | x25519 | secp384r1 | secp521r1 | DHE | RSA | |
| 49 | +|-----------------------|-----------|--------|-----------|-----------|-----|-----| |
| 50 | +| default_pq / 20240730 | X | X | X | X | | | |
| 51 | +| PQ-TLS-1-2-2023-12-15 | X | | X | X | X | | |
| 52 | +| PQ-TLS-1-2-2023-12-14 | X | | X | X | | | |
| 53 | +| PQ-TLS-1-2-2023-12-13 | X | | X | X | | X | |
| 54 | +| PQ-TLS-1-2-2023-10-10 | X | X | X | | X | X | |
| 55 | +| PQ-TLS-1-2-2023-10-09 | X | X | X | | X | | |
| 56 | +| PQ-TLS-1-2-2023-10-08 | X | X | X | | X | X | |
| 57 | +| PQ-TLS-1-2-2023-10-07 | X | X | X | | | X | |
| 58 | +| PQ-TLS-1-3-2023-06-01 | X | | X | X | X | X | |
| 59 | + |
| 60 | +### Chart: Security Policy Version To Ciphers |
| 61 | + |
| 62 | +| Version | AES-CBC | AES-GCM | CHACHAPOLY | 3DES | |
| 63 | +|-----------------------|---------|---------|------------|------| |
| 64 | +| default_pq / 20240730 | X | X | X | | |
| 65 | +| PQ-TLS-1-2-2023-12-15 | X | X | | | |
| 66 | +| PQ-TLS-1-2-2023-12-14 | X | X | | | |
| 67 | +| PQ-TLS-1-2-2023-12-13 | X | X | | | |
| 68 | +| PQ-TLS-1-2-2023-10-10 | X | X | X* | X | |
| 69 | +| PQ-TLS-1-2-2023-10-09 | X | X | X* | X | |
| 70 | +| PQ-TLS-1-2-2023-10-08 | X | X | X* | X | |
| 71 | +| PQ-TLS-1-2-2023-10-07 | X | X | X* | | |
| 72 | +| PQ-TLS-1-3-2023-06-01 | X | X | X* | X | |
| 73 | +\* only for TLS1.3 |
| 74 | + |
| 75 | +### Chart: Security Policy Version To Signature Schemes |
| 76 | + |
| 77 | +| Version | ECDSA | RSA | RSA-PSS | Legacy SHA1 | |
| 78 | +|-----------------------|---------|-----|---------|-------------| |
| 79 | +| default_pq / 20240730 | X | X | X | | |
| 80 | +| PQ-TLS-1-2-2023-12-15 | X | X | X | | |
| 81 | +| PQ-TLS-1-2-2023-12-14 | X | X | X | | |
| 82 | +| PQ-TLS-1-2-2023-12-13 | X | X | X | | |
| 83 | +| PQ-TLS-1-2-2023-10-10 | X | X | X | X | |
| 84 | +| PQ-TLS-1-2-2023-10-09 | X | X | X | X | |
| 85 | +| PQ-TLS-1-2-2023-10-08 | X | X | X | X | |
| 86 | +| PQ-TLS-1-2-2023-10-07 | X | X | X | X | |
| 87 | +| PQ-TLS-1-3-2023-06-01 | X | X | X | X | |
| 88 | + |
| 89 | +### Chart: Security Policy Version To TLS Protocol Version |
| 90 | + |
| 91 | +| Version | 1.2 | 1.3 | |
| 92 | +|-----------------------|-----|-----| |
| 93 | +| default_pq / 20240730 | X | X | |
| 94 | +| PQ-TLS-1-2-2023-12-15 | X | X | |
| 95 | +| PQ-TLS-1-2-2023-12-14 | X | X | |
| 96 | +| PQ-TLS-1-2-2023-12-13 | X | X | |
| 97 | +| PQ-TLS-1-2-2023-10-10 | X | X | |
| 98 | +| PQ-TLS-1-2-2023-10-09 | X | X | |
| 99 | +| PQ-TLS-1-2-2023-10-08 | X | X | |
| 100 | +| PQ-TLS-1-2-2023-10-07 | X | X | |
| 101 | +| PQ-TLS-1-3-2023-06-01 | X | X | |
| 102 | + |
| 103 | +#### Default Policy History |
| 104 | +| Version | "default_pq" | |
| 105 | +|------------|--------------| |
| 106 | +| v1.5.0 | 20240730 | |
0 commit comments