Bitcoin Forum
May 11, 2024, 07:56:05 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: From where does my Bitcoin client download the public keys of others?  (Read 1166 times)
tjohej (OP)
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250


Magic Staff


View Profile
February 13, 2013, 05:26:00 PM
 #1

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)

There may still be hope for the 1st decentralized cryptocurrency which is Bitcoin. How to approach different subjects is key to progress.
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715457365
Hero Member
*
Offline Offline

Posts: 1715457365

View Profile Personal Message (Offline)

Ignore
1715457365
Reply with quote  #2

1715457365
Report to moderator
Walter Rothbard
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


Bytecoin: 8VofSsbQvTd8YwAcxiCcxrqZ9MnGPjaAQm


View Profile WWW
February 13, 2013, 05:34:08 PM
 #2

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.

DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
February 13, 2013, 05:52:06 PM
 #3

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.
Gyrsur
Legendary
*
Offline Offline

Activity: 2856
Merit: 1520


Bitcoin Legal Tender Countries: 2 of 206


View Profile WWW
February 13, 2013, 06:02:13 PM
 #4


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.

DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
February 13, 2013, 07:30:14 PM
 #5

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.
Gyrsur
Legendary
*
Offline Offline

Activity: 2856
Merit: 1520


Bitcoin Legal Tender Countries: 2 of 206


View Profile WWW
February 13, 2013, 09:15:21 PM
 #6

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

Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
February 13, 2013, 10:52:06 PM
Last edit: February 15, 2013, 02:57:51 AM by Stephen Gornick
 #7

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).

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
February 13, 2013, 10:54:43 PM
 #8

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
tjohej (OP)
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250


Magic Staff


View Profile
February 14, 2013, 09:30:05 AM
 #9

[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.

There may still be hope for the 1st decentralized cryptocurrency which is Bitcoin. How to approach different subjects is key to progress.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
February 15, 2013, 02:56:56 AM
 #10

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.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
February 15, 2013, 06:25:17 AM
 #11

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.
Walter Rothbard
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


Bytecoin: 8VofSsbQvTd8YwAcxiCcxrqZ9MnGPjaAQm


View Profile WWW
February 15, 2013, 03:33:42 PM
 #12

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.

DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
February 15, 2013, 07:19:10 PM
 #13

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.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
February 15, 2013, 10:20:49 PM
 #14

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.)

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


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!