V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
ladypxy
V2EX  ›  NGINX

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

  •  
  •   ladypxy · 2019-05-03 22:17:10 +08:00 · 6019 次点击
    这是一个创建于 1791 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如题 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 顺序

    9 条回复    2019-05-04 15:25:23 +08:00
    Remember
        1
    Remember  
       2019-05-03 22:26:09 +08:00 via iPhone
    cipher 跟证书是 RSA 还是 ECDSA 有啥关系?
    PS8LW2UFDC
        2
    PS8LW2UFDC  
       2019-05-03 22:29:39 +08:00   ❤️ 1
    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
        3
    ladypxy  
    OP
       2019-05-03 22:35:42 +08:00 via iPhone
    @Remember 浏览器握手时冲前往后匹配,使用 ECC 证书需要把 ECD 的几个 ciphers 放前面
    Owenjia
        4
    Owenjia  
       2019-05-03 22:36:34 +08:00
    参考下这个?
    https://beijinglug.club/wiki/doku.php?id=docs:tls_configuration
    ladypxy
        5
    ladypxy  
    OP
       2019-05-03 22:38:19 +08:00 via iPhone
    @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
        6
    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
        7
    MonoLogueChi  
       2019-05-03 22:49:48 +08:00 via Android
    听这么一说,好像是的,我不熟的 RSA 证书会使用 tls1.3,但是 ECC 证书好像全都是 tls1.2 连接
    jinliming2
        8
    jinliming2  
       2019-05-04 08:22:40 +08:00 via iPhone
    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
        9
    kxjhlele  
       2019-05-04 15:25:23 +08:00 via Android
    我才知道居然和顺序还有关系 一直以为随便设置呢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1904 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 16:24 · PVG 00:24 · LAX 09:24 · JFK 12:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.