A Secured Cellular Picture-Messaging with Encryption and Decryption
Presented by Shafiqul Bashar Roll:0204014
Supervised by Professor Dr. Md. Tazul Islam Department Head Department of Computer Science and Engineering (CSE) Chittagong University of Engineering and Technology (CUET)
Outline of the Presentation
Introduction Objectives of the Project Previous Work and Present State of the Project Overall Design steps and Analysis of the project Implementation of the Project Experimental Result and Discussion Future Recommendation References
Introduction
Modern days of mobile communication is acquainted us with a technology of messaging. The procedure of messaging can be merged with Messaging system & Messaging service. Messaging System Types 1. Publish/Subscribe. 2. Point-To-Point Messaging service 1. Short Messaging Service (SMS) 2. Multimedia Messaging Service (MMS) Picture messaging is part of the MMS. It is mainly used in communication & authentication [1].
Objective with Specific Aims and
Possible Outcomes
• Proposed a secured cellular picture messaging procedure.
• Proposed an alternative way of sending & receiving picture message. • Develop cryptographic system for small computing device (Mobile, PDA).
• Apply RSA algorithm for picture message encryption & decryption.
Previous Work and Present State of The Project
Picture messaging service that is provided by MMS is a
new technology of messaging. Encrypted picture messaging directly from mobile device is completely a new concept.
Encryption and Decryption of SMS (textual message) is used to secure point to point communication.[2] Some students of Independent University, Bangladesh (IUB) and University of Dhaka, Bangladesh implement Bangla text encryption algorithm [3].
Steps of Secured Picture Messaging
Sender Public-key
Select a Picture
Encrypt the byte-code Convert Picture in byte-code Send byte-code as Cipher text
Receiver Private-key
Create Picture from byte-code
Decrypt the Cipher text
Receive Cipher text
Convert a Picture in byte-code
Flow Chart of a Secured Picture Messaging
Start Select a picture
Is size > maximum message size?
No
Yes
Enter the public key pair(e,n) for encryption
Is Encryption Done? Yes Send encrypted Picture message
No
Receive enccrypted Picture message Does receiver have decryption key? Yes See the message by private key(d,n)
No
Discard the message
End Fig3.2: Flow chart of secured picture messaging
Public-Key Encryption
Public-Key Encryption
•
• • For each encryption key there is exactly one corresponding decryption key, and it is distinct from the encryption key. There are many such pairs of keys, and they are relatively easy to compute. It is almost impossible to determine the decryption key if one knows only the decryption keys.
•
The encryption key is made public by the receiver to all those who will transmit messages to him or her, but only the receiver knows the decryption key.
RSA Algorithm
RSA Encryption Algorithm
/* public encryption code (e,n) to produce a ciphertext. Receive: Plaintext M. Return: Ciphertext C. */ • M with some randomly selected character if necessary so that length(M) is a multiple of blockLength [4]. • Calculate numberofBlocks = length(M) / blockLength. • Initialize index j to 1. • For i = 1 to numberofBlocks: • Extract the substring Mi from M consisting of the blockLength characters beginning at position j. • Convert Mi to numeric form to give Pi. • Calculate Ci = Pie%n • Increment j by blockLength.
RSA Algorithm(Continued)
RSA Decryption Algorithm
/* produce a plaintext.
Receive: Ciphertext C consisting of numeric blocks Ci, i = 1, ……….., numberofBlocks Return: Plaintext P.
*/ • •
Initialize M to the empty string.. For i = 1 to numberofBlocks: • Calculate Pi = Cid % n • Convert Pi to a string of characters Mi. • Concatenate Mi onto M.
Explanation with Example
This is an extremely simple example using numbers. • • • • Select primes p=11, q=3. n = pq = 11.3 = 33 phi = (p-1)(q-1) = 10.2 = 20 Choose e=3 check gcd(e, p-1) = gcd(3, 10) = 1 (i.e. 3 and 10 have no common factors except 1), and check gcd(e, q-1) = gcd(3, 2) = 1 therefore gcd(e, phi) = gcd(e, (p-1)(q-1)) = gcd(3, 20) = 1 Compute d such that ed ≡ 1 (mod phi) i.e. compute
d e1 % phi
• • •
=
31%20
i.e. find a value for d such that phi divides (ed-1) • i.e. find d such that 20 divides 3d-1.
Explanation with Example (Continued)
• • Simple testing (d = 1, 2, ...) gives d = 7 Check: ed-1 = 3.7 - 1 = 20, which is divisible by phi. Public key = (n, e) = (33, 3) Private key = (n, d) = (33, 7).
This is actually the smallest possible value for the modulus n for which the RSA algorithm works. Now say we want to encrypt the message m = 7, C= me % n= 343 % 33= 13. Hence the ciphertext c = 13. To check decryption we compute m = cd %n = 7.
137 %33
Experimental Result
Example 1
(For valid private key) • Public key: ( 31, 129) • Private key: ( 439, 129) • Sender Phone Number: +5550000 • Receiver Phone Number:+5550001
Roadway.jpeg Step1: Select the Picture
Experimental Result (Continued)
Step2: Input Receipent Phone Number
Step3: Input Sender Public Key
Experimental Result (Continued)
Step4: Input Receiver Decryption Key
Step5: Show the Picture
Experimental Result (Continued)
Example 2
(For non-valid secret key) • Public key: ( 25, 129) • Private key: ( 961, 129) • Sender Phone Number: +5550000 • Receiver Phone Number: +5550001
Minar.jpeg Step1: Select the Picture
Experimental Result (Continued)
Step2: Input Receipent Phone Number
Step3: Input Sender Public Key
Experimental Result (Continued)
Step4: Input Wrong Decryption Key
Step5: Unseen Picture Message
Discussion
picture messaging works through an extension to the Short Message Service (SMS) that makes it possible to send images. The goal of this project is to develop a secured picture messaging process. For maintaining security I have to choose a reliable encryption algorithm i.e. RSA algorithm. Again I have to consider it for small computing devices (Mobile, PDA). Since this algorithm mainly designed for file encryption for large computing device, I use it for Picture message encryption and decryption for small computing device.
Future Improvements
• Sending a large size of picture as message to the network. i.e. Maximum message size can be increased. • Sending picture message included text that contain sender remark, direction etc. • Use large numbers for encryption & decryption keys. • Since 3G mobile sets are very powerful and hardware supports are available, key size can be exceeded 1024 bits for high grade of security. • Modify the procedure so that it can be used in digital signature. As a result its security will be increased.
References
[1] John Wetherill, “Java Message Service”, Prentice Hall International ,2001. [2] Vijay K. Grag, “Principles and Applications of GSM”, Tata McGraw Hill, 2000. [3] S. Mahmud, S.K Dey and L.Rahman “Implementation of Public Key Encryption using RSA algorithm for Bangla ”, National Conference on Computer Processing of Bangla (NCCPB), 03, pp.101-107, (2005), Dhaka, Bangladesh. Shane Isbell and Le Bodic, “ Mobile Messaging Technologies and Services”, Prentice Hall International, 2003. [5] R.L. Rivest, A. Shamir, and L.Adelmann, “A Method of Obtaining Digital Signatures and Public-Key Cryptosystem”, Communication of the ACM 21, Feb. 1978, pp 120-126 . [4]
THANKS TO ALL