Subject: lib/28935: Re: lib/28935: improving the in-tree openssl
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Martin Husemann <martin@duskware.de>
List: netbsd-bugs
Date: 01/20/2005 08:58:02
The following reply was made to PR lib/28935; it has been noted by GNATS.

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: lib/28935: improving the in-tree openssl
Date: Thu, 20 Jan 2005 09:57:38 +0100

 So I did some tests and tried various things - and ended up with something
 quite simple. If I
 
  - remove src/lib/libcrypto/arch/sparc64/des.inc
  - replace src/crypto/dist/openssl/crypto/bn with the complete bn directory
    from the pkgsrc version
  - apply the patch below
 
 I get an openssl that is (as least) as fast as the pkgsrc version on sparc64.
 Output of "openssl speed" for old in-tree and patched in-tree version below.
 
 So, what I'd like to suggest is that we import the bn directory from the newer
 openssl distribution, and then do something equivalent to the makefile patch.
 I would actually to the endianess detection in that file, but move the arch
 dependend defines to arch/*.inc in the reachover makefile fragments.
 
 The exact options for each arch need to be evaluated. Sparc64 gets a 2x speedup,
 and Johnny Lam optimized the amd64 options for the pkgsrc version. Simons
 results seem to imply that the alpha options are broken - they should be
 fixed for both pkgsrc and this change.
 
 Martin
 
 Index: Makefile.openssl
 ===================================================================
 RCS file: /cvsroot/src/crypto/Makefile.openssl,v
 retrieving revision 1.7
 diff -u -r1.7 Makefile.openssl
 --- Makefile.openssl	30 Jul 2002 12:55:08 -0000	1.7
 +++ Makefile.openssl	20 Jan 2005 08:42:58 -0000
 @@ -10,4 +10,19 @@
  CPPFLAGS+=	-DDSO_DLFCN -DHAVE_DLFCN_H
  CPPFLAGS+=	-I${CRYPTODIST}/openssl/crypto
  
 +.include <bsd.endian.mk>
 +.if ${TARGET_ENDIANNESS} == 4321
 +CPPFLAGS+=	-DB_ENDIAN
 +.else
 +CPPFLAGS+=	-DL_ENDIAN
 +.endif
 +
 +.if ${MACHINE_ARCH} == "sparc64"
 +CPPFLAGS+= -DMD32_REG_T=int -DSIXTY_FOUR_BIT_LONG -DDES_INT -DDES_PTR -DDES_RISC2 -DBF_PTR
 +.elif ${MACHINE_ARCH} == "alpha"
 +CPPFLAGS+= -DMD32_REG_T=int -DSIXTY_FOUR_BIT_LONG -DDES_INT -DDES_PTR -DDES_RISC2
 +.elif ${MACHINE_ARCH} == "x86_64"
 +CPPFLAGS+= -DMD32_REG_T=int -DSIXTY_FOUR_BIT_LONG -DRC4_CHUNK -DBF_PTR2 -DDES_INT -DDES_UNROLL
 +.endif
 +
  .endif
 
 Results of "openssl speed" with old in-tree version on one of my sparc64
 machines:
 
 To get the most accurate results, try to run this
 program when this computer is idle.
 Doing md2 for 3s on 16 size blocks: 35297 md2's in 3.00s
 Doing md2 for 3s on 64 size blocks: 19388 md2's in 3.00s
 Doing md2 for 3s on 256 size blocks: 6924 md2's in 2.98s
 Doing md2 for 3s on 1024 size blocks: 1950 md2's in 3.01s
 Doing md2 for 3s on 8192 size blocks: 254 md2's in 3.01s
 Doing md4 for 3s on 16 size blocks: 278251 md4's in 3.00s
 Doing md4 for 3s on 64 size blocks: 226109 md4's in 2.99s
 Doing md4 for 3s on 256 size blocks: 174230 md4's in 3.01s
 Doing md4 for 3s on 1024 size blocks: 91251 md4's in 3.01s
 Doing md4 for 3s on 8192 size blocks: 16087 md4's in 2.91s
 Doing md5 for 3s on 16 size blocks: 228841 md5's in 3.01s
 Doing md5 for 3s on 64 size blocks: 180991 md5's in 3.01s
 Doing md5 for 3s on 256 size blocks: 134202 md5's in 3.01s
 Doing md5 for 3s on 1024 size blocks: 65968 md5's in 3.00s
 Doing md5 for 3s on 8192 size blocks: 11534 md5's in 3.01s
 Doing hmac(md5) for 3s on 16 size blocks: 439395 hmac(md5)'s in 3.01s
 Doing hmac(md5) for 3s on 64 size blocks: 337502 hmac(md5)'s in 3.01s
 Doing hmac(md5) for 3s on 256 size blocks: 205246 hmac(md5)'s in 3.01s
 Doing hmac(md5) for 3s on 1024 size blocks: 79958 hmac(md5)'s in 3.00s
 Doing hmac(md5) for 3s on 8192 size blocks: 11924 hmac(md5)'s in 3.01s
 Doing sha1 for 3s on 16 size blocks: 204444 sha1's in 2.89s
 Doing sha1 for 3s on 64 size blocks: 129765 sha1's in 3.01s
 Doing sha1 for 3s on 256 size blocks: 90920 sha1's in 3.01s
 Doing sha1 for 3s on 1024 size blocks: 41455 sha1's in 3.01s
 Doing sha1 for 3s on 8192 size blocks: 6806 sha1's in 3.01s
 Doing rmd160 for 3s on 16 size blocks: 184083 rmd160's in 3.01s
 Doing rmd160 for 3s on 64 size blocks: 97567 rmd160's in 3.01s
 Doing rmd160 for 3s on 256 size blocks: 66923 rmd160's in 3.01s
 Doing rmd160 for 3s on 1024 size blocks: 29656 rmd160's in 3.01s
 Doing rmd160 for 3s on 8192 size blocks: 4781 rmd160's in 3.01s
 Doing rc4 for 3s on 16 size blocks: 4429692 rc4's in 2.91s
 Doing rc4 for 3s on 64 size blocks: 1312786 rc4's in 3.01s
 Doing rc4 for 3s on 256 size blocks: 345052 rc4's in 3.01s
 Doing rc4 for 3s on 1024 size blocks: 87626 rc4's in 3.01s
 Doing rc4 for 3s on 8192 size blocks: 12037 rc4's in 3.00s
 Doing des cbc for 3s on 16 size blocks: 822391 des cbc's in 3.00s
 Doing des cbc for 3s on 64 size blocks: 217571 des cbc's in 3.01s
 Doing des cbc for 3s on 256 size blocks: 55083 des cbc's in 3.01s
 Doing des cbc for 3s on 1024 size blocks: 13824 des cbc's in 3.01s
 Doing des cbc for 3s on 8192 size blocks: 1731 des cbc's in 3.01s
 Doing des ede3 for 3s on 16 size blocks: 284018 des ede3's in 2.90s
 Doing des ede3 for 3s on 64 size blocks: 75414 des ede3's in 3.01s
 Doing des ede3 for 3s on 256 size blocks: 18985 des ede3's in 3.00s
 Doing des ede3 for 3s on 1024 size blocks: 4727 des ede3's in 2.98s
 Doing des ede3 for 3s on 8192 size blocks: 594 des ede3's in 3.00s
 Doing aes-128 cbc for 3s on 16 size blocks: 1486349 aes-128 cbc's in 2.99s
 Doing aes-128 cbc for 3s on 64 size blocks: 402388 aes-128 cbc's in 3.00s
 Doing aes-128 cbc for 3s on 256 size blocks: 102838 aes-128 cbc's in 3.00s
 Doing aes-128 cbc for 3s on 1024 size blocks: 25944 aes-128 cbc's in 3.01s
 Doing aes-128 cbc for 3s on 8192 size blocks: 3170 aes-128 cbc's in 3.01s
 Doing aes-192 cbc for 3s on 16 size blocks: 1345059 aes-192 cbc's in 2.88s
 Doing aes-192 cbc for 3s on 64 size blocks: 360398 aes-192 cbc's in 2.99s
 Doing aes-192 cbc for 3s on 256 size blocks: 91693 aes-192 cbc's in 3.01s
 Doing aes-192 cbc for 3s on 1024 size blocks: 22976 aes-192 cbc's in 3.01s
 Doing aes-192 cbc for 3s on 8192 size blocks: 2816 aes-192 cbc's in 3.01s
 Doing aes-256 cbc for 3s on 16 size blocks: 1243371 aes-256 cbc's in 3.00s
 Doing aes-256 cbc for 3s on 64 size blocks: 325196 aes-256 cbc's in 3.00s
 Doing aes-256 cbc for 3s on 256 size blocks: 82049 aes-256 cbc's in 3.00s
 Doing aes-256 cbc for 3s on 1024 size blocks: 20666 aes-256 cbc's in 3.01s
 Doing aes-256 cbc for 3s on 8192 size blocks: 2533 aes-256 cbc's in 3.01s
 Doing rc2 cbc for 3s on 16 size blocks: 801422 rc2 cbc's in 3.01s
 Doing rc2 cbc for 3s on 64 size blocks: 201905 rc2 cbc's in 2.91s
 Doing rc2 cbc for 3s on 256 size blocks: 52141 rc2 cbc's in 2.97s
 Doing rc2 cbc for 3s on 1024 size blocks: 13262 rc2 cbc's in 3.01s
 Doing rc2 cbc for 3s on 8192 size blocks: 1656 rc2 cbc's in 3.01s
 Doing blowfish cbc for 3s on 16 size blocks: 1878619 blowfish cbc's in 3.00s
 Doing blowfish cbc for 3s on 64 size blocks: 519292 blowfish cbc's in 3.01s
 Doing blowfish cbc for 3s on 256 size blocks: 133370 blowfish cbc's in 3.00s
 Doing blowfish cbc for 3s on 1024 size blocks: 33439 blowfish cbc's in 3.00s
 Doing blowfish cbc for 3s on 8192 size blocks: 4194 blowfish cbc's in 3.01s
 Doing cast cbc for 3s on 16 size blocks: 1496212 cast cbc's in 3.01s
 Doing cast cbc for 3s on 64 size blocks: 386907 cast cbc's in 2.90s
 Doing cast cbc for 3s on 256 size blocks: 99023 cast cbc's in 2.92s
 Doing cast cbc for 3s on 1024 size blocks: 25400 cast cbc's in 2.99s
 Doing cast cbc for 3s on 8192 size blocks: 3270 cast cbc's in 3.00s
 Doing 512 bit private rsa's for 10s: 590 512 bit private RSA's in 9.93s
 Doing 512 bit public rsa's for 10s: 5978 512 bit public RSA's in 9.96s
 Doing 1024 bit private rsa's for 10s: 99 1024 bit private RSA's in 9.87s
 Doing 1024 bit public rsa's for 10s: 1780 1024 bit public RSA's in 10.00s
 Doing 2048 bit private rsa's for 10s: 15 2048 bit private RSA's in 10.01s
 Doing 2048 bit public rsa's for 10s: 485 2048 bit public RSA's in 9.88s
 Doing 4096 bit private rsa's for 10s: 3 4096 bit private RSA's in 14.18s
 Doing 4096 bit public rsa's for 10s: 107 4096 bit public RSA's in 8.17s
 Doing 512 bit sign dsa's for 10s: 641 512 bit DSA signs in 10.00s
 Doing 512 bit verify dsa's for 10s: 523 512 bit DSA verify in 10.01s
 Doing 1024 bit sign dsa's for 10s: 183 1024 bit DSA signs in 9.91s
 Doing 1024 bit verify dsa's for 10s: 151 1024 bit DSA verify in 9.91s
 Doing 2048 bit sign dsa's for 10s: 50 2048 bit DSA signs in 9.81s
 Doing 2048 bit verify dsa's for 10s: 22 2048 bit DSA verify in 5.32s
 OpenSSL 0.9.7d 17 Mar 2004
 built on: NetBSD 2.99.12
 options:bn(32,32) md2(int) rc4(ptr,int) des(ptr,risc1,16,int) aes(partial) blowfish(idx) 
 compiler: gcc version 3.3.3 (NetBSD nb3 20040520)
 available timing options: USE_TOD HZ=100 [sysconf value]
 timing function used: getrusage
 The 'numbers' are in 1000s of bytes per second processed.
 type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
 md2                188.51k      413.05k      594.49k      664.27k      691.91k
 mdc2                 0.00         0.00         0.00         0.00         0.00 
 md4               1483.83k     4838.80k    14819.56k    31046.29k    45355.09k
 md5               1216.72k     3848.62k    11415.06k    22519.36k    31391.30k
 hmac(md5)         2336.02k     7176.90k    17457.44k    27294.87k    32454.06k
 sha1              1133.45k     2759.44k     7733.70k    14104.64k    18524.62k
 rmd160             978.62k     2074.65k     5692.35k    10089.80k    13011.47k
 rc4              24387.62k    27916.33k    29349.70k    29812.52k    32890.16k
 des cbc           4386.87k     4626.43k     4685.16k     4703.36k     4709.54k
 des ede3          1567.26k     1605.67k     1620.80k     1622.78k     1623.87k
 idea cbc             0.00         0.00         0.00         0.00         0.00 
 rc2 cbc           4261.24k     4446.90k     4497.34k     4512.15k     4510.79k
 rc5-32/12 cbc        0.00         0.00         0.00         0.00         0.00 
 blowfish cbc     10029.96k    11042.30k    11383.87k    11406.59k    11429.11k
 cast cbc          7954.37k     8528.07k     8671.44k     8702.72k     8928.16k
 aes-128 cbc       7945.87k     8584.82k     8784.27k     8826.97k     8627.36k
 aes-192 cbc       7464.39k     7704.80k     7799.30k     7816.70k     7664.41k
 aes-256 cbc       6632.31k     6938.01k     7001.39k     7031.71k     6893.40k
                   sign    verify    sign/s verify/s
 rsa  512 bits   0.0168s   0.0017s     59.4    600.2
 rsa 1024 bits   0.0997s   0.0056s     10.0    178.0
 rsa 2048 bits   0.6673s   0.0204s      1.5     49.1
 rsa 4096 bits   4.7254s   0.0764s      0.2     13.1
                   sign    verify    sign/s verify/s
 dsa  512 bits   0.0156s   0.0191s     64.1     52.2
 dsa 1024 bits   0.0542s   0.0656s     18.5     15.2
 dsa 2048 bits   0.1961s   0.2418s      5.1      4.1
 
 And with the changes as described above:
 
 To get the most accurate results, try to run this
 program when this computer is idle.
 Doing md2 for 3s on 16 size blocks: 35818 md2's in 3.00s
 Doing md2 for 3s on 64 size blocks: 19593 md2's in 3.01s
 Doing md2 for 3s on 256 size blocks: 6991 md2's in 3.01s
 Doing md2 for 3s on 1024 size blocks: 1968 md2's in 3.01s
 Doing md2 for 3s on 8192 size blocks: 256 md2's in 3.02s
 Doing md4 for 3s on 16 size blocks: 276456 md4's in 3.00s
 Doing md4 for 3s on 64 size blocks: 227819 md4's in 3.01s
 Doing md4 for 3s on 256 size blocks: 175038 md4's in 3.01s
 Doing md4 for 3s on 1024 size blocks: 91345 md4's in 3.00s
 Doing md4 for 3s on 8192 size blocks: 16710 md4's in 3.01s
 Doing md5 for 3s on 16 size blocks: 222475 md5's in 2.86s
 Doing md5 for 3s on 64 size blocks: 180970 md5's in 3.01s
 Doing md5 for 3s on 256 size blocks: 134267 md5's in 3.01s
 Doing md5 for 3s on 1024 size blocks: 65973 md5's in 3.01s
 Doing md5 for 3s on 8192 size blocks: 11549 md5's in 3.00s
 Doing hmac(md5) for 3s on 16 size blocks: 429397 hmac(md5)'s in 3.00s
 Doing hmac(md5) for 3s on 64 size blocks: 330397 hmac(md5)'s in 3.01s
 Doing hmac(md5) for 3s on 256 size blocks: 203039 hmac(md5)'s in 3.00s
 Doing hmac(md5) for 3s on 1024 size blocks: 79585 hmac(md5)'s in 3.01s
 Doing hmac(md5) for 3s on 8192 size blocks: 11923 hmac(md5)'s in 3.01s
 Doing sha1 for 3s on 16 size blocks: 202378 sha1's in 2.86s
 Doing sha1 for 3s on 64 size blocks: 175642 sha1's in 3.01s
 Doing sha1 for 3s on 256 size blocks: 115928 sha1's in 3.01s
 Doing sha1 for 3s on 1024 size blocks: 49403 sha1's in 3.01s
 Doing sha1 for 3s on 8192 size blocks: 7766 sha1's in 2.99s
 Doing rmd160 for 3s on 16 size blocks: 183756 rmd160's in 3.01s
 Doing rmd160 for 3s on 64 size blocks: 98037 rmd160's in 3.01s
 Doing rmd160 for 3s on 256 size blocks: 67111 rmd160's in 3.01s
 Doing rmd160 for 3s on 1024 size blocks: 29661 rmd160's in 3.01s
 Doing rmd160 for 3s on 8192 size blocks: 4783 rmd160's in 3.01s
 Doing rc4 for 3s on 16 size blocks: 4373230 rc4's in 2.86s
 Doing rc4 for 3s on 64 size blocks: 1313886 rc4's in 3.00s
 Doing rc4 for 3s on 256 size blocks: 341802 rc4's in 3.00s
 Doing rc4 for 3s on 1024 size blocks: 86926 rc4's in 3.01s
 Doing rc4 for 3s on 8192 size blocks: 12032 rc4's in 3.01s
 Doing des cbc for 3s on 16 size blocks: 967412 des cbc's in 3.01s
 Doing des cbc for 3s on 64 size blocks: 256369 des cbc's in 3.01s
 Doing des cbc for 3s on 256 size blocks: 65417 des cbc's in 3.00s
 Doing des cbc for 3s on 1024 size blocks: 16406 des cbc's in 3.01s
 Doing des cbc for 3s on 8192 size blocks: 2035 des cbc's in 3.01s
 Doing des ede3 for 3s on 16 size blocks: 370887 des ede3's in 3.01s
 Doing des ede3 for 3s on 64 size blocks: 91167 des ede3's in 2.87s
 Doing des ede3 for 3s on 256 size blocks: 24082 des ede3's in 3.01s
 Doing des ede3 for 3s on 1024 size blocks: 6035 des ede3's in 3.01s
 Doing des ede3 for 3s on 8192 size blocks: 752 des ede3's in 3.01s
 Doing aes-128 cbc for 3s on 16 size blocks: 1389283 aes-128 cbc's in 3.01s
 Doing aes-128 cbc for 3s on 64 size blocks: 349707 aes-128 cbc's in 3.00s
 Doing aes-128 cbc for 3s on 256 size blocks: 88381 aes-128 cbc's in 3.01s
 Doing aes-128 cbc for 3s on 1024 size blocks: 22182 aes-128 cbc's in 3.01s
 Doing aes-128 cbc for 3s on 8192 size blocks: 2753 aes-128 cbc's in 3.00s
 Doing aes-192 cbc for 3s on 16 size blocks: 1147859 aes-192 cbc's in 3.01s
 Doing aes-192 cbc for 3s on 64 size blocks: 292533 aes-192 cbc's in 2.87s
 Doing aes-192 cbc for 3s on 256 size blocks: 76946 aes-192 cbc's in 3.01s
 Doing aes-192 cbc for 3s on 1024 size blocks: 19259 aes-192 cbc's in 3.01s
 Doing aes-192 cbc for 3s on 8192 size blocks: 2423 aes-192 cbc's in 3.00s
 Doing aes-256 cbc for 3s on 16 size blocks: 1226890 aes-256 cbc's in 3.01s
 Doing aes-256 cbc for 3s on 64 size blocks: 321688 aes-256 cbc's in 3.01s
 Doing aes-256 cbc for 3s on 256 size blocks: 80967 aes-256 cbc's in 3.00s
 Doing aes-256 cbc for 3s on 1024 size blocks: 20333 aes-256 cbc's in 3.01s
 Doing aes-256 cbc for 3s on 8192 size blocks: 2531 aes-256 cbc's in 2.98s
 Doing rc2 cbc for 3s on 16 size blocks: 799764 rc2 cbc's in 3.01s
 Doing rc2 cbc for 3s on 64 size blocks: 203258 rc2 cbc's in 2.92s
 Doing rc2 cbc for 3s on 256 size blocks: 52949 rc2 cbc's in 3.01s
 Doing rc2 cbc for 3s on 1024 size blocks: 13260 rc2 cbc's in 3.01s
 Doing rc2 cbc for 3s on 8192 size blocks: 1664 rc2 cbc's in 3.01s
 Doing blowfish cbc for 3s on 16 size blocks: 1974673 blowfish cbc's in 3.00s
 Doing blowfish cbc for 3s on 64 size blocks: 548968 blowfish cbc's in 3.01s
 Doing blowfish cbc for 3s on 256 size blocks: 140469 blowfish cbc's in 3.01s
 Doing blowfish cbc for 3s on 1024 size blocks: 35381 blowfish cbc's in 3.01s
 Doing blowfish cbc for 3s on 8192 size blocks: 4429 blowfish cbc's in 3.01s
 Doing cast cbc for 3s on 16 size blocks: 1316572 cast cbc's in 3.01s
 Doing cast cbc for 3s on 64 size blocks: 346237 cast cbc's in 2.92s
 Doing cast cbc for 3s on 256 size blocks: 91452 cast cbc's in 3.01s
 Doing cast cbc for 3s on 1024 size blocks: 23020 cast cbc's in 3.00s
 Doing cast cbc for 3s on 8192 size blocks: 2880 cast cbc's in 3.01s
 Doing 512 bit private rsa's for 10s: 1217 512 bit private RSA's in 10.01s
 Doing 512 bit public rsa's for 10s: 12252 512 bit public RSA's in 10.00s
 Doing 1024 bit private rsa's for 10s: 218 1024 bit private RSA's in 9.87s
 Doing 1024 bit public rsa's for 10s: 3932 1024 bit public RSA's in 10.00s
 Doing 2048 bit private rsa's for 10s: 35 2048 bit private RSA's in 10.21s
 Doing 2048 bit public rsa's for 10s: 1115 2048 bit public RSA's in 9.85s
 Doing 4096 bit private rsa's for 10s: 5 4096 bit private RSA's in 10.06s
 Doing 4096 bit public rsa's for 10s: 311 4096 bit public RSA's in 9.99s
 Doing 512 bit sign dsa's for 10s: 1339 512 bit DSA signs in 9.86s
 Doing 512 bit verify dsa's for 10s: 1098 512 bit DSA verify in 10.00s
 Doing 1024 bit sign dsa's for 10s: 415 1024 bit DSA signs in 10.01s
 Doing 1024 bit verify dsa's for 10s: 330 1024 bit DSA verify in 9.89s
 Doing 2048 bit sign dsa's for 10s: 119 2048 bit DSA signs in 10.03s
 Doing 2048 bit verify dsa's for 10s: 95 2048 bit DSA verify in 10.02s
 OpenSSL 0.9.7d 17 Mar 2004
 built on: NetBSD 2.99.12
 options:bn(64,64) md2(int) rc4(ptr,int) des(ptr,risc2,4,int) aes(partial) blowfish(ptr) 
 compiler: gcc version 3.3.3 (NetBSD nb3 20040520)
 available timing options: USE_TOD HZ=100 [sysconf value]
 timing function used: getrusage
 The 'numbers' are in 1000s of bytes per second processed.
 type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
 md2                191.28k      416.56k      594.54k      669.39k      694.69k
 mdc2                 0.00         0.00         0.00         0.00         0.00 
 md4               1474.90k     4844.48k    14888.78k    31197.21k    45481.58k
 md5               1244.85k     3848.46k    11420.27k    22446.76k    31538.55k
 hmac(md5)         2290.54k     7025.94k    17327.35k    27089.28k    32456.15k
 sha1              1132.26k     3735.04k     9860.57k    16808.72k    21278.19k
 rmd160             976.98k     2084.74k     5708.16k    10091.76k    13018.24k
 rc4              24469.53k    28034.36k    29170.18k    29575.20k    32749.58k
 des cbc           5143.12k     5451.23k     5583.29k     5581.91k     5538.80k
 des ede3          1971.89k     2033.20k     2048.46k     2053.17k     2046.05k
 idea cbc             0.00         0.00         0.00         0.00         0.00 
 rc2 cbc           4252.32k     4455.42k     4504.89k     4511.40k     4526.90k
 rc5-32/12 cbc        0.00         0.00         0.00         0.00         0.00 
 blowfish cbc     10538.53k    11673.73k    11947.84k    12037.66k    12055.64k
 cast cbc          6999.28k     7589.40k     7779.00k     7857.92k     7838.32k
 aes-128 cbc       7389.42k     7461.10k     7517.71k     7547.04k     7516.06k
 aes-192 cbc       6104.28k     6524.40k     6545.12k     6552.58k     6614.86k
 aes-256 cbc       6524.83k     6840.53k     6909.76k     6917.83k     6958.36k
                   sign    verify    sign/s verify/s
 rsa  512 bits   0.0082s   0.0008s    121.6   1225.4
 rsa 1024 bits   0.0453s   0.0025s     22.1    393.3
 rsa 2048 bits   0.2917s   0.0088s      3.4    113.2
 rsa 4096 bits   2.0127s   0.0321s      0.5     31.1
                   sign    verify    sign/s verify/s
 dsa  512 bits   0.0074s   0.0091s    135.7    109.8
 dsa 1024 bits   0.0241s   0.0300s     41.5     33.4
 dsa 2048 bits   0.0843s   0.1054s     11.9      9.5