The cryptodev engine is working great for me, but eng_cryptodev.c does not make available many of the ciphers that the cryptodev module (linux-cryptodev) uses.
Mainly, I'd like to add AES in ECB, CTR, and GCM modes. I'm attaching a patch, for review purposes only, just to see if I'm on the right track and/or missing something. I'll submit a proper patch once I've added the rest of the ciphers. However, initial testing seems like everything is in order. I've pasted output of AES-128-ECB with this patch running on BeagleBone Black (TI AM335x using linux-cryptodev). Does anybody see any issues with my approach? Josh debian@arm:~/debian-packages$ time openssl speed -evp aes-128-ecb -engine cryptodev engine "cryptodev" set. Doing aes-128-ecb for 3s on 16 size blocks: 10749 aes-128-ecb's in 0.01s Doing aes-128-ecb for 3s on 64 size blocks: 21660 aes-128-ecb's in 0.02s Doing aes-128-ecb for 3s on 256 size blocks: 8 aes-128-ecb's in 0.01s Doing aes-128-ecb for 3s on 1024 size blocks: 8 aes-128-ecb's in 0.00s Doing aes-128-ecb for 3s on 8192 size blocks: 8 aes-128-ecb's in 0.01s OpenSSL 1.0.1e 11 Feb 2013 built on: Mon Oct 28 00:28:43 UTC 2013 options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) idea(int) blowfish(ptr) compiler: gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DUSE_CRYPTDEV_DIGESTS -march=armv7-a -Wa,--noexecstack -DTERMIO -O3 -Wall -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DGHASH_ASM The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128-ecb 17198.40k 69312.00k 204.80k infk 6553.60k real 0m15.698s user 0m0.057s sys 0m2.746s
cryptodev.patch
Description: Binary data