Homework on Hash Functions - Questions

  1. Hash functions are a formula that takes an input and output it into numbers and letters. If you use the exact same input the output will be the same. If you change anyting at all the output will be completley different. You allso cant reverse the hash to find the input data.

  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-resistant is if it is hard to find two inputs that hash to the same output. This is vital for the security of the blockchain.

1 Like
  1. Describe hash functions with your own words
    A hash function is a mathematical process that takes input data of any size, performs an operation on it, and returns output data of a fixed size.

  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 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. 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).
    you can’t find any two inputs to map to the same output

1 Like
  1. Describe hash functions with your own words
    One way functions.each one produces a digital fingerprint

  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). They are used to create blocks in the blockchain.

  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 the results will never be the same

1 Like
  1. Hash functions are non reversible and an input gives a unique output.
  2. Hash functions are used for activities such as confirming transactions and for mining.
  3. Collision resistant is when one specific input gives one specific out. No other input will give this output.
1 Like

1.Hash functions require an input to get an output and each input has a unique output. This ensures data integrity.

2.Hash functions are used to mine bitcoin. This way we have data integrity moving in a linear course considering you can’t go from output to input.

  1. This means that we must be able to have only one input for one output ensuring a digital fingerprint. If we could have two possible inputs for one output this could possible ā€œbreakā€ blockchain and one of the main ideas behind the technology would be ruined.
1 Like

Answers:

  1. Hash functions allow for one-directional conversion of a unique input to be converted to a unique output;
  2. Hash functions are used in crypto currencies like BTC as part of the mining process, where miners on the network use their computer power to calculate a hash vale (i.e. using information from the block’s header as the input) which needs to be less than a targeted value. This is basically a lottery process and the miners must try to get the correct value through repeated calculation iterations to earn block rewards (i.e earn BTC);
  3. Collision resistance is a cryptograph property where it is highly difficult to find two inputs into a hash function that produce the same output. (i.e. where, input a = input b but output a ≠ output b.
1 Like
  1. Hash functions are one way functions that produce an extremely unique digital fingerprint. This fingerprint uses a combination of numbers and letters that is difficulty to reverse or break the code.

  2. Hash functions are used to create transaction data. This hash function will take some transaction data and transform it into ā€œ256- bit (32-byte) hash valueā€.

  3. Collision resistant in cryptography is difficulty finding two inputs that hash to the same output.

1 Like

Hello All,

A nice article explaining the difference between encryption and digital signature is here:

https://dzone.com/articles/encryption-and-signing

The role of public, private keys and hash functions and when to use what is explained nicely in this article.

Enjoy reading :grinning:

Cheers
– Rays

1 Like

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words

A hash is the result of a mathematical process, an algorithm or algorithms. Hashing takes the input of the function and produces an output that is encrypted, non reversible, and stays the same every time the same input is fed to the function. This allows verification that the original item has not changed. This is verified when a subsequent hashing is found to be equal to the original hash value.

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

The blocks, after the initial block, in a blockchain, carry a hash of all previous blocks. This hash is smaller in size than the originating blocks which allows increase transaction speed over a non hashed chain.

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

Two inputs into the has function should not produce the same output. This is important in that the item hashed could be replaced by a different item that hashes to the same output as the first and no one would know by using a hash as a verification function.

1 Like
  1. Describe hash functions with your own words

Hash functions are a subset of functions used to create unique strings based on their input using a type of algorithm. As a unique representation of any content in the form of a certain amount of bits. De type of hash function used usually determines the format (and size) of the result.

  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 used to counter the fabrication of false transactions. The use-case for hashes is that it helps to uniquely identify things in the digital space. Blocks in the blockchain for example have a header containing the hashes of both the merkle-tree as well as the hash of their predecessor.

  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 means that no two inputs will result in the same output. If this would be the case, then it’ll significantly easier to ā€œbreakā€ the algorithm since you’ll be able to result in a certain output more easily if there are multiple inputs that’ll lead there.

1 Like
  1. a hash function converts data into Bits depending on the function used

  2. Bitcoin and many other cryptocurrencies use SHA-256 because its a liner algorithm that makes it nearly impossible to find the input value from the output value, all while creating a digital fingerprint that miners will use to validate blocks.

  3. Collision resistant is describing a hash that is hard to get one output (mathematically insignificant) from two different inputs

1 Like

1.Unique input that gives a unique output (digital fingerprint) with no reverse.
2.In the bitcoin protocol, hash functions are part of the block hashing algorith wich is used to write new transactions into the blockchain through the mining process.
3. That it need to be computationally impossible to find two colliding inputs.

1 Like
  1. A function that takes an input and provides an output and has the following characteristics:
  • Is irreversible (cannot determine input out of output)
  • produces same result every time
  • small change in input will completely change the output
  1. In order for miners to find a nonce to produce the block, they put random numbers through hash function. If the hash of the input meets certain criteria, the block can be added to the blockchain.

  2. It means that it is hard to find two similar inputs that provide similar outputs.

1 Like
  1. A hash function is where an input creates a unique output or digital fingerprint. This allows you to check the integrity of a file.

  2. Hash functions are used in cryptocurrencies used as a part of the hashing algorithms to write new transactions into the blockchain through a process called mining.

  3. Hash functions need to be collision resistant so that it is hard for 2 inputs to hash to the same output

1 Like

1. Unique input gives unique outout. Basically text is put into ones and zeros and then pushed into a specific hash function with gives unique hexadecimal result. Even a smallest change in text totally changes the hexadecimal result.
2. Bitcoin is simply a digital ledger of hashes that utilizes proof of work combined with SHA-256 to obtain mathematical traceability and unbreakability.
The process through which this is ensured is called bitcoin mining that utilizes Bitcoin hashes generated through SHA-256 function at various steps of mining.
3. A hash function is collision resistant if it is hard to find two inputs that hash to the same output.

1 Like
  1. Describe hash functions with your own words

It’s an alphanumeric code that can’t be reversed.

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

They are used to safely transfer encrypted data across the blockchain.

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

two of the hashes cannot be connected with each other!

1 Like

1- A hash function is a function that produces a unique output for each unique input. One characteristic of the hash function is that you can’t use the output to deduce the input.
2- Hash functions in cryptocurrencies is used to create the unique digital signature of each block in the blockchain
3- Collision resistant of hash function means it’s nearly impossible for 2 different inputs to get the same hash or digital signature

1 Like
  1. It is a mathematical conversion of an amount of data, does not matter the size, into an output of fixed length.
  2. they are part of the block algorithm to write new, not yet confirmed transactions. This process is called mining. To successfully ā€˜solve’ a block, miners try to combine all of the inputs with their own arbitrary piece of input data in such a way that the resulting hash starts with a certain number of zeroes.
  3. It is a hash property that makes the probability of 2 inputs generating the same hash so low that it is statistically insignificant.
1 Like
  1. The algorithm takes an input (could be letters numbers or symbols) and translates that data into an alphanumeric ā€œstringā€. The output (string) of the function is called the Hash.
  2. The hash function is used during crypto transfers. The destination address is a hash algorithm. Also, each block has also a hash of the previous block so every block will always stay in the correct order.
  3. It means 2 different inputs are highly likely to give the same output.
1 Like
  1. Describe hash functions with your own words

    Each unique input, produces a unique digital fingerprint.
    It is a one way function. It only goes in one direction. Input to output. Never Output to input. So it cannot be ā€œback engineeredā€.

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

In bitcoin protocol, hash functions are part of the block hashing algorithm used to write new transactions into the blockchain through mining.
Bitcoin mining uses cryptography, with a hash function called double SHA-256.
A hash takes a chunk of data as input and shrinks it down into a smaller hash value (in this case 256 bits ).

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

It means that each distinct input needs to have a distinct output.
There cannot be 2 distinct inputs with the same output.

1 Like