SUBKEY GENERATION
Operations
|
|
|
|
|
|
|
|
|
|
|
(B) Apply LS-1 (left shift 1) to each 5-bit
group.
(C) Apply permutation P8:
|
|
|
|
|
|
|
|
|
(D) Apply LS-2 (left shift 2) to each 5-bit group.
To generate KEY1: (A) (B) (C)
To generate KEY2: (A) (B) (D) (C)
The f function: f: (4-bits, 8-bit key) ----------> (4-bits)
(A) Apply expansion/permutation E/P to input
4 bits
|
|
|
|
|
|
|
|
|
(C) Pass the left 4 bits through S-box S0 and the right 4 bits through S-box S1
S0:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
S1:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(1) First and fourth bits give row number
(2) Second and third bits give column number
(3) Look up number in specified row and column
(4) Convert to binary
Let L, R be the left 4 bits and right 4 bits of the input. Then
|
|
|
|
|
|
|
|
|
The permutation IP-1
|
|
|
|
|
|
|
|
|
(1) Apply IP
(2) Apply FKey1
(3) Apply SW
(4) Apply FKey2
(5) Apply IP-1
*Instructions by Laura Sanchis, Colgate University.