Security architecture

A document released through DocShare passes four trust boundaries. This page describes each of them, the primitives that guard them, and what an attacker would have to defeat to read a single page.

Design principles

What we assume will go wrong.

Our architecture starts from the failures we consider likely rather than the ones that are convenient to defend against.

The mailbox is compromised

We assume an attacker reads the recipient's email. That is why the link carries no key, no password and no description of the contents — possessing it grants nothing.

Our own servers are hostile

We assume an attacker holds root on a DocShare application host. Master keys are unreachable from application code; unwrapping happens inside the HSM under a passphrase we do not possess.

An insider goes bad

We assume a DocShare employee will one day try to read customer content. Key ceremonies require dual control, administrative access is time-bound and session-recorded, and no single role can both reach ciphertext and request unwrapping.

The recipient's device is dirty

Decrypted content lives in memory for the length of the session, is never written to browser storage, and the viewer sets no persistent identifier before the recipient acts.

Today's ciphers will age

Algorithms are declared per share in a signed manifest, so a document sealed in 2021 can be re-sealed under a stronger suite without re-issuing links. Hybrid post-quantum key encapsulation is already in limited release.

Someone will lie about what happened

Every event is appended to a hash-chained log, sealed hourly with an eIDAS qualified timestamp. Records can be verified independently, including against us.

Envelope encryption

Two keys, kept apart on purpose.

Every document gets a disposable key. Every tenant gets a durable key. The disposable key never leaves the document; the durable key never leaves the hardware.

Sealing · at upload

From plaintext to ciphertext

  1. A 256-bit data key is generated from hardware entropy.
  2. The document is encrypted with AES-256-GCM using that key and a unique nonce.
  3. A manifest is built: SHA-256 digest, page count, sender, policy, algorithm suite.
  4. The manifest is signed with the tenant's Ed25519 key.
  5. The data key is wrapped with AES-KW under the tenant master key inside the HSM.
  6. The wrapped key is further sealed with a value derived from the recipient passphrase via Argon2id.
  7. The plaintext data key is zeroed. Only ciphertext, manifest and double-wrapped key remain.
Release · at unlock

From ciphertext to plaintext

  1. The encryptionId resolves to an encryption record — not to a key.
  2. Verification runs: transport, signature, record status, integrity, session risk, custodian reachability.
  3. The recipient supplies the out-of-band passphrase.
  4. Argon2id stretches it against the per-share salt to remove the outer seal.
  5. The HSM unwraps the data key under the tenant master key and returns it over an authenticated channel.
  6. The browser decrypts the stream and verifies the GCM authentication tag.
  7. The release is appended to the audit chain, and the record is marked consumed.

Algorithm suite ds-suite-3

Document encryption
AES-256-GCM, 96-bit nonce, 128-bit tag, one key per document version
Key wrapping
AES-KW (RFC 3394) under a non-exportable tenant master key
Outer seal
XChaCha20-Poly1305 keyed by the Argon2id output
Passphrase derivation
Argon2id m=65536 KiB, t=3, p=4, 128-bit salt
Asymmetric transport
ECDH P-384 with RSA-4096 fallback for legacy HSM partitions
Manifest signing
Ed25519 over canonicalised JSON (RFC 8785)
Integrity digest
SHA-256 per document, SHA-256 Merkle root per share
Transport security
TLS 1.3 only · X25519 · HSTS preload · OCSP stapling · CAA pinned
Post-quantum (limited)
Hybrid X25519 + ML-KEM-768 key encapsulation

Pre-release verification

Six checks the recipient watches run.

These execute before the passphrase field is enabled. If any one of them does not return green, the sequence halts and no key request is ever made — there is nothing to guess at, because nothing is listening.

1

Secure channel established

The viewer confirms it is running over TLS 1.3 on the tenant's own subdomain, with a certificate matching the entry published in our Certificate Transparency monitor. A downgrade, a proxy or a lookalike domain fails here.

2

Link signature validated

The share reference carries an Ed25519 signature from the sending tenant. This proves the link was minted by the organisation it claims to come from, and has not been edited in transit or reconstructed by an attacker.

3

Encryption record resolved

The encryptionId is looked up. The record must exist, be within its validity window, and not already have been consumed. Revoked, expired and previously released shares stop here.

4

Document integrity verified

The SHA-256 digest of the stored ciphertext is compared against the signed manifest. Any divergence — storage corruption, or tampering — aborts the release rather than serving a damaged document.

5

Device and session assessed

Network reputation, geolocation consistency, automation signals and velocity are scored. A high score does not silently block: it halts the release, notifies the sender's security contact, and gives the recipient a reference to quote.

6

Key custodian contacted

The HSM partition holding the tenant master key is asked whether it is available and holds the wrapped key for this record. Only after a positive answer does the passphrase field unlock.

Operations

The boring half, which is the half that fails.

Cryptography is rarely the weak point. Access management, patching discipline and key ceremonies are.

Hosting
Two ISO 27001-certified facilities in Amsterdam and Eindhoven. No workload, backup or log leaves the Netherlands.
Administrative access
Hardware-token MFA, just-in-time elevation with a maximum four-hour lifetime, full session recording, four-eyes approval for production changes.
Key ceremonies
Dual control with split custody. Generation, rotation and destruction are witnessed, minuted and reviewable by the tenant.
Key rotation
Tenant master keys every 90 days; TLS certificates every 45 days; signing keys annually with overlap.
Penetration testing
Twice yearly by an independent CREST-accredited firm, plus a continuous private bug bounty. Summaries available under NDA.
Vulnerability management
Critical within 24 hours, high within 7 days, medium within 30 days, measured from vendor disclosure.
Backups
Encrypted, immutable for 35 days, restored and verified monthly. Backups hold ciphertext only.
Recovery objectives
RTO 4 hours, RPO 15 minutes, tested twice yearly with tenant-observable results.
Incident notification
Security contacts informed within 24 hours of confirmation; regulator-ready report within 72 hours.

Limits

What DocShare deliberately cannot do.

A security page that only lists strengths is a marketing page. These are real constraints of the design.

We cannot recover a lost passphrase
The passphrase is an input to key derivation, not a stored credential. If the recipient loses it and the sender did not record it, the share must be reissued. There is no reset, no recovery code and no escalation path — this is the property that makes the design worth having.
We cannot stop a recipient photographing the screen
Once a document is legitimately released to an authorised person, it is readable by that person. Watermarking and audit records make leaks attributable; they do not make them impossible. Anyone claiming otherwise is selling you something.
We cannot search or preview your documents
We hold ciphertext and a signed manifest. Full-text search, content classification and automated redaction would all require plaintext access, so we do not offer them. Metadata you supply at upload remains searchable in your own tenant.
We cannot serve a link after its record is destroyed
Expiry destroys the wrapped data key. Afterwards the ciphertext is indistinguishable from random data, to us as much as to anyone else. Extending an expired share is not possible; re-issuing is.