• Tidak ada hasil yang ditemukan

Implementasi Algoritma Massey-Omura dan Algoritma Elias Gamma pada Simulasi Three-Pass Protocol

N/A
N/A
Protected

Academic year: 2017

Membagikan "Implementasi Algoritma Massey-Omura dan Algoritma Elias Gamma pada Simulasi Three-Pass Protocol"

Copied!
7
0
0

Teks penuh

(1)

B-1

DAFTAR RIWAYAT HIDUP

PERSONAL DATA

Full Name

: Andika Mulia Utama

Nick Name

: Dika

Place/ Date of Birth : Bahung Kahean, 09 Agustus 1994

Sex

: Male

Religion

: Islam

Nationality

: Indonesia

Address

: Jl. Sei Asahan No 8/22 Medan Baru

Mobile Phone

: 085225372825

E-mail

: [email protected]

EDUCATION

Bachelor of Computer Science

University of Sumatera Utara, Medan

121401006

Higher Secondary Education

SMAN 1Dolok Batu Nanggar

2009-2012

Secondary Education

SMP N 1 Dolok Batu Nanggar

2006-2009

Primary Education

SD NEGERI 094127

2000-2006

Programming : C++, Java, PHP,HTML

Database

: MySQL

(2)

WORKS

No

Instance

Position

Year

1

IKLC(Ilmu computer

Laboratory Center)

Lecture

2013 - 2017

2

3

4

COURSE

No. Course Year

1 Ms Office 2011

2 TOEFL PREPARATION 2015

3 4 5

ORGANIZATIONAL EXPERIENCES

No Organization Position Year

1 Ilmu Komputer Laboratory Center (IKLC) Ketua 2015-2016

2 SABUN(Sahabat Beasiswa Untuk Negeri) Ketua UMUM 2013-2014

3 UKMI AL KHUWARIZMI Dewan Konsultatif 2015-2016

4 Departemen Seleksi Asisten IKLC Ketua Divisi 2013

5 Departemen Mutu Asisten IKLC Ketua Divisi 2014 - 2015

6 SGC (Smart Generetion Community) Staf PSDM 2014

7 COM A 2012 Ketua Kelas 2012-2016

8 MENKOMINFO Asrama PPSDMS NF Kepala Departemen 2014

SEMINARS

No. Seminar Year

1 Seminar Motifasi Notes From Katar 2012

2 Seminar Nasional Kewirausahaan 2013

3 Seminar Internasional Youth Convention Center 2014

4 Seminar Nasional LPPPM 2013

5 Seminar Nasional Senarai 2014

6 Seminar Public Speaking 2015

(3)

A-1

LISTING PROGRAM

a.

Fungsi Buka

File

void Word_text(string filepath){

Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();

object filenameO = filepath;

object objFalse = false;

object objTrue = true;

object missing = System.Reflection.Missing.Value;

object emptyData = string.Empty;

try{

Microsoft.Office.Interop.Word.Document aDoc =

wordApp.Documents.Open(ref filenameO, ref objFalse, ref objTrue, ref missing, ref missing, ref missing, ref missing, ref missing,ref missing, ref missing, ref objTrue, ref missing, ref missing,ref missing, ref missing);

aDoc.ActiveWindow.Selection.WholeStory();

aDoc.ActiveWindow.Selection.Copy();

IDataObject data =

System.Windows.Forms.Clipboard.GetDataObject();

plaintext.Text =

data.GetData(System.Windows.Forms.DataFormats.Text).

ToString();

System.Windows.Forms.Clipboard.SetDataObject(string.Empty);

}

catch(Exception err){

MessageBox.Show(err.Message);

}

finally{

MessageBox.Show("File berhasil dibaca");

}

b.

Fungsi Tulis File

(4)

object filenameO = filepath; object objFalse = false; object objTrue = true;

object missing = System.Reflection.Missing.Value; object emptyData = string.Empty;

aDoc.SaveAs(ref filenameO, ref objFalse, ref objFalse,ref missing, ref missing, ref missing, ref missing, ref missing ,ref missing, ref missing, ref objTrue, ref missing, ref mi ssing,ref missing, ref missing);

aDoc.Application.ActiveDocument.Close(WdSaveOptions.wdS aveChanges, ref missing, ref missing);

}

c.

Fungsi

Massey-Omura

public Massey_Omura(BigInteger p){ if (p == 0)

this.p = generate_kunci_prima(); else

this.p = p; do{

e = must_gcd_with(BigInteger.Subtract(this.p,1));

d = Inverse_Modular(e, BigInteger.Subtract(this.p, 1)); }while(BigInteger.GreatestCommonDivisor(e,BigInteger.Subt ract(this.p, 1)) != 1 || (BigInteger.Remainder

(BigInteger.Multiply(d, e), BigInteger.Subtract(this.p,1))) != 1);}

// Acak Prima

private BigInteger generate_kunci_prima(){ BigInteger c_prima;

do{

rng.GetBytes(rnd);

c_prima = BigInteger.Abs(new BigInteger(rnd)); }while(!Lehmann(c_prima));

return c_prima; }

// Acak Kunci Enkripsi

(5)

A-3

BigInteger c_e; do{

rng.GetBytes(rnd);

c_e = BigInteger.Abs(new BigInteger(rnd));

}while(c_e > p || BigInteger.GreatestCommonDivisor(c_e, p) != 1);

return c_e; }

// Pengecekan Prima

private bool Lehmann(BigInteger p){ BigInteger test;

int putaran = 0; do{

rng.GetBytes(rnd);

test = BigInteger.Remainder(BigInteger.Abs(new BigInteger(rnd)), BigInteger.Subtract(p, 1));

test = (BigInteger)BigInteger.ModPow(test, BigInteger.Divide(BigInteger.Subtract(p, 1),2), p);

if (test != 1 && BigInteger.Subtract(test, p) != -1 return false;

putaran++;

}while(putaran < 10); return true; }

// Acak Kunci Dekripsi

private BigInteger Inverse_Modular(BigInteger a, BigInteger b){

q = BigInteger.Divide(a, b); temp = b;

b = BigInteger.Subtract(a, BigInteger.Multiply(q, b)); a = temp;

temp = x2;

x2 = BigInteger.Subtract(x1, BigInteger.Multiply(q, x2)); x1 = temp;

temp = y2;

y2 = BigInteger.Subtract(y1, BigInteger.Multiply(q, y2)); y1 = temp;

}

x1 = x1 > 0 ? x1 : BigInteger.Add(modulo, x1); return x1;

(6)

// Pehitungan Enkripsi

public BigInteger enkripsi(BigInteger p_or_c){ return BigInteger.ModPow(p_or_c, e, p); }

// Perhitungan Dekripsi

public BigInteger dekripsi(BigInteger c){ return BigInteger.ModPow(c, d, p); }

}

d.

Fungsi

Elias Gamma

private static string e_elias_gamma(int i){ if (i == 1)

return "1";

int encoding = 0;

StringBuilder sb = new StringBuilder

int N_zero = (int)(Math.Log10(i) / Math.Log10(2)); int remaining = (int)Math.Pow(2, N_zero); sb.Append('0', N_zero);

sb.Append(1);

sb.Append(Convert.ToString(i % remaining,2).P adLeft(N_zero, '0'));// left padding sebanyak n zero return sb.ToString();

}

// Kompresi

public static byte [] kompresi(byte [] s_values){

flag = 0;

List<byte> hasil = new List<byte>();

byte bitcount = 0, bitbuffer = 0;

values = s_values;

susun_char();

encoding();

foreach (byte val in values){

foreach(char ch in eg_encoding[val]){

bitbuffer <<= 1;

bitbuffer |= byte.Parse(ch.ToString());

bitcount++;

if (bitcount == 8){

hasil.Add(bitbuffer);

bitcount = 0;

(7)

A-5

}

}

}

if (bitcount > 0)

{

byte cagak = Convert.ToByte(new StringBuilder()

.Append(1).Append('0', bitcount).ToString(), 2);

bitbuffer |= cagak;

flag = 1;

hasil.Add(bitbuffer);

}

return hasil.ToArray();

}

//Dekomresi

public static byte [] dekompresi(byte [] s_values){

List<byte> hasil = new List<byte>();

int i = 0;

StringBuilder sb = new StringBuilder();

for (i = 0;i < s_values.Length - 1;i++){

sb.Append(Convert.ToString(s_values[i], 2).PadLeft(8, '0'));

}

if (flag == 1)

sb.Append(Convert.ToString(s_values[i], 2).

Remove(0, 1));

else

sb.Append(Convert.ToString(s_values[i], 2).PadLeft(8, '0'));

decoding(hasil, sb);

return hasil.ToArray();

Referensi

Dokumen terkait

Hasil dari penelitian ini menunjukkan bahwa Rabin dan RSA dapat dikombinasikan dalam skema three-pass protocol dimana data yang dikirim dapat kembali ke bentuk semula. Hasil

Pada pengerjaan skripsi dengan judul Implementasi Algoritma Kriptografi Rsa Dan Rabin Pada Three-Pass Protocol Untuk Pengamanan Data Pada Aplikasi Chat Berbasis Android,

Namun penggunaan kriptografi klasik dengan kombinasi dua algoritma atau lebih masih digunakan oleh sebagian orang karena keserhanaan implementasi dan keamanan yang

public string kalimat; public string nwkalimat; public

Pada sampel pengujian string heterogen, dilihat dari perhitungan R C , C R , SS, waktu kompresi dan dekompresi yang dihasilkan algoritma Punctured Elias Codes dan

Pada sampel pengujian string homogen, dilihat dari perhitungan RC, CR dan SS algoritma Punctured Elias Codes dan Ternary Comma Code hampir sama baiknya, namun waktu

yang akan dibahas adalah bagaimana mengamankan pesan yang dikirim melalui aplikasi pesan singkat atau chat dan tetap menjaga kerahasiaan kunci yang digunakan

Implementasi Three-Pass Protocol dengan Kombinasi Algoritma Beaufort Cipher dan One Time Pad untuk.