Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: sniperx on March 07, 2013, 06:48:42 PM



Title: Bitcoin Hashing Algorithm
Post by: sniperx on March 07, 2013, 06:48:42 PM
is there any source where i can read the core bitcoin hashing algorithm in depth?

Thanks in advance.


Title: Re: Bitcoin Hashing Algorithm
Post by: Meni Rosenfeld on March 07, 2013, 06:51:01 PM
http://en.wikipedia.org/wiki/SHA-2

A hash in Bitcoin corresponds to two applications of SHA-256.


Title: Re: Bitcoin Hashing Algorithm
Post by: gweedo on March 07, 2013, 06:52:39 PM
What do you mean the core bitcoin hashing algorithm? You mean to create bitcoin addresses? https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses


Title: Re: Bitcoin Hashing Algorithm
Post by: Atruk on March 07, 2013, 07:39:12 PM
is there any source where i can read the core bitcoin hashing algorithm in depth?

Thanks in advance.

How much depth do you want?

http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf (http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf) (awfully big pdf file)


Title: Re: Bitcoin Hashing Algorithm
Post by: sniperx on March 07, 2013, 08:13:09 PM
thanks all, what i mean is it a direct usage approach of SHA-256 or it's some sort of customized SHA algorithm, if general SHA-2 algorithm there are plenty of resources if not, please point me where i can read more about it.


Title: Re: Bitcoin Hashing Algorithm
Post by: Atruk on March 07, 2013, 08:14:52 PM
thanks all, what i mean is it a direct usage approach of SHA-256 or it's some sort of customized SHA algorithm, if general SHA-2 algorithm there are plenty of resources if not, please point me where i can read more about it.

It's just two rounds of SHA-256, the standard stuff.


Title: Re: Bitcoin Hashing Algorithm
Post by: DannyHamilton on March 07, 2013, 09:30:21 PM
None of it is customized.  All of it is industry standard.

Most of the hashes in Bitcoin are SHA-256 (or a SHA-256 hash of a SHA-256 hash depending on where it's being used).

Be aware, however, that Bitcoin also uses a RIPEMD-160 hash when creating a Bitcoin Address.