Skip to main content

Computer Science · Encryption Unit · Session 2 of 8

One key, shared by both sides — and a 1980s garage door that got it badly wrong.

Symmetric encryption is the oldest and simplest idea in this unit: the same key locks and unlocks the message. It's also exactly what a cheap 1980s garage door remote used — with twelve tiny switches standing in for the key. Comparing that remote to a modern one shows both what symmetric encryption gets right, and the one big problem it can't solve on its own.

Two hands, each holding an identical key, held up against a blue sky.
Photo: MinuteKEY / Unsplash

Executive summary

Goal: explain how symmetric (shared-key) encryption works, name AES as the current standard, and identify the "key exchange problem" it creates.

TimeSegment
0–10 minDiagnostic: the garage door problem
10–30 minExplaining symmetric encryption and AES
30–45 minWorked example: dip switches to rolling codes
45–55 minActivity: strengths and limits of a shared key
55–60 minExit question and key terms

Before you start​

Symmetric encryption: one key, both directions​

Symmetric encryption uses exactly one key to both encrypt and decrypt. Whoever holds that key can turn plaintext into ciphertext, and whoever holds a copy of the same key can turn it back. It's called "symmetric" because the process is identical in both directions — nothing changes depending on which way you're going.

The current, internationally trusted standard for this kind of encryption is AES (Advanced Encryption Standard). AES is not a company's private invention — it was selected in 2001 by the US National Institute of Standards and Technology (NIST) after an open competition, and it's now used enormously widely: it secures Wi-Fi traffic (as part of WPA2 and WPA3), encrypts files on phones and laptops, and protects data at rest for banks and cloud providers, including services like Amazon Web Services, which offers AES encryption by default for stored customer data. Session 7 looks at whether AES will stay trustworthy as computing power increases.

Activity: strengths and limits​

Answer both parts for each scenario:

  1. A school issues every staff member a USB drive with the same encryption password, to protect files if the drive is lost.
  2. Two spies agree on a shared codeword before a mission begins, then use it for every message during the mission.

For each: (a) is this symmetric encryption, and why? (b) what happens if the shared key/password/codeword is ever discovered by someone else?

Reveal model answers and check your work
  1. Yes — one shared key (the password) both encrypts and decrypts every drive. If it leaks, every drive issued with that password is compromised at once, not just one.
  2. Yes — a shared codeword is a symmetric key by another name. If the codeword is intercepted or one spy is compromised, every past and future message using that codeword is readable to whoever has it — and there's no way to tell the other party "the key is compromised" without a way to reach them securely, which is the same key-exchange problem the garage door example ran into.

Exit question​

Explain, in your own words, why a fixed-code garage door remote from the 1980s was vulnerable to a replay attack, and how a modern rolling-code remote prevents it — while still being an example of symmetric encryption.

Key terms

  • symmetric encryption
  • shared key
  • AES
  • replay attack
  • rolling code
  • key exchange problem
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8