Add DerivedKeystore for fleet-wide cookie sealing - #576
Closed
sofiascalzo wants to merge 1 commit into
Closed
Conversation
Summary: Fleet-wide NTS cookie keystore: a pure HKDF key-derivation primitive plus the DerivedKeystore that uses it, so NTS-KE and NTP can seal and open cookies on different hosts from one shared master, with no shared live state and no hot-path RPC. - deriveCookieKey(master, id) = HKDF-SHA256(master, salt=BE32(id), info="fbnts-cookie-seal-v1") -> a masterKeyLen (64-octet) key for the AES-SIV-CMAC-512 master AEAD. Pure: no clock, state, or I/O. - DerivedKeystore implements the Keystore interface: SealCookie derives a key from the master (fixed cookieKeyID) and reuses the existing AES-SIV envelope; OpenCookie re-derives from the cookie's Key ID and opens it. No mutex, since the master is immutable and derivation is pure. Time-based rotation/windowing is deferred to a later change. Reviewed By: leoleovich Differential Revision: D114721800
Contributor
|
@sofiascalzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D114721800. |
Contributor
|
This pull request has been merged in a9bbda8. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fleet-wide NTS cookie keystore: a pure HKDF key-derivation primitive plus the
DerivedKeystore that uses it, so NTS-KE and NTP can seal and open cookies on
different hosts from one shared master, with no shared live state and no
hot-path RPC.
info="fbnts-cookie-seal-v1") -> a masterKeyLen (64-octet) key for the
AES-SIV-CMAC-512 master AEAD. Pure: no clock, state, or I/O.
from the master (fixed cookieKeyID) and reuses the existing AES-SIV envelope;
OpenCookie re-derives from the cookie's Key ID and opens it. No mutex, since
the master is immutable and derivation is pure. Time-based rotation/windowing
is deferred to a later change.
Reviewed By: leoleovich
Differential Revision: D114721800