{"id":15403216,"url":"https://github.com/woodruffw/baseperm","last_synced_at":"2025-04-16T03:15:55.414Z","repository":{"id":37160283,"uuid":"236637078","full_name":"woodruffw/baseperm","owner":"woodruffw","description":"A small tool for generating valid permutations of strings in baseN alphabets.","archived":false,"fork":false,"pushed_at":"2023-03-05T22:04:34.000Z","size":88,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T03:15:33.961Z","etag":null,"topics":["base32","base64","permutation","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/baseperm","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/woodruffw.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":"2020-01-28T01:50:35.000Z","updated_at":"2024-08-14T13:10:31.000Z","dependencies_parsed_at":"2024-11-03T02:32:41.360Z","dependency_job_id":null,"html_url":"https://github.com/woodruffw/baseperm","commit_stats":{"total_commits":71,"total_committers":3,"mean_commits":"23.666666666666668","dds":0.2816901408450704,"last_synced_commit":"acae49b21d4bfdf13c3217cdefee138cc340721b"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodruffw%2Fbaseperm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodruffw%2Fbaseperm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodruffw%2Fbaseperm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodruffw%2Fbaseperm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/woodruffw","download_url":"https://codeload.github.com/woodruffw/baseperm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249188431,"owners_count":21227015,"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":["base32","base64","permutation","rust"],"created_at":"2024-10-01T16:06:46.846Z","updated_at":"2025-04-16T03:15:55.380Z","avatar_url":"https://github.com/woodruffw.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"baseperm\n========\n\n![license](https://raster.shields.io/badge/license-MIT%20with%20restrictions-green.png)\n[![CI](https://github.com/woodruffw/baseperm/actions/workflows/ci.yml/badge.svg)](https://github.com/woodruffw/baseperm/actions/workflows/ci.yml)\n\nA small tool for generating valid permutations of strings in base*N* alphabets.\n\n## Theory of Operation\n\nMany popular binary-to-printable serialization/encoding schemes use\nalphabets whose bitnesses do not allow 8-bit bytes to fit evenly inside a symbol\n(or multiple symbols):\n\n* [base32](https://en.wikipedia.org/wiki/Base32): 5 bits\n* [base64](https://en.wikipedia.org/wiki/Base64): 6 bits\n* [base58](https://en.wikipedia.org/wiki/Base58): \\~5.86 bits\n\nConsequently, these encodings employ padding schemes to round their outputs to 8-bit multiples.\n\n`baseperm` manipulates the padding bits in these encodings to produce distinct, valid encoded\nforms that decode to the same input.\n\n## Why?\n\nProgrammers frequently make the mistake of assuming that encoded representations have a 1-1\ncorrespondence with their inputs. This results in all kinds of interesting, potentially exploitable\nerrors:\n\n* Ratelimiting bypasses due to keying on the serialized form\n\n* Dedeuplication and reuse bypasses\n\n* Forced dictionary collisions\n\n## Installation\n\n`baseperm` is a single command-line program. You can install it using `cargo`:\n\n```bash\ncargo install baseperm\n```\n\nOr by building it locally:\n\n```bash\ngit clone https://github.com/woodruffw/baseperm \u0026\u0026 cd baseperm\ncargo build\n```\n\n## Usage\n\n`baseperm` takes a permutation candidate on `stdin` and writes all permuted equivalent forms\nto `stdout`, separated by newlines. The original input is also included in the output, and (RFC4648)\nbase64 is the default.\n\n```bash\necho \"hello!\" | base64 | baseperm\n```\n\nAlternative encodings can be specified with `-e`, `--encoding`:\n\n```bash\necho \"hello!\" | base32 | baseperm -e base32\n```\n\nSee `baseperm -h` for a full list of supported encodings.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoodruffw%2Fbaseperm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoodruffw%2Fbaseperm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoodruffw%2Fbaseperm/lists"}