.Net 和 Java 的 DSA 实现兼容吗?

发布于 2024-08-12 21:54:57 字数 434 浏览 10 评论 0原文

我正在尝试对运行 J2ME 的移动客户端发出的请求进行数字签名,并希望通过 .Net Framework 验证签名。

有谁知道实现

DSACryptoServiceProvider //.Net

Signature.getInstance("SHA1withDSA", "SUN") //Java

是否兼容?或者有人有更好的主意吗?


经过一番研究,我发现这个库似乎具有适用于 C# 和 Java 的 DSA API,具有相同的底层实现: http:// www.bouncycastle.org

有人有这方面的经验吗?

I am trying to digitally sign requests made by a mobile client running J2ME and want to verify the signature by the .Net Framework.

Does anyone know if the implementations

DSACryptoServiceProvider //.Net

and

Signature.getInstance("SHA1withDSA", "SUN") //Java

are compatible? Or does anyone have a better idea?


After some research I found this library which seems to have DSA APIs for both C# and Java with the same underlying implementations: http://www.bouncycastle.org

Does anyone have any experience with this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

甜味拾荒者 2024-08-19 21:54:57

我必须处理 J2ME => .Net 网络服务。我在加密方面遇到了一些问题。据我所知,我不确定 DSA Java 和 .Net 在 DES 和 AES 加密方面有何不同。

这并不能回答你的问题,但我想它可能对你有帮助。

有一个名为 Bouncy Castle:

Releases for Java 的库:
http://www.bouncycastle.org/latest_releases.html(选择 J2ME 之一)

版本C#
http://www.bouncycastle.org/csharp/

我使用它们没有任何头痛。文档并不差,但也不好。但 Java 和 C# 版本是兼容的。

I had to deal with J2ME => .Net Web Service. And I had some problems with Encryption. I am not sure about DSA Java and .Net differs on encryption in DES and AES as far as I know.

This does not answer to your question but I guess it may help you.

There is a library named Bouncy Castle:

Releases for Java:
http://www.bouncycastle.org/latest_releases.html (pick J2ME one)

Releases for C#
http://www.bouncycastle.org/csharp/

I used them without any headache. Documentation is not poor but is not good also. But Java and C# versions are compatible.

往昔成烟 2024-08-19 21:54:57

它们必须兼容,否则 Java 和 .NET Web 服务就不会兼容,而且我确信它们是兼容的

They must be compatible, otherwise Java and .NET web-services wouldn't be, and I know for sure that they are

疏忽 2024-08-19 21:54:57

.NET 和 Java 以不同的方式对签名进行编码。否则它们应该是兼容的。 更多细节在另一个答案中。

.NET and Java encode the signatures in different ways. Otherwise they should be compatible. More details in another answer.

灯下孤影 2024-08-19 21:54:57

据我了解,DSA/SHA1 是标准算法(或 RFC,但没关系),因此它们很可能是可以互换的。

As I understand it, DSA/SHA1 are standard algorithms (or RFCs, but never mind), so it's more than likely they are interchangeable.

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