ywdblog / httpsbook

《深入浅出HTTPS:从原理到实战》代码示例、勘误、反馈、讨论
https://www.simplehttps.com
88 stars 35 forks source link

EDH & DHE #2

Closed practicemp closed 5 years ago

practicemp commented 5 years ago

在2.8.3小结中提到了:临时DH算法(EDH算法)。 在10.4.1小结中又看到了: 9)设置DHE密码套件的密钥。

开始我还以为是作者写错了,谷歌一下发现EDH和DHE说的是一个算法: Ephemeral Diffie-Hellman 又写做 Diffie-Hellman ephemeral。

不过还是希望作者稍微提示一下,省的我这种门外汉不知其所以然: )

ywdblog commented 5 years ago

感谢你的严谨

(1)从rfc文档(https://tools.ietf.org/html/rfc5246)来看,用DHE描述套件(和算法不算一回事情,但代表edh算法)。

(2)从wiki看(https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange

Although Diffie–Hellman key agreement itself is a non-authenticated key-agreement protocol, it provides the basis for a variety of authenticated protocols, and is used to provide forward secrecy in Transport Layer Security's ephemeral modes (referred to as EDH or DHE depending on the cipher suite).

其实叫什么,取决于套件的定义,比如openssl 和 nss 对套件的组合可能是不一样 的。

(3)从openssl官方文档看,https://wiki.openssl.org/index.php/Diffie_Hellman

算法确实叫:Ephemeral Diffie-Hellman

感谢你的Issues,看完本书,不管好坏,还请做个评论,地址是 https://book.douban.com/subject/30250772/

practicemp commented 5 years ago

感谢作者的详细回复:) 9.1.1小节其实有说:

IANA为每个密码套件定义了一个名称和编号,但是不同TLS/SSL协议的实现(比如Openssl、GnuTLS),密码套件的名称有些是不一样的,通过表9-1可以看出区别。

还是我自己理解的不够:) 已评论:)