Encryption turns readable plaintext into ciphertext that is useless to anyone without the key. At A Level you need to explain exactly which key is used at each end: one shared key, or a public and private key pair used in two different directions. Then meet quantum cryptography, which lets two parties detect an eavesdropper.
Encryption uses an algorithm and a key to turn plaintext into ciphertext; decryption reverses it. In symmetric cryptography the same secret key encrypts and decrypts, so the key must somehow be shared safely. In asymmetric cryptography each owner has a mathematically linked public key (given to anyone) and private key (kept secret): what one key encrypts, only the other can decrypt. To send a private message to someone, encrypt with their public key. To send a verified message to the public, encrypt with your own private key. Quantum cryptography uses photons to distribute keys so that any eavesdropping is detected.
Fig. 1: the same key pair used two ways: the recipient's public key for privacy, the sender's private key for proof of origin
Section 01
One shared key.
In the lab, type a message and pick a key. The same shift scrambles it and unscrambles it: that is symmetric encryption. Then switch to Asymmetric to see a public and private key pair at work.
Plaintext: the original, readable data. Ciphertext: the encrypted, unreadable output of the encryption algorithm.
Symmetric key cryptography: sender and receiver use the same secret key, e.g. AES with a 128-bit or 256-bit key.
Benefit: symmetric algorithms are fast, so they suit large amounts of data.
Drawback (key distribution): the key must be sent to the receiver first. If it is intercepted, every message can be read, and a different key is needed for every pair of users.
Encryption does not stop interception: it makes intercepted data meaningless to anyone without the key.
Examiner trap
"Encryption stops hackers getting the data" is wrong. The data can still be intercepted; encryption means it cannot be understood without the key.
Section 02
A key pair, two directions.
Asymmetric cryptography solves the key distribution problem. Every user or organisation generates a key pair: the public key is published, the private key never leaves its owner. Data encrypted with one key of the pair can only be decrypted with the other.
Goal
Sender encrypts with
Receiver decrypts with
Why it works
Send a private message from the public to an individual or organisation
the recipient’s public key
the recipient’s private key
only the recipient holds the private key, so only they can read it
Send a verified message from an organisation to the public
the sender’s own private key
the sender’s public key
if the public key decrypts it, only the private key holder can have sent it
Drawback: asymmetric algorithms such as RSA are much slower than symmetric ones, so in practice they are used to exchange a symmetric key (as SSL/TLS does), not to encrypt bulk data.
Security: working out the private key from the public key would mean factorising a number hundreds of digits long, which is computationally infeasible.
Worked example A toy key pair (numbers far too small for real use)
A key pair uses n = 55, public key e = 3 and private key d = 27. Encrypt the value 8 to send privately, then decrypt it.
Encrypt with the recipient’s public key: ciphertext = 83 MOD 55 = 512 MOD 55.
512 = 9 × 55 + 17, so the ciphertext is 17.
Decrypt with the recipient’s private key: 1727 MOD 55 = 8, the original plaintext.
An interceptor who knows e = 3 and n = 55 cannot decrypt 17 without finding d, which needs the factors of n (here 5 and 11; for a real key, impossible in practice).
Answer: Ciphertext 17; decrypting with the private key gives 8
Your turn
A charity wants members of the public to send it donation details privately. Which key does a donor use to encrypt, and which key decrypts?
The donor encrypts with the charity’s public key; only the charity’s private key can decrypt it.
Examiner trap
Never say the sender encrypts a private message with their own private key. Anyone could decrypt that with the sender’s public key, so it gives authentication, not privacy.
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
In symmetric key cryptography, which key decrypts the ciphertext?
Quick check+10 XP
In the lab’s Asymmetric mode, which key does the sender need to encrypt a message to the receiver?
Quick check+10 XP
What is the main drawback of symmetric encryption?
Quick check+10 XP
How does quantum key distribution reveal an eavesdropper?
Section 03
Quantum cryptography.
Quantum cryptography uses the physics of light to share a secret key. The best-known method is quantum key distribution (QKD): the key is sent as a stream of single photons, each polarised to represent a 0 or a 1, along a fibre-optic cable or through free space.
Purpose: to distribute a symmetric key securely, so that any attempt to eavesdrop on the key exchange is detected.
Why eavesdropping shows: measuring a photon changes its quantum state. An eavesdropper who reads the photons introduces errors; the two parties compare a sample of the key, spot the raised error rate and discard the key.
Benefits: eavesdropping on the key exchange is detectable; security rests on the laws of physics, not on a maths problem being hard, so it stays secure even against future quantum computers; long keys can be shared and changed often (used with a one-time pad it is theoretically unbreakable).
Drawbacks: needs expensive specialist hardware (single-photon sources and detectors) and a dedicated fibre or line-of-sight link; the signal degrades with distance (typically a few hundred km of fibre at most without trusted relay nodes); the key rate is low; the polarisation of photons can change as they travel, causing errors; it still needs an authenticated ordinary channel to compare results.
Why it matters: a large enough quantum computer could factorise the big numbers behind RSA, breaking today’s asymmetric encryption.
Examiner trap
Quantum cryptography does not stop someone intercepting the photons. It makes interception detectable, so the compromised key is thrown away before any data is sent with it.
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 bank sends a message to all its customers and wants them to be sure it came from the bank. How is the message encrypted?
Exam style+20 XP
Which is a drawback of quantum cryptography?
Exam style+20 XP
Why is asymmetric encryption usually used only to exchange a symmetric key, not to encrypt all the data?
Exam style+20 XP
A member of the public sends a form to a company, encrypted with the company’s public key. Who can read it?
Skill unlocked
Encryption and quantum cryptography, mastered.
This skill is now recorded on your profile. Keep the chain going.