Skip to content
2xKit

How Digital Signatures Verify a Document Hasn't Changed

A practical explanation of what happens when you sign a PDF and why even a single-character edit afterward breaks the signature.

Quick answer

A digital signature works by generating a unique fingerprint (a hash) of the document's exact content at the moment of signing, then encrypting that fingerprint with the signer's private key; anyone verifying the signature recalculates the fingerprint from the document as it currently exists and checks it against the original, so if even one character changed after signing, the two fingerprints won't match and the signature shows as invalid.

Digital signatures can feel like a black box, you click "sign," something happens, and afterward viewers show a green checkmark or a broken-signature warning. Understanding the mechanism, without needing to understand the underlying cryptographic math, makes it clear why signatures are so effective at catching tampering that even careful visual inspection would miss.

The fingerprint concept, in plain terms

When a document is signed with a tool like Sign PDF, the software runs the entire document's content through a hashing algorithm, a mathematical function that produces a fixed-length string of characters unique to that exact content. Change literally anything in the document, a single word, a comma, an invisible whitespace character, and the resulting hash comes out completely different, not slightly different, entirely different, with no relationship between the old and new hash values that would let anyone predict one from the other.

That hash is then encrypted using the signer's private key, a secret only they possess, and attached to the document along with their public certificate, which anyone can use to decrypt and verify the hash, but which nobody but the signer could have created in the first place. This combination is what proves both who signed it (only the holder of that private key could have produced a valid signature) and that the content hasn't changed since (because the hash only matches the exact content it was calculated from).

What verification actually checks

When someone opens a signed PDF, their viewer independently recalculates the document's current hash and compares it against the hash embedded in the signature. If they match, the content is exactly what it was at signing time, which is why the checkmark appears. If they don't match, meaning the document changed after signing, even in a way invisible to the eye, the viewer flags the signature as invalid, since it genuinely can no longer vouch for the document's integrity.

This is fundamentally different from a scanned or drawn signature image, which carries no fingerprint of the surrounding content at all, it's just a picture that stays visually the same no matter what else in the document changes afterward.

Why this matters practically

For any document where it matters that a recipient can trust nothing was altered after approval, a contract, an official filing, a signed agreement, this fingerprint mechanism is what makes that trust verifiable rather than assumed. It's also why editing a signed PDF, even to fix an unrelated typo elsewhere on the page, breaks the existing signature and requires re-signing, the hash no longer matches once anything changes, by design.

Frequently asked questions