The Hill Cipher is a polygraphic substitution cipher that uses matrix algebra to encrypt and decrypt messages. This implementation of the Hill Cipher in Python uses the NumPy library to perform matrix operations.
- Clone the GitHub repository:
git clone https://github.com/Jawabreh0/hill-cipher
- Install NumPy:
pip install numpy
##Usage To encrypt a message using the Hill Cipher, run hill-cipher.py:
python hill-cipher.py
You will be prompted to enter a 2x2 matrix key and a message to encrypt. The encrypted message will be printed to the console.
Here are some examples of using the Hill Cipher:
Encrypt the message "HELLO" with the key [2 5; 1 3]:
Please enter the key as a 2x2 matrix (e.g. '2 5 1 3' for [2 5; 1 3]):
2 3 3 6
Please enter the message: GOLD
Encrypted message: CYFZ