Homework on Hash Functions - Questions

  1. A hash function is designed to accept a data input of any length and apply a process of mathematical computations to output a representative string of unique alphanumeric values, and of pre-determined length.

  2. Bitcoin utilizes cryptographic hash functions with special deterministic computational properties that necessitate an irreversible one-way flow of unique input-to-output data conversion which is used to securely maintain an encrypted record of transactions.

  3. A cryptographic hash function should also be collision resistant, meaning that the hashes for inputs (A) and (B) will always be different and unique. Simply stated, hashing two independent inputs should never result in two identical outputs. While collision ā€œresistantā€ implies that a matching output is mathematically possible, the odds of achieving such an incident is infinitesimally small and beyond the computational power of real-world application.

1 Like

You’re describing Brute forcing a hash. A Collision means that 2 different inputs would produce the same output.

  1. hashing means taking an input string of any length and giving out an output of a fixed length.
  2. the transactions are taken as an input and run through a hashing algorithm (Bitcoin uses SHA-256) which gives an output of a fixed length
  3. two different output made .

Describe hash functions with your own words

  1. Hash functions are algorithms that take an input set of data (words or numbers) convert them into binary then encrypt them creating a unique string of data for each input. The data flow is one way only in that you should not be able to reconstruct the input from the output.

How are hash functions used in cryptocurrencies like bitcoin?
2. Bitcoin uses the hash function algorithm SHA-256. It takes the original data, encrypts it and turns it into a 256 bit hexadecimal string. Each input creates a unique fingerprint and changing it slightly will create another totally different output.

What does it mean when we say that hash functions need to be collision resistant?
3. What we mean by saying hash functions need to be collision resistant is that each input must create it’s own unique output or fingerprint. Due to the large amount of possible outputs it’s not totally impossible that 2 different inputs will produce the same ouput, but realistically it’s not feasible. So if we have 2 hash outputs H(A) and H(B), and H(A) =H(B), then we can generally assume that the original inputs A and B were the same ie A=B.

1 Like
  1. Hash functions take an input and encrypt the input into a long string of numbers. The hash function output is effectively unique for every input, making it nearly impossible to reverse the function.

  2. Every transaction in the Bitcoin network is hashed. The current network difficulty will adjust (usually how many leading digits are zeroes) to ensure mostly consistent block times, and the network will have to guess and check values to produce the hash of the block. The first to do so publishes the next block and is rewarded newly minted BTC.

  3. Collision resistance describes the unlikelyhood of two inputs producing the same hash. Finding two inputs that produce the same hash is quite rare. This and decentralization is the mechanism used to secure the network.

1 Like
  1. A hash function is a computational algorithm that you can feed an input into, and it will always spit out the same output. The size of the output will always be 256 bits.

  2. Hash functions are used in Bitcoin in the mining process. Using the hashing algorithm the bitcoin network is able to embed new transaction into the blockchain.

  3. Collision resistance in hash functions mean that it is extremely unlikely that any two inputs will give you the same output.

1 Like
  1. Describe hash functions with your own words

Takes a string data and tranforms it into a fixed lenght output or digital print which can only be reverse through an exhausting infeasible process which woul make no sense.

  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 functions are used in cryptocurrencies like bitcoin for mining, this way adding extra blocks to the chain and therefore providing extrasecurity for it.

  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 hash function is collision resistant when no matter how little the input is changed will always result in a entirely different kind output ensuring that no collision is possible, therefore theoretically 2 different inputs would never give you the same output.

1 Like
  1. Describe hash functions with your own words
    A hash function converts a certain input into a digital output. This output is unique (digital fingerprint), and only matches that specific input.

  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).
    Cryptographic hash functions are a dedicated group / class of hash functions with special properties. If the hash function has theses specific properties, the then called cryptographic hash function is defined secure.

  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 it is difficult to find them - they do exist. So basically two inputs would result (hashed) into the same output.

2 Likes
  1. Describe hash functions with your own words

Hash functions are computations that take input strings of variable length and return output strings of fixed length

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

Hash functions are used in cryptocurrencies to provide security and immutability of data.
They provide 6 unique security features:

  • Determinism
  • Quick Computation
  • Pre-image Resistance
  • Input changes also produce output changes
  • Collision Resistance
  • Puzzle Friendliness
  1. What does it mean when we say that hash functions need to be collision resistant?

Hash functions need to be collision resistant to prevent the feasibility of two different inputs from producing the same output hash.

2 Likes

Hash function is where you take a data set and place it into a hashing algorithm to produce an output.

The sha 256 algorithm is used in bitcoin in which it hashes the data from each transaction in the merkle tree (leaf) then goes into the child node and then goes into the top hash. All the hashes are placed together into the merkle root which in return gets placed onto the block. The inputs that are placed in are known by the users in which it produces an output but from the outside from the public ledger, other users are unable to change output back into input except with brute force (which will take forever but if they are able to break the SHA 256 algorithm, then Bitcoin will basically be broken already).

The hash functions need to be collision resistant as in all the data sets have to be unique. For example if you make A=1 but then B=1, then if they are placed into a hash function, it would cause the function to both have the same output.

1 Like
  1. One-way functions (from input to output and not viceversa) that enable verification of inputs without enabling input reconstruction (like a fingerprint). It is a function that for one input creates only one output.
  2. Hash functions in Bitcoin are used in mining new transactions on the blockchain. The inputs for the hash function are unconfirmed transactions plus additional data related to time and the previous transactions. To solve the block, miners try to combine all of the inputs along with data of their own so the outputs start with a bunch of 0’s. It takes a lot of computing power.
  3. Collision resistance means that it is unfeasible (but not technically impossible) to find 2 inputs that produce the same output in a hash function. So each input will have its unique hash.
1 Like
  1. Hash functions - generating a value from an input this the output and is unique for each input thus is deterministic.
  2. The transactions are classed as the input and then put through a hash function. In the cases of Bitcoin SHA256 algorithm is used.
  3. The probability of the same hash arising is ALMOST impossible.
2 Likes
  1. Describe hash functions with your own words/ Hash functions are one way functions were any input produces a unique out put (digital finger print)

2 How are hash functions used in cryptocurrencies like bitcoin? 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.

3 What does it mean when we say that hash functions need to be collision resistant?
Collision resistant hash function should means it is highly unlikely if not impossible that two different inputs could produce the same out put .

1 Like
  1. Hash functions produce a unique output (fingerprint) and are very difficult to reverse. They are used to verify authenticity of data.
  2. Hash functions are used in the Bitcoin ecosystem to verify transactions and chain of ownership.
  3. A collision is when two inputs produce the same output or fingerprint. Although possilbe even with SHA-256 it is highly unlikely.
1 Like

Hash functions convert an input (a string of an arbitrary amount of characters) into an output with a fixed length. It is infeasible (altough not impossible) to calculate the input from the output.

Bitcoin hashes the transactions. Storing the hash is easier (because its smaller) than storing the complete transaction data. The hash pointers which connect the blocks, do not only contain the address of the previous block, but also a hash of the previous block’s data.

It means that it is infeasible that two different inputs have the same output. If A and B are two different inputs, also the hashes H(A) and H(B) have to be different.

1 Like
  1. A hash function is one where given an input, a specific output is generated. Even the slightest of changes to the input will generate a completely different output. They are also characterized by the fact that you can figure out the output given the input, however, you cannot figure out the input from the output, if you can, it’s broken.
  2. Hash functions are part of how mining and blocks work. For each block, k (an arbitrary string) is concatenated with the hash of the block, which is hashed again, then this is compared to the difficulty target, and if it meets specific criteria the block is added to the chain and the miners are rewarded. If not, then you try again with a different input > hashed > concatenated to k > hashed again > compared to difficulty level.
  3. That given two different inputs for A and B, it is infeasible that H(A) = H(B). In other words, extremely rare that two inputs would result in the same hash output.
1 Like
  1. Describe hash functions with your own words
    a unique input to a unique output like a fingerprint with one direction
  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).
    every bitcoin is unique and cannot be duplicate
  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).
    mathematically impossible for 2 inputs to have the same output
1 Like
  1. a mathematical algorithm that maps data of arbitrary size (often called the ā€œmessageā€) to a bit string of a fixed size (the ā€œhash valueā€, ā€œhashā€, or ā€œmessage digestā€) and is a one-way function, that is, a function which is practically infeasible to invert

  2. uses partial hash inversions to prove that work was done, to unlock a mining reward in Bitcoin

  3. so any collision for the full hash function can be traced back to a collision in the compression function

  1. Input that can be any length that will lead to an output of an specific length.

  2. it takes the previous hash with the unique hash created to confirm a digital transaction which will then be loaded onto the blockchain by miners.

  3. Basically you wont find two inputs with the same output.

2 Likes
  1. A hash function generates a ā€œDigitial fingerprintā€ given an input string. The fingerprint is of fixed sie no matter the length of the input string (32 bytes for a SHA-256 hash). Any small alternation of input gives a completely new output - no to different inputs will ever produce same output.

  2. Hashing is the key element in the Bitcoing blockchain, where all transactions in a block are hashed together in a block header hash. It is impossible to tamper with the data in the block without giving a completely new hash, so the hash value is used to ensure this by validating nodes

  3. Collision resistat means that two different inputs will always give two different outputs - no two inputs can ever give same hash

1 Like