Homework on Hash Functions - Questions

  1. Hash function takes input of any string and convert into a fixed length output. That out output is unique when change in input a little bit. And it has property that from output we can never get input.
  2. in Bitcoin hash function SHA256 is use.
  3. collision resistance means is very difficult to have same output from two different input. That is very important property in cryptographic hash function.
1 Like

What do you mean by this?

1 Like

For this use case, we use public /private key cryptography. Hash functions are more used to create a digital fingerprint. Because if you change only 1 character, the hash will be completely different, so it is good way to check the integrity of data.

1 Like

thank you sir i understand it now . :slight_smile:

Homework on Hash Functions - Questions

Describe hash functions with your own words

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

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

1.Simply can describe the hash function as giving any specific data as an input ā€œA" to a mathematical functional system and on the other hand receive a specific data as an output which acts as a digital fingerprint which only is gets produced to input ā€œAā€

2.Bitcoin with the Help of SHA-256 randomly produces numbers that is only related to the specific input data and generates values which is the way minings come along

3.it means you never get the same output for 2 different input even identical ones.
:grinning:

1 Like

Identical inputs should always return the same hash, this is the property of a hash function, but not for two different ones. :slight_smile:

1 Like
  1. Describe hash functions with your own words

Hash functions are one way functions (INPUT to OUTPUT) where each input produces a unique digital fingerprint.

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

To help validate transactions and gain consensus so it can be added to the blockchain. This Secured Hashing Algorithm helps secure the network against bad actors.

  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

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

  1. Describe hash functions with your own words
    ANSWER: EACH UNIQUE INPUT WILL PRODUCE A UNIQUE OUTPUT - YOU CAN GO FROM INPUT TO OUTPUT BUT CAN NEVER GO FROM OUTPUT TO INPUT - SO IT’S A ONE WAY FUNCTION
  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).
    ANSWER: THE HAS FUCNTIONS IN BTC IS USED SO THAT THE DATA IS ENCRYPTED AND CAN’T BE ALTERED AND IS DONE THROUGH SHA256. THE DATA IS THEN STORED IN THE BLOCK AND THE CHAIN OF BLOCK IS VERIFIED AND A LEDGER IS CREATED TO BE HASHED TOGETHER FROM THE PREVIOUS BLOCK TO CREATE A NEW ONE.
  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] ANSWER: CRYPTOGRAPHIC DIGITAL SIGNATURES REQUIRES ONE-WAYNESS, SO THE PASSWORD CONFIDENTIALITY IS REQUIRED. AKA 2ND PREIMAGE RESISTANCE, THIS PROPERTY GUARANTEES THAT IT IS IMPOSSIBLE TO FIND AN ALTERNATIVE MESSAGE WITH THE SAME HASH VALUE AS A GIVEN MESSAGE. THIS PREVENTS FORGERY WHEN AN ENCRYPTED HASH CODE IS USED. A STRONGER NOTION CAN BE USED IF IT SATISFIED A STRONG COLLISION RESISTANCE, SO THEREFORE IT IS COMPUTATIONALLY INFEASABLE TO FIND ANY PAIR THAT RESULTS IN COLLISION.
1 Like
  1. Describe hash functions with your own words
    –> a hash function is a cryptographic one way function which converts any digital input into a unique output (hash).
  2. How are hash functions used in cryptocurrencies like bitcoin?
    –> for bitcoin the sha256 function is used to sign transactions. Further the multiple transactions in each block are combined through merkle trees (the hashes of each transaction are hashed again until there is just one hash left)
  3. What does it mean when we say that hash functions need to be collision resistant?
    –> the outputs of several different inputs should not be the same
1 Like
  1. Describe hash functions with your own words

It is a function in which it is infeasible to determine the input from the output.

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

To connect one block with the attached ones.

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

That they different inputs should not give the same outputs.

1 Like
  1. Making an input a certain amount of bits output
  2. Hash functions are used to leave a footprint of a transaction on the blockchain.
  3. It’s collision resistant if 2 different inputs will not get the same output.
1 Like

Well, that really wasn’t the best explanation. Public and private keys work to enable encyrption and digital signatures whereas hashing is better explained as you said in your feedback below, used to create a digital fingerprint as a single change in the input will result in a different output.

1 Like
  1. Describe hash functions with your own words

  2. Hash functions are one way functions with inputs producing outputs that have a unique digital fingerprint.

  3. 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 to create a consensus between the miners in order to find the truth. They do so with the SHA-256 (Secured Have Algorithm)

  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
  1. Hash functions are unique functions that create a unique output for every input where the input cannot be deduced from the output, making them a secure way to codify a data set.
  2. Has functions are used un cryptocurrencies to secure transactions that contain sensitive information which should be protected to maintain the integrity of the currency.
  3. Has functions need to be collision resistant in that no two different inputs should be able to produce the same output, but since this is impossible to prevent completely, the hash function must have a resistance that it strong enough (almost impossible to arrive at a collision) such that the probability or arriving at a collision at a moment in time in which it could compromise a transaction, is close to impossible.
1 Like

matematical way to process information, any input will give us output in regular form.

data storage system

any number of connected inputs from output will not get attacker closer to break the hash

Transactions are signed using the private key :slight_smile:

Hash functions are not used as storage, they are used for integrity and are stored together with original data. :slight_smile:

I’m not sure I understand your answer. Collision resistance is the probability of two inputs resulting in the same output. :slight_smile:

2 Likes
  • Describe hash functions with your own words
    Hash functions is a mathematical function that accepts an input of any variable length to give you an output of a fixed length.

  • 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. Hash functions are used in creating creating bitcoin addresses
    b. Hash functions are used to used in puzzle applications to determine whether a block is added to a blockchain
    c. Hash functions are used to determine whether a particular hash is in the Merkle tree.

  • 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).
    Because hash functions are fixed in length and deterministic, it is imperative that you should not find two different inputs that will give you the same hash. It is not impossible to find, but literally unfeasible to find. ā€œIt is more likely the earth will hit by an asteroid in the next secondsā€ than sha256 addresses colliding, therefore sha256(a)=sha256(b) then it is safe to say that a=b. Because of this property, sha256 is a good hash function for bitcoin because it is collision resistant.

1 Like
  • Describe hash functions with your own words: Are special functions that take input and translate it to a unique list of alphanumeric characters. The translation cannot be identified based on the characters used for input or output and the translation is based on a special key of variable length to create the output.
  • 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).Bitcoin uses hash functions to create a unique address and add new data to blockchain. In order to add new data, the speed of creating the output for has function must be above a threshold in order to add on to the blockchain.
  • 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 speed to create the hash function output must be based on a specific rate (total coins, time, how difficult the puzzle) before you start adding blocks on chain. Else we add too fast then as the rate increases another entry may overlap and conflict with an older one. This may collide with existing has function output that act as addresses on the tree.
1 Like

1.) Describe hash functions with your own words
Hash functions are functions that are deterministic which means that same input should always give the same output.
You cannot determine input based from the output. Only way function.
The input to a hash function can vary in size but the output will always be a fixed character 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).
In Bitcoin, hash functions are used to determine the ā€œdigital fingerprintā€ of the history of a transaction sequence. When new transactions are added to the ledger. The blockchain network calculates a new hash fingerprint of the new block added to the previous chain of blocks. So if someone tries to change any block/transaction in the ledger, it will need to calculate a new hash fingerprint for all the subsequent blocks. It becomes almost impossible and increasingly difficult to alter the transactions in the blocks the farther you go back in the history to change it, making the ledger highly unfeasible to manipulate/corrupt.

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 basically means that you should never (near impossible) get the same hash output, given two different inputs.

1 Like