Homework on Hash Functions - Questions

  1. Input creates Output that creates hash function which is cryptic.

  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.

  3. 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. Hash functions are one way functions(irreversible). That means that you can get a specific output from one authentic input(if you change anything from that input, the output completely changes) and you can’t get back to the original input from that output like you can in normal functions.

  2. Hash functions in bitcoin are used to write new transactions into the blockchain through the mining process. As in all the other cases that the hash function might be used for, in bitcoin it has the same use, it’s a mean of Proof of Work. each miner has it’s own set data of the transaction that are used for inputs of the hash that is used for mining. To create a new block, the start output of the hash function as a result of all the mining must contain 18 zeroes. This takes miners around 10 minutes to create.

  3. when we say that a hash function is collision resistant it means that’s it’s nearly impossible to find two inputs that create the same output.

1 Like
  1. Describe hash functions with your own words
  • A hash function is a one way function which takes an input source of data and gives it it’s own unique output, however any same input will always give it’s corresponding output.
  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).
  • Some examples would be creating addresses when setting up wallets, sending and receiving transactions, making NFTs and even mining… Overall the hash functions are processing a large sum of actions at any minute and ensure the security of the network through their ability.
  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, when speaking on hash functions, simply means resistant to any two different inputs having the same output. Technically speaking, a collision can still happen, however the chances are minimal and in such a case, both inputs are presumed equal.
1 Like
  1. A Hash Function are functions that has 2 specific properties:
    a. For each unique input you get a unique output
    b. You may go from input to output but never form output to input (you cannot “solve” the hash function)

  2. Each block has the hash of the previous blocks. If any attempt to change information in the network happens then the hash will change and it will be impossible to connect the blocks and transactions will be invalidated.

3.Collision resistence is a property of hash functions that states how hard is to find different inputs that results in the same output.

1 Like
  1. Each unique input will produce an unique output.
  2. To pass transaction information anonymously.
  3. If it is hard to find two inputs that hash to the same output.
1 Like
  1. Describe hash functions with your own words
    Hash functions are mathematical equations that convert data (text, binary, etc) to alphanumeric values; these functions produce the exact same output when
    given the exact same 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).
    Dogecoin and litecoin used Scrypt for hashing - they functions are much faster than bitcoin as they are not as difficult to solve

  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 means that the function generating hashes has none or little to no repeating outputs, regardless of the inputs

1 Like
  1. Hash functions such as SHA-256 take an input of any size of data and convert it into 256 bytes. The output of the hash function is unique. If you so much as remove a comma in the input of a hash function such as SHA-256, the output of that function would be completely changed. Hash functions, such as SHA-256 are one way functions. It is impossible to use the output of a hash function such as SHA-256 to work out its input.

  2. In the bitcoin blockchain the SHA-256 hash function makes transactional data cryptographically secure. On the blockchain each block is turned into a hash which also becomes the next block’s header, and technically chains it to it. If someone tried to change information in a block, it would completely change the hash that chained it to the previous blocks. This would show a break in the chain.

  3. For two distinct inputs the output of the hash function should not be the same. Different inputs should not produce identical hashes. This is what is meant by ‘collision resistant’.

1 Like
  1. Describe hash functions with your own words

Hash functions are a special type of function used to secure data through producing a unique cryptographic hash output after data has been input. This is solved in a linear, and unidirectional manner. It cannot be reversed to calculate the raw initial data.
e.g you can go from input>output but not from output>input.

If any part of the raw initial data is changed in the slightest way, it will produce a completely different hash output.

  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 to pass transactional information anonymously.

  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 harder it is for two inputs to produce the same output, makes the hash function more collision resistant.

1 Like
  1. a function that takes any size of data and outputs a fixed size data that can’t be reversed back to the output.

  2. they are used in mining for miners to verify the block.

  3. it means the function needs to have a unique output for every unique input, not having two inputs with the same output

  1. Describe hash functions with your own words

Answer: In hash functions each unique input gives a unique output (hash), think of it as a digital fingerprint of this input. Even if you change a small portion of the original input, you will get a completely different output (hash) as a result. This mechanism keeps blockchain technology safe and secure.

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

Answer: Hash functions were not specifically designed for blockchains, but gained their popularity after being implemented by popular blockchains like Bitcoin and Ethereum.
Bitcoin uses SHA-256 and RIPEMD160 whereas Ethereum uses the Keccak-256 hash function. They are primarily used for generating public keys and block hashing.

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

Answer: It means that for two distinct inputs, the output of the hash function should not be the same.

So, mathematically, we can say that for 2 distinct inputs X1 and X2, Hash(X1) should not be equal to Hash(X2)

1 Like
  1. Hash functions are a mathematical function that takes an input of data and produces an output which masks the initial input.

  2. Hash functions are used in Bitcoin to mine blocks and process transactions on the blockchain.

  3. Hash functions are collision resistant because no two inputs will result in the same output, i.e. preventing a collision of data.

1 Like
  1. Hash functions takes an input and provides a unique output. The output cannot be used to figure out what the input was.

  2. Hash functions are used to verify each block of transactions. The block of transactions will result in a hash, so when anyone changes anything in that block the hash for it will change too.

  3. Collision Resistance means that 2 different inputs to a hash function should not result in the same hash being output

1 Like
  1. A hash function creates a unique output for each unique input. The source input can be text or binaries (files), and the hash function converts the aggregate of source characters (called “key”) into an output string (called “hash”) of a fixed length and consisting of predefined characters and numbers (SHA-256 uses 0-9 and a-f). The mechanics of hash functions is uni-directional, i.e. it is not possible to use the output in order to somehow decode/retreive the input.
  2. There are several use cases for hash functions in cryptocurrency, but a good example why hash functions greatly add to the security of bitcoin is that each bitcoin block contains a hash of the previous block. Therefore, changing a bitcoin block or trying to double spend bitcoin would require changing the hashes in all previous blocks, which would be extremely expensive and/or practically impossible since such fraudulent activity would soon be revealed by other miners, and the fraudulent branch of the blockchain would be dropped.
  3. If the array of inputs is bigger than the array of outputs, it may occur that for 2 different inputs the hash function creates the same output string. Collision resistance is a goal of hash functions in order to minimize such occurences described above. In theory, there is no collision-free hash algorithm due to the fixed (=limited) length of the output string. In practical terms, collision-resistant hash functions are designed so that it is extremely difficult to find collisions (similar as solving a very hard mathematical problem). Non collision-resistant hash functions are insecure since there is reduced effort for an actor to break the function, as it happened e.g. for SHA-1 and MD5.
1 Like

Homework on Hash Functions:

  1. A hash function is a secure cryptographic protocol that transfers each given input into a unique coded output.

  2. Hash functions are used within the blocks of blockchain for security aspects and proof of work for miners. The cryptographic function is released into the blockchain once the miner has verified a transaction is valid. Once a hash function appears on the blockchain it proves the input (transaction) has been processed efficiently and safely.

  3. Hash functions need to have collision resistance so their data can be verified it hasn’t been tampered with. The collision resistance verification process is valid since each individual input results in it’s own output. Therefore, the function of uniqueness is essential for the aspect of hashing within blockchain.

1 Like

Answers

  1. Hash functions are computing models. Basically, when you give it an input, it transforms it into an output. The same input always gives the same output, but you can never get your input with your output. That’s the key.

  2. In the BTC blockchain miners try to solve a block by putting their inputs to get a certain type of output. When they are successful, they’ll be rewarded with bitcoin.

  3. It means that it’s hard to find the same output with different outputs.

1 Like

1.) Hash functions are functions that can be given an input and will output a series of symbols that is a hash. These hash outputs cannot be used to find it’s input. If even one letter/symbol is changed in the input then the output will be completely different.

2.) Bitcoin uses hashes functions to write new transactions into the blockchain. When a transaction is written into the bitcoin the hash is public but no one can find the input with the hash, which is the beauty of blockchain in bitcoin.

3.) Collision resistance is when there is a very low chance of two different inputs hashing the same output.

2 Likes
  1. Entering data and producing a numeric or alphanumeric string through a one way mathematical equation.
  2. It is used to run the consensus mechanism for blockchain. Blocks are added after multiple miners successfully verify a hash.
  3. If it is difficult to find 2 inputs that produce the same output.
1 Like
  1. Functions that produce a unique output for every unique input. The produced output cannot be traced back to the input.

  2. It is used by miners to create a hash for every Bitcoin block’s header (to identify that block) that’s added to the Bitcoin blockchain. The smaller the hash needs to be, the more challenging (and computationally intensive) it is to create it.

  3. It means that it is very difficult to find 2 different inputs that will produce the same hash output.

1 Like
  1. it is a mathematical only One Way function that an unique imput, gives a fingertip output ( unique output).

  2. Hash functions are an essential part of, not only of the bitcoin protocol, but of information security as a whole. 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. *Collision resistance - it should be hard to find to distinct inputs that would result in the same hash after the application of the hash function.

1 Like
  1. Hashing functions are a computation process that produces a one way unique output given a specific input.

  2. Hashing functions are used in cryptocurrencies to secure the data and communication on the blockchain. Because hashing functions are used, transaction history can be verified and compared to ensure it has not been falsified.

  3. Hashing functions need to be collision resistant because if the output of a function can be easily reproduced then the reproduction mechanism can be used to compromise the blockchain or falsify transaction history.

1 Like