Homework on Hash Functions - Questions

Hash functions work by encrypting a set of numbers/words via a function where it is infeasible to find the input with the output. One of the most important aspects of hashing is its deterministic characteristic. That means that any input will give out the same output every time.

In Bitcoin, the hashing function used is SHA-256. This means that there are 256 bits in the output. Miners use a segment of the known partial input to solve the puzzle of the output hash target. The first miner that solves the hash target receives Bitcoin as a reward.

When we say that hash functions need to be collision resistant, this means that two hash functions cannot equal one another so that someone else cannot forge a signature. This is unlikely to happen because there are 2^256 possible hashes.

1 Like
  1. A hash function takes an alphanumeric string and converts it into a unique encrypted machine language hash.

  2. Hash functions encrypt transactions that are subsequently located on the bitcoin blockchain via the Merkle tree.

  3. It means that if they match one another they were generated by the same initial conditions and there is a problem.

1 Like
  1. It is a mathematical, cryptographic function that will produce a fixed length unique output for every varying length unique input. It is a one way function. You can go from input to output, you can not figure out the input from the output.
  2. It is used for data validation, data security. Inside every block header bitcoin has several hashes. Hashes connecting the new block to the old ones. Since hashes are relatively small size and fixed length they will save space, computer memory. Bitcoin uses SHA-256 hash function.
  3. It means that two different input can not produce the same hash output.
1 Like

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words

A hash function takes an input, performs an operation on it and converts it into a numerical output with a fixed length. You can convert the output back into the input however this is virtually impossible, especially when using SHA256. A single input will always return the same output. Any small change on the input will have a dramatic effect on the 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).

A hash function (SHA256) on the blockchain takes any data and hashes it down to a fixed length. For bitcoin this would be a 64 character string. When miners mine data, they are hashing the validated data on the peer to peer network for the last 10 minutes. This includes details of the last block which chains the blocks together. Additionally they randomly hash a number which selects the miners who are rewarded payment in bitcoin.

In the bitcoin protocol hah functions which are part of the mining protocol write new transactions onto the blockchain.
SHA256

  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 free/resistant means that two inputs that are hashed do not give the same output. This is possible because there is more inputs than outputs however the chances of this happening are low.

1 Like
  1. a hash function takes any string of data and converts it into 256 bits. its impossible to reverse and provides an unique identifier for data
  2. In Bitcoin the Hash function is used to hash transaction data. Also mining and finding a nonce requires finding a number that generates a specified hash in combination with data unique to that block.
  3. Each input is transformed to unique output and probability of two different inputs transforming to same output is infeasible if not impossible.
1 Like

Homework: Hash Functions

  1. Unique digital fingerprints used in cryptography that only work one way, one specific input has only one specific output, and not the other way around. Hash functions are critical to the security and structure of blockchains and bitcoin.
  2. They are used to protect the data contents with the bitcoin blocks. They are used to protect and verify the integrity of the blocks via mining. And they are used to mine the bitcoin blockchain producing a longer chain of data and reward the miners for their hash power.
  3. Collision resistant means that the hash functions need to make it very difficult for two different inputs have the same output. Sometimes this can happen, but it’s very low probably. This allows for multiple parties to trust and verify the authenticity of the data being recorded on the blockchain.
1 Like
  1. Hash functions are essentially a fingerprint for your input. Each is unique and you cannot derive the input from the hash.
  2. Hash is used to hash transaction data for bitcoin.
  3. Collision resistant means that if H(A)=H(B), then we can assume that A=B.
1 Like
  1. A hash function takes data of varying length and transforms it into a fixed length item. The output is unique to the input. And the input cannot be recreated if you only know the output.
  2. The bitcoin hash function is used to take transactions that need to be verified along with other data which points to the previous block as well as other transaction specific data and produce an output that can easily be determined to have solved the “problem”. The solution is evidenced by the output starting with several zeros. The effort is done in a trial and error type fashion until the solution is achieved. The block is accepted through consensus between different miners.
  3. Collision resistance is a properly of the hash function which makes it improbable that two different inputs result in the same output.
1 Like
  1. A hash function is a mathematical function that is deterministic, collision resistant, fast, puzzle friendly, and pre-image resistant. Hash functions can take an input value of variable length and give an output value of a fixed length.

  2. Hash functions are used to hash each transaction in each block to keep the blockchain secure, immutable and verifiable. Hash functions are also a crucial part of the mining protocol and the creation of public and private keys.

  3. A collision occurs when two different input values result in the same output value. Hash functions make a collision infeasible to happen.

1 Like
  1. A hash function is a unidirectional input resulting in a unique output.

  2. Each transaction is hashed to create an output that is secure and verifiable.

  3. Collision resistant is the infeasibility of two different inputs producing the same output.

1 Like
  1. Describe hash functions with your own words
  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).
  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).
  1. Hash function is a mathematical function which takes an unique input and gives out an unique result with a fixed length. And this is only one-way function.
  2. Hash functions in proof-of-work algorithm like bitcoin are used to write a new transaction into blockchain through the mining process. In bitcoin mining a hash function takes the most recent data from the previous block, which include block number, timestamp, difficulty target, nonce, the hash of Merkle Root.
  3. “Collision resistance” means that two different inputs A and B to have the same hash value in a certain algorithm is almost impossible. It is not impossible but when you are dealing with a huge amount of data like SHA-256 it is infeasible to have the same result from two different inputs.
1 Like
  1. A hash function is a unique input that gives a unique output. You can go from output to input. A good hash function cannot go from output to input.

  2. In the case of bitcoin, an input of transaction goes through a Hashing Algorithm that produces a fixed length of output wich is in alphanumeric.

  3. The Hash function being collision-resistant means that no two output should have the same output. The Hash function should never be used to produce same output and it is almost impossible to have the same output.

1 Like
  1. Hash function is a one way string of data that gives a unique output-digital fingerprint. Any change to the input will change the output.

  2. Hash functions are used in the mining process to verify transactions, create and link new blocks on the blockchain. Create bitcoin addresses -keys.

  3. Collision resistant means it is unlikely that two different inputs will generate the same output.

1 Like
  1. Describe hash functions
    A computation function that takes an input of random size and converts it to an output of determined size (such as 256-bit string of characters) and is a one-way function in that the input cannot be determined by the output in a feasible way.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Input (k) for the function H() can basically be of any length and is made up of transaction details, timestamps and other relevant data. The hashed output Y is of fixed size, so the hash result itself can be processed efficiently even with a large volume of input (k) data.

  3. What does it mean when we say that hash functions need to be collision resistant?
    It is important for H(A) and H(B) to not have identical result Y, which would be a “collision”. However H(A) == H(B) becomes infeasible if the hash inputs (k) have sufficient min-entropy.

1 Like
  1. A hash function is a function that produces a completely unique output for each unique input that it receives.

  2. Hash Functions like SHA-256 are used in Bitcoin and other proof of work cryptocurrencies in order to keep the blockchain data secure and immutable. Miners hash all of the contents of the each block. The hash of the block is then concatenated with an arbitrary random string called the ‘nonce’. Once this concatenation is hashed, it is checked, if the hash is lesser than the current difficulty target it is added to the blockchain, if it is not lesser than the difficulty level, the nonce is changed and the process is repeated until the requirements are met.

  3. Functions need to be collision resistant to ensure that two different inputs do not have the same hashes. Collision resistance ensures that the hashing function cannot be exposed via the birthday paradox.

1 Like

1 Describe hash functions with your own words.

Using a secure hash algorithm to generate a fix length value from an input of variable length of characters where a unique input produces a unique output and it normally goes one way only, that is input to output and not reversible.

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 Bitcoin and other crypto currencies to create a pair of public and private wallet addresses. It is also used for digital signatures and message authentication among others.

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 is collision resistant if it’s hard to find two inputs that hash to the same output value.

1 Like

Hash function are mathematical calculations that would process input data of any size and returns output data of a fixed size. They are working only one way so the input cannot be determined by using the output.

Hash functions are used in Bitcoin mining to write transactions into the blockchain. This process is called proof of work and results in creation of Bitcoin.

Collision resistance is preventing two separate inputs to produce same hash, however collisions can happen but it will take too long finding one.

1 Like

A hash function is a mathematical / computational method of producing a unique output from an input thus each piece of data entered will have its own unique digital fingerprint. The hash function is a oneway action and does not work in reverse meaning you cannot access the input data even if the output is known.

Hash functions are used in crypto to secure the network. Hashing speed is very fast and as the reverse function is almost impossible to hack, the data is secured from any form of compromise.

Collision resistant is a property of the hash function. It means that statistically there’s a very low probability (zero - almost impossibility!) for two different inputs to be given the same output hash

1 Like
  1. Hash functions are a type of one way function that translates or transforms inputs into a hash output or digital fingerprint.

  2. They are used in mining to make new blocks on the blockchain.

  3. That it is almost impossible to find two similar inputs that make the same output.

1 Like

1. Describe hash functions with your own words
It is a function where you can give an input and recive an output based on the calculation, but it is different from regular functions becaus of 2 important qualities. 1) Each unique input has a unique output. No matter how short input, the output has the same lenght. And the same input will allways give the same output. 2) Hash functions is a one way street. You can only for from input to output, never the other way.

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

In Bitcoin SHA-256 is used for hashing. The transactions are taken as input to the hashing and the result is a an output of fixed lenght. This links the previous and the next block together. All the previous data is locked into the hash.

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

It means that one input wont give the same result as a different input.

2 Likes