A Level · Topic 17.1
A-Level Computer Science 9618 / Topic 17 / A2

Prove who sent it.

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.

The key idea

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.

Signing (sender) and verifying (receiver) messagedigestdigitalsignature hashsender’sprivate key digitalsignature digest A message digest B same? authentic sender’spublic keyhash
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.

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.

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.
  1. Sign: encrypt the digest with the sender’s private key: 827 MOD 55 = 2. The signature is 2.
  2. The receiver decrypts the signature with the sender’s public key: 23 MOD 55 = 8 (digest A).
  3. The receiver hashes the message it received and gets 8 (digest B).
  4. 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.
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.

TechniqueWhat it provides
Encrypt with the recipient’s public keyconfidentiality: 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 CAtrust that the public key really belongs to the named owner
SSL/TLSuses certificates and key pairs to set up an encrypted, authenticated session
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.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
Acquiring a digital certificate from a CA, what it contains, and producing and verifying digital signatures with hashing and key pairs.