interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / docs / osc-receipts.md

113 lines · 8129 bytes Raw Blame History Source

OSC unit launch requires a realization receipt (aienos#383)

Label for everything below: QEMU (aarch64 virt), TEST signer, not physical. Nothing here has run on a Spark or any real machine. Contract: omega spec/one-layer-receipts.md (receipt v1, normative; section numbers below refer to it). Gate: scripts/qemu_ck_osc_receipt_test.sh (OSC_RECEIPT row in scripts/ck_gates.sh, notes in native/kernel/GATES.md).

What it does

A receipt is a 416-byte record, signed by a key of a stated class, saying that omega's independent checker (checker2) judged one exact program (the OSC IR) and that one executable is bound to it by hash. The kernel now refuses to launch an admitted OSC unit unless a receipt that is valid for that exact unit comes with the launch.

Refusal codes

Kernel code = 64 + the spec's stable reason number; the name is RECEIPT_<spec name>. Order is spec section 6; the first failure decides.

codenamewhen
64RECEIPT_MISSINGno receipt (kernel only)
65..71SIZE, MAGIC, VERSION, SIGNATURE_ALGORITHM, SIGNER_CLASS, EVIDENCE_CLASS, EPOCH_ORDERstructure
73TEST_SIGNER_IN_PRODUCTIONrelease build and the receipt is not OWNER class
74UNTRUSTED_SIGNERfingerprint names no anchor of the receipt's class; a key in both classes; release mode and the owner key is not the owner root
75BAD_SIGNATURE
76REVOKEDreceipt id, then signer key fingerprint (revoked=receipt_id or revoked=signer_key on the launch line)
77, 78, 79STALE_EPOCH, EXPIRED, NOT_YET_VALIDepoch window, inclusive at both ends
86UNTRUSTED_CHECKERchecker identity not in the pinned list
80..83WRONG_TARGET, WRONG_FIRMWARE, PROGRAM_MISMATCH, EXECUTABLE_MISMATCHbinding to the unit
87WRONG_PRODUCERthe kernel's policy expects none (all zero)
88DEPENDENCIES_MISMATCHany dependency claimed
96LRAT_PROOFS_REQUIREDevidence class 2 (kernel-assigned number, see below)
84ARGUMENTverifier called without a unit or a policy

Kernel policy (ck_osc_policy)

Ambiguities in the spec, written down (no guess taken)

  1. Revoked id and revoked key share one code. The brief asked for a reason of its own per case; the spec gives both REVOKED (12). The kernel returns the spec code and says which list matched in a separate field (revoked=receipt_id|signer_key).
  2. Evidence class 2. Section 6 accepts class 2 as well formed; section 10 says a class 2 receipt is valid only when the same LRAT proofs are given and replayed, and names LRAT-PROOFS-REQUIRED without a number. The kernel is given no proofs and has no LRAT checker, so it refuses class 2 (fail closed) with the kernel-assigned code 96, after every section 6 step has passed (the spec does not place this check in the section 6 order).
  3. The "current epoch" and the floor have no source in the spec beyond "the verifier's". The kernel uses compile-time constants.
  4. Producer. The unit carries no producer identity, so the kernel policy names none (NULL), which expects an all-zero producer field ("none"), matching checker2 receipt verify when no --producer is given. The kernel and checker2 agree on all 22 rows of expected.txt.

UNVERIFIED (not done, not claimed)

Tests