Security and evidence model
The product is not the PDF; it is the proof that the PDF was agreed to. A completed agreement must show which document every party saw, who signed it, when and how, and anyone must be able to check that offline for decades. This page explains how, and what is still to be reviewed.
OpenSeal is designed to support electronic-signature laws such as ESIGN, UETA and eIDAS. It makes no claim of legal validity, compliance or certification. An external security and cryptographic review (SEC-REV-01) is a release gate still ahead, and the ASVS self-assessment (SEC-ASVS-01) is written with its findings being closed. Report vulnerabilities privately: see the security policy.
Each claim below is marked Tested, with the test or CI job that proves it, or Depends on your deployment, with what the operator configures.
Who we defend against
Nobody in an agreement trusts anybody else, so the design assumes each of them may attack the record:
- a signer who later says "I never signed", or tries to change the document after signing;
- a sender who wants a signer to agree to something other than what they saw;
- a counterparty holding the PDF who alters it while keeping a valid look (shadow and incremental-saving attacks);
- another tenant on the same install, an outside attacker, a malicious integrator abusing webhooks or embedded views;
- an insider or compromised operator who would rewrite evidence, backdate, or sign with the platform key.
Two kinds of signature
Like DocuSign and SignNow by default, OpenSeal separates the person's electronic signature (a typed, drawn or uploaded mark adopted with intent, plus the evidence of who adopted it) from the platform's digital signature, the seal: a cryptographic signature over the final bytes that proves the record has not changed since. Signatures made with each signer's own certificate, for advanced and qualified signatures, are planned (VS-18).
The seal
- PAdES baseline profiles. B-T is the default: a CAdES-detached CMS signature with an RFC 3161 timestamp from a timestamp authority, so the time does not come from our clock. B-LT adds the certificates and revocation data needed to validate years later without a network; B-LTA adds a document timestamp over everything, renewed before algorithms or certificates weaken.Tested: sealing at each level, then pyHanko and EU DSS in CI
- Incremental, never rewritten. The sealed file starts with the exact bytes delivered to signers. Anything later, such as long-term validation data, is appended as a new revision. A sealed document is never modified.Tested: the sealed file keeps the delivered bytes as its prefix
- Sized by computation, checked before release. The signature placeholder is computed, never guessed; a seal that would not fit fails instead of being truncated. Every seal is verified by our own verifier before it is stored; a failure leaves the envelope in
completingwith a job to retry, nevercompleted.Tested: sealing tests and the worker's verify-before-store flow - Algorithms. SHA-256 (SHA-384 and SHA-512 supported); RSA 3072 and above (PKCS#1 v1.5 and PSS), ECDSA P-256 and P-384. SHA-1 subfilters are never written. Cryptography comes from established libraries, never hand-rolled.Tested: the verifier's algorithm checks
The audit trail
- Every legally relevant fact is an event, written in the same database transaction as the change it describes, before the client hears success.Tested: audit events written with each change
- Append-only. No code path updates or deletes an event; the application's database role cannot, and a trigger refuses it. Corrections are new events.Tested: UPDATE, DELETE and TRUNCATE refused, CI job store-db
- Hash-chained per envelope. Each event is canonical JSON (RFC 8785) whose SHA-256 is the next event's
prev; sequence numbers are dense. Removing, inserting, reordering or editing any event breaks the chain.Tested: tamper tests on the chain - Sealed into the document. The chain is embedded in the sealed PDF as
audit-trail.json, and the certificate of completion prints the chain head. The seal covers both, so altering either breaks the seal, and the database's copy can be checked against the copy every party received.Tested: evidence embedded and verified - Minimal personal data. Typed values are recorded as hashes in the chain; the values themselves are in the sealed document.Tested: evidence shape tests
The certificate of completion
Appended to the sealed PDF: the envelope summary and chain head; each document's SHA-256 as delivered; for each signer, their email (masked as the account chooses), authentication methods and results, IP address, user agent, location and how it was obtained, the signature images and adoption method, and the sent, viewed and signed times; consent versions and times; and how to verify. See an example.
Signing keys
- The seal key lives in keyd, a separate daemon that talks PKCS#11 to an HSM (SoftHSM in development). It receives the encoded signed attributes, never the document, and returns the signature.Depends on your deployment: your HSM and its PKCS#11 module; Compose uses SoftHSM (keyd's PKCS#11 path is tested in CI job keyd-softhsm)
- keyd accepts only the worker, over TLS 1.3 with mutual authentication and a client allow-list, rate-limits requests, and keeps its own hash-chained log of every operation.Tested: mutual TLS and the client allow-list
- File keys are refused outside development, and any seal made with one says so in its reason. No private key appears in code, logs, the database or an image.Depends on your deployment: never set OPENSEAL_DEV_INSECURE_KEY in production; the refusal itself is tested in keyd
- Cloud KMS backends (AWS, GCP, Azure, Vault) are planned (
KEYD-01).Depends on your deployment: not built yet (KEYD-01); use a PKCS#11 HSM
Hostile documents
Every uploaded file is assumed to be an attack. The PDF reader is OpenSeal's own: every limit (size, depth, object count, stream expansion and more) is named, has an error code, a hostile test file and a fuzz target, and each target has been fuzzed for 24 cumulative hours without a finding. Uploads are rewritten into a fresh file without JavaScript, launch actions, embedded files, external references or XFA, which are never executed or followed; what was removed is reported to the sender. The browser draws pages with pdf.js with scripting disabled, inside a strict Content Security Policy.Tested: hostile fixtures for every limit, 24 fuzzed hours per target
Verification you can repeat
Our verifier is not trusted alone. Every sealed and every tampered fixture must get the same verdict from three validators: casual-sign-verify, pyHanko and EU DSS. Across a corpus of 422 real-world PDFs, all 417 admissible files are filled, flattened, sealed and verified by all three. The verifier's classifier of later revisions catches shadow attacks (hide, replace, hide-and-replace) and incremental-saving attacks. The same verifier compiled to WebAssembly gives byte-identical verdicts in the browser.Tested: CI jobs validators and wasm-parity
Accounts, tenancy and the API
- Access is decided on the server for every request and every object, deny by default. PostgreSQL row-level security per account is a second line, not the first; isolation tests are generated from the API description and run with it on and off.Tested: cross-account isolation over every API operation, RLS on and off
- Another account's objects answer exactly like missing ones.Tested: cross-account isolation tests
- Signing links are opaque, for one recipient of one envelope, and bound to the first browser that opens them; they are never logged.Tested: signing-link threat tests
- Personal data (names, emails, IP addresses, phone numbers, signature images) is classified and never logged in clear; no document text is logged.Depends on your deployment: keep log shipping and retention as docs/65 describes; what the services write is tested not to carry personal data
- Webhooks refuse private and internal addresses at resolution and at connection (details).Tested: webhook address checks at registration and connect
Read further
- docs/07: the threat model, threat by threat with its control and test
- docs/31: sealing and signatures
- docs/32: the audit trail and evidence
- docs/09: legal and compliance mapping