开发者

How to verify GPG signatures (.asc files) with .NET Framework System.Security.Cryptography routines

开发者 https://www.devze.com 2023-03-10 04:41 出处:网络
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.

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开发者_C百科 have it installed.


"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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号