Archiv für den Monat: Januar 2015

FreeBSD: BHyVe AES-NI

Ich verwende drei Hetzner-Root-Server PX120 als FreeBSD-10.1-Virtualisierungs-Hosts
für bhyve-Linux-VMs.

$
sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'

hw.machine: amd64
hw.model: Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
hw.ncpu: 12
hw.machine_arch: amd64
$

FreeBSD Beastie FreeBSD BHyVe AES-NI

Punkt 1 Linux-Guest (Debian 7) mit AES-NI

$
/sbin/modinfo aesni_intel

filename:       /lib/modules/3.2.0-4-amd64/kernel/arch/x86/crypto/aesni-intel.ko
alias:          aes
license:        GPL
description:    Rijndael (AES) Cipher Algorithm, Intel AES-NI instructions optimized
alias:          x86cpu:vendor:*:family:*:model:*:feature:*0099*
depends:        cryptd,aes-x86_64,aes_generic
intree:         Y
vermagic:       3.2.0-4-amd64 SMP mod_unload modversions

cat /proc/cpuinfo | grep -o 'aes'

aes

grep module /proc/crypto | sort -u

module       : aes_generic
module       : aesni_intel
module       : aes_x86_64
module       : crc32c_intel
module       : cryptd
module       : ghash_clmulni_intel
module       : kernel
module       : xts
$

INFO: OpenSSL-Engine zeigt (aesni) Intel-AES-NI-Engine nicht mehr explizit an

Punkt 2 Performance-Tests

$
# FreeBSD VM HOST
openssl speed -elapsed -evp aes-128-cbc

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-128-cbc       9166.81k    39529.81k   132345.61k   332039.51k   602308.61k

openssl speed -elapsed -evp aes-128-xts

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-128-xts     395372.03k  1174368.06k  2291808.13k  3253091.33k  3676815.36k

# FreeBSD VM HOST ./TOP
30641 root          1  85    0 19368K  4724K CPU11    3   0:06  75.09% openssl speed -elapsed -evp aes-128-cbc
$
$
# Linux VM Guest
openssl speed -elapsed -evp aes-128-cbc

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-128-cbc     524940.60k   680268.37k   702495.83k   705286.83k   705754.45k

openssl speed -elapsed -evp aes-128-xts

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-128-xts     362472.23k  1180444.20k  2270654.98k  3213272.06k  3619725.31k

# FreeBSD VM HOST ./TOP
93553 root          5  94    0  4123M   142M CPU9    9  51:07  80.07% bhyve: vm1 (bhyve)
$

That’s FreeBSD