08B — Symmetric Deep-Dive

DES Key Expansion — Every Bit Traced

Key 133457799BBCDFF1: PC-1 pick-by-pick to C₀/D₀, shifts every round, PC-2 pick-by-pick to K₁. Companion to 08.

Step 1 · 64-bit key with bit numbers (parity marked *)

# hex 1 3 3 4 5 7 7 9 9 B B C D F F 1 — bits 8,16,24,32,40,48,56,64 are parity (*): bits 1-8: 0 0 0 1 0 0 1 1* # 0x13, parity bit 8=1 bits 9-16: 0 0 1 1 0 1 0 0* # 0x34... bits 17-24: 0 1 0 1 0 1 1 1* ... full: 0001 0011 0011 0100 0101 0111 0111 1001 1001 1011 1011 1100 1101 1111 1111 0001 # bit1=0 bit2=0 bit3=0 bit4=1 ... bit57=1 bit58=1 bit59=1 bit60=1 bit61=0 bit62=0 bit63=0 bit64=1

Step 2 · PC-1 pick-by-pick → C₀ (28 bits)

PC-1 left half picks (key-bit# → value). Parity positions never appear.

# format: PC-1 slot: keybit=value 57=1 49=1 41=1 33=1 25=0 17=0 9=0 → 1111000 1=0 58=1 50=1 42=0 34=0 26=1 18=1 → 0110011 10=0 2=0 59=1 51=0 43=1 35=0 27=1 → 0010101 19=0 11=1 3=0 60=1 52=1 44=1 36=1 → 0101111 C0 = 1111000 0110011 0010101 0101111

Step 3 · PC-1 pick-by-pick → D₀ (28 bits)

63=0 55=1 47=0 39=1 31=0 23=1 15=0 → 0101010 7=1 62=0 54=1 46=1 38=0 30=0 22=1 → 1011001 14=1 6=0 61=0 53=1 45=1 37=1 29=1 → 1001111 21=0 13=0 5=0 28=1 20=1 12=1 4=1 → 0001111 D0 = 0101010 1011001 1001111 0001111

Step 4 · Left shifts — every round (C₀/D₀ → C₁₆/D₁₆)

# LS-n = rotate left by n (drop MSBs, append). Schedule: 1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1 C0 = 1111000 0110011 0010101 0101111 C1 = 1110000 1100110 0101010 1011111 # LS-1: drop 1, append 1 D0 = 0101010 1011001 1001111 0001111 D1 = 1010101 0110011 0011110 0011110 # LS-1: drop 0, append 0 # Round 2 (LS-1 again) for reference: C2 = 1100001 1001100 1010101 0111111 # C1<<<1 D2 = 0101010 1100110 0111100 0111101 # D1<<<1 # Rounds 3–8 LS-2, round 9 LS-1, rounds 10–15 LS-2, round 16 LS-1. # Total = 4×1+12×2 = 28 → C16=C0, D16=D0 (cycle, so decryption reverses).
Round12345678910111213141516
Shift1122222212222221

Step 5 · C₁‖D₁ (56 bits, positions 1–56)

C1 (1–28): 1 1 1 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 1 1 1 1 1 D1 (29–56): 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 1 1 0 0 0 1 1 1 1 0

Step 6 · PC-2 pick-by-pick → K₁ (48 bits → hex)

PC-2 picks 48 of 56. Format out←in=value, grouped to bytes.

# Row 1 (out 1–8): 1←14=0 2←17=0 3←11=0 4←24=1 5←1=1 6←5=0 7←3=1 8←28=1 → 00011011 = 1B # Row 2 (out 9–16): 9←15=0 10←6=0 11←21=0 12←10=0 13←23=0 14←19=0 15←12=1 16←4=0 → 00000010 = 02 # Row 3 (out 17–24): 17←26=1 18←8=1 19←16=1 20←7=0 21←27=1 22←20=1 23←13=1 24←2=1 → 11101111 = EF # Row 4 (out 25–32): 25←41=1 26←52=1 27←31=1 28←37=1 29←47=1 30←55=1 31←30=0 32←40=0 → 11111100 = FC # Row 5 (out 33–40): 33←51=0 34←45=1 35←33=1 36←48=1 37←44=0 38←49=0 39←39=0 40←56=0 → 01110000 = 70 # Row 6 (out 41–48): 41←34=0 42←53=1 43←46=1 44←42=1 45←50=0 46←36=0 47←29=1 48←32=0 → 01110010 = 72 K1 = 1B 02 EF FC 70 72 ✓ textbook vector

All 16 subkeys (run your schedule against these)

RK (hex)ShRK (hex)Sh
11B02EFFC707219FEC23342AE171
279AED9DBC9E5110E954204B867D2
355FC8A42CF99211355F5200B5BC2
472ADD6DB351D212A6F3AEB2F3D82
57CEC07EB53A821364FDB12387582
663A53E507B2F214D5FB03E22B812
7EC84B7F618BC215E960AF9129D72
8F78A3AC536562161B96167871961
Exam one-liner: PC-1 drops parity → split C₀/D₀ → LS per schedule → PC-2 compresses to 48. Reproduce C₀, C₁/D₁, and the 48-pick K₁ above and you own the key schedule.
← Prev
08 · DES / Feistel
Next →
09 · RSA