<div dir="ltr">My post from Jul 28th to this same list:<div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">I hashed a 2GB file 100 times with each of the digests available via openssl, for a total of 1000 runs.</span><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Average elapse time , seconds:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
<div><span class="">md5</span> Average = 0.7401 <------THIS is the fastest</div><div>mdc2 Average = 46.8681</div><div>rmd160 Average = 2.2449</div><div>sha Average = 4.06665</div><div><span class="">sha1</span> Average = 1.3751 <- close second.</div>
<div>sha224 Average = 3.6005</div><div>sha256 Average = 3.6019 <-</div><div>sha384 Average = 6.7991</div><div>sha512 Average = 6.8885</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div>
<div style="font-family:arial,sans-serif;font-size:13px">I shuffled the runs hoping to "even out" caching.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
crappy little low power Intel(R) Atom(TM) CPU 230 @ 1.60GHz</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Also:</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px"><a href="http://stackoverflow.com/questions/157998/whats-the-difference-between-sha-and-md5-in-php">http://stackoverflow.com/questions/157998/whats-the-difference-between-sha-and-md5-in-php</a><br>
</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">As an aside I'd like to suggest looking into ZFS, a files system that ensures that data is not corrupt on disk, and can transparently check and recover from "bit rot".</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Linux implementation of ZFS are not quite production ready but BSD and Solaris offspring are. There are great "Storage applinaces" that allow you to get at the greatness of ZFS without too much trouble:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">That I know of and have used:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div>
<div style="font-family:arial,sans-serif;font-size:13px">FreeNAS (BSD Based)</div><div style="font-family:arial,sans-serif;font-size:13px">and</div><div style="font-family:arial,sans-serif;font-size:13px">Nexenta (Open Indiana based)</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">David</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 30, 2013 at 11:13 AM, William Park <span dir="ltr"><<a href="mailto:opengeometry-FFYn/CNdgSA@public.gmane.org" target="_blank">opengeometry@yahoo.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I would like to do some kind of "checksum" on files (full or partial<br>
content) in order to catch unwanted changes (accidental or malicious).<br>
How would you do it?<br>
<br>
So far, I found<br>
- MD/SHA digests from OpenSSL -- I'm worried about speed, and being<br>
dependent on yet another library.<br>
- crypt() from glibc -- It can do MD5/SHA, but it has to be a single<br>
string. It can't do multiple strings.<br>
<br>
Is there user-callable CRC routines in glibc? Curiously, I can't find<br>
one, even though I'm told that TCP stack uses it internally.<br>
<span class="HOEnZb"><font color="#888888">--<br>
William<br>
--<br>
The Toronto Linux Users Group. Meetings: <a href="http://gtalug.org/" target="_blank">http://gtalug.org/</a><br>
TLUG requests: Linux topics, No HTML, wrap text below 80 columns<br>
How to UNSUBSCRIBE: <a href="http://gtalug.org/wiki/Mailing_lists" target="_blank">http://gtalug.org/wiki/Mailing_lists</a><br>
</font></span></blockquote></div><br></div>