How Digital Signatures and Certificates Work

Copy a digital signature onto a different document and it fails, because it was computed from the first one: a 32-byte fingerprint of the page, sealed by a private key that never leaves its chip. The padlock in your browser is three of those signatures in a row, and the last key in the chain was already on your phone when it left the factory.

How Digital Signatures and Certificates Work — interactive 3D animation

Step 01 of 08

1 · A signature you cannot move

Both of these payment orders come from the same company. The one on the left is signed: the 64 glowing tiles under it are its signature, one tile per byte, and the lamp says it checks out. Now copy that signature onto the order on the right, tile for tile. The check fails. A digital signature is not a picture of a name that looks the same on every page. It is computed from the page it signs, so it only fits that page.

Step 02 of 08

2 · First, a fingerprint

Signing never starts with the document itself. It starts with SHA-256, a hash function that crushes any input, a one-line note or a 5 GB update, down to exactly 32 bytes. The same document always gives the same 32 bytes. Change one character and every byte changes: watch 1,200.00 become 1,201.00 and the whole plate re-roll. Nobody has ever found two different documents with the same SHA-256 fingerprint, which is what lets 32 bytes stand in for the whole page.

Step 03 of 08

3 · Sealed by a key that never leaves

The private key is just a number: 32 random bytes, here in gold on the chip. Whoever holds it can sign as you, so serious keys live in hardware that will use them but never hand them over. Certificate authorities are required to keep theirs in a hardware security module like this one. The fingerprint goes in, the chip combines it with the key, and a 64-byte signature comes out and docks under the document. Above the box floats the public key, 64 bytes worked out from the private one: easy in that direction, and as far as anyone knows impossible in reverse.

Step 04 of 08

4 · Anyone can check it

Checking needs no secrets. Take the public key, the signature, and a fresh fingerprint of the document as it arrived, and run them through the check: the answer is simply true or false. Nothing is unlocked or decrypted. The maths only balances if this signature was made from this exact fingerprint by the matching private key. Now change 1,200 to 9,200 after signing. The fresh fingerprint is a different 32 bytes, and the same signature fails.

Step 05 of 08

5 · Whose key is it?

The check proves a signature was made by whoever holds the matching private key. It cannot tell you who that is. That is what a certificate is for: a small document that says this public key belongs to shop.example, between these two dates, signed by someone else — a certificate authority, once the site has proved it controls the domain. Since March 2026 a web certificate can last at most 200 days, so a stolen key does not stay useful for long.

Step 06 of 08

6 · A chain of signatures

The site’s certificate was signed by Example Issuing CA 1, an intermediate. To check that signature you need the intermediate’s public key, and that comes on a certificate of its own, signed by a root. Each pulse is one check: a signature tested against the key on the card above it. The root’s certificate is signed by the root itself. On its own that proves nothing, since anyone can sign their own card.

Step 07 of 08

7 · The last key was already on your phone

The root is not checked. It is recognised. Your phone and your browser ship with a short list of root certificates called a trust store. Firefox’s holds 169, and 118 of them are trusted to vouch for websites. If the chain ends at one of those, every link is trusted. If it does not, you get a full-page warning instead of the site. That is why root keys are guarded harder than anything else on the web: they are kept offline, in hardware security modules in vaults, and switched on only a few times a year to sign new intermediates.

Step 08 of 08

8 · Every padlock, every time

Open a site and this whole walk happens before the page appears. The server sends its certificate and the intermediate, then signs the handshake with its private key to prove the certificate really is its own. Your phone checks each signature up the chain to a root it already had, and the padlock closes. All of it takes a few milliseconds: three signatures, and one key you already had.