MD5 Hash, What is it and how do I encrypt/decrypt one?

The search button didn't return anything useful

Page 1 of 1

3 Replies - 7674 Views - Last Post: 25 March 2008 - 11:27 AM Rate Topic: -----

#1 devilsson2010  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 46
  • Joined: 02-January 08

MD5 Hash, What is it and how do I encrypt/decrypt one?

Posted 24 March 2008 - 07:29 PM

My question is what is and MD5 Hash and how do i encrypt/decrypt one. My idea is to make something similar to the rainbow tables (it's like brute force hacking except it can hack a 14 digit password in 1 minute flat). It uses premade hashes from a gigantonormous list and compares it to the hash that was given. I already made a program that makes a super ginormous list of words from all of the characters I have on my keyboard (a-z, A_Z, 0-9 and special characters like !@~`'><./$%*^$). The next step is to take that list of words and encrypt them to a seperate file to compare the given hash to. The only problem is that I don't know how to encrypt or decrypt an MD5 hash, or any other hash for that matter. Any explanation/help/tutorials/links/anything would be great, thanks.

Incase you wanted to know, this is my pseudocode for the encrypter that takes a given word and encrypts it.

Open list of words.
In a for loop, encrypt each word.
Write the encrypted word to another file that has the corresponding word on the same line on another file. (so say the word cat in on line 60 in the word list, and its encrpyted value is 03473827209384, then the 03473827209384 is on line 60 in another file so the program can easily find its matching word)

And when someone wants to decrypt a hash:

Take given hash.
Open list of words and encrypted list of words.
Compare the hash to the encrypted words.
If the given hash matches a hash in the list of encrypted words then get the word that is on the same line in the list of words. (so if the given hash is found to match a hash on line 114, then get the word from line 114 from the decrypted words and that is the decrypted hash)
Output the word to the user.

Again, any info/tutorials/help/links would be great, thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: MD5 Hash, What is it and how do I encrypt/decrypt one?

#2 no2pencil  Icon User is online

  • Professor Snuggly Pants
  • member icon

Reputation: 6556
  • View blog
  • Posts: 30,697
  • Joined: 10-May 07

Re: MD5 Hash, What is it and how do I encrypt/decrypt one?

Posted 24 March 2008 - 07:58 PM

View Postdevilsson2010, on 24 Mar, 2008 - 07:29 PM, said:

My question is what is and MD5 Hash and how do i encrypt/decrypt one.

Again, any info/tutorials/help/links would be great, thanks.


MD5 wiki
Was This Post Helpful? 0
  • +
  • -

#3 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2255
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: MD5 Hash, What is it and how do I encrypt/decrypt one?

Posted 24 March 2008 - 09:38 PM

MD5 is a hash... it is a "one way hash" which means that you are not supposed to be able to "decrypt" it. Thats kinda the point.

Unlike a cypher or encryption a one way hash generally contains less information then the original message -- this ensures that we can't use the hash to get the message. However it is possible that two different messages might cause the same hash -- this is called collision. No one currently really knows how to find the original message from the hash, but there are ways to find a collision (another message that will generate the same hash).

This might be useful if you were trying to change a document signed with a hash value. You would want to know how you would have to salt (add inconspicuous data) to the changed message to generate the same hash.
Was This Post Helpful? 0
  • +
  • -

#4 devilsson2010  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 46
  • Joined: 02-January 08

Re: MD5 Hash, What is it and how do I encrypt/decrypt one?

Posted 25 March 2008 - 11:27 AM

View PostNickDMax, on 24 Mar, 2008 - 09:38 PM, said:

MD5 is a hash... it is a "one way hash" which means that you are not supposed to be able to "decrypt" it.


Aww. But then how do rainbow tables work? Don't they decrypt the given hash? Also, if they're one way encryptions then how do brute force/dictionary attacks work?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1