Hi all,
I’m investigating some slow VPN speeds on my router, and I’m trying to make sense of what I’m seeing. Non-VPN’d traffic can hit >1gb/s through the router, so I know it’s not a throughput problem.
This got me investigating crypto performance, and on all my machines, I’ve found that LibreSSL from ports is significantly slower than /usr/bin/openssl:
OpenSSL
LibreSSL
Right now OpenVPN is compiled against LibreSSL, and I’m not able to get more than 60mb/sec through it. Would it be worth it to recompile my system against OpenSSL and see if performance is better?
Does anyone know if LibreSSL uses hardware crypto offloading?
I’m investigating some slow VPN speeds on my router, and I’m trying to make sense of what I’m seeing. Non-VPN’d traffic can hit >1gb/s through the router, so I know it’s not a throughput problem.
This got me investigating crypto performance, and on all my machines, I’ve found that LibreSSL from ports is significantly slower than /usr/bin/openssl:
OpenSSL
Code:
❯ /usr/bin/openssl speed -elapsed -evp aes-128-cbc
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-128-cbc for 3s on 16 size blocks: 39194832 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 14976402 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 4691478 aes-128-cbc's in 3.10s
Doing aes-128-cbc for 3s on 1024 size blocks: 1198333 aes-128-cbc's in 3.02s
Doing aes-128-cbc for 3s on 8192 size blocks: 152902 aes-128-cbc's in 3.03s
OpenSSL 1.0.2k-freebsd 26 Jan 2017
built on: date not available
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) idea(int) bl$wfish(idx)
compiler: clang
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128-cbc 209039.10k 319496.58k 387230.10k 406911.67k 413220.02
Code:
❯ /usr/local/bin/openssl speed -elapsed -evp aes-128-cbc
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-128-cbc for 3s on 16 size blocks: 9712514 aes-128-cbc's in 3.09s
Doing aes-128-cbc for 3s on 64 size blocks: 2658097 aes-128-cbc's in 3.04s
Doing aes-128-cbc for 3s on 256 size blocks: 683993 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 173575 aes-128-cbc's in 3.02s
Doing aes-128-cbc for 3s on 8192 size blocks: 21912 aes-128-cbc's in 3.03s
LibreSSL 2.6.4
built on: date not available
options:bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) aes(partial) idea(int) bl$wfish(idx)
compiler: information not available
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128-cbc 50230.38k 55977.20k 58367.40k 58939.95k 59217.52k
Does anyone know if LibreSSL uses hardware crypto offloading?