This package implements a viginere breaker.
Project description
ViginereBreaker
Description
This package implements a viginere breaker.
Requirements
This package require :
- python3
- python3 Standard Library
Installation
pip install ViginereBreaker
Usages
Command line
Module
python3 -m ViginereBreaker cipher.txt
Python executable
python3 ViginereBreaker.pyz cipher.txt
Command
Basic
ViginereBreaker cipher.txt
ViginereBreaker cipher.txt -k 4 -a "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -s "{\"E\":10,\"A\":7}"
Python script
from ViginereBreaker import ViginereBreaker
from codecs import encode
text=encode("""
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
antidisestablishmentarianism
counterimmunoelectrophoresis
oesophagogastroduodenoscopy
ethylenediaminetetraacetate
hexadecyltrimethylammonium
diisopropylfluorophosphate
ethylenediaminetetraacetic
uvulopalatopharyngoplasty
great-great-granddaughter
styrene-butadiene-styrene
cholangiopancreatography
tetracyanoquinodimethane
oligodeoxyribonucleotide
phosphatidylethanolamine
proto-industrialization
hypergammaglobulinaemia
politico-administrative
intracerebroventricular
pancreaticoduodenectomy
electro-encephalography
electroencephalographic
polytetrafluoroethylene
lysophosphatidylcholine
first-come-first-served
""", 'rot_13').upper() # rot_13 -> key="N"
breaker = ViginereBreaker(text, statistics={"E": 11, "A": 9})
print(breaker.breaker())
# {1: [['N']], 2: [['N'], ['N']], 4: [['N'], ['N'], ['N'], ['N']]}
# ViginereBreaker try to find a key with multiple key lengths
# The ciphertext with the key 'N' or 'NN' or 'NNNN' is identical
Example
Using CustomCrypto:
Links
Licence
Licensed under the GPL, version 3.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ViginereBreaker-0.0.3.tar.gz
(31.3 kB
view hashes)