Recurrent neural networks (RNNs) represent the state of the art in translation, image captioning, and speech recognition. They are also capable of learning algorithmic tasks such as long addition, copying, and sorting from a set of training examples. We demonstrate that RNNs can learn decryption algorithms -- the mappings from plaintext to ciphertext -- for three polyalphabetic ciphers (Vigenere, Autokey, and Enigma). Most notably, we demonstrate that an RNN with a 3000-unit Long Short-Term Memory (LSTM) cell can learn the decryption function of the Enigma machine. We argue that our model learns efficient internal representations of these ciphers 1) by exploring activations of individual memory neurons and 2) by comparing memory usage across the three ciphers. To be clear, our work is not aimed at 'cracking' the Enigma cipher. However, we do show that our model can perform elementary cryptanalysis by running known-plaintext attacks on the Vigenere and Autokey ciphers. Our results indicate that RNNs can learn algorithmic representations of black box polyalphabetic ciphers and that these representations are useful for cryptanalysis.
Past work has shown that RNNs can find general solutions to algorithmic tasks. Zaremba and Sutskever @cite_11 trained LSTMs to add 9-digit numbers with 99 In the 1930s, Allied nations had not yet captured a physical Enigma machine. Cryptographers such as the Polish Marian Rejewski were forced to compare plaintext, keyphrase, and ciphertext messages with each other to infer the mechanics of the machine. After several years of carefully analyzing these messages, Rejewski and the Polish Cipher Bureau were able to construct 'Enigma doubles' without ever having seen an actual Enigma machine @cite_19 . This is the same problem we trained our model to solve. Like Rejewski, our model uncovers the logic of the Enigma by looking for statistical patterns in a large number of plaintext, keyphrase, and ciphertext examples. We should note, however, that Rejewski needed far less data to make the same generalizations. Later in World War II, British cryptographers led by Alan Turing helped to actually crack the Enigma. As Turing's approach capitalized on operator error and expert knowledge about the Enigma, we consider it beyond the scope of this work @cite_9 .
@cite_19 @cite_9 @cite_11
1971846196 1598444122
The paper gives a personal view of work in the Polish Cipher Bureau from 1932 to 1939 as mathematicians worked to decipher the codes of the military version of the Enigma. The author, who was a participant, relates details of the device and the successes and frustrations involved in the work. He also describes mathematical principles that enabled him and his colleagues to break successive versions of the Enigma code and to construct technical devices (cyclometers and "bombs") that facilitated decipherment of Enigma-coded messages. List of Illustrations. Acknowledgements. Introduction. Prologue. The Betrayal -- Belgium and Germany, 1931. The Leak -- Poland, Belgium and Germany, 1929--38. An Inspired Guess -- Poland, 1932. A Terrible Mistake -- Poland, 1933--9. Flight -- Germany, Poland and England, 1939--40. The First Capture -- Scotland, 1940. Mission Impossible -- Norway and Bletchley Park, 1940. Keeping the Enigma Secret -- France and Bletchley Park, May--September 1940. Deadlock -- Bletchley Park, August--October, 1940. The Italian Affair -- Bletchley Park and the Mediterranean, March 1941. The End of the Beginning -- Norway, March 1941. Breakthrough -- North of Iceland, May 1941. Operation Primrose -- The Atlantic, May 1941. The Knock--Out Blow -- North of Iceland, June 1941. Suspicion -- Bletchley Park, the Atlantic and Berlin, May--October 1941. A Two--Edged Sword -- The Atlantic and the Cape Verde Islands, September 1941. Living Dangerously -- The South Atlantic and Norway, November 1941--March 1942. The Hunt for the Bigram Tables -- Bletchley Park and Norway, December 1941. Black Out -- The Barents Sea, Bletchley Park and the Admiralty, February--July 1942. Breaking the Deadlock -- The Mediterranean and Bletchley Park, October--December 1942. The Turning Point -- South of France, the Mediterranean and the Atlantic, November 1942--September 1943. Trapped -- South of France, November 1942--March 1943. The Arrest -- Berlin, March--September 1943. Sinking the Scharnhorst -- The Barents Sea, December 1943. Operation Covered -- Paris, the Indian Ocean and the Atlantic, August 1943--March 1944. The Last Hiccough -- Germany, France and the South Atlantic, March--June 1944. Epilogue -- Where did they Go? Chronology. Glossary. Appendix 1: Polish Codebreaking Techniques. Appendix 2: The Bombe. Appendix 3: Naval Enigma. Appendix 4: Cillis. Appendix 5: Rodding. Appendix 6: Naval Enigma Offizier. Notes. Bibliography. Index.