Project

General

Profile

SHA-1 prototype » History » Version 4

Greg Burri, 06/21/2009 07:30 PM

1 1 Greg Burri
h1. SHA-1 prototype
2
3
directory : source:/prototypes/01_SHA1
4
5
h2. Goals
6
7
* Compute the SHA-1 of each part of a given file.
8
* Compute the SHA-1 of a stream.
9
* Find the fastest way to compute SHA1, should be at least 40 MB/s.
10
11
h2. Speed measures
12
13
file : @01.wmv@ : 17'639'245 byte ~ 17Mo (buffered)
14
Each measurement is pre-runned once to put the file in cache.
15
16
17
h3. _sha1sum_ from _GNU coreutils_ (Reference)
18
19
speed : 57 MB/s
20
21
<pre>
22
<gburri@overnux:~/code/lang/haskell/SHA1$> time sha1sum < 01.wmv
23
3aec84601612e8c604ac01971e0ecd9d536dbead  -
24
25
real    0m0.301s
26
user    0m0.276s
27
sys     0m0.020s
28
</pre>
29
30
h3. QCryptographicHash
31
32 4 Greg Burri
speed : 49 MB/s
33 1 Greg Burri
34
<pre>
35 4 Greg Burri
<flynux:~/code/projects/aybabtu/prototypes/01_SHA1 $> time ./qt_sha1 all 01.wmv 
36
3aec84601612e8c604ac01971e0ecd9d536dbead
37 2 Greg Burri
38 4 Greg Burri
real    0m0.340s
39 2 Greg Burri
user    0m0.324s
40 4 Greg Burri
sys     0m0.016s
41 1 Greg Burri
</pre>