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
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?
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
- Kai obtains Mina's public key.
- Kai encrypts the message with Mina's public key.
- 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.
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
- The sender obtains Rowan's public key.
- The sender encrypts the message with that public key.
Rowan's public key
Look for these in your work
- Recipient identified
- Public key selected
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
- The private key decrypts data encrypted with its matching public key.
- An attacker with it could read intercepted messages.
- 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
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
- The sender encrypts using the recipient's public key.
- The recipient decrypts with the matching private key.
- 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
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.