A public key is only useful if you can trust whose key it is. A digital certificate binds a public key to its owner, vouched for by a certificate authority. With that trusted key, a receiver can check a digital signature and know who sent a message and that it has not been changed.
A digital certificate is an electronic document, issued by a trusted certificate authority (CA), that links an owner’s identity to their public key. The CA signs it with the CA’s private key. To make a digital signature, the sender hashes the message to produce a message digest and encrypts the digest with the sender’s private key. The receiver decrypts the signature with the sender’s public key (taken from the certificate), hashes the received message with the same algorithm and compares the two digests. A match proves the message is authentic and unaltered.
Fig. 1: the sender signs a digest with their private key; the receiver recomputes the digest and compares
Section 01
Getting a certificate.
Anyone can generate a key pair and claim it belongs to a bank. A certificate authority stops this by checking the identity of the applicant before it vouches for the public key.
Step 1: the organisation (or individual) generates its own public and private key pair. The private key stays with the applicant.
Step 2: it sends a request to a CA containing its public key and identifying information, such as its name, domain name and address.
Step 3: the CA verifies the applicant’s identity (for example that it controls the domain, or checks company registration documents).
Step 4: the CA creates the certificate and signs it with the CA’s own private key, then issues it (usually for a fee).
Trust: browsers and operating systems come with the public keys of trusted CAs built in, so they can check a CA’s signature on any certificate.
A digital certificate contains
the owner’s name / organisation and domain name
the owner’s public key
a serial number
the validity period (valid from and expiry dates)
the name of the issuing CA
the CA’s digital signature (and the algorithms used)
Examiner trap
A certificate never contains the owner’s private key. It carries the public key; the private key must stay secret with its owner.
Section 02
Making a signature.
Encrypting a whole document with a private key would be slow. Instead the sender signs a short, fixed-length digest of it, produced by a hashing algorithm. Change even one character of the message and the digest changes completely.
Hashing algorithm: a one-way function that turns a message of any length into a fixed-length message digest. The original message cannot be worked back out of the digest.
Sender: hashes the message to get the digest, then encrypts the digest with the sender’s private key. The encrypted digest is the digital signature.
Sent: the message, the digital signature and the sender’s digital certificate.
Receiver: checks the certificate with the CA’s public key, takes the sender’s public key from it and decrypts the signature to recover digest A.
Receiver: hashes the received message with the same algorithm to get digest B. If A = B, the message came from the private key holder and was not changed.
Worked example Signing with the toy key pair
A sender’s key pair uses n = 55, public key e = 3, private key d = 27. Suppose the digest of a message is 8. Produce the signature and show how the receiver verifies it.
Sign: encrypt the digest with the sender’s private key: 827 MOD 55 = 2. The signature is 2.
The receiver decrypts the signature with the sender’s public key: 23 MOD 55 = 8 (digest A).
The receiver hashes the message it received and gets 8 (digest B).
Digest A = digest B, so the message is authentic and unaltered. If the message had been changed, digest B would differ.
Answer: Signature 2; it verifies because 23 MOD 55 = 8 matches the recomputed digest
Your turn
A receiver decrypts a digital signature to get one digest, but hashing the message gives a different digest. State two possible reasons.
The message was altered in transit, or the signature was not made with the private key matching the public key used (the message is not from the claimed sender).
Examiner trap
The receiver does not "decrypt the message to check the hash". They decrypt the signature with the sender’s public key and re-hash the message, then compare the two digests.
Stage 1 · Learn
Check what the sim just showed you
Four quick checks. Each correct answer earns XP and records this skill on your profile.
Quick check+10 XP
Who issues a digital certificate?
Quick check+10 XP
Which item is NOT included in a digital certificate?
Quick check+10 XP
How does a sender produce a digital signature?
Quick check+10 XP
What is a message digest?
Section 03
What signatures prove.
A digital signature on its own does not hide the message; it is often sent as plaintext. Combine the ideas from this topic to say exactly what each technique gives you.
Technique
What it provides
Encrypt with the recipient’s public key
confidentiality: only the recipient can read it
Digital signature (digest encrypted with sender’s private key)
authentication of the sender, integrity of the message, non-repudiation (the sender cannot deny sending it)
Digital certificate from a CA
trust that the public key really belongs to the named owner
SSL/TLS
uses certificates and key pairs to set up an encrypted, authenticated session
Why the certificate is needed: without it, an attacker could send their own public key claiming to be the sender, sign a forged message with their own private key, and the check would still "pass".
Uses: signed emails, software and driver updates, electronic contracts and legal documents, SSL/TLS server certificates.
Examiner trap
A digital signature is not a scanned image of a handwritten signature. It is an encrypted message digest that depends on both the message and the private key.
Stage 2 · Exam
Exam-style questions
Unlocks once the four checks above are done. Worth more XP, written to A Level Paper 3 and Paper 4 standard.
Finish the four checks above to unlock the exam questions
Exam style+20 XP
A receiver verifies a digital signature. Which pair of digests is compared?
Exam style+20 XP
Why does the receiver need the sender’s digital certificate when checking a signature?
Exam style+20 XP
What does the CA do before issuing a digital certificate?
Exam style+20 XP
A digitally signed contract is sent as plaintext. Which property does the signature NOT provide?
Skill unlocked
Digital signatures and certificates, mastered.
This skill is now recorded on your profile. Keep the chain going.