{"id":21889571,"url":"https://github.com/cuihaoleo/gpg-fingerprint-filter-gpu","last_synced_at":"2025-04-15T11:27:25.029Z","repository":{"id":147035707,"uuid":"269005979","full_name":"cuihaoleo/gpg-fingerprint-filter-gpu","owner":"cuihaoleo","description":"Generate OpenPGP keys with fingerprints that match a specific pattern (a.k.a. vanity keys)","archived":false,"fork":false,"pushed_at":"2022-10-26T22:28:29.000Z","size":42,"stargazers_count":104,"open_issues_count":3,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T08:14:28.481Z","etag":null,"topics":["cuda","gnupg","gpg","gpu","pgp","vanity"],"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/cuihaoleo.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":"2020-06-03T06:19:57.000Z","updated_at":"2025-04-04T02:55:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"28846bc7-bd8c-4fda-b2a3-0ef173b7ad33","html_url":"https://github.com/cuihaoleo/gpg-fingerprint-filter-gpu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuihaoleo%2Fgpg-fingerprint-filter-gpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuihaoleo%2Fgpg-fingerprint-filter-gpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuihaoleo%2Fgpg-fingerprint-filter-gpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuihaoleo%2Fgpg-fingerprint-filter-gpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuihaoleo","download_url":"https://codeload.github.com/cuihaoleo/gpg-fingerprint-filter-gpu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249060195,"owners_count":21206291,"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":["cuda","gnupg","gpg","gpu","pgp","vanity"],"created_at":"2024-11-28T11:24:58.744Z","updated_at":"2025-04-15T11:27:25.024Z","avatar_url":"https://github.com/cuihaoleo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## gpg-fingerprint-filter-gpu\n\nGenerate an OpenPGP key whose fingerprint matches a specific pattern.\n\nGet your lucky key! CUDA powered, so fast!\n\n```\n$ ./gpg-fingerprint-filter-gpu --help\n  gpg-fingerprint-filter-gpu [OPTIONS] \u003cpattern\u003e \u003coutput\u003e\n\n  \u003cpattern\u003e                   Key pattern to match, for example 'X{8}|(AB){4}'\n  \u003coutput\u003e                    Save secret key to this path\n  -a, --algorithm \u003cALGO\u003e      PGP key algorithm [default: rsa]\n  -t, --time-offset \u003cN\u003e       Max key timestamp offset [default: 15552000]\n  -w, --thread-per-block \u003cN\u003e  CUDA thread number per block [default: 512]\n  -j, --gpg-thread \u003cN\u003e        Number of threads to generate keys [default: 12]\n  -b, --base-time \u003cN\u003e         Base key timestamp (0 means current time) [default: 0]\n  -h, --help\n```\n\n### Pattern\n\n- Only matches end part of a string.\n- A hex digit means itself.\n- Other Latin alphabets (`g` to `z`) are to match any hex digit.\n- `{N}` to repeat previous digit or group for N times.\n- `(PATTERN)` a group pattern.\n- Use `|` to split multiple patterns.\n\nExamples:\n\n- `deadbeef` equals to regex `deadbeef$`\n- `x{8}` equals to regex `([0-9a-f])\\1{7}$`\n- `(xy){4}` equals to regex `([0-9a-f][0-9a-f])\\1{3}$`\n- `xxxxa{4}` equals to regex `([0-9a-f])\\1{3}aaaa$`\n\n### Import Key\n\nImport the generated private key:\n\n```\n$ gpg --allow-non-selfsigned-uid --import private.pgp\n```\n\nThe private key file doesn't have a self-signed UID on it. GPG will display `NONAME` as the default UID.\nYou need to add a valid UID and remove the default one to make the key usable:\n\n```\n$ gpg --edit-key \u003cKEY_FINGERPRINT\u003e\ngpg\u003e adduid\nReal name: Your Name Here\nEmail address: your_email@example.com\n......\ngpg\u003e uid 1\ngpg\u003e deluid\ngpg\u003e save\n```\n\n### Merge Key\n\nSince cv25519 cannot be used as primary key, you need to merge the generated key with an existing key:\n\nReference: https://security.stackexchange.com/questions/32935/migrating-gpg-master-keys-as-subkeys-to-new-master-key\n\nTLDR:\n\n1. Primary key should be created earlier than subkey. \n2. To persevere the subkey fingerprint, you need perserve the subkey creation time.\n\n```\ngpg -k --with-colons\ngpg --with-keygrip -k\ngpg --expert --faked-system-time=\"[sub key timestamp]\\!\" --ignore-time-conflict --edit-key [master key id]\naddkey\n13 (existing key)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuihaoleo%2Fgpg-fingerprint-filter-gpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuihaoleo%2Fgpg-fingerprint-filter-gpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuihaoleo%2Fgpg-fingerprint-filter-gpu/lists"}