Sha1 fast feature (Linux, up to 2 GB files)

Is there any linux command line implementation that works fine for generating sha1 in large files (<2GB)?

I played with 'openssl sha1' and it takes a few minutes to get the sha1 file for a 2GB file: /.

+3
source share
5 answers

I do not think that the SHA algorithm can be optimized for size, since it works with blocks of fixed size, and the calculation cannot be performed in parallel. It seems that the fastest implementation in a small file will also be the fastest in a large file.

+3
source

1 , :

sha1sum: 3.92s
openssl sha1: 3.48s
python hashlib.sha1: 3.22s

, sha1 2

- , . , , "openssl sha1" 20 . - ?

+7

, /. SHA1 Core Duo 2,0 /dev/zero 100 / - , , , .

, ( ).

+3

sha1, , Sha512sum ,

+3

sha1sum - , SHA-1... , , , . 2GB , , : - (

EDIT: ISO-, , - - , , . , , openssl , sha1sum...

+1

Source: https://habr.com/ru/post/1704702/


All Articles