How to Merge PDFs Privately in Your Browser Without Uploading to Cloud Servers
An inside look at how client-side PDF document manipulation copies indirect object streams and page trees without sending a single byte across the internet.
An in-depth technical analysis of PDF signature architecture, PKCS#7 / CMS containers, timestamping authorities, and electronic vs digital signature distinctions.
PDF Tools technical reference asset
In corporate legal contracts, government filings, and financial transactions, portable document format (PDF) files serve as the universal standard for binding agreements. However, simply placing a PNG image of a handwritten signature onto a document offers zero cryptographic protection against post-signature tampering.
True digital signatures rely on asymmetric public-key cryptography (PKI) to mathematically bind a signer’s identity to the exact byte content of the document. Any modification to a digitally signed PDF—even altering a single punctuation mark—instantly invalidates the cryptographic digest.
The terms "electronic signature" (e-signature) and "digital signature" are frequently conflated, but they represent fundamentally different technical paradigms.
An electronic signature is any electronic symbol or process attached to a contract to indicate intent to sign (such as a drawn name, typed initials, or clicking an "I Agree" button). While legally recognized under acts like the US ESIGN Act and EU eIDAS, standard e-signatures carry weak forensic proof.
A digital signature is a cryptographically secured implementation of an electronic signature. It computes a one-way cryptographic hash of the entire document and encrypts that hash using the signer’s private key. The recipient validates the signature using the corresponding public key certificate issued by a trusted Certificate Authority (CA).
Digital signatures depend on Public Key Infrastructure (PKI). A signer holds a cryptographic keypair: a Private Key kept strictly confidential (often inside a hardware security module or secure enclave) and a Public Key embedded within an X.509 digital certificate.
When a document is verified, the PDF viewer inspects the certificate hierarchy back to a trusted Root Certificate Authority (such as DigiCert, GlobalSign, or the Adobe Approved Trust List / AATL). If any intermediate certificate in the chain has expired, been revoked, or is untrusted, the viewer displays a warning.
A common puzzle in PDF architecture is: how can a PDF contain its own cryptographic signature without altering the document bytes and invalidating the hash?
The PDF standard solves this through the `/ByteRange` dictionary entry. The `/ByteRange` is an array of four integers defining two distinct byte sequences: `[offset_1, length_1, offset_2, length_2]`.
The first range starts at byte 0 and ends right before the `/Contents` hex string. The second range begins immediately after the `/Contents` hex string and extends to the end of the file. The cryptographic hash (e.g. SHA-256) is computed exclusively over these two contiguous byte blocks, completely bypassing the signature container itself.
% PDF Signature Dictionary Structure
/ByteRange [0 84020 86068 54200]
/Contents <3082046f06092a864886f70d010702a0820460...>
/Type /Sig
/Filter /Adobe.PPKLite
/SubFilter /adbe.pkcs7.detachedThe binary signature payload stored inside `/Contents` follows standard cryptographic encapsulation protocols such as PKCS#7 (Cryptographic Message Syntax / CMS) or PAdES (PDF Advanced Electronic Signatures, standard under eIDAS).
The envelope encapsulates the signer’s X.509 certificate, the encrypted document digest, the signature algorithm (e.g., RSA-2048 with SHA-256 or ECDSA with P-256), and optional authenticated attributes like signing time and signing reason.
Digital certificates inevitably expire after 1 to 3 years. To guarantee that a signed contract remains legally valid 10 or 20 years into the future, PDF specifications include Long-Term Validation (LTV) through RFC 3161 Timestamping Authorities (TSA).
A TSA provides an independent, cryptographically signed token proving that the signature existed and was valid at an exact historical moment before certificate expiration or revocation.
Modern web browsers and WebAssembly runtimes can parse PDF object streams, reconstruct the `/ByteRange` byte buffers, and execute cryptographic validation locally in browser memory using Web Crypto APIs.
This client-side verification ensures that confidential financial statements, medical records, and legal briefs can be authenticated without exposing confidential contents to third-party verification servers.
Cryptographic digital signatures provide the backbone of modern paperless business operations. Understanding the underlying PKI math and byte structure ensures your organization signs and verifies documents securely.
Use Softnag’s suite of client-side PDF tools to sign, protect, and process documents 100% locally in your web browser.
An inside look at how client-side PDF document manipulation copies indirect object streams and page trees without sending a single byte across the internet.
Master PDF page extraction syntax (e.g. 1-5, 8, 12-15), understand stream slicing, and separate chapters or contracts securely.
Understand why scanned documents, high-DPI full-bleed images, and duplicate font subsets balloon PDF size, and how to reduce file weight without quality loss.