Skip to content

Commit 41e0c47

Browse files
authored
feature: update default_pq to support secp384r1_mlkem_1024 (#5433)
1 parent 9abd89e commit 41e0c47

File tree

6 files changed

+113
-9
lines changed

6 files changed

+113
-9
lines changed

docs/usage-guide/topics/ch15-post-quantum.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,21 @@ Listening on localhost:8000
3333

3434
Post-quantum algorithms are enabled by configuring a security policy (see [Security Policies](./ch06-security-policies.md)) that supports post-quantum algorithms.
3535

36-
"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 "20250512". For previous defaults, see the "Default Policy History" section below.
36+
"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 "20250721". For previous defaults, see the "Default Policy History" section below.
3737

3838
Other available PQ policies are compared in the tables below.
3939

40-
### Chart: Security Policy Version To PQ Hybrid Key Exchange Methods
40+
### Chart: Security Policy Version To PQ Hybrid Key Exchange Methods (ML-KEM)
4141

42-
| Version | secp256r1+kyber768 | x25519+kyber768 | secp384r1+kyber768 | secp521r1+kyber1024 | secp256r1+kyber512 | x25519+kyber512 |
42+
| Version | x25519+mlkem768 | secp256r1+mlkem768 | secp384r1+mlkem1024 |
43+
|-----------------------|-----------------|--------------------|---------------------|
44+
| default_pq / 20250721 | X | X | X |
45+
| 20250512 | X | X | |
46+
47+
### Chart: Security Policy Version To PQ Hybrid Key Exchange Methods (Kyber)
48+
49+
| Version | secp256r1+kyber768 | x25519+kyber768 | secp384r1+kyber768 | secp521r1+kyber1024 | secp256r1+kyber512 | x25519+kyber512 |
4350
|-----------------------|--------------------|-----------------|--------------------|---------------------|--------------------|-----------------|
44-
| default_pq / 20250512 | X | X | X | X | X | X |
4551
| 20240730 | X | X | X | X | X | X |
4652
| PQ-TLS-1-2-2023-12-15 | X | | X | X | X | |
4753
| PQ-TLS-1-2-2023-12-14 | X | | X | X | X | |
@@ -56,7 +62,8 @@ Other available PQ policies are compared in the tables below.
5662

5763
| Version | ML-DSA | ECDSA | RSA | RSA-PSS | Legacy SHA1 |
5864
|-----------------------|--------|-------|-----|---------|-------------|
59-
| default_pq / 20250512 | X | X | X | X | |
65+
| default_pq / 20250721 | X | X | X | X | |
66+
| 20250512 | X | X | X | X | |
6067
| 20240730 | | X | X | X | |
6168
| PQ-TLS-1-2-2023-12-15 | | X | X | X | |
6269
| PQ-TLS-1-2-2023-12-14 | | X | X | X | |
@@ -73,7 +80,8 @@ If the peer doesn't support a PQ hybrid key exchange method, s2n-tls will fall b
7380

7481
| Version | secp256r1 | x25519 | secp384r1 | secp521r1 | DHE | RSA |
7582
|-----------------------|-----------|--------|-----------|-----------|-----|-----|
76-
| default_pq / 20250512 | X | X | X | X | | |
83+
| default_pq / 20250721 | X | X | X | X | | |
84+
| 20250512 | X | X | X | X | | |
7785
| 20240730 | X | X | X | X | | |
7886
| PQ-TLS-1-2-2023-12-15 | X | | X | X | X | |
7987
| PQ-TLS-1-2-2023-12-14 | X | | X | X | | |
@@ -88,7 +96,8 @@ If the peer doesn't support a PQ hybrid key exchange method, s2n-tls will fall b
8896

8997
| Version | AES-CBC | AES-GCM | CHACHAPOLY | 3DES |
9098
|-----------------------|---------|---------|------------|------|
91-
| default_pq / 20250512 | X | X | X | |
99+
| default_pq / 20250721 | X | X | X | |
100+
| 20250512 | X | X | X | |
92101
| 20240730 | X | X | X | |
93102
| PQ-TLS-1-2-2023-12-15 | X | X | | |
94103
| PQ-TLS-1-2-2023-12-14 | X | X | | |
@@ -104,7 +113,8 @@ If the peer doesn't support a PQ hybrid key exchange method, s2n-tls will fall b
104113

105114
| Version | 1.2 | 1.3 |
106115
|-----------------------|-----|-----|
107-
| default_pq / 20250512 | X | X |
116+
| default_pq / 20250721 | X | X |
117+
| 20250512 | X | X |
108118
| 20240730 | X | X |
109119
| PQ-TLS-1-2-2023-12-15 | X | X |
110120
| PQ-TLS-1-2-2023-12-14 | X | X |
@@ -118,6 +128,7 @@ If the peer doesn't support a PQ hybrid key exchange method, s2n-tls will fall b
118128
#### Default Policy History
119129
| Version | "default_pq" |
120130
|------------|--------------|
131+
| v1.5.23 | 20250721 |
121132
| v1.5.19 | 20250512 |
122133
| v1.5.0 | 20240730 |
123134

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: 20250721
2+
min version: TLS1.2
3+
rules:
4+
- Perfect Forward Secrecy: yes
5+
- FIPS 140-3 (2019): no
6+
cipher suites:
7+
- TLS_AES_128_GCM_SHA256
8+
- TLS_AES_256_GCM_SHA384
9+
- TLS_CHACHA20_POLY1305_SHA256
10+
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
11+
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
12+
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
13+
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
14+
- TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
15+
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
16+
- TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
17+
- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
18+
- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
19+
- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
20+
signature schemes:
21+
- mldsa44
22+
- mldsa65
23+
- mldsa87
24+
- ecdsa_sha256
25+
- ecdsa_sha384
26+
- ecdsa_sha512
27+
- rsa_pss_pss_sha256
28+
- rsa_pss_pss_sha384
29+
- rsa_pss_pss_sha512
30+
- rsa_pss_rsae_sha256
31+
- rsa_pss_rsae_sha384
32+
- rsa_pss_rsae_sha512
33+
- rsa_pkcs1_sha256
34+
- rsa_pkcs1_sha384
35+
- rsa_pkcs1_sha512
36+
curves:
37+
- secp256r1
38+
- x25519
39+
- secp384r1
40+
- secp521r1
41+
certificate signature schemes:
42+
- mldsa44
43+
- mldsa65
44+
- mldsa87
45+
- rsa_pss_pss_sha256
46+
- rsa_pss_pss_sha384
47+
- rsa_pss_pss_sha512
48+
- rsa_pss_rsae_sha256
49+
- rsa_pss_rsae_sha384
50+
- rsa_pss_rsae_sha512
51+
- rsa_pkcs1_sha256
52+
- rsa_pkcs1_sha384
53+
- rsa_pkcs1_sha512
54+
- legacy_rsa_pkcs1_sha224
55+
- ecdsa_sha256
56+
- ecdsa_sha384
57+
- ecdsa_sha512
58+
- legacy_ecdsa_sha224
59+
pq:
60+
- revision: 5
61+
- kem groups:
62+
-- X25519MLKEM768
63+
-- SecP256r1MLKEM768
64+
-- SecP384r1MLKEM1024

tests/policy_snapshot/snapshots/default_pq

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ pq:
6161
- kem groups:
6262
-- X25519MLKEM768
6363
-- SecP256r1MLKEM768
64+
-- SecP384r1MLKEM1024

tls/s2n_kem_preferences.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ const struct s2n_kem_group *pq_kem_groups_ietf_2024_10[] = {
4949
&s2n_secp256r1_mlkem_768,
5050
};
5151

52+
const struct s2n_kem_group *pq_kem_groups_ietf_2025_07[] = {
53+
&s2n_x25519_mlkem_768,
54+
&s2n_secp256r1_mlkem_768,
55+
&s2n_secp384r1_mlkem_1024,
56+
};
57+
5258
/* Includes both IETF standard KEM Groups, and earlier draft standards with Kyber. */
5359
const struct s2n_kem_group *pq_kem_groups_mixed_2024_10[] = {
5460
&s2n_x25519_mlkem_768,
@@ -103,6 +109,14 @@ const struct s2n_kem_preferences kem_preferences_pq_tls_1_3_ietf_2024_10 = {
103109
.tls13_pq_hybrid_draft_revision = 5
104110
};
105111

112+
const struct s2n_kem_preferences kem_preferences_pq_tls_1_3_ietf_2025_07 = {
113+
.kem_count = 0,
114+
.kems = NULL,
115+
.tls13_kem_group_count = s2n_array_len(pq_kem_groups_ietf_2025_07),
116+
.tls13_kem_groups = pq_kem_groups_ietf_2025_07,
117+
.tls13_pq_hybrid_draft_revision = 5
118+
};
119+
106120
const struct s2n_kem_preferences kem_preferences_pq_tls_1_3_mixed_2024_10 = {
107121
.kem_count = 0,
108122
.kems = NULL,

tls/s2n_kem_preferences.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ extern const struct s2n_kem_preferences kem_preferences_pq_tls_1_0_2021_05;
4848
extern const struct s2n_kem_preferences kem_preferences_pq_tls_1_0_2023_01;
4949
extern const struct s2n_kem_preferences kem_preferences_pq_tls_1_3_2023_06;
5050
extern const struct s2n_kem_preferences kem_preferences_pq_tls_1_3_2023_12;
51+
extern const struct s2n_kem_preferences kem_preferences_pq_tls_1_3_ietf_2025_07;
5152
extern const struct s2n_kem_preferences kem_preferences_pq_tls_1_3_ietf_2024_10;
5253
extern const struct s2n_kem_preferences kem_preferences_pq_tls_1_3_mixed_2024_10;
5354
extern const struct s2n_kem_preferences kem_preferences_all;

tls/s2n_security_policies.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@ const struct s2n_security_policy security_policy_20250512 = {
9797
},
9898
};
9999

100+
const struct s2n_security_policy security_policy_20250721 = {
101+
.minimum_protocol_version = S2N_TLS12,
102+
.cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019,
103+
.kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
104+
.signature_preferences = &s2n_signature_preferences_20250512,
105+
.certificate_signature_preferences = &s2n_certificate_signature_preferences_20250512,
106+
.ecc_preferences = &s2n_ecc_preferences_20240501,
107+
.rules = {
108+
[S2N_PERFECT_FORWARD_SECRECY] = true,
109+
},
110+
};
111+
100112
const struct s2n_security_policy security_policy_20241001_pq_mixed = {
101113
.minimum_protocol_version = S2N_TLS12,
102114
.cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019,
@@ -1281,7 +1293,7 @@ struct s2n_security_policy_selection security_policy_selection[] = {
12811293
{ .version = "default", .security_policy = &security_policy_20240501, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
12821294
{ .version = "default_tls13", .security_policy = &security_policy_20240503, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
12831295
{ .version = "default_fips", .security_policy = &security_policy_20240502, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
1284-
{ .version = "default_pq", .security_policy = &security_policy_20250512, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
1296+
{ .version = "default_pq", .security_policy = &security_policy_20250721, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
12851297
{ .version = "20241106", .security_policy = &security_policy_20241106, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
12861298
{ .version = "20240501", .security_policy = &security_policy_20240501, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
12871299
{ .version = "20240502", .security_policy = &security_policy_20240502, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
@@ -1293,6 +1305,7 @@ struct s2n_security_policy_selection security_policy_selection[] = {
12931305
{ .version = "20240730", .security_policy = &security_policy_20240730, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
12941306
{ .version = "20241001", .security_policy = &security_policy_20241001, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
12951307
{ .version = "20250512", .security_policy = &security_policy_20250512, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
1308+
{ .version = "20250721", .security_policy = &security_policy_20250721, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
12961309
{ .version = "20241001_pq_mixed", .security_policy = &security_policy_20241001_pq_mixed, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
12971310
{ .version = "ELBSecurityPolicy-TLS-1-0-2015-04", .security_policy = &security_policy_elb_2015_04, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
12981311
/* Not a mistake. TLS-1-0-2015-05 and 2016-08 are equivalent */

0 commit comments

Comments
 (0)