Question

In: Computer Science

What is the hash value of a file, and what does it mean if two files...

What is the hash value of a file, and what does it mean if two files have the same hash value?

Solutions

Expert Solution

Hash values can be thought of as fingerprints for files. The contents of a file are processed through a cryptographic algorithm, and a unique numerical value – the hash value - is produced that identifies the contents of the file. If the contents are modified in any way, the value of the hash will also change significantly. Two algorithms are currently widely used to produce hash values: the MD5 and SHA1 algorithms.

Hashing is an algorithm that calculates a fixed-size bit string value from a file. A file basically contains blocks of data. Hashing transforms this data into a far shorter fixed-length value or key which represents the original string. The hash value can be considered the distilled summary of everything within that file.

An md5 sum is 128 bits (16 bytes). Since the number of different possible file contents is infinite, and the number of different possible md5 sums is finite, there is a possibility (though small probability in most cases) of collision of hashes. In other words, two different files can produce the same sum when hashed with md5.

Because of this, it's better in some cases to use a higher bit hash (more possible different outputs), to reduce the (already low) probability of an accidental hash collision, and increase the difficulty of creating a deliberate hash collision through brute force.


Related Solutions

What does ‘file mounting’ mean?
What does ‘file mounting’ mean?
* What does it mean when header files are described as making a program “modular?” What...
* What does it mean when header files are described as making a program “modular?” What are the advantages of this? * You are testing a program that is designed to take in a pair of float values as input. The intended range is from -50.50 to 100.25. What are 10 test cases you would use to test this program, bearing in mind each test case is a set of two numbers? Briefly justify your choices.
What are the (1) hash algorithm identifier, (2) cost factor, (3) salt, and (4) hash value...
What are the (1) hash algorithm identifier, (2) cost factor, (3) salt, and (4) hash value of the following given hashed password that is generated by bcrypt()? $2y$16$.2Boh8Y80U.RaFr1sFdaKuP5/B2Z3I8OM7vUTUvPzD2UEG3VMcXra
4. What is the predictive value of positive test? What does this mean in words and what does this mean for the practical value of the test?
  Sensitivity and Specificity We are interested in looking at the connection between a test and a disease to investigate the ability of the test to distinguish between sick and healthy. We look at a sample of 50,000 people who have been tested for a particular disease. Of these, 100 have the disease. Of the 100 who have the disease, 95 are receiving positive test results. Of those who are healthy, there are 48902 people who get negative test results....
This needs to be written in JavaScript with two files. One HTML file and a JavaScript...
This needs to be written in JavaScript with two files. One HTML file and a JavaScript file. Make an empty HTML file, put three buttons inside the body and an empty main tag below the buttons. The text of the buttons should be "Foo", "Bar", and "FooBar" respectively. Don't put the " in the buttons that's just for clarification in these instructions. Add unique IDs to each button In your JavaScript, get 3 separate references to the buttons using the...
File Compare Write a program that opens two text files and reads their contents into two...
File Compare Write a program that opens two text files and reads their contents into two separate queues. The program should then determine whether the files are identical by comparing the characters in the queues. When two nonidentical characters are encountered, the program should display a message indicating that the files are not the same. If both queues contain the same set of characters, a message should be displayed indicating that the files are identical. // Copyright (c) 2013 __Pearson...
what does it mean to maximise the value of a company
what does it mean to maximise the value of a company
What does it mean to maximize the value of a corporation?
What does it mean to maximize the value of a corporation?
What does the population mean for your population (that is the value population mean)? What is...
What does the population mean for your population (that is the value population mean)? What is the mean of your sampling distribution of sample means (that is the value sampdistrmean)? According to the Central Limit Theorem, there is a formula relating the population means and the mean of the sampling distribution of sample means. What is that formula and how well did the outcomes of your simulation match that formula? Explain and specifically reference the formula.
How does the Kd value conpare with the Ki value? What does this mean in terms...
How does the Kd value conpare with the Ki value? What does this mean in terms of binding?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT