Homework on Hash Functions - Questions

  1. Hash functions take an input as a string of numbers and characters and produces an output that follows six criteria: deterministic, quick computation, pre-image resistance, small change in input results in a large change in output, collision resistance, puzzle friendly.

  2. Hash functions are used in cryptocurrencies like Bitcoin in the mining process to enable proof-of-work consensus.

  3. Collision resistant means that it is infeasible for two different inputs to the hash function to result in the same hash.

  1. Hashing is the process of converting any input into a fixed sized output (string on text), using a mathematical function. An input should always have the same output, however, if the input is changed, even slightly, the output will change completely.

  2. Every transaction contains certain bits of information, amount being sent, sender and receiver addresses and timestamp. All this information is combined into a formula to produce a has called ā€˜transaction idā€™ This can be used to identify and confirm that a transaction has happened. Every block on the chain will have the hash of the previous block, and so on and so fourth.

  3. An input, should always produce the same output. Two different inputs that create the same output is ā€˜infeasibleā€™ but not impossible. However, it would take a long, long time to produce this.

  1. What ever you input, the output will be unique to that specific input, like a finger print.

  2. Using SHA-256 , unique transactions are created and will not be duplicated.

  3. Two different inputs A and B where H(A) and H(B) are their respective hashes, it is infeasible for H(A) to be equal to H(B). Most of the time each input will have its own unique hash.

  1. Describe hash functions with your own words. A hash function is a one-way function that takes a unique input and returns a unique output. It is almost impossible to find two inputs that produce the same output due to the complexity of the hash calculations.
  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 in cryptocurrencies like Bitcoin to achieve immutability. Since each transaction block contains a hash of the previous blocks header changing data in any one block will modify all subsequent blocks in the chain. Each hash pointer is a link in the chain of blocks creating 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). Hash functions need to be collision resistant in the sense that it should be impossible to derive a consistent method for figuring out to make two different inputs produce the same output hash. If this were possible there would be no security since the ledger could be modified with forged hash values.

Hello,

  1. a hash function is a one way function. You have an input and an output, the output being the precise fingerprint of the input. One cannot make use of the output to recover the input.

  2. cryptocurrencies use as pointers the hash functions of the previous blocks, meaning the tampering of a block will cause all following blocks to have errors.

  3. Collision resistance means it is very difficult to have the very same hash, because the input would have to be precisely the same from two different users. It is not impossible, but very improbable. It is exemplified by the birthday paradox we found in an article you gave us to read. Also, this means the longer your input, the least probability there is of a collision.

Best

  1. Hash functions produce unique outputs that serve as a digital fingerprint. You can only from input to output and never from output to input.

  2. Transactions are taken as input and run through an algorithm, which produces a unique output.

  3. It should be impossible for two inputs to produce the same output.

1. Describe hash functions with your own words
Hash functions are special functions that take data of any length and output them into unique, fixed-size 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 form part of the bitcoin hash block algorithm which is used to write new transactions into the blockchain in the mining process.

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 resistance is a property of hash functions whereby it is hard to find two inputs which will hash to the same output.

1. Describe hash functions with your own words

A hash function converts a variable length string of characters to a value of a fixed length

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.

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 a reference to the previous block).

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

If a hash function is not collision-resistant (there is no such thing as collision-free in hash functions because their output has a fixed length) then an adversary can break the function with little effort.

  1. It is a function where by an input produces a unique output which is like a digital fingerprint

  2. It is used for mining and completing transactions.

  3. If it is hard to find 2 different inputs that has the same output.

1- A hash function converts an input into an encrypted output of a fixed length.

2- Hash functions are used to map data of arbitrary size to fixed-size values. It provides a more reliable and flexible method of data retrieval than any other data structure. It is faster than searching arrays and lists. That enciphered text can then be stored instead of the password itself, and later used to verify the user. They are used to assure integrity and authentication.

3- if it is hard to find two inputs that hash to the same output; that is, two inputs a and b such that H ( a ) = H ( b ), and a ā‰  b.

  1. Describe hash functions with your own words
    Hash functions produce outputs or so called unique digital fingerprints that are not able to be used to derive the input using its output making them ā€œone wayā€.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Hash functions are used to create public keys from private keys or seed phrases, also to hash the transactions in each block which then links the blocks.

  3. What does it mean when we say that hash functions need to be collision resistant?
    It is infeasible for two separate inputs to create the same output.

OK, this is for tomorrow. I need to re-watch it 5th time on clear head. But no complains here. I am learning. And I can thank for it just for you Ivan and your team.

1 Like

1, A hash function is a way to take a unique input and use it to produce a unique corresponding output. It is a one way process, input - output

2, In BTC a miner can ā€œsolveā€ a string by locating the response or proof string. But this requires investing a significant amount of computational power to hash the transactions, create a new block, and then create a possible solution. The response string must be run through a hash function to confirm if the output is equal or less than the challenge string. If not, the nonce will be changed millions of times until the specific requirements are met. When that finally happens, the block can be added to the blockchain.

3, collision resistance is the prevention of two input functions resulting in the same output hash. This made infeasible by utilising an input function from a distribution with high min-entropy.

tag me if you have problems understanding. Maybe I can help

  1. a hash function is a way to change a unique input to a unique output by putting the binary data of the input through a math formula you get a unique string of characters.

  2. Hash functions are used in bitcoin to verify data integrity for blocks and to create a pseudonymous structure of private and public keys capable of generating unique addresses allowing you to receive coins and sign transactions.

  3. Hash functions need to have a period that is long enough between so that it is unlikely any unique inputs have the same outputs.

  1. A hash function takes an input and provides a unique output (a unique digital fingerprint). Any change in the input will change the output. It is very difficult to guess the input of a hash.
  2. Bitcoin uses Hash SHA-256 generating a 256-bit output regardless of the size of the input. Transactions are hashed and paired, then hashed and paired again until a single hash is generated which is the merkle root of a merle tree. That is why it is so difficult to change a transaction. Hashes are dependent on the previous transactions because transactions are chained together.
  3. Collision resistance means that it would be difficult to have two inputs hash the same output. It is possible but not probable that it becomes an issue. There is no such thing as collision-resistant.

Hash functions generate an output of the same number of bits regardless of the output. It is one way to transmit a message only to the intended recipient. Hashing protects the message from tampering along the way and prevents reverse engineering from the output

Hash functions in Bitcoin encrypts the data through SHA-256 to produce a fixed 256 bit output. This output is sometimes adjusted for blockchain difficulty and offered to miners to solve in return for a reward in this case Bitcoin.

Collision resistance means that given two inputs their results are almost always never the same. Each input has its unique hash in a 256 bit encryption so f(x) will never equal f(y)

1-Hash function is a unique one way algorithm.The original input cannot be figured out using the output. A random size input produces a fixed size output.
2-Hash functions permanently name a digital document. Bitcoin uses two hash functions. SHA-256 and
RIPEMD-160. Hashing is used in Mining BTC and the creation of Bitcoin addresses.
3-Collision is when two distinct inputs give the same output. It is very important to digital safety that inputs donā€™t have same output. In the highly unlikely instance that two distinct inputs have the same output it is called cryptographic hash collision.

  1. Describe hash functions with your own words

Blockchain usable hash function should be one way function that transforms digital data to unique fixed length digital output. When using the same hash function algorithm, the output for a given digital data should always be the same.

  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 of each block in blockchain is result of hash function of concatenated hash of previous block and hash representing digital data of all transactions stored in the current block. Therefore this hash function output is cryptographically linked to previous block and all transactions in current block linked through Merle tree.

  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 there is small to infinitesimal probability of two different inputs resulting in identical output when using same hash function. Strongest possible collision resistance is desirable property of hash function used in blockchain in order to ensure blockchain security.

Hash function is a digital fingerprint for a group of data.

Hash functions are used in bitcoin to make a puzzle for the miners to solve so that a new block can be generated.

Hash functions need to be collusion resistant because it is better to have very slim odds that the input of data has a infeasible hash that can only be duplicated through brute force.