Homework on Hash Functions - Questions

  1. Has functions are mathematical operations that a) take inputs and give unique outputs for that input and b) in such a way that it is impossible to determine an input by an output.

  2. Bitcoin uses the hash function as a proof of work, to verify transactions in such a way that they are both verifiable and secure while unreproducible.

  3. That means that it is very difficult to find 2 inputs that produce the same output

1 Like
  1. Describe hash functions with your own words
    A hash function converts data or a file into a unique digital footprint (alphanumeric code). It is a one-way function because you cannot use the output to get 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).
    In crypto-currency the hash function is used to convert the block’s header (which is a set of verified transactions) into a hash. By doing this the block will be publicly identifiable by the hash output, but it will be almost impossible to modify the block because it is almost impossible to find get to the initial block.
  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).
    The hash function needs two be collision-resistant so that the outputs produced by the hash function will be the unique digital footprint of the input.
1 Like
  1. Hash function converts input into output. The same input leads to the same output. The chance that you can determine an input from an output should limit to 0. But you never know, some has functions were cracked already.
  2. The has is used in the mining. Miners mix transactions into a block and then hash them. The hash needs to begin with certain amount 0, which is defined by the network. First minor creates such result mines the block and will be rewarded. Another use case is the private vs public key. Users have private keys which generate public keys and these are recognized by the network. To move BTC from 1 place to another you need to have these keys.
  3. Collision resistant - how difficult is to guess an input of a hashed output.
1 Like
  1. Hash functions are one-way functions that hash unique input data to produce a unique output in the form of an alphanumeric string of a fixed length.

  2. New transactions that are added into the blockchain network are hashed by the SHA-256 algorithm. The input data from a transaction is taken and converted into a unique hash with 256-bits length. Regardless of the input data’s length, the output hash will always have a fixed length of 256-bits.

  3. It means that hash functions need to be resistant to having two or more different inputs to produce the same output. However, collision-resistant in hash functions is infeasible, not impossible because hashes can be compared to each other by using different input data. But in blockchain, the probability of finding the same output using two different inputs is infinitely small because each hash has a fixed length of 256-bits.

1 Like

A collision means that more different inputs produce the same output. You are describing the difficulty to brute force an output.

  • Describe hash functions with your own words

It is a function with the properties that:
(a) for different inputs it will create (most probably) different outputs
(b) given the output data it is not possible (most probably) to deduce the input where it came from

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

One way they are use is in minning. The data to create a block in the block chain is hash to create a value, the network has a target value to be achived in orden to include this block in the ledger, so miners add a ā€œspice numberā€ called nonce to create different hash values until this value hits the target hash value precribed by the network algorithm.

  • 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 there is no practical way we can generate a file that match exactly a prescribed hash value. That is, it avoids (most probably) the case where to different files have the same hash value.

1 Like
  1. Hash function works only input to output method. You can only put some data in and a result comes in specific numbers and letters. It is impossible to go another way around. Every hash leaves a specific fingerprint.

  2. Bitcoin uses SHA-256 function to make an input and run through a hashing algorithm which gives an output of a fixed length.

  3. It means that no one can break hash function which means to go from output to input.

1 Like
  1. Describe hash functions with your own words

    -the hash function produces unique output, and if you change the slightest element in your data then you get completely different output, also you can’t reverse it

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

    -it needs to be one-way, from input to output, otherwise it’s insecure

1 Like

A hash function is a function that takes any digital input (alphanumeric or media) and outputs a unique digital fingerprint for that input.

Hash functions are used in cryptocurrency to identify individual blocks in the blockchain and also as a test for miners to solve a block in progress so that it can be verified and added to the blockchain

A hash is said to be collision resistant if it is very difficult to find 2 inputs that give the same output.

1 Like

Collision resistance explains the probability of two inputs resulting in the same output. :slight_smile:

1 Like

Homework on Hash Functions:

1: Describe hash functions with your own words.

A: A hash function is similar to a fingerprint, only of a digital kind. Each unique input produces a unique output.

Q2: How are hash functions used in cryptocurrencies like bitcoin?

A: In bitcoin hash functions form part of the block hashing algorithm used to write new transactions into the blockchain through the mining process. These hash functions require large amounts of processing power that means new bitcoins get mined over a long period of time, not all at the same time.

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

A: When it’s said that hash functions need to be ā€˜collision-resistant’, it’s referring to the property of a hash function that is computationally infeasible to find two colliding inputs. If two separate inputs produce the same hash output, it is called a collision.

1 Like
  1. A hash function is a algorithm that takes a input and creates a irreversible output which is also called a 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.

  3. Collision resistance is a property of a cryptographic hash function. The harder it is to find 2 inputs giving the same output, the more collision resistant the hash function is.

1 Like
  1. Describe hash functions with your own words
    Generation of a output based of a input
  2. How are hash functions used in cryptocurrencies like bitcoin?
    Used to write new transactions in blockchain
  3. What does it mean when we say that hash functions need to be collision resistant?
    Low probability of two input generate the same output
1 Like
  1. Describe hash functions with your own words
    ==> Hash function is a uni-directional process that processes data in any form or size to produce an alphanumeric string as 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).
    ==> In bitcoin mining, the inputs for the function are all of the most recent, not-yet-confirmed transactions (along with some additional inputs relating to the timestamp and a reference to the previous block).

  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).
    ==> The key feature for Bitcoin blockchain is that it needs to have a unique output for a set of varied input parameters.

1 Like
  1. Describe hash functions with your own words
    Hash functions are mathematical instructions for collecting, combining individual numerical values to produce a distinct fixed output or value. The production of fruit cocktail is an easier illustration of hash functions. While identifiable fruits are combined to produce a distinct fruit juice blend with unique taste and colour, the individual fruits cannot be separated back and tasted individually. The hash function should produce the same result all the time and with a slight modification will produce a different result.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    In cryptocurrencies, hash functions are used to generate new transactions on the blockchain as part of the mining of new coins. The hash function permanently determines proof of work and anything that does not confirm to the original hash function inputs cannot be admitted into or out of the blockchain. Hash functions are a very specific instructive language for the execution of tasks and proofing.

  3. What does it mean when we say that hash functions need to be collision resistant?
    The collision resistance of a hash function is its ability to not produce the same output from two different input strings. This is the anti-hacking power of the hash function in the blockchain. A system that is not collision resistance is vulnerable and can be compromised easily.

1 Like

Describe hash functions with your own words

Hash functions are taking an input of any kind and given it’s own unique output, like a digital fingerprint.

How are hash functions used in cryptocurrencies like bitcoin?

Hash function are used by miners to write new transactions into the blockchain.

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

If two inputs produce the same output, this is a collision. It’s important to have collision resistance in hash functions otherwise the system can be cheated and is no longer secure.

1 Like

1) Describe hash functions with your own words
A hash function is a one-way function. A unique input produces a unique output. It is impossible to determine the input from the output.

2) How are hash functions used in cryptocurrencies like bitcoin?
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.
Source: https://www.coindesk.com/bitcoin-hash-functions-explained

3) What does it mean when we say that hash functions need to be collision resistant?
A hash function is collision resistant if it is hard to find two inputs that hash to the same output. For example, if we have inputs a and b and H is a collision resistant function then H(a) = H(b) will not be possible.
Source: https://cryptography.fandom.com/wiki/Collision_resistance

1 Like
  1. Hash function is the translation of the any digital information and translates them into an alphanumeric string of a certain size. For specific input there is only one corresponding output. If we change any smallest detail in our input data it will provide us with totally different hash.
  2. Every new transaction together with previous block will create a new block which is hashed to provide immutable network. Then this hashed block is submitted for mining -> it’s confirmed when miners find out the solution to that mathematical mystery by guessing the answer. Once it’s found transaction is confirmed and new block is minded.
  3. Collision resistant it means that for the input there is only one possible output. We cannot have the same output for two different data (input). Every input has their own unique output - hash.
1 Like
  1. Describe hash functions with your own words

A hash function is when you input some information and use SHA-256 for example to create a digital fingerprint for that 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).

Hash functions that are used in bitcoin keep it secure by encrypting all transaction data through SHA-256 and then added to the blockchain. Once this transaction has been approved through the cycle of provenance, consensus and finality it is then added to the blockchain and at this point the transaction cannot be deleted, copied or reversed.

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

The meaning of collision resistant is that no 2 inputs should result in the same output in a hash function.

1 Like

uestions

Hash functions generate a large random number as a private key. Then they use the p.rivate key to compute another number as a public key. A public key can’t generate the private key.

Hash functions are used to write new transactions into the blockchain through the mining process.

Collision resistant means that is hard to find two private keys that generate the same public key.

1 Like