Homework on Hash Functions - Questions
- Describe hash functions with your own words
A hash function is a type of computation that maps or lays out inputs of any length, into hashes of a fixed size. The hashes outputted each have a unique digital fingerprint. Furthermore, it takes an inordinate time for someone to decipher the original input from the outputted hash.
The values produced through Hash functions can subsequently be organised in associated hash tables. This combination of hash function and hash table, is a way for organising and efficiently retrieving large stores of data.
- 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 are particularly useful in cryptocurrencies such as bitcoin because;
a) they allow transactions to be unique and imutable
b) they can register every input and allow fast and efficient tracing or validating of transactions
c) hash functions ensure a full, accurate, unchangeable ledger
- 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 hash functions have to ensure that the same output hash is not given for two different inputs.