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

PartRunsKeeps
GatewayIn your cloud account, next to your databasesThe audit log. No key and no share.
Custodian, three of themWith you, a provider in your jurisdiction, and a second cloud or escrow agentOne share of each key, its own signing key, its own record of every decision
VerifierOn your auditor's machine, offlineNothing. 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

  1. The database starts and asks the gateway for its master key over KMIP.
  2. The gateway asks two custodians for their shares.
  3. Each custodian checks its own policy, signs a receipt, records it, and only then answers.
  4. If one is unreachable, frozen, or returns a wrong share, the gateway asks the third.
  5. 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

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:

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 testedPercona Server for MySQL 8.0 and Percona Server for MongoDB 7.0, unmodified
ProtocolKMIP 1.0 to 1.4: Create, Register, Get, Get Attributes, Locate, Activate, Revoke, Destroy, Query, Discover Versions
Key typesSymmetric keys and secret data, as raw key material
Custodian linksMutual TLS 1.3, restricted to the hybrid X25519MLKEM768 key exchange
ReceiptsEd25519 signatures
Not supportedKMIP 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.

What it stops, and what it does not