Homework on Hash Functions - Questions

[quote=“ivan, post:1, topic:8430”]

  • Describe hash functions with your own words
    Hash functions transfer input to a unique output code.

  • How are hash functions used in cryptocurrencies like bitcoin?
    Hash functions are used to write new transactions, which allows decentralization and security.

  • What does it mean when we say that hash functions need to be collision resistant? ([/quote]
    Collision resistant is the inability to have 2 inputs giving the same output.

1 Like
  1. Describe hash functions with your own words
    Hash functions, take inputs of any length, to return outputs of a fixed length. Each input will always get its own output. They are called fingerprints.

  2. How are hash 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. The most common use of hash functions is in the storage of passwords.

  3. What does it mean when we say that hash functions need to be collision resistant?
    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;

1 Like
  1. Hash functions run on programs which take an input of a transaction and gives an output of a long string of numbers and letters. They are used to make a unique digital fingerprint of of each transaction. With the output being so long, it is nearly impossible to crack using brute force.

  2. Hash functions are functions that are used to verify information that passes through the blockchain. They can verify whether someone has sufficient funds to purchase something, make signatures, etc.

  3. Hash functions must be collision resistent otherwise people could use brute force to get the same input as the output, leaving the hash at risk for alteration.

1 Like

Hash functions take an input, then runt them through the function equation, and the output is a unique “digital fingerprint” a unique collection of numbers and letters that represent the final output. A good hash function cannot be reverse engineered from the output to discover the input accurately.

Hash functions give us a unique digital fingerprint of each transaction that will forever stay on the blockchain. If anyone were to edit a previous transaction, it would change the digital fingerprint on their ledger, and all the other validators would recognize this and reject the change as consensus. This keeps Bitcoin’s ledger immutable, unchangeable, and secure.

Collision resistance is the likeliness that any two inputs would create the same unique hash output. The statistical probability of this is incredibly small with SHA256 because of how complex and long the outputs can be, but it is theoretically possible. Thats why they say it is collision resistant and not collision proof.

3 Likes

Hmmm, not really. For that you can just check the UTXOs left in an address that is paying you. :slight_smile: a more important use case for hash functions is to cryptographically link blocks in a chain :wink:

1 Like

Describe hash functions with your own words

  • hash functions allow you to put any input into the algorithm to produce a specific digital fingerprint. No matter the input, the result is always a set number of unique characters.

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 bitcoin to write new transaction into the blockchain through the mining process.

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]

  • The hash function needs to be collision resistant so that no two inputs results in the same output.
1 Like
  1. Hash functions are used to keep any kind of information private or hard to get into.

  2. It is used to write out different transactions.

  3. It needs to be collision resistant because if someone got the same hash as someone else, everything would be messed up because the computers wouldn’t know what to do if two transactions were trying to be made with the same hash.

2 Likes
  1. a hash function takes an input(any input) and produces a hash(a unique fingerprint for that input)
  2. hash functions allow a block of data to be moved from one place to another. the destination is determined by the input. the input contains sensitive information. a hash function allows the data to be transferred in its original unaltered form. if the data in the original data is altered in any way the hash is different and that transaction is rejected by the network.
  3. collisions result in two different inputs resulting in the same hash output. the hash function needs to be complex enough to avoid this. if collisions happen too often then the hash function is inefficient and will not perform its intended purpose. documents and transactions can then be sent to incorrect addresses. in bitcoin this could result in incorrect funds being sent to incorrect addresses.
1 Like

1.Its a special cryptographic Formula that generate a unique figure Print for every unique input, meaning it is deterministic, its only one way (it is Infeasible to go from output to input )

  1. In the bitcoin protocol, hash functions are part of the 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, not-yet-confirmed transactions (along with some additional inputs relating to the timestamp and a reference to the previous block).

Changing a small part of the input for a hash function results in a completely different output. This property is crucial to the ‘proof of work’ algorithm involved in mining: to successfully ‘solve’ a block, miners try to combine all of the inputs with their own in such a way that the resulting hash starts with a certain number of zeroes.

  1. It means there is a low possibility we could have two inputs that result to same output hash
1 Like

1: a hash function is a set of cryptographic keys generated from one input. The output will always be generated from the input but the input can never be generated from the output, and the hash will always be the same length.

  1. Hash functions are used in bitcoins to process transactions and transaction messages securely such as time stamp and reference to the previous block. SHA-256 stands for Secure Hashing Algorithm 256.

3.Definition: Collision resistance is the property of a hash function that it is computationally infeasible to find two colliding inputs. This property is related to second preimage resistance , which is also known as weak collision resistance .

1 Like

Hello Mr.Alko89. Thank you for reaching out!
SHA256 is used for mining & creating Bitcoin address… I had to search for an answer on this one. have I got this right?

1 Like
  1. conversion of a string of characters (input) into a hash (output) where any change to the input will completely change the output and there is no way to derive the input from the output.
  2. Wallet address generators. To write new transactions into the blockchain through mining.
  3. found online: 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 ab but H ( a ) = H ( b ).
1 Like
  • Describe hash functions with your own words
    a hash function processes a string input and produces (basically) unique output in a certain format; from the output there is no way to get the original input

  • How are hash functions used in cryptocurrencies like bitcoin?
    hash functions are used to create private keys and wallet addresses; there are used as a security measure in blocks by encrypting its content (transactions) to create a unique hash for each block

  • 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).
    there is almost 0% of probability for the hash function to produce the same output twice

1 Like

Correct! Just note that addresses are hashes of public keys and not private keys. Also transactions are hashed to get the txid :slight_smile:

1 Like
  1. Hash function means taking an input (could be text, numbers - short or long) and putting them through a process which gives you an output - which is a set number of digits/letters. The output is called the digest, or the fingerprint because it represents whatever was the input.
  2. Hash functions are used in bitcoin when someone makes a transaction, and that transaction is the input information. It is hashed and the result is a long string of numbers/letters which represent that transaction.
  3. If a hash function is collision resistant, it means that it would be exceedingly unlikely to be able to find 2 distinct inputs that gave you the same output. They do exist, because the combination of numbers/letters is finite, but to be able to find them would be almost impossible and very impractical.
1 Like
  1. It is a one-way function that produces a unique output given a unique input.

2.They are hashed into other hashes creating a merkle root with a final hash which is the transaction ID.

3.It means it should not allow two unique inputs to produce the same output.

1 Like
  1. Hash functions takes an input ie a string of text and creates a cryptographic output using a complex formulae. This is a oneway function i.e it is near impossible to trace the input from the output alone.

  2. Bitcoin utilizes proof of work combined with SHA-256 to obtain mathematical traceability and unbreakability.

The process through which this is ensured is called Bitcoin mining that utilizes Bitcoin hashes generated through SHA-256 function at various steps of mining.

  1. In cryptography, 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
1 Like

1)hash is a mathematical functions which is created one way to enable security during the process of the message intended for a particular recipient only .
2)bitcoin uses the SHA-256 hash algorithm to generate verifiable random numbers in a way that requires a predictable amount of CPU effort.Generating a SHA-256 hash with a value less the current target solves a block and wins you some coins.
3)Collision resistant is a security notion of cryptographic. A collision of a hash function is a pair of different INPUTS which give the same OUTPUT .

1 Like
  1. Describe hash functions with your own words
    Hash functions have an input and an output that is unique for each input. It´s like a fingerprint. You can´t go from the output to the 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 part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process.

  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).
    Hush function is collision-resistant if is it hard to find two inputs that hash to the same output.

1 Like

How Bitcoin addresses are created: