Homework on Hash Functions - Questions

  1. Hash function is when you take a word or phrase and the hash is an output version of the original text.

  2. Hash functions are primarily used to generate fixed-length output data that acts as a shortened reference to the original data.

  3. There exists no efficient algorithm that can output a ‘collision’ in the hash function.

2 Likes

Rodolfo Pozo’s answers:

  1. Hash functions are a way to encrypt a message in a secure way. Of course, depending on which type you use.
  2. Hash Functions help to hash blocks into the bitcoin blockchain. Better said, hash functions help to write new transactions into the blockchain.
  3. A hash is collision-resistant when it is hard to find two inputs that hash the same output. I think this has to do with how resistant the hash is when it comes to "Brute Force attack.
2 Likes
  1. Hash function maps fixed-size value to each arbitrary input value.
  2. Hash function in cryptocurrency enlarges the blockchain.
  3. Collision-resistant neans practically very hard to identify two input values for one hash value.
1 Like
  1. Describe hash functions with your own words
    A hash function uses a unique input to then give a unique output from solving a mathematical function.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Hash functions are used by bitcoin to implement security that randomizes the output from the input.

  3. What does it mean when we say that hash functions need to be collision resistant?
    Finding the output which requires finding two different inputs should not be equal. Finding the same hash is supposed to be extremely difficult if not impossible.

1 Like

Describe hash functions with your own words A hash function transforms input data of any length into output data of a fixed length through the application of an algorithm.

How are hash functions used in cryptocurrencies like bitcoin? Hash functions in bitcoin are used to identify in a deterministic way the transaction that eventually will be inserted into the blockchain. Also, in relation to the cryptocurrency, hash functions are used to produce the keys that would allow the user to store and spent the bitcoins that the user can demonstrate are his/her property.

What does it mean when we say that hash functions need to be collision-resistant? For the hash functions to provide a reliable level of security and consistency they need to provide unique hashes for any given input so there could be no two equal hashes for two different inputs otherwise, there could not be possible to trace back the correct input from which the hash was produced.

1 Like
  1. A hash function takes an input, provides a computation on this and then determines an output.

  2. It is used in bitcoin when mining for the next block, where the block header along with the data in the block and then the miner ‘guesses’ a number which will then be hashed with these inputs to equal a certain criteria.

  3. Collision Resistance means that finding 2 inputs will match a certain output is very highly unlikely to occur. It is not impossible to achieve this (in which case the method would be collision-proof) but is practically nearly unachievable.

1 Like
  1. Hash funktion is a digital fingerprint from a input. Input to output but never output to input.

  2. hashing is used in bitcoin for mining, as proof of work (=miners need to find a hash result with a specific parameter) and in each new block the hash of the previous block is used as part of the input to ensure that the chain can’t be easily overwritten.

  3. Where two diffrent inputs result in the same output which is highly rare but the higher volume of input the higher the chance of hash collisions since odds grow.

1 Like

1: Hash functions receives a unique input to produce a unique output. Using SHA-256 as an example shows that if you were to write “Hello how are you” as input, it would produce a unique code of 64 numbers (ranging 0-9) and letters (a-f). However, by changing the slightest in the input eg. to “hello how are you” (lower case h) it would produce a completely different output. This can be a great fix for problems with data or document tampering.

2: Hash functions are used in mining. Whenever a new block becomes available miners will adjust their input to produce a number of 0’s at the start of the hash function. This requires a lot of random guessing and computing power to figure out the hashes. After a block is mined it will be linked to the blockchain due to the fact that the block contains hashes of the previous blocks. This makes proof of work possible.

3: It needs to be collision resistant to have the smallest risk of two different inputs creating the same hash.

2 Likes
  1. Describe hash functions with your own words
    A hash function is a function that takes as input a string of any length and gives an output of a fixed length.
  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).
    Bitcoin is using in mining. As input is an unconfirmed transactions (contain data and hash pointer of a previous block). To successfully ‘solve’ a block, miners try to combine all of the inputs with their own arbitrary piece of input data in such a way that the resulting hash starts with a certain number of zeroes.
  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 means having two different inputs that result in the same hash.
2 Likes
  1. Hash functions - a computation whereby each unique input will produce a unique output
    When we give an input to a function, the output is a unique digital fingerprint of that input.

  2. Has functions work by 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 (bitcoin uses SHA-256) which gives an output of a fixed length.

  3. Collision resistance is the property of a hash function that it is computationally infeasible to find two colliding inputs.

1 Like
  1. Describe hash functions with your own words
    *A hash function is a computer formula designed to give an input a unique output of characters. *

  2. How are hash functions used in cryptocurrencies like bitcoin?
    *Hash functions, like SHA-256 used in bitcoin, are used to send and extract value from a series of characters from user to user. They are also used to give a user a unique output for every input hased. *

  3. What does it mean when we say that hash functions need to be collision resistant?
    It means that hash functions need to have infeasibility if someone tries to find two inputs that hash to the same output.

2 Likes

Hash function is a function which takes input of any length and gives the output of same length. The process cannot be reversible.

In Bitcoin, when a block is mined, its hash is used to encrypt the next block. Therefore even the slightest change in one block would change all the hashes of the previous blocks. Thats how Bitcoin kept its immutability so far.

It means that there cant be the possibility of two different inputs having the same output. So far none of the hashing functions is collision free but same like with the brute-force attack the probability is so low that it doesnt matter.

1 Like

1 Hash function is a crypto calc which gives unique output.Given a certain input it will always give that certain output strictly related to that input.

2 Concerning Bitcoin the movements and transactions are the input that will be hashed with the result of giving an unique output of a fixed length.

3 collision resistant of hash functions : since precision and uniqueness are so important in bitcoin interactions it’s required to have always different hashed outputs. While this is impossible (a very remote possibility of 2 identical hashes is still present) we can surely affirm that it’s a pretty functional system and these hashing functions are collision resistant.

1 Like
  1. A hash function is a special function that generates a unique output when entering a specific input. There is no way to quess the input from looking at the output because the function is too complicated.

  2. Hash functions are used to transform unique information into a hash. This hash is then entered into the blockchain. A message can be very long and contain a lot of information but the output hash has always the same length. This is a good video explaining parts of the question:
    https://www.youtube.com/watch?v=2BldESGZKB8

  3. Any two inputs should absolutely not give you the same output. Here i found a great video about hash functions!
    https://www.youtube.com/watch?v=0WiTaBI82Mc

1 Like
  1. A hash function is an algorithm that takes any sized input and “hashes it” to produce a specific fixed-sized output.

  2. Cryptographic hash functions are special hash functions with secure properties that make them ideal for cryptocurrencies. Those properties are:
    a. Deterministic (same exact output for the same exact input, each and every time)
    b. Quick Computing/Speedy
    c. Pre-Image Resistant (One-way functioning)
    d. Collision Resistant (Ensuring that each input has its own unique hash value)
    e. Avalanche Effect (Changing the value in one block automatically changes the value in the previous block and all other blocks before it)
    f. Puzzle-Friendly (Where every user guess is equally likely to create a valid output)

  3. Hash functions need to be “collision resistant” and ensure that each input receives its own unique hash value, otherwise it can compromise the integrity of the output. Due to the fact however, that hash values are fixed in length, a same unique hash value for two different inputs is possible, although highly unlikely.

1 Like
  1. A hash function converts an input into a unique output, that can not be reversed.
  2. Cryptographic hash functions are used to validate data, to generate keys and to link blocks in a blockchain.
  3. Collision resistant means, that each input has it’s own unique output. Outputs of two different inputs should not be the same.
1 Like
  1. Describe hash functions with your own words
    Through cryptography, data is converted into a long string. In hash functions the process is one way

  2. How are hash functions used in cryptocurrencies like bitcoin?
    The function takes transnational data, adds it to the block, and cryprographically signs the block with starting and ending data for the chain.

  3. What does it mean when we say that hash functions need to be collision resistant
    It would be nearly impossible to get the same inputs matching the same output.

1 Like
  1. Describe hash functions with your own words
    A hash function is a one way computation that takes a unique input and returns a unique output that will always match that specific input. It is impossible to use the hash result (output) to generate the original 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).
    Hash functions are used in cryptocurrencies like bitcoin for mining and the creation of addresses.

  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).
    For a hash function to be collision resistant, its design must make it extremely difficult for two different inputs to produce the same output. The chances of that happening should be almost impossible.

1 Like
  1. Hash functions are one way functions where you can generate an output from the input but cannot find the input knowing the output.

  2. In cryptocurrencies hash functions have 6 main properties that make them secure: Deterministic, Quick Computation, Pre-Image Resistance, Small Changes In The Input Changes the Hash, Collision Resistant, Puzzle Friendly. 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. If we have two different inputs H(A) and H(B) it is infeasable to have the same output that A = B.

1 Like
  1. Hash functions are functions which give a unique output to the information that put into the function. Even a small change of an input will change the output. It is usually next to impossible to track the output back to the input.
  2. Bitcoin uses SHA526 hashing algorithm which gives an input a fixed length output. When new blocks are added to the blockchain the hash of the previous block will be tied to the hash of the new block. If someone wanted to change anything in the already accepted blocks they would have to go back to the previous block and then another and another. It becomes very difficult after 6 blocks have been confirmed.
  3. Cryptographic hashes are usually designed in a way that there will be extremely hard to find two inputs that give the same output.
1 Like