Project: DocSeal (Privacy-First Document Watermarking & Provenance Toolkit)
Date: August 2026
DocSeal is designed for privacy-preserving document protection and provenance. It is built under the following non-negotiable security principles:
- Local-First / Offline Execution: No document bytes, keys, or metadata are ever transmitted over the network.
- Zero PII in Payloads: Watermark payloads MUST NEVER contain Personally Identifiable Information (such as Indonesian NIK, tax numbers, passport numbers, home addresses, or phone numbers). All payloads use opaque, cryptographically random identifiers (UUIDv4/UUIDv7 or HMAC hashes).
- No Homegrown Cryptography: All cryptographic primitives rely on standard, peer-reviewed implementations (
ed25519-dalekfor signatures,sha2/blake3for hashing,chacha20for PRNG). - Honest Capabilities & No False Claims: The project explicitly rejects marketing buzzwords such as "AI-proof" or "impossible to remove." The security objective is to raise the cost of forgery and provide mathematically verifiable provenance.
| Component | Standard / Primitive | Key Length / Hash Size | Library |
|---|---|---|---|
| Digital Signatures | Ed25519 (RFC 8032) | 256-bit private / 256-bit public |
ed25519-dalek (2.1) |
| Document Hashing | SHA-256 (FIPS 180-4) & BLAKE3 | 256-bit digest |
sha2 (0.10) / blake3 (1.5) |
| Key Derivation | HMAC-SHA256 (RFC 2104) | 256-bit output |
hmac (0.12) |
| PRNG Seeding | ChaCha20 (RFC 8439) | 256-bit seed |
rand_chacha (0.3) |
| Error Correction | Reed-Solomon |
Custom pure-Rust |
- Private Key Storage:
- Private signing keys must be kept secure by document issuers. Never distribute or embed private keys inside public documents or repositories.
- For automated environments, load private keys from secure environment variables (
DOCGUARD_SIGNING_KEY) or hardware security modules (HSM / PKCS#11).
- Public Key Distribution:
- Verification relies only on the issuer's public key (formatted as
did:key:z6MkwS...or base64 raw bytes). - Public keys can be safely distributed or embedded in verification manifests.
- Verification relies only on the issuer's public key (formatted as
- Revocation & Rotation:
- Manifests include an optional
expires_atISO 8601 timestamp. Verifiers must reject expired manifests.
- Manifests include an optional
- Decompression Bomb Protection:
- Image decoding enforces maximum dimension limits (default: 8192 x 8192 pixels / 64 megapixels) and maximum allocation bounds.
- PDF Parser Hardening:
- PDF parsing restricts maximum recursion depth (32 levels) to protect against circular reference attacks.
- Constant-Time Verification:
- Ed25519 signature checks execute in constant time, preventing timing side-channel attacks.
If you discover a security vulnerability in DocSeal:
- Do not open a public GitHub issue.
- Send a detailed advisory with reproduction steps to the project maintainers via encrypted email or GitHub Private Security Advisory.
- Maintainers will acknowledge within 48 hours and coordinate a coordinated disclosure timeline.