pub fn load_kernel_signing_backend_after_self_quote(
crypto_floor: KernelCryptoFloor,
classical_keypair: Keypair,
pq_seed: Option<&[u8; 32]>,
quote_bytes: &[u8],
verifier: &dyn KernelSelfQuoteVerifier,
) -> Result<Box<dyn SigningBackend>, KernelBootError>Expand description
Load the kernel signing backend, gating the PQ half on a verified self-quote.
Boot logic:
- Under
KernelCryptoFloor::AllowClassicalthe self-quote step is skipped: there is no PQ key to gate, and a classical-only deployment may not even ship a TEE container. The function returns the classical-only backend produced bykernel_signing_backend. - Under
KernelCryptoFloor::AllowHybridorKernelCryptoFloor::PqRequiredthe function consults the verifier port FIRST. Only onKernelSelfQuoteOutcome::verifieddoes it construct the hybrid backend. A rejected outcome returnsKernelBootError::SelfQuoteRejectedwithout ever materializing theMlDsa65Backend.
quote_bytes is the on-the-wire self-quote produced by the TEE
container. For tests, an empty slice combined with a mock verifier
is fine; for production the bytes come from chio-tee.
ยงErrors
KernelBootError::SelfQuoteRejectedwhen the verifier rejects the self-quote and the floor mandates a PQ key.KernelBootError::SigningBackendwhen the floor or PQ seed is misconfigured (forwarded fromKernelSigningBackendError::HybridFloorRequiresPqKeyorKernelSigningBackendError::PqKeyImportFailed).