Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Benchmarks with GlobalScale stock kernel, from: http://code.google.com/p/dreamplug/downloads/list
- # uname -a
- Linux dreamplug 2.6.33.6 #1 PREEMPT Tue Feb 8 03:18:41 EST 2011 armv5tel GNU/Linux
- # cat /etc/apt/sources.list
- deb http://http.us.debian.org/debian squeeze main contrib non-free
- deb http://http.us.debian.org/debian squeeze-updates main contrib non-free
- deb http://security.debian.org squeeze/updates main contrib non-free
- deb-src http://http.us.debian.org/debian squeeze main contrib non-free
- deb-src http://http.us.debian.org/debian squeeze-updates main contrib non-free
- deb-src http://security.debian.org squeeze/updates main contrib non-free
- # cat /proc/cpuinfo
- Processor : Feroceon 88FR131 rev 1 (v5l)
- BogoMIPS : 1192.75
- Features : swp half thumb fastmult edsp
- CPU implementer : 0x56
- CPU architecture: 5TE
- CPU variant : 0x2
- CPU part : 0x131
- CPU revision : 1
- Hardware : Marvell GuruPlug Reference Board
- Revision : 0000
- Serial : 0000000000000000
- # cat /proc/meminfo
- MemTotal: 513780 kB
- MemFree: 370548 kB
- Buffers: 11624 kB
- Cached: 106484 kB
- SwapCached: 0 kB
- Active: 98364 kB
- Inactive: 31096 kB
- Active(anon): 38656 kB
- Inactive(anon): 628 kB
- Active(file): 59708 kB
- Inactive(file): 30468 kB
- Unevictable: 0 kB
- Mlocked: 0 kB
- SwapTotal: 0 kB
- SwapFree: 0 kB
- Dirty: 0 kB
- Writeback: 0 kB
- AnonPages: 11368 kB
- Mapped: 7868 kB
- Shmem: 27932 kB
- Slab: 6448 kB
- SReclaimable: 3516 kB
- SUnreclaim: 2932 kB
- KernelStack: 1088 kB
- PageTables: 580 kB
- NFS_Unstable: 0 kB
- Bounce: 0 kB
- WritebackTmp: 0 kB
- CommitLimit: 256888 kB
- Committed_AS: 94752 kB
- VmallocTotal: 491520 kB
- VmallocUsed: 3056 kB
- VmallocChunk: 487872 kB
- # openssl speed
- Doing md2 for 3s on 16 size blocks: 122476 md2's in 2.99s
- Doing md2 for 3s on 64 size blocks: 67694 md2's in 3.00s
- Doing md2 for 3s on 256 size blocks: 24261 md2's in 3.00s
- Doing md2 for 3s on 1024 size blocks: 6810 md2's in 3.00s
- Doing md2 for 3s on 8192 size blocks: 882 md2's in 3.00s
- Doing md4 for 3s on 16 size blocks: 770980 md4's in 2.99s
- Doing md4 for 3s on 64 size blocks: 694521 md4's in 3.00s
- Doing md4 for 3s on 256 size blocks: 514645 md4's in 3.00s
- Doing md4 for 3s on 1024 size blocks: 251637 md4's in 3.00s
- Doing md4 for 3s on 8192 size blocks: 43600 md4's in 3.00s
- Doing md5 for 3s on 16 size blocks: 623897 md5's in 3.00s
- Doing md5 for 3s on 64 size blocks: 548525 md5's in 2.99s
- Doing md5 for 3s on 256 size blocks: 396362 md5's in 3.00s
- Doing md5 for 3s on 1024 size blocks: 188326 md5's in 3.00s
- Doing md5 for 3s on 8192 size blocks: 31974 md5's in 3.00s
- Doing hmac(md5) for 3s on 16 size blocks: 803103 hmac(md5)'s in 3.00s
- Doing hmac(md5) for 3s on 64 size blocks: 679630 hmac(md5)'s in 2.99s
- Doing hmac(md5) for 3s on 256 size blocks: 461056 hmac(md5)'s in 3.00s
- Doing hmac(md5) for 3s on 1024 size blocks: 202498 hmac(md5)'s in 3.00s
- Doing hmac(md5) for 3s on 8192 size blocks: 32456 hmac(md5)'s in 3.00s
- Doing sha1 for 3s on 16 size blocks: 562151 sha1's in 3.00s
- Doing sha1 for 3s on 64 size blocks: 445183 sha1's in 3.00s
- Doing sha1 for 3s on 256 size blocks: 267571 sha1's in 2.99s
- Doing sha1 for 3s on 1024 size blocks: 103395 sha1's in 3.00s
- Doing sha1 for 3s on 8192 size blocks: 15233 sha1's in 3.00s
- Doing sha256 for 3s on 16 size blocks: 481544 sha256's in 3.00s
- Doing sha256 for 3s on 64 size blocks: 285020 sha256's in 3.00s
- Doing sha256 for 3s on 256 size blocks: 127673 sha256's in 2.99s
- Doing sha256 for 3s on 1024 size blocks: 39795 sha256's in 3.00s
- Doing sha256 for 3s on 8192 size blocks: 5349 sha256's in 2.99s
- Doing sha512 for 3s on 16 size blocks: 59554 sha512's in 3.00s
- Doing sha512 for 3s on 64 size blocks: 59654 sha512's in 3.00s
- Doing sha512 for 3s on 256 size blocks: 21005 sha512's in 3.00s
- Doing sha512 for 3s on 1024 size blocks: 7198 sha512's in 3.00s
- Doing sha512 for 3s on 8192 size blocks: 1028 sha512's in 2.99s
- Doing rmd160 for 3s on 16 size blocks: 466774 rmd160's in 3.00s
- Doing rmd160 for 3s on 64 size blocks: 361227 rmd160's in 3.00s
- Doing rmd160 for 3s on 256 size blocks: 212312 rmd160's in 3.00s
- Doing rmd160 for 3s on 1024 size blocks: 80270 rmd160's in 3.00s
- Doing rmd160 for 3s on 8192 size blocks: 11790 rmd160's in 3.00s
- Doing rc4 for 3s on 16 size blocks: 6937708 rc4's in 2.99s
- Doing rc4 for 3s on 64 size blocks: 1951308 rc4's in 3.00s
- Doing rc4 for 3s on 256 size blocks: 503975 rc4's in 3.00s
- Doing rc4 for 3s on 1024 size blocks: 127099 rc4's in 3.00s
- Doing rc4 for 3s on 8192 size blocks: 15917 rc4's in 3.00s
- Doing des cbc for 3s on 16 size blocks: 1495004 des cbc's in 3.00s
- Doing des cbc for 3s on 64 size blocks: 405724 des cbc's in 2.99s
- Doing des cbc for 3s on 256 size blocks: 103738 des cbc's in 3.00s
- Doing des cbc for 3s on 1024 size blocks: 26077 des cbc's in 3.00s
- Doing des cbc for 3s on 8192 size blocks: 3264 des cbc's in 3.00s
- Doing des ede3 for 3s on 16 size blocks: 568073 des ede3's in 3.00s
- Doing des ede3 for 3s on 64 size blocks: 146383 des ede3's in 3.00s
- Doing des ede3 for 3s on 256 size blocks: 36872 des ede3's in 3.00s
- Doing des ede3 for 3s on 1024 size blocks: 9238 des ede3's in 2.99s
- Doing des ede3 for 3s on 8192 size blocks: 1155 des ede3's in 3.00s
- Doing aes-128 cbc for 3s on 16 size blocks: 1692575 aes-128 cbc's in 3.00s
- Doing aes-128 cbc for 3s on 64 size blocks: 465134 aes-128 cbc's in 3.00s
- Doing aes-128 cbc for 3s on 256 size blocks: 119350 aes-128 cbc's in 3.00s
- Doing aes-128 cbc for 3s on 1024 size blocks: 30028 aes-128 cbc's in 2.99s
- Doing aes-128 cbc for 3s on 8192 size blocks: 3759 aes-128 cbc's in 3.00s
- Doing aes-192 cbc for 3s on 16 size blocks: 1466123 aes-192 cbc's in 3.00s
- Doing aes-192 cbc for 3s on 64 size blocks: 400505 aes-192 cbc's in 3.00s
- Doing aes-192 cbc for 3s on 256 size blocks: 102296 aes-192 cbc's in 3.00s
- Doing aes-192 cbc for 3s on 1024 size blocks: 25720 aes-192 cbc's in 3.00s
- Doing aes-192 cbc for 3s on 8192 size blocks: 3217 aes-192 cbc's in 3.00s
- Doing aes-256 cbc for 3s on 16 size blocks: 1309990 aes-256 cbc's in 2.99s
- Doing aes-256 cbc for 3s on 64 size blocks: 351233 aes-256 cbc's in 3.00s
- Doing aes-256 cbc for 3s on 256 size blocks: 89520 aes-256 cbc's in 3.00s
- Doing aes-256 cbc for 3s on 1024 size blocks: 22480 aes-256 cbc's in 3.01s
- Doing aes-256 cbc for 3s on 8192 size blocks: 2812 aes-256 cbc's in 3.00s
- Doing aes-128 ige for 3s on 16 size blocks: 1681216 aes-128 ige's in 3.00s
- Doing aes-128 ige for 3s on 64 size blocks: 473351 aes-128 ige's in 2.99s
- Doing aes-128 ige for 3s on 256 size blocks: 122480 aes-128 ige's in 3.00s
- Doing aes-128 ige for 3s on 1024 size blocks: 30893 aes-128 ige's in 3.00s
- Doing aes-128 ige for 3s on 8192 size blocks: 3826 aes-128 ige's in 3.00s
- Doing aes-192 ige for 3s on 16 size blocks: 1466402 aes-192 ige's in 3.00s
- Doing aes-192 ige for 3s on 64 size blocks: 412688 aes-192 ige's in 3.00s
- Doing aes-192 ige for 3s on 256 size blocks: 107345 aes-192 ige's in 3.00s
- Doing aes-192 ige for 3s on 1024 size blocks: 27087 aes-192 ige's in 2.99s
- Doing aes-192 ige for 3s on 8192 size blocks: 3362 aes-192 ige's in 3.00s
- Doing aes-256 ige for 3s on 16 size blocks: 1298774 aes-256 ige's in 3.00s
- Doing aes-256 ige for 3s on 64 size blocks: 360722 aes-256 ige's in 3.00s
- Doing aes-256 ige for 3s on 256 size blocks: 93316 aes-256 ige's in 2.99s
- Doing aes-256 ige for 3s on 1024 size blocks: 23534 aes-256 ige's in 3.00s
- Doing aes-256 ige for 3s on 8192 size blocks: 2922 aes-256 ige's in 3.00s
- Doing rc2 cbc for 3s on 16 size blocks: 1716926 rc2 cbc's in 3.00s
- Doing rc2 cbc for 3s on 64 size blocks: 459696 rc2 cbc's in 3.00s
- Doing rc2 cbc for 3s on 256 size blocks: 117055 rc2 cbc's in 3.00s
- Doing rc2 cbc for 3s on 1024 size blocks: 29390 rc2 cbc's in 2.99s
- Doing rc2 cbc for 3s on 8192 size blocks: 3679 rc2 cbc's in 3.00s
- Doing blowfish cbc for 3s on 16 size blocks: 2918873 blowfish cbc's in 3.00s
- Doing blowfish cbc for 3s on 64 size blocks: 856041 blowfish cbc's in 3.00s
- Doing blowfish cbc for 3s on 256 size blocks: 223821 blowfish cbc's in 3.00s
- Doing blowfish cbc for 3s on 1024 size blocks: 56612 blowfish cbc's in 3.00s
- Doing blowfish cbc for 3s on 8192 size blocks: 7095 blowfish cbc's in 2.99s
- Doing cast cbc for 3s on 16 size blocks: 2913689 cast cbc's in 3.00s
- Doing cast cbc for 3s on 64 size blocks: 862679 cast cbc's in 3.00s
- Doing cast cbc for 3s on 256 size blocks: 226385 cast cbc's in 3.00s
- Doing cast cbc for 3s on 1024 size blocks: 57288 cast cbc's in 3.00s
- Doing cast cbc for 3s on 8192 size blocks: 7184 cast cbc's in 3.00s
- Doing 512 bit private rsa's for 10s: 3579 512 bit private RSA's in 9.99s
- Doing 512 bit public rsa's for 10s: 44964 512 bit public RSA's in 10.00s
- Doing 1024 bit private rsa's for 10s: 792 1024 bit private RSA's in 10.00s
- Doing 1024 bit public rsa's for 10s: 17367 1024 bit public RSA's in 10.00s
- Doing 2048 bit private rsa's for 10s: 145 2048 bit private RSA's in 10.00s
- Doing 2048 bit public rsa's for 10s: 5642 2048 bit public RSA's in 10.00s
- Doing 4096 bit private rsa's for 10s: 24 4096 bit private RSA's in 10.26s
- Doing 4096 bit public rsa's for 10s: 1685 4096 bit public RSA's in 9.99s
- Doing 512 bit sign dsa's for 10s: 4424 512 bit DSA signs in 10.00s
- Doing 512 bit verify dsa's for 10s: 3947 512 bit DSA verify in 9.99s
- Doing 1024 bit sign dsa's for 10s: 1742 1024 bit DSA signs in 10.01s
- Doing 1024 bit verify dsa's for 10s: 1462 1024 bit DSA verify in 9.99s
- Doing 2048 bit sign dsa's for 10s: 569 2048 bit DSA signs in 10.00s
- Doing 2048 bit verify dsa's for 10s: 488 2048 bit DSA verify in 10.01s
- OpenSSL 0.9.8o 01 Jun 2010
- built on: Thu Feb 10 21:19:23 UTC 2011
- options:bn(64,32) md2(int) rc4(ptr,int) des(idx,risc1,4,long) aes(partial) blowfish(idx)
- compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall
- available timing options: TIMES TIMEB HZ=100 [sysconf value]
- timing function used: times
- The 'numbers' are in 1000s of bytes per second processed.
- type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
- md2 655.39k 1444.14k 2070.27k 2324.48k 2408.45k
- mdc2 0.00 0.00 0.00 0.00 0.00
- md4 4125.65k 14816.45k 43916.37k 85892.10k 119057.07k
- md5 3327.45k 11741.00k 33822.89k 64281.94k 87310.34k
- hmac(md5) 4283.22k 14547.26k 39343.45k 69119.32k 88626.52k
- sha1 2998.14k 9497.24k 22909.09k 35292.16k 41596.25k
- rmd160 2489.46k 7706.18k 18117.29k 27398.83k 32194.56k
- rc4 37124.86k 41627.90k 43005.87k 43383.13k 43464.02k
- des cbc 7973.35k 8684.39k 8852.31k 8900.95k 8912.90k
- des ede3 3029.72k 3122.84k 3146.41k 3163.78k 3153.92k
- idea cbc 0.00 0.00 0.00 0.00 0.00
- seed cbc 0.00 0.00 0.00 0.00 0.00
- rc2 cbc 9156.94k 9806.85k 9988.69k 10065.34k 10046.12k
- rc5-32/12 cbc 0.00 0.00 0.00 0.00 0.00
- blowfish cbc 15567.32k 18262.21k 19099.39k 19323.56k 19438.88k
- cast cbc 15539.67k 18403.82k 19318.19k 19554.30k 19617.11k
- aes-128 cbc 9027.07k 9922.86k 10184.53k 10283.84k 10264.58k
- aes-192 cbc 7819.32k 8544.11k 8729.26k 8779.09k 8784.55k
- aes-256 cbc 7009.98k 7492.97k 7639.04k 7647.68k 7678.63k
- camellia-128 cbc 0.00 0.00 0.00 0.00 0.00
- camellia-192 cbc 0.00 0.00 0.00 0.00 0.00
- camellia-256 cbc 0.00 0.00 0.00 0.00 0.00
- sha256 2568.23k 6080.43k 10931.20k 13583.36k 14655.19k
- sha512 317.62k 1272.62k 1792.43k 2456.92k 2816.51k
- aes-128 ige 8966.49k 10131.93k 10451.63k 10544.81k 10447.53k
- aes-192 ige 7820.81k 8804.01k 9160.11k 9276.62k 9180.50k
- aes-256 ige 6926.79k 7695.40k 7989.60k 8032.94k 7979.01k
- sign verify sign/s verify/s
- rsa 512 bits 0.002791s 0.000222s 358.3 4496.4
- rsa 1024 bits 0.012626s 0.000576s 79.2 1736.7
- rsa 2048 bits 0.068966s 0.001772s 14.5 564.2
- rsa 4096 bits 0.427500s 0.005929s 2.3 168.7
- sign verify sign/s verify/s
- dsa 512 bits 0.002260s 0.002531s 442.4 395.1
- dsa 1024 bits 0.005746s 0.006833s 174.0 146.3
- dsa 2048 bits 0.017575s 0.020512s 56.9 48.8
- So, let's try for hardware-accelerated crypto. Assumptions and prerequisites:
- - DreamPlug
- - Debian Squeeze system
- - GlobalScale stock (or other replacement-worthy) kernel
- - build-essential, bzip2, devscripts, fakeroot & wget packages
- - Boot partition (probably /dev/sda1) mounted on /boot
- - Plenty of free space for sources
- To get to this point, see: http://code.google.com/p/dreamplug/downloads/list
- Run as root (n.b. you are trusting plugapps.com):
- wget --directory-prefix=/usr/src http://download.gna.org/cryptodev-linux/cryptodev-linux-1.0.tar.gz
- wget --directory-prefix=/usr/src http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.38.7.tar.bz2
- wget --directory-prefix=/usr/src http://plugapps.com/mirror/with-linux/2.6.38/2.6.38.7/sheeva-2.6.38.7-Modules.tar.gz
- wget --directory-prefix=/boot http://plugapps.com/mirror/with-linux/2.6.38/2.6.38.7/dream-2.6.38.7-uImage
- wget --directory-prefix=/boot http://plugapps.com/mirror/with-linux/2.6.38/2.6.38.7/dream-2.6.38.7.config
- wget --directory-prefix=/boot http://plugapps.com/mirror/with-linux/2.6.38/2.6.38.7/sheeva-2.6.38.7-System.map
- tar -C / -x -v -z --no-same-owner --no-same-permissions -f /usr/src/sheeva-2.6.38.7-Modules.tar.gz
- depmod -eF /boot/sheeva-2.6.38.7-System.map 2.6.38.7
- tar -C /usr/src -x -v -j --no-same-owner --no-same-permissions -f /usr/src/linux-2.6.38.7.tar.bz2
- cp /boot/dream-2.6.38.7.config /usr/src/linux-2.6.38.7/.config
- tar -C /usr/src -x -v -z --no-same-owner --no-same-permissions -f /usr/src/cryptodev-linux-1.0.tar.gz
- Reboot. In U-Boot, from the serial/JTAG console:
- setenv mainlineLinux yes
- setenv arcNumber 2659
- printenv
- Use `setenv _ENV_ _VALUE_` to change "uImage" to "dream-2.6.38.7-uImage". Now:
- saveenv
- reset
- Let the system boot. Now, as root:
- make -C /usr/src/linux-2.6.38.7 oldconfig
- make -C /usr/src/linux-2.6.38.7 prepare
- make -C /usr/src/linux-2.6.38.7
- Watch for this output, near the top, and hit ^C once you've seen the second line:
- HOSTLD scripts/mod/modpost
- HOSTCC scripts/kallsyms
- (All you need from this potentially lengthy `make` is modpost.) Continue:
- rm /lib/modules/2.6.38.7/build
- rm /lib/modules/2.6.38.7/source
- ln -s /usr/src/linux-2.6.38.7 /lib/modules/2.6.38.7/build
- ln -s /usr/src/linux-2.6.38.7 /lib/modules/2.6.38.7/source
- make -C /usr/src/cryptodev-linux-1.0 install
- depmod -eF /boot/sheeva-2.6.38.7-System.map 2.6.38.7
- modprobe cryptodev
- apt-get source openssl
- apt-get build-dep openssl
- sed -i '/^CONFARGS/s|$| -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DHASH_MAX_LEN=64|' /usr/src/openssl-0.9.8o/debian/rules
- sed -i '1i\\' /usr/src/openssl-0.9.8o/debian/changelog
- sed -i '1i\ -- James Renken <jrenken@sandwich.net> Sat, 11 Jun 2011 01:13:00 -0400' /usr/src/openssl-0.9.8o/debian/changelog
- sed -i '1i\\' /usr/src/openssl-0.9.8o/debian/changelog
- sed -i '1i\ \ * Patched rules to compile with CRYPTODEV options' /usr/src/openssl-0.9.8o/debian/changelog
- sed -i '1i\\' /usr/src/openssl-0.9.8o/debian/changelog
- sed -i '1iopenssl (0.9.8o-4squeeze1+cryptodev) stable; urgency=low' /usr/src/openssl-0.9.8o/debian/changelog
- cd /usr/src/openssl-0.9.8o ; debuild -us -uc -b
- dpkg -i /usr/src/libssl0.9.8_0.9.8o-4squeeze1+cryptodev_armel.deb /usr/src/openssl_0.9.8o-4squeeze1+cryptodev_armel.deb
- Done! Let's give it a whirl:
- # uname -a
- Linux dreamplug 2.6.38.7 #1 PREEMPT Sun May 22 00:23:53 MDT 2011 armv5tel GNU/Linux
- # openssl engine
- (dynamic) Dynamic engine loading support
- (cryptodev) BSD cryptodev engine
- According to this post, the flags needed for testing are not intuitive: https://mail.gna.org/public/cryptodev-linux-devel/2010-10/msg00023.html
- # openssl speed -evp aes-128-cbc -engine cryptodev
- engine "cryptodev" set.
- Doing aes-128-cbc for 3s on 16 size blocks: 81432 aes-128-cbc's in 0.16s
- Doing aes-128-cbc for 3s on 64 size blocks: 79173 aes-128-cbc's in 0.03s
- Doing aes-128-cbc for 3s on 256 size blocks: 66949 aes-128-cbc's in 0.08s
- Doing aes-128-cbc for 3s on 1024 size blocks: 40495 aes-128-cbc's in 0.03s
- Doing aes-128-cbc for 3s on 8192 size blocks: 8300 aes-128-cbc's in 0.01s
- OpenSSL 0.9.8o 01 Jun 2010
- built on: Sat Jun 11 05:44:31 UTC 2011
- options:bn(64,32) md2(int) rc4(ptr,int) des(idx,risc1,4,long) aes(partial) blowfish(idx)
- compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DHASH_MAX_LEN=64 -DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall
- available timing options: TIMES TIMEB HZ=100 [sysconf value]
- timing function used: times
- The 'numbers' are in 1000s of bytes per second processed.
- type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
- aes-128-cbc 8143.20k 168902.40k 214236.80k 1382229.33k 6799360.00k
- That's better! Here are two patches that don't apply cleanly to OpenSSL 0.9.8o, but look promising:
- http://repo.or.cz/w/cryptodev-linux.git/blob/HEAD:/extras/openssl-0.9.8l-cryptodev-aes256.patch
- http://people.freebsd.org/~pjd/patches/eng_cryptodev.c.patch
- Here are the packages I compiled, which may save you time. I might move them later, so check this Pastebin.
- http://jrenken.com/dreamplug/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement