Android Non-symmetric (RSA) encryption and symmetric (AES) encryption

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.