Prototype · describes what is built today
Technical overview
How the prototype splits a database master key, releases it, and proves afterwards who approved each release.
The parts
| Part | Runs | Keeps |
|---|---|---|
| Gateway | In your cloud account, next to your databases | The audit log. No key and no share. |
| Custodian, three of them | With you, a provider in your jurisdiction, and a second cloud or escrow agent | One share of each key, its own signing key, its own record of every decision |
| Verifier | On your auditor's machine, offline | Nothing. It reads the log and the custodians' public keys. |
Custodians have no network path to each other or to your databases. Each one talks only to the gateway.
Splitting a key
When a database creates or registers a master key, the gateway splits it with 2-of-3 Shamir secret sharing, one byte at a time. It sends one share to each custodian and wipes its own copy. All three custodians must accept before the database is told the key exists.
A single share is uniformly random. It carries no information about the key, whatever computer an attacker has.
Releasing a key
- The database starts and asks the gateway for its master key over KMIP.
- The gateway asks two custodians for their shares.
- Each custodian checks its own policy, signs a receipt, records it, and only then answers.
- If one is unreachable, frozen, or returns a wrong share, the gateway asks the third.
- The gateway rebuilds the key, writes the log entry, hands the key to the database and wipes it.
If the log entry cannot be written, the key is not handed over.
What a custodian controls
- Which gateways may call it at all
- Which database identities may receive a key, beyond the rule that only a key's owner can
- How many releases per key it allows each minute
- A freeze on one key or on every key, which only that custodian can lift
With one custodian frozen, the other two still release. With two frozen, the key cannot be rebuilt and the database cannot open its data.
The audit record
Every create, release, revoke and destroy is one log entry. Each entry holds the custodians' signed receipts and the hash of the entry before it.
seq 4217
type key.release
requester mysql-orders
receipts custodian-1 approve · custodian-3 approve
tls_group X25519MLKEM768
result ok
prev 9f2c…e1
hash 71ab…04
Illustrative entry, shortened
The verifier checks three things using public keys only:
- The chain is unbroken and no entry was changed.
- Every receipt carries a valid custodian signature and belongs to that request.
- Every successful release has approvals from two different custodians.
A receipt also states the key exchange the custodian itself saw on the connection. Whether a link was post-quantum protected is therefore the custodian's statement, not the gateway's.
Each custodian chains its own receipts. Given those chains, the verifier also notices a gateway log that was shortened or left a release out.
Pointing a database at the gateway
The database is configured as for any external KMIP key manager. Its client certificate name is its identity: it owns the keys it creates, and no other identity can fetch them.
MySQL
{
"server_addr": "gateway",
"server_port": "5696",
"client_ca": "/pki/client.pem",
"client_key": "/pki/client.key",
"server_ca": "/pki/ca.pem"
}
component_keyring_kmip.cnf, Percona Server for MySQL
MongoDB
mongod --enableEncryption \
--kmipServerName gateway --kmipPort 5696 \
--kmipServerCAFile /pki/ca.pem \
--kmipClientCertificateFile /pki/client-combined.pem
Percona Server for MongoDB. The client file holds the certificate and its key.
What the prototype covers
| Databases tested | Percona Server for MySQL 8.0 and Percona Server for MongoDB 7.0, unmodified |
|---|---|
| Protocol | KMIP 1.0 to 1.4: Create, Register, Get, Get Attributes, Locate, Activate, Revoke, Destroy, Query, Discover Versions |
| Key types | Symmetric keys and secret data, as raw key material |
| Custodian links | Mutual TLS 1.3, restricted to the hybrid X25519MLKEM768 key exchange |
| Receipts | Ed25519 signatures |
| Not supported | KMIP 2.x, wrapped keys, asymmetric keys, cloud-managed databases |
Read this with the limits in mind. The code has had no independent review. Custodians in the prototype keep shares in ordinary files, not in hardware. An intruder on the gateway can capture keys released while present.