A Flask web application comparing three encryption algorithms: AES-256-GCM, Ascon-128a, and ChaCha20-Poly1305.
- File Encryption/Decryption: Upload files, choose algorithm, and encrypt/decrypt with passphrase
- Blockchain Ledger: All operations recorded in an immutable blockchain with integrity verification
- Performance Benchmarks: Automated charts comparing encryption/decryption times and file sizes
- Three Algorithms:
- AES-256-GCM (Advanced Encryption Standard)
- Ascon-128a (Lightweight authenticated encryption)
- ChaCha20-Poly1305 (Stream cipher with authentication)
- PBKDF2 key derivation (200,000 iterations, SHA-256)
- Random salt generation for each encryption
- Authenticated encryption with associated data (AEAD)
- Blockchain ledger for tamper detection
- Passphrases never stored
- Python 3.11+
- Flask
- pycryptodome
- ascon
- matplotlib
- pandas
- SQLite
- Python 3.11 or higher
- pip (Python package manager)
- Git
-
Clone the repository: (or download the project files):
git clone https://github.com/KeertanaHoli/encryption-comparison.git cd dec -
Create a virtual environment (recommended):
# On Windows python -m venv venv venv\Scripts\activate # On macOS/Linux python3 -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
-
Access the web interface:
- Open your browser and navigate to:
http://localhost:5000
- Open your browser and navigate to:
- ModuleNotFoundError: Ensure your virtual environment is activated and all dependencies are installed
- Port 5000 already in use: Change the port in
app.py(line 114):app.run(host='0.0.0.0', port=5001, debug=False) - Permission denied (macOS/Linux): Run
chmod +x app.pybefore executing
- Encrypt File: Upload file → Select algorithm → Enter passphrase → Download encrypted file
- Decrypt File: Upload encrypted file → Enter passphrase → Download decrypted file
- View Benchmarks: Automatically generated charts from blockchain data
- Verify Ledger: Check blockchain integrity
encryption-comparison
├── app.py # Flask application
├── crypto_utils.py # Encryption/decryption logic
├── blockchain.py # Blockchain ledger
├── benchmark.py # Chart generation
├── templates/ # HTML templates
├── storage/ # Encrypted/decrypted files
├── Screenshots/ # Project screenshots for README
└── ledger.db # SQLite blockchain database
This application is for educational purposes to demonstrate and compare cryptographic algorithms. Not for production use.
Flask web application for comparing AES-256-GCM, Ascon-128a, and ChaCha20-Poly1305 encryption algorithms with blockchain-based logging and performance benchmarking.
2b6e2edafde5bf80e34dce4945483675fde89055
Keertana Holi
Cybersecurity / Cryptography Project
- Keertana Gopal Holi
- Keerthana H S
- Savitri
- Narasimha



