Hashing
1. What is the hashing algorithm called used in Bitcoin?
- Secure Hashing Algorithm 256 (SHA256)
2. Why is this hashing algorithm really hard (almost impossible) to brute-force?
SHA256 Possibile Hashes [P]:. 2^256 = 1.16*10^77 H
Bitcoins Hashrate [R]:. 100,000,000 TH/s = 1*10^20 H/s
P/R = 1.16*10^77 H / 1*10^20 H/s = 1.16*10^57 s
1.16*10^57/60sec/60min/24h/356d = 3.77*10^49 years
3.77*10^49 / 13.7*10^9 (Age of the Universe) = 2.75 *10^39 Times the age of the Universe
Even with the entire Bitcoin Network it can take up to 3.77 * 10^49 years to find the right Hash. In Average it would take 3.77 * 10^48 years. The number might be much higher when the guessing is random. Than it could be possible to guess a hash multiple times which is not considered in this estimation.
Please let me know if there is a mistake in my way of thinking.