Homework on Hash Functions - Questions
-
Describe hash functions with your own words
Hashing is the process of converting an input or text of any length into a fixed-size string of text (no matter the length of the input), using a mathematical function. The output is called the ‘Digest’ or ‘Hash’. -
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).
Bitcoin uses the hash function SHA-256. This particular secure hashing algorithm is one of the most popular because unlike some previous hashing algorithms, reverse engineering to display the input from the output is virtually impossible and highly improbable as it would take 100’s of years of brute-force attack making rendering the process useless.
The hash provided by these algorithms provides the security to the blockchain ensuring that all blocks appended into the chain are immutable.
- 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).
This means minimizing the likelihood that two unique inputs generating the same hash (output). In other words, with strong collision resistance, each input will have its own unique hash.