Verify a Pantheon-signed document offline
Check a signed PDF's seal, timestamp and embedded receipt with standard tools, without Pantheon.
A document signed through Pantheon is its own proof. The signed PDF carries:
- A seal. A PAdES signature (
ETSI.CAdES.detached) over the whole file. When the timestamp authority answers, the seal also carries a trusted RFC 3161 timestamp, so the signing time doesn't rest on our clock (PAdES B-T). If it doesn't answer, the document is still sealed, without the timestamp (PAdES B-B). - A receipt. A file named
receipt.jsoninside the PDF. It records who signed, when, from where, and what. It is inside the sealed bytes, so the seal covers it too.
You need poppler (pdfsig, pdfdetach), openssl and shasum. On macOS: brew install poppler. Acrobat Reader also shows the seal.
1. Check the seal and the timestamp
pdfsig signed.pdfLook for:
Signature Type: ETSI.CAdES.detachedSignature Validation: Signature is Valid.This means not one byte of the document or its receipt has changed since it was sealed.Total document signed, which means the seal covers the whole file.
pdfsig also prints a Certificate Validation: line, such as Certificate issuer is unknown. That is expected: the seal certificate isn't issued by a certificate authority your computer trusts. Step 4 checks it against the one we publish instead. A first line NSS_Init failed: security library: bad database. only means poppler found no certificate store on your computer; the rest of the output still applies.
Signing Time is the time the seal states, shown in your computer's time zone. pdfsig doesn't show the trusted timestamp. To read it, save the seal and print its timestamp token:
pdfsig -dump signed.pdf
openssl asn1parse -inform DER -in signed.pdf.sig0 -strparse "$(openssl asn1parse -inform DER -in signed.pdf.sig0 | grep -A2 ':id-smime-aa-timeStampToken' | tail -1 | cut -d: -f1 | tr -d ' ')" -noout -out timestamp.der
openssl ts -reply -token_in -in timestamp.der -textpdfsig -dump writes each seal to a file named after the PDF (signed.pdf.sig0 for the first). Time stamp: is the time the timestamp authority saw the document. If the second command fails, the seal has no timestamp: the document is PAdES B-B.
In Acrobat, open the Signatures panel. "Document has not been modified since this signature was applied" is the same check.
2. Pull out the receipt
pdfdetach -list signed.pdf
pdfdetach -save 1 -o receipt.json signed.pdfThe first command prints 1 embedded files and 1: receipt.json. The second saves it as receipt.json in the current folder.
The receipt is canonical JSON (RFC 8785): keys sorted, no whitespace, one exact byte string for its content. Its fields:
| Field | Meaning |
|---|---|
schema | pantheon.esign.receipt.v1 |
issued_by | Pantheon |
document_id | The document ID printed on every page and on the signing certificate |
reference | The sender's reference, or null |
copy | signed (one party's copy) or executed (signed by both parties) |
template | The template's name and version, and the sha256 of the original PDF before anything was stamped on it |
disclosure | The version and sha256 of the electronic-signature disclosure the signers agreed to |
signers[] | For each signer: role, party, the name and email they gave, ip, user_agent, viewed_at, signed_at, method (typed or drawn) and the signature_sha256 of their signature image |
subject_files[] | When the agreement covers files: each file's name, mime, bytes and sha256. Absent otherwise |
terms | When the sender set terms: scope, expires_at, note. Absent otherwise |
seal | cert_sha256 (the SHA-256 of the certificate that seals the document), requested_level and, when a trusted timestamp was asked for, timestamp_authority |
The signer's name and email are what they typed. Holding the signing link authorized the signing; we don't verify identity.
seal.requested_level is the level asked of the seal, not the level it reached: the receipt is written just before sealing. If the timestamp authority didn't answer, the seal is B-B even when the receipt says B-T. Step 1's timestamp check shows what the seal actually reached.
The receipt can't contain the hash of the PDF it sits in. Pantheon records that hash separately.
3. Check the hashes
The receipt's SHA-256 is the hash of its exact bytes:
shasum -a 256 receipt.jsonCompare it with the receipt_sha256 Pantheon recorded for the signing, or with a copy of the receipt you saved earlier: the same bytes give the same hash.
To check that the receipt is canonical, re-canonicalize it with any RFC 8785 tool and compare. This receipt uses only ASCII keys and whole numbers, so Python's json module produces the same bytes:
python3 -c 'import json,sys; d=json.load(open("receipt.json")); sys.stdout.write(json.dumps(d, sort_keys=True, separators=(",", ":"), ensure_ascii=False))' | shasum -a 256The two hashes must match.
Then check each file the agreement covers against subject_files[].sha256:
shasum -a 256 "Reel 7.mov"4. Compare the seal certificate
Extract the certificate that sealed the PDF and hash it:
pdfsig -dump signed.pdf
openssl cms -verify -inform DER -in signed.pdf.sig0 -content /dev/null -noverify -nosigs -signer seal.pem -out /dev/null
openssl x509 -in seal.pem -outform DER | shasum -a 256The second command prints CMS Verification successful and saves only the certificate that sealed, not any certificate chain the seal carries. It checks nothing itself: step 1 already checked the seal. The hash must equal the receipt's seal.cert_sha256.
Then compare it with the certificate we publish:
curl -fsSL https://pantheon.run/.well-known/pantheon-esign-seal.pem | openssl x509 -outform DER | shasum -a 256The published certificate will be available once the production seal certificate is set. Until then that address answers nothing, and step 4 can only check that the seal and the receipt name the same certificate.
What each check proves
- The seal is valid: nothing in the PDF or its receipt changed after sealing.
- The timestamp is present: a third party saw this exact document at the time it states.
- The receipt's hash matches: the receipt is the one Pantheon recorded for this signing.
- The subject files' hashes match: the agreement covers these exact files.
- The certificate matches the published one: Pantheon sealed the document.
