interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / om / tls / README.md

515 lines · 45548 bytes Raw Blame History Source

om/tls: a TLS 1.3 client in Omega

A TLS 1.3 client (RFC 8446) written in seeded Omega, with every primitive it needs, for HTTPS and SMTPS from Omega programs on Linux ARM64. No C, Rust, OpenSSL or other foreign code is in the build or run path. Python and the openssl command appear only in tests, as oracles and fixture generators.

Status: IMPLEMENTED and EXERCISED on the host (Linux ARM64, DGX Spark), 2026-10-26. These are library units compiled from source into each program. This is not hardware qualification and nothing is deployed.

Units

Compose the client units in this order with sh om/tls/build.sh OMC PROGRAM.om OUT. Each unit calls only the units before it. gcmsiv.om is not in that composition. The composed unit is OM-2 (a leading om2 line), and the library files have no fn main. The one mutable global is FPST in fips.om, the process-wide self-test and error state (a FIPS 140-3 module error state must cover every connection of the process).

unitcontentsfns
sha2.omSHA-256/384/512 (FIPS 180-4), streaming; contexts are 40 ulong cells27
hkdf.omHMAC-SHA-256/384/512 (RFC 2104), HKDF extract/expand (RFC 5869)8
drbg.omHMAC_DRBG with SHA-256 (SP 800-90A Rev. 1 section 10.1.2), reseed counter, continuous test14
x25519.omX25519 (RFC 7748), constant-time Montgomery ladder, radix 2^25.515
sha3.omSHA3-256/512, SHAKE128/256 (FIPS 202), Keccak-f[1600]20
mlkem.omML-KEM-768 (FIPS 203): key generation from a seed, encapsulation, decapsulation with implicit rejection43
chacha.omChaCha20, Poly1305, ChaCha20-Poly1305 AEAD (RFC 8439)19
aesgcm.omAES-128/192/256 bitsliced, GCM (SP 800-38D), AES-128-GCM AEAD for TLS37
gcmsiv.omAES-128/256-GCM-SIV (RFC 8452); calls aesgcm.om; not in the TLS client build24
ec.omECDSA verification on P-256 and P-384 (FIPS 186-4), DER or r‖s50
ecdh.omconstant-time P-256/P-384 ECDH (SP 800-56A Rev. 3): key generation, partial public-key validation, Z, pair-wise consistency test18
rsa.omRSASSA-PKCS1-v1_5 and RSASSA-PSS verification (RFC 8017), 1024-8192-bit keys32
x509.omstrict DER, X.509 v3, PEM trust store, path validation, CertificateVerify81
rev.omrevocation: SHA-1 for OCSP CertID only, stapled OCSP (RFC 6960), must-staple (RFC 7633), caller-supplied CRL (RFC 5280); composed after x509.om61
fips.omself-tests (KATs), SP 800-90B health tests on getrandom, approved-mode DRBG wiring, X25519 pairwise consistency test, module error state38
tls.omhandshake, record layer, key schedule, alerts, DNS A lookup, TCP connect, approved-only mode, X25519MLKEM768 hybrid key exchange149

The client composition is 612 functions. gcmsiv.om adds 24, so the table total is 636. omc at 2c824805 (the batch 2 pin, OMC_PIN in om/units.sh, which the ec, rsa and x509 suites check) allows 4095 functions per unit, as 189ada82 did.

Client API (tls.om)

All buffers are owned by the caller. c is the connection state, at least TLCSZ (121696) bytes. st is the trust store, TLSTSZ (262144) bytes. Codes are ulong, and 0 means success. tls_errname code out writes the code's name, such as TLS_ERR_CERTIFICATE. tls_detail c gives the detail of the last failure: the x509.om reject code for TLS_ERR_CERTIFICATE and TLS_ERR_CERTIFICATE_VERIFY, or the received alert number for TLS_ERR_ALERT_RECEIVED, or the number of the failed self-test for TLS_ERR_SELFTEST (section "Self-tests and approved mode").

e  = tls_store st                        load /etc/ssl/certs/ca-certificates.crt
e  = tls_init c hostname flags           flags 1: offer ALPN http/1.1; 4: approved mode (HMAC_DRBG); 8: stapled OCSP + must-staple (rev.om);
                                         the name is SNI and the checked name
fd = tls_dial hostname port              DNS A + TCP (IPv4; a dotted literal skips DNS); fd or -code
tls_deadline c monotonic_ns              absolute deadline (monons) for every wait; 0 = 30 s per wait
                                         and, for the handshake, the whole-handshake budget below
                                         (CPU time is never covered)
e  = tls_hslimit c ns                    whole-handshake budget when no deadline is set (default 30 s;
                                         before tls_connect only)
e  = tls_reclimit c n                    tests only: lower the per-key record limit (1 .. 23726565;
                                         before tls_connect only; it can never be raised)
e  = tls_connect c st int fd             full handshake; any failure sends an alert and is final
n  = tls_read c out                      > 0 bytes; 0 = close_notify received; -code on error
                                         (an empty `out` is -TLS_ERR_ARGUMENT; the connection stays up)
n  = tls_write c bytes                   all bytes or -code; sends KeyUpdate before the write key's
                                         record limit (section "Key lifetime")
tls_close c                              send close_notify, wipe keys (the caller closes fd); a failed
                                         connection stays failed, so a later tls_read is -code, never 0

Handshake budget: when the caller has set no deadline, tls_connect arms one of now + 30 s (TLHSNS, or the value given to tls_hslimit) over the whole handshake and clears it when the handshake succeeds, so a server that trickles its ServerHello one byte at a time (interop rows loris and slowsh) cannot hold the client past the budget; the usual 30 s per wait then applies to application data. A caller deadline replaces the budget.

Key lifetime (RFC 8446 section 5.5): at most TLKUREC = 23726566 = floor(2^24.5) records are protected under one key in each direction (the AES-GCM bound; ChaCha20-Poly1305 would allow more and gets the same conservative value). tls_write sends KeyUpdate(update_not_requested) and rotates its own key before the record that would be number TLKUREC - 1 under the current key; tls_seal and tls_open refuse with TLS_ERR_SEQUENCE_LIMIT (fail closed, the connection is failed) when a sequence number reaches the limit, which happens on the read side when the peer never updates its key. tls_reclimit lowers the limit for the tests (interop rows kuexact, kuover, kurot, kuw:8); the limit cannot be raised.

Secret wiping: tls_close and tls_abort zero the traffic keys and IVs, the application secrets, the handshake secrets and ephemeral key, and the record, write and line buffers of c (tls_wipe). Secrets held in function locals (the Omega compiler keeps small values in registers and new arrays on the stack) are not scrubbed after a function returns; see THREAT_MODEL.md.

Approved-only mode (tls_init flag 4, opt-in; the default mode is unchanged). The client then offers and accepts only NIST-approved algorithms:

A ServerHello choosing ChaCha20-Poly1305 is TLS_ERR_CIPHER_SUITE; one choosing x25519 or any other group, or carrying an invalid point, is TLS_ERR_KEY_SHARE; HelloRetryRequest stays refused. Each ephemeral private key is drawn by rejection sampling (FIPS 186-5 A.2.2, SP 800-56A Rev. 3 5.6.1.2.2) from the approved-mode HMAC_DRBG (tls_rand, below) and checked with the pair-wise consistency test of section 5.6.2.1.4; a failed test, or 16 rejected draws, latches the module error state (detail 21) and returns TLS_ERR_SELFTEST. Both private keys and Z are zeroed once the handshake secret is derived. Certificate chains may still be signed with RSASSA-PKCS1-v1_5 (x509.om), and no module boundary has been submitted to a laboratory. The units are tested against the FIPS 140-3 / CAVP test methods (CAVP vectors in each suite), not NIST-validated. Test: test/tls/client.om OPTS field APPROVED, interop rows marked 0,0,0,0,1; test/fips/run.sh checks that key generation advances the DRBG and that a failed generation latches (driver ecgenerr).

For STARTTLS (RFC 3207), do the plaintext exchange on fd first, then call tls_connect. See test/tls/client.om, mode tsmtp.

Self-tests and approved mode (drbg.om, fips.om)

Tested against the FIPS 140-3 / CAVP test methods, not NIST-validated: no module boundary has been submitted to a laboratory, there is no CMVP certificate, and nothing here is an ESV.

What it does and refuses

Side channels: what is and is not constant time

Constant time here means that no branch, loop count or memory index depends on a secret.

unitsecret dataconstant time?
x25519.omscalar, shared secretyes: fixed-count ladder, masked cswap, masked final reduction and zero check
chacha.omkey, keystream, Poly1305 state, tagyes: ARX only; tag compare ORs all 16 bytes before deciding
aesgcm.omkey, round keys, H, datayes: bitsliced AES (BearSSL aes_ct64 layout, MIT, T. Pornin; NOTICE.bearssl), Boyar-Peralta depth-16 S-box circuit, masked GHASH; no table lookups
gcmsiv.omkey, derived keys, H, tagyes, on the same terms as aesgcm.om: bitsliced AES and masked GHASH; tag compare ORs both 64-bit halves; branches only on lengths, key size and the tag-check outcome
sha2.om, hkdf.omHMAC keys, PRKs, secretsyes: branches only on lengths and the algorithm
tls.omtraffic secrets, keys, Finishedthe key schedule, nonce and Finished compare (tls_cteq) are constant time. Branches depend on public values (suite, lengths, content type)
ecdh.omprivate scalar, Zyes: fixed-count Montgomery ladder (Renes-Costello-Batina complete formulas, masked swap), masked range check and final reduction; peer-point validation branches only on the public point
ec.om, rsa.om, x509.omnone (verification of public data)no, by design. Do not reuse them for signing or ECDH

Not covered, or covered only partly:

Tests (run from the repository root)

commandfinal line observed 2026-10-26 (omc 2c824805; identical on 189ada82; net=PASS observed 2026-10-26 on both)
sh om/tls/test/sha2/run.sh OMCSHA2 PASS vectors=1777 (wycheproof=774) mutants=5/5
sh om/tls/test/x25519/run.sh OMCX25519 PASS vectors=531 (wycheproof=518) mutants=7/7
sh om/tls/test/chacha/run.sh OMCCHACHA PASS vectors=3087 (wycheproof=339) mutants=5/5
sh om/tls/test/aesgcm/run.sh OMCAESGCM PASS vectors=47570 (fips197=4, nist=47250, wycheproof=316) mutants=5/5
sh om/tls/test/gcmsiv/run.sh OMCGCMSIV PASS vectors=51 (rfc8452 c1=24 c2=24 c3=2 s8=1) checks=422 mutants=6/6 (2026-10-30, omc 62775d2a)
sh om/tls/test/reuse/run.sh OMCREUSE PASS checks=27 mutants=6/6 (2026-10-30, omc 62775d2a)
sh om/tls/test/ec/run.sh OMCEC PASS vectors=8754 (wycheproof=3748 cavp=180 edge=56 p256=4770) mutants=14/14 (2026-10-30, omc 62775d2a, with the P-256 fast field)
sh om/tls/test/ecdh/run.sh OMCECDH PASS vectors=2458 (cavp=100 wycheproof=2284 edge=74) mutants=13/13 (2026-10-30, omc 62775d2a)
sh om/tls/test/rsa/run.sh OMCRSA PASS vectors=6486 (wycheproof=5250) mutants=4/4
sh om/tls/test/x509/run.sh OMCX509 PASS cases=106 (openssl-parity=83/106) mutants=26/26 (2026-10-30, omc 62775d2a)
sh om/tls/test/drbg/run.sh OMCDRBG PASS vectors=810 (acvp=90, cavp=720) api=23 mutants=13/13 (observed 2026-10-26, omc 2c824805)
sh om/tls/test/fips/run.sh OMCFIPS PASS checks=49 drbgerr=50 ecgenerr=52 kat-mutants=14/14 code-mutants=18/18 (observed 2026-10-26, omc 2c824805, with the approved-only ECDH key generation; same line 2026-10-27 with the integrity test, detail 16)
sh om/tls/test/integrity/run.sh OMC [OUT]INTEGRITY PASS checks=14 mutants=4 (observed 2026-10-27, omc 2c824805)
sh om/tls/test/fips/entropy.sh OMC EA_CPP_DIRENTROPY PASS ... with the min-entropy estimates; needs the NIST SP800-90B_EntropyAssessment tool built separately
sh om/tls/test/mlkem/run.sh OMCMLKEM PASS vectors=4500 (wycheproof=756 fips203=105) sha3=3632 mutants=9/9 (2026-10-30, omc 62775d2a)
sh om/tls/test/rev/run.sh OMCREV PASS cases=86 mutants=17/17 (2026-10-30, omc 62775d2a)
sh om/tls/test/net/hostile.sh OMCHOSTILE PASS cases=106 pass=106 fail=0 (2026-10-30, omc 62775d2a)
TLS_NET=1 sh om/tls/test/tls/run.sh OMCTLS PASS vectors=24 (rfc8448) dns=23 dit=1 interop=99 pq=PASS residue=PASS net=PASS mutants=62/62 (observed 2026-10-30 on the train r3 tree a00e134c, omc 62775d2a, with TLS_PQ=1, OPENSSL35 and FAKESRV_PY set). Before the integration: interop=44 ... mutants=27/27 on audit/tls-suites and interop=57 ... mutants=34/34 on audit/tls-fips-approved (omc 2c824805; net=NOT_RUN without TLS_NET)
sh om/tls/build.sh OMC om/tls/test/tls/timing.om build/tls/timing then nice -n 19 taskset -c CPU build/tls/timing WHAT Ndudect samples (CLASS NANOSECONDS lines), statistics outside; see THREAT_MODEL.md
sh om/tls/build.sh OMC om/tls/test/bench/bench.om build/tls/bench then build/tls/bench h\|g\|b\|d PORT N PATH STOREFILE (HTTPS benchmark client against a local server for TLS name bench.test; modes in the file header)one S NANOSECONDS BYTES line per sample. Compiles at omc be8c5130 (2026-10-31; no arguments prints usage, exit 2). HISTORICAL, MEASURED 2026-10-26 on cpu 16 (X925) on a loaded host, not rerun: get1k median 42.2 ms without TCP_NODELAY and 3.53 ms with it (TlsProof frozen protocol, ~/handoffs/TlsProof/bench/RESULTS.md)
sh om/tls/test/acvp/run.sh OMC (NIST ACVP-Server sample vectors, pinned 975de31e; not a CAVP certificate)ACVP PASS algos=21 tests=7623 not_applicable=7299 not_run=NONE (observed 2026-10-31 on the train r6 tree, omc be8c5130, with mlkem.om, sha3.om and test/drbg in this tree; 20 of 20 vector-set negative controls FAIL as required, plus the tls.om native key-schedule subset PASS tests=25). Before ML-KEM and the DRBG suite reached main: ACVP PARTIAL algos=18 tests=7543 not_applicable=7139 not_run=ML-KEM,hmacDRBG (exit 3, omc 62775d2a)

How the suites are built:

The interop refusal table (build/tls/tls/interop-table.txt):

caseoutcome
good EC chain (ChaCha20, AES-128-GCM), good RSA leafaccepted
expired, not-yet-valid, wrong nameTLS_ERR_CERTIFICATE with X509_ERR_EXPIRED, NOT_YET_VALID, NAME_MISMATCH
self-signed leaf (CA:TRUE / CA:FALSE)X509_ERR_LEAF_IS_CA / X509_ERR_UNKNOWN_ISSUER
bad certificate signatureX509_ERR_BAD_SIGNATURE
unknown issuer, missing intermediateX509_ERR_UNKNOWN_ISSUER
TLS 1.2-only, AES-256-only, P-256-only serverthe server's own alert 70 / 40 / 40 (TLS_ERR_ALERT_RECEIVED)
crafted ServerHello: TLS 1.2, HRR with a ServerHello-shaped key_share, AES-256 suite, session id, P-256 share, zero share, duplicate extension, trailing bytePROTOCOL_VERSION, DECODE, CIPHER_SUITE, SESSION_ID_ECHO, KEY_SHARE, ZERO_SHARED_SECRET, EXTENSION, DECODE
openssl s_server -groups X25519, client withholds its x25519 share (FLAGS 2, hybrid share only): real HelloRetryRequestaccepted
X25519MLKEM768, fakesrv.py with kyber-py 1.2.0 as the ML-KEM oracle: hybrid handshake (default and FLAGS 2); server picks x25519 (hybx); share one byte short; zero x25519 half; one ciphertext bit flipped (implicit rejection)accepted, accepted, KEY_SHARE, ZERO_SHARED_SECRET, BAD_RECORD_MAC
X25519MLKEM768, OpenSSL 3.5.4 s_server -trace (OPENSSL35, openssl35.sh; the group of the server's key_share is checked): hybrid-only, default groups, FLAGS 2 hybrid-only, FLAGS 2 x25519-only (HRR), x25519-only, approved mode (P-256 chosen), pure MLKEM768-only serveraccepted ×6, ALERT_RECEIVED detail 40
fake HRR (FLAGS 2): with and without cookie, with CCS after it (hrrok, hrrnock, hrrccs); the server checks ClientHello2's random, session id, single share and cookie echoaccepted
fake HRR: client had already shared x25519; group never offered; second HRR; suite changed in ServerHello; no change requested; early_data extension; unknown extension 0x0a0a; no supported_versions; 12001-byte cookieKEY_SHARE, KEY_SHARE, UNEXPECTED_MESSAGE, CIPHER_SUITE, HELLO_RETRY, ILLEGAL_PARAMETER, EXTENSION, PROTOCOL_VERSION, MESSAGE_TOO_BIG
NewSessionTicket: well formed; lifetime 604801; empty ticket; trailing byte; extension past the blockaccepted, TICKET, DECODE, DECODE, DECODE
leaf CertificateEntry with a status_request extension (entryext)TLS_ERR_EXTENSION detail 21
tls_read into an empty buffer, then the normal read (ok, FLAGS 4)-TLS_ERR_ARGUMENT, then accepted
seed/net/https.om htlssend past the end of io, then all 3548320 bytes of a 3.5 MiB io (bigsend.om to sink, every byte checked)HEINVAL (no trap), then accepted in 217 records
one bit flipped in a server record by a proxyTLS_ERR_BAD_RECORD_MAC
fake server (fakesrv.py), valid handshake; 50 empty application records before the dataaccepted
second CCS, 5000 CCS, CCS before ServerHello, CCS after the first protected record, CCS inside a protected recordTLS_ERR_UNEXPECTED_MESSAGE
a 6000-byte Certificate sent one byte per recordTLS_ERR_MESSAGE_TOO_BIG
CertificateVerify signature flipped; signed with a key that is not the leaf'sTLS_ERR_CERTIFICATE_VERIFY with X509_ERR_BAD_SIGNATURE
Certificate then Finished, no CertificateVerifyTLS_ERR_UNEXPECTED_MESSAGE
1500 empty application records; 1500 NewSessionTicketsTLS_ERR_UNEXPECTED_MESSAGE
close_notify before the ServerHello and after itTLS_ERR_ALERT_RECEIVED detail 0
record limit lowered to 5: server sends exactly 4 records per key then KeyUpdate (kuexact), rotates twice (kurot)accepted
record limit lowered to 5: server sends a 5th record under one key (kuover)TLS_ERR_SEQUENCE_LIMIT
record limit lowered to 8, client writes 8 single-byte records: the server (kuw:8) alerts unless a KeyUpdate arrives in timeaccepted (13 updates seen)
ServerHello one byte per 250 ms for 8 s, handshake budget 2 s (loris)TLS_ERR_TIMEOUT
ServerHello one byte per 20 ms, budget 10 s (slowsh)accepted

Differences from openssl verify

The x509 suite runs `openssl verify -x509_strict -purpose sslserver -verify_hostname HOST -attime NOW` (OpenSSL 3.0) on every chain case and fails on any difference that test/x509/vectors/openssl-diff.txt does not list, and on any listed case where OpenSSL agrees. The gate prints how many cases agree (openssl-parity=P/N). In every differing case this client refuses and OpenSSL accepts: there is no case where this client accepts a chain OpenSSL refuses. The two such cases the review found (store_intermediate_anchor, at_not_after) were closed by making this client stricter (above); mutants anchor-self-issued and date-at-not-after reopen them and are caught.

casethis clientwhy it refuses
wildcard_partialNAME_MISMATCHpartial-label wildcard f*.wild.test (RFC 6125 6.4.3 SHOULD NOT)
no_sanNO_SANno subject CN fallback (RFC 6125 6.4.4, CA/B BR require SAN)
name_constraints_criticalNAME_CONSTRAINTSnameConstraints not implemented, so it is refused (finding 5)
name_constraints_noncriticalNAME_CONSTRAINTSsame, also when not critical: ignoring it would accept names the CA was constrained against (finding 5)
depth_8_intermediatesTOO_DEEPat most 8 non-anchor certificates; OpenSSL allows depth 100
leaf_is_caLEAF_IS_CAa cA TRUE certificate is not a server leaf
leaf_ku_no_digsigKEY_USAGETLS 1.3 signs with the leaf key, so keyUsage must include digitalSignature
rsa_1024_leafWEAK_KEYRSA below 2048 bits; OpenSSL security level 1 accepts 1024
sha1_signedUNSUPPORTED_ALGonly SHA-256/384/512 signatures
rsassa_pss_keyUNSUPPORTED_ALGonly rsaEncryption and P-256/P-384 keys; id-RSASSA-PSS keys refused
ed25519_keyUNSUPPORTED_ALGno Ed25519 in om/tls
leaf_too_bigMALFORMEDleaf over 16896 bytes refused before parsing (finding 2)
rsa_6144_leafWEAK_KEYpresented RSA moduli above 4096 bits (finding 6, bounds verification cost)
rsa_6144_intermediateWEAK_KEYsame policy for presented intermediates
rsa_e_2_32_plus_1_leafWEAK_KEYpresented exponent outside 3 .. 2^32-1 (finding 6)
rsa_e_2_32_plus_1_intermediateWEAK_KEYsame policy for presented intermediates
rsa_e_even_leafWEAK_KEYeven exponent 65536; OpenSSL verify does not check the leaf exponent
rsa_e_1_leafWEAK_KEYexponent 1; OpenSSL verify does not check the leaf exponent
serial_zero, serial_negativeMALFORMEDRFC 5280 4.1.2.2: serialNumber must be positive (MODEL-REVIEWED I5b, x509-limbo); OpenSSL verify does not check it
serial_21_octetsMALFORMEDRFC 5280 4.1.2.2: serialNumber at most 20 octets (I5b)
generalizedtime_before_2050MALFORMEDRFC 5280 4.1.2.5: dates through 2049 must be UTCTime (I5a); OpenSSL accepts either form
rsa_2052_bit_leafWEAK_KEYthe modulus must be a whole number of octets (2048..4096 in steps of 8), as in the x509-limbo webpki RSA cases

Security review

The security review of omega-mv #813 (~/handoffs/omega-tls/security-review.md, head de2d884b) had 11 findings. Each one is fixed and has a test that fails on the code before the fix.

findingfixtest
F1 repeated uniqueIDs trap x509_tbs2issuerUniqueID then subjectUniqueID, each at most once, else X509_ERR_MALFORMED (x509.om x509_tbs2)x509 P uid_* cases, mutant unique-id-order
F2 element bounds reachableeach element loop stops at 9999 (X5NMAX) with X509_ERR_MALFORMED; a leaf over 16896 bytes (X5LMAX) is refused in x509_chain_verifyx509 P eku/san/ext cases, C leaf_too_big, mutants leaf-size and elemcap
F3 tls_hsmsg traps on empty recordsmore than 4000 records for one message is TLS_ERR_MESSAGE_TOO_BIGinterop frag, mutant handshake record cap
F4 tls_read traps on empty recordsmore than 1000 records without data is TLS_ERR_UNEXPECTED_MESSAGE (tls_abort)interop empty1500, tickets1500, empty50 (accepted), mutant read record cap
F5 non-critical nameConstraints ignoredany nameConstraints is X509_ERR_NAME_CONSTRAINTS (code 20) in x509_extx509 C name_constraints_*, E row 20, mutant name-constraints-noncritical
F6 attacker-chosen RSA keys cost CPUpresented keys need 2048-4096 bits and an odd exponent in 3 .. 2^32-1 (x509_rsaok, chain_rsapol, chain_leaf, x509_cv_verify)x509 C rsa_*, V cv_rsa_6144, cv_rsa_e_2_32_plus_1, mutants rsa-modulus-max, rsa-exponent
F7 protected and repeated CCS acceptedCCS policy above (TLCCS state in tls_rdrec; inner type 20 refused)interop ccs2, ccsflood, ccspre, ccslate, encccs, mutant CCS count
F8 DNS answer handlingheader flags checked, owner names compared case-insensitively along the CNAME chain, label count and pointer steps capped, no trap (dns_parse, dns_ans, dns_skip, dns_neq)dnsunit.om (21 cases), DNS mutants
F9 no CertificateVerify negative controlfake server with a flipped signature and with a foreign keyinterop cvbad, cvkey, mutant CertificateVerify ignored
F10 F1-F4 and F7 not exercisedcrafted x509 fixtures (gen_crafted.py), fake-server rows, DNS unit; a trap is a FAIL in interopall rows above
F11 info itemstls_close keeps a failed connection failed; close_notify in the handshake is TLS_ERR_ALERT_RECEIVED; deadline, clock, public-suffix, caller-contract, CertificateRequest and path-building limits documented aboveinterop CLOSE_NOT_FAILED check on every failure row, closehs, closepre, mutants close revives failed and handshake close_notify unmapped

MODEL-REVIEWED (2026-10-26, branch audit/tls-outside-review; a code-reading review by my own review agents, not an outside review): six gaps, each fixed here or stated as a limit in THREAT_MODEL.md; the audit boundary is AUDIT_SCOPE.md. In short: key lifetime (KeyUpdate at the record limit, TLS_ERR_SEQUENCE_LIMIT fail-closed), HTTPS transport for seed/net/http.om, a hosted arm64 CI job (.github/workflows/om-tls-arm64.yml), the handshake budget, secret wiping checked by test/tls/residue.py (a /proc/PID/mem scan after the handshake and after tls_close, with three mutants), the DIT probe, the timing measurement, and the review bundle retained under evidence/om-tls-review-2026-10-26/ with SHA-256 sums.

Policy

The read-only re-review of the fix (~/handoffs/omega-tls/security-rereview.md, 38c80a85) found every finding fixed (VERDICT: PASS) and two residual items, both fixed here: N1, a caller host name of 288 bytes or more trapped dns_a4 (now refused above 253 bytes; dnsunit L cases, mutant dns_a4 name length unchecked), and N2, no row for a server that omits CertificateVerify (interop cvskip).

Writing another unit for this set