11

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.

Patriot
  • 3,162
  • 3
  • 20
  • 66
hab
  • 275
  • 1
  • 6

1 Answers1

14

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.

Maarten Bodewes
  • 96,351
  • 14
  • 169
  • 323