CipherShield is a web-based file encryption and decryption tool built using Flask and Python.
It allows users to securely encrypt and decrypt files using a password-based dynamic key system combined with bitwise transformations.
The application provides a clean web interface where users can upload files, set a password, choose bitwise shift parameters, and download encrypted or decrypted outputs.
• File encryption and decryption
• Password-based dynamic key generation
• Bitwise circular shift operations
• XOR-based byte transformation
• Interactive web interface
• Drag-and-drop file upload
• Progress feedback during processing
CipherShield processes files byte-by-byte using a multi-step transformation pipeline.
The password characters are XORed together to generate a base key.
For each byte in the file, a dynamic key is generated using:
dynamic_key = (base_key + index × 7) mod 256
This ensures different bytes use different keys.
Each byte undergoes three operations:
- Circular left bit shift
- XOR with the dynamic key
- Circular right bit shift
Decryption reverses these operations in the opposite order to recover the original file.
This approach ensures that identical bytes at different positions produce different encrypted outputs.
- Python
- Flask
- HTML / CSS
- JavaScript
- Bitwise Operations
CipherShield/ │ ├── app.py ├── requirements.txt │ ├── templates/ │ └── index.html │ └── README.md
Clone the repository:
bash git clone https://github.com/aanya216/ciphershield.git cd ciphershield
Install Dependencies: pip install -r requirements.txt
Run the Application: python app.py
The application will start on: http://127.0.0.1:5000
- Open the web interface
- Upload a file
- Enter a password
- Select encryption or decryption
- Choose the shift bit configuration
- Run the process
- Download the processed file
CipherShield is designed as an educational project demonstrating encryption concepts such as XOR operations, dynamic keys, and bitwise shifts.
It should not be used for protecting highly sensitive or production data.
For Encryption: Original File + Select Shift Bits + Enter Password = Encrypted File
For Decryption: Encrypted File + Original Password + Selected Shift Bits = Original File
• Stronger cryptographic key derivation • AES-based encryption option • File integrity verification • Drag-and-drop multiple files • Docker deployment
Aanyaa Patel
This project is licensed under the MIT License.
- XOR encryption
- Circular bit shifts
- Dynamic keys
- Flask routes
- File handling


