Skip to content

[crypto]: add KEK for encrypting DEKs#237

Open
pseudomuto wants to merge 1 commit into
add_crypto_dekfrom
add_crypto_kek
Open

[crypto]: add KEK for encrypting DEKs#237
pseudomuto wants to merge 1 commit into
add_crypto_dekfrom
add_crypto_kek

Conversation

@pseudomuto

Copy link
Copy Markdown

Adds a KEK interface representing a customer-managed Key Encryption Key (e.g. AWS/GCP KMS) and a KEKEncryptor that wraps a current KEK plus any retired KEKs. New DEKs are always encrypted with the current key, but retired keys remain registered in a by-ID lookup map, so DEKMaterial produced before a rotation can still be opened. This is the second half of the envelope-encryption pair started in the prior DEK commit (#236).

A no-op (nilKEK) is used when no key is supplied, so callers can wire up the encryptor unconditionally and decide later whether to attach a real KEK.

Adds a KEK interface representing a customer-managed Key Encryption Key
(e.g. AWS/GCP KMS) and a KEKEncryptor that wraps a current KEK plus any
retired KEKs. New DEKs are always encrypted with the current key, but
retired keys remain registered in a by-ID lookup map so DEKMaterial
produced before a rotation can still be opened. This is the second half
of the envelope-encryption pair started in the prior DEK commit (#236).

A no-op (nilKEK) is used when no key is supplied so callers can wire up
the encryptor unconditionally and decide later whether to attach a real
KEK.
@pseudomuto pseudomuto requested a review from a team as a code owner June 8, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant