https://github.com/nickory/cipher
Six cryptography experiments for the Application Cryptography course at NUIST(南京信息工程大学应用密码学), featuring GUIs for intuitive learning. Includes RSA, AES, Feistel networks and more
https://github.com/nickory/cipher
cipher nuist
Last synced: 3 months ago
JSON representation
Six cryptography experiments for the Application Cryptography course at NUIST(南京信息工程大学应用密码学), featuring GUIs for intuitive learning. Includes RSA, AES, Feistel networks and more
- Host: GitHub
- URL: https://github.com/nickory/cipher
- Owner: Nickory
- License: other
- Created: 2024-11-26T03:33:43.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-01-04T13:23:35.000Z (6 months ago)
- Last Synced: 2025-02-03T21:47:32.768Z (5 months ago)
- Topics: cipher, nuist
- Language: Python
- Homepage:
- Size: 2.63 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cipher - Application Cryptography Experiments 🔐
Welcome to the **Cipher** repository! This collection contains six experiments required for the **Application Cryptography** course at **Nanjing University of Information Science & Technology (NUIST)**. Each experiment features an intuitive **Graphical User Interface (GUI)**, making the learning process interactive and visually engaging. This repository is designed to help you explore and master key cryptographic techniques.
本项目包含南京信息工程大学应用密码学课程所需的六个实验。除扩展欧几里得算法,每个实验都配备了图形用户界面 (GUI),以便于直观的学习和实践。项目涵盖了密码学的核心实验,为学习和掌握密码学理论与实际应用提供了便捷的工具。
🎓 **Course**: Application Cryptography
🏫 **University**: Nanjing University of Information Science & Technology (NUIST)
🔑 **Focus**: Cryptographic algorithms and security techniques## Features 🚀
- **🌐 User-Friendly GUI**: Each experiment comes with an interactive interface, simplifying complex concepts and making cryptography more accessible.
- **🔎 Comprehensive Learning Tool**: This project offers a deep dive into six cryptographic algorithms, ranging from classical ciphers to modern encryption standards.
- **📊 Data Visualizations**: Visual representations of key results to help you better understand algorithm behavior and performance.---
## Experiments 🔬### Experiment 1: Extended Euclidean Algorithm / 扩展欧几里得算法
#### 🔍 **Description**
This experiment demonstrates the **Extended Euclidean Algorithm**, which computes the **Greatest Common Divisor (GCD)** and finds coefficients that satisfy **Bézout's identity**. The process is visualized step-by-step for a deeper understanding of how the algorithm works.#### 🎨 **Key Visualizations**
The following images showcase key results from this experiment:
![]()
![]()
![]()
![]()
Figure 1: Convergence of Values
Figure 2: Step Count Heatmap
Figure 3: Time Complexity Analysis
Figure 4: Sensitivity Analysis---
### Experiment 2: Substitution Cipher / 单表密码
#### 🔑 **Description**
This experiment focuses on the **Substitution Cipher**. Learn how to **encrypt** and **decrypt** messages and explore its weaknesses through frequency analysis of ciphertexts.#### 🎨 **Key Visualizations**
![]()
![]()
![]()
Figure 1: Visualization 1
Figure 2: Visualization 2
Figure 3: Visualization 3#### 🌟 **GUI Preview**
![]()
---
### Experiment 3: Playfair Cipher / Playfair密码
#### 🔍 **Description**
The **Playfair Cipher** experiment demonstrates both the encryption and decryption processes. It also evaluates the **avalanche effect**, where small changes in input lead to large variations in output.#### 🎨 **Key Visualizations**
![]()
![]()
![]()
Figure 1: Visualization 1
Figure 2: Visualization 2
Figure 3: Visualization 3#### 🌟 **GUI Preview**
![]()
---
### Experiment 4: Feistel Algorithm / Feistel算法
#### 🔐 **Description**
In this experiment, you’ll implement the **Feistel Cipher**, a structure used in many symmetric encryption algorithms. We will test its **avalanche effect** and its security against differential cryptanalysis.#### 🎨 **Key Visualizations**
![]()
![]()
![]()
Figure 1: Visualization 1
Figure 2: Visualization 2
Figure 3: Visualization 3#### 🌟 **GUI Preview**
![]()
---
### Experiment 5: AES Algorithm / AES算法
#### 🔑 **Description**
This experiment focuses on implementing the **Advanced Encryption Standard (AES)**. Using Python’s cryptographic libraries, we analyze AES in **CTR (Counter) mode**, including performance metrics.#### 🌟 **GUI Preview**
![]()
---
### Experiment 6: RSA Algorithm / RSA算法
#### 🔓 **Description**
The **RSA Algorithm** experiment explores public-key encryption, including **key generation**, **encryption**, and **decryption**. We’ll also analyze RSA’s performance and security.#### 🌟 **GUI Preview**
![]()
---
## License 📄
This project is licensed under the **Creative Commons Attribution-NoDerivatives (CC BY-ND)** license. You are free to share the code, but **you cannot modify it**. For more details, see the [LICENSE](LICENSE) file.
---
## Acknowledgements 🙏
This project was developed for the **Application Cryptography** course at **Nanjing University of Information Science & Technology (NUIST)**. Special thanks to **Professor Zhiguo Qu** for his guidance throughout the project.
This project is funded by the **National College Student Innovation and Entrepreneurship Project**, Fund Number: **ZR2022MF338**, and supported by **Professor Baowei Wang**.---
## Installation ⚙️
To install and run the experiments locally, follow these steps:
1. **Clone the repository**:
```bash
git clone https://github.com/Nickory/Cipher.git
```2. **Navigate to the project directory**:
```bash
cd Cipher
```3. **Install the required dependencies**:
```bash
pip install -r requirements.txt
```4. **Run the experiments**:
```bash
python experiment1.py # For the first experiment
python experiment2.py # For the second experiment
# Repeat for other experiments
```---
## Contributing 🤝
Feel free to **fork** the repository, make improvements, and submit **pull requests**. Your contributions are always welcome!
---
## Contact 📬
For any questions or suggestions, feel free to reach out to the project maintainers:
- **Ziheng Wang** (Author)
- Email: [[email protected]](mailto:[email protected])
- University: **South East Technological University, Ireland**