Reading assignment: Hashing

  1. SHA-256

  2. By Brute-force method we are basically talking about taking a random inputs and hashing it and comparing the output hash with the target hash. However, in the Blockchain, The Inputs in the formula H(k|x) = Y are Nonce (K ; Which is random) and X (The hash of the block) and these inputs are hashed and compared against the Difficulty Target (Y) which increases with every 2016th block created. So this randomization of Nonce and the Difficulty Target changing makes it more difficult to Brute-force.

1 Like

You mean the hash of the previous block? :slight_smile:

Not necessarily, difficulty might also decrease if the hash power of the network drops.

2 Likes
  1. SHA 256
  2. Brute forcing is infeasible due to hashing being a combination of puzzle friendly, pre-image resistant and collision resistant.
1 Like
  1. SHA-256.
  2. Because it is pre image resistant, which means that is almost impossible to determine the original input only with the hash value.
1 Like
  1. The hashing algorithm used in bitcoin is called SHA-256.

  2. This algorithm is almost impossible to brute force because it would take multiple life times to guess.

1 Like

Hashing :hash:

  1. What is the hashing algorithm called used in Bitcoin? :lock_with_ink_pen:
    Bitcoin uses SHA-256 which is a version of the Secure Hashing Algorithms that produces hashes of fixed length (i.e. 64 hexadecimal digits [0-9a-f] representing 4 bits of information each that consequently contain 256 bits of information all together).
  2. Why is this hashing algorithm really hard (almost impossible) to brute-force? :muscle:
    In order to brute force such a hash an attacker must try on average half of the possible combinations. Making small computations 2^255 times on average will take many many lifetimes regardless of how much processor speed might increase in the future.
    SHA-256 might be broken (not brute forced) within the next century, however, if someone comes up with a smart algorithm that reduces the number of necessary tries significantly.
1 Like
  1. What is the hashing algorithm called used in Bitcoin?

SHA 256 Secure Hashing Algorithm 256.

  1. Why is this hashing algorithm really hard (almost impossible) to brute-force?

Because to guess the correct hash and the nonce together is mathematically improbable even in multiple lifetimes. It requires an inordinate amount of computing power.

  1. What is the hashing algorithm called used in Bitcoin?
    It is called SHA256

  2. Why is this hashing algorithm really hard (almost impossible) to brute-force?
    This is because of a property of Hashing called “Pre-Image Resistance”. Hashing is the process of giving a string of text of any length a fixed output value. Hashing is deterministic in the sense that no matter how the input is parsed the out output is the same. As a result we only need to keep track of the output. Now, we have a large number of input, if we pick a random input and hash it, we have to compare its output to the target hash output to find a match this makes it really hard to brute force because of the time it will take.

2 Likes

But in this question of Sha256, the nonce has nothing to do with it. A nonce is just to create a special block hash that is low enough to be accepted by the bitcoin network

  1. SHA-256

  2. Brute-forcing hash algorithms means trying repeatedly random inputs until finding the desired output. For SHA-256, there are 2^256 possible outputs. Worst case scenario this would result in 2^256-1 attempts before finding the solution, or in average 2^256/2=2^255 attempts. These are very huge numbers: it will take more than centuries to brute-force SHA-256…

1 Like

Through my understanding of the read article

1.- SHA-256
2.- Due to the property of hash functions: pre-image resistance and Collision Resistance

1 Like
  1. SHA-256
  2. It would take a very long time to establish a second input that results in the same exact hash
1 Like

You mean the hash of the previous block? :slight_smile:

Ah yes, I meant to say Hash from the previous block.

Not necessarily, difficulty might also decrease if the hash power of the network drops.

Oh okay, Thanks for the correction! :smile:

  1. What is the hashing algorithm called used in Bitcoin?
    • SHA-256
  2. Why is this hashing algorithm really hard (almost impossible) to brute-force?
    • Because with a slightly larger set of inputs, the difficulty increases exponentially which means making random guesses takes too long
1 Like
  1. SHA-256
  2. It is complete randomness and the more people guessing the harder it gets.
1 Like

SHA256 has a fixed size, meaning brute forcing it has a fixed difficulty approximately half (2^256 / 2) :slight_smile:

1 Like

1-> SHA-256
2-> to many possibilities do to the 256 bit cryptography, you have to be extremely lucky if the brute force works and guess the right hash with the right outcome

1 Like
  1. The hashing algorithm used in Bitcoin is SHA 256.
  2. Its infeasible to brute force this algorithm because there are so many possibilities, it would take too long to be worth the effort. You would also have to change every block on the chain to even make a tiny adjustment to one transaction.
1 Like
  1. What is the hashing algorithm called used in Bitcoin?
    Hashing

  2. Why is this hashing algorithm really hard (almost impossible) to brute-force?
    Because the odds are non existant, and you cant affect older blocks in the chain.

1 Like
  1. secure hashing algorithm 256 OR SHA-256

  2. Because of the nature of solving the algorithm, it is essentially a guessing game.

1 Like