Blockchain - Public Key Cryptography




In addition to being known as asymmetric cryptography, Public Key Cryptography, or simply PKI, uses two pairs of keys - a public and a private key. A key is a long binary number. It is distributed throughout the world and is truly publicly accessible. One should never lose the private key and keep it strictly private.

In case of Bitcoin, if you ever lose the private key to your Bitcoin wallet, the entire contents of your wallets would be instantly vulnerable to theft. Before you know it, all your money (the contents of your wallet) will be gone with no way to trace the person who took it - that is what I mentioned earlier about the anonymity of Bitcoin.

Through encryption/decryption mechanisms, PKI accomplishes two functions - authentication and message privacy.

Authentication

When the two parties exchange messages, it is important to establish a trust between the sender and the receiver. The receiver must, in particular, trust the source of the message. As we looked at our earlier scenario (depicted in Figure 1), where Bob sent Lisa some money for the purchase of some goods, we can see how the PKI builds this trust between them.

It is important to note that both private and public keys are always paired together, so Bob cannot mix the private and public keys of different instances or individuals.

Bob says that he is sending Lisa $10, so he creates a message (a plain-text message) containing Bob's (sender) public key, Lisa's (receiver) public key, and the amount ($10).

It also includes the purpose of this remittance, such as "I want to buy pumpkins from you." The entire message is now signed using Bob's private key. When Lisa receives this message, she will verify that it is from Bob using the signature verification algorithm of PKI and Bob's public key. Detailed information on PKI is beyond the scope of this tutorial. For more information, the reader can visit this site. Now let's look at the privacy of the message. The authenticity of the message originator has been established.

Blockchain - Public Key Cryptography

Message Privacy

As Lisa has received her payment, she wishes to send Bob the link to her ebook. Lisa will create a message and send it to Bob as shown in image 1.

In the HTTPS handshake, Lisa creates a message such as "Here's the link to my ebook that you requested", signs it with Bob's public key and encrypts it using some secret key that is shared between them.

Blockchain - Public Key Cryptography

With the private key that Bob alone holds, Lisa knows that only he can decode the message. Since the message's contents are encrypted with a secret key held only by Bob and Alice, someone intercepting it would not be able to recover its contents. This ensures that Lisa will only be able to access her ebook.

Now that we have seen both the features implied by PKI, Authentication and Message Privacy, let us look at how Bitcoin uses PKI to secure the public ledger that I mentioned in the chapter "What is Bitcoin?".

Bitcoin uses the ECDSA algorithm, which is the most popular PKI algorithm.



Frequently Asked Questions

+
Ans: Bitcoin - Brief History view more..
+
Ans: Blockchain - Double Spending view more..
+
Ans: Blockchain - Introduction view more..
+
Ans: Blockchain - Public Key Cryptography view more..
+
Ans: Blockchain - Hashing view more..
+
Ans: Bitcoin - Mining view more..
+
Ans: Blockchain - Chaining Blocks view more..
+
Ans: Blockchain - Proof of Work view more..
+
Ans: Blockchain - Network & Mining view more..
+
Ans: Blockchain - Incentives to Miners view more..
+
Ans: Blockchain - Merkle Tree view more..
+
Ans: Blockchain - Payment Verification view more..
+
Ans: Blockchain - Resolving Conflicts view more..
+
Ans: Blockchain - Privacy view more..
+
Ans: Bitcoin - Mitigating Attacks view more..
+
Ans: Blockchain - Conclusion view more..



Recommended Posts:


Rating - NAN/5
537 views

Advertisements