Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1key = random_bytes(len(message)) | AThe key is shorter than the message and is not random, so it would have to repeat and the pad is no longer unbreakable | |
| 2pad_used = True | BMarks the pad as used so it is never used to encrypt a second message | |
| 3A one-time pad key must be at least as long as the message, so a 500-character message needs a 500-character key | CGenerates a truly random key exactly as long as the message, as a one-time pad needs | |
| 4A one-time pad is impractical for large data because the pad must be as big as the data and shared securely first | DThe same pad is reused for two messages, so an attacker can compare the ciphertexts and the security is lost | |
| 5key = "SECRET" message = "MEET AT NOON" | Epad_size = len(video_file) | |
| 6encrypt(msg1, pad) encrypt(msg2, pad) | Fif len(key) < len(message): |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
one-time pad — Encryption using a truly random key as long as the message, used only once. Never reused, it is unbreakable in theory, but the pad must be shared securely.if len(key) == len(message):
print("Pad is long enough")cipherNum = (letterNum + padNum) % 26if pad in usedPads:
print("Never reuse a pad")key = [random.randint(0, 25) for c in msg]padSize = len(bigFile)
print(padSize, "bytes to share securely")