feat: add tx encryption key rotation#2373
Conversation
| // Reserved for future attestation evidence beyond the validator signatures, e.g. a TEE quote, | ||
| // signature chain, compose hash, app measurement, epoch, or accepted measurement set. | ||
| reserved 6 to 9; | ||
| reserved 5 to 9; |
There was a problem hiding this comment.
FYI we shouldn't reserve for future use.
Protobuf already supports adding new fields in a non-breaking fashion. reserved is used to protect removed fields. i.e. when removing a field in a backwards compatible way, replace it with reserved to prevent someone reusing that same field number, which would break the schema.
Mirko-von-Leipzig
left a comment
There was a problem hiding this comment.
I have some questions; without having reviewed things at all - I'm waiting on some internal consensus on how the whole operation might work.
- This aligns key rotation with the epoch. The epoch length is dictated by node storage requires. Should we be combining these concepts, or should the key epoch be independent?
- Do we need a way to rotate the master key? I feel like this just shuffles the security boundary around a little, while cosmetically rotating the public key. But I'm no security expert; perhaps this is somehow sufficient.
The concepts can be independent (for example defining the key epoch
We probably need to have a way of rotating the master key, as it's single point of failure (a leak means all epoch keys become derivable). What the current epoch rotation does give is containment for the derived keys used during operation. |
Summary
Continues the transaction input encryption work from #2342 (part of #2319) by making the shared transaction encryption key rotate perpetually, once per epoch, with no operator action and no validator coordination.
Per-epoch key derivation
The secret configured via
--encryption-key.hex/--encryption-key.kms-ciphertextis now a master secret rather than the encryption key itself. Each epoch's X25519 key is derived deterministically from it:Since every validator holds the same master secret, all validators derive identical keys for every epoch and transition to the new key at each boundary independently. The key provider owns the derivation and is now epoch-aware, including a grace window on decryption so submissions sealed just before a boundary remain decryptable after it.
Changelog