如何使用 .NET Framework System.Security.Cryptography 例程验证 GPG 签名(.asc 文件)
如何验证由 gpg 签名的文件的签名?
我有:签名的导出公钥、文件以及带有签名的 .asc 文件。
这个例程似乎是我需要的内容,现在它基本上是格式转换的问题:http://msdn.microsoft.com/en-us/library/system.security.cryptography.dsa.verifysignature.aspx
实际上调用 gpg 是这样的(1) 我不想运送它,(2) 如果用户已经安装了它,我不想弄乱他们的密钥环。
How can I verify the signature of a file that was signed by gpg?
I have: the exported public key that signed it, the file, and the .asc file with the signature in it.
This routine seems to be the guts of what I need, now it's basically a problem of format conversion: http://msdn.microsoft.com/en-us/library/system.security.cryptography.dsa.verifysignature.aspx
Actually calling gpg is out as (1) I don't want to ship it and (2) I don't want to mess with the user's keyring if they already have it installed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“格式转换”只是编写 OpenPGP 代码的一部分 - 获取 RFC 4880 并开始编写。另一种方法是采用 .NET 的 OpenPGP 标准的现有实现,例如我们的 OpenPGPBlackbox 或 BouncyCastle。
"Format conversion" is merely writing part of OpenPGP code - take RFC 4880 and start writing. An alternative is to take an existing implementation of OpenPGP standard for .NET, such as our OpenPGPBlackbox or BouncyCastle.