← IGCSE Computer Science Paper 1

Encrypting and decrypting with one shared key

The sender encrypts plaintext into ciphertext with a key; the receiver decrypts it back to plaintext using the same key. A wrong key gives unreadable output.

Understanding Encrypting and decrypting with one shared key in IGCSE Computer Science Paper 1

What it does: Both sides hold identical keys, which is what makes the encryption symmetric. The process runs plaintext to ciphertext to plaintext, with the same key used at both stages. Symmetric means the sender and receiver use one shared key for both encrypting and decrypting. Encryption turns readable plaintext into ciphertext. Decryption is the reverse, done by the receiver. Only the correct key reverses the encryption. A wrong key gives unreadable output. Encrypting goes plaintext to ciphertext; decrypting must go ciphertext to plaintext using the key.

Common mistakes: The receiver must decrypt with the same key the sender used to encrypt. The key is 3, so using 5 gives unreadable output. It should be DECRYPT(cipher, key). The sender turns plaintext into ciphertext by encrypting it, not decrypting it. It should be ENCRYPT(plain, 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 189–203) 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
Which key decrypts a message in symmetric encryption?
The same key that encrypted itA different key from the one that encrypted it
Matches
Sender key = 7, Receiver key = 3, decrypted message is readable
↓
The keys are different, so decryption with the wrong key gives unreadable output, not the original message
Applying
Meanings
Term
symmetric encryption
Meaning
The sender encrypts plaintext into ciphertext with a key; the receiver decrypts it back to plaintext using the same key. A wrong key gives unreadable output.
Practice
plaintext ← "HELLO"
Testing
Gaps
ciphertext ← (plaintext, key)
Check Answer
Spots
3cipher ← ENCRYPT(plain, key)
4result ← DECRYPT(cipher, 5)

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

The 'Ostrich' badge — Full Sprint, 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. Which key decrypts a message in symmetric encryption?
A. A different key from the one that encrypted it
B. The same key that encrypted it ✓
Symmetric means the sender and receiver use one shared key for both encrypting and decrypting.
2. Which shows the correct order of the symmetric process?
A. Plaintext → key → ciphertext → key → plaintext ✓
B. Ciphertext → key → plaintext → key → ciphertext
The sender starts with plaintext and encrypts it into ciphertext. The receiver then decrypts the ciphertext back into plaintext.
3. What does the sender do with the plaintext and the key?
A. Decrypts the plaintext into ciphertext
B. Encrypts the plaintext into ciphertext ✓
Encryption turns readable plaintext into ciphertext. Decryption is the reverse, done by the receiver.
4. The receiver uses the wrong key to decrypt some ciphertext. What happens?
A. The output is unreadable ✓
B. The original plaintext appears anyway
Only the correct key reverses the encryption. A wrong key gives unreadable output.
5. In a diagram of symmetric encryption, how many different keys are needed?
A. One shared key used at both ends ✓
B. Two different keys, one at each end
A symmetric diagram shows the same key going into the encrypt step and the decrypt step. Two different keys would be asymmetric encryption.

Match the Pairs

plaintext + key → ciphertext → The sender encrypts the readable message with the shared key to produce unreadable ciphertext
ciphertext + key → plaintext → The receiver decrypts the ciphertext with the same shared key to get the original message back
Symmetric encryption uses the same key to encrypt and to decrypt → Sender key = 7, Receiver key = 7
Diagram of the full process from sender to receiver → Plaintext → [Key] → Ciphertext → [Key] → Plaintext
Sender key = 7, Receiver key = 3, decrypted message is readable → The keys are different, so decryption with the wrong key gives unreadable output, not the original message
Receiver decrypts: plaintext + key → ciphertext → The direction is wrong: decryption turns ciphertext into plaintext, not plaintext into ciphertext

Key Term

symmetric encryption
The sender encrypts plaintext into ciphertext with a key; the receiver decrypts it back to plaintext using the same key. A wrong key gives unreadable output.

Fill in the Blanks

1. ciphertext ← ENCRYPT(plaintext, key)
Hint: Type the function name the sender uses to turn plaintext into ciphertext.
2. plaintext ← DECRYPT(ciphertext, key)
Hint: Type the function name the receiver uses to turn ciphertext back into plaintext.
3. ciphertext ← ENCRYPT(plaintext, key) plaintext ← DECRYPT(ciphertext, key)
Hint: Type the variable the receiver must use, which is the same one the sender used to encrypt.
4. wrongKey ← "K9" output ← DECRYPT(ciphertext, wrongKey) // output is unreadable
Hint: Type the variable holding the incorrect key, which is why the output is unreadable.
5. sharedKey ← "SECRET" ciphertext ← ENCRYPT(message, sharedKey) plaintext ← DECRYPT(ciphertext, sharedKey)
Hint: Type the variable that holds the one key both the sender and receiver have.

Spot the Error

Question 1
A plain ← "HELLO"
B key ← 3
C cipher ← ENCRYPT(plain, key)
D result ← DECRYPT(cipher, 5)
E OUTPUT result
Line D — The receiver must decrypt with the same key the sender used to encrypt. The key is 3, so using 5 gives unreadable output. It should be DECRYPT(cipher, key).
Question 2
A key ← 7
B plain ← "MEET AT 9"
C cipher ← DECRYPT(plain, key)
D OUTPUT cipher
Line C — The sender turns plaintext into ciphertext by encrypting it, not decrypting it. It should be ENCRYPT(plain, key).
Question 3
A key ← 1
B plain ← "CAT"
C ciphertext ← "BZS"
D // shift each letter by key
Line C — Encrypting with key 1 shifts each letter forward by 1, so C, A, T become D, B, U. The broken line shifted backwards. It should be "DBU".
Question 4
A ciphertext ← "DBU"
B key ← 1
C plaintext ← "ECV"
D OUTPUT plaintext
Line C — Decrypting with the same key 1 shifts each letter back by 1, so D, B, U become C, A, T. The broken line shifted forward. It should be "CAT".
Question 5
A Step 1: plaintext
B Step 2: decrypt using the key
C Step 3: ciphertext sent
D Step 4: decrypt using the key
E Step 5: plaintext
Line B — Step 2 is the sender turning plaintext into ciphertext, which is encryption. Decryption happens at step 4. It should say encrypt using the key.

Student with a class code? Join your class →