Bitcoin Forum
June 24, 2024, 07:45:21 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Mathematical process - BTC  (Read 506 times)
astr0train (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
December 27, 2013, 01:31:38 AM
 #1

Hi,

Newbie here.  Just started buying my first few BTC/LTC and getting used to the transaction process/storage options etc.

I have a question about the mathematical process behind:

a) Public-private keys

Is anyone able to explain the mathematical process that takes place in generating the public keys?  I understand that it (loosely) resembles the process of of factorization of numbers. Ie: 13x23 = 299 is easy to calculate, but looking it 299 it's difficult to work out which two numbers were multiplied together.

If this is accurate, does the mathematical process behind the private key only use multiplication or other arithmetic such as division, subtraction, squares and square roots? 

Also, how is it that letters are used in this mathematical process? That doesn't make sense to me...numbers I can understand but letters? (both public and private keys have a combo of letters and numbers).

 b) mining hashing

I just want to understand the process of miners hashing data.  My basic understanding is that they have to take chunks of transaction data and convert this data into short-form "hashed" data.  This hashing is simple to do, however it has to fit a certain format dictated by the "nonce".

What is the mathematical process of data conversion here? Is it similar to the factorization process of the public-private key above or not even close?

Also...on a side note, how does the network know when a miner has the right hash to seal off a block? I mean, who (or what) specifies the criteria for the hash and who (or what) determines if that criteria has been met with a hash of a certain format?

Thanks guys....bit of a headfuck but I want to understand this
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1255


May Bitcoin be touched by his Noodly Appendage


View Profile
December 27, 2013, 02:17:06 AM
 #2

a)
Private -> public key is a point multiplication on a EC (basically +s, -s and *s)
Letters? LMGTFY

b)
The previous blockchain + the current transactions are the data (DATA)
The miner choses the NONCE as he wishes (not exactly but well)

Step 1: NONCE=0, the miner calculates HASH(DATA+NONCE), then if it is under the target it's accepted and spread otherwise NONCE=NONCE+1 and repeat
Step 2: NONCE=1, the miner calculates HASH(DATA+NONCE), then if it is under the target it's accepted and spread otherwise NONCE=NONCE+1 and repeat
...


And a hash is something messing with the bits of the input, it's not basic operations
LMGTFY

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
infinitybo
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
December 27, 2013, 01:03:03 PM
 #3

@Astr0train It's basically a mathematical process therefore BTC are mathematically generated by solving a problem (x,y).
astr0train (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
December 28, 2013, 12:49:21 AM
 #4

a)
Private -> public key is a point multiplication on a EC (basically +s, -s and *s)
Letters? LMGTFY

b)
The previous blockchain + the current transactions are the data (DATA)
The miner choses the NONCE as he wishes (not exactly but well)

Step 1: NONCE=0, the miner calculates HASH(DATA+NONCE), then if it is under the target it's accepted and spread otherwise NONCE=NONCE+1 and repeat
Step 2: NONCE=1, the miner calculates HASH(DATA+NONCE), then if it is under the target it's accepted and spread otherwise NONCE=NONCE+1 and repeat
...


And a hash is something messing with the bits of the input, it's not basic operations
LMGTFY

Thanks jackjack... makes sense about the hexadecimal..so the letters really just represent numbers in the public/private keys.

Not sure I understand what point multiplication is (+s, -s and *s) but are you saying that the algorithm just applies a process of addition, subtraction and multiplication to the private key to obtain the public key?

Also on your second point, who (or what) determine the "target" for each block? I read somewhere that it's determined by the network difficulty but that doesn't make sense to me.  Who (or what) sets the target for each block and who (or what) verifies the hashes until said target has been found?

And If a computer can hash data easily, and it knows the network difficulty, can't it just work out which nonce to use rather than try heaps of combinations? 
 
Thanks Cheesy
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1255


May Bitcoin be touched by his Noodly Appendage


View Profile
December 28, 2013, 12:56:41 AM
 #5

Not sure I understand what point multiplication is (+s, -s and *s) but are you saying that the algorithm just applies a process of addition, subtraction and multiplication to the private key to obtain the public key?
Yes
Point multiplication is something specific to elliptic curves

Also on your second point, who (or what) determine the "target" for each block? I read somewhere that it's determined by the network difficulty but that doesn't make sense to me.  Who (or what) sets the target for each block and who (or what) verifies the hashes until said target has been found?
The difficulty or target are similar, you can get one if you have the other
The difficulty is the same for sets of 2016 blocks
The first difficulty (blocks 1 to 2016) was 1
The recalculated difficulties (i.e. for blocks 2017, 4033, ..., n*2016+1) depends on the time between the 2016 previous blocks: it's a way to adjust the difficulty according to the numbers of miners

And If a computer can hash data easily, and it knows the network difficulty, can't it just work out which nonce to use rather than try heaps of combinations? 
That's the point of mining: hashing is really fast, but the reverse operation is impossible

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
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!