In: Computer Science
Network Security:
Explain in detail how a hash function could be used for each of the following applications. Indicate which property or properties of the hash function are being used (one-way property, fixed length output, collision resistance, etc...).
1. to detect unauthorized modification of software program code
2. to identify the same files with different names on a peer-to-peer sharing network
We will answer both the questions, but let's first discuss about Hash Functions in general.
Hash Function: This is a special function which when supplied with the input always gives a unique hash value within a domain of inputs.
Example: Let the Hash function be h(x) = (x*10) mod 13
Let us test this out:
Let x=0, Then h(x) = 0
Let x=1, Then h(x) = 10
Let x=2, Then h(x) = 7
Let x=3, Then h(x) = 4
and so on...
The domain for this hash function is [0,12]. This means any number in-between and including 0-12 will give a unique output.
Ans. 1.
Whenever a software is dispatched to the user, along with that the total hash value of that software should also be sent in encrypted form to the user. Whenever the user will attempt any mischievous activity to change the source code of the software, the the total hash value of the software will get disturbed which will halt the software and this tyoe of cyber crime will be minimized.
Ans. 2.
Whenever a file will get loaded into the peer-to-peer network, it's hash value should also be attached with it. This will ensure that, whenever the same file with a different name comes to the network, then it's total hash value will be read and if it matches with any other file already present in the same peer-to-peer network, then the file could be rejected then and there.