The "Keys" in Bitcoin that Everything Depends on + Insightful Comments get YOU 100SP~
Hi all,
This is part 3 of my series on the basics of blockchain/bitcoin. Start with part 1: https://steemit.com/bitcoin/@ddangerwu/learn-by-interacting-with-hash-blocks-and-blockchain-get-100sp-delegated-for-insightful-comments
This post will focus on public vs private keys and its function in bitcoin transactions. Again, I highly recommend that you play around with the parameters discussed in the post by going to https://Anders.com/blockchain/public-private-keys/keys.html Disclaimer: This website was made by Anders Brownworth and you should check him out at https://anders.com.
So last post ended with our understanding that ledgers on the blockchain because there are many transactions of A sending X amount to B. But what is stopping people from just adding/changing a transaction and spending all of someone else money? Or, we can spend our money to multiple people, creating the problem known as "double-spend".
Let me introduce to you the idea of private and public key pair. Let's assume that you can make up some string of numbers and derive another string of data similar to how you could make up some data and derive some hash as we learned in Part 1. You can think of the public key as the representation of your private key, open for everyone to see. As you can see from the above picture, the public key for the private key "1" is "0479..."
What is very important to understand here is that you can verify the keys match but cannot go backwards and derive a private key with your public key. Imagine that you have a math problem of 2+x=4. You figure out by doing the computation that the answer x=2. You can very easily verify that the answer and the problem match but if only given x=2, you have a infinitesimally small chance of guessing the problem is "2+x=4". This concept is called asymmetrical encryption and it is at the heart of making bitcoin work. My analogy dumbs down the concept a lot and you should read about it further here: https://en.wikipedia.org/wiki/P_versus_NP_problem
For now, let's make up a random private key "1030..." and derive its public key "041b..."
Now, with our private key, we derive again or sign the data "Hello again Steemit! Remember to follow, upvote and resteem if you found this post helpful!" This gives us the signature "3045..."
If we input the same info again, we can check or verify that the data, signature and private key match. This is similar to that given x=2, we can verify the problem 2+x=4 matches with the answer.
Notice that if I change any given components, in the above picture I changed the private key to 1234, then the transaction does not verify.
For a real transaction, we have the data be a structured message with peoples' names replaced by public keys. Similarly, we can verify the transaction given the public keys and the signature of the sender, which was derived from the private key of the sender.
Lastly, let’s put everything together into the blockchain distributed ledger (see part 2 if you don’t understand). I’ve changed the first transaction that I have in block #2 from 10 to 1000, giving myself more money. This causes the block to be invalid because that transaction is invalid.
Notice that even if I re-mined block #2 to make the hash “follow the rule”, the transaction is still invalid because the signature don’t match. This is how can throw the transaction back into the mem-pool and still have a valid block.
Important understanding: These concepts shows that one of the biggest reasons that bitcoin has value is that you can get a new address or public key by just making up a new private key. This allows you to send money peer to peer, cutting out any centralized permission. For details, see my video: https://steemit.com/bitcoin/@ddangerwu/the-reason-that-bitcoin-has-value-is-because-get-100sp-delegated-to-you-by-commenting
-Dan Wu
—————
Now that you’ve read the post, what did you think? I want to do my part to fight spam and promote insightful comments/discussions. I read every comment and value your feedback. Write something and I will pick the most insightful comment to delegate 100 Steem Power to you for a week.
You may earn curation awards using my STEEM manually OR use a service like SmartSteem to vote automatically for you.
Here is last post's winner:
my response:
I want a B sticker for my keyboard!!
Really great article!!
Probably the most important part to many is fully understanding this process.
This series has been very insightful :-)
hey there
click on my link to earn 2000 per month free
https://steemit.com/money/@wolf92/easy-job-from-home-earn-at-least-2000-dollers-per-month
vote and tell me if you like it
This concept is what drew me to cryptos, and what I perceive as their value. Yet few people even think about it or understand it. When I'm asked what bitcoin is, I typically answer it's a way of paying people without having to give them your account number and liken it to Visa... where they try to increase security by adding a secret pin number to the back which you then have to give to everyone that you make a purchase from. Bitcoin has created a secret pin that never has to be shared yet can be verified. It's an extremely difficult thing to accomplish and that in of itself is immensely valuable.
Is it theoretically possible for a seed generator to generate the same seed twice? Or do they only create so far not existing wallets?
That would depend on the workings of the seed generator if it's gathering enough entropy then no!
Very informative post. You explaining that from our public key we can't recover our private key because of unlimited number of probalities. All public and private key coded with crytographic code.But the Quantum computing which is very very fast and calculate unlimited number of probalities within a second . So by use of quantum computing one can got your private key. That's why latest technology used photon/ light for sending message in internate communication which is far better than crytographic encryption and unhackable if anyone want to hack it will detectable and the message is lost.
Thanks for sharing your valuable information about blockchain.
I was just about to say the same thing, and I saw you’re comment. I was not aware that quantum computers could compromise private keys though. If that’s a fact, there has to be some kind of way to write a script to defend against that.
There has to be a way. Say you have a Nano Ledger Wallet for example, wouldnt those private keys be just as vulnerable? Either way you’re post was informative. Thanks.
I never really understood the difference between the public key and private key which i the very reason I was attracted to click on your post. I will be utterly honest, it was hard for me to understand at first but with the use of https://anders.com/blockchain/public-private-keys/signatures.html which you generously provided, I gained a little bit of insight. I decided to read your post once more and everything started to make sense. Here is what I did with your help.
The photo above was what I was originally greeted with. There are random numbers assigned to the private key and public key.
I decided to try and edit the private key, which you can see I edited a number 1 as my private key and it showed me a different public key INSTANTLY! Reading your post, you mentioned how:
That totally made me understood better. Since each number is unique on its own (2 is never = 1 under any case), this would mean that each number has its own equivalent representation in the form of a public key.
I decided to add another number making my private key "12" and its shows another public key instantly.
I think it is important to note that simply exchanging the numbers from 12 to 21 does not create the same public key similarly to how the value of 12 =/= 21. Okay. So far so good.
This time i tried to use 123 as my private key and it gave me a public key of:
You could only imagine how many combinations there can be with 256-bit long number which is picked randomly as with our BTC wallets, or with the 77 digit number and letter with the initial private key given on the first picture. Truly there is a lot which means it is very difficult to replicate one in any case.
Afterwhich, I switched to the Signatures portion of the page to try out what other things I could learn. Initially, I just typed in random number into the private key and saw how it changes. However I was sure that there is a point why I was redirected onto the page. I decided to input 123 and clicked sign. I got the number noticed something, I got the message signature keys:
When I moved over to the verify tab, I still see the message signature keys. But when I tried to verify it with the public keys 123, the page turned red. I was confused. I though they were equal to each other.
I returned to your blog to understand better and I read your statement: What is very important to understand here is that you can verify the keys match but cannot go backwards and derive a private key with your public key.
Of course! How stupid of me! I was using my private keys for a public key slot.
and
This would mean that
only answers to
FINALLY! It made the screen light up green which means the combination was correct.
The maths analogy is a bit complicated, but I think that the idea of mining is probably still a little absurd in my mind even though I've been mining since December. The information about hash power is a discussion that is rather exclusive and underground which makes it complicated to understand. The idea behind computing power having real value in industry is fresh and perhaps it needs to be introduced to the syllabus in schools. Shoutout for the gangster post @ddangerwu. This one has dangerous cashflow vested..
This is one of the best posts I have seen on here, especially the following paragraph really stands out:
'I'm looking to build a world where compassion and courage prevail over deception and fear, where technology brings transparency in our relationships finally giving honest cooperation the upper hand over any other types of human interaction.'
I have been looking for people who want to change social media, the internet and the planet for the better for so long and it seems I've finally found them!
If anyone reading this has not voted this guy as a witness, I'd suggest you vote right now!
Wonderful and beautiful article
If it wasn't for life, we wouldn't have the Blockchain.
I am thankful for life.
I am thankful for the Blockchain 👍✨