Bitcoin Forum
May 05, 2024, 01:45:28 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: newbie questions  (Read 1185 times)
aussietree (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
January 13, 2017, 02:35:24 AM
 #1

thanks everybody who will respond. I go straight to the points. I'm just learning, so please correct or enlighten me:

1) a bitcoin consist of a public and private key. Public key (usually starting with 1) is an address, safe to distribute to receive payments etc ... (if you don't mind privacy). Private key (starting with 5) is what makes the bitcoin (so to speak), and need to be kept secret. If I have bitcoins e.g., on coinbase.com and I want to store them safely e.g. on my laptop or or a piece of paper, how do I do that? Can I see my private key (or keys) and handwrite it on a piece of paper? (I know it's a silly idea, because of typo and mistakes, but just talking hypothetically).

2) I read about hardware wallets, which generate private keys offline. How can a wallet generate a private key? Isn't the private key the bitcoin itself?. What am I missing here?

3) 21 million bitcoins will be generated till the end of time. Does that mean 21 million of private keys or what?

4) how long is a private key? I presume very much to avoid brute force possibility of guessing the right one, but could in principle be e.g. long 5 characters?

5) I have 0.1 bitcoin (which has a private key), and then I get paid 0.02 bitcoin (another private key). Thus I end up having 0.12 bitcoin on my wallet. What's their private key? Or private keys are just code to authorise transactions? Please help me understand this point.

6) I know bitcoin mining is almost impossible nowadays, if not part of mining pool, or with huge computational resources. But let's keep it simple, and assume we are still back in 2009. I run a mining program on my laptop and generate 100 bitcoins. Can that be done offline, or need to be online to inform the public ledger? Those 100 bitcoins are 100 secret keys? How do I transfer them in a wallet?

7) is there a program that run on mac OSX to generate some alternative cryptocurrency (obviously with a value less than a mosquito) and learn how the system works?

Thanks!
1714916728
Hero Member
*
Offline Offline

Posts: 1714916728

View Profile Personal Message (Offline)

Ignore
1714916728
Reply with quote  #2

1714916728
Report to moderator
1714916728
Hero Member
*
Offline Offline

Posts: 1714916728

View Profile Personal Message (Offline)

Ignore
1714916728
Reply with quote  #2

1714916728
Report to moderator
1714916728
Hero Member
*
Offline Offline

Posts: 1714916728

View Profile Personal Message (Offline)

Ignore
1714916728
Reply with quote  #2

1714916728
Report to moderator
You can see the statistics of your reports to moderators on the "Report to moderator" pages.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714916728
Hero Member
*
Offline Offline

Posts: 1714916728

View Profile Personal Message (Offline)

Ignore
1714916728
Reply with quote  #2

1714916728
Report to moderator
1714916728
Hero Member
*
Offline Offline

Posts: 1714916728

View Profile Personal Message (Offline)

Ignore
1714916728
Reply with quote  #2

1714916728
Report to moderator
1714916728
Hero Member
*
Offline Offline

Posts: 1714916728

View Profile Personal Message (Offline)

Ignore
1714916728
Reply with quote  #2

1714916728
Report to moderator
ArcCsch
Full Member
***
Offline Offline

Activity: 224
Merit: 117


▲ Portable backup power source for mining.


View Profile
January 13, 2017, 03:08:00 AM
Last edit: January 13, 2017, 03:53:55 AM by ArcCsch
 #2

thanks everybody who will respond. I go straight to the points. I'm just learning, so please correct or enlighten me:
You should read The Whitepaper and browse the wiki to learn the basics of bitcoin before acquiring any significant amount.
I will try to explain in simple terms how the system works:
The backbone of bitcoin is the blockchain, it is a series of blocks of data, each one is tacked on to the previous one in a way that ensures no block can be changed without changing all the following blocks. To create a block, it is necessary to solve a very difficult cryptographic puzzle, there is no known faster way to solve it than brute force (this is what miners do), and the solution is invalidated by any change in the block. This makes it very difficult to fork the chain and overcome the end most miners are building.
Those blocks of data contain transactions, each transaction must be valid for the block to be accepted by the network.

Each transaction has inputs and outputs, inputs are links to previous transactions, and outputs link to future transactions, in particular, each input must link to an output of a previous transaction, and each output must link to at most one input.
Each input and output has a value associated with it, denominated in BTC, in almost every transaction, the sum of the outputs cannot exceed the sum of the inputs, the only exception to that is the coinbase transaction of each block, the other rule, is that in each block, the total of the outputs must not exceed the total of the inputs plus the block reward, which itself halves every 210000 blocks.

The rules state previously enforce a conservation law on bitcoin (prevents anyone from freely creating coins), but a currency also needs authentication (prevents anyone from spending coins they do not own), and this is where addresses and keys come in.
When coins are sent to you, the output includes an address, the public part of a keypair that you created with a wallet program.
When you send coins, you are creating a transaction with an input that links to the output of a previous transaction sent to you.
For the transaction to be valid, you must digitally sign it with the private key that corresponds to the address specified in the output.
You need the private key to create this signature, but it can be verified by checking it against the address that corresponds to the key.
Once you broadcast this transaction, the nodes relay it to miners, and they include it in a block, setting it in stone and allowing its outputs to be spent.
1) a bitcoin consist of a public and private key. Public key (usually starting with 1) is an address, safe to distribute to receive payments etc ... (if you don't mind privacy). Private key (starting with 5) is what makes the bitcoin (so to speak), and need to be kept secret. If I have bitcoins e.g., on coinbase.com and I want to store them safely e.g. on my laptop or or a piece of paper, how do I do that? Can I see my private key (or keys) and handwrite it on a piece of paper? (I know it's a silly idea, because of typo and mistakes, but just talking hypothetically).
Instructions on paper wallet (wait until someone else confirms them before using them, in general, do not do anything with valuable simply because one anonymous stranger told you to):
https://bitcointalk.org/index.php?topic=1559277.msg17075677#msg17075677
Yes, you can write it if you want.
2) I read about hardware wallets, which generate private keys offline. How can a wallet generate a private key? Isn't the private key the bitcoin itself?. What am I missing here?
Bitcoins are not actually contained within a wallet, a bitcoin is not actually a file, a bitcoin is just the unit in which the value of outputs is measured in.
The private keys just give you the ability to spend it, kind of like your bank PIN.
3) 21 million bitcoins will be generated till the end of time. Does that mean 21 million of private keys or what?
No, the total of the values of unspent outputs will tend to 21000000BTC, there can be fewer or more outputs.
4) how long is a private key? I presume very much to avoid brute force possibility of guessing the right one, but could in principle be e.g. long 5 characters?
256 bits, it is actually a point on an elliptic curve.
5) I have 0.1 bitcoin (which has a private key), and then I get paid 0.02 bitcoin (another private key). Thus I end up having 0.12 bitcoin on my wallet. What's their private key? Or private keys are just code to authorise transactions? Please help me understand this point.
You would have two outputs with seperate private keys.
6) I know bitcoin mining is almost impossible nowadays, if not part of mining pool, or with huge computational resources. But let's keep it simple, and assume we are still back in 2009. I run a mining program on my laptop and generate 100 bitcoins. Can that be done offline, or need to be online to inform the public ledger? Those 100 bitcoins are 100 secret keys? How do I transfer them in a wallet?
You have to be online to mine, when you mine, you provide an address that the coins would be on.
Since in 2009 each block had 50BTC, you would have two outputs, whether you reuse the same address is up to you.
7) is there a program that run on mac OSX to generate some alternative cryptocurrency (obviously with a value less than a mosquito) and learn how the system works?
You can get some testnet coins at a faucet (testnet is like bitcoin, exept it is meant for experimenting and the coins are nearly worthless).

If you don't have sole and complete control over the private keys, you don't have any bitcoin!  Signature campaigns are OK, zero tolorance for spam!
1JGYXhfhPrkiHcpYkiuCoKpdycPhGCuswa
aussietree (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
January 13, 2017, 04:35:23 AM
 #3

You should read The Whitepaper and browse the wiki to learn the basics of bitcoin before acquiring any significant amount.
Thanks, I will!

Each transaction has inputs and outputs, inputs are links to previous transactions, and outputs link to future transactions, in particular, each input must link to an output of a previous transaction, and each output must link to at most one input.
Each input and output has a value associated with it, denominated in BTC
So, in essence when a new bitcoin is created a new blockchain with value xx BTC is started? where xx = 50 back in 2009, and decreasing amount now. So, a complicate crypto puzzle needs to be solved in order to be able to create a valid blockchain (for bitcoins). Is that a correct understanding?

Instructions on paper wallet (wait until someone else confirms them before using them, in general, do not do anything with valuable simply because one anonymous stranger told you to):
Thanks for the tip! Once confident enough I might even send a thank to the bitcoin address then Wink

Bitcoins are not actually contained within a wallet, a bitcoin is not actually a file, a bitcoin is just the unit in which the value of outputs is measured in.
The private keys just give you the ability to spend it, kind of like your bank PIN.
Good analogy, thanks! So, in this picture the secret key is the PIN to allow a transcation of a given amount, right?

No, the total of the values of unspent outputs will tend to 21000000BTC, there can be fewer or more outputs.
which output are we talking here? Secret keys? So, yes if there's a secret key with 10million and one with 11million, there there will be only two outputs. Or 221million keys each with 0.1bitcoins or whatever combinations we can think of. Is that what you meant?
I actually sure I'm missing to grasp something important here, re the unspent bit...

256 bits, it is actually a point on an elliptic curve.
ok, so 256 bits allow some 1e77 numbers. Since only 21million BTC will be created, is that what makes it harder to solve it?

5) I have 0.1 bitcoin (which has a private key), and then I get paid 0.02 bitcoin (another private key). Thus I end up having 0.12 bitcoin on my wallet. What's their private key? Or private keys are just code to authorise transactions? Please help me understand this point.

You would have two outputs with seperate private keys.
OK, one for each transction. But in the moment I have 0.12 in my wallet, then a new key is generated to allow future transactions? E.g. I could transfer the whole lot, or I could transfer 12 payment of 0.01 and thus 12 new private keys would be generates?
ArcCsch
Full Member
***
Offline Offline

Activity: 224
Merit: 117


▲ Portable backup power source for mining.


View Profile
January 13, 2017, 05:16:13 AM
Last edit: January 13, 2017, 08:42:58 PM by ArcCsch
 #4

So, in essence when a new bitcoin is created a new blockchain with value xx BTC is started? where xx = 50 back in 2009, and decreasing amount now. So, a complicate crypto puzzle needs to be solved in order to be able to create a valid blockchain (for bitcoins). Is that a correct understanding?
Not exactly, when a new block is created, xxBTC is added to the money supply, by allowing the miner to claim them along with the total of all the transaction fees (the difference between the total of the inputs of a transaction and the total of the outputs).
The blocks form one long, continuously growing chain.
Thanks for the tip! Once confident enough I might even send a thank to the bitcoin address then Wink
I would appreciate that greatly. Wink
If you want to send me coin, send to the 1JGYXhfhPrkiHcpYkiuCoKpdycPhGCuswa address next to my avatar, DO NOT send to the address on the linked paper wallet image.
Good analogy, thanks! So, in this picture the secret key is the PIN to allow a transcation of a given amount, right?
The secret key that corresponds to an address allows spending of any coins sent to that address.
which output are we talking here? Secret keys? So, yes if there's a secret key with 10million and one with 11million, there there will be only two outputs. Or 221million keys each with 0.1bitcoins or whatever combinations we can think of. Is that what you meant?
I actually sure I'm missing to grasp something important here, re the unspent bit...
Think of unspent outputs as slabs of metal (1kg=1BTC if you wish), and addresses as locked boxes with a slot in the top to allow slabs to be dropped in (like some mailboxes), each transaction uses up slabs deposited from previous transactions (the key is necessary to open the box), melts several slabs together, casts new slabs, and deposits them into new boxes (the miner gets to keep some residue).
Take this transaction for example, make sure you click "Advanced: Enable" on the bottom right (to the left of the drop down menu):
https://blockchain.info/tx/c2fb0c47471aaa3bb2d9c43afb9361bdd1760c1edb21f3f737dcaccefa71dc89
As you can see, 6 slabs of bitcoin were taken from the same box (address), totalling 253.63411g (mBTC).
The slabs were melted together, and recast into a plethora of smaller slabs deposited to different addresses, (note that a 36.27083g slab was put back into the sender address), and the miner received 1.11328g of residue (total input minus total output).
Also note that some outputs are spent (the new slab was already melted), and some still unspent (the new slab still lays intact).
ok, so 256 bits allow some 1e77 numbers. Since only 21million BTC will be created, is that what makes it harder to solve it?
The security of addresses have little to do with the total amount of BTC, 2^256, (or 2^128 for that matter), are far more steps than any practical computer can carry out.
OK, one for each transction. But in the moment I have 0.12 in my wallet, then a new key is generated to allow future transactions? E.g. I could transfer the whole lot, or I could transfer 12 payment of 0.01 and thus 12 new private keys would be generates?
You have one slab weighing 20g and one weighting 100g, they are presumably in separate boxes.
Most wallets generate a new address for each transaction.

Note that the whole "1BTC=1kg" thing is just a useful analogy, outputs and addresses are not actually physical objects.

If you don't have sole and complete control over the private keys, you don't have any bitcoin!  Signature campaigns are OK, zero tolorance for spam!
1JGYXhfhPrkiHcpYkiuCoKpdycPhGCuswa
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4616



View Profile
January 16, 2017, 08:32:11 PM
 #5

thanks everybody who will respond. I go straight to the points. I'm just learning, so please correct or enlighten me:

ArcCsch is doing a pretty good job of answering your questions, but I'll make an attempt as well just to help clarify some things.

1) a bitcoin consist of a public and private key. Public key (usually starting with 1) is an address, safe to distribute to receive payments etc ... (if you don't mind privacy). Private key (starting with 5) is what makes the bitcoin (so to speak), and need to be kept secret. If I have bitcoins e.g., on coinbase.com and I want to store them safely e.g. on my laptop or or a piece of paper, how do I do that? Can I see my private key (or keys) and handwrite it on a piece of paper? (I know it's a silly idea, because of typo and mistakes, but just talking hypothetically).

You are mixing up a lot of word and meanings.  It's important to get a good understanding of these terms if you're going to try to talk about bitcoin on such a technical level.  Otherwise, your questions won't make any sense and you won't understand the answers.

"A bitcoin" doesn't actually exist.  Talking about "a bitcoin" is just an abstraction we humans use to make it easier to talk about the transfer of control over value.  At best, bitcoins are a value representation in a shared distributed database called "the blockchain".

Access to create and receive transactions in that database is controlled with digital signatures.  These digital signatures are created with elliptic curve maths and a private key (which is a 256 bit integer).  The signatures can be verified with elliptic curve maths and the appropriate public key.

A "bitcoin address" is computed from the public key (using SHA256 and RIPEMD160 hashing).

The private key does not "make the bitcoin".  It gives you the ability to create a valid signature that can be verified by the public key that the address was generated from.  With this valid signature, you are able to add a record to the database that assigns control over some portion of value to someone else's bitcoin address.

What you "store safely" is the private keys.  Anyone with access to those private keys can create "transactions" that spend the associated bitcoins in "the blockchain".  You can store these private keys on your laptop or on paper if you want.  When you say Coinbase has your bitcoins, what that really means is that Coinbase is being trusted to safely store the private keys that they will use to sign the transactions when you ask them to "send bitcoins" (in reality add transaction records to the blockchain).

So:
  • A block is set of transactions that have a valid proof-of-work
  • The blockchain is a distributed database that stores blocks in an ordered way such that the historical order and contents of the blocks can't be modified
  • Bitcoins are a representation of value in the transactions that are in the blocks
  • private keys are secret values that are used to prove that you are authorized to re-assign some value in the blockchain
  • Public keys are values that do not need to be secret, and are used to verify that a provided signature is valid
  • Bitcoin addresses are typically a base58 representation of 3 pieces of information (1. What output script to use, 2. The RIPEMD160 hash needed for that script, 3. A checksum to identify mistakes when writing or typing the address)
  • The hash that is used to create the bitcoin address is computed from the public key (in the typical address that starts with a 1)

2) I read about hardware wallets, which generate private keys offline. How can a wallet generate a private key? Isn't the private key the bitcoin itself?. What am I missing here?

The private key is a secret value that is used to generate ECDSA digital signatures via Elliptic Curve maths.  It is not "the bitcoin". It is used when spending bitcoins to prove that you are authorized to do so.

3) 21 million bitcoins will be generated till the end of time. Does that mean 21 million of private keys or what?

The base integer unit that is stored in transactions in the blockchain is commonly called the "satoshi".  1 bitcoin = 100000000 (100 million) satoshi.  Therefore, the maximum number of spendable units will never exceed 2100000000000000 (2.1 quadrillion) spendable units.

Those units could all be stored in a single output, or they could be stored in 2.1 quadrillion different outputs, or any number of outputs in between.  It all depends on the transactions that the users create.

4) how long is a private key? I presume very much to avoid brute force possibility of guessing the right one, but could in principle be e.g. long 5 characters?

The private key is a 256 bit integer.  There are many ways to represent such an integer (binary, octal, decimal, hexadecimal, base58check, etc).  I suppose you could create a representation that would let you store your private key in 5 characters if you wanted, but you'd have to know exactly which 256 bit integer those 5 characters represent.

5) I have 0.1 bitcoin (which has a private key), and then I get paid 0.02 bitcoin (another private key). Thus I end up having 0.12 bitcoin on my wallet. What's their private key? Or private keys are just code to authorise transactions? Please help me understand this point.

Both outputs could have the same private key, or they could have two different private keys. It all depends on how they were sent to you.

6) I know bitcoin mining is almost impossible nowadays, if not part of mining pool, or with huge computational resources. But let's keep it simple, and assume we are still back in 2009. I run a mining program on my laptop and generate 100 bitcoins.

So, that would mean you solved the proof-of-work for 2 blocks and added them to the blockchain.

Can that be done offline, or need to be online to inform the public ledger?

The blocks need to be broadcast to the network after you've solved the proof-of-work so they can be added to the distributed blockchain.  If they aren't on the distributed blockchain, then the bitcoins don't exist.

Those 100 bitcoins are 100 secret keys?

Typically they would be 2 transaction outputs in the blockchain.  They could both have the same private key, or they could be two separate private keys.  They also could be broken into more outputs if you prefer, but generally that wasn't done back then.

How do I transfer them in a wallet?

When you create the transaction in the block that you are working on, you assign the output to an address for which you have the private key.  That private key is stored securely by your wallet.
nicholejax
Member
**
Offline Offline

Activity: 60
Merit: 10


View Profile
January 23, 2017, 05:46:50 PM
 #6

thanks for resolve my question!  Wink
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!