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

Breakdowns and secret keys

Week 22 · Unit 9: Be a code cracker · 3 lessons
2

Plain text and ciphertext

Computing 4: Unit 9, pp. 123–137
GoalExplain encryption, plain text, ciphertext and keys, and use a key to encrypt and decrypt a short message.
New words
encryption · changing a message so that only people who have the key can understand itplain text · a message before it is encryptedciphertext · a message after it has been encryptedkey · the secret that tells you how a message was changed
Explanation

Encryption means changing a message so that only the right people can understand it. The message before it is changed is plain text. After it is changed, it is called ciphertext. A key tells you how the message was changed. With the key, the receiver can decrypt the ciphertext, which means changing it back into plain text. Without the key, the ciphertext looks like nonsense. Encryption does not stop someone from seeing a message on its way. It stops them from understanding it.

Worked examples
Code wordReal word
owlmeet
pearby
lampthe
stonelake
sunat
cloudnoon
Nodira and Leo share a code book as their key. Each plain word has a code word. Nodira’s plain text is “meet by the lake at noon”. She replaces every word and sends the ciphertext: owl pear lamp stone sun cloud.
Ciphertextowllampstonesuncloud
Plain textmeetthelakeatnoon
Leo decrypts a new message with the same key. He looks up every code word and writes the real word under it.
ciphertextno key✗has the key✓
A stranger finds the ciphertext. The stranger can see every word, but without the key the message means nothing. A friend who has the key can read it at once. The key is the important secret, so it must be kept apart from the message.
Class activity

Code book relay (with a friend or family): write eight words you often use, such as “park”, “today” or “after school”. Give each one a code word, for example a colour or an animal. This is your key. Write a short message in plain text, then change it into ciphertext with the key. Pass only the ciphertext to the other person and ask them to explain it. Then give them the key. How long did it take to read the message each time?

Practice
1
Use this key to decrypt the ciphertext: kite shell apple.
Code wordReal word
kitebring
shellthe
applelunch
treeto
hatschool
2
Use the same key to encrypt “bring lunch to school”. Write the ciphertext.
Plain textbringlunchtoschool
Ciphertext????
3
A stranger finds your ciphertext on the floor. Can the stranger understand it? What does this tell you about the key?
4
Why is it a bad idea to write the key on the same sheet of paper as the ciphertext?