Database storage security (md5+ salt) encryption

Source: Internet
Author: User
Tags md5 sha1 hash

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.