greydanus / crypto-rnn

Learning the Enigma with Recurrent Neural Networks

Home Page:https://greydanus.github.io/2017/01/07/enigma-rnn/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

crypto-rnn: Learning the Enigma with Recurrent Neural Networks

See paper and blog post

concept-small

About

This repo contains a deep LSTM-based model for learning polyalphabetic ciphers. It also contains code for training the model on three ciphers: the Vigenere, Autokey, and Enigma ciphers. The first two are light proof-of-concept tasks whereas the Enigma is much more complex. For this reason, the Enigma model is enormous (3000 hidden units) and takes a lot longer to train.

Vigenere and Autokey ciphers

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

About

Learning the Enigma with Recurrent Neural Networks

https://greydanus.github.io/2017/01/07/enigma-rnn/


Languages

Language:Jupyter Notebook 98.5%Language:Python 1.4%Language:Shell 0.1%