Why Data Needs Protecting
In Part 2 you learned how to protect a computer system. But data does not always stay inside that system.
When you send a message, log in to a website or pay online, your data is broken into packets and sent across networks. On the way it passes through many devices that you do not control. Anyone able to capture those packets could read them — unless the data is protected. This threat is called data interception.
Devices get lost and stolen too. A laptop left on a train carries every file stored on it.
You cannot always stop data being intercepted or a device being taken. So the question becomes:
Where This Fits in the Syllabus
We checked the Cambridge IGCSE Computer Science (0478) syllabus for 2026–2028. All of the following are examinable:
- 2.3 Encryption — the need for and purpose of encryption when transmitting data, and how data is encrypted using symmetric and asymmetric encryption, including public and private keys
- 5.1 — the purpose and operation of HTTP and HTTPS
- 5.3 Cyber security — data interception as a threat; authentication, including username and password; and the secure socket layer (SSL) security protocol
Sections marked Syllabus cover this content. Boxes marked Extension add useful real-world context — such as TLS, digital certificate authorities and password hashing — that you will not be examined on directly.
Check Your Understanding 1
True or false: "Encryption stops hackers from intercepting data." Explain your answer.
Check the answer
False. Encrypted data can still be intercepted. Encryption means the intercepted data is meaningless to anyone who does not have the key to decrypt it.
Plaintext, Ciphertext and Keys Syllabus
Four terms describe every kind of encryption:
| Term | Meaning |
|---|---|
| Plaintext | The original data, which can be read and understood. |
| Ciphertext | The scrambled data after encryption. It cannot be understood without the key. |
| Encryption | Converting plaintext into ciphertext using an encryption algorithm and a key. |
| Decryption | Converting ciphertext back into plaintext using the correct key. |
Ciphertext → [ decryption algorithm + key ] → Plaintext
A simple example to see how a key works
Imagine a very simple method: shift every letter forward in the alphabet. The method is "shift letters". The key is how far to shift. With a key of 3, A becomes D, B becomes E, and so on.
Key: shift 3
Ciphertext: KHOOR
To decrypt, the receiver shifts each letter back by 3. Someone who knows the method but not the key would have to try every possible shift.
Check Your Understanding 2
Using the same method with a key of 3, decrypt the ciphertext FDW.
Reveal the answer
CAT. Shift each letter back by 3: F → C, D → A, W → T.
Symmetric Encryption — One Shared Key Syllabus
In symmetric encryption, the same key is used to encrypt and to decrypt the data. The shift example above is symmetric: the sender and receiver both use "shift 3".
| Step | What happens |
|---|---|
| 1 | The sender and receiver both have a copy of the same secret key. |
| 2 | The sender encrypts the plaintext with the key. |
| 3 | The ciphertext is transmitted. If it is intercepted, it cannot be understood. |
| 4 | The receiver decrypts the ciphertext with the same key. |
The problem: sharing the key
Symmetric encryption is fast and works well — once both sides have the key. But how does the key get to the receiver in the first place?
If the key is sent across the network, it could be intercepted too. An attacker who captures the key can decrypt every message encrypted with it. This is called the key distribution problem, and it is the main weakness of symmetric encryption.
Check Your Understanding 3
Explain why sending a symmetric key in the same email as the encrypted file is a bad idea.
Reveal the answer
Anyone who intercepts the email gets both the ciphertext and the key needed to decrypt it, so the encryption gives no protection.
Asymmetric Encryption — A Public Key and a Private Key Syllabus
Asymmetric encryption solves the key distribution problem by using two different but mathematically linked keys:
- a public key, which can be shared with anyone
- a private key, which is kept secret by its owner and never shared
Data encrypted with someone's public key can only be decrypted with their matching private key.
Think of open padlocks
Imagine Priya hands out open padlocks to anyone who wants one. Anybody can snap a padlock shut on a box. But only Priya has the key that opens those padlocks.
The open padlock is Priya's public key. Her own key is her private key. Anyone can lock a message for her; only she can unlock it.
| Step | Sam sends a message to Priya |
|---|---|
| 1 | Priya has a key pair. She shares her public key and keeps her private key secret. |
| 2 | Sam encrypts the message using Priya's public key. |
| 3 | The ciphertext is transmitted. An attacker can intercept it — and can even have a copy of Priya's public key — but still cannot decrypt it. |
| 4 | Priya decrypts the message using her private key. |
↓ transmitted ↓
Priya: ciphertext + Priya's PRIVATE key → plaintext
In this process the private key is never sent anywhere, so it cannot be intercepted while data is being transmitted. That is how asymmetric encryption avoids the key distribution problem. The private key must still be stored safely: if the owner's device is compromised and the key is stolen, an attacker could decrypt messages meant for them.
To send confidential data, the sender uses the receiver's public key. Only the receiver's private key can decrypt it. (Encrypting with a private key is used for digital signatures, which prove who sent a message. That is not on the syllabus, and it does not keep a message secret.)
Symmetric vs asymmetric
| Feature | Symmetric | Asymmetric |
|---|---|---|
| Number of keys | One shared secret key | A key pair: public and private |
| Encrypt with | The shared key | The receiver's public key |
| Decrypt with | The same shared key | The receiver's private key |
| Main weakness | The key must be shared safely first | Slower to process, because it uses more complex mathematics |
Check Your Understanding 4
An attacker intercepts a message encrypted with asymmetric encryption. They also have the receiver's public key. Why can they still not read the message?
Reveal the answer
The message was encrypted with the receiver's public key, so it can only be decrypted with the receiver's private key. The private key is kept secret by its owner and is not sent with the message, so the attacker does not have it.
Encryption keeps data secret. But a system must also know who is allowed in — and what they may do once inside.
Passwords and Authentication Syllabus
Authentication checks that a user is who they claim to be. The most common method is a username and password; the syllabus also names biometrics and two-step verification, which Part 2 explains in detail.
Passwords and encryption are often mentioned together, but they do different jobs:
- A password controls whether you can get into an account or system.
- Encryption controls whether data can be understood by whoever has it.
They also work together. When you log in to a website using HTTPS, your password is encrypted while it travels to the server, so it cannot be read if the packets are intercepted.
How Should Websites Store Passwords? Extension
A well-designed system does not store your actual password. It stores a hash of it: the result of a one-way calculation that cannot be reversed to get the password back. When you log in, the system hashes what you type and compares the two results.
Good systems add two more protections. First, a salt: a random value, different for every user, added to the password before hashing. Two people with the same password then get different hashes, and an attacker's pre-calculated lists of common password hashes no longer match. Second, a purpose-built password-hashing algorithm, such as bcrypt or Argon2, which is deliberately slow. Each guess then takes an attacker much longer, making brute-force attacks on stolen hashes far harder.
Hashing is not the same as encryption. Encrypted data is designed to be decrypted with a key; a hash is designed never to be reversed. You will not be examined on hashing at IGCSE, but it explains why a genuine company can reset your password but never tell you what it was.
Encryption vs Authentication vs Access Control
These three ideas are easy to blur together. Each one answers a different question.
| Measure | Question it answers | Example |
|---|---|---|
| Authentication | Are you who you claim to be? | Password, fingerprint, two-step verification |
| Access control (access levels) | Now that you are in, what are you allowed to do? | Read-only access to your own marks |
| Encryption | If someone gets the data, can they understand it? | HTTPS, an encrypted hard drive |
Why you need all three: the stolen laptop
A company laptop is stolen. It has a strong login password, so the thief cannot log in. Is the data safe?
Not necessarily. The password only protects the login screen. The thief could remove the storage drive and connect it to another computer, reading the files directly without ever logging in.
If the drive is encrypted, those files are ciphertext. Without the key, the thief has nothing useful. Authentication guarded the door; encryption protected what was behind it.
Check Your Understanding 5
For each situation, say whether it describes authentication, access control or encryption.
- A teacher can edit marks, but a student can only view them.
- A banking app asks for a fingerprint before opening.
- Card details are scrambled while they travel to an online shop.
Check your answers
- Access control — it sets what each authenticated user is allowed to do.
- Authentication — it checks the user's identity using biometrics.
- Encryption — it makes the data unreadable if intercepted.
Secure Communication: HTTPS and SSL Syllabus
HTTP (hypertext transfer protocol) is the set of rules a browser and web server use to request and send web pages. With plain HTTP, the data is sent unencrypted: anyone who intercepts it can read it.
HTTPS (hypertext transfer protocol secure) is HTTP with encryption added by the secure socket layer (SSL) security protocol. Data sent between the browser and the web server is encrypted.
How an SSL connection is set up
| Step | What happens |
|---|---|
| 1 | The browser connects to the web server and asks it to identify itself. |
| 2 | The server sends its digital certificate. The certificate is issued by a trusted organisation called a certificate authority. It contains the server's public key and confirms that this key belongs to the website's domain name. |
| 3 | The browser checks that the certificate is valid: issued by a trusted certificate authority, not expired, and matching the domain name being visited. If not, it shows a warning. |
| 4 | The browser and server use asymmetric (public-key) methods to agree a secret session key — a temporary key used only for this connection — without it ever being sent in readable form. |
| 5 | All data sent during the session is encrypted. The browser shows that the connection is secure, often with a padlock or "https" in the address bar. |
Two Kinds of Encryption Working Together Extension
Steps 4 and 5 combine everything in this lesson. Asymmetric methods are used to set up the session key safely and to prove the server's identity. Then the faster symmetric encryption is used with that session key for the rest of the connection.
How is the session key agreed? In older versions, the browser created a secret value, encrypted it with the server's public key and sent it; the session key was then worked out from that value. Modern TLS uses a key-agreement method instead. Each side sends some public values, and both sides calculate the same session key from them, so the key itself is never sent at all. The server's certificate and its matching private key are used to prove that the browser is talking to the genuine server.
What HTTPS does — and does not — prove
HTTPS proves that the connection is encrypted and that the certificate is valid for the domain you are connected to. A standard certificate confirms that whoever runs the server controls that domain name. It does not prove that the organisation behind the website is honest, or that it is the site you meant to visit.
A criminal can register a look-alike domain and obtain a valid certificate for it. That site would show a padlock too. This is why Part 1 taught you to check the domain name in a link, and to never ignore a certificate warning.
The padlock means the connection is encrypted. A phishing site can use HTTPS too.
Check Your Understanding 6
A user logs in to a website using plain HTTP over public Wi-Fi. Explain the risk.
Reveal the answer
HTTP sends data unencrypted. Anyone intercepting traffic on the network could read the username and password in plaintext and use them to access the account. With HTTPS, the intercepted data would be ciphertext.
Worked Scenarios
Scenario A — The key in the same envelope
A student encrypts their coursework with a password-protected zip file, then emails the file to their teacher with the password written in the same email.
Reveal the analysis
Here the password is used to create the encryption key, so the same password encrypts and decrypts. This is symmetric encryption. Sending the key with the ciphertext defeats the point — anyone intercepting the email has both. The key should be shared by a different, secure route, such as telling the teacher in person.
Scenario B — Ordering online
A shopper enters card details on a shop's checkout page. The address bar shows https and a padlock.
Reveal the analysis
SSL encrypts the card details between the browser and the shop's web server, protecting them against data interception. It does not guarantee the shop is genuine, so the shopper should still check the domain name.
Scenario C — The confidential report
A journalist wants members of the public to send them information securely, but has never met them to share a secret key.
Reveal the analysis
Asymmetric encryption suits this. The journalist publishes their public key. Anyone can use it to encrypt a message, but only the journalist's private key can decrypt it. No secret key ever needs to be exchanged.
Exam Focus — Keys, Purpose and Process
These are original FutureLogic practice questions in the Cambridge style. Try each one before revealing the model answer. The marks shown are only a guide: a model answer shows the kind of points examiners look for, but it cannot guarantee marks. Real mark schemes decide, and they accept a range of correct points.
Question 1 (2 marks)
Explain the purpose of encrypting data before it is transmitted.
Reveal the model answer
Syllabus link: 2.3.1 — the need for and purpose of encryption when transmitting data.
Encryption converts the plaintext into ciphertext. If the data is intercepted during transmission, it cannot be understood without the key, so it is of no use to the attacker.
Why this is a strong answer: it says what encryption does and makes clear that it does not stop interception — it stops the data being understood.
Question 2 (4 marks)
Describe how asymmetric encryption is used to send a message securely from Sam to Priya.
Reveal the model answer
Syllabus link: 2.3.2 — asymmetric encryption, including public and private keys.
Priya has a public key and a private key. Priya's public key is shared with Sam, and Sam uses it to encrypt the message into ciphertext. The ciphertext is transmitted to Priya. Priya decrypts it using her private key, which is kept secret and is the only key that can decrypt it. If the ciphertext is intercepted, it cannot be understood without Priya's private key.
Why this is a strong answer: it names both keys, states whose key is used at each step, and explains why only Priya can decrypt.
Question 3 (2 marks)
State one problem with symmetric encryption and explain why it is a problem.
Reveal the model answer
Syllabus link: 2.3.2 — symmetric encryption.
The same key is used to encrypt and decrypt, so the receiver must also have the key: it has to be shared securely before any data is sent. If the key is intercepted while it is being shared, the attacker can decrypt all the data.
Why this is a strong answer: it identifies the problem (the shared key must be shared or established securely) and explains the consequence if the key is intercepted.
Question 4 (4 marks)
Describe how SSL is used to provide a secure connection between a web browser and a web server.
Reveal the model answer
Syllabus link: 5.3.2 — the SSL security protocol; 5.1.3 — the operation of HTTPS.
The browser asks the web server to identify itself. The server sends its digital certificate, which includes its public key. The browser checks that the certificate is valid and trusted. If it is, the browser and server agree a session key and an encrypted session begins. All data sent between the browser and the server is then encrypted.
Why this is a strong answer: it describes the process in order — request, certificate, check, encrypted session — rather than only saying "SSL encrypts data".
Common Cambridge Exam Mistakes
Encrypted data can still be intercepted. It just cannot be understood without the key.
Encrypt with the receiver's public key; decrypt with the receiver's private key.
Name the public key and the private key, and say what each one is used for.
A password is part of authentication. It controls access; it does not scramble the data.
HTTPS proves the connection is encrypted. A fraudulent website can also use HTTPS.
Quick Quiz
- What is the difference between plaintext and ciphertext?
- What is the purpose of encryption when data is transmitted?
- In symmetric encryption, which key decrypts the data?
- What is the key distribution problem?
- In asymmetric encryption, which key is shared and which is kept secret?
- To send Priya a secure message, whose public key do you use?
- What does the S in HTTPS add, and which protocol provides it?
- What does the browser check when an SSL connection is set up?
- What is the difference between authentication and encryption?
- Why does a padlock not prove a website is genuine?
Quick Quiz Answers
Reveal all answers
- Plaintext is the original readable data; ciphertext is the scrambled data after encryption.
- So that if the data is intercepted, it cannot be understood without the key.
- The same key that was used to encrypt it.
- Both sides need the same key, so it must be shared or established securely first. If it is sent over a network, it could be intercepted on the way.
- The public key is shared; the private key is kept secret.
- Priya's public key.
- It adds security: data is encrypted. In the syllabus it is provided by the secure socket layer (SSL) protocol; modern websites use its successor, TLS.
- That the server's digital certificate is valid and trusted.
- Authentication checks who a user is; encryption makes data unreadable to anyone without the key.
- It only shows the connection is encrypted. A fraudulent website can also obtain a certificate and use HTTPS.
Final Summary
Encryption
Converts plaintext into ciphertext so intercepted data cannot be understood.
Key
The value used with the algorithm to encrypt or decrypt. Symmetric: kept secret. Asymmetric: only the private key is secret.
Symmetric
One shared key. Weakness: the key must be shared safely.
Asymmetric
Encrypt with the receiver's public key; decrypt with their private key.
HTTPS & SSL
Certificate checked, then the browser–server connection is encrypted.
Three Different Jobs
Authentication: who you are. Access levels: what you can do. Encryption: data is unreadable if it escapes.