/crypto-rnn

Decoding Polyalphabetic Ciphers with Recurrent Neural Networks

Primary LanguagePython

Crypto-RNN: Decoding Polyalphabetic Ciphers with Recurrent Neural Networks

See blog post

About

This repo contains three (very similar) implementations of an LSTM-based deep learning model for decoding polyalphabetic ciphers. The first two, vigenere-rnn and autokey-rnn are light proof-of-concept models. The third, enigma-rnn is much larger and more complex. It needs to be, because decoding the Enigma cipher is a very complex process.

Vigenere cipher

The Vigenere cipher works like this (where we're encrypting plaintext "CALCUL" with keyword "MATHS" (repeated)). The Autokey cipher is a slightly more secure variant. Vigenere cipher

Enigma cipher

The Enigma cipher works like this. Enigma cipher

Dependencies

  • All code is written in Python 3.6 and TensorFlow 1.1. You will need:
  • NumPy
  • TensorFlow