What does private key mean
Private key encryption algorithm uses a single private key to encrypt and decrypt data, consisting of Composed of randomly selected numbers, the user must need a private key to complete decryption.
Private key encryption algorithm, also known as symmetric encryption algorithm, because the decryption key and encryption key of this algorithm are the same. Precisely because the same key is used for both encryption and decryption, this key cannot be made public. Common ones include "DES Encryption Algorithm" and "AES Encryption Algorithm".
In cryptography, a key (key, also often called a golden key) refers to a secret information used to complete cryptographic applications such as encryption, decryption, and integrity verification. In symmetric cryptography (or key cryptography), the same key is used for encryption and decryption, so the key needs to be kept secret. In public key cryptography (or asymmetric cryptography), the keys used for encryption and decryption are different: usually one is public, called the public key; the other is kept secret, called the private key.
Disadvantages of public key algorithms
In reality, the public key mechanism also has its shortcomings, that is, the efficiency is very low and is much lower than the commonly used private key algorithms (such as DES and AES) may be one or two orders of magnitude slower. So it is not suitable for encrypting large amounts of raw information. In order to take into account both security and efficiency, we usually use a combination of public key algorithms and private key algorithms:
First, the sender uses a symmetric algorithm to encrypt the original information.
The receiver generates a pair of keys, one public key and one private key, through the public key mechanism.
The receiver sends the public key to the sender.
The sender uses the public key to encrypt the key of the symmetric algorithm and sends it to the receiver.
The receiver uses the private key to decrypt to obtain the key of the symmetric algorithm.
The sender then sends the encrypted original information to the receiver.
The receiver uses the key of the symmetric algorithm to decrypt.
The above is the detailed content of What does private key mean?. For more information, please follow other related articles on the PHP Chinese website!