Bcrypt for password hashing because it is slow?

前端 未结 4 2246
闹比i
闹比i 2021-02-20 13:54

I read today on not-implemented.com :

Sha-256 should be chosen in most cases where a high speed hash function is desired. It is considered secure with no

4条回答
  •  长发绾君心
    2021-02-20 14:27

    Brute force a hash password?. It's easy to say than done.

    If the passwords are not using a SALT then it is possible to break it, no matter the kind of encryption (because we could use a dictionary / pre-calculated hash attack).

    The speed of the algorithm means nothing, it's just a myth that some people are spreading for the wrong reasons.

    For example the next example:

    Our hash is generated with the next formula:

     MD5(SALT+MD5(SALT+VALUE))
    

    Even if we could generate every possible combination of md5 in a split of a second, how we know if we found the right value?. And the answer is no, it's not possible. MD5 (or sha) doesn't check if the value is right or not, it simply generates a sequence of values and nothing more.

    We could try a force brute attack if and only if we have a way to determine if our hash generated match some criteria. These criteria could be a dictionary and it means a slow process too and only if we could find some criteria.

提交回复
热议问题