Homework on Hash Functions - Questions

1.Hash functions provide a unique identification to the output of the inputted message or code.
2.hash functions are used as an identification and authentication of the output of the datas
3.hash functions need to be collision resistant because some of the inputs have the same output under the pigeonhole principle. The pigeonhole principle guarantees that some inputs will hash to the same output. Collision resistance does not mean that no collisions exist; simply that they are hard to find for.

1 Like
  1. creation of digital fingerprints
  2. hash functions in bitcoin are used to process new transactions (input) and thus creating a part of a new block (output)
  3. collision resistant means that 2 outputs cannot be the same
2 Likes
  1. Hash functions are the equations that give completely unique output for each input that can only be figured out from input to output, not output to input

  2. Hash functions produce a one way almost unique bit code that encrypts the raw data from the OG input

  3. Collision means that two inputs produce the same output and we need to make hash function that are resistant.

2 Likes

Collisions don’t interfere with mining. If a collision occurs on the level of the hash function its security might be broken. Miners construct their own blocks (with their coinbase transaction) so the blocks are different. If two miners solve a block it means they found a different block that are both valid at the same time.

Thanks! :slight_smile:

  1. Hash functions take numerical data or string data converted to numerical data and encrypt it. This encrypting / scrambling makes it virtually impossible for the original data to be determined by examining the hash resulting from the original data. Of course, some hash functions are stronger than others.

  2. Hash functions are central to BTC because they make the transactions unchangeable, unhackable. These hash functions encrypt the transactions so they can’t be read, altered and re-written. They are one way, processes. You can take data and create a hash. But you can’t take the resulting hash, and ā€œback engineerā€ the hash to create the original data.

  3. Collision resistance is needed so that when 2 different pieces of data are hashed, the resulting hashes are not accidentally created to be identical. If there were no collision resistance, public keys could be duplicated causing chaos.

2 Likes

Actually the transactions are stored and transparent so anyone can view them. They are hashed so we get a txid and can that to construct an immutable block.
So basically the transaction hash is more used as a reference than encryption in this case. :slight_smile:

I mentioned ā€œreadā€ because the subsequent ā€œediting and re-writing the transactionsā€ require this step. Unreadable transactions were not the point I was making. Unchangeable transactions were what I was describing. Thanks for clarifying that transactions on the BTC block chain are viewable.

1 Like

[quote=ā€œivan, post:1, topic:8430, full:trueā€]
Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
    A hash is a mathematical computation that takes an input (some data) and gives a unique output. For each set of input, you get a unique output. It is a one way function. This means that it is almost impossible to look at an output and determine what the input was. Any length of input will produce a fixed length of output. A tiny change in the input of a hash function leads to a noticeable change in the output. An example of a hash function is SHA-256.

  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).
    In bitcoin, hash functions are part of the block hashing algorithms which is used to write new transactions into the blockchain through the mining process. In hash functions in bitcoin mining, the inputs are all of the most recent unconfirmed transactions (along with some additional inputs relating to the timestamp and a reference to the previous block). In short, transactions represent the inputs when using hash functions in bitcoin.

  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).
    It means that it should be very difficult or impossible to have two different inputs produce the same hash values. Collision resistance makes it harder for one to invent two messages that will generate the same hash.

2 Likes
  1. hash functions is a oneway function - it can only go from input to output - never the other way around - and it creates for each unique input and unique output. The slightest change in the input creates a completly different output.
  2. the hash function is used to write new transactions into the blockchain through the mining process - when new blocks are mined - they are getting hased (so the hugh amount of input data gets hashed via SHA256 into a fixed output length), than connected to a nonce and veryfied if the reached the difficulty level
  3. collision resistant means that is quite difficult (next to impossible) that two different inputs generate the same hash (output)
2 Likes
  1. Describe hash functions with your own words

A. Hash functions are algorithms that generate a unique output for every input introduced to it. These hash outputs are addresses that point to a given set of data.

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

A. Hash functions are used in cryptocurrencies in order to encrypt each transaction and document/record all information to a public database. These functions generate unique address hashes that point to a secure set of data.

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

A. Collision resistance among hash functions refers to the extremely low probability that two different variables will generate the same output (collide) when introduced to that function.

2 Likes

Hash Functions create a unique digital fingerprint or message. If the input is exactly the same It will output the same ā€œmessageā€ . If one small input changes the message changes completely.

  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 function SHA 256 is used to make private keys :key: link to a public key address to keep the private key :key: private. ( Crypto 101 Never give anyone access to your private key ) .
When transactions take place there is yet another hash RIPEMD-160 to scramble the public key address into another Shorter address with a linked signature to the public key address to form a transaction hash with a unique message or checksum one time deal done written on Blockchain.

  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 harder the hash value is to find the more cryptographically secure the hash function is. So a hash function should never be able to create the same output from 2 different inputs.

2 Likes

We don’t use hash functions to derive public keys, for that we use the elliptic curve function. However we do hash the public key with both SHA and RIPEMD to get the address :slight_smile:

4 Likes
  1. Describe hash functions with your own words
    is converting an input string of any length into an output of 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).
    Hash functions are used to secure( one way conversion) and validate data(small change in the input changes the hash) in cryptocurrencies.

  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 two unique inputs can never give same hash output .

2 Likes
  • Describe hash functions with your own words - functions that create a repeatable output code that can’t be used to go back to the original data
  • How are hash functions used in cryptocurrencies like bitcoin? - To verify transactions
  • What does it mean when we say that hash functions need to be collision resistant? - if two different data sets produce the same hash code
2 Likes
  1. Hash functions are one-way functions that produce a value as an output which has a high probability of uniqueness for ant input.
  2. Hash functions are used in Bitcoin mining to add computational complexity to the mining process as well as immutability to the blockchain making it nearly impossible to corrupt the stored transactions.
  3. Collision resistance means there is a low probability of two different inputs producing exactly the same hash output.
2 Likes
  1. Hash functions are one way function. Input gives output, all are unique.

  2. SHA- 256 algorithm

  3. Each given hash has to have an unique Input , so that collision can’t happen. The Birthday Paradox, where it happen, that two different Input shares the same hash, is an exception.

2 Likes
  1. Describe hash functions with your own words
    they are highly encrytpted security layers within layers as far s i can see… basically unbreakable

  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).
    wallet codes, payment codes etc

  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).
    it means not to have a duplicate anywhere.

2 Likes

1.) Each Hash Function is unique. they all have their own unique digital fingerprint. Hash functions are supposed to go from Input to Output. but never from Output to Input because if that happens then there is a problem. and then we can surely say that it isn’t secure anymore. this is what happened to MD5.

2.) They are used in mining when new transactions arrive on the blockchain. so the miner’s job is to figure out the input and turn it into an output usually it involves a lot of guessing and a lot of time.

3.) Collision resistance means that we will never have 2 inputs that have the exact same output in the hash functions

2 Likes
  1. It’s a function where each unique input produces a unique output-digital fingerprint. Changing the input would produce completely different output, meaning you can’t go from output to input. Hash function uses SHA-256 algorithm (converting any string of data into 256 bits.

  2. It is being used in Bitcoin mining when Bitcoin mining software wants to add a new block to the blockchain. All the contents of the block are first hashed. The final hash is compared to the difficulty level and seen whether it’s actually less than that or not. The block is added to the chain and the public ledger is updated and alerted of the addition. The miners are then rewarded with Bitcoin.

  3. Given two different inputs it is not feasible for their outputs to be equal. Each input has its own unique hash. No hash function is completely collision free, but it takes to long to find a collision.

2 Likes