A-1
LISTING PROGRAM
1. Mainform using using using using
System; System.Collections.Generic; System.Drawing; System.Windows.Forms;
namespace Skripsi_1 { /// <summary> /// Description of MainForm. /// public partial class MainForm : Form { public char[,] kunci = new char[1000,1000]; public int[] barisw = new int[30]; public int[] cipherkunci = new int[1000]; public int bilm,biln,n; public int kolkey, barkey; public int nteks; public MainForm() { InitializeComponent(); } void ToolStripButton1Click(object sender, EventArgs e) { } void ToolStripButton2Click(object sender, EventArgs e) { Form tentang = new About(); tentang.Show(); this.Hide(); } void ENKRIPSIToolStripMenuItemClick(object sender, Eve ntArgs e) { Form enkrip = new Enkripsi(); enkrip.Show(); this.Hide(); } void DEKRIPSIToolStripMenuItemClick(object sender, Eve ntArgs e) { Dekripsi dekrip = new Dekripsi(); dekrip.bilm = bilm; dekrip.biln = biln;
Universitas Sumatera Utara
A-2
dekrip.n = n; for (int i=0; i
Universitas Sumatera Utara
A-3
2. Enkripsi plainteks menggunakan Algoritma ADFGVX Cipher string[] arrkunci1 = new string[] {"A", "D", "F", "G", "V", "X"}; string[,] arrkunci2 = new string[6,6] {{"F","E","D","C","B","A"}, {"G","H","I","J"," K","L"}, {"R","Q","P","O","N","M"}, {"S","T","U","V","W","X"}, { "3","2","1","0","Z","Y"}, {"4","5","6","7","8","9"}}; string tekss = richTextBox1.Text.ToUpper().ToString(); char[] teks = tekss.ToCharArray(); string[] cipher = new string[10000]; nteks = tekss.Length; int l = 0; Stopwatch timer = new Stopwatch(); timer.Start(); for (int i = 0; i < nteks; i++){ if (char.IsLetter(teks[i]) == true){ for (int j =0; j<6; j++){ for (int k =0; k<6; k++){ if (teks[i].ToString() == arrkunci2[j,k]){ cipher[l] = arrkunci1[j]; cipher[l+1] = arrkunci1[k]; l+=2; } } } } else{ cipher[l] = teks[i].ToString(); l+=1; } } double n = Convert.ToDouble(l)/Convert.ToDouble(textBox3.TextLength); char[] txtkunci = textBox3.Text.ToUpper().ToCharArray(); barkey = (Convert.ToInt16( Math.Ceiling(n)))+2; kolkey = textBox3.TextLength; for (int i = 0; i < kolkey; i++){ kunci[0,i] = txtkunci[i]; } for (int i = 0; i
Universitas Sumatera Utara
A-4
else{ kunci[i,j] = Convert.ToChar(cipher[x]); x++; } } } else{ for(int k = kolkey-1; k>=0; k--){ if(cipher[x] == null){ kunci[i,k] = 'x'; } else{ kunci[i,k] = Convert.ToChar(cipher[x]); x++; } } } } char[] tempkey = new char[kolkey]; char[] tempkey1 = new char[10000]; for (int i=0; i
3. Acak Kunci Algoritma Knapsack public int gcd(int p2, int n2){ if (n2 == 0){
Universitas Sumatera Utara
A-5
return p2; } return gcd(n2, p2 % n2); } public bool iscoprime(int p1, int n1){ if (gcd(p1, n1) == 1){ return true; } return false; } void Button4Click(object sender, EventArgs e) { nW = textBox3.TextLength; int jumlah; int n=1; Random r = new Random(); textBox5.Text = textBox3.Text; barisanw[0] = r.Next(1,3); while (n<7){ jumlah = 0; for(int j=0; j<=n-1; j++){ jumlah = jumlah+ barisanw[j]; } barisanw[n] = jumlah + r.Next(1,5); n++; } int jum_elemen = 0; for (int i=0; i<7; i++){ jum_elemen = jum_elemen + barisanw[i]; } for (int i=0; i<7; i++){ textBox7.Text += barisanw[i].ToString()+ " "; } bilm= r.Next(jum_elemen+1,10000); biln=r.Next(255); while(iscoprime(bilm,biln) == false){ bilm=r.Next(jum_elemen+1,10000); biln=r.Next(255); } textBox8.Text = bilm.ToString(); textBox9.Text = biln.ToString(); for (int i=0; i<7; i++){ publik[i] = (barisanw[i]*biln) % bilm; textBox11.Text += publik[i].ToString()+" "; }
4. Enkripsi Plainkey Menggunakan Algoritma Knapsack
Universitas Sumatera Utara
A-6
char[] txtkunci = textBox5.Text.ToCharArray(); string tempbiner; char[] biner = new char[nW]; nW = textBox3.TextLength; Stopwatch timer = new Stopwatch(); timer.Start(); for (int i=0; i
5. Dekripsi cipherkey menggunakan Algoritma Knapsack int invmodulo = Convert.ToInt16(textBox4.Text); string plainkey = ""; Stopwatch timer = new Stopwatch(); timer.Start(); for (int i=0; i
=0; j--){ if (tempplain >= barisw[j]){ tempplain -= barisw[j]; binerplain[i,j] += "1"; } else{ binerplain[i,j] += 0; } } } for (int i=0; i
Universitas Sumatera Utara
A-7
6. Dekripsi Cipherteks Menggunakan Algoritma ADFGVX Cipher string[] arrkunci1 = new string[] {"A", "D", "F", "G", "V", "X"}; string[,] arrkunci2 = new string[6,6] {{"F","E","D","C","B","A"}, {"G","H","I","J" ,"K","L"},{"R","Q","P","O","N","M"}, {"S","T","U","V","W","X"} , {"3","2","1","0","Z","Y"}, {"4","5","6","7","8","9"}}; char[] tempkey = textBox5.Text.ToUpper().ToCharArray(); char[] tempkey1 = new char[1000]; string tempplainteks=""; Stopwatch timer = new Stopwatch(); timer.Start(); for (int i=0; i=0; j--){ tempplainteks+= kunci[i,j].ToString(); } } } char[] tempplainteks1 = tempplainteks.ToCharArray(); int x = 0; while (x
Universitas Sumatera Utara
A-8
break; } else{ textBox8.Text += tempplainteks1[x].ToString(); x+=1; } } timer.Stop(); textBox10.Text = timer.Elapsed.TotalMilliseconds.ToString();
Universitas Sumatera Utara
B-1
Curriculum Vitae
Data Pribadi Nama
: Jul Ilmi Harahap
Alamat
: Desa Hutaimbaru, Kec. Halongonan, Kab. Padang Lawas Utara, Prov. Sumatera Utara
Kode Post
: 22753
Nomor Telepon
: 082370044798
Email
: [email protected]
Jenis Kelamin
: Perempuan
Tanggal Kelahiran
: 28 Oktober 1993
Tempat Kelahiran
: Napa gadung laut
Warga Negara
: Indonesia
Agama
: Islam
Jenjang Pendidikan Periode
Institusi Pendidikan
2000-2006
Sekolah Dasar Negeri 100670 Hutaimbaru
2006-2009
Madrasah Tsanawiyah Swasta Al-Yunusiah, Hutaimbaru,
2009-2012
Sekolah Menengah Atas Negeri 01 Halongonan
2012 - Selesai
S1 Ilmu Komputer, Universitas Sumatera Utara, Medan
Universitas Sumatera Utara
Universitas Sumatera Utara
B-2 Kemampuan
Programming
HTML, Php
Design
Photoshop, CSS
Microsoft
Word, Excel, PowerPoint
Pendidikan Non Formal
Periode/Tahun
Nama Lembaga/Seminar Smartfren “Tren Data Evdo : Kulik Lebih Jauh Lagi Teknologi Rev B”
2012 UKMI Ad-Dakwah Universitas Sumatera Utara “Mentoring Akbar Universitas” IMILKOM (Ikatan Mahasiswa Ilmu Komputer) “What Will You Be 2013” 2013 UKMI Al-Khuwarizmi Fasilkom-Ti Universitas Sumatera Utara “Peserta Kelas Media interaktif dan Web Development” Universitas Sumatera Utara “SENARAI (Seminar Nasional Literasi Informasi) 2014” IMILKOM (Ikatan Mahasiswa Ilmu Komputer) 2014
“Kewirausahaan & Talk Show 2014” UKM Fotografi Universitas Sumatera Utara “Peserta Workshop Dasar VII UKM Fotografi USU” IMILKOM (Ikatan mahasiswa Ilmu Komputer)
2015
“Public Speaking 2015”
Universitas Sumatera Utara
Universitas Sumatera Utara
B-3
Pengalaman Organisasi
Periode/Tahun
2012-2013
2013-2014
Jabatan
Nama Organisasi
Anggota
Ukmi Al-Khuwarizmi Fasilkom-Ti Universitas Sumatera Utara
Sekretaris Devisi
Ukmi Al-Khuwarizmi Fasilkom-Ti Universitas Sumatera Utara
Sekretaris Umum 2015-2016
Unit Kegiatan Mahasiswa (UKM) Fotografi USU
Pengalaman Kerja 1. Internship – Divisi Keuangan Badan Perencanaan dan Pembangunan Daerah Sumatera Utara (2 Juli-14 Agustus 2015)
Universitas Sumatera Utara
Universitas Sumatera Utara