Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: fivemileshigh on December 20, 2011, 08:16:19 PM



Title: How certain is it that a wallet created offline is valid ?
Post by: fivemileshigh on December 20, 2011, 08:16:19 PM
This is definitely a noob question so please forgive my (possible) naivity. I don't think the title quite explains it so let me elaborate.

I will create an offline wallet with client 0.5.0. I will obtain one receive address and deposit to it over the next few years. Now, the wallet will have never been online, and this way I KNOW there is absolutely no chance of any trojan ever stealing the wallet.dat, until I take it online that is. The question is, how do I know it will work when it comes time to spend the btc on it? Does the wallet not need to go online to be "validated" by the network?

I know this is a remote possibility, but can't the wallet generate a receive address that is already in existence? Wouldn't that cause all kinds of problems? Or perhaps some future offline wallet will create a receive address identical to mine? Which wallet gets to control the btc attached to that address then?

(All this of course assumes 0.5.0 wallets will remain compatible with future wallets. If there's a change, I'll make a fresh wallet.)

many thanks in advance!


Title: Re: How certain is it that a wallet created offline is valid ?
Post by: Revalin on December 20, 2011, 08:35:38 PM
Does the wallet not need to go online to be "validated" by the network?

Nope.  Anyone can send coins to any address, even if it has never been seen on the network.  The address includes a checksum to prevent typos, but other than that there are no restrictions and no verification that anyone actually has the corresponding private key.

Quote
I know this is a remote possibility, but can't the wallet generate a receive address that is already in existence?

Yes, but the probability is absurdly low.  If every computer on Earth was dedicated to generating keys it would still be extremely unlikely to have any collisions before the sun explodes and destroys everything.

Quote
Which wallet gets to control the btc attached to that address then?

In that case (which will never happen), either person would be able to spend any coins sent to that address.

Quote
I will create an offline wallet with client 0.5.0.

I suggest you use a paper wallet generator.  It gives you much less data to store and the secret key import format will be much more forward-compatible than relying on a future version of the client to open an old wallet.dat.

https://en.bitcoin.it/wiki/Paper_wallet
https://www.bitaddress.org/


Title: Re: How certain is it that a wallet created offline is valid ?
Post by: bluefirecorp on December 21, 2011, 01:24:11 AM
Does the wallet not need to go online to be "validated" by the network?

Nope.  Anyone can send coins to any address, even if it has never been seen on the network.  The address includes a checksum to prevent typos, but other than that there are no restrictions and no verification that anyone actually has the corresponding private key.

Quote
I know this is a remote possibility, but can't the wallet generate a receive address that is already in existence?

Yes, but the probability is absurdly low.  If every computer on Earth was dedicated to generating keys it would still be extremely unlikely to have any collisions before the sun explodes and destroys everything.

Quote
Which wallet gets to control the btc attached to that address then?

In that case (which will never happen), either person would be able to spend any coins sent to that address.

Quote
I will create an offline wallet with client 0.5.0.

I suggest you use a paper wallet generator.  It gives you much less data to store and the secret key import format will be much more forward-compatible than relying on a future version of the client to open an old wallet.dat.

https://en.bitcoin.it/wiki/Paper_wallet
https://www.bitaddress.org/

Have you ever heard of the birthday paradox? Same thing applies with bitcoin addresses.


Title: Re: How certain is it that a wallet created offline is valid ?
Post by: Revalin on December 21, 2011, 01:44:54 AM
Yes, I understand the birthday paradox.  It doesn't apply to someone duplicating YOUR key, only their ability to generate the same key twice by accident, which doesn't give them anything useful.

Regardless, we have a 160-bit keyspace.  It's enormous, and birthday paradox collisions won't happen even with unlimited resources.  By comparison, brute forcing someone's key is much easier - about 2**80 operations.


Title: Re: How certain is it that a wallet created offline is valid ?
Post by: DeathAndTaxes on December 21, 2011, 02:40:36 AM
Have you ever heard of the birthday paradox? Same thing applies with bitcoin addresses.

No it doesn't.  The birthday paradox occurs because the size of the sample set is large relative to the universe.
For example 15 students is a lot relative to 30 potential birthdays.

However even if we had 1 billion users with 1 billion wallets EACH and each wallet used 1 billion private keys it would be less than 1 in 1/1,461,501,637,330,900,000,000th.  Of course we don't have a billion users and they don't have a billion wallets each and the average wallet hasn't used 1 billion keys so the odds of a collision are quadrillions of times less likely. 

Birthday paradox only applies in a meaningfulway if the size of sample set is large enough to be within a couple magntidudes of the universe.