Ciphering a sentence
About this lesson
A cipher is a message that has been written in such a way (encoded) that it is unreadable by others. In this lesson, students will use mapping to encode a sentence. Students will work with a partner to create an algorithm that describes the encryption process. They will also examine encoded and decoded messages to recognize patterns to help decode messages and develop strategies to decompose the problem.
Year band: 3-4, 5-6
Curriculum LinksCurriculum Links
Links with Digital Technologies Curriculum Area
Strand | Year | Content Description |
---|---|---|
Processes and Production Skills | 3-4 |
Define problems with given design criteria and by co-creating user stories (AC9TDI4P01) Follow and describe algorithms involving sequencing, comparison operators (branching) and iteration (AC9TDI4P02) |
Processes and Production Skills | 5-6 |
Design algorithms involving multiple alternatives (branching) and iteration (AC9TDI6P02) |
Links with English Curriculum Area
Strand | Year | Content Description |
---|---|---|
Language: Phonics and word knowledge | 3-4 |
Understand how to apply knowledge of letter-sound relationships, syllables, and blending and segmenting to fluently read and write multisyllabic words with more complex letter patterns (ACELA1826) Understand how to use phonic knowledge to read and write multisyllabic words with more complex letter combinations, including a variety of vowel sounds and known prefixes and suffixes (ACELA1828) |
Language: Phonics and word knowledge | 5-6 |
Understand how to use phonic knowledge to read and write less familiar words that share common letter patterns but have different pronunciations (ACELA1829) Understand how to use phonic knowledge and accumulated understandings about blending, letter-sound relationships, common and uncommon letter patterns and phonic generalisations to read and write increasingly complex words (ACELA1830) |
Assessment
Student self-assessment task
Consider the commands used to move the Bee-Bot. Students complete a simple cloze activity to evaluate understanding:
Bee-Bots travel ______cm each time they move one step. The arrow keys at the front and back are used to program the Bee-Bot to move __________ or _____________. The arrow keys on each side are used to program the Bee-Bot to move __________ or ____________. I can start a new program by pressing the ___________ button.
Learning sequence
- Learning hook: Forming a strategy (10 minutes)
- Learning demonstration: Create the alphabet mapping (25 minutes)
- Learning construction: Encode sentences (20 minutes)
- Learning reflection: Analysis and reflection (20 minutes)
- Additional information and resources
- Additional Resources
Learning hook: Forming a strategy (10 minutes)
In this activity, students will think about strategies for sending messages that are guaranteed to be private.
Pretend that you want to send a private message to a friend. The only way you can deliver the message is to write it on a board that is observable by anyone who passes by. What could you and your friend do to ensure that you are the only people who can understand the message?
Think-Pair Share: Instruct students to think for one minute about how they might accomplish the task. Then pair students to discuss their ideas and to agree by consensus on a strategy that would work. After 2 or 3 minutes, invite students to share their ideas in a large group discussion.
Learning demonstration: Create the alphabet mapping (25 minutes)
In this activity, students write rules for mapping and reordering the alphabet for encoding messages to create an algorithmic cipher.
Activity:
Use the rules below to create ciphers.
Create two rules for mapping the alphabet.
Sample rules:
- The characters are divided into two groups: (1) characters for which the image of their uppercase form has an enclosed area (such as P or O) and (2) characters that do not have an enclosed area in in the image of their uppercase form (such as I or Z).
- Sort the two groups alphabetically, with group 1 first and then group 2.
Apply the rules.
Applying rule 1:
Group 1: {A, B, D, O, P, Q, R}
Group 2: {C, E, F, G, H, I, J, K, L, M, N, S, T, U, V, W, X, Y, Z}
Applying rule 2:
A, B, D, O, P, Q, R, C, E, F, G, H, I, J, K, L, M, N, S, T, U, V, W, X, Y, Z
Place the letter sequence that resulted from Rule 2 in the second row of the following table beneath the number 1 to 26 (example completed below).
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
This table shows a one-to-one alphabet mapping (matching one letter with one number), Alphabet Mapping #1.
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
A | B | D | O | P | Q | R | C | E | F | G | H | I |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
J | K | L | M | N | S | T | U | V | W | X | Y | Z |
Now, invent a third rule and apply it to the above mapping to come up with another one-to-one alphabet mapping table. A third rule could be to place the even-number-mapped letters in alphabetical order followed by the odd-number-mapped letters in alphabetical order. Let’s call that Alphabet Mapping #2.
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
B | O | Q | C | F | H | J | L | N | T | V | X | Z |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
A | D | P | R | E | G | I | K | M | S | U | W | Y |
Teaching Tips:
- With older or more advanced groups, present the above steps to the class as an example in a large group before breaking students into pairs to create their own alphabet mappings.
Learning construction: Encode sentences (20 minutes)
In this activity, students will use the algorithm mappings from the Learning demonstration section to encode sentences.
Activity:
Divide students in groups of two and tell them the following:
- Think of a simple message you would like to send to your partner.
- Encode it three times: first use just Alphabet Mapping #1, then use just Alphabet Mapping #2, and then use both mappings from the previous activity.
For example, if the sentence is:
We drove to the gym.
Using the Alphabet Mapping #1, we find each letter of the sentence in the second row of the table created in Activity 1. We replace the letter with the corresponding number in the first row.
Please note that one must place letter breaks (the character “_”) and separate each word by a blank space. In this example, the encoded sentence is:
23 9 3 7 4 22 9 20 4 20 12 9 11 25 17
Teaching Tips:
- If students created their own mappings in the previous activity, have them use those mappings in this activity.
Learning reflection: Analysis and reflection (20 minutes)
In this activity, students will decompose their own ciphers, how ciphers might be represented with a computer program, and some of the issues in breaking and designing ciphers (recognizing patterns).
Activity:
Tell students to discuss and record answers to the following questions in their journals with their partners.
- Which Alphabet Mapping (1 or 2) is easier to use to encode a message?
- Are the rules used for Alphabet Mapping #1 clear and easy to understand? How could you improve the rules?
- Is your new rule for Alphabet Mapping #2 clear and easy to understand? How could you improve your rule?
- How would you implement your cipher in a computer program? Could you break down the problem and write the sequence of steps (an algorithm) that describes the process?
- Imagine that another person gives you an encoded message and you do not know the mapping tables. How would you go about deciphering or decoding the sentences? What patterns would you look for to help you discover the one-to-one mapping?
- If someone wants to come up with a cipher that is very difficult to for others to decode, what are some of the strategies that he or she should consider to break down the problem (decomposition)?
Assessment:
- Collect students’ reflections. Assess for thoughtful, complete responses.
Additional information and resources
Lesson Vocabulary
Concept | Definition |
---|---|
Algorithm Design | Creating an ordered series of instructions for solving similar problems |
Pattern Recognition | Observing patterns and regularities in data |
Decomposition | Breaking down data, processes or problems into smaller, manageable parts |
Computational Thinking concepts
Term | Definition | For Additional Information |
---|---|---|
Encryption | The process of encoding messages or information in such a way that only authorized parties can read it | http://en.wikipedia.org/wiki/Encryption |
Decryption | The process of decoding messages or information in such a way that only authorized parties can read it | http://en.wikipedia.org/wiki/Encryption |
Cipher | An encoded/encrypted message | http://en.wikipedia.org/wiki/Cipher |
Algorithm | A step-by-step set of operations performed to solve a problem | http://en.wikipedia.org/wiki/Encryption |
Additional Resources
- Visit http://pencilcode.net/ to explore the Pencil Code development environment.
- See Pencil Code: A Programming Primer for more than 100 example programs written in CoffeeScript