GPGME: Invalid value when trying to encrypt with certain keys

Jan Girlich vollkorn at cryptobitch.de
Wed Aug 30 06:55:39 CEST 2017


Am 29.08.2017 um 21:51 schrieb Peter Lebbing:
> On 29/08/17 17:50, Jan Girlich wrote:
>> One specific key (available on the key servers as 0xDC3E9C95) causes an
>> "Invalid value" error, but this key is in use since 1996 and works fine
>> when used directly with gpg or enigmail.
> 
> It's an ancient key that should not be used anymore for anything more
> than curiosity value, and recent versions of OpenPGP software might well
> deny to use it. For instance, my GnuPG 2.1.18 (Debian stretch) refuses
> it with "skipped PGP-2 keys":

fair enough, but then I expect gpgme to reject it with a proper error
stating so and not an opaque "invalid value".

This behavior makes me believe there is some inner logic making
assumptions about how keys are structured, which does not hold true.

My gpg 1.4.20 does accept the key (but not it's md5 signatures)

% LANG="C" gpg -vv --recv-keys 0xDC3E9C95
gpg: requesting key DC3E9C95 from hkp server keys.gnupg.net
gpg: armor: BEGIN PGP PUBLIC KEY BLOCK
gpg: armor header: Version: SKS 1.1.6
gpg: armor header: Comment: Hostname: pgpkeys.co.uk
:public key packet:
	version 3, algo 1, created 849795723, expires 0
	pkey[0]: [2048 bits]
	pkey[1]: [5 bits]
	keyid: 0780F54BDC3E9C95
:user ID packet: "birkmair"
:signature packet: algo 1, keyid 0780F54BDC3E9C95
	version 3, created 849795725, md5len 5, sigclass 0x10
	digest algo 1, begin of digest c6 53
	data: [2042 bits]
:user ID packet: "birkmair frank"
:signature packet: algo 1, keyid 0780F54BDC3E9C95
	version 3, created 888724556, md5len 5, sigclass 0x10
	digest algo 1, begin of digest 40 9d
	data: [2048 bits]
:signature packet: algo 1, keyid 44B8DDD6BB1D9F6D
	version 3, created 922794522, md5len 5, sigclass 0x10
	digest algo 1, begin of digest 55 17
	data: [1024 bits]
:signature packet: algo 17, keyid 61A6C208B75F3105
	version 4, created 1002273638, md5len 0, sigclass 0x10
	digest algo 2, begin of digest 5b 45
	hashed subpkt 2 len 4 (sig created 2001-10-05)
	subpkt 16 len 8 (issuer key ID 61A6C208B75F3105)
	data: [160 bits]
	data: [159 bits]
gpg: pub  2048R/DC3E9C95 1996-12-05  birkmair
gpg: Note: signatures using the MD5 algorithm are rejected
gpg: key DC3E9C95: invalid self-signature on user ID "birkmair"
gpg: key DC3E9C95: invalid self-signature on user ID "birkmair frank"
gpg: key DC3E9C95: skipped user ID "birkmair"
gpg: key DC3E9C95: skipped user ID "birkmair frank"
gpg: key DC3E9C95: no valid user IDs
gpg: this may be caused by a missing self-signature
gpg: Total number processed: 1
gpg:           w/o user IDs: 1

Cheers
vollkorn



More information about the Gnupg-devel mailing list