Reading assignment: Hashing

  • What is the hashing algorithm called used in Bitcoin?
    SHA256 (Secure Hashing Algorithm)
  • Why is this hashing algorithm really hard (almost impossible) to brute-force?
    Because though it is not ‘impossible’ it is highly exceptionally 'improbable ’ statistically speaking given that brute-force would randomly be attempting to solve the hash with 1.7 X 10^38 possibilities. So, while it is possible to break pre-image resistance via the brute-force method, the time required would be 100’s of years so it doesn’t really matter.
1 Like

1.bitcoin uses the SHA- 256 (secure hashing algorithm 256)

2.It is mathematical infeasible since it will take a long time. to the extent that it become unworthy.

1 Like
  1. SHA-256
  2. it requires a very large number of inputs to find 2 matching outputs
2 Likes
  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?
    When the information/alternatives are so big it takes to much time to go through all the alternatives before finding the right the exact same one that you are looking for.

1 Like

What is the hashing algorithm called used in Bitcoin?
SHA-256

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

  1. no matter the length of the input, the output is always 256 bits.
  2. a small change in the input text will result in a large change in the output hash
  3. there are an almost infinite amount of possibilities for the input text
  4. for each hash output, there will be only one input text that matches (practically speaking)
1 Like

What is the hashing algorithm called used in Bitcoin?
SHA-256
Why is this hashing algorithm really hard (almost impossible) to brute-force?
No matter what the input is, the output is always 256 bits length which means its mathematically improbable with current technologies to match the output hash

1 Like
  1. SHA-256

  2. Its infeasible to know input because of the 265 bit algorithm used in bitcoin, and because of its pre-image resistance to brute force hacks

1 Like
  1. sha 256

  2. The hashing only occurs one way meaning you can’t take the output and reverse it to get the input. so in order to figure out the input you must randomly put in inputs and compare if the output is the same as the other output. But because there are so many possible outputs the chances of randomly getting two that are the exact same is ridiculously small.
    Since the output is 256 random characters you would have to get all 256 to matchup and be in the right position. I believe there are 16 different possibilities of what a character could be meaning you have a 1 in 16 chance of your first character being correct or about a 6% chance, not terrible. Now you just have to get that to happen another 255 times. On top of that if you get a part of the hash correct (say your first character is correct) there is no way of knowing it is correct without getting all of the other characters correct as well.

1 Like

SHA256 is 256 bits, which is 32 bytes or represented in hexadecimal 64 characters long :slight_smile:

2 Likes
  1. SHA - 256
  2. Because the possibilities with a 256 hash are so high, it would take a really long time to be able to crack it with the brute force method making it very impractical to try and mess with the hash.
1 Like

Sha256
Requires brute force a lot of guess

2 Likes
  1. SHA-256
  2. It would take eons to run the amount of computations needed to try and ‘guess’ the result.
1 Like
  1. Sha 256 is the hashing algorithm used in Bitcoin.

2 Because ité early impossible to get the right input to a given output

1 Like

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?

  • H(A) it is infeasible to determine A, where A is the input and H(A) is the output hash. To use the brute-force method, basically means you have to pick up a random input, hash it and then compare the output with the target hash and repeat until you find a match.You can try to use the brute-force method, but it will take so much time, that there is no point.
1 Like
  1. What is the hashing algorithm called used in Bitcoin? - SHA256
  2. Why is this hashing algorithm really hard (almost impossible) to brute-force? - Because changes in one block causes to change the previous block and so on. The reason for that is that the hash of the header of the previous block is contained in the head of the current block. Also it takes a lot of time and costs a lot of power.
1 Like
  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?
    The possibility are endless comparing with the available computing power
1 Like

Actually it will cause changes to all consecutive blocks. But this why blockchain is immutable not why hash functions are hard to brute force. Hash functions on itself have nothing to do with mining. Mining utilizes hash functions in the mining process.
The reason why hash functions are hard to brute force is because of the sheer number of possible outputs SHA256 can produce. :slight_smile:

1 Like
  1. SHA-256
  2. Because attempting to break pre-image resistance via brute force would take more than your lifetime to get right.
1 Like
  1. SHA 256
  2. The time it would take to brute-force randomly guess makes it infeasible.
1 Like

The article provided in the course does not seem to be completely correct with explaining the hashing blocks and mining process, or I am not understanding it well. Maybe someone has already pointed this out, and I would love to get feedback on this please!

This is the first part I have an issue agreeing with. But correct me if I’m wrong.

In the article, the author suggests how changing a block on the number “x” will in turn cause the hash in the block “X-1” not to be matching with the hash of currently changed block.
However, if the hash of the previous block is stored in the next block after it, wouldn’t then changing data in let’s say block 5 have a miss-match with the hash stored in the block 6, because that is where the hash of the previous block 5 is stored, right?
Here is a screenshot from a book that I’m reading as well and what it says about block hashes and how they are related to each other:


Furthermore, the book also has a hacker example, but the blocks affected by a change in a block “x” are all the blocks after it (x+1; x+2; etc.):

Can someone please explain/confirm which explanation is actually correct?

5 Likes