Homework on Hash Functions - Questions

  1. Hash functions are one-way functions that produce a fixed-length unique result that cannot be back processed to calculate initial input.

  2. They sign every transaction and block of transactions and somehow hash the hashes of blocks to ensure that all transactions are valid.

  3. If it is almost impossible to find two inputs that hash to the same output, then it’s collision-resistant and helps prevent fraud.

2 Likes

1. Describe hash functions with your own words
It is a function that translates input into output according to the hashing algorithm. SHA-256 would return a 256 bit output for any sized input.
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).
You can use hash functions to encrypt and compress large informational inputs which encompass transactions. Another use of hashing is generating the bitcoin address from the public key.
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).
This term refers to the ability to map functional input and ouput 1:1. In other words, you cannot have two inputs that lead to the same hash output or a hash output does not have two inputs.

1 Like
  1. Hash functions is when a certain input creates an output that is irreversible and is so unique that it acts as a finger print.

  2. Hash functions is used to write new transactions into the blockchain where new bitcoins are mined

  3. If it is hard to find when two inputs that hash to the same output that is ‘a’ does not equal to ‘b’

1 Like

A certain function who puts information into a SHA-265 code wich is the digital fingerprint of that contained data. one slightest change in the data will give u another hash.

Hashing function in bitcoin are most used to mine.

Collision resistant is when its hard to find 2 inputs that hash the same output

1 Like
  1. Hash Functions are one-way functions which transform any input string of any length, to unique fixed length output.

  2. In the bitcoin protocol the hush functions are used to write new transactions into the blockchain through the mining process.

  3. Collision resistante means when is very hard to find two different inputs that produce the same output in a hush functions .

1 Like

1.A hash function takes any string of data ( numbers, letters etc…) and converts it a 256 bits sequence of numbers ande lettres. This process cannot be reversed, you cannot use de 256 bits sequence to get the string of data.
2. They are used in mining, miners have to solve equations in order to accept/confirme the transactions in the network.
3. It means that diferente inputs will never give the same result.

1 Like

Describe hash functions with your own words
Hash functions take in an input of data (numbers, letters, files), convert this data into its most basic form (bits) and then run it through a hash function and then product an output that is entirely unique for that input, thereby acting like a fingerprint for that input. Successful hash functions cannot be “cracked” or reverse engineered (are pre-image resistant).

How are hash functions used in cryptocurrencies like bitcoin?
Bitcoin uses SHA-256 which hashes the transactional data onto the blockchain as part of the mining process.

What does it mean when we say that hash functions need to be collision resistant?
The hash function needs to produce unique outputs. If, given two different inputs, the outputs were the same, it would be said that these two outputs have “collided.” No hash algorithm is entirely collision resistant but the odds of a collision with SHA-256 are unbelievably low.

1 Like
  1. Hash functions are basically functions that create a unique digital footprint from a specific input and cannot be reversed.

  2. Hash functions are used in cryptocurrencies like bitcoin to run a proof of work algorithm, once the computations are solved a “block” is then added it to the blockchain and the miner is compensated.

  3. Collision resistant means that there aren’t two inputs resulting in the same output.

1 Like
  1. They are functions that generate a unique output for every imput and there is no known way to reverse it. In regular functions you canimagine what was the imput that originated a specific output or reflect the variable, but not with hashes.
  2. The blocks from the blockchain are hashed to avoid comparing all the data in the previous block with the next one in order to validate it
  3. Collision would happen if 2 different inputs were to generate the same output, which would brake the premiss of answer 1.
1 Like
  1. Each unique input gives an unique output.
  2. Bitcoin is a digital ledger of hashes that utilizes proof of work combined with SHA-256 to obtain mathematical traceability and unbreakability.
  3. Collision resistance is a property of cryptographic hash functions: a hash function H is collision-resistant if it is hard to find two inputs that hash to the same output.
1 Like
  1. Hash functions take a phrase (input) and mixes it up using shaw256. Input is binary but the output is a combination of numbers and letters. Hashing can only be done one way, thus cannot reverse this to identify the input.

  2. Bitcoin transactions are hashed using SHA256. A new transaction hash is created using the hash of the previous block to allow secure transactions.

  3. Collision resistance is a property of cryptographic hash functions - no two input functions create the same output hash.

1 Like

Homework on Hash Functions - Answers

  1. Describe hash functions with your own words
    Answer: For each unique input a hash function will produce a unique output. They are one way, you cannot deduce the input from the output.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Answer: When a new block is mined in bitcoin it is hashed and added to the blockchain. Each new block contains a hashed reference to the previous block.

  3. What does it mean when we say that hash functions need to be collision resistant? A hash function cannot produce the same output for 2 or more different inputs.

1 Like
  1. Describe hash functions with your own words

functions are messages translated into unique fingerprints

  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).
    To write new SHA-256 algorithm into the block chain through P.O.W. mining

  2. 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).]
    There has to be a input / output balance to avoid such a collision

1 Like

I’m not sure what you mean by that? Can you explain what is a collision in a hash function? :slight_smile:

  1. Each unique input produces a unique output. The output is like a fingerprint. You can’t reverse engineer to the input.

  2. Hash functions are used to validate transactions and create unique keys. The hash functions are used to incentivize miners to key the network secure.

  3. Collision resistant refers to the rare chance that 2 inputs could produce the same output. This would cause significant issues in the blockchain.

1 Like

Alko, it is where there are more imputs than outputs!

  1. Describe hash functions with your own words
    A hash function is simply a function that takes in input value, and from that input creates an output coded value.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Bitcoin makes heavy use of the cryptographic hash function SHA256, which stands for Secure Hash Algorithm 256-bit. 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?
    Collision resistance simply means that it is hard / near impossible to find two different inputs that hash to the same output.

1 Like
  1. An algorithm that transforms an input into an irreversible output and can not be reverse however that output will always be linked to that input.

2.Hash functions are used to link blocks together and lock in all the transactions in a block.

3.Almost impossible to get two inputs that would equal the same output

1 Like
  1. A hash function is a one-way function that takes a unique input and produces a unique output.

  2. Hash functions are used in cryptocurrencies like bitcoin to verify new transactions being added to the block.

  3. When we say that a hash function needs to be collision resistant, we are saying that it needs to be resistant to being reverse-engineered due to too many inputs returning the same output.

1 Like
  1. Describe hash functions with your own words.
    Ans: 1. Hash functions have 2 important features.
    a) There are many different hash functions used for hashing, meaning different hash functions have different abilities. But here I’m referring to SHA256 hash function (One-way function) which is a mathematical function that can take any data like numbers, alphabets and produce an output for that particular input. This output is like a unique digital fingerprint for that data. If you input the same data with the slightest difference as compared to the one before you will get a different new unique digital fingerprint.
    b) You can never go from output to input with this hash function, meaning you can never figure out the what the input data is by trying to use the unique digital fingerprint (output data) that was generated from the input.

  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).
    Ans: 2. Bitcoin’s blockchain hashes like SHA256 are much more significant and are much more complicated because it uses one-way hash functions which are very difficult to break.

SHA256 hash function is used because of these properties:

Unique hash value - For every input, it produces a unique output
High hashing speed - For each given input the computation is fast.
Secure hash function - It is almost computationally infeasible to reverse the function and make it two-way function.
Bitcoin is a digital ledger of hashes that uses proof of work combined with SHA-256 to achieve mathematical traceability and unbreakability.

  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).
    Ans: 3. If 2 different inputs generate the same output that would mean a collusion but both inputs would have to be identical. This is a very rear probability and with a high bit rate of SHA256 chances would be really hard to come by. Collision example of MD5
    .
    https://natmchugh.blogspot.com/2014/11/three-way-md5-collision.html

To be able to intelligently alter something, to make a malicious file to look like a signed piece of software, the probability is almost nil. It is extremely unlikely that you can have a collision that works will all hash algorithms. :pray: :heart: :pray:

1 Like