Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
    Cryptographic functions that provide a unique fingerprint to a given input. Cannot be reversible.

  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).
    They are the foundation of mining and without it we remove the validity and security aspect of a cryptocurrency.

  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).
    It has to have a very low probability that two inputs generate the same output hash. This makes it the system more secure and prevents easily solving the puzzle.

1 Like
  1. Describe hash functions with your own words
    The result of a unique input is a unique output, and even the slightest change in the input, results in a drastic change in the output. Hashes are also unidirectional so that the output can be derived from the input, but not vice versa. This also aids in the verifiability of the blockchain given that even a single bit change in the data would be immediately noticeable by anyone examining the data in the transaction or blockchain.

  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 for encryption and to verify the integrity of data. They are computationally difficult to reverse and difficult to find any two inputs with the same hashed output though such “collisions” do exist.

  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 is when a hash function makes it less likely that two separate hash inputs will result in the same output.

2 Likes

1.Hash function it is an output that contains huge amount of data. It is unique for each input, a small change in the input will produce a complete different hash function.
2. Hash functions used SHA 256 algorithm for Bitcoin, takes the input data of any size, performs an operation on it and returns output data in a fix size. A common use of this kind of hash function is to store passwords.
3. It is a property for Cryptography, it means it has a very low probability for two different inputs to result in the same output.

1 Like
  1. Hash functions turns a unique input into a unique output, and the output cannot be used to crack the input.
  2. Hash function is used in the transaction of cryptocurrencies
  3. It is highly impossible for two different inputs to hash into the same output.
1 Like
  1. A hash function transforms 1 input, in one unique output, it is not reversible, and there are almost 0 collisions.

  2. Hash functions are used in bitcoin to hash the blocks. Each hash is given as input to the next block, so that changing a transaction in one block would lead to a totally different chain. This is used by miners to verify that no one has tried to change the transactions.

  3. To be collision resistant means that there is a low probability that two inputs leads to the same output.

1 Like

thanks for the clarifications/correction. Small but very significant detail.

1 Like

1. Describe hash functions with your own words

The hash function converts your input into a string of numbers and letters which becomes your output. It is one way, input to 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 Crypto Currencies to make the transaction secure and cryptic.

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 is when its hard to find two inputs that hash to the same output. It is important for the inputs to have unique outputs.

1 Like
  1. A hash function takes a unique input and returns a unique (digital fingerprint) output as a result

  2. Transactions are taken as the input, passed through the hashing algorythm SHA 256 in the case of Bitcoin which gives an output of a fixed length.

  3. If it is difficult to find two inputs that hash to the same output it is said the hash function is collision resistent.

1 Like

collision resistant means that 2 different inputs shouldn’t be able to produce the same hash. In Sha256 the output is such a big number that it’s very unlikely to accidentally have a collision.
You’re talking about blocks that are linked with the hash of the previous block.

1 Like
  1. Describe hash functions with your own words

Is a function that use a unique input and produce a unique output. This is called a unique finger print.

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

Hash function are use in many cases on the bitcoin ecosystem, like producing random wallets, secure the network with random hashes imposible to guess or to generate transactions identifiers for the bitcoin blocks.

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

Is collision resistance when is very hard to find two inputs that produce the same output

1 Like
  1. Function that turns strings to numbers. Hard to reverse and provides a digital fingerprint.

  2. Used to hash transaction data, mining and security purposes (making the blockchain unalterable). Many more

  3. They need to make it difficult to provide the same hash for 2 different things. It’s not impossible for a collision but it is unlikely.

1 Like
  1. Describe hash functions with your own words

A hash function converts an input, like a sentence, sequence, numbers, paragraph or any language or numerical input into a sequence of digits and numbers (base 16, base 64 etc) which is an entirely unique fingerprint to the input. It’s impossible to find the input from looking at the output. Only one change to the input changes the output completely.
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 can be used to give a unique code to every individual transaction, this can encrypt transactions and it’s gives uniformity as every hash code is a set length, so no matter how big or small the transaction the hash look similar

  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). Collusion is the possibility of Sha256 generating two identical hash for different inputs. That possibility can be discovered by using the birthday paradox. The chance of collision is 50/50 after square root(2^256) attempts.
1 Like
  1. encrypts some stuff, one way can’t go back.
  2. So hashes basically allow people to like work to get an answer so it’s difficult for people to mine. It’s kinda like slowing people down arbitrarily so they don’t make too much moola and then the whole system goes bankrupt (and one dood is like super rich)
  3. collision resistant is like when there are two different inputs for the same output. (So you need to make it collision resistant so that doesn’t happen which basically, is like the complexity of the hash, no? So SHA-1 wouldn’t be collision resistant for example?)
1 Like
  • Describe hash functions with your own words

Hash is creating a short word or string of characters that represent or is actually a longer string of text characters or numbers.

  • 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 function is used in crypto $ like bitcoin as a short input, then goes through an hash algorithm which results in a much longer output .

  • 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 means that two hash inputs will not have the same output.

1 Like

Homework on Hash Functions - Questions

1.A Hash function is a mathematical function where any input is put in and a fixed length output is given. A hash function is a one way function and cannot be reversed.

  1. In bitcoin miners use hash functions to solve the puzzle of new blocks. Blocks consist of a header which contain the Hash of a previous Block, Hash of the merkle root, time stamp a bits target. Miners will guess a nonce number which is then appended to the hash merkle root, this is then hashed. The resulting hash is compared the bits target, if the hash is lower than the target the puzzle is solved a reward is given to the miner who solved it.

  2. A collision refers to two unique inputs giving the same result when hashed. Collision resistant would mean that no two results are the same from two unique inputs. It is not necessarily possible however in the most cases the time it would take for a collision to actually happen is negligible.

1 Like

creating a unique digital fingerprint from an input

haven’t researched it, but what first pops to mind is that a bitcoin address is a hash function from the mnemonic phrase you typically get when installing a wallet.

It was also described in the article from the previous assignment, but I found this explanation to be more helpful. In my own words: inputs can have unlimited length, but hashed outputs have a fixed length. Therefore it’s possible that two different inputs have the exact same hashed output, i.e. there’s a collision. This should be prevented, because if you can get the same hash from a different input, you can change the block without anybody noticing. Therefore hash functions need to be collision resistant: i.e. the chances for this occurring should be very, very small.

1 Are functions that can be used to map data of arbitrary size to fixed-size value.
2 The inputs of the hash functions are the most recent not yet confirmed transactions, miners have to arrange then in order to get the smallest possible hash.
3 It means that every set of entries should have one and only one possible hash. Although it is possible for a hash functions to have a collision, it is very hard to get then.

1 Like
  1. It’s a one way street so to speak. Input always generates a random crypto ID output that can not be traced back to input.

  2. Hashing in bitcoin, SHA 256, takes any input data (transaction) and generates a hash with a specific length. The hash rate is also leading to security in Bitcoin, the higher hash rate the more the network confirms and validates data and a higher rate making it harder for 51 % attacks or shadow mining.

  3. I think it mens the hash output length must be long enough so that there is an infinite possibilities of output, so always you can trust a input to get a unique hash output.

  • Describe hash functions with your own words

Hash functions are functions that change text, or input, to a unique fingerprint. There are several types of hash functions. SHA-256 is used on bitcoin.

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

Transactions that are inputted on the block chain are put through a hash function, which gives it its unique fingerprint, or output, which cannot be reversed. In the case of bitcoin the hash function used is the SHA-256, which uses 256 bits in its output, making it very difficult to reverse it to find the original input.

  • 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 is a property in Hash functions in which it is difficult to find two inputs which hash to the same output.

1 Like

A hash function is a method of encryption. Basically takes any sized data and “encodes” it to a set size.

Hash functions are used in bitcoin through mining. It is a critical aspect of the “proof of work” algorithm. The hash function provides the necessary information regarding date, difficulty, block ID etc.

Hash functions need to be collision resistant because this is essentially the difficulty of mining. The lower chances of identical strings increases the collision resistance; increasing the overall difficulty of cracking.