【NeoLine Talk】Have you distinguished the key, private key, and public key?

NeoLine
3 min readJun 3, 2020

--

Those who have used digital wallets should have heard of these terms: “private key”, “public key” and “key”, but there are many people who are not sure what these “keys” are.

This article will explain to you the difference and connection of these “keys”.

First talk about what is the key. The final plaintext (asset) can be obtained through the key, so the key is equivalent to the plaintext.

To give a simple example, there is a hundred thousand dollars in the safe, the safe is locked, and there is a key, then the possession of the key is the same as the possession of one hundred thousand dollars.

“Keys” appear in pairs and are divided into private and public keys. For the lock on the public key, only the private key can be opened, and there is only one private key; for the lock on the private key, only the public key can be opened, but there is more than one public key

What is the private key and public key?

Just like a password is required for bank withdrawals and online banking transfers, the use of digital coins in the wallet also requires a password. This password is called a “private key”.

The “public key” corresponding to the “private key” is like your bank account.

As mentioned in previous articles, owning a private key has control over digital assets, so why?

In the blockchain world, as long as you have the “address + signature + key”, you can use the digital assets under the address at will.

But because every digital currency transaction requires a valid signature to be stored on the blockchain, this valid digital signature is generated by the private key.

The private key can generate a public key, and the public key can generate an address. This process is irreversible.

So it is equivalent to owning the private key to own the ownership and control of digital assets.

What is the difference between private key and public key?

The private key is private, known only by the holder, and is often used for decryption/signature.

The public key is public, available to everyone, and is often used for encryption/verification.

What is the connection between private key and public key?

When you use the public key to encrypt information, only the paired private key can decrypt, so the public key and private key form a unique corresponding relationship.

When receiving information, you can use the public key to verify the identity of the sender of the information. When trading digital currencies, a digital signature generated by a private key must be used. To prove to others (other nodes in the network) that you own the corresponding private key and complete the corresponding transaction, you can prove that you own the corresponding private key by sending the public key to everyone.

Because the private key can generate the public key, but the public key cannot reverse the private key, so this method can prove the success of the transaction and ensure the security of the private key.

The simple understanding of the above information is:

Key: Appears in pairs, consisting of private key + public key

Private key: Similar to the password of a bank card, whoever has the private key can use the digital currency at the corresponding address.

Public key: It is generated by the private key, but the private key cannot be obtained by public key inversion.

Address: The wallet address is generated by the public key.

--

--

NeoLine
NeoLine

Written by NeoLine

NeoLine mobile is an easy-to-use mobile gateway to the Neo smart economy。

No responses yet