TLS 1.3 似乎不支持 ECC 证书,那么,现在 ssl_ciphers 用什么顺序呢

2019-05-03 22:17:10 +08:00
 ladypxy

如题 TLS 1.1/1.2 的时代,为了加快 HTTPS 速度,都是部署 ECC/RSA 双证书,然后把 ECC 相关的 ciphers 放到前面,也就是把 ECDHE-ECDSA 的放前面,然后 RSA 的在后面。

而 TLS 1.3 只支持下面 3 个 chiper,

TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256

那么,从访问速度的角度,是把 TLS1.2+ECC 放前面呢,还是 TLS1.3+RSA 放前面呢? 有没有啥推荐的 chiper 顺序

6052 次点击
所在节点    NGINX
9 条回复
Remember
2019-05-03 22:26:09 +08:00
cipher 跟证书是 RSA 还是 ECDSA 有啥关系?
PS8LW2UFDC
2019-05-03 22:29:39 +08:00
TLS 1.3 支持 ECC:
https://i.loli.net/2019/05/03/5ccc4f144ca60.png


而 TLS 1.3 貌似不支持自定义 chiper,这是 openssl 关于 TLS1.3 的文档:
https://wiki.openssl.org/index.php/TLS1.3

如有启用 TLS 1.3 问题也可以参考下这个:
https://nodeedge.com/tls-1-3-issues.html
ladypxy
2019-05-03 22:35:42 +08:00
@Remember 浏览器握手时冲前往后匹配,使用 ECC 证书需要把 ECD 的几个 ciphers 放前面
Owenjia
2019-05-03 22:36:34 +08:00
参考下这个?
https://beijinglug.club/wiki/doku.php?id=docs:tls_configuration
ladypxy
2019-05-03 22:38:19 +08:00
@PS8LW2UFDC 看了下文档,写到

The new ciphersuites are defined differently and do not specify the certificate type (e.g. RSA, DSA, ECDSA) or the key exchange mechanism (e.g. DHE or ECHDE). This has implications for ciphersuite configuration.


看来只需要把 1.3 的几个放到前面就好了
msg7086
2019-05-03 22:47:14 +08:00
TLS_AES_256_GCM_SHA384
TLS_CHACHA20_POLY1305_SHA256
TLS_AES_128_GCM_SHA256

这三个 Cipher 里哪个写了 RSA 了啊?

另外,官方版的 Nginx 还没有加入 TLS1.3 选 Cipher 功能,需要自己打补丁。

@PS8LW2UFDC SSL_CTX_set_ciphersuites 怕是被吃了 = =
MonoLogueChi
2019-05-03 22:49:48 +08:00
听这么一说,好像是的,我不熟的 RSA 证书会使用 tls1.3,但是 ECC 证书好像全都是 tls1.2 连接
jinliming2
2019-05-04 08:22:40 +08:00
https://wiki.openssl.org/index.php/TLS1.3
There are new ciphersuites that only work in TLSv1.3. The old ciphersuites cannot be used for TLSv1.3 connections and the new ones cannot be used in TLSv1.2 and below.
The new ciphersuites are defined differently and do not specify the certificate type (e.g. RSA, DSA, ECDSA) or the key exchange mechanism (e.g. DHE or ECHDE). This has implications for ciphersuite configuration.
就是说 1.3 的 cipher 跟证书类型无关了,放前面就行,旧的 cipher 在 1.3 里不兼容了,新的 cipher 在 1.2 里不兼容,所以如果浏览器支持前面几个的话,就肯定支持 1.3 的。
kxjhlele
2019-05-04 15:25:23 +08:00
我才知道居然和顺序还有关系 一直以为随便设置呢

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/560761

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX