Skip to content

A Hill Cipher Cracker that performs automated crib dragging given a known plaintext and a ciphertext.

Notifications You must be signed in to change notification settings

ChesleyTan/Hill-Cipher-Cracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Hill Cipher Cracker

A Hill Cipher Cracker that performs automated crib dragging given a known plaintext and a ciphertext.
Note: This script only supports decryption of ciphertexts encrypted with a 3x3 key matrix.

Dependencies

This script has to be run with SageMath(Sage).

Usage

  1. Clone this repository.

  2. Set up the script. To specify the ciphertext and the known plaintext, set the ciphertext and KPT variables, respectively.

    To specify a custom character set for the Hill Cipher, modify the contents of the trans_letter_to_num dictionary. Note that this dictionary must be one-to-one. If your use case is different, you will have to modify the script. The modulo for the Hill Cipher is automatically determined by the length of this dictionary.

  3. Run sage cribdrag.sage

Authors

This script was written by Chesley Tan during the HSCTF cybersecurity/hacking competition.

About

A Hill Cipher Cracker that performs automated crib dragging given a known plaintext and a ciphertext.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages