Peter882
|
|
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.
|
|
|
|
CrapMan (OP)
Newbie
Offline
Activity: 42
Merit: 0
|
|
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.
|
|
|
|
hilariousandco
Global Moderator
Legendary
Offline
Activity: 3990
Merit: 2713
Join the world-leading crypto sportsbook NOW!
|
|
April 05, 2014, 06:52:19 PM |
|
There is no 'mother unit machine'; it's a decentralised network.
|
|
|
|
Peter882
|
|
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_addressesGenerating 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]
|
|
|
|
CrapMan (OP)
Newbie
Offline
Activity: 42
Merit: 0
|
|
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_addressesGenerating 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?
|
|
|
|
Peter882
|
|
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).
|
|
|
|
hilariousandco
Global Moderator
Legendary
Offline
Activity: 3990
Merit: 2713
Join the world-leading crypto sportsbook NOW!
|
|
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 .
|
|
|
|
Peter882
|
|
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 . You are absolutely right. That being said, I am happy to see someone trying to understand how bitcoin works.
|
|
|
|
CrapMan (OP)
Newbie
Offline
Activity: 42
Merit: 0
|
|
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?
|
|
|
|
CrapMan (OP)
Newbie
Offline
Activity: 42
Merit: 0
|
|
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 . 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.
|
|
|
|
Peter882
|
|
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.
|
|
|
|
hilariousandco
Global Moderator
Legendary
Offline
Activity: 3990
Merit: 2713
Join the world-leading crypto sportsbook NOW!
|
|
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 . 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.
|
|
|
|
Peter882
|
|
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.
|
|
|
|
Rampton
|
|
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.
|
|
|
|
Peter882
|
|
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.
|
|
|
|
CrapMan (OP)
Newbie
Offline
Activity: 42
Merit: 0
|
|
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!
|
|
|
|
CrapMan (OP)
Newbie
Offline
Activity: 42
Merit: 0
|
|
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
|
|
|
|
Peter882
|
|
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
|
|
|
|
Josepht
|
|
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.
|
|
|
|
Peter882
|
|
April 05, 2014, 08:07:45 PM |
|
Let me quote this again. https://en.bitcoin.it/wiki/Weaknesses#Generating_tons_of_addressesGenerating 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. Edit: I got to go now, but I am sure there are lots of people here ready and happy to answer your questions
|
|
|
|
|