Cybersecurity Fundamentals
Lesson 2 of 3 9 min +60 XP

Cryptography Basics

Turning secrets into scrambled text.

What you'll learn

  • Explain what encryption does
  • Encode a message with a shift cipher
  • Understand why key length matters
The secret decoder ring

Kids pass notes using a decoder ring that shifts each letter — anyone without the ring sees gibberish. Cryptography is a vastly stronger version: scrambling a message so only someone with the right key can read it.

Scrambling and unscrambling

Encryption transforms readable plaintext into scrambled ciphertext using a key. Only someone with the right key can reverse it. The Caesar cipher — shifting each letter a fixed amount — is the oldest example, and it shows why weak keys fail.

Simulation · Caesar cipher encoder
DWWDFN DW GDZQ

Each letter slides 3 places down the alphabet. Only 26 keys exist — that's why Caesar is easy to crack.

Type a message and slide the shift. With only 25 possible keys, an attacker can simply try them all.

Lab · Break the cipher
  1. Encode a short word with a shift of 3.
  2. Now imagine you don't know the shift — how many would you have to try?
  3. Increase the shift and confirm the ciphertext changes.

What you should see: There are only 25 non-trivial shifts, so brute force cracks a Caesar cipher instantly. Real cryptography uses keys with astronomically many possibilities.

Knowledge Check

+15 XP / correct

1. Encryption converts plaintext into…

2. A Caesar cipher is weak because…