How to convert (ancient) key in "version 2" to more modern "version 4" format?

Bjoern Kahl mls at bjoern-kahl.de
Mon May 23 21:56:32 CEST 2016


 Dear All,

 I have a long use key that has been created back in 2002 using
 - I think -  some gpg 1.0.x version.

 This key, at least when exported with "gpg2 --export" (or
 "--export-secret-key"), seems to be in some "key packet version 2"
 format, as "gpg2 --export | gpg2 --list-packets" shows:

 -------8<----8<-------
 :public key packet:
	version 2, algo 1, created 1022270000, expires 0
	pkey[0]: [1024 bits]
	pkey[1]: [5 bits]
	keyid: 1234567890123456
  ...
 ------->8---->8-------

 (Yes, it's only 1024 bits and that's not really up to modern needs,
  and while I eventually have to phase out this key, I still need to
  have it around for the time being. -- Key-rollover isn't a strength
  of the whole PGP system. :-( )

 Modern keys generated with gpg2 show a "version 4" in the second line.

 I'd like to convert the existing secret key and the corresponding
 public key, preferably without destroying the signatures, from
 "version 2" to "version 4".  For one thing, it would allow me to
 specify key preferences or set the primary ID, which seems to be
 not possible in the old format.

 For the other reason, I need to import the key into another software,
 in this case "Mailvelope", which does not support "version 2" keys.

 Is there a way to have gpg2 convert and export the key?  Looking
 through gpg2's online help and trying to "google" an answer with
 varying queries did not show up any definite advise.

 I am currently using gpg2 version 2.0.29 with libgcrypt 1.7.0,
 installed using MacPorts on MacOS X 10.9.5.


 Thanks

    Björn

-- 
|     Bjoern Kahl   +++   Siegburg   +++    Germany     |
|     "mls at -my-domain-"   +++    www.bjoern-kahl.de     |
| Languages: German, English, Ancient Latin (a bit :-)) |



More information about the Gnupg-users mailing list