![]() |
|
|
#1 |
|
Regular Member (100+)
Join Date: Dec 2006
Location: At home
Posts: 141
Thanks: 46
Thanked 3 Times in 3 Posts
Rep Power: 3
![]() |
What's a MD5 hash???
What's a MD5 hash???
__________________
Hell begins on the day God grants us a clear vision of all that we might have achieved, of all the gifts which we have wasted, of all that we might have done which - we did not do - |
|
|
|
|
|
#2 |
|
(ψ)=ΘΊΧφ
![]() |
Re: What's a MD5 hash???
MD5
MD5 (Message-Digest algorithm 5) is a widely used cryptographic hash function with a 128-bit hash value. An MD5 hash is typically a 32-character hexadecimal number.
__________________
Please don't click here |
|
|
|
|
|
#3 |
|
Regular Member (100+)
Join Date: Dec 2006
Location: At home
Posts: 141
Thanks: 46
Thanked 3 Times in 3 Posts
Rep Power: 3
![]() |
Re: What's a MD5 hash???
And how do i use it to verify files?
__________________
Hell begins on the day God grants us a clear vision of all that we might have achieved, of all the gifts which we have wasted, of all that we might have done which - we did not do - |
|
|
|
|
|
#4 |
|
Founder
![]() Join Date: Nov 2005
Location: The Last City Zion!
Posts: 2,684
Thanks: 228
Thanked 230 Times in 191 Posts
Rep Power: 53
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: What's a MD5 hash???
Every file will have a unique MD5 hash. Change in even a single byte of the file will change the MD5 value. So it can be used for verifying file integrity.
Download a freeware MD5 calculator here: MD5 Calculator |
|
|
|
|
|
#5 | |
|
Regular Member (100+)
Join Date: Dec 2006
Location: At home
Posts: 141
Thanks: 46
Thanked 3 Times in 3 Posts
Rep Power: 3
![]() |
Re: What's a MD5 hash???
Quote:
So... why can't we compress huge files into one string and use it instead of the big one? ![]()
__________________
Hell begins on the day God grants us a clear vision of all that we might have achieved, of all the gifts which we have wasted, of all that we might have done which - we did not do - |
|
|
|
|
|
|
#6 |
|
(ψ)=ΘΊΧφ
![]() |
Re: What's a MD5 hash???
have u read the algorithm ?? it's not such a easy task
![]() |
|
|
|
| Thanked Users: | Night_virus (27-01-2007) |
|
|
#7 | |
|
Founder
![]() Join Date: Nov 2005
Location: The Last City Zion!
Posts: 2,684
Thanks: 228
Thanked 230 Times in 191 Posts
Rep Power: 53
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: What's a MD5 hash???
Quote:
eg. For the file MD5.exe the unique hash value is 7480640e9e85b3b9de7afe4f0c400d5e. ![]() |
|
|
|
|
| Thanked Users: | Night_virus (27-01-2007) |
|
|
#8 |
|
Elite Member (1000+)
|
Re: What's a MD5 hash???
thnx all re....
i didnt know tht... |
|
|
|
|
|
#9 |
|
Junior Member (25+)
Join Date: Oct 2006
Posts: 48
Thanks: 20
Thanked 5 Times in 4 Posts
Rep Power: 0
![]() |
why won't a digest hash code compress?
"So... why can't we compress huge files into one string and use it instead of the big one?"
MD5 is an example of a hash code. Suppose you're going to keep track of student records for a few hundred students in a school using file folders and paper (gasp!) To make it quicker to find records, you set up a file cabinet with those divider things and file each students folder under their last name in the appropriate cubbyhole. If you have 200 students you have an *average* of 8 folders per cubbyhole. But when you try this you discover that something's wrong. There are lots of P's, R's, and V's, but not many 'nya's' , 'zh's - so you're still looking through lots of folders to find students named Varma. So instead you make some complicated crazy function. Exactly what it is isn't important, only that, when you stick a name in it gives a letter back that is randomly distributed in the alphabet. And every time you put in the same name, you get the same letter out. Call that function F Now, put the folder for Varma in whatever letter F("Varma") is We call F a hash function. Now, after we put all the folders in their new locations, we have an equal distribution of items in the cubbyholes. That's one of many cool uses of a hash function. Another one is figuring out whether two things are equal. Suppose Strider decides that no two people can use the same avatar on Techtalkz. That'd be really computationally intensive to check by brute force. Here's a fast way to do it. Construct a hash function that maps an image into a number. Lets say it maps into 10 bits. Then we have an array bucket[1024]. We look through all the images. Compute the hash code and look in the bucket[hachscode(image)]. Now, it might be that two different images have the same hashcode. But it's pretty easy to check the few images in that bucket. If non are identical, we add this one to the bucket, and go to the next image. Java, for example, keeps a hash code for each object, and when you do foo.equals(bar), it checks whether the hash codes are equal (few caveats here, this isn't an essay on Java hashcodes) So, the MD5 digest is a hash code whose input is a whole file and whose output is some hex number. Suppose D1pSh1T the cracker wants to act cool by causing you grief. He gets on dad's computer and writes a program that erases your hard drive or something. He also writes some stupid little utility that shows JPG's or something, and uploads this to tucows. Tucows decides it's not a virus and puts it on their site, with a pointer to D1pSh1T's web page. Now D1pSh1T puts the destructive Trojan where the innocent utility was. You download it, run it, and your day is ruined. How to protect yourself? Tucow, when they decide 'Super JPG viewer' isn't a Trojan Horse, computes the MD5 hash, and publishes this along with the link to where you can download it. Lets say it's 2342AE239800AC1244FF1136CA1288FF Now, you download what you think is Super JPG viewer, but is really the trojan. But, being careful, you run it through a program that computes the MD5 checksum, and...gasp... it's a different number. So you know you're dealing with a computer criminal. So, why can't we use the hash to compress files? Because, despite there being 2^128 possible MD5 values, there are 2^2^15 possible 32K long files, and 2^2^15 is a MUCH larger number than 2^128. So there are some 2^32640 files for each possible MD5 value. The decompressor would have no way of choosing among them. |
|
|
|
| Thanked Users: | Strider (27-01-2007) |
|
|
#10 |
|
Regular Member (100+)
Join Date: Dec 2006
Location: At home
Posts: 141
Thanks: 46
Thanked 3 Times in 3 Posts
Rep Power: 3
![]() |
Re: What's a MD5 hash???
Yea... i've got it... it's just like the compiler sums up 2 and 3... gets 5... but the decompiler doesn't know how to put the bytes back: 0 and 5 / 1 and 4 / 2 and 3 etc... i getit!
Also... this means that not every file has it's unique hash... 2^32640 files can have the same MD5 hash... but a different content... doesn't this mean that with a little bit of work a MD5 calculator can be tricked? |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|