OpenSSL speed 命令实战:加密算法性能基准测试

openssl speed 是 OpenSSL 官方提供的加密算法性能基准测试工具。通过它可以了解不同加密算法在当前硬件上的处理速度,从而为生产环境选择合适的加密算法提供数据支撑。 基本用法 1 openssl speed [options] [algorithm...] 常用选项: -seconds N — 测试持续时间(默认 10 秒) -bytes N — 测试缓冲区大小(默认 16KB) -evp name — 使用 EVP 接口测试指定算法 -elapsed — 使用 wall-clock 时间而非 CPU 时间 -mr — 产生机器可读的输出 对称加密算法性能测试 测试 AES-256-GCM 1 2 3 4 5 6 7 8 9 10 $ openssl speed -seconds 1 -evp aes-256-gcm Doing AES-256-GCM for 1s on 16 size blocks: 1502986 AES-256-GCM's in 1....

June 17, 2026 · 3 min · 黑豆子

OpenSSL s_time:SSL/TLS 性能测试工具详解

openssl s_time 是 OpenSSL 官方提供的 SSL/TLS 性能基准测试工具。它通过模拟大量握手连接来测量服务器的每秒处理能力,是评估 TLS 性能的重要工具。 基本用法 1 openssl s_time -connect example.com:443 -new -time 10 参数说明: -connect host:port — 目标服务器地址(默认端口 4433) -new — 测试新建连接(完整握手) -reuse — 测试连接重用(会话恢复) -time seconds — 测试持续时间(默认 30 秒) 实际测试示例 测试 TLS 1.3 新建连接 1 2 3 4 5 6 $ openssl s_time -connect localhost:443 -new -time 3 -tls1_3 Collecting connection statistics for 3 seconds ********************************************************************************************************************************************************************************************************************************** 1243 connections in 1.85s; 671.89 connections/user sec, 0 bytes read per connection 1243 connections in 4 real seconds 测试 TLS 1....

May 16, 2026 · 2 min · 黑豆子