Bitcoin Forum
February 29, 2020, 05:48:47 AM
 News: Latest Bitcoin Core release: 0.19.0.1 [Torrent]
 Home Help Search Login Register More
 Pages: [1]
 Author Topic: Hashes and the Merkel Root  (Read 97 times)
betVSme
Newbie

Offline

Activity: 89
Merit: 0

 January 20, 2020, 12:54:11 AM

Is there any mathematical probability of a certain character of the hash.  It can be one of sixteen correct? (1234567890abcdef)  Or does a number have more probability than a letter?

Also, does that probability change for each hashes character?

Say I'm trying to guess the first character of the Merkel root,

Are (1234567890abcdef) all equally possible on all characters of the hash,merkleroot?
1582955327
Hero Member

Offline

Posts: 1582955327

Ignore
 1582955327

1582955327
 Report to moderator
1582955327
Hero Member

Offline

Posts: 1582955327

Ignore
 1582955327

1582955327
 Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1582955327
Hero Member

Offline

Posts: 1582955327

Ignore
 1582955327

1582955327
 Report to moderator
pooya87
Legendary

Offline

Activity: 1932
Merit: 2390

Remember tonight for it's the beginning of forever

 January 20, 2020, 03:57:36 AM

since it is a hash and hash results are considered random by nature then the answer is yes, every single bit in the 256 bit final result is random and has the same chance of being either 1 or 0 (which translated into octets aka bytes and would be encoded into hex characters), if there were any bias then the hash function would have been considered broken and weren't used. that is not the case with SHA-256.

 ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀ .ChipMixer.{ MIXING REINVENTED FOR YOUR PRIVACY #.ChipMixer. ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀
HeRetiK
Legendary

Offline

Activity: 1400
Merit: 1239

the forkings will continue until morale improves

 January 20, 2020, 09:46:38 AM

Is there any mathematical probability of a certain character of the hash.  It can be one of sixteen correct? (1234567890abcdef)  Or does a number have more probability than a letter?

Be aware that the letters are just numbers as well in this case.

Hashes are commonly displayed as hexadecimal numbers -- ie. base 16 instead of base 10 as is commonly used in day-to-day live -- hence the letters are simply numbers as well (a = 10, b = 11 and so on).

 ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀ .ChipMixer.{ MIXING REINVENTED FOR YOUR PRIVACY #.ChipMixer. ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀
MrFreeDragon
Full Member

Offline

Activity: 196
Merit: 109

 January 29, 2020, 01:24:40 PM

Is there any mathematical probability of a certain character of the hash.  It can be one of sixteen correct? (1234567890abcdef)  Or does a number have more probability than a letter?

As HeRetiK said, hash is a number. For better visability it is showed in blockchain in HEX (16 base). But for computers the base is not very important, however the lowest level is bit (2 base number represented by 0 and 1).

Answering on your questions, yes, the probability of each symbol is 1/16 (if you use hash repsented in HEX). But if you use hash in BIN for example, so the probability of each symbol will be just 1/2. For hash in DEC (10 base) the probability of each symbol will be 1/10. Etc. It does not matter which base you use, the probability for the whole number will be the same

For example, the hash fa1be5 (in hex) can also be showed as 1111 1010 0001 1011 1110 0101 (in bin) or as 16391141 (in dec). These are all the same number, just represented in different bases.
 Pages: [1]