Homework on Hash Functions - Questions

  • Describe hash functions with your own words
    • Hash functions are one way functions that takes an input and produces a unique output id or digital fingerprint. There is no feasible way to use the output and determine what the input was.
  • 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. 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).
  • 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.
1 Like
  1. For each unique input you will give unique output or digital fingerprint. It is an one way function.
  2. Hash function was used in Bitcoin mining to encrypt transaction data
  3. Collision resistant means it is unlikely to get same output from hash function. Most functions are not collision resistant.
1 Like
  1. a hash function converts a random string of data into a fixed lenght string of data, where the output can not be traced back.

  2. hash functions are used in the bitcoin mining process. Miners have to calculate a hashed output based on the underlying previous data from all blocks in the past.

  3. collision resistant means that every input/output pair can exist only once. Another pair with the same output but different input is impossible, because the outputs would collide.

1 Like
  1. Hash functions are hashing algorithms that take an input string of any length and generate a hash of fixed length.

  2. Hash functions are used in the mining process to determine which blocks are added to the blockchain ,with cryptocurrencies like Bitcoin the transactions are taken as inputs then run through a hash function like SHA-256 which gives an output hash.

  3. This means that different inputs should not generate the same output.

1 Like
  1. Hash function is a special function where for an input you get an unique output. Special thing is that with hash function output you cannot find out the input.
  2. Hash functions are used in bitcoin for transactions where each input is ran through a hash function. Miners than try to ā€œguessā€ the hash and thus confirming the transaction and getting the reward.
  3. Collision resistant is basically the chance of two different inputs giving the same output (hash). Harder it is for that to happen, better the hash function, in sense of bitcoin.
1 Like
  1. Hash functions are one way functions where each unique input produces a unique output (one way function) creating a digital fingerprint.

  2. Hash functions are used in crytpocurrencies like bitcoin because they can hash transactions creating unique outputs which can’t be reversed.

  3. Collision resistant is part of cryptographic hash functions. This means that it is extremely difficult (almost impossible) to find the two inputs that hash to the exact same output. If there is a collision then you get the same output for two different inputs and can compromise the system.

  1. Hash function is a function which takes an input string and converts it to a fixed length output called hash. This hash is calculated in such a way that just by knowing the output, you cannot really know which input was used to produce it which makes it one-directional.

  2. When a new block is added it need so include a hash of previous block + current block + a randomly generated nonce. Miners need to find a specific nonce that produces a specific hash which is considered valid according to the network rules, only then a miner is able to include that block. This ensures that a specific amount of work has been put into finding the correct hash, as finding it is hard. Everyone else can then validate that the input miner used does indeed produce a valid hash. This is basically how the Bitcoin consensus works - called proof of work.

  3. Collision means that two inputs generate the same output, this is a problem since a different input can be used instead of the original input. Collision resistence means that a hash function can produce a hash that is complex enough where such collisions are harder to occur. MD5, for example, suffers from this issue.

1 Like

It is a mathematical function that take a parameter of any size and returns a hashed value of a fixed size

Bitcoin uses hash functions as part of the ā€œblock hashing algorithmā€ which are then used to write new transactions into the blockchain during the mining process.

Taken from: https://www.coindesk.com/bitcoin-hash-functions-explained

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

It means that two given inputs of differing values will never produce the same hash output (or unless it is your birthday!)

1 Like

Hashing is a method of encrypting digits so they the result looks like random numbers

The hash function in bitcoin is the function of combining the new input data and the pointer and additional random data (nonce) so the output is a fixed length and encrypted

Hash functions need to be collision resistant so that two different inputs do not have the exact same output

  1. A hash function is a special function (calculation) that turns an input value of any size into a unique, fixed length output value which can be regarded as fingerprint of the original value. It should nearly impossible to determine the input based of the hash output.

  2. Crypto currencies use hash functions to encrypt and protect their data (transactions) in blockchains.

  3. A ā€œcollisionā€ is when two or more input values produce the same hash output value. This does occur but must be exceedingly rare for a hash function to be considered secure.

1 Like
  1. Hash functions are created when an each input produces the unique output.

  2. The input goes through a hashing algorithm is you get an output with a fixed length.

3.Every input creates a unique output. This allows each input even exact copies will to never have the same output.

  1. Describe hash functions with your own words

Hash function means taking an input of any length and returning an output of a fixed length. each unique input will produce a unique output. (unique digital fingerprint)

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

In bitcoin new transactions are taken as an input and run through a hashing algorithm that returns a unique output of 256 bits.

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

It means that there need to be very little to almost no chance of 2 different inputs returning the same hash.

1 Like
  1. Hash function are a one way function meaning that you can always go from input to output, but never output to input. The same input will always have the same output, and if the input get’s changed even the slightest you get a completely different hash.
  2. For transactions, the output of that transaction is then stored in the blockchain.
  3. Collision resistans means that it needs to be very unlikely/impossible that two different inputs can have same outputs.
1 Like

1)Hash functions are one way function using unique inputs to get unique outputs and a change in the information will result in a different output.
2) Bitcoin includes inputting transactions into the Sha-256 hashing process which converts the information into a output with a fixed length named a hash.
3) Hash collision is when 2 different inputs have the same output and if this happens the algorithm will be open to collisions attacks which can threaten security.

1 Like

hashfunction generates unique output of fixed size from input of any size,
generating an input from the hashed digest is impossible (one-way-function)

miners combine certain input data (not-yet-transactions, timestamps, reference to previous block)
to solve the output data. That means generate a digest with 18 zeros.

a hashfunction is collision resistant if it’s not possible to find a different second input which yields to the same digest as the first input.

1 Like

Hash Functions Task - Questions Describe hashes in your own words.

The hash function is basically to take an input string of any length and generate an output of fixed length, that is, it is deterministic, it generates an unalterable fingerprint, it is a one-way function, they are highly resistant to collisions.

hash functions in cryptocurrencies like bitcoin? (Try researching this on your own, we’ll cover this later in the course, but challenge and see if you can find information on this now.)

The hash as a cryptographic function is applied to any data set, this generates as a result a random and fixed-length hash, which will always be the same for that same data.
If we change any input data, the resulting hash will be different. allows us to verify that the information included in a block has not been modified. It is used to prevent counterfeiting of transactions and to prevent malicious actions.
Hashing is a key process in creating blocks, moreover, it is also used in multiple steps, since the miner must associate the transactions with the block. To do this, use the hash function to create the Merkle Tree.

What does it mean when we say that hash functions must be collision resistant? (We didn’t use the term ā€œcollision resistantā€ in the lecture, but you’ll find it easily on Google, we intentionally added this question so that you search for information on your own, that’s how you learn best.)

collisions occur more frequently in bad algorithms, generally hash functions are designed to be collision resistant, that is, it is not feasible for two hash inputs to be generated with the same hash output.

1 Like

1.) Hash functions are a mathematical way for an input to be bestowed with no way back to the original source…
2.)Hash functions are the thing that makes bitcoin so secure.
\3.) Hash functions should not coinside with one another.

1 Like
  1. Sha 256 hash functions have a hexadecimal system used to encode the input with a 64 character string of numbers and letters. Hash functions are a one way system and if they go two ways they have broken their security
  2. hash functions encode all the data in the previous block
  3. collision resistance is when there is a possibility of 2 inputs equalling the same output. This chance is 50% of the Sqrt of the bits in a hash. E.g. 128bit hash has a 50% probability of equalling the same input after 2^64 guesses of the hash through brute force.
1 Like

Hashfunctions are such that for any given input the output is unique to that input (almost) and given the output you cannot go back to the original input

hash functions are used in cryptocurrrency transactions to ensure the chain of transactions consistency. ie you cannot modify one transaction without having to modify the complete chain of traansactions

collision resistance means that that it is unfeasible for two input toproduce the same hash

1 Like
  1. It must be a one way function. Where you input and u get and output but cannot use output to get input.

  2. Each block in the blockchain have hashes to make you trace from the latest block to the earliest, vice versa. Making it difficult to sabotage the first, middle and latest block.