Homework on Hash Functions - Questions

  1. Describe hash functions with your own words

It is a function that converts data to a digital fingerprint. Using hush function we cannot go from the output to the 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 the bitcoin 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.

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

It is impossible to find two inputs leading to the same output

2 Likes

Describe hash functions with your own words

  • when we talking about hash functions we need to understand two things
    one is that from every input in the function we are receiving totally different digital unique fingerprint
    The second thing is that from the input we can go the output, but to go from this unique output that we create back again to the same input is impossible
    Hash function is a one way function

How are hash functions used in cryptocurrencies like bitcoin?

  • They are part of the hashing algorithm which is used to write new transactions into the blockchain through the mining process. To mine a bitcoin we need a large amount of processing power over a long period of time, not all at once.

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

-In cryptography, collision resistance is a property of cryptographic hash functions. A hash function is collision resistant if it is hard to find two inputs that hash to the same output. Collision resistance is the property of a hash function that it is computationally infeasible to find two colliding inputs.

1 Like
  1. Describe hash functions with your own words
    Hash function is a function that takes an input and then generates hash based on that input. Each input will create a unique output or hash. This output/hash can also be seen as a digital fingerprint. It’s a one way function which means that its almost impossible to reverse engineer the hash in order find out the input.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    In bitcoin hash functions are used in mining in proof of work algorithm. Transactions as well as some metadata are used as an input for the hash functions. In order to solve a block the mining machine will try to add the additional input next to the transactions and metadata until they get a hash that starts with a certain amount of 0s in front. Once they find the ā€œcorrectā€ hash the block is solved and they get the reward.

  3. What does it mean when we say that hash functions need to be collision resistant?
    If a hash function is collision resistant it means that it is very hard to find the same output for different inputs. The harder it is the more secure the function is.

1 Like
  1. Hash function creates a unique output for every unique input. Changing even a dot or space in the input completely changes the hash function output. It is also irreversible, meaning the unique output can’t be converted back to the original input.

  2. Hash functions in bitcoin are used to write new transactions onto a blockchain. This happens during the mining process.

  3. Collision resistance means that it’s hard to find two inputs that hash to the same output. This means, that a hash functions with more inputs than outputs will have a collision.

1 Like
  1. Hash function takes input and creates unique output and you cannot reverse this process. By looking at the output there is no way of knowing what the input was

  2. In cryptocurrencies like bitcoin hash functions are using most recent not-yet-confirmed transactions as input. All computers in the network are trying to solve hash function by combining all inputs and adding some arbitrary piece of data in the way that will produce the hash starting with certain amount of zeros.

  3. It means that it needs to be very difficult to find two different inputs that will generate the same output

1 Like
  1. Hash functions are equations that will produce one unique output based on one unique input.

  2. Hash functions are used in Cryptocurrencies because they are used to write new transactions involving Bitcoin as part of the Blockchain.

  3. Hash Functions need to be collision resistant meaning that even if there are particular inputs that are different, they may result in the same output. Collision Resistance in this instance refers to the fact that it is possible that two different inputs can have the same output, it is extremely rare and highly unlikely.

1 Like

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words

-Hash functions are ideally a one-way mode of converting (algorithm) a ā€œmessageā€ of any given length into a unique ā€œfingerprintā€ output of a fixed length.

  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 in cryptocurrencies like bitcoin as the method by which computers mine new blocks incentivized by the reward of newly minted coin. A computational race (more akin to a lottery) to solve the next hash of a new block happens about every 10 minutes. This ensures the cryptographic security and integrity of the bitcoin network.

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

-A hash function that is collision resistant means that it is difficult to find two different inputs that will result in identical outputs. The harder it is to find such collisions, the more ā€œsecureā€ the hash function is considered to be.

2 Likes
  1. Describe hash functions with your own words

Hash functions. I would describe has functions as a mathematical function that specializes in garbling the input into a unique and irreversible output. SHA 256 for example has never been reversed. How amazing is that.

Anyone please comment and let me know if my answer #2 is accurate or not

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

So, in my novice view, hash functions are used in crypto mining to create a complex digital signature for each new block. I don’t think hashing is used for private wallet keys or for P2P transactions, but rather for the identification of new coins. My guess is, the coin itself is the input to the hash function. The output gets transmitted to all the other blocks, upon which the hash output is checked and verified. This makes certain that no forged bitcoin can enter the blockchain, and it creates proof of work because the miner must hash an incredibly complex mathematical input in order to create a new block in the blockchain.

  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ā€ is the phenomenon of two different inputs creating the SAME output. This could be exploited in all kinds of nefarious ways. A collision would bring about the immediate end of any cryptocurrency based on that specific hashing algorithm. Each transaction on the blockchain is a unique input, so it must have a unique output. If the outputs get mixed up we’re basically screwed.

2 Likes
    1. A hash function uses an algorithm to create a unique alphanumerical output for any (no matter what data this is) input. The aim is, that the output cannot be ā€œcalculated backā€ to find what the original input data was. Also, this provides a ā€œdigital fingerprintā€. Even the slightest change in the original data will result in a completely new output.
    1. Cryptographic hash functions generate a fixed-length character strong from data records of any length. The function is used for security purposes. An example: every transaction is hashed – this hash value can be later used to identify transactions on the blockchain.
    1. Collision resistance: it must be impossible to have two different inputs resulting in the same output.
2 Likes

1)Describe hash functions with your own words

Any type of input which goes through hashing is than vizualized as numbers and letters. It is unique digital fingertip for that input and nobody can find out what was original input.

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

Every new block has his unique hash(signature) and every block which follows it has hash from previous block. Like this is very difficult to change any block and make false block.

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

This means that is not possible to sistematicaly find key to the output.

2 Likes

You’re correct. PK cryptography uses the Elliptic curve function for deriving public keys. :slight_smile:

1 Like

Collision resistance is the possibility of two outputs resulting in the same output. :slight_smile:

1 Like
  1. Describe hash functions with your own words: unlike normal functions you can’t go from output to input. Unique input and unique output. Fingerprint.
  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.
  3. What does it mean when we say that hash functions need to be collision resistant?: making sure no outputs are matching each other
1 Like
  1. Hash function is putting in input and function then crypts it givin input a unique output ( digital fingerprint of input )
  2. Hash functions are used in Bitcoin as mining function and is eventually verifying every new transaction made on network.
  3. Collision ressistant means it cannot have 2 inputs resulting in the same output. At least not through hash function.
1 Like
  1. Describe hash functions with your own words
    Hash functions create a digital fingerprint (unique output) based on the input to the function. They are a one-direction function, you cannot get back to the input given the output.

2.How are hash functions used in cryptocurrencies like bitcoin?
Hash functions are used to write new transactions to the blockchain – part of the mining process. The hashs within the blockchain are used as input to form the next block. Miners hash a combination of unconfirmed parts (hashes) of the blockchain with their own arbitrary input until they create a hash that starts with a number of zeros (this was 18 in 2017) – so they’re repeating the hash with different inputs til they get a result they’re happy with.
Good article: 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 collision would be when more than one inputs provide the same output. Hash functions must ensure it is very difficult, and unlikely, that more than one input would result in the same output. Previous functions have been proven to have failed e.g. MD5 that is no longer deemed best practice.

1 Like
  1. Hash functions are a mathematical process that gives an output from a given input.
  2. Hash functions are used to confirm new transactions on the blockchain. These computations are done by miners and after each block is created is added to the blockchain. For each hash function, it takes approximately 10 minutes to be solved in the bitcoin blockchain this is the reason why mining takes such a high amount of work and time.
  3. When we say that a hash function is collision-resistant it means that given 2 different inputs will never compute the same output.
1 Like
  1. Hash functions are procedures that associate a unique input to a unique output in a non-reversable way
  2. They are part of the algorythm used to create a block that if solved assignes the reward that locks the new transactions in the blockchain
  3. It means that there can’t be two colliding inputs in a hash function
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, and with a unique result or fingerprint.

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

    Hash functions are widely used in blockchain to protect the integrity and immutability of data stored on the distributed ledger. Since the ledger is stored in a decentralized fashion, with each node maintaining its own copy, ledger immutability is critical. Otherwise, nodes could change their versions of the ledger to their own benefit, breaking the network’s consensus.

    This is vital to the blockchain security. If a blockchain’s hash function becomes vulnerable to attack, then the security of the entire system is broken.

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

    This means that it must be extremely unlikely, or practically impossible to find two different inputs that produce the same output.

    Here’s the problem:

  • The Inputs to a hash function can be of any length. This means there are infinite possible inputs that can be entered into a hash function.

  • The Outputs are of a fixed length. This means that there are a finite number of outputs that a hash function can produce.

    Since the number of inputs are essentially infinite, but the outputs are limited to a specific number, it is a mathematical certainty that more than one input will produce the same output.

    The goal is to make finding two inputs that produce the same output so astronomically improbable that the possibility can be practically dismissed outright. It should not pose a risk.

Bibliography
https://resources.infosecinstitute.com/topic/hash-functions-in-blockchain/
https://blog.komodoplatform.com/en/cryptographic-hash-function/

1 Like
  1. Hash functions are a way to create fingerprints that cannot be modified by others.
  2. n 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. It is collision-resistant if it is hard to find two inputs that hash to the same output; that is, two inputs. Any hash function with more inputs than outputs will necessarily have such collisions; the harder they are to find, the more cryptographically secure the hash function is.
1 Like
  1. Describe hash functions with your own words
    Given an input you get a unique fingerprint as output and you cannot reverse the process
  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 SHA256 is used for mining and creation of BTC addresses
  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 harder it is to find two inputs with the same output, the more cryptographically secure the hash function is
1 Like