7

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

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!

PCM
  • 873
  • 8
  • 23
Riddhiman Dasgupta
  • 363
  • 1
  • 6
  • 22

3 Answers3

8

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.

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.

Maarten Bodewes
  • 90,524
  • 13
  • 150
  • 263
  • +1 to not implementing the algorithms yourself. It's a million ways your implementation could be broken even if you use reliable algorithm! It's always better to rely on already existing implementations! – dragn Jun 21 '12 at 13:50
1

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.

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

Dolanor
  • 822
  • 9
  • 19
  • Thank you! But we're still confused as to where to start implementing, if we need to build these things from scratch. Any further help would be much appreciated! – Riddhiman Dasgupta Jun 20 '12 at 09:54
  • I know that ECDH and ECDSA are implemented since they are used in TextSecure. For the rest, you should check on BouncyCastle. I guess they already did a lot of work already ! – Dolanor Jun 20 '12 at 10:39
1

This will describe simple ellipic curve cryptography http://javaconceptzz.blogspot.com/2013/08/java-eliptic-curve-cryptography.html

Sajith Vijesekara
  • 1,324
  • 2
  • 17
  • 52