1. Describe hash functions with your own words
It is a function that gets an input, does some calculations and gives you a fixed lenght output (that is allways the same for the same input) that you cannot reverse to get the input again. But you still can verify if the input has been changed or not by hashing the input again and check if the output is still the same.
2. 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).
The info in the blocks are hashed and the hash is used to link the blocks together. So the hash of the previous block is inside the current block. So if you want to change some info in a certain block, you must recalculate all hashed of all previous blocks too.
3. 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).
when a collision happens it means that you suddenly have 2 different inputs with the same hashed output. This makes the algorithm unusable.