Homework on Hash Functions - Questions

  1. a hash function is a function that can take an input of any size and gives an output that is the same size every time.

  2. Bitcoin uses hash functions to confirm transactions on the blockchain.

  3. For hash functions be be collision resistant means to make hash functions as hard as possible to find 2 inputs that produce the same output.

1 Like
  1. Hash function is a math function in which an input is a unique digital fingerprint of it’s output. A hush function allows you to go from input to output but never the contrary.

  2. Hash functions are used in proof of work mining which is used to add new transactions to the blockchain.

  3. Saying that hash functions need to be collision resistant means that it must be hard to find two inputs that hash to the same output.

1 Like
  1. Describe hash functions with your own words.
    Hash functions convert any string of data and convert it into 256 bits code.

  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 securise and encrypto transaction data.

  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 means that is very difficult to find two same output of the hash function.

1 Like
  1. Describe hash functions with your own words
    Hash Functions turn any input in an output of the same length. They are used to encrypt an information and work only one way. It is infeasable to to use the output to find out the 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).
    Has funktions are used in to save and timsstamp transactions or information in the blockchain.
    The hashing is part of the proof of work method to keepmthe blockchain working and to reward the miners during that 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 resistant means that it is impossible to get the same output from two different inputs.

1 Like

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
    Hash functions change a phrase or input into a coded unique fingerprint or 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).
    It’s used to do the “mining”, miners try different combinations with the hash function to try to get a certain amount hash output. Like 18 zeros in the start of the hash.

  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 means that you never want two different inputs coming up with the same output.

1 Like
  1. A hash function computes a specific output when given a certain input. Change one bit in the input, the output will be completely different. The output is like a digital fingerprint for the input. Hash functions are also one-way functions, meaning you can only compute an output from an input and not an input from an output. If someone is able to do so, the hash function is broken.
  2. It is used to hash transaction data.
  3. It means that for two different inputs, there cannot be the same output.
1 Like
  1. Describe hash functions with your own words

Hash function is one way function only, so its possible to convert output to input

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

In bitcoin hash function is used to write new transaction in to blockchian, each block contains hash of previous block

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

This means that two different inputs should not produce the same output, each input should create unique output.

1 Like

You probably meant impossible? :stuck_out_tongue:

Yes, sorry made typo, I mean impossible :slight_smile: good that you found it. Thank you

1.- A hash function basically converts data into a fingerprint. Unique and impossible to know whats behind it by only knowing the output.
2.- They are mainly used for mining.
3.- They need to be unrepeatable.

1 Like
  1. Hash functions are used to store and retrieve unique data.

  2. The bitcoin has functions are part of an algorithm which is used to write new transactions into the blockchain through the mining process. when mining bitcoin the inputs for the function are all of the most recent, not-yet-confirmed transactions from a previous block.

  3. Collision Resistance means a hash is collision-resistant if it is hard to find two inputs that hash to the same output. Wikipedia says that is, two inputs a and b where a ≠ b but H ( a ) = H (b)

1 Like
  1. Describe hash functions with your own words. Is the generation of an unique number (fingerprint) by applying a function that in someway have to be a One Way function; Input results an Output but impossible to calculate the Input having the 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). To comply with the property of immutability which gives the blockchain blockchain very high security

  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). 2 inputs when we hashed have to be impossible have the same output (collision free)

1 Like
  1. Hash functions are data that has been converted into equal length code.
  2. Cryptocurrencies use hash functions to secure and organize data.
  3. Collision resistance refers to the chance of different data being converted into the same hash. So in order to be collision resistant the chance would have to be low enough that when two separate transactions generate the same hash function enough time has gone by that it doesn’t create a large impact.
1 Like

The universe will probably end sooner that two tx will have the same hash. And if it did happen it will probably be an issue no matter how far in the future it is. :slight_smile:

1 Like

The larger the output size of a hash, the less likely you can accidentally have a collision ( 2 different inputs producing the same hash). Sha256 hashes are 2^256 big wich is a huge range of possibilities. If you have a hash function that produce only a hash of only 2^16 or something , that’s only 65,536 possible outputs, so collision would happen very often

1 Like
  1. A hash function generate a unique output/ digital fingerprint from each unique input. So everyone who puts in a specific number in the hash will get the same out put. But lets say you have the out put, can you derive the input from that? No you can not.

  2. SHA256 Hash function is used in Bitcoin to ensure the integrity of the date in the blocks. If someone is tinkering with the information in a block and try to submit it to the network and claim something that is not true, it will bot be accepted since the hash function will discover that the data does not match what other nodes have submitted.

  3. Collision resistant basically means that a hash function generates such large random numbers that is is practically implausible that some one else would generate the same number. It is possible but indescribably far from plausible.

3 Likes
  1. Hashing functions are a way encrypt information. There are some attributes that you want to maintain while keeping information encrypted like getting the same output with the same input, getting hashes quickly, and very hard to uncode.

  2. Hash functions are used in bitcoin by use of pointers, linked lists, and hash pointers. Hash functions are also used as an important feature with mining.

  3. collision resistance basically means that each input is a unique output hash. There is a possibility that 2 random inputs could produce the same output, but that is just a very small probability.

2 Likes

Nice answers. I think this is the first time I have seen the word indescribably written. I had to take a double glance.

1 Like

Thank you, yeah its indescribably rare lol :smiley:

1 Like
  1. Hash functions are one-way functions wherein unique inputs give unique outputs. You can always go from input to output but never output to input.
  2. Hash functions are used in cryptocurrencies to secure and verify the integrity of data.
  3. Collision resistance is when it is impossible or nearly impossible to find two inputs that give the same output, ex. H(a)=H(b)
2 Likes