Home >Common Problem >What is the difference between symmetric key and asymmetric key

What is the difference between symmetric key and asymmetric key

王林
王林Original
2021-05-07 15:24:5121535browse

The difference between symmetric key and asymmetric key is that symmetric key encryption and decryption use the same key, and asymmetric key encryption and decryption use no key; symmetric key algorithm encryption processing is simple, encryption and decryption The speed is fast, but the asymmetric key encryption and decryption speed is slow.

What is the difference between symmetric key and asymmetric key

#The operating environment of this article: windows10 system, thinkpad t480 computer.

Their differences mainly include the following aspects:

Differences in the keys used for encryption and decryption

From the above It can be seen from the description of symmetric key algorithm and asymmetric key algorithm that the same key is used for encryption and decryption of symmetric key, or the decryption key can be easily deduced from the encryption key; asymmetric key algorithm encryption Decryption uses different keys, one of which is difficult to derive from the other.

Differences in algorithms:

① The group encryption technology used in the symmetric key algorithm is to group the plaintext to be processed according to a fixed length, and use the key to perform encryption on the group. After several iterations of encoding, the ciphertext is finally obtained. The decryption process is the same. Under the control of a fixed-length key, several iterative decodings are performed in units of one group to obtain the plaintext. The asymmetric key algorithm uses a special mathematical function, the one-way trapdoor function, that is, it is easy to evaluate from one direction, but its reverse calculation is difficult, or the calculation is infeasible of. During encryption, the plaintext is encrypted and transformed using the public key to obtain the ciphertext. During decryption, the ciphertext is decrypted and transformed using the private key to obtain the plaintext.

②The symmetric key algorithm has the characteristics of simple encryption processing, fast encryption and decryption speed, short key, and long development history. The asymmetric key algorithm has the characteristics of slow encryption and decryption speed and large key size. Characteristics include short development history.

The difference in key management security

The symmetric key algorithm has a public algorithm, and its confidentiality depends on the confidentiality of the key. Since the keys used by both encryption and decryption parties are the same, it is difficult to distribute and replace the keys. The asymmetric key algorithm, because the key has been distributed in advance, does not need to transmit the key during the communication process, which greatly improves security and solves the key management problem.

Security

Symmetric key algorithm Since its algorithm is public, its security depends on the length of the group and the length of the key. Common attack methods include : Exhaustive key search method, dictionary attack, table lookup attack, differential cryptanalysis, linear cryptanalysis, the most effective of which is differential cryptanalysis, which recovers some information by analyzing the impact of plaintext on the difference between ciphertext pairs. Key bits. The security of asymmetric key algorithms is based on the difficulty of the one-way function used, such as the elliptic curve cryptographic algorithm. Many cryptography experts believe that it is exponentially difficult. Judging from the known solution algorithms, the 160-bit elliptic curve cryptographic algorithm The security is equivalent to the 1024bit RSA algorithm.

Free learning video sharing: Introduction to programming

The above is the detailed content of What is the difference between symmetric key and asymmetric key. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn