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
| 1 | # Proofs |
| 2 | |
| 3 | `Omtls.lean` (Lean 4, core library only, no Mathlib) states and proves properties of small MODELS of the |
| 4 | record layer and key schedule in `src/tls.om`: |
| 5 | |
| 6 | | Theorem | What it says | Model of | |
| 7 | |---|---|---| |
| 8 | | `record_fits` | every 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 header | `ot_tl_rdrec` | |
| 9 | | `inner_fits_pending` | after the record_overflow check, the inner plaintext fits the 16400-byte pending buffer | `ot_tl_dec`, `ot_tl_pump1` | |
| 10 | | `hs_body_fits` | a 24-bit handshake length fits the 2^24 - 1 byte reassembly buffer | `ot_tl_rdhs` | |
| 11 | | `queue_fits` | the handshake byte queue never overflows | `ot_tl_fill` | |
| 12 | | `nonce_injective` | for one key and iv, distinct sequence numbers give distinct nonces | `ot_tl_nonce` (RFC 8446 5.3) | |
| 13 | | `seq_fits` | the sequence number never wraps (2^64 - 1 is refused) | `ot_tl_dec`, `ot_tl_wrec` | |
| 14 | | `hkdfLabel_length`, `hkdfLabel_fits` | the HkdfLabel encoding's length, and that it fits the 330-byte info buffer | `ot_tl_info` (RFC 8446 7.1) | |
| 15 | | `labels_distinct`, `labels_short`, `hkdfLabel_injective_label` | the 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 input | `ot_tl_info`, `ot_tl_derive`, `ot_tl_keys` | |
| 16 | |
| 17 | NOT_PROVEN: that the compiled Omega code implements these models (the tests carry that weight: the RFC 8448 |
| 18 | replay checks the key schedule and nonces byte for byte), and anything about the cryptographic strength of |
| 19 | SHA-256, HKDF, the AEADs or X25519. |
| 20 | |
| 21 | Check: `lean proofs/Omtls.lean` exits 0 with no output (Lean 4; the version used is in the report). |