Analysis of three encryption methods
1. Symmetric encryption:
The encryption / decryption uses the same key.
The encryption speed is fast, and it can encrypt large pieces of data.
Existing problems:
(1) how to exchange keys under the condition of security?
2. Asymmetric encryption:
Use a pair of keys: public key, private key
Public key: open to anyone
Private key: only you know it
Using public key encryption, you can only use private key encryption.
Using private key encryption, you can only use public key encryption; this is generally for authentication.
The encryption speed is slow, so it is only suitable for encrypting small pieces of data.
This encryption solves the problem of key exchange.
The combination of symmetric encryption and asymmetric encryption can ensure the identity of the sender and the security of the data.
3. One-way encryption:
It is irreversible and has avalanche effect.
One-way encryption can guarantee the integrity of data.