Skip to main content

Module boot

Module boot 

Source
Expand description

Kernel boot path: gate the PQ signing key load on a self-quote.

The PQ signing key load is gated on a verified self-quote that binds the expect_report_data and hybrid-signing paths. Boot order:

  1. The kernel comes up with its classical Ed25519 keypair already materialized. No PQ key has been touched.
  2. The kernel requests its own TEE quote from the surrounding chio-tee container and feeds the bytes into a verifier-side KernelSelfQuoteVerifier. The quote MUST commit to expect_report_data(kernel_classical_pk, receipt_root_genesis) where receipt_root_genesis is the all-zero 32-byte sentinel [0u8; 32] representing the empty receipt-tree root at boot.
  3. Only after the verifier returns success does the kernel derive the MlDsa65Backend from the operator-supplied seed and compose the HybridBackend. Any failure in step 2 leaves the kernel running classical-only and the boot path returns an error: under crypto_floor=allow_hybrid or crypto_floor=pq_required the operator MUST refuse to start signing.

§Why a port trait rather than a hard chio-attest-verify dep

chio-kernel does not depend on chio-attest-verify and this module preserves that boundary. The verifier crate today carries TDX/SEV-SNP/ Nitro backends each pulled in behind a cargo feature; the kernel does not need any of them at boot time. The port trait below is small enough to implement against chio-attest-verify’s QuoteVerifier by a one-line shim in the operator binary that wires the two crates together, and small enough to implement against an in-memory mock for the integration test.

§Trust-boundary discipline

  • Fail-closed: every error path returns KernelBootError without producing a [HybridBackend].
  • The kernel signing key (the classical Ed25519 key plus the PQ composition) is never returned partially. Callers that ask for a hybrid backend either get one fully gated by a verified self-quote or they get an error.
  • receipt_root_genesis is the RECEIPT_ROOT_GENESIS constant. Production callers MUST NOT thread their current receipt root in; the genesis quote binds to the empty tree so the chain has a fixed cryptographic anchor independent of the first receipt’s contents.

Structs§

KernelSelfQuoteOutcome
Outcome reported by a KernelSelfQuoteVerifier.

Enums§

KernelBootError
Errors the boot path raises while gating the PQ key load.

Constants§

RECEIPT_ROOT_GENESIS
Receipt-root sentinel used for the kernel self-quote.

Traits§

KernelSelfQuoteVerifier
Port the kernel boot path consults to verify its own TEE quote.

Functions§

load_kernel_signing_backend_after_self_quote
Load the kernel signing backend, gating the PQ half on a verified self-quote.