A Digitally Signed PDF Can Still Be a Privacy Disaster

A Digitally Signed PDF Can Still Be a Privacy Disaster

A qualified electronic signature proves two things: who produced a file, and that its bytes have not changed since signing. A GDPR Article 15 response must prove three different things: that third-party data was actually removed, that the export is complete, and that the filter selecting records was applied without bias. No signature format checks anything on the second list.What a Qualified Signature Does—and Does Not—Prove A PAdES signature (ETSI EN 319 142) [2] is a CMS structure embedded in the PDF covering a declared ByteRange: every byte except the slot holding the signature itself. Verification recomputes the digest over that range and validates the certificate chain. With a qualified certificate and a key on a qualified signature creation device, eIDAS Article 25(2) gives the result the legal effect of a handwritten signature [3]. That is a strong guarantee about provenance and integrity. It is silent on semantics. Signature validation does not interpret content streams, does not ask whether a black box has text underneath it, and does not compare one section of a document against another. A QES over a broken export is a tamper-evident seal on a broken export: the signer has attested to the exact bytes containing the defects. Art. 15 compliance lives in that semantic gap. GDPR Art. 15(4) [4] requires that the copy not adversely affect the rights and freedoms of others, which in practice means destructive redaction of third-party data. And whenever a controller filters a shared dataset down to "records concerning the subject," the filter becomes a claim nobody downstream can check. Post-Mortem: 830 Pages, 36 Seconds, and 905,672 Leaked Characters The case is documented in a publicly reproducible forensic analysis by PhishDestroy's open-source TgWitness project [1]. The artifact is "Anlage 1," an 830-page PDF produced by a major digital platform in response to an Art. 15 request. It carries a QES, and its producer string identifies Aspose.PDF for .NET 20.8 [1]. The redaction consists of 1,044 solid black vector rectangles drawn over an intact text layer [1]. Running pdftotext, or pressing Ctrl+A in a viewer, yields 905,672 characters of plaintext, including usernames and complaint texts belonging to more than 1,800 unrelated third parties [1]. The signature still validates, as it should: nobody altered the bytes after signing. As documented in the published TgWitness case report, which quotes the controller's correspondence directly, the data controller described a full month of manual review and sanitization [1]. Yet the PDF's embedded creation and modification timestamps are 19:58:05 and 19:58:41, a span of exactly 36 seconds [1]. Timestamps do not capture upstream preparation, so they do not prove that no review occurred. They do show the final 830-page artifact was generated in a single pass, without automated verification of the text layer before signing. The failed redaction exposes something more consequential than leaked text. A complaint table contains 1,995 rows: 50 visible, 1,944 covered by rectangles, and 1 blank [1]. Because covered rows remain extractable, the full distribution is recoverable. A broad profile-related category accounts for 1,148 rows (57.5%); a security/account-hijacking category accounts for 312 (15.6%) [1]. Of the 50 visible rows, 43 (86%) come from the security category and zero from the majority category [1]. Computing the upper-tail hypergeometric probability directly from these recovered counts (population N = 1,995, security-category total K = 312, sample n = 50, observed k = 43, reproducible via scipy.stats.hypergeom.sf(42, 1995, 312, 50) as reported in [1]), the probability of randomly drawing 43 or more security rows in a sample of 50 is roughly 6.2 × 10-29, before even accounting for the absent majority category. The visible selection was not category-neutral, and had the redaction worked, the requester could never have known. The export also contradicts itself [1]. Visible entries dated August 2025 reference suspicious account activity and password changes. The Login History in the same PDF ends in May 2025. The Security History on page 830 records the last password change in July 2024, and page 830 is itself covered by a black rectangle [1]. The file alone cannot establish whether the logs were truncated or the reports inaccurate, only that both cannot be complete and correct. QES catches neither. Whether exposing more than 1,800 third parties' data to one requester constitutes a personal data breach under GDPR Art. 4(12), and whether it engages Art. 32 security obligations or the 72-hour notification duty of Art. 33 [4], remains an open question for the responding organization and the competent supervisory authority. The engineering lesson does not depend on the answer. Why PDF Redaction Breaks in Production Pipelines A PDF page is a content stream: operators executed in order. Text is placed by Tj and TJ operators inside BT/ET blocks. A filled rectangle is an unrelated path operation (re followed by f). Painting it after the text changes what a renderer displays and nothing for an extractor, which walks the text operators and maps glyph codes back to Unicode through the font's ToUnicode CMap. True redaction rewrites the content stream, removing text operators whose glyph boxes intersect the region, then scrubs every other carrier of the same data: images, form XObjects, annotations, bookmarks, metadata, embedded files. Mainstream PDF SDKs, including Aspose.PDF for .NET, ship dedicated destructive redaction APIs [5]. Drawing a filled shape is a different, cheaper call that looks identical on screen. Three further traps recur. Incremental updates append objects without deleting old ones, so a redaction saved as a new revision leaves the original content one cross-reference section away. Partial glyph removal can leave TJ kerning arrays and width data that leak string length. Subsetted fonts with intact ToUnicode maps make whatever survives trivially extractable. Rasterizing every page stops the leak but creates a different problem. GDPR Art. 15(3) requires electronic requests to be answered in a commonly used electronic form, and Art. 12(1) requires information to be intelligible and easily accessible [4]. Eight hundred page images satisfy the letter while defeating search, copy, screen readers, and automated analysis. A Zero-Trust Architecture for Verifiable Data Exports The goal: a requester or auditor can verify what was removed and under which rule, without the controller disclosing removed data to anyone except an authority entitled to see it. Layer 1: Physical removal and salted commitments Every redacted value is deleted at the data layer before rendering and replaced by a placeholder ID. For each one, the pipeline draws a fresh 16-byte salt from a CSPRNG and computes: c = SHA-256(salt || canonical_value) The canonical value is a length-prefixed encoding of field path plus normalized value, so a commitment cannot be transplanted between fields. Usernames, dates, and category enums are low-entropy: an unsalted hash of a category label falls to a few dozen guesses, and an unsalted username hash to a dictionary or rainbow table. Per-field salts also prevent equality leakage: without them, two cells holding the same user produce identical hashes, revealing linkage. With 128 bits of secret salt, the commitment is hiding in practice; SHA-256 collision resistance makes it binding. Layer 2: Signed export manifest The manifest, not only the PDF, receives the qualified signature. It binds artifact hashes, commitments, and the declared filter logic into one statement, canonicalized with RFC 8785 (JCS) [6] and signed using a structured format such as JAdES (ETSI TS 119 182-1) [7]. { "manifest_version": "1.0", "request_id": "dsar-2026-00417", "artifacts": [{ "name": "export.pdf", "sha256": "3f9a...c41e", "pages": 412 }], "filters": [{ "rule_id": "F-COMPLAINTS-01", "predicate": "reporter_id = :subject OR target_id = :subject", "source_rows": 2210, "emitted_rows": 61 }], "redactions": [{ "id": "r-000173", "field": "complaints[173].reporter_name", "basis": "Art. 15(4)", "commitment": "sha256:9b0e...72d1" }], "escrow": { "recipient_fpr": "8F3A...19C2", "envelope_sha256": "d71c...0a5b" }, "signature": { "format": "JAdES-B-LT", "alg": "ES256", "x5c": ["MIIF..."] } } Publishing the predicate turns the selection rule into an explicit, signed claim instead of an invisible editorial decision. Layer 3: Asymmetric escrow envelope Original values and salts go into an envelope encrypted to the public key of the competent supervisory authority or court. OpenPGP (RFC 9580) [8] works, as does a hybrid construction: a random AES-256-GCM key encrypts the payload and RSA-OAEP-256 wraps that key for the recipient. The controller discards its copy of the content key, so only the authority's private key opens the envelope. Its hash is pinned in the signed manifest, ruling out a later swap. Verification is deterministic. The authority decrypts, recomputes SHA-256(salt || canonical_value) for every entry, and compares each result against the signed commitment. Any mismatch proves post-export tampering. With plaintext rows, the authority can also re-run the declared predicate and confirm the emitted set matches it, which would surface a skew like the one above. Encrypted personal data is still personal data, so depositing the envelope directly with the authority, rather than shipping it with the export, is the conservative default. Layer 4: Production readiness and threat-model boundaries In Germany this requires no new infrastructure. The BfDI and state data protection authorities publish OpenPGP keys for encrypted correspondence [9], and German courts already accept end-to-end encrypted submissions through EGVP over the OSCI protocol [10]. The boundary must be stated honestly. Commitments make the exported set tamper-evident and make hidden selection bias within it detectable. They cannot prove the source query saw every relevant record. If rows were dropped from the database, or a login history truncated before the export ran, the manifest faithfully commits to an incomplete set. Closing that gap requires upstream evidence: append-only audit logs and Merkle structures in the style of Certificate Transparency, where each export references a signed tree head so an authority can later test whether logged records are missing. An Engineering Checklist Before Signing the Next Export Gate every signing job on text extraction: run an extractor over the final artifact and fail the build if any value on the redaction list appears. Redact at the data layer before rendering. If a PDF must be edited afterward, use a destructive redaction API [5] and write a full rewrite, never an incremental update. Sign a canonical manifest binding artifact hashes, per-field salted commitments, and filter predicates, so the signature covers the claims that matter, not just the bytes. Encrypt original values and salts to a supervisory authority or court key, pin the envelope hash in the manifest, and destroy the working copy of the content key. Run cross-section consistency checks before signing (log date ranges against referenced events, emitted rows against category distributions) and record the results in the manifest. This article was published under HackerNoon's Business Blogging program. References PhishDestroy TgWitness Forensic Analysis ("Anlage 1" Case Study) ETSI EN 319 142-1 — Electronic Signatures and Infrastructures (PAdES Digital Signatures) Regulation (EU) No 910/2014 (eIDAS) Regulation (EU) 2016/679 (GDPR) Aspose.PDF for .NET Documentation — Destructive PDF Redaction API IETF RFC 8785 — JSON Canonicalization Scheme (JCS) ETSI TS 119 182-1 — Electronic Signatures and Infrastructures (JAdES Digital Signatures) IETF RFC 9580 — OpenPGP Message Format BfDI — Encrypted Email Contact and OpenPGP Key German Judiciary Portal — Electronic Legal Transactions (EGVP/OSCI)

Original Source

Read the full article at Hackernoon →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.