Homework on Hash Functions - Questions

  1. Describe hash functions with your own words

*It encrypt and translates data

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

*a hash represents the entire transaction of the previous block so if a hacker wants to change the data of a block he needs to convince the entire succeeding blocks otherwise the transaction will not proceed. This is what makes bitcoin secure.

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

*two different input has the same output

1 Like
  1. Describe hash functions with your own words
    A hash function is a special function that takes input and creates a unique string of charecters as output that cannot be reversed back into the original input.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Hash functions are used in Bitcoin to form the “Chain” in blockchain by each individual block pointing to the hash of the previous block thereby securing the immutability and security of the blockchain.

3.What does it mean when we say that hash functions need to be collision resistant?
Collision resistant means that every unique input should create a unique, singular output. If two different strings are hashed and return the same output you have a collision and problems.

1 Like
  1. Hash functions are one way functions that a functions input into output cannot go the other way around. The digital fingerprint cannot be traced back from its result.

  2. Bitcoin uses transaction data that is stored on a block. For bitcoin, it uses a secure hash algorithm known as SHA-256 that gives an output of a fixed length. A slight change in the transaction data will cause the whole hash in a block to change. Miners use hash functions when mining new transactions on the block and try to combine all of their inputs and data to result in a specific hash in combination with data unique to the block.

  3. Collision resistance is the difficulties of finding 2 inputs that produce the same output in a hash function. This is vital for cryptographic hash functions as it is what provides security against fraudulent activity in transactions due to the difficulties involved in cracking it.

1 Like
  • Describe hash functions with your own words
    Hash functions use a unique input to generate a unique output. Hash functions are one way, the same input will produce the same output but the input cannot be determined by 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).
    Hash functions are used in BTC for mining, Miners are provided with a set of digits & must compete using the hash function to generate a 256bit output, the first miner to produce such an output wins the block & reward.

  • 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 resistance is the mathematical chances of of two different inputs producing the same outputs, hash functions must be collision resistant to prevent this from happening.

1 Like

Hash functions are functions that produce an unique output for each input but there is no way to find the original input based on that output.

Hash functions are used to encrypt transaction data and mining. Miners try to combine all input with their own data (like the already consented data) so the output starts with a certain amout of zeros.

Collision resistant means that a unique input creates an unique output.

1 Like
  1. Secure hash functions are functions that are unidirectional, meaning in one direction only and reversals from output to input being impossible.

  2. Hash function use in cryptocurrencies are, apparently. the reason the cryptos work at all. In my understanding, the fact that you can have data that is incorruptible and cannot be tampered with are what give cryptos like bitcoin and other proof of work protocols their power. If edits to the blockchain were possible, bitcoin would fail. Because this is NOT the case, hash functions serve as data integrity and people can be absolutely sure of what they are getting, b/c it is based in math and not a fallible, bureaucratic process.

  3. {hk : {0, 1}m(k) → {0, 1}l(k)}

Collision resistance, according to Wikipedia, is when an output to a hash has only one input. If any hash output has multiple inputs that hash is said to insecure b/c an attacker could lay a claim to one input while also having another one. This search also brought up the ‘birthday paradox’ and ‘pigeon hole principle’. Both pertain to collision resistance and probability.

2 Likes
  1. Describe hash functions with your own words

Hash function is a function that takes an input and produces an output/digital footprint which is a unique identifier and impossible to reverse

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

The hash function are used in cryptocurrencies like bitcoin by being the function that is used to produce the network’s transactions, which ultimately power any type of dapp starting with bitcoin and now with the whole DeFi world in the Ethereum Virtual Machine.

  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 that no two inputs create the same output, any alteration of the input even slightly creates a whole different output altogther.

1 Like

1.) Each unique input creates a unique output

2.) Bitcoin uses a hash function to secure each transaction, each block, and each address created on the blockchain. This creates a digital fingerprint that helps the nodes come to a consensus.

3.) The hash function needs to make sure that the input data is not easily replicated so that the output hash can be found easily.

1 Like
  1. Hash functions are used to map data. They do this by taking an input key and translating that key into a hash code, which then indexes the data on a hash table. Hash functions are highly efficient in terms of space and required computational power, and useful because they can take input data of any size, and output it as a fixed size.

  2. Hash functions are used as part of the block hashing algorithm for crypto that operates like Bitcoin. They enable proof of work/mining, as each miner has to successfully unpack input data to complete an output hash that aligns with the values of a Bitcoin block hash.

  3. Collisions happen when two different pieces of data have the same hash value. Cryptographic hash functions (like SHA-256) are generally regarded as collision resistant because it is extremely hard to find two pieces of input data that will produce the same hash output.

1 Like

A Hash Function

This is a mathematical formula that is used to create a certain value or string of numbers. According to techopedia a hash function is cryptography takes a group of numbers that are called a key and map it to a value of a certain length.

How are hash functions used in Cryptocurrencies like Bitcoin?

Bitcoin used the SHA-256 hash algorithm to generate its verifiable random numbers in a way that requires a predictable amount of CPU Effort.

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.

Hash functions 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 reference to the previous block.

If you change just 1 number of the input for a hash function, the result will be a completely different output. This property is crucial to the PoW algorithm involved in mining. A successful solving of a block requires that miners try to combine all of the inputs with their own arbitrary pieces of input data for the result to be a hash with a certain (18) number of zeroes.

Collision resistant

It is impossible to fins the exact inputs that result in a certain output after the function has been run.
1 Like
  1. The word hash means something that is chopped and mixed into smaller pieces. A cryptographic hash is a digital fingerprint. The output - the hash in Bitcoin is a 256 randomly generated bit number because 1 byte consists of 8 bits.
  2. Hash functions are used everywhere in Bitcoin and they are used for integrity checks to detect changes in data.
  3. That it hash function is collision-resistant is when it is extremely hard to find two inputs to the same output, like SHA256
1 Like
  1. A hash function creates a unique string of alphanumerical values based on any data that will change drastically if it recognizes any changes in the original data set. Hash functions is a specific type of function that have certain properties making it ideal for cryptography. The properties described in our reading that cryptographic hash functions contain were deterministic, the original data will always result in the same output hash, quick computation, it’s real fast, pre-image resistant, it’s infeasible to determine the input given the output, the hash changes completely with small changes in the input, it’s collision resistant, each input will have its own unique hash for the most part, and it’s puzzle friendly, it’s infeasible to determine the input hash (before concatenation) such that its result is equal or less than the difficulty level (in mining.)

  2. Hash functions are predominantly used to prevent new Bitcoin from being minted except through mining. This is because the data inputted in a hash cannot be altered or erased after enough on-chain confirmations, meaning the work required to secure that block cannot be copied, erased, or reversed. Hashing keeps Bitcoin secure by encrypting transactions data via SHA-256. This data is kept secure by adding more data that has been hashed on top of it in a connected block. In order to compromise the data in the first block, you would need to first compromise the second, appended block which is very intensive and extremely difficult.

  3. It means that two different inputs should not equal the same hash output. If this is the case, the inputs are presumed to be equal. However, while we need hash functions to be collision resistant, they are not always full proof. Hence the use of the word “resistant” over “proof.” But the number of times collisions do occur is so infinitesimally small that they are negligible in real-world use cases. This is why there is a much higher likelihood that two inputs with the same hash output are equal than it being a case of collision resistance.

2 Likes

1.) Hash functions are a way to one-way-encrypt data.
2.) The Private key can be broken down to the public key, but not vice versa.
3.) There are no two inputs, which can lead to the same output.

1 Like
  1. Hash functions is an unique input that gives an unique output but cannot work the other way around. Its a one-way function.

  2. Hash functions are used to to write new transactions into the blockchain through the mining process.

  3. It means that it is computationally infeasible to find 2 colliding inputs.

1 Like
  1. A hash function takes an input and maps it to a unique output. The hash function is considered to be a one-way function.
  2. A hash header is created by the blockchain. Miners are then trying to solve the hash by being equal or less than the original hash. The only way to solve this is through brute force.
  3. A hash function is considered to be collision resistant if two different inputs could never have equal outputs.
1 Like
  1. A hash is when you input a number to get a string of data. Its a one way function.
  2. Mining involves the use of hashes.
  3. Collision resistance is when no 2 inputs would result in the same hash output.
1 Like

1- The hash function is a one-way function that will take any kind of data as an input and produce a unique output for this specific data as a fingerprint.
2- The hash function is used in the blockchain to add transactions through a mining process.
3- Collision resistance is one of the hash function’s features that means it is hard to find 2 inputs that produce the exact output.

1 Like
  1. Describe hash functions with your own words

Hash functions is like a universal translator for Computer. It can convert any form and size of data into an alphanumeric string of a certain size. Besides that, Hash function in one way manner (unidirectional manner).

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

Bitcoin’s Blockchain is using hash function to run its consensus mechanism.

  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 hash function needs to be collision resistant so that no duplication will occur in Bitcoin’s Blockchain.

1 Like
  1. UNI - DIRECTIONAL Functions
  2. Blocks contains hashes of previous one on the chain. If a modification is made will alter the end result.
  3. Low probability that 2 inputs to have same output.
1 Like
  1. Hash functions are the same as function exept that they are one way, so the output cannot be calculated to see to input.

  2. Hashfunction are used in mining new blocks. You have to get an output using sha-256 that is lower or equal to the target. This is pure guessing work. It is also used to secure the chain, as the hole output is completely changed if you alter anything in a few ealier blocks, this will break the hole chain.

  3. Collission resistant means that the output should not be able to be generated from two different inputs. It is very, very unlikely to happen with hash functions, but it is possible.

1 Like