General system Database Password encryption method:
- MD5 after the database is saved
- SHA1 Hash after deposit into the database
disadvantage: Hackers can be password brute force to obtain password information, the practice is to hash the common password after making a dictionary,
When cracked, only need to look up the dictionary to know the corresponding plaintext password.
Recommendation: Use the following two password policies in a combination of ways to solve
- Password + salt (a bunch of random numbers) and hash
- Limit password minimum length and password complexity
Explanation: After adding a random number to each password, the password is actually artificially extended to n bits, resulting in a large increase in password length,
Makes it difficult for attackers to construct such a large dictionary to crack. Step back, even if the attacker's dictionary is strong enough but brute force
This risk is reduced by the amount of time it takes to take too long.
Or that sentence, there is no absolute security. The above suggestions may not be perfect, follow up with new insights and continue to update this article,
Or which expert can give a more advanced password-safe storage method.
Common hash algorithms,MD5 and SHA-1
Database storage security (md5+ salt) encryption