-
Describe hash functions with your own words.
Hash functions turn a random input of data (keys) into a string of bytes with a fixed length and structure (hash value) = 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).
- Basically, the Bitcoin network depends on a set of rules termed [Proof of Work] consensus algorithm. The consensus algorithm is a set of rules that rules the blockchain network. Outside of cryptocurrencies, the most common usage of hash functions is in the storage of passwords. The overall for BTC needs to be a high hash rate because it makes the network more secure. If someone wanted to attack the BTC network, the X person needs at least 51% of all the hash rates and the world, good luck with that.
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).
Given your example of 1 billion users at 10 addresses each:
There are 2^160 or about 1,460,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 possible addresses
In your scenario, 1,000,000,000 people are using 10 addresses each for a total of 10,000,000,000 possible addresses
10,000,000,000 / 2^160 should yield the probability of a collision occurring
10,000,000,000 / 2^160 = 0.00000000000000000000000000000000000000684
So the chances of a collision occurring in your scenario are approximately 0.000000000000000000000000000000000000684%
See why we donāt consider collisions an issue?