If you don't understand the concepts of asymmetric cryptography and how it allows for a signature with a private key that can be verified with a public key, then you are going to continue to struggle to understand how bitcoin works. As an analogy, it would be a bit like trying to understand how an airplane stays aloft without any understanding of the concept of air pressure.
Can you accept the following on faith?
- A very big number (a private key) can be used to calculate another very big number (a public key) that is mathematically related.
- The public key can NOT be used to calculate the private key.
- A private key can be used to calculate a digital signature for a set of data.
- If someone knows the public key, they can validate that the signature was created from the matchin private key even without knowing what that private key is.
- The signature can not be created without knowing what the private key is.
If you can accept those 5 facts, you've got the building blocks that you need to understand how bitcoin works.
Now imagine that a bitcoin address is a public key
It's actually a hash of a public key, but imagining that the public key itself is the address will make this discussion a bit simpler. Once you've grasped the basics you can work on understanding what effects the hashes have on the process.So, you start by choosing a very large random number and calling that your "private key". Then you calculate the public key on a computer that has never been connected to the internet. For the sake of this discussion, lets pretend that the calculated pubic key turns out to be 1Th1515MyPubl1cK3y
You give the public key to me by emailing it to me, or reading it to me out loud, or whatever other method you might use to tell someone what address to "send bitcoins" to.
The internet sill knows absolutely nothing about the number you've chosen as a private key, nor the number you've calculated as a public key.
Then I create a public message. The message says:
I re-assign control of a value of 500,000,000 that I currently have control of.
I give exclusive rights and permission to reassign the value in the future to anyone that can supply a signature using the private key that is associated with the public key of 1Th1515MyPubl1cK3y
Nobody needs to know how that public key was generated, nor do they need to know what the private key is. All they need to do is accept my wishes that the value can't be re-assigned by ANYONE (not even me) unless they can provide a digital signature that can be validated with a public key of 1Th1515MyPubl1cK3y.
Now my message is broadcast on the internet. The whole world receives a copy of my message. They all store a copy of it somewhere on their computer. This "transaction" is the first that any of them have heard of this public key.
At some point later in the future, you decide to "send the bitcoins" elsewhere.
You create a similar message with a new public key that you are "sending to", and you create a digital signature for your new message using the private key that you used to generate the 1Th1515MyPubl1cK3y public key.
Now everyone who receives your message can go back to my message and validate that the signature you provided on your message matches the public key from my message. If it does, then they all start keeping track of this new message from you and waiting for someone somewhere to broadcast a message with a signature that matches the public key from your message. . If not you have not provided a valid signature, then they all just discard the new message you've sent and ignore it.
That's it. That's the basics of how value is transferred around to addresses that have never been seen before they exist in a transaction.
Notice that all this is done without "the network" needing to know what the public key is ahead of time. The first time they see the public key is when it is included in a message (transaction).
If you can grasp this, then you can start looking into how a single transaction (message) can split up the value to multiple recipients, and how a public key is translated into an address through hashes and a checksum.
If you stop to think about it for a bit, you can see that one problem with what I described above is that I could create 2 separate messages attempting to encumber the same value that I control with signatures from 2 different private keys. Then I can send each of these messages to different people. Each message says that the ONLY single person that can reassign the value is the person that supplies the appropriate signature indicated in that message. This is a "double spend". And it is a MAJOR problem for attempting to use such a system as reliable means of transferring value.
Bitcoin deals with this problem by setting up a system where the entire network can agree on a consensus as to which message that re-assigns value is the "real" message. Once that consensus is reached, any other message that attempts to re-assign the exact same value to some other public key can be safely ignored by the entire network since the value is already accepted as being under the requirements of the agreed upon message. The proof-of-work is the system that the bitcoin network uses to establish a consensus, and the blockchain is the method that the bitcoin network uses to publish and keep track of the consensus.