Sec, blogmal! - tidbits - md5

Categories:

Everything

September '17

FrFrFrFrFrFrFr
28293031123
45678910
11121314151617
18192021222324
2526272829301

Archive:

Mon, 29 Aug 2005

md5 speed on FreeBSD

Someone on IRC talked about how md5 seemed so slow to him. To which I answered on a whim that he could try openssl md5 to see if it was faster.

A few moments later, I realized this might really be true, so I did an (completely unscientific) test:

First check /sbin/md5 speed:

ice:~>md5 -t
MD5 time trial. Digesting 100000 10000-byte blocks ... done
Digest = 766a2bb5d24bddae466c572bcabca3ee
Time = 16.492340 seconds
Speed = 60751261.054943 bytes/second

Then openssl md5 speed:

ice:~>openssl speed | grep -E 'md5 .* 1024'
Doing md5 for 3s on 1024 size blocks: 210230 md5's in 3.00s

Ok, that makes (210230×1024 / 3) bytes/second. Les see....

ice:~>dc
210230 1024 * 3 / p
71758506
60751261 4k / p
1.1811

Wow. Openssl md5 is 18% faster. A short test with an 700MB file resulted in 26.6 vs 21.4 seconds (best of three), which sort of proves the difference.


posted at: 18:32 | Category: /tidbits | permanent link to this entry | 0 comments (trackback)
 

Your Comment
 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comment:
Save my Name and URL/Email for next time
(Note that comments will be rejected unless you enter 42 in the following box: )

powered by blosxom
in 0.00 s