项目作者: CameronLonsdale

项目描述 :
Cryptanalysis library for breaking classical ciphers
高级语言: Python
项目地址: git://github.com/CameronLonsdale/lantern.git
创建时间: 2016-11-28T09:48:56Z
项目社区:https://github.com/CameronLonsdale/lantern

开源协议:MIT License

下载


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.

  1. from lantern.modules import shift
  2. from lantern import fitness
  3. ciphertext = "iodj{EuxwhIrufhLvEhvwIrufh}"
  4. decryptions = shift.crack(ciphertext, fitness.english.quadgrams)
  5. 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

  1. 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.
  1. virtualenv -p python3.7 venv
  2. source ./venv/bin/activate
  1. Install development requirements.
  1. 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.
  1. pip3 install -Ur docs/requirements.txt
  1. Build the HTML from inside /docs, output in build/html.
  1. make html