Reading assignment: Hashing

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 on average it will take 2^127 tries/calculations to find the target hash.
It takes a really really long time making so its not feasible.

1 Like

Answer the questions below.

  1. What is the hashing algorithm called used in Bitcoin? ANSWER: SHA 256
  2. Why is this hashing algorithm really hard (almost impossible) to brute-force? ANSWER: ON SHEER BRUTEFORCE IT WOULD TAKE FOREVER TO SOLVE (2^256 BITS LONG) TO MANY INPUTS TO FIND IT WOULD BE ALMOST IMPOSSIBLE
1 Like
  1. What is the hashing algorithm called used in Bitcoin?

SHA-256.

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

Because it is pre-image resistant, meaning you cannot get A (input) from H(A) (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?
    Because in order to attempt to generate the original input from the output, you would have to try on average manual comparison of 2 to the 255th power (sorry I don’t know how to notate with my keyboard) inputs and match them up to the output.
1 Like

SHA256

containes randomness

1 Like
  1. It is called SHA 256 (Secure Hashing Algorithm, 256-bits length)
  2. To brute-force the hashing algorithm means trying to find the input of a given hash by hashing all possible inputs and comparing those hash outputs to the desired hash, thus finding the input whose hash is the one you are trying to “revert”. It is very hard to use this method to come up with the input because it would require hashing many, many possible inputs to find the desired one, statistically speaking. In the worst case scenario, it would require hashing all possible inputs, which in case of a 256-bits hash would be 2^256 - 1 inputs. For an average scenario it would be half the possible cases, (2^256)/2, which is 2^255 different inputs. For either case, it is temporally impractical and would require a lot of computational power.
2 Likes
  • What is the hashing algorithm called used in Bitcoin?
    SHA-256 (Secure Hashing Algorithm 256)
  • Why is this hashing algorithm really hard (almost impossible) to brute-force?
    The sheer amount of data involved in mathematically processing. The 256 bit length seems to be the sweet spot for machines and length of time to compute it makes it too expensive and impossible to find within a humanly acceptable timeframe.
1 Like
  1. Sha256
  2. Because the algorithm has a high min-entropy, therefore it will take a very long time to brute-force it.
1 Like

It is seemingly random, but not really. What makes it hard to brute force is the sheer number of possible outputs. :slight_smile:

2 Likes

SHA-256
It’s hard to hack by brute-force because of the huge number possibilities of the order of hash that would need to be matched.

1 Like
  1. SHA-256

  2. Pre-image resistance, among other factors, makes probability of finding a matching hash value extremely low and would take too long to serve a hackers purpose anyway.

1 Like
  1. SHA-256
  2. It is unfeasible to guess the input of hash function based on output hash
1 Like

Course: Blockchain & Bitcoin 101
Section: Functions, Hash Functions, Crypography

05 Reading Assignment

link: https://blockgeeks.com/guides/what-is-hashing/

title: What Is Hashing? [Step-by-Step Guide-Under Hood Of Blockchain]

Notes:

Hashing is taking an input of any length and creating an output of fixed length. In Cryptocurrencies, the input is transactions. In Bitcoin, the output is always a fixed length of 256 characters.

Bitcoin uses hashing function SHA-256 (Secure Hashing Algorithm 256).

Six Properties of a Cryptographic Hash Function:

1. Deterministic: No matter how many times you input the same data, you will get the same output.

2. Quick Computation: The hash function must be able to return a hash quickly. If too slow, then inefficient.

3. Pre-Image Resistance: It is infeasible to determine the input data based on the output hash. Exception: inputs a small fixed range of known values, such as the numbers 1 to 6 on a die. When working with larger datasets, the difficulty rises exponentially. It is only by brute force that the original input can be determined, and that can take several lifetimes.

4. A Small Change in Input Changes the Output: Even a minor change in the input, such as adding an extra exclamation mark, will generate a completely different hash output.

5. Collision Resistant: Each input will generate its own unique hash. Having two different inputs generate the same hash is known as a collision. It is infeasible that this would ever happen.

6. Puzzle Friendly: H(k|x) = Y k represents the particular value chosen. It must be from a particularly large distribution of points.
The vertical bar is concatenation.

Y is the output hash. Given output hash Y and value k, it will be infeasible to find input value x from a wide distribution to concatenate with k to equal Y.

“For every output “Y”, if k is chosen from a distribution with high min-entropy it is infeasible to find an input x such that H(k|x) = Y.”

“high min-entropy” “means that the distribution from which the value is chosen is hugely distributed so much so that us choosing a random value has a negligible probability.”

Homework Q & A:

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

Bitcoin uses hashing function SHA-256 (Secure Hashing Algorithm 256).
By the way, Keccak-256: Produces a 256-bit hash and is currently used by ethereum.

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

Pre-image Resistance is a property of blockchain. It is infeasible to determine the output hash from the input hash, when the input comes from a large amount of data.

With a 128-bit input, on average, it would take
on average 2^127 = 1.7 X 10^38 attempts.
Even with the best computers and working 24/7/365, it would take many years to find a match.

1 Like

Hashing is generating a value from a string of text using a mathematical function.
In Bitcoin is called SHA-256 and it converts text of any length into a fixed-size string of 256 bits (32 bytes)

Originally published in 2001, SHA-256 was developed by the US Government’s National Security Agency (NSA). It is commonly used in SSL certificates for websites and in the DKIM message signing standard for email clients.

Cyptophracically speaking a hash function is considered secure if meets some properties
deterministic (input will always be the same), one way function (no way to reverse it) quick and easy to produce (any ordinary computer can do it) collision resistant (different outputs)
puzzle friendly. Is somehow secure because will take a lot of time to hack.

SHA-256 hashing algorithm is an integral part of the Bitcoin protocol. It has seen implementation in varying facets of the technology such as: bitcoin mining, merkle trees and the creation of Bitcoin addresses.

“SHA-256 is very strong. It’s not like the incremental step from MD5 to SHA1.
It can last several decades unless there’s some massive breakthrough attack.
If SHA-256 became completely broken,
I think we could come to some agreement about what the honest block chain was before the trouble started, lock that in and continue from there with a new hash function.” (Satoshi)

1 Like
  1. SHA 256 (Secure Hashing Algorithm 256bit)
  2. Because it probably takes 2^255 tries [5.78*10^76] to be forced (the half of 2^256, that are all the possible combinations) and it will take an enormous amount of time and energy
1 Like

1.The hashing algorithm used in Bitcoin is SHA-256.
2. Suppose you are dealing with 128-bits hash, and Brute force method means picking random inputs and checking it with the output. So In the worst scenario you will get it after 2^128 times which is very huge number and impractical. Let take the average scenario which you can get on the middle which is after (2^128)/2 = 1.7e38 still a big number. To recap my point it is infeasible to find the input using brute-force.

2 Likes
  1. Bitcoin hashing algorithm is SHA-256. SHA-256 gives a fixed output length. ( Secure Hashing Algorithm-256)

  2. There is too much data to brute force, it would take so long that it does not matter.

1 Like
  1. Sha256
    2.Because it would take a few lifetimes to try to guess the right input combination to find the right output hash.
1 Like
  1. What is the hashing algorithm called used in Bitcoin?

SHA-256

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

Due to the property of Pre-Image Resistance

1 Like
  1. The BTC is using SHA-256 algorithm.
  2. If the SHA-256 generates an effectively unique 256-bit signature of a text, then, taking into consideration that the total number of possible states of 256 bits is represented by 2^256, using the brute force (under the worst case scenario) we could arrive at the correct answer after trying 2^256-1 combinations. And this number is very big even for the most advanced and powerful computers. So, cracking the SHA-256 is infeasible. It’s possible, but you have to have a lot of luck, and such a lucky person would do better betting in casino than cracking hash functions, I suppose)
1 Like