Security & Cryptography

PDF Digital Signatures: PAdES & Cryptographic Proof

A digital signature is the cryptographic mechanism used to prove the authenticity, origin, and integrity of a PDF document. Unlike a simple image of a handwritten signature, a digital signature uses public key infrastructure (PKI) to mathematically bind a person's digital certificate to the exact byte-structure of the file, invalidating instantly if a single character is altered.

Quick Answer

An image of a signature placed on a PDF can be effortlessly copied, pasted, or deleted. A true Digital Signature cannot. It calculates a unique hash (fingerprint) of the entire document and encrypts that fingerprint using your private key. When someone opens the PDF, their viewer decrypts the fingerprint using your public key and compares it to the document's current state. If a single pixel, word, or space was modified after you signed it, the fingerprints will not match, and a massive red warning reading "Signature is INVALID" is prominently displayed.

The Anatomy of a PDF Digital Signature

In a PDF, a digital signature relies on several interconnected components defined in ISO 32000 and the ETSI PAdES framework:

  • Signature Field (/Sig) — An annotation field built into the PDF that acts as the container. It has a visual appearance stream (what you see on the page) and a value dictionary (the cryptographic payload).
  • Byte Range Array (/ByteRange) — An array of four integers specifying exactly which chunks of the file's raw binary data were hashed for the signature. It hashes everything except the space where the signature's byte-value itself is written, avoiding a self-referential paradox.
  • Cryptographic Contents (/Contents) — A hexadecimal string containing the PKCS#7 / CMS (Cryptographic Message Syntax) object. This blob houses the encrypted hash, your public certificate, and the certificate chain.
  • Timestamp (TSP) — A mathematically secure time assertion provided by an external Timestamping Authority (TSA). It proves the signature was applied before a certificate expired.
  • Revocation Info (CRL/OCSP) — Optional but critical data embedded in LTV (Long-Term Validation) signatures, proving that your certificate was not revoked/stolen at the exact moment of signing.
🔐

Visible vs Invisible: A digital signature does not need to be visible on the page. "Invisible signatures" or "Document Certification" signatures cryptographically lock the document globally but only appear in the signature side-panel of the PDF viewer.

Levels of Trust (eIDAS & PAdES)

Trust LevelIdentity VerificationBest Used For
Self-SignedNone (You generated the cert locally)Testing, internal memos between trusted users. Browsers will show "Unknown Trust".
AATL ApprovedVetted by Adobe / Trusted CAB2B contracts, standard commercial agreements. Instantly trusted by Adobe Acrobat globally.
Advanced (AES)Linked to identity, sole controlDocuments requiring compliance with standard EU eIDAS regulations.
Qualified (QES)Hardware token/chip + Face-to-face IDReal estate, government mandates, extreme high-value legal disputes. Equivalent to a notarized physical signature in the EU.

Real-World Scenarios

⚖️ Legal Dispute Scenario

The Altered Invoice Amount

Vendor A sends a digitally signed PDF invoice for $10,000 to Company B. A malicious employee at Company B opens the file in a hex editor or advanced PDF tool, changes the "1" to a "5" to steal $40,000, and sends it to accounting. When the accounting software verifies the signature, it hashes the document bytes. Because the "1" became a "5", the target hash no longer matches the encrypted hash locked by Vendor A's private key. The PDF viewer turns red, shouting "Signature is Invalid - Document has been modified or corrupted." The fraud is instantly thwarted.

🏗️ Approvals Scenario

Multi-Signature Contract Chaining

An architect, an engineer, and a city planner must sign a set of blueprints. The architect signs first. Modifying a signed PDF invalidates it, so how can the engineer sign next? PDF handles this via "Incremental Updates". The file is not rewritten. Instead, the engineer's new signature object, and the catalog update referencing it, are appended sequentially to the very end of the file. The architect's original byte-range remains utterly completely untouched. The viewer validates both signatures by tracing the chronology of the incremental updates backward.

🕰️ Archival Scenario

Digital Decay & The 20-Year Verification

A lawyer signs a will in 2026. By 2046, the lawyer's certificate has long expired, and the issuing Certificate Authority went out of business in 2035. If the signature was standard, opening the PDF in 2046 results in "Unknown Validity". However, because the lawyer used PAdES-LTV (Long-Term Validation), the PDF itself embedded the 2026 revocation status and a secure Timestamp from a government TSA. In 2046, the viewer sees the exact historical timestamp, sees the embedded proof the cert was valid *at that exact second*, and displays a green checkmark.

Why Digital Signatures Define PDF Security

🛡️

Absolute Non-Repudiation

Because the private key is held exclusively by the signer (often on hardware USB tokens), the signer cannot reasonably deny that they originated and signed the document.

🔒

Data Integrity

The cryptographic hashing mechanism functions as an indestructible digital wax seal. Any form of tampering is immediately, mathematically obvious to any viewing software.

✍️

Granular Document Restrictions (MDP)

Signers can inject a DocMDP (Modification Detection and Prevention) parameter. They can lock the document completely, or specify "This signature remains valid only if future changes are strictly limited to filling in empty form fields."

🌍

Global Legal Standing

Compliant signatures (eIDAS Qualified Signatures in the EU, ESIGN Act in the US) carry the exact same, or higher, legal weight as wet ink on paper in federal and international courts.

📜

Long Term Validation (LTV)

By embedding cryptographically secure timestamps and revocation tracking data inside the file, the authenticity of the signature outlives the lifespan of the issuing certificate authorities.

👤

Invisible Certification

High-volume document generators (like government records offices) can invisibly "Certify" millions of records as authentic without cluttering the visual layout of the pages.

The Cryptographic Dictionary

PDF SIGNATURE DICTIONARY (/V key)
% This dictionary defines the cryptographic payload
50 0 obj
<<
  /Type /Sig
  /Filter /Adobe.PPKLite
  /SubFilter /ETSI.CAdES.detached % Indicates PAdES compliance
  
  % The name of the person/entity holding the certificate
  /Name (John Doe, Authorized Signatory)
  
  % Timestamp applied by the signer's computer (Not cryptographically secure alone)
  /M (D:20261024083000Z) 

  % The ByteRange: Consists of 4 integers.
  % Hash from byte 0 to 150000.
  % Skip the space where the signature goes.
  % Resume hashing from byte 170000 for a length of 5000 bytes.
  /ByteRange [ 0 150000 170000 5000 ]
  
  % The massive PKCS#7 encoded binary blob (Truncated here)
  % This contains the encrypted hash, the x509 cert, and often the TSA response
  /Contents <30820b...massive hex blob...0f34>
>>
endobj

Common Mistakes in Workflows

  • Confusing an image stamp with a digital signature. Drawing your name on an iPad using a PDF reader is a "stamp annotation". It offers zero legal non-repudiation or tamper-proofing.
  • Using "Save As" after signing. If someone sends you a signed PDF and you hit "Print to PDF" or "Save As" ignoring warnings, the software will rebuild the file from scratch to optimize it. This alters the byte structure completely, destroying the original cryptographic signature.
  • Failing to configure LTV. Signing critical legal documents without a secure Timestamp Authority (TSA) or without embedding the revocation chain. When the cert expires, the document will flag as "Unknown Validity", causing massive legal headaches decades later.
  • Ignoring root trust lists. If you self-sign a document using a certificate you generated on your own computer, anyone else opening it will see a scary red "Invalid/Unknown" warning because your computer is not on their software's Global Approved Trust List (AATL). Use verified providers like GlobalSign or Entrust.
  • Signing before flattening. If you sign a document that contains active macros, dynamic XFA forms, or unflattened 3D objects, the visual appearance of the document might change depending on the viewer, even if the bytes haven't changed. This breaks the principle of "What You See Is What You Sign" (WYSIWYS). Always flatten visuals before signing.

Frequently Asked Questions

  • Electronic signatures are visual marks indicating intent (like an image). Digital signatures are cryptographic mathematical data blocks embedded in the file proving identity and preventing undetectable tampering.

  • The ByteRange specifies every single 1 and 0 in the file (excluding the hexadecimal space where the signature injects itself). The hash of these bytes is encrypted. If any byte in that range changes, the hash changes, and the verification fails instantly.

  • PDF Advanced Electronic Signatures (PAdES) is an ETSI standard that dictates how cryptography should be securely implemented inside PDFs to comply with European eIDAS regulations and ensure long-term verifiability.

  • Yes, through "Incremental Updates". When Person 2 signs, the PDF does not rewrite Person 1's locked byte range. It simply appends the new signature to the very end of the file, allowing viewers to verify both signatures chronologically.

  • If the PDF includes a cryptographically secure Timestamp (LTV), the viewer will see that you signed the document *while* the certificate was still valid, and the document stays globally valid. Without a timestamp, an expired cert makes the visual signature status turn yellow or red.

  • Only if the Certifying signature included an MDP (Modification Detection and Prevention) parameter that specifically allowed limited changes (like filling in blank form fields). Any unauthorized edit will permanently void the certification seal.

Add Secure E-Signatures to Your PDFs

PDFlyst provides secure tools to add cryptographic digital signatures and request legally binding signatures from clients.

Sign PDF Securely