Introduction DES encryption algorithm (including Examples)

DES (Data Encryption Standard) algorithm is the most commonly used encryption algorithm. For a long time, many people's minds, "password generator" and has been a synonym for DES.

DES is how to work? In this paper, a simple example to a DES encryption process of a show. Since the birth of automatic DES, many encryption algorithms have adopted similar means of DES. Once you understand the transformation of DES, you will be able to more easily understand the modern encryption algorithms in the doorway.

 

DES processing bits, or binary digits, we know, did not constitute a four-bit hexadecimal number. A set of 64-bit DES encryption of information, that is, 16-bit hexadecimal number. To complete the encryption, DES

 

DES keys get:

We take the hex keys K is:

K = 133457799BBCDFF1

We can get his binary form (1 0001,3 0011, and so on, and did not write a set of eight so the last bit of each group have not been to spend.)

K = 00010011 00110100 01010111 01111001 10011011 10111100 11011111 11110001

Create 16 sub-keys, each 48 bits long

This 64-bit secret key is first converted according to the table PC-1.

Table PC-1

PC-1
57 49 41 33 25 17 9
1 58 50 42 34 26 18
10 2 59 51 43 35 27
19 11 3 60 52 44 36
63 55 47 39 31 23 15
7 62 54 46 38 30 22
14 6 61 53 45 37 29
21 13 5 28 20 12 4

 As the table on the first element 57, which will make the yuan keys of 57 bits into the first of the new keys K +. Similarly, the first 49 yuan keys transformation of 4 yuan keys for the first two new keys for the final transformation of ,,, a new secret key, pay attention to meta keys, only 56 will enter a new secret key, only the table 56 elements.

For example, for the original keys:

K = 00010011 00110100 01010111 01111001 10011011 10111100 11011111 11110001

We will get 56 new keys:

K+ = 1111000 0110011 0010101 0101111 0101010 1011001 1001111 0001111

Then, we will

Guess you like

Origin www.cnblogs.com/LoganChen/p/11432092.html