The main algorithms used in asymmetric cryptography are: RSA, Elgamal, knapsack algorithm, Rabin, D-h, ECC (elliptic curve encryption algorithm), etc. Advantage: Asymmetric encryption is more secure than symmetric encryption: Symmetric encrypted communications both use the same secret key, and if a party's secret key is compromised, the entire communication is cracked. Instead of symmetric encryption using a pair of secret keys, one for encryption, one for decryption, and the public key is public, the secret key is self-preservation, do not need to be like symmetric encryption before the communication to synchronize the secret key such as: when the login function for data security, need to encrypt the password, this time can use asymmetric encryption, First, the public key is obtained through the interface provided by the background, and the second step is to encrypt the password using the public key. Third step: The server decrypts the password using the private key. Disadvantage: The disadvantage of asymmetric encryption is that encryption and decryption take a long time, slow, and only suitable for a small amount of data encryption symmetric encryption: the use of a single-key cryptography system, the same key can be used as information encryption and decryption, this encryption method is called symmetric encryption, also known as single-key encryption. The algorithms commonly used in symmetric encryption algorithms are: DES, 3DES, Tdea, Blowfish, RC2, RC4, RC5, Idea, skipjack, AES and other symmetric cryptographic algorithms, the advantages of the algorithm is public, the computation is small, the encryption speed, encryption efficiency is high. The disadvantage of symmetric cryptography is that before data is transmitted, the sender and receiver must agree on a secret key, and then both parties can save the secret key. Second, if a party's secret key is compromised, then the encrypted information is not secure. In addition, each time the user uses the symmetric encryption algorithm, you need to use a unique secret key that other people do not know, which will make the two sides have a huge number of keys, key management becomes a burden on both sides
Android Non-symmetric (RSA) encryption and symmetric (AES) encryption