feat(ROT-1): survivor re-wrap pure core (rotate-on-revoke)#122
Merged
Conversation
First rung of F-286 (design doc 73) — the piece with no existing code. On revoke, forward secrecy needs the entity DEK rotated and re-wrapped for the members who REMAIN, never the one removed. `rewrapDekForSurvivors` takes a freshly-minted DEK′ + the entity's current members (post-revoke) and produces one HPKE member-wrap of DEK′ per surviving device: - Inactive (revoked) members are excluded by the `active` filter — the removed member can never appear in the wrap set (the forward-secrecy guarantee). - A survivor whose grant carried no device x25519 (pre-collection-sharing) is reported in `skipped` so ROT-3 can re-share rather than silently drop. - De-dupes by device key. Pure: no DEK minting (EntityDekStore, ROT-2), no doc mutation, no I/O. +7 property tests incl. real-crypto round-trips: survivor opens DEK′ with their device secret; the revoked member's secret CANNOT open any survivor wrap; entity-bound (a wrap won't open under another entity id). This is the trigger the built-but-uncalled 10.11 RoutingRotationCoordinator .rotate needs; ROT-2 wires mint + snapshot re-seal + the coordinator. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
First rung of the 0.3.0 headline — F-286 rotate-on-revoke (design doc 73). This is the piece with no existing code: the 10.11
RoutingRotationCoordinator.rotateis built but has no caller because nothing mints + re-wraps a new DEK. ROT-1 is that re-wrap, factored pure.rewrapDekForSurvivors(newDek, members, entityId, type?)→ one HPKE member-wrap of DEK′ per surviving device:activefilter — afterrevokeAccesssets their row inactive,resolveCurrentMembersstill lists them but they get no wrap. The removed member can never be in the set — the forward-secrecy guarantee, property-tested.x25519(pre-collection-sharing grant) is reported inskippedso ROT-3 can re-share, not silently drop.Pure — no DEK minting (that's
EntityDekStore, ROT-2), no doc mutation, no I/O.+7 property tests, including real-crypto round-trips: a survivor opens DEK′ with their device secret; the revoked member's secret cannot open any survivor wrap; a wrap won't open under another entity id. Collab + credentials suites green (233); typecheck + lint clean.
Part of the 0.3.0 "Trustworthy collaboration" train. Next: ROT-2 (mint DEK′ + re-seal snapshot + drive the rotation coordinator). The hard
/security-review+/pentestergate is ROT-4, before the train cuts.🤖 Generated with Claude Code