{"id":24468907,"url":"https://github.com/ivan-guerra/caesar_cipher","last_synced_at":"2025-03-14T13:23:49.726Z","repository":{"id":231660027,"uuid":"782351692","full_name":"ivan-guerra/caesar_cipher","owner":"ivan-guerra","description":"Caesar Cipher encrypt/decrypt/cracking utilities","archived":false,"fork":false,"pushed_at":"2024-11-10T17:00:52.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T07:13:24.803Z","etag":null,"topics":["caesar-cipher","cryptography","password-cracking"],"latest_commit_sha":null,"homepage":"https://programmador.com/posts/2024/caesar-cipher/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivan-guerra.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-04-05T06:07:00.000Z","updated_at":"2024-11-10T17:00:56.000Z","dependencies_parsed_at":"2024-11-10T18:17:03.248Z","dependency_job_id":"cdd7e8c2-be07-4651-ab3d-ddcdec76a2bb","html_url":"https://github.com/ivan-guerra/caesar_cipher","commit_stats":null,"previous_names":["ivan-guerra/caesar_cipher"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivan-guerra%2Fcaesar_cipher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivan-guerra%2Fcaesar_cipher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivan-guerra%2Fcaesar_cipher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivan-guerra%2Fcaesar_cipher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivan-guerra","download_url":"https://codeload.github.com/ivan-guerra/caesar_cipher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243581732,"owners_count":20314291,"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":["caesar-cipher","cryptography","password-cracking"],"created_at":"2025-01-21T07:13:29.661Z","updated_at":"2025-03-14T13:23:49.692Z","avatar_url":"https://github.com/ivan-guerra.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Caesar Cipher Tools\n\nThis repo contains [Caesar Cipher][1] encode, decode, and cracking utilities.\nThese utilities only support the ASCII character set.\n\n### Encoding/Decoding Messages\n\nThe `ccipher` utility encodes/decodes messages. Below is the `ccipher` usage\nmessage:\n\n```text\nCaesar Cipher encryption/decryption utility.\n\nUsage: ccipher [OPTIONS] \u003cKEY\u003e\n\nArguments:\n  \u003cKEY\u003e  encryption/decryption key\n\nOptions:\n  -i, --input-file \u003cINPUT_FILE\u003e    input plaintext/ciphertext file\n  -o, --output-file \u003cOUTPUT_FILE\u003e  output plaintext/ciphertext file\n  -h, --help                       Print help\n  -V, --version                    Print version\n```\n\n`ccipher` accepts input from `STDIN` or from a file if one is specified via the\n`--input-file` option. Ciphertext is output to `STDOUT` by default but can also\nbe written to file via shell redirection or the `--output-file` option.\n\nIn the example below, we encrypt the contents of a file, `plaintext`, containing\nthe string `hello` using the key `27`. The output of the encrypt operation is\nsent to the file `ciphertext`. Another call to `ccipher` with a key of `-27`\ndecrypts the contents of `ciphertext` to `STDOUT`.\n\n```text\necho \"hello\" \u003e plaintext\n./ccipher -k 27 -i plaintext -o ciphertext\n./ccipher -k -27 -i ciphertext\n```\n\n### Code Cracking\n\nThe `ccracker` utility takes as input ciphertext produced by a Caesar Cipher and\noutputs the key that most probably decrypts the text. You can take the\nciphertext and the key output by `ccracker` and use them as input to `ccipher`\nto retrieve the secret message.\n\nBelow is the `ccracker` usage message:\n\n```\nCaesar cipher cracker.\n\nUsage: ccracker [OPTIONS]\n\nOptions:\n  -i, --ciphertext-file \u003cCIPHERTEXT_FILE\u003e\n          file containing ciphertext\n  -a, --attack \u003cATTACK\u003e\n          attack type [default: dictionary] [possible values: dictionary, frequency]\n  -h, --help\n          Print help (see more with '--help')\n  -V, --version\n          Print versiontext\n```\n\n`ccracker` reads ciphertext input from `STDIN` by default. Optionally, you can\nsupply the ciphertext in a file using the `--ciphertext-file` option. `ccracker`\nimplements two cracking algorithms: a dictionary attack and a frequency analysis\nattack. The dictionary attack is the default option. You can chose to run a\nfrequency attack with the `--attack frequency` option.\n\nBelow is an example of cracking a message using the dictionary attack:\n\n```text\necho \"\u0026#**-H\" | ./ccracker\n```\n\nThe output of the above command is `candidate key: 66`. We can apply this key to\nthe ciphertext using `ccipher`:\n\n```text\necho \"\u0026#**-H\" | ./ccipher -k 66\n```\n\nThe output will be the plaintext message `hello`!\n\n### References\n\n- [Popular English Words Dictionary][2]\n- [ASCII Character Frequency Table][3]\n\n[1]: https://en.wikipedia.org/wiki/Caesar_cipher#\n[2]: https://github.com/dolph/dictionary\n[3]: https://github.com/piersy/ascii-char-frequency-english?tab=readme-ov-file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivan-guerra%2Fcaesar_cipher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivan-guerra%2Fcaesar_cipher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivan-guerra%2Fcaesar_cipher/lists"}