Homework on Hash Functions - Questions

A hash function is a command given to a program which spits out a digital fingerprint. Hash functions are used in bitcoin.

Hash functions are used in bitcoin as part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process.

What is meant by saying that hash functions need to be collision resistant is that they need to be hard to find two inputs that hash to the same outputs

1 Like
  1. Hash functions are a one-way calculation that produces a unique output for any input.

  2. Hash functions are used in cryptocurrencies to establish secure records of transactions that, once accepted by consensus, become part of the blockchain and can never be modified.

  3. Since hash functions can have more inputs than there are possible outputs, there is the possibility that different inputs can produce the same output. To increase collision resistance, an algorithm needs to be strong and unpredictable, and there needs to be a very high number of possible outputs.

1 Like
  1. Hash function: Takes any file, string, etc, puts it through an algorithm that results in a string of characters. the SHA256 hash function is used with bitcoin. this function is one way only and cannot be reversed (unless you have a quantum computer :).

  2. How are hash functions used in cryptocurrencies like bitcoin? transactions are hashed and put through a Merckle tree. this results in a root hash which becomes the block header. the root hash is a hash of hashes.

  3. What does it mean when we say that hash functions need to be collision resistant? there are no instances where 2 unique inputs will result in the same output hash.

1 Like
  1. When you give some input to the hash algorithm, you will receive a unique output as a result. Every
    change you would make to this input, will give a completely different unique output.The opposite
    way, from output to input is impossible in a hash algorithm.

  2. Bitcoin uses a Secure Hash Algorithm, more specifically SHA-256.
    SHA-256 was invented by the NSA and not by Satochi Nakamoto.
    BTC uses this important hash algorithm to implement its consensus mechanism.
    BTC uses the POW-function to reward their miners.
    These miners essentially work to solve more difficult math equations, adding new blocks to the
    blockchain in exchange for newly created Bitcoin.

  3. 2 unique inputs in a hash algorithm will never generate the same output. This is impossible.

1 Like

1- Is the unique set of alphanumerical result of a mathematical calculation that will generate a linear output per input and this one can not be ever reversed.

2- They are used to generate translate previous data and reference to an existing calculation to a transactions which requires the amount of calculation possible to match the required amounts of Zeros as outcome which will depend on the complexity of the equation adding more and more work the longer it gets to generate the outcome.

3- Meaning that they need to be hard to find two different inputs the will hash to the same output. hash operations on random input is likely to find two matching outputs.

1 Like
  1. A unidirectional cryptographic process of transforming any digital files of any size in to a string of letters and numbers of no more than 256 characters.
  2. Hash is the result of the cryptographic transformation, which is the building block of the Bitcoin.
  3. Collision resistant or strong collision resistant means different inputs can not create the same hash.
1 Like

1- Hash is a computation using an input to produce a long string of letters and numbers as an ouput via a function, with BTC it is SHA-256
2-Hash functions are used in BTC for security, to ensure that the blockchain data cannot be reversed and to verify the data
3-No two separate inputs can produce the same output=definition of collision resistant

1 Like
  1. Hash Function - A one way function that when provided a unique input produces a unique output or digital fingerprint.

  2. In cryptocurrencies hash functions are used to verify the integrity of data blocks.

  3. Collision resistant - Hash function should prevent two different unique inputs from producing the same output.

1 Like

1)describe hash functions in your own words?
A hash function is a function that will return a fixed set of numbers as a code, regardless of the size of the input. They are unidirectional.

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).
In bitcoin the function is the most recent not yet confirmed transactions (along with some additional inputs relating to the timestamp and the reference to the previous block)

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 to make them more resistant to attack. If any two inputs can result in a single output, a hacker can search for collisions and, then technically ask the owning party to agree to the real input, then attest that this party agreed to the fake output. Block chains are highly collision resistant.

1 Like

1. Describe hash functions with your own words
Hash functions are one way functions, where one specific input has it’s specific outputs, in other words, there isn’t the same output for 2 different inputs.

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 combine all the information from a not-yet-confirmed transaction (such as time-stamps, previous hash, signature, …) and will make several random combinations until it gets the right output, or hash, for the next valid block in the blockchain. Being validated by the entire network, the block is written.

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).
All hash functions are collision resistant because there are not 2 different inputs that generate the same output.

1 Like

1. Describe hash functions with your own words

Hash functions have two distinct characteristics that highlights them :

  1. Each unique input produces a unique output. That output is the digital fingerprint of the input.
  2. Hash functions are unilateral, meaning that you can only go from Input to Output and not the other way around. Outputs cannot be reversed to produce the original inputs.

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

In cryptocurrencies like Bitcoin, hash functions are used to encrypt the information (transactions) processed through the blockchain. The network of miners get rewarded for solving the transactions (represented through hash functions) in the blocks.

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 a hash function. Essentially, it means that it is infeasible (not exactly impossible, however) to get identical outputs with multiple differing inputs.

1 Like

Describe hash functions with your own words

Hash functions are mathematical equations or algorithms which map data of arbitrary size to a bit array of a fixed size. These hash functions are almost impossible to hack and can only be solved in a linear, unidirectional manner. If even the slightest change is made to the original input, the hashed output is completely changed. An example is SHA-256.

How are hash functions used in cryptocurrencies like bitcoin?

Hash functions are used as part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process. It also assists in the protection of creating public and private keys for setting up a ledger or a digital wallet, and the creation of the 'Merkle Tree'.

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

Hash functions need to be 'collision resistant' so it is difficult to find two inputs which hash to the same output. Examples are public keys for a digital signature and proof-of-work systems for miners.

1 Like

Homework on Hash Functions - Questions

  1. Describe hash functions with your own words
    A hash function is a computation that basically turns an input into an output. The data string of any length goes into the input and the hash function computes it to give you a uniform sized output as stored data. This hashing is a complex algorithmic math problem that essentially “blends” the data in order to encrypt it. Once you hash, you cannot unhash the data, you can only verify that it was solved correctly through proof of work and a time stamp with pointers at the header.

  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).
    Since bitcoin is a decentralized public ledger, the finality component of a hash function ensures that once the hash has been added to a block, it cannot be undone and must be verified by all nodes using the agreed upon mathematic algorithm formula. This ensures that there is no hanky panky manipulation, it is a trustless system rooted in verification of transactions through consensus.

  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 rely on random nonces to attach to a data string being hashed in order to ensure a unique output unreplicated by a different input. In other words, multiple inputs with the same output, or outputs who are easy to find multiple inputs for are not collision resistant and highly unsecure. a good collision resistant hash function makes it extremely difficult to find two random nonces for inputs that equal the same output.

1 Like
  1. A hash function is like a unique digital fingerprint because a unique input produces a unique output. The output is an alphanumeric value that is a base 16 or base 64. Any slight change will produce a completely different hash. Each input will give the same unique output. They cannot be reversed, ever!

  2. hash functions are part of the block hashing algorithm which is used to write new transactions into the blockchain through the mining process. … It’s the need for this large amount of processing power that means new bitcoins get mined over a long period of time, not all at once

  3. A hash function has to be collision resistant because In cryptography, you must have each transaction as unique and not identical to other transactions on the block chain, because then the blockchain wouldn’t be transparent. H is collision **resistant if it is hard to find two inputs that hash to the same output.

1 Like

1.Describe hash functions with your own words.

Each unique input gives a unique output. You can insert something to get fingerprint. It is not reversible cause hash changes if something is modified.

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 is used for transfering data and in mining.

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

It is hard to find two inputs that hash to the same output.

1 Like

Hash Function is a unique output that is an alpha numeric string that is unique to a certain input.

Hash Functions are used in BTC (e.g.)
a) writing new transactions through the SHA-256 into the blockchain via mining
b) unique outputs are what provides the Proof of Work involved in mining
c) the hash is what is to be solved to create a new block in the chain

Hash Functions need to be “collision resistant”:
-because it is theoretically possible for 2 unique inputs to generate the same output-which constitutes a collision in the code
-SHA 256 has not done this yet but Hash Functions have in the past fallen victim to the so called “birthday problem” known in mathematics

1 Like
  1. hash functions are one-way functions–practically speaking there should be a low chance of collisions: this is when two distinct items have the same hash, like if two people with different names had the same nickname, and it’s hard to guess their original names, or if you both wore the same dress to prom and it’s hard to say what else distinguishes you…

  2. “The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work.” -Satoshi Nakamoto

  3. see #1

1 Like
  1. Describe hash functions with your own words

Hash function is a linear function in which input gives an output, but the output can’t give input.
input = output & output != input

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

In bitcoin mining and finding a nonce requires finding the # that generates the required hash in connection with the unique block.

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

Hash functions we know that only input can produce output. However, collision-resistant is the mathematical concept that its probability is unlikely. So to get the same output from a hash function is near impossible.

1 Like
  1. Hash functions are 1-way inputs to provide a unique none reversible output. Every Hash output is a digital fingerprint.
  2. Hash functions are used to write new transactions into the blockchain. This is done via the mining process.
  3. A hash function is collision resistant only when it is hard to find two inputs that hash to the same output.
1 Like

1).Hash functions are one-way (irreversible) functions which receive input strings of any length to give an output of a fixed length.

2). Hash functions are used in Bitcoin to receive transactions as inputs and processed using the hashing algorithm SHA-256 to produce an output of fixed length. It is used to add transactions to a blockchain through mining.

3). Hash functions need to be collision resistant, meaning on no account should two different input produce the same output.

1 Like