##The encryption technology we use in php website development is MD5, so using theMD5 encryption algorithm can Is it crackable or is md5 encryption reversible? Let’s first take a look at two commonly used PHP data encryption technologies.PHP data encryption technology
Algorithm call:
string md5 ( string $str [, bool $raw_output = false ] )
##string Sha1 ( string $str [, bool $raw_output = false ] )
Parameters
str
Raw string.
raw_output
##If the optional raw_output is set to TRUE, then the MD5 report The text summary will be returned in raw binary format with a length of 16 bytes.
Return value
##MD5() in the form of a 32-character hexadecimal number Returns the hash value.
Sha1() returns the hash value as a 40-character hexadecimal number.
##
##$p=
"123456";echomd5
($p);?>
The output is as follows:
##e10adc3949ba59abbe56e057f20f883e
But it is very unsafe to use the md5() function in this way. In this case, you can search for md5 decryption on Baidu. You will find a decrypted website:
##
It can be seen that it is unsafe to use the md5() function directly as above. Although themd5 algorithm is irreversible, because the result it calculates for the same characterstring is unique, some people may use "dictionary attacks" to break md5 encryption system. Although this is a brute force decryption, it is very effective because the user passwords of most systems are not very long so the final data encoded by our md5 can be cracked through some websites:
Obviously, it has been cracked. It is not complicated enough to use the md5() algorithm directly, and then the code Modify as follows:
##$p="123456";
##echomd5(md5($p).md5($p));
?>
efd52a4f82c94f80f13671ebd7cd2a6d
# Go to the website to crack:
Obviously, his result is wrong, our password is 123456 and not zero.
We can encrypt through multi-layer md5() algorithm based on an md5() function, because it is one-way, maybe you are wondering why the website can be cracked, in fact the website The best is brute force cracking. They constantly save various codes and passwords and then match them to finally get the password.
For details
MD5 cracking methodPlease refer to:php md5 decryption code sharing (attached interface, available for personal testing)Related articles:
Can php md5 be decrypted?
php md5 encryption and decryption algorithm and tools (with code)
The above is the detailed content of Can php md5 encryption be cracked?. For more information, please follow other related articles on the PHP Chinese website!