Trust that my keys stay safe
A person can rely on the app to keep keys on the device, show them only when asked, and never lose an identity because something failed.

As an identity holder, I want to be sure my keys are kept safely and never disappear because of a fault, so that I can use Seed on my phone without fearing for my identities.

Situation

My identities are worth more than this phone. I use the app where the connection drops halfway through things. I expect a failure to cost me a retry and never a key.

What I do

    Create or import identities and use them.

    Connect my vault and let it sync, on good and bad connections.

    Remove an identity only when I mean to, through "Remove".

    Reveal a key only when I mean to, through "Export key file" and "Reveal".

What I should see

    With one identity, Me says "Keys stay on this device, in the Keychain."

    A private key appears on screen only after I tap "Reveal" on the alert "Reveal the private key?", only on that identity's page, and it goes away when I tap "Hide" or switch identity.

    The recovery words I type to import are not kept if the app restarts.

    A connection to my vault that is cut short, at any point, leaves every identity where it was, on the phone and in the vault.

    A sync that fails shows its reason in red on Vault and changes nothing on the phone.

    An identity is removed from my devices only after I confirm "Remove this identity?" somewhere. It never vanishes because a device was behind or offline.

    If the vault no longer accepts this phone, I see an error and keep all my identities here.

When something goes wrong

    If the vault file cannot be opened, Vault shows "Failed to open the vault:" and the reason, for example "Vault key is missing from this device’s Keychain.", with "Retry". The app refuses to continue instead of starting an empty vault over my data.

    If the stored keys cannot be read, Me shows "Couldn’t read the identities on this device." with "Retry", and saving an identity is refused with "Identity storage is unreadable. Restore it from a backup before making changes." Nothing is overwritten.

Not included

    The app has no passcode or Face ID of its own, and the vault has no master password. Protection is the phone's lock and its Keychain. See Current limits and known gaps.

    Exported key files are not encrypted, and password-protected ones cannot be imported.

    These guarantees are proven by unit tests and by a suite against the real vault server, not on a physical phone on every change. See Real vault compatibility suite.

Trace

Story US-VAULT-04, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.

Design

Page

Part it plays

Me

The Keychain footer and the unreadable-identities failure row

Identity detail

Reveal only after an alert, only on its own screen; removal asks first

Vault

Failure with Retry, sync error in place, identities kept

Connect vault sheet

An interrupted connection that retries or stops without loss

Import identity sheet

The import field whose content is never remembered

Vault status panel

The error and sync error lines in the Storage panel

Vault connect panel

Warnings that do not end the wait

dialog

The reveal and remove confirmations

Confirmations and alerts

Every destructive or revealing action asks first

Loading, failure and empty states

Failure with Retry that keeps what is there

States for every screen

Failure states of Me and Vault

Honest state: loading, failure and empty

A failure is shown as a failure, never as empty

The five principles

The principles this promise rests on

Representative strings

The exact safety wording

Implementation

Page

Part it plays

Identity: key storage

One Keychain secret, fail-closed loading, the removal marker

Vault: remote vault device role

The two copies of the identities and the 2026-11-26 incident

Vault: the store and on-device format

What is stored where; the removal rule; failing closed; a failed sync leaves state untouched

Vault: merge and tombstones

A deletion is only ever propagated, never invented; re-creation survives

Vault: connect ceremony

Transport failures reuse the approval; refusals fail closed; cancel suppresses late replies

Vault: API and sync

Sync runs against a candidate state so a failure changes nothing

Crypto: vault envelope and state codec

The encrypted envelope: nothing but ciphertext outside the Keychain

Crypto: primitives and key derivation

Signing and encryption primitives

Crypto: signed envelopes

Requests are signed on the device

Me: sources and import logic

No answer carries a key except the explicit export

Me: screens and components

The export shows only on its own screen; import text is never persisted

Vault server

The server only ever stores ciphertext

Grants and capabilities

The two Keychain secrets and one file the app may touch

Where the app yields for the turn budget

The connect failure and the two separate fixes

Current limits and known gaps

No master password; password-protected key files refused

Real vault compatibility suite

Fail-closed behaviour against the real server

Bun unit tests

The regression tests for the removal rule and storage

Code

File

What

src/identity/index.ts L1-8

file header: one Keychain secret and the removal marker rule

src/identity/index.ts L27-61

IdentityStorageError and loadKeys: corruption is never read as empty

src/identity/index.ts L67-105

loadRemovedKeys, write, saveKeys, clearRemovedKeys

src/identity/index.ts L124-131

removeKey: key and marker change in one write

src/vault/store.ts L119-152

load: fail closed

src/vault/store.ts L171-258

reconcile and rebaseKeys: only a marker deletes

src/vault/store.ts L382-426

sync on a candidate state; a failure only records the error

src/vault/store.ts L506-510

retryableConnectionError

app.ts L21-25

grants: secret.keep seed-keys, secret.keep seed-vault-kek, vault file read and write

app.contract L211-213

meImportText is never persisted

me.contract L99-100

the Keychain footer on Me

Tests

File

What it checks

src/vault/__tests__/vault.test.ts

a connection cut short before identities reach the Keychain never deletes them from the remote vault

src/vault/__tests__/vault.test.ts

a Keychain map that lost its entries is refilled from the vault, not treated as deletions

src/vault/__tests__/vault.test.ts

only a removal made in Me leaves a marker, and the marker is spent once the vault records it

src/vault/__tests__/vault.test.ts

local ciphertext uses a Keychain KEK, survives reopen, and never contains a private seed; wrong Keychain key fails closed without overwriting ciphertext

src/vault/__tests__/vault.test.ts

a failed remote upload does not turn newly downloaded identities into local deletions; wrong wrapped remote key shows error and preserves the local encrypted vault; wrong mailbox key is a one-time refusal and keeps local identities

src/identity/__tests__/storage.test.ts

saving never silently overwrites an unreadable secret bundle; malformed stored seeds are refused without echoing key material; export never returns another account key from a mismatched record

src/identity/__tests__/identity.test.ts

corrupt secret fails safely instead of appearing empty

.tests/real-vault/real-vault.test.ts

a revoked or wrong credential fails closed and keeps every identity

me.test.contract

me: an exported key shows only on its own identity's screen

Delivery

Delivered by #1470.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Attributes
Epic
Vault
name
Trust that my keys stay safe
Story
US-VAULT-04
Status
Shipped
summary
A person can rely on the app to keep keys on the device, show them only when asked, and never lose an identity because something failed.