A key is a key that the owner of the key should hide on the public key encryption infrastructure. In a public key cryptosystem, the public key and the key are paired. We assume that when the public key is released to a third party, the private key should be kept secret.
Before the emergence of public key cryptography, public key cryptography was usually used, because the encryption key and decryption key were the same, and encrypted communication was completed by sharing with communication partners. But if it is eavesdropped in the process of exchanging keys, public key encryption has no encryption significance.
With public key encryption, the owner of the key first passes the public key to the communication partner. The communication partner encrypts with this public key and sends the encrypted document (data) to the owner of the key. The owner who receives the key of the encrypted document decrypts the document with the private key, and the key required for decrypting the document is not exchanged on the communication path, thus ensuring security more easily.
The most widely used public key encryption is RSA encryption. In RSA, the public key and the key have the same structure, and the key encrypted with one key can be decrypted with another key. In other words, it can be used not only for public key encryption and decryption, but also for encryption and decryption with a key.
Digital signature takes advantage of this feature. Unless someone owns the key paired with the public key, it is impossible to create an encrypted document that can be decrypted with a specific public key, thus ensuring the owner of the key.
However, it should be noted that RSA's private key and public key are never symmetrical. It is possible to create a public key from a private key, but it is considered very difficult and impossible to create a key from a public key. The security of RSA is based on the fact that it is difficult to decompose a large number of factors, so it is necessary to extend the key length to improve security. Because it is expected that a new decoding algorithm will be found in the future, the calculation speed will be improved, so the key length and algorithm will also change.