SSL negotiation (where the device is the server) takes about 2s
as it currently stands, and that's with the current MIPS assembler
support in OpenSSL.
I was planning on running some actual benchmarks but hadn't gotten
around to it yet.
I've just made some commits and here is "workflow". First compile
linux-generic32 build [adding -march=4ksd] and collect
output for 'openssl speed aes-128-cbc sha rsa1024' command. Then check-out
latest source [alternatively wait for
*tomorrow* openssl-SNAP-20120916 snapshot], './Configure linux-mips32
-mips32r2', build and collect output for above
command. You can either post outputs here or send to me personally. -mips32r2
engages r2 code in assembly modules, don't
specify your 4ksd at this point, we'll figure it out later. If your compiler
doesn't recognize -mips32r2, pass
-D_MIPS_ARCH_MIPS32R2 to ./Configure.
Some notes on new Linux/MIPS config lines. I've chosen not to refer to
mips2-3-4, but to mips32 and mips64, which are
current MIPS architecture specifications. There also are mips32r2 and mips64r2
specifications. The lines are
endian-neutral in sense that they work on either endianness target.
I'll do that first thing Monday when I have access to the device again.
I grabbed openssl-SNAP-20120917
Here's what I did to build it:
export PATH=$PATH:/opt/uclibc/usr/bin
export CROSS_COMPILE=mipsel-linux-
./Configure "-march=4ksd --sysroot=/opt/uclibc -D_FILE_OFFSET_BITS=32"
linux-generic32
make
mipsel-linux-strip apps/openssl
mv apps/openssl apps/openssl-generic32
make clean
./Configure "-D_FILE_OFFSET_BITS=32 --sysroot=/opt/uclibc" linux-mips32
-mips32r2
make
mipsel-linux-strip apps/openssl
mv apps/openssl apps/openssl-mips32r2
Then copied both openssl versions to the device.
./openssl-generic32 speed aes-128-cbc sha rsa1024
Doing sha1 for 3s on 16 size blocks: 36149 sha1's in 3.01s
Doing sha1 for 3s on 64 size blocks: 30076 sha1's in 3.01s
Doing sha1 for 3s on 256 size blocks: 19962 sha1's in 2.99s
Doing sha1 for 3s on 1024 size blocks: 8533 sha1's in 3.01s
Doing sha1 for 3s on 8192 size blocks: 1244 sha1's in 3.01s
Doing sha256 for 3s on 16 size blocks: 27339 sha256's in 3.00s
Doing sha256 for 3s on 64 size blocks: 21866 sha256's in 2.99s
Doing sha256 for 3s on 256 size blocks: 11082 sha256's in 3.01s
Doing sha256 for 3s on 1024 size blocks: 3710 sha256's in 3.01s
Doing sha256 for 3s on 8192 size blocks: 499 sha256's in 3.01s
Doing sha512 for 3s on 16 size blocks: 703 sha512's in 3.00s
Doing sha512 for 3s on 64 size blocks: 704 sha512's in 3.01s
Doing sha512 for 3s on 256 size blocks: 241 sha512's in 3.00s
Doing sha512 for 3s on 1024 size blocks: 82 sha512's in 3.04s
Doing sha512 for 3s on 8192 size blocks: 12 sha512's in 3.20s
Doing aes-128 cbc for 3s on 16 size blocks: 209052 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 64 size blocks: 55532 aes-128 cbc's in 3.01s
Doing aes-128 cbc for 3s on 256 size blocks: 14079 aes-128 cbc's in 3.01s
Doing aes-128 cbc for 3s on 1024 size blocks: 3506 aes-128 cbc's in 3.01s
Doing aes-128 cbc for 3s on 8192 size blocks: 403 aes-128 cbc's in 3.01s
Doing 1024 bit private rsa's for 10s: 28 1024 bit private RSA's in 10.18s
Doing 1024 bit public rsa's for 10s: 887 1024 bit public RSA's in 9.90s
OpenSSL 1.1.0-dev xx XXX xxxx
built on: Mon Sep 17 09:30:05 EDT 2012
options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) idea(int)
blowfish(ptr)
compiler: mipsel-linux-gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
-DHAVE_DLFCN_H -march=4ksd --sysroot=/opt/uclibc -D_FILE_OFFSET_BITS=32
-DTERMIO -O3 -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
sha1 192.15k 639.49k 1709.12k 2902.92k 3385.66k
aes-128 cbc 1114.94k 1180.75k 1197.42k 1192.74k 1096.80k
sha256 145.81k 468.03k 942.52k 1262.14k 1358.08k
sha512 3749.33 14.97k 20.57k 27.62k 30.72k
sign verify sign/s verify/s
rsa 1024 bits 0.363571s 0.011161s 2.8 89.6
./openssl-mips32r2 speed aes-128-cbc sha rsa1024
Doing sha1 for 3s on 16 size blocks: 54904 sha1's in 2.95s
Doing sha1 for 3s on 64 size blocks: 45365 sha1's in 3.01s
Doing sha1 for 3s on 256 size blocks: 28959 sha1's in 2.99s
Doing sha1 for 3s on 1024 size blocks: 11840 sha1's in 3.01s
Doing sha1 for 3s on 8192 size blocks: 1649 sha1's in 3.01s
Doing sha256 for 3s on 16 size blocks: 45012 sha256's in 3.01s
Doing sha256 for 3s on 64 size blocks: 31131 sha256's in 2.99s
Doing sha256 for 3s on 256 size blocks: 16242 sha256's in 3.00s
Doing sha256 for 3s on 1024 size blocks: 5522 sha256's in 2.98s
Doing sha256 for 3s on 8192 size blocks: 748 sha256's in 3.01s
Doing sha512 for 3s on 16 size blocks: 706 sha512's in 3.01s
Doing sha512 for 3s on 64 size blocks: 705 sha512's in 3.01s
Doing sha512 for 3s on 256 size blocks: 241 sha512's in 3.01s
Doing sha512 for 3s on 1024 size blocks: 81 sha512's in 3.00s
Doing sha512 for 3s on 8192 size blocks: 12 sha512's in 3.20s
Doing aes-128 cbc for 3s on 16 size blocks: 240851 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 64 size blocks: 64414 aes-128 cbc's in 3.01s
Doing aes-128 cbc for 3s on 256 size blocks: 16377 aes-128 cbc's in 3.01s
Doing aes-128 cbc for 3s on 1024 size blocks: 4104 aes-128 cbc's in 3.01s
Doing aes-128 cbc for 3s on 8192 size blocks: 466 aes-128 cbc's in 3.00s
Doing 1024 bit private rsa's for 10s: 74 1024 bit private RSA's in 10.05s
Doing 1024 bit public rsa's for 10s: 1083 1024 bit public RSA's in 9.84s
OpenSSL 1.1.0-dev xx XXX xxxx
built on: Mon Sep 17 09:34:52 EDT 2012
options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) idea(int)
blowfish(ptr)
compiler: mipsel-linux-gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
-DHAVE_DLFCN_H -D_FILE_OFFSET_BITS=32 --sysroot=/opt/uclibc -mips32r2 -mabi=32
-DTERMIO -O3 -Wall -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DAES_ASM
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
sha1 297.78k 964.57k 2479.43k 4027.96k 4487.91k
aes-128 cbc 1284.54k 1369.60k 1392.86k 1396.18k 1272.49k
sha256 239.27k 666.35k 1385.98k 1897.49k 2035.75k
sha512 3752.82 14.99k 20.50k 27.65k 30.72k
sign verify sign/s verify/s
rsa 1024 bits 0.135811s 0.009086s 7.4 110.1
Thanks!
-Brad
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majord...@openssl.org