CSS411 Cryptography

DES

Data Encryption Standard: structure, DES function, key generation, analysis and Triple DES.

42 min read

IntroductionSearch on YouTube

HistorySearch on YouTube

DES came from a public request for proposals:

  • In 1973, NIST published a request for proposals for a national symmetric-key cryptosystem.
  • A proposal from IBM, a modification of a project called Lucifer, was accepted as DES.
  • DES was published in the Federal Register in March 1975 as a draft of the Federal Information Processing Standard (FIPS).

DES is the historical reference block cipher. Its structure is a larger version of S-DES, so many steps look familiar.

OverviewSearch on YouTube

DES is a block cipher. It encrypts 64-bit blocks with a 56-bit key (deck Figure 6.1):

FlowInputOutput
Encryption (DES cipher)64-bit plaintext, 56-bit key64-bit ciphertext
Decryption (DES reverse cipher)64-bit ciphertext, 56-bit key64-bit plaintext

The key enters the key generator as 64 bits with parity bits. The parity drop removes 8 bits, so the real key has 56 bits. The key space is:

256=7.2×1016 values2^{56} = 7.2 \times 10^{16} \text{ values}

Exams mix two 64-bit values. One is the 64-bit plaintext block. The other is the 64-bit key with parity bits, which reduces to 56 key bits. Write both correctly.

DES structureSearch on YouTube

General structureSearch on YouTube

DES uses 16 rounds. Each round is a Feistel cipher. The full pipeline:

  1. The 64-bit plaintext goes through the initial permutation (IP).
  2. The key goes through Permuted Choice 1 (PC-1), the parity drop, which gives 56 bits.
  3. For each round, the key generator does a left circular shift on the two 28-bit key halves. Then Permuted Choice 2 (PC-2) compresses the 56 bits to the 48-bit round key KiK_i.
  4. Each of the 16 rounds uses one round key K1…K16K_1 \dots K_{16}.
  5. A 32-bit swap and the inverse initial permutation (IP−1\text{IP}^{-1}), also called the final permutation, give the 64-bit ciphertext.

The deck shows two equal views of the end of the cipher. The Stallings figure has 16 rounds with a swap in each round, then one extra 32-bit swap. The Forouzan figure has no swapper in round 16. The two views give the same ciphertext.

Structure order: IP, 16 Feistel rounds (with K1…K16K_1 \dots K_{16}), swap, IP−1\text{IP}^{-1}. Key bits arrive as 64, lose 8 parity bits, shift in two 28-bit halves, then compress to 48. The data stays as two 32-bit halves through all rounds.

Initial and final permutationsSearch on YouTube

The initial permutation moves each of the 64 bits to a new position. For example, input bit 1 goes to output position 40, and input bit 2 goes to output position 8. The final permutation is the exact inverse of the IP. Read each table left to right, row by row. Entry nn gives the input bit that goes to output position nn.

Initial permutation:

IP5850423426181002
Row 26052443628201204
Row 36254463830221406
Row 46456484032241608
Row 55749413325170901
Row 65951433527191103
Row 76153453729211305
Row 86355473931231507

Final permutation:

FP4008481656246432
Row 23907471555236331
Row 33806461454226230
Row 43705451353216129
Row 53604441252206028
Row 63503431151195927
Row 73402421050185826
Row 83301410949175725

Permutation examplesSearch on YouTube

Example 1. Find the output of the final permutation when the input is:

0x0000  0080  0000  00020x0000 \; 0080 \; 0000 \; 0002

Only bits 25 and 63 are 1s. The final permutation sends input bit 25 to output bit 64 and input bit 63 to output bit 15. The result is:

0x0002  0000  0000  00010x0002 \; 0000 \; 0000 \; 0001

Example 2. Prove that the IP and the final permutation are inverses. Find the IP output when the input is 0x0002  0000  0000  00010x0002 \; 0000 \; 0000 \; 0001.

The input has only two 1s, so the output also has only two 1s. From the IP table, input bit 15 becomes output bit 63, and input bit 64 becomes output bit 25. The output has 1s at bits 25 and 63:

0x0000  0080  0000  00020x0000 \; 0080 \; 0000 \; 0002

The round trip gives the start value again. Thus the two permutations are inverses, as IP and IP−1^{-1} are in S-DES.

A roundSearch on YouTube

Each round takes Li−1L_{i-1} and Ri−1R_{i-1} (32 bits each) and has two parts:

  • Mixer: Li−1L_{i-1} XORs with f(Ri−1,Ki)f(R_{i-1}, K_i).
  • Swapper: the two halves change places.
Li=Ri−1,Ri=Li−1⊕f(Ri−1,Ki)L_i = R_{i-1}, \qquad R_i = L_{i-1} \oplus f(R_{i-1}, K_i)
Li-1​32 bitsRi-1​32 bitsKi​48 bitsfexpand, S-box, PmixerswapperLi​ = Ri-1​Ri​Li-1​ ⊕ f(Ri-1​, Ki​)
One DES round: the right half goes through f with the round key, the result XORs into the left half, then the halves swap.

The DES functionSearch on YouTube

Function overviewSearch on YouTube

The heart of DES is the DES function. It applies a 48-bit key to the rightmost 32 bits and produces a 32-bit output.

f(Ri−1,Ki)⟶32-bit outputf(R_{i-1}, K_i) \longrightarrow \text{32-bit output}

The DES function has four parts:

  1. Expansion P-box: Ri−1R_{i-1} expands from 32 bits to 48 bits.
  2. XOR: the expanded Ri−1R_{i-1} XORs with the 48-bit round key KiK_i.
  3. S-boxes: 8 substitution boxes change the 48 bits back to 32 bits.
  4. Straight P-box: a 32-bit permutation gives the 32-bit output.

Expansion P-boxSearch on YouTube

Ri−1R_{i-1} has 32 bits and KiK_i has 48 bits, so DES first expands Ri−1R_{i-1} to 48 bits. The input splits into eight 4-bit sections. Each section becomes 6 bits: it gets one bit from each neighbor section. Thus 16 of the 32 input bits appear twice. At the ends, the bits wrap around: output bit 1 takes input bit 32, and the last output bit takes input bit 1.

E320102030405
Row 2040506070809
Row 3080910111213
Row 4121314151617
Row 5161718192021
Row 6202122232425
Row 7242526272829
Row 8282930313201

The relation between input and output can be written as a formula, but DES uses this table to define the P-box. Compare it with E/P in S-DES, which expands 4 bits to 8 bits for the same reason.

XOR with the round keySearch on YouTube

After the expansion permutation, DES XORs the expanded right section with the round key. Both inputs have 48 bits. DES uses the round key only in this operation.

S-boxesSearch on YouTube

The S-boxes do the real mixing (confusion). DES uses 8 S-boxes, each with a 6-bit input and a 4-bit output:

48 bits⟶8×6 bits⟶8×4 bits⟶32 bits48 \text{ bits} \longrightarrow 8 \times 6 \text{ bits} \longrightarrow 8 \times 4 \text{ bits} \longrightarrow 32 \text{ bits}

Each 6-bit chunk selects one row and one column of its S-box:

bit position123456
Userow bit 1columncolumncolumncolumnrow bit 2
  • Bit 1 and bit 6 together give a 2-bit row (0..3).
  • Bits 2..5 (the middle 4) give a 4-bit column (0..15).
  • The table entry (0..15) is the 4-bit output.

Each S-box table has 4 rows and 16 columns, so it has 26=642^6 = 64 entries. This is the DES version of the S-DES rule, where the outer bits also give the row.

S-box examplesSearch on YouTube

Example 1. The input to S-box 1 is 100011100011. The first and sixth bits give 1111, which is row 3. The remaining bits 00010001 give column 1. Row 3, column 1 of S-box 1 holds 1212, which is 11001100:

100011⟶1100100011 \longrightarrow 1100

Example 2. The input to S-box 8 is 000000000000. The first and sixth bits give 0000, which is row 0. The remaining bits 00000000 give column 0. Row 0, column 0 of S-box 8 holds 1313, which is 11011101:

000000⟶1101000000 \longrightarrow 1101

S-box tablesSearch on YouTube

The deck shows only S-box 1. For the other seven boxes, it refers to the textbook. All eight tables are here for reference.

S-box 1:

S1\mathrm{S}_10123456789101112131415
01441312151183106125907
10157414213110612119538
24114813621115129731050
31512824917511314100613

S-box 2:

S2\mathrm{S}_20123456789101112131415
01518146113497213120510
13134715281412011069115
20147111041315812693215
31381013154211671205149

S-box 3:

S3\mathrm{S}_30123456789101112131415
01009146315511312711428
11370934610285141211151
21364981530111212510147
31101306987415143115212

S-box 4:

S4\mathrm{S}_40123456789101112131415
07131430691012851112415
11381156150347212110149
21069012117131513145284
33150610113894511127214

S-box 5:

S5\mathrm{S}_50123456789101112131415
02124171011685315130149
11411212471315015103986
24211110137815912563014
31181271142136150910453

S-box 6:

S6\mathrm{S}_60123456789101112131415
01211015926801334147511
11015427129561131401138
29141552812370410113116
34321295151011141760813

S-box 7:

S7\mathrm{S}_70123456789101112131415
04112141508133129751061
11301174911014351221586
21411131237141015680592
36111381410795015142312

S-box 8:

S8\mathrm{S}_80123456789101112131415
01328461511110931450127
11151381037412561101492
27114191214206101315358
32114741081315129035611

The deck's S-box 1 slide has a typing error in row 1 (columns 7 to 9 read 10, 03, 06). The correct DES values are 01, 10, 06, as in the table above. Each row of an S-box holds every value 0..15 once.

S-box rule: outer bits pick the row, inner four bits pick the column, and the output has 4 bits. For the exam, learn the lookup rule and the two deck examples: S1S_1 input 100011100011 gives 11001100, and S8S_8 input 000000000000 gives 11011101. Do not learn all eight tables by heart.

Straight permutationSearch on YouTube

The straight permutation keeps the size at 32 bits and changes the bit order:

P1607202129122817
Row 20115232605183110
Row 30208241432270309
Row 41913300622110425

After this P-box, the DES function returns 32 bits for the Feistel XOR.

Key generationSearch on YouTube

Parity-bit dropSearch on YouTube

The round-key generator receives a 64-bit key with parity bits. It drops the 8 parity bits (bits 8, 16, ..., 64) and permutes the other 56 bits. The deck's parity-bit drop table (PC-1):

PC-15749413325170901
Row 25850423426181002
Row 35951433527191103
Row 46052443663554739
Row 53123150762544638
Row 63022140661534537
Row 72921130528201204

The output splits into two halves of 28 bits. The left half is the first 28 entries (up to 36 in row 4). The right half is the last 28 entries (from 63 in row 4).

Shift scheduleSearch on YouTube

In each round, the two halves do a left circular shift:

RoundsShift
1, 2, 9, 16one bit
Otherstwo bits
Round12345678910111213141516
Bit shifts1122222212222221

The total shift over the 16 rounds is 4×1+12×2=284 \times 1 + 12 \times 2 = 28 bits. That is one full cycle of a 28-bit half, so each half is back at its start position after round 16.

Shift hook: rounds 1, 2, 9 and 16 shift one bit; the other rounds shift two bits. Think "1 1 at the start, 1 in the middle (9), 1 at the end (16)". The 28 shifts close one full cycle.

Key compressionSearch on YouTube

After the shift in each round, the 56 bits go through the compression P-box (PC-2). It drops 8 bits and gives the 48-bit round key. The deck's key-compression table:

PC-21417112401050328
Row 21506211023191204
Row 32608160727201302
Row 44152313747553040
Row 55145334844493956
Row 63453464250362932

Key generation summarySearch on YouTube

Ki=PC-2(shift(PC-1(key)))K_i = \text{PC-2}(\text{shift}(\text{PC-1}(\text{key})))

The shifts accumulate round by round, with 1 or 2 bits in each round. Each round key is used once, in the XOR of the DES function.

Sizes at a glance:

64⟶PC-156⟶PC-24864 \stackrel{\text{PC-1}}{\longrightarrow} 56 \stackrel{\text{PC-2}}{\longrightarrow} 4832⟶expansion48⟶S-boxes32⟶straight P3232 \stackrel{\text{expansion}}{\longrightarrow} 48 \stackrel{\text{S-boxes}}{\longrightarrow} 32 \stackrel{\text{straight P}}{\longrightarrow} 32

Worked exampleSearch on YouTube

Encryption traceSearch on YouTube

The deck runs one full encryption. All values are hexadecimal. Key: AABB09182736CCDDAABB09182736CCDD. Plaintext: 123456ABCD132536123456ABCD132536. Ciphertext: C0B7A8D05F3A829CC0B7A8D05F3A829C.

StepValue
Plaintext123456ABCD132536123456ABCD132536
After initial permutation14A7D67818CA18AD14A7D67818CA18AD
After splittingL0=14A7D678L_0 = 14A7D678, R0=18CA18ADR_0 = 18CA18AD

The Left column shows LiL_i and the Right column shows RiR_i after each round. Each LiL_i equals Ri−1R_{i-1} from the round before. Round 16 has no swap, so R16=R15R_{16} = R_{15}.

RoundLeftRightRound key
118CA18AD18CA18AD5A78E3945A78E394194CD072DE8C194CD072DE8C
25A78E3945A78E3944A1210F64A1210F64568581ABCCE4568581ABCCE
34A1210F64A1210F6B8089591B808959106EDA4ACF5B506EDA4ACF5B5
4B8089591B8089591236779C2236779C2DA2D032B6EE3DA2D032B6EE3
5236779C2236779C2A15A4B87A15A4B8769A629FEC91369A629FEC913
6A15A4B87A15A4B872E8F9C652E8F9C65C1948E87475EC1948E87475E
72E8F9C652E8F9C65A9FC20A3A9FC20A3708AD2DDB3C0708AD2DDB3C0
8A9FC20A3A9FC20A3308BEE97308BEE9734F822F0C66D34F822F0C66D
9308BEE97308BEE9710AF9D3710AF9D3784BB4473DCCC84BB4473DCCC
1010AF9D3710AF9D376CA6CB206CA6CB2002765708B5BF02765708B5BF
116CA6CB206CA6CB20FF3C485FFF3C485F6D5560AF7CA56D5560AF7CA5
12FF3C485FFF3C485F22A5963B22A5963BC2C1E96A4BF3C2C1E96A4BF3
1322A5963B22A5963B387CCDAA387CCDAA99C31397C91F99C31397C91F
14387CCDAA387CCDAABD2DD2ABBD2DD2AB251B8BC717D0251B8BC717D0
15BD2DD2ABBD2DD2ABCF26B472CF26B4723330C5D9A36D3330C5D9A36D
1619BA921219BA9212CF26B472CF26B472181C5D75C66D181C5D75C66D

After combination: 19BA9212CF26B47219BA9212CF26B472. After the final permutation:

ciphertext=C0B7A8D05F3A829C\text{ciphertext} = C0B7A8D05F3A829C

Decryption traceSearch on YouTube

Bob, at the destination, decrypts the ciphertext from Alice with the same key. Decryption uses the same algorithm with the round keys in reverse order. Bob applies the IP, then 16 rounds with K16K_{16} first and K1K_1 last, then the final permutation.

StepValue
CiphertextC0B7A8D05F3A829CC0B7A8D05F3A829C
After initial permutation19BA9212CF26B47219BA9212CF26B472
After splittingL0=19BA9212L_0 = 19BA9212, R0=CF26B472R_0 = CF26B472
RoundLeftRightRound key
1CF26B472CF26B472BD2DD2ABBD2DD2AB181C5D75C66D181C5D75C66D (K16K_{16})
2BD2DD2ABBD2DD2AB387CCDAA387CCDAA3330C5D9A36D3330C5D9A36D (K15K_{15})
............
155A78E3945A78E39418CA18AD18CA18AD4568581ABCCE4568581ABCCE (K2K_2)
1614A7D67814A7D67818CA18AD18CA18AD194CD072DE8C194CD072DE8C (K1K_1)

After combination: 14A7D67818CA18AD14A7D67818CA18AD. After the final permutation:

plaintext=123456ABCD132536\text{plaintext} = 123456ABCD132536

The values in the decryption trace are the encryption values in reverse order. The Feistel structure lets decryption use the same rounds; only the key order changes.

Exam trap: DES encryption and decryption use the same rounds. The only change is the key order, which runs backwards. When a question asks how Bob decrypts, write "round keys K16K_{16} to K1K_1".

DES analysisSearch on YouTube

Avalanche effectSearch on YouTube

Critics have analyzed DES in detail. Tests measure how strong DES is in some properties that a block cipher must have. Two of these properties are the avalanche effect and completeness.

To check the avalanche effect, the deck encrypts two plaintext blocks with the same key, 22234512987ABB2322234512987ABB23. The plaintexts differ only in the rightmost bit:

PlaintextCiphertext
Block 1000000000000000000000000000000004789FD476E82A5F14789FD476E82A5F1
Block 2000000000000000100000000000000010A4ED5C15A63FEA30A4ED5C15A63FEA3

The two ciphertext blocks differ in 29 bits. Thus a change of about 1.5 percent of the plaintext (1/641/64) gives a change of about 45 percent of the ciphertext (29/6429/64).

Number of bit differences after each round:

Rounds12345678910111213141516
Bit differences162029303332293239332830313029

The difference spreads fast. From round 4 on, it stays between 28 and 39 of the 64 bits.

Avalanche means: if one plaintext bit changes, the ciphertext must look completely different. Without it, an attacker can make small plaintext changes and match the ciphertext changes bit by bit.

Completeness effectSearch on YouTube

Completeness effect means that each bit of the ciphertext must depend on many bits of the plaintext.

Key sizeSearch on YouTube

  • A 56-bit key gives 256=7.2×10162^{56} = 7.2 \times 10^{16} values.
  • A brute-force search looked hard, but advances have made it possible:
    • 1997: broken on the Internet in a few months.
    • 1998: broken on dedicated hardware (EFF) in a few days.
    • 1999: broken by the two methods together in 22 hours.
  • The attacker must still recognize the plaintext when a test key is correct.
  • These results forced users to consider alternatives to DES.

Timing attacksSearch on YouTube

Timing attacks attack the actual implementation of the cipher, not the algorithm:

  • They use knowledge of the effects of an implementation to find some or all subkey bits.
  • They use the fact that calculations can take different times, which depend on the input values.

The main practical weakness of DES is the short 56-bit key. Timing attacks show that an implementation can also leak secret data.

Triple DESSearch on YouTube

AlgorithmSearch on YouTube

Triple DES (3DES) is the practical answer to the short DES key.

  • 3DES uses a block of 64 bits.
  • It uses three DES keys K1K_1, K2K_2, K3K_3, each of 56 bits.
  • The encryption follows an EDE sequence:
C=E(K3,D(K2,E(K1,P)))C = E(K_3, D(K_2, E(K_1, P)))
  • In words: DES encrypt with K1K_1, DES decrypt with K2K_2, then DES encrypt with K3K_3.

DecryptionSearch on YouTube

Decryption does the reverse steps. It uses the keys in reverse order, and each cipher becomes its reverse cipher:

P=D(K1,E(K2,D(K3,C)))P = D(K_1, E(K_2, D(K_3, C)))

The deck figure shows encryption as DES cipher (K1K_1), DES reverse cipher (K2K_2), DES cipher (K3K_3). Decryption runs from the ciphertext: DES reverse cipher (K3K_3), DES cipher (K2K_2), DES reverse cipher (K1K_1).

ApplicationsSearch on YouTube

  • The electronic payment industry uses Triple DES and continues to develop and publish standards based on it.
  • Microsoft OneNote and Microsoft Outlook 2007 use Triple DES to password-protect user content.

BenefitsSearch on YouTube

  • With a 168-bit key length, 3DES is not open to brute-force attack.
  • 3DES is based on the DES algorithm, so it is easy to change existing software to use Triple DES.

DrawbacksSearch on YouTube

  • It has three times as many rounds as DES, so it is slower.
  • It uses a 64-bit block size. For both efficiency and security, a larger block size is better.
  • Thus NIST issued a call for proposals for the Advanced Encryption Standard (AES) to replace DES.

3DES reasoning chain for the exam. Brute force breaks DES: the 256=7.2×10162^{56} = 7.2 \times 10^{16} keys fell in 22 hours in 1999. 3DES increases the key to 168 bits and reuses DES code. But 3DES is slow and keeps the 64-bit block. Thus NIST called for AES.

Quick self-testSearch on YouTube

What are the input and output sizes in DES, and what happens to the key bits?

The input is a 64-bit plaintext and the output is a 64-bit ciphertext. The key has 56 bits. The key generator receives 64 bits with 8 parity bits, and the parity drop (PC-1) removes the parity bits first.

How many rounds does DES use and what cipher type is each round?

DES uses 16 rounds, and each round is a Feistel cipher. The round splits the 64-bit state into two 32-bit halves. It applies the DES function to the right half with the round key. It XORs the result into the left half, then swaps the halves.

Show that the IP and the final permutation are inverses, with the deck example.

Input 0x00000080000000020x0000 0080 0000 0002 has bits 25 and 63 set. The final permutation sends bit 25 to output 64 and bit 63 to output 15, which gives 0x00020000000000010x0002 0000 0000 0001. The IP sends bit 15 to 63 and bit 64 to 25, which gives 0x00000080000000020x0000 0080 0000 0002 again.

List the four parts of the DES function and their sizes.

Expansion P-box: 32 to 48 bits. XOR with the 48-bit round key. Eight S-boxes: eight 6-bit inputs give eight 4-bit outputs, so 48 bits become 32 bits. Straight P-box: 32 to 32 bits.

How does an S-box change a 6-bit input into 4 bits?

Bit 1 and bit 6 give a 2-bit row index (0..3). Bits 2 to 5 give a 4-bit column index (0..15). The table entry at that row and column is the 4-bit output. Example: S-box 1, input 100011100011, row 3 and column 1 give 12, so the output is 11001100.

Give the DES key schedule sizes and the shift schedule.

PC-1 keeps 56 of the 64 key bits and splits them into two 28-bit halves. In each round, the halves do a left circular shift. The shift is 1 bit in rounds 1, 2, 9 and 16, and 2 bits in the other 12 rounds. The total is 28 bits, one full cycle. PC-2 then compresses 56 bits to the 48-bit KiK_i.

Trace the deck's worked encryption example.

Key AABB09182736CCDDAABB09182736CCDD, plaintext 123456ABCD132536123456ABCD132536. After the IP: 14A7D67818CA18AD14A7D67818CA18AD, so L0=14A7D678L_0 = 14A7D678 and R0=18CA18ADR_0 = 18CA18AD. After 16 rounds with keys 194CD072DE8C194CD072DE8C to 181C5D75C66D181C5D75C66D, L16=19BA9212L_{16} = 19BA9212 and R16=CF26B472R_{16} = CF26B472. The combination is 19BA9212CF26B47219BA9212CF26B472, and the final permutation gives C0B7A8D05F3A829CC0B7A8D05F3A829C.

How does Bob decrypt, with the deck trace?

Bob uses the same rounds with the keys in reverse order. After the IP, ciphertext C0B7A8D05F3A829CC0B7A8D05F3A829C gives L0=19BA9212L_0 = 19BA9212 and R0=CF26B472R_0 = CF26B472. Round 1 uses K16=181C5D75C66DK_{16} = 181C5D75C66D and round 16 uses K1=194CD072DE8CK_1 = 194CD072DE8C. The combination is 14A7D67818CA18AD14A7D67818CA18AD, and the final permutation gives 123456ABCD132536123456ABCD132536.

Define the avalanche effect and the completeness effect with the deck numbers.

Avalanche: with key 22234512987ABB2322234512987ABB23, the plaintexts 00000000000000000000000000000000 and 00000000000000010000000000000001 give ciphertexts that differ in 29 bits. A 1.5 percent change in the plaintext gives a 45 percent change in the ciphertext. Completeness: each ciphertext bit must depend on many plaintext bits.

Give the strength record of DES and describe timing attacks.

DES has 256=7.2×10162^{56} = 7.2 \times 10^{16} keys. It was broken in 1997 on the Internet in a few months. In 1998, the EFF's dedicated hardware broke it in a few days. In 1999, the two methods together broke it in 22 hours. Timing attacks use the different calculation times of an implementation to find some or all subkey bits.

Give the 3DES formula, its benefits and its drawbacks.

C=E(K3,D(K2,E(K1,P)))C = E(K_3, D(K_2, E(K_1, P))) with three 56-bit keys, and P=D(K1,E(K2,D(K3,C)))P = D(K_1, E(K_2, D(K_3, C))). Benefits: the 168-bit key stops brute force, and existing DES software is easy to change. Drawbacks: three times the rounds makes it slower, and the 64-bit block is small. Thus NIST called for AES as the replacement.

  • DES: block cipher, 64-bit blocks, 56-bit key (256=7.2×10162^{56} = 7.2 \times 10^{16} values), 16 Feistel rounds. IBM based it on Lucifer, and it was published as a draft FIPS in March 1975.
  • Data path: IP, then 16 rounds, then the final permutation (IP−1\text{IP}^{-1}). The DES function expands 32 to 48 bits, XORs KiK_i, uses eight S-boxes to get 32 bits, then does a straight permutation.
  • S-boxes: the outer bits give the row and the middle four bits give the column. S1S_1 input 100011100011 gives 11001100, and S8S_8 input 000000000000 gives 11011101.
  • Key schedule: PC-1 drops the parity bits (64 to 56). The halves shift 1 bit in rounds 1, 2, 9 and 16 and 2 bits in the other rounds. PC-2 compresses 56 to 48 bits. Decryption uses the round keys in reverse order.
  • Analysis: avalanche (one plaintext bit changes about 45 percent of the ciphertext bits) and completeness (each ciphertext bit depends on many plaintext bits).
  • Brute force broke the 56-bit key in 22 hours by 1999. 3DES (EDE, C=E(K3,D(K2,E(K1,P)))C = E(K_3, D(K_2, E(K_1, P))), 168-bit key) replaced DES for a time. It is slow and has a 64-bit block, so NIST called for AES.