Homework on Hash Functions - Questions

1.) A hash function is a unique string of data that is converted to a unique output. You cannot reverse the hash to receive the input by using the output.

2.) Hash functions are part of the hashing algorithm. They are used in crypto by writing new transactions into the blockchain through the mining process.

3.) A hash function needs to be collision resistant in order to ensure that 2 different inputs dont create the same output.

1 Like
  1. Hash functions are one way functions. Each input makes a unique output or fingerprint.
  2. Transforming transactions that can be recorded on the blockchain.
  3. It is not likely that two inputs generate the same output hash.
1 Like

A hash function is a unique set of letters and numbers to create a unique output, similar to a fingerprint.

Hash functions used in crypto like bitcoin are used in a block hashing algorithm that is used to write new transactions into the blockchain through mining. It is to enable that new bitcoins get mined over a longer period of time and not all at the same time.

Collision resistance is to ensure that one input equals one output and not two inputs to one output or one input to two outputs.

1 Like
  1. has functions take data and transform them into an alphanumeric string based on bit sizes; any type of data can be stored in this manner and the output string is called a hash function or hash which is produced using a hash algorithm. It’s a one-way function, meaning, once the output has been created, you cannot backward calculate to determine the original source data, thus creating a unique fingerprint.

  2. SHA-256, for example, is used in Bitcoin mining to assist miners in winning the blockchain lottery; aka, validating not-yet confirmed transactions to the blockchain first.

  3. Hash functions are “collision resistant” when it is determined that an input does not share the same output with another variable input.

1 Like

Hash functions are one-way functions that yield a specific fixed size output (fingerprint) for a given input. They follow a mathematical algorithm that has such a high number of possible outcomes making it secure.

Hash functions are used in cryptocurrency by taking the transaction as the input which when put through the hashing function, will produce the unique fingerprint output. This prevents alteration of transaction history and keeps crypto secure.

A hash function is collision resistant which means that two different inputs will never give the same output.

1 Like
  1. Hashfunction is a oneway function where input creates output that is also a fingerprint
  2. Hash functions are used in mining process that creating a new output that is impossible to figure out from input.
  3. That it is impossible to two different input to create same output.
1 Like

Question #1. Describe hash functions with your own words.

Hash function takes an input that could be text or numbers and outputs a unique digital finder print that is unique for the text and number entered. You can hash the same input many times and the same output will be given to you. Although, you can’t reverse engineer hash functions for security because they don’t look like input. SHA-256 that is used by bitcoin.

Question #2. How are hash functions used in cryptocurrencies like bitcoin?

Hash functions are used in cryptocurrencies like Bitcoin to ensure that input can never be unlocked by looking at the output. Hash function in bitcoin uses SHA-256 that was developed by NSA in the USA.
All digital information like numbers and letters get gets converted into digital bits and it is pushed into hash function to get converted again to receive an output. It is secure.

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

"Hash algorithms are often used for computing digital signatures. The signer of a message runs the original message through a hash algorithm to produce a digest value, then encrypts the digest to produce a signature. Someone verifying the signature will run the message through the same hash algorithm, and will decrypt the attached signature value to ensure the digest it contains matches the one they computed.

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. Someone trying to validate the signature won’t be able to tell the difference. This destroys the value of digital signatures.

Testing is difficult. You can apply chi-squared tests and look for uneven digest bit distributions over a wide number of single- and multi- bit changes, but that’s not proof. Most of the strength relies on the algorithm’s resulting digest size being large enough to mask any undiscovered weaknesses."

1 Like
  • Describe hash functions with your own words
    A hash function is a mathematical process that takes an input of any size and any form, performs an operation on it, and then returns an output of a fixed size.
    This function is non-reversible, i.e it is infeasible to get input using output.

  • How are hash functions used in cryptocurrencies like bitcoin?
    Hash functions are the building block of the blockchain. They are a part of the block hashing algorithm which is used to add transactions in a blockchain during the mining process.

  • What does it mean when we say that hash functions need to be collision resistant?
    Let A and B are two different inputs, such that H(A) and H(B) are the corresponding hash values. As per the concept of collision-resistant, it is infeasible for H(A) to be equal to H(B).
    For instance, a 128bit hash value can have 2^128 possibilities. By using the Birthday paradox, you have a 50% chance to break the collision resistance at sqrt(2^128) i.e 2^64 instance.
    Hence no hash function is collision-free, it just takes longer to find a collision.
    In the case of SHA-256, the number of possibilities is very huge. So it is safe to assume if H(A) = H(B) then A = B.

1 Like
  • Describe hash functions with your own words

Hash function converts one value to another. It creates a unique fingerprint that cannot be reversed.

  • 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 part of the block hashing algorithm which is used to write a new transactions into he blockchain.

  • 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 are collision resistant when is hard to find that one output has two same inputs.

1 Like
  1. Hash functions take digital data and produce a corresponding unique fingerprint.

  2. Hashes are calculated of the transaction data to ensure integrity.

  3. It should be impossible to crack the hash function computationally.

1 Like
  1. A hash function is the process in which a specific input is turned into an output. The output could be termed a ‘fingerprint’ because it is completely unique to the input, and if the latter is changed the former will look entirely different.

  2. Hash functions are used to write in new transactions into the blockchain. The inputs will be the elements of each transaction.

  3. A collision resistant hash function means that it is extremely difficult to find two inputs that hash into the same output.

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

A hash function is a function / algorithm that uses as its input some data and calculates a value out of it (“checksum”). The original data cannot be recovered from the checksum, as the has function usually produces very different looking outputs for very similar looking inputs. It is a way of mathematically asserting that two pieces of data, two files etc. are identical without a user having to compare the raw data.

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

Hash functions are an integral part of Bitcoin mining. Mining Bitcoin involves solving hash functions the input into which consists of the most recent transactions in the Bitcoin network that have yet to be confirmed (“proof of work”).

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

A collision means that different inputs produce the same checksums which may happen when the output of a hashing algorithm, a string of characters and ciphers, isn’t long enough to cover all possible inputs. If it is long enough, it will be collision resistant because it provides the necessary number of possibilities of combining characters and ciphers.

1 Like
  1. Describe hash functions with your own words. A unique way of fingerprinting output (so far). Problems in the future forseeable.
  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). Away to encode information on a one way street. Its cheating to know the answer and work backwards.
  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). An immutable way to only figure out an equation to make computers work towards one way answers, not cheat and find the answer faster (possibly) in a backwards fashion.
1 Like
  1. A hash function is a complex function where you can go only from input to output. Every hash is unique.
  2. Hash functions are used to encrypt the transaction data for security reasons
  3. In the proof-of-work systems, users provide hash collisions as proof that they have performed a certain amount of computation to find them. If there is an easier way to find collisions than brute force, users can cheat the system.
1 Like

1: Describe hash functions with your own words
A Hash Function creates an output for a given input. It is assured, that the calculated output is allways identical, if the input is identical. In addition, the output cannot be reversed to the input (One way). There are different Hash-Funktions (SHA, MD5 etc.) which use different mechanisms of calculating the output.

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).
Hash functions are used in minig. The miners have to calculate a hash output for a given block header. The challenge is, that the length of the output is defined and the Hash-output must be below the defined length. If it is not, the calculation has to be done again after changing a small portion of the header.

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).
A hash function is collision resistant if it almost impossible to find more than one input which lead to the same output.

1 Like

Txs are hashed to get the txid. More important use case is in the block hashing algorithm where hash functions are used to provide PoW.

Collision resistance means there is a very small probability for two inputs to result in the same output. :slight_smile:

  1. It’s like a one way system.
  2. The use of a cryptographic hash function is to verify the authenticity of a piece of data.
  3. Having 2 similar output with the same input is very difficult almost impossible.
1 Like

Describe hash functions with your own words

A hash function transforms an input to a unique output (fingerprint).

How are hash functions used in cryptocurrencies like bitcoin?

Hash functions in bitcoin are used in mining to determine the right hash for new transactions for a bitcoin block.

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

Collision resistance describes the requirement that two different inputs must not result in the same hash output.

1 Like
  1. Describe hash functions with your own words
    Hash function converts messages, numbers and more into a unique output. If you insert a number in a hash function the output you will get is a “unique” fingerprint for that input. Hash function is a “one way function” which means that you can’t get the input with the output but with the input you will get the output.
  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).
    Hash functions are used in the block hashing algorithms and to write new transitions on the blockchain through the mining process.
  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).
    A hash function with more inputs than outputs is not collision resistance. If a hash function not is collision resistance it will be easy for hackers to for example make fake copy of digital signatures. And this destroys the value of a digital signature.
    A function that is collision resistance makes it impossible for to outputs to be the same. Each input will have its own unique hash like a fingerprint.
1 Like
  1. The hash functions are one way functions that for every unique input will give a unique output or fingerprint. Hashing is one way to enable security during the process of message transmission when the message is intended for a particular recipient only. A formula generates the hash, which helps to protect the security of the transmission against tampering and It’s make the reverse process infeasible.

  2. In the context of cryptocurrencies like Bitcoin the transactions are taken as input and run through a hashing algorithm, which gives an output of a fixed length. This is to prevent new Bitcoin from being minted except through mining.

3.With “collision resistant” we mean that two different inputs should not equal the same hash output.

1 Like