Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,12 @@ type ClientSessionCache interface {
type SignatureScheme uint16

const (
// ML-DSA signature scheme identifiers for ClientHello fingerprints. This fork
// does not implement ML-DSA CertificateVerify.
MLDSA44 SignatureScheme = 0x0904
MLDSA65 SignatureScheme = 0x0905
MLDSA87 SignatureScheme = 0x0906

// RSASSA-PKCS1-v1_5 algorithms.
PKCS1WithSHA256 SignatureScheme = 0x0401
PKCS1WithSHA384 SignatureScheme = 0x0501
Expand Down
23 changes: 13 additions & 10 deletions dicttls/exttype_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ const (

// Not IANA assigned
const (
ExtType_next_protocol_negotiation uint16 = 13172 // https://datatracker.ietf.org/doc/html/draft-agl-tls-nextprotoneg-04
ExtType_application_settings uint16 = 17513 // https://www.ietf.org/archive/id/draft-vvv-tls-alps-01.html
ExtType_application_settings_new uint16 = 17613 // https://www.ietf.org/archive/id/draft-vvv-tls-alps-01.html
ExtType_channel_id_old uint16 = 30031 // https://datatracker.ietf.org/doc/html/draft-balfanz-tls-channelid-01
ExtType_channel_id uint16 = 30032 // https://datatracker.ietf.org/doc/html/draft-balfanz-tls-channelid-01
ExtType_next_protocol_negotiation uint16 = 13172 // https://datatracker.ietf.org/doc/html/draft-agl-tls-nextprotoneg-04
ExtType_application_settings uint16 = 17513 // https://www.ietf.org/archive/id/draft-vvv-tls-alps-01.html
ExtType_application_settings_new uint16 = 17613 // https://www.ietf.org/archive/id/draft-vvv-tls-alps-01.html
ExtType_channel_id_old uint16 = 30031 // https://datatracker.ietf.org/doc/html/draft-balfanz-tls-channelid-01
ExtType_channel_id uint16 = 30032 // https://datatracker.ietf.org/doc/html/draft-balfanz-tls-channelid-01
ExtType_trust_anchors uint16 = 0xca34 // draft-ietf-tls-trust-anchor-ids
)

var DictExtTypeValueIndexed = map[uint16]string{
Expand Down Expand Up @@ -135,11 +136,12 @@ var DictExtTypeValueIndexed = map[uint16]string{
59: "dnssec_chain",
65281: "renegotiation_info",

13172: "next_protocol_negotiation",
17513: "application_settings",
17613: "application_settings_new",
30031: "channel_id_old",
30032: "channel_id",
13172: "next_protocol_negotiation",
17513: "application_settings",
17613: "application_settings_new",
30031: "channel_id_old",
30032: "channel_id",
0xca34: "trust_anchors",
}

var DictExtTypeNameIndexed = map[string]uint16{
Expand Down Expand Up @@ -209,4 +211,5 @@ var DictExtTypeNameIndexed = map[string]uint16{
"application_settings_new": 17613,
"channel_id_old": 30031,
"channel_id": 30032,
"trust_anchors": 0xca34,
}
9 changes: 9 additions & 0 deletions dicttls/signaturescheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ const (
SigScheme_ecdsa_brainpoolP256r1tls13_sha256 uint16 = 0x081A
SigScheme_ecdsa_brainpoolP384r1tls13_sha384 uint16 = 0x081B
SigScheme_ecdsa_brainpoolP512r1tls13_sha512 uint16 = 0x081C
SigScheme_mldsa44 uint16 = 0x0904
SigScheme_mldsa65 uint16 = 0x0905
SigScheme_mldsa87 uint16 = 0x0906
)

var DictSignatureSchemeValueIndexed = map[uint16]string{
Expand Down Expand Up @@ -75,6 +78,9 @@ var DictSignatureSchemeValueIndexed = map[uint16]string{
0x081A: "ecdsa_brainpoolP256r1tls13_sha256",
0x081B: "ecdsa_brainpoolP384r1tls13_sha384",
0x081C: "ecdsa_brainpoolP512r1tls13_sha512",
0x0904: "mldsa44",
0x0905: "mldsa65",
0x0906: "mldsa87",
}

var DictSignatureSchemeNameIndexed = map[string]uint16{
Expand Down Expand Up @@ -113,4 +119,7 @@ var DictSignatureSchemeNameIndexed = map[string]uint16{
"ecdsa_brainpoolP256r1tls13_sha256": 0x081A,
"ecdsa_brainpoolP384r1tls13_sha384": 0x081B,
"ecdsa_brainpoolP512r1tls13_sha512": 0x081C,
"mldsa44": 0x0904,
"mldsa65": 0x0905,
"mldsa87": 0x0906,
}
1 change: 1 addition & 0 deletions testdata/chrome158_clienthello.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16030107e1010007dd030348e79bda9f595ee8ff4eb3beb8718ee7e46e97ff3cf90bb87d0ad022dfddd3c120afa25c61a3a222942d3bf31436aa3b4bad732d67a562175dd8e3aa44e4be51660020aaaa130113021303c02bc02fc02cc030cca9cca8c013c014009c009d002f0035010007749a9a000000050005010000000044cd00050003026832000b0002010000170000001b0003020002000a000c000aeaea11ec001d0017001800000011000f00000c636170747572652e74657374000d001a00184a4a09040905090604030804040105030805050108060601002d00020101002b000706fafa030403030023000000120000ca3400ba00b80582df1302010582df1302060582df13020d0582df13020e0582df13020f0582df1302120582df1302130582df13021408839a648c9b2d010708839a648c9b2d010808839a648c9b2d010908839a648c9b2d010a08839a648c9b2d010b08839a648c9b2d010c08839a648c9b2d010d08839a648c9b2d011208839a648c9b2d011304d679090104d679090404d679090504d679090604d679090704d679090804d679090a04d679090b04d679090c04d679090d04d679090ffe0d011a0000010001e300204d69015977434dc24a9fd0bd97c636114db6e30eb2e06d3a87df259f4ef3d66000f037cc4bc95cf716c604cb81b6dfc6a56957ec64640de326781efba4e130ac26fb22b20d5ad6140a6105599e0d362f5719b0f81f1dd23a6329930e51232a3f0dfb183870a7ce5fd042d0219400f2827023b2a75543ab56c2cec7ab0732928cd39b9122fc3fef2da6f9db4b92823b49c1e746fd5bf7a4b224a978c97906e4cc0050f031f341e5bc309cc1d68f64d133adb52d339842a0ef98e071d8c457e47370ef320fb6665903d6baad67930a9dd2463ec67972a281a288daedfb31ea01d7596f994542e97eb92f9838cf7d20370d724f92e44ec0553f03ebeec2370c3b1be2a114a1486a59295d2517dc119f6f7311f6ff010001000010000e000c02683208687474702f312e3112e000020000003304ef04edeaea00010011ec04c0c4b11dd8c72f6a93749a34b8a848264029a5217ac0537678b18b73243c1642ea3dbd322241175c98f73d3b6b4e4eca9d0b7c42b4aaacc0d600bdd20be8a6a1c160a3d560751d063e7a7493da0c7b28e428a5665ad082b93af842e8d0797e4567ab047cf8cac7244ac81a5524a1e60f6c49c889602cb9066f62b9b222fb8ada304fdde6be3e4b78132a45166661a6d76f4dd1599ad80ed0506697634ac2874bdd22bf30bb71c646c909f83694f47956c465e8e9b7bdc5593ee22d28db23ae95acf818af83851615798e5580241e4a38c37a44e667201e44485ea746ef22a4feb614118b6687e20bcd7917ae63b1935134c4d9ac772842fd42546346a393ea20a007c523dc2a4337ae02856129c405e60a51a1dab4ac292a644645ee1b96597c354e004877814af122751e538a0c851e246663cca60b7d59462e0cc27e7643b5b71a8f626a3d8265793c9461d853458715d4fc58f1f65ff2cb5a22dbc4b9848c30b90e27d5377c89c024709f68ba75fc94671a6b7e7ed367cba51c09dc008bc2a56ce216ec758e4a4a99d8db38270578fe242ce3ec41e06676a8961900bac5537a8da5bb3310c012e6538df8f6cf590ca54f748615c779336abcf0d53216260228e53b27a2a20a5939a873a2da75a7c2372e44a71f5228556c20410ec61d57fb2906da4a10f203f5f18542932f9a62bf344a3e08127c37e5c75e565126090cc2e08466da5423d4c1f44845664594d7fc343f325b6de50bc1d10d803131040516cebb8e29248852840cf118302fd768ba8677b0dcccce209ed2c31441bc0e6379c4c1b65ef17283aa36368df64b95c0701d626295eb0eae343098f1284ce0cde2b63da75b014dd418ea53a9f408822c8710a8c35ec5d91bdec5428d11c6c7191961525d76a4a80f9a9394fcca0278ac73844a46dbb878b98f99cb672710719d9b918c6ba1063a3bcff28b3f79051931494b52394255b1f3e94a49eb296b020cde561caea6bbcc6a64c41a9e1b8a528675bb86267cd0c9906d756e395837c680c0583357e5cacbd0f6291be1a1368c8bf494051040aa4657ac225857c5254bc47b9fd1949d3b38481579a42f24b9ff6519cc8c2d734012be278aa924c7c82125cd2a86d96860125a4d8ba6546ae00674031d069019cbf39bf72cb7b01084f3271113638822a380ece5420d609d191b8e9ee49f8b02428c5ac3cddcbaddc32aec746419cca796039bd7c38131898483485208540b85c34bcf66029aabb3ca244d0fd6c2ee2aa383ba344529593fcb6c3675cfa5216efac55d602260e6fc6ab98073bae400a42a37258164b799671c5080e8dc5cbacc0a028cc0ee607d75063a62b70c5ddc739cb18fd4f33cc4d81e3333ba5d384c0e8b98dc9208b1c368c4ea89b54640fb2b1b7315ac5e9bc6ef7b9e59ab2c808040a4fcc2f28776fb5ac12f61bf9b3acb919c71aba47bf82897195849ed75164ec50f79a697c7a31562acc29dd369cb85457545ae46fb11aecc80773aa2e4c11b4a34057c03530a9919e91c699a3bb472d9bc0f50a60ae99b3d065421f001e7b92b7f5aa57631a795c46f1b5cb72ee566c7b53c4040c314c149de73746bf714ec818a7fc470fe3a25dbe2cdaec18537f606bba22bc17598b2220e792f14851f2f6a147bb768bc0698990799bd58506b138a94fc2a9b38685c0fe4d01c4cc3e4746aaca75a1dfaa0a72429ddba406c001d0020b242d39bbb360c21fb06e4995ebf90a18a074670d423b5866e36140da1215520caca000100
9 changes: 9 additions & 0 deletions testdata/chrome158_clienthello.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Chrome 158 ClientHello

The fixture is the first TLS record sent by Chrome for Testing Stable 158.0.8127.88 for Windows x64 to `https://capture.test`. The browser ran headless with a fresh user-data directory, a loopback host resolver rule and no proxy. Three independently launched profiles offered the same ordered capabilities and extension bodies after normalization. The TLS record contains only the public ClientHello.

The regression test compares the entire ClientHello, allowing fresh randomness, GREASE values, ephemeral keys, GREASE ECH payload sizes, and shuffled extension order. A fresh connection from installed Google Chrome 158.0.8127.37 on the same host matched the other capabilities but omitted the experimental server padding request (0x12e0). Trust anchor IDs are a snapshot of the browser's root store.

Select `HelloChrome_158` explicitly. This fork advertises the browser's ML-DSA scheme IDs in this profile and verifies conventional certificate signatures. If a server selects ML-DSA for CertificateVerify the handshake fails. The profile does not install Chrome's trust roots.

[Chrome for Testing build](https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json) · [Upstream Chrome 155 implementation](https://github.com/refraction-networking/utls/commit/6ebdceb2607e8c72942805af16ed4b8f052ee509)
38 changes: 38 additions & 0 deletions u_chrome158.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package tls

// chrome158TrustAnchorIDs returns the Chrome Root Store IDs advertised by a fresh
// Google Chrome 158.0.8127.88 (Windows x64) connection. Chrome encodes the IDs in
// lexicographic order. Return fresh slices because ClientHelloSpec is mutable.
// Source: https://chromium.googlesource.com/chromium/src/+/refs/tags/158.0.8127.88/net/data/ssl/chrome_root_store/root_store.textproto
func chrome158TrustAnchorIDs() [][]byte {
return [][]byte{
{0x82, 0xdf, 0x13, 0x02, 0x01},
{0x82, 0xdf, 0x13, 0x02, 0x06},
{0x82, 0xdf, 0x13, 0x02, 0x0d},
{0x82, 0xdf, 0x13, 0x02, 0x0e},
{0x82, 0xdf, 0x13, 0x02, 0x0f},
{0x82, 0xdf, 0x13, 0x02, 0x12},
{0x82, 0xdf, 0x13, 0x02, 0x13},
{0x82, 0xdf, 0x13, 0x02, 0x14},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x07},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x08},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x09},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x0a},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x0b},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x0c},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x0d},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x12},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x13},
{0xd6, 0x79, 0x09, 0x01},
{0xd6, 0x79, 0x09, 0x04},
{0xd6, 0x79, 0x09, 0x05},
{0xd6, 0x79, 0x09, 0x06},
{0xd6, 0x79, 0x09, 0x07},
{0xd6, 0x79, 0x09, 0x08},
{0xd6, 0x79, 0x09, 0x0a},
{0xd6, 0x79, 0x09, 0x0b},
{0xd6, 0x79, 0x09, 0x0c},
{0xd6, 0x79, 0x09, 0x0d},
{0xd6, 0x79, 0x09, 0x0f},
}
}
Loading