Skip to content

PaNDa2code/CipherWire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cipher_wire

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.


Features

  • 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.

Installation

To install the cipher_wire package, use pip:

pip install cipher_wire

Usage

Command-Line Interface (CLI)

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

CLI Syntax

cipher_wire [-h] [-o OUTPUT] [-f FILE] [-k KEY] [--method {ceaser_cipher,playfiar,transpositionmatrix,vaigenere}] [--gui] [input]

Arguments:

  • 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.

Examples:

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

GUI Interface

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.

Encryption Methods

Caesar Cipher

A substitution cipher that shifts the characters in the plaintext by a fixed number (key).

Playfair Cipher

A digraph substitution cipher that uses a 5x5 grid of letters constructed from the key.

Transposition Matrix

A cipher that rearranges the characters in the plaintext according to a specific matrix or grid pattern based on the key.

Vigenère Cipher

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.


Contributing

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.


License

This project is licensed under the MIT License. See the LICENSE file for details.


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages