← IGCSE Computer Science Paper 1

Sending a secure message with asymmetric encryption

The receiver shares their public key, the sender encrypts with it, and only the receiver's private key can decrypt it. No secret key is shared, so an interceptor sees only ciphertext.

Understanding Sending a secure message with asymmetric encryption in IGCSE Computer Science Paper 1

What it does: Priya encrypts with Sam's public key because Sam is the receiver and only Sam's private key can decrypt it. Asymmetric encryption uses a key pair. The private key never leaves its owner, so no secret key has to be shared. Anyone can have the public key. Decrypting needs the private key, which Sam keeps to himself.

Common mistakes: The sender must encrypt with the receiver's public key, not a private key. The private key stays with its owner. The line should be 'Ava encrypts with public key'. Zoe must share her public key, not her private key. The private key is never shared because it is the only key that can decrypt. The line should be 'Zoe shares her public key'.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 204–217) and word search (Modules 189–217).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Priya wants to send Sam a secure message using asymmetric encryption. Which key does Priya use to encrypt it?
Sam's private keySam's public key
Matches
ciphertext = encrypt("Meet at 5", priya_public_key)
↓
Priya encrypted with her own public key. The sender must use the receiver's public key (Sam's), or Sam cannot decrypt it.
Applying
Meanings
Term
Encrypt with public key, decrypt with private key
Meaning
The receiver shares their public key, the sender encrypts with it, and only the receiver's private key can decrypt it. No secret key is shared, so an interceptor sees only ciphertext.
Practice
Sam shares PublicKey
Testing
Gaps
ciphertext ← ENCRYPT(message, )
Check Answer
Spots
3Ava writes the plaintext
4Ava encrypts with private key

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Moray Eel' badge — Lurking Debugger, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Priya wants to send Sam a secure message using asymmetric encryption. Which key does Priya use to encrypt it?
A. Sam's public key ✓
B. Sam's private key
The sender encrypts with the receiver's public key. Sam keeps his private key secret, so Priya never has it.
2. Which step comes first in an asymmetric exchange?
A. The receiver shares their public key with the sender ✓
B. The sender encrypts the message before getting any key
The order is: receiver shares public key, sender encrypts with it, receiver decrypts with the private key. The sender needs the public key before encrypting.
3. Sam receives Priya's encrypted message. Which key does Sam use to decrypt it?
A. Sam's private key ✓
B. Priya's public key
The message was encrypted with Sam's public key, so only Sam's matching private key can decrypt it.
4. Does a secret key have to be shared between Priya and Sam before they can send secure messages?
A. Yes, they must both share the same secret key first
B. No, only the public key is shared and it is not secret ✓
Asymmetric encryption uses a key pair. The private key never leaves its owner, so no secret key has to be shared.
5. A hacker intercepts the message Priya sends to Sam. What can the hacker see?
A. The plaintext message, because the public key was also intercepted
B. Only ciphertext that cannot be read without the private key ✓
Even if the hacker has Sam's public key, it only encrypts. Only Sam's private key can decrypt, so the hacker just sees ciphertext.

Match the Pairs

encrypt(message, receiver_public_key) → The sender turns the plaintext into ciphertext using the receiver's public key
decrypt(ciphertext, my_private_key) → The receiver turns the ciphertext back into plaintext using their own private key, which is never shared
Worked example: Priya wants to send Sam a secret message, so Sam shares his public key and Priya uses it to encrypt → ciphertext = encrypt("Meet at 5", sam_public_key)
An interceptor can see the public key and the ciphertext, but cannot read the message without the private key → intercepted = [sam_public_key, ciphertext]
ciphertext = encrypt("Meet at 5", priya_public_key) → Priya encrypted with her own public key. The sender must use the receiver's public key (Sam's), or Sam cannot decrypt it.
send(sam_private_key) → Sam sent his private key over the network. The private key must stay secret and only the public key is shared.

Key Term

Encrypt with public key, decrypt with private key
The receiver shares their public key, the sender encrypts with it, and only the receiver's private key can decrypt it. No secret key is shared, so an interceptor sees only ciphertext.

Fill in the Blanks

1. ciphertext ← ENCRYPT(message, public_key)
Hint: Type the variable for the key the sender uses to lock the message, which the receiver has shared openly.
2. message ← DECRYPT(ciphertext, private_key)
Hint: Type the variable for the key that only the receiver keeps secret and uses to unlock the message.
3. Amy: ciphertext ← ENCRYPT(msg, public_key)
Hint: Type the function name for what the sender does to turn the message into ciphertext.
4. Eve sees the public key and the ciphertext
Hint: Type the term for the scrambled data an interceptor can capture but cannot read.
5. 1 Receiver shares the public key 2 Sender encrypts with the public key 3 Receiver decrypts with the private key
Hint: Type the word describing the key that only the receiver holds, used in the final step.

Spot the Error

Question 1
A Ben makes a key pair
B Ben shares his public key
C Ava writes the plaintext
D Ava encrypts with private key
Line D — The sender must encrypt with the receiver's public key, not a private key. The private key stays with its owner. The line should be 'Ava encrypts with public key'.
Question 2
A Zoe makes a key pair
B Sam wants to message Zoe
C Zoe sends Sam her private key
D Sam encrypts with that key
Line C — Zoe must share her public key, not her private key. The private key is never shared because it is the only key that can decrypt. The line should be 'Zoe shares her public key'.
Question 3
A Mia creates a key pair
B Mia posts the private key
C Mia shares her public key
D Only Mia can decrypt messages
Line B — The private key must be kept secret by its owner. If it is posted publicly, anyone could decrypt Mia's messages. The line should be 'Mia keeps the private key safe'.
Question 4
A Leo sends ciphertext to Isla
B Eve intercepts the plaintext
C Eve cannot read the message
Line B — The message was encrypted before sending, so an interceptor only captures ciphertext, not plaintext. The line should be 'Eve intercepts the ciphertext'.
Question 5
A Isla shares her public key
B Leo encrypts the message
C Leo sends the ciphertext
D Isla decrypts with public key
Line D — The receiver decrypts with their private key. The public key is only used to encrypt. The line should be 'Isla decrypts with private key'.

Student with a class code? Join your class →