3-5.NI.6 - Create patterns to protect information from unauthorized access.
Encryption is the process of converting information or data into a code, especially to prevent unauthorized access. At this level, students use patterns as a code for encryption, to protect information. Patterns should be decodable to the party for whom the message is intended, but difficult or impossible for those with unauthorized access.
One of the crosscutting concepts of the Next Generation Science Standards is Patterns. In Science, patterns often lead to classification through similarities and differences among objects. Once patterns are discovered, they often lead to questions as to why the patterns exist in the first place and explanations for them.
The ways in which data are represented can facilitate pattern recognition and lead to the development of a mathematical representation, which can then be used as a tool in seeking an underlying explanation for what causes the pattern to occur. Although typically students identify patterns within data to gain more insight, using patterns can be used
Mathematical Practice 7 has students "Look for and make use of structure." Mathematically proficient students look closely to discern a pattern or structure in math. It is through this pattern recognition that it will help students see a complex problem as being comprised of several smaller ones.
When it comes to methods of encryption students could apply a function repeatedly to data in order to encrypt it. The more complex function the more difficult it would be to decrypt it.
When exploring CS Standard 3-5.NI.6, students can take what they have learned in math and apply it for basic encryption. Consider these 4th and 5th math standards and how an input can generate a new output:
Generate and analyze patterns. 4.OA.5. Generate a number or shape pattern that follows a given rule. Identify apparent features of the pattern that were not explicit in the rule itself. For example, given the rule “Add 3” and the starting number 1, generate terms in the resulting sequence and observe that the terms appear to alternate between odd and even numbers. Explain informally why the numbers will continue to alternate in this way.
Analyze patterns and relationships. 5.OA.3. Generate two numerical patterns using two given rules. Identify apparent relationships between corresponding terms. Form ordered pairs consisting of corresponding terms from the two patterns, and graph the ordered pairs on a coordinate plane. For example, given the rule “Add 3” and the starting number 0, and given the rule “Add 6” and the starting number 0, generate terms in the resulting sequences, and observe that the terms in one sequence are twice the corresponding terms in the other sequence. Explain informally why this is so.
In 5th grade, it can be taken a step further with math standard 5.OA.1, (Use parentheses, brackets, or braces in numerical expressions, and evaluate expressions with these symbols.)
Students can create a cipher by assigning numbers to each letter either sequentially or randomly. Then students create, or are given, an expression with a missing number to use for encryption. To encrypt a word, students translate the letters to the assigned numbers. Then they use those numbers to evaluate the expression. The results will be new numbers that now leave the word encrypted. Students can decrypt the numbers by following the opposite process.
For example, students could create encrypted messages via flashing a flashlight in Morse code. Other students could decode this established language even if it wasn’t meant for them. To model the idea of protecting data, students should create their own variations on or changes to Morse code. This ensures that when a member of that group flashes a message only other members of their group can decode it, even if other students in the room can see it (CA NGSS: 4-PS4-3).
Alternatively, students could engage in a CS Unplugged activity that models public key encryption: One student puts a paper containing a written secret in a box, locks it with a padlock, and hands the box to a second student. Student 2 puts on a second padlock and hands it back. Student 1 removes her lock and hands the box to student 2 again. Student 2 removes his lock, opens the box, and has access to the secret that student 1 sent him. Because the box always contained at least one lock while in transit, an outside party never had the opportunity to see the message and it is protected.