Post
Topic
Board Altcoin Discussion
Merits 8 from 4 users
Re: Where is hashing algorithm code?
by
bob123
on 11/02/2018, 15:21:18 UTC
⭐ Merited by bones261 (3) ,achow101 (2) ,DarkStar_ (2) ,ETFbitcoin (1)
Just wonder that the work of finding a new block(mining) is it kind of decrypting these algorithm?

The work which has to be done to find a new block is not directly dependend on the algorithm.
Additionally you can't decrypt anything in this scenario.

Encryption != Hashing [1]

Hashing is a one-way-function.
This means: You can (relatively) easy calculate a hash of any value. But you can't get the original value out of the hash.

When you are trying to find a new block (mining) you are basically calculating hashes until you find one hash that (for example) begins with 10 zeros.
The difficulty adjusts to assure a new block every 10 minutes. You can look at the difficulty as "X zeros have to be at the beginning of the hash".

On average there has to be Y hashes calculated until a valid one is found. Thats basically a "probability-game".



[1] A more detailed explanation: https://en.wikipedia.org/wiki/Hash_function