AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Term 3 review

Week 30 · Review: Term 3 · 3 lessons
1

Codes and ciphers

Computing 3: Units 9–12, pp. 135–193
GoalReview how ciphers keep messages secret and use four kinds of code.
New words
cipher · a set of rules that turns plain text into ciphertextplain text · a message that anyone can readciphertext · a secret message that only people who know the rule can read
Explanation

A cipher is a set of rules that turns plain text into ciphertext. Only the sender and the receiver know the rule. The sender encodes the message, and the receiver decodes it with the same rule. The flip text cipher writes the whole message backwards. A picture code swaps each letter for a picture. A number code swaps each letter for its place in the alphabet, with two digits. A shift code slides the alphabet along, and Z wraps round to A. If a rule is found out, the team agrees a new one. We never put private details such as passwords in a message without a trusted adult.

CodeRuleThe word “bus”
flip textwrite the message backwardssub
number codeletter → place in the alphabet02 21 19
shift code, shift 2move each letter 2 places ondwu
picture codeletter → a picturethree pictures
Worked examples
Plain textCiphertext
stay hereereh yats
Encode “stay here” with the flip text cipher. Start from the last letter, and go back to the first. The ciphertext is “ereh yats”.
NumberLetter
08H
15O
13M
05E
Decode the number code 08 15 13 05. 08 is H, 15 is O, 13 is M and 05 is E, so the message is HOME.
plainsecretAEBFCGDHEIFJGKHLIMJNKOLPMQplainsecretNROSPTQURVSWTXUYVZWAXBYCZD
Encode OWL with a shift of 4. O becomes S, W goes four places on, past Z, and wraps round to A, and L becomes P. The ciphertext is SAP.
Class activity

Code relay (in two teams): each team chooses one of the codes (flip text, number code or shift code) and writes a short message in ciphertext on a card. The other team has to crack it. If they cannot, the first team tells them the rule. Then each team changes its rule slightly, for example from shift 2 to shift 3, and sends a new message. Why did you change the rule? Who should know it?

Practice
1
Encode GATE with a shift of 1.
plainsecretABCDEFGHIJKLMplainsecretNOPQRSTUVWXYZ
2
Decode this flip text ciphertext.
Ciphertext
yad ecin a
3
Write BEE and FISH in the number code with two digits for each letter.
4
Which of these should never be put in a message without asking a trusted adult first, even in a code: a password · “see you at three” · “I like football”?