Homework on Hash Functions - Questions

Homework on Hash Functions - Questions

A hash function takes any amount of data or input and converts it into 256 bits or an output.
Simply put; “plaintext” + “hash function (SHA256, SHA1 etc.)” = “hash value”.

Cryptographic hash functions are used to pass transaction information anonymously. Bitcoin uses the SHA-256 cryptographic hash function in its algorithm.

I think this ‘quote’ sums it up quite nicely and clearly.

“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.”

17/05/2021 - Truls-Magnus

1 Like
  1. It is one way mathematical function from one input you can get only one output sha256 in bitcoin case but to get the initial input from the output is very very hard or nearly impossible in reasonable time

  2. In bitcoin the Hash function is used to hash transaction data

  3. Collision resistant means that you can never get two different inputs from the same hashed output

1 Like
  1. Each unique input will give a unique output
  2. They are used to encrypt data so it is secure
  3. It is hard to find two inputs that hash to the same output.
1 Like
  1. A function that will always output the same value for the same input, but the output can not be translated back to the input.

  2. All over the place.

  • creating public and private keys
  • hashing transactions
  • block mining = hashing blocks with various ‘nonce’ numbers to find one that generates a block hash smaller than the hash set by the protocol
  1. when a function is collision resistant it means that 2 different inputs will never result in the same output hash
1 Like

1… Hash functions are function that converts a specific input to a specific output

  1. Hash function is used to give a unique ID - digital signature to each bitcoin transaction

  2. 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; that is, two inputs a and b where a ≠ b but H(a) = H(b)

1 Like
  1. A hash function takes any digital input and generates a unique fingerprint that cannot be reverse-engineered to find the input.
  2. A has function crates a hash for each transaction that can then be used to verify that it has not been changed somewhere down the road, making the data on the block permanent and immutable.
  3. A hash function is collision-resistant when it is hard to find any two inputs that produce the same output.
1 Like
  1. Hash functions are functions that converts data of arbitrary length to a fixed length.
  2. In the bitcoin protocol, hash functions are part of the block hashing algorithm 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 additional inputs relating to the timestamp and a reference to the previous block.
  3. A hash function is collision resistant if it is hard to find two inputs that hash to the same output.
1 Like
  1. Hash functions are mathematical functions that take inputs and produce unique outputs that can’t be reversed or changed.
  2. Hash functions used in cryptocurrencies like bitcoin create blockchains with unique outputs that secure transactions by adding more blocks of newly verified data.
  3. A hash being collision resistant means that the function of the blockchain can only be added to and not reversed. You can’t use the output to decode the input.
1 Like

Hash functions creates finger prints its a one way operation

hash functions for bitcoin… its used for mining to keep the block secure

collision resistant means that its very unlikely to get 2 inputs with the same out put.

1 Like
  1. Describe hash functions with your own words.

A) Cryptographic HASH functions are code platforms that have unique mathematical formulas in binary form that create hash codes that are irreversible or very difficult to hack and jeopardize. When the HASH function takes an input that’s being entered in text form it will create an output hash code that is irreversible. The most notable Cryptographic HASH function platform today is SHA256, which is used by Bitcoin. Theres also vulnerable HASH function platforms that are vulnerable and outdated such as MD5.

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

A) hash functions are part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process.

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

A) Collision resistance is the property of a hash function that is computationally infeasible to find two colliding inputs of the same kind that would create the same output, if it would the HASH algorithm function would be reversible and vulnerable.

1 Like
  1. Hash Functions are very complex one way functions which transform input text to unique output.
  2. The inputs in to the bitcoin hash function are the most recent none confirmed transactions. The hash is run on this by miners who try to calculate the hash to add the new block to the chain.
  3. It means that if two different input are provided, outputs must be different. No two different input will lead to the same output.
1 Like
  1. A hash function is a complex algorithm that computes a unique output for an unique input and it is one directional. It is virtually impossible to determine the input of a hash function from looking at the output.
  2. A hash function produces a unique output from any string of characters as input. It has a fixed size and is efficiently computable using that specific hash function.
  • Collusion Free : There are no hash functions in existence that are completely collusion free, however it is extremely difficult to calculate collusions. In practical terms if we compare the hashes of two files we can determine if the two files are the same or if something has changed.
  • Hiding : Given the output of a hash function there is no probable way to determine the input. What is for example done is to concatenate the values of two input from a very long string of possible values. If this is done it hides the properties of the input being logically deducted from the output.
  • Puzzle Friendly : If a hash function has a specific output and for some reason or in some way the possible concatenated value of one of the inputs are determined it is still impossible to determine the second input value. This makes it practically impossible to crack hash functions.
  1. Two computations from a set of inputs will not give a replicated output, because the computation concatenate the inputs for each block of the hash function in a specific way to a unique 256 bit output, breaking the input string up into blocks and a sequence of functions that calculates that specific output.
1 Like
  1. Describe hash functions with your own words
    -Hash functions are uniquely generated, and fundamentally irreversible, digital fingerprints.

  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 by miners to confirm transactions on the blockchain and create new blocks on the chain itself.

  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 need to be collision resistant so that multiple inputs cannot be detected to produce the same outputs and consequently leave the blockchain vulnerable to alteration.

1 Like
  1. hash function allocate a unique output to a unique input. If the input is exactly the same, we’ll get exactly the same result, while it’s impossible to retrace the input just from having the output. Its a unidirectional fingerprint to a specific input.

  2. SHA256 is used to write transactions into the blockchain at a foreseeable amount of CPU work.

  3. Collision resistant means it’s hard to find the input data of a hash eventhough one identified two equal outputs

1 Like
  1. The hash functions is made to encrypt the input from another function or a data set, in order to make sure the finger print is always the same and can not be changed otherwise the hash result will be different and not identical.
  2. In Bitcoin the Hash function is used to hash transaction data. Many things from deriving public keys to block signatures, verifying if an unspent transaction can be spent by a specific key and much more
  3. if means that the hash inputs should not easily be the same output otherwise they would in a sense crash or collide or someone to trick the blockchain if they used this same input.
1 Like

Homework on Hash Functions - Answers

Notes:

  • Characteristics of has functions
    • Each unique input produces a uniwue output
    • CAN go from input --> output but CANNOT go from output --> input (one way functions/unidirectional)
  • Types of has functions
    • SHA-256 (used for Bitcoin)
    • MD5 (not really used because they figure out how to go from output --> input thus not secure)
  • If you even slightly change one bit of the input then the output will change in an unpredictable manner
  • Bitcoin hashing article

1) Q: Describe hash functions with your own words
A) A unidirectional function that produces a unique output for each unique input

2) Q: How are hash functions used in cryptocurrencies like bitcion? (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 to write new transactions to the blockchain. This is what miners do.

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)
A) Collision-resistant refers to the fact that two inputs cannot map to the same output (“collide” at the same output)

1 Like

1.Hash functions are linear functions that produce unique outputs, any small change in the initial input will create a totally different output.
2.Hash functions in Bitcoin are used for mining new transactions. The miners use information from the input, the previous transaction, and adjust the signature until it produces n-zeros, the computing power needed is a large amount and it requires a lot of guessing to come to a conclusion.
3.Collision resistance means that is extremely difficult to find two inputs that equal the same output in a hash function. This is an important criterion for crypto to be unbreakable.

1 Like
  1. Hash functions maps any input of data into a unique number that is a fixed length. Secure hash algorithms are impossible to reverse and any changes to the input will change the hashed output.
  2. Has functions are used to secure block chains of transactions. Bitcoin controls the rate at which transactions are verified by demanding that the resulting hash code has a certain number of leading 0’s.
  3. any 2 inputs cannot get mapped to the same hash.
1 Like

1.Hash functions are functions that produce unique outputs from unique inputs, any small change in the initial input will create a totally different output. The process can not be reversed.
2. Hash functions are used to add new transactions to the blockchain.
3. A hash function is collision resistant if it is hard to find two inputs that hash to the same output.

1 Like
  1. A hash function is a function that takes all sorts of input (these get converted to bits anyway) and creates a unique output for every unique input combination. It should be impossible to be able to retrieve the input from the output. When that is possible, the hash function is cracked.

  2. Bitcoin uses the hash function called SHA-256. This enables the proof of work system that is used to mine new blocks.

  3. This means that it is hard or impossible to find two inputs that give the same output.

1 Like