{"id":50893986,"url":"https://github.com/pmarreck/pgpwords","last_synced_at":"2026-06-15T23:01:24.385Z","repository":{"id":361863880,"uuid":"1255976588","full_name":"pmarreck/pgpwords","owner":"pmarreck","description":"LuaJIT CLI for translating hexadecimal bytes to and from the PGP word list","archived":false,"fork":false,"pushed_at":"2026-06-01T14:47:17.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"yolo","last_synced_at":"2026-06-01T16:26:44.634Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/pmarreck.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-01T10:49:55.000Z","updated_at":"2026-06-01T15:23:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pmarreck/pgpwords","commit_stats":null,"previous_names":["pmarreck/pgpwords"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/pmarreck/pgpwords","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fpgpwords","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fpgpwords/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fpgpwords/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fpgpwords/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmarreck","download_url":"https://codeload.github.com/pmarreck/pgpwords/tar.gz/refs/heads/yolo","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fpgpwords/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34383468,"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-06-15T02:00:07.085Z","response_time":63,"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":[],"created_at":"2026-06-15T23:01:23.630Z","updated_at":"2026-06-15T23:01:24.377Z","avatar_url":"https://github.com/pmarreck.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pgpwords\n\n`pgpwords` translates hexadecimal bytes to and from the PGP word list.\n\nThe stock PGP word list maps each byte to one of two 256-word tables. Bytes are rendered left-to-right. Byte offset 0 uses the even table, byte offset 1 uses the odd table, and the tables alternate from there. This catches common spoken-word mistakes such as adjacent transpositions, insertions, and deletions when they disturb the expected even/odd sequence.\n\n## Usage\n\n```sh\npgpwords --encode E582\n# topmost Istanbul\n\npgpwords --decode 'topmost Istanbul'\n# E582\n\nprintf '82e5' | pgpwords --encode -\n# miser travesty\n```\n\nHex input is case-insensitive and may contain spaces, colons, hyphens, or underscores as separators. PGP words are case-insensitive.\n\n## Streaming\n\nExplicit stdin modes stream. `pgpwords --encode -` emits each word as soon as a complete byte is available, and `pgpwords --decode -` emits each hex byte as soon as a complete word is available. `--endian=auto` keeps only the bounded prefix needed to decide whether an endian marker or escape is present.\n\nWhen no `--encode` or `--decode` mode is provided for stdin, `pgpwords` buffers stdin so it can preserve auto-detection between hex and word input.\n\n## Endian Extension\n\nBy default, `pgpwords` follows the stock PGP wordlist behavior exactly: no endian marker is emitted or interpreted.\n\nThe optional endian extension is for byte streams that represent fingerprints or binary values where byte-order confusion would be costly.\n\n```sh\npgpwords --encode --endian=big E582\n# skydive travesty miser\n\npgpwords --decode --endian=auto 'skydive travesty miser'\n# E582\n```\n\n`--endian=big` is valid while encoding. It prefixes byte `BE` before the input bytes, with the assumption that the input is already in big-endian order. The marker intentionally shifts every following payload word to the opposite even/odd table.\n\n`--endian=auto` is valid while decoding. It interprets a leading `BE` byte as an extension marker and strips it from the returned hex bytes. Literal payloads that collide with marker prefixes use repeated `00 00` escapes:\n\nThe endian marker is width-agnostic metadata only. `pgpwords` does not reorder bytes and does not infer whether the payload represents 16-bit, 32-bit, 64-bit, or larger values. Any byte-order conversion has to happen before encoding; the marker records the intended interpretation of the byte stream.\n\n```text\nBE ...                    marker; return ...\n00 00 BE BE ...           escaped literal; return BE ...\n00 00 00 00 BE 00 00 BE ... escaped literal; return 00 00 BE ...\n```\n\nMalformed escaped prefixes are rejected instead of silently dropping bytes.\n\n## Development\n\n```sh\nnix develop\n./test\n./build\nnix flake check\n```\n\nThe executable lives at `bin/pgpwords` and uses `#!/usr/bin/env luajit` so it can be picked up directly by PATH setups that include this repository's `bin/` directory.\n\n## References\n\n- https://philzimmermann.com/docs/PGP_word_list.pdf\n- https://web.mit.edu/network/pgpfone/manual/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmarreck%2Fpgpwords","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmarreck%2Fpgpwords","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmarreck%2Fpgpwords/lists"}