bin for centralized custodian with security-council epoch-key delivery - #234
Open
daltoncoder wants to merge 12 commits into
Open
bin for centralized custodian with security-council epoch-key delivery#234daltoncoder wants to merge 12 commits into
daltoncoder wants to merge 12 commits into
Conversation
|
can you make a linear issue for this? |
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.
Adds
seismic-centralized-custodian-service, a custodian variant forcentrally operated networks where purpose keys at epochs >= 1 are delivered
by a security council instead of derived from the root key. A TCP port
(default
:7879) accepts delivery envelopes that are ECDSA-signed by aconfigured council key and ECIES-encrypted (ECDH + AES-256-GCM) to an inbox
keypair derived from the root key; the existing Unix socket then serves
exactly what has been delivered. Asking for an epoch the council has not
published answers a new typed
EpochKeyUnavailableresponse instead ofderiving on demand — making the council the network's actual rotation
authority (previously any authorized caller could derive any epoch).
How
crates/council-delivery(new): wire types, domain-separated bindingdigests (golden-vectored; the signed digest covers the ciphertext so a
signature can't be re-attached to a re-encryption), and
seal_delivery/open_delivery. A leaf crate shared with off-node council signer tooling.bin/centralized-custodian-service(new): reusesseismic-custodian-service's state/dispatch/acl as a library, so epoch-0derivations, the bootstrap trio, LUKS handoff, and
--allowgrants arebyte-identical. Adds a sync TCP accept loop (no tokio — the key holder
stays async-free, verified via
cargo tree), a sequential-per-purposeEpochKeyStore, and envelope persistence: durable on disk (tmp + fsync +rename) before a key becomes observable, re-verified and re-decrypted
on every boot. Byte-identical redelivery is idempotent; anything else at an
existing epoch is a conflict. Because
/persistentis unlocked by thisprocess's own LUKS handoff, the store loads lazily and deliveries are
refused with retriable codes until it's reachable.
Keyconversion methods +KeyPurpose::CouncilInboxinseismic-custodian;AesKeyDomain::CouncilKeyDeliveryinseismic-crypto;Response::EpochKeyUnavailable+ client/error mapping inseismic-custodian-ipc.bin/custodian-serviceis untouched.Testing
60 tests across the touched crates: binding golden vectors, seal/open
rejection matrix (wrong network / recipient / signer, tampered fields,
ciphertext swap), sequencing/idempotency/conflict rules, persist-before-
install, restart-reload, corrupt-file heal-by-redelivery, and a real-socket
end-to-end (deliver over TCP → fetch via
CustodianClienton the Unixsocket).
cargo fmt --checkandRUSTFLAGS="-D warnings"builds are clean.Follow-ups
council-signerCLI incouncil-delivery(theseal_deliveryAPI it wraps is done).
:7879; optionally atdx-init env writer for
SEISMIC_COUNCIL_PUBKEY.