Learning the Enigma with Recurrent Neural Networks
Sam Greydanus

TL;DR
This paper demonstrates that recurrent neural networks, specifically LSTM models, can learn to decrypt complex polyalphabetic ciphers like Enigma, Vigenère, and Autokey, and perform elementary cryptanalysis, revealing their potential in understanding cipher algorithms.
Contribution
The study shows that RNNs can learn decryption algorithms for complex ciphers, including Enigma, and utilize internal representations for cryptanalysis, a novel application of neural networks in cryptography.
Findings
RNNs can learn the decryption of Enigma and other polyalphabetic ciphers.
LSTM with 3000 units effectively models cipher decryption functions.
RNNs can perform elementary cryptanalysis using known-plaintext attacks.
Abstract
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 (Vigen\`ere, 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsChaos-based Image/Signal Encryption · Advanced Image and Video Retrieval Techniques · Advanced Malware Detection Techniques
