Tamper-evident by design

Certificate Validation Process

Tamper-Evident and Cryptographically Verifiable Course Certification

Every diCERT certificate can be checked as authentic and unmodified — at any time, with no login and no blockchain. Trust comes from Ed25519 digital signatures over content hashes, an issuer-signed status for every certificate, and an audit log anchored outside the database.

Verifiable certificate with digital seal, QR code and hash fingerprint

What the guarantees rest on

  • The issuer’s signing private key is not exfiltrated.
  • You reach the genuine verification page over an authenticated TLS (https) connection.
  • SHA-256 and Ed25519 are secure — in particular, no quantum computer able to break them exists during the certificate’s validity period.
  • The issuer is honest at issuance time: a signature proves who issued a certificate and that it was not changed, not that what the issuer chose to sign was true.

A database insider who edits certificate records, stored documents, status rows or audit entries is detected. The issuer’s published key table is the trust anchor: an insider who can write that table is the one case signatures cannot catch, which is why the keys are published for anyone to compare over time.

What the system guarantees

Seven security goals, each backed by a concrete mechanism.

Authenticity

A certificate verifies as valid only if the issuer signed it — Ed25519 over the record digest, checked with a key from the issuer’s published key table, never one the certificate brings.

Integrity

Any change to a signed record or its document is detected — the record hash is recomputed and the stored PDF re-hashed on every verification.

Status correctness

A revoked, expired or superseded certificate is never shown as valid — status comes from issuer-signed status statements and a signed status list; expiry is computed from the signed expiry date.

Authorization

Only permitted people and systems can change state — explicit per-route roles, server-side sessions that can be revoked at once, scoped API keys and short-lived embed tokens.

Accountability

Privileged actions leave an audit trail that cannot be rewritten undetected — a hash-chained log whose signed head is stored outside the database.

Verification availability

Public verification stays usable under request abuse — requests are rate-limited per client, and the proxy overwrites forwarded headers so the limit cannot be bypassed.

Privacy

Public verification discloses only what a relying party needs — the record carries a salted commitment to the e-mail address, never the address itself.

One canonical record

Issuance and verification build the signed record through the same single function — if the two ever serialized it differently, valid certificates would fail or a field could change unnoticed.

  • Canonical JSON — sorted keys, no incidental whitespace — byte-for-byte determinism on any platform.
  • pdfHash binds the document to the record — neither can be changed independently.
  • The e-mail address is replaced by a salted commitment; a party who knows the address and the recipient’s confirmation code can still check it.
  • The record format is versioned, so certificates signed under an earlier format keep verifying byte for byte.
{
  "publicId":        "AbC123xYz9-Def456GhIJ-kl",
  "recipientName":   "Somchai Jaidee",
  "emailCommitment": "sha256(salt + e-mail) — the address itself is never published",
  "title":           "Intro to Data Science — Completion",
  "issueDate":       "2026-08-19T00:00:00.000Z",
  "expiryDate":      null,
  "templateId":      "tmpl01abcdefgh",
  "departmentId":    "dept01abcdefgh",
  "certCode":        "20260010001040012",
  "versionNo":       1,
  "pdfHash":         "sha256-of-the-issued-pdf-bytes",
  "recordFormat":    2
}

The signing pipeline

From an approved certificate to an immutable signed version. The final step is a single database transaction.

  1. 01

    Render the certificate

    The same renderer as the editor preview — what you designed is exactly what gets signed.

  2. 02

    HTML → PDF

    Rendered to PDF in a separate process; the exact bytes that get stored are the bytes that get hashed.

  3. 03

    pdfHash = SHA-256(PDF)

    The document itself is hashed into the signed record, binding record and document together.

  4. 04

    digest = SHA-256(canonical record)

    The certificate fields are canonicalized (sorted keys, no whitespace) and hashed.

  5. 05

    signature = Ed25519.Sign(digest)

    The digest is signed with the issuer private key — a 64-byte signature, no parameters to get wrong.

  6. 06

    Upload the PDF

    Written privately to the object store and served publicly read-only, so every download can be re-hashed.

  7. 07

    One transaction: version + status

    A write-once version row (record hash, document hash, signature, key id), the certificate moves to ACTIVE, and a signed status statement is appended — all together or not at all.

Signing pipeline: document hashed, signed by the issuer, sealed

Verification — public, no login

Open a certificate’s public link or scan its QR. The verifier never needs the private key; each check that fails ends in INVALID rather than an error.

  1. 01

    Load the certificate and its current version — or return NOT_FOUND.

  2. 02

    Resolve the public key from the issuer’s published key table (key id + version). Only active or retired keys count; a certificate signed with a revoked key is INVALID.

  3. 03

    Rebuild the canonical record from the stored data and recompute the SHA-256 digest; it must equal the stored record hash.

  4. 04

    Ed25519-verify the stored signature over the digest.

  5. 05

    Re-hash the stored PDF and compare it with the signed pdfHash: a mismatch is INVALID; a missing document is reported as unavailable, not as a forgery.

  6. 06

    Take the credential status from issuer-signed sources — the latest signed status statement and the latest signed status list, whichever is more restrictive — and flag any disagreement with the database.

  7. 07

    Compare the verification time with the signed expiry date. VALID only if every check passes, the status is ACTIVE and the certificate has not expired; otherwise SUSPENDED, REVOKED, EXPIRED, SUPERSEDED or INVALID.

Smartphone scanning a certificate QR code with a verification checkmark

The server re-hashes the stored PDF on every verification. Anyone can additionally download the PDF and check SHA-256(pdf) == pdfHash themselves.

Canonical record

The exact record that was hashed and signed, shown on the verify page — with the e-mail commitment, never the address.

SHA-256(record)

Recomputed hash shown next to the stored hash — match or mismatch, at a glance.

Ed25519 signature

Verified against the issuer public key; the key id + version that verified it are shown.

Stored document re-hash

SHA-256 of the stored PDF compared with the signed pdfHash — a swapped document fails, a missing one is reported as unavailable.

Certificate lifecycle

Two layers: internal workflow states and public credential statuses.

Workflow (internal to the issuer, never public)

  • DRAFT — being prepared
  • PENDING_APPROVAL — waiting for approval

Credential status (public)

  • ACTIVE — reachable only through the signed issuance transaction
  • SUSPENDED — a reversible hold
  • REVOKED — permanent, with a public reason code
  • SUPERSEDED — replaced by a corrected version

EXPIRED is never stored: it is computed at verification time from the signed expiry date.

Every status change is a signed, hash-chained status statement written in the same transaction as the change. After each change the issuer also signs a status list and writes it once to the object store, a trust domain separate from the database; the list is republished at least every 24 h.

Tamper scenarios — and what happens

What verification reports when an issued certificate, its document or its status is attacked.

AttackOutcome
Edit the recipient name, title, or dates in the databaseRecomputed hash ≠ stored recordHash → INVALID
Replace the stored PDF with a different oneThe server’s re-hash no longer matches the signed pdfHash → INVALID
Delete the stored PDFReported as document unavailable; the status is unchanged (availability, not forgery)
Copy a valid signature onto a modified recordThe signature was over the old digest → verification fails → INVALID
Edit a certificate’s status in the database (e.g. un-revoke it)Status comes from the signed statements and list, not the row → the signed status is shown and the discrepancy is flagged
Roll the published status list back to an older oneThe most restrictive of the signed statement and the list is shown → a revocation cannot be undone this way
Replay an old version after a correctionThe old version is SUPERSEDED; the current version decides → SUPERSEDED, not VALID
Present a revoked certificateRecord and signature still verify, but REVOKED and its reason are shown
Forge a record and sign it with your own key (outsider)The key is resolved from the issuer’s table, never from the certificate → INVALID
Present a certificate signed with a key the issuer has revokedThe key is outside the published set of active or retired keys → INVALID
Database insider adds or overwrites a key in the issuer’s key tableForged records signed with that key verify — an accepted limit; the keys are published so a new key can be noticed
Delete a certificate outrightNOT_FOUND — absence of a record is itself the answer
Tampered certificate detected by a scanning lens

Corrected, never edited

Certificates are versioned, not mutable:

  • A correction issues version n+1 with its own hash, signature, and PDF.
  • The previous version becomes SUPERSEDED; the current-version pointer moves.
  • Every version row is write-once — no code path updates it.

What is not claimed

Out of scope, and the limits we accept:

  • Full issuer compromise — if the database, object store and signing key are all taken together, the attacker is the issuer.
  • Compromise of the hosting provider, volumetric network denial of service, social engineering of staff, and attacks on the external sign-in provider.
  • A database insider who can write the issuer’s key table can make forged records verify — the key table is the trust anchor; keys are published so a new key can be noticed.
  • Audit writes are fail-open: if an audit append fails, the action still succeeds and is logged on the server; the signed status statements still record what changed and when, but not who.
  • Privacy, not secrecy: the public record shows the recipient’s name and the title; the e-mail is only a salted commitment, and older records that contain the address are withheld.

See it on a real certificate

The verify page shows the canonical record, the recomputed hash, the signature check and the stored-document re-hash — the whole proof, in the open.

Verify a certificate