gpg:导入失败密钥 xxxxxxxx:没有有效的用户 ID

6 linux encryption pgp public-key-encryption gnupg

在 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
Run Code Online (Sandbox Code Playgroud)

即使在我的选项文件中添加了“allow-non-selfsigned-uid”之后。gpg 说使用这个密钥加密是不安全的。在导出公钥期间我们必须做些什么来解决这个问题?

小智 5

gpg 需要密钥所有者颁发的有效签名 - 这很重要,因为它将用户描述和电子邮件地址绑定到实际的公钥;否则,该信息可能会被任意修改。这个自签名似乎被破坏了,因此 gpg 拒绝使用该密钥。


小智 5

也可能是版本冲突:密钥(源自 gpg v2.x)可能有一些旧的 1.4 系列 gpg 不理解的功能。

(如果您尝试使用可以gpg --expert在 2.1 或更新版本中创建的椭圆曲线键来提供 2.1 之前的 gpg,则会给出类似的误导性错误消息。)

  • 不知道为什么你被否决了。这正是我的问题。解决方案?使用 `gpg2` 而不是 `gpg` 运行导入使得将我的 ECC 密钥导入新计算机变得更加容易! (2认同)