Is there any way to decrypt the encrypted MD5 string, given the key?
-
8encrypted with what? md5 is hashing, not encrypting. – SilentGhost Oct 13 '09 at 18:25
-
MD5 hash is a one-way function. – Andrey Vlasovskikh Oct 13 '09 at 18:46
-
2While the premise of the question is flawed (A hash is "a one way trip" i.e. it is `not a bijective function`, and also it doesn't involve a key, only an input message) the responses go beyond stating that "this is not what a hash is for" and explore ways of finding messages that satisfy one particular hash value, and ways of protecting against `dictionary/brute-force` attacks with the use of `salt`. Interesting ! – mjv Oct 13 '09 at 18:59
-
@mjv not being bijective is not the property that makes md5 a "cryptographic hash function". for instance f = x*x is not bijective but it is not "a one way trip" because if i said that f(x)=4 you would know that x would either be -2 or 2 that does not happen with cryptographic hashing functions. hope i was clear ;) – João Portela Oct 13 '09 at 22:21
-
7Why downvote this question? Sure, he didn't understand what MD5 is in the first place, but the question is still valid. – ibz Dec 15 '09 at 02:44
-
2I agree @ibz. Plus, hashing is encrypting too. The hash value is cryptographic and the correct term for this "hashing" is actually "cryptographic hashing". – cregox May 04 '10 at 22:12
5 Answers
MD5 is a one-way hash. It cannot be decrypted. The closest thing to decrypting an MD5 hash would be to do a lookup against a pre-generated rainbow table. Also, I'm not sure what you mean by "I have the key". There is no "key" in an MD5 hash. Perhaps you are thinking of a salt? If your data has a salt value incorporated prior to hashing, the rainbow table approach probably won't be practical anyway.
Try Google (see Using Google To Crack MD5 Passwords) or an online DB of MD5 hashes like md5(); or GDATA (the last one contains 1,133,766,035 unique entries).

- 562,542
- 136
- 1,062
- 1,124
MD5 is not a encryption algorithm, it is a hashing algorithm. Read up on MD5 and Crytographic Hash Functions.
To create a MD5 hash of a string in Python you do as follows:
import hashlib
m = hashlib.md5()
m.update("String to Hash")
echo m.digest()
# '\xed\xa5\x8bA-nU\xa2\xee\xbb[_s\x130\xbd'
echo m.hexdigest() # its more common to show hashes as a hex string
# 'eda58b412d6e55a2eebb5b5f731330bd'

- 30,738
- 21
- 105
- 131

- 5,607
- 6
- 28
- 52
Message-Digest algorithm 5 is a widely-used cryptographic hash function with a 128-bit hash value. Encryption has 2 way : encrypt - decript, hash has one way - there is no decryption possible. BUT with database hash IS POSSIBLE to solve this issue.
See this sites :
www.rednoize.com – 50,709,274 Hash in database
www.md5oogle.com – 6,353,625 Hash in database
www.hashmash.com – 1,611,191 Hash in database
www.gdataonline.com 1,155,613 Hash in database
www.md5decryption.com – 872,145 Hash in database
www.md5decrypter.com – 583,441 Hash in database
www.md5decrypter.co.uk – 41,568,541 Hash in database
www.macrosoftware.ro – 5,403 Hash in database

- 20,112
- 21
- 72
- 113

- 1,364
- 27
- 48
MD5 is an asymmetric hash -- not an encryption mechanism. You can't "decrypt" an MD5. If you know the hashed contents are limited to a (short) set of possibilities, you can use a Rainbow Table to attempt to brute-force reverse the hash, but this will not work in the general case.

- 26,009
- 8
- 71
- 83