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

B-1

DAFTAR RIWAYAT HIDUP

PERSONAL DATA
Full Name
Nick Name
Place/ Date of Birth
Sex
Religion
Nationality
Address
Mobile Phone
E-mail

: Andika Mulia Utama
: Dika
: Bahung Kahean, 09 Agustus 1994
: Male
: Islam
: Indonesia

: Jl. Sei Asahan No 8/22 Medan Baru
: 085225372825
: andikamuliautama@gmail.com

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
COMPUTER SKILL
Programming
Database

IDE
Software
Other

: C++, Java, PHP,HTML
: MySQL
:Eclipse, Dreamweaver,Sharp Developh
:Adobe Photoshop,Office,Operating System
:Public Speaking, Packet Tracer, Project Libre

Universitas Sumatera Utara

B-2

WORKS

No
1

Instance

IKLC(Ilmu computer
Laboratory Center)

Position

Year
2013 - 2017

Lecture

2
3
4

COURSE

No.
Course
1
Ms Office

2
TOEFL PREPARATION
3
4
5

Year
2011
2015

ORGANIZATIONAL EXPERIENCES
No
1
2
3
4
5
6
7
8


Organization
Ilmu Komputer Laboratory Center (IKLC)
SABUN(Sahabat Beasiswa Untuk Negeri)
UKMI AL KHUWARIZMI
Departemen Seleksi Asisten IKLC
Departemen Mutu Asisten IKLC
SGC (Smart Generetion Community)
COM A 2012
MENKOMINFO Asrama PPSDMS NF

Position
Ketua
Ketua UMUM
Dewan Konsultatif
Ketua Divisi
Ketua Divisi
Staf PSDM
Ketua Kelas
Kepala Departemen


Year
2015-2016
2013-2014
2015-2016
2013
2014 - 2015
2014
2012-2016
2014

SEMINARS
No.
1
2
3
4
5
6
7


Seminar
Seminar Motifasi Notes From Katar
Seminar Nasional Kewirausahaan
Seminar Internasional Youth Convention Center
Seminar Nasional LPPPM
Seminar Nasional Senarai
Seminar Public Speaking
Seminar Nasional Bea dan Cukai

Year
2012
2013
2014
2013
2014
2015
2015

Universitas Sumatera Utara


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
void Tulis_Word(string filepath, string tulis){
Microsoft.Office.Interop.Word.Application wordApp
= new Microsoft.Office.Interop.Word.ApplicationClass();


Universitas Sumatera Utara

A-2

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.Add();
Range rng = aDoc.Application.
ActiveDocument.Range(0,0);
rng.Text = tulis;
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);
}
catch(Exception err){
MessageBox.Show(err.Message);
}
finally{
MessageBox.Show("File berhasil ditulis");
}

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
private BigInteger must_gcd_with(BigInteger p){

Universitas Sumatera Utara

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){
BigInteger x1, y1, x2, y2, q, temp, modulo = b;
x1 = y2 = 1;
x2 = y1 = 0;

while (b != 0)
{
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;
}

Universitas Sumatera Utara

A-4

// 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 hasil

= new List();

byte bitcount = 0, bitbuffer = 0;
values = s_values;
susun_char();
encoding();
foreach (byte val in values){
foreach(char ch in eg_encoding[val]){
bitbuffer