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 details)
File details
Details for the file ViginereBreaker-0.0.3.tar.gz
.
File metadata
- Download URL: ViginereBreaker-0.0.3.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/58.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7ffb14f69cf420bb9818d626ef05f50a4e5dc6fbd5998ce140ebe3853964a34 |
|
MD5 | 4b0f09cb22f0e5f34653390a443733dd |
|
BLAKE2b-256 | b757bbb225dc19e02cee0d05923531f91b320f755885514d2885bc383b69a64e |