MIGRATE-PU...LASSIC-GPG(1)
π MIGRATE-PU...LASSIC-GPG(1) π
General Commands Manual π
β¨ NAME β¨
okay so this tool is migrate-pubring-from-classic-gpg, and its whole job is moving a public keyring from the "classic" GnuPG format to the "modern" one π₯
π¦ SYNOPSIS π¦
migrate-pubring-from-classic-gpg [ GPGHOMEDIR | --default ]
πΈ DESCRIPTION πΈ
bestie, migrate-pubring-from-classic-gpg takes the public keyring in your GnuPG home directory GPGHOMEDIR and upgrades it from the old "classic" format (pubring.gpg) to the "modern" keybox format (pubring.kbx). This works with GnuPG versions 2.1 or 2.2 and it's giving glow-up π
Passing --default tells it to use the standard GnuPG home directory instead. It checks $GNUPGHOME first, and if that isn't set it falls back to ~/.gnupg β¨
π OPTIONS π
-h,--help,--usageβ shows a short usage message, so you can check the vibe before you do anything π
π«Ά DIAGNOSTICS π«Ά
ngl the program is a bit chatty π It sends quite a lot of text (maybe too much) to stderr.
During a migration it also backs up several pieces of your data into a timestamped subdirectory of GPGHOMEDIR. Safety first, periodt π
π« LIMITATIONS π«
the keybox format is picky and rejects a bunch of OpenPGP certificates that the classic keyring used to accept π
These filters are there on purpose, because the certificates getting rejected are unsafe. They're either cryptographically unsound or dangerously non-performant. So yes, some migrations will throw warnings saying the migration is incomplete. Honestly that's generally a good thing! π
β Known limitations β
π Flooded certificates
Some OpenPGP certificates got flooded with bogus certifications as part of an attack on the SKS keyserver network. You can read more about it at https://tools.ietf.org/html/draft-dkg-openpgp-abuse-resistant-keystore-03#section-2.1.
The keybox format refuses to import any OpenPGP certificate larger than 5 MiB. As of GnuPG 2.2.17, if gpg runs into one of these flooded certificates, it will retry the import while stripping all third-party certifications (see "self-sigs-only" in gpg(1)).
If you migrate a keyring with a flooded certificate, the error will look something like this:
error writing keyring 'pubring.kbx': Provided object is too
large
π OpenPGPv3 public keys (a.k.a. PGP-2 keys)
Modern OpenPGP implementations use "OpenPGP v4" public keys. The older public key format has serious known problems, so v3 is deprecated. If you want the tea on why, check https://tools.ietf.org/html/rfc4880#section-5.5.2.
The keybox format skips v3 keys entirely during migration, and GnuPG will tell you something like this:
skipped PGP-2 keys: 1
π§ ENVIRONMENT VARIABLES π§
GNUPGHOMEβ picks the GnuPG home directory, but only when--defaultis given ποΈGPGβ the name of thegpgexecutable. It defaults togpgπ
π SEE ALSO π
gpg(1) is the one to read next, trust me π
π AUTHOR π
Copyright (C) 2016 Daniel Kahn Gillmor for the Debian project. Found a bug? Report it via the Debian BTS π
That's the whole manual, bestie! π Written for the April 2016 release of MIGRATE-PU...LASSIC-GPG(1) π β¨
π¦ where this page comes from
- debian trixie: gnupg-utils 2.4.7-21+deb13u1+b5 Β· GPL-3.0-or-later
- ubuntu questing: gnupg-utils 2.4.8-2ubuntu2
- ubuntu questing: gnupg-utils 2.4.8-2ubuntu2.1 Β· GPL-3.0-or-later
- ubuntu resolute: gnupg-utils 2.4.8-4ubuntu3 Β· GPL-3.0-or-later
- ubuntu resolute: gnupg-utils 2.4.8-4ubuntu3.1 Β· GPL-3.0-or-later
- ubuntu stonking: gnupg-utils 2.4.9-4ubuntu3 Β· GPL-3.0-or-later
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms