Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
    A function whose input cannot be reproduced from its out put BUT for which the same input always gives rise to the same output.
  2. How are hash functions used in cryptocurrencies like bitcoin?
    The password is encrypted and the result is stored.
    When user inputs a password, it is hashed and only accepted if the output is same as the originally stored output.
  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 hard to find 2 inputs that give rise to the same output
1 Like
  1. Describe hash functions with your own words

Hash functions are

  1. One-way - you cannot figure out the input from the output
  2. A unique input gives the same unique output each time
  3. Can take any data input and always produces a number of the same size

With these properties it is possible to use them to tamper-proof data since any change to the data would produce a different hash.

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

In Bitcoin each block is hashed to produce the block hash which needs to be below the difficulty number.
The result of this is easy to verify for other nodes but it is difficult to find a block with the right nonce to produce the correct block hash.
This is used to create the proof-of-work mining algorithm that keeps the Bitcoin network secure by creating a computational cost for producing a block.

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

A collision occurs if two different inputs produces the same hash, this is theoretically possible but statistically unlikely to occur (and therefore hash functions are collision resistant).

1 Like
  1. A hash function is a function where a unique input creates a unique output where if you change 1 little thing the whole output becomes different
  2. Hash functions are used for writing new transactions into the blockchain. They are part of bitcoins algorithm.
    3.It means that 2 different inputs cannot create the same output.
1 Like
  1. Describe hash functions with your own words.

Taking input data of any length through a mathematical algorithm and producing a string of characters that represent the original input but are of a set length given the particular algorithm used.

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

Hash functions are part of the block hashing algorithm which adds new transactions into the blockchain.

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

It means that no two inputs will produce the same hash value.

1 Like

1.) Hash functions are functions that allow transfers of unique data on the Blockchain
2.) Hash functions are used to hash a public key that adds security to the public address
3.) Two inputs do not compute the same outputs

1 Like
  1. Describe hash functions with your own words

Hash functions take any input and convert it into a “hash”. A hash is a unique output based on the user’s input. Hash functions are “one-way” functions in the sense that you cannot determine the input of a function solely by looking at the output making them a strong form of encryption.

  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 add new transactions to the blockchain. Transactions are run through a hash function and the output it added to the 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).

A function is collision-resistant if it is difficult to find two or more inputs that result in the same output.

1 Like
  1. A hash function is a one way function where you can take an input and get an unique output (like a Fingerprint), but you can never go from that unique output to the input

  2. They are used to add new transactions to the ledger by the mining process

  3. Collision resistant means that you don’t produce the same output by two different inputs

1 Like
  1. hash functions take whatever input you give it and convert it into 256 bits (in bitcoin)

  2. hash functions are used to write transactions into the block chain through mining.

  3. it means that we can’t have two different inputs equal the same output

1 Like
  1. A hash function is a way of inputting produces a unique digital fingerprint (any type of information) that cannot be reversed. You input the information into a hash function but cannot go from the output created as a hash to its original input. It’s a one-way function. It’s also an essential part of information security.

  2. Hash functions are used in bitcoin (or bitcoin protocol “how I actually found it”) to write new transactions into the blockchain through the mining process. Another way of saying this would be "Talking the transaction as an input through the hashing algorithm (SHA-256) that gives an output of a fixed length.

  3. By calling a Hash Function, Collision Resistant, we mean that it should be very hard to find two hash functions that result in the same output. Computationally it’s infeasible to achieve.

While we’re at it. Here’s a hash function containing my answers.

a805a4639fbb29a2d6c7c7cdcfc46e016594404367822fec1d5b7c3434ffb606

1 Like
1. Hash functions are a way one algorithm. Once the input produces an output it cant be worked backwards to find out the input data.
2. Hash functions would be used in Bitcoin to take transaction data as an input then creating a transaction block as an output that cannot be modified or reversed.
3. Meaning that two inputs cant hash to the same output.
1 Like
  1. A hash function is a mathematical function that takes an input of any length and produces an output of a fixed length. It is a one-way calculation from which the input cannot be determined from the output. Any variation to the input will result in a different hash so that the output serves as a digital fingerprint of the input.

  2. Hash functions are fundamental to cryptocurrencies and securing the blockchain, linking one block to the next and in mining. Each block contains a hash of the header of the previous block. Mining involves finding a nonce that when combined with the block data produces a hash that meets specified criteria.

  3. Collision resistance is a property of cryptographic hash functions that means that it is difficult to find 2 sets of input data that produce the same output hash.

1 Like
  1. Hash functions are one way linear functions that compute unique inputs to produce unique outputs that represent them sort of like a digital finger print.
  2. Hash functions are used in crypto like Bitcoin to write new transactions into the blockchain via POW or mining.
  3. For a hash function to be collision resistant it needs to be extremely hard to find two inputs that hash to the same output.
1 Like
  1. Hash functions are algorithms that maps data of a particular size to fixed values based on how the algorithm is set.

  2. Hash functions are used in cryptocurrencies to transact data obscured by the algorithm applied.
    As regards for BTC, the hash functions allows the generation of new transactions based on the SHA-256 algorithm.

  3. Collision resistant means it would be difficult for two different outputs to result in the same/identical output. (lower chance of the same output being generated by two different input)

1 Like

1. Describe hash functions with your own words Hash functions are functions which work in only one direction and the output is a set of alphanumerical characters.

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). When we want to make a transaction on the Bitcoin blockchain we input the transaction (input data) in the SHA-256 and we obtain a hash as a result which makes it impossible to find out what the input data was having only that hash.

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 that input data A can produce a hash which will be obtainable ONLY by using input data A and no other input data. Any other input data will produce a completely different hash which will be also unique to that input data.

1 Like
  1. Describe hash functions with your own words

It transforms an input into an entirely different output by using a public and private key. The change of a single bit of information in the input, changes the output entirely.

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

It is used for writing new transactions onto the blockchain using the several pieces of data for the input (previous transaction along with the timestamp and a reference to the previous block). Miners take these inputs and try to continue trying to create a new hash which must start with X amount of zeros, dependant on the difficulty of the hash rate.

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

A hash function is collision resistant when it is hard to find the same inputs that produce the same output.

1 Like
  1. hash functions are unique inputs that produce unique fingerprints, and its a one way road, from input to output. From output to input is not possible.
    2.Cryptocurrencies use the hash function as a method to avoid the falsification of transactions and prevent malicious actions
    The hash function in Bitcoin is used in two areas.
    A. Creation of the address
    One of the most common uses of the hash function is in the process of generating the Bitcoin address.

The SHA256 hash function is used up to 3 times in the address generation process.

Thanks to this function, the address is shorter than the public key from which it comes. In addition, it is achieved that it is consistent as a whole by generating control characters (checksum).

B. Mining: Proof-of-Work
The hash functions are a key process in the creation of blocks, what’s more, it is also used in multiple steps, since the miner must associate the transactions to the block. To do this, use the hash function to create the Merkle Tree.

With that result, in addition to the hash resulting from the previous block and a piece of data that must be invented (called nonce), it must ensure that the resulting hash has a certain pattern. If you meet it, you will have solved the mathematical problem, you will have mined a block
This is how it is possible to fully link all new and past transactions, generating total integrity and immutability

Doing the hashing process once is extremely easy, but the miner must do it millions of times.
Finally, for the nodes to verify that everything is correct, they will redo the process only once, applying the hash function again in the different parts of the process.

3.A hash function have collision resistance when it is difficult to find two entries that have the same output. Since finding a second preimage can’t be easier than finding a collision, so the collision resistance includes the property of resistance to the second preimage

1 Like
  1. Describe hash functions with your own words.

Hash functions take an input and create a unique output (digital fingerprint) which cannot be reverse engineered, you can’t find the input from the output.

  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 miners take the transaction data and use it as part of the input to calculate a hash function and provide a new block to the 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).

it means that we should never find two different inputs which create a unique output. Each input must create its own output.

1 Like
  1. Hash functions are functions take an input and creates a encrypted (hashed) result which is difficult to reverse to get the input from it.

  2. Hash functions are used in mining, where they take the header or data of the latest block as input and hash the next answer which must be within target set, in addition to the block contents.

  3. It means it needs to be difficult to find two inputs that can produce the same hash value.

1 Like
  1. Hash functions are one-way functions that take an input of any size and produces a fixed sized output.

  2. It is used to breakdown a block, filled with transactions, into a smaller easier-to-record 256 digit hash that can be stored on the ledger.

3.Given two different inputs A and B where H(A) and H(B) are their respective hashes, it is infeasible for H(A) to be equal to H(B). What that means is that for the most part, each input will have its own unique hash.

1 Like
  1. Hash fubction is a math equation with the goal to convert any kind of data to the hash - long sting of numbers and letters. These type of functions works as a one way road - you can insert an input and get an output but you can’t reverse the function and get an input back.
  2. Hash functions are used to hash transactions data in bitcoin.
    3.collision resistant - is the property of a hash function that it is computationally infeasible to find two colliding inputs
1 Like