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?
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It only takes a minute to sign up.
Sign up to join this communityFirst 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:
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.
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