是否有支持 ISO 9796-2 的 RSA 类

发布于 2024-12-20 06:21:31 字数 209 浏览 5 评论 0原文

我需要使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

摘星┃星的人 2024-12-27 06:21:31

我还没有阅读 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 real EncryptValue (or DecryptValue) so you need another RSA implementation (e.g. use the managed one from Mono).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文