Environment: custom DM8148 board, kernel based on psp4.04
1. I followed the instructions on Wiki to patch the kernel, I see /dev/hwrng and /dev/crypto and following messages during boot up:
nss_aes_mod_init: loading NSS AES driver
nss-aes nss-aes: NSS AES hw accel rev: 3.2 (context 0 @0x41140000)
nss-aes nss-aes: NSS AES hw accel rev: 3.2 (context 1 @0x41141000)
nss-aes nss-aes: NSS AES hw accel rev: 3.2 (context 2 @0x411a0000)
nss-aes nss-aes: NSS AES hw accel rev: 3.2 (context 3 @0x411a1000)
nss_aes_probe: probe() done
nss_des_mod_init: loading NSS DES driver
nss-des nss-des: NSS DES hw accel rev: 2.2 (context 0 @0x41160000)
nss-des nss-des: NSS DES hw accel rev: 2.2 (context 1 @0x41161000)
nss_des_probe: probe() done
nss_sham_mod_init: loading NSS SHA/MD5 driver
nss-sham nss-sham: NSS SHA/MD5 hw accel rev: 4.3 (context 0 @0x41100000)
nss-sham nss-sham: NSS SHA/MD5 hw accel rev: 4.3 (context 1 @0x41101000)
nss-sham nss-sham: NSS SHA/MD5 hw accel rev: 0.0 (context 2 @0x411c0000)
nss-sham nss-sham: NSS SHA/MD5 hw accel rev: 0.0 (context 3 @0x411c1000)
nss_sham_probe: probe() done
notice the part I marked in red is different from the example on Wiki.
When I run des test, the device appears ok, but every other test I tried include 3des, aes, sha1 will cause system hang.
2. How do I use openssl with hw crypto?
I am using OpenSSL 1.0.0e 6 Sep 2011 that comes with ubuntu11.10 armel.
I tried openssl engine cryptodev, it will give me this error:
DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:184:filename(/usr/lib/arm-linux-gnueabi/openssl-1.0.0/engines/libcryptodev.so): /usr/lib/arm-linux-gnueabi/openssl-1.0.0/engines/libcryptodev.so: cannot open shared object file: No such file or directory
Nowhere could I find the libcryptodev.so needed.