Homework on Hash Functions - Questions

  1. A hash is an algorithm/ set of rules. And with each unique input, you will receive a unique output. It is also only a one way function, so it is irreversible.
  2. Bitcoin is simply a digital ledger of hashes that utilizes proof of work combined with SHA 256 to obtain mathematical traceability and unbreak ability.
  3. Collision resistance is the property of a hash function that it is computationally infeasible to find two colliding inputs.
1 Like
  1. Hash functions are functions which can take any input and turn it into a unique alphanumeric hash phrase. In hash functions you cannot go from output to input.

  2. Hash functions prevent new Bitcoin from being minted except by through mining. The data input in a hash cannot be altered or erased after enough on-chain confirmations.

  3. Collision resistance has the meaning that it is very unlikely to find 2 inputs that produce the same output in a hash function. This is important in cryptographic hash function.

1 Like
  1. hash functions are functions that five as a unique output for a unique output (like a fingerprint)
  2. In every block you put a hash of the previous block with an additional hash.
  3. The property of the functions that insures that if a is not equal to b, f(a) will not be equal to f(b)
1 Like
  • 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).
  • What does it mean when we say that hash functions need to be collision resistant?
  1. hash functions are one way inputs that create an output. Each input creates a unique output making it secure. Used for taking a arbitrary input and creating a fixed output.

  2. Hash functions are used in mining to help perform the chaining process.

  3. Hash functions need to be collision resistant meaning that no two inputs can equal the same output. It is nearly impossible for that to occur

1 Like
  1. A function consisting of intricate mathematical operations that converts any input into an output consistently without allowing for reverse engineering the input. An output can be compared to the expected output to verify its integrity, as each input always produces the same hash (output).

  2. SHA-256 is used to create Bitcoin addresses, also several POW cryptos use SHA-256 in the proof of work algorithm for mining.

  3. Collision resistance means that there should not be two inputs that produce the same hash (output).

1 Like
  • Describe hash functions with your own words

Hash functions are the algorithm of the input and calculating the 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).

Hash functions are used for transactions so that the process of mining Bitcoin does not happen all at once.

  • 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 that output will always change when the input changes. A weak function would not support a collision resistance algorithm.

1 Like

1 A hash function takes any string of data and converts it into 256
2 in bitcoin protocol hash functions are a part of the block hashing algorithm which is used to write new transactions
3 means each input will have their
own unique output

1 Like

Homework on Hash Functions - Questions

1. Describe hash functions with your own words
Hash functions are used in cryptography to execute an output from a given input.

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).
Specifically to Bitcoin, Secure Hashing Algorithm 256 aka SHA256 is unilinear from input to output—meaning there is no way to solve the input from the output. MD5 is a hash function that has been cracked, the input can be discovered from the output, it is no longer unilinear.

SHA256 uses hexadecimal aka base 16 aka the following 16 numbers and letters are used: 0123456789abcdef

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 is difficult to find two inputs that produce the same output; that is, two inputs a and b such that H = H, and a ≠ b. No collision resistance = easy for fraud.

1 Like
  1. Describe hash functions with your own words: The hash function takes an input and returns a cryptographic output that can not be reversed from output to input.

  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 are used to give security to the bitcoin network by not allowing hackers to take the output hash result to find the original input of block chain transactions.

  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). Hash functions need to be collision resistance to prevent malicious unwanted parties from brute force attacking the original encrypted data.

1 Like

You described what a hash function is, but how is it used in Bitcoin? :thinking:

1 Like

True this also helps with securing the function. But collision resistance describes the probability of two inputs resulting in the same output. :slight_smile:

  1. Hash functions are way to validate data in its existing form without any modification. This data is put through an algorythm and gives out a code that exemplifies that data.

  2. Hash functions are used to create new transactions throughout the mining process of verification.

  3. It would mean that the output can not lead back to the input.

1 Like
  1. A hash function is a one-way function that generates a ā€œdigital fingerprintā€ of any binary data.

  2. Hash functions are used as the ā€œfingerprintsā€ of the blocks on the BC. Because the blocks are linked (with their signatures), that means it would be practically infeasible, with the current means, to cheat and create a verifiable and coherent set of blocks.

  3. A hash collision occurs when two sets of data produce the same hash output. All the hash functions theorically produce collisions, since there are more posssible data content than hash outputs. But the probability of collisions must be so tiny that in practice no collision ever occur.

1 Like
  1. Describe hash functions with your own words
    A hash function is on one way function input to output. It has a unique input and a unique output.

  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 are part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process.

  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).
    Collision resistance is the property of a hash function that it is computationally infeasible to find two colliding inputs.

1 Like

Thank you for encouraging me to dig deeper to give a better answer! Hash functions are used by miners via proof-of-work. Miners compete against each other to correctly guess the input that produces the hash target, thus solving the problem that changes every 2016 blocks. Hash functions also produce the public and private keys that are tied to the public Bitcoin address.

1 Like

Collision resistance means its hard to find two inputs that result in the same output. :slight_smile:

1. Describe hash functions with your own words

  • They are complex mathematical algorithms (functions) that take any data (represented as a number) as an input and will generate a fixed-length output (also in the form of a number). They only operate as a one-way function, one cannot go from the output value to the input value.

2. How are hash functions used in cryptocurrencies like bitcoin?

  • They serve multiple purposes in Bitcoin. The minor one is the generation of addresses from the public key. The most important one would be the mining mechanism, which uses hash functions as a way for network participants (miners) to prove they have sacrificed computing resources to validate and secure the network (proof of work). When a miner solves the hash function, it mathematically and physically means he had to work a lot to achieve it.

3. What does it mean when we say that hash functions need to be collision resistant?

  • It should be mathematically impossible (or computationally infeasible) to find two input values, that are producing the same output when injected into the hash function. It means that a given output from a hash function should not be mapped to more than one unique input.
1 Like

1. Describe hash functions with your own words
A hash function is a cryptographic function that takes an input and returns a unique output (hash). A hash function is supposed to be a one-way function. However, this is dependent on the current computing capabilities.

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).
Bitcoin and other cryptocurrencies use hash functions for their block hashing algorithms. These algorithms take an unverified transaction, its timestamp, and reference to a previous block as the input. Miners work towards getting a hash that starts with a certain amount of 0s.

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).
A hash function exhibits collision resistance if it is difficult to find two different inputs with the same hash.

1 Like
  1. Describe hash functions with your own words

A hash function takes in data of arbitrary length and generates a unique value that acts as a fingerprint of the original data. It’s a one-way function meaning that it can’t be reversed, so you can’t generate the input based on the function’s output.

  1. 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 utilized in proof-of-work cryptocurrency mining operations. The goal of the miner is to generate a hash value for the current block of transactions that contains a predetermined number of zeroes defined by the current difficulty rating. Each block contains a header that includes a unique block number, the hash value of the previous block and a nonce. The miner will select random nonces and generate hashes until it finds a nonce is found that generates an acceptable hash or it is notified that another node has found an acceptable nonce. All the miners then verify the block by using the same nonce and verifies the hash of the new block and assuming a consensus is reached the block is committed to the blockchain.

  1. 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)

Collision resistance is an important property of a hash function and indicates that there is extremely low probability the function will generate the same hash value for two different sets of input data.

1 Like

1 - its a way of hiding the original data into a fixed length string that can’t be reversed engineered. Same input always gives same unique output.

2 - hash functions are used to record transactions on the blockchain.

3- collision resistant means that different inputs should never generate the same output.

1 Like