Can't transfer old secret subkey to 1.0.7 secring

David Shaw dshaw@jabberwocky.com
Sat Jun 1 16:31:01 2002


On Sat, Jun 01, 2002 at 04:00:31PM +0200, Volker Gaibler wrote:

> I get the error message
> gpg: armor header: Version: GnuPG v1.0.7 (GNU/Linux)
> gpg: sec  1024D/86ECAC0B 2001-12-05   Volker Gaibler <mail@volker-gaibler.de>
> gpg: key 86ECAC0B: already in secret keyring
> gpg: Total number processed: 1
> gpg:       secret keys read: 1
> gpg:  secret keys unchanged: 1

Merging two different secret keys is not currently supported.  There
is a workaroung using "gpgsplit" (comes with GnuPG).

1) Export both secret keys into files
   gpg --export-secret-keys 86ECAC0B > first.gpg
   gpg --export-secret-keys --secret-keyring secold.gpg 490CC343 > second.gpg

2) Run gpgsplit on the second file.
   gpgsplit second.gpg

3) Delete the parts you don't want.  You only want the subkeys, so
   delete everything until the first secret subkey packet (i.e. if the
   first secret subkey is 000004, then delete 000001, 000002, and
   000003).

4) Merge the keys:
   cat first.gpg 00000* > newkey.gpg

5) Delete the current secret key
   gpg --delete-secret-key 86ECAC0B

6) Bring in the merged key:
   gpg --import newkey.gpg

Obviously, make a backup first!

David

-- 
   David Shaw  |  dshaw@jabberwocky.com  |  WWW http://www.jabberwocky.com/
+---------------------------------------------------------------------------+
   "There are two major products that come out of Berkeley: LSD and UNIX.
      We don't believe this to be a coincidence." - Jeremy S. Anderson