- Describe hash functions with your own words:
Hash functions are functions that produce a unique ‘fingerprint’ or output that is based on unique input. It is repeatable, but if any character in the input is modified at all, it will produce a new, totally different unique output.
- 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).
Hash functions are used in bitcoin to validate the existence of bitcoin, as well as all the transactions in the blockchain. Miners use them to validate transactions and create new blocks, whilst they try to earn bitcoins.
- 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).
Hash functions need to be collision resistant by ensuring that no two inputs produce the same output. Failure to do this can cause double-spending of bitcoin and leave the blockchain vulnerable. There’s also pre-image and second pre-image resistance, two other security issues derived by the ability to determine inputs from a weak hash algorithm.