Homework on Hash Functions - Questions

  1. Describe hash functions with your own words

a Hash function is a cryptographic function that creates a unique output for a given input. That output may not be reversed to reveal the original input unless authorised.

  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 is used in bitcoin to codify the inputs of the transactions that comprise each block on the blockchain which in turn become an integral part of subsequent blocks. Because each hash is unique to the relevant input a change in data will in turn result in a different hash output which will in turn travel up through the subsequent blocks making them null and void.

  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 Hash is where the probability of a hash function outputting the same hash for two different inputs is extremely unlikely.

  • Describe hash functions with your own words

A mathematical function that gives a unique fingerprint to any piece of information

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

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

a hash function is collision resistant if it is hard to find two inputs that hash to the same output

  1. A hash funtion its a kind of resume funtion of a set of elements input into another subset of elements outputs.
  2. They have certain properties:
    - deterministic: Same input result in same output.
    - quick computation: Its fast to obtain H(x) of a given input x.
    - pre-image resistant: given a H(x) is not feasible to obtain x.
    - small changes in the input changes alot the result of the output
    - colision resistant: given two inputs x and y its infeasible that H(x) = H(y)
    - puzzle frendly: for every output “Y”, if k is chosen from a distribution with high min-entropy it is
    infeasible to find an input x such that H(k|x) = Y.
  3. is in 2.
  1. Hash functions is basically taking an input and hashing/ applying mathematical/ operations to produce and output so that it becomes proctically impossible to find the input given the output.
  2. Hash functions are used to calculate public addressed from private keys and seed phrases, to find nonces and to calculate unique identifiers for every block.
  3. It means no 2 inputs should have the same output.
2 Likes

1- Hash Function: Is a one way function that gives a unique output for each input.

2- Bitcoin transactions are hashed using SHA-256 and when a new block is need to be added, then the hashing of the old block is added to the new blocked and all hashed together

3- There must be no two different inputs that give the same output

2 Likes

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words

Hash function is a crypthographic hash which gives unique output for every unique input. No matter of the size of the input you will always get the fixed output made of 16^16 (consist of 0-9 & a-f).

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

In the context of cryptocurrencies like Bitcoin, 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.

Every newly added block consist the hash of the previous one and creates new for the subsequent block. It all together creates harmony, if you change anything in the history, it will change the hash of that particular block and the chain will collapse.

  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 if it is hard to find two inputs that hash to the same output.
Collision resistance does not mean that no collisions exist; simply that they are hard to find.

Describe hash functions with your own words

Hashing functions operate on the input you give them and complete unique outputs.

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 SHA-256 hashing algorithm is to hash a bitcoin transaction and produce a unique 256 character hash. No matter the size of the original input.

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 should be hard to find 2 inputs that produce the same output

1 Like

1- A hash function is a unique collection of numbers and letters that are used as a digital fingerprint for the data that is hashed.

2- Hash function in bitcoin are the unconfirmed transactions.

3- it means that every output should be unique.

  1. Hash functions take any input of data, and maps the data to an output of fixed length. In SHA256, the output is a hexadecimal number. Any change in the data input, causes a massive change in the mapped hash.

  2. In bitcoin, hash functions (specifically SHA256) are used to cryptographically secure transaction data. It allows the blockchain to be open, transparent, and yet also secure. Each block on the blockchain is turned into a hash, which is then stored as the block header in the next block. This makes it so that any attempt to change the data in a block (reverse or steal a transaction for instance) results in a complete change to the hash connecting the previous blocks, and shows a break in the chain.

  3. Collision resistance is a property of cryptographic hash functions. It means that it is hard to find two functions that map to the same output. In SHA256, it means that every hash has 2 to the 256th power amount of combinations, an amount so astronomically large it makes the odds minuscule that a hash will have the same output twice.

3 Likes
  1. Hash function is to cryptographically generate a unique output with a unique input, through a mathematical algorithm to specific function parameters which is extremely difficult to regenerate in the inverted form.
  2. The unique transactional input is encrypted with a hash function to generate a fixed length unique output.
  3. The Bitcoin Hash function is collision resistant if, it is difficult to find two exact inputs that hash to the exact output in a period of the estimated 10min per new Bitcoin block generated in the Bitcoin blockchain. An extremely low probability of occurrence.
  1. A hash function is a one-way function in witch a unique input gives a unique output.The output can only be derived from the input.You can not derive the input from the output.
  2. They are used in a data structure called the Merkel Tree
  3. It means that the hash function has been made in such a way that it is really difficult to find two different inputs that give the same unique output.
  • Describe hash functions with your own words
    A hash function is a “trap-door” function, which means it computes in on direction and is mathematically hard to reverse engineer the input from the output. The hash value characterizes the input in a unique way; it is a digital signature.
  • 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 generate digital signatures of the data in the blocks of the blockchain, and are used in mining puzzles to provide challenges of increasing difficulty as the blockchain is built.
  • 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).
    Different inputs to a hash function should infeasibly produce the same output. That is, it is possible for the output to be the same (a collision) but highly unlikely, in proportion to the amount of entropy of the hash function.
  1. A hash function is generating an output with a fixed-length from any input, using a mathematical function.
  2. Bitcoin hashing uses SHA-256 to convert any input to a 256-bit output.
  3. A hash function is said to be collision-resistant because is infeasible to find two different inputs to hash to the same output.
  1. Hash functions are one-way functions that can take any digitized data and convert it into a fixed length output. A unique, unchanged input will always give the same output. In practice, it is basically impossible (but not theoretically impossible) to have the same output as two different inputs (a collision).

  2. Hash functions are used in cryptocurrencies by saving time and space to verify transactions. They save time by summarizing data in a string, meaning that you can check the summary of data’s validity just by verifying its hash. They save space by not having to include ALL the data, but rather summaries of the data. This is important because the less space transactions take up, the more transactions we can fit into a block, and the smaller the blocks, the more people that can run a full node without facing hardware limitations while keeping the network as decentralized as possible.

  3. Collisions are when you get the same output for two different inputs. This would be extremely problematic because if you had a private key (that is different than someone else’s private key) that hashes into the same public key as someone else, you can steal their funds. This is why collision resistance is so important; the trait of it being extremely improbable that you’re going to get two different private keys that happen to hash into the same public key.

1 Like

1 Hash functions is small program then scrambles data and you will get difference output in same length.
2 In Bitcoin, every-time hashing must be done, Satoshi originally used on of two hashing combinations, RIPEMD160(SHA256(x)) or SHA256(SHA256(x)).
3 It has to be collision resistant, because otherwise it can get the same output from difference input.

A hash function takes an input string of any length and gives an output with a fixed length. The output is deterministic and must always be the same for a given input.

Hash functions are used to process blocks of transactions (miner must solve the hash puzzle) and they serve as unique identifiers for those blocks.

Collision resistant means no two inputs should create the same output.

  1. Hashing functions turn any input into a unique output - like a fingerprint. It is a string of text that is run through this algorithm. This output cannot be traced back to determine it’s input.

  2. For Bitcoin, hashes are used to verify and add new transactions to the blockchain. They are also used for both public and private keys.

  3. Hashes collide when two different inputs result in the identical output. Collision resistance is not infeasible however it is highly unlikely.

1 Like
  1. A Hash function is a one way function that maps arbitrary size data to fixed-size values.
  2. Two inputs to the hash function shouldn’t hash to the same output.
  1. Describe the hash functions with your own words.
  • A hash function is a mathematical function that takes an input data that can be text, numerical values ​​or a transaction and results in or output a string of characters according to the algorithm of 64,128 or x number of characters
  1. How are hash functions used in cryptocurrencies like bitcoin?

The hash functions (SHA-256) give Bitcoin greater security and help in the creation of the Bitcoin address, also in the creation of public and private keys, as well as in the mining of Bitcoin. It is used in the creation of the blocks and the creation of the Merkle tree.

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

This means that the hash function must be capable of entering the same data n number of times, resulting in the same output, and also preventing two different inputs from generating the same output. That is to say that f (x) = w and that f (h) = w

  1. A hash function is a mathematical function that’s input is a unique digital fingerprint of it’s output. A hush function is a one-way function, i.e. it allows you to go from input to output but never output to input.

  2. Hash functions are used in proof of work mining which is used to add new transactions to the blockchain.

  3. Saying that hash functions need to be collision resistant means that it must be hard to find two inputs that hash to the same output.

1 Like