Parent: #28 · Track B (wire-side) · No dependencies · Blocks PR 4b
Scope
Foundational Rust submodule for TLS 1.3 handshake parsing. No networking, no PyO3 export — purely deterministic byte parsing.
New files
```
rust_certinfo/src/tls/
├── mod.rs
├── groups.rs ← IANA Supported Groups table (contributor-facing data file)
├── records.rs ← TLS record framing (read + write)
└── handshake.rs ← ClientHello builder + ServerHello / HelloRetryRequest parser
```
In scope
GroupKind enum (ClassicalEcdh, ClassicalFfdh, HybridPq, PurePq, Unknown)
GroupInfo { id, name, kind } static slice
- Lookup function
- TLS record framing: read TLS records up to a bounded length, recognize content types
- ClientHello byte builder with realistic extension set (SNI, supported_versions, signature_algorithms, supported_groups, key_share, ALPN)
- ServerHello / HelloRetryRequest parser that extracts negotiated/selected group ID
- Re-use
DerReader patterns where they fit; create a small TlsHandshakeReader if needed
Out of scope
- TCP sockets
- PyO3 exports
- TLS 1.2 ServerKeyExchange (Future / PR 7)
Tests
- Parse captured ServerHello bytes (capture beforehand via
openssl s_client -msg against Cloudflare for TLS 1.3 + hybrid PQ, a stock nginx, a TLS-1.2-only host)
- Check fixtures in under
rust_certinfo/tests/fixtures/
- ClientHello build → parse round-trip
- Malformed input: oversized length fields, truncated records, unknown extensions all handled without panic
Definition of Done
Parent: #28 · Track B (wire-side) · No dependencies · Blocks PR 4b
Scope
Foundational Rust submodule for TLS 1.3 handshake parsing. No networking, no PyO3 export — purely deterministic byte parsing.
New files
```
rust_certinfo/src/tls/
├── mod.rs
├── groups.rs ← IANA Supported Groups table (contributor-facing data file)
├── records.rs ← TLS record framing (read + write)
└── handshake.rs ← ClientHello builder + ServerHello / HelloRetryRequest parser
```
In scope
GroupKindenum (ClassicalEcdh,ClassicalFfdh,HybridPq,PurePq,Unknown)GroupInfo { id, name, kind }static sliceDerReaderpatterns where they fit; create a smallTlsHandshakeReaderif neededOut of scope
Tests
openssl s_client -msgagainst Cloudflare for TLS 1.3 + hybrid PQ, a stock nginx, a TLS-1.2-only host)rust_certinfo/tests/fixtures/Definition of Done
make cicleandevelopfromfeat/tls-handshake-parserstls/groups.rshas a clear "add new groups here" comment for contributors