Key Management Service
Every infrastructure secret lives in an HSM-backed key service and reaches workloads through a sync controller, never through an env file; on-chain, key operations become transactions against tenant-scoped lanes, so a cross-tenant read is structurally impossible rather than policy-forbidden
Abstract
Every secret — signing keys, API tokens, database credentials, TLS certificates — is stored in the key management service, backed by FIPS 140-3 Level 3 HSMs. Secrets reach Kubernetes through a sync controller. No secret is ever stored in an environment file, in source, or in plaintext configuration.
On-chain, key operations become Quasar transactions executed by the GPU adapter, with key material held in tenant-scoped lanes and access enforced by a precompile that consults the P-Chain identity root. That is what makes cross-tenant access structurally impossible rather than policy-forbidden.
Specification
Architecture
KMS (kms.hanzo.ai)
|-- HSM backend (FIPS 140-3 Level 3)
|-- API (authenticated via IAM, LP-7120)
|-- KMSSecret controller (syncs to k8s Secrets, LP-7326)
The HSM provider matrix and the validator-side integration are
LP-7325; the
KMSSecret CRD contract is LP-7326.
Key types
| Type | Algorithm | Use case |
|---|---|---|
| Signing | Ed25519, secp256k1, ML-DSA | Transaction signing, MPC shares |
| Encryption | AES-256-GCM | Data-at-rest encryption |
| TLS | RSA-4096, ECDSA P-384 | Service TLS certificates |
| HMAC | HMAC-SHA256 | Webhook signing, API authentication |
Operations
- Create —
POST /v1/keysgenerates a new key inside the HSM and returns a key ID. - Sign —
POST /v1/keys/{id}/signsigns data without exporting the key. - Encrypt / Decrypt —
POST /v1/keys/{id}/encrypt|decryptperforms envelope encryption. - Rotate —
POST /v1/keys/{id}/rotatecreates a new version; the old version remains available for decryption. - Export — not supported for HSM-backed keys. Software keys support wrapped export.
Kubernetes integration
A KMSSecret names a KMS scope and a target Secret; the controller pulls the
values and writes them into the Kubernetes Secret:
apiVersion: kms.hanzo.ai/v1
kind: KMSSecret
metadata:
name: luxd-staking
spec:
secretRef: luxd/staking/mainnet
target:
name: staking-keys
namespace: lux-mainnet
The controller polls KMS every 60 seconds and updates the Secret. Pods mount the Secret as a volume.
Lane model
The key service composes with the Quasar app stack
(LP-5623) through a precompile plus
lane-scoped key material. Key operations become Quasar transactions executed by
the GPU adapter; key material is held in tenant-scoped lanes; access is
enforced by a precompile that consults the P-Chain identity root in
QuasarRoundDescriptor.pchain_validator_root.
Operation to transaction mapping
| Operation | Quasar transaction shape | Lane impact |
|---|---|---|
kms_keygen | mints a key into H("kms", tenant_id, key_id) | new lane created |
kms_rotate | bumps the version on the key lane | MVCC version increment |
kms_derive | read-only tx | no version bump |
kms_sign | calls the KMS precompile and emits a cert-lane artifact | sign event recorded |
kms_revoke | flips the status bit on the key lane | tombstone recorded |
Lane scoping
key_lane = H("kms", tenant_id, key_id)
Tenant boundaries map to the IAM owner claim
(LP-7120). Cross-tenant access is
structurally impossible: a precompile call against a lane the caller's tenant
does not own returns ACCESS_DENIED without consulting any external policy
store. There is no policy to misconfigure.
Threshold keys reuse the MPC cert lanes
Where the key itself is held as t-of-n shares across validators rather than inside a single HSM, the operation reuses the M-Chain cert lanes:
| Threshold use case | Cert lane |
|---|---|
| Threshold ECDSA sign-as-key | MChainCGGMP21 (lane 5) |
| Threshold Schnorr / EdDSA sign-as-key | MChainFROST (lane 6) |
| Post-quantum threshold sign | MChainCoronaGen (lane 7) |
| TFHE key-share storage | M-Chain ceremony → F-Chain key arena |
This makes threshold key management a thin wrapper over the existing MPC
ceremony infrastructure: the "key" is exactly the group public key produced by
an M-Chain DKG, and "sign" is a SignRequestTx against that key's lane.
Replay-proof binding
Every sign request that emits a cert artifact MUST bind the
certificate_subject from the active QuasarRoundDescriptor. A signature for
round R cannot be replayed in round R+1 because the upstream chain roots
differ — the binding is structural, not policy-enforced. See
LP-0122.
Precompile address
Access control and sign dispatch run at a reserved EVM precompile address. The
precompile reads the identity root from
QuasarRoundDescriptor.pchain_validator_root and the key lane from
H("kms", tenant_id, key_id). Concrete address allocation lives in the
precompile registry (LP-1210), not
here.
Security Considerations
- HSM-backed keys never leave the HSM boundary. Sign operations happen inside the HSM.
- Access is authenticated through IAM. Each service has a scoped service account.
- Key rotation does not invalidate old ciphertext — old key versions decrypt, the new version encrypts.
- The audit log records every key operation with timestamp, caller identity, and result.
- Chain-side key material lives in tenant-scoped lanes; cross-tenant reads are rejected by the precompile, not by a policy layer.
- Threshold sign artifacts bind
certificate_subjectand are therefore non-replayable across rounds. - The service plane and the on-chain precompile are independently auditable: every chain-side operation has a corresponding KMS audit record, and any divergence is detectable.
Reference
| Resource | Location |
|---|---|
| KMS service | https://kms.hanzo.ai |
| KMS implementation | github.com/hanzoai/kms |
KMSSecret CRD | github.com/hanzoai/kms/crds/ |
| HSM provider matrix | LP-7325 |
| Secret sync contract | LP-7326 |
| Validator key lifecycle | LP-7320 |
Copyright
Copyright and related rights waived via CC0.