SHA-1 prototype » History » Version 1
Greg Burri, 06/21/2009 02:50 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 | file : |
||
| 33 | speed : |
||
| 34 | |||
| 35 | <pre> |
||
| 36 | <gburri@overnux:~/code/project/aybabtu/prototypes/01_SHA1 $> |
||
| 37 | </pre> |