View Single Post
Old March 29th, 2011, 01:31 PM   #26 (permalink)
doogald
Senior Member
 
Join Date: Jan 2010
Posts: 5,567
 
Device(s): Moto Droid Maxx (2013-), Moto Droid 3 (2011-2013), HTC Droid Eris (2009-2011)
Carrier: Not Provided

Thanks: 491
Thanked 1,536 Times in 1,204 Posts
Default

An MD5 is what is called a cryptographic hash of a file. Basically, the contents of a file are run through a very specific arithmetic formula, and the result is a particular numeric result of an exact number of bits. What is very useful about the MD5 hash is that it is impossible to predict what the result is going to be before you create the hash, and changing a single bit in the file will create a randomly different MD5 result.

The MD5 of a file with this sentence: "the quick brown fox jumped over the lazy dog" - is this: bb0fa6eff92c305f166803b6938dd33a

If I change one bit in that file by capitalizing the first t: "The quick brown fox jumped over the lazy dog" - the MD5 is this: 5c6ffbdd40d9556b73a21e63c3e0e904

One way that an MD5 is used is to verify that a file that somebody sent to you, or that you downloaded, is the one that you were supposed to have. If the MD5 does not match, you can be certain that somehow the file changed - an incomplete download, or somebody intercepted and changed the file.

In the particular case of a Nandroid backup, no, there is absolutely nothing that you can do to repair a mismatched MD5 error. As I said before, it is nearly impossible to predict what an MD5 hash result will be before you actually run the calculation, and you cannot take an MD5 hash result and determine the contents of the original file. Just having what the MD5 result should be will not tell you what the original file should have been.

(And, before any pedants chime in, it is true that MD5 is no longer considered completely secure, as somebody has found a way - using a massively parallel array of PS3s, if I remember correctly - to take a file and add something to it to create a specific MD5 hash result. However, that still is not a solution in this case - the last thing that you would want is to have a Nandroid backup have something random added to it just to match an MD5 hash.)

The AFV tool will just tell you the result of the MD5 calculation - it will not (nor cannot) tell you what a file needs to be to create a specific MD5 hash result.
doogald is online now  
Last edited by doogald; March 29th, 2011 at 02:03 PM.
Reply With Quote
The Following 2 Users Say Thank You to doogald For This Useful Post:
crz6662 (March 29th, 2011), stephanos (April 27th, 2012)