Entware-for-kernel-3x / Entware-ng-3x

Ultimate repo for embedded devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

openssl: missing engine libcryptodev.so

blackfuel opened this issue · comments

Package: openssl

I want to test the openssl with /dev/crypto interface, however this engine is missing.

Platform:

ASUS RT-AC86U router, armv8-a
Linux 3.x kernel, aarch64

Results

# /opt/bin/openssl speed -evp aes-256-cbc -engine cryptodev -elapsed
invalid engine "cryptodev"
547767028528:error:25066067:lib(37):func(102):reason(103):NA:0:filename(/opt/lib/engines/libcryptodev.so): /opt/lib/engines/libcryptodev.so: cannot open shared object file: No such file or directory
547767028528:error:25070067:lib(37):func(112):reason(103):NA:0:
547767028528:error:260B6084:lib(38):func(182):reason(132):NA:0:
547767028528:error:2606A074:lib(38):func(106):reason(116):NA:0:id=cryptodev
547767028528:error:25066067:lib(37):func(102):reason(103):NA:0:filename(libcryptodev.so): libcryptodev.so: cannot open shared object file: No such file or directory
547767028528:error:25070067:lib(37):func(112):reason(103):NA:0:
547767028528:error:260B6084:lib(38):func(182):reason(132):NA:0:
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-256-cbc for 3s on 16 size blocks: 38282164 aes-256-cbc's in 3.01s
Doing aes-256-cbc for 3s on 64 size blocks: 22156070 aes-256-cbc's in 3.01s
Doing aes-256-cbc for 3s on 256 size blocks: 8090432 aes-256-cbc's in 3.02s
Doing aes-256-cbc for 3s on 1024 size blocks: 2319681 aes-256-cbc's in 3.02s
Doing aes-256-cbc for 3s on 8192 size blocks: 304728 aes-256-cbc's in 3.01s
OpenSSL 1.0.2n  7 Dec 2017
built on: reproducible build, date unspecified
options:bn(64,64) rc4(ptr,char) des(idx,cisc,2,int) aes(partial) blowfish(ptr)
compiler: aarch64-openwrt-linux-gnu-gcc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/media/ware4/Entware-3x.2017.12/staging_dir/target-aarch64_cortex-a53_glibc-2.25/opt/include -I/media/ware4/Entware-3x.2017.12/staging_dir/target-aarch64_cortex-a53_glibc-2.25/include -I/media/ware4/Entware-3x.2017.12/staging_dir/toolchain-aarch64_cortex-a53_gcc-6.3.0_glibc-2.25/include -I/media/ware4/Entware-3x.2017.12/staging_dir/toolchain-aarch64_cortex-a53_gcc-6.3.0_glibc-2.25/include -DOPENSSL_SMALL_FOOTPRINT -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DOPENSSL_NO_ERR -DTERMIOS -O2 -pipe -mcpu=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result  -fpic -I/media/ware4/Entware-3x.2017.12/package/libs/openssl/include -ffunction-sections -fdata-sections -fomit-frame-pointer -Wall -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-256-cbc     203493.23k   471092.52k   685811.45k   786540.84k   829346.10k

My guess - you need appropriate kernel headers to build libcryptodev.so
We use vanilla linux kernel to make Entware universal.
The compile openssl with CONFIG_OPENSSL_HARDWARE_SUPPORT=y as configure by openwrt buildroot.
If you know how to build universal openssl with cryptoengine support - please report.