Professional Documents
Culture Documents
% 2017-CE-008
clc
load('DES (Constants).mat')
Keyb = [1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1
1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1
1 0 1 0];
Disp(strcat('Input Key :',binaryVectorToHex(Keyb)));
RoundKeys = DESKeyGen(Keyb,PC1,PC2,Key_schedule);
for i=1:16
disp(strcat('Round Key',
int2str(i),':',binaryVectorToHex(RoundKeys(i, :))))
end
'Round Key2:1F4989D9DE7C'
'Round Key3:1B2989D9FEBC'
'Round Key4:192C8DB97EBD'
'Round Key5:512C8CBB7AB7'
'Round Key6:50ACA4B76BB7'
'Round Key7:D0AC26B72BD7'
'Round Key8:E0A626F7A3D7'
'Round Key9:E0B626F7A3CF'
'Round Key10:E0966276B7CF'
'Round Key11:E0D2727EB5EF'
'Round Key12:A4D3526EFDEB'
'Round Key13:2653536EFD7B'
'Round Key14:2F5151EFDD7A'
'Round Key15:0F41D9CDDF7A'
'Round Key16:0F41D9DDDF78'