First half: finish your cipher program and crack a partner’s message. Second half: a private audit of your own accounts — and three things you’ll actually change.
No reading. Bring your 7.3 program. Your teacher hands out the Lab 7.9 sheet.
Security, practiced. The only unit whose success shows up outside the gradebook.
1. Test encrypt. Your encrypt must pass these:
| Call | Must return |
|---|---|
| encrypt("HELLO, WORLD", 3) | "KHOOR, ZRUOG" |
| encrypt("XYZ", 3) | "ABC" |
| encrypt("MEET AT NOON", 0) | "MEET AT NOON" |
2. Round trip. decrypt(encrypt(m, k), k) must give back m for every shift 0–25. Write a loop that checks all 26.
3. Crack a partner. Encrypt a short sentence with a secret shift and trade ciphertexts. Run crack; find the English; report the key.
Challenge tier — Vigenère. Use a keyword instead of one shift: each letter of the key gives the shift for one letter of the message, repeating. Check: with key LEMON, ATTACK AT DAWN becomes LXFOPV EF RNHR. Then explain why a short repeating key still eventually loses to someone with enough ciphertext.
Check each item that is already true for you. Be honest; it’s private.
Your working cipher program, plus a list of three changes you will make — written generally (“turn on MFA for my email”), with no account names, passwords, or details.