Learn in your language
Skip to content
IGCSE · Cambridge (CIE) · 0478

Use public and private keys

Explain asymmetric encryption with a public key for encryption and a matching private key for decryption.

Section 2 · Data transmission

Cambridge IGCSE Computer Science 0478 · Data transmission · 2026–2028 Version 6 · 2.3

This sequence follows Cambridge IGCSE Computer Science 0478, 2026–2028 syllabus Version 6. It covers subject content sections 2.1–2.3 only. The separately published 2029–2031 syllabus is not mapped here. Practice is original, self-checked and does not award an official Cambridge grade. Full timed papers and human subject-teacher review remain outstanding.

Before you begin

  • No programming language is required. Be comfortable with place value and multiplication; each lesson introduces the computer-science notation it uses.

Work on paper. Try each question before revealing help, and explain why your method works.

Quick readiness check

Which key can be distributed openly?

What you will learn

  • Distinguish a public key from a private key
  • Describe asymmetric encryption for a confidential message
  • Explain why the private key must remain secret

The key pair has different roles

Asymmetric encryption uses a related public and private key pair. A sender can encrypt a confidential message with the recipient's public key; the matching private key is used to decrypt it.

Apply and check the rule

The public key can be shared, while the private key is kept secret by its owner. This helps avoid sending one shared secret key over the same channel, although asymmetric operations are generally slower than symmetric encryption for large files.

Pause and explain

A message is encrypted with Mina's public key. Who can decrypt it in the described system?

Put the idea to work

Worked example

Kai wants to send Mina a confidential message. Which key should Kai use to encrypt it, and which key should Mina use to decrypt it?

Show the worked solution
  1. Kai obtains Mina's public key.
  2. Kai encrypts the message with Mina's public key.
  3. Mina decrypts it with her matching private key, which she keeps secret.

Answer Kai encrypts with Mina's public key; Mina decrypts with Mina's private key.

Try a topic test

Choose Easy, Normal or Difficult. Save your answers and open worked review after finishing.

Test this topic →

From guided practice to a new situation

Write your answer and reasoning first. Use a hint only if you are stuck. The model solution is for self-checking; your written work is not automatically marked.

1 · Guided

A confidential message is sent to Rowan using asymmetric encryption. Which key should the sender use?

Give me a hint

Use the recipient's key that can be shared.

Compare my reasoning
  1. The sender obtains Rowan's public key.
  2. The sender encrypts the message with that public key.

Rowan's public key

Look for these in your work

  • Recipient identified
  • Public key selected
2 · Independent

Why should Rowan keep the matching private key secret?

Give me a hint

Consider who could decrypt messages if they had it.

Compare my reasoning
  1. The private key decrypts data encrypted with its matching public key.
  2. An attacker with it could read intercepted messages.
  3. Only Rowan should control it.

The private key is needed to decrypt the confidential messages; keeping it secret prevents others from reading them.

Look for these in your work

  • Decryption role stated
  • Risk explained
  • Secrecy justified
3 · Transfer

A sender has the recipient's public key but not the private key. Explain the intended flow and one limitation compared with symmetric encryption.

Give me a hint

Public key encrypts for the owner of its matching private key.

Compare my reasoning
  1. The sender encrypts using the recipient's public key.
  2. The recipient decrypts with the matching private key.
  3. Asymmetric encryption helps with key distribution but is generally slower for large data than symmetric encryption.

The sender encrypts with the recipient's public key and the recipient decrypts with the private key. This avoids sharing a single secret key, but the asymmetric method is generally slower for bulk data.

Look for these in your work

  • Correct encryption key
  • Correct decryption key
  • Trade-off stated

Common mistakes

  • Encrypting with the sender's public key when the recipient must decrypt
  • Sharing the private key
Recall without your notes

What can you explain now?

Which key should be kept secret in asymmetric encryption?

Compare with the explanation

The private key

The public key may be shared; the matching private key must remain secret.

After trying it yourself, choose your next review. This is your self-assessment.

Your review choice appears on Today. Sign in to sync it across devices.

Make it stick

For a confidential message to a recipient, which key encrypts and which matching key decrypts?

If you needed the solution, close it and solve the problem again from a blank page. A correct answer is stronger when you can explain the reason for each step.

Keep learning Computer Science

Course scope and assessment

165 original lessons map the listed objectives across all 10 main topics in the 2026–2028 Version 6 syllabus, with worked explanations and guided, independent and transfer practice. This is mapped teaching coverage, not proof of full exam readiness. Three earlier starter lessons remain available but are not counted as syllabus-mapped teaching. Practical programming experience in an executable browser workspace, full timed-paper practice, human subject-teacher review and the separate 2029–2031 syllabus remain outstanding. Practice is self-checked and does not award an official Cambridge grade.

StudyForA · Learn with understanding

Original teaching content and links to official sources. Check your exam year and qualification before using a resource.