Skip to content

Commit 98e0968

Browse files
committed
Add support for post-quantum hybrid key exchange group X25519Kyber768Draft00
1 parent d6cdb92 commit 98e0968

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎sslscan.c‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5329,7 +5329,8 @@ void tlsExtensionAddSupportedGroups(unsigned int tls_version, bs *tls_extensions
53295329
0x01, 0x03, // FFDHE6144
53305330
0x01, 0x04, // FFDHE8192
53315331
0x11, 0xec, // X25519MLKEM768
5332-
}, 28);
5332+
0x63, 0x99, // X25519Kyber768Draft00
5333+
}, 30);
53335334
} else {
53345335
bs_append_bytes(tls_extensions, (unsigned char []) {
53355336
0x00, 0x0a, // Extension: supported_groups (10)
@@ -5649,6 +5650,7 @@ int testSupportedGroups(struct sslCheckOptions *options) {
56495650
#define NID_TYPE_SECP256R1MLKEM768 9
56505651
#define NID_TYPE_SECP384R1MLKEM1024 10
56515652
#define NID_TYPE_BRAINPOOL_TLS13 11
5653+
#define NID_TYPE_X25519Kyber768Draft00 12
56525654

56535655
/* Bit strength of DHE 2048 and 3072-bit moduli is taken directly from NIST SP 800-57 pt.1, rev4., pg. 53; DHE 4096, 6144, and 8192 are estimated using that document. */
56545656
struct group_key_exchange group_key_exchanges[] = {
@@ -5704,6 +5706,7 @@ int testSupportedGroups(struct sslCheckOptions *options) {
57045706
{0x11eb, "SecP256r1MLKEM768", 192, COL_PLAIN, -1, NID_TYPE_SECP256R1MLKEM768, 1249},
57055707
{0x11ec, "X25519MLKEM768", 192, COL_GREEN, -1, NID_TYPE_X25519MLKEM768, 1216},
57065708
{0x11ed, "SecP384r1MLKEM1024", 256, COL_PLAIN, -1, NID_TYPE_SECP384R1MLKEM1024, 1665},
5709+
{0x6399, "X25519Kyber768Draft00", 192, COL_GREEN, -1, NID_TYPE_X25519Kyber768Draft00, 1216},
57075710
};
57085711

57095712

@@ -5777,7 +5780,7 @@ int testSupportedGroups(struct sslCheckOptions *options) {
57775780

57785781
bs_append_mlkem(1024, key_exchange);
57795782

5780-
} else if (nid_type == NID_TYPE_X25519MLKEM768) {
5783+
} else if ((nid_type == NID_TYPE_X25519MLKEM768) || ((nid_type == NID_TYPE_X25519Kyber768Draft00))) {
57815784
/* Only defined for TLS v1.3. */
57825785
if (tls_version != TLSv1_3)
57835786
continue;

0 commit comments

Comments
 (0)