Top Banner
Evaluation of Image Stegnography using RSA and MRSA S. Satheeshkumar 1 and S. Sivakumar 2 1 Research Scholar, Department of Computer Science, C.P.A. College, Bodinayakanur, [email protected] 2 Associate Professor and Head, Department of Computer Science, C.P.A. College, Bodinayakanur. [email protected] Abstract Steganography is one of the most powerful technique to conceal the existence of hidden secret data inside a cover object. In stegnography, the Least Significant Bit (LSB) is one such technique in which least significant bit of the image is replaced with data bit. As this method is vulnerable to steganalysis, so as to make it more secure, encrypt the raw data before embedding it in the image. Though the encryption process increases execution time, but at the same time it provides higher security. In this paper RSA and Modified RSA (MRSA) algorithm used for encryption and the results evident that MRSA outperform RSA in terms of execution time. Keywords: Stegnography, Cryptography, LSB, RSA, MRSA 1. INTRODUCTION Among the recent advances in computing technology and its intrusion in our day to day life, the need for private and personal communication has increased. Privacy in digital communication is desired when confidential information is being shared between two entities using computer communication. To provide secrecy in communication we use various techniques. One such technique is steganography that is the art of hiding the fact that communication is taking place, by hiding information in other information[1-2]. Steganography techniques are not enough to give more security in cyber world [3]. In addition to steganography, cryptography technique needed to make stronger the level of security. It is always a good practice to use Cryptography and Steganography together for adding multiple layers of security [4]. Because Cryptography (protecting information) scrambles a message so it cannot be understood; the Steganography (hiding information) hides the message so it cannot be seen[5]. The data encryption can be done by a software and then embed the cipher text in image or any other media. The combination of these two methods will enhance the security of the data embedded. In cryptography, Public key cryptosystem avoid sending secret keys over communication channels, i.e. reducing the risk of key compromise. Many algorithms are introduced based on the public key cipher for privacy and authentication; the most widely known and used of them is the Ron Rivest, Adi Shamir, and Leonard Adleman, who first publicly described the algorithm in 1977 RSA crypto-algorithm [6-8]. RSA crypto-algorithm is based on performing exponentiations in modular arithmetic both for encryption and decryption [6]. RSA makes use of the modular exponent (ME) or modular multiplication (MM) algorithm. Many research works in order to speed up the performance of MM or ME algorithm [9-10]. Encrypt assistant multi-power RSA was proposed to enhance RSA decryption performance [11]. International Journal of Computational and Applied Mathematics. ISSN 1819-4966 Volume 12, Number 1 (2017) © Research India Publications http://www.ripublication.com 537
9

Evaluation of Image Stegnography using RSA and MRSA · Evaluation of Image Stegnography using RSA and MRSA . ... always a good practice to use Cryptography and Steganography together

May 07, 2018

Download

Documents

ngoxuyen
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Evaluation of Image Stegnography using RSA and MRSA · Evaluation of Image Stegnography using RSA and MRSA . ... always a good practice to use Cryptography and Steganography together

Evaluation of Image Stegnography using RSA and MRSA

S. Satheeshkumar1

and S. Sivakumar2

1Research Scholar, Department of Computer Science, C.P.A. College, Bodinayakanur,

[email protected] 2Associate Professor and Head, Department of Computer Science, C.P.A. College, Bodinayakanur.

[email protected]

Abstract Steganography is one of the most powerful technique to conceal the existence of hidden secret data inside a cover

object. In stegnography, the Least Significant Bit (LSB) is one such technique in which least significant bit of the

image is replaced with data bit. As this method is vulnerable to steganalysis, so as to make it more secure, encrypt

the raw data before embedding it in the image. Though the encryption process increases execution time, but at the

same time it provides higher security. In this paper RSA and Modified RSA (MRSA) algorithm used for encryption

and the results evident that MRSA outperform RSA in terms of execution time. Keywords: Stegnography, Cryptography, LSB, RSA, MRSA

1. INTRODUCTION

Among the recent advances in computing technology and its intrusion in our day to day life, the

need for private and personal communication has increased. Privacy in digital communication is

desired when confidential information is being shared between two entities using computer

communication. To provide secrecy in communication we use various techniques. One such

technique is steganography that is the art of hiding the fact that communication is taking place,

by hiding information in other information[1-2].

Steganography techniques are not enough to give more security in cyber world [3]. In addition to

steganography, cryptography technique needed to make stronger the level of security. It is

always a good practice to use Cryptography and Steganography together for adding multiple

layers of security [4]. Because Cryptography (protecting information) scrambles a message so

it cannot be understood; the Steganography (hiding information) hides the message so it cannot

be seen[5]. The data encryption can be done by a software and then embed the cipher text in

image or any other media. The combination of these two methods will enhance the security of

the data embedded.

In cryptography, Public key cryptosystem avoid sending secret keys over communication

channels, i.e. reducing the risk of key compromise. Many algorithms are introduced based on the

public key cipher for privacy and authentication; the most widely known and used of them is the

Ron Rivest, Adi Shamir, and Leonard Adleman, who first publicly described the algorithm in

1977 RSA crypto-algorithm [6-8].

RSA crypto-algorithm is based on performing exponentiations in modular arithmetic both for

encryption and decryption [6]. RSA makes use of the modular exponent (ME) or modular

multiplication (MM) algorithm. Many research works in order to speed up the performance of

MM or ME algorithm [9-10]. Encrypt assistant multi-power RSA was proposed to enhance RSA

decryption performance [11].

International Journal of Computational and Applied Mathematics. ISSN 1819-4966 Volume 12, Number 1 (2017) © Research India Publications http://www.ripublication.com

537

Page 2: Evaluation of Image Stegnography using RSA and MRSA · Evaluation of Image Stegnography using RSA and MRSA . ... always a good practice to use Cryptography and Steganography together

ME technique has made RSA method very attractive for data security and authentication.

However, the challenge of the RSA cryptosystem lies in the slow computation of encryption /

decryption and high time complexity [12]. The strength of RSA algorithm and a survey of fast

exponentiation method are explored [13]. The efficiency of RSA encryption and decryption is

primarily depends on the efficiency of the ME algorithm [14-15].

Modified modular exponent based RSA algorithm reduces execution time for encryption and

decryption process[16]. In Stegnography LSB is a method to embed secret message in cover

image. [17-19]

This research work analyse the performance of LSB method by incorporating encrypted data in

place of plain textual data in cover image. For encryption / decryption both RSA and MRSA

algorithms are used. To evaluate the performance of image stegnagraphy using RSA and MRSA

with execution time in seconds and quality of image in MSE and PSNR.

2. MATERIALS AND METHODS

For implementation of proposed method, four MATLAB standard images were taken. The cover

image details are tabulated in Tab. 1. Size of 94120 bits text message is used for encryption and

decryption in RSA and MRSA algorithms.

Table 1: Details of Cover images

Image Name Dimension Type

Cameraman 256 x 256 JPEG

Football 320x256 JPEG

Onion and pepper 198x135 JPEG

Coins 300x246 JPEG

To provide higher security the secret information is encrypted first, the encrypted ASCII is

converted to binary. In LSB technique the image pixels are also converted into binary form. The

image is now used as a cover to embed the encrypted text. This process is done by LSB encoder

which replaces the least significant bit of pixel value with the encrypted text. The cover image

with encrypted text is now termed as Stegno image. The whole process is illustrated with the

block diagram shown in Fig. 1.

International Journal of Computational and Applied Mathematics. ISSN 1819-4966 Volume 12, Number 1 (2017) © Research India Publications http://www.ripublication.com

538

Page 3: Evaluation of Image Stegnography using RSA and MRSA · Evaluation of Image Stegnography using RSA and MRSA . ... always a good practice to use Cryptography and Steganography together

Figure 1: Proposed steganography mechanism for sender

Upon reception of Stegno image the receiver first converts the pixels into their corresponding

binary values. The LSB decoder then detaches the encrypted text from stegno image pixels. The

encrypted text is decrypted using decryption algorithm. Fig. 2 shows the entire working process

at the receiver end.

Figure 2: Proposed steganography mechanism for receiver

3. LEAST SIGNIFICANT BIT (LSB) A simple approach for embedding information in cover image is using Least Significant Bits

(LSB). The simplest steganography techniques embed the bits of the message directly into least

significant bit plane of the cover image in a deterministic sequence. Modulating the least

significant bit does not result in human-perceptible difference because the amplitude of the

change is small. To hide a secret message inside an image, a proper cover image is needed.

Because this method uses bits of each pixel in the image, it is necessary to use a lossless

compression format, otherwise the hidden information will get lost in the transformations of a

lossy compression algorithm. When using a 24-bit color image, a bit of each of the red, green

and blue color components can be used, so a total of 3 bits can be stored in each pixel.

International Journal of Computational and Applied Mathematics. ISSN 1819-4966 Volume 12, Number 1 (2017) © Research India Publications http://www.ripublication.com

539

Page 4: Evaluation of Image Stegnography using RSA and MRSA · Evaluation of Image Stegnography using RSA and MRSA . ... always a good practice to use Cryptography and Steganography together

For example, the following grid can be considered as 3 pixels of a 24-bit color image, using 9

bytes of memory:

(00100111 11101001 11001000)

(00100111 11001000 11101001)

(11001000 00100111 11101001)

When the character A, which binary value equals 10000001, is inserted, the following grid

results:

(00100111 11101000 11001000)

(00100110 11001000 11101000)

(11001000 00100111 11101001)

In this case, only three bits needed to be changed to insert the character successfully. On average,

only half of the bits in an image will need to be modified to hide a secret message using the

maximal cover size. The result changes that are made to the least significant bits are too small to

be recognized by the human visual system (HVS), so the message is effectively hidden.

Respectively, The LSB encoder and decoder steps are shown in Pseudo code 1 and 2.

Pseudo code 1: LSB encoder steps Step 1: Extract the pixels of the cover image.

Step 2: Extract the characters of the text file.

Step 3: Insert characters of text file in each LSB component of pixels by replacing it.

Step 4: Repeat step 3 till all the characters has been embedded.

Step 5: Place some terminating symbol to indicate end of data.

Step 6: Obtained stegno image.

Pseudo code 2 : LSB decoder steps

Step 1: Extract the pixels of the stegno image.

Step 2: Extract secret message characters from LSB component of pixels. Follow step 2 till up to terminating

symbol, otherwise follow step 3

Step 3: Extract secret message.

4. RSA

RSA is generally used as a public-key cryptosystem which is based on modular exponentiation.

In RSA algorithm there are two keys used to encryption (public key) and decryption (private

key). The public key is advertised to the receiver by sender and the private key should be kept

mystery. In this manner an unknown person can‟t decrypt the encrypted message without private

key. The working technique of RSA algorithm discussed in below:

i. Choose two random prime numbers(p, q)

ii. Calculate n p q

International Journal of Computational and Applied Mathematics. ISSN 1819-4966 Volume 12, Number 1 (2017) © Research India Publications http://www.ripublication.com

540

Page 5: Evaluation of Image Stegnography using RSA and MRSA · Evaluation of Image Stegnography using RSA and MRSA . ... always a good practice to use Cryptography and Steganography together

iii. Calculate ( ) ( 1) ( 1)n p q

iv. Select an integer „e‟ such that 1 ( )e n and (e, ( )) 1GCD n .

v. Calculate 1

mod ( )d e n

vi. Encryption: Given a plain text m satisfying m < n, then the Cipher text c = me mod n.

vii. Decryption: The cipher text is decrypted by m = cd mod n.

The security of RSA based on the length of the key, longer the key-length are more safer

for the data. When the key length is longer, then the encryption and decryption takes long. RSA

includes Euclidean technique to compute „d‟ value and Modular Exponentiation (ME) technique

is used to perform encryption and decryption work, ME leads to consume much time while

execute RSA.

5. MODIFIED RSA

Basically RSA encryption and decryption based on ME algorithm, to improve the speed of RSA

algorithm a modification in ME component is essential. For reduce execution time of encryption

and decryption Modified Modular Exponentiation (MME) algorithm used in MRSA.

MME technique is shown in pseudo code 3.

Pseudo code 3 : MME technique

Read e,m,n

Initialize c=1, t=0, I=0 and A[] as array

For k=1 to e

Calculate c = (c*m)%n , A[k] = c, t = t+c

If (t%n) equal to zero then

Calculate I = ( e % k )

Print A[I]

Jump from condition and loop

Else if k equal to e then

Print c

End if

End of loop

MRSA algorithm will reduce execution time of encryption and decryption. The working

procedure of MRSA is shown in flow diagram Fig.3.

The MRSA algorithm provides more security and speed in encryption and decryption process

compare with RSA. Hence more security for text stegnography is possible with MRSA method.

International Journal of Computational and Applied Mathematics. ISSN 1819-4966 Volume 12, Number 1 (2017) © Research India Publications http://www.ripublication.com

541

Page 6: Evaluation of Image Stegnography using RSA and MRSA · Evaluation of Image Stegnography using RSA and MRSA . ... always a good practice to use Cryptography and Steganography together

Figure 3: Flowchart for modified RSA Algorithm

6. RESULTS AND DISCUSSION

For experiments, four images are carried out to prove the efficiency of proposed method.

Figure 4: Process of stegnography work for cameraman cover image

Start

Input Prime Numbers p, q

Compute

Key generation

e, d

Input Message (M)

Compute C

C = Me

(mod n)

Compute M

M = Cd

(mod n)

End

Modified

Modular

Exponent

Algorithm

International Journal of Computational and Applied Mathematics. ISSN 1819-4966 Volume 12, Number 1 (2017) © Research India Publications http://www.ripublication.com

542

Page 7: Evaluation of Image Stegnography using RSA and MRSA · Evaluation of Image Stegnography using RSA and MRSA . ... always a good practice to use Cryptography and Steganography together

For example, cameraman image taken as cover image and 94120 bits text message treated as

secret text message. The secret text message is encrypted by RSA and also MRSA. For

encryption and decryption, the following key values are carried out, p=13, q=19,n=247, public

key (41,247) and private key (137,247). Next encrypted text message hidden in cover image

using LSB encoder. Finally stegno image are obtained. Process of stegnography work for

cameraman cover image shown in Fig. 4. Similarly other three images are carried out. The cover

image and stegno image depicted in Fig. 5. The measurement of the quality between the cover

image and stegno image is done using PSNR (Peak Signal to Noise Ratio) and MSE (Mean

Square Error) value. The PSNR is defined as

𝑃𝑆𝑁𝑅 = 10𝑙𝑜𝑔 2552

𝑀𝑆𝐸

Where,

𝑀𝑆𝐸 =1

𝑀𝑁 𝑓 𝑖, 𝑗 − 𝑔(𝑖, 𝑗) 2

𝑁

𝑗=1

𝑀

𝑖=1

f(i,j) and g(i,j) means the intensity value of pixel at position (i,j) of the cover image and stegno

image respectively. Larger PSNR indicates the higher the image quality i.e. there is only small

difference between the cover-image and the stegno-image. A smaller PSNR means there is huge

distortion between the cover-image and the stegno image. Tab. 2 shows the PSNR and MSE

values between cover image and stegno image. From Tab.2 the image quality is good, based on

MSE and PSNR. Execution time based comparison of RSA and MRSA algorithm in LSB values

are tabulated in Tab. 3. From Tab. 3 MRSA give better performance compare with RSA and

results show that decryption is better than encryption based on execution time.

Figure 5: The different images of cover images and it‟s stegno

(a) Cameraman (b) Foot ball (c) onion and pepper (d) coins

International Journal of Computational and Applied Mathematics. ISSN 1819-4966 Volume 12, Number 1 (2017) © Research India Publications http://www.ripublication.com

543

Page 8: Evaluation of Image Stegnography using RSA and MRSA · Evaluation of Image Stegnography using RSA and MRSA . ... always a good practice to use Cryptography and Steganography together

Table 2: MSE and PSNR values of our algorithms with different images

Image Name MSE PSNR

Cameraman 0.4144 51.9569

Football 0.5216 50.9574

Onion and pepper 0.5330 50.8636

Coins 0.4857 51.2668

Table 3: Comparative Results of RSA and MRSA

Image

Execution Time (sec)

RSA MRSA

Encryption Decryption Encryption Decryption

Cameraman 0.015464 0.003744 0.014778 0.002862

Football 0.012057 0.006985 0.010929 0.006833

Onion and pepper 0.014334 0.001570 0.012995 0.001221

Coins 0.019956 0.001156 0.018953 0.001030

7. CONCLUSION

An efficient steganography method for embedding encrypted secret messages into cover images

without producing any major changes has been accomplished using RSA and MRSA algorithm.

A new way of hiding information in an image have been developed, which makes our technique

additional secure level and more efficient than RSA. RSA and MRSA algorithm based LSB

technique for image steganography has been implemented. When compare MRSA with RSA,

MRSA gives better results based on their execution time.

REFERENCES

[1] Neil F. Johnson and Sushil Jajodia, "Steganalysis of Image Created Using Current

Steganography Software", Workshop of Information Hiding Proceedings, Portland

Oregon, USA,15-17 April,1998. Lecture Notes in Computer Science, Vol.1525, Springer-

Verlag (1998).

[2] Mukesh Garg and A.P. Gurudev Jangra, “An Overview of Different Type of Data Hiding

Scheme in Image using Steganographic Techniques”, International Journal of Advanced

Research in Computer Science & Software Engineering, ISSN: 2277 128X , Volume 4,

Issue 1, January 2014.

[3] “Information Hiding Techniques for Steganography and Digital water Mark”, Stepfan

Katzenbeisser, Fabien A.P. patitcolas chapter no 3, pp no. 56. Also available at

amazon.com.

[4] Johnson, Neil F., and SushilJajodia. “Exploring Steganography: Seeing the Unseen”,

IEEE Computer Feb. 1998: 26-34.

International Journal of Computational and Applied Mathematics. ISSN 1819-4966 Volume 12, Number 1 (2017) © Research India Publications http://www.ripublication.com

544

Page 9: Evaluation of Image Stegnography using RSA and MRSA · Evaluation of Image Stegnography using RSA and MRSA . ... always a good practice to use Cryptography and Steganography together

[5] Sujay Narayana and Gaurav Prasad, "Two New Approaches for Secured Image

Steganography fsing Cryptographic Techniques and Type Conversions", in Signal &

Image Processing : An International Journal(SIPIJ) Vol.1, No.2, December 2010.

[6] Diffie W. and Hellman M.E., “New Direction in Cryptography,” IEEE Trans.

Information Theory, vol. IT-22, no. 6, pp. 644-654, 1976.

[7] Rivest, R., Shamir A., and Adleman L., “Method for obtaining Digital Signature and

Public Key Cryptosystem,” Comm. of ACM, vol. 21, no. 2, 1978.

[8] Mohan S. B., “Fast Algorithm for Implementing RSA Public-Key Cryptosystem,”

Electronic Letters, vol. 21, no. 17, 1985.

[9] C.K.Koc and C.Y.Hung, “Adaptive m-ary segmentation and canonical recoding

algorithms for multiplication of large binary numbers,” Computer mathematic

application, vol.24, no.3, pp.3-12, 1992.

[10] A.F.Tenca and C.K.Koc, “A scalable architecture for modular multiplication based on

Montgomery‟s algorithm,”IEEE Trans. On computer, vol.52, no.9, pp. 1215-1221, 2003.

[11] Qing Liu, Yunfei Li, Lin Hao, “On the Design and implementation of an Efficient RSA

Variant”, Advanced Computer Theory and Engineering (ICACTE), 2010, pp.533-536.

[12] A. Rezai and P. Keshavarzi, “Improvement of highspeed modular exponentiation

algorithm by optimum using smart methods, ” Proceedings of 18th Iranian Conference on

Electrical Engineering, Iran, pp.2104-2109, May 2010.

[13] Daniel M. Gordon, A survey of fast exponentiation methods, Journal of algorithms, 27,

1998, 126-146.

[14] Cetin Kaya Koc, High speed RSA implementation, RSA Laboratories, CA, 1994.

[15] Anand Krishnamurthy, Yiyan Tang, Cathy Xu and Yuke Wang, An efficient

implementation of multi-prime RSA on DSP processor, University of Texas, Texas,

USA,2002.

[16] S. Satheeshkumar S., Nithin Padmakumar S., and Sivakumar S., “Performance

Evaluation of Modified Modular Exponentiation for RSA Algorithm”, IJRET, Vol. 4,

Issue 12, pp. 250-255, December 2015.

[17] A. Ker, “Improved detection of LSB steganography in grayscale images,” in Proc.

Information Hiding Workshop, vol. 3200, Springer LNCS, pp. 97–115, 2004.

[18] A. Ker, “Steganalysis of LSB matching in greyscale images,” IEEE Signal Process.

Lett., Vol. 12, No. 6, pp. 441–444, June 2005.

[19] Sujay Narayana and Gaurav Prasad, "Two New Approaches for Secured Image

Steganography using Cryptographic Techniques and Type Conversions", in Signal &

Image Processing : An International Journal(SIPIJ) Vol.1, No.2, December 2010.

International Journal of Computational and Applied Mathematics. ISSN 1819-4966 Volume 12, Number 1 (2017) © Research India Publications http://www.ripublication.com

545