Teachers' Portal  /  A-Level Computer Science 9618  /  Security  /  Symmetric and asymmetric encryption, quantum cryptography
Lesson pack · A-Level Computer Science 9618 · 17.1 · A Level (A2)

Symmetric and asymmetric encryption, quantum cryptography

Lock it with the right key. Encryption turns readable plaintext into ciphertext that is useless to anyone without the key.

Student lesson Lab, full screen
At a glance

The shape of the lesson

Topic
Security
Syllabus reference
Cambridge International AS and A Level Computer Science 9618, 17.1
Level
A Level (A2)
Duration
45 minutes, lab-led; stretches to a 60 minute block (see the contingency notes)
Position in topic
Lesson 1 of 3 in Security; leads into SSL and TLS
Central model
Fig. 1: the same key pair used two ways: the recipient's public key for privacy, the sender's private key for proof of origin
Cooperative structure
Assessment
Stage 1 check and the exam-style plenary from the student lesson, plus the worksheet as the exit task
Learning objectives

By the end of the lesson, learners can

Section by section
  • One shared key: In the lab, type a message and pick a key.
  • A key pair, two directions: Asymmetric cryptography solves the key distribution problem.
  • Quantum cryptography: Quantum cryptography uses the physics of light to share a secret key.
Key points to leave on the board
  • Always say whose key: "the receiver’s public key", not just "the public key".
  • Privacy: encrypt with the recipient’s public key; decrypt with the recipient’s private key.
  • Verification: encrypt with the sender’s private key; anyone decrypts with the sender’s public key.
  • Quantum: photons carry the key; eavesdropping changes their state, so it is detected.
The core visual model

One picture every idea returns to

Encryption uses an algorithm and a key to turn plaintext into ciphertext; decryption reverses it. In symmetric cryptography the same secret key encrypts and decrypts, so the key must somehow be shared safely. In asymmetric cryptography each owner has a mathematically linked public key (given to anyone) and private key (kept secret): what one key encrypts, only the other can decrypt. To send a private message to someone, encrypt with their public key. To send a verified message to the public, encrypt with your own private key. Quantum cryptography uses photons to distribute keys so that any eavesdropping is detected.

Two ways to use a key pair 1. Private message to Bank (confidentiality) plaintextciphertextplaintext Bank’spublic key Bank’sprivate key 2. Verified message from Bank (authentication) plaintextciphertextplaintext Bank’sprivate key Bank’spublic key
Fig. 1: the same key pair used two ways: the recipient's public key for privacy, the sender's private key for proof of origin
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen with the question in the title, Lock it with the right key.. Encryption turns readable plaintext into ciphertext that is useless to anyone without the key. Put the figure on the board: it is the one picture every idea in the lesson returns to.Whole class, then pairs
5 to 13 minTeach and check: One shared keyIn the lab, type a message and pick a key. Project tab 6 of the lab (Symmetric and asymmetric encryption) and let a student drive it while the class predicts.Whole class, then pairs
13 to 21 minTeach and check: A key pair, two directionsAsymmetric cryptography solves the key distribution problem. Model the worked example A toy key pair (numbers far too small for real use) on the board, one line at a time. Your turn: A charity wants members of the public to send it donation details privately. Which key does a donor use to encrypt, and which key decrypts?Pairs
21 to 30 minTeach and check: Quantum cryptographyQuantum cryptography uses the physics of light to share a secret key.Connect-Extend-Challenge
30 to 36 minCheckThe four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong.Individual, then whole class
36 to 43 minPlenaryThe exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording.Individual, random call
43 to 45 minExit and homeworkSet the worksheet below (6 questions, 21 marks). Learners self-assess against the objectives before they leave.Individual
Timing and contingency

Protect the parts that carry the learning

The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.

Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.

Cut first if the build overruns: the last check in Quantum cryptography, never the check or the plenary.

In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.

Running the cooperative task

Connect-Extend-Challenge

After the new idea, each student writes three lines: how it connects to what they knew, how it extends their thinking, and what still challenges them. Pairs compare, then the challenges become the plenary.

The full structure, with its variations and the other twelve, is on the cooperative-learning page.

Examiner traps to pre-empt

What to head off, and how

Trap learners fall intoTeaching move that pre-empts it
"Encryption stops hackers getting the data" is wrong.The data can still be intercepted; encryption means it cannot be understood without the key.
Never say the sender encrypts a private message with their own private key.Anyone could decrypt that with the sender’s public key, so it gives authentication, not privacy.
Quantum cryptography does not stop someone intercepting the photons.It makes interception detectable, so the compromised key is thrown away before any data is sent with it.
Worksheet

Symmetric and asymmetric encryption, quantum cryptography: worksheet

6 questions, 21 marks. Written in the style of the papers; no past paper question is reproduced.

NameClassDate
Q1 · recall[3 marks]

Explain the terms plaintext, ciphertext and symmetric key cryptography.

Q2 · explain[4 marks]

A customer sends their bank details to an online shop. Describe how asymmetric encryption keeps the details private during transmission.

Q3 · explain[3 marks]

A government department publishes an announcement and wants the public to be confident it is genuine. Explain how a key pair is used.

Q4 · analysis[3 marks]

Compare symmetric and asymmetric encryption, giving one advantage of each.

Q5 · explain[4 marks]

Describe the purpose of quantum cryptography and how it detects an eavesdropper.

Q6 · analysis[4 marks]

A company is considering quantum cryptography for links between its offices in two countries. Give two benefits and two drawbacks.

Answer key and marking notes
Q1 · 3 marks
  • Plaintext: the original data before encryption, which can be read and understood.
  • Ciphertext: the data after an encryption algorithm and key have been applied, which cannot be understood without the key.
  • Symmetric key cryptography: the same secret key is used both to encrypt and to decrypt the data.
Q2 · 4 marks
  • The shop generates a key pair and publishes its public key; the private key is kept secret by the shop.
  • The customer’s software encrypts the details using the shop’s public key.
  • The ciphertext is sent; if it is intercepted it cannot be understood.
  • Only the shop’s private key can decrypt it, so only the shop can read the details.
Q3 · 3 marks
  • The department encrypts the announcement (or a digest of it) with the department’s private key.
  • Members of the public decrypt it with the department’s public key.
  • Because only the department holds the private key, successful decryption proves the announcement came from the department.
Q4 · 3 marks
  • Symmetric uses one shared secret key; asymmetric uses a linked public and private key pair.
  • Symmetric advantage: much faster, so suitable for large volumes of data.
  • Asymmetric advantage: no secret key needs to be sent, which solves the key distribution problem.
Q5 · 4 marks
  • Purpose: to distribute an encryption key securely (quantum key distribution).
  • The key is sent as a stream of photons, each polarised to represent a bit.
  • Measuring a photon changes its quantum state, so an eavesdropper introduces errors.
  • Sender and receiver compare part of the key; a high error rate shows eavesdropping and the key is discarded.
Q6 · 4 marks
  • Benefit: any interception of the key is detected.
  • Benefit: security depends on physics, so it is not broken by faster or quantum computers; long keys can be changed frequently.
  • Drawback: needs expensive dedicated hardware and a fibre or line-of-sight link.
  • Drawback: limited range because photons degrade over long distances (relays needed between countries), a low key rate, and polarisation can change in transit causing errors.
Quiz

6 multiple-choice questions on this lesson

From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.

Q11 mark

What is the main drawback of symmetric key cryptography?

  • AThe one secret key must reach the receiver safely, and anyone who intercepts it can read every message
  • BIt is too slow to encrypt large amounts of data, such as a whole video file
  • CData encrypted with the public key cannot be decrypted with the same key
  • DThe ciphertext can be decrypted by anyone who knows the encryption algorithm
Q21 mark

A patient sends test results to a clinic and wants only the clinic to be able to read them. Which key encrypts the results, and which key decrypts them?

  • AEncrypt with the clinic’s public key; decrypt with the clinic’s private key
  • BEncrypt with the patient’s private key; decrypt with the patient’s public key
  • CEncrypt with the clinic’s private key; decrypt with the clinic’s public key
  • DEncrypt with the patient’s public key; decrypt with the clinic’s private key
Q31 mark

A government agency publishes a public notice encrypted with the agency’s private key. What does this achieve?

  • AAnyone can decrypt it with the agency’s public key, which proves the notice came from the agency
  • BOnly the agency can decrypt it, so the notice stays confidential
  • COnly people who hold the agency’s private key can read the notice
  • DIt cannot be decrypted, so it cannot be altered by anyone
Q41 mark

How does quantum key distribution reveal that an eavesdropper has intercepted the key?

  • AMeasuring a photon changes its quantum state, so the parties find a raised error rate when they compare part of the key
  • BThe eavesdropper must break the RSA encryption on each photon, which leaves a record
  • CEach photon carries the sender’s digital signature, which fails if the photon is read
  • DTapping the fibre-optic cable cuts the connection, so the transfer stops
Q51 mark

A toy key pair uses n = 33, public key e = 3 and private key d = 7 (ciphertext = plaintexte MOD n). The value 4 is encrypted with the public key. What is the ciphertext, and what does decrypting it with the private key give?

  • A31, which decrypts to 4
  • B16, which decrypts to 4
  • C64, which decrypts to 4
  • D12, which decrypts to 4
Q61 mark

Ana wants to send Ben a contract that only Ben can read and that Ben can prove came from Ana. Which method achieves both?

  • AAna signs a digest with her private key, then encrypts contract and signature with Ben’s public key
  • BAna encrypts the contract with her private key, then sends it to Ben in plaintext form as well
  • CAna encrypts the contract with Ben’s public key only, as that also proves who sent it
  • DAna encrypts the contract with her public key, so Ben decrypts it with Ana’s private key
Quiz key
Q1: A

In symmetric cryptography the same key encrypts and decrypts, so it has to be distributed to the receiver first: the key distribution problem. Symmetric algorithms are fast, which is why they are used for bulk data. Public keys belong to asymmetric cryptography. Knowing the algorithm is not enough to decrypt; the key is also needed.

Q2: A

Anyone can use the clinic’s public key to encrypt, but only the clinic holds the matching private key, so only the clinic can decrypt. Encrypting with the patient’s private key proves who sent it but anyone with the patient’s public key could read it. The clinic’s private key is never given to patients. Keys from two different pairs do not work together.

Q3: A

Data encrypted with a private key can be decrypted only by the matching public key, which anyone can obtain, so the notice is readable by all; because only the agency holds the private key, successful decryption verifies the agency sent it. It is not confidential, since everyone has the public key. The private key is never shared. It can be decrypted, so it is not unreadable.

Q4: A

Each bit is sent as a polarised photon; an eavesdropper who measures photons disturbs them, introducing errors that show up when sender and receiver compare a sample of the key, so the key is discarded. QKD does not depend on RSA or on digital signatures attached to photons. A tap does not have to cut the link; the point is that reading the photons is detectable.

Q5: A

43 = 64 and 64 MOD 33 = 31, so the ciphertext is 31; 317 MOD 33 = 4, recovering the plaintext. 16 is 47 MOD 33, using the private key to encrypt. 64 forgets the MOD 33 step. 12 multiplies 4 by 3 instead of raising it to the power 3.

Q6: A

Ana’s private key proves origin (Ben checks the signature with Ana’s public key), and Ben’s public key gives confidentiality (only Ben’s private key decrypts). Encrypting with Ana’s private key and also sending plaintext gives authenticity but no privacy. Ben’s public key alone gives privacy but anyone could have used it, so it proves nothing about the sender. Ben never has Ana’s private key.

Lab and demo

What to project

The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.

Slides

Slides for this lesson

A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.

Also for this topic

Everything else you can use

Original work by the TheLucidSTEM team. The worksheet items are written in the style of the papers; no past paper question is reproduced.