Project

General

Profile

SHA-1 prototype » History » Revision 4

Revision 3 (Greg Burri, 06/21/2009 06:10 PM) → Revision 4/7 (Greg Burri, 06/21/2009 07:30 PM)

h1. SHA-1 prototype 

 directory : source:/prototypes/01_SHA1 

 h2. Goals 

 * Compute the SHA-1 of each part of a given file. 
 * Compute the SHA-1 of a stream. 
 * Find the fastest way to compute SHA1, should be at least 40 MB/s. 

 h2. Speed measures 

 file : @01.wmv@ : 17'639'245 byte ~ 17Mo (buffered) 
 Each measurement is pre-runned once to put the file in cache. 


 h3. _sha1sum_ from _GNU coreutils_ (Reference) 

 speed : 57 MB/s 

 <pre> 
 <gburri@overnux:~/code/lang/haskell/SHA1$> time sha1sum < 01.wmv 
 3aec84601612e8c604ac01971e0ecd9d536dbead    - 

 real      0m0.301s 
 user      0m0.276s 
 sys       0m0.020s 
 </pre> 

 h3. QCryptographicHash 

 speed : 49 47 MB/s 

 <pre> 
 <flynux:~/code/projects/aybabtu/prototypes/01_SHA1 <flynux:~/code/projects/aybabtu/prototypes/01_SHA1/qt_sha1 $> time ./qt_sha1 all 01.wmv  
 3aec84601612e8c604ac01971e0ecd9d536dbead 

 ../01.wmv 
 "3aec84601612e8c604ac01971e0ecd9d536dbead"  

 real      0m0.340s 0m0.353s 
 user      0m0.324s 
 sys       0m0.016s 0m0.028s 
 </pre>