This project is a Python implementation of two classical cryptography techniques: the Vigenère Cipher and the Vernam Cipher. It allows users to encrypt and decrypt messages using either cipher method through a simple command-line interface.
-
Vigenère Cipher:
- Encrypt plaintext using a keyword.
- Decrypt ciphertext using the same keyword.
-
Vernam Cipher:
- Encrypt plaintext using a keyword of the same length.
- Decrypt ciphertext using the same keyword.
- Python 3.x
-
Clone the Repository:
git clone https://github.com/thesaajii/Cryptography.git cd cipher-tool
-
Run the Script:
python3 cipher.py
-
Choose the Cipher Method:
- Select 1 for Vigenère Cipher.
- Select 2 for Vernam Cipher.
-
Choose the Operation:
- Select 1 for Encryption.
- Select 2 for Decryption.
-
Input the Required Data:
- For Vigenère Cipher: Input the plaintext/ciphertext and keyword.
- For Vernam Cipher: Input the plaintext/ciphertext and a keyword of the same length.
-
View the Result:
- The program will output the encrypted or decrypted text.
-
Encrypting:
- Plaintext:
HELLO
- Keyword:
KEY
- Ciphertext:
RIJVS
- Plaintext:
-
Decrypting:
- Ciphertext:
RIJVS
- Keyword:
KEY
- Plaintext:
HELLO
- Ciphertext:
-
Encrypting:
- Plaintext:
HELLO
- Keyword:
XMCKL
- Ciphertext:
EQNVZ
- Plaintext:
-
Decrypting:
- Ciphertext:
EQNVZ
- Keyword:
XMCKL
- Plaintext:
HELLO
- Ciphertext:
- The Vernam Cipher requires the keyword to be of the same length as the plaintext or ciphertext.
- The script only handles uppercase English letters (A-Z). Ensure your inputs are in uppercase.
Feel free to fork this repository, submit issues, and make pull requests. Contributions are always welcome!