interplane.Get Omega
Read in your language

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

[OM-SEC P1] Verify secret independence through seeded .om lowering and emitted code

Open · #758 · open 2026-10-25 19:05 UTC

Imported from GitHub aien-dev/omega-mv#758, by drakestapleton

drakestapleton wrote on 2026-10-25 19:05 UTC

Goal and grounding

Add a scoped source-to-machine-code secrecy guarantee under #623/#625. Main omc currently emits ordinary branches, loads and traps; no constant-time guarantee follows from source language safety. omnet main 505709e3785bdb92edbedf691f3b830f99bd7de1 explicitly marks om/argon2/argon2.om as not audited; om/ed25519/ed25519.om is public-input variable-time verification, including early equality exit. Public-only verification is not automatically a secret leak, and this issue must not silently repurpose it for signing/secrets.

Implement

  • Specify secret/public information-flow labels, permitted disclosures, and an explicit observation model: branches, addresses, loops, traps/errors, instruction latency assumptions and relevant I/O. Track secret influence transitively through helpers and data structures.
  • Reject secret-dependent forbidden operations or lower through qualified constant-time primitives. Variable-time public-input routines require public input; a secret-to-public cast is not authorization to disclose.
  • Establish a relational source contract and preserve it through the actual native lowering/optimization path. Reuse #623's independent checker/certificate machinery; bind exact output bytes, target, optimizer, leakage model and assumptions.
  • Ordinary output equivalence/trace inclusion and an IR no-trap proof are insufficient. Add a nondeterminism fixture where source allows {0,1} independently of a secret but faulty compilation selects the secret bit: per-run inclusion holds, secrecy fails.
  • Freeze the first architectural leakage model and explicitly separate speculative, cache/shared-resource and other physical models. Never advertise an architectural proof as physical timing immunity. Unsupported targets reject the stronger claim.
  • Start with a small secret-comparison primitive and one actual secret-consuming omnet path; audit the crypto dependency closure before expanding claims. Preserve existing public verification semantics and vectors.

Acceptance

  • Paired executions agree on allowed observations for different secret inputs; check secret branches, early exits, table indexes, variable divisions, errors and helper-call leakage.
  • Mutated compiler output that reintroduces a secret branch/address is rejected despite identical functional outputs. Wrong target/bytes/model/disclosure policy or checker version invalidate evidence.
  • Source fixtures, machine-code checks and target measurements are separate results. Statistical timing tests are regression evidence, not proof.
  • Runtime scheduling/allocation/reclamation secrecy is supplied by the linked resource-envelope leaf; component crypto proofs alone do not close service secrecy.

Research: https://doi.org/10.1145/3729318 (nondeterministic CT compilation); https://doi.org/10.1145/3763101 (hyperproperty-preserving optimization); https://doi.org/10.1145/3704880 (speculative CT); https://doi.org/10.1109/SP40001.2021.00003 (SeLoC). Name exact theorems and assumptions used.

Delivery contract

Parent: aien-dev/omega-mv#673. Additive scoped work; preserve existing programme, compiler, authority/store, verifier and publication owners. Reconcile main, live branches/PRs, issue comments and applicable repository instructions before edits. One writer per shared path. New first-party implementation, test and runner logic is seeded .om; independent third-party provers/Wolfram may be development oracles outside the delivered runtime. No second compiler, scheduler, authority or store. Version semantic changes; qualify consumers before removing superseded active implementations; preserve historical evidence.

Separate implementation status from assurance: formal proof, exact finite-model result, differential tests, native/emulated run and hardware qualification are distinct. Unknown/timeouts/build errors/missing evidence never establish safety. Record exact source, semantic profile, compiler, target, executable, checker, model/config/fixtures, raw commands/exits and independent final-source review. No deployment or live workload interruption is authorized by this issue.

Linked dependencies

Contracts/checker: #625 and #623. Service-level observation composition: #759. Consumer and secret-path qualification: aien-dev/omnet#3.

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:17 UTC

Recovered GitHub comment. Original comment 6426384274

Related evidence from the TlsAudit lane (not produced by SemanticFrontier; quoted from that lane, not rerun here): dudect-style Welch t-tests over om/tls x25519/chacha/aesgcm/tls_cteq on Spark cpu0 (Cortex-A725) and cpu5 (Cortex-X925) report all |t| < 2.5 after equalising a pre-window getrandom call (a v1 driver showed a spurious chacha t = -10.4). Location: Spark /home/drakestapleton/handoffs/TlsAudit/evidence/timing/welch.md, driver om/tls/test/tls/timing.om on branch audit/tls-outside-review (not yet pushed when this was written; draft PR pending). Timing tests are statistical evidence of no detected leak on one machine, not a constant-time guarantee; the leakscan static baseline proposed above is still NOT_RUN on om/tls.

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:25 UTC

Recovered GitHub comment. Original comment 6426293892

SemanticFrontier survey input for this issue (not a duplicate issue): candidate #3 of a ranked semantic-frontier list. PROPOSED only.

Status: PROPOSED (plan only; nothing implemented under this issue). Source pin: omega-mv main 0b77e6ea2, pinned omc 2c824805…029f. From the SemanticFrontier survey (ranked list of 15 semantic-frontier candidates; companion M1 implementations: omega-mv #820 effect manifest, semhash draft PR). Any compiler change goes only through the integ/omc-batch3 integration route. Evidence words stay separate (PROPOSED / IMPLEMENTED / EXERCISED / QUALIFIED).

3. Constant-time by construction: PROPOSED

Problem. Timing side channels in crypto. Compilers may introduce secret-dependent branches, and auditors review assembly by hand.

Why traditional approaches struggle.

Omega approach. Add a secret qualifier, checked at source level: no branch, index or division on secret data. Then check the binary with the existing leakscan as an independent oracle. omc does not optimise behind the author's back; folding, unrolling and inlining are opt-in (OMEGESE §9.7). That removes the main failure mode of the C/LLVM pipeline.

Exists today.

  • seed/qualification/om2/leak/leakscan.om is a static trace-equivalence scanner over AArch64 (README.txt:1-43). It is EXERCISED, with 54 of 55 cases passing (evidence/phaseB/leak-reachability.txt:43).
  • On SHA-256 the verdict is NOT_RUN: 16 MANUAL branches and 8 data-index accesses.
  • There is no secret type. The docs repeat "No constant-time claim is made" (om/sha256/README.md:39-40).

First milestone (M1). Run leakscan as an executable baseline over om/tls x25519 and chacha with pub: declarations, and classify every MANUAL/UNKNOWN site. This needs no compiler change. Coordinate with TlsAudit, which owns TLS findings.

Later milestones.

  • M2: design the secret qualifier, routed through OmegaNext.
  • M3: make leakscan PASS a required gate for om/tls.

Better / not. Omega is better than C because the compiler does not optimise, and both the source rule and the binary scanner exist. It is not better than Jasmin, which has machine-checked proofs. Omega would have a checker plus an oracle, not a proof.

Risks. The language has no secret type today, so M1 can show NOT_RUN sites but cannot fix them.

Sign in to comment