CryptoCurrency Fundamentals : Asymmetric Cryptography

Kamal Goyal
Coinmonks

--

Asymmetric or Public-Key Cryptography use a pair of keys — Private and Public. As the name suggests, Private key is not to be shared with anyone and Public is to be shared on the network. Not a fair comparison but think making your email address public and keeping its login password to yourself.

I decided to start using Public-Key Cryptography to securely communicate with folks on a network. I used one of the algorithms (viz. RSA, ECDSA) to generate my Public and Private Key by provide “strawberry fields” as an input keyword to the Key Pair Generation algorithm or I could have used a randomly generated string too. I hide this keyword and the Private Key in a vault and not let anyone get hold of it. And broadcast my Public Key to everyone over the network.

What is the use of the Public Key? If someone decides to securely send me a message and they want to make sure that nobody gets hold of the content of the message on the network. They are going to algorithmically encrypt the message with the Public Key of the recipient, in this case mine and broadcast the message to the network.

Like Master Po Ping decided to send me a message but he decided to encrypt it with my Public Key so that nobody could get hold of the actual message. Even if someone got hold of the message they would require my Private Key to decrypt the encrypted message to reveal its actual contents.

Master Po Ping wants to tell me that “there is no secret ingredient”, so he encrypts it using my Public Key to generate a random looking message “0xabe350f799…” and publishes the encrypted message to the network.

Now, I connect to the network to check if someone has something to say. So I subscribe to the network, an imitation of “network.eth.build”, and wait for any messages. I have a message, it says “0xabe350f7…” 🤔 Wait! let me use my Private Key to decrypt what it says. Thank you Master Po! 🐼

Read about Digitally Signed Transactions here.

Join Coinmonks Telegram Channel and learn about crypto trading and investing

--

--