Update the output
Count the number of round
Count the number of round
Feistel network
Feistel network
| Li-1 | Ri-1 | (2 x 32 bits) (inBlock) -------------------------------- | | XOR<---(Des function)--| | \|_ Ki | | \ / \_/_ / \ -------------------------------- | Li | Ri | (2 x 32 bits) (outBlock) --------------------------------
Final Permutation of the Block ( swap outBlock in order to have the same feistel network for each round )
DES function In 32 bits | --------------------- | Expansion | (32 -> 48bits) --------------------- | XOR <--------------- Ki (48 bits) | ---- --- --- | S1 |-| S2 |-...-| S8 | (sBox) ---- --- --- | (32 bits) ---------------------- | Permutation | ---------------------- | Out 32 bits
Initial permutation
Key scheduling For encryption : Key 64 bits | ----------------------- | Parity drop | (remove 8 bits => 56 bits) ----------------------- | | (2 x 28 bits) ------------ ------------ | Shift left | | Shift left | Round key Generator 1 ------------ ------------ | | | | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | -------------- | !!! Shifting : 1 shift left for round 1,2,9,16, !!! K1 (48 bits) <--|--| compression | | !!! others rounds 2 shift left !!! | -------------- | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ...
Key scheduling For encryption : Key 64 bits | ----------------------- | Parity drop | (remove 8 bits => 56 bits) ----------------------- | | (2 x 28 bits) ------------ ------------ | Shift left | | Shift left | Round key Generator 1 ------------ ------------ | | | | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | -------------- | !!! Shifting : 1 shift left for round 1,2,9,16, !!! K1 (48 bits) <--|--| compression | | !!! others rounds 2 shift left !!! | -------------- | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ... .... ... ------------ ------------ | Shift left | | Shift left | Round key Generator 16 ------------ ------------ | | -------------- K16 (48bits) <------| compression | --------------
For decryption : Replace the Shift left by a shift right