Skip to content

Glossary

What is a document hash?

A document hash is a short fingerprint of a file that changes if one byte changes. Learn how signatures over a hash make a signed PDF tamper-evident.

A document hash is a short, fixed-length fingerprint of a file, computed with a hash function such as SHA-256. The same file always gives the same hash. Change a single byte, a comma in a clause or a pixel in a signature image, and the hash comes out completely different. You can’t work backwards from a hash to the file, and you can’t feasibly craft a second file with the same hash.

That makes a hash a cheap way to answer one question: is this exactly the file I had before?

From a hash to tamper evidence

A hash on its own proves nothing about who made it: anyone can compute one. Digital signatures add that part:

  1. The signer’s software computes the hash of the document.
  2. It signs the hash with a private key. Only the holder of that key can produce the signature.
  3. Anyone can later recompute the hash of the file they received and check the signature against it with the matching public key, which comes in a certificate.

If the file changed after signing, the recomputed hash no longer matches what was signed, and the check fails. The signature doesn’t stop anyone from editing the file. It makes every edit visible. That’s what tamper-evident means.

How SignatureAPI uses hashes

  • The deliverable seal. When an envelope completes, SignatureAPI seals the deliverable PDF with its own signature and a trusted timestamp. Open the PDF in a reader such as Adobe Acrobat and it reports whether the file is unchanged since sealing. See Verify a deliverable.
  • Qualified signatures. For a qualified signer, SignatureAPI computes a SHA-256 digest of the exact document the signer reviewed, and the signer’s approval is bound to it. The signing worker sees only the digest, never the document. See How qualified signatures work.

What a PDF signature covers

A PDF signature can’t cover the space where the signature itself is stored, so it covers everything else: the signed byte range. A later signature or seal is added as a new revision at the end of the file, so the earlier signatures stay valid and each one covers the document as it stood at its turn. That’s how a PDF with several signatures still verifies.