{"id":16467311,"url":"https://github.com/elforastero/gpgqr","last_synced_at":"2025-08-02T15:42:24.932Z","repository":{"id":69698710,"uuid":"480956304","full_name":"ElForastero/gpgqr","owner":"ElForastero","description":"🔑 A tool to backup and restore secret GPG keys using printable QR codes","archived":false,"fork":false,"pushed_at":"2022-04-13T19:50:11.000Z","size":61,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-08T23:46:08.181Z","etag":null,"topics":["backup","gpg","openpgp","paperkey","pgp","qrcode"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ElForastero.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":"2022-04-12T20:03:49.000Z","updated_at":"2024-05-02T13:24:32.000Z","dependencies_parsed_at":"2023-07-11T05:15:52.593Z","dependency_job_id":null,"html_url":"https://github.com/ElForastero/gpgqr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ElForastero/gpgqr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElForastero%2Fgpgqr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElForastero%2Fgpgqr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElForastero%2Fgpgqr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElForastero%2Fgpgqr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElForastero","download_url":"https://codeload.github.com/ElForastero/gpgqr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElForastero%2Fgpgqr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268413270,"owners_count":24246644,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":["backup","gpg","openpgp","paperkey","pgp","qrcode"],"created_at":"2024-10-11T11:46:55.907Z","updated_at":"2025-08-02T15:42:24.868Z","avatar_url":"https://github.com/ElForastero.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔑 → GPGQR → 🏞 → 🖨\n\n\u003e **gpgqr** helps to back up secret GPG keys as QR codes that may be printed\n\n### Requirements\n\n- https://github.com/google/zx\n- `split` or `gsplit` for MacOS\n- `paperkey`\n- `qrencode`\n- `zbarimg`\n\n## Creating backup\n\n1. ☝️ Install all the dependencies above.\n\n2. 🔑 Check if you have your secret keys on your machine:\n\n```bash\n$ gpg -K\n/var/folders/jx/5ll9xg7166945zr_jrzh423m0000gn/T/gnupg_202204132230_XXX.6TZDeVqr/pubring.kbx\n--------------------------------------------------------------------------------------------\nsec   rsa4096 2022-04-13 [SC]\n      5E4A60CDCE1374ADE9D4B42E311366FBF780DB86\nuid           [ultimate] Eugene Dzhumak \u003ceugene@example.com\u003e\nssb   rsa4096 2022-04-13 [E]\n```\n\nIf you see a hash symbol near the key type (`sec#`), it means your key is not on your machine. Did you store it offline\non a USB drive?\n\n3. 🏞 Run backup script providing your key identifier:\n\n```bash\n$ ./backup.mjs 5E4A60CDCE1374ADE9D4B42E311366FBF780DB86\nrm -f generated/*\ncp index.html generated/\ngpg --export-secret-key 5E4A60CDCE1374ADE9D4B42E311366FBF780DB86 | paperkey --output-type raw | base64 | gsplit -C 1500 -d -a 2 - generated/temp-chunk-\ncat generated/temp-chunk-00\nqrencode -l L -o generated/qr-1.png\ncat generated/temp-chunk-01\nqrencode -l L -o generated/qr-2.png\ncat generated/temp-chunk-02\nqrencode -l L -o generated/qr-3.png\n```\n\n4. 🖨 Open `./generated/index.html` in your browser and print the page or save it as PDF (\n   see [example](example/example.pdf))\n5. ✨ You are awesome ✨\n\n## Restoring\n\nTo restore secret keys you need to have your public key, what usually is not a problem.\n\n1. 🏞 Place QR images inside `/generated` folder naming them with number suffix for proper sorting (like `qr-1.png`)\n2. 🔐 Run the script providing a path to your public key file (binary, not armored)\n\n```bash\n$ ./restore.mjs ~/pubkey.gpg\nzbarimg -q --raw ./generated/*.png | base64 -d | paperkey --pubring /Users/eugenedzhumak/pubkey.gpg | gpg --import\ngpg: key 311366FBF780DB86: public key \"Eugene Dzhumak \u003ceugene@example.com\u003e\" imported\ngpg: key 311366FBF780DB86: secret key imported\ngpg: Total number processed: 1\ngpg:               imported: 1\ngpg:       secret keys read: 1\ngpg:   secret keys imported: 1\n```\n\n3. ✅ Done. Check your GPG keys, they were restored:\n\n```bash\n$ gpg --list-secret-keys\n/var/folders/jx/5ll9xg7166945zr_jrzh423m0000gn/T/gnupg_202204132230_XXX.6TZDeVqr/pubring.kbx\n--------------------------------------------------------------------------------------------\nsec   rsa4096 2022-04-13 [SC]\n      5E4A60CDCE1374ADE9D4B42E311366FBF780DB86\nuid           [ unknown] Eugene Dzhumak \u003ceugene@example.com\u003e\nssb   rsa4096 2022-04-13 [E]\n\n$ gpg --list-public-keys\n/var/folders/jx/5ll9xg7166945zr_jrzh423m0000gn/T/gnupg_202204132230_XXX.6TZDeVqr/pubring.kbx\n--------------------------------------------------------------------------------------------\npub   rsa4096 2022-04-13 [SC]\n      5E4A60CDCE1374ADE9D4B42E311366FBF780DB86\nuid           [ unknown] Eugene Dzhumak \u003ceugene@example.com\u003e\nsub   rsa4096 2022-04-13 [E]\n```\n\n### Links and credits\n\n- [Paperkey - an OpenPGP key archiver](https://www.jabberwocky.com/software/paperkey/)\n- [Paperkey ArchWiki](https://wiki.archlinux.org/title/Paperkey)\n- [Create a paper backup of your GPG key](https://medium.com/@johnnymatthews/create-a-paper-backup-of-your-gpg-key-5e43894c59a)\n- [Producing printable QR codes for persistent storage of GPG private keys](https://gist.github.com/joostrijneveld/59ab61faa21910c8434c)\n- https://github.com/balos1/easy-gpg-to-paper\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felforastero%2Fgpgqr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felforastero%2Fgpgqr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felforastero%2Fgpgqr/lists"}