How can there be SHA encryption?

Duplicate:

Confused on hashes


How does SHA encryption create a unique 40-character hash character for any string when there are n infinite number of possible input strings, but only a finite number of 40 hash characters?

+3
source share
9 answers

To find out about jdigital answer:

Since this is a hashing algorithm and not an encryption algorithm, there is no need to cancel the operation. This, in turn, means that the result does not have to be unique; there are (theoretically) in an infinite number of lines that will lead to the same hash. However, finding out which ones are almost impossible.

+3
source

SHA , .

​​

+23

, - 40 - , .

, . 40 - , , .

+8

SHA - 40 . , ( , ). SHA - , , , .

+5

-, SHA-1 SHA-2, "" . (), . , , .

, , . , .

+2

, - 40 . , , , , .

, , - , , , . , , , .

, . , , . SHA-1, , ( 2000 , ); MD5 , , MD5, , , , . ; (, SHA-1), , .

+2

:

hash1 = SHA1(plaintext1)
hash2 = SHA1(plaintext2)

hash1 hash2 . . , , .

, :

plaintext1 = SHA1-REVERSE(hash1)

. , , , , . . 1024 . 40 . 1024 40 - . (, , , ....)

, 40 , SHA256 - . . .

, : -, , . (, ), (DES, AES, public-private key .) .

ZERO , - -, ./ .

+2

. , .

0

The simple answer is: it does not create unique hashes. Look at the Pridgeonhole priciple . It is so unlikely that there will be a clash that no one has ever found.

0
source

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


All Articles