{"id":24389000,"url":"https://github.com/floodnut/hexa-encryption","last_synced_at":"2025-06-21T10:05:49.621Z","repository":{"id":89341067,"uuid":"435434470","full_name":"Floodnut/Hexa-Encryption","owner":"Floodnut","description":"256비트 대칭키 암호 알고리즘 Hexa-Encryption","archived":false,"fork":false,"pushed_at":"2021-12-10T06:45:40.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"V1.1","last_synced_at":"2025-06-21T10:05:12.538Z","etag":null,"topics":["cryptography"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Floodnut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-12-06T09:27:56.000Z","updated_at":"2021-12-18T11:00:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6cc99d8-80c0-4b7d-8a62-a7ff0e085dec","html_url":"https://github.com/Floodnut/Hexa-Encryption","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Floodnut/Hexa-Encryption","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Floodnut%2FHexa-Encryption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Floodnut%2FHexa-Encryption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Floodnut%2FHexa-Encryption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Floodnut%2FHexa-Encryption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Floodnut","download_url":"https://codeload.github.com/Floodnut/Hexa-Encryption/tar.gz/refs/heads/V1.1","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Floodnut%2FHexa-Encryption/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261103199,"owners_count":23109928,"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","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":["cryptography"],"created_at":"2025-01-19T14:59:18.009Z","updated_at":"2025-06-21T10:05:44.596Z","avatar_url":"https://github.com/Floodnut.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n\u003cdiv align=\"center\"\u003e    \n \n# Hexa Encrytion v1.1\n\n\u003c!-- [![Paper](http://img.shields.io/badge/paper-arxiv.1001.2234-B31B1B.svg)](https://www.nature.com/articles/nature14539)\n[![Conference](http://img.shields.io/badge/NeurIPS-2019-4b44ce.svg)](https://papers.nips.cc/book/advances-in-neural-information-processing-systems-31-2018)\n[![Conference](http://img.shields.io/badge/ICLR-2019-4b44ce.svg)](https://papers.nips.cc/book/advances-in-neural-information-processing-systems-31-2018)\n[![Conference](http://img.shields.io/badge/AnyConference-year-4b44ce.svg)](https://papers.nips.cc/book/advances-in-neural-information-processing-systems-31-2018)   --\u003e\n\u003c!-- \nARXIV   \n[![Paper](http://img.shields.io/badge/arxiv-math.co:1480.1111-B31B1B.svg)](https://www.nature.com/articles/nature14539) --\u003e\n\n\u003c!-- ![CI testing](https://github.com/PyTorchLightning/deep-learning-project-template/workflows/CI%20testing/badge.svg?branch=master\u0026event=push) --\u003e\n\n\n\u003c!--  \nConference   \n--\u003e   \n\u003c/div\u003e\n \n## Description   \n 스도쿠 퍼즐은 9x9의 크기의 칸을 각 행, 열 그리고 3x3의 박스에 숫자를 1부터 9까지 중복되지 않게 입력하여 완성하는 퍼즐입니다.   \n이 스도쿠 퍼즐을 16x16 크기로 확장한 헥사 도쿠에서 아이디어를 얻어 암호 알고리즘을 만들었습니다.\n\n\n## How to run   \n먼저, 의존성 패키지를 설치하세요   \n```bash\n# install numpy and others\n\npython3 -m virtualenv venv\nsource ./venv/bin/activate\npip3 install -r requirements.txt\n```   \n\n## Encryption\n```bash\npython3 encryption.py\n```\n\n```bash\n ___  ___  _______      ___    ___ ________                                                     \n|\\  \\|\\  \\|\\  ___ \\    |\\  \\  /  /|\\   __  \\                                                    \n\\ \\  \\\\\\  \\ \\   __/|   \\ \\  \\/  / | \\  \\|\\  \\                                                   \n \\ \\   __  \\ \\  \\_|/__  \\ \\    / / \\ \\   __  \\                                                  \n  \\ \\  \\ \\  \\ \\  \\_|\\ \\  /     \\/   \\ \\  \\ \\  \\                                                 \n   \\ \\__\\ \\__\\ \\_______\\/  /\\   \\    \\ \\__\\ \\__\\                                                \n    \\|__|\\|__|\\|_______/__/ /\\ __\\    \\|__|\\|__|                                                \n                       |__|/ \\|__|                                                              \n                                                                                                \n                                                                                                \n _______   ________   ________  ________      ___    ___ ________  ___  ________  ________      \n|\\  ___ \\ |\\   ___  \\|\\   ____\\|\\   __  \\    |\\  \\  /  /|\\   __  \\|\\  \\|\\   __  \\|\\   ___  \\    \n\\ \\   __/|\\ \\  \\\\ \\  \\ \\  \\___|\\ \\  \\|\\  \\   \\ \\  \\/  / | \\  \\|\\  \\ \\  \\ \\  \\|\\  \\ \\  \\\\ \\  \\   \n \\ \\  \\_|/_\\ \\  \\\\ \\  \\ \\  \\    \\ \\   _  _\\   \\ \\    / / \\ \\   ____\\ \\  \\ \\  \\\\\\  \\ \\  \\\\ \\  \\  \n  \\ \\  \\_|\\ \\ \\  \\\\ \\  \\ \\  \\____\\ \\  \\\\  \\|   \\/  /  /   \\ \\  \\___|\\ \\  \\ \\  \\\\\\  \\ \\  \\\\ \\  \\ \n   \\ \\_______\\ \\__\\\\ \\__\\ \\_______\\ \\__\\\\ _\\ __/  / /      \\ \\__\\    \\ \\__\\ \\_______\\ \\__\\\\ \\__\\\n    \\|_______|\\|__| \\|__|\\|_______|\\|__|\\|__|\\___/ /        \\|__|     \\|__|\\|_______|\\|__| \\|__|\n                                            \\|___|/                                             \nHexa Encryption v1.1                                                                                        \n----- 평문을 입력하세요. -----\n안녕하세요!!!\n----- 키를 입력하세요 -----\nThis is Key!\n----- 암호화를 시작합니다. -----\n5c8f6b36c00d567e4734858e4a37592d7da0f020293ba32fb14d71cdd933d693\n----- 암호문이 완성되었습니다. -----\n소요시간 : 0.8464460372924805초\n```\n\n## Decryption\n```bash\npython3 decryption.py\n```\n\n```bash\n ___  ___  _______      ___    ___ ________                                                    \n|\\  \\|\\  \\|\\  ___ \\    |\\  \\  /  /|\\   __  \\                                                   \n\\ \\  \\\\\\  \\ \\   __/|   \\ \\  \\/  / | \\  \\|\\  \\                                                  \n \\ \\   __  \\ \\  \\_|/__  \\ \\    / / \\ \\   __  \\                                                 \n  \\ \\  \\ \\  \\ \\  \\_|\\ \\  /     \\/   \\ \\  \\ \\  \\                                                \n   \\ \\__\\ \\__\\ \\_______\\/  /\\   \\    \\ \\__\\ \\__\\                                               \n    \\|__|\\|__|\\|_______/__/ /\\ __\\    \\|__|\\|__|                                               \n                       |__|/ \\|__|                                                             \n                                                                                               \n                                                                                               \n ________  _______   ________  ________      ___    ___ ________  ___  ________  ________      \n|\\   ___ \\|\\  ___ \\ |\\   ____\\|\\   __  \\    |\\  \\  /  /|\\   __  \\|\\  \\|\\   __  \\|\\   ___  \\    \n\\ \\  \\_|\\ \\ \\   __/|\\ \\  \\___|\\ \\  \\|\\  \\   \\ \\  \\/  / | \\  \\|\\  \\ \\  \\ \\  \\|\\  \\ \\  \\\\ \\  \\   \n \\ \\  \\ \\\\ \\ \\  \\_|/_\\ \\  \\    \\ \\   _  _\\   \\ \\    / / \\ \\   ____\\ \\  \\ \\  \\\\\\  \\ \\  \\\\ \\  \\  \n  \\ \\  \\_\\\\ \\ \\  \\_|\\ \\ \\  \\____\\ \\  \\\\  \\|   \\/  /  /   \\ \\  \\___|\\ \\  \\ \\  \\\\\\  \\ \\  \\\\ \\  \\ \n   \\ \\_______\\ \\_______\\ \\_______\\ \\__\\\\ _\\ __/  / /      \\ \\__\\    \\ \\__\\ \\_______\\ \\__\\\\ \\__\\\n    \\|_______|\\|_______|\\|_______|\\|__|\\|__|\\___/ /        \\|__|     \\|__|\\|_______|\\|__| \\|__|\n                                           \\|___|/                                             \n                                                                                               \n                                                                                                                                          \nHexa Decryption v1.1                                                                                        \n----- 암호문을 입력하세요. -----\n5c8f6b36c00d567e4734858e4a37592d7da0f020293ba32fb14d71cdd933d693\n----- 키를 입력하세요 -----\nThis is Key!\n----- 복호화를 시작합니다. -----\n안녕하세요!!!\n----- 평문이 완성되었습니다. -----\n소요시간 : 0.8663084506988525초\n```\n\n## 개발 환경\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e스택\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e운영체제\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e사용 언어\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003eFloodnut\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca\u003eUbuntu 20.04 LTS\u003cbr/\u003eMacOS Big Sur\u003c/a\u003e\u003c/td\u003e\n   \u003ctd align=\"center\"\u003e\u003ca\u003ePython 3.8.10\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003ecobolnet\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca\u003eWindows 10\u003cbr/\u003eMacOS Big sur\u003c/a\u003e\u003c/td\u003e\n   \u003ctd align=\"center\"\u003e\u003ca\u003ePython 3.9.\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n  \u003ctd align=\"center\"\u003ensih\u003c/a\u003e\u003c/td\u003e\n  \u003ctd align=\"center\"\u003e\u003ca\u003eWindows 10\u003c/a\u003e\u003c/td\u003e\n \u003ctd align=\"center\"\u003e\u003ca\u003ePython 3.9.\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## 동작 환경\nPython 3.8 이상이 설치된 환경\n\n\n## 알고리즘 설명\n헥사 암호화는 256비트 블록의 대칭키 암호화 알고리즘입니다.\n지원하는 입력 평문 및 키는 UTF-8 문자입니다.\n\n\t1. 키와 평문을 입력합니다.  \n\n\t2. 키는 SHA-256으로 해시화 한 후 키는 256비트의 16x16의 테이블에 입력됩니다.\n\n\t3. 평문은 256 비트 블록 단위로 쪼개어지며 제로 패딩으로 패딩됩니다.\n\n\t4. 키를 한 행씩 읽어 16으로 나머지 연산을 수행합니다.\n\t\t나머지 연산의 결과를 4x4의 박스에 행 번호에 맞게 넣습니다.\n\t\t중복된 값은 공백으로 비워둔 후 16행을 모두 수행하면 빈 칸을 0부터 F까지 사용하지 않은 값으로 순서대로 채워넣습니다.\n\n\t5. 박스를 헥사도쿠 테이블에 넣은 후 이 박스를 통해 헥사도쿠 테이블을 완성합니다.\n\n\t6. 완성된 헥사도쿠 테이블은 전치 테이블로 사용됩니다.\n\t\t4x4의 16개의 박스가 존재하고 첫번째 박스는 전체 박스의 순서를 결정합니다.\n\t\t첫번째 박스를 포함한 전체 박스 내부의 각 칸의 값은 값을 채워넣을 순서를 결정합니다.\n\n\t7. 평문블록을 테이블에 전치한 후 키와 XOR합니다.\n\n\t8. 키는 라운드 별로 우-하향 시프트합니다.\n\n\t9. 헥사도쿠 테이블은 박스와 박스 내부 값을 짝수 라운드에 우측 시프트, 홀수 라운드에 하향 시프트 합니다.\n\n\t10. 총 16라운드를 수행하여 암호문을 완성합니다. \n\n\n\n## 버그 제보\n버그 제보는 이슈를 통해 부탁드립니다!\n\n\n## 업데이트 내역.\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e버전\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e업데이트 내역\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e업데이트 날짜\u003c/td\u003e\n  \u003c/tr\u003e\n    \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e1.0\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca\u003e헥사 암호 알고리즘 1.0 완성\u003c/a\u003e\u003c/td\u003e\n   \u003ctd align=\"center\"\u003e\u003ca\u003e2021.12.03\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n    \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e1.1\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca\u003e전치 테이블 P_table의 박스 시프트 알고리즘 추가\u003c/a\u003e\u003c/td\u003e\n   \u003ctd align=\"center\"\u003e\u003ca\u003e2021.12.06\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n \u003c/table\u003e\n   \n\u003e 전체 내역 확인 : https://github.com/students16/2021crypto\n\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Floodnut\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/15941204?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eFloodnut\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/cobolnet\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/82963112?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ecobolnet\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/nsih\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/81147612?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ensih\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloodnut%2Fhexa-encryption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloodnut%2Fhexa-encryption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloodnut%2Fhexa-encryption/lists"}