Tables: IP=[2,6,3,1,4,8,5,7]; IP−1=[4,1,3,5,7,2,8,6]; E/P=[4,1,2,3,2,3,4,1]; P4=[2,4,3,1]; P10=[3,5,2,7,4,10,1,9,8,6]; 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]], S1=[[0,1,2,3],[2,0,1,3],[3,0,1,0],[2,1,0,3]] — row = outer bits (b1b4), col = inner (b2b3), output 2 bits.
3. Key Schedule (Worked)
Key K=1010000010. P10: positions [3,5,2,7,4,10,1,9,8,6] → 1000001100. Split (10000∣00110). LS-1 each → (00001∣01100). P8 [6,3,7,4,8,5,10,9] on 0000101100 → K1=10100100. LS-2 more from post-LS-1 halves (00001→00100, 01100→10001) → 0010010001 → P8 → K2=01000011.
4. Full Encryption Trace (Classic Numerical)
P=10111101, keys above. IP [2,6,3,1,4,8,5,7] → 01111010=(L0=0111∣R0=1010). F(R0,K1): E/P [4,1,2,3,2,3,4,1] on 1010 → 11010101; XOR K1 10100100 → 01110001; split (0111∣0001): S0 row 01=1, col 11=3 → S0[1][3]=0=00; S1 row 00=0, col 01=1 → S1[0][1]=1=01; combine 0001 → P4 [2,4,3,1] → 0100. R1=L0⊕F=0111⊕0100=0011; after round 1 (1010∣0011), swap → (0011∣1010). Round 2 with K2=01000011: E/P on 1010 → 11010101 XOR K2 → 10010110; S0 (1001): row 11=3, col 00=0 → 3=11; S1 (0110): row 00, col 11=3 → 3=11; → 1111 → P4 → 1111. R2=0011⊕1111=1100. Pre-output (0011∣1100)=00111100 → IP−1 [4,1,3,5,7,2,8,6] → C=01110110. Decrypt by rerunning with (K2,K1).
5. What S-DES Teaches (Bridge to DES)
- Feistel invertibility: any F 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×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=10100100, K2=01000011) — 5-marker.
- Full 10111101→01110110 trace with S-box row/col indexing — favourite 5–7 marker.
- Decrypt = encrypt with reversed subkeys justification.