Skip to content

Commit c260e9a

Browse files
committed
Add remaining PQ Groups
1 parent df14797 commit c260e9a

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

ssl/extensions.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ bool ssl_client_hello_get_extension(const SSL_CLIENT_HELLO *client_hello,
308308

309309
static const uint16_t kDefaultGroups[] = {
310310
SSL_GROUP_X25519_MLKEM768,
311+
SSL_GROUP_SECP256R1_MLKEM768,
312+
SSL_GROUP_SECP384R1_MLKEM1024,
311313
SSL_GROUP_X25519,
312314
SSL_GROUP_SECP256R1,
313315
SSL_GROUP_SECP384R1,

ssl/ssl_test.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ TEST(SSLTest, ClientHello) {
616616
0x12, 0x04, 0x03, 0x08, 0x04, 0x04, 0x01, 0x05, 0x03, 0x08, 0x05, 0x05,
617617
0x01, 0x08, 0x06, 0x06, 0x01, 0x02, 0x01}},
618618
{TLS1_3_VERSION,
619-
{0x16, 0x03, 0x01, 0x05, 0xaf, 0x01, 0x00, 0x05, 0xab, 0x03, 0x03, 0x00,
619+
{0x16, 0x03, 0x01, 0x05, 0xb3, 0x01, 0x00, 0x05, 0xaf, 0x03, 0x03, 0x00,
620620
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
621621
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
622622
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -626,12 +626,13 @@ TEST(SSLTest, ClientHello) {
626626
0xcc, 0xa9, 0xcc, 0xa8, 0xc0, 0x2b, 0xc0, 0x2f, 0xc0, 0x2c, 0xc0, 0x30,
627627
0xc0, 0x09, 0xc0, 0x13, 0xc0, 0x27, 0xc0, 0x0a, 0xc0, 0x14, 0xc0, 0x28,
628628
0x00, 0x9c, 0x00, 0x9d, 0x00, 0x2f, 0x00, 0x3c, 0x00, 0x35, 0x01, 0x00,
629-
0x05, 0x3a, 0x00, 0x17, 0x00, 0x00, 0xff, 0x01, 0x00, 0x01, 0x00, 0x00,
630-
0x0a, 0x00, 0x0a, 0x00, 0x08, 0x11, 0xec, 0x00, 0x1d, 0x00, 0x17, 0x00,
631-
0x18, 0x00, 0x0b, 0x00, 0x02, 0x01, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
632-
0x0d, 0x00, 0x14, 0x00, 0x12, 0x04, 0x03, 0x08, 0x04, 0x04, 0x01, 0x05,
633-
0x03, 0x08, 0x05, 0x05, 0x01, 0x08, 0x06, 0x06, 0x01, 0x02, 0x01, 0x00,
634-
0x33, 0x04, 0xea, 0x04, 0xe8, 0x11, 0xec, 0x04, 0xc0, 0x00, 0x00, 0x00,
629+
0x05, 0x3e, 0x00, 0x17, 0x00, 0x00, 0xff, 0x01, 0x00, 0x01, 0x00, 0x00,
630+
0x0a, 0x00, 0x0e, 0x00, 0x0c, 0x11, 0xec, 0x11, 0xeb, 0x11, 0xed, 0x00,
631+
0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 0x0b, 0x00, 0x02, 0x01, 0x00, 0x00,
632+
0x23, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x14, 0x00, 0x12, 0x04, 0x03, 0x08,
633+
0x04, 0x04, 0x01, 0x05, 0x03, 0x08, 0x05, 0x05, 0x01, 0x08, 0x06, 0x06,
634+
0x01, 0x02, 0x01, 0x00, 0x33, 0x04, 0xea, 0x04, 0xe8, 0x11, 0xec, 0x04,
635+
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
635636
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
636637
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
637638
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -732,12 +733,11 @@ TEST(SSLTest, ClientHello) {
732733
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
733734
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
734735
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
736+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x20, 0x00, 0x00, 0x00,
735737
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
736-
0x00, 0x00, 0x1d, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
737738
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
738-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
739-
0x00, 0x00, 0x2d, 0x00, 0x02, 0x01, 0x01, 0x00, 0x2b, 0x00, 0x09, 0x08,
740-
0x03, 0x04, 0x03, 0x03, 0x03, 0x02, 0x03, 0x01}}};
739+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x02, 0x01, 0x01, 0x00,
740+
0x2b, 0x00, 0x09, 0x08, 0x03, 0x04, 0x03, 0x03, 0x03, 0x02, 0x03, 0x01}}};
741741

742742
for (const auto &t : kTests) {
743743
SCOPED_TRACE(t.max_version);
@@ -765,7 +765,7 @@ TEST(SSLTest, ClientHello) {
765765
1 + 3 + // handshake message header
766766
2; // client_version
767767

768-
constexpr size_t kKeyShare1Offset = 189;
768+
constexpr size_t kKeyShare1Offset = 193;
769769
constexpr size_t kKeyShare1Size = 32 + MLKEM768_PUBLIC_KEY_BYTES;
770770
constexpr size_t kKeyShare2Offset = kKeyShare1Offset + kKeyShare1Size
771771
+ 2 // KeyShare 2 IANA ID

0 commit comments

Comments
 (0)