Skip to content

Exploitation of vigenere encryption with known key length

Notifications You must be signed in to change notification settings

Neaje/vigenere_exploit_key_length

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

vigenere_exploit_key_length

Exploitation of vigenere encryption with known key length

How to use

There is an english_freq variable, which means that the decrypted text must be in English. If you want to decipher a text in another language, you just have to change the letter frequency table

To launch the program you must execute the following command:

python3 exploit.py <key_length> <filename>

The decrypted text and the estimated key will appear in standard output

Exemple of use

I provided an example file with key length 5

python3 exploit.py 5 vigenere_01_ciphertext.txt
Estimated Key: house
Decrypted text: atleastthewhispergoessoourlastkingwhoseimageevenbutnowappeardtouswasasyouknowbyfortinbrasofnorwaytheretoprickdonbyamostemulatepridedaredtothecombatinwhichourvalianthamletforsothissideofourknownworldesteemdhimdidslaythisfortinbraswhobyasealdcompactwellratifiedbylawandheraldrydidforfeitwithhislifeallthosehislandswhichhestoodseizedoftotheconqueroragainstthewhichamoietycompetentwasgagedbyourkingwhichhadreturndtotheinheritanceoffortinbrashadhebeenvanquisherasbythesamecovenantandcarriageofthearticledesigndhisfelltohamletnowsiryoungfortinbrasofunimprovedmettlehotandfullhathintheskirtsofnorwayhereandtheresharkdupalistoflawlessresolutesforfoodanddiettosomeenterprisethathathastomachintwhichisnootherasitdothwellappearuntoourstatebuttorecoverofusbystronghandandtermscompulsatorythoseforesaidlandssobyhisfatherlostandthisitakeitisthemainmotiveofourpreparationsthesourceofthisourwatchandthechiefheadofthisposthasteandromageintheland

Limitations

The smaller the text, the more complicated the key estimation is, this is due to letter frequencies being distorted in small sentences.

About

Exploitation of vigenere encryption with known key length

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages