1 - Describe hash functions with your own words
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).
A hash function is a digest of the text script that this function represents. In the case of Bitcoin, this function allows the creation of a chain of 34 characters in base 16 going from 1 to 9 and from A to F (For the numbers from 10 to 16) which will be your private key and whose derivation from this same code with the same algorithm will give you your public key (s). In reality this hash function is an algorithm or a series of mathematical operations making it possible to calculate a result which in the context of bitcoin is called a fingerprint, the latter proves, when we operate a computer process via a transaction that it is are you the recipient or the sender of this transaction. More simply, This allows to transform a character string into a shorter one serving as a digital fingerprint during the execution of a transaction.
2 - 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).
The hash function is called âcollision resistantâ, meaning that each entry must correspond to one exit and only one. In other words, it is impossible to have two different outputs for the same input. Bitcoin solves what is known as the so-called âdouble-spendingâ problem. The model is said to be deterministic because each input automatically determines a single possible output.