1, 2, 3, code ! - Cycle 3 activities - Lesson 3.4. How to ensure a message is secure


To protect their messages, students learn about encryption using a simple algorithm (called Caesar’s Cipher), which involves shifting the letters of a message.

Key ideas
(see Conceptual scenario)


  • Encrypting a message means transforming it so that only the person to whom it is sent can understand it.
  • Caesar’s Cipher is an easy method to use, but it is also easily decrypted. 

Inquiry-based methods



For each student

For each group

  • Handout 46 (only if the teacher chooses to do the extra activity, where students make a tool to encrypt and decrypt a message)




1 hour 30 minutes


Introductory question

The teacher tells the class about the space mission: “The discovery team needs to communicate regularly with base. The base is also in permanent communication with the Earth. But we have to be sure that the messages can’t be intercepted by hostile powers that might spy on our results and endanger the team’s safety. What can we do to help them?”

The class discusses different ways of maintaining confidentiality: the words “secret language” and “coded language” very quickly emerge. Here, there is a risk that students confuse the “coding” presented in the previous lessons (in the sense of binary code) and the use of the word here (in the “encrypted” sense). The teacher explains the new term, “encrypted language”. Encryption means changing a text to make it less intelligible, so that non-authorized persons cannot access the content of the text. (In terms of vocabulary, see the scientific note in Lesson 1.2 “How to encode a message with numbers”)


Experiment: Decrypt the explorers’ message (as a class activity)

The teacher hands out the encrypted sentence on Handout 44 to students: “Here is a message sent by the explorers to the base. Can you decrypt this message?”

Teaching note:

To make the encryption simpler and focus on the method rather than the result, we will not include punctuation.

The class quickly figures out that the message is written backwards. By reading from right to left, we can discover the content:


The class will have noticed how easy it was to “break” this first encryption. Encryption in “mirror writing” is therefore not very secure. We will now study a slightly more complicated encryption method, one of the first to be used in history.


Experiment: Decrypt the message from the base (as a class activity)

The teacher gives each student Handout 45. “In response to the alarming message from the explorers, the base replied the following. Can you decrypt this message?”

It is clear, this time, that the message is not encrypted with “mirror writing”. If the students struggle to decrypt this message, the teacher can gradually give them pointers, in several ways:

  • What are the shortest words? What might they correspond to in English? The shortest word in the English language is “a”. There are also some two-letter words (to, on, in, as, if, at, etc.).
  • What is the most commonly used letter in a written text in English? (answer: the letter E). What about in this example?

In the ciphered text, the most commonly used letter is H. We can therefore suppose that “H” systematically replaces all the ‘E’s in the initial message.


The cipher used here, called the Caesar Cipher, shifts all letters in the alphabet three spaces forward: A become D, B becomes E, C becomes F, E becomes H, X becomes A, Z becomes C. This is also known as cyclic permutation. Decrypted, the message becomes:


Scientific notes:

  • Caesar’s Cipher takes its name from Julius Caesar, who used it for his secret communications during the Gallic Wars.
  • The key to this code is the shifting of letters. In Caesar’s Cipher, the letters are all shifted by a certain number (the key). In the example used, the key is +3, which means that, to encrypt the message, we just need to move all letters 3 places forward in the alphabet (A becomes D, B becomes E, W becomes Z, X becomes A, Y becomes B, etc.).
  • With a key of 0, the letters do not shift, and therefore the encrypted message is identical to the original. With a key of -3, the letters shift in the other direction (A becomes X, B becomes Y, etc.) which is how we decrypt a message encrypted with the key +3.


Experiment: finding other forms of encryption (in groups)

The third part of this lesson lets students reuse the key ideas dealt with thus far. The teacher suggests: “Now, in groups, you must improve Caesar’s Cipher to scramble your messages.” Firstly, the students try to encrypt and decrypt short messages that they invent. Next, the groups exchange encrypted messages and try to break the encryption key to their neighboring groups’ messages.

Scientific note:

There are many encryption methods. It is likely that the students’ first attempts will be to change the key of Caesar’s Cipher. A variation on Caesar’s Cipher that may emerge during the experiments would be a variable key that follows a very specific pattern. For example, the first letter of the message might be shifted +1, the second +2, the third +3, and the fourth will be back to +1, the fifth +2, and so on. There are infinite possibilities. The students might also think of deleting spaces, which prevents short words from being spotted and therefore makes identifying the key used in Caesar’s Cipher more difficult.


Group discussion

One student per group stands up to present the encryption method that their group invented. The class then discusses the reasons why their encryptions were easy or difficult to break. This allows student to gradually see that there are several encryption strategies. The class could possibly invent a common encryption and write a short text that you can send around neighboring classes to test its strength.


Conclusion and lesson recap activity

The class summarizes together what they learned in this lesson:

  • Encrypting a message means transforming it so that only the person to whom it is sent can understand it.
  • Caesar’s Cipher is an easy method to use, but it is also easily decrypted.

Students write down these conclusions in their science notebook. The teacher updates the "Defining computer science" poster.


Further study

  • Documentary study on Alan Turing is highly appropriate after working on encryption. He directed the team that broke the famous Enigma, the Nazis’ secret code, contributing to the development of the machines that preceded computers. Read more about this topic on page XX.
  • Create encryption and decryption tools:
  1. First type of tool: a cylinder with wheels that spell out the alphabet. In the image below, strips measuring 138x5 mm are printed with all letters of the alphabet from A to Z, then wrapped around a cardboard roll. The strips are taped to themselves, and not to the cardboard, so that the roll can be used as an axis. By turning the wheels, we can rapidly encrypt and decrypt a message. Here, CAESAR’S CIPHER (which can be read on the central line) becomes “FDHVDU  V  FLSKHU”, and so on.

  1. Second type of tool: a slider system, with strips laid next to each other. Each strip has the alphabet printed twice. Using a ruler, the sliders can be aligned to reveal the message. Then we slide the ruler vertically in one direction and the other to read the encrypted message.

  • Third type of tool: two concentric discs attached with a brass fastener. Around the edges of the discs, the alphabet letters are placed. By pivoting one disc, it is easy to quickly encrypt and decrypt any letter.

Kévin Faix’s 4th grade class (Le Kremlin Bicêtre)



<< Lesson 3.3 Sequence III Lesson 3.5 >>


Project partners

Aucun résultats