Page MenuHome GnuPG

misleading error messages when trying to handle keys that use unsupported algorithms
Closed, WontfixPublic

Description

trying to import an elliptic curve public key (created with a "modern" version)
with an older gpg version <2.1 fails with misleading error messages:

"gpg: key XXXXXXXX: 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"

please at least amend the "may be caused by" with an "or xxx" statement and
change "no valid user IDs" into "unable to extract valid user IDs"
but could gpg maybe even distinguish the situation of missing user IDs from
looking at an unsupported key?..

(it would have spared me some hours of search if i've had some better hint at
the cause of the problem in this message there.)

Details

Version
2.0.22, 1.4.16, 1.4.18

Event Timeline

bugmenot set Version to 2.0.22, 1.4.16, 1.4.18.
bugmenot added a subscriber: bugmenot.

There is a plethoria of reasons why a user ID is not valid. The most
common one has been a mssing self-signature, thus this note. Newer
releases of older branches actually know about new algorithms and may
print some info about this; but they are not able to handle them.

Here is what the current 1.4 prints for an ed25519/cv25519 key:

$ gpg1 --no-options -v --import <ed25519-cv25519-sample-1.asc
gpg: armor header: Version: GnuPG v2
gpg: can't handle public key algorithm 22
gpg: can't handle public key algorithm 18
gpg: pub 0?/2A020D0A 2016-06-22 patrice.lumumba@example.net
gpg: key 2A020D0A: unsupported public key algorithm on user ID
"patrice.lumumba@example.net"
gpg: key 2A020D0A: unsupported public key algorithm
gpg: key 2A020D0A: skipped user ID "patrice.lumumba@example.net"
gpg: key 2A020D0A: skipped subkey
gpg: key 2A020D0A: 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

The problem is pretty obvious. You need to use -v (--verbose) to see
all these messages.

marcus claimed this task.