Repository navigation
Description
Part of #40. Agree the signed manifest/revision contract owned by #78 jointly with #247 before implementing transfer; #78's rotation implementation later consumes this issue.
Goal
Let an approved device deliver the payload-key history to a newly enrolled device without exposing plaintext keys to EM application code, the rendezvous service, or the sync server.
Scope
- Create a dedicated recipient-encryption key alongside the fresh replica and bind it to that replica's accepted
OwnerGrantId; do not reuse or silently convert the Ed25519 replica-signing key. - Define one versioned recipient-sealed epoch envelope binding the document,
kid, recipient-key fingerprint, sender/issuer, encryption algorithms, and encoding version. - Verify sender authorization under the shared manifest contract and bind the recipient-encryption key to the accepted replica/grant. Require recipient proof of possession, distinguishing replica-key possession (auth(sync): bind sessions to replica-key possession #244) from possession of the recipient-encryption key.
- Consume E2EE: rotate full-document payload keys for future-write cutover #78's signed manifest for the document, active
kid, retained epochs, andkeyring_revision. Define recipient-specific packaging here: one sealed envelope per retained epoch, authenticated and bound to that manifest. - Bind the transfer to the exact recipient replica id,
OwnerGrantId, recipient-encryption public key, sender identity, and approval or recovery context; no private key is transferred. - Validate the complete manifest before exposing any key; replay of the same package is idempotent and conflicts fail closed.
- Keep plaintext payload keys, owner grants, and private keys out of URLs, logs, analytics, and rendezvous storage.
- Feed validated packages into security: compose secure payload and keyring lifecycle #250 for atomic enrollment import.
EM owns approval and transport. em-deploy provides a short-lived opaque mailbox. For recovery without a surviving replica, define how retained payload-key material from #247 produces this import; #246's document-authority backup is not that material.
Done when
A new device can decrypt current and historical payloads after one validated enrollment import, while wrong document, recipient, sender, epoch, version, algorithm, replay conflict, or tampering fails closed.
Activity
[-]Invites: targeted invites and safer key handoff[/-][+]Invites: targeted open-device flow and sealed key handoff[/+][-]Invites: targeted open-device flow and sealed key handoff[/-][+]crypto: define sealed payload-key handoff to a recipient device[/+]