Homework on Hash Functions - Questions

Hash functions are functions which process an input and produce a unique output which is almost impossible to reverse. It therefore creates a unique signature which does not resemble anything else.

Hash functions are used in bitcoin where the initial input (transaction) is the processed by the function and produces a unique output which can then be added to the blockchain. The hashing algorithm is known as SHA-256 which is an alphanumeric code that allows an output of a fixed length.
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).
Hashing functions need to be collision resistant because otherwise it would be possible and likely that two different inputs can produce the same output. If this was possible in bitcoin, it would lose its entire purpose. Therefore cryptographic hash functions needs to be collision resistant.

1 Like

Describe hash functions with your own words
Hash functions are functions through which the data is being converted to another value that hides (masks) the original value to the point where the process cannot be reversed in order to find out what the source value was.

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 a Proof of Work, if the miner finds a hash that meets the target difficulty a new block will be added to the blockchain.

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).
They need to be able to avoid making hash duplicates. It means that it needs to be almost impossible to find two random inputs with the same hash outputs. One cannot avoid it totally due to the finite number of hash value combinations, but it needs to be as rare as possible.

1 Like
  1. Hash function transforms a unique type of input into an irreversible type of output.
  2. In bitcoin hashes are present in the block hashing algorithm, used to write new transactions into the blockchain through the mining process.
  3. For each x ∈ X, being h=F(x), we should never get F(x′)=F(x)=h.
1 Like

a function where you cannot go from output to input; the input gives a unique output

the hash fuctions are used in creation of the address and for the mining; proof of work

Collision resistants
no 2 different inputs can have the same output

1 Like
  • Describe hash functions with your own words.
    An algorithm input which generates (outputs) a “hash” or sequence of numbers and letters (alphanumeric), that virtually is impossible to reverse back to the original input due to the Secure Hash Algorithm of SHA-256 coding.

  • How are hash functions used in cryptocurrencies like bitcoin?
    Simply put, a transaction of any kind is put into the computing community (blockchain) and produce a fixed set of numbers and letters denoting that transaction. It’s a length of alphanumeric byproduct for information that was given to secure a transaction without it ever being manipulated once produced.

  • What does it mean when we say that hash functions need to be collision resistant?
    Not be duplicated! A specific input of particular symbols and length produces a hash. This hash will remain the same as long as the input does and so is “collision resistant”. If the input changes even a little (eg: remove one symbol) so will the hash. This supports the integrity of the message. Earlier SHA’s have been compromised or “broken” and so deemed NOT collision resistant, and so copied or duplicated.

1 Like

1- Hash functions are the functions where we will be given unique keywords (like fingerprints) according to unique inputs. It will be represented in hexadecimal system, if we are talking about SHA256. These functions are only one-way, you cannot reach the input from an output.

2- Hash functions used to write new transactions into the blockchain through the mining process. It’s a part of Proof of Work.

3- If we can call a hash function collision resistance, it is hard to find two inputs that hash to the same output. As every output must be unique, we must say that hash functions need to be collision resistant.

1 Like
  1. Hash functions provide a digital fingerprint with a particular input which drastically vary from miniscule changes to inputs.

  2. Hash functions are used to write new transactions to blocks in the blockchain. The hash is provided to prevent from changes to historical transactions in the blockchain. As bitcoin uses the previous blocks hash as part of the input to write a new transaction, it makes it extremely difficult to edit previous transactions, as every transaction thereafter on the blockchain will have a different hash to the original.

  3. Collision resistant functions mean that it is computationally infeasible to find two colliding inputs. This means that the same output were to occur from two different inputs. It is imperative that two different inputs can’t create the same output on a hash function. For example on the bitcoin blockchain, if a given hash output could be derived from two different inputs, a bad acting miner could effectively hack the bitcoin network and edit a historical transaction.

1 Like
  1. They take an input, and calculate an Output. Same Input results in the same Output. If you just alter one thing, the output completely changes. You cant reverse-engineer the output back to the input.
  2. The transactions are beeing hashed to encrypt it
  3. It means, that two different outputs shouldnt result in the same output.
1 Like
  1. Hash functions are here to protect the input data - its only possible to go one way. Meaning in to- output possible but not the other way around. should be this the case BTC would not work/exist.
  2. In the bitcoin protocol, hash functions are part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process. It’s the need for this large amount of processing power that means new bitcoins get mined over a long period of time, not all at once.
  3. Collision resistant means two different things not getting the same hash.
1 Like
  1. Hash functions is a unique input that produces a unique output - a digital fingerprint.

  2. In the bitcoin protocol, hash functions are part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process.
    I don’t understand it entirely so I’ve copied the answer from coindesk.com :flushed:

  3. That every hash function shouldn’t have more inputs than outputs, I think :slight_smile:

3 Likes
  1. Describe hash functions with your own words
    Hash functions are unique. Each unique input will produce a unique output. You can go from input to output but never 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 in cryptocurrencies like bitcoin when a block is made.
  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).
    if it is hard to find two inputs that hash to the same output that is what it means for a hash function to be collision resistant.
2 Likes

1. Describe hash functions with your own words

Hash functions turn an input into a unique output. They are one-way functions and can’t be reversed to get the original input data

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

For transactions not to be altered.
For miners to get rewards.

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

Prevents inputs to get duplicated outputs

2 Likes
  1. Describe hash functions with your own words

A hash function produces a alphanumerical output that represents the input. The output is a unique digital fingerprint of the input and cannot be reverse engineered.

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

The input for the hash functions in cryptocurrencies are the most recent transactions that are yet to be verified. Each transaction is hashed into a digest of a fixed amount of numbers and letters. The next step is to combine all of the hashes and hash them so that all of the information from all of the transactions within the block are represented by one hash only. This is also called the merkle tree.

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

It it basically impossible or at least very close to impossible to find two inputs to a function that create the same output.

1 Like

Some of these concepts are quite hard to wrap my head around as well :slight_smile:

The fog will clear :slight_smile:

  1. Hash function takes a input of any size up to 256bit to give a unique digital finger print for a output to reference the contents later. Fixed length input

  2. Hash functions are used to reference a transaction on the blockchain network. The hash also references timestamps of previous transactions in the chain. The output numbers of the hash must be lower than the target to successfully complete

  3. Low chance of two inputs generating the same output hash.

1 Like
  1. Hash functions create a different output for each individual input; it is also a function in which one cannot deduce the original input from any given output.

  2. It is part of the blockchain hashing algorithm used to write new transactions into the blockchain via mining. All new and unconfirmed transactions are the inputs, and miners solve blocks by using the inputs to find a hash with a specified number of zeroes.

  3. To be collision resistant means that it is difficult to find two unique inputs that create the same exact output - the greater the difficulty to find such inputs, the higher the security.

1 Like
  1. Hash functions are functions that for each unique input a unique output is given, this makes it so you can go from input to output but never from output to input.
  2. Hash functions are used to verify transactions
  3. This means that there will never be two inputs that create the same output.
1 Like
  1. Describe has functions with your own words.
    One way functions that transform input into unique output

  2. How are hash functions used in crypto currencies like bitcoin?
    Hash functions in bitcoins are used in in writing new transactions to be added to the blockchain through mining.

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

Hash functions are collision resistant when it is hard to find two inputs that has to the same output.

1 Like

Thank you for encouragement :blush: I do normally need to peep on the answers what the others have, but I always try to understand them before posting, no point in cheating here, is there? However, in this question, there are couple of things that don’t make sense just yet.

  1. Describe hash functions with your own words
    –> digital fingerprint associated to a particular 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).
    –> In BTC hashes are used to produce a fingerprint of the previous+current transaction address generating a new hash value for each transaction

  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).
    –> No two outputs should create the same hash.

1 Like