{"id":22656823,"url":"https://github.com/nickory/cipher","last_synced_at":"2025-10-28T10:42:03.045Z","repository":{"id":266064583,"uuid":"894262774","full_name":"Nickory/Cipher","owner":"Nickory","description":"Six cryptography experiments for the Application Cryptography course at NUIST（南京信息工程大学应用密码学）, featuring GUIs for intuitive learning. Includes RSA, AES, Feistel networks and more","archived":false,"fork":false,"pushed_at":"2025-04-10T12:31:21.000Z","size":2769,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T13:53:19.502Z","etag":null,"topics":["cipher","nuist"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nickory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-26T03:33:43.000Z","updated_at":"2025-04-10T12:31:24.000Z","dependencies_parsed_at":"2024-12-24T07:20:55.560Z","dependency_job_id":"7c3630fb-d98f-4f20-b4e7-251e9cf36c1c","html_url":"https://github.com/Nickory/Cipher","commit_stats":null,"previous_names":["nickory/cipher"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Nickory/Cipher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nickory%2FCipher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nickory%2FCipher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nickory%2FCipher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nickory%2FCipher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nickory","download_url":"https://codeload.github.com/Nickory/Cipher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nickory%2FCipher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281425556,"owners_count":26499031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cipher","nuist"],"created_at":"2024-12-09T10:16:34.420Z","updated_at":"2025-10-28T10:42:03.040Z","avatar_url":"https://github.com/Nickory.png","language":"Python","readme":"# Cipher - Application Cryptography Experiments 🔐\n\nWelcome to the **Cipher** repository! This collection contains six experiments required for the **Application Cryptography** course at **Nanjing University of Information Science \u0026 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.\n\n本项目包含南京信息工程大学应用密码学课程所需的六个实验。除扩展欧几里得算法，每个实验都配备了图形用户界面 (GUI)，以便于直观的学习和实践。项目涵盖了密码学的核心实验，为学习和掌握密码学理论与实际应用提供了便捷的工具。\n\n🎓 **Course**: Application Cryptography  \n🏫 **University**: Nanjing University of Information Science \u0026 Technology (NUIST)  \n🔑 **Focus**: Cryptographic algorithms and security techniques\n\n## Features 🚀\n- **🌐 User-Friendly GUI**: Each experiment comes with an interactive interface, simplifying complex concepts and making cryptography more accessible.\n- **🔎 Comprehensive Learning Tool**: This project offers a deep dive into six cryptographic algorithms, ranging from classical ciphers to modern encryption standards.\n- **📊 Data Visualizations**: Visual representations of key results to help you better understand algorithm behavior and performance.\n\n---\n## Experiments 🔬\n\n### Experiment 1: Extended Euclidean Algorithm / 扩展欧几里得算法\n#### 🔍 **Description**\nThis 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.\n\n#### 🎨 **Key Visualizations**\nThe following images showcase key results from this experiment:\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/image1.png\" alt=\"Convergence of a and b\" width=\"24%\" style=\"margin: 0 1%\" /\u003e\n    \u003cimg src=\"images/image5.png\" alt=\"Step Count Heatmap\" width=\"24%\" style=\"margin: 0 1%\" /\u003e\n    \u003cimg src=\"images/image6.png\" alt=\"Time Complexity Analysis\" width=\"24%\" style=\"margin: 0 1%\" /\u003e\n    \u003cimg src=\"images/image7.png\" alt=\"Sensitivity Analysis\" width=\"24%\" style=\"margin: 0 1%\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cb\u003eFigure 1:\u003c/b\u003e Convergence of Values \u0026nbsp;\u0026nbsp; \n    \u003cb\u003eFigure 2:\u003c/b\u003e Step Count Heatmap \u0026nbsp;\u0026nbsp; \n    \u003cb\u003eFigure 3:\u003c/b\u003e Time Complexity Analysis \u0026nbsp;\u0026nbsp; \n    \u003cb\u003eFigure 4:\u003c/b\u003e Sensitivity Analysis\n\u003c/p\u003e\n\n---\n\n### Experiment 2: Substitution Cipher / 单表密码\n#### 🔑 **Description**\nThis experiment focuses on the **Substitution Cipher**. Learn how to **encrypt** and **decrypt** messages and explore its weaknesses through frequency analysis of ciphertexts.\n\n#### 🎨 **Key Visualizations**\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/experiment2-img1.png\" alt=\"Visualization 1\" width=\"30%\" style=\"margin: 0 1%;\" /\u003e\n    \u003cimg src=\"images/experiment2-img2.png\" alt=\"Visualization 2\" width=\"25%\" style=\"margin: 0 1%;\" /\u003e\n    \u003cimg src=\"images/experiment2-img3.png\" alt=\"Visualization 3\" width=\"40%\" style=\"margin: 0 1%;\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cb\u003eFigure 1:\u003c/b\u003e Visualization 1 \u0026nbsp;\u0026nbsp; \n    \u003cb\u003eFigure 2:\u003c/b\u003e Visualization 2 \u0026nbsp;\u0026nbsp; \n    \u003cb\u003eFigure 3:\u003c/b\u003e Visualization 3\n\u003c/p\u003e\n\n#### 🌟 **GUI Preview**\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/experiment2-gui.png\" alt=\"Experiment 2 GUI\" width=\"30%\" /\u003e\n\u003c/p\u003e\n\n---\n\n### Experiment 3: Playfair Cipher / Playfair密码\n#### 🔍 **Description**\nThe **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.\n\n#### 🎨 **Key Visualizations**\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/experiment3-img1.png\" alt=\"Visualization 1\" width=\"30%\" style=\"margin: 0 1%;\" /\u003e\n    \u003cimg src=\"images/experiment3-img2.png\" alt=\"Visualization 2\" width=\"30%\" style=\"margin: 0 1%;\" /\u003e\n    \u003cimg src=\"images/experiment3-img3.png\" alt=\"Visualization 3\" width=\"30%\" style=\"margin: 0 1%;\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cb\u003eFigure 1:\u003c/b\u003e Visualization 1 \u0026nbsp;\u0026nbsp; \n    \u003cb\u003eFigure 2:\u003c/b\u003e Visualization 2 \u0026nbsp;\u0026nbsp; \n    \u003cb\u003eFigure 3:\u003c/b\u003e Visualization 3\n\u003c/p\u003e\n\n#### 🌟 **GUI Preview**\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/experiment3-gui.png\" alt=\"Experiment 3 GUI\" width=\"30%\" /\u003e\n\u003c/p\u003e\n\n---\n\n### Experiment 4: Feistel Algorithm / Feistel算法\n#### 🔐 **Description**\nIn 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.\n\n#### 🎨 **Key Visualizations**\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/experiment4-img1.png\" alt=\"Visualization 1\" width=\"30%\" style=\"margin: 0 1%;\" /\u003e\n    \u003cimg src=\"images/experiment4-img2.png\" alt=\"Visualization 2\" width=\"30%\" style=\"margin: 0 1%;\" /\u003e\n    \u003cimg src=\"images/experiment4-img3.png\" alt=\"Visualization 3\" width=\"30%\" style=\"margin: 0 1%;\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cb\u003eFigure 1:\u003c/b\u003e Visualization 1 \u0026nbsp;\u0026nbsp; \n    \u003cb\u003eFigure 2:\u003c/b\u003e Visualization 2 \u0026nbsp;\u0026nbsp; \n    \u003cb\u003eFigure 3:\u003c/b\u003e Visualization 3\n\u003c/p\u003e\n\n#### 🌟 **GUI Preview**\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/experiment4-gui.png\" alt=\"Experiment 4 GUI\" width=\"30%\" /\u003e\n\u003c/p\u003e\n\n---\n\n### Experiment 5: AES Algorithm / AES算法\n#### 🔑 **Description**\nThis experiment focuses on implementing the **Advanced Encryption Standard (AES)**. Using Python’s cryptographic libraries, we analyze AES in **CTR (Counter) mode**, including performance metrics.\n\n#### 🌟 **GUI Preview**\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/experiment5-gui.png\" alt=\"Experiment 5 GUI\" width=\"40%\" /\u003e\n\u003c/p\u003e\n\n---\n\n### Experiment 6: RSA Algorithm / RSA算法\n#### 🔓 **Description**\nThe **RSA Algorithm** experiment explores public-key encryption, including **key generation**, **encryption**, and **decryption**. We’ll also analyze RSA’s performance and security.\n\n#### 🌟 **GUI Preview**\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/experiment6-gui.png\" alt=\"Experiment 6 GUI\" width=\"40%\" /\u003e\n\u003c/p\u003e\n\n---\n\n\n## License 📄\n\nThis 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.\n\n---\n\n## Acknowledgements 🙏\n\nThis project was developed for the **Application Cryptography** course at **Nanjing University of Information Science \u0026 Technology (NUIST)**. Special thanks to **Professor Zhiguo Qu** for his guidance throughout the project.  \nThis project is funded by the **National College Student Innovation and Entrepreneurship Project**, Fund Number: **ZR2022MF338**, and supported by **Professor Baowei Wang**.\n\n---\n\n## Installation ⚙️\n\nTo install and run the experiments locally, follow these steps:\n\n1. **Clone the repository**:\n    ```bash\n    git clone https://github.com/Nickory/Cipher.git\n    ```\n\n2. **Navigate to the project directory**:\n    ```bash\n    cd Cipher\n    ```\n\n3. **Install the required dependencies**:\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n4. **Run the experiments**:\n    ```bash\n    python experiment1.py  # For the first experiment\n    python experiment2.py  # For the second experiment\n    # Repeat for other experiments\n    ```\n\n---\n\n## Citation\n\n```bibtex\n@misc{wang2025cipher,\n  author = {Wang, Ziheng},\n  title = {Cipher - Application Cryptography Experiments},\n  year = {2025},\n  howpublished = {GitHub repository},\n  url = {https://github.com/Nickory/Cipher},\n  note = {Developed for the Application Cryptography course at Nanjing University of Information Science \\\u0026 Technology (NUIST), supervised by Professor Zhiguo Qu and supported by Professor Baowei Wang. Funded by the National College Student Innovation and Entrepreneurship Project, Fund Number: ZR2022MF338},\n  institution = {Nanjing University of Information Science \\\u0026 Technology (NUIST)},\n  license = {Creative Commons Attribution-NoDerivatives (CC BY-ND)}\n}\n```\n\n\n## Contributing 🤝\n\nFeel free to **fork** the repository, make improvements, and submit **pull requests**. Your contributions are always welcome!\n\n---\n\n## Contact 📬\n\nFor any questions or suggestions, feel free to reach out to the project maintainers:\n\n- **Ziheng Wang** (Author)\n    - Email: [zhwang@nuist.edu.cn](mailto:zhwang@nuist.edu.cn)\n    - University: **South East Technological University, Ireland**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickory%2Fcipher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickory%2Fcipher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickory%2Fcipher/lists"}