是否有支持 ISO 9796-2 的 RSA 类
我需要使用 ISO 9796-2 的 RSA 签名。
我了解 .Net 中的 RSACryptoServiceProvider
,但不确定它是否支持 ISO 9796-2。
我知道有一个 DSACryptoServiceProvider
但不确定它与 ISO 9796-2 相比如何。
任何帮助将不胜感激。
I have a requirement to use RSA signatures using ISO 9796-2.
I know about the RSACryptoServiceProvider
in .Net but was not sure if it supported ISO 9796-2.
I know there is a DSACryptoServiceProvider
but was not sure how that compared to ISO 9796-2.
Any help would be gratefully received.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有阅读 ISO 9796-2 标准(并且不会付费阅读它;-)但是:
RSACryptoServiceProvider
仅支持 PKCS#1 (1.5) 和 OAEP 填充。DSACryptoServiceProvider
仅支持 FIPS 186 中定义的内容。从技术上讲,您可以在 .NET 中提供自己的填充类,因为它被设计为可扩展的。
遗憾的是(即在现实中)
RSACryptoServiceProvider
不允许您执行真实EncryptValue
(或DecryptValue
),因此您需要另一种 RSA 实现(例如,使用 Mono 中的托管实现)。I have not read the ISO 9796-2 standard (and won't pay to read it ;-) but:
RSACryptoServiceProvider
only support PKCS#1 (1.5) and OAEP padding.DSACryptoServiceProvider
only support what's defined in FIPS 186.Technically you could provide your own padding class in .NET since it's designed to be extensible.
Sadly (i.e. in reality) the
RSACryptoServiceProvider
does not let you do a realEncryptValue
(orDecryptValue
) so you need another RSA implementation (e.g. use the managed one from Mono).