Çàêëþ÷åíèå
 ðåçóëüòàòå âûïîëíåíèÿ êóðñîâîé ðàáîòû áûëà ðàçðàáîòàíà ïðîãðàììà, ðåàëèçóþùàÿ êðèïòîãðàôè÷åñêèé àëãîðèòì øèôðîâàíèÿ è äåøèôðîâàíèÿ ñ èñïîëüçîâàíèåì øèôðà Âèæåíåðà. Ðàçðàáîòàííàÿ ïðîãðàììà íàïèñàíà íà ÿçûêå Delphi ("Äåëôè").
Òàêæå áûëà âûïîëíåíà ýêñïåðèìåíòàëüíàÿ ïðîâåðêà ðàáîòû äàííîé ïðîãðàììû, ïîäòâåðæäàþùàÿ ïðàâèëüíîñòü øèôðîâàíèÿ.
Ñ ðàçâèòèåì ÝÂÌ ïîëèàëôàâèòíûå øèôðû ïåðåñòàëè áûòü ñòîëü óñòîé÷èâûìè ê êðèïòîàòàêàì, è, òàê æå, êàê â ñâîå âðåìÿ è ìîíîàëôàâèòíûå øèôðû, îòîøëè íà çàäíèé ïëàí, ñòàâ ÷àñòüþ èñòîðèè.
Ñïèñîê ëèòåðàòóðû
1.À.Â. ßêîâëåâ, À.À. Áåçáîãîâ, Â.Â. Ðîäèí, Â.Í. Øàìêèí. Êðèïòîãðàôè÷åñêàÿ çàùèòà èíôîðìàöèè. - Òàìáîâ: Èçäàòåëüñòâî ÒÃÒÓ, 2006
2.David, Kahn. On the Origin of a Species. The Codebreakers: The Story of Secret Writing. Simon & Schuster, 1999
3.Henk C.A. van Tilborg, ed. Encyclopedia of Cryptography and Security (First ed.). Springer. pp. 115, 2005
4.Ý. Ì. Ãàáèäóëèí. Êóðñ ëåêöèé ïî Çàùèòå Èíôîðìàöèè. - Ìîñêâà: Èçäàòåëüñòâî ÌÔÒÈ, 2007
.À. Ï. Àëôåðîâ, À. Þ. Çóáîâ, À. Ñ. Êóçüìèí, À. Â. ×åðåìóøêèí. Îñíîâû êðèïòîãðàôèè. - Ìîñêâà: Èçäàòåëüñòâî Ãåëèîñ ÀÐÂ, 2005
Ïðèëîæåíèå À
Øèôð Âèæåíåðà
unit TablVin;
interface, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, , Grids, ComCtrls, ExtCtrls, StdCtrls, Buttons, Menus, hlp;= class(TForm): TPageControl;: TTabSheet;: TTabSheet;: TStringGrid;: TPanel;: TSpeedButton;: TSpeedButton;: TStringGrid;: TPopupMenu;: TMenuItem;: TEdit;: TLabel;: TMemo;: TMemo;: TSpeedButton;: TSpeedButton;: TSpeedButton;: TSpeedButton;: TStatusBar;: TOpenDialog;: TSaveDialog;: TSpeedButton;: TMainMenu;: TMenuItem;: TMenuItem;: TTimer;: TSpeedButton;: TSpeedButton;: TLabel;: TLabel;: TLabel;: TButton;: TButton;: TMenuItem;: TLabel;: TButton;: TButton;FormCreate(Sender: TObject);N1Click(Sender: TObject);FormClose(Sender: TObject; var Action: TCloseAction);Edit1KeyPress(Sender: TObject; var Key: Char);REd1KeyPress(Sender: TObject; var Key: Char);SG2KeyPress(Sender: TObject; var Key: Char);SB1Click(Sender: TObject);SB2Click(Sender: TObject);REd2KeyPress(Sender: TObject; var Key: Char);SB7Click(Sender: TObject);SB3Click(Sender: TObject);SB5Click(Sender: TObject);N3Click(Sender: TObject);SB4Click(Sender: TObject);SB6Click(Sender: TObject);LokBut(Sender: TObject);SpeedButton1Click(Sender: TObject);SpeedButton2Click(Sender: TObject);Button1Click(Sender: TObject);Button2Click(Sender: TObject);N4Click(Sender: TObject);Button3Click(Sender: TObject);Button4Click(Sender: TObject);
{ Private declarations }
{ Public declarations };= ['a'..'z', '0'..'9'];Rez :TStrings; Old1, Old2 :String;:Set of Char; // Äîïóñòèìûåñèìâîëû: TForm1;Det0(Tb :TStringGrid):Boolean;Invert(S :String; N :LongInt):String;KeyR(Tb :TStringGrid; Zn :Char; N :Integer=0):Integer;KeyS(Tb :TStringGrid; Zn :Char; N :Integer=0):Integer;Znak(Tb :TStringGrid; C, R :LongInt):Char;
{$R *.dfm}TForm1.FormCreate(Sender: TObject);ColL :LongInt; Lst :TStrings;:= [];:= 0; // Íîëüñòðîê:=TStringList.Create;.Clear;FileExists( ExtractFilePath(ParamStr(0))+'Grid.cfg' ) Then.LoadFromFile( ExtractFilePath(ParamStr(0))+'Grid.cfg' );:= Lst.Count;.RowCount := ColL;.Free;;
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.Visible:=False;.ActivePage:=TabSheet2;FileExists(ExtractFilePath(ParamStr(0))+'Grid.cfg') Then.Cols[0].LoadFromFile(ExtractFilePath(ParamStr(0))+'Grid.cfg');
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.ColCount := ColL;.RowCount := Sg1.ColCount;
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.Click;(REd1.Lines.Count>0)OR(REd2.Lines.Count>0)Then SB7.Enabled:=True ELSE.Enabled:=False;;Det0(Tb :TStringGrid):Boolean;
VAR R :LongInt; //Çàïîëíåíîñòüòàáëèöû
Det0:=True;R:=0 To Tb.RowCount-1 DoTb.Cells[0, R]='' Then:=True;('ÇÀÏÎËÍÈÒÅÂѨ!'); Break;ELSE Det0:=False;;TForm1.N1Click(Sender: TObject);R, I :LongInt; Ms, Sd :String;Det0(SG2) Then Exit;
//=============================================== Ôèëüòðñèìâîëîâ:= [];I:=0 To Sg2.RowCount - 1 Do:= Cont + [ Znak(Sg2, 0, I) ];;
//===============================================.Enabled:=False;:='';I:=0 To Sg2.RowCount-1 Do:=MS+SG2.Cells[0, I];R:=0 To SG1.RowCount-1 Do.Rows[R].Clear;:=Invert(MS, R);I:=1 to Length(Sd) Do.Rows[R].Add( Sd[I] );;.Enabled:=True;;TForm1.FormClose(Sender: TObject; var Action: TCloseAction);Det0( Sg2 ) = False Then.Cols[0].SaveToFile(ExtractFilePath(ParamStr(0))+'Grid.cfg');;Invert(S :String; N :LongInt):String;S1, S2, Sum :String;(S='')OR(N>Length(S))Then Exit;
///////////////////////////N>0 Then:=''; S2:='';:=Copy(S, 1, N);:=Copy(S, N+1, Length(S)-N);:=S2+S1;:=Sum;ELSEN<=0 Then:=S;;('ÂÍÓÒÐÅÍßßÎØÈÁÊÀ!'); Exit;;;TForm1.Button1Click(Sender: TObject);.showmodal;;TForm1.Button2Click(Sender: TObject);.Visible:=Not SG1.Visible;;TForm1.Button3Click(Sender: TObject);.ActivePage:=TabSheet1;;TForm1.Button4Click(Sender: TObject);.ActivePage:=TabSheet2;;TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);Key OF
'À'..'ß', #8, #9: ;
'à'..'ÿ', 'a'..'z': Key:=Chr(Ord(Key)-32);
'¸', '¨': Key:='¨';
// ELSE Key:=#0;;Not (Key in Cont) Then Key:=#0;;TForm1.REd1KeyPress(Sender: TObject; var Key: Char);Key OF
'À'..'ß', #8, #9, #13, #10, ' ': ;
'à'..'ÿ', 'a'..'z': Key:=Chr(Ord(Key)-32);
'¸', '¨': Key:='¨';
'0'..'9': ;;;TForm1.REd2KeyPress(Sender: TObject; var Key: Char);Key OF
'À'..'ß', #8, #9, #13, #10, ' ': ;
'à'..'ÿ', 'a'..'z': Key:=Chr(Ord(Key)-32);
'¸', '¨': Key:='¨';
'0'..'9': ;
// ELSE Key:=#0;;;TForm1.SG2KeyPress(Sender: TObject; var Key: Char);Key OF
'À'..'ß', #8, #9, #13, #10, ' ': ;
'à'..'ÿ', 'a'..'z': Key:=Chr(Ord(Key)-32);
'¸', '¨': Key:='¨';
'0'..'9': ;
// ELSE Key:=#0;;;KeyR(Tb :TStringGrid; Zn :Char; N :Integer=0):Integer;
Var R :LongInt; // ÎÁÙÅÅ: ñêàíåð ñòîëáöîâ// Îïðåäåëåíèå íîìåðà ñòðîêè êëþ÷à " 1-ûé ñòîëáåö "
Result:=0;R:=0 To Tb.RowCount-1 Do.ProcessMessages();Tb.Cells[N, R]=Zn Then Begin Result:=R; Break; End;;;KeyS(Tb :TStringGrid; Zn :Char; N :Integer=0):Integer;
Var C :LongInt; // ÎÁÙÅÅ: ñêàíåð ñòðîê// Îïðåäåëåíèå íîìåðà ñòîëáöà:=0;
For C:=0 To Tb.ColCount-1 Do.ProcessMessages();Tb.Cells[C, N]=Zn Then Begin Result:=C; Break; End;;;Znak(Tb :TStringGrid; C, R :LongInt):Char;//:=Tb.Cells[C, R][1];;TForm1.SB1Click(Sender: TObject);I, J, K :LongInt; Key, Txt, Oyt :String; Ch :Char; A, B :Longint;// ØÈÔÐÓÅÒEdit1.Text='' Then Exit;.Enabled:=False;.Enabled:=False;.Enabled:=False;.Enabled:=False;.Enabled:=False;.Enabled:=False;:=Edit1.Text;:=1;.Lines.Clear; //×èñòêàK:=0 To REd1.Lines.Count-1 DoOyt:='';:=REd1.Lines.Strings[ K ]; //ÃðóçèìñòðîêóI:=1 To Length(Txt{REd1.Lines.Text})Do.ProcessMessages(); //
///////////////////////////////{REd1.Lines.Text[I]}Txt[I] in Cont{['À'..'ß', '¨']} Then:=Key[J];:=KeyR(SG1, Ch, 0) ; // Èùåìíîìåðñèìâîëàêëþ÷àâñòîëáöå:=Txt[I]; //REd1.text[I];
B:=KeyS(SG1, Ch, 0) ; // Èùåì íîìåð ñèìâîëà òåêñòà â ñòðîêå
//REd2.Text:=REd2.Text+Znak(SG1, B, A);:=Oyt+Znak(SG1, B, A);J<=Length(Key)-1 Then J:=J+1 ELSE J:=1; //ÏåðåáîðÊëþ÷àELSE//:=Txt[ I ];
//REd2.Text:=REd2.Text+Ch;:=Oyt+Ch;;
///////////////////////////////;.Lines.Add(Oyt);;.Enabled:=True;.Enabled:=True;.Enabled:=True;.Enabled:=True;.Enabled:=True;.Enabled:=True;;TForm1.SB2Click(Sender: TObject);I, J, K :LongInt; Key, Txt, Oyt :String; Ch :Char; A, B :Longint;// ÐÀÑØÈÔÐÎÂÛÂÀÅÌEdit1.Text='' Then Exit;.Enabled:=False;.Enabled:=False;.Enabled:=False;.Enabled:=False;.Enabled:=False;.Clear; //×èñòèì:=Edit1.Text;:=1;K:=0 To REd2.Lines.Count-1 DoOyt:='';:=REd2.Lines.Strings[K];.ProcessMessages(); //I:=1 To Length( Txt ) DO.ProcessMessages();