Homework on Hash Functions - Questions
- Describe hash functions with your own words.
- There is no way to reverse a hash function. One can create a output from an input for wouldn’t be able to reverse engineer his way from the output to the input. In other words, if one wants to find the input to an output, he has to guess (brute-force) his way to the answer. With SHA-256 it would literally take forever.
- 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).
Hashing is used:
- to find (mine) new blocks
- to make merkle trees so a block has a tx root
- 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 means that hash functions may never have two inputs that hash the same output. It is very important that each hash is unique!