Downgrade GnuPG Keys

Keys created with newer GnuPG versions cannot be read with older versions. We need to export and import them properly.

  1. Make a backup of the .gnupg directory of the new GnuPG version:
          cp -pR .gnupg .gnupg-backup
        
  2. Change the integrity protection of the key to a simpler checksum known by older versions of GnuPG:
          gpg --simple-sk-checksum --edit-key <key>
          ...
          Command> passwd
          ...
          Enter passphrase:
          ...
          Enter the new passphrase for this secret key.
          Enter passphrase:
          Repeat passphrase: 
          ...
          Command> save
        
  3. Export the secret and public keys:
          gpg --export-secret-key <key> > key.sec
          gpg --export <key> > key.pub
        
  4. Import the keys with the older GnuPG version:
          gpg --allow-secret-key-import --import key.sec
          gpg --import key.pub
        
  5. When you are done with all keys you wanted to downgrade, restore the backup from step 1.

Oliver Hitz, 20030703

Disclaimer: This information is provided "as is", with absolutely no warranty expressed or implied. Any use is at your own risk.