Bitcoin Forum
November 19, 2024, 03:19:06 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Satoshi's paper question  (Read 1350 times)
Reynaldo (OP)
Legendary
*
Offline Offline

Activity: 1144
Merit: 1000


View Profile
September 15, 2014, 01:35:27 AM
 #1

What does it means a on title 4

"...The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits."

What is a zero bit number?

Willisius
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

I'm really quite sane!


View Profile
September 15, 2014, 02:42:52 AM
 #2

This does not begin with any zero bits:
10000

This begins with a number of zero bits:
000010000

Assuming a number is always represented using the same number of digits (like 256), leading zeroes mean that the number is smaller than it could be.

11111111

00000111
^ This second number here is smaller than the one above it. It's less likely for one to randomly generate a number smaller than 00000111 than it is to generate a number greater than 00000111, given that you could generate a number anywhere from 00000000 to 11111111.
Polivka GmbH
Full Member
***
Offline Offline

Activity: 135
Merit: 101

Hydromining!


View Profile WWW
September 15, 2014, 07:43:10 AM
 #3

I never fully understood the "leading zeros" thing - why can't we just say we are searching for a value that gives the smallest number after hashing. Smaller than a certain threshold?
Also the leading zeros in my understanding only allow for a difficulty adjustment by a factor of two?
grau
Hero Member
*****
Offline Offline

Activity: 836
Merit: 1030


bits of proof


View Profile WWW
September 15, 2014, 10:57:53 PM
 #4

Smaller than a certain threshold?

That is how it actually works.
berate48
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
September 16, 2014, 01:09:06 AM
 #5

I never fully understood the "leading zeros" thing - why can't we just say we are searching for a value that gives the smallest number after hashing. Smaller than a certain threshold?
We do say that. Some people just find it easier to conceptualize by looking at the zeroes though.
Ix
Full Member
***
Offline Offline

Activity: 218
Merit: 128


View Profile
September 16, 2014, 01:30:58 AM
 #6

I never fully understood the "leading zeros" thing - why can't we just say we are searching for a value that gives the smallest number after hashing. Smaller than a certain threshold?
Also the leading zeros in my understanding only allow for a difficulty adjustment by a factor of two?

I think it has to do with seeing a cryptographic hash as a string of bits rather than a number. Still, I remember wondering the same thing you did when I read the paper in regards to how finer difficulty adjustments were accomplished. The paper is targeted at an audience level that has a relatively firm grasp on how cryptographic primitives work. It kind of has to be though.
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1036



View Profile WWW
September 16, 2014, 09:16:47 AM
Last edit: September 16, 2014, 09:33:40 AM by deepceleron
 #7

Less than 1% of the population has completed a college-level calculus class; likely a similar percentage have seen hexadecimal numbers. However it is just not the general populace, but a majority of programmers that may get an eye-opener when looking at Bitcoin for the first time.

Hashes are large enough that most comp-sci people would have considered them as data instead of a number previously. They are constructed from bit manipulations, not traditional math, and when numbers become larger than our experience (such as the "number" which represents the contents of a Blu-Ray disc), we conceptualize them differently. We only cared about them for creating file signatures or message digests for vector databases and other bit array operations.


Here's some SHA256s. This is what an average hash looks like:

4f7834804afaaecb19f2d8526986e9cb493f0d23ab9b0e9592986832e10cddb4
3ac61d53845dc33d94739bef070490238b115ef527cdd0a41361ee717b178c6a

The first, for example, is just the number 35945099035430891806054863367923539732599575709697077792070944691543081803188, but we don't use a hash as a number when doing any of the things a message digest is designed to do.

They look like random junk? Well, that's the idea. Satoshi was not the first to recognize that a hash function with cryptographically robust avalanche and diffusion properties works much like a random number generator, and that it could be used in probability puzzles for proof-of-work.

The first digit of a hash can represent a value between 0 and 15 (0-F). However, if I am hashing arbitrary data, only one in sixteen hashes will have a specific digit in that place. Two digits matching? One-in-256. Viewing the whole hash as a number, and using it's statistical robustness, is just one of many novel things that all come together in Bitcoin.


Here's a Bitcoin difficulty target as it might be represented in hexadecimal. It doesn't look much like a number, but now we start to see all those leading zeros that would have made someone think a hash function was broken before.

00000000000003eb8aede235b24b72dd7cec49acfb73a8d8a7142673187fa0a5


Compared to that target, here is a hash of an actual block:
00000000000003de8402fc00a7cdd47a387e9c7ea054f27c79ed3f80a6032c77

The block hash has a notable property. Only one-in-18381623636892592 hashes are like it in being smaller than the target.

Saying that "we are looking for a hash with many leading zero characters" is in line with how programmers would have talked about hashes before. Teaching them the math of Bitcoin targets may have distracted from the impact of the white paper as a whole, with its well-presented blockchain concept and security proofs.
rapta
Sr. Member
****
Offline Offline

Activity: 325
Merit: 250


View Profile
September 17, 2014, 04:45:11 PM
 #8

The more zeros in the front, the higher the difficulty.  it is a very granular system.
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!