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

Safe connections and secret codes

Week 14 · Unit 7.3: Connections are made · 3 lessons
3

Secret messages

Computing 7: Unit 7.3, pp. 82–111
GoalExplain how encryption protects data and use Caesar and substitution ciphers on paper.
New words
encryption · scrambling data so that only the right device or person can read itplaintext · a message before it is encrypted, which anyone can readcipher text · the scrambled message after it is encryptedCaesar cipher · a cipher that moves every letter along the alphabet by the same number of places
Explanation

Encryption scrambles a message so that only the right person can read it. The original message is plaintext and the scrambled message is cipher text. A method, called an algorithm, and a secret key turn one into the other. In a Caesar cipher, each letter moves along the alphabet by the same number of places, and that number is the key. With shift 3, A becomes D, B becomes E, and Z wraps round to C. To decrypt, move each letter back by the shift. A substitution cipher swaps each letter for a different letter from a table, so the table is the key. Someone who intercepts the cipher text cannot read it without the key.

plainsecretADBECFDGEHFIGJHKILJMKNLOMPplainsecretNQORPSQTRUSVTWUXVYWZXAYBZC
Worked examples
plainsecretADBECFDGEHFIGJHKILJMKNLOMPplainsecretNQORPSQTRUSVTWUXVYWZXAYBZC
Encrypt SAFE with shift 3: S becomes V, A becomes D, F becomes I and E becomes H. The cipher text is VDIH.
Cipher textKHOS
back 3 placesHELP
Decrypt KHOS with shift 3. Move each letter back by 3: K goes back to H, H goes back to E, O to L and S to P. The plaintext is HELP.
plainABCDEFGHIJKLM
secretZEBRASCDFGHIJ
plainNOPQRSTUVWXYZ
secretKLMNOPQTUVWXY
A substitution cipher uses a table. This table was made from the keyword ZEBRAS followed by the other letters. With it, BOOK becomes ELLH.
Class activity

Cipher strip (no computer): cut two strips of paper and write the alphabet on both, with equal spacing. Slide the lower strip three places to the left so that A sits under D. Use the strips to encrypt a short word, then ask a partner to decrypt it by sliding back. Next make a new key, shift 5, and write a message of three words. Swap with a partner and decode each other’s messages. Say why a stranger who finds the strip could read your messages, and what you would change to keep the key secret.

Practice
1
Encrypt the word BREAD with a Caesar shift of 5.
plainsecretABCDEFGHIJKLMplainsecretNOPQRSTUVWXYZ
2
Decrypt ICTFGP, which was encrypted with a Caesar shift of 2.
plainsecretABCDEFGHIJKLMplainsecretNOPQRSTUVWXYZ
3
This table is a different substitution key. Use it to decrypt LZBHL.
plainABCDEFGHIJKLM
secretJFWIHYOTZSNXP
plainNOPQRSTUVWXYZ
secretQAGVLDRCBUMEK
4
Why is a Caesar cipher easy to break, and why does a website using HTTPS need a much stronger method?