Page MenuHome GnuPG

Consider all Issuer subpackets when validating a signature
Closed, InvalidPublic

Description

A signature may have multiple issuer subpackets. Supporting this may be useful to accelerate the adoption of v5-based certificates. Alice could convert her v4 certificate to a v5 certificate without retiring her v4 certificate, and her OpenPGP implementation could add both keyids to the signature. Then, when Bob tries to validate a signature from Alice, his implementation can still validate it even if his OpenPGP implementation only understands v4 certificates or only has the v4 variant. I've attached an example certificate, which gpg is unable to import.

$ gpg --import multiple-issuer-subpacket.pgp
gpg: key 0xFBF21AC90EC54370: 4 signatures not checked due to missing keys
gpg: key 0xFBF21AC90EC54370: new key but contains no user ID - skipped
gpg: key 0xFBF21AC90EC54370: failed to re-lookup public key: No public key
gpg: Total number processed: 1
gpg:           w/o user IDs: 1
gpg:       secret keys read: 1
$ gpg --list-packets multiple-issuer-subpacket.pgp
# off=0 ctb=c5 tag=5 hlen=2 plen=88 new-ctb
:secret key packet:
	version 4, algo 22, created 1618909780, expires 0
	pkey[0]: [80 bits] ed25519 (1.3.6.1.4.1.11591.15.1)
	pkey[1]: [263 bits]
	skey[2]: [256 bits]
	checksum: 0f75
	keyid: FBF21AC90EC54370
# off=90 ctb=c2 tag=2 hlen=3 plen=196 new-ctb
:signature packet: algo 22, keyid 0123456789ABCDEF
	version 4, created 1618909780, md5len 0, sigclass 0x1f
	digest algo 10, begin of digest 1b db
	critical hashed subpkt 2 len 4 (sig created 2021-04-20)
	critical hashed subpkt 9 len 4 (key expires after 3y0d17h26m)
	hashed subpkt 11 len 2 (pref-sym-algos: 9 7)
	hashed subpkt 16 len 8 (issuer key ID 0123456789ABCDEF)
	hashed subpkt 16 len 8 (issuer key ID FBF21AC90EC54370)
	hashed subpkt 20 len 70 (notation: salt@notations.sequoia-pgp.org=[not human readable])
	hashed subpkt 21 len 2 (pref-hash-algos: 10 8)
	critical hashed subpkt 27 len 1 (key flags: 01)
	hashed subpkt 30 len 1 (features: 01)
	data: [256 bits]
	data: [256 bits]
...

Details

Version
2.2.20

Event Timeline

This comment was removed by neal.
werner edited projects, added Feature Request, OpenPGP; removed Bug Report.

I just realized that my example is incorrect. It doesn't make sense to support multiple issuer subpackets on self signatures. But it is useful to do so on binary signatures and third-party certifications. Here's a better example, which gpg correctly supports. As such, this issue should be closed. Sorry for the noise.

$ sq armor alice.pgp
-----BEGIN PGP PRIVATE KEY BLOCK-----

lQVYBGB+ohYBDAC2FL0xv2/7YRyAtjkROZA3C971FKsHbufkmkqZWKV3vFdTxeG1
St8pGQ2w587Hzy4JSZl2j7y68mxG0Cw/eoYAWNo9LQZwOS6U6NWU5OyhwjDyh+mp
d6Pdvd3czLzozEIHxE5Bv40KOKKkub5eZbzGhgtYywbYEmlzaTofaFelZOmRxlo6
M64wKDEMPfP7nxFwsgA/v/21c6rUm3f9186zwkm0ObrD1D1lHjjNVdYHN4SU6+aG
lGb4bdkNaIVt1+HFGGiyBi4PgRDqXrV7AiFgh9hCuaoxSdTd+5Jd05looXzEkoz5
aPvhCAnobZgLEICiDhkgMV6QZUQed/U4IC+1WtsdJRzTnHa1WQa5lJoFZIZM2h3c
/6DYGqgBUqwjQUOIIuvweHDqgkWd0rt5uHh/MF6r9zynGaOqaenXWnYjCG0aRwtP
dKCMsGVFyMN6Z885EXjdYfk1sE2p2QvhGde9LN916yBPyDroABgRvETHAn+rWUD2
Y0Qfs4VzzWWG3X8AEQEAAQAL/iouF74EiR6E2qN+ky3IVf5Kg7XmudAZAyNUEt//
RyW7vccsWiMzWwscQK2wpZhoCFQidqiel6v/KNImu3lhGtXNv5DYc1tgA8h/P6sk
dSTr5YbpsVmO26ksqM7TpxeO6eT+ttpIU5YAlLzwQod/rgGXX92L+uPnMAKKZ+qK
s3MfM3SPrKs6+akyRlp9p52stc+TjLc39MAqMXLbKSrm6X1/Dq/vh7KB4k8gdywq
LFCzrcUJ+PdIPapjWBrhEbfmgIQiRIi0P0SruCuiknH5CAz9X0IW4JsAMmyPfKEn
obLuage9LvyyAQsc9KASTLgo19MFSORBW4DsfdiL+AjpdzOYbjLqXN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2xfAWIQTHlm4+fOZ9u+zl/BVOKtlEz8eMhgAA67ML/iZjlHlpsyUS
r57ayv28OgH4W8NdfB/Qx9wVCfcMImqmIuxA6fyd7NDzcCwleO7/UlG4sPsyQyr+
doM6mdh9vXIwVDyK5Ou5opDWQ+7S+GroFAyuFIiKqX6jSL8iZekK7L7KS90uz3hW
WyxQd6Kz0clOVym0yrfsCsJMUV4Way9cqgZE8uid5PFM7OZFT5m9t2XXMwFcLZix
Kdb34x5tMQ1XnBPjDansTVPxOgjja2SDVc6fp5v9J4mZ9qNIvNMsL3mnFIezGB51
L4BVzmL5060MJU4AsEZxoYGGqi2CWxqgYlzSIDix9RYQw6zNF11MKHJS/NYY7aqS
MsdPi5JHeOcwKvUk9RKQK5xenCFv2trkRs/akuv8fYPjpSgcrdx1ufBuFB51Pd4N
DaaxT1LPh55vkluj6qK4ci81LL5VDC13bWrTnFP4a0HBtJz9rN78ebAZ/tLD13Kn
VHFbLVw0lmkhcmPH1NTJwKX8vwI9PYaWpokp4QpiFMlLiZiB/L11ig==
=fDY0
-----END PGP SIGNATURE-----
$ gpg --list-packets msg.sig 
# off=0 ctb=c2 tag=2 hlen=3 plen=517 new-ctb
:signature packet: algo 1, keyid 0123456789ABCDEF
	version 4, created 1618912168, md5len 0, sigclass 0x00
	digest algo 10, begin of digest eb b3
	critical hashed subpkt 2 len 4 (sig created 2021-04-20)
	hashed subpkt 16 len 8 (issuer key ID 0123456789ABCDEF)
	hashed subpkt 16 len 8 (issuer key ID 4E2AD944CFC78C86)
	hashed subpkt 20 len 70 (notation: salt@notations.sequoia-pgp.org=[not human readable])
	hashed subpkt 33 len 21 (issuer fpr v4 C7966E3E7CE67DBBECE5FC154E2AD944CFC78C86)
	data: [3070 bits]
$ gpg --verify msg.sig msg.txt 
gpg: Signature made Tue 20 Apr 2021 11:49:28 AM CEST
gpg:                using RSA key C7966E3E7CE67DBBECE5FC154E2AD944CFC78C86
gpg: Good signature from "<alice@example.org>" [ultimate]
Primary key fingerprint: C796 6E3E 7CE6 7DBB ECE5  FC15 4E2A D944 CFC7 8C86