一、简介

speed命令用于测试库的性能

二、语法

openssl speed [md2] [mdc2] [md5] [hmac] [sha1] [sha256] [sha512] [whirlpool] [rmd160]
[idea-cbc] [seed-cbc] [rc2-cbc] [rc5-cbc] [bf-cbc] [des-cbc] [des-ede3] [aes--cbc] [aes--cbc]
[aes--cbc] [aes--ige] [aes--ige] [aes--ige] [camellia--cbc] [camellia--cbc]
[camellia--cbc] [rc4] [rsa512] [rsa1024] [rsa2048] [rsa4096] [dsa512] [dsa1024] [dsa2048] [ecdsap160]
[ecdsap192] [ecdsap224] [ecdsap256] [ecdsap384] [ecdsap512] [ecdsak163] [ecdsak233] [ecdsak283]
[ecdsak409] [ecdsak571] [ecdsab163] [ecdsab233] [ecdsab283] [ecdsab409] [ecdsab571] [ecdsa]
[ecdhp192] [ecdhp224] [ecdhp256] [ecdhp384] [ecdhp512] [ecdhk163] [ecdhk233] [ecdhk283] [ecdhk409]
[ecdhk571] [ecdhb163] [ecdhb233] [ecdhb283] [ecdhb409] [ecdhb571][ecdh] [idea] [seed] [rc2] [des] [aes]
[camellia] [rsa] [blowfish] [-elapsed] [-engine e] [-evp e] [-decrypt] [-mr] [-multi n]

选项

Available values:
md2 md4 md5 hmac sha1 sha256 sha512 whirlpoolrmd160
idea-cbc seed-cbc rc2-cbc bf-cbc
des-cbc des-ede3 aes--cbc aes--cbc aes--cbc aes--ige aes--ige aes--ige
camellia--cbc camellia--cbc camellia--cbc rc4
rsa512 rsa1024 rsa2048 rsa4096
dsa512 dsa1024 dsa2048
ecdsap256 ecdsap384
ecdsa
ecdhp256 ecdhp384
ecdh
idea seed rc2 des aes camellia rsa blowfish Available options:
-engine e use engine e, possibly a hardware device.
-evp e use EVP e.
-decrypt time decryption instead of encryption (only EVP).
-mr produce machine readable output.
-multi n run n benchmarks in parallel.

三、实例

1、测试AES

openssl speed aes

2、测试SHA1(单线程)

openssl speed sha1

3、测试RSA(多线程)

openssl speed rsa –multi 5
04-30 07:58