SMS Encryption using ECC (Elliptic Curve Cryptography) By : Eko Mardianto 7406.040.027 Supervising Lecturer : Isbat Uzzin Nadhori S.Kom Yuliana Setyowati S.Kom, M.Kom 197405052003121002 197807062002122003 TECHNOLOGY INFORMATION ELECTRONIC ENGINEERING POLYTECHNIC INSTITUTE OF SURABAYA INSTITUT TEKNOLOGI SEPULUH NOPEMBER SURABAYA 2010 1
Background Generally SMS does not guarantee the confidentiality and integrity of messages that sent by the user. The text messages sent by the user, sometimes as secret message and personal, so that confidentiality message becomes very important to be guarded from the people who are not eligible. So needed a security system in conveying the message. 2
Project Goal Maintain security and convenience mobile phone user in using short message service (SMS). 3
Problem How to implement technology of encryption and decryption sms messages on mobile devices using ECC algorithm. How to test the security level of encryption message using ECC algorithm. 4
Problem Limitation System can only run on a mobile phone that supports java-based application System can not access to the memory in the SIM card. System can only run on the phone with the operating system that allows software to access existing messages on the phone 5
System Design 6
System Design Create key(public & private) Tentukan Kurva elips yang akan digunakan dan bilangan pemodulo (bilangan prima) N. Menentukan titik awal (A). Titik A terletak pada kurva Menentukan satu bilangan random integer (K s ) Kirimkan kunci public ke penerima pesan Menghitung K p = Ks*A, dimana K p juga merupakan titik pada kurva K s merupakan private key dan K p merupakan public key 7
System Design Encrypt Message Download public key (B) dari penerima pesan Menentukan satu bilangan random integer (k), antara 1 (N-1) Hitung : R = k A Z = k B Kirimkan Nilai R,C,t sebagai chipertext kepada penerima pesan Masukkan nilai C dan K 2 ke dalam Hash function : dan dapatkan hasilnya sebagai t Masukkan nilai R dan Z ke dalam Hash function : dan dapatkan nilai Hash sebagai K 1 dan K 2 Masukkan Pesan ke dalam Simetric Encryption function dengan kunci K 1 : dan dapatkan hasilnya sebagai C 8
TEA Encryption Diagram 9
y += (z << 4)+a ^ z+sum ^ (z >> 5)+b; z += (y << 4)+c ^ y+sum ^ (y >> 5)+d; Y = text[0]; Z = text[1]; a,b,c,d is key in 32 bit Sum = ( 5-1)231 = 2654435770 10
System Design Decrypt Chipertext Hitung : Z = s R s merupakan kunci private penerima pesan Masukkan nilai R dan Z ke dalam Hash function : dan dapatkan nilai Hash sebagai K 1 dan K 2 Masukkan nilai C dan K 2 ke dalam Hash function : dan dapatkan nilai Hash sebagai O Apakah O = t? Proses dihentikan dan tampilkan pesan Invalid Chipertext Masukkan Chipertext ke dalam Simetric Decryption function dengan kunci K 1 : M = D k 1 (C) dan pesan telah berhasil di-decrypt 11
System Design Message Compression 12
Coding Send Messages smsconnkir = (MessageConnection) Connector.open(address); TextMessage txtmessage = (TextMessage) smsconnkir.newmessage(messageconnection.text_message); txtmessage.setaddress(address); txtmessage.setpayloadtext(isisms); isismsnya = txtmessage; smsconnkir.send(isismsnya); 13
Coding (Con t) Receive Messages msg = smsconn.receive(); String senderaddress = msg.getaddress(); Date waktusms = msg.gettimestamp(); if (msg instanceof TextMessage) { String isismsmasuk = ((TextMessage) msg).getpayloadtext(); terima(isismsmasuk, senderaddress, waktusms); } 14
Coding (Con t) TEA Encryption int n=32; while(n-->0) { sum += delta; y += (z << 4)+a ^ z+sum ^ (z >> 5)+b; z += (y << 4)+c ^ y+sum ^ (y >> 5)+d; } Y = text[0]; Z = text[1]; a,b,c,d is key in 32 bit Sum = ( 5-1)231 = 2654435770 15
Coding (Con t) TEA Decryption int n=32; while(n-->0) { z -= (y << 4)+c ^ y+sum ^ (y >> 5)+d; y -= (z << 4)+a ^ z+sum ^ (z >> 5)+b; sum -= delta; } Y = text[0]; Z = text[1]; a,b,c,d is key in 32 bit Sum = ( 5-1)231 = 2654435770 16
Screenshot 17
Screenshot (Con t) 18
Screenshot (Con t) 19
Analysis Data SMS 1. Kriptografi 2. Kriptografi pertamakali dipergunakan pada tahun 400 SM di Yunani 3. kriptografi dapat didefinisikan sebagai metode untuk menyamarkan (merahasiakan) isi dari data 4. Proses kriptografi diawali dengan mengubah data dalam bentuk plaintext (tulisan atau pesan awal yang dapat dibaca) menjadi chipertext 5. Kriptografi kurva eliptik termasuk ke dalam sistem kriptografi kunci publik yang mendasarkan keamanannya pada permasalahan matematis kurva eliptik 20
Analysis (Con t) Encyption Analysis Data Character before Encryption Character after Encryption Swelling Character (%) Data 1 11 16 5/11 = 45% Data 2 64 64 0% Data 3 93 96 3/93 = 3,22% Data 4 133 136 3/133 = 2,25% Data 5 146 152 6/146 = 4,1% 21
Analysis (Con t) Compression Analysis Data Character before Compression Character after Compression Depreciation Character (%) Data 1 11 10 1/11 = 9,09 % Data 2 64 46 18/64 = 28,125% Data 3 93 63 30/93 = 32,25% Data 4 133 91 42/133 = 31,5% Data 5 146 97 49/146 = 33,56% 22
Analysis (Con t) Compression + Encyption Analysis Data Character of original message Character after Encryption Character after Compression + Encryption Swelling Character(%) Data 1 11 16 16 5/11 = 45% Data 2 64 64 48 16/64 = -25% Data 3 93 96 64 29/93 = -31,18% Data 4 133 136 96 37/133 = -27,8% Data 5 146 152 104 42/146 = -28,7% 23
Result & Conclusion Based on the results of experiment in the previous chapter, it can be concluded that: 1. The swelling of characters after the encryption could reach 20.28% of the characters from the original message. 2. Number of characters in the message that has been encrypted is a multiple of 8, so the number of characters in the original message is very influential for the result of encryption. 3. The compression result is strongly influenced by the same characters in the initial message. 4. With added compression on the encrypted message, can minimize the swelling number of characters due to encryption, even the number of characters can be shrunk to 13.5% of the initial message characters. 24
END Thus my presentation and thank you for your attention 25