Homework on Hash Functions - Questions

1.) Hash Functions are a computations of data that is a unique input that make a “fingerprint” output using alphanumeric characters.
2.) Hash Functions used in cryptocurrencies used in Bitcoins provide a unique input/output (SHA-256), which works great for cryptocurrency as it is a one way function and cannot be used to “go back”.
3.) A hash function is collision resistant if it is hard to find two inputs that hash to the same output.

1 Like
  1. Hash functions is a term for a specific algorithm that adds computation to an input and gives an output. Hash is different to normal functions because they create a unique output purely for that particular input, and they’re uni-directional.

  2. Hash functions are used in Bitcoin to turn the block of transactions into a unique SHA256 “ID”.

  3. Collision resistant means that 2 different outputs will never equal the same hash.

1 Like
  1. Hash functions are functions that produce a unique output that can not be traced to its initial data.

  2. Hash functions in bitcoin are used to record new transactions into the blockchain through mining. This allows for bitcoin to be mined rather than created out of nothing.

  3. A collision-resistant hash function makes it difficult to find two inputs that produce the same output.

1 Like

1.) Hash functions are one way functions that generate a unique output to a unique input. the Resulting hash (output) can not be linked to the input there for making it temper proof. as soon as someone figures out how to go from output to input it would break the proof of work system.

2.) There are different hash functions for example md4, md5, SHA1 and SHA256 which have a unique way of hashing a unique output to an unique input. some are more secure than others and it bears the question if SHA256, the current standard, will be the primarily hash function for all times. As computers get more powerful and advanced so will the software and hardware to crack these functions. however by the time that happens we will have figured out new functions to address that problem and improve on the functions as we did on md5 for example.
A hash function takes an input unlimited in length, string and converts it into a limited length output called digest.
Those hash functions can be also used to save passwords on a website. if you enter your string and it matches with the digest you are loged in. it provides higher security than saving the passwords on the centralized server because hackers cant use a digest to find out the string since it is a one way function.

3.) A Hash function is collision resistant if there are no two different strings that hash the same digest.

1 Like

It means that its difficult for two different inputs to give the same output. :slight_smile:

1 Like

1.Hash functions are are basically one way functions where a unique input gives you a unique output.
2. Hash functions are used to turn any data input in a unique output.It provides a unique output which is very very difficult to trace back to the input.These hashes are thensolved/ verified by the network in some sort of consensus i.e proof of work like bitcoin .They provide the security to transactions i.e not reversible or traceable.
3.Collision resistance means the property of a hash function that is computationaly infeasable of different inputs colliding. It can be weak or strong.

1 Like
  1. Hash functions take unique inputs and create unique outputs. You can always go from the input to the output, but it is impossible to go from the output to the input. This protects the blockchain and adds layers of security to every block.

  2. Hash functions are used in bitcoin and other crypto’s to record new transactions into the network. Once the different nodes all solve the same hash function, consensus is reach and the transaction is recorded.

  3. Collision resistance is the property of a hash function which means that two inputs cannot equal to the same output. In simpler words, you must have a unique input to reach a unique output every single time a block is added to the chain.

1 Like
  1. Describe hash functions with your own words

Any string of data can be converted into a 256bit alphanumeric code

  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).
    they are used for mining. the miners try to get an output from the transaction input/
  2. 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).
    2 same inputs can not give the same output
1 Like

1. Describe hash functions with your own words
Hash functions are when any string of data is taken an is converted using the input SHA256. When inserted the output will be a unique/random fingerprint. This cannot be reversed however it provides us with a unique way to identify information.

2. How are hash functions used in cryptocurrencies like bitcoin?
Hash functions are used to encrypt transactional data on the blockchain so only the intended receiver is able to decrypt.

3. What does it mean when we say that hash functions need to be collision resistant?
This essentially says that it is nearly impossible to for a hash function to have an output of two identical hashes.

1 Like

1. Describe hash functions with your own words: Hashes are created by a Hash Algorithm that received data inputs and translates them out into secure alphanumeric chains.
2. How are hash functions used in cryptocurrencies like bitcoin? The hash function keeps BTC secure by “ kind of” disguising yet securely identifying transactions. Hashing algorithm receives a transaction (input) and translates it out to a secure and unique alphanumeric hash that represents that transaction which then are verified by miners before adding to blockchain ledger.
3. What does it mean when we say that hash functions need to be collision resistant? Ensures the rarity that no two separate transactions translate into the same alphanumeric hash (“two inputs that hash to the same output”)

1 Like
  1. A hash function is a one way function that takes an input of any length and applies a calculation to give a unique fixed legth output. This function cannot be reversed to give the input from the output.

  2. In 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. A Hash Collision is when two input strings of a hash function produce the same hash output result. If the hash function isnt collision resistant it would be easy to cheat the system.

1 Like

I’m not 100% certain of my answers here. I feel like my understanding of concepts 2 & 3 still have some holes. I’d really appreciate any comments or thoughts from anyone with a more robust understanding!

  1. A hash function is a function whose output cannot be used to determine the input. Using only a hash’s output, there is no way of telling what the initial input was.

  2. In cryptocurrencies like Bitcoin, hash functions are used to create an arbitrary problem that requires an amount of computer processing power to solve. Hence “proof-of-work”. In order to solve a block and add it (along with all the transactions contained within it) to the blockchain, computers must use brute-force trial-and-error to input data into the SHA-256 hash function until it produces a result that begins with (at the time of writing) at least 19 zeros. The number of zeros (in other words, how small the output integer needs to be) is determined by how long it takes the network of mining nodes to solve a block. The target time is 10 minutes. If, on average, it is taking less than 10 minutes to solve a block, the required number of zeros will increase, thereby increasing the amount of time (or, rather, CPU power) it will take to find an input that gives the desired output.

  3. Collision resistance is the measure of how likely it is that two different inputs will result in the same output. Generally, the amount of collision resistance increases with the number of bits produced as output. If the output only contained, say, 8 bits, given the wide range of unique input data that can be used, there would not be enough unique 8-bit integers to provide a unique hash for every possible input. In other words, it would not be particularly collision resistant.
    SHA-256 is collision resistant because of the huge number of permutations possible with a 256-bit integer (2^256?? I think?) making it extremely unlikely that two different inputs will ever produce the same output hash.

1 Like
  1. Hash function - each unique input gives a unique output called digital fingerprint. It is unidirectional function you can only go from input-output and never from output-input.
  2. Most common use in bitcoin is to generate the Bitcoin address.
  3. Collision resistant means that it must be computationally difficult to find a pair in a function.
1 Like

Hash functions have an unique output and for now we dont know how to go from output to input.

Hash functions are used in crypto in mining for approving transactions. Solving the block means combining inputs with relevant data. a lot of cpu power is needed and it’s all a lotery.

1 Like
  1. Each unique input as a unique output or digital fingerprint, once the input is changed the output changes.

  2. Uses the SHA-256 algorithm, to create unique digital fingerprints for Trustless, immutable transactions.
    Miners works to solve the complex mathematical problem, using processing power to hopefully solve the problem and win the lottery. Miners need to continually change the input until they are rewarded with the correct output.

  3. So that two different inputs can’t make the same output. The harder this is the more cryptographic secure

1 Like
  1. Describe hash functions with your own words

From an input of any size, functions calculate an output which is unique for each différent input and in a defined size. It’s one way because input cannot be retrieved with output.

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

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

It is hard to find two inputs that hash to the same output.

1 Like
  1. Describe hash functions with your own words
    A hash function is an algorithm that generates an unique number of a defined length for a dedicated unique input. The same input will always result in the same output value.
    A minor change in the input changes the output hash value completely. It is easy to generate a hash output number but it’s impossible to reverse this calculation to find out what the input value was.

  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 SHA256 functions are used for mining of new blocks (proof of work) and in the calculation of new addresses. The advantage is the asymmetrical property of this function. It takes lot of compute power to calculate the result, but is is very fast and simple to verify the result.

  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 means that the hash algorithm generates just unique hash results.
    It must be ensured that it is (almost) impossible that two different input values result in the same output hash value.

1 Like
  1. Hash functions take an input of any length and produce a unique output of a fixed length that is impossible to back calculate.
  2. Bitcoin uses hashing to turn transaction records into hashes that are added to a block, which are then added to the blockchain in linear fashion.
  3. Collision resistance means that it is very difficult or impossible to have two different inputs hash to the same output.
1 Like
  1. Describe hash functions with your own words

A very complex one way function that is set to a certain difficulty to solve based on the output’s length of digits.

  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 to tie the data being confirmed through proof of work to the previous block and desired outcome for the current block’s equation.

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

The functions need to be difficult enough to solve that simply guessing at the answer would prove a waste of time compared to doing the actual work with the accurate data to produce the desired result.

1 Like
  1. functions that convert an input to a unique output in one way .
  2. hash function in cryptocurrency used for creating addresses>>transactions>> contracts and many more.
  3. 2 different inputs will never give the same outputs
1 Like