{"id":20743004,"url":"https://github.com/pandh4cker/pandacipher","last_synced_at":"2026-05-27T06:31:32.701Z","repository":{"id":107313572,"uuid":"343499243","full_name":"PandH4cker/PandaCipher","owner":"PandH4cker","description":"Symetrical encryption/decryption program","archived":false,"fork":false,"pushed_at":"2021-03-23T13:20:39.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-25T18:59:18.180Z","etag":null,"topics":["argparse","c","cbc-mode","keccak256","permutation","s-box","sha-3","substitution-cipher","xor-cipher"],"latest_commit_sha":null,"homepage":"","language":"C","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/PandH4cker.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-03-01T17:24:04.000Z","updated_at":"2023-03-25T18:26:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"55eb9861-abb9-46ac-95f6-23069264b646","html_url":"https://github.com/PandH4cker/PandaCipher","commit_stats":null,"previous_names":["pandh4cker/pandacipher"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/PandH4cker/PandaCipher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PandH4cker%2FPandaCipher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PandH4cker%2FPandaCipher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PandH4cker%2FPandaCipher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PandH4cker%2FPandaCipher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PandH4cker","download_url":"https://codeload.github.com/PandH4cker/PandaCipher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PandH4cker%2FPandaCipher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33554779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"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":["argparse","c","cbc-mode","keccak256","permutation","s-box","sha-3","substitution-cipher","xor-cipher"],"created_at":"2024-11-17T07:08:45.519Z","updated_at":"2026-05-27T06:31:32.676Z","avatar_url":"https://github.com/PandH4cker.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PandaCipher\n\n---\n\n## Authors: \u003cbr/\u003e\u003cbr/\u003e [Raphael Dray](www.linkedin.com/in/raphaeldray), [Alex Samenaire](https://www.linkedin.com/in/alexsamenaire/) \u003cbr/\u003e\n\n---\n\n## Introduction:\n\n\u003e This program is a CLI application. \u003cbr/\u003e \u003cbr/\u003e\n\u003e It allows to encrypt/decrypt a string/file using its own cipher method defined by: XORing, Substitutions and Permutations. \u003cbr/\u003e \u003cbr/\u003e\n\u003e The avaible encryption modes are as follow:\n\u003e + CBC\n\n\u003e In bonus.h, a function named getBestSBox(...) is defined but not used in the whole program. This function allow you to search in 2\u003csup\u003e10\u003c/sup\u003e tries \n```C\nint * getBestSBox(int nbBits)\n{\n    DiffTable * diffTable = newDiffTable(nbBits);\n    int size = diffTable-\u003enbElts;\n\n    int * sBox = malloc(size * sizeof(int));\n    randomSBox(sBox, diffTable-\u003enbBits);\n\n    int * bestSBox = malloc(size * sizeof(int));\n        \n    initDiffTable(diffTable, sBox);\n    int max = diffTable-\u003emax;\n    int nbMax = -1;\n\n    for (int i = 0; i \u003c 1 \u003c\u003c 10; ++i)\n    {\n        memcpy(bestSBox, sBox, size * sizeof(int));\n        littleShuffle(bestSBox, size, 0.50);\n\n        initDiffTable(diffTable, bestSBox);\n        int n = numberOfMax(bestSBox, size, diffTable-\u003emax);\n        if (max \u003e diffTable-\u003emax || \n           (max == diffTable-\u003emax \u0026\u0026 (nbMax == -1 || nbMax \u003e n)))\n        {\n            max = diffTable-\u003emax;\n            nbMax = n;\n            memcpy(sBox, bestSBox, size * sizeof(int));\n        }\n    }\n    free(bestSBox);\n\n    initDiffTable(diffTable, sBox);\n    printf(\"Max in DiffTable: %d\\n\", diffTable-\u003emax);\n    printf(\"Number of max: %d\\n\", nbMax);\n    return sBox;\n}\n\n```\n\n\u003e It's written in __C programming language including some libraries like so:__\n\u003e + [SHA3 - Keccak](https://github.com/brainhub/SHA3IUF)\n\u003e + [Argp](https://github.com/coreutils/gnulib/blob/master/lib/argp.h)\n\n---\n\n## Usage:\n\n```\n❯ ./pandaCipher --help\nUsage: pandaCipher [OPTION...] ...args\nPandaCipher - Symetrical encryption/decryption program\n(https://github.com/MrrRaph/PandaCipher)\n\n  -d, --decrypt[=DIGEST]\n                             Specify decrypt mode\n  -e, --encrypt[=STR]   Specify encrypt mode\n  -i, --input-file=FILE Input file to be encrypted/decrypted\n  -k, --cipher-key=KEY  Key for crypting\n      --list-modes           Print cryptographic modes that can be\n                             used\n  -m, --encrypt-mode=MODE   Mode to use/used in the encryption.\n                             Specify the number of the mode that you can see by\n                             using --list-modes command (Default: 0, CBC)\n  -?, --help                 Give this help list\n      --usage                Give a short usage message\n  -V, --version              Print program version\n\nMandatory or optional arguments to long options are also mandatory or optional\nfor any corresponding short options.\n\nReport bugs to \u003cdray@et.esiea.fr\u003e|\u003csamenaire@et.esiea.fr\u003e.\n\n```\n\n### Example:\n\n\u003e You can encrypt/decrypt strings/files (with -i) on the command line.\n\u003e When encrypt/decrypt the program return the hex digest in case of non printable string when decrypting. Then you could use for example xxd with \"-r -p\" to convert hex string to string and recover the message.\n\n```\n❯ ./pandaCipher -e\"Les Panda c'est la vie\" -k \"Pandanimal\"\nAA2D3C4CBC6D5E0C43ACC93AA22146DB47F54A9F9DE07175D3A2D92B8E898BE8\n❯ ./pandaCipher -d\"AA2D3C4CBC6D5E0C43ACC93AA22146DB47F54A9F9DE07175D3A2D92B8E898BE8\" -k \"Pandanimal\"\n4C65732050616E6461206327657374206C612076696500000000000000000000\n❯ ./pandaCipher -d\"AA2D3C4CBC6D5E0C43ACC93AA22146DB47F54A9F9DE07175D3A2D92B8E898BE8\" -k \"Pandanimal\" | xxd -r -p\nLes Panda c'est la vie%                                                       \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpandh4cker%2Fpandacipher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpandh4cker%2Fpandacipher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpandh4cker%2Fpandacipher/lists"}