Adabiyotlar ro‟yhati
«O‘zbekiston Respublikasida axborotni kriptografik muhofaza qilishni
tashkil etish chora-tadbirlari» to‘g‘risida O‘zbekiston Respublikasi prezidentining qarori.
2. «O‘zbeksiton Respublikasi Axborot Texnologiyalari va Kommunikatsiyalarini Rivojlantirish Vazirligini yaratish haqida» to‘g‘risida O‘zbekiston Respublikasi prezidentining qarori. 2015y.
«Milliy Axborot-kommunikasiya tizimlarining kompyuter xavfsizligini ta‘minlash borasidagi qo‘shimcha chora-tadbirlar to‘g‘risida»gi O‘zbekiston
Respublikasi Prezidentining qarori, 5 - sentabr 2005 – yil.
4. «Axborotning kriptografik himoya vositalarini loyihalashtirish, tayyorlash, ishlab chiqarish, realizasiya qilish, ta‘mirlash va ulardan foydalanish faoliyatini lisenziyalash to‘g‘risidagi nizomni tasdiqlash haqida»gi O‘zbekiston Respublikasi Vazirlar mahkamasining qarori, 21 - noyabr 2007 – yil.
5. Ganiyev S.K., Karimov M.M., Tashev K.A. Axborot xavfsizligi. Oliy o‘quv yurtlari uchun. Aloqachi. 2008.
Akbarov D. Ye. «Axborot xavfsizligini ta‘minlashning kriptografik usullari va ularning qo‘llanilishi» – Toshkent, 2008 – 394 bet.
Легезо, Денис Безопасность финансовых услуг он-лайн. Intelligent Enterprise. 17 марта 2009 года.
Ференец, Вадим ИБ в ТЭКе невозможна без управления доступом
(часть 2-я). CIO: руководитель информационной службы 8 октября 2010.
Экология и безопасность жизнедеятельности: Учебное пособие для студентов ВУЗов/ ред. Л. А. Муравий, 2002.
Белов С.В. Безопасность жизнедеятельности М.: Высшая школа.
2003.
ЁрматовҒ.Ё., Исамухамедов Ё.У. Меҳнатни мухофаза қилиш.
Дарслик. Ўзбекистан нашриёти. Тошкент 2002.
66
Ilova
namespace Symmetrik_Key_Generation
{
partial class Form1
{
private System.ComponentModel.IContainer components = null;
true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
Required method for Designer support - do not modify
the contents of this method with the code editor.
private void InitializeComponent()
{
this.textBox4 = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.comboBox4 = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.comboBox3 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.checkBox4 = new System.Windows.Forms.CheckBox();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.button2 = new System.Windows.Forms.Button();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.label11 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.comboBox6 = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.comboBox5 = new System.Windows.Forms.ComboBox();
this.label6 = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.checkBox6 = new System.Windows.Forms.CheckBox();
this.checkBox5 = new System.Windows.Forms.CheckBox();
67
this.label10 = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button();
this.label8 = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage3.SuspendLayout();
this.groupBox2.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox3.SuspendLayout();
this.tabControl1.SuspendLayout();
this.SuspendLayout();
//
this.textBox4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.textBox4.Location = new System.Drawing.Point(162, 8); this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(273, 22); this.textBox4.TabIndex = 1;
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.label9.Location = new System.Drawing.Point(37, 11); this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(92, 16); this.label9.TabIndex = 14;
this.label9.Text = "Dastlabki kalit";
//
this.tabPage3.BackColor = System.Drawing.Color.SpringGreen; this.tabPage3.Controls.Add(this.button2);
this.tabPage3.Controls.Add(this.groupBox2); this.tabPage3.Controls.Add(this.label3);
this.tabPage3.Controls.Add(this.comboBox3); this.tabPage3.Controls.Add(this.label4);
this.tabPage3.Controls.Add(this.comboBox4);
this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(723, 312); this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "Parametrli algebraga asoslangan kalit generatorlari";
//
this.comboBox4.FormattingEnabled = true; this.comboBox4.Items.AddRange(new object[] { "Parametrli darajaga oshirish", "Parametrli chiziqli kongurent generator", "Parametrli chiziqsiz kongurent generator"});
this.comboBox4.Location = new System.Drawing.Point(105, 20); this.comboBox4.Name = "comboBox4";
this.comboBox4.Size = new System.Drawing.Size(362, 21);
this.comboBox4.TabIndex = 7;
this.comboBox4.SelectedIndexChanged += new
System.EventHandler(this.comboBox4_SelectedIndexChanged);
//
this.label4.AutoSize = true;
68
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label4.Location = new System.Drawing.Point(5, 22); this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(99, 16); this.label4.TabIndex = 8;
this.label4.Text = "Parametr amali";
//
this.comboBox3.FormattingEnabled = true; this.comboBox3.Items.AddRange(new object[] {
"512", "1024",
"2048", "4096"});
this.comboBox3.Location = new System.Drawing.Point(609, 20); this.comboBox3.Name = "comboBox3";
this.comboBox3.Size = new System.Drawing.Size(74, 21); this.comboBox3.TabIndex = 9;
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label3.Location = new System.Drawing.Point(505, 24); this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(105, 16); this.label3.TabIndex = 10;
this.label3.Text = "Kalit uzunligi (bit)";
//
this.groupBox2.Controls.Add(this.checkBox3); this.groupBox2.Controls.Add(this.checkBox4);
this.groupBox2.Controls.Add(this.textBox2);
this.groupBox2.Location = new System.Drawing.Point(12, 90); this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(701, 203); this.groupBox2.TabIndex = 11;
this.groupBox2.TabStop = false; this.groupBox2.Text = "Natija";
//
this.textBox2.Location = new System.Drawing.Point(17, 35); this.textBox2.Multiline = true; this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(669, 162);
this.textBox2.TabIndex = 4;
this.textBox2.TextChanged += new
System.EventHandler(this.textBox2_TextChanged);
//
this.checkBox4.AutoSize = true;
this.checkBox4.Location = new System.Drawing.Point(97, 13); this.checkBox4.Name = "checkBox4";
this.checkBox4.Size = new System.Drawing.Size(86, 17); this.checkBox4.TabIndex = 5;
this.checkBox4.Text = "2 ko`rinishda";
this.checkBox4.UseVisualStyleBackColor = true; this.checkBox4.CheckedChanged += new
System.EventHandler(this.checkBox4_CheckedChanged);
69
//
this.checkBox3.AutoSize = true;
this.checkBox3.Location = new System.Drawing.Point(314, 13); this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(92, 17); this.checkBox3.TabIndex = 6;
this.checkBox3.Text = "16 ko`rinishda";
this.checkBox3.UseVisualStyleBackColor = true; this.checkBox3.CheckedChanged += new
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.button2.Location = new System.Drawing.Point(508, 50); this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(199, 37); this.button2.TabIndex = 12;
this.button2.Text = "Generatsiya qilish";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
this.tabPage2.BackColor = System.Drawing.SystemColors.Desktop; this.tabPage2.Controls.Add(this.button1);
this.tabPage2.Controls.Add(this.groupBox1); this.tabPage2.Controls.Add(this.label2);
this.tabPage2.Controls.Add(this.comboBox2); this.tabPage2.Controls.Add(this.label1);
this.tabPage2.Controls.Add(this.comboBox1);
this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3); this.tabPage2.Size = new System.Drawing.Size(723, 312);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Xesh funksiyalarga asoslangan kalit generatorlari";
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"MD5",
"SHA1",
"SHA256",
"SHA512"});
this.comboBox1.Location = new System.Drawing.Point(105, 33); this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(362, 21); this.comboBox1.TabIndex = 0;
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.label1.Location = new System.Drawing.Point(9, 35); this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(90, 16); this.label1.TabIndex = 1;
this.label1.Text = "Xesh funksiya";
//
70
this.comboBox2.FormattingEnabled = true; this.comboBox2.Items.AddRange(new object[] {
"512", "1024",
"2048", "4096"});
this.comboBox2.Location = new System.Drawing.Point(609, 33); this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(74, 21); this.comboBox2.TabIndex = 2;
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label2.Location = new System.Drawing.Point(505, 37); this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(105, 16); this.label2.TabIndex = 3;
this.label2.Text = "Kalit uzunligi (bit)";
//
this.groupBox1.Controls.Add(this.label11); this.groupBox1.Controls.Add(this.checkBox2);
this.groupBox1.Controls.Add(this.checkBox1); this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Location = new System.Drawing.Point(12, 103); this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(701, 203); this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false; this.groupBox1.Text = "Natija";
//
this.textBox1.Location = new System.Drawing.Point(17, 35); this.textBox1.Multiline = true; this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(669, 162);
this.textBox1.TabIndex = 4;
this.textBox1.TextChanged += new
System.EventHandler(this.textBox1_TextChanged);
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(97, 13); this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(86, 17); this.checkBox1.TabIndex = 5;
this.checkBox1.Text = "2 ko`rinishda";
this.checkBox1.UseVisualStyleBackColor = true; this.checkBox1.CheckedChanged += new
this.checkBox2.AutoSize = true;
this.checkBox2.Location = new System.Drawing.Point(314, 13); this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(92, 17);
71
this.checkBox2.TabIndex = 6;
this.checkBox2.Text = "16 ko`rinishda";
this.checkBox2.UseVisualStyleBackColor = true; this.checkBox2.CheckedChanged += new
System.EventHandler(this.checkBox2_CheckedChanged);
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.label11.Location = new System.Drawing.Point(464, 14); this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(0, 16); this.label11.TabIndex = 7;
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.button1.Location = new System.Drawing.Point(242, 60); this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(225, 37); this.button1.TabIndex = 6;
this.button1.Text = "Generatsiya qilish";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
this.tabPage1.BackColor = System.Drawing.Color.Green; this.tabPage1.Controls.Add(this.label8);
this.tabPage1.Controls.Add(this.button3); this.tabPage1.Controls.Add(this.groupBox3);
this.tabPage1.Controls.Add(this.label6); this.tabPage1.Controls.Add(this.comboBox5);
this.tabPage1.Controls.Add(this.label7); this.tabPage1.Controls.Add(this.comboBox6);
this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3); this.tabPage1.Size = new System.Drawing.Size(723, 312);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Mavjud kalit generatorlari";
//
this.comboBox6.FormattingEnabled = true;
this.comboBox6.Items.AddRange(new object[] {
"Chiziqli kongurent generator",
"Chiziqsiz kongurent generator",
"RC4 generatori",
"AES kalit generatori"});
this.comboBox6.Location = new System.Drawing.Point(105, 20); this.comboBox6.Name = "comboBox6";
this.comboBox6.Size = new System.Drawing.Size(362, 21);
this.comboBox6.TabIndex = 7;
this.comboBox6.SelectedIndexChanged += new
System.EventHandler(this.comboBox6_SelectedIndexChanged);
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
72
this.label7.Location = new System.Drawing.Point(3, 22); this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(100, 16); this.label7.TabIndex = 8;
this.label7.Text = "Generator nomi";
//
this.comboBox5.FormattingEnabled = true; this.comboBox5.Items.AddRange(new object[] {
"512", "1024",
"2048", "4096"});
this.comboBox5.Location = new System.Drawing.Point(609, 20); this.comboBox5.Name = "comboBox5";
this.comboBox5.Size = new System.Drawing.Size(74, 21); this.comboBox5.TabIndex = 9;
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label6.Location = new System.Drawing.Point(505, 24); this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(105, 16); this.label6.TabIndex = 10;
this.label6.Text = "Kalit uzunligi (bit)";
//
this.groupBox3.Controls.Add(this.label10); this.groupBox3.Controls.Add(this.checkBox5);
this.groupBox3.Controls.Add(this.checkBox6); this.groupBox3.Controls.Add(this.textBox3);
this.groupBox3.Location = new System.Drawing.Point(12, 90); this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(701, 203); this.groupBox3.TabIndex = 11;
this.groupBox3.TabStop = false; this.groupBox3.Text = "Natija";
//
this.textBox3.Location = new System.Drawing.Point(17, 35); this.textBox3.Multiline = true; this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(669, 162);
this.textBox3.TabIndex = 4;
this.textBox3.TextChanged += new
System.EventHandler(this.textBox3_TextChanged);
//
this.checkBox6.AutoSize = true;
this.checkBox6.Location = new System.Drawing.Point(97, 13); this.checkBox6.Name = "checkBox6";
this.checkBox6.Size = new System.Drawing.Size(86, 17); this.checkBox6.TabIndex = 5;
this.checkBox6.Text = "2 ko`rinishda";
this.checkBox6.UseVisualStyleBackColor = true; this.checkBox6.CheckedChanged += new
System.EventHandler(this.checkBox6_CheckedChanged);
//
73
this.checkBox5.AutoSize = true;
this.checkBox5.Location = new System.Drawing.Point(314, 13); this.checkBox5.Name = "checkBox5";
this.checkBox5.Size = new System.Drawing.Size(92, 17); this.checkBox5.TabIndex = 6;
this.checkBox5.Text = "16 ko`rinishda";
this.checkBox5.UseVisualStyleBackColor = true; this.checkBox5.CheckedChanged += new
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(452, 16); this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(0, 13); this.label10.TabIndex = 7;
//
this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.button3.Location = new System.Drawing.Point(488, 47); this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(225, 37); this.button3.TabIndex = 12;
this.button3.Text = "Generatsiya qilish";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.label8.Location = new System.Drawing.Point(33, 61); this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(45, 16); this.label8.TabIndex = 13; this.label8.Text = "label8";
//
this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Location = new System.Drawing.Point(0, 38); this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(731, 338); this.tabControl1.TabIndex = 0;
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.SkyBlue;
this.ClientSize = new System.Drawing.Size(729, 394);
this.Controls.Add(this.label9);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.tabControl1);
this.Name = "Form1";
this.Text = "Symmetrik Key Generators";
74
this.Load += new System.EventHandler(this.Form1_Load);
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.tabControl1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBox4; private System.Windows.Forms.Label label9; private System.Windows.Forms.TabPage tabPage3; private System.Windows.Forms.Button button2; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.CheckBox checkBox3; private System.Windows.Forms.CheckBox checkBox4; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.Label label3; private System.Windows.Forms.ComboBox comboBox3; private System.Windows.Forms.Label label4; private System.Windows.Forms.ComboBox comboBox4; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.Button button1; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label11; private System.Windows.Forms.CheckBox checkBox2; private System.Windows.Forms.CheckBox checkBox1; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Label label2; private System.Windows.Forms.ComboBox comboBox2; private System.Windows.Forms.Label label1; private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.Label label8; private System.Windows.Forms.Button button3; private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.Label label10; private System.Windows.Forms.CheckBox checkBox5; private System.Windows.Forms.CheckBox checkBox6; private System.Windows.Forms.TextBox textBox3; private System.Windows.Forms.Label label6; private System.Windows.Forms.ComboBox comboBox5; private System.Windows.Forms.Label label7; private System.Windows.Forms.ComboBox comboBox6; private System.Windows.Forms.TabControl tabControl1;
}
}
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;
75
namespace Symmetrik_Key_Generation
{
class hash
{
public string sha1_xeshing(string str, int size)
{
string result=String.Empty;
for (int i = 0; i < 32; i++)
{
byte[] bytes = Encoding.Unicode.GetBytes(str); SHA1Managed hashstring = new SHA1Managed(); byte[] hash = hashstring.ComputeHash(bytes); string hashString = string.Empty; foreach (byte x in hash)
{
hashString += String.Format("{0:x2}", x);
}
result += hex2binary(hashString);
if (result.Length >= size)
{
break;
}
}
return result.Substring(0,size);
}
public string sha256_xeshing(string str, int size)
{
string result = String.Empty;
for (int i = 0; i < 16; i++)
{
byte[] bytes = Encoding.Unicode.GetBytes(str); SHA256Managed hashstring = new SHA256Managed(); byte[] hash = hashstring.ComputeHash(bytes); string hashString = string.Empty; foreach (byte x in hash)
{
hashString += String.Format("{0:x2}", x);
}
result +=hex2binary(hashString);
if (result.Length >= size)
{
break;
}
}
return result;
}
public string sha512_xeshing(string str, int size)
{
string result = String.Empty;
for (int i = 0; i < 8; i++)
{
byte[] bytes = Encoding.Unicode.GetBytes(str); SHA512Managed hashstring = new SHA512Managed(); byte[] hash = hashstring.ComputeHash(bytes); string hashString = string.Empty; foreach (byte x in hash)
{
hashString += String.Format("{0:x2}", x);
}
result += hex2binary(hashString);
if (result.Length >= size)
{
break;
76
}
}
return result;
}
public string md5_xeshing(string str, int size)
{
string result = String.Empty;
for (int i = 0; i < 32; i++)
{
byte[] bytes = Encoding.Unicode.GetBytes(str); MD5CryptoServiceProvider hashstring = new MD5CryptoServiceProvider(); byte[] hash = hashstring.ComputeHash(bytes); string hashString = string.Empty;
foreach (byte x in hash)
{
hashString += String.Format("{0:x2}", x);
}
result += hex2binary(hashString);
if (result.Length >= size)
{
break;
}
}
return result;
}
private string hex2binary(string hex)
{
string binar = "";
string result = "";
for (int i = 0; i < hex.Length; i++)
{
string rest = "";
rest = Convert.ToString(Convert.ToInt16(hex[i].ToString(), 16), 2);
int uzun = rest.Length;
switch (uzun)
{
case 4: binar = rest;
break;
case 3: binar = "0" + rest;
break;
case 2: binar = "00" + rest;
break;
case 1: binar = "000" + rest;
break;
}
result += binar;
}
return result;
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Symmetrik_Key_Generation
{
class parameter
{
private int parametrli_kupaytirish(int x, int y, int p, int r)
{
int yigindi = (x + y * (1 + r * x)) % p;
return yigindi;
}
77
private int parametrli_daraja_oshirish(int x, int r, int d, int p)
{
int bir=0;
int rest=0;
while (rest != 1)
{
int i = 1;
int sum = 1;
while (sum <= d)
{
sum = (Int16)Math.Pow(2, i);
i++;
}
rest = d - (Int16)Math.Pow(2,i-2);
if (bir > 0)
{
int ikki = daraja_qism(i-2, x, r, p);
bir = parametrli_kupaytirish(bir,ikki, p, r);
}
else
{
bir = daraja_qism(i-2, x, r, p);
}
d = rest;
}
if(rest==1)
{
bir = parametrli_kupaytirish(bir, x, p, r);
}
return bir;
}
private int daraja_qism(int n, int x, int r, int p)
{
int s = x;
for (int i = 0; i < n; i++)
{
s = s * (2 + s * r) % p;
}
return s;
}
public string param_daraja(long son, int size)
{
string result = String.Empty;
int sum = (int) son;
for (int i = 0; i < 200; i++)
{
sum = parametrli_daraja_oshirish(sum, 5, 37, 4096); result += ikkilik(sum);
if (result.Length > size)
{
result = result.Substring(0, size);
break;
}
}
return result;
}
public string ikkilik(int k)
{
string binary = Convert.ToString(k, 2);
return binary;
}
public string chiziqli(long son, int size)
{
long son1 = son;
long sonlar;
78
string binValue = string.Empty;
for (int i = 0; i < 1000; i++)
{
int param_kup = parametrli_kupaytirish(1664525, (int)son1, 4096, 7); sonlar = ( param_kup+ 1013904223) % (long)Math.Pow(2, 32); son1 = sonlar;
binValue += Convert.ToString(sonlar, 2);
if (binValue.Length >= size)
{
break;
}
}
return binValue.Substring(0, size);
}
public string chiziqsiz(long son, int size)
{
long son1 = son;
long sonlar;
string binValue = string.Empty;
for (int i = 0; i < 1000; i++)
{
int param_dar = daraja_qism(1,(int)son1, 5, 4096);
int param_kupay = parametrli_kupaytirish(2049, param_dar, 4096, 5); int param_kup = parametrli_kupaytirish(1664525, (int) son1,4096,5); sonlar = (param_kupay + param_kup + 1013904223) % (long)Math.Pow(2, 32); son1 = sonlar;
binValue += Convert.ToString(sonlar, 2);
if (binValue.Length >= size)
{
break;
}
}
return binValue.Substring(0, size);
}
}
}
79
http://fayllar.org
|