“You want me to show you the double-step?” Robert Cafazzo, BCOS ’12, is excited. It’s late November and he has just finished presenting his team’s early and elegant solution to what was supposed to be one of the hardest problems that his computer science and systems professors could throw his way, and now he is just showing off.
Cafazzo and the rest of the class were charged with the seemingly impossible, semester-long task of building a computer program that recreated Enigma, the German encryption system used to hide messages from the Allies during World War II. For the students, reproducing the system meant recreating the complete workings of a complex, real-life machine using only computer code—something akin to building the world’s most difficult Rubik’s cube using little more than ones and zeroes.
The Enigma was, understandably, complex. To send secret messages to U-boat crews or air commanders, a German operator would type the messages on an Enigma machine’s keyboard, each letter sending an electrical signal through a series of three rotors and eventually lighting up a different letter on the machine’s display. The resulting messages—which would appear as a string of unrelated letters—were then sent via Morse code to another operator, who would type them into his Enigma machine to be deciphered. The real complexity came from the moving of the rotors, which shifted after every letter typed, meaning that no letter would be coded the same way successively. (“A-A-A” for instance, may code as “K-T-W,” depending on the machine’s settings.) All told, given the number of possible positions of the rotors and other parts of the machine, each letter could be coded in one of 150 quintillion ways. (That’s 150 and then 18 zeroes.)
For the students, rebuilding Enigma meant translating its parts into mathematics: the rotors, which could be set to any letter of the alphabet, became 26 variables; their different positions became number patterns. Even after students sorted this out, they still had to solve the double-step, a mechanical flaw in the machine that caused one of the rotors to move on successive keystrokes and the source of Cafazzo’s pride. Finding the flaw and building it into their program was the assignment’s Holy Grail. “We all thought it was a glitch in the code,” says Mike Muesch, BCOS ’12. “It was a mistake, but it actually added way more security.”
The project has historical relevance beyond WWII. Breaking the Enigma code not only led to a swifter Allied victory, but also pushed British cryptologists to build computational machines that could quickly solvesome of the high-level math required, laying the groundwork for the modern computer. “As computer science majors, their work is a core part of our history,” says Muesch. “They are really the founders of what we do.”
Because the Enigma assignment is such an arduous task, it carries considerable weight on a résumé. “This is the kind of project that—done well and combined with a good GPA—has helped students secure interviews at the National Security Agency (NSA),” says professor and department chair for computer science and networking, Tom Goulding, noting the project’s importance in securing job offers at the codebreaking agency for some of his former students.
For Cafazzo, part of the excitement about the project came from the opportunity to work on a problem that people outside of computer science could understand. “When I called home about this project and told them I was working on an encryption system from World War II, the response was, ‘Wow, that’s really interesting—tell me more.’ ” he says. “I wasn’t just doing something that was a theoretical challenge, I was doing something real.” —DAN MORRELL