This Python program provides functionality for encrypting and decrypting text using the Caesar cipher. It supports uppercase and lowercase letters, as well as digits, while leaving punctuation and spaces unchanged. The program also allows finding the shift key from encrypted and decrypted text and attempts to decrypt text without a known key by brute force.
β Encrypt text using a specified shift key. β Decrypt text using a specified shift key. β Find the shift key from an encrypted and decrypted text pair. β Brute-force decryption to find possible plaintext outputs without knowing the key.
To get started, clone the repository using Git:
git clone https://github.com/mohammedmehdio/CaesarJaw-PY.git
cd CaesarJaw-PY
Make sure you have Python installed, then run:
python main.py
Once the script runs, select an option: 1οΈβ£ Encrypt a message. 2οΈβ£ Decrypt a message. 3οΈβ£ Find the shift key given an encrypted and decrypted text pair. 4οΈβ£ Try decrypting text without a key by brute force.
Input:
Enter Option (1,2,3 or 4): 1
Enter Shift Key (an integer): 3
Please enter text: Hello123
Output:
==> Output Result: Khoor456
Input:
Enter Option (1,2,3 or 4): 2
Enter Shift Key (an integer): 3
Please enter text: Khoor456
Output:
==> Output Result: Hello123
Input:
Enter Option (1,2,3 or 4): 3
Please enter encrypted text: Khoor
Please enter decrypted text: Hello
Output:
Shift Key: 3
Input:
Enter Option (1,2,3 or 4): 4
Please enter text to decrypt without a key: Khoor
Output:
Trying key 1: Jgnnq
Trying key 2: Ifmmp
Trying key 3: Hello
...
- Mohammed Mehdi Boudir
- Salah Eddine Rhazouni
This project is licensed under the MIT License - see the LICENSE file for details.
π‘ If you find this project useful, don't forget to star β the repo!