Securifi Community Forum
General Category => Ideas/Feature requests => Topic started by: h3lix on June 20, 2014, 03:56:13 am
-
Reading posts I see that the CPU is probably a CS7542.
Can someone post some crypto benchmarks with the CPU? With dual NEON DSP cores, I'm assuming it could push gigabit l2tp/openvpn traffic without breaking a sweat.. and this is awesome.
Would also be great to abuse the chip as a transcoder as well.
-
Hi h3lix.
Was it you who asked a similar question in the comments on Kickstarter?
I ran the commands and here is the output:
root@AlmondPlus:~# openssl speed aes-256-cbc
Doing aes-256 cbc for 3s on 16 size blocks: 1410994 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 64 size blocks: 365079 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 256 size blocks: 92857 aes-256 cbc's in 2.99s
Doing aes-256 cbc for 3s on 1024 size blocks: 23345 aes-256 cbc's in 3.01s
Doing aes-256 cbc for 3s on 8192 size blocks: 2920 aes-256 cbc's in 2.99s
OpenSSL 1.0.1g 7 Apr 2014
built on: Thu May 22 09:16:52 IST 2014
options:bn(64,32) rc4(ptr,char) des(idx,cisc,2,long) aes(partial) blowfish(ptr)
compiler: arm-openwrt-linux-uclibcgnueabi-gcc -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/buildserver/coconut/openwrt-2.4.2011-trunk/staging_dir/target-arm_uClibc-0.9.32_eabi/usr/include -I/home/buildserver/coconut/openwrt-2.4.2011-trunk/staging_dir/target-arm_uClibc-0.9.32_eabi/include -I/home/buildserver/coconut/openwrt-2.4.2011-trunk/staging_dir/toolchain-arm_gcc-4.5.1+l_uClibc-0.9.32_eabi/usr/include -I/home/buildserver/coconut/openwrt-2.4.2011-trunk/staging_dir/toolchain-arm_gcc-4.5.1+l_uClibc-0.9.32_eabi/include -DOPENSSL_SMALL_FOOTPRINT -DOPENSSL_NO_ERR -DTERMIOS -O -pipe -march=armv7-a -mtune=cortex-a9 -funit-at-a-time -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -fhonour-copts -fpic -fomit-frame-pointer -Wall
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-256 cbc 7525.30k 7788.35k 7950.30k 7941.95k 8000.21k
root@AlmondPlus:~# openssl speed -evp aes-256-cbc
Doing aes-256-cbc for 3s on 16 size blocks: 1382842 aes-256-cbc's in 2.99s
Doing aes-256-cbc for 3s on 64 size blocks: 362245 aes-256-cbc's in 3.01s
Doing aes-256-cbc for 3s on 256 size blocks: 92656 aes-256-cbc's in 2.99s
Doing aes-256-cbc for 3s on 1024 size blocks: 23306 aes-256-cbc's in 3.01s
Doing aes-256-cbc for 3s on 8192 size blocks: 2921 aes-256-cbc's in 2.99s
OpenSSL 1.0.1g 7 Apr 2014
built on: Thu May 22 09:16:52 IST 2014
options:bn(64,32) rc4(ptr,char) des(idx,cisc,2,long) aes(partial) blowfish(ptr)
compiler: arm-openwrt-linux-uclibcgnueabi-gcc -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/buildserver/coconut/openwrt-2.4.2011-trunk/staging_dir/target-arm_uClibc-0.9.32_eabi/usr/include -I/home/buildserver/coconut/openwrt-2.4.2011-trunk/staging_dir/target-arm_uClibc-0.9.32_eabi/include -I/home/buildserver/coconut/openwrt-2.4.2011-trunk/staging_dir/toolchain-arm_gcc-4.5.1+l_uClibc-0.9.32_eabi/usr/include -I/home/buildserver/coconut/openwrt-2.4.2011-trunk/staging_dir/toolchain-arm_gcc-4.5.1+l_uClibc-0.9.32_eabi/include -DOPENSSL_SMALL_FOOTPRINT -DOPENSSL_NO_ERR -DTERMIOS -O -pipe -march=armv7-a -mtune=cortex-a9 -funit-at-a-time -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -fhonour-copts -fpic -fomit-frame-pointer -Wall
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-256-cbc 7399.82k 7702.22k 7933.09k 7928.69k 8002.95k
-
Hmm just for the fun of it I tried to run the same commands on my server, a "bit" faster. ;-)
openssl speed aes-256-cbc
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-256 cbc 104630.79k 111125.27k 112450.53k 113370.79k 113278.98k
openssl speed -evp aes-256-cbc
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-256-cbc 516954.46k 542944.75k 550962.86k 550647.81k 551204.18k
-
It's highly likely that some additional software optimization will be needed for this, but we've seen better than average router performance when we use the Almond+ as a VPN server. We're currently using DropBear, not OpenVPN.
As for the Neon DSP's, I'm not sure how much access OpenWRT has to the DSP's at the moment.
-
I did post on the kickstarter comments - then I found this forum. :)
Newer intel chips do have impressive optimizations for AES these days built-in to openssl.
It looks like to accelerate openssl for ARM, it will need to be recompiled with "Crypto acceleration support" enabled. This might be a fun project when I get the almond+ and find the serial header for when I inevitably brick it.
Thanks for the benchmark numbers. Looking forward to doing some hacking once it arrives.