TUGAS AKHIR
PERANCANGAN PURWARUPA SISTEM KEAMANAN RESEP OBAT RUMAH SAKIT BERBASIS RFID (Radio Frequency Identification)
KOMPETENSI JARINGAN
HAMZAH EKA NOVIA PRAKASA NIM. 1008605053
PROGRAM STUDI TEKNIK INFORMATIKA JURUSAN ILMU KOMPUTER FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM UNIVERSITAS UDAYANA 2014
i
PERANCANGAN PURWARUPA SISTEM KEAMANAN RESEP OBAT RUMAH SAKIT BERBASIS RFID (Radio Frequency Identification)
KOMPETENSI JARINGAN KOMPUTER [SKRIPSI] Sebagai syarat untuk memperoleh gelar Sarjana Komputer pada Fakultas Matematika dan Ilmu Pengetahuan Alam Universitas Udayana
Tulisan ini merupakan hasil penelitian yang belum pernah dipublikasikan
HAMZAH EKA NOVIA PRAKASA NIM. 1008605053
Pembimbing I
Pembimbing II
I Dewa Made Bayu Atmaja Darmawan.S.Kom..M.Cs. NIP. 198901272012121001
Ida Bagus Made Mahendra, S.Kom, M.Kom NIP. 19800621 200812 1002
ii
LEMBAR PENGESAHAN TUGAS AKHIR Judul
: Perancangan Purwarupa Sistem Keamanan Resep Obat Rumah
Sakit
Berbasis
RFID
(Radio
Frequency
Identification) Kompetensi
: Jaringan Komputer
Nama
: Hamzah Eka Novia Prakasa
NIM
: 1008605053
Tanggal Seminar
: 28 September 2014
Disetujui oleh: Pembimbing I
Penguji I
I Dewa Made Bayu Atmaja Darmawan.S.Kom..M.Cs. NIP. 198901272012121001
Ngurah Agus Sanjaya ER, S.Kom,M.Kom NIP. 197803212005011001
Pembimbing II
Penguji II
Ida Bagus Made Mahendra, S.Kom, M.Kom NIP. 19800621 200812 1002
I Made Widhi Wirawan, S.Si, M.Cs NIP. 197511052005011004 Penguji III
I Komang Ari Mogi, S.Kom, M.Kom NIP. 198409242008011007 Mengetahui, Jurusan Ilmu Komputer FMIPA UNUD Ketua,
Drs. I Wayan Santiyasa, M.Si NIP. 196704141992031002
iii
Judul
: Perancangan Purwarupa Sistem Keamanan Resep Obat Rumah Sakit Berbasis RFID (Radio frequency identification)
Nama
: Hamzah Eka Novia Prakasa
Pembimbing : 1. I Dewa Made Bayu Atmaja Darmawan.S.Kom..M.Cs 2. Ida Bagus Made Mahendra, S.Kom, M.Kom
ABSTRAK RFID (Radio frequency identification) merupakan teknologi yang sudah mulai banyak diterapkan diberbagai bidang, teknologi ini diimplementasikan untuk melakukan identifikasi terhadap suatu objek dengan menyimpan suatu nilai dari objek tersebut kedalam memori yang tertanam pada tag RFID. Salah satu implementasi yang dapat diterapkan menggunakan teknologi RFID adalah sistem keamanan resep obat di rumah sakit. RFID dapat dimanfaatkan sebagai teknologi pendukung untuk mengamankan data resep obat dari pasien di rumah sakit dengan melakukan penyimpanan data secara digital kedalam memori tag RFID. Data resep yang tersimpan diamankan dengan menggunakan teknik kriptografi asimetrik. Algoritma Elgamal merupakan salah satu algoritma kriptografi asimetrik yang aman digunakan untuk penyandian. Algoritma ini merupakan algoritma yang sulit dipecahkan karena memiliki kelebihan pada pembangkitan kunci yang menggunakan logaritma diskrit sebagai metode utama perhitungan dan metode enkripsi dekripsi yang menggunakan proses komputasi yang besar sehingga hasil enkripsinya berukuran dua kali dari ukuran semula. dengan dipadukannya metode penyimpanan RFID dan teknik kriptografi maka dihasilkan sebuah sistem keamanan yang aman dalam menjaga kerahasiaan data resep. Hasil pengujian yang dilakukan pada system memperlihatkan bahwa setiap form sistem dapat berjalan sesuai dengan fungsinya. Pengujian avalanche effect yang diterapkan terhadap algoritma elgamal menghasilkan nilai rata-rata 46% untuk uji avalanche effect by key dan 47% untuk uji avalanche effect by plaintext dengan demikian dapat disimpulkan bahwa algoritma elgamal adalah algoritma yang aman untuk digunakan dalam penyandian karena telah memenuhi kriteria minimum avalanche effect yang baik yaitu sebesar 45%. Kata kunci: RFID (Radio Frequency Identification), RFID tag, kriptografi, elgamal, avalanche effect.
iv
Title
:The
Prototype
Design
of
the
RFID
(Radio
Frequency
Identification)-Based for the Hospital's Prescription Safety System Name
: Hamzah Eka Novia Prakasa
Supervisors
: 1. I Dewa Made Bayu Atmaja Darmawan.S.Kom..M.Cs 2. Ida Bagus Made Mahendra, S.Kom, M.Kom
ABSTRACT RFID (radio frequency identification) is a technology that is already widely applied in various fields, this technology is implemented for the identification of an object by storing a value of the object into memory that is embedded in the RFID tag. One of the implementations that can be implemented using RFID technology is a prescription drug security system in the hospital. RFID can be used as supporting technologies for securing data on the patient's prescription from the hospital by the storage of digital data into the memory of the RFID tag. Prescription data stored secured using asymmetric cryptography technique. Elgamal algorithm is one of the asymmetric cryptographic algorithm that is safe to use for encoding. This algorithm is a cryptographic algorithm that is difficult to solve because it has an advantage in that key generation using discrete logarithm as the main method of calculating the decryption and encryption method that uses a large computational processes so that the encryption twice the size of its original size. Combined RFID storage methods and cryptographic techniques then produce a safe security system in maintaining the confidentiality of prescription data. Through the tests performed on the system shows that the system can run each form according to function. Avalanche effect testing that is applied to the ElGamal algorithm produces an average value of 46% for the test by modification of the key and 47% for the test by plaintext modification thus can be concluded that the ElGamal algorithm is an algorithm that is safe for use in encoding because it has met the minimum criteria of good avalanche effect that is equal to 45%. Keywords : RFID (Radio frequency identification), RFID tag, Cryptographic, elgamal, avalanche effect.
v
KATA PENGANTAR Proposal penelitian dengan judul “Perancangan Purwarupa Sistem Keamanan Resep Obat Rumah Sakit Berbasis RFID (Radio frequency identification)“ ini disusun dalam rangkaian kegiatan pelaksanaan Tugas Akhir di Jurusan Ilmu Komputer FMIPA UNUD. Proposal ini disusun dengan harapan dapat menjadi pedoman dan arahan dalam melaksanakan penelitian di atas. Sehubungan dengan telah terselesaikannya proposal ini, maka diucapkan terima kasih dan penghargaan kepada berbagai pihak yang telah membantu pengusul, antara lain: 1. Bapak Drs. I Wayan Santiyasa, M.Si. selaku Ketua Jurusan Ilmu Komputer Fakultas Matematika dan Ilmu Pengetahuan Alam Universitas Udayana. 2. Bapak Ida Bagus Made Mahendra, S.Kom, M.Kom dan I Dewa Made Bayu Atmaja Darmawan.S.Kom.M.Cs selaku Dosen Pembimbing dalam penyelesaian proposal tugas akhir ini. 3. Komisi Tugas Akhir Jurusan Ilmu Komputer FMIPA UNUD, yang telah memberikan petunjuk dalam penyusunan proposal tugas akhir ini. 4. Rekan-rekan mahasiswa yang telah memberi dukungan, motivasi, semangat dan kerja sama dalam pembuatan proposal tugas akhir ini. 5. Keluarga dan kerabat serta semua pihak yang turut serta memberi dukungan sehingga laporan ini dapat diselesaikan sesuai dengan waktu yang ditentukan. Penulis menyadari bahwa tugas akhir ini masih belum sempurna, untuk itu kritik dan saran yang bermanfaat demi kesempurnaan tugas akhir ini sangat penulis harapkan.
Bukit Jimbaran, September 2014
Penulis
vi
DAFTAR ISI
Halaman Judul .........................................................................................................i LEMBAR PENGESAHAN TUGAS AKHIR ...................................................... iii ABSTRAK ......................................................................................................... iv ABSTRACT ........................................................................................................ v KATA PENGANTAR.......................................................................................... vi DAFTAR ISI ..................................................................................................... vii DAFTAR TABEL ................................................................................................ x DAFTAR GAMBAR .......................................................................................... xi BAB I .................................................................................................................. 1 PENDAHULUAN ............................................................................................... 1 1.1
Latar Belakang........................................................................................... 1
1.2
Rumusan Masalah ...................................................................................... 3
1.3
Tujuan Penelitian ....................................................................................... 3
1.4
Batasan Masalah ........................................................................................ 3
1.5
Manfaat Penelitian ..................................................................................... 4
1.6
Metodologi Penelitian ................................................................................ 4 1.6.1 Desain Penelitian ............................................................................ 4 1.6.2 Pengumpulan Data .......................................................................... 5 1.6.3 Pengumpulan Data Awal ................................................................. 5
BAB II ................................................................................................................. 7 TINJAUAN PUSTAKA ....................................................................................... 7 2.1 RFID ( Radio frequency identification)........................................................... 7 2.1.1 Tag RFID ........................................................................................ 8 2.1.2 Frekuensi Kerja RFID .................................................................... 10 2.1.3 Reader RFID................................................................................... 11 2.3 Kriptografi ................................................................................................... 12 2.3.1 Algoritma Kriptografi .................................................................... 13 2.3.2 Algoritma El-Gamal ....................................................................... 16 2.3.3 Kelebihan Algoritma Elgamal ........................................................ 18 2.4 Resep Obat ................................................................................................... 18 2.4.1 Kelengkapan Suatu Resep .............................................................. 18 2.4.2 Pelayanan Resep di Apotek ............................................................ 19
vii
2.4.3 Copy Resep.................................................................................... 19 2.4.4 Ketentuan tambahan ...................................................................... 20 2.4.5 Pengelolaan Resep ......................................................................... 21 2.5 Metode Black Box ....................................................................................... 21 2.6 Metode Avalanche Effect.............................................................................. 22 BAB III.............................................................................................................. 23 ANALISIS DAN PERANCANGAN ................................................................. 23 3.1 Objek Penelitian ........................................................................................... 23 3.2 Analisis Sistem............................................................................................. 23 3.3 Teknik Observasi.......................................................................................... 23 3.4 Perancangan Spesifikasi kebutuhan sistem ................................................... 24 3.5 Desain Perancangan System ......................................................................... 27 3.5.1 Desain Perancangan ERD .............................................................. 29 3.5.2 Data Flow Diagram Level 0 ........................................................... 29 3.5.3 Data Flow Diagram Level 1 ........................................................... 30 3.5.4 Flowchart Algoritma Elgamal ........................................................ 33 3.5.5 Flowchart Enkripsi Resep .............................................................. 34 3.5.6 Desain Flowchart Dekripsi Resep .................................................. 35 3.5.7 Desain Buku Resep dengan RFID Tag ........................................... 36 3.6 Konfigurasi tag RFID mifare 1kb ................................................................. 36 3.7 Variabel Penelitian ....................................................................................... 37 3.8 Penerapan Penelitian .................................................................................... 38 3.9 Kebutuhan Hardware ................................................................................... 39 3.10 Kebutuhan Software ................................................................................... 40 BAB IV ............................................................................................................. 41 HASIL DAN PEMBAHASAN .......................................................................... 41 4.1
Gambaran Umum .................................................................................... 41
4.2 Tampilan Antarmuka Pengguna .................................................................... 41 4.3 Implementasi Fungsi RFID dalam Sistem..................................................... 48 4.4 Pengujian Perangkat Lunak (Black Box) ...................................................... 54 4.4.1 Pengujian Form Login ................................................................... 54 4.4.2 Pengujian Form Data master.......................................................... 55 4.4.2 Pengujian form resep Dokter .......................................................... 58 4.4.3 Pengujian form resep Apoteker ...................................................... 60
viii
4.4.3 Pengujian form registrasi Tag ......................................................... 63 4.5 Pengujian Integrasi Perangkat ...................................................................... 64 4.5.1Analisa interval pembacaan antar tag RFID .................................... 64 4.5.2 Analisa jarak dan posisi pembacaan ideal tag ke Reader................ 64 4.6 Pengujian avalanche effect ........................................................................... 66 4.6.1 Pengujian avalanche effect by key .................................................. 67 4.6.2 Pengujian avalanche effect by plaintext .......................................... 70 4.5.4 Grafik pengujian avalanche effect .................................................. 74 BAB V ............................................................................................................... 75 KESIMPULAN DAN SARAN .......................................................................... 75 5.1 Kesimpulan .................................................................................................. 75 5.2 Saran............................................................................................................ 75 DAFTAR PUSTAKA ......................................................................................... 76 LAMPIRAN ...................................................................................................... 77
ix
DAFTAR TABEL
Table 2.1 Perbedaan Teknologi Barcode dan RFID ............................................ 10 Tabel 4.1 Pengujian Login Valid ........................................................................ 54 Tabel 4.2 Pengujian Login Invalid ...................................................................... 55 Tabel 4.3 Pengujian form data master ................................................................. 55 Tabel 4.4 Pengujian form resep dokter................................................................ 58 Tabel 4.5 Pengujian form resep apoteker ............................................................ 61 Tabel 4.6 Pengujian form registrasi tag .............................................................. 63 Tabel 4.7 Pengujian interval baca tag ................................................................. 64 Tabel 4.8 Pengujian jarak baca tag horizontal atas.............................................. 65 Tabel 4.9 Pengujian jarak baca tag horizontal bawah.......................................... 65 Tabel 5.0 Pengujian jarak baca tag horizontal kiri .............................................. 65 Tabel 5.1 Pengujian jarak baca tag horizontal kiri .............................................. 65 Tabel 5.2 Pengujian jarak baca tag vertikal atas ................................................. 66 Tabel 5.3 Pengujian jarak baca tag vertikal bawah ............................................. 66 Tabel 5.4 Pengujian Avalanche effect by key ...................................................... 67 Tabel 5.5 Pengujian Avalanche effect by plaintext .............................................. 70
x
DAFTAR GAMBAR
Gambar 2.1 Cara Kerja RFID ............................................................................... 7 Gambar 2.2 Reader RFID SM132-USB ............................................................ 12 Gambar 2.3 Proses Enkripsi kunci simetrik ....................................................... 14 Gambar 2.4 Proses enkripsi-deskripsi asimetrik ................................................. 16 Gambar 2.5 Contoh Resep Apotek ..................................................................... 19 Gambar 2.6 Persamaan Avalanche effect ............................................................ 22 Gambar 3.1 Skema Workflow System ................................................................ 27 Gambar 3.2 System Enkripsi Resep .................................................................. 29 Gambar 3.3 DFD level 0 System ........................................................................ 30 Gambar 3.4 DFD level 1 System ........................................................................ 32 Gambar 3.5 Flowchart algoritma Elgamal ......................................................... 33 Gambar 3.6 System Enkripsi Resep .................................................................. 34 Gambar 3.7 System Dekripsi Resep .................................................................. 35 Gambar 3.8 Gambaran Buku Resep ................................................................... 36 Gambar 4.1 Form login sistem .......................................................................... 42 Gambar 4.3 Form data master pasien ................................................................. 43 Gambar 4.4 Form data master resep ................................................................... 43 Gambar 4.5 Form data master blacklist .............................................................. 44 Gambar 4.6 Form data master transaksi ............................................................. 45 Gambar 4.7 Form data master user ..................................................................... 45 Gambar 4.8 Form registrasi tag .......................................................................... 46 Gambar 4.9 Form resep dokter ........................................................................... 47 Gambar 4.10 Form resep dokter ......................................................................... 47 Gambar 4.11 Fungsi open port host dan reader RFID ......................................... 48 Gambar 4.12 Fungsi open port RFID ................................................................. 48 Gambar 4.13 Fungsi select tag RFID ................................................................. 49 Gambar 4.14 Fungsi autentikasi tag RFID.......................................................... 50 Gambar 4.15 Fungsi write tag RFID .................................................................. 51 Gambar 4.16 Fungsi write tag RFID .................................................................. 52 Gambar 4.17 Fungsi reset tag RFID ................................................................... 54 Gambar 4.18 Grafik pengujian avalanche effect (by key) ................................... 74 Gambar 4.19 Grafik pengujian avalanche effect (by plaintext) ........................... 74
xi