在keyserver.ubuntu.com我查找了一个公钥,比如说这个,quux foo
用作搜索字符串,当你点击那里的任何超链接时,比如说第一个,你会得到这个,第一行和最后几行我将在下面显示:
-----BEGIN PGP PUBLIC KEY BLOCK-----
xsFNBFWnnlYBEACxP/X6kj+eOQepGtv5MGXKGvyfzrxWjf1MHP6CX+l932TtoC/a
mraSF4f4HI3i0p9BCbPCTxJSA5AkT0CgF34s3IqpR+vYF8wsdj3yvfvckN/2l72d
.
.
.
koiZ01CsJs1RzL1cNPx6MofudBq4tTwjtzx0hWYmkZqwGas8EQ+BDHHYOmDmflfK
6ovi3RGi9Js0vgSSDeFFVUO5YuIg0KHD
=mPX8
-----END PGP PUBLIC KEY BLOCK-----
我使用GnuPG,并执行以下操作:
$ gpg --keyserver keyserver.ubuntu.com --search-keys quux foo
结果如下:
gpg: data source: http://162.213.33.9:11371
(1) Anand Karthik (foo bar baz quux) <[email protected]>
4096 bit RSA key 1D94CC5AB7E8F5C6, created: 2015-07-16
Keys 1-1 of 1 for "quux foo". Enter number(s), N)ext, or Q)uit >
我在这里输入1
,显示如下:
gpg: key 1D94CC5AB7E8F5C6: public key "Anand Karthik (foo bar baz quux) <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1
执行gpg -k
显示密钥确实已成功导入:
.
.
pub rsa4096 2015-07-16 [SC]
B2219477E4935FF8929BEF311D94CC5AB7E8F5C6
uid [ unknown] Anand Karthik (foo bar baz quux) <[email protected]>
sub rsa4096 2015-07-16 [E]
现在我复制我认为是哈希 ( B2219477E4935FF8929BEF311D94CC5AB7E8F5C6
) 的内容,并尝试将密钥导出为文本文件:
$ gpg --export -a B2219477E4935FF8929BEF311D94CC5AB7E8F5C6
命令输出(中间缩短):
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFWnnlYBEACxP/X6kj+eOQepGtv5MGXKGvyfzrxWjf1MHP6CX+l932TtoC/a
mraSF4f4HI3i0p9BCbPCTxJSA5AkT0CgF34s3IqpR+vYF8wsdj3yvfvckN/2l72d
.
.
.
koiZ01CsJs1RzL1cNPx6MofudBq4tTwjtzx0hWYmkZqwGas8EQ+BDHHYOmDmflfK
6ovi3RGi9Js0vgSSDeFFVUO5YuIg0KHD
=Pj2c
-----END PGP PUBLIC KEY BLOCK-----
这看起来不像网站上的密钥。我究竟做错了什么?