Homework on Hash Functions - Questions

  1. A hash function takes an input of digital information of any length and creates an output of a fixed length. This is a one way function.

  2. Hash functions are used to secure transactions, create cryptographic public and private keys, and are also used for block hashing.

  3. Two different inputs will not create the same hash function output.

1 Like
  1. They are functions that, given a set of inputs, generate another output of fixed length.

  2. They are used to create a digital footprint, therefore unique, in the processing of data or transactions.

  3. That the same output cannot be generated from two or more different inputs.

1 Like
  1. Describe hash functions with your own words- Creates a unique input that can never be reversed, can go from input to output but never output to 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). They are used in cryptocurrencies to pass transactions information anonymously and to pass information securely

  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).
    [/quote]

" A hash function has to be collision resistant which ensures that it has to be impossible for two different inputs to produce the same output" not all has functions have collisions as well.

1 Like
  1. Hash functions can convert strings into data.
  2. Hash functions is used for security purposes.
  3. Because it is impossible to get the save hash function twice.
1 Like

Hash functions take data and morph them into unique strings of numbers and letters. There is no way to go back from this output to the input.

In the case of Bitcoin, the hash is based on the SHA-256 function that creates unique alphanumerical outputs of 256 characters. The outputs are used to ā€˜save’ the transactions in blocks, and are also used to link the blocks together. If someone tries to change a block the slightest, the SHA-256 output will be radically different.

Hash functions need to create unique outputs. If two different inputs led to the same output, there would be a ā€˜collision’. Therefore, ā€˜collision resistance’ means the degree to which a hash function creates unique outputs.

1 Like
  1. Describe hash functions with your own words

Hash Functions are used to make the blockchain secure. They take different type of input and ensure the output always has a uniform length. This helps with security as hackers won’t be able to correctly guess the length of input.
It is also a linear way interaction between input and output in that a generated output can not be reversed to reveal the input.
Finally, different inputs can never result in the same or even similar outputs. A slight change in an input will result in a totally different output.

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

Hash functions are used to pass transactions in the blockchain anonymously. They help to secure the blockchain and to prevent double transaction - selling the same bitcoin to multiple people. (I don’t understand the process well enough to write about it. I will wait for better lessons from the course materials.)

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

it simply means no two separate input can result in similar output. The output will always be unique as long as the input are not exactly the same.

1 Like

A1. A means of encryption
A2. To encrypt the transaction in a way that it can be validated but cannot be read inside.
A3. Hash value shouldn’t be same as a previously generated hash with different data.

1 Like
  1. Hash function represent input of any kind of data and as output delivers a unique string of numbers and letters.
  2. Hash function in Bitcoin is used to produce the private and public key that represents the input data and its validated by the miners using protocol called Proof of Work.
  3. Collision resistant means that is almost imposible to get same output for two diferent sets of data.
1 Like

1 a hash function is something that takes any type of input and gives back a series of digits and letters as output.

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 transactions

3 Collision resistance is a property of cryptographic hash functions: a hash function is collision resistant if it is hard to find two inputs that hash to the same output; In some 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. A hash function provides a unique fingerprint and can be used to confirm data integrity
  2. Hash functions are an integral part in keeping the Bitcoin and other crypto currencies safe and secure.
  3. Hash functions need to be collision resistant in order to ensure that 2 individual inputs do not produce the same output
1 Like
  1. Describe hash functions with your own words
    Any form of input data gets converted with a type of hash algorithm (i.e. SHA256) into a hash output which represents the input data. This is irreversible and can be verified for any changes of the input 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).

Once a new BTC block has been mined it is hashed through SHA256, this is then used to verify and check that previous blocks have not been tampered with or changed.

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

A Hash collision is when 2 strings of hash input result in the same output. Meaning that you could duplicate an output hash but the inputs are different, apply this to a block on the blockchain and you could technically change the transactions of the block unnoticed. Hash functions need to be resistant to this to secure the input and output data, minimizing the chances of fraud/mistakes etc. Therefore collision resistance means the degree to which a hash function creates unique outputs

1 Like
  1. Hash functions are used to convert data of variable size into a unique fixed-size value.
  2. Bitcoin uses Block Hashing for miners to confirm a block of transactions. The transactional data is combined with a nonce, then fed to the hash function to generate a hash digest. The hash digest must have an exact number of leading zeroes to be considered valid. The miner must change the nonce repeatedly until the valid number of leading zeroes is reached, at which point the block of transactions is validated.
  3. Collision resistance means that for 2 distinct inputs, the hash function will never return the same value. So, for 2 values x and y, f(x) will never equal f(y).
1 Like
  1. Describe hash functions with your own words.
  • Hash functions take any type of data as an input and produce a unique fingerprint as an output. They are one-way functions because it is not possible to reverse the hash function to obtain the input from the output.
  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 in cryptocurrencies like bitcoin to add a block of transactions to the network. Mining nodes compete to find the nonce ( a number) that will produce the hash fingerprint with the maximum number of 0s. The winner will be allowed to add that new block of transactions to the network and for doing so, it will be rewarded with a certain amount of bitcoins.
  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).
  • A hash function is collision-resistant if it is hard to find two inputs that hash to the same output.
1 Like
  1. Functions that take any input and convert it to an irreversible, fixed-length output.

  2. In PoW, cryptos are mined when someone finds the input which generates a particular output. Also used to keep transaction data secure.

  3. Collision-resistant means you cannot get the same output from two or more different inputs.

1 Like
  1. Describe hash functions with your own words

A. A hash function is a one-way function, meaning you can create and input and receive a unique digital output. This output is represented in SHA-256 by base 16; a sequence of digits and letters that represent the numbers in binary 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).

A. From previous knowledge I know that hash functions are used for generating wallet addresses or private keys and to track individual transactions. They enable people to make transactions anonymously. They are an integral aspect to the blockchain.

I too now know that they are used for mining. What I found online matched up.

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

A. Hash functions need to be collision resistant to promote the security and immutability of the blockchain. They are unique and therefore promote provenance too. A hash function is collision resistant because it is hard to find two inputs that hash to the same output. If it wasn’t collision resistant, if we found a way to make the hash function 2-way, we would see the end of currencies such as bitcoin.

1 Like
  1. Hash functions are one way functions. That means, that you can only use an input to get a specific output. But you cannot take the output and find out the input. Every input has its unique output.

  2. Hash funstions are used to create new blocks in the blockchain as they are unique and they can not be copied or cracked. This keeps up the consesus, which is vital for the functioning of the blockchain.

  3. This means that is is very difficult and almost impossible to find two different inputs that produce the same output.

1 Like
  1. A Hash Function is a encrypted way of securely transferring data. Every output is diffrent even if something small is changed such as a space, this is why people will also use the Hash result to verify things haven’t changed in a document.

  2. In Bitcoin the Hash Function is used to verify Transactions, and mine Bitcoins.

  3. Collision resistant is when the result is not the same as another input, if two inputs line up with the same output then it is a collision. If this happens people will stop using the Hash, as for example you could trick people into agreeing on one document, when another has the same Hash, thus you agreed to that one

1 Like

1.Hashfunction is one which gives unique output for unique input and reversing from output to input is not possible
2.Hash functions creates unique hash values for transactions using mathematical calculations which has unique and fixed length of output
3.collision resistant means one input should not have two same outputs

1 Like
  1. Hash is a data integrity check. Hash gives a unique fingerprint to each unique output. It is a linear function that can only go from input to output. .

2.Hash functions are used in Bitcoin mining. In the process a block of unconfirmed transactions is fed to a hash function and a hash digest is generated. They are primarily used for generating public keys and block hashing. Hash functions are used to pass transaction information anonymously. Hash functions are necessary in everything from mining blocks to signing transactions to generating private keys. It is a mathematical process that takes data and performs operations on it then returns a unique output data

  1. Being collusion resistant means that it has to be impossible for two different inputs to produce the same output. Changing even the smallest piece of input will result in a different output. It is almost impossible to reconstruct the initial data from the hash value. a brute force attack would need to make 2 256 attempts to generate the initial data. Having two messages with the same hash value is a collision that is extremely unlikely especially with the safety nets put in like 10 minute time limits preventing enough time to carry out the amount of guesses it would take to find the data and have a ā€œcollision.ā€
1 Like
  1. Describe hash functions with your own words.

Hash function is one way function where input of data (any form) generates the unique output.

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

Cryptocurrencies like bitcoin use hash function to get the input and generate a unique out like a digit finger print.

  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 means: given two different inputs A and B where H (A) and H (B) are their respective hashes, it is infeasible for H (A) to be equal to H (B).

1 Like