SKR
SKR (Secure Key Release) is the integrity mode of the Kibo custody ladder. Keys remain platform-managed — Kibo holds and uses the plaintext Data Encryption Key — but the platform releases that key only to your own verified, attested code. An unauthorized build is refused, not warned.
This is the distinction from Platform-Managed: any valid credential receives the key. Under SKR, the credential is necessary but not sufficient. The running workload must also present an attestation report whose cryptographic measurement matches the builds you pre-authorized, and whose Trusted Computing Base meets the minimum security floor you declared.
When SKR is the right tier
SKR defends against a threat that BYOK (Bring Your Own Key) and HYOK (Hold Your Own Key) don't address: a compromised host or stolen credential receiving your keys and decrypting your data. It makes the question "is this authorized code?" a cryptographic question with a binary answer, rather than a credential-possession question with a "who has the key file?" answer.
It is the right tier when your threat model includes:
- ML pipelines and regulated data-processing workloads — the model must run inside a verifiable enclave; a rogue or modified build must not access training data.
- High-assurance financial and healthcare services — compliance mandates proof that only your production build touched sensitive records; audit trails must be attestation-anchored.
- Supply-chain threat scenarios — your build process is under an adversarial supply-chain pressure and you need the runtime to cryptographically validate the binary before it receives keys.
It does not make custody sovereign. Kibo must hold the key to enforce the attestation gate — a platform-held key is not operator-blind. For operator-blind sovereignty, use BYOK or HYOK.
How it works
The attestation report
A workload running inside a Trusted Execution Environment (TDX or SEV-SNP) can produce an attestation report — a signed record of the workload's cryptographic measurement (a hash of the running binary), the hardware Trusted Computing Base version, and a nonce binding the report to the request. The TEE platform signs the report using its hardware attestation key.
When the workload asks Kibo to release a key, the attestation report from the TEE substrate accompanies the request. Kibo's verification layer:
- Verifies the report's signature against the vendor's public PKI (AMD KDS for SEV-SNP, Intel PCS for TDX).
- Extracts the workload's
measurementandtcbfrom the verified report. - Checks them against the project's
measurementPolicy. - Releases the DEK only if both checks pass.
This is pure-software verification — the platform does not need its own confidential-compute node to verify your workload's TEE quote. Verification is decoupled from the platform's hardware infrastructure and ships at launch.
The measurement policy
Every SKR project carries a measurementPolicy — the release gate the platform enforces on every key operation:
{
"teePlatform": "amd-sev-snp",
"allowedMeasurements": ["<base64-hash-build-A>", "<base64-hash-build-B>"],
"minTcbVersion": {
// SEV-SNP: component-wise SVN tuple
"bootloader": 3,
"tee": 1,
"snpFw": 20,
"microcode": 210
}
}
allowedMeasurements is a set. You can authorize multiple builds simultaneously — the old and new build can both be on the allowlist during a rolling deploy, so the deployment window doesn't require a key-access outage. A measurement not in the set returns K9O_ATTESTATION_MEASUREMENT_MISMATCH (403) and the DEK is refused.
minTcbVersion is a per-platform TCB floor, not a single scalar. For SEV-SNP it is a component-SVN tuple (bootloader, tee, snpFw, microcode) compared component-wise — all components must be ≥ the floor. For TDX it is { teeTcbSvn, minTcbStatus } — the TCB SVN must meet the floor and the Intel PCS status must be UpToDate. A report below the floor returns K9O_ATTESTATION_TCB_TOO_OLD (403).
A project with no registered policy refuses key release outright — K9O_ATTESTATION_POLICY_NOT_SET (409). Enabling SKR with no measurement policy is indistinguishable from an accidentally-misconfigured release gate; the platform treats the absence of a policy as a refusal rather than an implicit pass.
Setting up a project
REST surface note: the
PUT …/policybody is{ teePlatform, minTcbVersion, allowedMeasurements? }(the allowlist is managed via…/measurements); the custody-mode transition is a top-level project operation (not a/vault/*sub-resource) taking{ targetMode }.
1. Transition custody mode
Set the project's custody mode to SKR:
POST acme.api.k9o.io/@shop/custody-mode-transition
Authorization: Bearer <token>
{
"targetMode": "SKR"
}
Ascending to SKR is synchronous (200 OK, no re-key). Surrendering custody (SKR → Platform-Managed) requires an approval gate, presented in the X-K9O-Gate-Token header; adding custody does not.
2. Register the measurement policy
Register your TEE platform and TCB floor. This step is Maker-Checker gated — the policy represents an authorization contract and requires approval:
PUT acme.api.k9o.io/@shop/vault/confidential-workload/policy
Authorization: Bearer <token>
{
"teePlatform": "amd-sev-snp",
"minTcbVersion": { "bootloader": 3, "tee": 1, "snpFw": 20, "microcode": 210 }
}
The policy body sets the platform and TCB floor only — the allowlist is managed separately via the measurements endpoint (§3). The allowlist starts empty: the policy is approved, but no build can receive keys yet (the platform fails-closed). CI populates it under the approved policy without requiring another Maker-Checker gate.
3. Register build measurements from CI
After every build, CI registers the measurement under the approved policy — no human gate per build:
POST acme.api.k9o.io/@shop/vault/confidential-workload/measurements
Authorization: Bearer <ci-service-token>
{
"measurement": "<base64-hash>"
}
The response returns { "measurementId": "<uuid>" } — keep this id; it's how you revoke the measurement later (DELETE …/measurements/<measurement-id>).
The measurement is computed from the build artifact in CI (deterministic) and registered before deploy. The running instance must match what CI pinned.
To revoke a build (a measurement that went vulnerable):
DELETE acme.api.k9o.io/@shop/vault/confidential-workload/measurements/<measurement-id>
Revocation is fast and gate-free — revoking (tightening) is the opposite direction from setting a policy (loosening), so it follows the same fail-safe asymmetry as the rest of the custody model.
4. Read the current policy
GET acme.api.k9o.io/@shop/vault/confidential-workload/policy
Returns { policy, measurements }: the current policy and the full allowlist of authorized measurements.
SDK usage
To encrypt under SKR mode, pass attestation_tier: 'confidential' on the encrypt call. This binds the TEE attestation quote into the AAD; the platform verifies it against your registered measurement policy before releasing the DEK. See Client-Side Encryption for the full input model.
import { createKiboClient, encrypt, decrypt } from '@k9o/kibo';
const kibo = createKiboClient({
baseUrl: 'https://<orgSlug>.api.k9o.io',
projectSlug: '<projectSlug>',
apiKey: process.env.K9O_API_KEY,
});
// SKR = attestation_tier: 'confidential' on the encrypt call
// (binds the TEE quote into the AAD):
const { envelope } = await encrypt({
/* provider, posture, kms_cred, key_ref, plaintext, … see /kibo/client-side-encryption */
attestation_tier: 'confidential',
});
Error reference
| Code | Status | When it occurs |
|---|---|---|
K9O_ATTESTATION_MEASUREMENT_MISMATCH | 403 | The workload's measurement is not in allowedMeasurements (a genuine TEE running unauthorized code) |
K9O_ATTESTATION_QUOTE_VERIFICATION_FAILED | 403 | The quote is well-formed but fails vendor-PKI verification — bad signature, broken cert chain, or stale collateral (context: { teePlatform, reason }) |
K9O_ATTESTATION_TCB_TOO_OLD | 403 | The TCB version is below the minTcbVersion floor |
K9O_ATTESTATION_POLICY_NOT_SET | 409 | No measurementPolicy registered; key release refused fail-closed |
K9O_MEASUREMENT_POLICY_INVALID | 400 | Malformed PUT policy body |
What SKR is not
Not sovereign custody. Kibo holds the plaintext DEK to enforce the attestation gate. If you need operator-blind custody — where Kibo never sees the key — use BYOK or HYOK. SKR is the integrity mode; BYOK and HYOK are the sovereignty modes.
Not a substitute for code review. The measurement policy proves the deployed binary matches your CI build; it does not say whether that build is correct. Secure code and attested execution are complementary properties.
Not tied to the platform's Confidential Compute infrastructure. Verifying your TEE quote is pure-software verification against the vendor's PKI (AMD KDS, Intel PCS). This is distinct from the platform running its own TEE nodes — those are a separate infrastructure capability. SKR per-release enforcement ships at launch without requiring confidential-compute hardware on the platform side.
Not a workload identity. SKR is a key-custody mode — it governs whether Kibo releases a key to your code, gated on an attestation report. A Confidential Workload Identity (CWI) is a different thing: an identity a workload authenticates as, independent of whether it ever touches Kibo-custodied keys. The two can compose (a CWI-authenticated workload can also be the thing SKR releases a key to), but neither implies the other, and they're governed by separate policy objects.
See also
- Kibo Overview — the four custody modes and where SKR fits.
- Architecture → Custody Architecture — the custody trust structure and the integrity/sovereignty split.
- Kibo BYOK — operator-blind custody with customer-held keys in a cloud KMS.
- Kibo HYOK — customer-owned HSM cluster custody.
- API → Security — the audit-ledger attestation events.