cipher_wire is a Python module that provides implementations of classical encryption methods like the Caesar cipher, Playfair cipher, Transposition Matrix, and Vigenère cipher. The module includes a Command-Line Interface (CLI) for ease of use and also offers a Graphical User Interface (GUI) for users who prefer a visual experience.
- Classical Encryption Methods
- Caesar Cipher
- Playfair Cipher
- Transposition Matrix
- Vigenère Cipher
- CLI Interface
- Encrypt and decrypt text directly from the command line.
- GUI Interface
- User-friendly interface for performing encryption and decryption tasks visually.
To install the cipher_wire
package, use pip:
pip install cipher_wire
The cipher_wire
CLI allows you to encrypt and decrypt text using classical encryption methods. Run the following command for usage information:
cipher_wire -h
cipher_wire [-h] [-o OUTPUT] [-f FILE] [-k KEY] [--method {ceaser_cipher,playfiar,transpositionmatrix,vaigenere}] [--gui] [input]
input
: The text to be encrypted or decrypted (optional if-f
is used).-h, --help
: Show help message and exit.-o OUTPUT, --output OUTPUT
: File to write the output (encrypted/decrypted text).-f FILE, --file FILE
: File containing the input text.-k KEY, --key KEY
: Key to be used for encryption or decryption.--method {caesar_cipher,playfair,transpositionmatrix,vaigenere}
: Specify the encryption method.--gui
: Launch the GUI interface.
Encrypt text using Caesar cipher:
cipher_wire --method caesar_cipher -k 3 "HELLO WORLD"
Decrypt a file using Playfair cipher:
cipher_wire --method playfair -k "SECRET" -f encrypted.txt -o decrypted.txt
Encrypt text using Vigenère cipher:
cipher_wire --method vaigenere -k "KEY" "HELLO WORLD"
Encrypt using Transposition Matrix:
cipher_wire --method transpositionmatrix -k 4 "HELLO WORLD"
Launch the GUI interface:
cipher_wire --gui
The GUI provides a simple and intuitive interface for encryption and decryption. Launch the GUI by running:
cipher_wire --gui
From the GUI, you can:
- Choose the encryption method.
- Enter the input text or load a file.
- Specify the key for encryption or decryption.
- Save the results to a file.
A substitution cipher that shifts the characters in the plaintext by a fixed number (key).
A digraph substitution cipher that uses a 5x5 grid of letters constructed from the key.
A cipher that rearranges the characters in the plaintext according to a specific matrix or grid pattern based on the key.
A polyalphabetic cipher that uses a keyword to shift the letters in the plaintext. The shifts are based on the corresponding letters of the keyword.
Contributions are welcome! If you have ideas for additional features or improvements, feel free to open an issue or submit a pull request on the GitHub repository.
This project is licensed under the MIT License. See the LICENSE
file for details.