A Lost Laptop No Longer Holds Your Family Drive
A family drive is not a folder on a server. Each computer seals what it stores before the bytes leave it, so the phones that keep copies and the service that relays them only ever hold ciphertext. The key that opens those bytes is made on a family computer and never sent anywhere in the clear.
That design leaves one hard question: what happens when a computer that holds the key is lost or sold? Until this release, the answer was nothing — the key it already had still opened everything sealed with it. Now a guardian can remove the device, and the household moves to a new key version the removed computer never receives.
The short version: a 32-byte family key seals every chunk with AES-256-GCM. The key reaches another device wrapped to that device's X25519 key, so the relay carries a blob it cannot open. Membership is one append-only chain of Ed25519-signed records. A removal is announced, waits 24 hours, then a family computer signs the record that drops the device and carries a new key version, wrapped to exactly the members that remain.
What is encrypted with what
| layer | primitive | who can open or forge it |
|---|---|---|
| each stored chunk | AES-256-GCM under the family key | a device holding that key version |
| key delivery to a device | X25519 + HKDF-SHA256, then AES-256-GCM | only the device it was wrapped to |
| membership | Ed25519 signature over canonical JSON | anyone can verify; only a member can sign |
| record 0 possession proof | a sealed AFD1 blob under the current family key | a computer that already holds the key |
A sealed object is AFD1, the 8-byte key_id, a 12-byte nonce, then ciphertext and tag.
The header is the associated data, so a wrong key or a tampered header fails loudly instead
of returning plausible bytes. key_id is the first 8 bytes of sha256(key), which is how a
reader knows which version opens a chunk after a rotation.
A wrap is AFW1, an ephemeral X25519 public key, a nonce, then the sealed family key. Both
sides derive the wrapping secret with HKDF-SHA256 over the X25519 exchange, salted with the
two public keys. The relay never sees the exchange secret.
On a computer the keys are owner-only files under ~/.aither/family_storage/: <family>.key
for the current family key, device_x25519.key to receive wraps, and device_ed25519.key to
sign records. The family key is 32 random bytes generated on the first family computer that
needs it — never derived from a platform secret, so rotating the platform's master key does
not touch family data.
The record that says who belongs
Membership is one chain. Record n is valid when it takes the next seq, names the previous
record's prev_hash, and is signed by a device that was a member in record n-1. The body
is canonical JSON — sorted keys, no whitespace — and that exact byte string is what gets
signed:
{
"schema": "aither-family-chain/2",
"tenant": "…",
"workspace": "…",
"seq": 7,
"prev_hash": "<sha256 of record 6>",
"key_id": "<new key version, hex>",
"members": [{"ed25519": "…", "x25519": "…"}],
"removed": ["<signing key dropped by this record>"],
"signer": "<the member device that signed>",
"pending_removals": ["<signing keys a guardian asked to remove>"],
"ts": 1794000000,
"epoch": 0
}
members is the whole membership after the record. There is no separate root, no
reachability list and no cascade — who belongs is exactly the newest list. removed names
the signing keys this record drops, pending_removals names the ones a guardian has asked
about so far, and epoch counts guardian recoveries. Record 0 also carries a proofs map:
one sealed blob per member, made with the current family key, binding both of that device's
public keys to this household. A computer without the key cannot start a chain.
The builder is chain_record in adk/family_vault.py; the relay rebuilds the same dict
from the bytes it receives and refuses anything that is not byte-identical before it checks
the signature (lib/hearth/storage_keys.py::_parse).
Why a server cannot put a device back
Two independent checks, and the second one is the one that matters:
- The relay validates every record.
_check_extendsrequires the nextseqand the head's hash, the signer to be a current member, andremovedto equal exactly the set of dropped members. A dropped device must have a live removal request and have been announced by an earlier record.key_idreuse is rejected, and a record carrying a new key may not list a device whose removal is pending. - Every device validates it again.
verify_extendsinadk/family_vault.pyruns the same rule against the newest record that device verified and saved itself. A device refuses anything that does not extend its own head.
So the relay can refuse a record and can withhold one — availability is its job — but it
cannot mint a member because it holds no Ed25519 private key, and it cannot insert a device
because members only changes through a signed record. A stolen server session buys a
denial of service, not membership.
Taking a device off the key
- A guardian confirms with a fresh strong sign-in. A passkey or authenticator-app
session minted under 10 minutes ago (
INTERACTIVE_MAX_AGE_Sinlib/agent_approval/service.py), from a factor enrolled at least 24 hours ago (KEY_FACTOR_MIN_AGE_S). A stolen session is not enough. - The request is filed. The device's keys can no longer sign, register, or receive a new wrap, and every guardian is notified. A request that would leave no member able to sign is rejected, so the chain stays appendable.
- A second guardian approves when the household has one. If two or more guardians existed at any point in the last 30 days, a second distinct guardian must approve, and that approver must be at least 7 days old. Demoting the other guardian first does not shed the rule.
- The removal is announced, then waits 24 hours. The announcing record must be an earlier record than the dropping one, so every device and guardian sees it coming. The wait is measured from the relay's clock and from when the request came into force — a signer's timestamp cannot shorten it. A member device can cancel until the drop.
- A family computer rotates the key. It makes a new 32-byte key, wraps it to exactly
the remaining members, signs the next record carrying the new
key_id, appends it, and only then installs it locally. The relay deletes the removed device's wraps and key rows only after that record lands. - The drive is re-sealed. Chunks are rewritten under the new version; each chunk names
its version in its header, so a reader can tell them apart while the pass runs. Old
versions stay on the other devices as
.retiredfiles, used only to open chunks not yet re-sealed, and dropped once the pass completes. - Rate limits bound the damage. Five live removal requests per guardian per day, twenty per household. A cancelled request frees its slot.
The adk CLI drives the same steps: adk storage drive key remove files the request,
key rotate announces, waits and rotates, and key reencrypt finishes the re-seal. All
three ship in awdk 3.8.100.
Recovery when every key-holding computer is gone
A guardian can restart the chain, but only with a named list. The request fixes the list of devices the recovery is against — signing keys, not labels — and a second guardian, when the household has one, approves exactly that list by its SHA-256 digest. It fails if the list changed. The wait is 72 hours from when it comes into force.
The new chain starts at a new epoch with record 0 signed by a device that holds a previous
key version. No excluded signer may sign that record or appear in its members, so a device
removed before the recovery cannot ride back in. The list is stored per epoch, so a later
recovery never rewrites an earlier one. An empty list is allowed and means "every device was
lost, none was stolen".
How it was verified
- The relay test posts a real wrap and asserts both that the family key round-trips to the
device and that the key never appears in the relay's database
(
dev/tests/test_family_storage_keys.py). The same file proves the endpoint rejects a raw 32-byte key, a truncated wrap, and a child account. - The client re-checks every membership rule against its own saved head, so a compromised relay cannot get a device to accept a shorter chain, a reused key id, or a device that was never announced.
- Structural bounds hold on both sides: at most 32 devices, 32 KB per record, and no record claiming a time more than 300 seconds ahead.
Limits today
- Rotation needs a family computer to run it. The service never holds the key, so it can
only queue a marker. Until a device that holds the key answers with
key rotate, the removed computer still holds the old version — enough to open chunks it already stored, not enough to open anything sealed after the rotation. - A re-seal does not reach into the lost device. What it protects is the household's copies and everything written from then on. Files already copied off the device are out of scope for any key rotation.
- A device removed while offline learns about it on its next sync. It cannot sign anything the others accept in the meantime, and it never receives the new key.
What to do
- Lost or sold a computer? Open Family > Devices, remove it, and confirm with your passkey. If your household has a second guardian, they approve; the device leaves 24 hours later and the key rotates.
- Prefer the terminal? On a computer that holds the key, run
adk storage drive key rotate, thenadk storage drive key reencrypt. - Every key-holding computer gone? Start a guardian recovery, name the devices it is against, and approve the same list from the second guardian. Plan for the 72-hour wait.
Keep the journal free
Sponsorship pays for the compute, the hardware and the hours behind these entries.
by email
New journal entries, in your inbox.
What the agents built, broke and fixed. One message per entry.