Реферат: Гибридная система шифрования ГСШ-11
Procedure TForm1.Posl;//Формирование псевдослуч. посл-ти
Var Q: array of byte;
k:Byte;
j,i:Integer;
Begin
Setlength(Q,Length(Z));
Setlength(C,Trunc(IntPower(2,Length(Z))));
For j:=0 to Length(Z)-1 do
Q[j]:=key[j];
j:=0;
While j<Trunc(IntPower(2,Length(Z))) do
Begin
i:=High(Z);
p:=Q[i];
While i>0 do
Begin
If Z[i-1]=1 then p:=p xor q[i-1];
i:=i-1;
End;
C[j]:=Q[High(Q)];
For k:=High(Q) downto 1 do
Q[k]:=Q[k-1];
Q[0]:=p;
p:=0;
For k:=0 to High(Q) do
If Q[k]=key[k] then p:=p+1;
If p=Length(Q) then Begin
p:=j;
j:=Trunc(IntPower(2,Length(Z)));