Symmetric encryption is the oldest and most classical encryption standard in the field of computer encryption. Although symmetric encryption is considered no longer a secure encryption method, until now, we have seen no sign of its being eliminated. In many non networked encryption environments, symmetric encryption is sufficient to meet people's needs.
Symmetric encryption uses a single key encryption method, whether encryption or decryption is the same key, that is, "key starts locks". The advantage of symmetric encryption lies in simple operation, convenient management and fast speed. Its disadvantage is that the key in the network transmission is easy to eavesdrop, each key can only be applied once, the key management caused difficulties. The implementation form of symmetric encryption and the openness of cryptographic algorithms make it dependent on the security of the key, not the security of the algorithm.
A symmetric encryption system consists of five parts, which can be expressed as
S={M,C,K,E,D}
The meanings of each letter are as follows:
M: Clear Space, a collection of all clear text.
C: Ciphertext space, the collection of all cipher.
K: Key space, a collection of all keys.
E: Encryption algorithm.
D: Decryption algorithm.
Symmetric encryption and decryption typically follow the process shown in Figure 1-1.
Figure 1-1 Symmetric encryption and decryption process
Now for a brief analysis of Figure 6-1, the sender of the data now wants to send the data securely to the receiver, but there is no way to prevent an attacker from listening to the network between the sender and the receiver, only by encrypting the data. First, the sender to use encryption algorithm e using the key k to send plaintext m encryption, get ciphertext C, this process can be simply expressed as:
C=eK(M)
The sender transmits ciphertext C over the network to the receiver. In the transmission process, if the attacker intercepted the message sent, only to see the ciphertext, do not take the means of cracking can not get the clear text content. After receiving the ciphertext sent by the sender, the receiver also has no way to obtain the plaintext, and the sender must send the key to the receiver by special means. The receiver uses the decryption algorithm to obtain plaintext using key K, which can be expressed as:
M=dK(C)
From this process, it can be realized that the transfer of key K is the most critical step, if the attacker gets K, then it will be easy to crack the ciphertext, because the encryption algorithm is public.
Author: Hyun-Soul
Source: http://www.cnblogs.com/xuanhun/
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/sjjg/