{"id":28373422,"url":"https://github.com/qrichert/jolokia","last_synced_at":"2026-03-03T21:01:21.443Z","repository":{"id":295382577,"uuid":"989976688","full_name":"qrichert/jolokia","owner":"qrichert","description":"Simple, strong encryption.","archived":false,"fork":false,"pushed_at":"2025-07-20T09:35:18.000Z","size":359,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-14T19:53:06.320Z","etag":null,"topics":["asymmetric-encryption","chacha20-poly1305","cli","cryptography","hpke","rust","rust-cli","symmetric-encryption"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/jolokia","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qrichert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"zenodo":null}},"created_at":"2025-05-25T08:36:06.000Z","updated_at":"2025-08-07T16:30:11.000Z","dependencies_parsed_at":"2025-05-25T09:01:47.608Z","dependency_job_id":"3b3c5682-86b3-4f71-adbe-8e5a0081806c","html_url":"https://github.com/qrichert/jolokia","commit_stats":null,"previous_names":["qrichert/jolokia"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/qrichert/jolokia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qrichert%2Fjolokia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qrichert%2Fjolokia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qrichert%2Fjolokia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qrichert%2Fjolokia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qrichert","download_url":"https://codeload.github.com/qrichert/jolokia/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qrichert%2Fjolokia/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30060625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["asymmetric-encryption","chacha20-poly1305","cli","cryptography","hpke","rust","rust-cli","symmetric-encryption"],"created_at":"2025-05-29T19:39:02.012Z","updated_at":"2026-03-03T21:01:21.438Z","avatar_url":"https://github.com/qrichert.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jolokia\n\n![Crates.io License](https://img.shields.io/crates/l/jolokia)\n![GitHub Tag](https://img.shields.io/github/v/tag/qrichert/jolokia?sort=semver\u0026filter=*.*.*\u0026label=release)\n[![tokei (loc)](https://tokei.rs/b1/github/qrichert/jolokia?label=loc\u0026style=flat)](https://github.com/XAMPPRocky/tokei)\n[![crates.io](https://img.shields.io/crates/d/jolokia?logo=rust\u0026logoColor=white\u0026color=orange)](https://crates.io/crates/jolokia)\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/qrichert/jolokia/ci.yml?label=tests)](https://github.com/qrichert/jolokia/actions)\n\n_Simple, strong encryption._\n\n## Examples\n\n```console\n$ jolokia keygen\nhNbaua5cGlUNsEp4HSUTSJG7gl5IURQiTvnABzhFW4w\n\n$ jolokia encrypt \"hello, world!\" --key hNbaua5cGlUNsEp4HSUTSJG7gl5IURQiTvnABzhFW4w\nQ0gyMAGnAk2xt/+cAAAAHYUv/WBO+VxMGHodIL0Qzjbtnv/LPpQd3CCcYW0kAAAAAA\n\n# Same as passing `--key`.\n$ export JOLOKIA_CIPHER_KEY=hNbaua5cGlUNsEp4HSUTSJG7gl5IURQiTvnABzhFW4w\n\n$ jolokia decrypt Q0gyMAGnAk2xt/+cAAAAHYUv/WBO+VxMGHodIL0Qzjbtnv/LPpQd3CCcYW0kAAAAAA\nhello, world!\n\n# The key can be stored inside a file as well.\n$ jolokia decrypt --key /secrets/jolokia.key Q0gyMAGnAk2xt/+cAAAAHYUv/WBO+VxMGHodIL0Qzjbtnv/LPpQd3CCcYW0kAAAAAA\nhello, world!\n```\n\n## Get `--help`\n\n```\nSimple, strong encryption.\n\nUsage: jolokia [\u003coptions\u003e] \u003ccommand\u003e [\u003cargs\u003e]\n\nCommands:\n  keygen                 Generate cipher key\n  encrypt                Encrypt plaintext\n  decrypt                Decrypt ciphertext\n\nArgs:\n  \u003cMESSAGE\u003e\n  -k, --key \u003cKEY\u003e        Cipher key (base64)\n  -r, --raw              Handle message as raw binary\n  -f, --file \u003cFILE\u003e      Read message from file\n    -i, --in-place       Write output to input file\n  -o, --output \u003cFILE\u003e    Write output to file\n\nOptions:\n  -h, --help             Show help message and exit\n  -V, --version          Show the version and exit\n```\n\n### What does jolokia do?\n\njolokia provides strong, modern, hard-to-misuse encryption for the\ngeneral public.\n\n\u003e [!WARNING]\n\u003e\n\u003e jolokia has not been audited for security. It is based on audited\n\u003e dependencies for the underlying algorithm implementations, but the\n\u003e final package (what you're using) was not.\n\n\u003e [!CAUTION]\n\u003e\n\u003e Do not encrypt data you can't afford to lose. Be especially cautious\n\u003e of in-place encryption; always make a backup first. If you lose your\n\u003e key, or if there's a bug, **YOUR DATA WILL NOT BE RECOVERABLE**.\n\n### Algorithms\n\n| Name              | Key Size            | Type       |\n| ----------------- | ------------------- | ---------- |\n| ChaCha20-Poly1305 | 32-bytes (256-bits) | Symmetric  |\n| HPKE              | 32-bytes (256-bits) | Asymmetric |\n| ROT-n             | 0..255 (insecure)   | Symmetric  |\n\n### Key\n\nIn jolokia, a key is always a base64-encoded string of bytes. The size\nof the key varies depending on the selected algorithm.\n\nTo generate a new key run:\n\n```console\n$ jolokia keygen\nhNbaua5cGlUNsEp4HSUTSJG7gl5IURQiTvnABzhFW4w\n```\n\nTo use the key, pass it as `--key` or `-k`:\n\n```console\n$ jolokia encrypt \"foo\" --key hNbaua5cGlUNsEp4HSUTSJG7gl5IURQiTvnABzhFW4w\nQ0gyMAGSwlWJdALzAAAAE448viN3l+rwa7W4RdkRI0V/VckAAAAA\n```\n\nOr as an environment variable (but `--key` has precedence):\n\n```console\n$ export JOLOKIA_CIPHER_KEY=hNbaua5cGlUNsEp4HSUTSJG7gl5IURQiTvnABzhFW4w\n$ jolokia encrypt \"foo\"\nQ0gyMAGSwlWJdALzAAAAE448viN3l+rwa7W4RdkRI0V/VckAAAAA\n```\n\nThe key can also be the name of a file that contains a key:\n\n```console\n$ echo hNbaua5cGlUNsEp4HSUTSJG7gl5IURQiTvnABzhFW4w \u003e /secrets/jolokia.key\n$ jolokia decrypt --key /secrets/jolokia.key Q0gyMAGSwlWJdALzAAAAE448viN3l+rwa7W4RdkRI0V/VckAAAAA\nfoo\n```\n\nTo set a key permanently, the recommended solution is to point the\nenvironment variable to a file:\n\n```console\n$ echo hNbaua5cGlUNsEp4HSUTSJG7gl5IURQiTvnABzhFW4w \u003e ~/.jolokia.key\n$ echo 'export JOLOKIA_CIPHER_KEY=\"$HOME/.jolokia.key\"' \u003e\u003e ~/.bashrc\n```\n\n### Message\n\nThe message can be passed on the command line:\n\n```console\n$ jolokia encrypt \"bar\"\nQ0gyMAHPNRsLieAOAAAAE/ssTCh2zCm73t+aQf9aKNepgPkAAAAA\n```\n\nOr from a file:\n\n```console\n$ jolokia encrypt --file bar.txt\nQ0gyMAHPNRsLieAOAAAAE/ssTCh2zCm73t+aQf9aKNepgPkAAAAA\n```\n\nOr via `stdin` (but the command line has precedence):\n\n```console\n$ cat bar.txt | jolokia encrypt\nQ0gyMAHPNRsLieAOAAAAE/ssTCh2zCm73t+aQf9aKNepgPkAAAAA\n```\n\nBy definition, you can round-trip it:\n\n```console\n$ jolokia encrypt \"hello, world\" -o encrypted.txt\n$ jolokia decrypt -f encrypted.txt\nhello, world\n```\n\nYou can also encrypt or decrypt a file in-place:\n\n```console\n$ jolokia encrypt -f cat.gif --in-place\n$ jolokia decrypt -f cat.gif -i\n```\n\n### Raw I/O\n\nIf you do not want base64 encoding, you can pass the `--raw` or `-r`\nflag. This makes sense for larger files for which you don't want the\n~33% size overhead of base64.\n\n```console\n$ jolokia encrypt --raw \"hello, world\" \u003e hello.enc\n$ cat hello.enc | jolokia decrypt --raw\nhello, world\n```\n\nBase64 is the simplest and safest option for most users. It makes it\neasy to copy-paste and share ciphertext. Use `--raw` only if you know\nwhat you're doing.\n\n### Compression\n\nBYOC. jolokia does not provide built-in compression, but you can bring\nyour own:\n\n```console\n$ gzip -c cat.gif | jolokia encrypt -r \u003e out.enc\n$ jolokia decrypt -r -f out.enc | gunzip \u003e cat.gif\n```\n\nIf you need to compress and encrypt multiple files or directories,\nconsider `tar`ing them:\n\n```console\n$ tar -czf - cat.gif more-gifs/ | jolokia encrypt -r \u003e out.enc\n$ jolokia decrypt -r -f out.enc | tar -xzf -\n```\n\nIt makes sense to combine compression with `--raw` to get the smallest\nfile size possible.\n\n## Roadmap\n\n- [ ] If multiple algorithms, should we keep `JOLOKIA_CIPHER_KEY` as\n      default also support specialized:\n      `JOLOKIA_CIPHER_KEY_CHACHA20POLY1305`?). If so, rename\n      `JOLOKIA_CIPHER_KEY` to just `JOLOKIA_KEY`.\n- [ ] Add tests. Test coverage is _decent_. What's missing to get to\n      100% are tests for the error cases, edge cases, and false\n      negatives.\n\n## Installation\n\n### Directly\n\n```console\n$ wget https://github.com/qrichert/jolokia/releases/download/X.X.X/jolokia-X.X.X-xxx\n$ sudo install ./jolokia-* /usr/local/bin/jolokia\n```\n\n### Manual Build\n\n#### System-wide\n\n```console\n$ git clone https://github.com/qrichert/jolokia.git\n$ cd jolokia\n$ make build\n$ sudo make install\n```\n\n#### Through Cargo\n\n```shell\ncargo install jolokia\ncargo install --git https://github.com/qrichert/jolokia.git\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqrichert%2Fjolokia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqrichert%2Fjolokia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqrichert%2Fjolokia/lists"}