1. Describe hash functions with your own words
Hash functions are a type of function which you introduce an input and it will result in an output. The important characteristics is that each unique input will produce a unique output, and it is (for the time being) impossible to reverse the function and get the information of the input with the output. Hash functions are versatile because any type of input such as text, digits and other media types can be hashed which will produce an output number represented by digit and letters, like hexadecimal type, and if something as a tiny bit of information is changed from the original input the resulting output will be totally different. This helps to check data integrity, if one single bit of information is changed from the original input then, the resulting output will be totally different.
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).
Hash functions in cryptocurrencies are used to secure the blockchains. They are used to encrypt the transactions and make sure there are no double spendings or false transactions to any account. Hashing the information on each block and linking it with the next hash function makes impossible to alter any data. This makes the cryptocurrencies safe.
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).
It means that it has to be āimpossibleā to go from the output to the input. If a hash function can get the same output from to different inputs it means that the function and its algorithm is not safe.