如果我像这样运行 openssl 1.0.1e:
$ ./openssl speed aes-256-cbc (i.e without EVP API)
Doing aes-256 cbc for 3s on 16 size blocks: 14388425 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 64 size blocks: 3861764 aes-256 cbc's in 2.99s
Doing aes-256 cbc for 3s on 256 size blocks: 976359 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 1024 size blocks: 246145 aes-256 cbc's in 2.99s
Doing aes-256 cbc for 3s on 8192 size blocks: 30766 aes-256 cbc's in 3.00s
但是,如果我这样运行它:
$ ./openssl speed -evp AES256
Doing aes-256-cbc for 3s on 16 size blocks: 71299827 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 64 size blocks: 18742055 aes-256-cbc's in 2.99s
Doing aes-256-cbc for 3s on 256 size blocks: 4771917 aes-256-cbc's in 2.99s
Doing aes-256-cbc for 3s on 1024 size blocks: 1199158 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 8192 size blocks: 150768 aes-256-cbc's in 2.99s
从OpenSSL 文档中,似乎对相同的密码使用 EVP 或不使用 EVP 应该没有任何区别。是的,我始终如一地看到它。任何人都可以提供见解吗?我用谷歌搜索了很多,但找不到任何东西。我会查看代码,但不确定我是否能理解那部分。