Homework on Hash Functions - Questions

Describe hash functions with your own words

Hash functions are special for two reasons. Firstly, for each unique input will result a unique output. It will give a fingerprint for each input. Secondly, one can go from input to output but you can not reverse output to input. A hash function is a one way function.

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.

In bitcoin mining, the inputs for the function are all of the most recent, not-yet-confirmed transactions.

The US National Security Agency (NSA) developed the SHA-256 hashing algorithm in 2001 which is the primary hash function used by Bitcoin’s blockchain.

This particular 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.

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

Collision resistance is a property of cryptographic hash functions: 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 ). Every hash function with more inputs than outputs will necessarily have collisions.

1 Like
  1. Hash functions goes just one way from input to output ans never the other way, it would crack the
    bitcoin.

  2. Bitcoin is simply a digital ledger of hashes that utilizes proof of work combined with SHA-256 to
    obtain mathematical traceability and unbreakability.For the PoW you need the miners.

  3. If a hash function is not collision-resistant functions then an
    adversary can break the function with little effort.

1 Like
  1. Hash functions take a given input and create a unique output.
  2. Hash functions are used in bitcoin through the blockchain hashing algorithm to write new transactions.
  3. Two different inputs should never hash the same output in order to be collision resistant.
1 Like
  1. Hash functions produce a 256 bit length fingerprint that can only go from input to output.

  2. BTC miners solve the hash functions to add new nodes to the blockchain.

  3. Collision resistant means that no two inputs can create the same output.

1 Like
  1. hash functions is a way we make a digital fingerprint and the same input will have the same output and they are one-way functions
  2. Blocks contain hashes of the previous blocks in the chain, and which makes it easy to validate on chain with hashes, and once one hash is created another identical hash will not be created unless it is the identical input.
  3. The term means that 2 different inputs do not make the same hash
1 Like
  1. Hash function takes an unique input and creates a unique output or unique fingerprint which validates the information.

  2. By holding and securing data. validating the system.

  3. Resistance to Duplication.

1 Like

A hash function is a function that essentially takes an input and codes it so that the output is a series of random numbers and letters, making it difficult to determine what the input was.

Hash functions such as SHA-256 are utilized in cryptocurrencies to create a unique identifier for each transaction and each block and also in creating an address from a public key.

Collision resistant means that it is difficult to find two inputs that hash to the same output (more secure).

1 Like
  1. A hash function is a function that gives each input number a different outcome.

  2. It is used to put data into the blockchain in a way that is irreversible

  3. Collision resistant means it’s very hard to find two numbers that will give the same output

1 Like
  1. Describe hash functions with your own words

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.

  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.

  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 cryptography, collision resistance is a property of cryptographic hash function: a hash function H is collision resistant if it is hard to find two inputs that hash to the same output; that is, two inputs a and b where a ≠ b but H(a) = H(b). … ) hash operations on random input is likely to find two matching outputs.
1 Like
  1. Describe hash functions with your own words

Hash functions are functions that, for each unique input, produce a unique output that cannot be produced from any other input. Hash functions in practice operate as ‘one-way’ functions since, at least up to now, now one is able to find what value was input in to the function given 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).

In bitcoin hash functions are used to verify data integrity in all of the proceeding blocks in the blockchain. If, for example, data in a proceeding block is changed, it would change the hash value of all blocks after it and thus be detected

  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 means that it is nearly impossible to find any two different inputs that result in the same output. This is needed because we want all hash function outputs to be unique and correspond to only one particular input value.

1 Like
  1. Describe hash functions with your own words
    Produce an output for an input (a fingerprint) that is
    a. unique, and
    b. cannot be used to determine 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).
    From coindesk.com:
    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. … It’s the need for this large amount of processing power that means new bitcoins get mined over a long period of time, not all at once.

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

From: https://privacycanada.net/
“A Hash Collision Attack is an attempt to find two input strings of a hash function that produce the same hash result. Because hash functions have infinite input length and a predefined output length, there is inevitably going to be the possibility of two different inputs that produce the same output hash. If two separate inputs produce the same hash output, it is called a collision. This collision can then be exploited by any application that compares two hashes together – such as password hashes, file integrity checks, etc.”

1 Like
  1. Describe hash functions with your own words
    Has functions are formulas that have an input, and give you outputs. They are unilinear formulas meaning you can only go from inputs to outputs and not the other way around. They also give you a unique output based on any change to the input. The formula gives you the same output for the same input.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Hash functions are used to produce new blocks by computing the block’s header. All blocks contain the hashes of the previous blocks as verification records, and because blockchain can only be added to, it needs to contain all the previous information.

  3. What does it mean when we say that hash functions need to be collision resistant?
    It means that it there is extremely low probability that two different inputs will produce the same output when computed. To say the hash function needs to be collision resistant is to say you really want your inputs to always produce different outputs, so that the data remains unique.

1 Like
  1. Describe hash functions with your own words

You have an input and run it thru a ‘hash generator’ (e.g. sha-256) and it will create a unique fingerprint wich cannot be reversed.

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

Every transaction will be hashed together with the hash of the previous block to create a new block. when a previous block has been altered, the chain will be invalid.

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

You need to be sure there is no chance to have 2 different inputs generating the same output

1 Like
  1. Describe hash functions with your own words

Hash functions are one-way functions where a unique input gives a unique output. This cannot be reversed.

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

Bitcoin uses SHA-256, which is the secure hash algorithm created by the National Security Agency (NSA). This in turn creates an alphanumeric combination of numbers and letters which is called a hash. Consider a hash function, which takes a unique input and gives out a unique output. The hash is really the output of a hash function. Therefore, cryptocurrencies using a hash function such as SHA-256 will yield a unique hash.

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

Hash functions need to be secure and because two inputs may map to the same output, a collision occurs. Therefore, in order to make sure hash functions are collision-resistant no two inputs should map to the same output.

Sources:
https://www.javatpoint.com/blockchain-hash-function
https://www.jeffcarp.com/posts/2018/understanding-security-cryptographic-hash-functions/

1 Like
  1. Hash functions allow each unique input to produce a unique output.

  2. Bitcoin Hash is based on SHA-256, is only solved in a linear unidirectional manner. Input to output but not output to input.

  3. Hash functions need to be collision resistant, since if collisions are easy to find, they allow an attacker to take an authentic digitally signed message, find a different message that produces the same digest (the collision), then substitute the fake message for the real one while keeping the same signature value.

1 Like
  1. Describe hash functions with your own words

A hash function is a line of code given out from a specific form of text that leaves behind its own digital fingerprint

  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 crypto to write in new transactions to the block hashing algorithm hash functions are crucial to the POW algorithm involved in mining to successfully mine a block, miners try to combine all their inputs in such a way that the resulting hash starts with a certain number of zeros

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

They need to be collision resistant because you don’t want multiple ways that are similar to achieve the same output

1 Like
  1. A universal translator for computers that produces a unique output for every unique input. This process is irreversible.

  2. 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. A common use is to store passwords. 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. It means that it should be hard to find two inputs that hash to the same output.

1 Like

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words

Hashing is generating a value or values from a string of text using a mathematical function.

A hash function is a unique identifier for any given piece of content. It’s also a process that takes plaintext data of any size and converts it into a unique ciphertext of a specific length

  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 simple terms, hashing means taking an input string of any length and giving out an output of a fixed length.
In the context of cryptocurrencies like bitcoin, the transactions are taken as input and run through a hashing algorithm like SHA-256 which gives an unique output of a fixed length.

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

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-) Describe hash functions with your own words
=Hash functions is a universal translator that can convert data into a unique alphanumeric string. Its impossible to reverse the output to find an input.

2-) How are hash functions used in cryptocurrencies like bitcoin?
= 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?
= Hash functions need to be collision resistant means that it should be very hard to find two inputs that hash to the same output.

1 Like
  1. Describe hash functions with your own words
    A way of passing along secure data publicly.

  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).
    The miners take bitcoin transactions and input them into the hash functions, adding them to the blockchain and once confirmed, move money from wallet to wallet.

  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).
    Meaning resistant to the possibility of a “collision” or two inputs creating the same output.

1 Like