Bitcoin Forum
May 30, 2024, 09:10:20 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Hashes and the Merkel Root  (Read 163 times)
betVSme (OP)
Jr. Member
*
Offline Offline

Activity: 102
Merit: 1


View Profile WWW
January 20, 2020, 12:54:11 AM
Merited by ABCbits (1)
 #1

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?
pooya87
Legendary
*
Offline Offline

Activity: 3472
Merit: 10604



View Profile
January 20, 2020, 03:57:36 AM
Merited by ABCbits (1)
 #2

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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
HeRetiK
Legendary
*
Offline Offline

Activity: 2954
Merit: 2093



View Profile
January 20, 2020, 09:46:38 AM
 #3

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).
MrFreeDragon
Sr. Member
****
Offline Offline

Activity: 443
Merit: 350


View Profile
January 29, 2020, 01:24:40 PM
 #4

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]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!