GoalExplain why the sender and the receiver must use the same rule, and what to do if a rule is found out.
New words
sender · the person who sends the messagereceiver · the person who gets the messagecrack · to work out a cipher without being told the rule
Explanation
A cipher only works if the sender and the receiver both know the same rule. The sender encodes the message with the rule. The receiver decodes it with the same rule. If the receiver uses a different rule, the message still comes out wrong. A person who does not know the rule can try to crack the cipher by looking for patterns. That is why a rule is only told to the people who should know it. If a rule is found out, the team agrees on a new one. A password is a secret too: we tell it only to a parent or a carer.
Worked examples
Who
What they do
The message
Nodira
encodes: flips the whole message
etik eht gnirb
Amir
decodes: flips the whole message again
bring the kite
Nodira sends “bring the kite” to Amir. She uses the flip text cipher, so she writes “etik eht gnirb”. Amir flips the whole message again and reads “bring the kite”. The rule is the same on both sides.
Step
Result
Nodira flips the whole message
etik eht gnirb
Amir flips each word on its own
kite the bring
What if the rule is different? Amir flips each word on its own instead. Then he reads “kite the bring”. All the letters are right, but the words are in the wrong order, so the message is spoiled.
Rule
“bring the kite” becomes
old: flip the whole message
etik eht gnirb
new: flip each word
gnirb eht etik
The friends find out that someone has seen their rule. They agree on a new one: flip each word on its own, and keep the words in order. “bring the kite” now becomes “gnirb eht etik”.
Class activity
Secret club (in a group of three or four): choose one player to be the outsider, who waits outside the door. The others agree on the flip text cipher and write a short message in ciphertext on a card. The outsider comes back and tries to crack it. Then the club changes the rule to “flip each word” and writes a new message. Talk about it: why did the club change the rule? Who should know the new rule?
Practice
1
Who should know the rule of a cipher?
The sender and the receiver, and nobody else.
2
Sara encodes “go to the park” with the flip text cipher. What does she write? Omar flips each word on its own. What does he read?
Plain text
Sara writes
Omar reads
go to the park
?
?
Sara writes “krap eht ot og”. Omar reads “park the to go”, which is the right words in the wrong order.
3
The team finds out that the rule is no longer a secret. What should they do?
Agree a new rule and tell it only to the team.
4
Ali wants to tell a friend his password in a secret message. Is that a good idea?
No. A password is only told to a parent or a carer. A cipher does not make it safe to share.