APLIKASI PHP ENCODER DAN DECODER MENGGUNAKAN ALGORITMA BASE64 DAN KUNCI KEAMANAN
TUGAS AKHIR
Sebagai Persyaratan Guna Meraih Gelar Sarjana Strata 1 Teknik Informatika Universitas Muhammadiyah Malang
Oleh :
Krisma Pradana Putra 201110370311027
JURUSAN TEKNIK INFORMATIKA FAKULTAS TEKNIK UNIVERSITAS MUHAMMADIYAH MALANG TAHUN 2015
LEMBAR PENGESAHAN
ii
KATA PENGANTAR Dengan memanjatkan puji syukur kehadirat Allah SWT. Atas limpahan rahmat dan hidayah-Nya sehingga peneliti dapat menyelesaikan tugas akhir yang berjudul : “APLIKASI PHP ENCODER DAN DECODER MENGGUNAKAN ALGORITMA BASE64 DAN KUNCI KEAMANAN”
Di dalam tulisan ini disajikan pokok-pokok bahasan yang meliputi pendahuluan, dasar teori, analisa dan perancangan sistem, implementasi dan pengujian sistem, serta kesimpulan dan saran. Peneliti menyadari sepenuhnya bahwa dalam penulisan tugas akhir ini masih banyak kekurangan dan keterbatasan. Oleh karena itu peneliti mengharapkan saran yang membangun agar tulisan ini bermanfaat bagi perkembangan ilmu pengetahuan kedepan.
Malang, 15 April 2015
Penulis
vii
DAFTAR ISI LEMBAR PERSETUJUAN .................................... Error! Bookmark not defined. LEMBAR PENGESAHAN .................................................................................. ii SURAT PERNYATAAN ......................................... Error! Bookmark not defined. ABSTRAK ................................................................ Error! Bookmark not defined. ABSTRACT ............................................................... Error! Bookmark not defined. LEMBAR PERSEMBAHAN .................................. Error! Bookmark not defined. KATA PENGANTAR ......................................................................................... vii DAFTAR ISI ....................................................................................................... viii DAFTAR TABEL ..................................................................................................x DAFTAR GAMBAR ............................................................................................ xi
BAB I PENDAHULUAN ......................................... Error! Bookmark not defined. 1.1
Latar Belakang .................................. Error! Bookmark not defined.
1.2
Rumusan Masalah ............................. Error! Bookmark not defined.
1.3
Tujuan ............................................... Error! Bookmark not defined.
1.4
Batasan Masalah................................ Error! Bookmark not defined.
1.5
Sistematika Penulisan ....................... Error! Bookmark not defined.
BAB II LANDASAN TEORI .................................. Error! Bookmark not defined. 2.1
Kriptografi ......................................... Error! Bookmark not defined. 2.1.1 Definisi Kriptografi ................ Error! Bookmark not defined. 2.1.2 Istilah Dalam Kriptografi........ Error! Bookmark not defined. 2.1.3 Tujuan Kriptografi .................. Error! Bookmark not defined. 2.1.4 Jenis Kriptografi ..................... Error! Bookmark not defined.
2.2
Algoritma base64 .............................. Error! Bookmark not defined.
2.3
PHP ................................................... Error! Bookmark not defined. 2.3.1 Definisi PHP ........................... Error! Bookmark not defined. 2.3.2 Sejarah PHP ............................ Error! Bookmark not defined. 2.3.3 Penggunaan PHP .................... Error! Bookmark not defined. 2.3.4 Keunggulan PHP .................... Error! Bookmark not defined. 2.3.5 PHP Encoder .......................... Error! Bookmark not defined.
viii
BAB III ANALISA DAN PERANCANGAN SISTEMError! Bookmark not defined. 3.1
Analisa Sistem................................... Error! Bookmark not defined. 3.1.1 Analisa Kebutuhan Pengguna . Error! Bookmark not defined. 3.1.2 Analisa Kebutuhan Sistem...... Error! Bookmark not defined.
3.2
Perancangan Sistem .......................... Error! Bookmark not defined. 3.2.1 Pengolahan Kunci Keamanan . Error! Bookmark not defined. 3.2.2 Proses Encode ......................... Error! Bookmark not defined. 3.2.3 Proses Decode......................... Error! Bookmark not defined. 3.2.4 Antarmuka .............................. Error! Bookmark not defined.
BAB IV IMPLEMENTASI DAN PENGUJIAN SISTEMError! Bookmark not defined. 4.1
Implementasi Sistem ......................... Error! Bookmark not defined. 4.1.1 Pengolahan Kunci Keamanan . Error! Bookmark not defined. 4.1.2 Proses Encode ......................... Error! Bookmark not defined. 4.1.3 Proses Decode......................... Error! Bookmark not defined. 4.1.4 Vargen Function ..................... Error! Bookmark not defined. 4.1.5 Varrand Function .................... Error! Bookmark not defined. 4.1.6 Numrand Function .................. Error! Bookmark not defined. 4.1.7 User Interface ......................... Error! Bookmark not defined.
4.2
Pengujian Sistem ............................... Error! Bookmark not defined. 4.2.1 Encode, Running Script, dan Decode ... Error! Bookmark not defined. 4.2.2 Ukuran File Sebelum dan Sesudah Encode . Error! Bookmark not defined. 4.2.3 Rekap Hasil Pengujian Sistem Error! Bookmark not defined.
BAB V KESIMPULAN DAN SARAN ................... Error! Bookmark not defined. 4.3
Kesimpulan ....................................... Error! Bookmark not defined.
4.4
Saran .................................................. Error! Bookmark not defined.
DAFTAR PUSTAKA ...........................................................................................69
ix
DAFTAR TABEL Tabel 2.1. Encoding Base64 [3] ............................. Error! Bookmark not defined. Tabel 2.2. Model penulisan (style) Tag PHP ......... Error! Bookmark not defined. Tabel 2.3. Operator Aritmatik ................................ Error! Bookmark not defined. Tabel 2.4. Operator Kombinasi Penugasan ............ Error! Bookmark not defined. Tabel 2.5. Operator Pre- and Post-Increment and Decrement ... Error! Bookmark not defined. Tabel 2.6. Operator Perbandingan ......................... Error! Bookmark not defined. Tabel 2.7. Operator Logika .................................... Error! Bookmark not defined. Tabel 2.8. Operator Bitwise ................................... Error! Bookmark not defined. Tabel 2.9. Changing the Case of a String .............. Error! Bookmark not defined. Tabel 2.10. Joining and splitting ........................... Error! Bookmark not defined. Tabel 2.11. Comparing .......................................... Error! Bookmark not defined. Tabel 2.12. Matching and replacing ...................... Error! Bookmark not defined. Tabel 2.13. Using regular expressions .................. Error! Bookmark not defined. Tabel 4.1. Ukuran File Sebelum dan Sesudah Encode ........ Error! Bookmark not defined. Tabel 4.2. Rekap Hasil Pengujian Encode, Running Script dan Decode ....... Error! Bookmark not defined. Tabel 4.3. Analisa ukuran file sebelum dan sesudah encode Error! Bookmark not defined.
x
DAFTAR GAMBAR Gambar 2.1. Contoh Plainteks dan Cipherteks [6] . Error! Bookmark not defined. Gambar 2.2. Proses Enkripsi dan Dekripsi [6]....... Error! Bookmark not defined. Gambar 2.3. Enkripsi dan dekripsi pesan menggunakan kunci (key) [6]....... Error! Bookmark not defined. Gambar 2.4. Skema kriptografi simetris. [6].......... Error! Bookmark not defined. Gambar 2.5. Skema kriptografi nirsimetris. [6] ..... Error! Bookmark not defined. Gambar 3.1. Flowchart Key Generator ................. Error! Bookmark not defined. Gambar 3.2. Flowchart Key Encryption ................ Error! Bookmark not defined. Gambar 3.3. Flowchart Proses Encode .................. Error! Bookmark not defined. Gambar 3.4. Flowchart Function Dekripsi Source code ..... Error! Bookmark not defined. Gambar 3.5. Flowchart Encode Kode PHP ........... Error! Bookmark not defined. Gambar 3.6. Flowchart Encode File Project ......... Error! Bookmark not defined. Gambar 3.7. Flowchart Proses Decode.................. Error! Bookmark not defined. Gambar 3.8. Flowchart Decode Kode PHP ........... Error! Bookmark not defined. Gambar 3.9. Flowchart Decode File Project ......... Error! Bookmark not defined. Gambar 3.10. Interface Halaman utama ................ Error! Bookmark not defined. Gambar 3.11. Interface Halaman Register ............. Error! Bookmark not defined. Gambar 3.12. Interface Halaman Tour .................. Error! Bookmark not defined. Gambar 3.13. Interface Halaman Support ............. Error! Bookmark not defined. Gambar 3.14. Interface Halaman Log in ............... Error! Bookmark not defined. Gambar 3.15. Interface Member Home.................. Error! Bookmark not defined. Gambar 3.16. Interface Encode Kode PHP ........... Error! Bookmark not defined. Gambar 3.17. Interface Decode Kode PHP ........... Error! Bookmark not defined. Gambar 3.18. Interface Encode File Project ......... Error! Bookmark not defined.
xi
Gambar 3.19. Interface Decode File Project ......... Error! Bookmark not defined. Gambar 4.1. Halaman utama beserta potongan source code-nyaError! Bookmark not defined. Gambar 4.2. Register page beserta potongan source code-nya .. Error! Bookmark not defined. Gambar 4.3. Tour page beserta potongan source code-nya . Error! Bookmark not defined. Gambar 4.4. Support page beserta potongan source code-nya ... Error! Bookmark not defined. Gambar 4.5. Login page beserta potongan source code-nya Error! Bookmark not defined. Gambar 4.6. Homepage member beserta potongan source code-nya ............ Error! Bookmark not defined. Gambar 4.7. Encode Kode PHP beserta potongan source code-nya ............. Error! Bookmark not defined. Gambar 4.8. Decode Kode PHP beserta potongan source code-nya ............. Error! Bookmark not defined. Gambar 4.9. Encode File Project beserta potongan source code-nya ........... Error! Bookmark not defined. Gambar 4.10. Decode File Project beserta potongan source code-nya ......... Error! Bookmark not defined. Gambar 4.11. Percobaan 1 Encode Script .............. Error! Bookmark not defined. Gambar 4.12. Hasil Percobaan 1 Encode Script .... Error! Bookmark not defined. Gambar 4.13. Hasil Percobaan 1 Running Script ... Error! Bookmark not defined. Gambar 4.14. Percobaan 1 Decode Script ............. Error! Bookmark not defined. Gambar 4.15. Hasil Percobaan 1 Decode Script (Wrong Key) ... Error! Bookmark not defined. Gambar 4.16. Hasil Percobaan 1 Decode Script (Correct Key) .. Error! Bookmark not defined. Gambar 4.17. Percobaan 2 Encode Script .............. Error! Bookmark not defined. Gambar 4.18. Hasil Percobaan 2 Encode Script .... Error! Bookmark not defined. xii
Gambar 4.19. Hasil Percobaan 2 Running Script ... Error! Bookmark not defined. Gambar 4.20. Percobaan 1 Encode Simple Project Error! Bookmark not defined. Gambar 4.21. Hasil Percobaan 1 Encode Simple Project .... Error! Bookmark not defined. Gambar 4.22. Hasil Percobaan 1 Running Simple Project... Error! Bookmark not defined. Gambar 4.23. Hasil Percobaan 1 Decode Simple File Project (Wrong Key) . Error! Bookmark not defined. Gambar 4.24. Hasil Percobaan 1 Decode Simple File Project (Correct Key) Error! Bookmark not defined. Gambar 4.25. Percobaan 2 Encode Medium Project ........... Error! Bookmark not defined. Gambar 4.26. Hasil Percobaan 2 Encode Medium Project .. Error! Bookmark not defined. Gambar 4.27. Hasil Percobaan 2 Running Medium Project Error! Bookmark not defined. Gambar 4.28. Percobaan 3 Encode Large Project . Error! Bookmark not defined. Gambar 4.29. Hasil Percobaan 3 Encode Large Project ..... Error! Bookmark not defined. Gambar 4.30. Hasil Percobaan 3 Running Large Project .... Error! Bookmark not defined. Gambar 4.31. Hasil Percobaan 3 Running Plainteks File version.php........... Error! Bookmark not defined. Gambar 4.32. Failed Large Project Installation.... Error! Bookmark not defined. Gambar 4.33. Installasi Large Project Berjalan Normal ..... Error! Bookmark not defined.
xiii
DAFTAR PUSTAKA [1]
Sholeh T. A, dkk. 2013. Mengamankan skrip pada bahasa pemograman PHP dengan menggunakan kriptografi Base64, Indonesia.
[2]
Aprianto L. A. dan Winarno I. Rancang bangun PHP 5 Encoder, Indonesia.
[3]
Wahyu C. F, dkk. 2012. Penerapan
Algoritma Gabungan RC4 Dan
Base64 Pada Sistem Keamanan E-Commerce, Jurnal Seminar Nasional Aplikasi Teknologi Informasi, ISSN 1907 -5022. [4]
Setiawan O, dkk. 2014. ALGORITMA ENKRIPSI RC4 SEBAGAI METODE OBFUSCATION SOURCE CODE PHP, Indonesia.
[5]
Chunlong Y, dkk. 2013. Security Analysis of PHP Encoder, China.
[6]
Munir, R. 2006. Kriptografi. Bandung: Informatika.
[7]
Welling L. and Thomson L. 2005. PHP and MySQL Web Development Third Edition, United States of America
[8]
Doyle Matt. 2010. Beginning PHP 5.3, Indiana: Wiley Publishing.
69