What Is Crypto Wallet, Encryption And Private-Public Keys — Part 2 of 3

By Munish Kohli on ALTCOIN MAGAZINE

Munish Kohli
The Dark Side
Published in
5 min readJun 8, 2019

--

My previous article was a brief introduction of Private-Public keys and encryption. Now I will explain how Private-Public keys are derived and simple steps to create Wallet.

Few Quick Important Points About Private & Public Keys.

Public and Private keys are 256 binary digits shown as 64 Hexadecimal digits

A public key is derived from the Private key. One cannot reverse the Public key and derive the Private key. In case that would have been possible the whole meaning of private key is meaningless. That’s why it’s a one-way function. A simple analogy is an egg once broken, its yolk cannot be put back into the egg.

The pairing of Private and Public key is asymmetric encryption. Example:

1. John sends an email to Mary and encrypts using Mary’s Public key

2. Mary decrypts a message with its own private key. Mary is able to decrypt because the initial encrypted message contains Mary’s Public key. Had the Public key would have belonged to someone else, Mary wouldn’t have been able to decrypt.

The algorithm of deriving Private and Public keys are based on Elliptic Curve Cryptography (ECC). Sounds heavy? Let me try to explain at a very high level. The long keys (Private/Public) in Hex format can be generated in multiple ways. The first modern algorithm in the area of public cryptography was developed in 1977 in which Private/Public keys were generated through the multiplication of Prime numbers.

This method is called RSA named after 3 men: Ron Rivest, Adi Shamir, and Leonard Adleman. RSA was a breakthrough technology as first-time asymmetric encryption was developed without worrying about securely transporting secret code. Read this quick article on the difference between Symmetric and Asymmetric encryption. RSA was the first step in public key cryptography. RSA is good, but it is quite calculative intensive and requires a 1,024-bit key to achieve an algorithm. Enter ECC.

ECC generates key through properties of the elliptic curve equation instead of a product of very large prime numbers. ECC can generate a 164-bit key with the same level of RSA encryption, but with lower computing power, ECC is getting adapted very fast. Bitcoin was the first implementation of Blockchain, which implemented ECC. Other cryptos followed the same model. A small device (Ex: Cell Phone) can make use of ECC due to economical computation performance of ECC. Quite a number of IoT devices are adapting to ECC to generate secure communication.

Read about Public and Private keys until you become well-versed with the idea. It took me some time to understand, but once the meaning is grasped, it becomes extremely easy to connect many dots. There was one article that I really liked, along with tons of small videos on Youtube. They will help you in getting an intuition.

Crypto Wallet

As I explained in the previous article, Crypto Wallet is a piece of software which can hold account like your physical wallet hold multiple credit cards. MyEtherWallet (MEW) is such. You will understand faster once you create a wallet by yourself. There are multiple sites you can use to create a wallet. One such site is MyEtherWallet. Go to this site and follow the steps below.

Steps To Create A Simple Wallet

MyEtherWallet (MEW)

1. The site will pop first few information messages about MyEtherWallet and Blockchain in general. You can choose to read or press X to close.

2. Click “New Wallet” which is a first menu option on the top left corner.

3. Create a New Wallet screen appears. Enter a password.

4. Press Create New Wallet button.

5. Download and save KeyStore file in next screen. The filename is long starting with UTC — . Contents of this file can be viewed in notepad.

6. Once the file is downloaded, I understand. Continue will activate allowing you to go to the next screen.

7. Next screen will show Save Your Private Key. This is your secret key which lets you control your account i.e. Public Key

8. Print Paper Wallet button in green print reveals your Public and Private keys.

What is the purpose of the Key store file and password? Use case of key store file is to safeguard your private key. When you need to unlock your account for the purpose of transaction (send-receive Cryptos), key store file is needed. A private key is deduced from a key store file and lets you sign the transactions. Read this article to gain more insights into the Key store file.

One of the advantages of Myetherwallet is that you don’t have to download the complete Ethereum node which can take a long time and occupy space in your computer. There is an official Ethereum Wallet like Mist which needs to be created on top of local Ethereum node. This means you will have to download the full node. A private key can be ported between MyEtherWallet and Mist Browser. Remember Private key you stored in KeyStore file? KeyStore is an encrypted version of your Private key.

Advantage of Mist is it’s also a Dapp browser and a multi-signature. In other words, it’s a wallet with multiple accounts, multiple owners and multiple private keys. Risk of losing money in a multi-signature wallet is much less than a wallet with a single private key. Here is a nice explanation of a multi-signature wallet. I will explain Dapp, MetaMask in my last article in this series.

Clap in case you like this article.

--

--

Munish Kohli
The Dark Side

Technology Enthusiast | Business & Data Analyst | Machine Learning | Big Data | Blockchain | IBM Hyperledger | Ethereum Smart Contracts