Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: bitlotto on May 10, 2011, 01:41:24 AM



Title: Sending to unused/unkown addresses
Post by: bitlotto on May 10, 2011, 01:41:24 AM
I'm just trying to figure out something...

I'm wondering what would happen:
-I create a new address without being online
-the address doesn't exist on the network yet

Could someone sent to it?
And if they can sent to it, could another person who knew what that address was, alter their client to manually create that address, connect to the internet, and claim it as theirs?

IF that is all possible would connecting to the network but not send/receive prevent this? Or is the address really up for grabs until the first coin is sent?


Title: Re: Sending to unused/unkown addresses
Post by: BitLex on May 10, 2011, 01:55:29 AM
Quote
Could someone sent to it?
yes
Quote
could another person who knew what that address was, alter their client to manually create that address, connect to the internet, and claim it as theirs?
no, they can not magically create a matching private key for the not-yet-known-to-the-network public key,
if they could do that, they could claim ANY addresses coins, by just generating matching private keys.

at least that's my understanding of how it works, please correct me if i'm wrong


Title: Re: Sending to unused/unkown addresses
Post by: bitlotto on May 10, 2011, 02:01:57 AM
Quote
Could someone sent to it?
yes
Quote
could another person who knew what that address was, alter their client to manually create that address, connect to the internet, and claim it as theirs?
no, they can not magically create a matching private key for the not-yet-known-to-the-network public key,
if they could do that, they could claim ANY addresses coins, by just generating matching private keys.

at least that's my understanding of how it works, please correct me if i'm wrong

I know, but as far as the network is concerned since it never was online who's to say what the right key is?


Title: Re: Sending to unused/unkown addresses
Post by: TiagoTiago on May 10, 2011, 02:16:08 AM
And as a matter of fact, if someone sends money to a currently unowned address and then you have the hugeonastic luck (i think, it is somthing like less than once in the estimated whole lifetime of the universe) of creating a random new address that matches the address that person sent money to, you will be the proud owner of the once lost amount.


Title: Re: Sending to unused/unkown addresses
Post by: BitLex on May 10, 2011, 02:42:51 AM
if i create a new address now, as far as the network is concerned since it never was online who's to say what the right key is?
tell you who, my wallet (or the private key within).  ;)

it's not that your node broadcasts every new address you create to the network, why should it?
there's no need to inform the network about new addresses, your node only needs to check, if that address has ever received some coins
and if you've got the (private) key to those coins, you can spend them.

PS: if one could claim unused addresses, one could also claim all lost coins that he/she knows the public key of, that person could get rich without actually stealing anything from anyone.


Title: Re: Sending to unused/unkown addresses
Post by: bitlotto on May 10, 2011, 04:39:28 AM
Is the address somehow derived from the public/private key? Or is it independent?
Is it possible to manually set an address?


Title: Re: Sending to unused/unkown addresses
Post by: theymos on May 10, 2011, 04:55:47 AM
Is the address somehow derived from the public/private key? Or is it independent?

It's the hash of the public key, plus some other stuff. You can't create arbitrary addresses.


Title: Re: Sending to unused/unkown addresses
Post by: ribuck on May 10, 2011, 10:30:42 AM
... as far as the network is concerned since it never was online who's to say what the right key is?
When a payment is sent to an address, the network doesn't care whose address it is. So it doesn't matter if that Bitcoin node has not been online since the address was created. Later, when the owner of that receiving address spends the coins, the network confirms that the spender used the correct private key corresponding to that receiving address. No-one else has that private key (unless your wallet.dat file has been stolen), nor can a private key be generated from a public key.


Title: Re: Sending to unused/unkown addresses
Post by: cypherdoc on May 10, 2011, 06:32:08 PM
... as far as the network is concerned since it never was online who's to say what the right key is?
When a payment is sent to an address, the network doesn't care whose address it is. So it doesn't matter if that Bitcoin node has not been online since the address was created. Later, when the owner of that receiving address spends the coins, the network confirms that the spender used the correct private key corresponding to that receiving address. No-one else has that private key (unless your wallet.dat file has been stolen), nor can a private key be generated from a public key.

if i have a million USD worth of BTC, someone mentioned that the ideal way to save your btc is to setup a new client on a 2nd computer w/o connecting to the network,  save and encrypt the new receiving address generated, stick that address in a vault, wait 20 yrs until you retire, boot up the 2nd computer with the never used client and then download your fortune of btc.  sounds like the best way to store and protect your btc to me.  i've already done this... ;)


Title: Re: Sending to unused/unkown addresses
Post by: ribuck on May 10, 2011, 06:43:46 PM
...save and encrypt the new receiving address generated...
The "receiving address" is public. The thing you must save and encrypt is the wallet.dat file.


Title: Re: Sending to unused/unkown addresses
Post by: cypherdoc on May 10, 2011, 06:46:36 PM
...save and encrypt the new receiving address generated...
The "receiving address" is public. The thing you must save and encrypt is the wallet.dat file.

thanks ribuck, i got that wrong.  so if i replace the words "address" with the words "wallet.dat"  i would be right?

anyone know of someone saving this way?