docs(security): correct the ZeroKMS key exchange and caching claims#63
Merged
Conversation
The live security architecture page told security reviewers that the client key is transmitted to CipherStash: "The SDK sends a key derivation request to ZeroKMS with the client key component." "ZeroKMS combines the authority key and client key to produce a key seed." That inverts the property the architecture exists to provide. Corrected per product review: - The application requests a seed by sending a key ID. The request carries no key material. The ID is what gives each data key a unique identity, so the same value can be decrypted later by asking for the same ID. - ZeroKMS applies proxy symmetric re-encryption to the authority key alone and returns the key seed. It never receives the client key. - The application processes the seed with the client key, then an HMAC-based KDF expands the result into a per-value data key. Only the seed crosses the boundary, and it crosses inward. Two further claims on the same page were wrong: - "No caching needed" / data keys "never cached". No *data key* is ever cached, but Proxy caches keyset-scoped ciphers (cipher_cache_size, cipher_cache_ttl_seconds). The page now states both. - kms/index.mdx: "Root keys are stored in AWS KMS. ZeroKMS handles key derivation and wrapping." AWS KMS protects the authority key at rest; no per-value data key is wrapped or stored. - kms/keysets.mdx: keysets scope the authority key, not a per-keyset root key from which ZeroKMS derives data keys. Standardises on AES-256-GCM-SIV across the corpus (was split 6/3 with plain AES-256-GCM, including two compliance pages).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
A materially wrong security claim is live.
reference/security-architecture.mdxis the page we point vendor security reviewers at, and it currently tells them the client key is transmitted to CipherStash:That inverts the property the architecture exists to provide. If it were true, the dual-party split would be theatre: both halves would meet on CipherStash's side.
What actually happens
Adjudicated with @coderdan:
Only the seed crosses the boundary, and it crosses inward. Nothing crosses outward: not the client key, not the processed seed, not the data key.
Two other wrong claims on the same page
Caching. It said data keys are "never stored, cached, or transmitted" and that there is "no caching needed". Meanwhile Proxy ships
cipher_cache_size=64,cipher_cache_ttl_seconds=3600, and acipherstash_proxy_keyset_cipher_cache_hits_totalmetric. What's true: no data key is ever cached; Proxy caches keyset-scoped cipher objects. The page now states both, and explains why they differ.Root keys and wrapping.
kms/index.mdxsaid "Root keys are stored in AWS KMS. ZeroKMS handles key derivation and wrapping", contradicting the same page's "no wrapped-key storage". Both are partly right: AWS KMS protects the authority key at rest, and no per-value data key is ever wrapped or stored.kms/keysets.mdxlikewise described a per-keyset "root key" from which ZeroKMS derives data keys; keysets scope the authority key.AES naming
Standardised on AES-256-GCM-SIV. The corpus was split 6/3 against plain
AES-256-GCM, and two of the wrong ones were compliance pages, where naming the wrong cipher mode is worse than sloppy.Files (7)
reference/security-architecture.mdx(key derivation, trust model, both data-flow paths, caching section),cipherstash/kms/index.mdx,cipherstash/kms/keysets.mdx, plus AES naming incipherstash/proxy/getting-started.mdx,deploy/troubleshooting.mdx,reference/comparisons/fhe.mdx,reference/use-cases/compliance.mdx.Checks
bun run buildpasses, 589 pages.grepfor the old claims returns nothing outside generated TypeDoc.Follow-up
The v2 branch carries the reconciled version of this page at
/security/cryptography(#62). Once both land,main->v2needs another sync, or the launch merge reverts this. That recurring problem is tracked separately; a sync policy is still undecided.Not fixed here:
SOC 2/SOC2splits 9/6 across the corpus. Cosmetic, and worth doing in one pass with the rest of the consistency sweep.