Fitz Mutch
Senior Member
I've been trying to test openssl to use /dev/crypto, to access the accelerated ciphers of the RT-AC86U. These are kernel modules in the Linux mainline kernel, written in 64-bit assembler, intended for the ARMv8 cpu. However, it's kernelspace and I need a userspace interface such as /dev/crypto or AF_ALG to access the ciphers.
https://github.com/RMerl/asuswrt-me...nd/kernel/linux-4.1/arch/arm64/crypto/Kconfig
Enable /dev/crypto in Asuswrt-Merlin with this patch, then re-build the firmware. This patch automatically downloads the cryptodev-linux source archive and inserts it into the Asuswrt firmware build. I've only tested with RT-AC86U, but it should work for all HND platform routers.
Look for cryptodev.ko in the image directory, then you would copy it to the router and modprobe it. Then /dev/crypto will appear.
How to load the accelerated ciphers kernel modules on RT-AC86U.
Get results from the AES example. Apparently, it's not using the accelerated ciphers. At least /dev/crypto works!
The AES example uses the software-based ciphers.
The accelerated cipher I want to test via /dev/crypto is "AES core cipher using ARMv8 Crypto Extensions". Anyone know how to test it with openssl or another program?
https://github.com/RMerl/asuswrt-me...nd/kernel/linux-4.1/arch/arm64/crypto/Kconfig
Enable /dev/crypto in Asuswrt-Merlin with this patch, then re-build the firmware. This patch automatically downloads the cryptodev-linux source archive and inserts it into the Asuswrt firmware build. I've only tested with RT-AC86U, but it should work for all HND platform routers.
Code:
cd ~/asuswrt-merlin.ng
patch -p1 -i ~/path/to/patches/asuswrt-cryptodev.patch
Look for cryptodev.ko in the image directory, then you would copy it to the router and modprobe it. Then /dev/crypto will appear.
How to load the accelerated ciphers kernel modules on RT-AC86U.
Code:
for M in /lib/modules/4.1.27/kernel/arch/arm64/crypto/*; do modprobe $(basename $M); done
Get results from the AES example. Apparently, it's not using the accelerated ciphers. At least /dev/crypto works!
Code:
Got cbc(aes) with driver cbc-aes-iproc
Note: This is not an accelerated cipher
AES Test passed
The AES example uses the software-based ciphers.
Code:
# cat /proc/crypto | grep -F cbc-aes-iproc
driver : cbc-aes-iproc
driver : cbc-aes-iproc
driver : authenc-hmac-sha512-cbc-aes-iproc
driver : authenc-hmac-sha384-cbc-aes-iproc
driver : authenc-hmac-sha256-cbc-aes-iproc
driver : authenc-hmac-sha224-cbc-aes-iproc
driver : authenc-hmac-sha1-cbc-aes-iproc
driver : authenc-hmac-md5-cbc-aes-iproc
The accelerated cipher I want to test via /dev/crypto is "AES core cipher using ARMv8 Crypto Extensions". Anyone know how to test it with openssl or another program?
Code:
# cat /proc/crypto | grep -F cbc-aes-ce
driver : cbc-aes-ce
Attachments
Last edited: