Is it possible to decrypt MD5 hashes?

前端 未结 24 2311
北荒
北荒 2020-11-21 06:22

Someone told me that he has seen software systems that:

  1. retrieve MD5 encrypted passwords from other systems;
  2. decrypt the encrypted passwords and
24条回答
  •  天涯浪人
    2020-11-21 06:49

    Technically, it's 'possible', but under very strict conditions (rainbow tables, brute forcing based on the very small possibility that a user's password is in that hash database).

    But that doesn't mean it's

    • Viable
      or
    • Secure

    You don't want to 'reverse' an MD5 hash. Using the methods outlined below, you'll never need to. 'Reversing' MD5 is actually considered malicious - a few websites offer the ability to 'crack' and bruteforce MD5 hashes - but all they are are massive databases containing dictionary words, previously submitted passwords and other words. There is a very small chance that it will have the MD5 hash you need reversed. And if you've salted the MD5 hash - this won't work either! :)


    The way logins with MD5 hashing should work is:

    During Registration:
    User creates password -> Password is hashed using MD5 -> Hash stored in database

    During Login:
    User enters username and password -> (Username checked) Password is hashed using MD5 -> Hash is compared with stored hash in database

    When 'Lost Password' is needed:

    2 options:

    • User sent a random password to log in, then is bugged to change it on first login.

    or

    • User is sent a link to change their password (with extra checking if you have a security question/etc) and then the new password is hashed and replaced with old password in database

提交回复
热议问题