Lost key -- retrieval possible?
David Shaw
dshaw@jabberwocky.com
Sun Feb 9 04:52:46 2003
On Fri, Feb 07, 2003 at 12:38:35AM -0500, Nori Heikkinen wrote:
> hi,
>
> in moving files around between computers (frantically doing backups
> when i thought my hard drive was on the fritz), i seem to have
> corrupted or lost my private key. i of course have no backup of the
> key, and failed to generate a revocation certificate (it will expire
> in a few months, though). rather than just letting it die, though, i
> was hoping there was a way to recover it.
>
> i can't read anything encrypted to me, or sign or encrypt anything.
> when i try to (with mutt or on the command line), i get the error
> message:
>
> gpg: Ohhhh jeeee: ... this is a bug (getkey.c:2151:lookup)
> secmem usage: 1632/1632 bytes in 3/3 blocks of pool 1632/16384
>
> which seems to me exceedingly weird.
That is indeed weird. That means you have something other than a
secret key mixed in with your secret key data. It does look like
corruption.
The first thing to try is to export and re-import the key - with a bit
of luck, the important parts of the key won't be corrupt.
cp ~/.gnupg/secring.gpg ~/.gnupg/secring.backup
gpg --export-secret-key nori > nori.gpg
gpg --delete-secret-key nori
gpg --import nori.gpg
If that does not help, then I need some more information. What
happens when you do:
gpg --no-comment --export-secret-key nori | gpg --list-packets
That will display the structure of your secret key.
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