Bitcoin mining process consists of repeatedly increasing "nonce":
payload =
nonce = 1
hash = SHA2( SHA2( payload + nonce ) )
It merely tries to find the right number.
If SHA-2 is so secure then why have National Institute of Standards and Technology (NIST) announced an open competition for a new SHA-3 function to replace the older SHA-1 and SHA-2 after 2012?
http://en.wikipedia.org/wiki/NIST_hash_function_competitionIs SHA-2 algorithm hard coded in the bitcoin protocol or not? Is it possible to upgraded it to SHA-3 after 2012?