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!
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.
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.
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.
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).
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With