Homework on Hash Functions - Questions

Miners ate trying to find a hash value below a certain target. The nonce is just a number used by the miners to help them find the correct hash. :slight_smile:

1 Like
  1. Describe hash functions with your own words
    A hash function is a function that enables an input to be protected and encrypted, SHA 256/384. This function protects the identity of the information and is a one-way function that cannot be reversed, otherwise ‘bitcoin would be broken.’

  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).
    I found a great response via Quora research and to try my best to summarize in my own words… one way to use the hash function in cryptocurrencies is via proof of work and ‘nonces’, the very smallest part of a hash that can enable the start of the next block. One has to keep changing the nonce, by sheer guesswork, in order to add a new block.

Another use of hash functions in cryptocurrencies is that the has function helps to to make the block ‘immutable’. The block is protected by said hash and if anyone tries to mess with the block then the entire hash code will be changed thus having to go back and rework all of the proof of work again.

  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).
    Hash functions need to be ‘collision-resistant’ so that it makes it virtually impossible for an adversary to break the function.

“If collisions are easy to find, they allow an attacker to take an authentic digitally signed message, find a different message that produces the same digest (the collision), then substitute the fake message for the real one while keeping the same signature value. Someone trying to validate the signature won’t be able to tell the difference. This destroys the value of digital signatures.”

1 Like

Thank you! I can use all the clarity I can get, much appreciated.

  1. Using a complex mathematical equation and input is encrypted and converted into a indistinguishable predetermined bit length output. The output is nearly impossible to re-engineer the input with.
  2. Private keys are converted into public keys using a hash function which prevents anyone from getting your private key but allows you to sign transaction verifying your identity. Those transaction are then complied into blocks which creates a unique hash of each block and then miners attempt to solve for the nonce to create a correct block header with.
  3. When the input field is larger than the output field of a hash function then their is a guarantee that there will be many inputs with the same output. However hash functions with high collision resistance such as SHA-256 while there exists these collision it is less likely to happen and or be exploited by a brute force attack.
1 Like
  1. A hash function takes input and creates a separate string of data that is unique to that specific input and there is no apparent connection to the original data. Thus making it irreversible.

  2. Hash functions are vital for a decentralized organization such as bitcoin. Without the encryption of data there would be no way of ensuring that said data was not tampered with. What also makes the hash functions important is its ability to guarantee that the output cannot be reversed which makes cracking the code near impossible.

  3. It in incredibly important for hash functions to be collision resistant as many of the machines that are known to hack into secure data use a brute force. This means that a machine will fill out any possible combination of numbers and letters until it gathers and finds the right one. If a hash function wasn’t collision resistant then it would be far simpler to crack the code.

1 Like

Homework Hash Functions 1/15/21

  1. Describe hash functions with your own words
    Hash functions are sets of unique input/output functions that leave a digital fingerprint. They are repeatable, one-way computations that cannot ever be inverted or reversed. .

  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 crypto because they are used 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 resistant means two different inputs cannot get the same, duplicate hash.

1 Like
  1. Describe hash functions with your own words

Hash functions is a one way function that takes an input and calculates it into a unique output… ie a hash algorithm. It is a digital fingerprint of the input.

  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 (SHA256) to create and verify data within the blockchain. It is a one way function so it makes the data encrypted and secure as it cant be reversed to work out the initial input. The input cant be manipulated as it creates an entirely different hash.

  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 needs to be collision-resistant to ensure that it is impossible for two different inputs to produce the same output.

1 Like

Describe hash functions with your own words

Hash function have a digital output according to a given input with no reversal option.

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

In cryptography, 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). … ) hash operations on random input is likely to find two matching outputs.

1 Like
  1. A hash function turns data into 256 bit line code which can’t be reverse. Each data has a unique line of code
  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 the property of a hash function that it is computationally infeasible to find two colliding inputs.
1 Like
  1. a hash function is a function where one is only able to take an input and get an output, but not be able to use the output to tell what input was entered

  2. hash functions are used to run a lottery with miners to see who will sucessfully win the next bitcoin released, where miners must produce an output of the hash function that is equal or lower than the target value. The target value within the range of possible outputs is very low and improbable to generate without a large number of tries.

  1. collision resistant means mitigating the occurance of two different inputs producing the same output.
1 Like
  1. Hash functions are the backbone of crypto and block chain and what allows it to be trustless. They take data and scramble it into a puzzle that only the private key can solve

2.hash functions are used on the headers. By using it on the header for each block u can verify the contents within and ensure that everything is good with the chain

  1. With bitcoin, when it comes to collision resistance it refers to the likelihood that someone will get the same private key and be able to decode your public key with it
1 Like

Hash functions are not the same as PK cryptography. Hash functions are just functions that process an input into a fixed sized output and can’t be reversed (decrypted). It is used as a fingerprint of the data.

True that someone could one day randomly generate the same private key but that would be a random guess that would cause a collision. In hash functions a collision explains the probability for two inputs to result in the same output. :slight_smile:

3 Likes
  1. Describe hash functions with your own words
    Hash functions are one-way mathematical calculations that produce a unique footprint or output from a unique input. Their main characteristic is that it’s impossible to go from output to input.

  2. How are hash functions used in cryptocurrencies like bitcoin?
    Any hash function is used to produce an output of a fixed length from input data of any length or size. In cryptocurrencies, several transactions (input data) are run through the SHA-256 algorithm in order to produce a fixed-length “unique” hash (nonce). Obviously, if any of the transactions included in a block were to be modified, the hash or output would change and this would disrupt the chain of hashes.

  3. What does it mean when we say that hash functions need to be collision resistant?
    Collision-resistance is a property of hash functions. It refers to the property that prevents the existence of two colliding inputs, meaning two inputs hashing into the same output.

1 Like
  1. It is a one way function, a mathematical algorithm which is practically impossible to invert. When you feed the ash function with any kind of data can you have a unique fingerprints of this data. Any small changes in the original data structure you input should totally change the output hash value.

  2. First of all for the proof of work system. Originally invented as a way against informatic attacks like DoS, spam and other. Later in Bitcoin is used as the fondamental for distributed consensus in the network in the mining system. The miners compete to resolve this hash in order to mint new BTC, like a cryptographic “puzzles” to solve. Each miners have a proportional chances to win the run equal to the computational power they have probably spended.
    It is also used like a signature for the verification of the correct output in the Bitcoin transaction with the generation of a public keys from hashing private keys. In some way still I didn’t understand :joy:… I have to study a lot!

  3. In a collision resistance hash function is hard to find two inputs that hash to the same output. More harder it is more secure is the cryptography.

1 Like

1: Hash function takes input of any lenght and returning unique 256 bits output, whish is nonreversable.
2: in Bitcoin hash function is used to convert found block into hash and store it as header in the next block, and this new block becomes attached to the new one.
3. it is extremely unlike that two different input will give exactly the same output.

1 Like

1- Describe hash functions with your own words

  • Hash functions is a mathematical operation that convert an input to an output which is called fingerprint result.

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 protocol, the hash function are part of the block hash algorithm, trough the mining the block hash algorithm used to write the new transactions into 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).

  • It does mean in cryptographic hash functions is difficult to find 2 inputs that produce same output, which is two different options with different hash. Cannot be same.
1 Like

Describe hash functions with your own words?

A hash algorithm is a universal translator for computers. It is able to receive any form and size of data, including digits, letters or even larger media files, and translates them into an alphanumeric string of a certain size. This size can vary depending on the hash function in use. Standard and popular sizes include the 64-bit, 128-bit and the 256-bit.

The output of the function is called a hash. It cannot be reversed to calculate the initial raw data.

How are hash functions used in cryptocurrencies like bitcoin?

Bitcoin’s blockchain uses these important hash algorithm characteristics to run its consensus mechanism. The most popular cryptocurrency in the world uses a Secure Hash Algorithm (SHA) named SHA-256.

In order to reward miners with Bitcoin, the currency uses the proof-of-work (PoW) function. This same function is used in a number of Altcoins and is based on the SHA-256 algorithm. Bitcoin miners essentially work to solve increasingly difficult mathematical equations, adding new blocks to the blockchain in exchange for newly created Bitcoin.

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

In cryptography, 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]:136 The pigeonhole principle means that any hash function with more inputs than outputs will necessarily have such collisions;[1]:136 the harder they are to find, the more cryptographically secure the hash function is.

1 Like

A hash function is a cryptographic function that creates a unique output (fingerprint) for a given input. It is a one-way function because we are not able to go from the output to the input. Any change in the original input will generate a completely different output or finger print.

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.

A hash function is collision-resistant if it is hard to find two inputs that hash to the same output. The harder they are to find, the more cryptographically secure the hash function is. If there is an easier method than this brute-force attack, it is typically considered a flaw in the hash function.
Cryptographic hash functions are usually designed to be collision-resistant. However, many hash functions that were once thought to be collision resistant were later broken, like MD5 and SHA-1.

1 Like
  1. A hash function is a mathematical eqaution that produces a one way output that is not reversable.

  2. In order to succesfully mine a block and receive compensation, mining software needs to hash the block’s header in order to get it equal to or less than the target. The target is a 256-bit alphanumeric code which all Bitcoin clients share. The lower the target’s value is, the harder it is to generate a new block.

  3. collision resistant is when two inputs that hash are very unlikely to produce the same output

1 Like
  1. A one way encryption whos output cannot be deciphered back to the input.

2.Hash functions in bitcoin are used to mine a block and add all previous transactions to the blockchain.

  1. So that two different inputs cannot have the same output.
1 Like