The "Keys" in Bitcoin that Everything Depends on + Insightful Comments get YOU 100SP~

in #bitcoin6 years ago

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

bitcoin-3025639_1920.jpg

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".

Screen Shot 2018-03-01 at 5.48.16 PM.png

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

Screen Shot 2018-03-01 at 6.07.05 PM.png

For now, let's make up a random private key "1030..." and derive its public key "041b..."

Screen Shot 2018-03-01 at 6.10.21 PM.png

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..."

Screen Shot 2018-03-01 at 6.14.12 PM.png

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.

Screen Shot 2018-03-01 at 6.16.19 PM.png

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.

Screen Shot 2018-03-01 at 6.18.50 PM.png

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.

Screen Shot 2018-03-01 at 6.35.03 PM.png

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.

Screen Shot 2018-03-01 at 6.37.44 PM.png

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:
Screen Shot 2018-03-01 at 6.48.25 PM.png
my response:
Screen Shot 2018-03-01 at 6.48.58 PM.png

Sort:  

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?

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.

Loading...

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 👍✨

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.033
BTC 64359.90
ETH 3105.50
USDT 1.00
SBD 3.87