MySQL 如何在 md5() 中解密加密的密码?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7015773/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to decrypt the encrypted password in md5()?
提问by Manikandan Thangaraj
Possible Duplicate:
Is it possible to decrypt md5 hashes?
可能的重复:
是否可以解密 md5 哈希?
I have encrypt the password using the MySQL function md5(),
我已经使用 MySQL 函数 md5() 加密了密码,
I need to decrypt the password,
我需要解密密码,
Any one can help.
任何人都可以提供帮助。
Thanks.
谢谢。
回答by Dor
MD5() generates a hash, not an encryptedstring. Thus you can't decrypt it in principle. But studies shown that MD5 is hackable, but it seems too complicated to study.
From "MD5 considered harmful today" @ http://www.win.tue.nl/hashclash/rogue-ca/:
MD5() 生成一个hash,而不是一个加密的字符串。因此原则上你不能解密它。但研究表明,MD5 是可破解的,但研究起来似乎太复杂了。
来自“今天被认为有害的 MD5”@ http://www.win.tue.nl/hashclash/rogue-ca/:
The cryptographic operation that uses a private key to sign data does not deal directly with the data itself, but with a purportedly unique representation of this data, that has a predetermined fixed length, is short and therefore convenient to work with. This can be compared to a fingerprint as a purportedly unique, short and convenient representation of a human being. The process of creating such short representations of data is called "hashing". Unfortunately, because of the fixed length of the hash, there must exist pairs of different inputs that yield the same hash value. Good hash functions, however, have the property that finding such pairs is extremely difficult, even though they are guaranteed to exist. This is precisely where MD5 has a crucial weakness.
使用私钥对数据进行签名的加密操作不直接处理数据本身,而是使用该数据的据称唯一的表示形式,具有预定的固定长度,很短,因此使用起来很方便。这可以与指纹进行比较,据称是人类的独特、简短和方便的表示。创建这种简短的数据表示的过程称为“散列”。不幸的是,由于散列的长度是固定的,因此必须存在产生相同散列值的不同输入对。然而,好的散列函数具有这样一个特性,即找到这样的对是极其困难的,即使它们肯定存在。这正是 MD5 的一个关键弱点。
回答by driis
MD5 is not encryption, it is a one-way hash. This means that there is no way of going back to the original password given the hashvalue (other than brute-force or a rainbow table attack).
MD5 不是加密,它是一种单向散列。这意味着给定散列值(除了蛮力或彩虹表攻击),没有办法返回到原始密码。
There is a longer, very good explanation, in this similar question and answer.
在this similar question and answer中有一个更长的很好的解释。
回答by jepes
In theory, MD5 cannot be decrypted. In practice, there are many MD5 "decrypters", but they use brute force, or large database of already decrypted code etc... The answerer above probably used one of these. The number of possible combinations is a 1 followed by 48 zeros... enough for a life time.
理论上,MD5无法解密。在实践中,有许多 MD5“解密器”,但它们使用蛮力,或已解密代码的大型数据库等......上面的回答者可能使用了其中之一。可能的组合数是 1 后跟 48 个零......足够一生。
Source: http://md5pass.com
来源:http: //md5pass.com
回答by Shawn D.
MD5 isn't an encryption algorithm. It's a one-way hash algorithm, so without an attack, you're not supposed to be able to get the password from the MD5 hash.
MD5 不是加密算法。这是一种单向散列算法,因此如果没有攻击,您将无法从 MD5 散列中获取密码。
The idea is that you generate a hash from the password, and then when provided with the password you can confirm that it hashes to the same value. You're not supposed to be able to go the other way.
这个想法是你从密码生成一个散列,然后当你提供密码时,你可以确认它散列到相同的值。你不应该走另一条路。
回答by álvaro González
The best reasonably simple way is to search the hash in Google. E.g.:
最好的合理简单的方法是在 Google 中搜索哈希。例如: