Author

Topic: From where does my Bitcoin client download the public keys of others? (Read 1187 times)

legendary
Activity: 2506
Merit: 1010
If you pay attention to the thread that you are commenting in, it should be clear.

Ah, got it. 

More often than not when someone is asking about a "public key" they are simply referring to a Bitcoin address.   The question comes up because most ledger systems require an "account number" or similar to be created in advance before transactions related to that entity can occur.    So the question comes up from people wanting to know where each and every bitcoin address that exists is stored.   And the answer to that question, of course, is that bitcoin doesn't require an address to be known by the nodes of the network before it is used.   So addresses exist without the rest of the network knowing about them.  (e.g,, by default 100 addresses are in each node's keypool which the rest of the network does not know anything about.)
donator
Activity: 1218
Merit: 1079
Gerald Davis
You have it right Walter.

Bitcoin uses three distinct elements:
* The Bitcoin Address (I sometimes use term public address) which is double hashed plus checksum of the public key.
* The public key which is created using ECC from the private key and represents a point (x,y) on the secp256k1 curve.
* The private key which is a random 256 bit number.
sr. member
Activity: 476
Merit: 250
Bytecoin: 8VofSsbQvTd8YwAcxiCcxrqZ9MnGPjaAQm
where does my Bitcoin client download the public keys of others?
Keep in mind that the bitcoin client doesn't know the public key of others until there is a transaction with a payment to from that address.  
FTFY

Huh?

You can't send a payment to an address without the bitcoin network then becoming aware of that address the payment is sent to.  As soon as that transaction is broadcast then each node becomes aware of the address if it hadn't known of it previously.

That's true, but an address is not a public key.  An address is an irreversable hash of a public key.  You can't turn an address into the corresponding public key.  The public key is only disclosed when a transaction spends from that address.

(I think I have this right, but someone correct me if I'm wrong.)

Because an address is a hash of a public key, you can think of them as the same thing for the purpose of simplification and understanding.  But technically they are different.
legendary
Activity: 3472
Merit: 4801
where does my Bitcoin client download the public keys of others?
Keep in mind that the bitcoin client doesn't know the public key of others until there is a transaction with a payment to from that address.  
FTFY
Huh?

If you pay attention to the thread that you are commenting in, it should be clear.  Notice, there is a difference between a Bitcoin Address (which is broadcast to the network the first time bitcoins are sent TO the address), and a public key (which isn't broadcast to the network until the first time bitcoins are sent FROM the address).

This means until you spend from an address the public key is unknown.
if you spend to an address the public key of the receiver is known (e.g. paper wallet). it is unknown as long the address is not loaded.
DeathAndTaxes got this one correct.  Gyrsur, you are mistaken.

If you spend to an address, the Bitcoin Address of the receiver is known, the public key is not.

When you spend from an address, the public key is included in the input of the transaction.  It is only then that the public key becomes known.
legendary
Activity: 2506
Merit: 1010
where does my Bitcoin client download the public keys of others?
Keep in mind that the bitcoin client doesn't know the public key of others until there is a transaction with a payment to from that address.  
FTFY

Huh?

You can't send a payment to an address without the bitcoin network then becoming aware of that address the payment is sent to.  As soon as that transaction is broadcast then each node becomes aware of the address if it hadn't known of it previously.
sr. member
Activity: 378
Merit: 250
Magic Staff
[snip]
FTFY
Yeah thanks. Your explanation in post #5 was helpful, I understand now. If you had a BTC tip address maybe I'd send a tip.
legendary
Activity: 3472
Merit: 4801
where does my Bitcoin client download the public keys of others?
Keep in mind that the bitcoin client doesn't know the public key of others until there is a transaction with a payment to from that address.   
FTFY
legendary
Activity: 2506
Merit: 1010
where does my Bitcoin client download the public keys of others?

Keep in mind that the bitcoin client doesn't know the public key [Edit: Bitcoin address] of others until there is a transaction with a payment to that address.  

For example, create an address using BitAddress:
 - http://www.BitAddress.org

That can be created offline (e.g., load the page, disconnect from the internet, then generate a new one).  That is a valid address but nobody else in the world knows about it.   You can give that address to anyone and they can send bitcoins to that address without the network ever having seen it before.

You could hit print and leave the computer disconnected for 50 years, and the funds would still be there waiting to be spent (by someone with that private key).
legendary
Activity: 2856
Merit: 1520
Bitcoin Legal Tender Countries: 2 of 206
This means until you spend from an address the public key is unknown.
if you spend to an address the public key of the receiver is known (e.g. paper wallet). it is unknown as long the address is not loaded.
DeathAndTaxes got this one correct.  Gyrsur, you are mistaken.

If you spend to an address, the Bitcoin Address of the receiver is known, the public key is not.

When you spend from an address, the public key is included in the input of the transaction.  It is only then that the public key becomes known.

you both are correct.

"A Bitcoin address is a 160-bit hash of the public portion of a public/private ECDSA keypair. Using some mathemagic, you can "sign" data with your private key and anyone who knows your public key can verify that the signature is valid. See the Wikipedia article for more information about how this works."

https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses
legendary
Activity: 3472
Merit: 4801
This means until you spend from an address the public key is unknown.
if you spend to an address the public key of the receiver is known (e.g. paper wallet). it is unknown as long the address is not loaded.
DeathAndTaxes got this one correct.  Gyrsur, you are mistaken.

If you spend to an address, the Bitcoin Address of the receiver is known, the public key is not.

When you spend from an address, the public key is included in the input of the transaction.  It is only then that the public key becomes known.
legendary
Activity: 2856
Merit: 1520
Bitcoin Legal Tender Countries: 2 of 206

This means until you spend from an address the public key is unknown.


if you spend to an address the public key of the receiver is known (e.g. paper wallet). it is unknown as long the address is not loaded.
donator
Activity: 1218
Merit: 1079
Gerald Davis
The public key is only needed to verify transactions. 
The public key is included in the transaction itself. 
This means until you spend from an address the public key is unknown.
sr. member
Activity: 476
Merit: 250
Bytecoin: 8VofSsbQvTd8YwAcxiCcxrqZ9MnGPjaAQm
Public addresses are stored in the blockchain.  These are essentially a hash of the public keys of others.  When 'coin is spent from an address, the public key of the address is included in the transaction and the transaction is signed with the private key.

I think I have that right but may be glossing over some details or may be inaccurate, in which case I hope someone will correct me.
sr. member
Activity: 378
Merit: 250
Magic Staff
From where does my Bitcoin client download the public keys of others? Are they stored in the blockchain or does the p2p network keep a separate list of public keys? Any help appreciated.

I checked the FAQ, and introduction to Bitcoin and "How Bitcoin Works". They don't go into the detail that my question seeks.

(by the way, the https://en.bitcoin.it page is outdated because it states that 50 BTC are created for each block. Nowadays since a long time a miner who finds a block only gets half=25 BTC for each block mined)
Jump to: