OpenPGP签名是否包含签名者的用户ID? [英] Does an OpenPGP signature contain the signer's user ID?

查看:174
本文介绍了OpenPGP签名是否包含签名者的用户ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个签名的公共密钥.我想查看此OpenPGP公钥中的所有签名.

I have a signed public key. I wanted to view all the signatures in this OpenPGP public key.

我有签名列表,当我尝试获取签名者的用户ID时,什么也没有返回.

I've got the signature list, and when I tried to get the user IDs of the signers, nothing is returned.

所以我怀疑OpenPGP签名是否包含签名者的用户ID.

So my doubt is whether an OpenPGP signature contains the signer's user IDs or not.

我使用Thunderbird查看签名,但是它也显示未找到用于签名的用户ID,并且当我导入与我签名的私钥相对应的公钥时,它会显示签名者的用户ID.

I used Thunderbird to view signatures, but it also show user ID not found for signature and when I imported the public key corresponing to the private key from that I signed, It showes the user ID of the signer.

我的结论是OpenPGP签名不包含签名者的用户ID.它们仅包含密钥ID.如果您还具有签名者的公钥,则它将尝试从该公钥中获取用户ID并显示给您.

My conclusion is OpenPGP signatures don't contain the signer's user IDs. They only contain the key ID. If you also have public key of signer, then it tries to get the user ID from that public key and show you.

注意:我正在使用充气城堡API.

Note: I am using the bouncy castle API.

推荐答案

在签名另一个密钥(分别为该密钥的UID)时,密钥中包含的所有内容都是密钥ID.

When signing another key (respective a UID of this key), all that gets included from your key is the key ID.

Thunderbird尝试将密钥ID解析为密钥的默认UID,但这仅在公钥位于Thunderbird的密钥环中时有效.

Thunderbird tries to resolve that key ID to the key's default UID, but this only works if the public key is in Thunderbird's keyring.

如果要在自己的软件中解析UID,则必须提取密钥的ID并寻找匹配的公共密钥.

If you want to resolve the UID in your own software, you must pull the key's ID and look for a matching public key.

所以我的结论是Pgp签名不包含签名者的用户ID.它仅包含keyid.如果您还具有签名者的公钥,则它会尝试从该公钥中获取用户ID并显示给您.

so My conclusion is Pgp Signature doesn't contain signer's user id. It contains only keyid. If you also have public key of signer then it try to get userid from that public key and show you.

是的,这是唯一的方法.

Yep, that's the only way to do.

这篇关于OpenPGP签名是否包含签名者的用户ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆