Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elliptic Curve Cryptography algorithms in Java

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!

like image 604
Riddhiman Dasgupta Avatar asked Jun 20 '12 08:06

Riddhiman Dasgupta


People also ask

Which algorithm is used in elliptic curve cryptography?

Elliptic Curve Cryptography (ECC) is a key-based technique for encrypting data. ECC focuses on pairs of public and private keys for decryption and encryption of web traffic. ECC is frequently discussed in the context of the Rivest–Shamir–Adleman (RSA) cryptographic algorithm.

Is SHA256 elliptic curve?

Elliptic Curve Digital Signature AlgorithmDigital Signature AlgorithmThe Digital Signature Algorithm (DSA) is a Federal Information Processing Standard for digital signatures, based on the mathematical concept of modular exponentiation and the discrete logarithm problem. DSA is a variant of the Schnorr and ElGamal signature schemes.https://en.wikipedia.org › wiki › Digital_Signature_AlgorithmDigital Signature Algorithm - Wikipedia or ECDSA is a cryptographic algorithm used by Bitcoin to ensure that funds can only be spent by their rightful owners. It is dependent on the curve order and hash function used. For bitcoin these are Secp256k1 and SHA256(SHA256()) respectively.

Is ECC faster than RSA?

When it comes to performance at 128-bit security levels, RSA is generally reported to be ten times slower than ECC for private key operations such as signature generation or key management. The performance disparity expands dramatically at 256-bit security levels, where RSA is 50 to 100 times slower.

Is AES elliptic curve?

The short answer is that the Elliptic Curve cryptography (ECC) OpenPGP keys are asymmetric keys (public and private key) whereas AES-256 works with a symmetric cipher (key).


2 Answers

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.

like image 88
Maarten Bodewes Avatar answered Oct 11 '22 16:10

Maarten Bodewes


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

like image 42
Dolanor Avatar answered Oct 11 '22 17:10

Dolanor