{"id":20540450,"url":"https://github.com/poustouflan/sunbox","last_synced_at":"2025-04-14T08:38:00.989Z","repository":{"id":177874181,"uuid":"658387512","full_name":"PoustouFlan/SUnbox","owner":"PoustouFlan","description":"An open-source SBox analysis utility","archived":false,"fork":false,"pushed_at":"2025-03-25T15:43:56.000Z","size":72,"stargazers_count":13,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T16:43:18.585Z","etag":null,"topics":["cryptography","cryptography-tools","cybersecurity","python","python3","sbox","sbox-tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PoustouFlan.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}},"created_at":"2023-06-25T15:41:23.000Z","updated_at":"2025-03-25T15:44:02.000Z","dependencies_parsed_at":"2023-12-07T01:52:59.966Z","dependency_job_id":"1176ed63-19e6-4d05-8011-fbc2553609a6","html_url":"https://github.com/PoustouFlan/SUnbox","commit_stats":null,"previous_names":["poustouflan/sboxyourmom","poustouflan/sunbox"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoustouFlan%2FSUnbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoustouFlan%2FSUnbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoustouFlan%2FSUnbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoustouFlan%2FSUnbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PoustouFlan","download_url":"https://codeload.github.com/PoustouFlan/SUnbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248847127,"owners_count":21171110,"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","cryptography-tools","cybersecurity","python","python3","sbox","sbox-tool"],"created_at":"2024-11-16T01:15:24.656Z","updated_at":"2025-04-14T08:38:00.950Z","avatar_url":"https://github.com/PoustouFlan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SUnbox\n\nSUnbox is an open-source SBox analysis utility\nwritten in Python.\nIt provides a set of commands to automatically analyze\nsubstitution boxes (SBoxes), mainly used in cryptography.\nThe utility aims to assist in reverse engineering SBoxes\nby computing various tables and providing relevant\ninformation.\n\n## Features\n\n- Compute the Linear Approximation Table (LAT) of the\n  SBoxes\n- Compute the Difference Distribution Table (DDT) of the\n  SBoxes\n- Compute the Autocorrelation Table (ACT) of the SBoxes\n- Perform automatic analysis of the SBoxes\n\n## Installation\n\n```shell\ngit clone https://github.com/PoustouFlan/SUnbox.git\ncd SUnbox\npip install -r requirements.txt\n```\n\n## Usage\n\nThe utility can be used by running the `main.py`\nscript with appropriate command-line arguments.\nHere are the available options:\n\n```shell\nusage: main.py [-h] -in [INPUT_FILES ...] [-lat] [-ddt]\n               [-act] [-auto] [-format {ansi,csv,png}]\n               [-out OUTPUT]\n```\n\n- `-in path/to/your/sboxes`: specify the SBoxes to\n  analyze.\n  The files should contain only the integers representing\n  the corresponding SBox, in either binary, decimal or\n  hexadecimal form.\n- `-lat`: use this option to display the Linear\n  Approximation Table of all the SBoxes\n- `-ddt`: use this option to display the Difference\n  Distribution Table of all the SBoxes\n- `-act`: use this option to display the Autocorrelation\n  Table of all the SBoxes\n- `-format {ansi, csv, png}`: use this option to specify\n  the format of the table to be displayed.\n- `-out path/to/folder`: use this option to specify\n  the output folder for the tables. If not specified,\n  everything is printed on standard output.\n- `-auto`: use this option to perform an automatic\n  analysis of all the SBoxes. It will display any relevant\n  information.\n\n## Examples\n\nMany example SBoxes can be found in the `examples` folder.\nYou can add your own SBox using a similar format.\n\n```shell\n$ python main.py -in examples/He2002 -ddt -format csv\n16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,0,0,0,2,0,2,4,0,4,2,0,0,\n0,0,0,2,0,6,2,2,0,2,0,0,0,0,2,0,\n0,0,2,0,2,0,0,0,0,4,2,0,2,0,0,4,\n0,0,0,2,0,0,6,0,0,2,0,4,2,0,0,0,\n0,4,0,0,0,2,2,0,0,0,4,0,2,0,0,2,\n0,0,0,4,0,4,0,0,0,0,0,0,2,2,2,2,\n0,0,2,2,2,0,2,0,0,2,2,0,0,0,0,4,\n0,0,0,0,0,0,2,2,0,0,0,4,0,4,2,2,\n0,2,0,0,2,0,0,4,2,0,2,2,2,0,0,0,\n0,2,2,0,0,0,0,0,6,0,0,2,0,0,4,0,\n0,0,8,0,0,2,0,2,0,0,0,0,0,2,0,2,\n0,2,0,0,2,2,2,0,0,0,0,2,0,6,0,0,\n0,4,0,0,0,0,0,4,2,0,2,0,2,0,2,0,\n0,0,2,4,2,0,0,0,6,0,0,0,0,0,2,0,\n0,2,0,0,6,0,0,0,0,4,0,2,0,0,2,0,\n\n$ python main.py -in examples/affine -auto\nAutomatic analysis.\nSBox is affine! It is equivalent to the following matrices A, B:\n0 0 0 1 0 1 0 0       0\n1 0 0 1 1 1 1 0       1\n0 1 0 0 1 1 1 1       0\n1 0 1 1 0 0 1 1       1\n0 1 0 0 1 1 0 1       0\n1 0 1 0 0 1 1 0       1\n0 1 0 1 0 0 1 1       0\n0 0 1 0 1 0 0 1       0\nThat is, SBox(x) = A·x ⊕ B for all x. (x represented as a column binary vector)\n```\n\n## License\n\nSUnbox is released under the MIT License\n\n## Contributing\n\nContributions are welcome!\nIf you encounter any issues or have suggestions for\nimprovement, please open an issue or submit a pull\nrequest.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoustouflan%2Fsunbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoustouflan%2Fsunbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoustouflan%2Fsunbox/lists"}