Hash (hash ()) vs salt hash

Since introducing Rainbow tables and using only hashed passwords (ex: MD5) for stored passwords in a database is not the best secure way .

When people talk about salty hashes, always use it that way hash(password . salt)or even hash(hash(password) . salt).

I don’t know why to use salt and add an extra entry for each password to store salt? Why don't we just use hash(hash(password))or even hash(hash(hash(password)))?

Is it safer to place salt? or just a feeling more complicated?

+3
source share
8 answers

( (pwd)) , (pwd) ( , ), . , , , .

( ) . , , , .

+23

, .

8 , 100 000 000 . , . " -", 100 000 000 - .

, 4- . 100 000 000 1 000 000 000 000... 10 000 , 3 .

, , , , .

EDIT: , , , 100 000 000 . , . 100 000 000 , , . , . , : , . , .

+12

, , . , , : hash(hash(password)).

, , , . , .

- , . :

function hashPassword(password, salt) {
    result = hash(salt . password)
    for (i = 0; i < 1000; i++) {
        result = hash(salt . result)
    }
    return result
}

1000 . , , - - . 1000- , 100 . 18 , 2000.

, . , .

+6

. .

, . , , , PBKDF2

, - .

+3

, . , , , , . , , .

0

Rainbow .

0

- , . ( ) . , . , , , , .

0

- . , , .

, , . ( ).

, , -. , .

stackoverflow , . . PHP.

-1

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


All Articles