Visualising letter frequency in encrypted messages using Caesar and Vigenère ciphers
Visualising letter frequency in encrypted massages using Caesar and Vigenère ciphers.
For simplicity, characters that are not part of the English alphabet are ignored by the cipher and included in the final result.
Some examples of ignored characters are: spaces, numbers, punctuation, symbols, other alphabet letters…
In a real life example this characters may also be encrypted to preserve the integrity of the original message and not to reveal any structural clues that might ease the cracking of the encoded message.
It is written in Python 3 using matplotlib for the graphs and numpy for some number and list processing, so all of this must be installed.
To run the program the following parameters must be specified:
encrypt
or decrypt
or e
or d
to choose encryption or decryption of the message.-i
.-o
.
python main.py encrypt/decrypt caesar-key vigenere-key [message] [-i in.txt] [-o out.txt]
main.py encrypt 13 thekey hello
main.py e 13 thekey hello
main.py e 5 anotherkey this is a longer message
main.py decrypt -1 thisisverystrongkey hal
main.py encrypt 13 thekey -i letter.txt -o secret.txt