Today was day 2 of our journey in the Riley ship of learning, and it was jam-packed with exciting new ciphers! We began the day with a bang, though there were no bangs when one-time pads were used as an encryption method during the Cold War. One-time pads are keys composed of random letters that were often recorded on pads, sheets, or even books of paper. Each letter in the random string represented a shift, and so encrypting a message with a one-time pad is like a Vigenére encryption on steroids. One-time pads were used predominantly by Soviet spies during the Cold War because they eliminated the major weakness of Vigenére ciphers- susceptibility to frequency tests. Since each shift was randomly chosen, there are no patterns in the shift, which gives no foothold for frequency tests. In fact, messages encrypted using a one-time pad are impossible to decrypt IF three conditions are met:
- The key (a string of letters on the one-time pad) is as long as the message.
- The key is truly composed of random characters.
- The key is never reused.
We discovered in class that conditions two and three posed problems for users of one-time pads. The issue with the second condition is that humans are really bad at randomization. No one-time pad was ever truly random, but this was not the main issue. The greatest problem was that the Soviets tended to reuse their one-time pads. This meant if multiple messages were captured from a Soviet known to be reusing a one-time pad, cryptanalysts could analyze the messages and use "cribs" (words or phrases that are either known or guessed to be in the message) to begin deducing what the one-time pad was. Once there were pieces of messages deciphered, analysts could often use context to fill in the rest of the message and thus determine the whole one-time pad.
Makayla's favorite part of the day was decoding three messages encrypted with the same one-time pad that could have been sent during the Revolutionary War. We were informed that one of the messages began with the word "THE." That set us up to find chunks of the key that allowed us to progressively guess the key and messages.
This process took a lot of guessing, trial, and often errors, but the feeling of finally getting something right was amazing. Ava K. said on our way to lunch, "I'm pretty sure I'm a math major because of the dopamine hit I get after I solve a cipher," which pretty much sums up the way we were feeling after the third class.
After our lunch break, we learned about Playfair ciphers. This was our first polygraphic substitution cipher. While the other ciphers encrypted letters one by one, this cipher encrypted letters in pairs using a grid system. We fill up a 5x5 grid, starting with the keyword, followed by the rest of the letters in alphabetical order that have not been used. No letter is repeated, and we combine I and J since it should be clear from context whether the letter should be decrypted as I or J. Below is an example grid with the keyword "PENGUIN"
If we are given a message to encrypt, we follow the following process:
- We break the message into two letter chunks. If there is an odd number or letters we "pad" the end with a letter (usually X), and if there are any cases where the two letters are the same, we break them up by adding a pad letter between them.
- If the pair of letters are in the same column in the grid, we encrypt each letter as the one below it in the column. Note that the columns wrap around so if a letter is in the last row it encrypts to the letter in that column in the first row of the grid.
- If the pair of letters are in the same row in the grid, we encrypt each letter as the letter to the right of it in the row. Like the columns, the rows wrap around.
- If the pair of letters are in a different row and different column, then they form two opposite corners of a rectangle in the grid. We encrypt the letters as the letter in the opposite horizontal corner of this rectangle.
Lilia enjoyed the Playfair cipher because it was challenging, especially when we were given a cipher with no crib or key. She thinks that this was more of a real-life example since we were forced to rely solely on punctuation and context clues to decipher the message. Fun fact: we did not actually decipher the message, but we had fun trying!
In the evening, we got to do a group bonding activity! We ate dinner somewhat together (some of us had to wait much longer for our sushi...), and enjoyed time chatting with each other, watching the Truman Show and Pride and Prejudice, and listening to Ella's lore. As if our brains weren't fried enough by the codebreaking we did in class, we put them to even more work after dinner with escape rooms! Lilia and Makayla were in the scary room, and supposedly the screams carried further than we thought... However, Ava kept her head and fearlessly faced the scarier tasks in the room like shutting herself in a dark closet alone to find a clue. Also, shout out to Nick, a.k.a. Jerrry (no, that's not a typo), for taking the brunt of the motel manager's grumpiness. No one can blame you for laughing when a bald man said "I'll do it just to get you out of my hair." As for the other escape room groups, a reliable source has informed us that Dr. Woodard had to crawl through a trap door and lasers. He was not a happy crypto camper. Meanwhile, Kali carried the crypto campers in her group to freedom from Dr. Fratelli's Cabin!
Needless to say, we will not be staying in a motel anytime soon. Hopefully, we will sleep tonight and our London accommodations prove to be much less roach-infested and violent than the Starlight Motel.
Thanks for reading!
No comments:
Post a Comment