V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
holinhot
V2EX  ›  问与答

SSL/TLS 性能问题

  •  1
     
  •   holinhot · Jan 30, 2023 · 1389 views
    This topic created in 1197 days ago, the information mentioned may be changed or developed.

    我测试了下我们服务器的 openssl 性能如下

    #benchmark,1 core,56 cores - Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
    #openssl pki performance
    ecdsap256 Sign,39142.4 ops/s, 1139339.0 ops/s
    ecdsap256 Verify,13795.8 ops/s, 353261.9 ops/s
    rsa2048 Sign,1572.1 ops/s, 38369.7 ops/s
    rsa2048 Verify,55272.9 ops/s, 1366343.4 ops/s
    rsa3072 Sign,505.5 ops/s, 13009.4 ops/s
    rsa3072 Verify,26967.3 ops/s, 669999.1 ops/s
    ecdhp256 Key-Exchange,18657.7 ops/s, 457098.7 ops/s
    ecdhx25519 Key-Exchange,27833.2 ops/s, 735125.1 ops/s
    #openssl aead performance
    aes-128-gcm,4.085 GiB/s, 94.614 GiB/s
    aes-256-gcm,2.948 GiB/s, 75.447 GiB/s
    chacha20-poly1305,1.654 GiB/s, 44.588 GiB/s
    

    如果 nginx 上用的 RSA2048 证书。

    应该参考这 2 个指标

    rsa2048 Sign,1572.1 ops/s, 38369.7 ops/s
    rsa2048 Verify,55272.9 ops/s, 1366343.4 ops/s
    

    没深入了解 SSL/TLS 握手过程。想知道 HTTPS 握手过程中,客户端和服务器分别要调用 Sign 和 Verify 多少次?我需要参考这个来评估服务器 SSL/TLS 性能。

    下面这几个参数是在握手完成后使用 key 进行对称加密传输数据用的。 #openssl aead performance aes-128-gcm,4.085 GiB/s, 94.614 GiB/s aes-256-gcm,2.948 GiB/s, 75.447 GiB/s chacha20-poly1305,1.654 GiB/s, 44.588 GiB/s

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3260 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 13:58 · PVG 21:58 · LAX 06:58 · JFK 09:58
    ♥ Do have faith in what you're doing.