Extended suites require the separate meh-tests checkout. Set
MEH_TEST_ROOT to its path (default: the compiler's sibling ../meh-tests)
and export MEH_COMPILER_ROOT when the compiler is elsewhere. For commands
below, use export MEH_TEST_ROOT="${MEH_TEST_ROOT:-$PWD/../meh-tests}"
from the compiler root.
Release acceptance requires certificate checks (SEC-1), generated-code review (SEC-2) and the regression/interoperability matrix (SEC-3). A passing test run or generated inventory does not replace review or certify the implementation.
Run the matrix runner manually on native
macOS Intel and ARM64, a local Apple Silicon Ubuntu ARM64 QEMU/HVF guest,
and native Linux x86-64. Both bootstrap and self-hosted compilers must pass
all five profiles: O0, O1, O2, O3 and Os. The runner maps bootstrap
-O levels to equivalent self-hosted named modes. Do not narrow
MEH_SEC3_PROFILES for release acceptance.
"$MEH_TEST_ROOT/security/sec3_matrix.sh" BOOTSTRAP SELFHOST NEW_OR_EMPTY_DIRECTORYEach environment needs LLVM 23.1 or newer, Go, curl and OpenSSL advertising
X25519MLKEM768. The acceptance runner
also accepts those three arguments for a single profile. MEH_SEC3_JOBS
sets a positive concurrency limit; the default is five checks.
Every profile requires both full Wycheproof runs, controlled TLS/X.509/HTTP/2
peers, bidirectional OpenSSL TLS 1.2/1.3 and X25519MLKEM768 checks, and the
public HTTP/2 probe. Controlled Go peers listen only on loopback.
The public probe is a mandatory
release dependency on https://grimdork.net/: bundled roots only, ALPN h2,
one direct GET /, no redirects and a bounded 2xx response. Its host cannot
be overridden; diagnostic overrides do not satisfy the gate.
Follow the Linux evidence runbook for image creation, QEMU and native Linux preflights. It defines the Ubuntu image, QEMU/HVF requirements, operator-controlled images and SSH material, and report contract. Retain revision, profiles, platform and toolchain metadata and artefact hashes, including QEMU backing-image hashes before and after the run. Keep failure logs; do not copy private keys, images or credentials into release artefacts.
- X.509 rejects malformed or duplicate recognised extensions, unsupported critical extensions and unsupported name constraints. DNS constraints, CA path limits and constrained common-name fallback apply across the chain, including trust anchors. Chain searches have depth and candidate limits.
- HPACK bounds lengths and rejects truncated Huffman input and invalid EOS/padding. HTTP/2 validates headers, pseudo-headers, content lengths and control frames, bounds buffered DATA and fails closed on unexpected streams, GOAWAY and RST_STREAM. Dynamic HPACK tables are unsupported; capacity is zero.
- TLS client authentication requires TLS 1.3. Failed handshakes do not retry a
lower version; downgrade sentinels are checked. Server handshakes have a
30-second absolute deadline unless
HandshakeTimeout(0)disables it.net.Conn.SetDeadlinetakes an absoluteclock()value in milliseconds. - RSA signing checks prime/CRT consistency, uses public-width Montgomery arithmetic, fresh message blinding and independent 128-bit exponent blinds, and verifies results before release. Import does not prove primality; n/e/d-only keys cannot sign. Entropy failures, short reads and exhausted retries fail closed, including caller-salted PSS.
- RSA-PSS supports independent SHA-224/256/384/512 message and MGF1 hashes, exact fitting salt lengths and the required unused-bit mask.
- P-256 uses fixed 256-round private multiplication, masked exceptional points, fixed-width inversion and bounded nonce rejection. Ed25519 uses complete extended Edwards formulas and fixed 256-round private multiplication.
- AES-GCM supports 128/192/256-bit keys. HMAC SHA-224/256/384/512 accepts tags from half to full digest length, using constant-time prefix comparison.
- ML-DSA-44/65/87 supports context and internal representative APIs. Contexts are at most 255 bytes; representatives and signing randomness require 64 and 32 bytes. Local ML-DSA TLS credentials remain rejected; peers can be verified.
Use the corpus documentation for the offline
runner and update procedure. The corpus provenance and
SHA-256 manifest identify its inputs.
Only $MEH_TEST_ROOT/wycheproof/update.sh FULL_UPSTREAM_COMMIT fetches updates; normal
audits never use the network or modify upstream vectors.
Valid vectors must match exactly, invalid inputs must reject, and acceptable inputs may reject or return the exact result. Valid ML-KEM implicit-rejection cases must return the specified secret. Wrong accepted results, malformed metadata, unknown classifications and unexpected skips fail the audit. Reports contain filenames, test-case identifiers and outcomes, never vector keys, messages, signatures, ciphertexts or shared secrets. Use new or empty report directories. Vector coverage is not a formal proof or certification.
SEC-1 uses supervised certificate tests against controlled TLS 1.2/1.3 peers:
trusted, untrusted and hostname-mismatched certificates, server credentials,
handshake and shutdown. A disconnect or stall cannot count as rejection.
Its live HTTPS check uses bundled roots; MEH_TLS_TEST_HOST is diagnostic only.
SEC-2 covers RSA PKCS#1/PSS, P-256 and Ed25519 signing/point derivation,
ML-DSA-44/65/87 context/internal signing and ML-KEM-768/1024 decapsulation,
including transitive runtime/native helpers. Review both compilers on
Linux/macOS, ARM64/x86-64 and all five optimisation profiles. Use generic CPUs and PIC with LLVM 23.1
or newer. Bootstrap uses its O2 machine backend at every IR level; self-hosted
backend levels follow optimisation, with Os using O2 plus size attributes.
macOS x86-64 reserves r15 (+reserve-r15), ARM64 reserves x28 and Linux
x86-64 uses TLS. Retain raw/optimised IR, assembly, objects and hashes;
optimisation may inline or remove roots from named inventories.
This reviews software control flow and addressing for fixed public sizes and runtime settings. It does not prove identical elapsed time or resistance to physical side channels or faults. DER import, legacy BigInt conversion and offline key generation are outside constant-time claims. Public verification, signature encoding, entropy/nonce rejection, invalid keys and errors may vary in duration. Imported keys must be immutable; entropy injection is test-only.
SEC-2 Linux evidence covers generated IR/assembly and assembled objects, not end-to-end Linux execution. Certificate execution evidence covered macOS ARM64 and x86-64 under Rosetta. BSD, WASM and Windows were excluded. SEC-3 requires its own native Linux runs. A supported LLVM version alone certifies no output.
Use the maintained certificate checks,
compiler regressions,
stack, syscall
and relocation checks.
Generate review evidence with $MEH_TEST_ROOT/security/private_code_review.sh BOOTSTRAP SELFHOST NEW_DIRECTORY and $MEH_TEST_ROOT/security/private_code_native_review.sh NEW_DIRECTORY; both require absent output directories. Successful generation
and closure inventories still require review.
Use MEH_TEST_RUNTIME_ARGS='--runtime full' for self-hosted network fixtures;
bootstrap needs no runtime flag. MEH_OPENSSL selects a particular OpenSSL.
Test the certificate supervisor with go test "$MEH_TEST_ROOT/security/certificate_fixture.go" "$MEH_TEST_ROOT/security/certificate_fixture_test.go".
Repeat review after relevant TLS, X.509, HTTP/2, crypto/runtime, compiler, LLVM,
CPU-feature, root-bundle, public-endpoint or guest-image/provisioning changes.