Linux – gpg: import failure key xxxxxxxx: no valid user IDs

encryptiongnupglinuxpgppublic-key-encryption

i am getting this error while importing a public key on gpg (GnuPG) 1.4.2

gpg: armor header: Version: GnuPG v2.0.14 (GNU/Linux)
gpg: pub  xxxxx/xxxxxxxx 2012-05-25  abcd xyz <email@address.com>
gpg: DSA requires the use of a 160 bit hash algorithm
gpg: DSA requires the use of a 160 bit hash algorithm
gpg: key xxxxxxxx: invalid self-signature on user ID "abcd xyz <email@address.com>"
gpg: DSA requires the use of a 160 bit hash algorithm
gpg: DSA requires the use of a 160 bit hash algorithm
gpg: key xxxxxxxx: invalid subkey binding
gpg: key xxxxxxxx: skipped user ID "abcd xyz <email@address.com>"
gpg: key xxxxxxxx: skipped subkey
:pg: 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

Even after adding "allow-non-selfsigned-uid" in my options file. gpg say its not safe to encrypt using this key. Is there anything the we must do during exporting the public key to fix this ?

Best Answer

It might also be a version conflict: The key (originating from gpg v2.x) may have some feature old 1.4 series gpg doesn't understand.

(Similar, misleading error messages are given if you try to feed a pre-2.1 gpg with an elliptic curve key that you can create using gpg --expert in version 2.1 or newer.)

Related Question