Recently I started studying Elliptic Curve Cryptography and I just loved it. I want to transfer some big data (like 3KB), What is the best method, ECDSA, ECIES, or ECDH (and why)?

I am confused, how should I choose between ECDSA, ECIES and ECDH?


2 Answers 2

  • ECDSA is a digital signature algorithm
  • ECIES is an Integrated Encryption scheme
  • ECDH is a key secure key exchange algorithm

First you should understand the purpose of these algorithms.

Digital signature algorithms are used to authenticate a digital content. A valid digital signature gives a recipient reason to believe that the message was created by a known sender, such that the sender cannot deny having sent the message (authentication and non-repudiation) and that the message was not altered in transit (integrity).

Integrated Encryption scheme is a hybrid encryption scheme which provides semantic security against chosen plain text and chosen cipher text attacks. ECIES uses different types of functions:

  • Key Agreement function
  • Key Derivation Function
  • Symmetric Encryption scheme
  • Hash function

Secure key exchange algorithms are used to exchange our keys securely via a non secure channel.

Here you are interested in Elliptic Curve variants of those algorithms. Your requirement is to exchange some data. So you can use ECDH to share the secret key and ECDSA to sign the content. Because ECDH does not provide authentication we can use ECDSA for that purpose. Once the secret key is shared, you can securely exchange your data through a non secure channel. Strength of the secret key can be defined by considering the level of security you need and amount of computation power you got.

  • $\begingroup$ can you explain why i need combine both ECDH(key exchange) ECDSA. because using ECDH both parties can share Secret key and using secret key then can exchange the data through non secure channel. so what use of ECDSA. $\endgroup$ Commented Jan 11, 2014 at 20:20
  • 1
    $\begingroup$ @user3160055 ECDH does not provide authentication.So it is vulnerable against man in the middle attacks. So the solution is to use some sort of digital signature algorithm like ECDSA. So before sending ECDH public key of the server, you can sign them and verify it at the client. If you consider SSL, DH or ECDH is not used alone. For example in DHE_RSA, DH is used for key exchange and RSA is used for signing. $\endgroup$
    – deltaaruna
    Commented Jan 12, 2014 at 3:28
  • $\begingroup$ thanks for the clear explanation. can you tell me where i can use ECIES(if possible some example). $\endgroup$ Commented Jan 12, 2014 at 14:03
  • $\begingroup$ @user3160055. I have edited my post. Now you will have a better understanding. You can directly use ECIES for your requirement. And it can be used instead of cryptosystems like RSA. I could not find a place where it is practically used. But it is proposed instead of RSA. So where ever you use RSA cryptosystem you can consider using ECIS. Also this is a literary survey on ECIES digital.csic.es/handle/10261/32671 $\endgroup$
    – deltaaruna
    Commented Jan 12, 2014 at 15:20
  • 1
    $\begingroup$ I don't understand how ECDSA can protect against the inherent MITM attack that is possible during ECDH. Whatever the peer entity can do, the man in the middle can too since it's his public key that you're seeing. Don't you actually need some 3rd party authentication entity to prove that the owner of the received public key is indeed who you want it to be? $\endgroup$ Commented Dec 16, 2015 at 16:57

For bigger amounts of data to be encrypted asymmetrically a hybrid method should be the better choice, I also would use EC because of the short tokens (and even modern browsers support EC in WebCrypto). Here an example of ECIES to send a 256 bit AES key: https://github.com/efsta/pkiec


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.