java Java中的椭圆曲线密码算法

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11115336/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 03:52:07  来源:igfitidea点击:

Elliptic Curve Cryptography algorithms in Java

javacryptographyelliptic-curve

提问by Riddhiman Dasgupta

We're a couple of amateurs in cryptography. We have to implement different algorithms related to Elliptic curve cryptographyin Java. So far, we have been able to identify some key algorithms like ECDH, ECIES, ECDSA, ECMQVfrom the Wikipedia page on elliptic curve cryptography.

我们是密码学的几个业余爱好者。我们必须在 Java 中实现与椭圆曲线加密相关的不同算法。到目前为止,我们已经能够找出像一些关键算法ECDHECIESECDSAECMQV从椭圆曲线密码体制的维基百科页面。

Now, we are at a loss in trying to understand how and where to start implementing these algorithms. Also, does Java already provide these algorithms in its architecture? Or do we have to use some API like BouncyCastle(we're seeing it all over this site!)? Or can we simply implement the algorithms on our own using standard code? Any help would be much appreciated!

现在,我们在试图了解如何以及从何处开始实施这些算法时不知所措。另外,Java 是否已经在其架构中提供了这些算法?或者我们是否必须使用一些 API 之类的BouncyCastle(我们在这个网站上到处都能看到它!)?或者我们可以简单地使用标准代码自己实现算法吗?任何帮助将非常感激!

采纳答案by Maarten Bodewes

Yes, you can always rely on Bouncy Castle libraries to implement most required algorithms, certainly including Elliptic Curve crypto. No need to implement your own; instead try and get Bouncy fixed if you find any issues.

是的,您始终可以依靠 Bouncy Castle 库来实现最需要的算法,当然包括椭圆曲线加密。无需实现自己的;如果您发现任何问题,请尝试修复 Bouncy。

The OpenJDK 7 and Java 7 SE from Oracle also implements Elliptic Curve cryptography, earlier editions only contained a comprehensive API for Elliptic Curve cryptography, but you required a JCE provider (like Bouncy Castle) to provide the actual implementation.

Oracle 的 OpenJDK 7 和 Java 7 SE也实现了椭圆曲线加密,早期版本只包含一个全面的椭圆曲线加密 API,但您需要一个 JCE 提供者(如Bouncy Castle)来提供实际实现。

回答by Sajith Vijesekara

回答by Dolanor

You can watch the OpenSource project TextSecure which is an SMS/texto app for android who can send encrypted text messages on GSM phone network with the same idea as OpenPGP, but using ECDH and ECDSA. All this has been implemented into that app with BouncyCastle.

您可以观看 OpenSource 项目 TextSecure,这是一个适用于 android 的 SMS/texto 应用程序,它可以在 GSM 电话网络上发送加密文本消息,其思想与 OpenPGP 相同,但使用 ECDH 和 ECDSA。所有这些都已通过 BouncyCastle 实现到该应用程序中。

https://github.com/WhisperSystems/TextSecure/tree/master/src/org/bouncycastle

https://github.com/WhisperSystems/TextSecure/tree/master/src/org/bouncycastle