Key exchange using ECDH vs ECIES

懵懂的女人 提交于 2021-02-08 10:33:38

问题


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. Thank you.


回答1:


ECDH is a shared-secret derivation protocol. Two parties use knowledge of their own "private key" and their partner's "public key" to generate a shared secret. Generally the private keys are random numbers used for the key negotiation, and then discarded.

ECIES uses the same scheme as ECDH to generate a "shared secret", where one of the "private keys" is a random number, and its corresponding public key is included in the message itself. This means that the shared secret is derivable only by the person with the other private key. The message itself is then encrypted with some other scheme like AES, using the shared secret as the key.

If you're doing key negotiation, ECDH is the way to go. (Mandatory note: Of course, you shouldn't roll your own crypto for a production system, just use TLS.)



来源:https://stackoverflow.com/questions/30667626/key-exchange-using-ecdh-vs-ecies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!