Homework on Hash Functions - Questions

Describe hash functions with your own words

one way functions which transform input text to unique output

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 encrypt the transaction data so its secure and only the intended recipient can decrypt it.



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 resistant means it is statistically unlike to generate the same hash for a different input.
  1. Hash functions it’s a routine who takes an input, and by a mathematical method, produces an unique output. Also has the particularly that you cannot reproduce the input data from the output data

  2. In the context of cryptocurrencies like Bitcoin the transactions are taken as input and run through a hashing algorithm uses SHA-256) which gives an output of a fixed length.

  3. It’s means that it’s highly unlikely (almost impossible) to get the same output from two different inputs.
    That’s why you should consider F(A) = F(B) it’s because A = B

  1. Takes data and converts it to output of 256 bits (or various bits depending on algor) thereby creating a unique digital fingerprint.
  2. It can create wallet addresses with unique private keys.
  3. 2 different inputs cannot generate or reproduce the the same output
  1. hash functions are one way functions where each unique input gives a unique output. Each input string gives an output of a fixed length.

  2. Bitcoin blocks are mined using the hash function system. When a new block arrives, all the contents of the block are hashed. Normally if the hash is lesser than the difficulty target, then it is added to the blockchain and everyone in the blockchain ecosystem acknowledges this. However it is not always that simple and the nonce which is an arbitrary string that is concatenated with the hash of the block is used in Bitcoin mining. The new string is hashed and compared to the difficulty level and seen if it’s less or not. If not, then nonce is changed and the process repeated until difficulty is less than the block. If so, block is added to the public chain and the miner rewarded in Bitcoin.

  3. Hash functions needs to be collision resistant because two inputs cannot equal one another, they must be unique. For example two inputs A and B where H(A) and H(B) are their respective hashes, it is not infeasible for H(A) to be equal to H(B).

  1. Describe hash functions with your own words:
    A hash function takes a string of data (of any length) runs it through a mathematical algorithm and returns an output of a fixed length.

  2. How are has functions used in cryptocurrencies like Bitcoin?:
    Hash functions are used to mine new Bitcoin, basically by trying to solve the puzzle (proof of work) and return a specific hash for that block.

  3. What does it mean when we say that hash functions need to be collision resistant?:
    Basically that for 2 different inputs eg A and B, the hashed outputs H(A) and H(B) should never ā€œcollideā€ or be the same, H(A) does not equal H(B).

  1. Hash functions converts strings of data into bits (amount depends on the formula being used, ex SHA-256). This process can“t be reversed --> increased security.

  2. Bitcoin uses hash functions to convert transactions into strings based on the imput (transaction), in bitcoin the string is created using SHA-256. In other words it gives a 256-Bit string.
    When miners are put into the picture, they are given ā€œpuzzlesā€ to guess. Miners eventually completes the puzzle and gets rewarded with ā€œxā€ amount of bitcoin, based on value of said puzzle.

  3. Collision resistant means that itĀ“s nearly impossible to get the same output from a hash function. For example, two different transaction values ā€œxā€ will not give the same out put.

1 Hash functions are functions whose outputs are unique to the input given. If it differs, even by just 1 comma or space, a new hash is created. They are also one way, meaning they cannot be reverse engineered. You cannot go backwards i.e from output to input.
2.Hash functions are created to ā€œsummariseā€ an all transactions within an individual block and are used to point from one block to the next thus ensuring the immutability of a blockchain.
3. Collision resistant should ensure that a blockchain cannot be hacked and the chances of guessing the output by creating an input are statistically improbable as it should ensure that two inputs almost never produce the same output

1: Hash functions are one way functions where each input produces an output.
2: A hash function in Bitcoin is used to hash transactions in each block and when a new block is added, then the hashing of the old block is added to the new blocked and all hashed together.
3: Collision resistance means that is very difficult to find 2 inputs that produce the same output in a hash function.

  1. Hash function is basically a fingerprint for each input. Anything you put as the input, gets converted to a specificoutput. Making a slighest change in the input would still produce a completly different output. It is not possible to know the input from the output, only the other way around.

2.Hash functions are used in mining. Miners use it to verify transactions and to create new blocks. They basically take all the inputs, add the nonce and then hash it again. The hash they get as the result gets compared to the difficulty level. If it is lower, then a new block is created, if not, the whole process repeats. It all happens randomly.

  1. It means that it is almost impossible to get exectly the same output from two different inputs.
  1. Hash functions turn inputs into outputs, the outputs are in a form of a digital fingerprint.
  2. Hash functions in cryptocurrencies are used to hash the transactions to keep the data secure.
  3. It should be almost impossible to get the same output from more than one input.

1: Have function is a unique ID for an input string.
2:

1 Hash functions are complex, one way functions that take as input any string of data and produces an unique alphanumeric output of fixed length, as digital fingerprint of the input data, making reversal infeasible.

2 In mining first to hash all the transactions of a block (yet unconfirmed), then with the concatenation with nonce.

3 That it is safe to assume that if H(a)= H(b) then a=b. (The case that with H(a)=H(b) a≠b should be VERY rare)

  1. Describe hash functions with your own words

A hash function is like a digital fingerprint for a data object. Essentially you put a string on any length in and get a fixed length output. The output for a given string should always be the same (using the same hashing function).

  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 protocol, hash functions are part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process.

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)

  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 resistant property of a hash function means that there is no two inputs that result in the same output in a hash function.

  1. A hash function is a way of taking an input string of any length and generating an output string with a fixed length.

  2. Bitcoin uses the SHA-256 hash algorithm to generate a output string in a way that requires a predictable amount of CPU usage. Generating a SHA-256 hash with a value of less than the current target solves a block and wins you some BTC!

  3. A hash function is considered collision resistant if it is hard to find two inputs that will hash the same output.

1 Like
  1. A hash function is a function that only allows you to go from input to output but not from output to input. These functions allow for enhanced security and digital fingerprinting. The hash function Bitcoin uses is Sha-256.

  2. Hash functions are used when mining bitcoin. These hashes are created and are used to validate record transactions on the bitcoin network. Each of these hashes when produced are created based off of the previous hash because of the Sha-256 function. This function is only able to determine input to output and not the other way around. This brings security to the bitcoin network since just because someone knows your public key doesnt mean they can reverse it to figure out your private key.

  3. Hash functions need to be collision resistent because you cannot have an 2 inputs both resolving to 1 output. That would create conflicts in the bitcoin network.

1 Like
  1. Hash functions are a function where any size input can be used to create a completely unique output of a uniformed size. The function can not be used to move from output to input.

  2. Bitcoin uses hash functions to batch together transactions in their blocks. It’s the simplest way to ensure that no information in the blocks have been altered to ensure the integrity of the blockchain.

  3. The hash function needs to be large enough that 2 different inputs will not create the same output (aka a collision).

1 Like

Describe hash functions with your own words.

  • A hash function is a one-way cryptographic mathematical algorithm that generate a bit string of fixed size that is produced from combining a given number with the connected function.

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 hash function in cryptocurrencies is the primary method used to ensure security of the blockchain network underlying a given cryptocurrency by preventing hackers or other bad actors from altering transactions. Specifically, a hash creates an unalterable fingerprint for any transaction it produces from a function, so that no information within the function can be changed without producing a new hash/fingerprint.

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 considered collision resistant or collision-free when no two input hashes can map to the same output hash without excessive time and resources.

A couple of good articles I ran across when researching.
Investopedia Blockgeeks

1.One way functions
2. blocks contain hashes from previous blocks in the chain
3. Very low probability that two inputs will the generate the same output hash

  1. Describe hash functions with your own words
    A hash function is a computational function which converts large amounts of data into a string of characters that is unique to the input data. Hash functions are useful due to the fact that they are deterministic, pre-image resistant, collision resistant, and game friendly

  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).
    Within cryptocurrencies, the hash function is used inconjuction with a pointer to create a hash pointer, which in turn is utilized to link one block of data to the prior block of data, creating a linked list, commonly known as a 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 is feasible, although unlikely for two different inputs into a hash function to generate the same hash output. A hash function which is image resistant is unlikely to generate a collision, despite its mathematical possiblility.

  1. Describe hash functions with your own words
  • A one way function, if you write unique input on a function, you’ll get unique output.
    Digital Signature
  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 function is used to create digital signature of each transaction of every block. also used to verify the transaction.
  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).
  • in my opinion, the collision resistant is to prevent redundancy of a private key, also act as hard shell so that it will be hard to crack by anyone who tries.