Homework on Hash Functions - Questions

  • Describe hash functions with your own words

A hash function is a form of function that allows for a one way path of data. You input the data and get a unique output. The same input will always produce the same output and unless the hash has been compromised the output can never reveal the input.

  • 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 create new transactions, and new addresses. The transaction is run through the SHA 256 algorithm which produces a fixed output.

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

A collision resistant hash function will not have more inputs than outputs. All cryptographic hash functions today are designed to be collision resistant but not all are.

1 Like
  1. Describe hash functions with your own words
    • Hash functions convert an input to unsolvable, and unique strings.
  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 define a block of transactions. Miners are used to solve the hash algorithm within a 10 minute time period. During the 10 minutes, transactions are added to the block. When the 10 minutes are finished the miner who solved the algorithm is rewarded, the blockchain is verified, and the new block is added.
  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).
    This basically means that there can not be the same output to two different inputs. At least it will be very unlikely.
1 Like

1.A hash function is a computational formula that takes an input to produce a specific output that cannot be reversed engineered.

2.Hash functions in cryptocurrencies are used as a sort of digital fingerprint on transactions of the blockchain. All user input are specific to that block on the chain.

3.Collision resistant is when 2 different inputs create the same output. i.e. a≠b but h(a) =h(b)

1 Like

None are because the number of possible inputs (basically infinite) will always be larger than the number of possible outputs (2^256 in SHA256). :slight_smile:

1 Like
  1. hash function is, you give the hash a function and it gives u a number back that is hashed so that number cannot be copied again and used twice. so for example hashing a sentence it would give you a sequence of numbers and letters and those numbers and letters mean that sentence. but once youve sent that sentence to a party and they accept it, you cant go back and reverse it or write that same sentence again and get that same hashed sentence that you send to someone. basically it wont have the same sequence of numbers and letters as the first time. its completely different.

  2. hashes are used in cryptocurrencies like bitcoin because you cannot reverse transactions they are one way and u cannot duplicate it. and the node confirms transaction was made to the other person you cannot go and write another hash with same amount and dupe it.

  3. so collision resistance is basically so you cant have two different hashes give the same output, that was happening with md5 and sha1. with sha2 u cannot because you have u cant put two hashes that give same output this is proof of resistance. why? because once u make the hash its goes one way and u cannot make it another way and get same output, as well u cannot reverse it.

1 Like
  1. One way hash functions take any input and give a unique (digital fingerprint) output for each.

  2. In crypto currencies, hash functions are used to process and trace transactions securely.

  3. Collision resistance refers to the probability of two or more inputs creating matching outputs.

1 Like

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
    Hash function takes some input, scrambles it and turns it into a number, then gives some output that is now an encripted digital finger print of the 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).
    Hash functions are used to encrypt and protect bitcoin so for instant your wallet keys are not able to be known by someone else. This way your private bitcoin stays secure and private.

  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).
    This is how the numbers of the resulting hash can be made but it is hard for you to find 2 combinations that yield the same results. So while Hello world and Hello work might be completely different Hello world and 42otjgn394-efjw might be exactly the same. This would not be collision resistant.

1 Like
  1. Any function used to map data of arbitrary size to data of a fixed size.
  2. Hash functions used in cryptocurrencies like bitcoin when in order to add a new block to the blockchain and claim their reward of newly mined Bitcoin, miners first need to produce a hash value that is below a certain threshold, called the target.
  3. When defining hash functions capability to be collision resistant it is stated that two different inputs should be very unlikely to produce the same output.
1 Like
  1. A series of numbers and letters which is the output of the function or a digital fingerprint.

  2. hash function is a mathematical function used in cryptography. Typical hash functions take inputs of variable lengths to return outputs of a fixed length.

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

1 Like
  • Hash functions are unidirectional functions that for each input they produce an output. They are secure because you cannot find the input from just having the output.

  • They are used to mine new bitcoins and confirming new transactions on the blockchain.

  • Hash functions are collision-resistant if it is hard to find two inputs that hash to the same output.

2 Likes

1.Hash function is a one way system. To translate files and media in alfa numeric order which is not reversible.
2.hash functions used in crypto to describe new transactions .
3 . Is impossible to find 2 inputs which is result to the same out put

1 Like
  1. Hash functions take input data and output a digital “fingerprint” or hash that is a unique alphanumeric number.

  2. Hash functions are used in bitcoin during the mining process. It takes the raw data from a transaction and produces a hash code that is used when a miner is attempting to solve a new block.

  3. Collision Resistance is the property of a hash function that it’s unlikely to produce the same output from different inputs.

2 Likes

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
    Hash functions are functions that give a unique output to any input.
    Output will change completely as soon as there is a modification (big or small) of the input.
    On top of that, input cannot be founded with the output.

  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 to add block to the chain

  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’s extremely difficult to find the same output for different input

2 Likes

Hash functions like SHA256 are used in the PoW process and to generate txids. For deriving public keys the elliptic curve function is used. :slight_smile:

  1. A Hash function is a non reversible function that takes one input and gives fixed-size output.
  2. They used as part of hashing algorithm to write transaction into blockchain, to create private and public keys and signatures.
  3. It means that for a good cryptographic function should be difficult for more than one input to have the same hash output.
2 Likes
  1. Hash function transforms data into a hash, that is a number, consisting of nubers and/or letters, specific for that data. Process is done with use of hash algorithm.

  2. Bitcoin hashing is a process, in which data is converted into fixed 256 bit number. For every data input, the hashing produces unique output in form of 32 letters and/or numbers. It is one-way proces, what means, that it is infeasible to determine input data, by analysing the hash. Infeasible, but not impossible. Since every significant data produces always the same hash, it is possible to find out original data by trying. But only theoretically. Hashing bitcoin is so numerous and so rapid, that determining a single original data by brute-force becomes very time and energy consuming, that it is simply not worth it. Crime does not pay in bitcoin.

  3. Collision means, that two different inputs produce the same output. More rarely collisons occur, more secure hash function is.

1 Like
  1. Describe hash functions with your own words
    Hash functions compute an output based on a specific input. Each input has a unique output (=hash), so changing something in the input results in another random and unique hash. This process is 1-directional, you can’t derive the input from the output. If this is possible, the hash function is broken.

  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).
    Miners use hash function SHA-256 (in bitcoin) to hash data from all the bitcoin transaction that will be added in 1 new block on the blockchain.

  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 each input should result in a unique output. 2 different inputs can’t result in the same output.

1 Like

1- Describe hash functions with your own words
A hash function gives you the particular output of an input (could be a number entred, or sentence written, etc…). In blockchain, hash functions are used to represent the current state of a block, and to ensure its immutability.

2- How are hash functions used in cryptocurrencies like bitcoin?
Transactions have bits of info (ammount of money being sent, where it is sent to , etc.) this info is combanied to produce a hash formula called transaction ID, which is a hash value used to identify and confirm that a transaction has happened.

3- What does it mean when we say that hash functions need to be collision resistant?
It means that two inputs would not produce the same hashed output. Every input has its own unique hashed output

1 Like
  1. Describe hash functions with your own words
  • A hash function takes an input and as the output produces a digital fingerprint of that input. You cannot go from output to input.
  1. How are hash functions used in cryptocurrencies like bitcoin?
  • Hash function are the backbone of the PoW process. Without confirmation and production of hash transactions, the blockchain would not be tamper proof and inalterable and it would not be possible to prove who owned which amount of BTC at what time. A hash function turns an input into a string of bytes with a fixed length and structure.
  1. What does it mean when we say that hash functions need to be collision resistant?

-Being collision resistant ensures that it has to be impossible for 2 different inputs to produce the same output.

1 Like

Homework on Hash Functions - Questions

1. Describe hash functions with your own words
Hash functions are a subtype of functions that:

  • Generate an unique output for each input. The input may be of any size, but the output will have a fixed size.
  • Does not have an inverse function (making impossible to calculate the input of the hash function using its output)

Based on this properties, hash functions are used to encrypt data. For instance, secure HTTP sites uses hash functions to ensure that only the web site and the user are able to see the information that both parties are sharing (in order to avoid third parties to retrieve sensitive data, such as credit card numbers and user passwords)

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 encrypt transactions’ data together with additional metadata required by the blockchain (the hash of the previous block, the hash of the current block, the current timestamp, the difficulty -target of bits in 0-, the version and the nonce). Then, miners try to be the first one to deliver a hash with as many leading zeroes as the difficulty states, having as their actionable variable the nonce.
As the first miner to get a hash code that satisfies the difficulty will get the reward in bitcoins, it is important that there is no algorithm that allows anyone to calculate the proper nonce based in the rest of parameters, making the process transparent, and avoiding data manipulation. Also, considering that transactions are sensitive data, it is useful to manage those transactions in a encrypted way.

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).
Hash functions are injective (each input has an output), but, considering that the amount of inputs is infinite, and the amount of outputs is restricted (and equal to 2^256), it is possible that two different inputs may deliver the same result.
Considering that, a hash function, that creates an output of N bits, is considered collision resistant if an attacker needs 2^(n/2) inputs to match two similar outputs (based on brute force). For instance, SHA-256 is still collision resistant, however, there are algorithms for MD5 that perform better than brute force to find collisions, which made MD5 unsafe for being used.

1 Like