Analysis on the encryption principle of antiy password Mixer

Source: Internet
Author: User

Jiang haike (Chief Technical architect of antian Lab)'s "encryption policies for password fields from database theft attacks" briefly lists the commonProgramAnd some recommended security encryption policies. At the same time, he also mentioned the antiy password mixer developed by the CERT Lab (which is a common cryptographic Toolkit) for developers to choose.

Currently, only Python versions are available. php and Ruby versions will be available in the future. If you need C/C ++ or other language versions, you will be charged.
After a brief look at the source code, the principle is similar to what we imagined:

The ciphertext uses the"Sha256 (username + 32-bit random salt + plaintext password)", And then stored in Kyoto Cabinet (the predecessor of TC) together with salt and the extended Information encrypted by RSA ).

If the plaintext of the password is hard to be stored, the RSA public key will be used to encrypt "salt + plaintext of the password" and then stored in KC. If necessary, the private key can be used to solve the plaintext of the password.

In additionAlgorithmFor example, the hash algorithm does not select common MD5 and sha1, but selects 256bit sha256. The RSA key certificate uses a long 4096-bit value.

After figuring out the principles, you can implement them flexibly in your own projects :)

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.