Homework on Hash Functions - Questions
Describe hash functions with your own words
1 Each unique input creates a unique output
You can go from input to output but you can’t go from output to input
1 way function
How are hash functions used in cryptocurrencies like bitcoin? (Try to research this on your own, we will cover this later in the course but challenge yourself and see if you can find information on this already now).
This is what I found
taking an input string of any length and giving out an output of a fixed length. In the context of cryptocurrencies like bitcoin, the transactions are taken as input and run through a hashing algorithm which gives an output of a fixed length.
Bitcoin mining uses cryptography, with a hash function called double SHA-256. A hash takes a chunk of data as input and shrinks it down into a smaller hash value (in this case 256 bits). With a cryptographic hash, there’s no way to get a hash value you want without trying a whole lot of inputs.
What does it mean when we say that hash functions need to be collision resistant? (We didn’t use the term “collision resistant” in the lecture, but you will easily find this on Google, we add this question intentionally to make you research information on your own, that’s how you learn best).
This is what I found
Collision resistance is a property of cryptographic hash functions : a hash function H is collision resistant if it is hard to find two inputs that hash to the same output; that is , two inputs a and b such that H(a) = H(b), and a ≠ b
A collision of a hash function is a pair of different inputs which give the same output. In the new definition, weak collision resistance means that the probability of failing to find a collision is not negligible. This weak collision resistance is then analyzed.