Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CameronLonsdale/lantern

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

197 Commits
197 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lantern

Documentation Status Build Status Coverage Status

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:

  • Identify ciphers from ciphertext
  • Automatically crack well known ciphers
  • Analyze ciphertext to assist in the breaking of custom crypto systems

Installation

pip3 install -U lantern

Documentation

Full documentation available at lantern-crypto.readthedocs.io

Requirements

Python 3.7 required.

lantern has no external dependencies outside of the standard library.

Usage

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.

Example programs

Development

Testing

  1. Setup a virtual environment.
virtualenv -p python3.7 venv
source ./venv/bin/activate
  1. Install development requirements.
pip3 install -Ur dev_requirements.txt
  1. Use py.test to run tests using your current working environment.

  2. Use tox to build a new environment for each python version and run all tests.

Documentation

Document is built using sphinx and napoleon-sphinx.

  1. Install documentation requirements.
pip3 install -Ur docs/requirements.txt
  1. Build the HTML from inside /docs, output in build/html.
make html

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.