Block Ciphers · Cryptography and Network Security

Simplified DES

Watch lectures

Simplified DES

1. Why S-DES Exists (Teaching Model of DES)

Simplified DES (Schaefer, 1996 — Appendix B of Stallings) is a toy 8-bit-block, 10-bit-key Feistel cipher with the exact structure of DES: initial permutation, 2 Feistel rounds with expansion/XOR/S-box, key schedule with shifts. Learn it once and real DES (Topic 3) is just bigger tables + 16 rounds. BEU asks full S-DES encrypt/decrypt traces — master the pipeline order.

2. Algorithm Pipeline (Memorize Order)

Key 10 bits → P10 → LS-1 → P8 → K1 ; LS-2 more → P8 → K2
Plain 8 bits → IP → (L0 | R0)
Round 1: L1 = R0 ; R1 = L0 ⊕ F(R0, K1)     [F = E/P → XOR K → S0/S1 → P4]
Swap (L1 | R1) → (R1 | L1)
Round 2: same with K2
→ IP⁻¹ → Cipher 8 bits
Decrypt: same steps, subkeys reversed (K2 then K1)

Tables: IP=[2,6,3,1,4,8,5,7]IP = [2,6,3,1,4,8,5,7]; IP−1=[4,1,3,5,7,2,8,6]IP^{-1} = [4,1,3,5,7,2,8,6]; E/P=[4,1,2,3,2,3,4,1]E/P = [4,1,2,3,2,3,4,1]; P4=[2,4,3,1]P4 = [2,4,3,1]; P10=[3,5,2,7,4,10,1,9,8,6]P10 = [3,5,2,7,4,10,1,9,8,6]; P8=[6,3,7,4,8,5,10,9]P8 = [6,3,7,4,8,5,10,9]. S-boxes: S0=[[1,0,3,2],[3,2,1,0],[0,2,1,3],[3,1,3,2]]S0 = [[1,0,3,2],[3,2,1,0],[0,2,1,3],[3,1,3,2]], S1=[[0,1,2,3],[2,0,1,3],[3,0,1,0],[2,1,0,3]]S1 = [[0,1,2,3],[2,0,1,3],[3,0,1,0],[2,1,0,3]] — row = outer bits (b1b4)(b_1 b_4), col = inner (b2b3)(b_2 b_3), output 2 bits.

3. Key Schedule (Worked)

Key K=1010000010K = 1010000010. P10: positions [3,5,2,7,4,10,1,9,8,6][3,5,2,7,4,10,1,9,8,6] → 10000011001000001100. Split (10000∣00110)(10000 | 00110). LS-1 each → (00001∣01100)(00001 | 01100). P8 [6,3,7,4,8,5,10,9][6,3,7,4,8,5,10,9] on 00001011000000101100 → K1=10100100K_1 = 10100100. LS-2 more from post-LS-1 halves (00001→00100(00001 \to 00100, 01100→10001)01100 \to 10001) → 00100100010010010001 → P8 → K2=01000011K_2 = 01000011.

4. Full Encryption Trace (Classic Numerical)

P=10111101P = 10111101, keys above. IP [2,6,3,1,4,8,5,7][2,6,3,1,4,8,5,7] → 01111010=(L0=0111∣R0=1010)01111010 = (L_0 = 0111 | R_0 = 1010). F(R0,K1)F(R_0, K_1): E/P [4,1,2,3,2,3,4,1][4,1,2,3,2,3,4,1] on 10101010 → 1101010111010101; XOR K1K_1 1010010010100100 → 0111000101110001; split (0111∣0001)(0111 | 0001): S0 row 01=101 = 1, col 11=311 = 3 → S0[1][3]=0=00S0[1][3] = 0 = 00; S1 row 00=000 = 0, col 01=101 = 1 → S1[0][1]=1=01S1[0][1] = 1 = 01; combine 00010001 → P4 [2,4,3,1][2,4,3,1] → 01000100. R1=L0⊕F=0111⊕0100=0011R_1 = L_0 \oplus F = 0111 \oplus 0100 = 0011; after round 1 (1010∣0011)(1010 | 0011), swap → (0011∣1010)(0011 | 1010). Round 2 with K2=01000011K_2 = 01000011: E/P on 10101010 → 1101010111010101 XOR K2K_2 → 1001011010010110; S0 (1001)(1001): row 11=311 = 3, col 00=000 = 0 → 3=113 = 11; S1 (0110)(0110): row 0000, col 11=311 = 3 → 3=113 = 11; → 11111111 → P4 → 11111111. R2=0011⊕1111=1100R_2 = 0011 \oplus 1111 = 1100. Pre-output (0011∣1100)=00111100(0011 | 1100) = 00111100 → IP−1IP^{-1} [4,1,3,5,7,2,8,6][4,1,3,5,7,2,8,6] → C=01110110C = 01110110. Decrypt by rerunning with (K2,K1)(K_2, K_1).

5. What S-DES Teaches (Bridge to DES)

  • Feistel invertibility: any FF works — decrypt = same circuit, reversed subkeys.
  • Confusion from S-boxes (nonlinear), diffusion from E/P + P4 + swaps.
  • S-DES is insecure (10-bit key, 2 rounds, 4×44 \times 4 S-boxes) — its value is purely pedagogical; DES scales every table up.

Exam Points

  • Pipeline order + all six tables (IP, IP⁻¹, E/P, P4, P10, P8) — 2-mark recalls.
  • Key-schedule numerical (1010000010→K1=101001001010000010 \to K_1 = 10100100, K2=01000011K_2 = 01000011) — 5-marker.
  • Full 10111101→0111011010111101 \to 01110110 trace with S-box row/col indexing — favourite 5–7 marker.
  • Decrypt = encrypt with reversed subkeys justification.
Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.

← All Cryptography and Network Security modules