Homework on Hash Functions - Questions

  1. Hash functions means that each unique input produces a unique output, basically a digital fingerprint for data.

  2. Hash functions used during the mining process and building the blockchain. Each transaction with the time, amount and recipients and the previous transaction on the chain is being converted into a unique hash that gets build into the chain after the common consensus of the nodes/miners. Every block contains the new and the previous transactions in a unique hash output. (In this process the miners are competing to be the first to seal off the block and and prepare it for insertion into the blockchain. They get rewarded with the next issuance of bitcoins for this.)

3.Collision resistance means that two different inputs create two different hash outputs, they can never be the same even with slight change of the original input. This also means that one input can only have one hash output and no other.

1 Like
  1. A hash function is a cryptology method of taking an input and creating a standardized output.

  2. Hash functions are used in Bitcoin for mining

  3. To be collision resistant is to make it very rare for 2 different inputs to create an identical output. If collisions are easy to find, someone could make it look like a valid digital signature was identical to a fake.

1 Like
  1. Hash function takes data inputs and outputs a unique base number sequence to make one of a kind digital data.

  2. Hash functions in bitcoin and other cryptocurrencies solves the double spend issue and checks the sums of coins by verifying with a unanimous consensus through the one way input and output hash functions. In mining, miners provide service with large amounts of computational power to solve the hash functions and are compensated with transaction fees and new block rewards.

  3. Means every unique input has a unique output. Two or more inputs can not lead to one output.

1 Like

If I am not mistaken, its two main functions is that hash functions are computationally efficient, and also that when you use two distinct inputs, it avoids creating the exact same output, or a collision.

  1. Describe hash functions with your own words
    In hash functions you put in a certain input of data and this digital data is converted into bits. After it is converted into bits, it is given a digital fingerprint. The digital fingerprint consists of numbers and letters based on the number of bits of the digital data that your provided in the input.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Hash functions are used in bitcoin for mining purposes. The input of the transaction and other data involved such as time and the transactions before(the chain), are the unconfirmed transactions to the blockchain. The miners use their computers to solve the combination of inputs to provide an output and confirm the transaction. In doing so the miner will be compensated.

3.What does it mean when we say that hash functions need to be collision resistant?
Collision resistant means that two inputs can’t produce the same output with out brute-force which is infeasible.

1 Like
  1. Hash Fxns are unique inputs that provide unique outputs.
  2. Hashes are used in crypto to provide a secure, one-way method of messaging intended for a specific individual for reasons f security.
  3. Collision resistant is when hash function inputs do not have two different and unique inputs that provide the same out put.
1 Like

Thank you Alko89! I appreciate the clarification!

1 Like
  1. Describe hash functions with your own words.
    The hash function is a cryptographic system which takes an input and transforms it into an output in a way that no one can get back to the original input.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Hash functions are used in the mining process to create immutable blocks that are added to the blockchain.

  3. What does it mean when we say that hash functions need to be collision resistant?
    This means that a hash of a certain input (A) will be different than a hash of another input (B).

1 Like

1.-hash functions are a mathematical way of getting a input value converting it with SHA 256 into a string of numbers and letters, this will be the corresponding unique fingerprint to the output.
2.-hash functions are used in bitcoin to avoid knowing what the initial value is in the original string, it is very difficult to break the code by brute force and it takes a very long time.
3.- The second property is the weak collision resistance , also known as second preimage resistance . This property guarantees that it is impossible to find an alternative message with the same hash value as a given message. This prevents forgery when an encrypted hash code is used

1 Like

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words…

Turning a known input to a fixed sized but random output that is super connected to the input with regards ANY change from the input will change the output immensely

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

This must be the backbone of Cryptocurrency security on the blockchain I think its connected to mining so that it can be proven that the work has been carried out and the hash = the generation and proof that the work has been done by the miner?

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

This term is explaining that a hash system needs to be good enough that for example two different inputs should never = the same hash output, it’s that simple. I dont know if there are ever these problem in SHA 256 but I doubt it? How would you know unless its too late that my a small chance this happens?
t inputs come out with the same hash

Collision resistance really means just that two inputs have a very low probability to result in the same output. The means of an input resulting in different outputs is more a property of functions in general :slight_smile:

1 Like

This is all true :slight_smile: I was asking about another use case for hash functions in the blockchain itself :slight_smile:

1 Like

These are so called digital signatures and we don’t use hash functions for that but another function called elliptic curve, this enables us to derive a public key from a private key. That we can then use for encrypting messages and signing them.
Hash functions have a different use case in blockchain. Try figuring it out :wink:

1 Like

That is correct! Its how blocks are linked together in a chain, thus the name :wink:

It is possible, the number of possible inputs will always be larger than the possible outputs. The input can be literally everything and the output is limited to about 2^256 (there are some examples that a hash function will not return some range of numbers).
But this number is still so incredibly large (there is about 10^80 atoms in the visible universe), that the probability of this happening is close to 0.

1 Like
  1. Hash Functions are computations that take a unique input and produce a unique output. They are one way meaning that they go from input --> output. You cannot go from output —> input. This is important because you do not want to be able to look at the output and determine the input data. It is like a fingerprint for the input data.

  2. Bitcoin is a digital ledger, a collection of hashes that utilise SHA256 and proof of work to mathematically trace transactions and establish unbreakability.
    Different hash functions are used in other cryptocurrencies and these functions have different abilities.

  3. Collision resistant means that two different inputs SHOULD not give the same hash output. Statistically speaking this is an unlikely event but there is still the potential for it to happen.

1 Like
  1. A hash function takes a word and turns it into 256 bits. It is impossible to take the output and figure out the input with this.
  2. Bitcoin uses hash functions to write new transactions onto the blockchain. Through mining it creates difficulty which means a lot of bitcoins will get mined for a longer period of time and not all at once.
  3. Collision resistance means that it is infeasible but not completely impossible to find 2 colliding inputs.
1 Like

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
    A hash function is an encrypted function that only goes one way. You give the function an input and you get a fixed number of characters as output. The size or length of the input doesn’t change the size or length of the output, but if you change anything at all of the input; you get a completely different output. Even if the change of the input is insignificant for the actual content of the input. It isn’t possible to get the input only by using the output, you need to use brute-force by guessing the input and compare the output. It’s infeasible (but not completely theoretically impossible) that different inputs could yield identical outputs.

  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).
    (Leaving the genesis block.) The hash is used during mining if I’m not mistaken. The content of the previous block is hashed in SHA-256 and an output is received. The output is then concatenated with a randomized string called the ā€œnonceā€ and this new string is then hashed again in SHA-256, giving a completely new output. This output is then compared to the difficulty level (which I don’t understand the details of) and if it’s less than the difficulty level a new block is mined. Otherwise the nonce is replaced and everything is hashed again until the requirement is met.

  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 collision is when different inputs just happen to hash into the same output. With SHA-256 you statistically reach a collision risk of 50% then you have guessed, the square root of 2^256, number of times. I get 3,4*10^38 number of times. Besides my math, that might be flawed, the point with collision resistance is that it should be VERY unlikely for the different inputs to give the same output, when considered statistically.

1 Like
  1. Hash functions are functions that work in one direction, from input to output.They create a unique fingerprint for any amount of data.

  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. In bitcoin mining, the inputs for the function are all of the most recent, not-yet-confirmed transactions (along with some additional inputs relating to the timestamp and a reference to the previous block).

  3. Collision resistance means that two different sets of data do not receive the same hash tag.

1 Like
  1. they are one way functions in which the input cannot be recovered from the output
  2. hash function are used to write new transactions in the blockchain through mining
  3. it is almost impossible to find 2 inputs that hash or results in the same output
1 Like
  1. Describe hash functions with your own words. A HASH FUNCTION IS A FUNCTION THAT TAKES DATA WE ENTER AND CREATES A UNIQUE FINGERPRINT FOR THAT DATA.
  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 AN INTEGRAL PART OF CRYPTOCURRENCIES LIKE BITCOIN IN THAT HASH FUNCTIONS TAKES BITCOIN TRANSACTIONS AND CREATES A UNIQUE OUTPUT FOR EACH TRANSACTION, THIS RESULTS IN A CHAIN OF BLOCKS ON THE BLOCKCHAIN
  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). COLLISION RESISTANT IN THAT IT IS HIGHLY UNLIKELY THAT ANY TWO INPUTS WILL GIVE THE SAME OUTPUT.
1 Like