Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nickory/sabca---simulated-annealing-based-cipher-analysis
SABCA (Simulated Annealing-Based Cipher Analysis) is a Python library designed for the encryption, decryption, and automated cracking of substitution ciphers.
https://github.com/nickory/sabca---simulated-annealing-based-cipher-analysis
Last synced: about 1 month ago
JSON representation
SABCA (Simulated Annealing-Based Cipher Analysis) is a Python library designed for the encryption, decryption, and automated cracking of substitution ciphers.
- Host: GitHub
- URL: https://github.com/nickory/sabca---simulated-annealing-based-cipher-analysis
- Owner: Nickory
- Created: 2024-11-22T11:05:00.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-22T11:08:53.000Z (about 2 months ago)
- Last Synced: 2024-11-22T12:19:17.258Z (about 2 months ago)
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SABCA - Simulated Annealing-Based Cipher Analysis
**SABCA** (Simulated Annealing-Based Cipher Analysis) is an method designed for encrypting, decrypting, and cracking monoalphabetic substitution ciphers. It combines **probabilistic language models**, **linguistic syntax analysis**, and **optimization techniques** like **simulated annealing** to provide a robust and automated solution for substitution cipher analysis.SABCA is implemented with a **graphical user interface (GUI)** and **command-line interface (CLI)** to ensure usability for both beginners and advanced users.
## 🌟 Features
- **Automated Cipher Cracking**:
Break monoalphabetic substitution ciphers using simulated annealing and statistical methods.
- **Encryption/Decryption**:
Encrypt plaintext or decrypt ciphertext using user-provided or randomly generated keys.
- **Real-Time Visualization**:
GUI includes live charts for decryption progress and fitness score optimization.
- **Performance Across Text Types**:
Works effectively on both structured (e.g., literature) and unstructured (e.g., technical) text.
- **Fully Open-Source**:
The full implementation, including a GUI, is open-sourced for reproducibility and educational purposes.
## 📦 Installation
### Prerequisites
- Python 3.8 or higher
- Libraries: `nltk`, `matplotlib`, `tkinter`## 🚀 Latest Version: v1.4.1
The current version of **SABCA (v1.4.1)** is now available for download.
You can access the program and all its resources from the following Google Drive link:🔗 **[Download SABCA v1.4.1](https://drive.google.com/file/d/100EqMfVo2JEOf7wdOC51h_eAIKZt7EJs/view?usp=drive_link)**
---
### What's New in v1.4.1
- Enhanced decryption accuracy with updated quadgram model.
- Optimized simulated annealing algorithm for faster convergence.
- Improved GUI with real-time progress updates and visualizations.
- Bug fixes and performance improvements.### Select an option from the menu:
### - Encrypt: Input plaintext and receive ciphertext with the key.
### - Decrypt: Input ciphertext and a key to decrypt it.
### - Crack: Automatically decrypt ciphertext without a key.
## 🔍 Experiment Details
### Objectives
1. Implement a monoalphabetic substitution cipher for encryption and decryption.
2. Demonstrate statistical vulnerabilities using letter frequency analysis.
3. Develop an automated cracking method using simulated annealing.
### Key Insights
- **Encryption and Decryption**: Successfully implemented a substitution mapping system for consistent encryption-decryption workflows.
- **Statistical Analysis**: Visualized plaintext and ciphertext letter frequency distributions to reveal encryption patterns and vulnerabilities.
- **Simulated Annealing Optimization**: Balanced computational efficiency and decryption accuracy using probabilistic language models and iterative refinement of mappings.
## 📊 Experimental Results### Visualization of Frequencies
The following figure compares the frequency distributions of letters in plaintext and ciphertext:
### Simulated Annealing Progression
The figure below shows the evolution of decryption accuracy and fitness score over iterations:
### GUI Demonstration
The GUI provides real-time feedback on decryption progress and accuracy:
## 💖 Support Us
Help us continue improving **SABCA**! You can:
1. **Star the Repository**:
Show your support by starring the GitHub repository.2. **Contribute**:
Submit issues or pull requests to help improve the project.3. **Donate**:
Support the project by donating to the QR codes below:
Alipay
## 📜 Citation
If you use **SABCA** in your research, please cite:
```bibtex
@misc{sabca2024,
author = {Ziheng Wang},
title = {SABCA: Simulated Annealing-Based Cipher Analysis},
year = {2024},
howpublished = {GitHub Repository},
url = {https://github.com/Nickory/SABCA---Simulated-Annealing-Based-Cipher-Analysis}
}```
## 🔗 Links
- [GitHub Repository](https://github.com/Nickory/SABCA---Simulated-Annealing-Based-Cipher-Analysis)
- [Documentation](https://github.com/Nickory/SABCA---Simulated-Annealing-Based-Cipher-Analysis/wiki)-