如何在验证签名与gpg后比较主键指纹?

时间:2014-12-03 08:16:29

标签: maven cryptography gnupg

我不熟悉密码学,我对主键指纹有疑问:

我已经下载了Apache Maven,正如他们在下载页面中所说,已经使用gpg验证了公钥的签名:

user$ gpg --verify apache-maven-3.2.3-bin.tar.gz.asc apache-maven-3.2.3-bin.tar.gz
gpg: Signature made Tue Aug 12 00:59:35 2014 MSK using DSA key ID BB617866
gpg: Good signature from "Someone <email@maven.org>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: FB11 D4BB 7B24 4678 337A  AD8B C7BF 26D0 BB61 7866

现在,我从http://www.apache.org/dev/release-signing#fingerprint读到,主键指纹是键的摘要,更易于阅读和比较,但我的问题是:

我该如何比较?我的意思是,我应该在哪里找到应该与谁比较指纹的对应物&#34; FB11 D4BB 7B24 4678 337A AD8B C7BF 26D0 BB61 7866&#34;?

1 个答案:

答案 0 :(得分:1)

public keys of the Maven developers链接在download page之上。

它只包含短ID,这些ID不足以验证密钥,但可以帮助您查找使用了哪个密钥。为此,请删除此密钥(在验证签名期间可能已从密钥服务器获取):

gpg --delete-keys [keyid]

现在准备导入此密钥,方法是将与上面给出的密钥ID匹配的公钥块复制到您选择的文件中。之后该文件应包含:

-----BEGIN PGP PUBLIC KEY BLOCK-----
[snip]
-----END PGP PUBLIC KEY BLOCK-----

现在使用gpg --import [file]导入。现在运行gpg --fingerprint [keyid],它应该打印签名验证输出中给出的相同指纹。

相关问题