Fieldseal
A portable specification and reference implementations for transparent field-level encryption-at-rest at the data-access layer.
The problem
A company holding regulated consumer data has three options today, and all three are bad.
Storage-layer encryption (TDE, encrypted volumes) defends exactly one thing: physical loss of a disk. It gives transparent decryption to anything that can authenticate to the database. PCI DSS v4.0.1 Req. 3.5.1.2 says so explicitly, and has been enforceable since 31 March 2025.
Building application-layer encryption yourself took 37signals roughly two
years of a senior engineer’s time, for one framework in one language – with an
abandoned first prototype, an RCE via Marshal serialization caught by luck, and
a deterministic-encryption flaw found by audit days before launch.
Buying a data-privacy vault starts around $12k–$23k/year plus per-tenant fees, and requires either moving your PII into a vendor’s vault or routing traffic through a proxy that discards your ORM’s semantics.
Underneath all three sits a problem nobody has addressed: there is no portable format. Data encrypted by Rails cannot be read by a Python job. Every implementation invents its own ciphertext layout, so application-layer encryption becomes a one-way door into a single language ecosystem.
What this is
- A specification – a self-describing ciphertext envelope for a single database cell, a frozen cipher-suite registry, a key hierarchy, a blind-index construction with a declared leakage budget, and a key-provider interface. With machine-readable test vectors.
- Reference implementations – a core library per language (Python, TypeScript, Java, .NET, Go) that all pass the same vectors, plus thin per-ORM adapters. Core knows nothing about SQL; adapters know nothing about cryptography.
- An operational playbook – threat model, data-classification gate, zero-downtime migration, key-rotation runbook, KMS-outage degradation modes, and published benchmarks.
What this is not
- Not protection against a compromised application process. The keys are in that process.
- Not range queries, sorting,
LIKE, or full-text search over ciphertext. Order-preserving and order-revealing encryption are explicitly forbidden by the spec; the attack literature is unambiguous. - Not a replacement for storage-layer encryption. Keep TDE underneath.
- Not a hosted service, proxy, or vault.
- Not a GDPR Article 17 erasure guarantee. No regulator has endorsed key destruction as standalone erasure.
Documents
- Research Memo — Application-Layer Encryption at the Data-Access Layer Status: Draft 1 · Date: 2026-08-08 · Scope: landscape, prior art, regulatory basis, gap analysis Purpose: establish, with citations, whether …
- PRD — Fieldseal Fieldseal: a portable specification and reference implementations for transparent field-level encryption-at-rest at the data-access layer. …
- Fieldseal Core Specification Version: 0.1-draft · Date: 2026-08-08 · Status: Working draft. Not for production use. Not independently reviewed. The key words MUST, MUST …
- Compliance Mapping Date: 2026-08-08 · Status: Draft 1 · Verification: clause numbers below were read from primary sources (eCFR, Federal Register full text, …
- ORM Adapter Notes Date: 2026-08-08 · Status: Draft 1 · Purpose: the per-ORM engineering detail behind the conformance-level matrix in the spec (§10). Written …
- Dissemination and Evidence Track Date: 2026-08-08 · Status: Draft 1 Separation of concerns. Nothing in the research memo, the PRD, the specification, or the code should be …
- Verification Log Date: 2026-08-08 · Method: independent re-verification of the 20 highest-risk factual claims against primary sources (eCFR, Federal …
- Phase 1 Implementation Plan Date: 2026-08-08 · Status: Draft 1 · Purpose: the engineering plan for Phase 1 (“prove the format,” PRD §8): what gets built, in …
- Test Vector Technical Specification Date: 2026-08-08 · Status: Draft 1 · Purpose: the engineering specification for authoring, validating, and consuming the machine-readable …
- Core Library Architecture Specification Date: 2026-08-08 · Status: Draft 1 · Purpose: the language-agnostic architecture every core implementation …
- Python Core Technical Specification Date: 2026-08-08 · Status: Draft 1 · Purpose: the Python binding of docs/09-core-architecture.md. First implementation built in Phase 1; it …
- TypeScript Core Technical Specification Date: 2026-08-08 · Status: Draft 1 · Purpose: the TypeScript/Node binding of docs/09-core-architecture.md. Second Phase 1 implementation; it …
- Django Adapter Technical Specification Date: 2026-08-08 · Status: Draft 1 · Purpose: the engineering design for adapters/django (package fieldseal-django), targeting Django 6.1 / …
- Prisma Adapter Technical Specification Date: 2026-08-08 · Status: Draft 1 · Purpose: the engineering design for adapters/prisma (package @fieldseal/prisma), targeting Prisma 7.x. …
- Conformance & CI Technical Specification Date: 2026-08-08 · Status: Draft 1 · Purpose: how conformance is claimed, proven, and continuously enforced. This is the machinery behind …
- Operational Tooling Technical Specification Date: 2026-08-08 · Status: Draft 1 · Purpose: engineering design for tools/backfill and tools/leakage-estimator. The backfill tool is PRD …
- Cryptographic Reviewer Brief Date: 2026-08-08 · Status: Draft 1 — the document sent to prospective Phase 0 reviewers · Why this exists: the Phase 0 exit gate (PRD §8) is …