Two common cryptographic algorithms in cryptography are symmetric cryptography (single-key cryptography) and asymmetric cryptography (public key cryptography ).
The so-called symmetric key algorithm means that if the encryption key of an encryption algorithm is the same as that of the decryption key, or although it is different, it can be easily pushed to another one, that is, the key is shared by both parties.
Asymmetric Key Algorithms refer to different encryption keys of an encryption algorithm, or cannot be used to export another key. One of these two keys is called a public key for encryption, and the other is called a private key for decryption, which is confidential. The calculation of the private key by the public key is not feasible.
The two cryptographic algorithms differ in the following aspects:
1. Differences in keys used for encryption and decryption:From the above description of the symmetric key algorithm and asymmetric key algorithm, we can see that the same key used for symmetric key encryption and decryption, or the decryption key can be easily introduced from the encryption key; however, different keys are used for encryption and decryption by asymmetric key algorithms. One of them is difficult to launch another key.
2. algorithm differences:① The symmetric key algorithm uses the grouping encryption technology, that is, the plaintext to be processed is grouped according to a fixed length, and the group uses the key for several iterations to finally obtain the ciphertext. Similarly, under the control of a fixed-length key, decryption is performed several times in a group to obtain plaintext. Asymmetric Key Algorithms use a special mathematical function. The one-way trapdoor function is easy to obtain values from one direction, but it is difficult to reverse computation, or computing is not feasible. During encryption, plaintext is encrypted and transformed using the public key to obtain the ciphertext. The ciphertext is decrypted and transformed using the private key to obtain the plaintext. ② Symmetric key algorithms are characterized by simple encryption, fast encryption and decryption, short keys, and a long history of development. asymmetric key algorithms are characterized by slow encryption and decryption speeds and large key sizes, the development history is short.
3. Differences in key management security:Because the symmetric key algorithm is public, its confidentiality depends on the confidentiality of the key. The keys used by both parties for encryption and decryption are the same, so it is difficult to distribute and replace keys. The asymmetric key algorithm, because the key has been allocated in advance, does not need to transmit the key during the communication process, which greatly improves the security and solves the key management problem.
4. Security:Symmetric key algorithms are public, and their security depends on the length of the group and the length of the key. Common attack methods include: exhaustive key search, Dictionary attacks, and table search attacks, differential password analysis and linear password analysis. The most effective one is differential password analysis. It analyzes the effect of plaintext on the difference value of ciphertext to restore some key bits. The security of asymmetric key algorithms is based on the difficulty of using unidirectional functions, such as the Elliptic Curve Cryptography. Many cryptographic experts think it is an exponential difficulty. From the known algorithm, the-bit Elliptic Curve Cryptography is equivalent to the-bit RSA algorithm.