Ch 3 · 2.3 Encryption · IGCSE Computer Science 0478

Topic 3 of 3 in Data Transmission — IGCSE Computer Science 0478 — 39 lessons.

Introduction

Every time you log in to a website or send a message, your data passes through many computers you do not control. Anyone could intercept it. Encryption makes intercepted data useless to anyone without the key. (Syllabus section 2.3.)

Key ideas — Why encrypt?

Data sent across a network can be intercepted. Encryption does not stop interception, but it makes the data meaningless to anyone who intercepts it without the key, so it cannot be understood or misused. This protects passwords, bank details, personal messages and business secrets.

🧑‍🏫 Teacher's explanation

Imagine you want to send a secret love letter to a friend in a classroom full of nosy students. If you write it in plain English, anyone who grabs the note can read it. To prevent this, you decide to use a secret code where 'A' becomes 'Z', 'B' becomes 'Y', and so on. Even if a nosy student intercepts the note, they just see a jumble of nonsense letters. They can't understand the message unless they know your specific 'secret code' rule.

📖 Definitions

🔍 Worked example — Easy

A user wants to send the plaintext 'HELLO' using a simple Caesar cipher (a type of symmetric encryption) where each letter is shifted by 3 positions in the alphabet. Convert 'HELLO' to ciphertext.

🔍 Worked example — Standard

In asymmetric encryption, Alice wants to send a secure message to Bob. Alice uses Bob's public key to encrypt the message. If Bob receives the ciphertext, which key must he use to decrypt it to ensure only he can read it?

🔍 Worked example — Exam-style

A system uses symmetric encryption. A hacker intercepts the ciphertext. The hacker knows the encryption algorithm used is a simple substitution, but they do not have the key. Does encryption prevent the hacker from intercepting the data packets?

⚠️ Common errors

🧠 Quick check 1

🧠 Quick check 2

🎯 Exam question

(a) Explain why the company should use encryption for this data. [2] (b) The company decides to use asymmetric encryption. Describe how the public and private keys are used in this process to ensure only the intended recipient can read the message. [3] [5 marks]

Key ideas — Symmetric encryption

Problem: the key itself must be shared with the receiver. If the key is intercepted while being sent, anyone can decrypt the messages.

🧑‍🏫 Teacher's explanation

Imagine you have a secret diary with a physical padlock. To keep your secrets safe, you lock the diary with a specific key. If you want your best friend to read the diary, you must give them a copy of that exact same key. This is symmetric encryption: one single key does all the work of both locking (encrypting) and unlocking (decrypting).

📖 Definitions

🔍 Worked example — Easy

A simple Caesar cipher is a form of symmetric encryption where each letter is shifted by a fixed number. If the key is k=3, encrypt the word 'CAT'.

🔍 Worked example — Standard

A message is encrypted using a symmetric key. The original message (plaintext) is M. The encryption function is E(M, k) = (M + k) pmod26. If the plaintext is the letter 'Z' (position 25) and the key is k=10, find the ciphertext letter.

🔍 Worked example — Exam-style

A sender wants to transmit a file using symmetric encryption. They use a key K. Describe the security risk associated with the distribution of K in a symmetric system.

⚠️ Common errors

🧠 Quick check 1

🧠 Quick check 2

🎯 Exam question

Key ideas — Asymmetric encryption

Uses two different, mathematically linked keys:

🧑‍🏫 Teacher's explanation

Imagine you want to receive a secret gift in a public park. If you use symmetric encryption, you have to send a physical key to the sender first; if a thief intercepts that key, they can open your gift. Asymmetric encryption is like having a specialized mailbox. Anyone can walk up to the mailbox and drop a letter through the slot (the public key), but once the letter is inside, only you have the unique physical key (the private key) to open the back of the mailbox and read it. Even if a thief sees the mailbox and the letter, they can't get it out.

📖 Definitions

🔍 Worked example — Easy

A user wants to send a secure message to a server. Identify the correct key for each step: 1. The sender uses which key to encrypt the message? 2. The receiver uses which key to decrypt the message?

🔍 Worked example — Standard

A sender encrypts a message using a public key. A hacker intercepts the ciphertext and the public key. Can the hacker decrypt the message? Explain why or why not.

🔍 Worked example — Exam-style

Compare symmetric and asymmetric encryption in terms of key management. Which method requires the sender and receiver to share a single secret key?

⚠️ Common errors

🧠 Quick check 1

🧠 Quick check 2

🎯 Exam question

(a) Explain the purpose of using encryption when transmitting data over a public network. [2] (b) Describe how asymmetric encryption works to ensure that only the intended recipient can read a message. [3] [5 marks]

Worked example

Explain why asymmetric encryption is more secure than symmetric encryption when sending a message to someone for the first time.

🔍 Worked example — Easy

A user wants to send an encrypted message to a friend. If they use symmetric encryption, what is the primary security risk during the initial key exchange?

🔍 Worked example — Standard

Compare the key usage in asymmetric encryption for a sender (S) and a receiver (R). If S wants to send a message to R, which key does S use to encrypt, and which key does R use to decrypt?

🔍 Worked example — Exam-style

A hacker intercepts a transmission. The sender used asymmetric encryption. The hacker manages to steal the sender's public key. Can the hacker decrypt the message? Explain why or why not.

⚠️ Common errors

Common mistakes

Practice

Answers: (1) To make data meaningless to anyone who intercepts it without the key. (2) Plaintext: original readable data; ciphertext: encrypted, unreadable data. (3) The same key encrypts and decrypts; the key must be shared and could be intercepted. (4) The receiver's public key (known to anyone) is used to encrypt; only the receiver's matching private key (kept secret) can decrypt.

Summary

All chapters in Data Transmission

  1. 2.1 Types and Methods of Data Transmission
  2. 2.2 Methods of Error Detection
  3. 2.3 Encryption