Bitcoin Forum

Other => Beginners & Help => Topic started by: CrapMan on April 04, 2014, 02:01:56 PM



Title: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 04, 2014, 02:01:56 PM
Hello all,

I am very new to bitcoin, please try to consider that when you answer my question, i am not a tech guy, i just double click, open and close but not really bad.

I read and watched videos about bitcoins, I thought I got it, so I purchased some, then I decided to move them to a wallet, I downloaded MultiBit (not sure if it is a good one or not), anyway, there I got lost!
I can't understand all these file extensions.
once i open the MultiBit, I did:  File > new wallet> I chose the destination of where the file go > I named it > save and end of story!

Now I want to see how the wallet address looks like:
the wallet was already in the client, however let's say I closed it, so I did:    File > open wallet > chose the file desination > and opened it
Then the only way to see the wallet address (for me as a non tech guy) is to go to "request" tab, that's where I see the wallet address, I copied it to clip and then pasted on a Microsoft word and saved it, it looked like 30 to 40 figures that started with number 1

Now I wanted to see the how the private key looks like, there is no way to see it, so I decided to export private key to the desktop, so I did:  Tools > export private key > chose the file destination and saved it.
Then I opened the file with Microsoft word (I am not sure which extension opens it), anyway on Microsoft word it looked divided on 3 lines: one long figures line, then 3 figures line and then a little over half line of figures

Now I assume that is the key?


Questions are
1- am I doing things above right?

2- What type of wallet am I using? is it a desktop wallet? that i have to back it always?

3- the QR code in that wallet, I see no way extract out and print it on paper!

4- let's give an example here: if I have the wallet address written down, and I have the private key written down. Then somehow for some reasons my computer crash and is done and I lost my wallet, then I buy a new computer. Can I get a new wallet, then type in the private key and get my coins back in the new wallet?
I know i look stupid, I am sorry, but if I still can get back my coins as long as I have the private key in the example above, can I just type it? or I always have to export a file?

Please be patient with me, I am very noob and I am sorry.


I thank you a lot in advance for helping me and I appreciate every input as long as it is easy to understand and to the point.




Title: Re: I am lost in bitcoin wallet and private key
Post by: hilariousandco on April 04, 2014, 02:37:54 PM
Hello all,

I am very new to bitcoin, please try to consider that when you answer my question, i am not a tech guy, i just double click, open and close but not really bad.

I read and watched videos about bitcoins, I thought I got it, so I purchased some, then I decided to move them to a wallet, I downloaded MultiBit (not sure if it is a good one or not), anyway, there I got lost!
I can't understand all these file extensions.
once i open the MultiBit, I did:  File > new wallet> I chose the destination of where the file go > I named it > save and end of story!

Now I want to see how the wallet address looks like:
the wallet was already in the client, however let's say I closed it, so I did:    File > open wallet > chose the file desination > and opened it
Then the only way to see the wallet address (for me as a non tech guy) is to go to "request" tab, that's where I see the wallet address, I copied it to clip and then pasted on a Microsoft word and saved it, it looked like 30 to 40 figures that started with number 1

Now I wanted to see the how the private key looks like, there is no way to see it, so I decided to export private key to the desktop, so I did:  Tools > export private key > chose the file destination and saved it.
Then I opened the file with Microsoft word (I am not sure which extension opens it), anyway on Microsoft word it looked divided on 3 lines: one long figures line, then 3 figures line and then a little over half line of figures

Now I assume that is the key?


Questions are
1- am I doing things above right?

2- What type of wallet am I using? is it a desktop wallet? that i have to back it always?

3- the QR code in that wallet, I see no way extract out and print it on paper!

4- let's give an example here: if I have the wallet address written down, and I have the private key written down. Then somehow for some reasons my computer crash and is done and I lost my wallet, then I buy a new computer. Can I get a new wallet, then type in the private key and get my coins back in the new wallet?
I know i look stupid, I am sorry, but if I still can get back my coins as long as I have the private key in the example above, can I just type it? or I always have to export a file?

Please be patient with me, I am very noob and I am sorry.


I thank you a lot in advance for helping me and I appreciate every input as long as it is easy to understand and to the point.




2) You're using a desktop wallet and you should always have several back ups of the wallet.dat or private keys. Make sure your wallet is password protected too.

4). Yes. You don't need the wallet address, just the private keys or the wallet.dat file and then you can get your balance back.

I'd suggest starting with an online Blockchain.info wallet first until you know what you're doing.


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 04, 2014, 03:41:20 PM
thank you very much for your reply.

I followed your advice and opened a new wallet on blockchain.info, I moved the coins from the exchange website to the new blockchain wallet, I do have an identifier which there was a convenient way to back it up to my email, i was able to find my address easily, I just got my coins and things look good.

here are couple questions:

1- what type of files I need to back up from there and how?

2- how do I get my private key and store it somewhere else just in case?


Thanks a lot in advance.


Title: Re: I am lost in bitcoin wallet and private key
Post by: hilariousandco on April 04, 2014, 03:50:08 PM
thank you very much for your reply.

I followed your advice and opened a new wallet on blockchain.info, I moved the coins from the exchange website to the new blockchain wallet, I do have an identifier which there was a convenient way to back it up to my email, i was able to find my address easily, I just got my coins and things look good.

here are couple questions:

1- what type of files I need to back up from there and how?

2- how do I get my private key and store it somewhere else just in case?


Thanks a lot in advance.


You just need to back up the wallet.dat file really. Just make sure you have it safe on a usb and/or CD-r etc.

Make sure you set up 2 factor auth and a second password on your BC account. Then you'll be pretty safe.


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 04, 2014, 05:05:34 PM
Dear Hilariousandco,

Now you made me happy, I kinda understand what's going and what to do and how to back it up without even being a tech guy, I want thank you very much very very very much for your help.

I made an email back up, a also backed it up in my desktop, I only need to back it up on usb and I will be good to go.


I don't know how to thank you, but you saved me a lot of trouble and helped me so much.


Thank you again.


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 04, 2014, 06:57:36 PM
One more thing:

It seems to me that the private key is not required to finish a transaction, once you log on to the wallet then put in the (merchant) wallet address then you can simply make a transaction, am I correct?

and if the above is true, then the only need for the private key is to recover your wallet in case you lost it, based on the idea that the wallet address is generated from the private key its self, am I correct?

and if both of the above is correct, then no one can steal my wallet unless:
Either 1- someone get my log on info and log onto my wallet and transfer my coins to his/her address.
Or 2- someone steal my private key, now in this case if they steal my wallet private key, they can't actually recover my wallet, but they can only use the private key to move the money to another wallet address. which means that the process is not actually "recover" the original wallet rather than using the private key to transfer the money to another wallet with different address, which also means this is a faster way rob someone since all someone needs is the private key (no username or password), am I correct?


Again sorry, but I am just trying to learn all this in simple words.


Thank you again for all the help.


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 04, 2014, 08:15:30 PM
or may be I am wrong,
may be the private key can generate the same wallet again even if it on different eWallet provider?

I am little confused.


Title: Re: I am lost in bitcoin wallet and private key
Post by: hilariousandco on April 04, 2014, 08:18:52 PM
or may be I am wrong,
may be the private key can generate the same wallet again even if it on different eWallet provider?

I am little confused.


Yes, you can upload the wallet.dat into any other client and the balance will be there.


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 04, 2014, 08:37:50 PM
or may be I am wrong,
may be the private key can generate the same wallet again even if it on different eWallet provider?

I am little confused.


Yes, you can upload the wallet.dat into any other client and the balance will be there.


I do understand that, the question is:

let's say I opened an account with "John company" my original wallet
address was: 12345
private key  : ABCDE
bitcoin balance is: 10 coins

now I lost the wallet with address: 12345
but I still have the private key that is: ABCDE


I moved to a different company "Sam corp" and made a new account.
I uploaded "imported" my private key "ABCDE" to the account.
I do understand I will get back the balance: 10 coins
Now the questions is: the wallet address on "Sam corp" will it also be: 12345 ?? or I will get a new wallet address "98765" with new private Key "GHIJK" only thing it will have the original balance "10 Coins" ??
and the old private key "ABCDE" will be not needed anymore?



In other words, will the private key help recover the balance only? or both the wallet address and the balance?






Title: Re: I am lost in bitcoin wallet and private key
Post by: fatguyyyyy on April 05, 2014, 04:01:44 AM
You need the private key or you wont be able to access the wallet. The wallet dat file should back up the balance at the same time loading


Title: Re: I am lost in bitcoin wallet and private key
Post by: hilariousandco on April 05, 2014, 08:46:24 AM
You need the private key or you wont be able to access the wallet. The wallet dat file should back up the balance at the same time loading

Your private keys are in the wallet. You need your password or you won't be able to access the wallet.


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 05, 2014, 03:30:08 PM
You need the private key or you wont be able to access the wallet. The wallet dat file should back up the balance at the same time loading

Your private keys are in the wallet. You need your password or you won't be able to access the wallet.

I promise, I do understand that, I got that part.

I will give another example to explain my question better, please follow the example before answering:
1- Let's say I created an online wallet with "blockchain.info" and I have a balance of 10 coins, my wallet ID (or address) was : ABCDE
2- I got a paper wallet that has my private key or the QR or whatever I need to back up my 10 coins or I have a wallet.dat back up or whatever.
3- for some reasons, "blockchain.info" domain is gone, God bless (let's say the owner died) and he didn't renew his domain, or his host company filed bankruptcy and they lost all the domains before moving them or or or, anyway the domain is gone and with it the website is gone and with it all the online wallets are gone!!!, just an example please bear with me.
4- then I decided to go to coinbase.com and open a new wallet there, I got the new wallet and the new address is : JKJKJK
5- Now I decided to import my private key that was one wallet.dat that I previously backed from blockchain.info before they go down
6- when I import the private key (that I got from blockchain.info before they go down) into the new wallet on basecoin.com will it: a- deposit 10 coins into the new wallet on basecoin.com WITH THE NEW ADDRESS OF: JKJKJK ????  or b- recover the whole old new wallet with the address : ABCDE  and deposit 10 coins in it???


Again, simply the question is: will the private key recover : a- balance only? or  b- balance and address both?




Title: Re: I am lost in bitcoin wallet and private key
Post by: WetSeals on April 05, 2014, 03:32:20 PM
DO NOT USE MULTIBIT UNTIL THE DEV FIXES A KNOWN BUG IN THE NEW UPDATE....


Occasionally, multibit creates a new change address when you send bitcoins...not a big deal, right?

WRONG, because multibit occasionally for some reason, DOES NOT LET YOU EXPORT THE PRIVATE KEY TO THE NEW CHANGE ADDRESS.  IT ALSO DOESNT SAVE IT FOR SOME REASON.  SO YOU CAN SEE YOUR BALANCE, BUT CANNOT SEND IT, OR EXPORT THE PRIV KEY AND IMPORT IT ANYWHERE.

I LOST ABOUT .5 BTC, AND THE DEV JUST IGNORED ME.  HAD MULTIPLE PEOPLE LOOK AT THIS.....ITS TRUE.


Title: Re: I am lost in bitcoin wallet and private key
Post by: 5ick3uffalo on April 05, 2014, 04:43:55 PM
DO NOT USE MULTIBIT UNTIL THE DEV FIXES A KNOWN BUG IN THE NEW UPDATE....

Thanks for that Info.

IŽll stick to orginal QT-Wallet, needs lot of time for sync but better safe than sorry!


Title: Re: I am lost in bitcoin wallet and private key
Post by: hilariousandco on April 05, 2014, 04:53:42 PM
DO NOT USE MULTIBIT UNTIL THE DEV FIXES A KNOWN BUG IN THE NEW UPDATE....

Thanks for that Info.

IŽll stick to orginal QT-Wallet, needs lot of time for sync but better safe than sorry!

Use another like Electrum instead.


Title: Re: I am lost in bitcoin wallet and private key
Post by: 5ick3uffalo on April 05, 2014, 04:55:32 PM

I made an email back up, a also backed it up in my desktop, I only need to back it up on usb and I will be good to go.


Make sure you encrypt the Backup of your wallet.dat file.

(I use 7zip for that)

http://i61.tinypic.com/2a0klt3.jpg


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 05, 2014, 04:59:17 PM
guys, you are taking the the discussion away from the original topic, which is alright, but I still need help answering the question.

when you lose your wallet, does your private key recover 1- balance only?  or 2- both balance and wallet address?

I am trying to find out what happens to the address of the lost wallet.



Title: Re: I am lost in bitcoin wallet and private key
Post by: WetSeals on April 05, 2014, 05:13:00 PM
If you have the private key, it restores the balance and the address. 

If you do not have the private key, there is no way for you to recover either, unless you randomly generate the same address again, which is like hitting the powerball ten thousands times in a row.


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 05, 2014, 05:54:43 PM
If you have the private key, it restores the balance and the address. 

If you do not have the private key, there is no way for you to recover either, unless you randomly generate the same address again, which is like hitting the powerball ten thousands times in a row.

Thank you very much for the answer, however will I recover the address too even if I take the private key to another host (a different wallet website then the original one)?


Title: Re: I am lost in bitcoin wallet and private key
Post by: WetSeals on April 05, 2014, 05:58:27 PM
If you have the private key, it restores the balance and the address. 

If you do not have the private key, there is no way for you to recover either, unless you randomly generate the same address again, which is like hitting the powerball ten thousands times in a row.

Thank you very much for the answer, however will I recover the address too even if I take the private key to another host (a different wallet website then the original one)?


yes, the private key corresponds to the address.  They are forever linked. 


Title: Re: I am lost in bitcoin wallet and private key
Post by: Peter882 on April 05, 2014, 06:31:10 PM
If you have the private key, it restores the balance and the address. 

If you do not have the private key, there is no way for you to recover either, unless you randomly generate the same address again, which is like hitting the powerball ten thousands times in a row.

Thank you very much for the answer, however will I recover the address too even if I take the private key to another host (a different wallet website then the original one)?


yes, the private key corresponds to the address.  They are forever linked. 

Exactly.
Whenever you have the private keys, you can get back your addresses, and the bitcoin on the addresses.
If you lose your private keys, you lose your bitcoin forever.
If someone obtains your private keys, he/she can spend it right away.


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 05, 2014, 06:44:30 PM
If you have the private key, it restores the balance and the address. 

If you do not have the private key, there is no way for you to recover either, unless you randomly generate the same address again, which is like hitting the powerball ten thousands times in a row.

Thank you very much for the answer, however will I recover the address too even if I take the private key to another host (a different wallet website then the original one)?


yes, the private key corresponds to the address.  They are forever linked. 

ok, now I did read at many different places that this random generation of the address from the private key is very very hard to be figured by anyone.
what I read is: the address can be generated from the private key, however the opposite is invalid, and I understand that too, but if this is true then the private key should always generate a different address based on this theory.
Cause if the private key will always generate the same address, and this is made by a machine (I mean coding), which means the machine will generate the address in a math way from the private key. Then after looking at so many private keys and addresses then someone eventually will be able to predict the private key from the address.

Unless the machine will randomly chose an address for the private key (not based on math) like for example a human will just brain pick a random address for his key, but in this case there is a big risk of generating the same address for 2 wallets. Kind of we all have different email address but some of us might have the same password (cause this is something we just brain make).

I do understand I read everywhere that this is impossible but I am just guessing based on some simple math.

And to avoid any 2 people from having the same address, then all the bitcoin wallet website should run off the same machine (which in case I believe is the bitcoin open source or mother unit or whatever) to prevent the double address from happening.

All in all, if the private key generate the address based on math (regardless how complicated) eventually someone will figure out a way to generate the private key from the address. UNLESS Like I said if the private key generates the address completely random then there is the chance to generate the same address twice or more in which if all wallet websites run of the same machine, then the address will be checked (to make sure it is not doubled) and then the key will keep trying randomly until it generate a unique address, however in the later case there is the theory of the key will always generate a different address.

Now that you said the key is link to that address forever, then it will bring me to the only option left:
1- when you create a wallet, the machine will create a completely random private key that is never used before, and that by checking the bitcoin mother unit that is used by every single wallet website to make sure it is not doubled.
2- then the machine will also randomly pick an address for the wallet that is never used before (same thing above by checking the mother coding unit for bitcoin or whatever it is that is used by every wallet website)
3- the machine will link those (the address and private key) together forever.
and that can explain why if you always have the private key then you always have the address with it on the same paper or file and can always be both recovered (balance and address).

But one question will be left, if the wallet.dat file will only have the private key, and then private key will generate the address AGAIN, then it means it is based on math.Otherwise the private key will generate a new unique address (never used by anyone BUT new address, NOT same address).

IF the answer is still that wallet.dat file will carry ONLY private key and that when you export the key into a wallet then it will ALWAYS generate the SAME address, then the way for that is: the private key and the address are both LINKED on the bitcoin MOTHER UNIT MACHINE, which means if it is ever hacked then all the 12 million coins will be gone!


 I understand the guy who came up with all this is very smart, but I am just an idiot who is trying to understand a little so please be patient with me.

 


Title: Re: I am lost in bitcoin wallet and private key
Post by: hilariousandco on April 05, 2014, 06:52:19 PM
There is no 'mother unit machine'; it's a decentralised network.


Title: Re: I am lost in bitcoin wallet and private key
Post by: Peter882 on April 05, 2014, 06:55:13 PM
And to avoid any 2 people from having the same address, then all the bitcoin wallet website should run off the same machine (which in case I believe is the bitcoin open source or mother unit or whatever) to prevent the double address from happening.

Such "machine" does not exist. It is theoretically possible that different people can generate the private keys corresponding to the same address. But, the probability of that is very very very small.


https://en.bitcoin.it/wiki/Weaknesses#Generating_tons_of_addresses
Quote
Generating tons of addresses

Generating an address doesn't touch the network at all. You'd only be wasting your CPU resources and disk space.

Also, a collision is highly unlikely.

Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power) Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[1]


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 05, 2014, 07:12:14 PM
There is no 'mother unit machine'; it's a decentralised network.
And to avoid any 2 people from having the same address, then all the bitcoin wallet website should run off the same machine (which in case I believe is the bitcoin open source or mother unit or whatever) to prevent the double address from happening.

Such "machine" does not exist. It is theoretically possible that different people can generate the private keys corresponding to the same address. But, the probability of that is very very very small.


https://en.bitcoin.it/wiki/Weaknesses#Generating_tons_of_addresses
Quote
Generating tons of addresses

Generating an address doesn't touch the network at all. You'd only be wasting your CPU resources and disk space.

Also, a collision is highly unlikely.

Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power) Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[1]


Wow, your answers guys now explained a lot for me. I read that piece on that website the very first day I started searching about bitcoin but I didn't understand a thing from it at the time. Really thank you very much.

However that leave a question in my mind: if it just happened that 2 people got the same address. someone sent money to that address, who will get it? will it be figured out by miners and corrected? or what?

Example: Bill Gates and me got the same wallet address, some company paid Bill Gates Bitcoins worth 10 billions, who will get the coins, me or Bill Gates?


Title: Re: I am lost in bitcoin wallet and private key
Post by: Peter882 on April 05, 2014, 07:21:14 PM
However that leave a question in my mind: if it just happened that 2 people got the same address. someone sent money to that address, who will get it? will it be figured out by miners and corrected? or what?

Example: Bill Gates and me got the same wallet address, some company paid Bill Gates Bitcoins worth 10 billions, who will get the coins, me or Bill Gates?


If someone obtains your private keys, he/she can spend it right away.
As I mentioned in an earlier reply, whoever gets the private key, he/she can spend it.

Indeed the bitcoin is not in your wallet even if you see a positive balance on your wallet software.
That's why you just need to backup your wallet file (a collection of private keys) and all your funds sent to the address after the backup can still be restored later.

Say, if there is some bitcoin on an address, anyone having the private key associated with that address can create and sign a transaction to spend the bitcoin.
Of course, the chance of 2 people having the same address is ridiculously low, so it is not really a problem (unless you are using a bad random number generator).


Title: Re: I am lost in bitcoin wallet and private key
Post by: hilariousandco on April 05, 2014, 07:22:41 PM
I think you're trying to read too much into the workings of Bitcoin and confusing yourself.  It's good to have an understanding of the protocol and how it works, but the process is quite simple once you actually just start using it, and whilst it was created by a genius, you certainly don't need to be one to use it  :D.


Title: Re: I am lost in bitcoin wallet and private key
Post by: Peter882 on April 05, 2014, 07:26:09 PM
I think you're trying to read too much into the workings of Bitcoin and confusing yourself.  It's good to have an understanding of the protocol and how it works, but the process is quite simple once you actually just start using it, and whilst it was created by a genius, you certainly don't need to be one to use it  :D.

You are absolutely right.
That being said, I am happy to see someone trying to understand how bitcoin works. :D


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 05, 2014, 07:32:37 PM
However that leave a question in my mind: if it just happened that 2 people got the same address. someone sent money to that address, who will get it? will it be figured out by miners and corrected? or what?

Example: Bill Gates and me got the same wallet address, some company paid Bill Gates Bitcoins worth 10 billions, who will get the coins, me or Bill Gates?


If someone obtains your private keys, he/she can spend it right away.
As I mentioned in an earlier reply, whoever gets the private key, he/she can spend it.

Indeed the bitcoin is not in your wallet even if you see a positive balance on your wallet software.
That's why you just need to backup your wallet file (a collection of private keys) and all your funds sent to the address after the backup can still be restored later.

Say, if there is some bitcoin on an address, anyone having the private key associated with that address can create and sign a transaction to spend the bitcoin.
Of course, the chance of 2 people having the same address is ridiculously low, so it is not really a problem (unless you are using a bad random number generator).


I am little confused here.
Even if it is a very ridiculously low percent for this to happen, but let's say it happened,
1- John and Sarah got the same address.
2- I hired Sarah and want to pay her with bitcoin, she sent me her address
3- I sent the money to the address
What is going to happen is: the bitcoins will get confused, cause they are going to 2 different place with the same address, which way the bitcoin will chose? John? or Sarah?
I don't think it has anything to do with the private key, whoever will get the bitcoin to the wallet will be able to spend it.
I mean the bitcoin I sent went to Sarah's wallet the she gets to spend it, but if the bitcoin chose to go to John then John will get to spend it.
Which way the bitcoin will go?



Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 05, 2014, 07:41:45 PM
I think you're trying to read too much into the workings of Bitcoin and confusing yourself.  It's good to have an understanding of the protocol and how it works, but the process is quite simple once you actually just start using it, and whilst it was created by a genius, you certainly don't need to be one to use it  :D.

You are absolutely right, I am just trying to do some homework.
It is really fascinating how this can work, and it is even more amazing how people loved it from all over the work and put so much money in it and take a huge risk for something that represent only numbers on a screen.
If this really works the way it is supposed to be then the potentials are huge and I would rather be few years from now some who understand how it works than being someone who is just left behind by the rest of the world. that's all.

I really appreciate your help so much, Peter's help too, and everyone else, I am learning a lot.


Title: Re: I am lost in bitcoin wallet and private key
Post by: Peter882 on April 05, 2014, 07:43:40 PM
I am little confused here.
Even if it is a very ridiculously low percent for this to happen, but let's say it happened,
1- John and Sarah got the same address.
2- I hired Sarah and want to pay her with bitcoin, she sent me her address
3- I sent the money to the address
What is going to happen is: the bitcoins will get confused, cause they are going to 2 different place with the same address, which way the bitcoin will chose? John? or Sarah?
I don't think it has anything to do with the private key, whoever will get the bitcoin to the wallet will be able to spend it.
I mean the bitcoin I sent went to Sarah's wallet the she gets to spend it, but if the bitcoin chose to go to John then John will get to spend it.
Which way the bitcoin will go?

As I said, the bitcoin is not in your wallet, it is on the blockchain (the public ledger).

When John runs his wallet software and after syncing, he will get a message of "receiving a bitcoin payment".
When Sarah runs her wallet software and after syncing, she will get a message of "receiving a bitcoin payment".

When Sarah used that piece of bitcoin for a transaction, John will suddenly find that "his bitcoin" has been used in a transaction he didn't initiated. He will be panic and believe his computer has been hacked. :)



Title: Re: I am lost in bitcoin wallet and private key
Post by: hilariousandco on April 05, 2014, 07:45:30 PM
I think you're trying to read too much into the workings of Bitcoin and confusing yourself.  It's good to have an understanding of the protocol and how it works, but the process is quite simple once you actually just start using it, and whilst it was created by a genius, you certainly don't need to be one to use it  :D.

You are absolutely right, I am just trying to do some homework.
It is really fascinating how this can work, and it is even more amazing how people loved it from all over the work and put so much money in it and take a huge risk for something that represent only numbers on a screen.
If this really works the way it is supposed to be then the potentials are huge and I would rather be few years from now some who understand how it works than being someone who is just left behind by the rest of the world. that's all.

I really appreciate your help so much, Peter's help too, and everyone else, I am learning a lot.

Fiat money is only really 'numbers on a screen'. I think you'd be wise at getting in and trying to understand it now because you might kick yourself in the future. Bitcoin really does have the potential to be a revolutionary concept.


Title: Re: I am lost in bitcoin wallet and private key
Post by: Peter882 on April 05, 2014, 07:46:18 PM
An overly simplified analogy would be:

I have a mailbox out of my house. I give you my address so that you can send me a postcard.
When you send me the postcard, it will arrive at my mailbox.

As I have the key, I can open the mailbox to take the postcard.
My mother, my father and my sister also have a key, so they can also open the mailbox to take the postcard.

So, my sister can take the postcard and throw it away because she hates you, and I cannot use it (in this case read it) myself.

But as everything in bitcoin is public and so even if John received your payment and spent the bitcoin soon after, Sarah will still notice a strange payment in and out.


Title: Re: I am lost in bitcoin wallet and private key
Post by: Rampton on April 05, 2014, 07:51:14 PM

What is going to happen is: the bitcoins will get confused, cause they are going to 2 different place with the same address, which way the bitcoin will chose? John? or Sarah?
I don't think it has anything to do with the private key, whoever will get the bitcoin to the wallet will be able to spend it.
I mean the bitcoin I sent went to Sarah's wallet the she gets to spend it, but if the bitcoin chose to go to John then John will get to spend it.
Which way the bitcoin will go?



That would be decided on by the miners. Once an address is in the network a new one will not be created the same.


Title: Re: I am lost in bitcoin wallet and private key
Post by: Peter882 on April 05, 2014, 07:53:41 PM

What is going to happen is: the bitcoins will get confused, cause they are going to 2 different place with the same address, which way the bitcoin will chose? John? or Sarah?
I don't think it has anything to do with the private key, whoever will get the bitcoin to the wallet will be able to spend it.
I mean the bitcoin I sent went to Sarah's wallet the she gets to spend it, but if the bitcoin chose to go to John then John will get to spend it.
Which way the bitcoin will go?



That would be decided on by the miners. Once an address is in the network a new one will not be created the same.

Not really.
You never "announce" your address to the network, and there is no one doing the checking at all.
In fact, there are many ways you can generate your address offline easily.


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 05, 2014, 07:54:25 PM
I am little confused here.
Even if it is a very ridiculously low percent for this to happen, but let's say it happened,
1- John and Sarah got the same address.
2- I hired Sarah and want to pay her with bitcoin, she sent me her address
3- I sent the money to the address
What is going to happen is: the bitcoins will get confused, cause they are going to 2 different place with the same address, which way the bitcoin will chose? John? or Sarah?
I don't think it has anything to do with the private key, whoever will get the bitcoin to the wallet will be able to spend it.
I mean the bitcoin I sent went to Sarah's wallet the she gets to spend it, but if the bitcoin chose to go to John then John will get to spend it.
Which way the bitcoin will go?

As I said, the bitcoin is not in your wallet, it is on the blockchain (the public ledger).

When John runs his wallet software and after syncing, he will get a message of "receiving a bitcoin payment".
When Sarah runs her wallet software and after syncing, she will get a message of "receiving a bitcoin payment".

When Sarah used that piece of bitcoin for a transaction, John will suddenly find that "his bitcoin" has been used in a transaction he didn't initiated. He will be panic and believe his computer has been hacked. :)



Ok I got that part, both of them will get the payment,
BUT both of them are able to spend it too. REASON: I send the bitcoin to an address, has nothing to do with private key.
John Address is : AAAAA
Sarah Address is: AAAAA

so both open their wallets, they see 10 bitcoins I sent

Now John will spend 3 bitcoins.
Then it will show both of them have 7 Bitcoins left.
Then Sarah will spend 5 bitcoins.
Then it will show both of them have 2 bitcoin left.

Even if they have different private keys, since I sent it to an address and not a private key, then the transaction will show on both and both are able to spend it, just a matter of who spend it faster!


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 05, 2014, 08:02:08 PM

What is going to happen is: the bitcoins will get confused, cause they are going to 2 different place with the same address, which way the bitcoin will chose? John? or Sarah?
I don't think it has anything to do with the private key, whoever will get the bitcoin to the wallet will be able to spend it.
I mean the bitcoin I sent went to Sarah's wallet the she gets to spend it, but if the bitcoin chose to go to John then John will get to spend it.
Which way the bitcoin will go?



That would be decided on by the miners. Once an address is in the network a new one will not be created the same.

Not really.
You never "announce" your address to the network, and there is no one doing the checking at all.
In fact, there are many ways you can generate your address offline easily.


Ops! now all someone has to do is: download the wallet Client, and make millions of wallets and he might get lucky, specially with all the the huge exchanges and transactions around the world right now and people moving Bitcoins in and out creating different wallets ...etc


Title: Re: I am lost in bitcoin wallet and private key
Post by: Peter882 on April 05, 2014, 08:04:35 PM
Ok I got that part, both of them will get the payment,
BUT both of them are able to spend it too. REASON: I send the bitcoin to an address, has nothing to do with private key.
John Address is : AAAAA
Sarah Address is: AAAAA

so both open their wallets, they see 10 bitcoins I sent

Even if they have different private keys, since I sent it to an address and not a private key, then the transaction will show on both and both are able to spend it, just a matter of who spend it faster!


This part is correct.

Now John will spend 3 bitcoins.
Then it will show both of them have 7 Bitcoins left.
Then Sarah will spend 5 bitcoins.
Then it will show both of them have 2 bitcoin left.

Just a side note, when bitcoin are spent, you can't use a transaction output partially.
So, if John want to send CrapMan 3 BTC with a piece of "10 BTC" on his address, he need to create a transaction with that 10 btc as input, a output of "3 btc" to address 1 (controlled by CrapMan) and a output of "7 btc" to address 2 (controlled by John).

For most wallets software, by default, the wallet will generate a new change address every time to improve anonymity.
So, after John spend 3 btc, the common addresses held by John and Sarah will have nothing on it.

FYR: https://en.bitcoin.it/wiki/Change


Title: Re: I am lost in bitcoin wallet and private key
Post by: Josepht on April 05, 2014, 08:06:04 PM

What is going to happen is: the bitcoins will get confused, cause they are going to 2 different place with the same address, which way the bitcoin will chose? John? or Sarah?
I don't think it has anything to do with the private key, whoever will get the bitcoin to the wallet will be able to spend it.
I mean the bitcoin I sent went to Sarah's wallet the she gets to spend it, but if the bitcoin chose to go to John then John will get to spend it.
Which way the bitcoin will go?



That would be decided on by the miners. Once an address is in the network a new one will not be created the same.

Not really.
You never "announce" your address to the network, and there is no one doing the checking at all.
In fact, there are many ways you can generate your address offline easily.


Ops! now all someone has to do is: download the wallet Client, and make millions of wallets and he might get lucky, specially with all the the huge exchanges and transactions around the world right now and people moving Bitcoins in and out creating different wallets ...etc

A bitcoin address starts with a 1, followed by 33 random characters. There are 62 possible characters.

So the maximum amount of addresses is 33^62
A million is nothing compared to that.


Title: Re: I am lost in bitcoin wallet and private key
Post by: Peter882 on April 05, 2014, 08:07:45 PM
Let me quote this again.

https://en.bitcoin.it/wiki/Weaknesses#Generating_tons_of_addresses
Quote
Generating tons of addresses

Generating an address doesn't touch the network at all. You'd only be wasting your CPU resources and disk space.

Also, a collision is highly unlikely.

Keys are 256 bit in length and are hashed in a 160 bit address.(2^160th power) Divide it by the world population and you have about 215,000,000,000,000,000,000,000,000,000,000,000,000 addresses per capita.(2.15 x 10^38)[1]

So, even if you generate millions, billions or trillions of addresses, the chance of having address collision is still ridiculously low. :D

Edit: I got to go now, but I am sure there are lots of people here ready and happy to answer your questions :D


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 05, 2014, 08:28:25 PM
Ok I got that part, both of them will get the payment,
BUT both of them are able to spend it too. REASON: I send the bitcoin to an address, has nothing to do with private key.
John Address is : AAAAA
Sarah Address is: AAAAA

so both open their wallets, they see 10 bitcoins I sent

Even if they have different private keys, since I sent it to an address and not a private key, then the transaction will show on both and both are able to spend it, just a matter of who spend it faster!


This part is correct.

Now John will spend 3 bitcoins.
Then it will show both of them have 7 Bitcoins left.
Then Sarah will spend 5 bitcoins.
Then it will show both of them have 2 bitcoin left.


Just a side note, when bitcoin are spent, you can't use a transaction output partially.
So, if John want to send CrapMan 3 BTC with a piece of "10 BTC" on his address, he need to create a transaction with that 10 btc as input, a output of "3 btc" to address 1 (controlled by CrapMan) and a output of "7 btc" to address 2 (controlled by John).

For most wallets software, by default, the wallet will generate a new change address every time to improve anonymity.
So, after John spend 3 btc, the common addresses held by John and Sarah will have nothing on it.

FYR: https://en.bitcoin.it/wiki/Change

Ok you got me lost, you are way way smarter than me!

I sent John 10 BTC, John received them,
an output from my wallet was created, an input for John's wallet created.
John has now 10 BTC,
now John spent 3 BTC at amazon, an output of 3 BTC for John, an input of 3 BTC for Amazon

BUT I think you are saying my example of (John and Amazon) is wrong when you say partial output,
if I am not mistaken: you are saying that the whole BTCs in the wallet create an output even if you spend only part of them? like when John spent 3 BTC on Amazon from that 10 BTC, it means: an output of 3 BTC created to amazong and another output for 7 BTC created to John (output of his own money to his own wallet)?


Title: Re: I am lost in bitcoin wallet and private key
Post by: Rampton on April 05, 2014, 08:31:37 PM
Why is this particular instance such an issue? The chances of this happening are astronomical.


Title: Re: I am lost in bitcoin wallet and private key
Post by: CrapMan on April 05, 2014, 08:38:39 PM
Why is this particular instance such an issue? The chances of this happening are astronomical.

It is not an issue, but I like to understand how things work.
Simply put: Would you go buy a car if you don't know how to drive?


Title: Re: I am lost in bitcoin wallet and private key
Post by: hilariousandco on April 05, 2014, 09:03:18 PM
Why is this particular instance such an issue? The chances of this happening are astronomical.

It is not an issue, but I like to understand how things work.
Simply put: Would you go buy a car if you don't know how to drive?

I think a more apt analogy would be going to buy a car and asking the dealer how a combustion engine works and what are the odds of it blowing up and killing you. :D


Title: Re: I am lost in bitcoin wallet and private key
Post by: sgk on April 09, 2014, 08:14:30 AM
Ok you got me lost, you are way way smarter than me!

I sent John 10 BTC, John received them,
an output from my wallet was created, an input for John's wallet created.
John has now 10 BTC,
now John spent 3 BTC at amazon, an output of 3 BTC for John, an input of 3 BTC for Amazon

BUT I think you are saying my example of (John and Amazon) is wrong when you say partial output,
if I am not mistaken: you are saying that the whole BTCs in the wallet create an output even if you spend only part of them? like when John spent 3 BTC on Amazon from that 10 BTC, it means: an output of 3 BTC created to amazong and another output for 7 BTC created to John (output of his own money to his own wallet)?


Not the whole wallet balance has to go out, only the BTC you received in a single transaction.


Think of it this way:

Someone gives you a $50 bill and a $20 bill. Now your pocket has $70. (That makes 2 incoming transactions for you)

You now need to give $40 to James Bond. What you will do is take out the $50 bill (from a single incoming transaction) and will split it into 2 bills: a $40 bill and a $10 bill. The $40 bill will be spent in the outgoing transaction and the $10 bill becomes the incoming transaction for you, which goes back into your pocket. You now have $30, which comprises of one $20 bill and one $10 bill.

The $10 bill becomes the incoming transaction for James Bond.

If James Bond needs to spend an amount smaller than $10, he will also go into the same process as you did.

Now think of the whole process again by replacing 'pocket' with 'wallet' and 'dollar bill' with 'Bitcoin'


Title: Re: I am lost in bitcoin wallet and private key
Post by: hilariousandco on April 09, 2014, 09:20:32 AM
You guys are just making what is quite simple complicated and confusing with these explanations  :D.


Title: Re: I am lost in bitcoin wallet and private key
Post by: baokychen on April 09, 2014, 09:32:07 AM
All you need is to backup the .wallet or .dat file inside your %AppData%\CoinFolder

or ~/.coinfolder/ if linux



Title: Re: I am lost in bitcoin wallet and private key
Post by: Loophole on April 09, 2014, 02:31:25 PM
You guys are just making what is quite simple complicated and confusing with these explanations  :D.

+1.
All those explanations are pretty much correct, but I don't think an ordinary user (esp. a new bitcoiner) need to understand that much.