In this next post we will take a quick look at various openssl tips and tricks, starting with the means to benchmark your systems speed for hash computations.
Openssl allows for you compute the performance using set size blocks and the result speed. You can specify the hash type that your trying to test.
( sha1)
sh-3.2$ openssl speed sha1
To get the most accurate results, try to run this
program when this computer is idle.
Doing sha1 for 3s on 16 size blocks: 6611488 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 4866401 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 2713480 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 978991 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 140037 sha1's in 3.00s
OpenSSL 0.9.8r 8 Feb 2011
built on: Jun 22 2012
options:bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) blowfish(ptr2)
compiler:
-arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings
-fasm-blocks -O3 -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN
-DMD32_REG_T=int -DOPENSSL_NO_IDEA -DOPENSSL_PIC -DOPENSSL_THREADS
-DZLIB -mmacosx-version-min=10.6
available timing options: TIMEB 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
sha1 35275.61k 103884.98k 231583.56k 334159.59k 382361.99k
sh-3.2$
and now md5
(md5)
sh-3.2$ openssl speed md5
To get the most accurate results, try to run this
program when this computer is idle.
Doing md5 for 3s on 16 size blocks: 6481795 md5's in 3.00s
Doing md5 for 3s on 64 size blocks: 5063089 md5's in 3.00s
Doing md5 for 3s on 256 size blocks: 2923746 md5's in 3.00s
Doing md5 for 3s on 1024 size blocks: 1089206 md5's in 3.00s
Doing md5 for 3s on 8192 size blocks: 158854 md5's in 3.00s
OpenSSL 0.9.8r 8 Feb 2011
built on: Jun 22 2012
options:bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) blowfish(ptr2)
compiler:
-arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings
-fasm-blocks -O3 -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN
-DMD32_REG_T=int -DOPENSSL_NO_IDEA -DOPENSSL_PIC -DOPENSSL_THREADS
-DZLIB -mmacosx-version-min=10.6
available timing options: TIMEB 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
md5 34567.84k 108011.70k 249472.95k 371762.61k 433800.60k
sh-3.2$
If you run the cmd with no hash method specified, it will walk thru all of the hash methods supported;
( output shorten for obvious reasons )
sh-3.2$ openssl speed
To get the most accurate results, try to run this
program when this computer is idle.
Doing md2 for 3s on 16 size blocks: 444187 md2's in 3.00s
Doing md2 for 3s on 64 size blocks: 228510 md2's in 3.00s
Doing md2 for 3s on 256 size blocks: 77796 md2's in 3.00s
Doing md2 for 3s on 1024 size blocks: 21382 md2's in 3.00s
Doing md2 for 3s on 8192 size blocks: 2753 md2's in 3.00s
Doing mdc2 for 3s on 16 size blocks: 2369292 mdc2's in 3.00s
Doing mdc2 for 3s on 64 size blocks: 657315 mdc2's in 3.00s
Doing mdc2 for 3s on 256 size blocks: 168804 mdc2's in 3.00s
Doing mdc2 for 3s on 1024 size blocks: 42587 mdc2's in 3.00s
Doing mdc2 for 3s on 8192 size blocks: 5338 mdc2's in 3.00s
Doing md4 for 3s on 16 size blocks: 8357016 md4's in 3.00s
Doing md4 for 3s on 64 size blocks: 6830724 md4's in 3.00s
Doing md4 for 3s on 256 size blocks: 4297857 md4's in 3.00s
Doing md4 for 3s on 1024 size blocks: 1733698 md4's in 3.00s
Doing md4 for 3s on 8192 size blocks: 263225 md4's in 3.00s
Doing md5 for 3s on 16 size blocks: 6666231 md5's in 3.00s
Doing md5 for 3s on 64 size blocks: 5145271 md5's in 3.00s
Doing md5 for 3s on 256 size blocks: 2962906 md5's in 3.00s
Doing md5 for 3s on 1024 size blocks: 1098573 md5's in 3.00s
Doing md5 for 3s on 8192 size blocks: 160164 md5's in 3.00s
Doing hmac(md5) for 3s on 16 size blocks: 7285347 hmac(md5)'s in 3.00s
Doing hmac(md5) for 3s on 64 size blocks: 5488568 hmac(md5)'s in 3.00s
Doing hmac(md5) for 3s on 256 size blocks: 3071065 hmac(md5)'s in 3.00s
Doing hmac(md5) for 3s on 1024 size blocks: 1116618 hmac(md5)'s in 3.00s
Doing hmac(md5) for 3s on 8192 size blocks: 160548 hmac(md5)'s in 3.00s
Doing sha1 for 3s on 16 size blocks: 6620368 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 4863945 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 2707978 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 980245 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 140349 sha1's in 3.00s
Doing sha256 for 3s on 16 size blocks: 4367748 sha256's in 3.00s
Doing sha256 for 3s on 64 size blocks: 2594433 sha256's in 3.00s
Doing sha256 for 3s on 256 size blocks: 1166012 sha256's in 3.00s
Doing sha256 for 3s on 1024 size blocks: 364956 sha256's in 3.00s
Doing sha256 for 3s on 8192 size blocks: 49342 sha256's in 3.00s
Doing sha512 for 3s on 16 size blocks: 3240386 sha512's in 3.00s
Doing sha512 for 3s on 64 size blocks: 3225174 sha512's in 3.00s
Doing sha512 for 3s on 256 size blocks: 1414777 sha512's in 3.00s
Doing sha512 for 3s on 1024 size blocks: 526105 sha512's in 3.00s
Doing sha512 for 3s on 8192 size blocks: 76704 sha512's in 3.00s
Doing rmd160 for 3s on 16 size blocks: 5852085 rmd160's in 3.00s
Doing rmd160 for 3s on 64 size blocks: 4049177 rmd160's in 3.00s
Doing rmd160 for 3s on 256 size blocks: 2107866 rmd160's in 3.00s
Doing rmd160 for 3s on 1024 size blocks: 723159 rmd160's in 3.00s
Doing rmd160 for 3s on 8192 size blocks: 101501 rmd160's in 3.00s
Doing rc4 for 3s on 16 size blocks: 67246325 rc4's in 3.00s
Doing rc4 for 3s on 64 size blocks: 17455067 rc4's in 3.00s
Doing rc4 for 3s on 256 size blocks: 4399092 rc4's in 3.00s
Doing rc4 for 3s on 1024 size blocks: 1106588 rc4's in 3.00s
Doing rc4 for 3s on 8192 size blocks: 137222 rc4's in 3.00s
Doing des cbc for 3s on 16 size blocks: 11800654 des cbc's in 3.00s
Doing des cbc for 3s on 64 size blocks: 3038789 des cbc's in 3.00s
I hope this information was helpful.
Ken Felix
Freelance Network/Security Engineer
No comments:
Post a Comment