Cyber security · GCSE · OCR J277 1.4.2, AQA 8525 3.6.3, Edexcel 1CP2 5.3.2 · about 20 min
Plaintext, keys and ciphertext, the Caesar cipher, symmetric and asymmetric, and a secret over the radio.
[1 mark]What is encryption?
[1 mark]Encrypt HELLO with a Caesar cipher, key 1.
[1 mark]Why is the Caesar cipher easy to break?
[1 mark]In asymmetric encryption, what can be shared openly?
[1 mark]What does the padlock and https in a browser mean?
[1 mark]What does this program print?
def caesar(t, k):
return ''.join(chr((ord(c) - 65 + k) % 26 + 65) for c in t)
print(caesar('ABC', 2))Write caesar(text, key) that shifts letters by the key and leaves anything else unchanged. Using a key of 7, encrypt message, print sending: <ciphertext>, and send the ciphertext by radio. The Ally replies with its own encrypted message; decrypt each reply and print reply means: <plaintext>. You should read the Ally saying ALL CLEAR.
# the two lines every program starts with: the commands, then the robot from bugbot import * connect() message = "MEET AT BASE"
Plan your program here, then type it in and press Run.