Homework on Hash Functions - Questions

  1. Describe hash functions with your own words

hash function is a unique ouput given from an input. this output cannot be duplicated.

  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 ve been used to create unique coin units that cannot be duplicated or interefed.
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).

colliion resisteant means the hash cannot be modified , hacked or altered.

Yes, but keep in mind that this is not by using Sha256. Public keys are calculated using ecdsa eleptic curve cryptography. And to calculate a bitcoin address you kind of double hash the public key with a prefix and a checksum.

Check this post where it describes the process in detail:

1 Like

Collision resistant means that it should be almost practically impossible for 2 different inputs to produce the same hash

1 Like
  1. Hash functions are unique inputs that give a unique output. Example is SHA-256 Base 16 code.

  2. Hash functions in Bitcoin help to create unique wallet addresses. Each transaction is hashed using SHA-256 for Bitcoin and then stored on the ledger which cannot be changed.

  3. Collision resistant means there is a very LOW chance of different inputs creating the same output.

1 Like
  1. Function that creates a unique output of a given input that cannot be reverse

  2. Bitcoins uses SHA-256 hashing algorithm to to take an input string of any length and giving out an output of a fixed length (often called the digest).
    Hash functions are used in Bitcoin mining by solving problems like H(S) needs to start by X times the number 0 before both being granted the Bitcoin rewards & having the responsibility to lock the block in the blockchain.

  3. Collision resistance is a property of cryptographic hash functions: a hash function H is collision- resistant if it is hard to find two inputs that hash to the same output; that is, two inputs a and b where a ≠ b but H(a) = H(b). … Cryptographic hash functions are usually designed to be collision resistant.

1 Like

Hash functions are not used for deriving public keys and a private key is just a random number. However the public key is hashed to get the address :slight_smile:

1 Like

Sorry still learning. This stuff is extremely confusing. I do not have any background in this.

1 Like

Don’t worry, you will learn :wink: Keep up the good work! :raised_hands:

2 Likes
  1. A hash function takes a string of date of any length and converts it into a string of data of a fixed length. This enables large amounts of data to be stored efficiently on the block chain. In the case of bitcoin, the output string is 256 bits.

  2. Hash functions in bitcoin are used to provide information security and allow bitcoin to remain decentralised and secure. Bitcoin hashing properties include efficiency, collision resistance, pre-image resistance and randomness by using complex mathematical calculations. Hashing is essential to bitcoin mining because it allows the proof of work algorithm to function. The hash function is applied once to confirm if the miner did the required amount of work and if the solution is good or not.

  3. Collision Resistant refers to the need to ensure as far as possible that two different inputs will not produce the same output. This is especially important to prevent double spending.

1 Like
  1. A hash function has a unique input and will produce a unique output, it’s not possible to go from output to input, then it’s broken.
  2. Hash functions in cryptocurrency are used for many things, such as a public key, private key, transactions etc.
  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; that is, two inputs a and b such that H(a) = H(b). Every hash function with more inputs than outputs will necessarily have collisions.
1 Like
  1. Describe hash functions with your own words
  • It is a mathematical function which protects the BTC. It takes any length of data as an Input and create 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).
  • For BTC we are using SHA - 256 function and we take the transaction as an Input and we get output of a fixed length.
  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).
  • Means that it can happen to have 2 different Inputs but with the same outputs. In this case we have a collision. But the probability of this is too small like the brute force of the hash to find out which output is the exact input.
2 Likes
  1. Describe hash functions with your own words.
    Hash functions are formulas where you can input something and you will receive an output. All outputs are a set standard length. The same input will always result in the same output but if any small change is made to the input the output is completely changed. You can not figure out the input by only knowing the output.

  2. How are has functions used in cryptocurrencies like bitcoin?
    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. Computers (miners) guess inputs to try to get an output that starts with a certain number of zeros. When this criteria is met, it gives the miner the right to mine that next block.

  3. What does it mean when we say that has functions need to be collision resistant?
    When two different inputs produce the same output, it is called a collision. Collision resistant means that the odds of this happening are very small so it is very unlikely (but possible) that two different inputs will produce the same output.

2 Likes
  1. A hash function is a computation that gives each unique input a unique digital fingerprint of the original data as an Output. With hash function you can only go from Input to Output and not the other way around, making it infeasible to know what the original Input was by looking at the hash output. Slightest change in the input changes the hash output completely.

  2. Each block in the blockchain contain hashes of the previous blocks, making it easier to validate that the data from the previous block haven’t been changed or modified. If any data in a previous block were to be modified the hash output would change completely and would be discovered immediately by other blocks, breaking the whole chain.
    When you make a transaction through Bitcoin blockchain, the data is encrypted through hash that gives you your unique transaction receipt. This makes sure that nobody can copy someone else’s transaction.

  3. Collision means that two different inputs generate the same output hash. Hash functions are not completely collision resistant but they are statistically insignificant. They need to be as collision resistant as possible as this improves security significantly.

2 Likes
  1. Hash functions allow you to create a unique hash for a certain type of input data. If anything changes within the input data the hash output will change.

  2. Hash functions are used in cryptocurrencies to keep the personal data private and secure by creating hash outputs.

  3. To be collision resistant means to avoid having the same hash output for different inputs.

1 Like
  1. A hash function takes any input and assigns an output to that input. a good hash algorithm makes it infeasible to determine the input from the output

  2. in blockchain each block contains the output data of the previous block, this is what creates the chain.

  3. with a large number in inputs there maybe instances where inputs have the same outputs, unlikely but probable. collision resistance does not mean that this does not happen just that it is unlikely too

1 Like
  1. Describe hash functions with your own words
    You start out life as a caterpillar; you follow instructions to the letter, climbing into your chrysalis; you come out of it all with a completely new look, a new everything actually. There is absolutely no going back. You are now, because you participated in this hash function, a butterfly.

  2. How are hash functions used in cryptocurrencies like Bitcoin?
    Hash functions make up the block hashing algorithm for cryptocurrencies like Bitcoin. This process is for putting transactions into the blockchain through the mining process. Bitcoin mining is about the inputs as a function of the most recent transactions. These are transactions that have not been confirmed.

  3. What does it mean when we say that hash functions need to be collision resistant?
    If a hash function is collision resistant, you cannot find two inputs that hash to the same output.

1 Like

:bug: -> :butterfly:
caterpillar is actually an input to a one way pupa function that outputs a unique butterfly :smiling_face_with_three_hearts:

  1. Describe hash functions with your own words

Hash functions are functions that produce a unique fingerprint number from a given input. There is repeatability (each single input always generate the same output), and it’s one-way (you cannot get the input through the output hash).

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

Trying to put in a few words:

  • each block in bitcoin’s blockchain holds the hash of the previous block
  • if any information is changed in a given block, the hash saved in the subsequent block denounces its predecessor has been changed. Participants of the network will soon identify the tampering and discard it.
  • in order that this change is to be accepted as the “new truth”, all the subsequent blocks from the tampered point would also have to be rebuilt to hold the valid hashes. This makes each block more difficult to be changed the older it gets in the chain (as new blocks are added to the chain).
  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 a characteristic of hash functions by which you are likely never going to have the same output for different inputs. Although it’s technically possible, it’s statistically unlikely to happen.

2 Likes
  1. A method of computation where you take any size input and get a fixed size output.

  2. Hash functions are used to record data. Hash functions may be used to create and protect passwords. When you create a password, you create a hash. In order to access your account, you need to input that same hash function in order to produce that identical hash which unlocks your account.

  3. Collision resistant means there needs to be a large enough pool of hashes where each input relates only with one, unique output. You do not want multiple inputs producing the same output because that reduces security level and the effectiveness of PoW.

1 Like
  1. A hash function is a computation that takes an input of any length and converts it into an output of a fixed length.
  2. Hash functions are used to create block hashes, which consist of transactions, timestamps, nonces and the hash of the previous block. Hash functions are used in proof of work, by challenging miners to find a nonce that creates a hash that begins with the requisite number of 0s. It’s used for other things such as key generation, but I’ll have to do some more reading for that.
  3. Collision resistance means that a hash function should not produce the same hash value for different inputs - it should be an extremely low probability
1 Like