The Principle of MD5 in Detailed Explanation of Android Advanced Interview Questions

Symmetric and asymmetric encryption, the principle of MD5?

What is this question trying to investigate?

1. What are the principles of symmetric and asymmetric encryption algorithms?

2. What are the basic concepts and principles of MD5?

Knowledge points of inspection

MD5 algorithm principle, symmetric and asymmetric encryption algorithms

How Candidates Answer
Basic concepts of symmetric and asymmetric encryption algorithms

Basic concepts of symmetric encryption and asymmetric encryption

Symmetric encryption refers to the use of the same key for encryption and decryption, so it is called symmetric encryption. Symmetric encryption has only one secret key, which acts as the private key. Common symmetric encryption algorithms: DES, AES, 3DES, etc. Asymmetric encryption means that encryption and decryption use different secret keys, one as a public public key and the other as a private key. Information encrypted with the public key can only be decrypted with the private key. Information encrypted with the private key can only be decrypted with the public key. Common asymmetric encryption algorithms: RSA, ECC.

The difference between symmetric encryption and fractional symmetric encryption algorithm

  • Symmetric encryption: Encryption and decryption use the same key, which is not safe to be intercepted by hackers.
  • Asymmetric encryption: public key encryption, private key decryption; the public key can be disclosed to others for encryption, and the private key is always in your own hands. It is very safe, and hackers are useless to intercept it, because the private key is not disclosed.

Refers to encryption algorithms that use different keys for encryption and decryption, also known as public-private key encryption. Assuming that two users want to encrypt and exchange data, the two parties exchange public keys. When using it, one party encrypts with the other party's public key, and the other party can decrypt it with its own private key. Common asymmetric encryption algorithms: RSA, DSA (for digital signatures), ECC (for mobile devices), Diffie-Hellman, El Gamal.

  • **RSA:** Invented by RSA Company, it is a public key algorithm that supports variable-length keys, and the length of the file blocks that need to be encrypted is also variable.

  • DSA (Digital Signature Algorithm) : Digital Signature Algorithm, is a standard DSS (Digital Signature Standard

  • ECC (Elliptic Curves Cryptography) : Elliptic Curve Cryptography.

    Compared with RSA, ECC has absolute advantages in many aspects, mainly reflected in the following aspects:
    (1) Strong resistance to attack. With the same key length, its attack resistance is many times stronger.
    (2) The amount of calculation is small and the processing speed is fast. The overall speed of ECC is much faster than RSA and DSA.
    (3) The storage space is small. Compared with RSA and DSA, the key size and system parameters of ECC are much smaller, which means that the storage space it occupies is much smaller. This is particularly important for the application of encryption algorithms on IC cards.
    (4) Low bandwidth requirements. When encrypting and decrypting long messages, the three types of cryptosystems have the same bandwidth requirements, but ECC bandwidth requirements are much lower when applied to short messages. The low bandwidth requirement makes ECC have broad application prospects in the field of wireless networks.

The difference between symmetric encryption and fractional symmetric encryption algorithm

The basic concept of MD5

MD5 encryption

MD5 itself is a 128-bit 0/1 bit. Generally expressed as a hexadecimal string. 4 bits make up a hexadecimal character, so you can often see (128/4=) a string of 32 hexadecimal characters 4951 dd1c bff8 cbbe 4cd4 475c a939 fc8b, of course it is essentially a message Digest algorithm .

Features of MD5 encryption:

  1. irreversible operation
  2. The result of encrypting different data is a fixed-length 32-bit character (no matter how big the file is)
  3. Encrypting the same data yields the same result (that is, duplication).
  4. Anti-modification: information "fingerprint", any change to the original data, even if only one byte is modified, the resulting MD5 value is very different.
  5. Weak anti-collision: Knowing the original data and its MD5 value, it is very difficult to find a data with the same MD5 value (that is, forged data).
  6. Strong anti-collision: It is very difficult to find two different data so that they have the same MD5 value

End of article

More Android interview questions can be scanned for free!

↓↓↓【Preview】↓↓↓

img

Guess you like

Origin blog.csdn.net/Android_XG/article/details/130976268