131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
if(fungsi == "bangkitKunci"):
from pythonA import bangkitkanKunci
a = str(sys.argv[1]) global b
b = int(sys.argv[2]) global c
c = int(sys.argv[3]) global d
d = str(sys.argv[4]) global e
153
e = str(sys.argv[5]) gerbang(a)
2.
Module
pythonA.py
import sys, random, time, codecs from PIL import Image
import numpy as np
class Timer(object): '''
timer starts with class initialisation '''
def __init__(self): self.t1= time.time() self.t2= time.time()
def getElapsedlTime(self):
# gets total elapsed from class initialsation self.delta=time.time()-self.t1
return '{0:.3f}'.format(self.delta)
def getTimeDifference(self):
# gets time elapsed from previous reading (for first reading this is equal to total time elapsed getElapsedlTime()
self.delta=time.time()-self.t2
def get_u(biner_n, t):
bin_u = biner_n[0:int(len(biner_n))-t] u = int(bin_u, 2)
return u
154
def modExpSAM(x, y, z): b = toBin(y)
syarat_tdk_terpenuhi = True while syarat_tdk_terpenuhi: p = random.randint(3,10000)
if (p % 4 == 3) and isPrime(p): syarat_tdk_terpenuhi = False
syarat_tdk_terpenuhi = True while syarat_tdk_terpenuhi: q = random.randint(3,10000)
if (q != p) and (q % 4 == 3) and isPrime(q): syarat_tdk_terpenuhi = False
n = p * q return p, q, n
155
def cekKunci(key1, key2):
if (key1 % 4 == 3) and isPrime(key1) and (key2 % 4 == 3) and isPrime(key2) and (key1 != key2):
return "T" else:
return "F"
def enkripsi(P, n): if P < n:
C = modExpSAM(P,2,n) return C
return False
def encryptAll(P, n): C = []
def programEnkripsi(plaintext, kunciPublik): measure=Timer()
P = str(plaintext) n = int(kunciPublik) C = encryptAll(P, n)
C.append(measure.getElapsedlTime()) return C
def autoDekripsi(C, p, q):
156
namaFile = "SUM - hasil dekripsi dari python berupa ASCII.txt" path = "C:\\Users\\hp\\Documents\\" + namaFile
try:
def decryptCiphertext2(C, p, q): measure=Timer()
C = convertListStringCToInt(C) P = []
for i in range(0, len(C)):
minP = autoDekripsi(C[i], p , q) P.append(chr(minP))
stringP = ''.join(P)
et = measure.getElapsedlTime() cetak = []
cetak.append(stringP) cetak.append(et)
temp = tulisHasilDekripsi(stringP) return cetak
def decryptCiphertext(C, p, q): measure=Timer()
et = measure.getElapsedlTime() cetak = []
cetak.append(stringP) cetak.append(et)
temp = tulisHasilDekripsi(stringP) return cetak
def bacaImage(lokasiFile): try:
listGambar = []
myimage = Image.open(lokasiFile).convert('RGB') pix = myimage.load()
width = myimage.size[0]
157
def sequentialSearch(pixels, toleransiWarnaMax): htm = 0
for i in range(0, len(pixels)):
if(pixels[i][0] <= toleransiWarnaMax and pixels[i][1] <= toleransiWarnaMax and pixels[i][2] <= toleransiWarnaMax):
htm += 1 return htm
def cekRuangDanHitam(path, toleransi):
listGambar, width, height, imgAsli = bacaImage(path) if(listGambar == False): return False, False
if(toleransi < 15): toleransi = 15 elif(toleransi > 255): toleransi = 255
hitam = sequentialSearch(listGambar, toleransi) pr = listGambar[len(listGambar)-1][0]
pg = listGambar[len(listGambar)-1][1] pb = listGambar[len(listGambar)-1][2]
if(pr <= toleransi & pg <= toleransi & pb <= toleransi): hitam = hitam - 1
return (hitam * 3) // 4, hitam
def cariHitamDariPath(path, toleransiWarnaMax):
ruang, pjghitam = cekRuangDanHitam(path, toleransiWarnaMax) if(ruang and pjghitam == False): return False
hasil = []
158
def pemetaanHitam(pixels, toleransiWarnaMax): htm = []
for i in range(0, len(pixels)-1):
if(pixels[i][0] <= toleransiWarnaMax and pixels[i][1] <= toleransiWarnaMax and pixels[i][2] <= toleransiWarnaMax):
htm.append(i) return htm
def cekSyaratSebelumEmbed(listHitam, listWarnaC): if(len(listHitam) >= len(listWarnaC)):
return True return False
def transposeMatrix(M):
return [ [ row[i] for row in M ] for i in range(len(M[0])) ]
def sisip(arrayGambar, indexHitam, tinggi, warna):
159
for i in range(len(warna)):
arrayGambar[indexHitam[i]] = warna[i]
if((len(warna)) < len(arrayGambar)):
arrayGambar[indexHitam[len(warna)-1] + 1] = (254,254,254)
stegoImg = transposeMatrix(stegoImg) stegoImg = np.array(stegoImg, "uint8") stegoImg = Image.fromarray(stegoImg) return stego, stegoImg
def simpan(stegoImg):
return stegoImg.save("C:/Users/hp/Documents/stegoimgpy.bmp", "BMP")
def jalankanSisip(intCiphertext, filename, toleransiWarnaMax): measure=Timer()
intCiphertext = list(intCiphertext) ordo = []
160
listCi = splitIntCto4Int(intCiphertext) listWarna = fixLengthBeforeEmbed(listCi)
listGambar, lebar, tinggi, imgAsli = bacaImage(filename) listGambarFilter = filterGambar(listGambar)
hitam = pemetaanHitam(listGambarFilter, toleransiWarnaMax)
syaratEmbed = cekSyaratSebelumEmbed(hitam, listWarna) if(syaratEmbed):
161
binerfix[idx+2] + binerfix[idx+3])162
namaFile = "SUM - hasil dekripsi dari python berupa ASCII.txt" path = "C:\\Users\\hp\\Documents\\" + namaFile
try:
listGambarEkstrak, width, height, imgAsli= bacaImage(path) if(cariTitikPutih(listGambarEkstrak)):
cariCipher = cariCiphertext(listGambarEkstrak) liCE = convertColorEkstrakToListInt(cariCipher) liCE = removeLastZeroOutofRange(liCE)
et = measure.getElapsedlTime() stroutput = "False/" + str(et) return stroutput
3.
Fungsi Pembangkit Kunci pada FormPembangkitKunci.cs
public void runPythonBangkitKunci(){
ProcessStartInfo p = new ProcessStartInfo(); p.FileName = "c:\\Python33\\python.exe"; p.RedirectStandardOutput = true;
p.UseShellExecute = false;
163
p.Arguments = "c:\\skrip\\gate.py "+ "bangkitKunci 0 0 'x' 'x'"; // start the python program with two parameters
try{
using(Process exeProc = Process.Start(p)){ StreamReader s = exeProc.StandardOutput; String output = s.ReadToEnd();
string []r = output.Split(new char[]{' '}); textBoxKunciP.Text = r[0].ToString();
textBoxKunciQ.Text = r[1].ToString(); textBoxKunciN.Text = r[2].ToString(); }
} catch{
MessageBox.Show("Gagal melakukan pembangkit
kunci.", "Kesalahan Proses Pembangkit Kunci", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
void ButtonGenerateClick(object sender, EventArgs e) {
if(!string.IsNullOrWhiteSpace(textBoxKunciP.Text) & !string.IsNullOrWhiteSpace(textBoxKunciQ.Text)){
if(MessageBox.Show("Kunci yang anda tulis sebelumnya akan terhapus. Yakin untuk melanjutkan?", "Peringatan: Pembangkitan
Kunci", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK){
4.
Fungsi Cek Kunci pada FormPembangkitKunci.cs
void ButtonCekKunciClick(object sender, EventArgs e){ if(string.IsNullOrWhiteSpace(textBoxKunciP.Text) | string.IsNullOrWhiteSpace(textBoxKunciQ.Text)){
MessageBox.Show("Pasangan kunci tidak boleh ada yang kosong.", "Kesalahan Kunci", MessageBoxButtons.OK,
MessageBoxIcon.Error);
textBoxKunciN.Text = ""; }
else if(!string.IsNullOrWhiteSpace(textBoxKunciP.Text) & !string.IsNullOrWhiteSpace(textBoxKunciQ.Text)){
string hasil = runPythonCekKunci(); if(String.Equals(hasil, "T")){
int a = int.Parse(textBoxKunciP.Text); int b = int.Parse(textBoxKunciQ.Text); int c = a*b;
textBoxKunciN.Text = c.ToString(); }
else{
MessageBox.Show("Kunci tidak memenuhi syarat.", "Kesalahan Kunci", MessageBoxButtons.OK, MessageBoxIcon.Error);
textBoxKunciN.Text = ""; }
}
164
}
public string runPythonCekKunci(){ string hasil;
int kunci1 = int.Parse(textBoxKunciP.Text); int kunci2 = int.Parse(textBoxKunciQ.Text); ProcessStartInfo p = new ProcessStartInfo(); p.FileName = "c:\\Python33\\python.exe"; p.RedirectStandardOutput = true;
p.UseShellExecute = false;
p.Arguments = "c:\\skrip\\gate.py "+ "cekKunci " + kunci1 + " " + kunci2 + " 'x' 'x'";
try{
using(Process exeProc = Process.Start(p)){ StreamReader s = exeProc.StandardOutput; String output = s.ReadToEnd();
string []r = output.Split(new char[]{' '}); hasil = r[0][0].ToString();
} }
catch{
MessageBox.Show("Gagal dalam melakukan cek kunci.", "Kesalahan Cek Kunci", MessageBoxButtons.OK, MessageBoxIcon.Error);
hasil = ""; }
return hasil; }
5.
Fungsi Enkripsi pada FormEnkripEmbed.cs
void ButtonEnkripsiClick(object sender, EventArgs e){
if(string.IsNullOrWhiteSpace(textBoxKunciPublik.Text)){ MessageBox.Show("Kunci publik belum ada.", "Kesalahan Enkripsi", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else if(string.IsNullOrEmpty(textBoxPesan.Text)){
MessageBox.Show("Tidak ada pesan (plaintext) yang terdeteksi.", "Kesalahan Enkripsi", MessageBoxButtons.OK, MessageBoxIcon.Error);
} else{
string cipherText = runPythonEnkripsi(); }
}
public string runPythonEnkripsi(){ string hasil;
string hasil2;
int n = int.Parse(textBoxKunciPublik.Text); string plaintext = textBoxPesan.Text.ToString(); int pjgPlaintext = textBoxPesan.Text.Length; string pltxt1 = plaintext.Replace("\"","\\\""); int temporary = 0;
ProcessStartInfo p = new ProcessStartInfo(); p.FileName = "c:\\Python33\\python.exe"; p.RedirectStandardOutput = true;
p.UseShellExecute = false;
p.Arguments = "c:\\skrip\\gate.py "+ "enkripsi " + n + " " + temporary + " \"" + pltxt1 + "\" 'x'";
try{
165
using(Process exeProc = Process.Start(p)){ StreamReader s = exeProc.StandardOutput; String output = s.ReadToEnd();
string r = output; hasil = r.ToString();
hasil2 = hasil.Replace(" ",",");
hasil2 = hasil2.Remove(hasil2.Length-1,1); string elapsedTime = hasil2.Split(',').Last(); textBoxWaktuProses.Text = elapsedTime;
hasil2 = hasil2.Remove((hasil2.Length - elapsedTime.Length), elapsedTime.Length);
hasil2 = hasil2.Remove(hasil2.Length-1,1); if(hasil2 == "False"){
MessageBox.Show("Kunci publik tidak memenuhi syarat.", "Kesalahan Melakukan Enkripsi", MessageBoxButtons.OK, MessageBoxIcon.Error);
hasil2 = ""; }
else{
textBoxCiphertext.Text = hasil2.ToString(); try{
string kode = textBoxCiphertext.Text.ToString();
List<string> listHasilSplit = new List<string>(kode.Split(','));
List<Int32> ci = listHasilSplit.ConvertAll(x => Convert.ToInt32(x));
List<char> liChar = new List<char>(ci.ConvertAll(x => Convert.ToChar(x)));
string charToString = string.Join("", liChar.ToArray());
kode = charToString; textBoxCipherASCII.Text =
MessageBox.Show("Berhasil melakukan enkripsi (" + elapsedTime + " detik)", "Informasi", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
} catch{
MessageBox.Show("Kesalahan melakukan enkripsi", "Kesalahan", MessageBoxButtons.OK, MessageBoxIcon.Error);
hasil2 = ""; }
return hasil2; }
6.
Fungsi Cari Titik Hitam pada FormEnkripEmbed.cs
void ButtonCariClick(object sender, EventArgs e){
if(string.IsNullOrEmpty(textBoxPathBrowseImage.Text)){ MessageBox.Show("Gambar belum dipilih.", "Kesalahan Membaca Titik Hitam", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
166
else{
string path = textBoxPathBrowseImage.Text.ToString(); if(string.IsNullOrEmpty(textBoxToleransiMax.Text)){
MessageBox.Show("Batas toleransi maksimum dari nilai warna hitam belum ditentukan.", "Kesalahan Membaca Titik Hitam", MessageBoxButtons.OK, MessageBoxIcon.Error);
} else{
int toleransi = int.Parse(textBoxToleransiMax.Text);
if((toleransi < 15) || (toleransi > 255)){ MessageBox.Show("Toleransi melebihi nilai maksimum.\nNilai harus diantara 15 sampai 255", "Kesalahan", MessageBoxButtons.OK, MessageBoxIcon.Error);
textBoxToleransiMax.Text = ""; textBoxToleransiMax.SelectAll();
void runPythonCekHitamFromPath(string path, int toleransi){ string hasil;
int temporary = 0;
ProcessStartInfo p = new ProcessStartInfo(); p.FileName = "c:\\Python33\\python.exe"; p.RedirectStandardOutput = true;
p.UseShellExecute = false;
p.Arguments = "c:\\skrip\\gate.py "+ "cari " + toleransi + " " + temporary + " \"" + path + "\" 'x'";
try{
using(Process exeProc = Process.Start(p)){ StreamReader s = exeProc.StandardOutput; String output = s.ReadToEnd();
string r = output; hasil = r.ToString();
string[] parts = hasil.Split(','); string hitam = parts[1];
string ruang = parts[0];
textBoxJumlahTitikHitam.Text = hitam;
MessageBox.Show("Jumlah karakter dari pesan rahasia yang dapat disisip sebanyak " + ruang + " karakter", "Informasi
Jumlah Karakter", MessageBoxButtons.OK, MessageBoxIcon.Information); try{
int pjgc = 0; try{
string C = textBoxCiphertext.Text.ToString();
List<string> listHasilSplit = new List<string>(C.Split(','));
List<Int32> ci = listHasilSplit.ConvertAll(x => Convert.ToInt32(x));
List<char> liChar = new List<char>(ci.ConvertAll(x => Convert.ToChar(x)));
string charToString = string.Join("", liChar.ToArray());
pjgc = charToString.Length; }
catch{pjgc = textBoxCiphertext.Text.Length;}
167
finally{
int pjgruanghtm = int.Parse(ruang); if(pjgruanghtm < pjgc){
MessageBox.Show("Penyisipan tidak dapat dilakukan.\nJumlah karakter pesan rahasia melebihi jumlah yang dapat disisip.", "Informasi", MessageBoxButtons.OK,
MessageBoxIcon.Hand);
MessageBox.Show("Kesalahan dalam mencari titik hitam.", "Kesalahan Pencarian Titik Hitam", MessageBoxButtons.OK,
MessageBoxIcon.Error); }
}
7.
Fungsi
Embed
pada FormEnkripEmbed.cs
void ButtonEmbedClick(object sender, EventArgs e){
if(!string.IsNullOrEmpty(textBoxCiphertext.Text)){
string result = textBoxCiphertext.Text.ToString(); try{
List<string> listHasilSplit = new List<string>(result.Split(','));
List<Int32> ci = listHasilSplit.ConvertAll(x => Convert.ToInt32(x));
List<char> liChar = new List<char>(ci.ConvertAll(x => Convert.ToChar(x)));
string charToString = string.Join("", liChar.ToArray());
result = charToString; }
catch{//None}
if(string.IsNullOrEmpty(textBoxPathBrowseImage.Text)){ MessageBox.Show("Cover Image belum dipilih.", "Kesalahan Penyisipan (Embed)", MessageBoxButtons.OK,
MessageBoxIcon.Error); }
else if(string.IsNullOrEmpty(textBoxToleransiMax.Text)){ MessageBox.Show("Batas toleransi maksimum dari nilai warna hitam belum ditentukan.", "Kesalahan Penyisipan (Embed)", MessageBoxButtons.OK, MessageBoxIcon.Error);
} else{
string path =
textBoxPathBrowseImage.Text.ToString(); string cipher = result; int maxTolerance =
int.Parse(textBoxToleransiMax.Text.ToString());
if((maxTolerance < 15) || (maxTolerance > 255)){ MessageBox.Show("Toleransi melebihi nilai maksimum.\nNilai harus diantara 15 sampai 255", "Kesalahan", MessageBoxButtons.OK, MessageBoxIcon.Error);
textBoxToleransiMax.Text = "";
168
textBoxToleransiMax.SelectAll(); }
else{runPyEmbed(cipher, path, maxTolerance);} }
}
else{MessageBox.Show("Tidak ada ciphertext yang terdeteksi.", "Kesalahan", MessageBoxButtons.OK, MessageBoxIcon.Error);}
}
void runPyEmbed(string cipher, string path, int maxTolerance){ string hasil;
int temporary = 0;
string jikapltxt = cipher.Replace("\"","\\\""); cipher = jikapltxt;
ProcessStartInfo p = new ProcessStartInfo(); p.FileName = "c:\\Python33\\python.exe"; p.RedirectStandardOutput = true;
p.UseShellExecute = false;
p.Arguments = "c:\\skrip\\gate.py "+ "embed " + maxTolerance + " " + temporary + " \"" + cipher + "\"" + " \"" + path + "\"";
try{
using(Process exeProc = Process.Start(p)){ StreamReader s = exeProc.StandardOutput; String output = s.ReadToEnd();
string r = output; hasil = r.ToString();
List<string> listHasilSplit = new List<string>(hasil.Split(' '));
if(listHasilSplit[0] == "False"){
MessageBox.Show("Jumlah titik hitam tidak cukup untuk menyembunyikan warna ciphertext.", "Kesalahan: Penyisipan Tidak Dapat Dilakukan", MessageBoxButtons.OK, MessageBoxIcon.Error);
} else{
textBoxWaktuProsesStegano.Text = listHasilSplit[1];
List<string> listSplit = new List<string>(listHasilSplit[0].Split('/'));
List<string> tempR = new List<string>(listSplit[0].Split(','));
List<string> tempG = new List<string>(listSplit[1].Split(','));
List<string> tempB = new List<string>(listSplit[2].Split(','));
List<int> R = tempR.ConvertAll(x => int.Parse(x));
List<int> G = tempG.ConvertAll(x => int.Parse(x));
169
bmp.SetPixel(i,j,Color.FromArgb(255, R[idx], G[idx], B[idx])); idx++;
} }
pictureBoxStegoImage.Image = bmp; }
} }
catch{MessageBox.Show("Kesalahan melakukan penyisipan.\nCoba tutup aplikasi dan lakukan kembali.", "Kesalahan",
MessageBoxButtons.OK, MessageBoxIcon.Error);} }
8.
Fungsi Ekstrak pada FormEkstrakDekrip.cs
void ButtonEkstrakClick(object sender, EventArgs e){ if(pictureBoxStegoImage.Image != null){
string path = textBoxPathStegoImage.Text.ToString(); runPyEkstrak(path);
}
else{MessageBox.Show("Stego-image belum dipilih.", "Kesalahan Ekstrak Gambar", MessageBoxButtons.OK, MessageBoxIcon.Error);} }
void runPyEkstrak(string path){ string hasil;
string hasil2;
ProcessStartInfo p = new ProcessStartInfo(); p.FileName = "c:\\Python33\\python.exe"; p.RedirectStandardOutput = true;
p.UseShellExecute = false;
p.Arguments = "c:\\skrip\\gate.py "+ "ekstrak 15 0 \"" + path + "\"" + " x";
try{
using(Process exeProc = Process.Start(p)){ StreamReader s = exeProc.StandardOutput; String output = s.ReadToEnd();
string r = output; hasil = r.ToString();
List<string> listHasilSplit = new List<string>(hasil.Split('/'));
textBoxWaktuProsesEkstrak.Text = listHasilSplit[1]; hasil2 = listHasilSplit[0];
if(hasil2 == "False"){
MessageBox.Show("Tidak ada pesan rahasia di dalam gambar.", "Hasil Ekstrak Tidak Ada", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
textBoxCiphertext.Text = ""; }
else{
textBoxCiphertext.Text = listHasilSplit[0]; string[] stringSeparators = new
string[]{","};
string[] result; result =
listHasilSplit[0].Split(stringSeparators, StringSplitOptions.None); char[] buffer = new char[result.Length]; Int32 temp;
for(int i = 0; i < result.Length; i++){
170
temp = Convert.ToInt32(result[i]); buffer[i] = Convert.ToChar(temp); }
string charToString = new string(buffer); textBoxPesanAsli.Text = charToString; }
} }
catch{MessageBox.Show("Kesalahan melakukan ekstrak", "Kesalahan", MessageBoxButtons.OK, MessageBoxIcon.Error);} }
9.
Fungsi Dekripsi pada FormEkstrakDekrip.cs
void ButtonDekripsiClick(object sender, EventArgs e){ if(string.IsNullOrWhiteSpace(textBoxKunciP.Text) | string.IsNullOrWhiteSpace(textBoxKunciQ.Text)){
MessageBox.Show("Kunci private tidak boleh kosong.", "Kesalahan Dekripsi", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else if(string.IsNullOrEmpty(textBoxCiphertext.Text)){ MessageBox.Show("Tidak ada ciphertext terdeteksi.", "Kesalahan Dekripsi", MessageBoxButtons.OK, MessageBoxIcon.Error);
} else{
try{
string ciphertext = textBoxCiphertext.Text.ToString();
string[] bufferS = new
string[textBoxCiphertext.Text.ToString().Length]; bufferS = ubahKeInt();
string result =
ConvertStringArrayToStringJoin(bufferS);
List<string> listHasilSplit = new List<string>(ciphertext.Split(','));
List<Int32> ci = listHasilSplit.ConvertAll(x => Convert.ToInt32(x));
List<char> liChar = new List<char>(ci.ConvertAll(x => Convert.ToChar(x)));
string charToString = string.Join("", liChar.ToArray());
ciphertext = charToString;
string plaintext = runPythonDekripsi(ciphertext); }
catch{
string ciphertext = textBoxCiphertext.Text.ToString();
string plaintext = runPythonDekripsi(ciphertext); }
} }
public string ConvertStringArrayToStringJoin(string[] array){ string result = string.Join(",", array);
return result; }
string[] ubahKeInt(){
string C = textBoxCiphertext.Text.ToString();
171
char[] charArr = C.ToCharArray(); int val;
string[] bufferS = new string[charArr.Length]; for(int i = 0; i < charArr.Length; i++){
val = Convert.ToInt32(charArr[i]); bufferS[i] = Convert.ToString(val); }
return bufferS; }
public string runPythonDekripsi(string strIntC){ string hasil;
string hasil2;
int kunciP = int.Parse(textBoxKunciP.Text); int kunciQ = int.Parse(textBoxKunciQ.Text); ProcessStartInfo p = new ProcessStartInfo(); p.FileName = "c:\\Python33\\python.exe"; p.RedirectStandardOutput = true;
p.UseShellExecute = false;
p.Arguments = "c:\\skrip\\gate.py "+ "dek " + kunciP + " " + kunciQ + " " + "\"" + strIntC + "\" 'x'";
try{
using(Process exeProc = Process.Start(p)){ StreamReader s = exeProc.StandardOutput; String output = s.ReadToEnd();
string r = output; hasil = r.ToString();
string[] parts = hasil.Split(' ');
string elapsedTime = parts[parts.Length - 2]; textBoxWaktuProsesDekripsi.Text = elapsedTime; hasil2 = hasil.Remove((hasil.Length -
elapsedTime.Length), elapsedTime.Length);
hasil2 = hasil2.Remove(hasil2.Length-1,1); hasil2 = hasil2.Remove(hasil2.Length-1,1); textBoxPesanAsli.Text = hasil2;
int pjgPesanAsli = hasil2.Length;
textBoxPjgPesanAsli.Text = pjgPesanAsli.ToString(); MessageBox.Show("Berhasil melakukan dekripsi (" + elapsedTime + " detik)", "Informasi", MessageBoxButtons.OK,
MessageBoxIcon.Information); }
} catch{
strIntC = textBoxCiphertext.Text.ToString(); p.FileName = "c:\\Python33\\python.exe"; p.RedirectStandardOutput = true;
p.UseShellExecute = false;
p.Arguments = "c:\\skrip\\gate.py "+ "dek2 " + kunciP + " " + kunciQ + " " + "\"" + strIntC + "\" 'x'";
try{
using(Process exeProc = Process.Start(p)){ StreamReader s = exeProc.StandardOutput; String output = s.ReadToEnd();
string r = output; hasil = r.ToString();
string[] parts = hasil.Split(' ');
string elapsedTime = parts[parts.Length - 2]; textBoxWaktuProsesDekripsi.Text =
elapsedTime;
172
hasil2 = hasil.Remove((hasil.Length - elapsedTime.Length), elapsedTime.Length);
hasil2 = hasil2.Remove(hasil2.Length-1,1); hasil2 = hasil2.Remove(hasil2.Length-1,1); textBoxPesanAsli.Text = hasil2;
int pjgPesanAsli = hasil2.Length; textBoxPjgPesanAsli.Text =
pjgPesanAsli.ToString();
MessageBox.Show("Berhasil melakukan dekripsi (" + elapsedTime + " detik)", "Informasi", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
catch{
strIntC = textBoxPesanAsli.Text.ToString(); p.FileName = "c:\\Python33\\python.exe"; p.RedirectStandardOutput = true;
p.UseShellExecute = false;
p.Arguments = "c:\\skrip\\gate.py "+ "dek2 " + kunciP + " " + kunciQ + " " + "\"" + strIntC + "\" 'x'";
try{
using(Process exeProc = Process.Start(p)){ StreamReader s =
exeProc.StandardOutput;
String output = s.ReadToEnd(); string r = output;
hasil = r.ToString();
string[] parts = hasil.Split(' '); string elapsedTime = parts[parts.Length - 2];
textBoxWaktuProsesDekripsi.Text = elapsedTime;
hasil2 = hasil.Remove((hasil.Length - elapsedTime.Length), elapsedTime.Length);
hasil2 = hasil2.Remove(hasil2.Length-1,1);
hasil2 = hasil2.Remove(hasil2.Length-1,1);
textBoxPesanAsli.Text = hasil2; int pjgPesanAsli = hasil2.Length; textBoxPjgPesanAsli.Text =
pjgPesanAsli.ToString();
MessageBox.Show("Berhasil melakukan dekripsi (" + elapsedTime + " detik)", "Informasi",
MessageBoxButtons.OK, MessageBoxIcon.Information); }
} catch{
MessageBox.Show("Kesalahan melakukan
173
D
AFTAR
R
IWAYAT
H
IDUP
C
URRICULUMV
ITAEI. DATA PRIBADI /Personal Identification
Nama Lengkap : Aulia Akbar Harahap Tempat / Tgl. Lahir : Medan / 15 April 1993 Jenis Kelamin : Laki – laki
Agama : Islam Kebangsaan : Indonesia
Alamat : Jalan Karya Pembangunan, Komplek BLPP No. 22 Gedung Johor, Medan, Sumatera Utara, Indonesia 20143
Telepon : +62617865990 / +6283198507519 Moto Hidup : Berusaha dan Bersyukur
Tinggi / Berat : 178 cm / 86 kg
Email : auliaakbarharahaap@gmail.com
II. KESEHATAN /Health
Tidak memiliki cacat fisik maupun mental dan tidak memiliki penyakit bawaan.
III. KEMAMPUAN / Capabilities
Bahasa : Bahasa Indonesia, Bahasa Inggris Bahasa Pemrograman : C#, Python, PHP, JavaScript, C++ Database : MySQL
Lainnya : HTML, CSS, Photoshop, Ms. Office, Adobe Flash
IV. PENDIDIKAN FORMAL / Forma l Education
[ 2010
–
2014 ]
“
Implementasi Sistem Keamanan Data Menggunakan Steganografi Teknik
Pemetaan Titik Hitam dengan Pencarian Sekuensial dan Rabin
Cryptosystem
”
S1 Ilmu Komputer, Fakultas Ilmu Komputer dan Teknologi Informasi Universitas Sumatera Utara
[ 2007
–
2010 ]
SMA Negeri 2 Medan
[ 2005
–
2007 ]
SMP Swasta Harapan Mandiri, Medan
[ 1998
–
2004 ]
SD Angkasa I Lanud Medan
[ 1997
–
1998 ]
TK Angkasa I Lanud Medan
174
V. PENDIDIKAN NON-FORMAL / Informal Education
[ 2005
–
2006 ]
Ta’limul Qur’an Lil Aulad (TQA) Al- Amin, Medan
[ 2008
–
2010 ]
Ganesha Operation, Medan.
VI. PRESTASI / Achievements
1) Juara II Kompetisi Desain Grafis, ArTechno Festival 2011 Universitas Sumatera Utara [2011]
2) Peringkat II Tingkat TQAL, Perguruan Islam Al-Amin [2006]
VII. PENGALAMAN KERJA / Working Experience
1) Desainer Grafis dan Wakil Sekretaris di CV Dhuo Creative, Medan [2011 – 2012]
2) Asisten Laboratorium di Ilmu Komputer Laboratory Center Fasilkom-TI USU, Medan [2011-2012]
3) Kerja Lepas (freelancer) di Focus, Active and Network Coorporation (FAN), Medan [2013]
VIII. PENGALAMAN BERBICARA / Speaking Experience
1) Pemateri di Pelatihan Kesekretariatan, UKMI Al-Khuwarizmi Fasilkom-TI USU, Medan [2013]
2) Pemateri Desain Web di Penerimaan Mahasiswa Baru, IMILKOM, Medan [2013]
3) Pemateri Photo Manipulation di Pelatihan Spesifikasi Dunia Ilmu Komputer (IKLC Mengabdi), Ilmu Komputer Laboratory Center Fasilkom-TI USU, Medan-Perbaungan [2013]
4) Pemateri di Pelatihan Kesekretariatan dan Teknik Persidangan, UKMI Al-Khuwarizmi Fasilkom-TI USU dan IMILKOM, Medan [2013]
5) Tutor Pelatihan Blog di Academy Syiar Media, Departemen Komunikasi Dakwah UKMI Ad-Dakwah USU, Medan [2012]
6) Tutor Pelatihan Blog di Ad-Dakwah Bloggership Camp, Departemen Komunikasi Dakwah UKMI Ad-Dakwah USU, Medan [2012]
7) Instruktur di Pesantren Kilat Ramadhan, BKM Al-Farabi SMAN 2 Medan [2011]
IX. PENGALAMAN PERTEMUAN DAN DELEGASI / Conference and Delegation Experience
1) Delegasi studi banding dari USU ke Fakulti Sains Komputer dan Teknologi Maklumat, Universiti Putera Malaysia [2011]
X. PELATIHAN / Trainings & Workshop
1) Peserta Pelatihan Jurnalistik Metro TV on Campus, Universitas Sumatera Utara, Medan [2013]
2) Peserta Workshop Digital Paperless Publication: ALAMAGZ (Al-Khuwarizmi Magazine), UKMI Al-Khuwarizmi Fasilkom-TI USU, Medan [2011]
3) Peserta ESQ Basic Training, Training ESQ Inhouse Basic Mahasiswa Angkatan 002, The ESQ Way 165, Medan [2011]
4) Peserta Workshop Design Talent: Desain Poster, CV Dhuo Creative, Medan [2011]
5) Peserta Workshop Konfigurasi Access Point & Wireless Security, PT Telkom Indonesia, Tbk Regional I Sumatera, Medan [2011]
6) Peserta Training Pengurus, BKM Al-Khuwarizmi, Medan [2011]
7) Peserta Training Emotional Spiritual Management, UKMI Al-Falak FMIPA USU, Medan [2010]
8) Peserta Workshop Teknik Hacking, IMILKOM Fair 2010, Medan [2010]
9) Peserta Workshop Graphic Design: Unlimited, IMILKOM Fair 2010, Medan [2010]
10) Peserta Workshop Web Development, IMILKOM Fair 2010, Medan [2010]
11) Peserta Workshop “Get Closer with Graphic Design”, BKM Al-Khuwarizmi, Medan [2010]
175
12) Peserta Training Islam Ceria dan Kreatif, BKM Al-Khuwarizmi, Medan [2010]
13) Peserta Inagurasi, IMILKOM, Medan [2010]
14) Peserta Ramadhan Student Expo, Muslim Youth Club, Medan [2008]
15) Peserta Kemah Desember, PMR 001 SMAN 2 Medan [2007]
16) Peserta Pesantren Kilat Ramadhan, BKM Al-Farabi SMAN 2 Medan [2007]
XI. SEMINAR / Seminars
1) Peserta Seminar Nasional: “Pencaplokan Budaya”, Kongres Nasional Ikatan Lembaga Penalaran dan Penelitian Mahasiswa Indonesia IV, Medan [2013]
2) Peserta Seminar Teknologi Informasi: “The Future Augmented Reality: Research and Implementation”, Universitas Sumatera Utara, Medan [2012]
3) Peserta Seminar Teknologi Informasi: “Android The New Trend in Modern Operating System”, Universitas Sumatera Utara, Medan [2010]
XII. PENGALAMAN ORGANISASI / Organizational Experiences
1) Ketua Relawan TIK (Indonesian ICT Volunteers) Komisariat USU [2013 – 2014]
2) Anggota Biro Kesekretariatan IMILKOM [2013 – 2014]
3) Koordinator Divisi Administrasi dan Pengarsipan KPU Ilmu Komputer USU [2012 – 2013]
4) Sekretaris Umum di UKMI Al-Khuwarizmi Fasilkom-TI USU [2012 – 2013]
5) Anggota Pembinaan Anggota di BKM Al-Khuwarizmi USU [2011]
6) Anggota Majelis Perwakilan Kelas di SMAN 2 Medan [2008 – 2009]
7) Anggota PMR 001 WIRA A di SMAN 2 Medan [2006 – 2007]
8) Anggota BKM Al-Farabi SMAN 2 Medan [2007 – 2009]
XIII. PENGALAMAN KEPANITIAAN / Committee Experiences
1) Panitia Pelaksana pada Pelatihan Sistem Informasi Geografis di S1 Ilmu Komputer USU [2013]
2) Anggota Acara di ArTechno 2013 [2013]
3) Panitia Pelaksana pada Pelatihan Sistem Informasi Geografis di S1 Ilmu Komputer USU [2012]
4) Anggota Publikasi dan Dokumentasi di PORSENI IMILKOM [2012]
5) Anggota Acara di Penerimaan Mahasiswa Baru S1 Ilmu Komputer USU [2012]
6) Anggota Publikasi dan Dokumentasi di ArTechno 2012 [2012]
7) Panitia Penyuluhan Internet Sehat di Program Kreativitas Mahasiswa [2012]
8) Bendahara Umum di Bakti Sosial BKM Al-Khuwarizmi USU [2011]
9) Anggota Publikasi dan Dokumentasi di Ramadhan Expo 1432 H (Muslim Youth Club) [2011]
10) Ketua Panitia Seminar Teknologi Informasi The Development of Modern Operating System Technology: “Android The New Trend in Modern Operating System” [2011]
XIV. LAINNYA / Others
1) Relawan pada Penyuluhan Pengenalan Internet Sehat (Pengabdian Masyarakat) [2012]
2) Penerima Beasiswa Peningkatan Prestasi Akademik di FMIPA USU [2011 – 2012]
3) Peserta Lomba pada “Problem Solving” IMILKOM Contest [2012]
4) Peserta Lomba Poster Ilmiah pada Pameran Ilmiah dan Kreatifitas Mahasiswa [2012]
5) Penerima Sertifikat Kepengurusan BKM Al-Farabi SMAN 2 Medan sebagai Anggota Bina Usaha Periode 2009 – 2010
6) Penerima Penghargaan sebagai Koordinator di Pesantren Kilat Ramadhan 1430 H [2009]