Cryptanalysis library for breaking classical ciphers
lantern is a cryptanalysis library to assist with the identification and breaking of classical ciphers. The library provides general purpose analysis tools, as well as premade modules to break well known ciphers.
from lantern.modules import shift
from lantern import fitness
ciphertext = "iodj{EuxwhIrufhLvEhvwIrufh}"
decryptions = shift.crack(ciphertext, fitness.english.quadgrams)
print(decryptions[0])
In short, lantern can be used to:
pip3 install -U lantern
Full documentation available at lantern-crypto.readthedocs.io
Python 3.7 required.
lantern has no external dependencies outside of the standard library.
As a library, lanterns functionality can be used in REPL or pre-written scripts.
The library aims to be highly modular and generalised, providing the user with the ability to extend / modify / combine functions
with others to solve particular problems.
virtualenv -p python3.7 venv
source ./venv/bin/activate
pip3 install -Ur dev_requirements.txt
Use py.test
to run tests using your current working environment.
Use tox
to build a new environment for each python version and run all tests.
Document is built using sphinx and napoleon-sphinx.
pip3 install -Ur docs/requirements.txt
/docs
, output in build/html
.
make html