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

Unfinished: not checked yet

There is no published receipt of a rebuild from its source yet. What a receipt is

Get this repository
Git over HTTPS
git clone --no-checkout https://interplane.io/projects/omtls/repo.git omtls && git -C omtls checkout --detach 95315da508def0e6cca056d8acc1e05dba6c4952
Source archive of 95315da508def0e6cca056d8acc1e05dba6c4952
Download ZIP · tar.gz

README.md

omtls

omtls is a TLS 1.3 client written in seeded Omega, the language of omega-mv. It exists so that mailhand can read and send mail on a real mail account (IMAP on port 993, SMTP submission on 465 or 587) without a host TLS library. It was written fresh from the public standards (RFC 8446 and the RFCs and FIPS documents named below), in Omega only: no C, Rust, Python or shell logic, no OpenSSL or other TLS library in the product.

It has not been audited by a cryptographer. Read the section "What it is not" before you rely on it.

What it does

  • TLS 1.3 (RFC 8446), client side only. It refuses TLS 1.2 and older with a clear error; it never downgrades.
  • Cipher suites TLS_CHACHA20_POLY1305_SHA256 and TLS_AES_128_GCM_SHA256; key exchange X25519.
  • Server authentication: the certificate chain is built and checked against a trust store you give it as a PEM file (for example /etc/ssl/certs/ca-certificates.crt): validity dates, host name (subjectAltName only), basicConstraints and path length, keyUsage, extKeyUsage, unknown critical extensions, and the signatures (RSA PKCS#1 v1.5 and RSA-PSS for certificates, RSA-PSS and ECDSA P-256/P-384 for the server's CertificateVerify).
  • SNI, optional ALPN, Finished verification, alerts, KeyUpdate in both directions, close_notify. A stream that ends without close_notify is reported as truncated, never as the end of the data.
  • An empty client Certificate when the server asks for one (no client certificates).

How to build and check it

You need only this repository and the compiler named in PIN, the one place the pin is written: the omega-mv commit on its first line and the sha256 of that commit's seed/out/omc on its second. Copy that seed/out/omc to ./omc (for example git --git-dir OMEGA-MV.git cat-file blob COMMIT:seed/out/omc > omc). The gate refuses any other compiler. The host is Linux on AArch64.

mkdir -p build && ./omc < tools/boot.om > build/boot && chmod 755 build/boot
build/boot gate && build/gate          # checks the compiler pin, builds everything, runs every test
build/boot omtls                       # the command: build/omtls HOST PORT [ROOTS [ALPN [CONNECT-ADDRESS]]]

build/boot UNIT joins the files listed in units/UNIT.list into one unit and compiles it. The library for other programs is units/lib.list.

What it has been checked against

The gate (tests/GATE, run by build/gate) runs all of these. Where every vector file came from and its sha256 is in tests/vectors/PROVENANCE.md.

  • Known-answer tests for every primitive: SHA-256/384/512 (NIST CAVP), HMAC (RFC 4231), HKDF (RFC 5869 and Wycheproof), ChaCha20, Poly1305 and ChaCha20-Poly1305 (RFC 8439 and Wycheproof), AES-128/256 and GCM (FIPS 197, NIST GCM vectors and Wycheproof), X25519 (RFC 7748 including the 1000-iteration vector, and Wycheproof, including the low-order points), RSA PKCS#1 v1.5 and RSA-PSS verification and ECDSA P-256 and P-384 verification (Wycheproof and NIST CAVP), plus hand-written edge cases.
  • RFC 8448 section 3 ("Simple 1-RTT Handshake") replayed byte for byte: given the trace's ClientHello and key, the client produces the trace's records exactly and derives the trace's traffic secrets.
  • A hostile test server (written in Omega, tests/srv/tlssrv.om) on a private port, 27 cases: bad Finished, bad CertificateVerify, wrong certificate name, expired certificate, untrusted root, truncated and oversized records during and after the handshake, a TLS 1.2 ServerHello with the downgrade sentinel, a TLS 1.3 ServerHello carrying the sentinel, a HelloRetryRequest, a low-order key share, an unsolicited extension, plaintext after the keys changed, an alert flood, a renegotiation attempt, a bad record MAC, a wrong session id echo, a PKCS#1 CertificateVerify, a certificate entry of 1,000,001 bytes, a stream that ends without close_notify, and the good paths (both suites, ALPN, KeyUpdate both ways, a flight split into 7-byte records). Each gives its defined error, no crash, and the client sends no application data after a refusal.
  • Mutants: each check that matters has a deliberately broken copy (skip Finished verification, skip name matching, accept expired certificates, a branching compare in the constant-time code, and more); the gate requires every one of them to fail its test.
  • OpenSSL s_server as a verification oracle only (never linked): both suites, an RSA and an ECDSA certificate chain, and the refusals of a TLS 1.2-only and a P-256-only server.
  • Real servers: handshakes to interplane.io (HTTPS) and to mail providers' IMAP ports (handshake and greeting only, no login).

Constant time

The code that touches secrets is split into a core (src/ct/) and the code around it. The core takes only fixed-size arrays, every loop in it is unrolled by the compiler and every array index is a constant. The gate compiles the core and reads the machine code the compiler wrote (ctscan in tools/gate.om): it refuses any conditional branch, any division instruction, any load or store whose address comes from a register offset (an index that could depend on a secret) and any indirect branch (the trap path). So the claim "no secret-dependent branch or memory address in the primitives" is checked on the compiler's output, not only on the source. Tag and Finished comparisons are fixed-length and go through that core. The code around the core (loops over message lengths, record handling) branches only on public values: lengths, counters and protocol fields. That part is checked by reading, not by the scan. One known exception: removing the zero padding of a received record (ot_tl_dec) scans back to the last non-zero byte, so its time depends on the padding length the server chose (RFC 8446 5.4 accepts this; omtls never pads). On AArch64 the program also sets the DIT bit (data-independent timing) before the handshake.

Limits

WhatLimitWhy
Record2^14 plaintext, 2^14 + 256 protectedRFC 8446 wire limits
Handshake message2^24 - 1 bytesthe 24-bit length field
One certificate entry1 MiB (refused above: error 24)handed to the X.509 code as a local array: the compiler gives no run-time allocation and globals cannot be passed
RSA modulus16384 bitsbignum limbs are stack arrays, same reason
Trust store plus presented chain16 MiB less 64 KiBthe X.509 store; a larger store is refused, never truncated
Certificate path search1,000,000 candidate examinationsstops a hostile server's cross-certificate maze (containment of untrusted input)
Every network operation30 s, one deadline per handshake / read / writeliveness against a stuck peer; settable with ot_tl_deadline

Keys and secrets

  • Randomness comes from Linux getrandom (the random word). If the system gives none, the handshake stops with error 19; nothing falls back to a weaker source.
  • The handshake secrets live in one local array and are overwritten before the handshake returns; the traffic keys are overwritten when the connection closes or fails; after the handshake and after every record operation the dead stack below the caller is zeroed with the Omega scrub word.
  • Where the language does not let us: Omega has no way to pin memory or keep it out of a core dump or swap, and copies the compiler makes in registers are only cleared by scrub as far as it reaches.

What it is not

  • Not audited. No cryptographer has reviewed it. An audit should look first at: the constant-time claim for the code around the core (src/aead.om, src/gcm.om, src/x25519.om drivers and src/tls.om), the AES S-box and GHASH implementations (src/ct/aes.om), the X25519 field arithmetic bounds (src/ct/x25.om), the RSA and ECDSA verification code (src/rsa.om, src/ec.om, src/bn.om), the certificate path builder and name matching (src/x509.om), and the handshake state machine (src/tls.om): which message may follow which, and every length check.
  • Not a server; no session resumption, no 0-RTT, no PSK, no client certificates, no HelloRetryRequest.
  • Only the two suites and X25519 above. TLS_AES_256_GCM_SHA384 and the P-256/P-384 key shares are not offered. Of the providers checked on 2026-11-11 only Microsoft's (outlook.office365.com) needs them: it does not offer X25519 at all; and Microsoft mail also needs OAuth2, which is not in this slice.
  • No OAuth2 (XOAUTH2): Microsoft (Outlook.com, Hotmail, Microsoft 365) cannot be used; Gmail, Yahoo and iCloud work only with an app password, which those providers allow only with two-step verification on the account.
  • No OCSP, CRLs or certificate transparency checks; name constraints only for DNS names.
  • IPv4 only; the DNS lookup is a plain UDP query to the system's resolver (TLS checks the name, DNS does not).
  • AES-GCM is slow (about 7 MB/s, a bitsliced constant-time AES); servers that prefer ChaCha20-Poly1305 run at about 170 MB/s.
  • Not tested on any CPU but the Spark's GB10 (AArch64).
  • tests/fixtures/ holds private keys made for the tests; they protect nothing.

Licence

Apache-2.0, see LICENSE. vendor/omega-mcp/sha256-om2.om is the SHA-256 unit from omega-mv, copied unchanged from omega-mcp (see NOTICE).

For developers: proof and records

The full record of this project. Words that are used only here are explained once:

ID
The project's permanent id on Interplane: the SHA-256 of its first signed record. This one is git:f39298afaeb203746a632535635611288382e6e4ecc591e99bc2838eb231293b. Its old id, kept only so that old links still work: z3JZh1ERNq7y6v2V5yoArKFP3ELVJ.
Owner
The key that signs every record of the project. This forge lists the project under drakestapleton; its key is SHA256:qg3vxoE9ul3Cgk5heosQvPmO9pqIJNsdcsGJ2cHghTs.
Refs and HEAD
Refs are the names that point at versions: branches and tags. HEAD is the version a fresh copy starts from, the newest commit of the default branch.
Patch
A proposed change, reviewed before it is merged. This forge does not show proposed changes from its own store yet. The list is under Proposed changes.
Receipt
A public record that someone checked a claim, with the fingerprint of its evidence file. The state at the top of this page is read from the list at interplane.io/receipts. This project has no receipt in that list yet.

Clones and fetches over HTTPS: 0 by visitors (git smart-HTTP info/refs requests answered 200 in the front-door download log; our own addresses and bots left out; since 2026-11-08) · not measured git-upload-pack requests from all clients (the source of this count is retired)

Downloads: 0 by visitors (0 source archives, 0 release assets; forged access log; our own addresses left out; since 2026-11-07)

commit 95315da508def0e6cca056d8acc1e05dba6c4952 Branches Tags History
95315da pin: omega-mv 2ee0a70d / omc 26540e6d (pin-follow) Drake Stapleton committed 2026-11-13
proofs/
src/
tests/
tools/
units/
vendor/
.gitignore11
DEPENDENCIES.md1239
LICENSE11358
NOTICE652
PIN126
README.md9403
REPIN697

Every record: History (commits) · Branches · Tags · Releases, with the SHA-256 of each download · Patches · Issues · This project as JSON