Skip to the page
Year 10 · Computer Science · Autumn 2 · Data transmission and Boolean logic

Encryption: symmetric and asymmetric

What this lesson covers

2.3 Encryption

Cambridge IGCSE Computer Science 0478 · Topic 2: Data transmission · Paper 1

You will learn to

  • Explain why data is encrypted before it is sent: intercepted data cannot be understood.
  • Describe symmetric encryption and the problem of sharing the key safely.
  • Describe asymmetric encryption, using a public key and a private key.

Success criteria

  • I can encrypt and decrypt a word with a Caesar cipher, and say it is symmetric.
  • I can explain why sending the secret key with the message is risky.
  • I can say which key encrypts a message sent to me, and which key decrypts it.
The syllabus points for this section
  • Explain why data is encrypted when it is transmitted.
  • Describe symmetric encryption and the problem of sharing the key.
  • Describe asymmetric encryption with a public key and a private key.

Key words

Say each word, then read what it means. Every one is in the glossary too.

Check digit
A digit calculated from the other digits of a number, used to catch typing errors.
Symmetric encryption
Encryption where the same key encrypts and decrypts.
Asymmetric encryption
Encryption using a public key to encrypt and a matching private key to decrypt.

The explanation

Read it here, or open the study page below to go one step at a time with things to try.

Why encrypt?

Data sent over a network can be intercepted: someone can copy it on the way, for example on public Wi-Fi.

Encryption scrambles the data using a key, so that an interceptor cannot understand it.

The readable data is called plaintext. The scrambled data is called ciphertext.

?Why?

Encryption does not stop data being intercepted. It makes intercepted data useless to the thief, which protects passwords, card numbers and private messages.

!Watch out

Exam answers lose marks for saying encryption stops hacking or interception. Say it makes the data meaningless without the key.

Symmetric encryption

In symmetric encryption, the same key is used to encrypt and to decrypt.

The sender and the receiver must both have this key. So the key itself must be shared.

The problem: if the key is intercepted while it is being sent, anyone can decrypt every message.

e.g.Example
A Caesar shift is a very simple symmetric cipher. Key = 3: move each letter 3 places on. HELLO → KHOOR To decrypt, move each letter 3 places back with the same key. Try it in the toy: type HELLO as Alice's message with the key set to 3, and check you get KHOOR. Bob decrypts with the same key. Then change Bob's key and see nonsense.
?Why?

Real symmetric encryption uses keys of 128 or 256 bits, so there are far too many keys to try. The weak point is sharing the key safely.

There is something to try for this step in the IGCSE library.

Asymmetric encryption

Asymmetric encryption uses two different keys that are made as a matched pair.

The public key is given to everyone. It is used to encrypt data sent to you.

The private key is kept secret by you and never sent. Only it can decrypt data that was encrypted with your public key.

e.g.Example
Ana wants to send Ben a secret message. 1. Ben sends Ana his public key. Anyone can see it; that is fine. 2. Ana encrypts the message with Ben's public key. 3. The ciphertext travels across the internet. 4. Only Ben's private key can decrypt it. Even Ana cannot decrypt it now. Try it in the toy: the sender is called Alice and the receiver Bob. Press Step to follow the message. Eve cannot open the box with the public key, but Bob opens it with his private key.
?Why?

This solves the key-sharing problem. The private key never travels, so it cannot be intercepted.

!Watch out

Do not say the private key encrypts the message to the receiver. For sending secret data, the receiver's public key encrypts and the receiver's private key decrypts.

There is something to try for this step in the IGCSE library.

Study it

Open the study page and go one step at a time.

The steps for this lesson

Try it

Pages to explore

Check yourself

One question at a time. The reason shows after each answer.

Saved on this device.