omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / .github / workflows / om-tls-arm64.yml
| 1 | # om-tls-arm64: independent ARM64 rerun of the om/tls ECDH unit suite (CAVP KAS ECC CDH, Wycheproof, |
| 2 | # edge cases, mutants), the x509 suite, the om/tls suite (RFC 8448 vectors, DNS unit, DIT probe, |
| 3 | # interop against openssl s_server, OpenSSL 3.5.4 s_server (X25519MLKEM768) and the Python fake server |
| 4 | # (kyber-py for ML-KEM-768), secret-residue scan in default, approved-only and hybrid mode, mutants), |
| 5 | # the ML-KEM/SHA-3 suite, the hostile-server suite (hostile.py, local only, with its mutants) and |
| 6 | # of the seed/net HTTP/HTTPS check on a GitHub-hosted ubuntu-24.04-arm machine, with the pinned omc |
| 7 | # (om/units.sh OMC_PIN). Network stages stay NOT_RUN (TLS_NET unset); TLS_PQ=1 makes a missing |
| 8 | # post-quantum oracle a FAIL. Logs are uploaded as artifacts. workflow_dispatch with kem_mutant=true |
| 9 | # flips one ML-KEM ciphertext byte before decapsulation in tls.om: that run must go red. |
| 10 | # Advisory, like AIEN Checks: GitHub gates no merge (Alpha does). |
| 11 | name: om-tls-arm64 |
| 12 | on: |
| 13 | pull_request: |
| 14 | paths: ["om/tls/**", "seed/net/**", "seed/json/**", "seed/out/omc", "om/units.sh", ".github/workflows/om-tls-arm64.yml"] |
| 15 | push: |
| 16 | branches: [main] |
| 17 | workflow_dispatch: |
| 18 | inputs: |
| 19 | kem_mutant: |
| 20 | description: "flip a KEM ciphertext byte before decaps (the run must fail)" |
| 21 | type: boolean |
| 22 | default: false |
| 23 | permissions: |
| 24 | contents: read |
| 25 | jobs: |
| 26 | om-tls: |
| 27 | runs-on: ubuntu-24.04-arm |
| 28 | timeout-minutes: 45 |
| 29 | steps: |
| 30 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 31 | - name: machine and tools |
| 32 | run: | |
| 33 | uname -a; nproc; openssl version; python3 --version |
| 34 | python3 -c 'import cryptography' 2>/dev/null || sudo apt-get install -y -q python3-cryptography |
| 35 | python3 -c 'import cryptography; print("cryptography", cryptography.__version__)' |
| 36 | - name: omc pin |
| 37 | run: | |
| 38 | pin=$(sed -n 's/^OMC_PIN=//p' om/units.sh | tr -d '"') |
| 39 | got=$(sha256sum seed/out/omc | cut -c1-64) |
| 40 | echo "pin $pin"; echo "got $got" |
| 41 | [ "$pin" = "$got" ] || { echo "seed/out/omc does not match OMC_PIN"; exit 1; } |
| 42 | chmod +x seed/out/omc |
| 43 | - name: X25519MLKEM768 oracles (OpenSSL 3.5.4, kyber-py) |
| 44 | uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
| 45 | with: |
| 46 | path: ~/openssl-3.5.4 |
| 47 | key: openssl-3.5.4-967311f84955316969bdb1d8d4b983718ef42338639c621ec4c34fddef355e99-${{ runner.os }}-${{ runner.arch }}-v1 |
| 48 | - name: build or reuse OpenSSL 3.5.4, install kyber-py |
| 49 | run: | |
| 50 | sh om/tls/test/tls/openssl35.sh "$HOME/openssl-3.5.4" |
| 51 | python3 -m venv --system-site-packages "$HOME/pqpy" |
| 52 | "$HOME/pqpy/bin/pip" install -q --require-hashes -r om/tls/test/tls/pq-requirements.txt |
| 53 | "$HOME/pqpy/bin/python" -c 'import kyber_py.ml_kem, cryptography; print("kyber-py ok")' |
| 54 | echo "OPENSSL35=$HOME/openssl-3.5.4/bin/openssl" >> "$GITHUB_ENV" |
| 55 | echo "FAKESRV_PY=$HOME/pqpy/bin/python" >> "$GITHUB_ENV" |
| 56 | echo "TLS_PQ=1" >> "$GITHUB_ENV" |
| 57 | - name: apply KEM ciphertext mutant (this run must fail) |
| 58 | if: github.event_name == 'workflow_dispatch' && inputs.kem_mutant |
| 59 | run: | |
| 60 | cp om/tls/tls.om /tmp/tls.om.orig |
| 61 | sed -i '/^r = mlkem_decaps part c TLKDK 2400 ct ss$/i put ct 7 uchar xor ulong get ct 7 1' om/tls/tls.om |
| 62 | ! cmp -s om/tls/tls.om /tmp/tls.om.orig || { echo "mutation did not apply"; exit 1; } |
| 63 | diff /tmp/tls.om.orig om/tls/tls.om || true |
| 64 | - name: om/tls ML-KEM and SHA-3 suite |
| 65 | run: mkdir -p build && sh om/tls/test/mlkem/run.sh "$PWD/seed/out/omc" 2>&1 | tee build/om-tls-mlkem.log; test "${PIPESTATUS[0]}" = 0 |
| 66 | - name: om/tls ECDH unit suite |
| 67 | run: mkdir -p build && sh om/tls/test/ecdh/run.sh "$PWD/seed/out/omc" 2>&1 | tee build/om-tls-ecdh.log; test "${PIPESTATUS[0]}" = 0 |
| 68 | - name: om/tls DRBG unit suite |
| 69 | run: mkdir -p build && sh om/tls/test/drbg/run.sh "$PWD/seed/out/omc" 2>&1 | tee build/om-tls-drbg.log; test "${PIPESTATUS[0]}" = 0 |
| 70 | - name: om/tls self-test (fips) suite |
| 71 | run: mkdir -p build && sh om/tls/test/fips/run.sh "$PWD/seed/out/omc" 2>&1 | tee build/om-tls-fips.log; test "${PIPESTATUS[0]}" = 0 |
| 72 | - name: om/tls software integrity suite |
| 73 | run: mkdir -p build && sh om/tls/test/integrity/run.sh "$PWD/seed/out/omc" 2>&1 | tee build/om-tls-integrity.log; test "${PIPESTATUS[0]}" = 0 |
| 74 | - name: om/tls x509 suite |
| 75 | run: mkdir -p build && sh om/tls/test/x509/run.sh "$PWD/seed/out/omc" 2>&1 | tee build/om-tls-x509.log; test "${PIPESTATUS[0]}" = 0 |
| 76 | - name: om/tls revocation (rev) suite |
| 77 | run: mkdir -p build && sh om/tls/test/rev/run.sh "$PWD/seed/out/omc" 2>&1 | tee build/om-tls-rev.log; test "${PIPESTATUS[0]}" = 0 |
| 78 | - name: om/tls suite |
| 79 | 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 |
| 80 | - name: om/tls hostile-server suite |
| 81 | run: mkdir -p build && sh om/tls/test/net/hostile.sh "$PWD/seed/out/omc" 2>&1 | tee build/om-tls-hostile.log; test "${PIPESTATUS[0]}" = 0 |
| 82 | - name: seed/net HTTP and HTTPS check |
| 83 | run: python3 seed/net/tests/check.py --keep build/netcheck 2>&1 | tee build/net-check.log; test "${PIPESTATUS[0]}" = 0 |
| 84 | - name: logs |
| 85 | if: always() |
| 86 | uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 |
| 87 | with: |
| 88 | name: om-tls-arm64-logs |
| 89 | path: | |
| 90 | build/om-tls-run.log |
| 91 | build/om-tls-mlkem.log |
| 92 | build/om-tls-ecdh.log |
| 93 | build/om-tls-drbg.log |
| 94 | build/om-tls-fips.log |
| 95 | build/om-tls-integrity.log |
| 96 | build/om-tls-x509.log |
| 97 | build/om-tls-rev.log |
| 98 | build/om-tls-hostile.log |
| 99 | build/net-check.log |
| 100 | build/tls/tls/*.log |
| 101 | build/tls/tls/interop-table.txt |