jatin25027/neural-cryptanalysis
0
๐ Neural Cryptanalysis Lab
Interactive web application for evaluating ML-based neural distinguishers on 14 modern lightweight block ciphers.

๐ Web App Features
Run all experiments without touching the command line:
Bonus Tasks:
- ๐ Differential Characteristic Search
- โ๏ธ Classical Cryptanalysis vs ML Comparison
- ๐ Transfer Learning across round counts
- ๐ Partial Key Recovery via distinguisher scoring
Key UI Features
- Multi-select ciphers, models, representations
- Round sweep field (comma-separated, e.g.
3,4,5,6,7) - Live terminal log during training (SSE streaming)
- Results table with colour-coded accuracy + CSV export
- Pipeline mode shows all 4 plots in a grid on completion
๐ Running Locally
git clone https://huggingface.co/spaces/<your-username>/neural-cryptanalysis
cd neural-cryptanalysis
pip install -r requirements.txt
python3 backend_main.py
# Open http://localhost:7860Or via the original CLI orchestrator:
python3 run_all.py๐งฑ Tech Stack
- Backend: FastAPI + Uvicorn, background threading, SSE streaming
- ML: PyTorch (MLP, CNN, SiameseNet, MINE), scikit-learn
- Frontend: Vanilla HTML/CSS/JS โ zero dependencies
- Ciphers (14): SKINNY, CRAFT, ASCON, SATURNIN, GIFT-64/128, XOODOO, GIMLI, SPARKLE, KNOT, QARMA, PIPO, WARP, CHAM
- Representations (10): Raw, Diff, Concat, Bit-Slice, Word, Intermed, Noisy, Joint P-C, Stats, Sequential
๐ Report
See Neural_Cryptanalysis_Report.pdf for the full academic write-up.
