10
$\begingroup$

I'm a beginner to ECC crypto programming. Can anyone explain to me the difference between using ECDH for shared key exchange and the use of ECIES by encrypting a shared key with the public key of the receiver?

I feel that ECIES could also provide me with secure key exchange as long as the private key is kept secret.

$\endgroup$
2
  • 1
    $\begingroup$ "Normal" DH is an online two-party interaction, where the initiator needs to wait for the responder to correspond before they can derive the key to encipher the message. IES is an offline scheme where the sender can carry out all their actions without waiting for the recipient to correspond. $\endgroup$ Jul 27, 2016 at 20:44
  • $\begingroup$ I think this q is coming from the perspective of someone trying to understand why crypto p2p protocols use ECIES to deliver yet further ECDH session keys, and I think Conrads comment below answers it. Forward secrecy. $\endgroup$
    – Sentinel
    Jun 27, 2018 at 13:23

1 Answer 1

13
$\begingroup$

That's a bit of a strange question. ECDH is a key agreement protool. ECC does not have a direct form of encryption as RSA has. ECIES is basically ECDH used to derive a symmetric key, which is then used to encrypt the plaintext. You can see it as a delayed form of key agreement.

So your question is if ECIES can be used to encrypt session keys. That would come down to performing ECDH to derive a data key, and then using that data key to encrypt a session key. Yes, it is probably secure, but directly deriving a session key using ECDH is a lot easier. Using ECIES is only useful if - for some reason or other - authenticated DH key establishment cannot be integrated into a protocol.

For more information about using ECIES & ECDH for authentication, please see this other question.

$\endgroup$
2
  • 2
    $\begingroup$ With ECDH is also possible to get forward secrecy (if the private key is compromised it won't be possible to decrypt previous messages) $\endgroup$
    – Conrado
    Jul 28, 2016 at 15:43
  • $\begingroup$ Comments are not for extended discussion; this conversation has been moved to chat upon user request via mod flag. $\endgroup$
    – e-sushi
    Jun 27, 2018 at 15:41

Your Answer

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

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