Homework on Hash Functions - Questions

A Collision means that you can have 2 different inputs producing the same Hash. So being collision resistant is very important.

  1. Hash functions are mathematical algorithms that map data of any
    size to a bit-string/hash-value of fixed size. hash functions are
    not reversible, and are used to determine if two values are equal.

  2. Hash functions are used in cryptocurrencies like Bitcoin
    as one way functions that create a fixed length hash. Groups of
    hashes can be linked together in a Merkle tree sent through a hashing
    algorithm and protect transactions form having their data
    changed/corrupted.

  3. When we say that a hash function needs to be collision resistant,
    we mean that it must be hard to find two different inputs that
    the hash function hashes the same output.

1 Like
  1. A hash function takes a unique input of any size and creates a unique (to the input) output of a defined size.

  2. They are used to digitally fingerprint the complete block and this fingerprint also serves in the proof of work process in mining. They are also used to link blocks together as the next block contains a reference to the previous by storing its hash in its header.

  3. Collision resistant means that the chances of two different inputs having the same unique output is so high that it is for practical purposes essentially impossible.

1 Like
  1. A hash function generates a formula to compute the input of data to give value and immutability to blocks generated.
  2. The hash function sha-256 used in bitcoin is a signature for a data-set. Sha-256 algorithm generates an almost unique fixed size 256 bit [32-byte] hash. Hash is also called one way function. Identifies and authenticates the sender of a digitally distributed message.
  3. A hash function is collision resistant if it is hard to find two inputs that hash the same output. sha-2 more resistant then sha-1 because there are more hashes in 2. Sha-1 has 160 bit hash, sha-2 has 256 bit hash, sha-3 ?bit hash, coming soon.
1 Like
  1. Hash functions have a unique output based on a specific input. It is impossible to deduce the input knowing the output. The hash function used in bitcoin is SHA256
  2. The public key is a function of your private key. However, you cannot deduce the private key from the public key.
  3. Two different inputs will not create the same output.
1 Like

Hash functions produce a unique digital output (think of it as a digital fingerprint) from an input of data.

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.

A hash function is collision resistant if it is hard to find two inputs that hash to the same output; that is, two inputs a and b such that H ( a ) = H ( b ). Collision resistant docent mean there are no collisions, just that they are hard to find.

1 Like
  1. A hash function is used to take an input in one language and create it’s own unique binary output written in a certain number of characters

2.In crypto has functions are used for privacy and security, they create a layer of verifiable security that Bitcoin for example relies on to avoid theft and fraud

  1. The necessity for hash functions to be collision resistant is imperative because these functions require an input written out in a message which is then morphed into a fixed digital binary output that is used to record and verify the legitimacy of the message. Each output needs to be unique like the message input, otherwise you will have a “collision” of outputs, causing confusion as to which input the output is connected to
1 Like
  1. Hash functions take a given input and give back a unique output.

  2. The blocks, in the blockchain, are all linked to the prior hash’s block.

  3. Collision resistance makes it hard for two inputs to have the same output.

1 Like
  1. A hash function is a mathematical process that receives an input of data of any size or length, processes it and then produces data of a fixed size / length, the digital fingerprint. This process is impossible to reverse

  2. In the bitcoin protocol, hash functions are used to write new transactions in the blockchain. In Bitcoin mining, the inputs to the hash are all the most recent, unconfirmed transactions. In addition, some additional data is sent with regard to time and some other technical matters.

  3. collision resistant (random collision resistant): it is practically impossible to find two input bit strings with the same hash value.

1 Like
  1. hash function is a simply mathematical function where each unique input, that can be in any form of data or any size, gives a unique output, a unique digital fingerprint, a fixed output for every particular input.

  2. in cryptocurrencies we use a one way hash function, like SHA-256 bitcoin uses, which are, if not impossible, very very difficult to break.
    the miners need to hash the block header in such a way that it is always equal or less than the “target hash”, and then only they can add successfully their mined block to the Blockchain.

  3. the collision resistant is when it is almost impossible to find two inputs that hash to the same output. that’s why we call these functions one way functions.

1 Like

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
  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).
  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).

Answer:

  1. A hash function is a function that transforms any data into a unique hash ( fingerprint ), which always has the same length. A useful hash function can move only in one direction, meaning that you can only get output from the input and not vise versa. You cannot deduce the input from the output. That’s why it is so useful for Bitcoin. If you change only one bit of information of the input, the output of the Hash Function will change dramatically.

  2. Bitcoin hash functions are used to link blocks to each other. This property provides Bitcoin Blockchain with immutability property. If you want to change data in any block even for one bit, it will change all the hashes of the subsequent blocks. The network will see that change and reject your chain of data. Hashing also used in storing transactions in the Bitcoin Blockchain. It makes the process of search of the specific transactions much faster rather than looking at each transaction by employing Merkle tree. The hash function also used in the mining process, which provides security to the network.

  3. Collision resistance in the hash functions means that there is an infeasible amount of chance for two different Hash Function inputs to produce one output. It is possible, but it will take an astronomical amount of time to occur. Until then, the Hash Function serves its property.

1 Like
  1. Describe hash functions with your own words
  • Hash functions are functions where unique string inputs give unique outputs in the SHA256 language.
  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 because the SHA256 algorithm is used.
  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).
  • The phrase “hash functions need to be collision resistant” means that it is unlikely for a hash function output to be equal to another output of another hash function (H(a) != H(b))
  1. Hush functions are functions that for every input we have unique output (fingerprint)
    2.In crypto like Bitcoin the transactions are taken as input and run through a hashing algorithm SHA-256 which gives an output of a fixed length.whenever new block arrives all the contents of the block are hashed.If the hash is lesser than the difficulty target, then it is added to the blockchain and everyone in the community acknowledges the new block.
    3.Collision resistant is: When we give two different inputs A and B where H(A) and H(B) are their hashes, it is infeasible for H(A) to be equal to H(B)-it’s almost impossible to have collision of same outputs.
1 Like
  1. A hash function is a unique input (piece of information , number , words etc) and then encrypted via hash algorithm SHA-256 to make a unique digital fingerprint. It is a one way encryption and cannot be reversed .
  2. Hashing used in the terms of cryptocurrencies like bitcoin means that the transactions are taken as input and put through the hashing algorithm of SHA-256 and come out as encrypted unique digital fingerprint .
  3. Collision resistant means that 2 inputs will have a low chance of having the same output , equally the same as brute force . guessing . Infeasible but not impossible .
1 Like
  1. Describe hash functions with your own words.

Hash functions are special functions where you insert something and get a unique, fixed-size string of bytes.

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

Integrity, block-chaining and cost-function are examples of how hash functions are used in bitcoin.

  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 needs to be collision resistant in order to make it computationally infeasible to find any two distinct inputs.

1 Like
  1. Hash functions are functions that for same input give same output, they are one directional, so we can’t get input from output.
  2. They are used to calculate representation of block in terms of data(hash) that is calculated with hash function.
  3. They need to be collision resistant so for 2 different inputs we don’t have same hash output.
1 Like
  1. 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. 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 means that it is highly unlikely but not mathematically impossible to get the same output from a hash function.

1 Like
  1. Describe hash functions with your own words

Hash functions are functions that can only go one way, meaning it will only be possible to generate an output from an input but impossible to deduce the input from just 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).

Hash functions are used to provide encryption and authentication of the information that are stored in the Bitcoin 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).

It means that it is very hard to find two different inputs that hash into the same identical outputs

1 Like
  1. Hash functions are a way to input a string of data of any length, and give it a unique output of a determined length.

  2. Hash functions are used to process transactions and are also used in bitcoin mining.

  3. Collision resistant means that it’s highly unlikely to have 2 inputs that result in the same output.

1 Like
  1. Hash functions are when you take any size of information and assign a mathematical function to get a hash value that represents the original message/input. hash value will be based upon its selected use of algorithm.

SHA-256 algo- Input-(Nice to meet you)-----Output-(64bit) 104e88ga329380bc9f9a22e71…

  1. In Bitcoin, hashing is the mathematical computation of all validly signed transactions using the SHA-256 algo. They also hash a reference to the previous block which is the chain that connects the blocks together. Miners hash random outputs until one solves the block to receive the reward in ten minute intervals.

  2. Should be difficult/very rare to have large input that shares the same hash/output as another different input.

Weak hash algo example: Algorithm removes all vowels.

(foot = ft…feet = ft). this demonstrates collision!

1 Like