interplane.Get Omega
Read in your language

omtls

omtls: a TLS 1.3 client (RFC 8446) written fresh in seeded Omega, for mailhand. Not audited by a cryptographer. Free (Apache-2.0).

Brought by drakestapleton

branch main Branches Tags History

omtls / proofs / README.md

21 lines · 1708 bytes Raw Blame History Source

Proofs

Omtls.lean (Lean 4, core library only, no Mathlib) states and proves properties of small MODELS of the record layer and key schedule in src/tls.om:

TheoremWhat it saysModel of
record_fitsevery record the reader accepts (at most 2^14 plaintext or 2^14 + 256 protected bytes) fits the 16645-byte record buffer with its 5-byte headerot_tl_rdrec
inner_fits_pendingafter the record_overflow check, the inner plaintext fits the 16400-byte pending bufferot_tl_dec, ot_tl_pump1
hs_body_fitsa 24-bit handshake length fits the 2^24 - 1 byte reassembly bufferot_tl_rdhs
queue_fitsthe handshake byte queue never overflowsot_tl_fill
nonce_injectivefor one key and iv, distinct sequence numbers give distinct noncesot_tl_nonce (RFC 8446 5.3)
seq_fitsthe sequence number never wraps (2^64 - 1 is refused)ot_tl_dec, ot_tl_wrec
hkdfLabel_length, hkdfLabel_fitsthe HkdfLabel encoding's length, and that it fits the 330-byte info bufferot_tl_info (RFC 8446 7.1)
labels_distinct, labels_short, hkdfLabel_injective_labelthe nine key-schedule labels are distinct and short, and the encoding determines the label, so no two derivations from one secret share an HKDF info inputot_tl_info, ot_tl_derive, ot_tl_keys

NOT_PROVEN: that the compiled Omega code implements these models (the tests carry that weight: the RFC 8448 replay checks the key schedule and nonces byte for byte), and anything about the cryptographic strength of SHA-256, HKDF, the AEADs or X25519.

Check: lean proofs/Omtls.lean exits 0 with no output (Lean 4; the version used is in the report).