symmetric encryption (2) symmetric encryption algorithm

Source: Internet
Author: User

The classical symmetric encryption algorithm is DES algorithm, and then derives the enhanced des algorithm of 3DES, TripleDES and so on. Moreover,. NET also provides symmetric encryption algorithms such as RC2, Rijndael, and so on. The details are detailed below.

DES encryption algorithm

The most classical algorithm in symmetric encryption algorithm is DES encryption algorithm. Des encryption uses the method of grouping encryption, using 56-bit key to encrypt 64-bit plaintext, and finally produce 64-bit ciphertext. The basic flow of the DES algorithm is shown in Figure 6-2.

Figure 6-2 des encryption algorithm basic flow

Now make a brief analysis of the entire process in Figure 6-2. Des operates on a 64-bit plaintext grouping m, which is replaced by an initial replacement IP into M0, dividing the M0 plaintext into the left half and the right half m0= (L0,R0), each 32-bit length. Then perform the exact same operation of 16 rounds, which are called function f, in which the data is combined with the key. After the 16-wheel operation, you can see the 16th-round operation, the result of the 15th round on the right (R15) as the final result (L16) of the left-hand operation, while the last result on the right (R16) is the result of the left 15th round (L15) and the result of the function F operation After that, the left and right sections are joined together through an inverse permutation, outputting the ciphertext.

The actual encryption process is divided into two simultaneous processes, the encryption process and the key generation process, as shown in Figure 6-3. Combined with figure 6-2 and figure 6-3, the key generation process is simply explained.

Figure 6-3 Encryption and key generation

As shown in Figure 6-3, in each round of the 16-round cycle, the key position is shifted, and then 48 bits are selected from the 64 bits of the key. The right half of the data is expanded to 48 bits through an extension permutation, and the new 32-bit data is replaced with a different or an operation, replacing it once. The four-step operation forms the function f in Figure 6-2. Then, through another XOR, the output of function f is combined with the left half, and the result becomes the new right half, and the original right half becomes the new left part. The operation was repeated 16 times.

The DES algorithm's decryption process is almost exactly the same as the encryption process, except that the key is used in the opposite order.

More details about the DES algorithm are not within the scope of this book, please refer to the relevant information.

NIST (national Institute of Standards and Technology, American Institute of Standards and Technology) released a new DES Encryption Standard in 1999, and 3DES replaced Des as the new encryption standard. 3DES uses a 168-bit key, triple encryption, but slower. Then, the advanced symmetric secret algorithms such as AES (Advanced encryption Standard, Advanced Encryption Standard) are presented.

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.