A cryptographic tool with a GUI interface that can use keys to encrypt strings and files.
No performance optimization has been made, encrypting files larger than 1MB may cause the interface to freeze for a long time.
- Implements 11 classical ciphers, 2 stream ciphers, 2 block ciphers, 2 public key ciphers, and 1 hash algorithm. Can encrypt and decrypt both strings and files.
- Includes a GUI interface implemented with PyQt.
- The cryptographic library is separated from the GUI code and can be used as a standalone cryptographic library.
The specific implemented ciphers are as follows:
Classical Ciphers (for string encryption and decryption)
- Monoalphabetic Substitution Ciphers:
- Caesar Cipher
- Keyword Cipher
- Affine Cipher
- Multilateral Cipher
- Polyalphabetic Ciphers:
- Vigenere Cipher
- Autokey Ciphertext
- Autokey Plaintext
- Polygram Ciphers:
- Playfair Cipher
- Transposition Ciphers:
- Permutation Cipher
- Column Permutation Cipher
- Double-Transposition Cipher
Stream Ciphers (for encrypting and decrypting strings and files)
- RC4
- CA
Block Ciphers (for encrypting and decrypting strings and files)
- DES-64
- AES-64
Public Key Ciphers (can generate key pairs, encrypt and decrypt strings and files)
- RSA
- ECC
Hash Algorithm (for strings and files)
- MD5
Only PyQt5 is required, as listed in requirement.txt
, generated by pip freeze
.
It is recommended to create a Python environment using venv
. In the project directory, execute the following commands:
# 1. Create a virtual environment
python -m venv .env
# 2. Activate the virtual environment
# cmd
./.env/Scripts/activate.bat
# powshell
./.env/Scripts/Activate.ps1
# linux or MacOS
source ./.env/Scripts/activate
In the created Python environment, run the following commands:
# 1. Install dependencies
pip install -r requirements.txt
# 2. Start the program
python3 main.py
.
├── algorithm Cryptographic algorithm implementation
│ ├── block_cipher
│ │ └── aes
│ ├── classical_cipher
│ ├── hash_algorithm
│ ├── public_cipher
│ │ ├── ecc
│ │ └── rsa
│ └── stream_cipher
│ └── ca
├── assets QSS configuration
│ ├── icons
│ ├── python
│ └── qss
├── event GUI event binding
└── ui GUI interface definition
1.0 Documentation update
1.1 Code standard update
1.2 PyQt5 version update; Removed QSS; Test files moved to a separate folder.
Please credit the author morsuning if you use this code publicly.