CodeQL / Clear-text logging of sensitive information
This expression logs sensitive data (secret) as clear text. This expression logs sensitive data (secret) as clear text.
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
This expression logs sensitive data (secret) as clear text. This expression logs sensitive data (secret) as clear text.
This expression logs sensitive data (secret) as clear text.
curl -fsSL https://interplane.io/drakestapleton/omega-mv/patches/94976ff08d4f5841.bundle -o 94976ff08d4f5841.bundle git fetch 94976ff08d4f5841.bundle refs/pull/833/head
github-import 1
aien-dev/omega-mv
833
140f5b67f4fdd79f572e73cf918608c4280ad1a9
{"kind":"github-import","owner":"aien-dev","repo":"omega-mv","number":833,"url":"https://github.com/aien-dev/omega-mv/pull/833","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:38:44Z","metadata":"unavailable","state_derived":true}
diff --git a/.crumb b/.crumb index f3e51fe46..fd6b4de14 100644 --- a/.crumb +++ b/.crumb @@ -72,38 +72,38 @@ }, { "digest": "f765ad87fdddd9b47f690b07298c951a0f7e7675dc5de4ffe44e33a0c14b1986", - "last_commit": "a8a6a3d3c", + "last_commit": "62d1d0d66", "name": "spec", "purpose": "Directory spec. Purpose not yet described by a human." }, { "digest": "aaf5acb82fd4c720cd60c85fd6087f636c72a98e2f3740c9295dcfa525dc64d7", - "last_commit": "bf54b19fa", + "last_commit": "089e5b053", "name": "src", "purpose": "Directory src. Purpose not yet described by a human." }, { "digest": "5395ff8ff9afceebe8e453788f80a3064b831513cc4cb92fd55869115e06b874", - "last_commit": "a8a6a3d3c", + "last_commit": "62d1d0d66", "name": "tests", "purpose": "Directory tests. Purpose not yet described by a human." }, { "digest": "308db0e6cf45c0a48f01f5f5f228450f191389de68006915b9ecf9c65b9a2e29", - "last_commit": "a8a6a3d3c", + "last_commit": "62d1d0d66", "name": "tools", "purpose": "Directory tools. Purpose not yet described by a human." } ], "children_root": "sha256:07bf1706dcffbad66c0353871ff67a6749055da03cee8d8ebdf9a4c91e36bddc", - "compiled_at": "2026-10-30T12:31:50Z", + "compiled_at": "2026-10-30T16:55:04Z", "compiler": "crumb-compile/1", - "digest": "sha256:904fca8c0e0cf3e3a5e5adb73393e01c7018b920bb542d289904240f70e400d6", - "evidence_files": 12622, - "evidence_root": "sha256:b1a08e2ce56e6feada0d8a31f06fbd7adee57adc1c1ad8dec220293ee5d439f9", - "files": 17849, - "generated_at_commit": "52a82f392fa513ebbc2d9d719a0f14c385289b06", - "source_tree": "sha256:75458da6553a0ee5ea2af95f46afb658e8a3f6e53cca6e3b4b9874035f78c2ed" + "digest": "sha256:b627c37af2d418b801726bf765f9c7e23e524f4b37cccf2ed7db215d41292395", + "evidence_files": 12656, + "evidence_root": "sha256:bd79e810bc611ab613b60be67f849ec2c282dbb851493508b6ca3798bb338183", + "files": 17893, + "generated_at_commit": "08627238b84664212d8d5345803835f934e882e2", + "source_tree": "sha256:ee3d58573851f3a78e1d91fcb68332490f7b28f98e8d7012c4eb0dc70d4c833b" }, "owner_lane": "", "provenance": { diff --git a/.github/workflows/om-tls-arm64.yml b/.github/workflows/om-tls-arm64.yml new file mode 100644 index 000000000..6b2c1b9be --- /dev/null +++ b/.github/workflows/om-tls-arm64.yml @@ -0,0 +1,45 @@ +# om-tls-arm64: independent ARM64 rerun of the om/tls suite (RFC 8448 vectors, DNS unit, DIT probe, +# interop against openssl s_server and the Python fake server, secret-residue scan, 26 mutants) and +# of the seed/net HTTP/HTTPS check on a GitHub-hosted ubuntu-24.04-arm machine, with the pinned omc +# (om/units.sh OMC_PIN). Network stages stay NOT_RUN (TLS_NET unset). Logs are uploaded as artifacts. +# Advisory, like AIEN Checks: GitHub gates no merge (Alpha does). +name: om-tls-arm64 +on: + pull_request: + paths: ["om/tls/**", "seed/net/**", "seed/json/**", "seed/out/omc", "om/units.sh", ".github/workflows/om-tls-arm64.yml"] + push: + branches: [main] +permissions: + contents: read +jobs: + om-tls: + runs-on: ubuntu-24.04-arm + timeout-minutes: 45 + steps: + - uses: actions/checkout@v4 + - name: machine and tools + run: | + uname -a; nproc; openssl version; python3 --version + python3 -c 'import cryptography' 2>/dev/null || sudo apt-get install -y -q python3-cryptography + python3 -c 'import cryptography; print("cryptography", cryptography.__version__)' + - name: omc pin + run: | + pin=$(sed -n 's/^OMC_PIN=//p' om/units.sh | tr -d '"') + got=$(sha256sum seed/out/omc | cut -c1-64) + echo "pin $pin"; echo "got $got" + [ "$pin" = "$got" ] || { echo "seed/out/omc does not match OMC_PIN"; exit 1; } + chmod +x seed/out/omc + - name: om/tls suite + run: mkdir -p build && sh om/tls/test/tls/run.sh "$PWD/seed/out/omc" 2>&1 | tee build/om-tls-run.log; test "${PIPESTATUS[0]}" = 0 + - name: seed/net HTTP and HTTPS check + run: python3 seed/net/tests/check.py --keep build/netcheck 2>&1 | tee build/net-check.log; test "${PIPESTATUS[0]}" = 0 + - name: logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: om-tls-arm64-logs + path: | + build/om-tls-run.log + build/net-check.log + build/tls/tls/*.log + build/tls/tls/interop-table.txt diff --git a/evidence/om-tls-review-2026-10-26/PORTING.md b/evidence/om-tls-review-2026-10-26/PORTING.md new file mode 100644 index 000000000..b5b116154 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/PORTING.md @@ -0,0 +1,57 @@ +# Porting note: catalog.py, omega_projects_pusher.py and allen_relay_mailer.py onto om/tls + +Source: aien-dev/omega-mv PR #813, MERGED as 705c0f010e782408c270f66d67462bb46170e5b5 (2026-10-26). +Pin that merge commit. omc on main is 189ada82…3b54 (suites re-run on it). + +## Build + +- Run `sh om/tls/build.sh OMC your.om OUT`. It composes `om2`, then the nine TLS units, then your + program. +- The units take 329 of omc's 512 functions per unit, which leaves about 180 for your code and + OmegaNet's http/json. +- Local arrays: `c` needs `new uchar 119296` (TLCSZ) and the trust store `new uchar 262144` + (TLSTSZ), together about 372 KiB of the 4 MiB local-array limit. Allocate both in `main`. + Globals cannot be passed (error 19). + +## Calls + +``` +e = tls_store st +e = tls_init c host 1 (1 offers ALPN http/1.1; use 0 for SMTP) +fd = tls_dial host 443 (465 for mail.gandi.net) +tls_deadline c add monons 30000000000 +e = tls_connect c st int fd (0, or a TLS_ERR_* code; tls_errname and tls_detail say why) +n = tls_write c req +n = tls_read c buf (repeat: >0 bytes, 0 = close_notify, <0 = -code) +tls_close c +x = fclose int fd +``` + +## Behaviour to rely on + +- Every failure fails closed. There is no insecure option to look for. +- `TLS_ERR_EOF` (-4 from `tls_read`) means the TCP connection ended without close_notify. Treat it + as truncation, not success. + +## SMTP + +- Port 465 (implicit TLS): the server's banner comes first, then EHLO, AUTH and the rest. +- Port 587 (STARTTLS): do the plaintext exchange on the fd first (banner, EHLO, STARTTLS, 220), + then `tls_connect`. After the handshake the client speaks first. +- `om/tls/test/tls/client.om` modes `smtp` and `tsmtp` show both. They match Python ssl + byte for byte against mail.gandi.net. + +## HTTP + +- The HTTP framing comes from OmegaNet's http.om; it calls `tls_read` and `tls_write` with + `c = part io HTB HTL`. +- `client.om` mode `get` is a working minimal GET that uses `Connection: close`. It matched Python + ssl on bodies of up to 680548 bytes. + +## Limits + +- IPv4 only, with DNS over UDP from `/etc/resolv.conf`. +- No revocation checking. +- No HelloRetryRequest, so servers that refuse x25519 are refused. All three target hosts accept + x25519. +- See `om/tls/README.md`. diff --git a/evidence/om-tls-review-2026-10-26/README.md b/evidence/om-tls-review-2026-10-26/README.md new file mode 100644 index 000000000..9a57419af --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/README.md @@ -0,0 +1,15 @@ +# om/tls security review bundle, 2026-10-26 (imported from /home/drakestapleton/handoffs/omega-tls) + +Prior-lane review reports and raw logs for om/tls at omega-mv main 705c0f01 (omc pin 189ada82), +retained here so an outside auditor can read what the inside review found and reproduce the runs. + +- `security-review.md`, `security-rereview.md`: the two inside review passes and their fix status +- `tls-contract.md`, `PORTING.md`: the port contract and porting notes +- `handoff-evidence/`: raw unit logs (sha2, x25519, chacha, aesgcm, ec, rsa, x509), the interop table, + `tls-run-20261026T1706Z.log` (full suite), `main-pin-189ada82/` and `review-fix/` logs +- `SHA256SUMS`: `sha256sum` of every file above, taken when they were copied (verify with + `sha256sum -c SHA256SUMS` from this directory) + +Evidence level: the logs are MEASURED on the DGX Spark host (arm64, GB10); nothing here is a +hardware or third-party qualification. The outside-review fixes that followed are in the +`audit/tls-outside-review` branch (om/tls/THREAT_MODEL.md, om/tls/AUDIT_SCOPE.md). diff --git a/evidence/om-tls-review-2026-10-26/SHA256SUMS b/evidence/om-tls-review-2026-10-26/SHA256SUMS new file mode 100644 index 000000000..acaef6fea --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/SHA256SUMS @@ -0,0 +1,33 @@ +7aabf89a7979adec1ee810774b8857c9c31aa93dee6d9f6a82d48145d390ea26 ./handoff-evidence/aesgcm.log +e4395706c6508603a87e4a80baa47fc92274b3eade562a77c9ba621b691cb4fa ./handoff-evidence/chacha.log +dfee35d66bfb4b38b6f60d176de854e40d178666c361cb80ea96c92a3924333c ./handoff-evidence/ec.log +e4b6c328ca37acd37d09de2a433fd6984bb16991dbb6a7fbbe1d8880812e7f44 ./handoff-evidence/interop-table.txt +8affc77c543cc124d2c5c507b075dacc46a8844767ad45af6c171f251a048b73 ./handoff-evidence/main-pin-189ada82/aesgcm.log +bb7cc82b5963eedc99153fddb0f7922c3a2c0f7717e4dc11f1eec6e605e757cf ./handoff-evidence/main-pin-189ada82/chacha.log +20db29226c9d0a9d9193cb37a88e96d1bdbe53e6bca8694dc6a90b5e7e050130 ./handoff-evidence/main-pin-189ada82/ec.log +5c7afc1d84f622fe6ec1c129e4b41502e052b748cfada876f02aa04716171ec1 ./handoff-evidence/main-pin-189ada82/interop-table.txt +d191307cf551f0992ef694dd0fab22fd6c5a925ccbf3fb2092a46d20cb1506f0 ./handoff-evidence/main-pin-189ada82/omc.sha256 +86ee51fd497f39ffe64208b0cba9ba603b77d632ab2f1ceea358c1c1de568b0a ./handoff-evidence/main-pin-189ada82/rsa.log +e6e2370c7772dd2eeec12fda6a43da78e431a926848733de5cdeb73a7aa0446e ./handoff-evidence/main-pin-189ada82/sha2.log +ba8ae60e9146a49cf9c184e374a3b1c055ac30d891f2261c641f8123ec421eca ./handoff-evidence/main-pin-189ada82/tls.log +8355d3a4c8eff4f0e0145c97222cf720a24e3e6136cad13c8e7c1bbfd194cebf ./handoff-evidence/main-pin-189ada82/x25519.log +f08b6f2ea5de9e055da7bc9f2f2954182014cea0d3f014da35cad2339270dfce ./handoff-evidence/main-pin-189ada82/x509.log +3f7d7eba1ec3d266752035362d90aa96a8bf94cba2cac89d3f67ce81165c535c ./handoff-evidence/review-fix/aesgcm.log +85ab5e7f1359bb22aba0688ce8d8f0dd2b86cc3de4e4017108e0a80a22ebf36e ./handoff-evidence/review-fix/chacha.log +d01f8c9676fa414a8ea540eafe437b0749c6120d2152e8b900d234b4bd8ba099 ./handoff-evidence/review-fix/ec.log +068cd4f72207bcadc64de7cd90abc42e1b972871b25c824a3cdb6f8380e91373 ./handoff-evidence/review-fix/interop-table.txt +a2c1408f0302775250fde3f20ab42463013e07625ce21ec257ba251b7f6380f2 ./handoff-evidence/review-fix/rsa.log +a884c6abceaa13b379e099fa7bed993bff2f4d79751463169bca52676df34b87 ./handoff-evidence/review-fix/sha2.log +3779dc3496493a0e3943ae75f27e4e4b88532b9daddb40f93a2dd0596a2dc370 ./handoff-evidence/review-fix/tls.log +0742aaad42e40a48477429d0802e55b7bd82c3fd6e1bed8e840cd89fa8af1e6e ./handoff-evidence/review-fix/x25519.log +61a31648cd314650e280f5717f33f2a4600fdd1af59f447d1e06d07061160499 ./handoff-evidence/review-fix/x509.log +fee090a8a808842293352200ac79ca65ec43504688a87fb11a159001977655fa ./handoff-evidence/rsa.log +a884c6abceaa13b379e099fa7bed993bff2f4d79751463169bca52676df34b87 ./handoff-evidence/sha2.log +eb96dd04282fca4a2bec465639f094d89482628e4ac28515b64bd3111a1f6f37 ./handoff-evidence/tls-run-20261026T1706Z.log +8b1a87f15ba77ac7cb5636665dbf2c399a52ea9b3848a804f0bc433d90747484 ./handoff-evidence/x25519.log +affde751ccde591e1404fdb6d5f60bde50af8555aa64e93777f8e1f07336aecf ./handoff-evidence/x509.log +9e594695dd95b2861599d7170081c43beebb9c631153f2fc684203baeae2af6c ./PORTING.md +148bc626ad0ddaadcd982c659189408661e2ba579aa7e4a6bd553a24986f8cd7 ./security-rereview.md +4c88a99fce50837c60f622714d066aaea89fe6a8b723b10b9c9b5f07817f4236 ./security-review.md +db01ad9395e3c7183b735feed14b59e9f230c8fe549cc41986ad499016b68b9b ./tls-contract.md +57090d10d30eafd7177c3f0aa8f9accfaaacccaab56b18ed68e3c09c4901a2f2 README.md diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/aesgcm.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/aesgcm.log new file mode 100644 index 000000000..350dc14e7 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/aesgcm.log @@ -0,0 +1,28 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +library sha256 b19d8ce88fc65eb0e69e51f52f3af70b9c46c4bfbbc84004d43e536bf4ced17f +library functions 37 +PASS fips197: aesgcm driver: 4 checks, 0 failed +PASS wycheproof: aesgcm driver: 316 checks, 0 failed +PASS gcmEncryptExtIV128: aesgcm driver: 7875 checks, 0 failed +PASS gcmEncryptExtIV192: aesgcm driver: 7875 checks, 0 failed +PASS gcmEncryptExtIV256: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt128: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt192: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt256: aesgcm driver: 7875 checks, 0 failed +nist: 47250 vectors (11908 decrypt vectors expect FAIL) +PASS params: aesgcm driver: 19 checks, 0 failed +PASS speed: aesgcm driver: 3 checks, 0 failed +aesgcm speed bytes=1048576 seal_ns=38564056 open_ns=29788786 seal_MBps=27 open_MBps=35 +aesgcm speed bytes=1048576 seal_ns=20868955 open_ns=20884652 seal_MBps=50 open_MBps=50 +aesgcm speed bytes=1048576 seal_ns=21268959 open_ns=21078718 seal_MBps=49 open_MBps=49 +PASS mutant-sbox: detected, exit 1, 233 MISMATCH (aesgcm driver: 320 checks, 233 failed) +PASS mutant-ghash: detected, exit 1, 226 MISMATCH (aesgcm driver: 320 checks, 226 failed) +PASS mutant-rcon: detected, exit 1, 81 MISMATCH (aesgcm driver: 320 checks, 81 failed) +PASS mutant-tagcheck: detected, exit 1, 310 MISMATCH (aesgcm driver: 320 checks, 310 failed) +PASS mutant-expect: detected, exit 1, 1 MISMATCH (aesgcm driver: 316 checks, 1 failed) +NOT_RUN wycheproof aes_gcm_siv_test.json: AES-GCM-SIV (RFC 8452) is not implemented +NOT_RUN wycheproof aria_gcm_test.json, seed_gcm_test.json, sm4_gcm_test.json: other block ciphers +NOT_RUN wycheproof c2sp_chunked_encryption_aes_{128,256}_gcm_test.json: chunked-encryption construction, not raw AES-GCM +wycheproof: 316 tests: valid 229 passed, invalid 87 refused, acceptable 0 +checks outside the vectors: params=19 speed=3 (both passed) +AESGCM PASS vectors=47570 (fips197=4, nist=47250, wycheproof=316) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/chacha.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/chacha.log new file mode 100644 index 000000000..a2d4d2845 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/chacha.log @@ -0,0 +1,20 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +library sha256 8431257bc8e83474983c572cfdfa7f8f4b62a1b867748868e88fbc9c1b37d3af +driver sha256 1130187a2edc36c4b12fbafbe7295a61cbb184fe62891427fdcc0728737dba00 +PASS rfc8439: chacha driver: 36 checks, 0 failed +PASS wycheproof-regenerate: committed conversions equal a fresh conversion at d17cc89fa5c8f4f4d378b5385ebf75da5d0926c9 +PASS wycheproof-chacha20-poly1305: chacha driver: 325 checks, 0 failed +PASS wycheproof-chacha20-counter: chacha driver: 14 checks, 0 failed +NOTE wycheproof chacha20_poly1305_test.json: expected codes 0:256 1:60 2:9; NOT_RUN 0 (0 valid sealed+opened, 1 invalid tag refused, 2 invalid nonce size refused; no acceptable) +NOTE wycheproof chacha20_counter_test.json: expected codes 0:11 2:3; NOT_RUN 28 (NOT_RUN = XChaCha20 groups, not implemented) +PASS cryptography-diff(seed 1): chacha driver: 2709 checks, 0 failed +PASS tamper-refused: chacha driver: 3 checks, 0 failed +PASS tamper-claimed-valid: 3 of 3 tampered records rejected +PASS mutant-expectation: detected, exit 1, 1 MISMATCH (chacha driver: 36 checks, 1 failed) +PASS mutant-qr-rotation: detected, exit 1, 278 MISMATCH (chacha driver: 361 checks, 278 failed) +PASS mutant-poly-clamp: detected, exit 1, 133 MISMATCH (chacha driver: 361 checks, 133 failed) +PASS mutant-poly-fold: detected, exit 1, 267 MISMATCH (chacha driver: 361 checks, 267 failed) +PASS mutant-poly-final: detected, exit 1, 272 MISMATCH (chacha driver: 361 checks, 272 failed) +PASS bench-1MiB: 16 open+reseal rounds restored the plaintext; sealed sha256 314d4f2a5908e50854a934af2df4cee3f86baa891a64a68a384a58432b1e260b equals cryptography +THROUGHPUT bench-1MiB: 33 MiB through seal/open in 170604512 ns = 202.8 MB/s (whole process, incl. start-up and pattern checks) +CHACHA PASS vectors=3087 (wycheproof=339) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/ec.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/ec.log new file mode 100644 index 000000000..9c632a601 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/ec.log @@ -0,0 +1,92 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +ec.om 909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060 functions 27 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +driver e0424968291256158695a6c339806ba158c475144ce13662e8ce8717607b7e66 +PASS cavp_sigver: cases 180 verifies 180 controls 108 mismatches 0 ns 493265566 codes 36 144 0 0 0 0 +PASS edge: cases 56 verifies 56 controls 12 mismatches 0 ns 26344787 codes 4 0 16 20 12 4 +PASS wycheproof_secp256r1_sha256: cases 484 verifies 484 controls 522 mismatches 0 ns 302705888 codes 174 23 221 0 66 0 +PASS wycheproof_secp256r1_sha256_p1363: cases 262 verifies 262 controls 519 mismatches 0 ns 276694216 codes 173 18 21 0 50 0 +PASS wycheproof_secp256r1_sha512: cases 554 verifies 554 controls 729 mismatches 0 ns 406244962 codes 243 25 220 0 66 0 +PASS wycheproof_secp256r1_sha512_p1363: cases 332 verifies 332 controls 726 mismatches 0 ns 356895845 codes 242 19 21 0 50 0 +PASS wycheproof_secp384r1_sha256: cases 472 verifies 472 controls 486 mismatches 0 ns 786480837 codes 162 24 220 0 66 0 +PASS wycheproof_secp384r1_sha384: cases 504 verifies 504 controls 582 mismatches 0 ns 925188254 codes 194 23 221 0 66 0 +PASS wycheproof_secp384r1_sha384_p1363: cases 280 verifies 280 controls 579 mismatches 0 ns 868910628 codes 193 18 19 0 50 0 +PASS wycheproof_secp384r1_sha512: cases 542 verifies 542 controls 693 mismatches 0 ns 1059887025 codes 231 23 221 0 67 0 +PASS wycheproof_secp384r1_sha512_p1363: cases 318 verifies 318 controls 690 mismatches 0 ns 1013540826 codes 230 19 19 0 50 0 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha3_224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha384_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha3_384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha384_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha3_384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r2_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r2_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_shake128_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_shake128_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_bitcoin_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake128_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake128_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256r1_sha3_256_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_sha3_512_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_shake128_p1363_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_shake128_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_sha3_384_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_sha3_512_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_shake256_p1363_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_shake256_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp521r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_shake256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_shake256_test.json: curve not P-256/P-384 +NOT_RUN cavp SigVer.rsp P-256/P-384 with SHA-1, SHA-224: hash not in om/tls/sha2.om +NOT_RUN cavp SigVer.rsp P-192, P-224, P-521, K-*, B-* sections: curve not P-256/P-384 +NOT_RUN cavp SigVer_TruncatedSHAs.rsp (SHA-512/224, SHA-512/256): hash not in om/tls/sha2.om +PASS mutant-expectation detected: 1 mismatches, cases 484 verifies 484 controls 519 mismatches 1 ns 290819864 codes 174 23 221 0 66 0 +PASS mutant-b256 detected: 696 mismatches, cases 484 verifies 484 controls 522 mismatches 696 ns 10891612 codes 0 0 0 484 0 0 +PASS mutant-padd detected: 194 mismatches, cases 504 verifies 504 controls 582 mismatches 194 ns 901496660 codes 0 217 221 0 66 0 +PASS mutant-n0 detected: 36 mismatches, cases 180 verifies 180 controls 108 mismatches 36 ns 493530663 codes 0 180 0 0 0 0 +PASS mutant-der detected: 2 mismatches, cases 56 verifies 56 controls 12 mismatches 2 ns 17187590 codes 6 0 14 20 12 4 +PASS mutant-digest-column detected: 1 mismatches, cases 504 verifies 504 controls 582 mismatches 1 ns 880274870 codes 194 23 221 0 66 0 +PASS fuzz: cases 3000 verifies 3000 controls 0 mismatches 0 ns 1543832248 codes 0 533 1290 1172 5 0 +TIME secp256r1_sha256: 200 verifies, 309657397 ns total, 1548286 ns per verify +TIME secp384r1_sha384: 200 verifies, 762225788 ns total, 3811128 ns per verify +EC PASS vectors=3984 (wycheproof=3748 cavp=180 edge=56) mutants=6/6 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/interop-table.txt b/evidence/om-tls-review-2026-10-26/handoff-evidence/interop-table.txt new file mode 100644 index 000000000..c9d9c5d3b --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/interop-table.txt @@ -0,0 +1,24 @@ +PASS | good EC chain, chacha | expect OK | got OK +PASS | good EC chain, aes128gcm | expect OK | got OK +PASS | good RSA leaf (rsa_pss) | expect OK | got OK +PASS | expired leaf | expect TLSERR TLS_ERR_CERTIFICATE detail 2 X509_ERR_EXPIRED | got TLSERR TLS_ERR_CERTIFICATE detail 2 X509_ERR_EXPIRED (exit 27) +PASS | not-yet-valid leaf | expect TLSERR TLS_ERR_CERTIFICATE detail 3 | got TLSERR TLS_ERR_CERTIFICATE detail 3 X509_ERR_NOT_YET_VALID (exit 27) +PASS | wrong name | expect TLSERR TLS_ERR_CERTIFICATE detail 4 | got TLSERR TLS_ERR_CERTIFICATE detail 4 X509_ERR_NAME_MISMATCH (exit 27) +PASS | self-signed leaf (CA:TRUE) | expect TLSERR TLS_ERR_CERTIFICATE detail 15 | got TLSERR TLS_ERR_CERTIFICATE detail 15 X509_ERR_LEAF_IS_CA (exit 27) +PASS | self-signed leaf (CA:FALSE) | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | bad cert signature | expect TLSERR TLS_ERR_CERTIFICATE detail 6 | got TLSERR TLS_ERR_CERTIFICATE detail 6 X509_ERR_BAD_SIGNATURE (exit 27) +PASS | unknown issuer | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | missing intermediate | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | TLS 1.2 only server | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 70 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 70 (exit 31) +PASS | AES-256 suite only | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 40 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 40 (exit 31) +PASS | P-256 group only | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 40 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 40 (exit 31) +PASS | fake ServerHello: tls12 | expect TLSERR TLS_ERR_PROTOCOL_VERSION | got TLSERR TLS_ERR_PROTOCOL_VERSION detail 0 (exit 19) +PASS | fake ServerHello: hrr | expect TLSERR TLS_ERR_HELLO_RETRY_UNSUPPORTED | got TLSERR TLS_ERR_HELLO_RETRY_UNSUPPORTED detail 0 (exit 23) +PASS | fake ServerHello: suite | expect TLSERR TLS_ERR_CIPHER_SUITE | got TLSERR TLS_ERR_CIPHER_SUITE detail 0 (exit 20) +PASS | fake ServerHello: sid | expect TLSERR TLS_ERR_SESSION_ID_ECHO | got TLSERR TLS_ERR_SESSION_ID_ECHO detail 0 (exit 24) +PASS | fake ServerHello: group | expect TLSERR TLS_ERR_KEY_SHARE | got TLSERR TLS_ERR_KEY_SHARE detail 0 (exit 21) +PASS | fake ServerHello: zero | expect TLSERR TLS_ERR_ZERO_SHARED_SECRET | got TLSERR TLS_ERR_ZERO_SHARED_SECRET detail 0 (exit 25) +PASS | fake ServerHello: dupext | expect TLSERR TLS_ERR_EXTENSION | got TLSERR TLS_ERR_EXTENSION detail 0 (exit 22) +PASS | fake ServerHello: trail | expect TLSERR TLS_ERR_DECODE | got TLSERR TLS_ERR_DECODE detail 0 (exit 18) +PASS | tampered record (proxy) | expect TLSERR TLS_ERR_BAD_RECORD_MAC | got TLSERR TLS_ERR_BAD_RECORD_MAC detail 0 (exit 16) +INTEROP PASS rows=23 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/aesgcm.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/aesgcm.log new file mode 100644 index 000000000..76a86ea7d --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/aesgcm.log @@ -0,0 +1,28 @@ +omc sha256 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +library sha256 b19d8ce88fc65eb0e69e51f52f3af70b9c46c4bfbbc84004d43e536bf4ced17f +library functions 37 +PASS fips197: aesgcm driver: 4 checks, 0 failed +PASS wycheproof: aesgcm driver: 316 checks, 0 failed +PASS gcmEncryptExtIV128: aesgcm driver: 7875 checks, 0 failed +PASS gcmEncryptExtIV192: aesgcm driver: 7875 checks, 0 failed +PASS gcmEncryptExtIV256: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt128: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt192: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt256: aesgcm driver: 7875 checks, 0 failed +nist: 47250 vectors (11908 decrypt vectors expect FAIL) +PASS params: aesgcm driver: 19 checks, 0 failed +PASS speed: aesgcm driver: 3 checks, 0 failed +aesgcm speed bytes=1048576 seal_ns=38392438 open_ns=32630098 seal_MBps=27 open_MBps=32 +aesgcm speed bytes=1048576 seal_ns=19680191 open_ns=19661023 seal_MBps=53 open_MBps=53 +aesgcm speed bytes=1048576 seal_ns=19668047 open_ns=19672063 seal_MBps=53 open_MBps=53 +PASS mutant-sbox: detected, exit 1, 233 MISMATCH (aesgcm driver: 320 checks, 233 failed) +PASS mutant-ghash: detected, exit 1, 226 MISMATCH (aesgcm driver: 320 checks, 226 failed) +PASS mutant-rcon: detected, exit 1, 81 MISMATCH (aesgcm driver: 320 checks, 81 failed) +PASS mutant-tagcheck: detected, exit 1, 310 MISMATCH (aesgcm driver: 320 checks, 310 failed) +PASS mutant-expect: detected, exit 1, 1 MISMATCH (aesgcm driver: 316 checks, 1 failed) +NOT_RUN wycheproof aes_gcm_siv_test.json: AES-GCM-SIV (RFC 8452) is not implemented +NOT_RUN wycheproof aria_gcm_test.json, seed_gcm_test.json, sm4_gcm_test.json: other block ciphers +NOT_RUN wycheproof c2sp_chunked_encryption_aes_{128,256}_gcm_test.json: chunked-encryption construction, not raw AES-GCM +wycheproof: 316 tests: valid 229 passed, invalid 87 refused, acceptable 0 +checks outside the vectors: params=19 speed=3 (both passed) +AESGCM PASS vectors=47570 (fips197=4, nist=47250, wycheproof=316) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/chacha.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/chacha.log new file mode 100644 index 000000000..c9e0f566d --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/chacha.log @@ -0,0 +1,20 @@ +omc sha256 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +library sha256 8431257bc8e83474983c572cfdfa7f8f4b62a1b867748868e88fbc9c1b37d3af +driver sha256 1130187a2edc36c4b12fbafbe7295a61cbb184fe62891427fdcc0728737dba00 +PASS rfc8439: chacha driver: 36 checks, 0 failed +PASS wycheproof-regenerate: committed conversions equal a fresh conversion at d17cc89fa5c8f4f4d378b5385ebf75da5d0926c9 +PASS wycheproof-chacha20-poly1305: chacha driver: 325 checks, 0 failed +PASS wycheproof-chacha20-counter: chacha driver: 14 checks, 0 failed +NOTE wycheproof chacha20_poly1305_test.json: expected codes 0:256 1:60 2:9; NOT_RUN 0 (0 valid sealed+opened, 1 invalid tag refused, 2 invalid nonce size refused; no acceptable) +NOTE wycheproof chacha20_counter_test.json: expected codes 0:11 2:3; NOT_RUN 28 (NOT_RUN = XChaCha20 groups, not implemented) +PASS cryptography-diff(seed 1): chacha driver: 2709 checks, 0 failed +PASS tamper-refused: chacha driver: 3 checks, 0 failed +PASS tamper-claimed-valid: 3 of 3 tampered records rejected +PASS mutant-expectation: detected, exit 1, 1 MISMATCH (chacha driver: 36 checks, 1 failed) +PASS mutant-qr-rotation: detected, exit 1, 278 MISMATCH (chacha driver: 361 checks, 278 failed) +PASS mutant-poly-clamp: detected, exit 1, 133 MISMATCH (chacha driver: 361 checks, 133 failed) +PASS mutant-poly-fold: detected, exit 1, 267 MISMATCH (chacha driver: 361 checks, 267 failed) +PASS mutant-poly-final: detected, exit 1, 272 MISMATCH (chacha driver: 361 checks, 272 failed) +PASS bench-1MiB: 16 open+reseal rounds restored the plaintext; sealed sha256 314d4f2a5908e50854a934af2df4cee3f86baa891a64a68a384a58432b1e260b equals cryptography +THROUGHPUT bench-1MiB: 33 MiB through seal/open in 166130870 ns = 208.3 MB/s (whole process, incl. start-up and pattern checks) +CHACHA PASS vectors=3087 (wycheproof=339) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/ec.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/ec.log new file mode 100644 index 000000000..40b4115dd --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/ec.log @@ -0,0 +1,92 @@ +omc 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +ec.om 909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060 functions 27 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +driver e0424968291256158695a6c339806ba158c475144ce13662e8ce8717607b7e66 +PASS cavp_sigver: cases 180 verifies 180 controls 108 mismatches 0 ns 472474895 codes 36 144 0 0 0 0 +PASS edge: cases 56 verifies 56 controls 12 mismatches 0 ns 11781302 codes 4 0 16 20 12 4 +PASS wycheproof_secp256r1_sha256: cases 484 verifies 484 controls 522 mismatches 0 ns 264263768 codes 174 23 221 0 66 0 +PASS wycheproof_secp256r1_sha256_p1363: cases 262 verifies 262 controls 519 mismatches 0 ns 250936346 codes 173 18 21 0 50 0 +PASS wycheproof_secp256r1_sha512: cases 554 verifies 554 controls 729 mismatches 0 ns 383287144 codes 243 25 220 0 66 0 +PASS wycheproof_secp256r1_sha512_p1363: cases 332 verifies 332 controls 726 mismatches 0 ns 345547449 codes 242 19 21 0 50 0 +PASS wycheproof_secp384r1_sha256: cases 472 verifies 472 controls 486 mismatches 0 ns 747823734 codes 162 24 220 0 66 0 +PASS wycheproof_secp384r1_sha384: cases 504 verifies 504 controls 582 mismatches 0 ns 857973762 codes 194 23 221 0 66 0 +PASS wycheproof_secp384r1_sha384_p1363: cases 280 verifies 280 controls 579 mismatches 0 ns 858897329 codes 193 18 19 0 50 0 +PASS wycheproof_secp384r1_sha512: cases 542 verifies 542 controls 693 mismatches 0 ns 999816038 codes 231 23 221 0 67 0 +PASS wycheproof_secp384r1_sha512_p1363: cases 318 verifies 318 controls 690 mismatches 0 ns 973452272 codes 230 19 19 0 50 0 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha3_224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha384_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha3_384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha384_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha3_384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r2_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r2_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_shake128_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_shake128_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_bitcoin_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake128_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake128_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256r1_sha3_256_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_sha3_512_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_shake128_p1363_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_shake128_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_sha3_384_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_sha3_512_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_shake256_p1363_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_shake256_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp521r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_shake256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_shake256_test.json: curve not P-256/P-384 +NOT_RUN cavp SigVer.rsp P-256/P-384 with SHA-1, SHA-224: hash not in om/tls/sha2.om +NOT_RUN cavp SigVer.rsp P-192, P-224, P-521, K-*, B-* sections: curve not P-256/P-384 +NOT_RUN cavp SigVer_TruncatedSHAs.rsp (SHA-512/224, SHA-512/256): hash not in om/tls/sha2.om +PASS mutant-expectation detected: 1 mismatches, cases 484 verifies 484 controls 519 mismatches 1 ns 266099301 codes 174 23 221 0 66 0 +PASS mutant-b256 detected: 696 mismatches, cases 484 verifies 484 controls 522 mismatches 696 ns 23178382 codes 0 0 0 484 0 0 +PASS mutant-padd detected: 194 mismatches, cases 504 verifies 504 controls 582 mismatches 194 ns 873675413 codes 0 217 221 0 66 0 +PASS mutant-n0 detected: 36 mismatches, cases 180 verifies 180 controls 108 mismatches 36 ns 468841393 codes 0 180 0 0 0 0 +PASS mutant-der detected: 2 mismatches, cases 56 verifies 56 controls 12 mismatches 2 ns 34366147 codes 6 0 14 20 12 4 +PASS mutant-digest-column detected: 1 mismatches, cases 504 verifies 504 controls 582 mismatches 1 ns 869240443 codes 194 23 221 0 66 0 +PASS fuzz: cases 3000 verifies 3000 controls 0 mismatches 0 ns 1485590760 codes 0 533 1290 1172 5 0 +TIME secp256r1_sha256: 200 verifies, 267134764 ns total, 1335673 ns per verify +TIME secp384r1_sha384: 200 verifies, 787074708 ns total, 3935373 ns per verify +EC PASS vectors=3984 (wycheproof=3748 cavp=180 edge=56) mutants=6/6 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/interop-table.txt b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/interop-table.txt new file mode 100644 index 000000000..b28158da9 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/interop-table.txt @@ -0,0 +1,39 @@ +PASS | good EC chain, chacha | expect OK | got OK +PASS | good EC chain, aes128gcm | expect OK | got OK +PASS | good RSA leaf (rsa_pss) | expect OK | got OK +PASS | expired leaf | expect TLSERR TLS_ERR_CERTIFICATE detail 2 X509_ERR_EXPIRED | got TLSERR TLS_ERR_CERTIFICATE detail 2 X509_ERR_EXPIRED (exit 27) +PASS | not-yet-valid leaf | expect TLSERR TLS_ERR_CERTIFICATE detail 3 | got TLSERR TLS_ERR_CERTIFICATE detail 3 X509_ERR_NOT_YET_VALID (exit 27) +PASS | wrong name | expect TLSERR TLS_ERR_CERTIFICATE detail 4 | got TLSERR TLS_ERR_CERTIFICATE detail 4 X509_ERR_NAME_MISMATCH (exit 27) +PASS | self-signed leaf (CA:TRUE) | expect TLSERR TLS_ERR_CERTIFICATE detail 15 | got TLSERR TLS_ERR_CERTIFICATE detail 15 X509_ERR_LEAF_IS_CA (exit 27) +PASS | self-signed leaf (CA:FALSE) | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | bad cert signature | expect TLSERR TLS_ERR_CERTIFICATE detail 6 | got TLSERR TLS_ERR_CERTIFICATE detail 6 X509_ERR_BAD_SIGNATURE (exit 27) +PASS | unknown issuer | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | missing intermediate | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | TLS 1.2 only server | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 70 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 70 (exit 31) +PASS | AES-256 suite only | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 40 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 40 (exit 31) +PASS | P-256 group only | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 40 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 40 (exit 31) +PASS | fake ServerHello: tls12 | expect TLSERR TLS_ERR_PROTOCOL_VERSION | got TLSERR TLS_ERR_PROTOCOL_VERSION detail 0 (exit 19) +PASS | fake ServerHello: hrr | expect TLSERR TLS_ERR_HELLO_RETRY_UNSUPPORTED | got TLSERR TLS_ERR_HELLO_RETRY_UNSUPPORTED detail 0 (exit 23) +PASS | fake ServerHello: suite | expect TLSERR TLS_ERR_CIPHER_SUITE | got TLSERR TLS_ERR_CIPHER_SUITE detail 0 (exit 20) +PASS | fake ServerHello: sid | expect TLSERR TLS_ERR_SESSION_ID_ECHO | got TLSERR TLS_ERR_SESSION_ID_ECHO detail 0 (exit 24) +PASS | fake ServerHello: group | expect TLSERR TLS_ERR_KEY_SHARE | got TLSERR TLS_ERR_KEY_SHARE detail 0 (exit 21) +PASS | fake ServerHello: zero | expect TLSERR TLS_ERR_ZERO_SHARED_SECRET | got TLSERR TLS_ERR_ZERO_SHARED_SECRET detail 0 (exit 25) +PASS | fake ServerHello: dupext | expect TLSERR TLS_ERR_EXTENSION | got TLSERR TLS_ERR_EXTENSION detail 0 (exit 22) +PASS | fake ServerHello: trail | expect TLSERR TLS_ERR_DECODE | got TLSERR TLS_ERR_DECODE detail 0 (exit 18) +PASS | fakesrv: ok | expect OK | got OK +PASS | fakesrv: empty50 | expect OK | got OK +PASS | fakesrv: ccs2 | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: ccsflood | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: ccspre | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: ccslate | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: encccs | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: frag | expect TLSERR TLS_ERR_MESSAGE_TOO_BIG detail 0 (exit 32) | got TLSERR TLS_ERR_MESSAGE_TOO_BIG detail 0 (exit 32) +PASS | fakesrv: cvbad | expect TLSERR TLS_ERR_CERTIFICATE_VERIFY | got TLSERR TLS_ERR_CERTIFICATE_VERIFY detail 6 X509_ERR_BAD_SIGNATURE (exit 29) +PASS | fakesrv: cvkey | expect TLSERR TLS_ERR_CERTIFICATE_VERIFY | got TLSERR TLS_ERR_CERTIFICATE_VERIFY detail 6 X509_ERR_BAD_SIGNATURE (exit 29) +PASS | fakesrv: cvskip | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: empty1500 | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: tickets1500 | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: closehs | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) | got TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) +PASS | fakesrv: closepre | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) | got TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) +PASS | tampered record (proxy) | expect TLSERR TLS_ERR_BAD_RECORD_MAC | got TLSERR TLS_ERR_BAD_RECORD_MAC detail 0 (exit 16) +INTEROP PASS rows=38 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/omc.sha256 b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/omc.sha256 new file mode 100644 index 000000000..26a0a4762 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/omc.sha256 @@ -0,0 +1 @@ +189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 seed/out/omc diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/rsa.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/rsa.log new file mode 100644 index 000000000..8a450b15e --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/rsa.log @@ -0,0 +1,139 @@ +omc 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +rsa.om 07414c1104f73f3f0d815ce8a7af9e736233c633f4a2ea080e20307ea1919c11 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +functions rsa.om 32 +driver 46ca78f0fcb5429cf80151dc71bce48fb58c02e028d7b6e3cdd2963b309eac63 +PASS wycheproof/rsa_pkcs1_1024_sig_gen_test: cases 17 verifies 17 mismatches 0 controls 17 ns 1799184 +PASS wycheproof/rsa_pkcs1_1536_sig_gen_test: cases 24 verifies 24 mismatches 0 controls 24 ns 5436224 +PASS wycheproof/rsa_pkcs1_2048_sig_gen_test: cases 27 verifies 27 mismatches 0 controls 27 ns 23692020 +PASS wycheproof/rsa_pkcs1_3072_sig_gen_test: cases 26 verifies 26 mismatches 0 controls 26 ns 22294807 +PASS wycheproof/rsa_pkcs1_4096_sig_gen_test: cases 24 verifies 24 mismatches 0 controls 24 ns 36936041 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_0_params_test: cases 103 verifies 103 mismatches 0 controls 61 ns 39060266 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_0_test: cases 103 verifies 103 mismatches 0 controls 61 ns 38973147 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_32_params_test: cases 108 verifies 108 mismatches 0 controls 63 ns 59191843 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 40977118 +PASS wycheproof/rsa_pss_2048_sha384_mgf1_48_test: cases 141 verifies 141 mismatches 0 controls 95 ns 69974702 +PASS wycheproof/rsa_pss_2048_sha512_mgf1sha256_32_params_test: cases 178 verifies 178 mismatches 0 controls 132 ns 79329859 +PASS wycheproof/rsa_pss_3072_sha256_mgf1_32_params_test: cases 108 verifies 108 mismatches 0 controls 63 ns 90709818 +PASS wycheproof/rsa_pss_3072_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 92144035 +PASS wycheproof/rsa_pss_4096_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 157593127 +PASS wycheproof/rsa_pss_4096_sha384_mgf1_48_test: cases 141 verifies 141 mismatches 0 controls 95 ns 226596211 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_32_params_test: cases 177 verifies 177 mismatches 0 controls 132 ns 268860553 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_32_test: cases 177 verifies 177 mismatches 0 controls 132 ns 280380262 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_64_params_test: cases 179 verifies 179 mismatches 0 controls 132 ns 268821538 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_64_test: cases 179 verifies 179 mismatches 0 controls 132 ns 284644202 +PASS wycheproof/rsa_pss_misc_params_test: cases 54 verifies 54 mismatches 0 controls 54 ns 21757391 +PASS wycheproof/rsa_pss_misc_test: cases 54 verifies 54 mismatches 0 controls 54 ns 21760499 +PASS wycheproof/rsa_signature_2048_sha256_test: cases 259 verifies 259 mismatches 0 controls 9 ns 99577947 +PASS wycheproof/rsa_signature_2048_sha384_test: cases 258 verifies 258 mismatches 0 controls 7 ns 130817381 +PASS wycheproof/rsa_signature_2048_sha512_test: cases 259 verifies 259 mismatches 0 controls 8 ns 101090009 +PASS wycheproof/rsa_signature_3072_sha256_test: cases 259 verifies 259 mismatches 0 controls 8 ns 222348673 +PASS wycheproof/rsa_signature_3072_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 247576579 +PASS wycheproof/rsa_signature_3072_sha512_test: cases 260 verifies 260 mismatches 0 controls 8 ns 239450070 +PASS wycheproof/rsa_signature_4096_sha256_test: cases 258 verifies 258 mismatches 0 controls 7 ns 390380926 +PASS wycheproof/rsa_signature_4096_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 409010525 +PASS wycheproof/rsa_signature_4096_sha512_test: cases 259 verifies 259 mismatches 0 controls 7 ns 390005424 +PASS wycheproof/rsa_signature_8192_sha256_test: cases 258 verifies 258 mismatches 0 controls 7 ns 1533767267 +PASS wycheproof/rsa_signature_8192_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 1562265104 +PASS wycheproof/rsa_signature_8192_sha512_test: cases 259 verifies 259 mismatches 0 controls 7 ns 1584891699 +PASS edge: cases 48 verifies 48 mismatches 0 controls 1 ns 3619327 +PASS pyca_gen: cases 324 verifies 324 mismatches 0 controls 324 ns 1176259438 +PASS fuzz: cases 864 verifies 864 mismatches 0 controls 0 ns 104480800 +NOT_RUN rsa_oaep_2048_sha1_mgf1sha1_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha224_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha224_mgf1sha224_test.json tests=35 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha256_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha384_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha384_mgf1sha384_test.json tests=34 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_224_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_224_mgf1sha512_224_test.json tests=35 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_mgf1sha512_test.json tests=33 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha256_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_256_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_256_mgf1sha512_256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_mgf1sha512_test.json tests=33 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha256_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha512_mgf1sha512_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_misc_test.json tests=395 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_1024_sig_gen_test.json tests=8 reason: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_1024_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_1536_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_sig_gen_test.json tests=8 reason: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_3072_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_4096_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pss_2048_sha1_mgf1_20_params_test.json tests=88 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha1_mgf1_20_test.json tests=88 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha256_mgf1sha1_20_test.json tests=108 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha512_224_mgf1_28_test.json tests=100 reason: hash SHA-512/224 mgf1 SHA-512/224: SHA-512/224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha512_256_mgf1_32_test.json tests=115 reason: hash SHA-512/256 mgf1 SHA-512/256: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_shake128_test.json tests=114 reason: hash SHAKE128 mgf SHAKE128: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_2048_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_3072_shake128_test.json tests=114 reason: hash SHAKE128 mgf SHAKE128: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_3072_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_4096_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-224: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-256: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-384: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-512: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-1: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-256: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-384: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-512: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-256 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-384 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-384 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-512 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-512 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-224: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-256: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-384: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-512: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-1: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-256: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-384: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-512: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-256 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-384 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-384 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-512 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-512 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha224_test.json tests=258 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_224_test.json tests=258 reason: SHA3-224: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_256_test.json tests=257 reason: SHA3-256: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_384_test.json tests=258 reason: SHA3-384: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_512_test.json tests=258 reason: SHA3-512: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha512_224_test.json tests=258 reason: SHA-512/224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha512_256_test.json tests=257 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_256_test.json tests=258 reason: SHA3-256: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_384_test.json tests=259 reason: SHA3-384: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_512_test.json tests=259 reason: SHA3-512: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha512_256_test.json tests=258 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_4096_sha512_256_test.json tests=258 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_three_primes_oaep_2048_sha1_mgf1sha1_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_three_primes_oaep_3072_sha224_mgf1sha224_test.json tests=38 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_three_primes_oaep_4096_sha256_mgf1sha256_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +WYCHEPROOF valid=1556 invalid=3636 acceptable=58 (accepted 46: SmallModulus/SmallPublicKey; refused 12: MissingNull) +PASS mutant-expectation detected: 1 mismatches, cases 259 verifies 259 mismatches 1 controls 8 ns 99981777 +PASS mutant-mont-carry detected: 9 mismatches, cases 259 verifies 259 mismatches 9 controls 0 ns 130126329 +PASS mutant-digestinfo detected: 10 mismatches, cases 259 verifies 259 mismatches 10 controls 0 ns 133351929 +PASS mutant-mgf1-counter detected: 63 mismatches, cases 108 verifies 108 mismatches 63 controls 0 ns 41096610 +TIME rsa_signature_2048_sha256_test: 100 verifies, 40037365 ns total, 400373 ns per verify (nice 19) +TIME rsa_signature_4096_sha256_test: 100 verifies, 154989206 ns total, 1549892 ns per verify (nice 19) +TIME rsa_pss_2048_sha256_mgf1_32_test: 100 verifies, 40294391 ns total, 402943 ns per verify (nice 19) +TIME rsa_pss_4096_sha256_mgf1_32_test: 100 verifies, 156028015 ns total, 1560280 ns per verify (nice 19) +CONTROLS flipped-signature-byte controls=1927 (all refused) +RSA PASS vectors=6486 (wycheproof=5250) mutants=4/4 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/sha2.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/sha2.log new file mode 100644 index 000000000..7b303f901 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/sha2.log @@ -0,0 +1,25 @@ +omc sha256 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +sha2.om sha256 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +hkdf.om sha256 5c3ce5f67627f89ce42961c3076c556d16a2eb6c72d704ff68e13b2819333778 +PASS nist-sha256-ShortMsg: 65 vectors, sha2 driver: 130 checks, 0 failed +PASS nist-sha256-LongMsg: 64 vectors, sha2 driver: 128 checks, 0 failed +PASS nist-sha256-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS nist-sha384-ShortMsg: 129 vectors, sha2 driver: 258 checks, 0 failed +PASS nist-sha384-LongMsg: 128 vectors, sha2 driver: 256 checks, 0 failed +PASS nist-sha384-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS nist-sha512-ShortMsg: 129 vectors, sha2 driver: 258 checks, 0 failed +PASS nist-sha512-LongMsg: 128 vectors, sha2 driver: 256 checks, 0 failed +PASS nist-sha512-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS rfc4231-hmac: 21 vectors, sha2 driver: 42 checks, 0 failed +PASS rfc5869-hkdf: 6 vectors, sha2 driver: 9 checks, 0 failed +PASS generated-long: 33 vectors, sha2 driver: 33 checks, 0 failed +PASS wycheproof-hmac: 522 vectors, sha2 driver: 720 checks, 0 failed +PASS wycheproof-hkdf: 252 vectors, sha2 driver: 495 checks, 0 failed +PASS mutant-sha256-k0: detected (130 failure lines; sha2 driver: 130 checks, 130 failed) +PASS mutant-sha512-k0: detected (258 failure lines; sha2 driver: 258 checks, 258 failed) +PASS mutant-hmac-ipad: detected (21 failure lines; sha2 driver: 42 checks, 21 failed) +PASS mutant-hkdf-ctr: detected (243 failure lines; sha2 driver: 495 checks, 243 failed) +PASS mutant-expect: detected (2 failure lines; sha2 driver: 130 checks, 2 failed) +PASS neg-malformed: detected (1 failure lines; sha2 driver: 1 checks, 1 failed) +PASS neg-tag-flip: detected (1 failure lines; sha2 driver: 42 checks, 1 failed) +SHA2 PASS vectors=1777 (wycheproof=774) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/tls.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/tls.log new file mode 100644 index 000000000..06c5a40d0 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/tls.log @@ -0,0 +1,40 @@ +omc 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +hkdf.om 5c3ce5f67627f89ce42961c3076c556d16a2eb6c72d704ff68e13b2819333778 +x25519.om c2a3a01d6cffff95cbaa130a586ca8f7365fb56c67ec1b2f4920eceebfed23f5 +chacha.om 8431257bc8e83474983c572cfdfa7f8f4b62a1b867748868e88fbc9c1b37d3af +aesgcm.om b19d8ce88fc65eb0e69e51f52f3af70b9c46c4bfbbc84004d43e536bf4ced17f +ec.om 909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060 +rsa.om 07414c1104f73f3f0d815ce8a7af9e736233c633f4a2ea080e20307ea1919c11 +x509.om 193a8cd93638d85e4256d4d298ea00bb1c60d9e154efe81dd2f88827f093f8be +tls.om 72ca585b4e55413a8a67c7743f8e8c00fb50da334231739ec590864a12e68545 +PASS rfc8448: tls kat: 24 checks, 0 failed +PASS expectation mutant detected: 2 mismatches +PASS mutant label c hs traffic detected: 5 mismatches +PASS mutant nonce ignores seq detected: 1 mismatches +PASS mutant label length detected: 21 mismatches +PASS mutant finished key detected: 2 mismatches +PASS dns: dns unit: 23 checks, 0 failed +PASS mutant dns flags only QR detected: 4 mismatches +PASS mutant dns owner ignored detected: 6 mismatches +PASS mutant dns label cap gone detected: trap (exit 104) +PASS mutant dns_a4 name length unchecked detected: trap (exit 103) +PASS interop: INTEROP PASS rows=38 +PASS mutant chain result ignored detected: 8 rows fail +PASS mutant CertificateVerify ignored detected: 2 rows fail +PASS mutant CCS count not checked detected: 4 rows fail +PASS mutant close revives failed detected: 33 rows fail +PASS mutant read record cap gone detected: 2 rows fail +PASS mutant handshake record cap gone detected: 1 rows fail +PASS mutant handshake close_notify unmapped detected: 2 rows fail +PASS mutant version not checked detected: 4 rows fail +PASS mutant record MAC ignored detected: 1 rows fail +PASS mutant session id not checked detected: 1 rows fail +PARITY PASS https://api.github.com/licenses/mit status='HTTP/1.1 200 OK' bytes=1956/1956 sha256=15b2a5994e7c6e3d/15b2a5994e7c6e3d +PARITY PASS https://api.github.com/licenses/apache-2.0 status='HTTP/1.1 200 OK' bytes=12478/12478 sha256=c9fb7d13de08da3c/c9fb7d13de08da3c +PARITY PASS https://api.github.com/repos/torvalds/linux/license status='HTTP/1.1 200 OK' bytes=1528/1528 sha256=afc6dbc05fb592ec/afc6dbc05fb592ec +PARITY PASS https://raw.githubusercontent.com/torvalds/linux/v6.0/README status='HTTP/1.1 200 OK' bytes=727/727 sha256=bad58d396f62102b/bad58d396f62102b +PARITY PASS https://raw.githubusercontent.com/torvalds/linux/v6.0/MAINTAINERS status='HTTP/1.1 200 OK' bytes=680548/680548 sha256=2e65a67b1f2ecd4e/2e65a67b1f2ecd4e +PARITY PASS smtp://mail.gandi.net:465 exit=0 bytes=194/194 sha256=d5fbda7743efc6b0/d5fbda7743efc6b0 +PARITY PASS tsmtp://mail.gandi.net:587 exit=0 bytes=383/383 sha256=b618c769ed2c6b81/b618c769ed2c6b81 +TLS PASS vectors=24 (rfc8448) dns=23 interop=38 net=PASS mutants=19/19 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/x25519.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/x25519.log new file mode 100644 index 000000000..c6c2a43b4 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/x25519.log @@ -0,0 +1,16 @@ +omc 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +x25519.om c2a3a01d6cffff95cbaa130a586ca8f7365fb56c67ec1b2f4920eceebfed23f5 +driver 863448df5f4f1c76016be39a278d9bf5cd9136680f6a8c0daee60576d91d4ae2 +PASS rfc7748: cases 9 calls 13 mismatches 0 ns 176309040 +PASS wycheproof: cases 518 calls 518 mismatches 0 ns 116202826 +NOTE rfc7748-iter1m not run (opt-in: X25519_ITER1M=1) +PASS negative-control detected: 1 mismatches, cases 9 calls 13 mismatches 1 ns 200687658 +PASS mutant-expectation detected: 1 mismatches, cases 518 calls 518 mismatches 1 ns 90631283 +PASS mut-a24 detected: 8 mismatches, cases 9 calls 13 mismatches 8 ns 175737645 +PASS mut-step detected: 8 mismatches, cases 9 calls 13 mismatches 8 ns 202900253 +PASS mut-clamp detected: 1 mismatches, cases 518 calls 518 mismatches 1 ns 90933803 +PASS mut-zero detected: 518 mismatches, cases 518 calls 518 mismatches 518 ns 115503269 +PASS mut-canon detected: 34 mismatches, cases 518 calls 518 mismatches 34 ns 116374221 +TIME low-weight scalar (clamped weight 1): 400 calls, 71006872 ns, 177517 ns per call +TIME high-weight scalar (clamped weight 252): 400 calls, 70965015 ns, 177412 ns per call +X25519 PASS vectors=531 (wycheproof=518) mutants=7/7 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/x509.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/x509.log new file mode 100644 index 000000000..7dd3dfcf0 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/x509.log @@ -0,0 +1,40 @@ +omc sha256 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +library sha256 193a8cd93638d85e4256d4d298ea00bb1c60d9e154efe81dd2f88827f093f8be (70 functions) +driver sha256 68ac1629bbb735399ad0a459e77d16463441e02aeffd717b6f74a6114c6acf3a +PASS cases.txt: x509 driver: 187 checks, 0 failed +PASS fuzz fuzz_rsa n=300 rejected=300 +PASS fuzz fuzz_ec n=300 rejected=300 +PASS fuzz fuzz_pss n=200 rejected=200 +openssl OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024) +DIFF wildcard_partial x509=reject openssl=accept +DIFF no_san x509=reject openssl=accept +DIFF name_constraints_critical x509=reject openssl=accept +DIFF depth_8_intermediates x509=reject openssl=accept +DIFF leaf_is_ca x509=reject openssl=accept +DIFF leaf_ku_no_digsig x509=reject openssl=accept +DIFF rsa_1024_leaf x509=reject openssl=accept +DIFF sha1_signed x509=reject openssl=accept +DIFF rsassa_pss_key x509=reject openssl=accept +DIFF ed25519_key x509=reject openssl=accept +DIFF leaf_too_big x509=reject openssl=accept +DIFF name_constraints_noncritical x509=reject openssl=accept +DIFF rsa_6144_leaf x509=reject openssl=accept +DIFF rsa_e_2_32_plus_1_leaf x509=reject openssl=accept +DIFF rsa_e_even_leaf x509=reject openssl=accept +DIFF rsa_e_1_leaf x509=reject openssl=accept +DIFF rsa_6144_intermediate x509=reject openssl=accept +DIFF rsa_e_2_32_plus_1_intermediate x509=reject openssl=accept +PASS mutant name-wildcard-labels detected (2 MISMATCH: wildcard_one_label_parent wild_one_label_parent ) +PASS mutant date-not-after detected (76 MISMATCH: rsa_good rsa_good_apex ) +PASS mutant date-at-not-after detected (1 MISMATCH: at_not_after ) +PASS mutant anchor-self-issued detected (1 MISMATCH: store_intermediate_anchor ) +PASS mutant bc-ca-flag detected (1 MISMATCH: intermediate_not_ca ) +PASS mutant unique-id-order detected (driver trapped, exit 104, after 3 MISMATCH) +PASS mutant name-constraints-noncritical detected (3 MISMATCH: name_constraints_critical name_constraints_noncritical ) +PASS mutant rsa-modulus-max detected (8 MISMATCH: rsa_6144_leaf rsa_e_2_32_plus_1_leaf ) +PASS mutant rsa-exponent detected (2 MISMATCH: rsa_e_even_leaf rsa_e_1_leaf ) +PASS mutant leaf-size detected (1 MISMATCH: leaf_too_big ) +PASS mutant elemcap detected (driver trapped, exit 104, after 0 MISMATCH) +PASS mutant expectation detected +driver checks=187 fuzz-mutations=800 +X509 PASS cases=91 (openssl-parity=73/91) mutants=12/12 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/aesgcm.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/aesgcm.log new file mode 100644 index 000000000..0871603c1 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/aesgcm.log @@ -0,0 +1,28 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +library sha256 b19d8ce88fc65eb0e69e51f52f3af70b9c46c4bfbbc84004d43e536bf4ced17f +library functions 37 +PASS fips197: aesgcm driver: 4 checks, 0 failed +PASS wycheproof: aesgcm driver: 316 checks, 0 failed +PASS gcmEncryptExtIV128: aesgcm driver: 7875 checks, 0 failed +PASS gcmEncryptExtIV192: aesgcm driver: 7875 checks, 0 failed +PASS gcmEncryptExtIV256: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt128: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt192: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt256: aesgcm driver: 7875 checks, 0 failed +nist: 47250 vectors (11908 decrypt vectors expect FAIL) +PASS params: aesgcm driver: 19 checks, 0 failed +PASS speed: aesgcm driver: 3 checks, 0 failed +aesgcm speed bytes=1048576 seal_ns=38532788 open_ns=30423231 seal_MBps=27 open_MBps=34 +aesgcm speed bytes=1048576 seal_ns=19704742 open_ns=19679509 seal_MBps=53 open_MBps=53 +aesgcm speed bytes=1048576 seal_ns=19681333 open_ns=19686230 seal_MBps=53 open_MBps=53 +PASS mutant-sbox: detected, exit 1, 233 MISMATCH (aesgcm driver: 320 checks, 233 failed) +PASS mutant-ghash: detected, exit 1, 226 MISMATCH (aesgcm driver: 320 checks, 226 failed) +PASS mutant-rcon: detected, exit 1, 81 MISMATCH (aesgcm driver: 320 checks, 81 failed) +PASS mutant-tagcheck: detected, exit 1, 310 MISMATCH (aesgcm driver: 320 checks, 310 failed) +PASS mutant-expect: detected, exit 1, 1 MISMATCH (aesgcm driver: 316 checks, 1 failed) +NOT_RUN wycheproof aes_gcm_siv_test.json: AES-GCM-SIV (RFC 8452) is not implemented +NOT_RUN wycheproof aria_gcm_test.json, seed_gcm_test.json, sm4_gcm_test.json: other block ciphers +NOT_RUN wycheproof c2sp_chunked_encryption_aes_{128,256}_gcm_test.json: chunked-encryption construction, not raw AES-GCM +wycheproof: 316 tests: valid 229 passed, invalid 87 refused, acceptable 0 +checks outside the vectors: params=19 speed=3 (both passed) +AESGCM PASS vectors=47570 (fips197=4, nist=47250, wycheproof=316) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/chacha.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/chacha.log new file mode 100644 index 000000000..f67400df3 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/chacha.log @@ -0,0 +1,20 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +library sha256 8431257bc8e83474983c572cfdfa7f8f4b62a1b867748868e88fbc9c1b37d3af +driver sha256 1130187a2edc36c4b12fbafbe7295a61cbb184fe62891427fdcc0728737dba00 +PASS rfc8439: chacha driver: 36 checks, 0 failed +PASS wycheproof-regenerate: committed conversions equal a fresh conversion at d17cc89fa5c8f4f4d378b5385ebf75da5d0926c9 +PASS wycheproof-chacha20-poly1305: chacha driver: 325 checks, 0 failed +PASS wycheproof-chacha20-counter: chacha driver: 14 checks, 0 failed +NOTE wycheproof chacha20_poly1305_test.json: expected codes 0:256 1:60 2:9; NOT_RUN 0 (0 valid sealed+opened, 1 invalid tag refused, 2 invalid nonce size refused; no acceptable) +NOTE wycheproof chacha20_counter_test.json: expected codes 0:11 2:3; NOT_RUN 28 (NOT_RUN = XChaCha20 groups, not implemented) +PASS cryptography-diff(seed 1): chacha driver: 2709 checks, 0 failed +PASS tamper-refused: chacha driver: 3 checks, 0 failed +PASS tamper-claimed-valid: 3 of 3 tampered records rejected +PASS mutant-expectation: detected, exit 1, 1 MISMATCH (chacha driver: 36 checks, 1 failed) +PASS mutant-qr-rotation: detected, exit 1, 278 MISMATCH (chacha driver: 361 checks, 278 failed) +PASS mutant-poly-clamp: detected, exit 1, 133 MISMATCH (chacha driver: 361 checks, 133 failed) +PASS mutant-poly-fold: detected, exit 1, 267 MISMATCH (chacha driver: 361 checks, 267 failed) +PASS mutant-poly-final: detected, exit 1, 272 MISMATCH (chacha driver: 361 checks, 272 failed) +PASS bench-1MiB: 16 open+reseal rounds restored the plaintext; sealed sha256 314d4f2a5908e50854a934af2df4cee3f86baa891a64a68a384a58432b1e260b equals cryptography +THROUGHPUT bench-1MiB: 33 MiB through seal/open in 195200809 ns = 177.3 MB/s (whole process, incl. start-up and pattern checks) +CHACHA PASS vectors=3087 (wycheproof=339) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/ec.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/ec.log new file mode 100644 index 000000000..00d21416f --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/ec.log @@ -0,0 +1,92 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +ec.om 909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060 functions 27 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +driver e0424968291256158695a6c339806ba158c475144ce13662e8ce8717607b7e66 +PASS cavp_sigver: cases 180 verifies 180 controls 108 mismatches 0 ns 497966202 codes 36 144 0 0 0 0 +PASS edge: cases 56 verifies 56 controls 12 mismatches 0 ns 26370382 codes 4 0 16 20 12 4 +PASS wycheproof_secp256r1_sha256: cases 484 verifies 484 controls 522 mismatches 0 ns 262771851 codes 174 23 221 0 66 0 +PASS wycheproof_secp256r1_sha256_p1363: cases 262 verifies 262 controls 519 mismatches 0 ns 262806634 codes 173 18 21 0 50 0 +PASS wycheproof_secp256r1_sha512: cases 554 verifies 554 controls 729 mismatches 0 ns 357329144 codes 243 25 220 0 66 0 +PASS wycheproof_secp256r1_sha512_p1363: cases 332 verifies 332 controls 726 mismatches 0 ns 343345966 codes 242 19 21 0 50 0 +PASS wycheproof_secp384r1_sha256: cases 472 verifies 472 controls 486 mismatches 0 ns 732528833 codes 162 24 220 0 66 0 +PASS wycheproof_secp384r1_sha384: cases 504 verifies 504 controls 582 mismatches 0 ns 872948271 codes 194 23 221 0 66 0 +PASS wycheproof_secp384r1_sha384_p1363: cases 280 verifies 280 controls 579 mismatches 0 ns 829943693 codes 193 18 19 0 50 0 +PASS wycheproof_secp384r1_sha512: cases 542 verifies 542 controls 693 mismatches 0 ns 1013958873 codes 231 23 221 0 67 0 +PASS wycheproof_secp384r1_sha512_p1363: cases 318 verifies 318 controls 690 mismatches 0 ns 980163019 codes 230 19 19 0 50 0 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha3_224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha384_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha3_384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha384_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha3_384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r2_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r2_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_shake128_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_shake128_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_bitcoin_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake128_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake128_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256r1_sha3_256_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_sha3_512_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_shake128_p1363_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_shake128_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_sha3_384_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_sha3_512_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_shake256_p1363_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_shake256_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp521r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_shake256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_shake256_test.json: curve not P-256/P-384 +NOT_RUN cavp SigVer.rsp P-256/P-384 with SHA-1, SHA-224: hash not in om/tls/sha2.om +NOT_RUN cavp SigVer.rsp P-192, P-224, P-521, K-*, B-* sections: curve not P-256/P-384 +NOT_RUN cavp SigVer_TruncatedSHAs.rsp (SHA-512/224, SHA-512/256): hash not in om/tls/sha2.om +PASS mutant-expectation detected: 1 mismatches, cases 484 verifies 484 controls 519 mismatches 1 ns 268251909 codes 174 23 221 0 66 0 +PASS mutant-b256 detected: 696 mismatches, cases 484 verifies 484 controls 522 mismatches 696 ns 10736618 codes 0 0 0 484 0 0 +PASS mutant-padd detected: 194 mismatches, cases 504 verifies 504 controls 582 mismatches 194 ns 872094358 codes 0 217 221 0 66 0 +PASS mutant-n0 detected: 36 mismatches, cases 180 verifies 180 controls 108 mismatches 36 ns 473762523 codes 0 180 0 0 0 0 +PASS mutant-der detected: 2 mismatches, cases 56 verifies 56 controls 12 mismatches 2 ns 17032702 codes 6 0 14 20 12 4 +PASS mutant-digest-column detected: 1 mismatches, cases 504 verifies 504 controls 582 mismatches 1 ns 854205109 codes 194 23 221 0 66 0 +PASS fuzz: cases 3000 verifies 3000 controls 0 mismatches 0 ns 1525378854 codes 0 533 1290 1172 5 0 +TIME secp256r1_sha256: 200 verifies, 285225654 ns total, 1426128 ns per verify +TIME secp384r1_sha384: 200 verifies, 767543963 ns total, 3837719 ns per verify +EC PASS vectors=3984 (wycheproof=3748 cavp=180 edge=56) mutants=6/6 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/interop-table.txt b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/interop-table.txt new file mode 100644 index 000000000..986fba6b6 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/interop-table.txt @@ -0,0 +1,38 @@ +PASS | good EC chain, chacha | expect OK | got OK +PASS | good EC chain, aes128gcm | expect OK | got OK +PASS | good RSA leaf (rsa_pss) | expect OK | got OK +PASS | expired leaf | expect TLSERR TLS_ERR_CERTIFICATE detail 2 X509_ERR_EXPIRED | got TLSERR TLS_ERR_CERTIFICATE detail 2 X509_ERR_EXPIRED (exit 27) +PASS | not-yet-valid leaf | expect TLSERR TLS_ERR_CERTIFICATE detail 3 | got TLSERR TLS_ERR_CERTIFICATE detail 3 X509_ERR_NOT_YET_VALID (exit 27) +PASS | wrong name | expect TLSERR TLS_ERR_CERTIFICATE detail 4 | got TLSERR TLS_ERR_CERTIFICATE detail 4 X509_ERR_NAME_MISMATCH (exit 27) +PASS | self-signed leaf (CA:TRUE) | expect TLSERR TLS_ERR_CERTIFICATE detail 15 | got TLSERR TLS_ERR_CERTIFICATE detail 15 X509_ERR_LEAF_IS_CA (exit 27) +PASS | self-signed leaf (CA:FALSE) | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | bad cert signature | expect TLSERR TLS_ERR_CERTIFICATE detail 6 | got TLSERR TLS_ERR_CERTIFICATE detail 6 X509_ERR_BAD_SIGNATURE (exit 27) +PASS | unknown issuer | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | missing intermediate | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | TLS 1.2 only server | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 70 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 70 (exit 31) +PASS | AES-256 suite only | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 40 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 40 (exit 31) +PASS | P-256 group only | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 40 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 40 (exit 31) +PASS | fake ServerHello: tls12 | expect TLSERR TLS_ERR_PROTOCOL_VERSION | got TLSERR TLS_ERR_PROTOCOL_VERSION detail 0 (exit 19) +PASS | fake ServerHello: hrr | expect TLSERR TLS_ERR_HELLO_RETRY_UNSUPPORTED | got TLSERR TLS_ERR_HELLO_RETRY_UNSUPPORTED detail 0 (exit 23) +PASS | fake ServerHello: suite | expect TLSERR TLS_ERR_CIPHER_SUITE | got TLSERR TLS_ERR_CIPHER_SUITE detail 0 (exit 20) +PASS | fake ServerHello: sid | expect TLSERR TLS_ERR_SESSION_ID_ECHO | got TLSERR TLS_ERR_SESSION_ID_ECHO detail 0 (exit 24) +PASS | fake ServerHello: group | expect TLSERR TLS_ERR_KEY_SHARE | got TLSERR TLS_ERR_KEY_SHARE detail 0 (exit 21) +PASS | fake ServerHello: zero | expect TLSERR TLS_ERR_ZERO_SHARED_SECRET | got TLSERR TLS_ERR_ZERO_SHARED_SECRET detail 0 (exit 25) +PASS | fake ServerHello: dupext | expect TLSERR TLS_ERR_EXTENSION | got TLSERR TLS_ERR_EXTENSION detail 0 (exit 22) +PASS | fake ServerHello: trail | expect TLSERR TLS_ERR_DECODE | got TLSERR TLS_ERR_DECODE detail 0 (exit 18) +PASS | fakesrv: ok | expect OK | got OK +PASS | fakesrv: empty50 | expect OK | got OK +PASS | fakesrv: ccs2 | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: ccsflood | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: ccspre | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: ccslate | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: encccs | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: frag | expect TLSERR TLS_ERR_MESSAGE_TOO_BIG detail 0 (exit 32) | got TLSERR TLS_ERR_MESSAGE_TOO_BIG detail 0 (exit 32) +PASS | fakesrv: cvbad | expect TLSERR TLS_ERR_CERTIFICATE_VERIFY | got TLSERR TLS_ERR_CERTIFICATE_VERIFY detail 6 X509_ERR_BAD_SIGNATURE (exit 29) +PASS | fakesrv: cvkey | expect TLSERR TLS_ERR_CERTIFICATE_VERIFY | got TLSERR TLS_ERR_CERTIFICATE_VERIFY detail 6 X509_ERR_BAD_SIGNATURE (exit 29) +PASS | fakesrv: empty1500 | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: tickets1500 | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: closehs | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) | got TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) +PASS | fakesrv: closepre | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) | got TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) +PASS | tampered record (proxy) | expect TLSERR TLS_ERR_BAD_RECORD_MAC | got TLSERR TLS_ERR_BAD_RECORD_MAC detail 0 (exit 16) +INTEROP PASS rows=37 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/rsa.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/rsa.log new file mode 100644 index 000000000..6b141c215 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/rsa.log @@ -0,0 +1,139 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +rsa.om 07414c1104f73f3f0d815ce8a7af9e736233c633f4a2ea080e20307ea1919c11 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +functions rsa.om 32 +driver 46ca78f0fcb5429cf80151dc71bce48fb58c02e028d7b6e3cdd2963b309eac63 +PASS wycheproof/rsa_pkcs1_1024_sig_gen_test: cases 17 verifies 17 mismatches 0 controls 17 ns 3988689 +PASS wycheproof/rsa_pkcs1_1536_sig_gen_test: cases 24 verifies 24 mismatches 0 controls 24 ns 5435485 +PASS wycheproof/rsa_pkcs1_2048_sig_gen_test: cases 27 verifies 27 mismatches 0 controls 27 ns 23694249 +PASS wycheproof/rsa_pkcs1_3072_sig_gen_test: cases 26 verifies 26 mismatches 0 controls 26 ns 31090874 +PASS wycheproof/rsa_pkcs1_4096_sig_gen_test: cases 24 verifies 24 mismatches 0 controls 24 ns 53488674 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_0_params_test: cases 103 verifies 103 mismatches 0 controls 61 ns 39062909 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_0_test: cases 103 verifies 103 mismatches 0 controls 61 ns 55002442 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_32_params_test: cases 108 verifies 108 mismatches 0 controls 63 ns 49406871 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 60033768 +PASS wycheproof/rsa_pss_2048_sha384_mgf1_48_test: cases 141 verifies 141 mismatches 0 controls 95 ns 72011942 +PASS wycheproof/rsa_pss_2048_sha512_mgf1sha256_32_params_test: cases 178 verifies 178 mismatches 0 controls 132 ns 69347671 +PASS wycheproof/rsa_pss_3072_sha256_mgf1_32_params_test: cases 108 verifies 108 mismatches 0 controls 63 ns 90319245 +PASS wycheproof/rsa_pss_3072_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 102401681 +PASS wycheproof/rsa_pss_4096_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 178433650 +PASS wycheproof/rsa_pss_4096_sha384_mgf1_48_test: cases 141 verifies 141 mismatches 0 controls 95 ns 229789232 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_32_params_test: cases 177 verifies 177 mismatches 0 controls 132 ns 281768330 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_32_test: cases 177 verifies 177 mismatches 0 controls 132 ns 265669696 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_64_params_test: cases 179 verifies 179 mismatches 0 controls 132 ns 287865808 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_64_test: cases 179 verifies 179 mismatches 0 controls 132 ns 288134867 +PASS wycheproof/rsa_pss_misc_params_test: cases 54 verifies 54 mismatches 0 controls 54 ns 21743719 +PASS wycheproof/rsa_pss_misc_test: cases 54 verifies 54 mismatches 0 controls 54 ns 21761142 +PASS wycheproof/rsa_signature_2048_sha256_test: cases 259 verifies 259 mismatches 0 controls 9 ns 99736535 +PASS wycheproof/rsa_signature_2048_sha384_test: cases 258 verifies 258 mismatches 0 controls 7 ns 127825544 +PASS wycheproof/rsa_signature_2048_sha512_test: cases 259 verifies 259 mismatches 0 controls 8 ns 129381629 +PASS wycheproof/rsa_signature_3072_sha256_test: cases 259 verifies 259 mismatches 0 controls 8 ns 244487966 +PASS wycheproof/rsa_signature_3072_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 249852116 +PASS wycheproof/rsa_signature_3072_sha512_test: cases 260 verifies 260 mismatches 0 controls 8 ns 223655243 +PASS wycheproof/rsa_signature_4096_sha256_test: cases 258 verifies 258 mismatches 0 controls 7 ns 387240722 +PASS wycheproof/rsa_signature_4096_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 409458540 +PASS wycheproof/rsa_signature_4096_sha512_test: cases 259 verifies 259 mismatches 0 controls 7 ns 391504416 +PASS wycheproof/rsa_signature_8192_sha256_test: cases 258 verifies 258 mismatches 0 controls 7 ns 1551655291 +PASS wycheproof/rsa_signature_8192_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 1567093093 +PASS wycheproof/rsa_signature_8192_sha512_test: cases 259 verifies 259 mismatches 0 controls 7 ns 1555646948 +PASS edge: cases 48 verifies 48 mismatches 0 controls 1 ns 3621166 +PASS pyca_gen: cases 324 verifies 324 mismatches 0 controls 324 ns 1179266022 +PASS fuzz: cases 864 verifies 864 mismatches 0 controls 0 ns 75690126 +NOT_RUN rsa_oaep_2048_sha1_mgf1sha1_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha224_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha224_mgf1sha224_test.json tests=35 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha256_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha384_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha384_mgf1sha384_test.json tests=34 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_224_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_224_mgf1sha512_224_test.json tests=35 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_mgf1sha512_test.json tests=33 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha256_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_256_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_256_mgf1sha512_256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_mgf1sha512_test.json tests=33 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha256_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha512_mgf1sha512_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_misc_test.json tests=395 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_1024_sig_gen_test.json tests=8 reason: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_1024_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_1536_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_sig_gen_test.json tests=8 reason: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_3072_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_4096_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pss_2048_sha1_mgf1_20_params_test.json tests=88 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha1_mgf1_20_test.json tests=88 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha256_mgf1sha1_20_test.json tests=108 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha512_224_mgf1_28_test.json tests=100 reason: hash SHA-512/224 mgf1 SHA-512/224: SHA-512/224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha512_256_mgf1_32_test.json tests=115 reason: hash SHA-512/256 mgf1 SHA-512/256: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_shake128_test.json tests=114 reason: hash SHAKE128 mgf SHAKE128: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_2048_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_3072_shake128_test.json tests=114 reason: hash SHAKE128 mgf SHAKE128: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_3072_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_4096_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-224: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-256: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-384: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-512: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-1: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-256: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-384: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-512: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-256 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-384 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-384 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-512 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-512 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-224: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-256: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-384: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-512: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-1: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-256: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-384: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-512: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-256 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-384 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-384 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-512 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-512 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha224_test.json tests=258 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_224_test.json tests=258 reason: SHA3-224: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_256_test.json tests=257 reason: SHA3-256: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_384_test.json tests=258 reason: SHA3-384: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_512_test.json tests=258 reason: SHA3-512: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha512_224_test.json tests=258 reason: SHA-512/224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha512_256_test.json tests=257 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_256_test.json tests=258 reason: SHA3-256: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_384_test.json tests=259 reason: SHA3-384: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_512_test.json tests=259 reason: SHA3-512: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha512_256_test.json tests=258 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_4096_sha512_256_test.json tests=258 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_three_primes_oaep_2048_sha1_mgf1sha1_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_three_primes_oaep_3072_sha224_mgf1sha224_test.json tests=38 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_three_primes_oaep_4096_sha256_mgf1sha256_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +WYCHEPROOF valid=1556 invalid=3636 acceptable=58 (accepted 46: SmallModulus/SmallPublicKey; refused 12: MissingNull) +PASS mutant-expectation detected: 1 mismatches, cases 259 verifies 259 mismatches 1 controls 8 ns 126659721 +PASS mutant-mont-carry detected: 9 mismatches, cases 259 verifies 259 mismatches 9 controls 0 ns 129549625 +PASS mutant-digestinfo detected: 10 mismatches, cases 259 verifies 259 mismatches 10 controls 0 ns 99852363 +PASS mutant-mgf1-counter detected: 63 mismatches, cases 108 verifies 108 mismatches 63 controls 0 ns 71220463 +TIME rsa_signature_2048_sha256_test: 100 verifies, 39662847 ns total, 396628 ns per verify (nice 19) +TIME rsa_signature_4096_sha256_test: 100 verifies, 153638178 ns total, 1536381 ns per verify (nice 19) +TIME rsa_pss_2048_sha256_mgf1_32_test: 100 verifies, 48270665 ns total, 482706 ns per verify (nice 19) +TIME rsa_pss_4096_sha256_mgf1_32_test: 100 verifies, 155259521 ns total, 1552595 ns per verify (nice 19) +CONTROLS flipped-signature-byte controls=1927 (all refused) +RSA PASS vectors=6486 (wycheproof=5250) mutants=4/4 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/sha2.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/sha2.log new file mode 100644 index 000000000..224818cdd --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/sha2.log @@ -0,0 +1,25 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +sha2.om sha256 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +hkdf.om sha256 5c3ce5f67627f89ce42961c3076c556d16a2eb6c72d704ff68e13b2819333778 +PASS nist-sha256-ShortMsg: 65 vectors, sha2 driver: 130 checks, 0 failed +PASS nist-sha256-LongMsg: 64 vectors, sha2 driver: 128 checks, 0 failed +PASS nist-sha256-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS nist-sha384-ShortMsg: 129 vectors, sha2 driver: 258 checks, 0 failed +PASS nist-sha384-LongMsg: 128 vectors, sha2 driver: 256 checks, 0 failed +PASS nist-sha384-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS nist-sha512-ShortMsg: 129 vectors, sha2 driver: 258 checks, 0 failed +PASS nist-sha512-LongMsg: 128 vectors, sha2 driver: 256 checks, 0 failed +PASS nist-sha512-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS rfc4231-hmac: 21 vectors, sha2 driver: 42 checks, 0 failed +PASS rfc5869-hkdf: 6 vectors, sha2 driver: 9 checks, 0 failed +PASS generated-long: 33 vectors, sha2 driver: 33 checks, 0 failed +PASS wycheproof-hmac: 522 vectors, sha2 driver: 720 checks, 0 failed +PASS wycheproof-hkdf: 252 vectors, sha2 driver: 495 checks, 0 failed +PASS mutant-sha256-k0: detected (130 failure lines; sha2 driver: 130 checks, 130 failed) +PASS mutant-sha512-k0: detected (258 failure lines; sha2 driver: 258 checks, 258 failed) +PASS mutant-hmac-ipad: detected (21 failure lines; sha2 driver: 42 checks, 21 failed) +PASS mutant-hkdf-ctr: detected (243 failure lines; sha2 driver: 495 checks, 243 failed) +PASS mutant-expect: detected (2 failure lines; sha2 driver: 130 checks, 2 failed) +PASS neg-malformed: detected (1 failure lines; sha2 driver: 1 checks, 1 failed) +PASS neg-tag-flip: detected (1 failure lines; sha2 driver: 42 checks, 1 failed) +SHA2 PASS vectors=1777 (wycheproof=774) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/tls.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/tls.log new file mode 100644 index 000000000..ff4dbff22 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/tls.log @@ -0,0 +1,39 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +hkdf.om 5c3ce5f67627f89ce42961c3076c556d16a2eb6c72d704ff68e13b2819333778 +x25519.om c2a3a01d6cffff95cbaa130a586ca8f7365fb56c67ec1b2f4920eceebfed23f5 +chacha.om 8431257bc8e83474983c572cfdfa7f8f4b62a1b867748868e88fbc9c1b37d3af +aesgcm.om b19d8ce88fc65eb0e69e51f52f3af70b9c46c4bfbbc84004d43e536bf4ced17f +ec.om 909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060 +rsa.om 07414c1104f73f3f0d815ce8a7af9e736233c633f4a2ea080e20307ea1919c11 +x509.om 74faef7d459134c02ecea6c070eb4230b752b430225d939b51ba74fbeaf0bf28 +tls.om 20dcede61db68979c767af172ee3616cb2f089f92cd218ec43e6c545344ef6f0 +PASS rfc8448: tls kat: 24 checks, 0 failed +PASS expectation mutant detected: 2 mismatches +PASS mutant label c hs traffic detected: 5 mismatches +PASS mutant nonce ignores seq detected: 1 mismatches +PASS mutant label length detected: 21 mismatches +PASS mutant finished key detected: 2 mismatches +PASS dns: dns unit: 21 checks, 0 failed +PASS mutant dns flags only QR detected: 4 mismatches +PASS mutant dns owner ignored detected: 6 mismatches +PASS mutant dns label cap gone detected: trap (exit 104) +PASS interop: INTEROP PASS rows=37 +PASS mutant chain result ignored detected: 8 rows fail +PASS mutant CertificateVerify ignored detected: 2 rows fail +PASS mutant CCS count not checked detected: 4 rows fail +PASS mutant close revives failed detected: 32 rows fail +PASS mutant read record cap gone detected: 2 rows fail +PASS mutant handshake record cap gone detected: 1 rows fail +PASS mutant handshake close_notify unmapped detected: 2 rows fail +PASS mutant version not checked detected: 1 rows fail +PASS mutant record MAC ignored detected: 1 rows fail +PASS mutant session id not checked detected: 1 rows fail +PARITY PASS https://api.github.com/licenses/mit status='HTTP/1.1 200 OK' bytes=1956/1956 sha256=15b2a5994e7c6e3d/15b2a5994e7c6e3d +PARITY PASS https://api.github.com/licenses/apache-2.0 status='HTTP/1.1 200 OK' bytes=12478/12478 sha256=c9fb7d13de08da3c/c9fb7d13de08da3c +PARITY PASS https://api.github.com/repos/torvalds/linux/license status='HTTP/1.1 200 OK' bytes=1528/1528 sha256=afc6dbc05fb592ec/afc6dbc05fb592ec +PARITY PASS https://raw.githubusercontent.com/torvalds/linux/v6.0/README status='HTTP/1.1 200 OK' bytes=727/727 sha256=bad58d396f62102b/bad58d396f62102b +PARITY PASS https://raw.githubusercontent.com/torvalds/linux/v6.0/MAINTAINERS status='HTTP/1.1 200 OK' bytes=680548/680548 sha256=2e65a67b1f2ecd4e/2e65a67b1f2ecd4e +PARITY PASS smtp://mail.gandi.net:465 exit=0 bytes=194/194 sha256=d5fbda7743efc6b0/d5fbda7743efc6b0 +PARITY PASS tsmtp://mail.gandi.net:587 exit=0 bytes=383/383 sha256=b618c769ed2c6b81/b618c769ed2c6b81 +TLS PASS vectors=24 (rfc8448) dns=21 interop=37 net=PASS mutants=18/18 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/x25519.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/x25519.log new file mode 100644 index 000000000..bfe89d321 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/x25519.log @@ -0,0 +1,16 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +x25519.om c2a3a01d6cffff95cbaa130a586ca8f7365fb56c67ec1b2f4920eceebfed23f5 +driver 863448df5f4f1c76016be39a278d9bf5cd9136680f6a8c0daee60576d91d4ae2 +PASS rfc7748: cases 9 calls 13 mismatches 0 ns 179977865 +PASS wycheproof: cases 518 calls 518 mismatches 0 ns 90394504 +NOTE rfc7748-iter1m not run (opt-in: X25519_ITER1M=1) +PASS negative-control detected: 1 mismatches, cases 9 calls 13 mismatches 1 ns 190838084 +PASS mutant-expectation detected: 1 mismatches, cases 518 calls 518 mismatches 1 ns 90490523 +PASS mut-a24 detected: 8 mismatches, cases 9 calls 13 mismatches 8 ns 176293946 +PASS mut-step detected: 8 mismatches, cases 9 calls 13 mismatches 8 ns 178534316 +PASS mut-clamp detected: 1 mismatches, cases 518 calls 518 mismatches 1 ns 90607196 +PASS mut-zero detected: 518 mismatches, cases 518 calls 518 mismatches 518 ns 115073947 +PASS mut-canon detected: 34 mismatches, cases 518 calls 518 mismatches 34 ns 102675600 +TIME low-weight scalar (clamped weight 1): 400 calls, 71011301 ns, 177528 ns per call +TIME high-weight scalar (clamped weight 252): 400 calls, 70998485 ns, 177496 ns per call +X25519 PASS vectors=531 (wycheproof=518) mutants=7/7 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/x509.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/x509.log new file mode 100644 index 000000000..d5be839d9 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/x509.log @@ -0,0 +1,40 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +library sha256 74faef7d459134c02ecea6c070eb4230b752b430225d939b51ba74fbeaf0bf28 (68 functions) +driver sha256 9d401e547a08a01591845cbe45bd26f8ff63e0c05af2bd7fe92055be8036c576 +PASS cases.txt: x509 driver: 186 checks, 0 failed +PASS fuzz fuzz_rsa n=300 rejected=300 +PASS fuzz fuzz_ec n=300 rejected=300 +PASS fuzz fuzz_pss n=200 rejected=200 +openssl OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024) +DIFF store_intermediate_anchor x509=accept openssl=reject error 2 at 1 depth lookup: unable to get issuer certificate +DIFF at_not_after x509=accept openssl=reject error 10 at 0 depth lookup: certificate has expired +DIFF wildcard_partial x509=reject openssl=accept +DIFF no_san x509=reject openssl=accept +DIFF name_constraints_critical x509=reject openssl=accept +DIFF depth_8_intermediates x509=reject openssl=accept +DIFF leaf_is_ca x509=reject openssl=accept +DIFF leaf_ku_no_digsig x509=reject openssl=accept +DIFF rsa_1024_leaf x509=reject openssl=accept +DIFF sha1_signed x509=reject openssl=accept +DIFF rsassa_pss_key x509=reject openssl=accept +DIFF ed25519_key x509=reject openssl=accept +DIFF leaf_too_big x509=reject openssl=accept +DIFF name_constraints_noncritical x509=reject openssl=accept +DIFF rsa_6144_leaf x509=reject openssl=accept +DIFF rsa_e_2_32_plus_1_leaf x509=reject openssl=accept +DIFF rsa_e_even_leaf x509=reject openssl=accept +DIFF rsa_e_1_leaf x509=reject openssl=accept +DIFF rsa_6144_intermediate x509=reject openssl=accept +DIFF rsa_e_2_32_plus_1_intermediate x509=reject openssl=accept +PASS mutant name-wildcard-labels detected (2 MISMATCH: wildcard_one_label_parent wild_one_label_parent ) +PASS mutant date-not-after detected (76 MISMATCH: rsa_good rsa_good_apex ) +PASS mutant bc-ca-flag detected (1 MISMATCH: intermediate_not_ca ) +PASS mutant unique-id-order detected (driver trapped, exit 104, after 3 MISMATCH) +PASS mutant name-constraints-noncritical detected (3 MISMATCH: name_constraints_critical name_constraints_noncritical ) +PASS mutant rsa-modulus-max detected (8 MISMATCH: rsa_6144_leaf rsa_e_2_32_plus_1_leaf ) +PASS mutant rsa-exponent detected (2 MISMATCH: rsa_e_even_leaf rsa_e_1_leaf ) +PASS mutant leaf-size detected (1 MISMATCH: leaf_too_big ) +PASS mutant elemcap detected (driver trapped, exit 104, after 0 MISMATCH) +PASS mutant expectation detected +driver checks=186 fuzz-mutations=800 +X509 PASS cases=90 (openssl-parity=70/90) mutants=10/10 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/rsa.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/rsa.log new file mode 100644 index 000000000..f82ec000d --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/rsa.log @@ -0,0 +1,139 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +rsa.om a0e6d53ef3aaac082cbada87ace2efcee4aa7fca199403480eed1f48792d57c9 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +functions rsa.om 32 +driver 46ca78f0fcb5429cf80151dc71bce48fb58c02e028d7b6e3cdd2963b309eac63 +PASS wycheproof/rsa_pkcs1_1024_sig_gen_test: cases 17 verifies 17 mismatches 0 controls 17 ns 1765250 +PASS wycheproof/rsa_pkcs1_1536_sig_gen_test: cases 24 verifies 24 mismatches 0 controls 24 ns 12286104 +PASS wycheproof/rsa_pkcs1_2048_sig_gen_test: cases 27 verifies 27 mismatches 0 controls 27 ns 23864296 +PASS wycheproof/rsa_pkcs1_3072_sig_gen_test: cases 26 verifies 26 mismatches 0 controls 26 ns 22744092 +PASS wycheproof/rsa_pkcs1_4096_sig_gen_test: cases 24 verifies 24 mismatches 0 controls 24 ns 37131002 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_0_params_test: cases 103 verifies 103 mismatches 0 controls 61 ns 56987868 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_0_test: cases 103 verifies 103 mismatches 0 controls 61 ns 57759714 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_32_params_test: cases 108 verifies 108 mismatches 0 controls 63 ns 58792396 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 41454358 +PASS wycheproof/rsa_pss_2048_sha384_mgf1_48_test: cases 141 verifies 141 mismatches 0 controls 95 ns 72102557 +PASS wycheproof/rsa_pss_2048_sha512_mgf1sha256_32_params_test: cases 178 verifies 178 mismatches 0 controls 132 ns 70070173 +PASS wycheproof/rsa_pss_3072_sha256_mgf1_32_params_test: cases 108 verifies 108 mismatches 0 controls 63 ns 91501616 +PASS wycheproof/rsa_pss_3072_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 108637345 +PASS wycheproof/rsa_pss_4096_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 160493148 +PASS wycheproof/rsa_pss_4096_sha384_mgf1_48_test: cases 141 verifies 141 mismatches 0 controls 95 ns 213213102 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_32_params_test: cases 177 verifies 177 mismatches 0 controls 132 ns 293392533 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_32_test: cases 177 verifies 177 mismatches 0 controls 132 ns 281782494 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_64_params_test: cases 179 verifies 179 mismatches 0 controls 132 ns 294832290 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_64_test: cases 179 verifies 179 mismatches 0 controls 132 ns 272763787 +PASS wycheproof/rsa_pss_misc_params_test: cases 54 verifies 54 mismatches 0 controls 54 ns 22328937 +PASS wycheproof/rsa_pss_misc_test: cases 54 verifies 54 mismatches 0 controls 54 ns 21873189 +PASS wycheproof/rsa_signature_2048_sha256_test: cases 259 verifies 259 mismatches 0 controls 9 ns 137111376 +PASS wycheproof/rsa_signature_2048_sha384_test: cases 258 verifies 258 mismatches 0 controls 7 ns 131080475 +PASS wycheproof/rsa_signature_2048_sha512_test: cases 259 verifies 259 mismatches 0 controls 8 ns 129707118 +PASS wycheproof/rsa_signature_3072_sha256_test: cases 259 verifies 259 mismatches 0 controls 8 ns 234007126 +PASS wycheproof/rsa_signature_3072_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 225637917 +PASS wycheproof/rsa_signature_3072_sha512_test: cases 260 verifies 260 mismatches 0 controls 8 ns 253629816 +PASS wycheproof/rsa_signature_4096_sha256_test: cases 258 verifies 258 mismatches 0 controls 7 ns 407754884 +PASS wycheproof/rsa_signature_4096_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 418870482 +PASS wycheproof/rsa_signature_4096_sha512_test: cases 259 verifies 259 mismatches 0 controls 7 ns 425086811 +PASS wycheproof/rsa_signature_8192_sha256_test: cases 258 verifies 258 mismatches 0 controls 7 ns 1594226972 +PASS wycheproof/rsa_signature_8192_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 1596350302 +PASS wycheproof/rsa_signature_8192_sha512_test: cases 259 verifies 259 mismatches 0 controls 7 ns 1607324789 +PASS edge: cases 48 verifies 48 mismatches 0 controls 1 ns 8282161 +PASS pyca_gen: cases 324 verifies 324 mismatches 0 controls 324 ns 1188536475 +PASS fuzz: cases 864 verifies 864 mismatches 0 controls 0 ns 106779407 +NOT_RUN rsa_oaep_2048_sha1_mgf1sha1_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha224_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha224_mgf1sha224_test.json tests=35 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha256_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha384_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha384_mgf1sha384_test.json tests=34 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_224_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_224_mgf1sha512_224_test.json tests=35 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_mgf1sha512_test.json tests=33 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha256_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_256_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_256_mgf1sha512_256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_mgf1sha512_test.json tests=33 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha256_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha512_mgf1sha512_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_misc_test.json tests=395 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_1024_sig_gen_test.json tests=8 reason: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_1024_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_1536_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_sig_gen_test.json tests=8 reason: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_3072_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_4096_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pss_2048_sha1_mgf1_20_params_test.json tests=88 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha1_mgf1_20_test.json tests=88 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha256_mgf1sha1_20_test.json tests=108 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha512_224_mgf1_28_test.json tests=100 reason: hash SHA-512/224 mgf1 SHA-512/224: SHA-512/224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha512_256_mgf1_32_test.json tests=115 reason: hash SHA-512/256 mgf1 SHA-512/256: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_shake128_test.json tests=114 reason: hash SHAKE128 mgf SHAKE128: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_2048_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_3072_shake128_test.json tests=114 reason: hash SHAKE128 mgf SHAKE128: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_3072_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_4096_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-224: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-256: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-384: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-512: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-1: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-256: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-384: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-512: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-256 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-384 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-384 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-512 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-512 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-224: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-256: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-384: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-512: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-1: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-256: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-384: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-512: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-256 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-384 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-384 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-512 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-512 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha224_test.json tests=258 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_224_test.json tests=258 reason: SHA3-224: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_256_test.json tests=257 reason: SHA3-256: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_384_test.json tests=258 reason: SHA3-384: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_512_test.json tests=258 reason: SHA3-512: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha512_224_test.json tests=258 reason: SHA-512/224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha512_256_test.json tests=257 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_256_test.json tests=258 reason: SHA3-256: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_384_test.json tests=259 reason: SHA3-384: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_512_test.json tests=259 reason: SHA3-512: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha512_256_test.json tests=258 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_4096_sha512_256_test.json tests=258 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_three_primes_oaep_2048_sha1_mgf1sha1_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_three_primes_oaep_3072_sha224_mgf1sha224_test.json tests=38 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_three_primes_oaep_4096_sha256_mgf1sha256_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +WYCHEPROOF valid=1556 invalid=3636 acceptable=58 (accepted 46: SmallModulus/SmallPublicKey; refused 12: MissingNull) +PASS mutant-expectation detected: 1 mismatches, cases 259 verifies 259 mismatches 1 controls 8 ns 130762907 +PASS mutant-mont-carry detected: 9 mismatches, cases 259 verifies 259 mismatches 9 controls 0 ns 129746524 +PASS mutant-digestinfo detected: 10 mismatches, cases 259 verifies 259 mismatches 10 controls 0 ns 102302841 +PASS mutant-mgf1-counter detected: 63 mismatches, cases 108 verifies 108 mismatches 63 controls 0 ns 41005765 +TIME rsa_signature_2048_sha256_test: 100 verifies, 40019110 ns total, 400191 ns per verify (nice 19) +TIME rsa_signature_4096_sha256_test: 100 verifies, 191659320 ns total, 1916593 ns per verify (nice 19) +TIME rsa_pss_2048_sha256_mgf1_32_test: 100 verifies, 40987919 ns total, 409879 ns per verify (nice 19) +TIME rsa_pss_4096_sha256_mgf1_32_test: 100 verifies, 157838815 ns total, 1578388 ns per verify (nice 19) +CONTROLS flipped-signature-byte controls=1927 (all refused) +RSA PASS vectors=6486 (wycheproof=5250) mutants=4/4 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/sha2.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/sha2.log new file mode 100644 index 000000000..224818cdd --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/sha2.log @@ -0,0 +1,25 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +sha2.om sha256 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +hkdf.om sha256 5c3ce5f67627f89ce42961c3076c556d16a2eb6c72d704ff68e13b2819333778 +PASS nist-sha256-ShortMsg: 65 vectors, sha2 driver: 130 checks, 0 failed +PASS nist-sha256-LongMsg: 64 vectors, sha2 driver: 128 checks, 0 failed +PASS nist-sha256-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS nist-sha384-ShortMsg: 129 vectors, sha2 driver: 258 checks, 0 failed +PASS nist-sha384-LongMsg: 128 vectors, sha2 driver: 256 checks, 0 failed +PASS nist-sha384-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS nist-sha512-ShortMsg: 129 vectors, sha2 driver: 258 checks, 0 failed +PASS nist-sha512-LongMsg: 128 vectors, sha2 driver: 256 checks, 0 failed +PASS nist-sha512-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS rfc4231-hmac: 21 vectors, sha2 driver: 42 checks, 0 failed +PASS rfc5869-hkdf: 6 vectors, sha2 driver: 9 checks, 0 failed +PASS generated-long: 33 vectors, sha2 driver: 33 checks, 0 failed +PASS wycheproof-hmac: 522 vectors, sha2 driver: 720 checks, 0 failed +PASS wycheproof-hkdf: 252 vectors, sha2 driver: 495 checks, 0 failed +PASS mutant-sha256-k0: detected (130 failure lines; sha2 driver: 130 checks, 130 failed) +PASS mutant-sha512-k0: detected (258 failure lines; sha2 driver: 258 checks, 258 failed) +PASS mutant-hmac-ipad: detected (21 failure lines; sha2 driver: 42 checks, 21 failed) +PASS mutant-hkdf-ctr: detected (243 failure lines; sha2 driver: 495 checks, 243 failed) +PASS mutant-expect: detected (2 failure lines; sha2 driver: 130 checks, 2 failed) +PASS neg-malformed: detected (1 failure lines; sha2 driver: 1 checks, 1 failed) +PASS neg-tag-flip: detected (1 failure lines; sha2 driver: 42 checks, 1 failed) +SHA2 PASS vectors=1777 (wycheproof=774) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/tls-run-20261026T1706Z.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/tls-run-20261026T1706Z.log new file mode 100644 index 000000000..782e75fa6 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/tls-run-20261026T1706Z.log @@ -0,0 +1,29 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +hkdf.om 5c3ce5f67627f89ce42961c3076c556d16a2eb6c72d704ff68e13b2819333778 +x25519.om c2a3a01d6cffff95cbaa130a586ca8f7365fb56c67ec1b2f4920eceebfed23f5 +chacha.om 8431257bc8e83474983c572cfdfa7f8f4b62a1b867748868e88fbc9c1b37d3af +aesgcm.om b19d8ce88fc65eb0e69e51f52f3af70b9c46c4bfbbc84004d43e536bf4ced17f +ec.om 909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060 +rsa.om a0e6d53ef3aaac082cbada87ace2efcee4aa7fca199403480eed1f48792d57c9 +x509.om 64aa4ce05f2ff89b9bc608ae9c0431eb64aad7f1f929ebf5804f65b3fb608fdd +tls.om bca405ca0381d8a122b2089f36ead5d6c3fad7df967f50775261f236b7f70ae9 +PASS rfc8448: tls kat: 24 checks, 0 failed +PASS expectation mutant detected: 2 mismatches +PASS mutant label c hs traffic detected: 5 mismatches +PASS mutant nonce ignores seq detected: 1 mismatches +PASS mutant label length detected: 21 mismatches +PASS mutant finished key detected: 2 mismatches +PASS interop: INTEROP PASS rows=23 +PASS mutant chain result ignored detected: 8 rows fail +PASS mutant version not checked detected: 1 rows fail +PASS mutant record MAC ignored detected: 1 rows fail +PASS mutant session id not checked detected: 1 rows fail +PARITY PASS https://api.github.com/licenses/mit status='HTTP/1.1 200 OK' bytes=1956/1956 sha256=15b2a5994e7c6e3d/15b2a5994e7c6e3d +PARITY PASS https://api.github.com/repos/torvalds/linux/license status='HTTP/1.1 200 OK' bytes=1528/1528 sha256=afc6dbc05fb592ec/afc6dbc05fb592ec +PARITY PASS https://api.github.com/octocat status='HTTP/1.1 200 OK' bytes=901/901 sha256=0985c5b7885c921c/0985c5b7885c921c +PARITY PASS https://raw.githubusercontent.com/torvalds/linux/v6.0/README status='HTTP/1.1 200 OK' bytes=727/727 sha256=bad58d396f62102b/bad58d396f62102b +PARITY PASS https://raw.githubusercontent.com/torvalds/linux/v6.0/MAINTAINERS status='HTTP/1.1 200 OK' bytes=680548/680548 sha256=2e65a67b1f2ecd4e/2e65a67b1f2ecd4e +PARITY PASS smtp://mail.gandi.net:465 exit=0 bytes=194/194 sha256=d5fbda7743efc6b0/d5fbda7743efc6b0 +PARITY PASS tsmtp://mail.gandi.net:587 exit=0 bytes=383/383 sha256=b618c769ed2c6b81/b618c769ed2c6b81 +TLS PASS vectors=24 (rfc8448) interop=23 net=PASS mutants=9/9 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/x25519.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/x25519.log new file mode 100644 index 000000000..f578b7acf --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/x25519.log @@ -0,0 +1,16 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +x25519.om c2a3a01d6cffff95cbaa130a586ca8f7365fb56c67ec1b2f4920eceebfed23f5 +driver 863448df5f4f1c76016be39a278d9bf5cd9136680f6a8c0daee60576d91d4ae2 +PASS rfc7748: cases 9 calls 13 mismatches 0 ns 210986698 +PASS wycheproof: cases 518 calls 518 mismatches 0 ns 130545225 +NOTE rfc7748-iter1m not run (opt-in: X25519_ITER1M=1) +PASS negative-control detected: 1 mismatches, cases 9 calls 13 mismatches 1 ns 189185989 +PASS mutant-expectation detected: 1 mismatches, cases 518 calls 518 mismatches 1 ns 115584470 +PASS mut-a24 detected: 8 mismatches, cases 9 calls 13 mismatches 8 ns 180558320 +PASS mut-step detected: 8 mismatches, cases 9 calls 13 mismatches 8 ns 188826513 +PASS mut-clamp detected: 1 mismatches, cases 518 calls 518 mismatches 1 ns 119568685 +PASS mut-zero detected: 518 mismatches, cases 518 calls 518 mismatches 518 ns 121244928 +PASS mut-canon detected: 34 mismatches, cases 518 calls 518 mismatches 34 ns 97247030 +TIME low-weight scalar (clamped weight 1): 400 calls, 77025662 ns, 192564 ns per call +TIME high-weight scalar (clamped weight 252): 400 calls, 77475476 ns, 193688 ns per call +X25519 PASS vectors=531 (wycheproof=518) mutants=7/7 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/x509.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/x509.log new file mode 100644 index 000000000..6f321828d --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/x509.log @@ -0,0 +1,26 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +library sha256 64aa4ce05f2ff89b9bc608ae9c0431eb64aad7f1f929ebf5804f65b3fb608fdd (65 functions) +driver sha256 044beb49c47ec12631a3aa6bb4e057ecf7e293fc3a97576cd9cf9718cf44e37e +PASS cases.txt: x509 driver: 159 checks, 0 failed +PASS fuzz fuzz_rsa n=300 rejected=300 +PASS fuzz fuzz_ec n=300 rejected=300 +PASS fuzz fuzz_pss n=200 rejected=200 +openssl OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024) +DIFF store_intermediate_anchor x509=accept openssl=reject error 2 at 1 depth lookup: unable to get issuer certificate +DIFF at_not_after x509=accept openssl=reject error 10 at 0 depth lookup: certificate has expired +DIFF wildcard_partial x509=reject openssl=accept +DIFF no_san x509=reject openssl=accept +DIFF name_constraints_critical x509=reject openssl=accept +DIFF depth_8_intermediates x509=reject openssl=accept +DIFF leaf_is_ca x509=reject openssl=accept +DIFF leaf_ku_no_digsig x509=reject openssl=accept +DIFF rsa_1024_leaf x509=reject openssl=accept +DIFF sha1_signed x509=reject openssl=accept +DIFF rsassa_pss_key x509=reject openssl=accept +DIFF ed25519_key x509=reject openssl=accept +PASS mutant name-wildcard-labels detected (2 MISMATCH: wildcard_one_label_parent wild_one_label_parent ) +PASS mutant date-not-after detected (65 MISMATCH: rsa_good rsa_good_apex ) +PASS mutant bc-ca-flag detected (1 MISMATCH: intermediate_not_ca ) +PASS mutant expectation detected +driver checks=159 fuzz-mutations=800 +X509 PASS cases=78 (openssl-parity=66/78) mutants=4/4 diff --git a/evidence/om-tls-review-2026-10-26/security-rereview.md b/evidence/om-tls-review-2026-10-26/security-rereview.md new file mode 100644 index 000000000..002847d8e --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/security-rereview.md @@ -0,0 +1,48 @@ +# Security re-review: omega-mv #813 `feat/om-tls`, fix 38c80a85 over de2d884b + +VERDICT: PASS + +Scope: I read the current `/tmp/omtls/om/tls` tree. That tree is the working copy for 38c80a85 plus cdcf4229, a merge that touches only `.crumb`. I ran nothing: no git, no build, no suite. Every runtime statement below is reasoned from source. Test outcomes are NOT_RUN by me; the suite run belongs to TlsReviewFix. + +## Per-finding status + +| # | Status | Evidence (current line numbers) | +|---|---|---| +| F1 uniqueID trap | FIXED | `x509.om:1071-1083`: `k` starts at 0x80. Each 0x81 or 0x82 must be greater than the previous tag, and none is allowed when v1. The loop runs at most 3 times (0x81, 0x82, then 0xa3 returns), so `bound 4` cannot be reached. Tests: `cases.txt` `uid_*` (five, twice, reversed, 112), mutant `unique-id-order`. | +| F2 element bounds | FIXED | The `n > X5NMAX` (9999) guard is checked at the head of each pass, so pass 10000 returns before `bound 10000` can trap. It is present at `x509.om:858-862` (EKU), `899-903` (SAN), `992-996` (exts) and `1604-1608` (chain_host). The leaf `> X5LMAX` check at `1974` runs before `chain_leaf` and before any signature work. Tests: `eku/san_9999` OK and `eku/san/ext_10001` MALFORMED, `leaf_too_big`, mutants `elemcap` (the uncapped list traps, which counts as detected) and `leaf-size`. | +| F3 tls_hsmsg trap | FIXED | `tls.om:599-604`: at `k > 4000` it returns TLEBIG, below `bound 4096`. A CCS flood now ends at the second CCS because of the TLCCS check. Tests: interop `frag` and `ccsflood`, mutant handshake record cap (it reaches the bound, traps, and the row fails). | +| F4 tls_read trap | FIXED | `tls.om:1737-1742`: at `k > 1001` it calls `tls_abort` with TLEUNEX. `k` is counted per call and the loop returns as soon as data is pending. Tests: `empty1500`, `tickets1500`, `empty50` (OK), mutant read record cap. | +| F5 nameConstraints | FIXED | `x509.om:951-953`: OID 20 returns X5ENC whatever its criticality, before the critical/unknown branch. The check is in `x509_ext`, so it covers anchors, intermediates and the leaf. A store root carrying NC becomes unusable, which fails closed. Tests: `name_constraints_noncritical(_violated)`, mutant `name-constraints-noncritical`. | +| F6 RSA cost | FIXED | `x509_rsaexp` (611-631) accepts at most 4 content bytes, odd, ≥3. A bad exponent adds X5RBADE (2^32) to X5RBITS, and `x509_rsaok` (635) requires 2048..4096, so it is refused. It is enforced on presented intermediates in `chain_try` (1812, before `chain_link`/signature), on the leaf in `chain_leaf` (1896) and in `x509_cv_verify` (2035). Anchors only need ≥2048 at `chain_sig` (1653). The store is trusted, so a bad-e anchor is a local-config matter, not an attacker path. Tests: the `rsa_*` leaf and intermediate cases, `cv_rsa_6144`, `cv_rsa_e_2_32_plus_1`, and the 2 mutants. | +| F7 CCS policy | FIXED | `tls.om:532-539`: a plaintext CCS must be exactly `01`, length 1, with TLCCS==1, then TLCCS=2. TLCCS is 0 before ServerHello, set to 1 at 1088 together with TLRK=1, and set to 2 by the first protected record (552). An encrypted inner type 20 returns TLEUNEX (579-581). `tls_init` zeroes c[0..TLRB) including TLCCS at 496, and offset 496 does not overlap TLDET (492, 4 bytes) or TLEPK (512). Tests: `ccs2`, `ccsflood`, `ccspre`, `ccslate`, `encccs`, mutant CCS count. | +| F8 DNS | FIXED | Mask 64015 = 0xFA0F, expected 0x8000 (2000). The question is compared case-insensitively (`dns_qeq`). `dns_ans` follows the owner/CNAME chain through `dns_neq`, which is capped at 400 steps and uses `tls_at` (256 past the end), so it never traps. `dns_skip` returns 0 at 128 labels or more, before `bound 128`. `dns_rr` checks `p+10` and `rdlen` against `len r` before `dns_rrty`/`dns_rrip` read. The `dns_ans` `for an` loop is at most 65535. Tests: `dnsunit.om` (21 cases) and 3 DNS mutants (trap counts as detected). | +| F9 CV negative | FIXED | Interop `cvbad` and `cvkey`; imut `ret TLECV→ret 0`. A server that skips CV is not a row; see N2. | +| F10 test gaps | FIXED | The crafted x509 fixtures, fakesrv rows and DNS unit tests above. Interop rows compare an exact `TLSERR … (exit N)` string, so a trap (exit ≥100) fails the row. | +| F11 info | FIXED/DOC | `tls_close` (1803-1817) keeps TLPH=3. A close_notify during the handshake now returns TLEALRT detail 0 (`tls_hsmsg`), and it is tested by `closehs`, `closepre` and 2 mutants. The remaining items are documented, not changed: deadline, clock, PSL, CertificateRequest, and no path backtracking. | + +## New holes checked (none found) +- TLCCS cannot be re-armed after it reaches 2: it is written only at 1088 (SH), 537 and 552, and SH is processed once. HRR is refused, so there is no second SH. +- The 4000-record handshake cap and the 1000-record read cap return errors rather than traps. They cannot fire on conforming GitHub or Gandi peers [INFERENCE: real servers do not send 1000 empty records or split a message over 4000 records]. +- No consumer is confused by the X5RBADE offset in X5RBITS. All 4 reads (1653, 1851, 1896, 2035) treat it as "fails policy"; anchors pass ≥2048 by design. +- `dns_ptr` and `dns_neq` were checked for pointer loops, truncated pointers, out-of-range label bytes and label length >63. The 400-step cap ends in 1, and there is no indexing outside `tls_at`. + +## Residual (non-blocking) +- **N1 INFO**, `tls.om:2168-2176` with `dns_query` at 1925. `dns_a4` builds the query in `new uchar 300`. `tls_cpy q 13 hn` runs before `dns_labels`, so a caller-supplied `hn` of 288 bytes or more given to `tls_dial` traps. This is caller-controlled, not network-controlled, and is unchanged from the first review. Fix: `if gt len hn 253 ret TLEDNS` at the top of `dns_a4`. (Closed in 2238f043, see below.) +- **N2 LOW test gap.** There is no fakesrv row where the server omits CertificateVerify and sends Finished. It would be refused by the message-order check, which existing rows do not isolate. Optional fix: a `cvskip` row. (Closed in 2238f043, see below.) +- **N3 note.** The README claim "each has a test that fails on the code before the fix" was not run by me (NOT_RUN). The mutant list and fixture names match the code. + +## Delta 2238f043 (over cdcf4229, `om/tls` only) + +VERDICT: PASS + +Scope: I read the current tree at 2238f043. Nothing was run; test outcomes are NOT_RUN by me. + +| Change | Assessment | Evidence | +|---|---|---| +| Trust anchors must be self-issued | Correct, fails closed | `chain_self` (`x509.om:1747-1760`) returns 1 only when the issuer DER and subject DER are byte-equal, using the record that `chain_anchor` (1777) just filled from the same `part st p l` view, so the offsets are consistent. `chain_alink` (1764-1769) returns X5EUNK for a non-self-issued entry, so `chain_anchor` skips it and keeps `res = X5EUNK`. An intermediate placed in the store can no longer short-cut the path; this matches OpenSSL without `-partial_chain`. Real roots in ca-certificates are self-issued [INFERENCE; the `real_*` X509_OK rows exercise this when run]. Tests: `cases.txt:26` `store_intermediate_anchor` → UNKNOWN_ISSUER, mutant `anchor-self-issued` (`run.sh:133`, its sed target matches `x509.om:1765` exactly). | +| `now >= notAfter` is expired | Correct, stricter than RFC 5280 and the same as OpenSSL | `chain_time` `x509.om:1631` `if le get r X5RNA nw` → X5EEXP. Valid iff notBefore ≤ now < notAfter. Header note at `x509.om:8-9` updated. Tests: `cases.txt:34-36` (notAfter−1 OK, ==notAfter EXPIRED, +1 EXPIRED), mutants `date-not-after` and `date-at-not-after` (`run.sh:129,131`; both sed patterns match the new line 1631, so neither is a no-op). | +| `dns_a4` hostname cap | Closes N1 | `tls.om:2164-2167`: `if gt len hn 253` returns TLEDNS before `new uchar 300`. The largest query is then 12 + 1 + 253 + 1 + 4 = 271 bytes, under 300. Mutant `run.sh:86` `dns_a4 name length unchecked`. | +| `cvskip` interop row | Closes N2 | `fakesrv.py:17,132,143-144`: Certificate then Finished, with CertificateVerify omitted from both the wire and the transcript. `interop.sh:163` expects exactly `TLSERR TLS_ERR_UNEXPECTED_MESSAGE`. | + +New issues: none blocking. +- **D1 NIT (doc)** `test/x509/vectors/cases.txt:5` still says leaves are valid "... 2027-01-01 (1798761600) inclusive". After this change the bound is exclusive (`at_not_after` on line 35 expects EXPIRED). The comment should say "exclusive" or "until". diff --git a/evidence/om-tls-review-2026-10-26/security-review.md b/evidence/om-tls-review-2026-10-26/security-review.md new file mode 100644 index 000000000..cfc5957eb --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/security-review.md @@ -0,0 +1,265 @@ +# Security review: om/tls (aien-dev/omega-mv, branch feat/om-tls, tree /tmp/omtls) + +Reviewer: security-reviewer subagent, read-only. **Nothing was compiled or run.** Every runtime +statement below comes from reading the code and the OMEGESE trap rules (`docs/one_layer/OMEGESE.md:58-60,131-134`: +a `while … bound N` traps 4 if its condition is still true at the head of pass N+1; a trap ends the process with +exit 100+code). Runtime status is NOT_RUN: no finding was EXERCISED. +Contract: `/home/drakestapleton/handoffs/omega-tls/tls-contract.md` ("untrusted input must never trap", +"secrets constant time", "tag compare constant time"). + +Line numbers refer to the tree as read on 2026-10-26 (tls.om 2130 lines, x509.om 1955 lines). + +## Findings + +### F1. MEDIUM: certificate with 5 uniqueIDs traps the client before authentication. x509.om:1004 +`x509_tbs2` reads issuerUniqueID/subjectUniqueID with `while lt s b bound 4`. Each `0x81`/`0x82` element +`continue`s, and nothing enforces order or uniqueness. +- Failing input: a v2 or v3 TBSCertificate whose subjectPublicKeyInfo is followed by `81 00 81 00 81 00 81 00 81 00`, + or by four `81 00` and then the `[3]` extensions. Pass 5's head sees `s < b` and the process traps 4 (exit 104). +- Reach: the leaf is parsed in `chain_leaf`, and presented intermediates in `chain_try`, before any signature is + checked. Any server can kill the client. So can an on-path or DNS attacker, because the Certificate comes from + whoever terminates the handshake. +- Violates the contract rule "untrusted input must never trap", and README.md:165. +- Fix: accept at most one `0x81`, then at most one `0x82`, in that order (track the last tag), otherwise + X5EMAL; or replace the bound with a counter that returns X5EMAL. + +### F2. MEDIUM: element-count bounds of 10000 are reachable from a single certificate (trap 4). x509.om:809, 845, 930, 1534 +`x509_eku` (809), `x509_san` (845), `x509_exts` (930) and `chain_host` (1534) each loop +`while lt s b bound 10000`, one element per pass. +- Failing inputs (smallest elements): + - EKU containing 10001 × `06 00`: about 20 KB. + - SAN containing 10001 × `80 00` (an otherName-tag-shaped GeneralName, skipped as non-dNSName): about 20 KB. + This traps in `x509_san`, or in `chain_host` if parsing passes. + - Extensions containing 10001 × `30 04 06 00 04 00`: about 60 KB. The duplicate check needs a known OID, so + empty or unknown OIDs repeat freely; if empty OIDs are refused, use `30 05 06 01 00 04 00`, 7 bytes, 70 KB, + which still fits. +- Reach: the leaf has no size cap before `x509_chain_verify`; TLLFSZ is only checked in `tls_leaf`, after + verification (tls.om:1240-1250). A Certificate message can be up to TLHBSZ = 65536 bytes. Presented + intermediates are capped at X5KBUF = 16384 bytes, which is below the EKU/SAN threshold, so the leaf is the + vector. Same attacker set as F1. +- Fix: return X5EMAL when a counter reaches the cap instead of relying on `bound`. Alternatively set each bound + above the largest count the byte budget allows (len/2 + 1 for 2-byte elements). Cheapest of all: cap leaf + size at TLLFSZ before calling `x509_chain_verify`, then make each bound ≥ 16896/2. + +### F3. MEDIUM: `tls_hsmsg` traps on 4096 records that add no handshake bytes (on-path, before authentication). tls.om:588 +`tls_hsmsg` is `while true bound 4096`, one record per pass. `tls_rdrec` (tls.om:527-532) accepts an +unencrypted ChangeCipherSpec record (`14 03 03 00 01 01`) at any time, including after handshake keys are +installed, because the type-20 test runs before the `TLRK` test. `tls_hsmsg` then skips it without counting. +- Failing input: an on-path attacker injects 4096 six-byte CCS records (24 KB) into the server's flight after + ServerHello. The client traps 4. With an error instead of a trap, the same attacker would only cause an + ordinary connection failure. +- Second trigger: a hostile but authenticated-later server fragments EncryptedExtensions/Certificate into ≥ 4096 + one-byte records. The record layer is legal and Certificate may be 65 KB. +- `ret TLEUNEX` at the end of the loop (≈ line 619) can never run. +- Fix: allow at most one plaintext CCS (RFC 8446 §5 middlebox compatibility), and none after the first protected + record. Count records in a variable and return TLEUNEX/TLEBIG at a cap at or above TLHBSZ + 8, rather than + reaching `bound`. + +### F4. LOW-MEDIUM: `tls_read` traps on 999,999 records that carry no data (authenticated peer). tls.om:1714 +`while true bound 999999` only exits when `TLPN > 0`, at close_notify, or on an error. Zero-length +application_data records are valid. Each is 22 bytes on the wire: header, inner type, tag. +NewSessionTicket-only records (`tls_post` → `tls_hsdrop`) and KeyUpdate also leave `TLPN = 0`. +- Failing input: the authenticated server (or a compromised CDN edge) sends 999,999 empty type-23 records + (≈ 22 MB). The client traps 4 inside `tls_read`. +- Fix: count consecutive records that deliver no data and return a normal error (for example TLEUNEX after + 1024), or turn the loop into an explicit counter that ends in an error. + +### F5. MEDIUM: a non-critical nameConstraints extension is silently ignored. x509.om `x509_ext` (≈861-917), README.md:79-80 +Only a *critical* nameConstraints (known-OID index 20) returns X5ECRIT. A non-critical one is parsed past +and its restrictions are never applied. +- Scenario: a technically constrained subordinate CA, for example `permitted;DNS:example.com`, marked + non-critical. Historically the CA/B Forum Baseline Requirements and Mozilla allowed this for compatibility. + If that CA issues for `api.github.com` or `mail.gandi.net`, this client accepts the chain. OpenSSL and NSS + enforce the constraint and refuse it. +- The README documents the behaviour ("a critical one is refused"), but it is a fail-open default on a path + that protects the GitHub token and SMTP credentials. The only test is `name_constraints_critical` + (gen_pki.sh intNC, `critical,permitted;DNS:example.test`), so no non-critical case is covered. +- Fix: refuse nameConstraints on any issuer whether critical or not (X5ECRIT), or implement dNSName + permitted/excluded subtree matching for the leaf SAN. Add a non-critical test case either way. + +### F6. LOW: attacker-chosen RSA exponents give a large CPU cost per presented certificate. rsa.om:16-17, 28-29 (policy), `rsa_key` (340-389); x509.om:1568-1581 (`chain_sig`) +`rsa_key` accepts any odd e ≥ 3 with bitlen(e) ≤ bitlen(n), and n up to 8192 bits. The rsa.om note says the +cost "is a CPU cost the caller accepts by passing such a key". x509.om's `chain_sig` passes keys taken from +*presented* candidate certificates, which the attacker controls, and limits only the modulus minimum (≥ 2048). +- Modelled cost: one Montgomery product for s = 256 limbs is about 2s² = 131,072 limb mul-adds. An all-ones + 8192-bit e needs about 8192 squarings and 8192 multiplies, about 2.1 × 10⁹ limb mul-adds per verification. + For e = 65537 with a 2048-bit key it is 2·32²·18 ≈ 36,864. + `WolframLanguageEvaluator: s=256; {2 s^2, 2 s^2*16384, 2*32^2*18} -> {131072, 2147483648, 36864}`. +- Up to 15 presented candidates can be tried, and none of this time counts against `tls_deadline`, which only + covers I/O waits. A MITM can hold the client CPU-bound for a long time. Wall-clock time is not measured. +- Fix: at the X.509 layer, require e ≤ 2³² − 1 (or exactly 65537) and n ≤ 4096 bits for keys in presented + certificates and the leaf. Web PKI root programs already require these limits. + +### F7. LOW: protected and repeated ChangeCipherSpec records are accepted during the handshake. tls.om:527-532, 609-616 +Two defects share one root cause: +1. A record whose *inner* content type is 20 after decryption is skipped silently in `tls_hsmsg`, because the + test is `if ne ty 20`. RFC 8446 §5 requires the unexpected_message alert for an encrypted CCS. +2. Plaintext CCS is accepted any number of times, and also before ServerHello. + +The fix in F3 covers both: accept CCS only as an unprotected record, at most once, between ServerHello and the +server Finished. + +### F8. LOW-MEDIUM (DoS) / INFO: DNS answer handling. tls.om:1886-1890 (comment), 1930 (`dns_skip`), 1950-2000 (`dns_parse`) +- `dns_skip` is `while lt p z bound 128`. An answer owner name made of ≥ 128 one-byte labels (256 bytes) traps 4. + Attackers able to send this: the resolver, an on-path attacker, or an off-path spoofer that matches the 16-bit + ID on the connected UDP port. Fix: return 0 after 127 labels, or when the name passes 255 bytes. +- The flag mask 33295 (0x820F) at line 1959 tests QR, TC and RCODE, but not the opcode (bits 11-14). This + contradicts the comment at line 1789 ("opcode 0"). Fix: mask 0xFA0F, expect 0x8000. +- The owner name of the answer RR is never compared with the question. The first IN A record anywhere in the + answer section is used. +- One `recv` per attempt, so a single garbage datagram fails the lookup. +- TLS authentication limits all of this to denial of service, as README.md:81-83 says. + +### F9. LOW (test gap): no negative control for CertificateVerify. test/tls/run.sh, interop.sh, kat.om +- No interop row and no KAT check reaches `TLECV`, and kat.om has no CV or x509 reference at all. +- In every row, the chain is either valid with an honest CertificateVerify, or rejected earlier at the chain + check. +- A mutant `s/^ret TLECV$/ret 0/` (tls.om:1278) or "ignore `tls_cvcall`" would survive the whole suite + [INFERENCE from reading the rows; not executed]. +- CertificateVerify is the only proof that the server holds the leaf key. Without it, an attacker who replays a + valid public certificate chain is stopped only by the Finished MAC, which the same attacker can compute + because it chose the ECDHE share. +- Fix: + - Add a fakesh-style server that sends a valid chain for `localhost` (from the test PKI) plus a CV signed by a + different key, expecting TLS_ERR_CERTIFICATE_VERIFY (alert 51). + - Add a server that skips CV (Certificate followed directly by Finished), expecting TLEUNEX. + - Add both as `imut` mutants. + +### F10. LOW (test gap): fuzzing and interop do not exercise F1-F4 or F7. test/x509/vectors/cases.txt:181-184, test/tls/fakesh.py +- The x509 fuzz applies 800 deterministic single mutations to valid lists. Those never repeat an element 5 or + 10001 times. +- fakesh only crafts the ServerHello. +- No case covers CCS flooding, inner type 20, record fragmentation, zero-length application data, KeyUpdate, + NewSessionTicket floods, truncation before close_notify, or CertificateRequest. +- Add each as an interop or fakesh row that expects a named error and treats any exit ≥ 100 (trap) as FAIL. + +### F11. INFO +- `tls_close` (tls.om:1772-1782) sets TLPH = 2 even from state 3 (failed). A later `tls_read` then returns 0, + which reads like a clean close_notify. Keep state 3 when the connection had failed. +- A close_notify received during the handshake makes `tls_connect` return internal code TLCLOSE (100), which + `tls_errname` maps to TLS_ERR_UNKNOWN. The return is nonzero, so this is not a bypass, but it should be a + named error. +- `tls_deadline` 0 means 30 s per wait with no overall cap (README.md:45 is accurate but easy to misread), so a + slow-drip server can stretch the handshake. CPU time (F6) is not covered by any deadline. +- `tls_hq` uses the realtime clock, so the host clock decides certificate validity. +- Wildcards are not checked against a public-suffix list (`*.co.uk`); this relies on CA policy. +- Caller-contract traps, not attacker-reachable: + - `dns_query` with a hostname longer than the query buffer (`tls_dial` does not validate it, unlike + `tls_init`); + - `tls_write` with more than 16 GB (bound 999999 × 16384); + - `/etc/resolv.conf` with more than 4096 consecutive blanks (tls.om:1869); + - a trust bundle larger than TLSTSZ fails closed. +- CertificateRequest extensions are not validated. This is harmless because an empty Certificate is always + sent. +- `chain_pres`/`chain_path` (x509.om ≈1703-1745) commit to the first presented candidate whose signature + verifies, then check `chain_ca`, with no backtracking. This fails closed and affects availability only. + +## Checked and found sound + +**AEAD** +- `aead_chacha_open` (chacha.om:423-445): the Poly1305 tag is computed over AAD and ciphertext first, then the + 16 bytes are OR-accumulated with no early exit, and the one-time key is wiped. On mismatch the ciphertext + region is zeroed and 1 is returned. Decryption runs only after the tag matches. +- `gcm_open1` (aesgcm.om:615-630): the same pattern (GHASH, then OR-accumulated tag compare, then wipe or CTR). + `gcm_clear` wipes round keys, H and state on every path. The bitsliced AES has no secret-indexed tables + (per the module notes; not timed). + +**X25519** (x25519.om:298-326) +- Inputs are length-checked, the scalar is clamped, the ladder has a fixed count of 255 steps, cswap is masked, + and the all-zero result is detected without branching (`x25519_fenc`). +- The workspace and scalar copy are wiped. +- tls.om:1035 propagates the zero result: the fakesh `zero` row expects ZERO_SHARED_SECRET. + +**ECDSA** (ec.om:495-646) +- Public key: exactly `04‖X‖Y`, X < p and Y < p, and an on-curve equation check. +- DER: strict, short-form, minimal INTEGERs, no trailing bytes. An oversized INTEGER is replaced by n, so it + fails the range check. +- r and s are both checked to lie in [1, n−1]. +- A result at infinity is rejected, and x(R) mod n is compared with r. +- Curve constants are recorded as Wolfram-checked in test/ec/wolfram.txt (the file was not re-checked here). + +**RSA** +- PKCS#1 v1.5 builds the whole k-byte block and compares it byte for byte; the block is never parsed. The + DigestInfo prefixes are verbatim from RFC 8017. +- The PSS path checks the exact salt length. The X.509 layer requires salt = hash length, the trailer, the + emBits mask and the zero PS. +- s ≥ n and a signature length different from the modulus length are both rejected. +- Only the exponent policy is weak (F6). + +**Handshake order and authentication** +- Order: ServerHello → EncryptedExtensions → optional CertificateRequest → Certificate (empty context) → + CertificateVerify → Finished (32 bytes, `tls_cteq`). +- Transcript ranges and key-schedule labels follow RFC 8446 §7.1. The RFC 8448 KAT covers them, and 4 library + mutants were read. +- `TLHF == 0` is enforced at each key change. +- Every failure goes through `tls_abort` (phase 3, keys wiped). +- A `TLECV`/`TLEFIN` result is mapped to alert 51 (tls.om:1494). + +**ServerHello** +- Exact version, HRR detection, constant-time session-ID echo, offered suite only, compression 0. +- Extensions are exactly supported_versions (0x0304) and an x25519 key_share, each at most once, with exact + framing. +- Only TLS 1.3 is offered, so there is no downgrade path. + +**EncryptedExtensions** +- Only SNI (empty), supported_groups and ALPN are accepted, with no duplicates. ALPN must be exactly the offered + `http/1.1`. + +**Record layer** +- Lengths: at most 16640 on the wire, at most 16384 of plaintext, ciphertext of at least 17. +- After keys are installed, only type 23 is accepted (CCS excepted, F7). A plaintext alert or handshake record + is refused. +- Nonce = IV XOR seq. Seq refuses 2⁶⁴−1 instead of wrapping and is reset on key install. +- An all-zero inner plaintext is refused, and plaintext is exposed only after a successful open. +- An alert must be 2 bytes long. EOF without close_notify gives `-TLS_ERR_EOF`. +- Buffer offsets end exactly at TLCSZ = 119296. + +**Post-handshake** +- `tls_post` (bound 4096 messages per record ≤ 16384/4 is unreachable). +- NewSessionTicket is dropped, and anything other than NewSessionTicket or KeyUpdate is refused. + +**Bounded loops checked unreachable** +- The ServerHello/EncryptedExtensions extension loops (bound 64) end within 4 passes. +- The padding scan (bound 20000 > 16624). +- `chain_index` (bound 100000 > 65536/5). +- `der_hdr` (≤ 3 length octets, minimal, never reads past the end). +- `rsa_bits`. +- The MGF1 loop (bound 999 > 1024/32). + +**X.509** +- Strict DER for time (UTC pivot, GeneralizedTime, Z only), AlgorithmIdentifier (NULL or absent, exact PSS + parameters, ECDSA without parameters), tbs/outer algorithm equality, version, and serial of 1..21 bytes. +- basicConstraints, keyUsage, EKU and SAN framing. Known extensions at most once; an unknown critical extension + gives X5ECRIT. +- Leaf: + - SAN dNSName only, with no CN fallback. + - LDH host names; IP literals refused. + - Wildcard only as the whole leftmost label. + - Not a CA; digitalSignature; serverAuth. + - RSA ≥ 2048 bits. +- Issuers: + - Byte-equal DER names and consistent algorithm/key pairs. + - CA:TRUE, pathLen, keyCertSign, EKU, validity. + - Each presented certificate used at most once, depth ≤ 8, at most 16 entries. +- `x509_cv_verify`: the curve must match the scheme, rsa_pkcs1 is refused, and RSA must be ≥ 2048 bits. The leaf + in TLLF is the same bytes `chain_leaf` validated. +- PEM/base64 decoding of the local trust store is strict. + +**Constant time for secrets** +- `tls_cteq` (tls.om:172) for Finished, the session ID and ALPN. +- The README side-channel table (README.md:85-103) matches the code read; the DIT and padding caveats are + stated. + +**README claims checked** +- The API, the documented limits and the "not implemented" list match the code. +- Two claims are contradicted: + - "Untrusted input must never trap" (README.md:165, and the module notes such as x509 and tls): see F1-F4 and + F8. + - Mutant counts: run.sh has 1 expectation + 4 KAT + 4 interop mutants = 9, matching "9/9". x509 run.sh has + 3 library + 1 expectation = 4, matching "4/4". These counts are accurate, but none of the mutants targets + CertificateVerify (F9). + +## Not reviewed in depth +- sha2.om and hkdf.om internals. Their KATs and Wycheproof counts are cited in the README and were not re-run. +- client.om and parity.py. +- AES S-box gate correctness. diff --git a/evidence/om-tls-review-2026-10-26/tls-contract.md b/evidence/om-tls-review-2026-10-26/tls-contract.md new file mode 100644 index 000000000..62093f247 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/tls-contract.md @@ -0,0 +1,77 @@ +# om/tls contract (OmegaTLS lane, 2026-10-26) + +Goal: a TLS 1.3 client in seeded Omega, as source library units in aien-dev/omega-mv `om/tls/`. +Consumers: catalog.om (HTTPS GET api.github.com, raw.githubusercontent.com), omega_projects_pusher +(api.github.com), allen_relay_mailer (SMTPS mail.gandi.net:465). + +## Toolchain (pinned; never rebuild it, never edit compiler source) +- Source: omega-mv main 19f014f2178ca9cd3473728fe00a475a2398c409, clone at /tmp/omtls (shared tree; + write ONLY your own files listed in your task; no git commands that change state there). +- Compiler: /tmp/omtls/seed/out/omc, sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d. + Check the hash before trusting results. Compile: `omc < unit.om > bin 2> bin.err`; rc 0 + empty + stderr = accepted. Never run output of a failed compile. Runtime trap = exit 100+code. +- Language reference: /tmp/omtls/docs/one_layer/OMEGESE.md sections 3, 9, 9.13 (OM-2), 10 (host words). + Read it before writing code. Fixtures: /tmp/omtls/seed/omc/om2/. Prior-art crypto in .om (OM-1 style, + read-only reference for idioms): /tmp/omnet-ro/om/sha512/sha512.om, /tmp/omnet-ro/om/ed25519/ed25519.om + and their test/run.sh + driver.om (vector-driver pattern to copy). +- HOST RULE: every build/test command runs under `nice -n 19 ionice -c3`; at most 2 parallel jobs. +- Math rule: any computed constant (curve params, Montgomery constants, primality, etc.) is either taken + verbatim from the standard (cite section) or computed at run time in .om, or checked with the + Wolfram MCP tool (write JSON to xd://mcp__wolfram_wolframlanguageevaluator), quoting the query. +- No Signed-off-by. No host-language implementation of any primitive: Python is allowed ONLY as + test tooling (vector converters from Wycheproof/NIST JSON/rsp to flat txt, differential oracles). + +## Language facts that bite (verified on this omc) +- Unit is OM-2: the build writes a single line `om2` first, then concatenates the library files, then + the program/driver. Library files themselves must NOT contain an `om2` line and must NOT have `fn main`. +- OM-2 gives: unsized params `a view uchar *` / `a edit ulong *` (len a = run-time count), `part A o k` + as an argument to an unsized param, hex literals `0xff` (lowercase), `rotr`/`rotl` on unsigned, + `for i T K unroll` (K<=64), `fn ... to T inline`. +- PARAMETER SLOTS: at most 6 per function; an unsized array costs 2 slots, a scalar or sized array 1. + So a function takes at most 3 unsized arrays. Pack small fixed inputs into one array. +- At most 16 live registers per function (error 12: split the function). Names other than functions: + at most 8 chars. Function names up to 63 chars. A new local may not equal ANY function, global, + const, text or struct name in the composed unit (error 10), nor a keyword/host word (send recv + connect bind listen accept random stat link fork read write len part out open seal field at ...). +- No implicit conversions; `ulong <bool>` is refused (error 9): build constant-time masks + arithmetically (e.g. m = sub 0 bit, eq-zero via ((d | (0-d)) >> 63) ^ 1). +- Globals cannot be passed as arguments (error 19). `new T N v` locals only in a function's outermost + block. Unsigned arithmetic wraps; signed traps on overflow. No 64x64->128 multiply: use 32-bit limbs + in ulong (or 16/26/51-bit radix as you choose) so products never exceed 2^64. +- Every loop is bounded (`while c bound N`, N<=999999; `for` traps after 1,000,000 passes). +- omc main limits per unit: 512 functions total (the WHOLE composed TLS client must fit, so keep your + module lean: target the function budget in your task), 8192 trap sites per function. + +## Naming (composition safety) +- Every library function name contains `_` and starts with the module prefix given in your task. +- Every const/text/global name is UPPERCASE and starts with your 2-letter module code. +- Locals/params: lowercase, no `_`, <= 8 chars. +- Library modules: no mutable globals (consts and texts are fine). Caller passes all workspace. + +## Error policy +- Functions that judge untrusted input return ulong: 0 = success/valid, nonzero = a documented + reject code (list them in your README section). Untrusted input must NEVER trap (check lengths + and ranges before indexing). Traps are only for caller-contract violations (e.g. output too small). +- Constant time: any function handling secrets (keys, plaintext, ephemeral scalars, MAC tags before + comparison) has no secret-dependent branch, loop count, or array index. Tag comparison is + constant-time. Signature verification inputs are public (variable time allowed; say so). + Wipe secret local arrays before returning where practical. Document exactly what is and is not + constant time, including the compiler-level caveat (omc emits plain AArch64; we rely on MUL/ADD/ + EOR/shift being data-independent; no DIT bit is set). + +## Tests (per module) +- Layout: om/tls/<module>.om, om/tls/test/<module>/{driver.om,run.sh,vectors/*,gen_*.py}. +- run.sh usage: `sh om/tls/test/<module>/run.sh /tmp/omtls/seed/out/omc`; builds into + /tmp/omtls/build/tls/<module>/ (build/ is gitignored); prints PASS/FAIL lines and a final line + `<MODULE> PASS vectors=N (wycheproof=W ...) mutants=M/M` or FAIL; exit 0 only if all pass. +- Vectors: committed flat-text files converted from the source, with a header recording source URL, + source commit/sha256 and license (copy the upstream LICENSE/NOTICE beside them). + Wycheproof clone (read-only): /tmp/wycheproof at commit d17cc89fa5c8f4f4d378b5385ebf75da5d0926c9, + files in testvectors_v1/. Run every test of every listed file; the expected outcome is the + Wycheproof `result` ("valid" must pass, "invalid" must be refused, "acceptable": record which way + you go and why). Report exact counts: total / valid-pass / invalid-refused / acceptable split. + Files whose algorithm we do not implement are listed as NOT_RUN with the reason. +- Mutants: at least one source mutant of the library per primitive (sed a real constant/operator in a + copy of the .om), which the driver MUST detect (exit 1 with MISMATCH lines; a trap or a crash does + not count as detection) — copy omnet's mutant() logic. Plus one expectation mutant. +- Also a negative control in the driver: flip one byte of a valid vector and require rejection. diff --git a/om/tls/.crumb b/om/tls/.crumb new file mode 100644 index 000000000..a838806b4 --- /dev/null +++ b/om/tls/.crumb @@ -0,0 +1,19 @@ +{ + "extensions": { + "generated": { + "children": [], + "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "compiled_at": "2026-10-30T16:55:04Z", + "compiler": "crumb-compile/1", + "digest": "sha256:3cff8cc0542c04e0db47b9a3daed0036eac78d03b725779e5a5a7ea39b2e4c9b", + "evidence_files": 0, + "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "files": 263, + "generated_at_commit": "08627238b84664212d8d5345803835f934e882e2", + "source_tree": "sha256:91d8192496a74bc14f1dc578b1c92741d3647abdbbd93b2968184b24b6e1211d" + } + }, + "name": "om-tls", + "purpose": "TLS 1.3 client (chacha20-poly1305, aes-gcm, x25519, P-256/RSA signatures, X.509 path validation) in seeded Omega with its KAT, DNS, interop and mutant suites", + "schema_version": "1.0.0" +} diff --git a/om/tls/AUDIT_SCOPE.md b/om/tls/AUDIT_SCOPE.md new file mode 100644 index 000000000..cca72bca4 --- /dev/null +++ b/om/tls/AUDIT_SCOPE.md @@ -0,0 +1,62 @@ +# Audit scope: om/tls and seed/net + +For an outside, independent security audit of the Omega TLS 1.3 client and the HTTP/1.1 unit it +transports. Revision: branch `audit/tls-outside-review` on aien-dev/omega-mv (base main `0b77e6ea` after the merge +of `705c0f01` work; compiler `seed/out/omc` sha256 +`2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`, also run on `189ada82`). + +## In scope + +| path | what | lines of .om | +|---|---|---| +| `om/tls/sha2.om`, `hkdf.om` | SHA-256/384, HMAC, HKDF | see `wc -l om/tls/*.om` | +| `om/tls/x25519.om` | X25519 (RFC 7748) | | +| `om/tls/chacha.om`, `aesgcm.om` | the two AEADs | | +| `om/tls/ec.om`, `rsa.om`, `x509.om` | P-256/P-384 ECDSA verify, RSA PKCS#1 v1.5 and PSS verify, X.509 chain | | +| `om/tls/tls.om` | handshake, records, KeyUpdate, deadlines, wiping, DNS A lookup, DIT probe | | +| `seed/net/http.om`, `https.om`, `notls.om` | HTTP/1.1 client and server, HTTPS transport, plain stubs | | +| `seed/json/*.om` only where `seed/net` composes it | | | +| `om/tls/test/**`, `seed/net/tests/**` | suites, fake server, residue scan, timing driver, mutants | | +| `.github/workflows/om-tls-arm64.yml` | hosted arm64 rerun | | + +Every implementation byte is `.om` compiled by the pinned `omc`. Python (`fakesrv.py`, `check.py`, +`residue.py`, `gen_crafted.py`, `parity.py`) and `openssl` are referees and fixtures only. + +## Out of scope + +- The compiler (`seed/omc/omc.om`, `seed/out/omc`) and its code generation; register and spill + hygiene is a stated limit (`THREAT_MODEL.md`). +- Server-side TLS (there is none), client certificates, session resumption, 0-RTT, early data, + ALPN beyond `http/1.1`, HTTP/2. +- Revocation (OCSP, CRL): absent by policy. +- The Linux kernel, `getrandom`, the socket layer, the Spark hardware. +- The rest of omega-mv. + +## Questions the auditor is asked to answer + +1. Does any branch, loop bound or memory index in the in-scope units depend on secret data? +2. Can any input from the network make the client trap (exit >= 100), loop without bound, or + exceed `TLCSZ`/`TLSTSZ`? +3. Is the key schedule, the nonce construction and the transcript hash exactly RFC 8446? +4. Is chain verification (`x509.om`) sound against the Wycheproof-free X.509 corners: name + constraints, EKU, key usage, path length, algorithm confusion, RSA key policy? +5. Are the key-lifetime, deadline and wiping paths reachable on every error path? +6. Does `seed/net/https.om` ever hand plaintext to a TLS socket or TLS records to a plain socket? + +## How to reproduce + +``` +git clone https://github.com/aien-dev/omega-mv.git && cd omega-mv && git checkout audit/tls-outside-review +sha256sum seed/out/omc # must print 2c824805...029f +sh om/tls/test/tls/run.sh "$PWD/seed/out/omc" # add TLS_NET=1 for the live rows +python3 seed/net/tests/check.py --keep /tmp/netcheck # add TLS_NET=1 for the live HTTPS GETs +python3 om/tls/test/tls/residue.py "$PWD/build/tls/tls/client/bin" "$PWD/build/tls/interop" +``` + +Prior inside reviews and their raw logs: `evidence/om-tls-review-2026-10-26/` (SHA-256 sums inside). + +## Reporting + +Findings go to aien-dev/omega-mv issues with the label `security`; embargoed findings to +drake@aienos.com. Each finding should name the unit, the line, the input that triggers it and, where +possible, a `fakesrv.py` mode or a vector file so the fix can carry a failing-before test. diff --git a/om/tls/README.md b/om/tls/README.md index 5abd57b31..3cab86165 100644 --- a/om/tls/README.md +++ b/om/tls/README.md @@ -43,16 +43,42 @@ All buffers are owned by the caller. `c` is the connection state, at least `TLCS e = tls_store st load /etc/ssl/certs/ca-certificates.crt e = tls_init c hostname flags flags 1: offer ALPN http/1.1; 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, - with no cap on the whole handshake (a slow server can stretch - it; CPU time is never covered) +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 -n = tls_write c bytes all bytes or -code +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`. + For STARTTLS (RFC 3207), do the plaintext exchange on `fd` first, then call `tls_connect`. See `test/tls/client.om`, mode `tsmtp`. @@ -93,7 +119,8 @@ For STARTTLS (RFC 3207), do the plaintext exchange on `fd` first, then call `tls - ChangeCipherSpec (stricter than RFC 8446 section 5): at most one, exactly the single byte 1, only after the ServerHello and before the first protected record. A second, early, late, protected or malformed CCS is `TLS_ERR_UNEXPECTED_MESSAGE`. -- Records: 64-bit sequence numbers, never wrapped (`TLS_ERR_SEQUENCE_LIMIT`). A record over +- Records: 64-bit sequence numbers, capped at 23726566 records per key (`TLS_ERR_SEQUENCE_LIMIT`, + see "Key lifetime" above; the client updates its own key before that). A record over 2^14 + 256 is refused. Plaintext is released only after its tag verifies. An end of TCP without close_notify is `TLS_ERR_EOF`, never a clean 0. A handshake message spread over more than 4000 records is `TLS_ERR_MESSAGE_TOO_BIG`; more than 1000 consecutive records without application @@ -130,7 +157,9 @@ Constant time here means that no branch, loop count or memory index depends on a Not covered, or covered only partly: - **CPU timing.** omc emits plain AArch64. The constant-time claims rely on MUL, ADD, EOR, AND, - ORR and the shifts having data-independent timing. The DIT bit is not set. + ORR and the shifts having data-independent timing. PSTATE.DIT is not set: `tls_hwdit` reports + whether the kernel advertises FEAT_DIT (HWCAP bit 24), and `msr DIT, #1` needs a compiler word + that omc does not have yet (proposal in `THREAT_MODEL.md`). - **Record padding.** The inner-plaintext padding is stripped by a backward scan, so its time reveals the padding length. RFC 8446 section 5.4 accepts this. - **Lengths and outcomes.** Message lengths, record counts and whether a tag check failed are @@ -140,12 +169,15 @@ Not covered, or covered only partly: zero the keys in `c`. - **Conversions.** A `uchar` conversion of a secret value compiles to a range check whose branch is never taken. -- **No measurement proof.** No dudect-style statistical timing test has been run. The x25519 - timing figures in its test output are informational and were noisy on a shared host. +- **Measurement.** A dudect-style fixed-vs-random Welch t-test (`test/tls/timing.om`, 20000 to 50000 + samples per operation on two cores) found every |t| below 2.5 (flag threshold 4.5) for x25519, + ChaCha20-Poly1305, AES-128-GCM and `tls_cteq` on one Spark host, 2026-10-26. That is MEASURED on + one host, not a proof; the raw samples and the Wolfram queries are in the audit evidence bundle + (`THREAT_MODEL.md` says where). The x25519 figures in its test output are informational. ## Tests (run from the repository root) -| command | final line observed 2026-10-26 (omc `189ada82`; identical on `2c824805`, including `net=PASS`) | +| command | final 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 OMC` | `SHA2 PASS vectors=1777 (wycheproof=774) mutants=5/5` | | `sh om/tls/test/x25519/run.sh OMC` | `X25519 PASS vectors=531 (wycheproof=518) mutants=7/7` | @@ -154,7 +186,8 @@ Not covered, or covered only partly: | `sh om/tls/test/ec/run.sh OMC` | `EC PASS vectors=3984 (wycheproof=3748 cavp=180 edge=56) mutants=6/6` | | `sh om/tls/test/rsa/run.sh OMC` | `RSA PASS vectors=6486 (wycheproof=5250) mutants=4/4` | | `sh om/tls/test/x509/run.sh OMC` | `X509 PASS cases=91 (openssl-parity=73/91) mutants=12/12` | -| `TLS_NET=1 sh om/tls/test/tls/run.sh OMC` | `TLS PASS vectors=24 (rfc8448) dns=23 interop=38 net=PASS mutants=19/19` | +| `TLS_NET=1 sh om/tls/test/tls/run.sh OMC` | `TLS PASS vectors=24 (rfc8448) dns=23 dit=1 interop=44 residue=PASS net=PASS mutants=27/27` (`net=NOT_RUN` without `TLS_NET`, observed on both compilers 2026-10-26) | +| `nice -n 19 taskset -c CPU build/tls/tls/timing WHAT N` (`test/tls/timing.om`) | dudect samples, statistics outside; see `THREAT_MODEL.md` | How the suites are built: @@ -170,7 +203,7 @@ How the suites are built: - **`test/tls`.** - The RFC 8448 section 3 KAT checks ECDHE, every secret, the keys and IVs, both Finished values, and record seal and open byte for byte. - - `interop.sh` runs 38 rows against `openssl s_server`, crafted ServerHellos and `fakesrv.py` + - `interop.sh` runs 44 rows against `openssl s_server`, crafted ServerHellos and `fakesrv.py` (a full TLS 1.3 server in Python that misbehaves after a valid handshake), all on 127.0.0.1. Ports already in use are skipped. Every failure row also checks that `tls_close` leaves the connection failed. @@ -200,6 +233,11 @@ The interop refusal table (`build/tls/tls/interop-table.txt`): | Certificate then Finished, no CertificateVerify | `TLS_ERR_UNEXPECTED_MESSAGE` | | 1500 empty application records; 1500 NewSessionTickets | `TLS_ERR_UNEXPECTED_MESSAGE` | | close_notify before the ServerHello and after it | `TLS_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 time | accepted (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` @@ -251,6 +289,35 @@ had 11 findings. Each one is fixed and has a test that fails on the code before | F10 F1-F4 and F7 not exercised | crafted x509 fixtures (`gen_crafted.py`), fake-server rows, DNS unit; a trap is a FAIL in interop | all rows above | | F11 info items | `tls_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 above | interop `CLOSE_NOT_FAILED` check on every failure row, `closehs`, `closepre`, mutants close revives failed and handshake close_notify unmapped | +Outside review (2026-10-26, `audit/tls-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 + +- **Timeouts.** A caller deadline (`tls_deadline`) bounds every call; without one the handshake is + bounded by `tls_hslimit` (default 30 s) and reads block as the socket does. `seed/net/https.om` + maps a TLS timeout to `HETIME`. +- **Key lifetime.** 23726566 records per direction and key (RFC 8446 section 5.5, the stricter + ChaCha20-Poly1305 figure for both suites); the client sends KeyUpdate one record before and refuses + with `TLS_ERR_SEQUENCE_LIMIT` at the limit on both directions. +- **Secret handling.** Every unit zeroes its own secret locals; `tls_close` and every failure zero + the keys, the ephemeral key, the handshake secrets and the record buffers in `c`. Registers and + compiler-spilled stack slots are not scrubbed (a compiler limit). `test/tls/residue.py` is the + check: after the handshake none of the twelve handshake-only secrets is in the process memory, + after `tls_close` none of the eighteen. +- **Revocation.** Not checked. There is no OCSP, no OCSP stapling (the client sends no + `status_request` extension) and no CRL. A revoked but otherwise valid chain verifies. Callers that + need revocation must enforce it outside this library (pinning in the trust store, short-lived + certificates). OCSP stapling needs a DER OCSP response parser, a second signature check and a + freshness policy; it was judged out of this lane's scope rather than built half-way. +- **Trust.** Only the caller's trust store (`tls_storef`); no system store, no name constraints, + no CT, as `What it does and refuses` says. + 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 diff --git a/om/tls/THREAT_MODEL.md b/om/tls/THREAT_MODEL.md new file mode 100644 index 000000000..aa058db96 --- /dev/null +++ b/om/tls/THREAT_MODEL.md @@ -0,0 +1,75 @@ +# om/tls and seed/net: threat model + +Written for the outside security audit (branch `audit/tls-outside-review`, base omega-mv main +`705c0f01`, omc `189ada82`). Facts here are what the code does at that revision; levels are +IMPLEMENTED (code exists), EXERCISED (a test ran on the Spark host), MEASURED (numbers from a run), +never QUALIFIED (no third-party or hardware qualification exists). + +## Assets + +1. The ECDHE private scalar, the shared secret, every handshake and traffic secret, the record keys + and IVs (`c[TLEPK..TLEPU)`, `c[TLSS]`, `c[TLHS..TLCRX)`, `c[TLWKEY..TLHOST)`). +2. Plaintext in the record buffers (`c[TLRB..TLCSZ)`) and in caller buffers. +3. The authenticity of the peer: the chain in the caller's trust store (`tls_storef`), host name + (`tls_init`), CertificateVerify and Finished. +4. Availability of the calling program: no trap on hostile input, bounded memory (`TLCSZ`, + `TLSTSZ`), bounded time (deadlines). + +## Attacker + +- Network attacker on the path: reads, injects, reorders, truncates, delays every byte; runs the + server (`fakesrv.py` models this); controls DNS answers (`dnsunit.om` models this). +- Not in scope: a local attacker on the same host (ptrace, /proc/PID/mem, core dumps, swap), a + compromised trust store, a compromised compiler or `seed/out/omc`, physical attacks, power or + electromagnetic side channels, speculative-execution side channels. +- Partly in scope: a co-tenant measuring timing. The units are written to be constant time in + secret data (README `Side channels`); the measurement below is host-only evidence. + +## Mitigations and their evidence + +| threat | mitigation | evidence | +|---|---|---| +| forged server | chain verification to the caller's roots, name check, CertificateVerify over the transcript, Finished over the transcript (`x509.om`, `tls.om`) | interop rows `cvbad`, `cvkey`, `cvskip`, `badchain*`; mutants chain result ignored, CertificateVerify ignored; EXERCISED | +| downgrade | TLS 1.3 only (`supported_versions` checked, `TLS_ERR_VERSION`); suites x25519 + ChaCha20-Poly1305 / AES-128-GCM only | mutant version not checked; EXERCISED | +| tampered records | AEAD with the TLS 1.3 nonce; tag failure is fatal (`TLS_ERR_BAD_RECORD_MAC`) | RFC 8448 KAT, mutant record MAC ignored; EXERCISED | +| key overuse | 23726566 records per key and direction: proactive KeyUpdate at limit-1 on write, `TLS_ERR_SEQUENCE_LIMIT` at the limit on both directions (`tls_open`, `tls_seal`, `tls_kusend`) | interop `kuexact`, `kurot`, `kuover`, `kuw:8` (test-only `tls_reclimit`); three mutants; EXERCISED | +| slow or stalled peer | caller deadline on every call; whole-handshake budget 30 s (`tls_hslimit`); record and message caps | interop `loris`, `slowsh`; mutant handshake budget not armed; EXERCISED | +| hostile DNS | flags, owner names, label and pointer caps; no trap | `dnsunit.om` 23 cases, 4 mutants; EXERCISED | +| memory exhaustion | fixed `TLCSZ` state, `TLSTSZ` trust store, 16 KiB bounce in `https.om`, element caps in x509 | x509 `leaf_too_big`, mutants read/handshake record cap; EXERCISED | +| secrets left in memory | units zero their secret locals; `tls_close`/`tls_abort` run `tls_wipe` (keys, ephemeral key, handshake secrets, record buffers); `tls_hskeys` zeroes the shared secret, `tls_cfin` the handshake secrets | `test/tls/residue.py` (`/proc/PID/mem` scan: 12 handshake-only secrets absent after the handshake, 18 absent after close; app keys present after the handshake as the positive control); mutants close keeps the traffic secrets, handshake secrets kept, shared secret kept; MEASURED `RESIDUE PASS secrets=18 hs_only=12` | +| timing | constant-time units (README table) | dudect-style Welch t-test, `test/tls/timing.om`: all 16 |t| values < 2.5 on two cores, v2 run 2026-10-26; MEASURED host-only (see "Timing measurement") | +| HTTPS misuse | `seed/net/https.om` refuses plaintext fall-back on a TLS port, maps EOF without close_notify to -604, wipes keys in `htlsend` | `seed/net/tests/check.py` stage 5: 9 rows, 5 mutants; `TLS_NET=1` live GETs; EXERCISED | + +## Known limits (not mitigated) + +1. **Registers and spilled stack slots.** omc does not scrub registers or spilled locals on + return. The residue scan looks at the whole writable address space of the process after the + calls return, so it would see a spilled secret that survived; it saw none at the scanned + points, but a scan is not a proof. A compiler-level wipe (zeroing the frame on return from + functions that hold secrets) is a proposal for the compiler lane, not implemented. +2. **PSTATE.DIT is not set.** `tls_hwdit` reports whether FEAT_DIT is advertised (HWCAP bit 24); the + library cannot execute `msr DIT, #1`. Probe (MEASURED, `evidence/dit-probe.log` in the handoff): + `mrs x0, DIT` = `d53b42a0`, `msr DIT, #1` = `d503415f`, `msr DIT, #0` = `d503405f`; Linux starts + the bit at 0, setting it from user space works and the kernel preserves it. Proposal for omc: a + word `dit v` (v in {0,1}) lowering to those two encodings, with `tls_connect` setting it for the + handshake. Until then the constant-time claim rests on the instruction set used (no table + lookups, no secret-dependent branches) and on the measurement. +3. **Revocation is not checked**: no OCSP, no stapling, no CRL (README `Policy`). +4. **Padding length and record lengths** are visible (RFC 8446 section 5.4). +5. **Caller buffers**: plaintext the caller receives from `tls_read` is the caller's to wipe. +6. **The random source** is Linux `getrandom` (blocking flag 0); no further entropy check. +7. **Single host, single toolchain**: every result above was produced on one DGX Spark (arm64, + GB10) with the pinned omc; the hosted arm64 CI job reruns the suites on a second machine, but the + compiler binary is the same pinned one. + +## Timing measurement + +`om/tls/test/tls/timing.om` times one operation per sample with `monons` after preparing an input +whose class (fixed pattern or `getrandom` bytes) is drawn per sample; both classes call `getrandom` +before the timed window so the cache and TLB state does not differ by class (the first driver did +not, and its cropped ChaCha20 rows produced |t| of 10.4 and 5.1, which vanished once the classes +were equalized; recorded in the evidence). Welch's t statistic was computed in Wolfram from per-class +counts and sums (full data and cropped at the pooled 90th percentile). Raw samples, sums, the binary +and the queries: `/home/drakestapleton/handoffs/TlsAudit/evidence/timing/` (`welch.md`). Reproduce: +`sh build/tls/tls/client/build.sh seed/out/omc om/tls/test/tls/timing.om build/tls/tls/timing` then +`nice -n 19 taskset -c 5 build/tls/tls/timing chacha 50000`. diff --git a/om/tls/test/tls/client.om b/om/tls/test/tls/client.om index 7714cdff9..e38a5d217 100644 --- a/om/tls/test/tls/client.om +++ b/om/tls/test/tls/client.om @@ -1,5 +1,5 @@ note client.om: test program for om/tls (program mode, composed after every om/tls unit). -note usage: client HOST PORT MODE [CONNECTHOST [STOREFILE]] +note usage: client HOST PORT MODE [CONNECTHOST [STOREFILE [PATH [OPTS]]]] note MODE get : HTTPS GET / (path from env-free arg 6 when given) with "Connection: close", note writes the decrypted response bytes to stdout note MODE smtp : implicit-TLS SMTP: reads the banner, sends EHLO and QUIT, writes the dialogue @@ -9,10 +9,15 @@ note handshake on the same connection, EHLO and QUIT inside TLS note CONNECTHOST (default HOST) is the name resolved for TCP; HOST is the TLS name (SNI and note certificate check), so a local server can be checked against a chosen name. note STOREFILE (default, or "-", the system bundle) is a PEM bundle of trust anchors. +note OPTS (tests) is "REC,HSMS,SPLIT,PAUSEMS": REC > 0 lowers the per-key record limit (tls_reclimit), +note HSMS > 0 sets the whole-handshake budget in ms (tls_hslimit), SPLIT = 1 sends the GET request +note one byte per record, PAUSEMS > 0 sleeps that long after tls_close before exiting (the stack +note residue check reads the process then). No deadline is set by the client: the library's +note handshake budget applies. note Exit 0 on success; on a TLS failure exit 10 + code and print "TLSERR <name> detail <n>". note Exit 2 for a usage error, 3 for a DNS/connect failure. -text cusage "usage: client HOST PORT get|smtp|hs [CONNECTHOST [STOREFILE [PATH]]]\n" +text cusage "usage: client HOST PORT get|smtp|hs|tsmtp [CONNECTHOST [STOREFILE [PATH [REC,HSMS,SPLIT,PAUSEMS]]]]\n" text cterr "TLSERR " text cdet " detail " text cnl "\n" @@ -255,22 +260,60 @@ end ret e end -note after the handshake: hs closes, smtp talks, get sends m and copies the response +note after the handshake: hs closes, smtp talks, get sends m (one record per byte when bit 7 of +note mode is set) and copies the response fn cl_after cs edit uchar * m view uchar * mode ulong to ulong io = new uchar 16384 0 -if eq mode 104 +md = and mode 127 +if eq md 104 tls_close cs ret 0 end -if or eq mode 115 eq mode 116 -ret cl_smtp cs io mode +if or eq md 115 eq md 116 +ret cl_smtp cs io md end +if eq and mode 128 0 r = tls_write cs m if lt r 0 ret ulong neg r end ret cl_drain cs io end +for i ulong len m +r = tls_write cs part m i 1 +if lt r 0 +ret ulong neg r +end +end +ret cl_drain cs io +end + +note OPTS "REC,HSMS,SPLIT,PAUSEMS" from w[1536..1536+n): v[7..10]; 1 on a bad option +fn cl_opts w view uchar * n ulong v edit ulong * to ulong +k = ulong 7 +x = ulong 0 +for i ulong n +ch = ulong get w add 1536 i +if eq ch 44 +put v k x +k = add k 1 +x = 0 +if gt k 10 +ret 1 +end +continue +end +if or lt ch 48 gt ch 57 +ret 1 +end +x = add mul x 10 sub ch 48 +if gt x 99999999 +ret 1 +end +end +put v k x +ret 0 +end note w regions: TLS name 0..256, connect name 256..512, path 512..1536, argument 1536..5632, note request 8192..16384. v: 0 name length, 1 connect length, 2 path length, 3 port, 4 mode, @@ -309,6 +352,13 @@ pl = cl_arg 6 part w 1536 1024 tls_mov w 512 1536 pl put v 2 pl end +if ge na 8 +ol = cl_arg 7 part w 1536 4096 +if ne cl_opts w ol v 0 +ret 2 +end +end +note the store argument is read last: cl_trust uses it from w[1536] after parsing put v 5 0 if ge na 6 sl = cl_arg 5 part w 1536 4096 @@ -326,13 +376,19 @@ end ret tls_storef st part w 1536 sl end -note TLS name and request; v[6] = request length; 0 or a TLS code +note TLS name, test options and request; v[6] = request length; 0 or a TLS code fn cl_prep cs edit uchar * w edit uchar * v edit ulong * to ulong fl = ulong 0 if eq get v 4 103 fl = 1 end e = tls_init cs part w 0 get v 0 fl +if and eq e 0 ne get v 7 0 +e = tls_reclimit cs get v 7 +end +if and eq e 0 ne get v 8 0 +e = tls_hslimit cs mul get v 8 1000000 +end put v 6 0 if eq fl 1 put v 6 cl_req w get v 0 get v 2 @@ -341,7 +397,7 @@ ret e end fn cl_main cs edit uchar * st edit uchar * w edit uchar * to int -v = new ulong 8 0 +v = new ulong 12 0 if ne cl_parse w v 0 x = write 2 cusage 0 len cusage ret 2 @@ -357,7 +413,6 @@ fd = tls_dial part w 256 get v 1 get v 3 if lt fd 0 ret 3 end -tls_deadline cs add monons 30000000000 e = ulong 0 if eq get v 4 116 e = cl_starttls int fd @@ -365,7 +420,12 @@ end if eq e 0 e = tls_connect cs st int fd end -ret cl_go cs int fd part w 8192 get v 6 add get v 4 shl e 8 +md = get v 4 +if ne get v 9 0 +md = or md 128 +end +md = add md shl get v 10 16 +ret cl_go cs int fd part w 8192 get v 6 add md shl e 8 end note mode in bits 0..7, the handshake result above. After a failure the connection must stay @@ -373,11 +433,17 @@ note failed through tls_close (security review finding 11): tls_read then gives note anything else prints CLOSE_NOT_FAILED before the TLSERR line fn cl_go cs edit uchar * fd int m view uchar * me ulong to int io = new uchar 16 0 -e = shr me 8 +e = and shr me 8 255 if eq e 0 e = cl_after cs m and me 255 end +if eq e 0 +tls_close cs +end x = fclose fd +if ne shr me 16 0 +sl = sleepns long mul shr me 16 1000000 +end if ne e 0 if eq get cs 0 3 tls_close cs diff --git a/om/tls/test/tls/dit.om b/om/tls/test/tls/dit.om new file mode 100644 index 000000000..86a007f2f --- /dev/null +++ b/om/tls/test/tls/dit.om @@ -0,0 +1,26 @@ +note DIT probe: prints "hwdit N" (1: FEAT_DIT advertised by the kernel, 0: not, -1: auxv unreadable) +note and exits 0 when N is 0 or 1, 1 otherwise. The expectation on a GB10 (Cortex-X925 / A725) is 1; +note dit.sh compares it with /proc/cpuinfo. +text dmsg "hwdit " +fn main to int +o = new uchar 16 0 +v = tls_hwdit +bad = ulong 0 +if or lt v 0 gt v 1 +bad = 1 +end +k = ulong 0 +if lt v 0 +put o 0 45 +k = 1 +v = neg v +end +put o k add 48 uchar v +put o add k 1 10 +w = write 1 dmsg 0 len dmsg +w = write 1 o 0 add k 2 +if eq bad 1 +ret 1 +end +ret 0 +end diff --git a/om/tls/test/tls/fakesrv.py b/om/tls/test/tls/fakesrv.py index 52f45b235..d37c68ca8 100755 --- a/om/tls/test/tls/fakesrv.py +++ b/om/tls/test/tls/fakesrv.py @@ -20,7 +20,16 @@ # tickets1500 1500 NewSessionTicket messages after the handshake -> UNEXPECTED_MESSAGE # closehs encrypted close_notify after EncryptedExtensions -> ALERT_RECEIVED 0 # closepre plaintext close_notify instead of the ServerHello -> ALERT_RECEIVED 0 -import hashlib, hmac, os, socket, sys +# Outside-review fixes (key lifetime and handshake deadline); the client runs with OPTS: +# loris ServerHello trickled one byte per 250 ms for 8 s, then close -> TIMEOUT (HSMS=2000) +# slowsh ServerHello one byte per 20 ms, then a correct handshake -> OK (HSMS=10000) +# kuexact 3 empty records, reply, close_notify = 5 under one key -> OK (REC=5) +# kuover 4 empty records, reply, close_notify = 6 under one key -> SEQUENCE_LIMIT (REC=5) +# kurot 4 empty, KeyUpdate at sequence 4, reply under the next key -> OK (REC=5) +# kuw:N reads the request under the client's key following its KeyUpdates; more than N +# records under one key, or no KeyUpdate at all, is answered with a fatal alert +# -> OK (REC=N, SPLIT=1) +import hashlib, hmac, os, socket, sys, time from cryptography import x509 from cryptography.hazmat.primitives import hashes, serialization from cryptography.hazmat.primitives.asymmetric import ec @@ -57,6 +66,16 @@ class Keys: hdr = b"\x17\x03\x03" + u(len(inner) + 16, 2) return hdr + self.aead.encrypt(nonce, inner, hdr) + def open(self, rec): + nonce = bytes(a ^ b for a, b in zip(self.iv, u(self.seq, 12))) + self.seq += 1 + inner = self.aead.decrypt(nonce, rec[5:], rec[:5]).rstrip(b"\x00") + return inner[-1], inner[:-1] + + +def next_secret(secret): + return expand_label(secret, b"traffic upd", b"", 32) + def recv_record(c): h = c.recv(5, socket.MSG_WAITALL) @@ -89,6 +108,18 @@ while p < end: q += 4 + kn p += 4 + n CCS = b"\x14\x03\x03\x00\x01\x01" +OKMODES = ("ok", "cvbad", "cvkey", "cvskip", "empty1500", "empty50", "tickets1500", + "slowsh", "kuexact", "kuover", "kurot") +kuw = mode.startswith("kuw:") # kuw:N: the client must rekey before N records under one key +hold = 0.0 +if mode.startswith("hold:"): # hold:S: write every secret to $FAKESRV_KEYS, wait S s, then reply + hold = float(mode[5:]) + mode = "hold" + OKMODES += ("hold",) +if kuw: + kulimit = int(mode[4:]) + mode = "kuw" + OKMODES += ("kuw",) if mode == "closepre": c.sendall(b"\x15\x03\x03\x00\x02\x01\x00") else: @@ -100,7 +131,22 @@ else: exts = ext(43, b"\x03\x04") + ext(51, b"\x00\x1d\x00\x20" + spub) body = b"\x03\x03" + os.urandom(32) + bytes([len(sid)]) + sid + b"\x13\x03\x00" + u(len(exts), 2) + exts sh = b"\x02" + u(len(body), 3) + body - c.sendall(b"\x16\x03\x03" + u(len(sh), 2) + sh) + shrec = b"\x16\x03\x03" + u(len(sh), 2) + sh + if mode == "loris": + # slow loris: one ServerHello byte every 250 ms, never finishing; the client must give up + # on its handshake budget (TLS_ERR_TIMEOUT), not wait for this close (TLS_ERR_EOF) + for i in range(32): + try: + c.sendall(shrec[i:i + 1]); time.sleep(0.25) + except OSError: + break + c.close(); sys.exit(0) + if mode == "slowsh": + # slow but finishing: the whole ServerHello one byte every 20 ms (about 2 s) + for i in range(len(shrec)): + c.sendall(shrec[i:i + 1]); time.sleep(0.02) + else: + c.sendall(shrec) c.sendall(CCS) if mode == "ccs2": c.sendall(CCS) @@ -111,6 +157,7 @@ else: early = extract(bytes(32), bytes(32)) hs = extract(expand_label(early, b"derived", H(b""), 32), shared) s_hs = expand_label(hs, b"s hs traffic", H(tr), 32) + c_hs = expand_label(hs, b"c hs traffic", H(tr), 32) sw = Keys(s_hs) hmsg = lambda t, b: bytes([t]) + u(len(b), 3) + b ee = hmsg(8, b"\x00\x00") @@ -129,7 +176,7 @@ else: c.sendall(sw.seal(22, big[i:i + 1])) except OSError: break - if mode in ("ok", "cvbad", "cvkey", "cvskip", "empty1500", "empty50", "tickets1500"): + if mode in OKMODES: der = lambda f: x509.load_pem_x509_certificate(open(f"{d}/{f}", "rb").read()).public_bytes(serialization.Encoding.DER) cl = b"".join(u(len(x), 3) + x + b"\x00\x00" for x in (der("good.pem"), der("int.pem"))) cert = hmsg(11, b"\x00" + u(len(cl), 3) + cl) @@ -146,23 +193,74 @@ else: fin = hmsg(20, hmac.new(expand_label(s_hs, b"finished", b"", 32), H(tr), hashlib.sha256).digest()) tr += fin c.sendall(sw.seal(22, cert) + (sw.seal(22, cv) if cv else b"") + sw.seal(22, fin)) - if mode in ("ok", "empty1500", "empty50", "tickets1500"): + if mode in ("ok", "empty1500", "empty50", "tickets1500", "slowsh", "kuexact", "kuover", "kurot", "kuw", "hold"): ms = extract(expand_label(hs, b"derived", H(b""), 32), bytes(32)) - aw = Keys(expand_label(ms, b"s ap traffic", H(tr), 32)) + s_ap = expand_label(ms, b"s ap traffic", H(tr), 32) + aw = Keys(s_ap) + if mode == "hold": + c_ap = expand_label(ms, b"c ap traffic", H(tr), 32) + keys = {"shared": shared, "early": early, "hs": hs, "c_hs": c_hs, "s_hs": s_hs, + "ms": ms, "c_ap": c_ap, "s_ap": s_ap} + for nm, sec in (("c_hs", c_hs), ("s_hs", s_hs), ("c_ap", c_ap), ("s_ap", s_ap)): + keys[nm + "_key"] = expand_label(sec, b"key", b"", 32) + keys[nm + "_iv"] = expand_label(sec, b"iv", b"", 12) + keys["c_fin"] = expand_label(c_hs, b"finished", b"", 32) + keys["s_fin"] = expand_label(s_hs, b"finished", b"", 32) + with open(os.environ["FAKESRV_KEYS"], "w") as f: + for nm, val in keys.items(): + f.write("%s %s\n" % (nm, val.hex())) c.settimeout(10) # client: change_cipher_spec, Finished, then the request - for _ in range(3): + for _ in range(2 if mode == "kuw" else 3): if recv_record(c) is None: break out = b"" - if mode == "empty1500": + if mode == "kuw": + # read the request one record at a time under the client's application key, + # following its KeyUpdates; refuse more than kulimit records under one key + c_ap = expand_label(ms, b"c ap traffic", H(tr), 32) + ar = Keys(c_ap) + req, used, updates, bad = b"", 0, 0, None + while b"\r\n\r\n" not in req: + rec = recv_record(c) + if rec is None: + bad = "eof"; break + used += 1 + if used > kulimit: + bad = "limit"; break + t, data = ar.open(rec) + if t == 22 and data[:1] == b"\x18": + c_ap = next_secret(c_ap); ar = Keys(c_ap); used = 0; updates += 1 + elif t == 23: + req += data + else: + bad = "type%d" % t; break + if bad is None and updates == 0: + bad = "noupdate" + print("kuw: updates=%d bad=%s" % (updates, bad), flush=True) + if bad is not None: + out = aw.seal(21, b"\x02\x0a") + elif mode == "empty1500": out = b"".join(aw.seal(23, b"") for _ in range(1500)) elif mode == "tickets1500": nst = hmsg(4, u(60, 4) + u(1, 4) + b"\x01\x00" + u(2, 2) + b"tk" + b"\x00\x00") out = b"".join(aw.seal(22, nst) for _ in range(1500)) elif mode == "empty50": out = b"".join(aw.seal(23, b"") for _ in range(50)) - if mode in ("ok", "empty50"): + elif mode == "kuexact": + # with the client's limit at 5: records 0..4 = 3 empty, the reply, close_notify + out = b"".join(aw.seal(23, b"") for _ in range(3)) + elif mode == "kuover": + # 4 empty + reply + close_notify = 6 records under one key: the 6th must be refused + out = b"".join(aw.seal(23, b"") for _ in range(4)) + elif mode == "kurot": + # 4 empty, then KeyUpdate at the last allowed sequence number, reply under the next key + out = b"".join(aw.seal(23, b"") for _ in range(4)) + out += aw.seal(22, hmsg(24, b"\x00")) + s_ap = next_secret(s_ap); aw = Keys(s_ap) + if mode == "hold": + time.sleep(hold) + if mode in ("ok", "empty50", "slowsh", "kuexact", "kuover", "kurot", "hold") or (mode == "kuw" and not out): out += aw.seal(23, b"HTTP/1.0 200 ok\r\ncontent-length: 3\r\n\r\nok\n") + aw.seal(21, b"\x01\x00") try: c.sendall(out) diff --git a/om/tls/test/tls/interop.sh b/om/tls/test/tls/interop.sh index baab42c6f..ef82b5ed0 100755 --- a/om/tls/test/tls/interop.sh +++ b/om/tls/test/tls/interop.sh @@ -80,6 +80,15 @@ nextport() { port=$((port + 1)) while ss -Hltn "sport = :$port" | grep -q .; do port=$((port + 1)); done } +# listening PORT: wait until a server listens on 127.0.0.1:PORT (at most 15 s). A fixed sleep raced a +# cold python3 start on a hosted runner: the client connected first and exited 3 (connect failure). +listening() { + n=0 + until ss -Hltn "sport = :$1" | grep -q .; do + n=$((n + 1)); [ "$n" -gt 150 ] && return 1 + sleep 0.1 + done +} fail=0; rows=0 # row LABEL EXPECT CERT CHAIN SERVER-ARGS... : EXPECT is OK or the TLS error name (and x509 name) row() { @@ -89,7 +98,7 @@ row() { # shellcheck disable=SC2086 openssl s_server -accept "127.0.0.1:$port" -naccept 1 -cert "$cert.pem" -key "$cert.key" $ch -www "$@" > "s$port.log" 2>&1 & sp=$! - sleep 0.4 + listening "$port" timeout 30 "$client" localhost "$port" get 127.0.0.1 "$d/root.pem" > "c$port.out" 2> "c$port.err" rc=$? kill "$sp" 2> /dev/null; wait "$sp" 2> /dev/null @@ -121,7 +130,7 @@ fake() { nextport; rows=$((rows + 1)) python3 "$here/fakesh.py" "$port" "$1" > "f$port.log" 2>&1 & fp=$! - sleep 0.4 + listening "$port" timeout 30 "$client" localhost "$port" get 127.0.0.1 "$d/root.pem" > "c$port.out" 2> "c$port.err"; rc=$? kill "$fp" 2> /dev/null; wait "$fp" 2> /dev/null got="$(tr -d '\n' < "c$port.err") (exit $rc)" @@ -139,16 +148,17 @@ fake trail "TLSERR TLS_ERR_DECODE" # full handshakes from fakesrv.py (security review of omega-mv #813): CCS policy, record-count caps, # CertificateVerify refusals, close_notify during the handshake. EXPECT OK needs exit 0 and the reply. +# fsrv MODE EXPECT [OPTS]: OPTS is the client's "REC,HSMS,SPLIT" (record limit, handshake ms, split) fsrv() { nextport; rows=$((rows + 1)) python3 "$here/fakesrv.py" "$port" "$d" "$1" > "f$port.log" 2>&1 & fp=$! - sleep 0.6 - timeout 60 "$client" localhost "$port" get 127.0.0.1 "$d/root.pem" > "c$port.out" 2> "c$port.err"; rc=$? + listening "$port" + timeout 60 "$client" localhost "$port" get 127.0.0.1 "$d/root.pem" / "${3:-0}" > "c$port.out" 2> "c$port.err"; rc=$? kill "$fp" 2> /dev/null; wait "$fp" 2> /dev/null if [ "$rc" = 0 ] && grep -q '^HTTP/1.0 200 ok' "c$port.out"; then got=OK; else got="$(tr -d '\n' < "c$port.err") (exit $rc)"; fi case "$got" in "$2"*) v=PASS ;; *) v=FAIL; fail=1 ;; esac - printf '%s | %-28s | expect %-60s | got %s\n' "$v" "fakesrv: $1" "$2" "$got" + printf '%s | %-28s | expect %-60s | got %s\n' "$v" "fakesrv: $1${3:+ [$3]}" "$2" "$got" } fsrv ok OK fsrv empty50 OK @@ -165,6 +175,13 @@ fsrv empty1500 "TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17)" fsrv tickets1500 "TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17)" fsrv closehs "TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31)" fsrv closepre "TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31)" +# key lifetime (RFC 8446 section 5.5) with the test-only record limit, and the handshake budget +fsrv kuexact OK 5,0,0 +fsrv kuover "TLSERR TLS_ERR_SEQUENCE_LIMIT detail 0 (exit 38)" 5,0,0 +fsrv kurot OK 5,0,0 +fsrv kuw:8 OK 8,0,1 +fsrv loris "TLSERR TLS_ERR_TIMEOUT detail 0 (exit 13)" 0,2000,0 +fsrv slowsh OK 0,10000,0 # record tamper: a proxy flips one bit in the first server application-data record after the # handshake (the 5th server record); the client must refuse it with bad_record_mac @@ -173,7 +190,7 @@ openssl s_server -accept "127.0.0.1:$bp" -naccept 1 -cert good.pem -key good.key sp=$! python3 "$here/tamper.py" "$port" "$bp" > "p$port.log" 2>&1 & pp=$! -sleep 0.6 +listening "$bp"; listening "$port" timeout 30 "$client" localhost "$port" get 127.0.0.1 "$d/root.pem" > "c$port.out" 2> "c$port.err"; rc=$? kill "$sp" "$pp" 2> /dev/null; wait "$sp" "$pp" 2> /dev/null got="$(tr -d '\n' < "c$port.err") (exit $rc)" diff --git a/om/tls/test/tls/residue.py b/om/tls/test/tls/residue.py new file mode 100755 index 000000000..d9d947876 --- /dev/null +++ b/om/tls/test/tls/residue.py @@ -0,0 +1,129 @@ +#!/usr/bin/env python3 +# Secret residue check: do handshake secrets survive in the client's memory after the +# handshake, and do any keys survive tls_close? usage: residue.py CLIENT PKIDIR [--keep] +# +# fakesrv.py (mode hold:S) completes a handshake, writes every secret it derived to a file, +# waits S seconds and then answers. During the wait the client is blocked in tls_read with the +# handshake over; after the reply the client calls tls_close and (OPTS PAUSEMS) sleeps. At both +# points this script reads the client's writable private mappings through /proc/PID/mem (the +# client is its child, so Yama ptrace_scope 1 allows it) and counts every occurrence of each +# secret. Secrets are 32 bytes (16 for an AES key), so a chance match is impossible. +# +# Expectations (fail closed): +# after the handshake: c_ap/s_ap secrets, keys and ivs present (positive control: the scan +# works; they live in c[TLCAP..], c[TLWKEY..]); shared, early, hs, c_hs, s_hs, ms, the +# handshake keys and ivs and the finished keys absent everywhere. +# after tls_close: every secret absent. +# Prints RESIDUE PASS or RESIDUE FAIL with the offending secret names and the mapping they +# were found in. Exit 0 / 1; 3 (NOT_RUN) when /proc/PID/mem cannot be read. +import os, socket, subprocess, sys, tempfile, time + +HS_ONLY = ("shared", "early", "hs", "c_hs", "s_hs", "ms", "c_hs_key", "s_hs_key", + "c_hs_iv", "s_hs_iv", "c_fin", "s_fin") +AP = ("c_ap", "s_ap", "c_ap_key", "s_ap_key", "c_ap_iv", "s_ap_iv") + + +def free_port(): + s = socket.socket() + s.bind(("127.0.0.1", 0)) + p = s.getsockname()[1] + s.close() + return p + + +def scan(pid, secrets): + """{name: [(mapping, count), ...]} over every writable private mapping of pid.""" + found = {n: [] for n in secrets} + with open("/proc/%d/maps" % pid) as mf, open("/proc/%d/mem" % pid, "rb", 0) as mem: + for line in mf: + f = line.split() + lo, hi = (int(x, 16) for x in f[0].split("-")) + perms, name = f[1], (f[5] if len(f) > 5 else "anon") + if "w" not in perms or "p" not in perms or name.startswith("[v"): + continue + try: + mem.seek(lo) + data = mem.read(hi - lo) + except OSError: + continue + for n, v in secrets.items(): + k = data.count(v) + if k: + found[n].append((name, k)) + return found + + +def main(): + client, pki = sys.argv[1], sys.argv[2] + keep = "--keep" in sys.argv + work = tempfile.mkdtemp(prefix="residue-") + port = free_port() + keyfile = os.path.join(work, "keys.txt") + here = os.path.dirname(os.path.abspath(__file__)) + env = dict(os.environ, FAKESRV_KEYS=keyfile) + srv = subprocess.Popen([sys.executable, os.path.join(here, "fakesrv.py"), str(port), pki, "hold:4"], + stdout=open(os.path.join(work, "srv.log"), "w"), stderr=subprocess.STDOUT, env=env) + time.sleep(0.6) + cl = subprocess.Popen([client, "localhost", str(port), "get", "127.0.0.1", + os.path.join(pki, "root.pem"), "/", "0,0,0,4000"], + stdout=open(os.path.join(work, "client.out"), "w"), + stderr=open(os.path.join(work, "client.err"), "w")) + t0 = time.time() + while not os.path.exists(keyfile) and time.time() - t0 < 20: + time.sleep(0.05) + if not os.path.exists(keyfile): + print("RESIDUE NOT_RUN: fakesrv wrote no keys (%s)" % work) + cl.kill(); srv.kill() + return 3 + time.sleep(1.0) # the client has consumed Finished and is blocked in tls_read + secrets = {} + for line in open(keyfile): + n, h = line.split() + secrets[n] = bytes.fromhex(h) + try: + after_hs = scan(cl.pid, secrets) + except PermissionError as e: + print("RESIDUE NOT_RUN: /proc/%d/mem unreadable (%s)" % (cl.pid, e)) + cl.kill(); srv.kill() + return 3 + # wait for the reply, tls_close and the client's pause + t0 = time.time() + while time.time() - t0 < 20: + out = open(os.path.join(work, "client.out"), "rb").read() + if b"HTTP/1.0 200 ok" in out and cl.poll() is None: + break + time.sleep(0.05) + time.sleep(0.5) + if cl.poll() is not None: + print("RESIDUE NOT_RUN: client exited before the post-close scan (exit %s)" % cl.returncode) + srv.kill() + return 3 + after_close = scan(cl.pid, secrets) + cl.wait(timeout=20) + srv.wait(timeout=20) + bad = [] + for n in HS_ONLY: + if after_hs[n]: + bad.append("after handshake: %s in %s" % (n, after_hs[n])) + for n in AP: + if not after_hs[n]: + bad.append("after handshake: positive control %s not found (scan broken)" % n) + for n in secrets: + if after_close[n]: + bad.append("after tls_close: %s in %s" % (n, after_close[n])) + for n in sorted(secrets): + print("residue %-9s after-handshake=%-24s after-close=%s" % (n, after_hs[n] or "-", after_close[n] or "-")) + print("client exit %d, %s" % (cl.returncode, open(os.path.join(work, "client.err")).read().strip() or "no stderr")) + if cl.returncode != 0: + bad.append("client exit %d" % cl.returncode) + if bad: + print("RESIDUE FAIL\n " + "\n ".join(bad)) + return 1 + print("RESIDUE PASS secrets=%d hs_only=%d" % (len(secrets), len(HS_ONLY))) + if not keep: + subprocess.call(["rm", "-rf", work]) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/om/tls/test/tls/run.sh b/om/tls/test/tls/run.sh index 6f0faca0f..e5763865c 100755 --- a/om/tls/test/tls/run.sh +++ b/om/tls/test/tls/run.sh @@ -85,6 +85,20 @@ dmut "mutant dns owner ignored" 's/^if eq dns_neq r o cur 0$/if lt dns_neq r dmut "mutant dns label cap gone" 's/^if gt k 127$/if gt k 9999/' dmut "mutant dns_a4 name length unchecked" 's/^if gt len hn 253$/if gt len hn 9999/' +# DIT: tls_hwdit must agree with the kernel's cpuinfo flag (1 on a GB10, 0 on hosted runners); a +# mutant looking for an auxv key that no kernel emits (60) must report -1 on every host +if grep -qw dit /proc/cpuinfo; then dexp=1; else dexp=0; fi +build dit "$tls/tls.om" "$here/dit.om" || exit 1 +dgot=$("$out/dit/bin" | sed -n 's/^hwdit //p') +if [ "$dgot" = "$dexp" ]; then echo "PASS dit: hwdit=$dgot cpuinfo=$dexp"; else echo "FAIL dit: hwdit=$dgot cpuinfo=$dexp"; fail=1; fi +sed 's/^if eq k 16$/if eq k 60/' "$tls/tls.om" > "$out/m.om" +if cmp -s "$out/m.om" "$tls/tls.om"; then echo "FAIL mutant auxv key: the mutation did not apply"; fail=1 +else + rm -rf "$out/dm"; build dm "$out/m.om" "$here/dit.om" || fail=1 + mut=$((mut + 1)); mgot=$("$out/dm/bin" | sed -n 's/^hwdit //p') + if [ "$mgot" = "-1" ]; then mutok=$((mutok + 1)); echo "PASS mutant auxv key detected: hwdit=$mgot"; else echo "FAIL mutant auxv key not detected: hwdit=$mgot"; fail=1; fi +fi + # interop with the real tls.om build client "$tls/tls.om" "$here/client.om" || exit 1 if sh "$here/interop.sh" "$out/client/bin" > "$out/interop.log" 2>&1; then @@ -114,6 +128,34 @@ imut "mutant handshake close_notify unmapped" '/^if eq e TLCLOSE$/{n;s/^ret TLEA imut "mutant version not checked" 's/^ret TLEVER$/ret 0/' imut "mutant record MAC ignored" 's/^ret TLEMAC$/ret 0/' imut "mutant session id not checked" 's/^ret TLESID$/ret 0/' +# outside-review fixes: record limit on read and write, proactive KeyUpdate, handshake budget. +# "KeyUpdate not sent" is caught by the client's own seal limit (SEQUENCE_LIMIT); with both gone +# the kuw:8 server sees too many records under one key and answers with a fatal alert. +imut "mutant read record limit gone" '/^fn tls_open /,/^end$/s/^if ge tls_gn c TLRS 8 tls_reclim c$/if ge tls_gn c TLRS 8 99999999/' +imut "mutant write KeyUpdate not sent" 's/^if ge tls_gn c TLWS 8 sub tls_reclim c 1$/if ge tls_gn c TLWS 8 99999999/' +imut "mutant write limit and KeyUpdate gone" 's/^if ge tls_gn c TLWS 8 sub tls_reclim c 1$/if ge tls_gn c TLWS 8 99999999/; s/^if ge tls_gn c TLWS 8 tls_reclim c$/if ge tls_gn c TLWS 8 99999999/' +imut "mutant handshake budget not armed" 's/^tls_pn c TLDL add ulong monons b 8$/tls_pn c TLDL 0 8/' + +# secret residue (outside review, item 4b): after the handshake no handshake secret may remain in +# the client's memory; after tls_close no secret at all. The interop PKI must exist (built above). +res="NOT_RUN" +rc=0; python3 "$here/residue.py" "$out/client/bin" "$root/build/tls/interop" > "$out/residue.log" 2>&1 || rc=$? +if [ "$rc" = 0 ]; then res="PASS"; echo "PASS residue: $(tail -n 1 "$out/residue.log")" +elif [ "$rc" = 3 ]; then echo "NOT_RUN residue: $(tail -n 1 "$out/residue.log")" +else res="FAIL"; echo "FAIL residue:"; cat "$out/residue.log"; fail=1; fi +rmut() { # LABEL SED-EXPR: the residue check must fail on the mutant + [ "$res" = PASS ] || return + sed "$2" "$tls/tls.om" > "$out/m.om" + if cmp -s "$out/m.om" "$tls/tls.om"; then echo "FAIL $1: the mutation did not apply"; fail=1; return; fi + rm -rf "$out/rm"; build rm "$out/m.om" "$here/client.om" || { fail=1; return; } + mut=$((mut + 1)) + rc=0; python3 "$here/residue.py" "$out/rm/bin" "$root/build/tls/interop" > "$out/rm.log" 2>&1 || rc=$? + if [ "$rc" = 1 ]; then mutok=$((mutok + 1)); echo "PASS $1 detected: $(grep -c '^ after' "$out/rm.log") residues" + else echo "FAIL $1 not detected (exit $rc)"; fail=1; fi +} +rmut "mutant close keeps the traffic secrets" '/^fn tls_wipe /,/^end$/s/^tls_zero c TLCAP 64$/tls_zero c TLCAP 0/' +rmut "mutant handshake secrets kept after Finished" 's/^tls_zero c TLHS 128$/tls_zero c TLHS 0/' +rmut "mutant shared secret kept" 's/^tls_zero c TLSS 32$/tls_zero c TLSS 0/' if [ "${TLS_NET:-0}" = 1 ]; then if python3 "$here/parity.py" "$out/client/bin" api.github.com /licenses/mit /licenses/apache-2.0 /repos/torvalds/linux/license > "$out/net.log" 2>&1 \ @@ -128,6 +170,6 @@ else fi if [ $fail = 0 ]; then - echo "TLS PASS vectors=$kcount (rfc8448) dns=$dcount interop=$irows net=$net mutants=$mutok/$mut"; exit 0 + echo "TLS PASS vectors=$kcount (rfc8448) dns=$dcount dit=$dgot interop=$irows residue=$res net=$net mutants=$mutok/$mut"; exit 0 fi -echo "TLS FAIL vectors=${kcount:-0} dns=${dcount:-0} interop=${irows:-0} net=$net mutants=$mutok/$mut"; exit 1 +echo "TLS FAIL vectors=${kcount:-0} dns=${dcount:-0} dit=${dgot:-?} interop=${irows:-0} residue=$res net=$net mutants=$mutok/$mut"; exit 1 diff --git a/om/tls/test/tls/timing.om b/om/tls/test/tls/timing.om new file mode 100644 index 000000000..9e29830c8 --- /dev/null +++ b/om/tls/test/tls/timing.om @@ -0,0 +1,210 @@ +note dudect-style timing driver (Reparaz, Balasch, Verbauwhede 2016): usage: timing WHAT N +note WHAT: x25519 (scalar fixed vs random, base point fixed), chacha / aesgcm (key and nonce fixed +note vs random, 1024-byte plaintext fixed), cteq (32-byte compare: equal vs random second input, +note 2000 compares per measurement). Each of the N measurements draws its class from getrandom, +note prepares the input, then times one operation with monons and prints "CLASS NANOSECONDS". +note The statistics (Welch's t-test between the classes) are computed outside: timing.py. +note Exit 0; 2 on a usage error; 3 when an operation reports an error. +text tusage "usage: timing x25519|chacha|aesgcm|cteq N\n" +text tx "x25519" +text tc "chacha" +text ta "aesgcm" +text tq "cteq" + +fn tm_arg i ulong a edit uchar * to ulong +n = argread i a 0 len a +if lt n 0 +ret 0 +end +ret ulong n +end + +fn tm_num a view uchar * n ulong to ulong +v = ulong 0 +for i ulong n +d = ulong get a i +if or lt d 48 gt d 57 +ret 0 +end +v = add mul v 10 sub d 48 +if gt v 99999999 +ret 0 +end +end +ret v +end + +fn tm_is a view uchar * n ulong t view uchar * to ulong +if ne n len t +ret 0 +end +for i ulong n +if ne get a i get t i +ret 0 +end +end +ret 1 +end + +note fixed class: a constant pattern; random class: getrandom bytes. Both classes pay the +note getrandom call so the cache and TLB state before the timed window does not differ by class. +fn tm_fill b edit uchar * n ulong cls ulong to ulong +r = random b 0 n 0 +if ne r long n +ret 1 +end +if eq cls 0 +for i ulong n +put b i uchar add 17 rem mul i 7 211 +end +end +ret 0 +end + +fn tm_line cls ulong ns ulong o edit uchar * to ulong +put o 0 add 48 uchar cls +put o 1 32 +k = ulong 2 +d = new uchar 24 0 +m = ulong 0 +v = ns +while true bound 24 +put d m uchar add 48 rem v 10 +v = div v 10 +m = add m 1 +if eq v 0 +break +end +end +for i ulong m +put o k get d sub sub m 1 i +k = add k 1 +end +put o k 10 +ret add k 1 +end + +fn tm_emit cls ulong t0 long t1 long o edit uchar * to void +m = tm_line cls ulong sub t1 t0 o +w = write 1 o 0 m +end + +fn tm_x25519 n ulong o edit uchar * to ulong +k = new uchar 32 0 +u = new uchar 32 0 +s = new uchar 32 0 +c = new uchar 1 0 +put u 0 9 +for i ulong n +r = random c 0 1 0 +cls = and ulong get c 0 1 +if ne tm_fill k 32 cls 0 +ret 3 +end +t0 = monons +e = x25519_scalarmult s k u +t1 = monons +if ne e 0 +ret 3 +end +tm_emit cls t0 t1 o +end +ret 0 +end + +fn tm_pt buf edit uchar * to void +for j ulong len buf +put buf j uchar rem j 251 +end +end + +note which: 0 chacha, 1 aesgcm +fn tm_cls c edit uchar * to ulong +r = random c 0 1 0 +ret and ulong get c 0 1 +end + +fn tm_one kn view uchar * buf edit uchar * which ulong to ulong +ad = new uchar 5 0 +if eq which 0 +ret aead_chacha_seal kn ad buf +end +ret aead_aes128gcm_seal part kn 0 28 ad buf +end + +fn tm_aead n ulong o edit uchar * which ulong to ulong +kn = new uchar 44 0 +buf = new uchar 1040 0 +c = new uchar 1 0 +for i ulong n +cls = tm_cls c +if ne tm_fill kn 44 cls 0 +ret 3 +end +tm_pt buf +t0 = monons +e = tm_one kn buf which +t1 = monons +if ne e 0 +ret 3 +end +tm_emit cls t0 t1 o +end +ret 0 +end + +fn tm_cteq n ulong o edit uchar * to ulong +a = new uchar 32 0 +b = new uchar 32 0 +c = new uchar 1 0 +for i ulong 32 +put a i uchar add 17 rem mul i 7 211 +end +for i ulong n +r = random c 0 1 0 +cls = and ulong get c 0 1 +if ne tm_fill b 32 cls 0 +ret 3 +end +acc = ulong 0 +t0 = monons +for j ulong 2000 +acc = add acc tls_cteq a b 0 32 +end +t1 = monons +if and eq cls 0 ne acc 0 +ret 3 +end +tm_emit cls t0 t1 o +end +ret 0 +end + +fn main to int +a = new uchar 64 0 +o = new uchar 64 0 +if ne argcnt 3 +w = write 2 tusage 0 len tusage +ret 2 +end +wl = tm_arg 1 a +n = tm_num part a 32 32 tm_arg 2 part a 32 32 +if or eq n 0 eq wl 0 +w = write 2 tusage 0 len tusage +ret 2 +end +if eq tm_is a wl tx 1 +ret int tm_x25519 n o +end +if eq tm_is a wl tc 1 +ret int tm_aead n o 0 +end +if eq tm_is a wl ta 1 +ret int tm_aead n o 1 +end +if eq tm_is a wl tq 1 +ret int tm_cteq n o +end +w = write 2 tusage 0 len tusage +ret 2 +end diff --git a/om/tls/tls.om b/om/tls/tls.om index d96cc0860..0cc116998 100644 --- a/om/tls/tls.om +++ b/om/tls/tls.om @@ -39,6 +39,9 @@ const TLHF ulong 488 const TLDET ulong 492 note change_cipher_spec state: 0 none allowed yet, 1 one allowed (after ServerHello), 2 no more const TLCCS ulong 496 +note record limit override (4 bytes, 0 = TLKUREC) and handshake budget in ns (8 bytes, 0 = TLHSNS) +const TLKUL ulong 500 +const TLHSL ulong 504 const TLEPK ulong 512 const TLEPU ulong 544 const TLSID ulong 576 @@ -54,6 +57,10 @@ const TLLF ulong 36864 const TLLFSZ ulong 16896 const TLHB ulong 53760 const TLHBSZ ulong 65536 +note RFC 8446 section 5.5: at most 2^24.5 = 23726566 records under one AES-GCM key (applied to both +note suites); the whole handshake must finish within TLHSNS (30 s) unless the caller set a deadline +const TLKUREC ulong 23726566 +const TLHSNS ulong 30000000000 note error codes (tls_errname gives the names) const TLEARG ulong 1 @@ -132,6 +139,7 @@ text TLLUPD "traffic upd" text TLCVC "TLS 1.3, server CertificateVerify" text TLALPN "http/1.1" text TLRESOLV "/etc/resolv.conf" +text TLAUXV "/proc/self/auxv" text TLNS "nameserver" note ---- byte helpers (big-endian, n <= 8) ---- @@ -432,10 +440,41 @@ tls_pn c o add sq 1 8 ret 0 end -note decrypt the record at c[TLRB] whose body is ln bytes; 0 or TLEMAC +note the record limit in force: TLKUREC or the lower test-only value set by tls_reclimit +fn tls_reclim c view uchar * to ulong +v = tls_gn c TLKUL 4 +if eq v 0 +ret TLKUREC +end +ret v +end + +note tls_reclimit: lower the per-key record limit before tls_connect (tests); it cannot be raised +fn tls_reclimit c edit uchar * n ulong to ulong +if or ne get c TLPH 0 or eq n 0 ge n TLKUREC +ret TLEARG +end +tls_pn c TLKUL n 4 +ret 0 +end + +note tls_hslimit: the whole-handshake budget in ns used when no deadline is set (0 = TLHSNS) +fn tls_hslimit c edit uchar * ns ulong to ulong +if ne get c TLPH 0 +ret TLEARG +end +tls_pn c TLHSL ns 8 +ret 0 +end + +note decrypt the record at c[TLRB] whose body is ln bytes; 0, TLEMAC, or TLESEQ when the peer sent +note more records under this key than the limit allows without a KeyUpdate (fail closed) fn tls_open c edit uchar * ln ulong to ulong kn = new uchar 44 0 ad = new uchar 5 0 +if ge tls_gn c TLRS 8 tls_reclim c +ret TLESEQ +end for i ulong 5 put ad i get c add TLRB i end @@ -456,10 +495,14 @@ end ret 0 end -note encrypt c[TLWB+5 .. +n) (inner plaintext incl. type byte), header already at c[TLWB] +note encrypt c[TLWB+5 .. +n) (inner plaintext incl. type byte), header already at c[TLWB]; +note TLESEQ when the write key reached its record limit (tls_write rekeys before that) fn tls_seal c edit uchar * n ulong to ulong kn = new uchar 44 0 ad = new uchar 5 0 +if ge tls_gn c TLWS 8 tls_reclim c +ret TLESEQ +end for i ulong 5 put ad i get c add TLWB i end @@ -1531,9 +1574,7 @@ if ne d 0 tls_alert c d end put c TLPH 3 -tls_zero c TLWKEY 96 -tls_zero c TLCAP 64 -tls_zero c TLEPK 320 +tls_wipe c ret e end @@ -1595,7 +1636,9 @@ end ret 0 end -note full handshake on the connected socket fd; 0 or a named error code (tls_errname) +note full handshake on the connected socket fd; 0 or a named error code (tls_errname). +note Without a caller deadline (tls_deadline) the whole handshake is bounded by the budget of +note tls_hslimit (default TLHSNS, 30 s); that deadline is cleared again once connected. fn tls_connect c edit uchar * st view uchar * fd int to ulong if or ne get c TLPH 0 eq get c TLHL 0 ret TLESTAT @@ -1604,6 +1647,15 @@ if lt fd 0 ret TLEARG end tls_pn c TLFD ulong fd 4 +mine = ulong 0 +if eq tls_gn c TLDL 8 0 +mine = 1 +b = tls_gn c TLHSL 8 +if eq b 0 +b = TLHSNS +end +tls_pn c TLDL add ulong monons b 8 +end th = new ulong 40 0 sha256_init th e = tls_mkch c @@ -1628,6 +1680,9 @@ end if ne e 0 ret tls_abort c e end +if eq mine 1 +tls_pn c TLDL 0 8 +end put c TLPH 1 ret 0 end @@ -1650,6 +1705,21 @@ e = new uchar 1 0 r = tls_drv c tls_sel TLSAP TLSAP 32 TLIUPD part e 0 0 r = or r tls_keys c TLSAP 1 if eq v 1 +x = tls_kusend c +if ne x 0 +ret x +end +end +if ne r 0 +ret TLEARG +end +ret 0 +end + +note send KeyUpdate(update_not_requested) under the current write key, then switch to the next +note write key (RFC 8446 section 4.6.3 and 7.2); 0 or an error code +fn tls_kusend c edit uchar * to ulong +e = new uchar 1 0 b = add TLWB 5 put c b 24 tls_pn c add b 1 1 3 @@ -1658,9 +1728,8 @@ x = tls_wrbuf c 22 5 if ne x 0 ret x end -r = or r tls_drv c tls_sel TLCAP TLCAP 32 TLIUPD part e 0 0 +r = tls_drv c tls_sel TLCAP TLCAP 32 TLIUPD part e 0 0 r = or r tls_keys c TLCAP 0 -end if ne r 0 ret TLEARG end @@ -1775,13 +1844,21 @@ end ret TLEUNEX end -note tls_write: send all of m as application data; returns len m or minus an error code +note tls_write: send all of m as application data; returns len m or minus an error code. +note Before the write key's last allowed record a KeyUpdate is sent and the key rotated +note (RFC 8446 section 5.5), so application data never exhausts the record limit. fn tls_write c edit uchar * m view uchar * to long if ne get c TLPH 1 ret neg long TLESTAT end off = ulong 0 while lt off len m bound 999999 +if ge tls_gn c TLWS 8 sub tls_reclim c 1 +e = tls_kusend c +if ne e 0 +ret neg long tls_abort c e +end +end k = sub len m off if gt k 16384 k = 16384 @@ -1798,7 +1875,8 @@ end ret long len m end -note tls_close: send close_notify (when connected) and wipe the key material. The caller closes fd. +note tls_close: send close_notify (when connected), wipe the key material and every buffer that +note held plaintext, records or certificates. The caller closes fd. note A failed connection stays failed (later calls give TLS_ERR_STATE). fn tls_close c edit uchar * to void if eq get c TLPH 1 @@ -1809,9 +1887,62 @@ end if ne get c TLPH 3 put c TLPH 2 end +tls_wipe c +end + +note zero the secrets (keys, IVs, traffic secrets, ephemeral key, shared secret, transcript +note secrets) and the record, write, leaf and handshake buffers; the state words stay +fn tls_wipe c edit uchar * to void tls_zero c TLWKEY 96 tls_zero c TLCAP 64 tls_zero c TLEPK 320 +tls_zero c TLRB sub TLCSZ TLRB +end + +note ---- data-independent timing (Arm DIT, DDI0487 C5.2.4) ---- +note tls_hwdit: 1 when the kernel advertises FEAT_DIT in AT_HWCAP (/proc/self/auxv entry 16, +note bit 24 = HWCAP_DIT), 0 when it does not, -1 when auxv cannot be read. Whether the bit is +note advertised says nothing about PSTATE.DIT, which Linux starts at 0 for every process and +note this library cannot set: an `msr DIT, #1` needs a compiler word (see THREAT_MODEL.md). +fn tls_hwdit to long +b = new uchar 1024 0 +fd = fopen TLAUXV 0 len TLAUXV 0 0 +if lt fd 0 +ret -1 +end +n = long 0 +r = long 0 +while lt n 1024 bound 64 +r = read int fd b ulong n sub 1024 ulong n +if le r 0 +break +end +n = add n r +end +r = fclose int fd +if lt n 16 +ret -1 +end +for i ulong div ulong n 16 +o = mul i 16 +k = tls_gl b o +if eq k 16 +ret long and shr tls_gl b add o 8 24 1 +end +if eq k 0 +break +end +end +ret -1 +end + +note little-endian 64-bit word at b[o..o+8) +fn tls_gl b view uchar * o ulong to ulong +v = ulong 0 +for j ulong 8 +v = or v shl ulong get b add o j mul j 8 +end +ret v end note ---- DNS A lookup (RFC 1035) over UDP to the first IPv4 nameserver in /etc/resolv.conf ---- diff --git a/seed/json/.crumb b/seed/json/.crumb index 731cc0cae..4d952f8d5 100644 --- a/seed/json/.crumb +++ b/seed/json/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-29T01:41:23Z", + "compiled_at": "2026-10-30T02:45:42Z", "compiler": "crumb-compile/1", - "digest": "sha256:64de1d1ba72bd069fc265430a6aa4ea18b544024e3aba296da94b85c062b7122", + "digest": "sha256:cdea51250fba9ec472d79027b624c9e09bb984d407ebe5a2173810b4834b5cca", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 7, - "generated_at_commit": "28a7b749a6da68407af60a7cccaf34dc2e5eab48", - "source_tree": "sha256:dea98012ac396d8bdb162015e5edb802188484f525c87d383046ca778a4c2ebf" + "generated_at_commit": "c4bf4150b7f1111580cd714b12d020894425ff48", + "source_tree": "sha256:a77710476e49a2c6aa731bf7a18114e4fcf2980a5c2037ad2af3c3cb535048fc" } }, "layer": "seed", diff --git a/seed/json/README.md b/seed/json/README.md index 30da70896..9c629d84f 100644 --- a/seed/json/README.md +++ b/seed/json/README.md @@ -25,7 +25,7 @@ The units contain no `om2` line, no `global`, no `text` and no host word. The ca them into one OM-2 program unit: ```sh -{ printf 'om2\n'; cat seed/json/json.om seed/json/jsonw.om [seed/json/jsonf.om] seed/net/http.om app.om; } > app.full.om +{ printf 'om2\n'; cat seed/json/json.om seed/json/jsonw.om [seed/json/jsonf.om] seed/net/http.om seed/net/notls.om app.om; } > app.full.om nice -n 19 seed/out/omc < app.full.om > app ``` diff --git a/seed/net/.crumb b/seed/net/.crumb index 79be3cb59..bb948f73b 100644 --- a/seed/net/.crumb +++ b/seed/net/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-27T17:39:58Z", + "compiled_at": "2026-10-30T02:45:42Z", "compiler": "crumb-compile/1", - "digest": "sha256:7f14f94e063d7af7fcac85fe759f6d45538afd26aa0bea2a7f6c9fc43f74c6be", + "digest": "sha256:eae38c8e92dcbb7a885116b2aa1ad893ada4fd87dd4b8d93013c69537d624bd4", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 7, - "generated_at_commit": "7900a8fcd3b028b27d2fc0f4a68c5597ca94fb31", - "source_tree": "sha256:35c88ddf89a1bfd85e7e5e6086509887c3d6f23c56d0e656e03ce4d55c398117" + "files": 11, + "generated_at_commit": "c4bf4150b7f1111580cd714b12d020894425ff48", + "source_tree": "sha256:ecd730ff47024ad7fdf333c9fa101f307a0ec564f4ba429f499f296cd7998090" } }, "invariants": [ diff --git a/seed/net/README.md b/seed/net/README.md index b7a1ea82e..e64b2c31e 100644 --- a/seed/net/README.md +++ b/seed/net/README.md @@ -14,10 +14,14 @@ only: no hardware or deployment claim. | Path | What it is | |---|---| | `http.om` | The library unit. No `om2` line, no `fn main`, no globals. | +| `notls.om` | The three transport hooks for a program without TLS (every one returns `HENOSUP`). Composed after `http.om`. | +| `https.om` | The same three hooks implemented with the om/tls TLS 1.3 client, plus `htlsinit` / `htlsconn` / `htlsend`. Composed after the om/tls units and `http.om`. | | `examples/sse_server.om` | An embeddable server: `/health`, `/events` (SSE), `/echo` (body up to 1 MiB). | | `examples/sse_client.om` | An incremental SSE client that prints one line per event. | | `tests/parse.om` | Memory-mode parser driver for the corpus. | | `tests/live.om` | Loopback socket tests: bodies, keep-alive, pipelining, SSE, malformed requests, deadlines, descriptor leaks. | +| `tests/https.om` | HTTPS GET through `https.om`: `https HOST PORT STOREFILE PATH [CONNECTHOST [IDLEMS]]`, body to stdout, `status N` / `HTTPSERR r` to stderr. | +| `tests/nosup.om` | A program without TLS must refuse every byte on a non-TCP transport. | | `tests/check.py` | Host referee: builds everything, runs the corpus, the mutants, `live.om` and the curl / http.client end-to-end check. | ## Building a program @@ -26,7 +30,16 @@ The library has no `om2` line, so the application build adds one line in front o concatenated units: ```sh -{ printf 'om2\n'; cat seed/net/http.om app.om; } | seed/out/omc > app +{ printf 'om2\n'; cat seed/net/http.om seed/net/notls.om app.om; } | seed/out/omc > app +``` + +A program that speaks HTTPS composes the om/tls units and `https.om` instead of `notls.om` +(exactly one of the two, after `http.om`): + +```sh +{ printf 'om2\n' + for u in sha2 hkdf x25519 chacha aesgcm ec rsa x509 tls; do cat om/tls/$u.om; done + cat seed/net/http.om seed/net/https.om app.om; } | seed/out/omc > app ``` A program that also parses JSON adds `seed/json/json.om` in the same `cat`. Names in @@ -158,6 +171,17 @@ st = hrsprd cs io final status (put cs HISHEAD 1 first after a n = hbodyrd cs io d Content-Length, chunked or close-delimited ``` +HTTPS (`https.om`): after `hinit` and before any I/O, `htlsinit cs io host` reserves the +transport region `io[HTB, HTB + TLCSZ)` (119296 bytes; `io` must hold it plus at least 512 +bytes of read and write regions) and starts the om/tls client for the TLS name `host` with +ALPN `http/1.1`; `htlsconn cs io st` runs the handshake against the trust store `st` +(`TLSTSZ` bytes filled by `tls_store` or `tls_storef`); the request and response functions +then work unchanged; `htlsend cs io` sends close_notify, wipes the keys and closes the +descriptor (`hclose` alone closes the socket without either). A TLS result `e` comes back as +`HETLS - e` (-601 .. -629, names in `tls_errname`), a TLS deadline as `HETIME`. A TCP end of +stream without close_notify is `HETLS - 4` (truncation), never a clean end of a body. +`tests/https.om` is the reference caller. + ## Server-sent events Writing: `hrspsse` sends the 200 head (`text/event-stream`, `Cache-Control: no-cache`, chunked), @@ -186,10 +210,13 @@ Every byte crosses three functions only: `hrecvio` (into the read region), `hrec caller's body array) and `hsendio` (from the write region), plus `hwait`. Sockets are O_NONBLOCK; a call that would block waits with `waitio` for at most min(idle, deadline - now), so there is no busy wait and no unbounded block. `get cs HXPORT` selects the transport: 0 is -plain TCP or Unix sockets; any other value returns `HENOSUP` today. The TLS lane (OmegaTLS, -`tls_read`/`tls_write` with their own monotonic deadline and whole-slice writes) plugs in by -keeping its connection state in the transport region `io[HTB, HTB + HTL)` and calling it from -those three functions; no other function changes. +plain TCP or Unix sockets; 1 calls the hooks `htlsrecv`, `htlsrecvd` and `htlssend`, which +`https.om` implements over om/tls (`tls_read` / `tls_write`, connection state in the transport +region `io[HTB, HTB + HTL)`; before each call the http.om wait policy, min(idle, deadline), is +handed to `tls_deadline`) and `notls.om` refuses with `HENOSUP`. Because Omega passes one +array to a call once, bytes between the TLS state and the read / write regions of the same `io` +cross a 16 KiB bounce array (one extra copy per record). No other function of `http.om` +touches the transport. ## Host words used @@ -234,9 +261,22 @@ Stages: (six requests on one keep-alive connection, the last with `Connection: close`), raw sockets (obs-fold 400, empty connection, HTTP/1.0) and `examples/sse_client.om`; the server's descriptor count must return to its start value after every connection, and the server must exit 0. +5. HTTPS (needs `openssl`): a throwaway PKI (root, leaf for `localhost`, leaf for another + name, leaf of an unrelated root), three Python `ssl` TLS 1.3 servers and one + `openssl s_server -www`, all on 127.0.0.1 ephemeral ports. `tests/nosup.om` (built with + `notls.om`) must refuse every byte on `HXPORT 1`, and its stub mutated to return 0 must + fail. `tests/https.om` (built with om/tls and `https.om`) runs nine rows: 6-byte, + 300 KiB Content-Length, chunked (chunk sizes 1 .. 60000) and close-delimited bodies + compared byte for byte, a server that closes TCP without close_notify (`HETLS - 4`), a + silent server under a 500 ms idle limit (`HETIME`), a wrong-name certificate and an + untrusted issuer (`HETLS - 17`), and the openssl page. Five mutants (read dispatch gone, + head read error or body truncation taken as end of stream, wait policy not handed to + TLS, records not written) must each fail a row. With `TLS_NET=1` two live read-only GETs + (`www.example.com/`, `api.github.com/licenses/mit`) must return 200 with the expected + text; without it that part is `NOT_RUN`. Every socket in the checks is 127.0.0.1 with a port chosen by the kernel. Nothing contacts port -18091 or any outside host. +18091; outside hosts are contacted only by the two `TLS_NET=1` rows. Re-verified 2026-10-26 after refresh onto main `c5d981041` with reseeded `seed/out/omc` `189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54`: `HTTP-CHECK PASS` (same counts). diff --git a/seed/net/http.om b/seed/net/http.om index a65305553..185b443c9 100644 --- a/seed/net/http.om +++ b/seed/net/http.om @@ -8,7 +8,9 @@ note A connection is two caller-owned arrays: note cs = new ulong HCSLEN 0 state (fd, buffer cursors, deadlines, framing, header index) note io = new uchar N 0 one byte array split by hinit into a read region io[0, HRCAP), note a write region io[HWB, HWB+HWCAP) and a transport region -note io[HTB, HTB+HTL) (empty for plain TCP; reserved for TLS) +note io[HTB, HTB+HTL) (empty for plain TCP; the TLS state for HTTPS) +note The transport hooks htlsrecv, htlsrecvd and htlssend (HXPORT 1) come from seed/net/https.om +note (om/tls) or seed/net/notls.om (HENOSUP); one of the two is composed after this unit. note Header and target offsets stored in cs are absolute offsets into io and stay valid until the note next hreqrd / hrsprd on the same cs. note @@ -383,7 +385,7 @@ if ne get cs HMEM 0 ret 0 end if ne get cs HXPORT 0 -ret HENOSUP +ret htlsrecv cs io off n end fd = int get cs HFD for it ulong 4096 @@ -407,7 +409,7 @@ if ne get cs HMEM 0 ret 0 end if ne get cs HXPORT 0 -ret HENOSUP +ret htlsrecvd cs io d end fd = int get cs HFD for it ulong 4096 @@ -431,7 +433,7 @@ if ne get cs HMEM 0 ret -9 end if ne get cs HXPORT 0 -ret HENOSUP +ret htlssend cs io off n end fd = int get cs HFD e = add off n diff --git a/seed/net/https.om b/seed/net/https.om new file mode 100644 index 000000000..1f0caff1d --- /dev/null +++ b/seed/net/https.om @@ -0,0 +1,174 @@ +note seed/net/https.om -- HTTPS transport for http.om: the TLS 1.3 client of om/tls plugged into +note the transport boundary (hrecvio, hrecvd, hsendio dispatch here when HXPORT is 1). +note Library unit: no `om2` line, no `fn main`, no globals. Compose the om/tls units, http.om and +note this file (in that order) in front of the application: +note { printf 'om2\n'; for u in sha2 hkdf x25519 chacha aesgcm ec rsa x509 tls; do cat om/tls/$u.om; done +note cat seed/net/http.om seed/net/https.om app.om; } | seed/out/omc > app +note A program without TLS composes seed/net/notls.om instead (same three function names, HENOSUP). +note +note The TLS connection state lives in the transport region io[HTB, HTB + TLCSZ) that htlsinit +note reserves at the end of io; the trust store is a caller-owned array of TLSTSZ bytes filled by +note tls_store / tls_storef. Because Omega passes an array to one call once, bytes between the +note TLS state and the read / write regions of the same io cross a 16 KiB bounce array (one copy). +note +note Client use (hinit first, no I/O before htlsinit): +note fd = hdial a tmo TCP +note r = hinit cs io int fd 0 +note r = htlsinit cs io host lay out the transport region, SNI and certificate name +note r = htlsconn cs io st handshake (tls_connect) under the handshake budget +note ... hreqst / hhend / hwfin / hrsprd / hbodyrd as over TCP ... +note htlsend cs io close_notify, wipe the keys, close fd +note Results: TLS error code e (tls_errname) is returned as HETLS - e (-601 .. -629); +note TLS_ERR_TIMEOUT is HETIME. A TCP end of stream without close_notify is an error (HETLS - 4, +note truncation), never a clean end; only close_notify gives 0 from the reads. +note +note Timeouts: before each TLS read or write the http.om wait policy (HIDLE single-wait limit and +note the HDL deadline) is given to tls_deadline, so the bounds of seed/net/README.md hold over TLS. + +const HETLS long -600 +const HTLBUF ulong 16384 + +note htlsinit: reserve io[HTB, HTB + TLCSZ) for the TLS state (io must hold it plus the read and +note write regions: at least TLCSZ + 512 bytes) and start the client for TLS name host with ALPN +note http/1.1. HEINVAL when I/O already happened on cs or io is too small. +fn htlsinit cs edit ulong * io edit uchar * host view uchar * to long +if or ne get cs HRLEN 0 ne get cs HWLEN 0 +ret HEINVAL +end +if or ne get cs HMEM 0 ne get cs HOPEN 1 +ret HEINVAL +end +if lt len io add TLCSZ 512 +ret HEINVAL +end +n = sub len io TLCSZ +w = get cs HWCAP +if gt w sub n 256 +w = sub n 256 +end +r = hlayout cs n w +if lt r 0 +ret r +end +put cs HTL TLCSZ +e = tls_init part io n TLCSZ host 1 +if ne e 0 +ret sub HETLS long e +end +put cs HXPORT 1 +ret 0 +end + +note htlsconn: the TLS handshake on the connection's fd with trust store st (tls_store or +note tls_storef); 0, HETIME or HETLS - e +fn htlsconn cs edit ulong * io edit uchar * st view uchar * to long +if ne get cs HXPORT 1 +ret HEINVAL +end +b = get cs HTB +e = tls_connect part io b TLCSZ st int get cs HFD +ret htlsmap long e +end + +note htlsmap: a TLS code as an http.om result +fn htlsmap e long to long +if eq e 0 +ret 0 +end +if eq e long TLETIME +ret HETIME +end +ret sub HETLS e +end + +note htlsarm: give the TLS state the wait policy of cs (min of idle and the deadline), 0 = none +fn htlsarm cs edit ulong * io edit uchar * to void +b = get cs HTB +dl = get cs HDL +iv = get cs HIDLE +if ne iv 0 +t = add ulong monons iv +if or eq dl 0 lt t dl +dl = t +end +end +tls_deadline part io b TLCSZ long dl +end + +note htlsrecv: at most n bytes into io[off, off+n) through TLS; count, 0 at close_notify, or +note negative (HETIME, HETLS - e) +fn htlsrecv cs edit ulong * io edit uchar * off ulong n ulong to long +bb = new uchar 16384 0 +k = n +if gt k HTLBUF +k = HTLBUF +end +htlsarm cs io +r = tls_read part io get cs HTB TLCSZ part bb 0 k +if lt r 0 +ret htlsmap neg r +end +for i ulong ulong r +put io add off i get bb i +end +ret r +end + +note htlsrecvd: at most len d bytes straight into the caller's array d +fn htlsrecvd cs edit ulong * io edit uchar * d edit uchar * to long +k = len d +if gt k HTLBUF +k = HTLBUF +end +htlsarm cs io +r = tls_read part io get cs HTB TLCSZ part d 0 k +if lt r 0 +ret htlsmap neg r +end +ret r +end + +note htlscp: io[s, s+n) into bb (at most 16 KiB); the count copied +fn htlscp bb edit uchar 16384 io view uchar * s ulong n ulong to ulong +k = n +if gt k HTLBUF +k = HTLBUF +end +for i ulong k +put bb i get io add s i +end +ret k +end + +note htlswr: one TLS write of bb[0, k) +fn htlswr cs edit ulong * io edit uchar * bb view uchar 16384 k ulong to long +htlsarm cs io +r = tls_write part io get cs HTB TLCSZ part bb 0 k +if lt r 0 +ret htlsmap neg r +end +ret 0 +end + +note htlssend: all of io[off, off+n) through TLS in records of at most 16 KiB; 0 or negative +fn htlssend cs edit ulong * io edit uchar * off ulong n ulong to long +bb = new uchar 16384 0 +p = ulong 0 +while lt p n bound 1024 +k = htlscp bb io add off p sub n p +r = htlswr cs io bb k +if lt r 0 +ret r +end +p = add p k +end +ret 0 +end + +note htlsend: close_notify when still connected, wipe the TLS keys and buffers, close the fd +fn htlsend cs edit ulong * io edit uchar * to long +if eq get cs HXPORT 1 +tls_close part io get cs HTB TLCSZ +end +ret hclose cs +end diff --git a/seed/net/notls.om b/seed/net/notls.om new file mode 100644 index 000000000..3987b49e0 --- /dev/null +++ b/seed/net/notls.om @@ -0,0 +1,14 @@ +note seed/net/notls.om -- the transport hooks of http.om for a program built without TLS. +note Library unit: no `om2` line, no `fn main`, no globals. Compose it right after http.om: +note { printf 'om2\n'; cat seed/net/http.om seed/net/notls.om app.om; } | seed/out/omc > app +note Every hook refuses with HENOSUP, so a connection whose HXPORT is not 0 cannot move bytes; +note seed/net/https.om is the implementation that plugs om/tls into these three names. +fn htlsrecv cs edit ulong * io edit uchar * off ulong n ulong to long +ret HENOSUP +end +fn htlsrecvd cs edit ulong * io edit uchar * d edit uchar * to long +ret HENOSUP +end +fn htlssend cs edit ulong * io edit uchar * off ulong n ulong to long +ret HENOSUP +end diff --git a/seed/net/tests/check.py b/seed/net/tests/check.py index 0973eda33..d3673d95b 100755 --- a/seed/net/tests/check.py +++ b/seed/net/tests/check.py @@ -10,7 +10,10 @@ Usage: nice -n 19 ionice -c3 python3 seed/net/tests/check.py [--omc PATH] [--ke Stages: build, corpus (hand cases + deterministic fuzz, seed 788), mutants (each must be caught), live (tests/live.om: keep-alive, 300 KiB / 1 MiB bodies, chunked, HEAD, pipelining, SSE, malformed requests, deadlines, fd leaks), e2e (examples/sse_server.om under curl and -http.client, examples/sse_client.om, server fd count). +http.client, examples/sse_client.om, server fd count), https (tests/https.om = http.om + +https.om + om/tls against a Python ssl TLS 1.3 server and openssl s_server with a throwaway PKI: +bodies, chunked, close-delimited, truncation, wrong name, untrusted issuer, deadline; mutants +of the glue and of the notls stub; with TLS_NET=1 two live read-only GETs). Exit 0 = PASS, 1 = FAIL, 3 = NOT_RUN (a prerequisite such as curl or the compiler is missing). Sockets: 127.0.0.1 with kernel-chosen ephemeral ports only. Never touches port 18091. """ @@ -30,6 +33,10 @@ HERE = os.path.dirname(os.path.abspath(__file__)) NET = os.path.dirname(HERE) ROOT = os.path.dirname(os.path.dirname(NET)) LIB = os.path.join(NET, "http.om") +NOTLS = os.path.join(NET, "notls.om") +HTTPS = os.path.join(NET, "https.om") +TLS_UNITS = ["sha2", "hkdf", "x25519", "chacha", "aesgcm", "ec", "rsa", "x509", "tls"] +TLSDIR = os.path.join(ROOT, "om", "tls") HEADMX = 2048 # parse.om: put cs HHEADMX 2048 HHMAX = 16 # parse.om: put cs HHMAX 16 @@ -980,6 +987,304 @@ def stage_e2e(omc, work, lib_src, log): log("HTTP-E2E PASS connections=%d (curl, http.client, raw, sse_client)" % E2E_CONNS) +# ======== https: http.om + https.om + om/tls against TLS 1.3 servers with a throwaway PKI +def ossl(work, *args): + p = subprocess.run(["openssl"] + list(args), cwd=work, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=120) + if p.returncode != 0: + raise Fail("openssl %s rc=%d %s" % (" ".join(args), p.returncode, p.stderr.decode(errors="replace").strip())) + + +def https_pki(work): + """root -> leaf for localhost (EC P-256), a leaf for another name, and an unrelated root's leaf.""" + d = os.path.join(work, "pki") + os.makedirs(d, exist_ok=True) + ca_ext = ["-addext", "basicConstraints=critical,CA:true", "-addext", "keyUsage=critical,keyCertSign,cRLSign"] + for root in ("root", "other"): + ossl(d, "genpkey", "-algorithm", "EC", "-pkeyopt", "ec_paramgen_curve:P-256", "-out", root + ".key") + ossl(d, "req", "-x509", "-new", "-key", root + ".key", "-subj", "/CN=http-check-" + root, "-days", "30", + "-sha256", *ca_ext, "-out", root + ".pem") + for name, san, root in (("leaf", "localhost", "root"), ("wrong", "other.example", "root"), ("stray", "localhost", "other")): + ossl(d, "genpkey", "-algorithm", "EC", "-pkeyopt", "ec_paramgen_curve:P-256", "-out", name + ".key") + ossl(d, "req", "-new", "-key", name + ".key", "-subj", "/CN=" + san, "-addext", "subjectAltName=DNS:" + san, + "-addext", "basicConstraints=critical,CA:false", "-addext", "keyUsage=critical,digitalSignature", + "-addext", "extendedKeyUsage=serverAuth", "-out", name + ".csr") + ossl(d, "x509", "-req", "-in", name + ".csr", "-CA", root + ".pem", "-CAkey", root + ".key", "-CAcreateserial", + "-days", "10", "-copy_extensions", "copy", "-out", name + ".pem") + return d + + +HTTPS_BIG = bytes((i * 7 + 3) & 255 for i in range(307200)) +HTTPS_CHUNKS = [1, 17, 4096, 16384, 16385, 3, 60000, 100] + + +def https_body(path): + """(response bytes, body the client must print, close mode) for one path of the Python server. + close mode: 'notify' = close_notify then close, 'raw' = close the socket without close_notify.""" + if path == "/small": + return b"HTTP/1.1 200 OK\r\nContent-Length: 6\r\nConnection: close\r\n\r\nhello\n", b"hello\n", "notify" + if path == "/big": + return b"HTTP/1.1 200 OK\r\nContent-Length: %d\r\nConnection: close\r\n\r\n" % len(HTTPS_BIG) + HTTPS_BIG, HTTPS_BIG, "notify" + if path == "/chunked": + body = HTTPS_BIG[:100000] + out = [b"HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\nConnection: close\r\n\r\n"] + pos = 0 + i = 0 + while pos < len(body): + n = min(HTTPS_CHUNKS[i % len(HTTPS_CHUNKS)], len(body) - pos) + out.append(b"%x\r\n" % n + body[pos:pos + n] + b"\r\n") + pos += n + i += 1 + out.append(b"0\r\n\r\n") + return b"".join(out), body, "notify" + if path == "/close": + return b"HTTP/1.0 200 OK\r\n\r\n" + HTTPS_BIG[:50000], HTTPS_BIG[:50000], "notify" + if path == "/trunc": + return b"HTTP/1.1 200 OK\r\nContent-Length: 100\r\n\r\n0123456789", b"0123456789", "raw" + if path == "/silent": + return b"", b"", "silent" + return b"HTTP/1.1 404 Not Found\r\nContent-Length: 0\r\nConnection: close\r\n\r\n", b"", "notify" + + +def https_serve(conn): + """One connection of the Python TLS server: read a request head, answer by path.""" + import ssl + try: + conn.settimeout(10) + head = b"" + while b"\r\n\r\n" not in head and len(head) < 65536: + b = conn.recv(4096) + if not b: + return + head += b + path = head.split(b" ", 2)[1].decode() + resp, _, mode = https_body(path) + if mode == "silent": + time.sleep(4) + conn.close() + return + conn.sendall(resp) + if mode == "raw": + fd = conn.detach() + os.close(fd) + return + try: + conn.unwrap() + except (OSError, ssl.SSLError): + pass + conn.close() + except (OSError, ssl.SSLError): + try: + conn.close() + except OSError: + pass + + +def https_server(pki, cert, stop): + """A TLS 1.3 listener on 127.0.0.1 (ephemeral port) in a thread; returns (port, thread).""" + import ssl + import threading + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) + ctx.minimum_version = ssl.TLSVersion.TLSv1_3 + ctx.load_cert_chain(os.path.join(pki, cert + ".pem"), os.path.join(pki, cert + ".key")) + ctx.set_alpn_protocols(["http/1.1"]) + ls = socket.socket() + ls.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + ls.bind(("127.0.0.1", 0)) + ls.listen(16) + ls.settimeout(0.5) + port = ls.getsockname()[1] + + def loop(): + while not stop.is_set(): + try: + c, _ = ls.accept() + except socket.timeout: + continue + except OSError: + break + try: + tc = ctx.wrap_socket(c, server_side=True) + except (OSError, ssl.SSLError): + c.close() + continue + threading.Thread(target=https_serve, args=(tc,), daemon=True).start() + ls.close() + t = threading.Thread(target=loop, daemon=True) + t.start() + return port, t + + +def https_run(binary, host, port, store, path, connect="127.0.0.1", idle=None, timeout=20): + """Run tests/https.om; (exit, body, status or None, HTTPSERR code or None).""" + args = [binary, host, str(port), store, path, connect] + if idle is not None: + args.append(str(idle)) + try: + p = subprocess.run(NICE + args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=timeout) + except subprocess.TimeoutExpired: + return "timeout", b"", None, None + st = err = None + for l in p.stderr.decode(errors="replace").splitlines(): + if l.startswith("status "): + st = int(l[7:]) + if l.startswith("HTTPSERR "): + err = int(l[9:]) + return p.returncode, p.stdout, st, err + + +HETLS = -600 +HETIME = -110 +HTTPS_ROWS = [ + # (name, path, cert, expected exit, expected HTTPSERR, idle ms) + ("small body", "/small", "leaf", 0, None, None), + ("300 KiB Content-Length body", "/big", "leaf", 0, None, None), + ("chunked body", "/chunked", "leaf", 0, None, None), + ("close-delimited body (close_notify ends it)", "/close", "leaf", 0, None, None), + ("truncation: TCP close without close_notify is an error", "/trunc", "leaf", 4, HETLS - 4, None), + ("silent server: idle limit through tls_deadline", "/silent", "leaf", 4, HETIME, 500), + ("wrong name in the certificate", "/small", "wrong", 4, HETLS - 17, None), + ("leaf of an untrusted root", "/small", "stray", 4, HETLS - 17, None), +] + + +def https_compose(src_lines, notls=False): + """The library source in front of tests/https.om or tests/nosup.om.""" + if notls: + return src_lines + units = b"".join(open(os.path.join(TLSDIR, u + ".om"), "rb").read() for u in TLS_UNITS) + return units + src_lines + + +def https_mutate(text, fn, old, new): + """Replace the first line equal to old after the line 'fn <fn> ...' (exactly one hit in that function).""" + lines = text.split("\n") + start = [i for i, l in enumerate(lines) if l.startswith("fn " + fn + " ")] + if len(start) != 1: + raise Fail("mutant: function %r found %d times" % (fn, len(start))) + end = start[0] + 1 + while end < len(lines) and not lines[end].startswith("fn "): + end += 1 + hits = [i for i in range(start[0], end) if lines[i] == old] + if len(hits) != 1: + raise Fail("mutant: line %r occurs %d times in %s (must be exactly once)" % (old, len(hits), fn)) + lines[hits[0]] = new + return "\n".join(lines), hits[0] + 1 + + +def https_rows(binary, pki, port, oport, log, label): + """All rows against the Python server (port) and openssl s_server -www (oport); the row that fails or None.""" + root = os.path.join(pki, "root.pem") + for name, path, cert, want_rc, want_err, idle in HTTPS_ROWS: + rc, body, st, err = https_run(binary, "localhost", port[cert], root, path, idle=idle) + _, want_body, _ = https_body(path) + ok = rc == want_rc and err == want_err + if want_rc == 0: + ok = ok and st == 200 and body == want_body + log("%s row %-52s rc=%s status=%s err=%s body=%d -> %s" % (label, name, rc, st, err, len(body), "ok" if ok else "MISMATCH")) + if not ok: + return name + if oport: + rc, body, st, err = https_run(binary, "localhost", oport, root, "/openssl-www") + ok = rc == 0 and st == 200 and b"Ciphers supported in s_server binary" in body and body.rstrip(b"\r\n").endswith(b"</HTML>") + log("%s row %-52s rc=%s status=%s body=%d -> %s" % (label, "openssl s_server -www (HTTP/1.0, close-delimited)", rc, st, len(body), "ok" if ok else "MISMATCH")) + if not ok: + return "openssl s_server -www" + return None + + +HTTPS_MUTANTS = [ + # (name, unit, function, old line, new line) + ("http.om: read dispatch to TLS gone", "http", "hrecvio", "ret htlsrecv cs io off n", "ret HENOSUP"), + ("https.om: head read error taken as end of stream", "https", "htlsrecv", "ret htlsmap neg r", "ret 0"), + ("https.om: body truncation taken as end of stream", "https", "htlsrecvd", "ret htlsmap neg r", "ret 0"), + ("https.om: http.om wait policy not given to TLS", "https", "htlsarm", "tls_deadline part io b TLCSZ long dl", "tls_deadline part io b TLCSZ 0"), + ("https.om: records not written", "https", "htlswr", "r = tls_write part io get cs HTB TLCSZ part bb 0 k", "r = long 0"), +] + + +def stage_https(omc, work, http_src, notls_src, log): + import threading + if not shutil.which("openssl"): + raise NotRun("openssl is not installed") + for u in TLS_UNITS: + if not os.path.exists(os.path.join(TLSDIR, u + ".om")): + raise NotRun("om/tls/%s.om is missing" % u) + https_src = open(HTTPS, "rb").read() + pki = https_pki(work) + # the program without TLS refuses every byte on a non-TCP transport + nbin = os.path.join(work, "nosup") + compile_unit(omc, nbin, http_src + notls_src, "tests/nosup.om") + p = subprocess.run(NICE + [nbin], stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60) + if p.returncode != 0: + raise Fail("tests/nosup.om exit %d: a notls program moved bytes on HXPORT 1" % p.returncode) + log("https notls control: nosup exit 0") + mt, ln = https_mutate(notls_src.decode(), "htlsrecv", "ret HENOSUP", "ret 0") + compile_unit(omc, nbin, http_src + mt.encode(), "tests/nosup.om") + p = subprocess.run(NICE + [nbin], stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60) + if p.returncode == 0: + raise Fail("notls mutant SURVIVED: notls.om htlsrecv returning 0 passes nosup") + log("https notls mutant killed: htlsrecv ret 0 (notls.om line %d, exit %d)" % (ln, p.returncode)) + # the real program + hbin = os.path.join(work, "https") + ssrc, sbin = compile_unit(omc, hbin, https_compose(http_src + https_src), "tests/https.om") + log("https.src=%s https.bin=%s https.om sha256=%s" % (ssrc, sbin, sha(https_src))) + stop = threading.Event() + port = {} + for cert in ("leaf", "wrong", "stray"): + port[cert], _ = https_server(pki, cert, stop) + # openssl s_server cannot report a kernel-chosen port: pick a free one and bind it + s = socket.socket() + s.bind(("127.0.0.1", 0)) + oport = s.getsockname()[1] + s.close() + osrv = subprocess.Popen(["openssl", "s_server", "-accept", "127.0.0.1:%d" % oport, "-cert", os.path.join(pki, "leaf.pem"), + "-key", os.path.join(pki, "leaf.key"), "-www", "-tls1_3"], + stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + try: + for _ in range(50): + try: + socket.create_connection(("127.0.0.1", oport), timeout=0.2).close() + break + except OSError: + time.sleep(0.1) + bad = https_rows(hbin, pki, port, oport, log, "https") + if bad: + raise Fail("https row %r" % bad) + log("HTTPS-ROWS PASS rows=%d" % (len(HTTPS_ROWS) + 1)) + mbin = os.path.join(work, "https-mutant") + for name, unit, fn, old, new in HTTPS_MUTANTS: + if unit == "http": + mt, ln = https_mutate(http_src.decode(), fn, old, new) + lib = mt.encode() + https_src + else: + mt, ln = https_mutate(https_src.decode(), fn, old, new) + lib = http_src + mt.encode() + try: + compile_unit(omc, mbin, https_compose(lib), "tests/https.om") + except Fail as e: + raise Fail("https mutant %r does not compile (invalid mutant): %s" % (name, e)) + bad = https_rows(mbin, pki, port, None, lambda s: None, "mutant") + if bad is None: + raise Fail("https mutant %r SURVIVED every row" % name) + log("https mutant killed: %s (%s.om line %d, by row %r)" % (name, unit, ln, bad)) + log("HTTPS-MUTANTS PASS killed=%d/%d" % (len(HTTPS_MUTANTS), len(HTTPS_MUTANTS))) + if os.environ.get("TLS_NET") == "1": + for host, path, needle in (("www.example.com", "/", b"Example Domain"), ("api.github.com", "/licenses/mit", b'"key":"mit"')): + rc, body, st, err = https_run(hbin, host, 443, "-", path, connect=host, timeout=60) + ok = rc == 0 and st == 200 and needle in body + log("https live %s%s rc=%s status=%s err=%s body=%d sha256=%s -> %s" % (host, path, rc, st, err, len(body), sha(body), "ok" if ok else "MISMATCH")) + if not ok: + raise Fail("https live GET %s%s" % (host, path)) + log("HTTPS-LIVE PASS rows=2") + else: + log("HTTPS-LIVE NOT_RUN (set TLS_NET=1 for two live read-only GETs)") + finally: + stop.set() + osrv.kill() + osrv.wait() + log("HTTPS PASS") + + def main(): args = sys.argv[1:] omc = os.path.join(ROOT, "seed", "out", "omc") @@ -996,7 +1301,9 @@ def main(): if not os.access(omc, os.X_OK): print("NOT_RUN: no compiler at %s" % omc) return 3 - lib_src = open(LIB, "rb").read() + http_src = open(LIB, "rb").read() + notls_src = open(NOTLS, "rb").read() + lib_src = http_src + notls_src work = keep or tempfile.mkdtemp(prefix="http-check-") os.makedirs(work, exist_ok=True) out = [] @@ -1005,7 +1312,7 @@ def main(): out.append(s) print(s, flush=True) - log("omc sha256=%s http.om sha256=%s" % (sha(open(omc, "rb").read()), sha(lib_src))) + log("omc sha256=%s http.om sha256=%s notls.om sha256=%s" % (sha(open(omc, "rb").read()), sha(http_src), sha(notls_src))) status = 0 try: cpath, expected = stage_corpus(omc, work, lib_src, log) @@ -1013,6 +1320,7 @@ def main(): stage_live(omc, work, lib_src, log) stage_live_mutants(omc, work, lib_src, log) stage_e2e(omc, work, lib_src, log) + stage_https(omc, work, http_src, notls_src, log) log("HTTP-CHECK PASS") except NotRun as e: log("HTTP-CHECK NOT_RUN %s" % e) diff --git a/seed/net/tests/https.om b/seed/net/tests/https.om new file mode 100644 index 000000000..88ddd8f05 --- /dev/null +++ b/seed/net/tests/https.om @@ -0,0 +1,189 @@ +note seed/net/tests/https.om -- HTTPS GET through http.om + https.om (om/tls) for tests/check.py. +note Composed after the om/tls units, http.om and https.om (see https.om). Program mode. +note usage: https HOST PORT STOREFILE PATH [CONNECTHOST [IDLEMS]] +note HOST is the TLS name (SNI, certificate check) and the Host header; CONNECTHOST (default +note HOST) is what is resolved and dialled; STOREFILE "-" is the system trust store; IDLEMS +note (default 30000) is the longest single wait and the head deadline in ms (hsettmo). +note Writes the decoded body bytes to stdout and "status N" (the final status) to stderr, then +note closes with close_notify. On any negative http.om result r it prints "HTTPSERR r" to stderr +note and exits 4 (HETLS - e for a TLS code e, HETIME at a deadline, HETRUNC on a short body). +note Exit 2 usage, 3 DNS or connect failure. +text uusage "usage: https HOST PORT STOREFILE PATH [CONNECTHOST]\n" +text uerr "HTTPSERR " +text ustat "status " +text unl "\n" +text uget "GET" +text uhost "Host" +text uuan "User-Agent" +text uuav "omega-http-check/1" + +note decimal number from b, or 0 +fn unum b view uchar * to ulong +v = ulong 0 +for i ulong len b +ch = ulong get b i +if or lt ch 48 gt ch 57 +ret 0 +end +v = add mul v 10 sub ch 48 +if gt v 65535 +ret 0 +end +end +ret v +end + +note signed decimal of v after the text t on stderr +fn umsg t view uchar * v long to void +b = new uchar 24 0 +x = write 2 t 0 len t +k = ulong 23 +n = v +sg = lt v 0 +if sg +n = neg v +end +u = ulong n +put b k 10 +while or gt u 0 eq k 23 bound 22 +k = sub k 1 +put b k uchar add 48 rem u 10 +u = div u 10 +end +if sg +k = sub k 1 +put b k 45 +end +x = write 2 b k sub 24 k +end + +note ubody: the decoded body to stdout; 0 at its end or a negative result +fn ubody cs edit ulong * io edit uchar * to long +d = new uchar 16384 0 +for it ulong 999999 +n = hbodyrd cs io d +if le n 0 +ret n +end +x = write 1 d 0 ulong n +end +ret HEBIG +end + +note ureq: the request and the response; hp = host length << 16 | path length; 0 or negative +fn ureq cs edit ulong * io edit uchar * w view uchar 4096 hp ulong to long +r = hreqst cs io uget +r = hfe r hreqtg cs io part w 1344 and hp 65535 +r = hfe r hhname cs io uhost +r = hfe r hhval cs io part w 0 shr hp 16 +r = hfe r hhname cs io uuan +r = hfe r hhval cs io uuav +r = hfe r hhend cs io 0 0 +r = hfe r hwfin cs io +if lt r 0 +ret r +end +r = hrsprd cs io +if lt r 0 +ret r +end +umsg ustat r +ret ubody cs io +end + +note w: host 0..256, port 256..320, store 320..1344, path 1344..2368, connect host 2368..2624 +note v: 0 host length, 1 path length, 2 store path length, 3 port, 4 connect host length, 5 idle ns +fn uargs w edit uchar 4096 v edit ulong 8 to int +if lt argcnt 5 +x = write 2 uusage 0 len uusage +ret 2 +end +hl = argread 1 w 0 255 +pl = argread 4 w 1344 1023 +sl = argread 3 w 320 1023 +pn = argread 2 w 256 6 +if or or or le hl 0 le pl 0 le sl 0 le pn 0 +ret 2 +end +po = unum part w 256 ulong pn +if eq po 0 +ret 2 +end +put v 0 ulong hl +put v 1 ulong pl +put v 2 ulong sl +put v 3 po +tls_mov w 2368 0 ulong hl +if ge argcnt 6 +hl = argread 5 w 2368 255 +if le hl 0 +ret 2 +end +end +put v 4 ulong hl +put v 5 30000000000 +if ge argcnt 7 +hl = argread 6 w 2624 8 +if le hl 0 +ret 2 +end +put v 5 mul unum part w 2624 ulong hl 1000000 +end +ret 0 +end + +note ustore: the trust store from STOREFILE ("-" = system); 0 or HETLS - e +fn ustore st edit uchar 262144 w view uchar 4096 sl ulong to long +e = ulong 0 +if and eq sl 1 eq get w 320 45 +e = tls_store st +else +e = tls_storef st part w 320 sl +end +if ne e 0 +ret sub HETLS long e +end +ret 0 +end + +note uconn: dial and the TLS setup (hinit, htlsinit); 0, -1000 (connect) or a negative result +fn uconn cs edit ulong * io edit uchar * w view uchar 4096 v view ulong 8 to long +fd = tls_dial part w 2368 get v 4 get v 3 +if lt fd 0 +ret -1000 +end +r = hinit cs io int fd 0 +hsettmo cs long get v 5 long get v 5 +ret hfe r htlsinit cs io part w 0 get v 0 +end + +fn main to int +cs = new ulong 320 0 +io = new uchar 262144 0 +st = new uchar 262144 0 +w = new uchar 4096 0 +v = new ulong 8 0 +e = uargs w v +if ne e 0 +ret e +end +r = ustore st w get v 2 +if ge r 0 +r = uconn cs io w v +end +if ge r 0 +r = htlsconn cs io st +end +if ge r 0 +r = ureq cs io w or shl get v 0 16 get v 1 +end +x = htlsend cs io +if eq r -1000 +ret 3 +end +if lt r 0 +umsg uerr r +ret 4 +end +ret 0 +end diff --git a/seed/net/tests/nosup.om b/seed/net/tests/nosup.om new file mode 100644 index 000000000..7ccce4e09 --- /dev/null +++ b/seed/net/tests/nosup.om @@ -0,0 +1,24 @@ +note seed/net/tests/nosup.om -- a program built without TLS (http.om + notls.om) must refuse +note every byte on a connection whose transport is not plain TCP (HXPORT 1): the three +note transport functions return HENOSUP. Exit 0 = all three refused; 1..3 name the one that did not. +fn main to int +cs = new ulong 320 0 +io = new uchar 4096 0 +d = new uchar 64 0 +r = hinit cs io 0 0 +if ne r 0 +ret 9 +end +put cs HXPORT 1 +if ne hrecvio cs io 0 16 HENOSUP +ret 1 +end +if ne hrecvd cs io d HENOSUP +ret 2 +end +if ne hsendio cs io get cs HWB 1 HENOSUP +ret 3 +end +put cs HOPEN 0 +ret 0 +end