0001: Assume ciphertext is public forever
- Status: accepted
- Date: 2026-09-22
Context
vaultfold stores encrypted secrets as files inside a directory that is
designed to live in a git repository. Even when that repository is private,
the vault directory will realistically end up in places its owners did not
intend: a Docker build context, an npm pack tarball, a deploy artifact on a
server, a fork, a vendored copy, a laptop backup. Explicitly supporting public
repositories is a stated goal, which makes the worst case the normal case.
Every former member of a vault also holds a complete copy of its history, including every wrapped key they were ever granted.
Decision
The threat model's first axiom is: all ciphertext, all metadata in the vault directory, and all of its history are available to every adversary, permanently, including former members.
Every design decision is evaluated against this axiom. Specifically:
- No security property may depend on the repository being private.
- No security property may depend on old files being deleted, because git history and third-party copies retain them.
- Secrets that a revoked member could have read are treated as compromised; the mitigation is rotating the underlying credential (ADR 0007), not re-encrypting the stored value.
- The format must remain decryptable-only-by-recipients under the assumption that adversaries store ciphertext today to attack it later, which motivates cipher-suite agility and a hybrid post-quantum recipient type (ADR 0002).
- Tooling actively prevents the vault leaking into build outputs:
initwrites ignore rules and every vault-touching command re-checks them.
Consequences
- Confidentiality rests entirely on the cryptography and on key custody.
- Metadata that the format cannot hide (entry counts, activity timing, author key ids, padded sizes) must be documented as leaked (see threat-model.md).
- The default for
initis still a private repository;init --publicrequires an explicit confirmation. This is defence in depth, not a security boundary. - Ciphertext is padded to size buckets so that value lengths are not recoverable from file sizes.
Alternatives considered
- Require private repositories. Rejected: unenforceable, and the deploy artifact and fork cases leak the vault anyway.
- Rely on history rewriting after revocation. Rejected: cannot recall copies already fetched; useful only as an opt-in compaction ceremony (ADR 0007).