What is a public key? - DotWallet

What is a public key?
2019.11.20

 

We all know the importance of the private key, which is the equivalent of a bank card password, In the case of bitcoin, the private key allows access to the corresponding digital asset. In addition to the private key, there is a public key in a pair of keys. So what is a public key? What does it do?

 

Let's take an example: I have a file that I can't let anyone see, so I encrypt it with a lock (public key). Someone else found the file, but he didn't know the password (private key) for the lock (public key), so even if he got the file, he wouldn't be able to see it.

 

In other words, in public key cryptography, the encryption key is generally public. Precisely because the encryption key can be exposed at will, it is called the public key. Public keys can be sent indirectly to recipients by mail, printed in newspaper ads, put on the street as kanban, or perhaps made available to anyone on the web without fear of theft.

 

 

In contrast, the decryption key is absolutely not public, the key can only be used by yourself, so it is called private key.

 

The digital signature is involved here, since it is a signature, it must not want someone to pretend to be me to send a message, only I can publish this signature, so it can be concluded that the private key is responsible for the signature, and the public key is responsible for the verification. The private key matches the public key, which proves ownership.

 

A pair of public keys and private keys are collectively referred to as a key pair. Private keys can generate public keys, but public keys cannot invert private keys. Therefore, this way can not only prove the successful transaction, but also guarantee the security of private keys. At the same time, through the verification of the digital signature, it can also ensure that the information has not been tampered in the transmission process.