Problems with a malformed (?) key

Werner Koch wk at isil.d.shuttle.de
Sat Jul 4 20:43:36 CEST 1998


James Troup <james at nocrew.org> writes:

> | 16:29:05 at junk| ~/debian-keyring $gpg --no-default-keyring --keyring ./fubar.gpg --import 1
> | gpg: keyid 9EB2E7D1: secret key without public key
> | gpg: failed to initialize the TrustDB: Public key not found
> 
> ^^ Incidentally; what's this?  It happens even on valid keys.

You have a secret key but there is no public key for it available. 
You have a "secret-keyring somewhere/somefile.gpg" in ~/gnupg/options?

> | gpg: malformed CRC
> | gpg: 1: key E1EE3FB1 imported

The ascii armor is corrupt.  I wonder why the key imports okay.


> | 16:29:22 at junk| ~/debian-keyring $gpg --no-default-keyring --keyring ./fubar.gpg --list-keys
> | ./fubar.gpg
> | -----------
> | gpg: packet(2) too short

A signature packet is too short; see the CRC error above. 
I should handle such a CRC correctly.

> | 16:29:29 at junk| ~/debian-keyring $gpg --no-default-keyring --keyring ./fubar.gpg --delete-key 0xE1EE3FB1
> | gpg: packet(2) too short

Same as above.

> | gpg: read_keyblock: read error: Invalid packet
> | gpg: enum_keyblocks(read) failed: g10err=32

  32 = Invalid keyring.

Due to the invalid packet the whole keyring gets out of sync; it can't
find the begin of the next packet.  gpg should better abort if it sees 
an invalid keyring or skip the rest of the keyring. 


Werner





More information about the Gnupg-devel mailing list