Disable importing V3 public keys from keyservers

David Leon Gil coruus at gmail.com
Fri Oct 10 20:47:36 CEST 2014


On Fri, Oct 10, 2014 at 2:13 PM, Werner Koch <wk at gnupg.org> wrote:
> Sure, gpg will import those keys - but they are not usable:

The reason GnuPG can't encrypt to those keys is because the signature
packet does not have the "encrypt" key usage flag set, as doing gpg
--list-packets would show you. (I didn't set these flags in the sample
code so that people wouldn't inadvertently encrypt to these spoofed
keys.)

If I set those bits, this works:

     gpg2 --home ./test --keyserver 127.0.0.1 -r wk at gnupg.org  -e
test/pubring.gpg
    gpg: 621CC013: There is no assurance this key belongs to the named user

    pub  3839R/621CC013 2013-08-05 Werner Koch <wk at gnupg.org>
    Primary key fingerprint: F5 05 05 91 B3 2C F2 E2  DB 25 4C 41 D4 16 4A 13

(It obviously isn't your key: it's >> 2048 bits.)

Attached. Try it for yourself.

> The real bug with faked keys is that they will clog the keyring because
> we take the first matching _keyid_.  But the very same problem exists
> with v4 keys.  Indeed, we better fix that problem for 2.1.0.

Very much agree; this is why I'm particularly concerned about
keyservers. (It's just an easy way for anyone on a public wifi
network, say, to generate a key that will make verifying downloaded
software impossible for anyone without a lot of experience using
GnuPG.)

> Aihh, those old broken v3 keys.  The usual practice of checking creation
> date and key length in addition to the fingerprint comes to mind of old
> timers.

Agreed. Is showing fingerprints the default in 2.1.0 then? (Maybe this
could get added to point releases too.)
-------------- next part --------------
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2

mQHvA1IAAAAAAAEO/1bY5PWpst3uIuXFkn2VINXE/kY6geBXZEJFVv3IRtmrlIRL
wVBGNXYIv4h8Ra9WyaVcz11mI0e+EV0q6LVxao6tUfrTyPU01onWog+vczSHJrsR
JTrC/uVSUCj+FgZruWmM2sO90qtQqt61NEsDP55B0F4Vuf6Rii9rI0vjgZ0yOREg
V65PKWO4E3pMuIhqYqNYfOc6P+64ietlWf0cWbQPWeI5dRUL0VQsExWxl5NzDAkK
k2hjUOCqQsq8v42Ft25vR/ZrZF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