.ch
For regulated industries · Swiss law
Downstream face of the Contra dam
Engine

One write. One transaction. Five layers.

Seal → index → audit → commit, together or not at all. Here is what one record looks like at rest, and how the seal is bound to the row it lives in.

Contra Dam · downstream face
Drawing 1 · the sealed record

Every record is sealed to its place in the file.

A payload is compressed, sealed with AES-256-GCM under a per-record key, and written as an immutable row whose plaintext columns are exactly the associated data of the seal. A keyed checksum covers both. Move the ciphertext anywhere else and it will not open. Click a layer.

content key 32 B random AES-KW-wrapped shred = destroy it entry_id ver type parent status created_at blob → chksum seq entries · immutable revisions row checksum · HMAC-SHA256(checksum_key, aad ‖ ciphertext) · 32 B checksum a1f30c9e77b2d04e5c18e6a9 ‖ 9c1e0b7a2f5d4c31e08a3d5f6b2c9d417ab30cf5… nonce 12 B ‖ AES-256-GCM ciphertext ‖ tag 16 B aad = entry_id | version | type | parent_id | status | created_at seal zstd · level 3 compression { "title": "Acme Inc", "username": "svc-billing", "urls": ["https://acme.example"], "fields": [ { "label": "api key", "value": "…", "level": 2 } ] } payload audit row seq · prev_hash · row_hash same transaction as the row aad binds seal ↔ row one atomic transactionseal → index → audit → commit
payload

Opaque JSON. Read only where you said to.

The engine reads exactly the top-level fields your schema declares for indexing — nothing else. Undeclared fields, nested structure, and values you encrypted yourself are stored byte-exact.

  1. payload
  2. compression
  3. seal
  4. checksum
  5. row
  6. content key
  7. audit row
click a layer or a name
Drawing 2 · seal one yourself

Type anything. Seal it. Then try to move it.

Real AES-256-GCM in your browser, with the same associated-data binding the engine uses. Seal a payload, change one AAD field — the version, the status, the parent — and try to open it again.

seal / open · WebCrypto AES-256-GCM · random key per page loadnot sealed
aad =
nonce ‖ ciphertext ‖ tag
— seal a payload to see its bytes —
checksum = HMAC-SHA256(checksum_key, aad ‖ ciphertext)
—
Nothing opened yet.

The engine also compresses before sealing and stores the content key wrapped with AES-KW; both are omitted here. The AAD binding is exactly what you see.

Keys

One secret. Everything derived.

You supply key material; the engine derives its working set with HKDF-SHA256 — an index key, a checksum key, a wrap key, per-event audit keys, a key-check value — and mints one random master secret per store, wrapped with AES-KW. Every record gets its own random content key, wrapped under the wrap key. Rotating your key re-wraps one thing and re-encrypts nothing.

FIPS 140-3 at rest: the default build takes every primitive from aws-lc-rs 1.16.3 with the validated AWS-LC FIPS 3.1.0 module (CMVP #5314, static), pinned exactly, checked by the test suite and run in FIPS mode, compiled and linked on Linux x86_64 and aarch64. The certificate’s tested environments are Amazon Linux 2023 on Graviton4 and on Intel Xeon Platinum 8375C; elsewhere the module is built from the same certified source, but the environment is not on the certificate. Nothing hand-rolled, no second provider. Working keys are zeroized on drop; the one sanctioned panic in the engine is a failing random generator — predictable key material is worse than crashing. A host without the AWS-LC toolchain can build with --no-default-features --features non-fips for local work; that build is not a FIPS build.

Objects

Files, sealed under the record that owns them.

Scans, signed PDFs, imaging slices, exports: a record's files are sealed under a key derived from its content key, bound to their bucket, record, file id and version, access-checked through the record and audited by the bucket they live in. Every put is a new version. Shred the record and every file dies with the key.

Objects, in full →
One store

The records are one file. Their files sit beside it.

Single writer, rollback-journal mode: between transactions the .vault file is the entire, consistent store of records — schema, index parameters, audit chain, and the manifest of every file. The files themselves sit beside it in two folders, one for the secure buckets and one for plain. A complete backup is the .vault file and both folders: copy them, ship them, verify them anywhere. The storage layer is SQLite; you never see it, and stock tooling cannot read a single payload.

Replication is a per-table cursor over gapless sequence numbers. Reads are audited too: every export of record data seals an audit event before it is returned — fail-closed on a writable store — and so does every read from the secure-full bucket.

Plain tables

Sealed where it matters. Fast where it churns.

Not everything an application keeps is a record. Counters, settings, lookup tables, a schedule’s slots, sign-in state kept as ids and hashes, the short labels a list draws from: data that changes all the time and is about no one. Kept as sealed records, every change would be a permanent revision and an audit row, and every refresh of a screen would open dozens of records. So the same .vault file also holds plain tables, and your application reads and writes them with ordinary SQL: a screen renders from one query, without opening a sealed record. The audit chain stays a record of what matters, and one file is still one backup.

That SQL is guarded by the storage engine’s own authorizer, not by matching text. VaultDB’s own tables can be read from it but never written, altered or dropped. ATTACH, PRAGMA writes, extensions and file functions are refused, and so is any statement the guard was never asked about. Each call is bounded in rows and time: 10,000 rows and two seconds by default. A transaction commits all or nothing, and each statement can say how many rows it expects, so a check and a write happen in one step: a slot is booked exactly once.

Plain tables have no protection at all: no encryption, no audit, no grants, no crypto-shred. They are for non-secret values only. Keeping credentials, PII, PHI and anything else a regulated organization would want to protect out of them is your responsibility; VaultDB does not stop you.