5
$\begingroup$

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

I'm feeling that ECIES could also provide me secure key exchange as long as the private key is kept secret.

$\endgroup$
  • $\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$ – Luis Casillas Jul 27 '16 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 '18 at 13:23
7
$\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.

$\endgroup$
  • 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 '16 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 '18 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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