tls协议当使用ECDHE交换密钥时会使用rsa或ecdsa验证签名,测试rsa2048和ecc256签名验证签名速度:

openssl speed rsa2048 ecdsap256

tls协议传输内容使用aes或chacha20加密,测试chacha20-poly1305和aes-128-gcm加解密速度:

openssl speed -evp chacha20-poly1305
openssl speed -evp aes-128-gcm

禁用硬件加速测试aes-128-gcm加解密速度:

OPENSSL_ia32cap="~0x200000200000000" openssl speed -evp aes-128-gcm

golang:

go test -bench=. crypto/cipher
go test -bench=. crypto/aes
go test -bench=. crypto/tls

标签:none