TLS 1.3 似乎不支持 ECC 证书,那么,现在 ssl_ciphers 用什么顺序呢 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Dragonish3600
V2EX    NGINX

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

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

    如题 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
    Dragonish3600
        3
    Dragonish3600  
    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
    Dragonish3600
        5
    Dragonish3600  
    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     Solana     3968 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 29ms UTC 05:15 PVG 13:15 LAX 21:15 JFK 00:15
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86