Skip to content

Latest commit

 

History

History
83 lines (58 loc) · 1.96 KB

README.md

File metadata and controls

83 lines (58 loc) · 1.96 KB

Vigenere Cipher

For many years, Vigenère was considered very strong, even unbreakable. In the nineteenth century, Friedrich Kasiski published a technique for breaking the Vigenère cipher.

Scripts

  • vigenere_cipher.py
  • vigenere_hack.py
  • vigenere_dictionary_hack.py (interactive)
  • vigenere_file_hack.py (can take a long time)

Usages

Cipher

usage: vigenere_cipher.py [-h] [-t TEXT] [-k KEY] [-m {encrypt,decrypt}]

Vigenere Cipher

options:
  -h, --help            show this help message and exit
  -t TEXT, --text TEXT  Message to encrypt or decrypt
  -k KEY, --key KEY     String
  -m {encrypt,decrypt}, --mode {encrypt,decrypt}
                        encrypt or decrypt

Example:
            vigenere_cipher.py -t sometext
            vigenere_cipher.py -t sometext -k "ASIMOV" -m encrypt    

Hacks

Bruteforce Hack

usage: vigenere_hack.py [-h] [-c CIPHERTEXT]

Vigenere Hack

options:
  -h, --help            show this help message and exit
  -c CIPHERTEXT, --ciphertext CIPHERTEXT
                        Ciphertext to hack

Example:
            vigenere_hack.py -c [ciphertext]

Dictionary hack

usage: vigenere_dictionary_hack.py [-h] [-c CIPHERTEXT]

Vigenere Dictionary Hack

options:
  -h, --help            show this help message and exit
  -c CIPHERTEXT, --ciphertext CIPHERTEXT
                        Ciphertext to hack

Example:
            vigenere_dictionary_hack.py -c [ciphertext]

Hack using files

usage: vigenere_file_hack.py [-h] [-i INPUT_FILENAME] [-o OUTPUT_FILENAME]

Vigenere File Hack

options:
  -h, --help            show this help message and exit
  -i INPUT_FILENAME, --input_filename INPUT_FILENAME
                        Takes input from a file name of your choice
  -o OUTPUT_FILENAME, --output_filename OUTPUT_FILENAME
                        Directs the output to a name of your choice

Example:
            vigenere_file_hack.py -i input_filename.txt -o output_filename.txt