Home >Common Problem >What are the two main encryption methods currently commonly used?
There are two main encryption methods commonly used at present, namely: private key encryption and public key encryption. The characteristics of the private key encryption method are that both the information sender and the information receiver need to use the same key, which is symmetrical and is also called symmetric encryption. Public key encryption, also known as asymmetric encryption, uses a pair of keys, one is a private key and the other is a public key.
Currently there are two main encryption methods commonly used, namely: private key encryption and public key encryption.
Private key encryption
Private key encryption refers to communication between users A and B on a computer network At this time, in order to protect the plaintext information to be transmitted from being stolen by a third party, sender A uses key A to encrypt the information to form ciphertext M and sends it to receiver B. Recipient B uses the same key A to encrypt the message. A method of decrypting the received ciphertext M to obtain the plaintext information, thereby completing the purpose of ciphertext communication.
This method of encrypting information transmission is called private key encryption.
Features of private key encryption:
One of the biggest features of private key encryption is that both the information sender and the information receiver need to use the same key , has symmetry, so private key encryption is also called symmetric key encryption.
Principle of private key encryption:
Private encryption algorithms use a single private key to encrypt and decrypt data. Since any party with the key can use it to decrypt data, it is important to ensure that the key is not obtained by an authorized agent.Public key encryption
Public key encryption (public-key cryptography), also known as asymmetric encryption (asymmetric cryptography), A type of cryptography algorithm in which a pair of keys is required, one is a private key and the other is a public key. These two keys are mathematically related. The information obtained after being encrypted with a certain user's key can only be decrypted using the user's decryption key. If you know one of them, you cannot calculate the other. Therefore, if one of the keys in a pair is disclosed, the secret nature of the other key will not be compromised. The public key is called the public key; the private key is called the private key. For more related knowledge, please visit:PHP Chinese website!
The above is the detailed content of What are the two main encryption methods currently commonly used?. For more information, please follow other related articles on the PHP Chinese website!