Lost key -- retrieval possible?

Nori Heikkinen nori@sccs.swarthmore.edu
Mon Feb 10 10:46:01 2003


on Sat, 08 Feb 2003 10:23:54PM -0500, David Shaw insinuated:
> On Fri, Feb 07, 2003 at 12:38:35AM -0500, Nori Heikkinen wrote:
> > 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

this works ...

>   gpg --delete-secret-key nori

this does not:

orange:~/.gnupg> gpg --delete-secret-key nori
gpg: Oops; key not found anymore!            
gpg: nori: delete key failed: general error

should i try 
  
    gpg --delete-secret-key 11e030f1

?

>   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

below.

:public key packet:
  version 4, algo 17, created 1024861383, expires 0
  pkey[0]: [1024 bits]
  pkey[1]: [160 bits]
  pkey[2]: [1023 bits]
  pkey[3]: [1022 bits]
:user ID packet: "Nori Heikkinen <nori@sccs.swarthmore.edu>"
:signature packet: algo 17, keyid 4C3A598111E030F1
  version 4, created 1024861383, md5len 0, sigclass 13
  digest algo 2, begin of digest 3c fe
  hashed subpkt 2 len 5 (sig created 2002-06-23)
  hashed subpkt 9 len 5 (key expires after 1y0d0h0m)
  hashed subpkt 11 len 5 (pref-sym-algos: 7 10 3 4)
  hashed subpkt 21 len 3 (pref-hash-algos: 3 2)
  hashed subpkt 22 len 3 (pref-zip-algos: 2 1)
  hashed subpkt 23 len 2 (key server preferences: 80)
  subpkt 16 len 9 (issuer key ID 4C3A598111E030F1)
  data: [159 bits]
  data: [160 bits]
:signature packet: algo 17, keyid 220BC883330C4A75
  version 4, created 1025473246, md5len 0, sigclass 10
  digest algo 2, begin of digest 4a 9d
  hashed subpkt 2 len 5 (sig created 2002-06-30)
  subpkt 16 len 9 (issuer key ID 220BC883330C4A75)
  data: [159 bits]
  data: [159 bits]
:signature packet: algo 17, keyid 3FE38E3F0D03F053
  version 4, created 1025972544, md5len 0, sigclass 10
  digest algo 2, begin of digest e6 e5
  hashed subpkt 2 len 5 (sig created 2002-07-06)
  subpkt 16 len 9 (issuer key ID 3FE38E3F0D03F053)
  data: [160 bits]
  data: [160 bits]
:signature packet: algo 17, keyid F5E85A700CF9091A
  version 4, created 1025967676, md5len 0, sigclass 13
  digest algo 2, begin of digest 4b 5b
  hashed subpkt 2 len 5 (sig created 2002-07-06)
  critical hashed subpkt 3 len 5 (sig expires after 352d4h41m)
  subpkt 16 len 9 (issuer key ID F5E85A700CF9091A)
  data: [159 bits]
  data: [160 bits]
:signature packet: algo 17, keyid CA78CB3E6E76D81D
  version 4, created 1029557202, md5len 0, sigclass 10
  digest algo 2, begin of digest 42 f7
  hashed subpkt 2 len 5 (sig created 2002-08-17)
  subpkt 16 len 9 (issuer key ID CA78CB3E6E76D81D)
  data: [159 bits]
  data: [158 bits]
:signature packet: algo 17, keyid 51A617FBA6E596D8
  version 4, created 1030912507, md5len 0, sigclass 10
  digest algo 2, begin of digest 83 55
  hashed subpkt 2 len 5 (sig created 2002-09-01)
  subpkt 16 len 9 (issuer key ID 51A617FBA6E596D8)
  data: [159 bits]
  data: [156 bits]
:signature packet: algo 17, keyid 542A34358C921C25
  version 4, created 1030912646, md5len 0, sigclass 10
  digest algo 2, begin of digest d2 18
  hashed subpkt 2 len 5 (sig created 2002-09-01)
  subpkt 16 len 9 (issuer key ID 542A34358C921C25)
  data: [160 bits]
  data: [159 bits]
:signature packet: algo 17, keyid 58EC433412E1ACD5
  version 4, created 1030912837, md5len 0, sigclass 10
  digest algo 2, begin of digest 3d e3
  hashed subpkt 2 len 5 (sig created 2002-09-01)
  subpkt 16 len 9 (issuer key ID 58EC433412E1ACD5)
  data: [159 bits]
  data: [159 bits]
:signature packet: algo 17, keyid C49D3E3E1861F443
  version 4, created 1030912111, md5len 0, sigclass 13
  digest algo 2, begin of digest f6 56
  hashed subpkt 2 len 5 (sig created 2002-09-01)
  critical hashed subpkt 3 len 5 (sig expires after 294d23h14m)
  subpkt 16 len 9 (issuer key ID C49D3E3E1861F443)
  data: [159 bits]
  data: [160 bits]
:signature packet: algo 17, keyid 6322E18D09D33896
  version 4, created 1031624066, md5len 0, sigclass 10
  digest algo 2, begin of digest 76 e8
  hashed subpkt 2 len 5 (sig created 2002-09-10)
  subpkt 16 len 9 (issuer key ID 6322E18D09D33896)
  data: [160 bits]
  data: [160 bits]
:signature packet: algo 17, keyid C2CF465992AE7FC0
  version 4, created 1031625087, md5len 0, sigclass 10
  digest algo 2, begin of digest 28 ae
  hashed subpkt 2 len 5 (sig created 2002-09-10)
  subpkt 16 len 9 (issuer key ID C2CF465992AE7FC0)
  data: [158 bits]
  data: [159 bits]
:signature packet: algo 17, keyid EA3C089437E11F18
  version 4, created 1032808115, md5len 0, sigclass 10
  digest algo 2, begin of digest 1a bc
  hashed subpkt 2 len 5 (sig created 2002-09-23)
  subpkt 16 len 9 (issuer key ID EA3C089437E11F18)
  data: [159 bits]
  data: [159 bits]
:signature packet: algo 17, keyid 7FB1190BCA1E22A1
  version 4, created 1036682383, md5len 0, sigclass 12
  digest algo 2, begin of digest f4 1f
  hashed subpkt 2 len 5 (sig created 2002-11-07)
  critical hashed subpkt 3 len 5 (sig expires after 228d4h23m)
  subpkt 16 len 9 (issuer key ID 7FB1190BCA1E22A1)
  data: [160 bits]
  data: [160 bits]
:signature packet: algo 17, keyid 3F2EB64D19BC76F8
  version 4, created 1036716849, md5len 0, sigclass 13
  digest algo 2, begin of digest 2e 07
  hashed subpkt 2 len 5 (sig created 2002-11-08)
  critical hashed subpkt 3 len 5 (sig expires after 227d18h48m)
  subpkt 16 len 9 (issuer key ID 3F2EB64D19BC76F8)
  data: [160 bits]
  data: [160 bits]
:signature packet: algo 1, keyid 458C406CAC00E359
  version 4, created 1036694836, md5len 0, sigclass 13
  digest algo 1, begin of digest d8 17
  hashed subpkt 2 len 5 (sig created 2002-11-07)
  critical hashed subpkt 3 len 5 (sig expires after 228d0h55m)
  subpkt 16 len 9 (issuer key ID 458C406CAC00E359)
  data: [1022 bits]
:signature packet: algo 17, keyid 49820C1CEA59038E
  version 4, created 1036685883, md5len 0, sigclass 13
  digest algo 2, begin of digest 0e 96
  hashed subpkt 2 len 5 (sig created 2002-11-07)
  critical hashed subpkt 3 len 5 (sig expires after 228d3h25m)
  subpkt 16 len 9 (issuer key ID 49820C1CEA59038E)
  data: [159 bits]
  data: [160 bits]
:signature packet: algo 17, keyid 5DF19E2B67A7B584
  version 4, created 1036695236, md5len 0, sigclass 13
  digest algo 2, begin of digest bd 95
  hashed subpkt 2 len 5 (sig created 2002-11-07)
  critical hashed subpkt 3 len 5 (sig expires after 228d0h49m)
  subpkt 16 len 9 (issuer key ID 5DF19E2B67A7B584)
  data: [159 bits]
  data: [159 bits]
:signature packet: algo 17, keyid A0D4CE20AA7FF025
  version 4, created 1036727723, md5len 0, sigclass 13
  digest algo 2, begin of digest 5d c6
  hashed subpkt 2 len 5 (sig created 2002-11-08)
  critical hashed subpkt 3 len 5 (sig expires after 227d15h47m)
  subpkt 16 len 9 (issuer key ID A0D4CE20AA7FF025)
  data: [158 bits]
  data: [159 bits]
:signature packet: algo 17, keyid B947F56233E5C7F0
  version 4, created 1036779688, md5len 0, sigclass 10
  digest algo 2, begin of digest 6b b6
  hashed subpkt 2 len 5 (sig created 2002-11-08)
  subpkt 16 len 9 (issuer key ID B947F56233E5C7F0)
  data: [159 bits]
  data: [159 bits]
:signature packet: algo 17, keyid DA3BF8C82BA48C46
  version 4, created 1036720997, md5len 0, sigclass 13
  digest algo 2, begin of digest 03 77
  hashed subpkt 2 len 5 (sig created 2002-11-08)
  critical hashed subpkt 3 len 5 (sig expires after 227d17h39m)
  subpkt 16 len 9 (issuer key ID DA3BF8C82BA48C46)
  data: [156 bits]
  data: [159 bits]
:signature packet: algo 17, keyid 9AB41EF65AA5BCDF
  version 4, created 1036882217, md5len 0, sigclass 13
  digest algo 2, begin of digest 0a b4
  hashed subpkt 2 len 5 (sig created 2002-11-09)
  subpkt 16 len 9 (issuer key ID 9AB41EF65AA5BCDF)
  data: [160 bits]
  data: [159 bits]
:signature packet: algo 1, keyid 5DE020EFA79FDB0F
  version 3, created 1037658599, md5len 5, sigclass 10
  digest algo 1, begin of digest f7 bf
  data: [1016 bits]
:user ID packet: "Nori Heikkinen <nori@maenad.net>"
:signature packet: algo 17, keyid 4C3A598111E030F1
  version 4, created 1026414714, md5len 0, sigclass 13
  digest algo 2, begin of digest 4b ce
  hashed subpkt 2 len 5 (sig created 2002-07-11)
  hashed subpkt 9 len 5 (key expires after 1y0d0h0m)
  hashed subpkt 11 len 5 (pref-sym-algos: 7 10 3 4)
  hashed subpkt 21 len 3 (pref-hash-algos: 3 2)
  hashed subpkt 22 len 3 (pref-zip-algos: 2 1)
  hashed subpkt 23 len 2 (key server preferences: 80)
  subpkt 16 len 9 (issuer key ID 4C3A598111E030F1)
  data: [156 bits]
  data: [160 bits]
:signature packet: algo 17, keyid 58EC433412E1ACD5
  version 4, created 1030912840, md5len 0, sigclass 10
  digest algo 2, begin of digest f6 04
  hashed subpkt 2 len 5 (sig created 2002-09-01)
  subpkt 16 len 9 (issuer key ID 58EC433412E1ACD5)
  data: [160 bits]
  data: [159 bits]
:signature packet: algo 17, keyid 3F2EB64D19BC76F8
  version 4, created 1036716849, md5len 0, sigclass 13
  digest algo 2, begin of digest 3c dc
  hashed subpkt 2 len 5 (sig created 2002-11-08)
  critical hashed subpkt 3 len 5 (sig expires after 227d18h48m)
  subpkt 16 len 9 (issuer key ID 3F2EB64D19BC76F8)
  data: [158 bits]
  data: [157 bits]
:signature packet: algo 1, keyid 458C406CAC00E359
  version 4, created 1036694836, md5len 0, sigclass 13
  digest algo 1, begin of digest 3f 46
  hashed subpkt 2 len 5 (sig created 2002-11-07)
  critical hashed subpkt 3 len 5 (sig expires after 228d0h55m)
  subpkt 16 len 9 (issuer key ID 458C406CAC00E359)
  data: [1023 bits]
:signature packet: algo 17, keyid 49820C1CEA59038E
  version 4, created 1036685883, md5len 0, sigclass 13
  digest algo 2, begin of digest e6 b8
  hashed subpkt 2 len 5 (sig created 2002-11-07)
  critical hashed subpkt 3 len 5 (sig expires after 228d3h25m)
  subpkt 16 len 9 (issuer key ID 49820C1CEA59038E)
  data: [160 bits]
  data: [160 bits]
:signature packet: algo 17, keyid 5DF19E2B67A7B584
  version 4, created 1036695236, md5len 0, sigclass 13
  digest algo 2, begin of digest 1a b7
  hashed subpkt 2 len 5 (sig created 2002-11-07)
  critical hashed subpkt 3 len 5 (sig expires after 228d0h49m)
  subpkt 16 len 9 (issuer key ID 5DF19E2B67A7B584)
  data: [159 bits]
  data: [159 bits]
:signature packet: algo 17, keyid A0D4CE20AA7FF025
  version 4, created 1036727723, md5len 0, sigclass 13
  digest algo 2, begin of digest fe d0
  hashed subpkt 2 len 5 (sig created 2002-11-08)
  critical hashed subpkt 3 len 5 (sig expires after 227d15h47m)
  subpkt 16 len 9 (issuer key ID A0D4CE20AA7FF025)
  data: [158 bits]
  data: [160 bits]
:signature packet: algo 17, keyid B947F56233E5C7F0
  version 4, created 1036779690, md5len 0, sigclass 10
  digest algo 2, begin of digest cc 59
  hashed subpkt 2 len 5 (sig created 2002-11-08)
  subpkt 16 len 9 (issuer key ID B947F56233E5C7F0)
  data: [159 bits]
  data: [158 bits]
:signature packet: algo 17, keyid DA3BF8C82BA48C46
  version 4, created 1036720997, md5len 0, sigclass 13
  digest algo 2, begin of digest 21 15
  hashed subpkt 2 len 5 (sig created 2002-11-08)
  critical hashed subpkt 3 len 5 (sig expires after 227d17h39m)
  subpkt 16 len 9 (issuer key ID DA3BF8C82BA48C46)
  data: [159 bits]
  data: [158 bits]
:signature packet: algo 17, keyid 9AB41EF65AA5BCDF
  version 4, created 1036882227, md5len 0, sigclass 13
  digest algo 2, begin of digest c8 3c
  hashed subpkt 2 len 5 (sig created 2002-11-09)
  subpkt 16 len 9 (issuer key ID 9AB41EF65AA5BCDF)
  data: [160 bits]
  data: [159 bits]
:signature packet: algo 1, keyid 5DE020EFA79FDB0F
  version 3, created 1037658602, md5len 5, sigclass 10
  digest algo 1, begin of digest 3f e5
  data: [1024 bits]
:public sub key packet:
  version 4, algo 16, created 1024861420, expires 0
  pkey[0]: [2048 bits]
  pkey[1]: [3 bits]
  pkey[2]: [2048 bits]
:signature packet: algo 17, keyid 4C3A598111E030F1
  version 4, created 1024861420, md5len 0, sigclass 18
  digest algo 2, begin of digest 7a 25
  hashed subpkt 2 len 5 (sig created 2002-06-23)
  hashed subpkt 9 len 5 (key expires after 1y0d0h0m)
  subpkt 16 len 9 (issuer key ID 4C3A598111E030F1)
  data: [157 bits]
  data: [160 bits]




thanks!

</nori>

-- 
    .~.      nori @ sccs.swarthmore.edu 
    /V\  http://www.sccs.swarthmore.edu/~nori/jnl/
   // \\          @ maenad.net
  /(   )\       www.maenad.net
   ^`~'^