Реферат: Шифрование DES - теория и практика
var
w: byte;
bufer: AnsiString;
begin
for w:= 0 to 16 do
begin
bufer:= Concat(c[w], d[w]);
k[w]:=
Concat(bufer[14], bufer[17], bufer[11], bufer[24], bufer[1], bufer[5],
bufer[3], bufer[28], bufer[15], bufer[6], bufer[21], bufer[10],
bufer[23], bufer[19], bufer[12], bufer[4], bufer[26], bufer[8],
bufer[16], bufer[7], bufer[27], bufer[20], bufer[13], bufer[2],
bufer[41], bufer[52], bufer[31], bufer[37], bufer[47], bufer[55],
bufer[30], bufer[40], bufer[51], bufer[45], bufer[33], bufer[48],
bufer[44], bufer[49], bufer[39], bufer[56], bufer[34], bufer[53],
bufer[46], bufer[42], bufer[50], bufer[36], bufer[29], bufer[32]);
end;
end;
procedure FuncE;
const
s1 : array[0..3, 0..15] of string[4] =
(('1110','0100','1101','0001','0010','1111','1011','1000','0011','1010','0110','1100','0101','1001','0000','0111'),
('0000','1111','0111','0100','1110','0010','1101','0001','1010','0110','1100','1011','1001','0101','0011','1000'),
('0100','0001','1110','1000','1001','0110','0010','1011','1111','1100','1001','0111','0011','1010','0101','0000'),
('1111','1100','1000','0010','0100','1001','0001','0111','0101','1011','0011','1110','1010','0000','1001','1101'));
s2 : array[0..3, 0..15] of string[4] =
(('1111','0001','1000','1110','0110','1011','0011','0100','1001','0111','0010','1101','1100','0000','0101','1010'),
('0011','1101','0100','0111','1111','0010','1000','1110','1100','0000','0001','1010','0110','1001','1011','0101'),
('0000','1110','0111','1011','1010','0100','1101','0001','0101','1000','1100','0110','1001','0011','0010','1111'),