Secret Messages

In this activity, you will write and decode secret messages and learn about simple substitution ciphers.

Messages sent across the Internet need to be secure so that they can't be read by computers along the way.

Creating an Encoding Scheme

  1. Write a secret message, invent some way of encoding the message, and then give the encoded message to someone else.
  2. Talk with Your Partner
  3. Try to decode the message you receive. What strategies are you using to decode it?
  4. With other students, compare the methods you used to encode your messages. Was anyone able to decode the message they received? If so, how?
  5. If anyone wasn't able to decode the message they received, discuss how to decode that message and then let them decode it.

Caesar Cipher

One way to encode a message is with a Caesar cipher (named for Julius Caesar), which is also know as a shift cipher.

To encode a message with a Caesar cipher:

  1. Write out the alphabet. Then write it again just below, but start with the A under a different letter and wrap around to the beginning when you reach the end. For example, this is a shift of 3:
    ABCDEFGHIJKLMNOPQRSTUVWXYZ
    DEFGHIJKLMNOPQRSTUVWXYZABCThis is the key.
    I always find it sad when an image is of text, even when it has alt text (since the font change and aliasing is jarring). Why not use a table tag or ← ? For KA, I used a table --Pamela

    To revisit next time. --MF, 10/2/21

  2. For each letter in your secret message, find the letter in the top row, and then write down the letter below it.

To decode a message: find each letter from the coded message in the second row (in the key) and write down the letter above it.

Why not have them do an encoding activity as well? -PF 9/25/21

We do below, no? Are you looking for something else? Decoding a specific message with a specific shift value? I thought that would be less fun. --MF, 10/2/21

Re encoding activity- there's no forYouToDo after the description of encoding a message, that's what I meant. There is a forYouToDo for decoding messages. --Pamela's email

I thought might be nice to decode first, but we can discuss next time around. --MF, 10/3/21

  1. Decode this message using the Caesar cipher key shown above:
    FDHVDU'V PHVVDJHV ZHUHQ'W YHUB VHFXUH.
  2. The following message was also encoded using a Caesar cipher but with a shift of 11 instead of a shift of 3. Write out a key for messages with a shift of 11, and then decode this message:
    SZH NZFWO JZF XLVP L MPEEPC NTASPC?
  3. Write a secret message, choose a Caesar cipher shift value, write a key for that shift value, encode the message with that key, and give the encoded message to another student to decode. If they want an extra challenge, do not give them the shift value or the key.
  1. This message was also made with a Caesar cipher. Can you decode it?
    YRJFUCH NI SIOL WFUMMGUNYM BIQ SIO XYWIXYX NBCM GYMMUAY.
    Talk with Your Partner
  1. Discuss how to decode a Caesar cipher even if you don't know the shift.
  2. How could you encode a message more securely?

Other Simple Substitution Ciphers

The Caesar cipher is one kind of simple substitution cipher that is particularly easy to encode and decode. But simple substitution ciphers don't have to substitute letters in order. Here is a more secure example of a substitution cipher:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
PQVFUBZOTHWYELIXRNAMGDSCKJThis is the key.

  1. Decode this message using the simple substitution cipher shown just above:
    VTXOUNA PNU UPAK MI VNPVW.
  2. Write another secret message, create a simple substitution cipher key, encode the message with that key, and give the encoded message to another student to decode. If they want an extra challenge, do not give them the key.
    Talk with Your Partner
  1. If you intercepted a message that was created with a simple substitution cipher, how might you decode it without knowing the key?
  2. What are some ways the sender and receiver could make the encryption more secure than a simple substitution cipher?
In this activity, you learned about Caesar ciphers and the more general simple substitution cipher, and you decoded and encoded messages using both ciphers.