66 exam-style questions plus unlimited generated ones on this topic, at up to four difficulty levels, with full mark schemes. Notes and past-paper booklets are open to everyone. Practice needs a free account.
Or take a quick quiz: 10 questions on this subtopic in GCSE Computer Science (OCR), marked as you tap.
How encryption protects data by scrambling it with an algorithm and a key, so that intercepted or stolen data cannot be understood. Questions ask for definitions, why encryption is used on networks and devices, and sometimes a simple cipher such as the Caesar cipher to show the principle.
Key facts
Encryption = scrambling data using an algorithm and a key
Plaintext → (encrypt with key) → ciphertext → (decrypt with key) → plaintext
Encryption does not stop interception; it makes intercepted data unreadable
Used in: HTTPS, Wi-Fi, encrypted storage on devices
Caesar cipher: shift each letter by the key; wrap round from Z to A
Grade 7+ only n-bit key → 2n possible keys
Notes
What encryption does
diagram
Encryption scrambles data using an encryption algorithm and a key, so that it cannot be understood by anyone who does not have the key.
Plaintext: the original, readable data. Ciphertext: the scrambled data. Decryption turns ciphertext back into plaintext using the key.
Encryption turns plaintext into ciphertext; only someone with the key can turn it back
Encryption does not stop data being intercepted or stolen. It makes intercepted or stolen data meaningless to the attacker.
Where encryption is used
Data sent over networks: HTTPS encrypts data between a browser and a web server, e.g. passwords and card details.
Wi-Fi networks encrypt the data sent through the air, because anyone within range could pick up the signal.
Stored data: if the storage on a laptop or phone is encrypted, a thief cannot read the files, even by removing the drive.
Encryption helps organisations keep personal data secure, which the Data Protection Act 2018 requires.
The principle: Caesar cipher and keys
diagram
A Caesar cipher shifts every letter a fixed number of places along the alphabet. The shift is the key. With a key of 3, CAB becomes FDE; after Z it wraps round to A.
A Caesar cipher with key 3: each letter moves 3 places along
A Caesar cipher is easy to break: there are only 25 useful keys, so trying them all takes seconds.
Real encryption uses much longer keys made of bits. An n-bit key has 2n possible values, so each extra bit doubles the number of keys a brute-force attack would have to try. Grade 7+ only
Encryption only protects data from people without the key. If you type your password into a fake website, it is encrypted on the way, but the attacker running the site can still read it. Grade 8+ only
How to answer each type of question
Explain how encryption protects data
2 to 3 marksGrade 5
Say what happens: the data is scrambled using an algorithm and a key.
Say the effect: it cannot be understood without the key if it is intercepted.
Say who can read it: only the intended receiver, who has the key.
Example. Explain how encryption protects a customer's card details when they are sent to an online shop. [3]
Show the model answerHide the model answer
The card details are scrambled using an encryption algorithm and a key before they are sent (1). If the data is intercepted, it cannot be understood without the key (1). Only the shop's server, which has the key, can decrypt the details (1).
Use a Caesar cipher
1 to 3 marksGrade 5
Write out the alphabet so you can count the shift accurately.
Encrypt: move each letter forward by the key. Decrypt: move each letter back.
Wrap round: after Z comes A (and before A comes Z).
Example. A Caesar cipher with a key of 4 is used. (a) Encrypt the word WAY. [1] (b) Decrypt the ciphertext PSKMR. [1]
Show the model answerHide the model answer
(a) AEC
(1)
(W wraps round to A, A becomes E, Y wraps round to C)
(b) LOGIN
(1)
Explain why a longer key is more secure
2 marksGrade 7
Say that a longer key has many more possible values.
Link to brute force: trying every key would take far too long.
If numbers are asked for, an n-bit key has 2n possible keys.
Example. Explain why a 16-bit key is much more secure than an 8-bit key. [2]
Show the model answerHide the model answer
A 16-bit key has 216 = 65,536 possible values, compared with 28 = 256 for an 8-bit key (1). So a brute-force attack that tries every key would take 256 times as long (1).
Don’t lose marks
Saying encryption stops data being intercepted. It stops intercepted data being understood.
Mixing up plaintext (readable) and ciphertext (scrambled).
Forgetting to wrap round the alphabet in a Caesar cipher.
Confusing encryption with a password or with compression. A password controls access; encryption scrambles the data itself.
More tips
Memory tricks
Encryption is a lock, not a wall: people can still grab the box, but they cannot open it without the key.
Caesar check: decrypt your answer with the same key to see if you get back to the start.
Each extra bit of key doubles the number of keys: 8 bits → 256, 9 bits → 512, 10 bits → 1,024.
Exam technique
Use the key words: algorithm, key, plaintext, ciphertext, decrypt.
Finish an 'explain' answer with the effect: intercepted data is meaningless without the key.
Show your shifting in Caesar cipher questions and check each letter twice.
What each grade needs
What you need to be able to do, from the first marks up to the top grade.
Grade 3
Define encryptionScrambling data using an algorithm and a key so it cannot be understood without the key.
Grade 4
Use plaintext, ciphertext and key correctlyPlaintext is the original data, ciphertext is the encrypted data, and the key is used to encrypt and decrypt.
Grade 5
Explain how encryption protects intercepted dataIntercepted data is meaningless without the key; only the intended receiver can decrypt it.
Grade 5
Encrypt and decrypt with a Caesar cipherShift each letter a fixed number of places along the alphabet, wrapping round from Z to A.
Grade 6
Give examples of where encryption is usedHTTPS web pages, Wi-Fi networks and the storage on laptops and phones.
Grade 7
Explain why longer keys are more secureEach extra bit doubles the number of possible keys, so a brute-force attack takes far longer.
Grade 8
Explain what encryption cannot protect againstIt does not stop data being intercepted or deleted, and does not help if the attacker has the key.
Quick recall
Cover the answers and test yourself. The app has these as flashcards that come back just before you'd forget them.
Name the term for the algorithm (set of rules) that is used to turn plaintext into ciphertext.
Cipher.
A bank’s website address starts with https://. State what the letter S in HTTPS stands for.
Secure.
Name the process of changing ciphertext back into plaintext using a key.
Decryption.
Complete the sentences using words from the box. Each word can be used once. cipher, ciphertext, key, plaintext A brute-force attack tries every possible (1) _______ in turn. The attacker knows the attack has worked when the result is readable (2) _______.
(1) key, (2) plaintext
Give one disadvantage of encrypting a very large file.
It takes extra time and processing power to encrypt and decrypt.
Sample questions
Written for this site in the style of OCR exam questions. They are not taken from real past papers.
Question 1Easy3 marks
(a) State what is meant by encryption.
[1]
(b) What is needed to decrypt data that has been encrypted? Tick (✓) one box.
[1]
A firewall
A MAC address
The key
A switch
(c) Give one example of data that should be encrypted when it is sent over the Internet.
[1]
Show the answer and mark scheme
(a)
scrambling / encoding data using an algorithm and a key, so it cannot be understood without the key
(b)Answer: The key
(c)
passwords / bank or card details / personal information / medical records
Question 2Medium4 marks
(a) Explain how encryption protects data sent over a wireless network.
[3]
(b) Encryption does not stop data from being intercepted. State what it does do.
[1]
Show the answer and mark scheme
(a)
the data is encrypted using an algorithm and a key before it is sent
if the data is intercepted, it cannot be understood / is meaningless without the key
only the intended receiver, who has the key, can decrypt it
(b)
it stops intercepted data from being understood / used
Question 3Hard6 marks
(a) Explain why encryption is important for a laptop that could be lost or stolen.
[2]
(b) Explain why encryption is important when a user enters card details on a shopping website.
[2]
(c) A user is tricked into entering their password on a fake website that uses HTTPS. Explain why encryption did not protect the password.
[2]
Show the answer and mark scheme
(a)
if the storage is encrypted, the data cannot be read without the key / password
so a thief cannot access the files, even by removing the drive
(b)
the card details travel across many networks and could be intercepted
HTTPS encrypts them, so intercepted data is meaningless
(c)
the password was only encrypted between the user and the fake website
the attacker runs the fake site, so they receive / can decrypt the password; encryption only stops other people reading the data in transit
More in Wired and wireless networks, protocols and layers