-
SHA-256
-
**Now if I understand brute-force correctly, it is where every possible input, one at a time, is tried when looking to solve the algorithm,⦠I guess hash the algorithm? So how many possible inputs could there be for a SHA-256 algorithm? Well this has been a challenge for me to truly answer this question without just looking into the feed with answers from others. It lead me learning that the SHA stands for secure hashing algorithm and that its 256bit,ā¦. Which is the same as SHA-2. Then I learned that, as far as we know, there can only be one solution for a SHA-256 and collisions from 2 pieces of disparate data is unheard of. So thereās only one possible solution to discover through brute-force. Butā¦. Arenāt there programs that can run 1000ās of possible solutions a second? Then I began asking myself what this all has too do with the blockchain and I found out that the SHA-256 isnāt just some byproduct of an idea to introduce some new type of currency. It is used to encrypt the data in transactions and keep things secureā¦ā¦. You see Iām a complete novice when it comes to the world of programming, code,ā¦. Etcā¦ā¦ā¦ so to get back on topicā¦ā¦. Brute-force and hashing algorithmā¦ā¦ā¦ Iām still pretty lost at this point.
then I read this:
ā How Many Hashes?
If a hashing algorithm is supposed to produce unique hashes for every possible input, just how many possible hashes are there? A bit has two possible values: 0 and 1. The possible number of unique hashes can be expressed as the number of possible values raised to the number of bits. For SHA-256 there are 2 to the power of 256 (sorry I canāt remember how to properly type it out, is it 2^256?) possible combinations. So, 2 to the power of 256 combinations. How many is that? Well, itās a huge number. Seriously. It puts numbers like trillion and septillion to shame. It far exceeds the how many grains of sand are in the worldā
so, at this point I can see why it would be near impossible to hash the algorithm with brute force but I still want to know why all this plays a part in the mining process. Is it because in hashing the algorithm we are looking to keep the target value low? I guess Iāll do some more research to learn this stuff and save my confusion for places outside where we submit our answers.