$ openvpn --show-enginesOpenSSL Crypto EnginesDynamic engine loading support [dynamic]
Meine "openvpn --show-engines" sieht gleich aus wie deine -> leer!
Daher gehe ich mal von aus dass das AESNI Module nicht (automatisch) geladen wird.Wie könnte ich das am besten prüfen ?
root@OPNsense:~ # kldload aesnikldload: can't load aesni: module already loaded or in kernel
root@OPNsense:~ # openssl speed aes-128-cbcDoing aes-128 cbc for 3s on 16 size blocks: 2997223 aes-128 cbc's in 3.09sDoing aes-128 cbc for 3s on 64 size blocks: 787115 aes-128 cbc's in 3.04sDoing aes-128 cbc for 3s on 256 size blocks: 199344 aes-128 cbc's in 3.00sDoing aes-128 cbc for 3s on 1024 size blocks: 124572 aes-128 cbc's in 3.02sDoing aes-128 cbc for 3s on 8192 size blocks: 16009 aes-128 cbc's in 3.02sOpenSSL 1.0.1s-freebsd 1 Mar 2016built on: date not availableoptions:bn(64,64) rc4(8x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx)compiler: clangThe 'numbers' are in 1000s of bytes per second processed.type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytesaes-128 cbc 15540.03k 16575.95k 17010.69k 42300.26k 43376.36k
root@OPNsense:~ # openssl speed -evp aes-128-cbcDoing aes-128-cbc for 3s on 16 size blocks: 313110 aes-128-cbc's in 0.45sDoing aes-128-cbc for 3s on 64 size blocks: 300432 aes-128-cbc's in 0.33sDoing aes-128-cbc for 3s on 256 size blocks: 279337 aes-128-cbc's in 0.33sDoing aes-128-cbc for 3s on 1024 size blocks: 206289 aes-128-cbc's in 0.21sDoing aes-128-cbc for 3s on 8192 size blocks: 57919 aes-128-cbc's in 0.10sOpenSSL 1.0.1s-freebsd 1 Mar 2016built on: date not availableoptions:bn(64,64) rc4(8x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx)compiler: clangThe 'numbers' are in 1000s of bytes per second processed.type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytesaes-128-cbc 11056.02k 58598.55k 217936.07k 1001433.77k 4671728.72k
root@OPNsense:~ # openssl engine -t -c(cryptodev) BSD cryptodev engine [RSA, DSA, DH, AES-128-CBC, AES-192-CBC, AES-256-CBC] [ available ](rsax) RSAX engine support [RSA] [ available ](dynamic) Dynamic engine loading support [ unavailable ]
root@OPNsense:~ # openssl speed aes-256-cbcDoing aes-256 cbc for 3s on 16 size blocks: 2155988 aes-256 cbc's in 3.03sDoing aes-256 cbc for 3s on 64 size blocks: 568665 aes-256 cbc's in 3.07sDoing aes-256 cbc for 3s on 256 size blocks: 139940 aes-256 cbc's in 3.00sDoing aes-256 cbc for 3s on 1024 size blocks: 95278 aes-256 cbc's in 3.09sDoing aes-256 cbc for 3s on 8192 size blocks: 11653 aes-256 cbc's in 3.09sOpenSSL 1.0.1s-freebsd 1 Mar 2016built on: date not availableoptions:bn(64,64) rc4(8x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx)compiler: clangThe 'numbers' are in 1000s of bytes per second processed.type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytesaes-256 cbc 11380.06k 11853.70k 11941.55k 31536.06k 30934.32k
root@OPNsense:~ # openssl speed -evp aes-256-cbcDoing aes-256-cbc for 3s on 16 size blocks: 319830 aes-256-cbc's in 0.57sDoing aes-256-cbc for 3s on 64 size blocks: 308056 aes-256-cbc's in 0.41sDoing aes-256-cbc for 3s on 256 size blocks: 275877 aes-256-cbc's in 0.37sDoing aes-256-cbc for 3s on 1024 size blocks: 185783 aes-256-cbc's in 0.13sDoing aes-256-cbc for 3s on 8192 size blocks: 46493 aes-256-cbc's in 0.04sOpenSSL 1.0.1s-freebsd 1 Mar 2016built on: date not availableoptions:bn(64,64) rc4(8x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx)compiler: clangThe 'numbers' are in 1000s of bytes per second processed.type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytesaes-256-cbc 8972.76k 47615.00k 192339.10k 1432408.79k 9750288.79k
Die Ausgabe der openssl engine zeigt AES bis 256 an
root@OPNsense:~ # openssl engine -t -c(rsax) RSAX engine support [RSA] [ available ](dynamic) Dynamic engine loading support [ unavailable ]
openssl speed -evp aes-128-cbc
root@OPNsense:~ # /usr/local/bin/openssl speed -elapsed aes-256-cbcYou have chosen to measure elapsed time instead of user CPU time.Doing aes-256 cbc for 3s on 16 size blocks: 2281277 aes-256 cbc's in 3.16sDoing aes-256 cbc for 3s on 64 size blocks: 567848 aes-256 cbc's in 3.00sDoing aes-256 cbc for 3s on 256 size blocks: 144303 aes-256 cbc's in 3.01sDoing aes-256 cbc for 3s on 1024 size blocks: 93567 aes-256 cbc's in 3.09sDoing aes-256 cbc for 3s on 8192 size blocks: 11268 aes-256 cbc's in 3.00sOpenSSL 1.0.2j 26 Sep 2016built on: reproducible build, date unspecifiedoptions:bn(64,64) md2(int) rc4(8x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx)compiler: cc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -pthread -D_THREAD_SAFE -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -O3 -Wall -O2 -pipe -fstack-protector -fno-strict-aliasing -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASMThe 'numbers' are in 1000s of bytes per second processed.type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytesaes-256 cbc 11564.49k 12114.09k 12281.87k 30969.73k 30769.15k
root@OPNsense:~ # /usr/local/bin/openssl speed -elapsed -evp aes-256-cbcYou have chosen to measure elapsed time instead of user CPU time.Doing aes-256-cbc for 3s on 16 size blocks: 18087660 aes-256-cbc's in 3.01sDoing aes-256-cbc for 3s on 64 size blocks: 6152322 aes-256-cbc's in 3.01sDoing aes-256-cbc for 3s on 256 size blocks: 1809435 aes-256-cbc's in 3.01sDoing aes-256-cbc for 3s on 1024 size blocks: 465577 aes-256-cbc's in 3.00sDoing aes-256-cbc for 3s on 8192 size blocks: 58767 aes-256-cbc's in 3.01sOpenSSL 1.0.2j 26 Sep 2016built on: reproducible build, date unspecifiedoptions:bn(64,64) md2(int) rc4(8x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx)compiler: cc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -pthread -D_THREAD_SAFE -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -O3 -Wall -O2 -pipe -fstack-protector -fno-strict-aliasing -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASMThe 'numbers' are in 1000s of bytes per second processed.type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytesaes-256-cbc 96216.96k 130908.63k 154004.07k 158916.95k 160056.27k
OpenVPN sollte automatisch mit AES-NI laufen. aesni.ko wird hier nicht benutzt.
Bei IPsec im Kernel weiß ich leider zu wenig, um eine qualifizierte Aussage zu machen. Jos oder Ad wissen da deutlich mehr, können aber kein fließendes Deutsch. Ich versuche mal eine Antwort einzuholen morgen.
Jos sagte der geladene aesni.ko hat messbare Performancevorteile für AES-GCM. In FreeBSD 11.0 wird das auch noch gleich doppelt so schnell als aktuell in 10.3.