0% found this document useful (0 votes)
84 views7 pages

LSB Rsa PDF

This document discusses a secure image steganography system based on RSA encryption and random pixel selection. 1. It introduces cryptography, steganography, and image steganography. Cryptography encrypts messages while steganography hides the existence of messages. Image steganography embeds information in the least significant bits of image pixels. 2. The proposed system encrypts secret messages using RSA encryption and embeds the encrypted data in randomly selected pixels of an image. This provides two layers of security to protect confidential information. 3. At the receiving end, the encrypted data is extracted from the image and decrypted using RSA to retrieve the original messages. The system aims to achieve better data hiding capacity and resistance
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views7 pages

LSB Rsa PDF

This document discusses a secure image steganography system based on RSA encryption and random pixel selection. 1. It introduces cryptography, steganography, and image steganography. Cryptography encrypts messages while steganography hides the existence of messages. Image steganography embeds information in the least significant bits of image pixels. 2. The proposed system encrypts secret messages using RSA encryption and embeds the encrypted data in randomly selected pixels of an image. This provides two layers of security to protect confidential information. 3. At the receiving end, the encrypted data is extracted from the image and decrypted using RSA to retrieve the original messages. The system aims to achieve better data hiding capacity and resistance
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

International Journal of Research in Engineering Technology and Management ISSN 2347 - 7539

A Secure Image Steganography Based on RSA Algorithm and Random Pixel


Selection Technique

Yamuna Dasar1, Preethi. P2


1
IV Sem MTech, Computer Science and Engineering, K.S.S.E.M. , Bengaluru, Karnataka, India, [email protected]
2
Assistant Professor, Computer Science and Engineering, K.S.S.E.M. , Bengaluru, Karnataka, India, [email protected]

Abstract
Today’s internet world needs secret communication for exchanging the confidential information. Cryptography and
steganography are two important branches of information security. Cryptography scrambles a message and steganography hides
the existence of a message. Neither cryptography nor steganography alone can guarantee better security because they can be
cracked after many attempts. It is necessary to combine both cryptography and steganography to generate a hybrid system called
as Crypto-Steganography. This hybrid system provides two tier securities to the data and make difficult for the intruders to attack
confidential information is being proposed. In the current work secret messages are encrypted using RSA algorithm and
encrypted information is embedded in the LSBs of randomly selected pixels. The end user has given the choice of inputting one to
maximum three messages. Proposed work also explains a method that extracts the encrypted information at the receiving end and
decryption of it to get original messages and helps to achieve better capacity and immunity to suspicion.

Keywords: Cryptography, Steganography, Image Steganography


--------------------------------------------------------------------***----------------------------------------------------------------------
1. INTRODUCTION
1.2 Steganography
1.1 Cryptography Steganography means covered writing. Steganography hides
Cryptography is one of the branch of information security
the existence of the message. Steganography uses different
which scrambles the message such that the unintended
receiver cannot understand the message very easily. In cover media like text, image, audio and video for
cryptography, the sender encrypts the message into a form information hiding. Depending on the type of cover media
that only the intended recipient of the message can decrypt different steganographic techniques are followed. For
and read. Present Cryptography includes secure algorithms example, taking the cover media as the image is known as
for encryption and decryption of messages. The image steganography. The Advantage of steganography over
cryptography system may be symmetric key system or
cryptography is it avoids user suspicious attention on
asymmetric key system. In symmetric key systems single
key is shared between sender and receiver. In an asymmetric transmitting data.
key system two keys are used, one is a public key which is
known to everyone and another is private key which is 1.3 Image Steganography
known to only message recipient. It is very difficult for an Taking the cover object as an image in steganography is
attacker to decrypt the encrypted message without knowing known as image steganography [3]. Image pixel intensities
the key. Below shows the cryptographic model in Fig -1. are used to hide the information. Different carrier file
formats like text, audio, video can be used but image is more
Key Key popular because of its frequency of use in the internet.
Below shows image steganographic model described in Fig
Cipher Text -2. Different types of image steganography are
Plain Text Plain Text
Encryption Decryption Spatial Domain Technique
Transform Domain Technique
Fig -1: Cryptographic Model
Distortion Techniques
Masking and Filtering

_______________________________________________________________________________________
Volume: 03 Issue: 03 | May-2015, Available @ http://www.ijretm.com | Paper id - IJRETM-2015-03-03-004 1
International Journal of Research in Engineering Technology and Management ISSN 2347 - 7539

Cover
Message Message Few researchers have made an attempt to combine the
Image
techniques of crypto and steganography. So many different
combinations of cryptography and steganography techniques
are used for securing the data. Some of them are mentioned
in below Table -1.
Embedding Stego Key Extraction
Stego Key
Algorithm Algorithm
Table -1: Different Crypto-Steganography Systems

Cryptographic Steganographic Reference


Technique Technique
Stego
RSA Hash-LSB Anil et al, [1]
Image
AES Alteration Component Lokesh [2]
Method
Fig -2: Image Steganographic Model DES LSB Pye et al, [11]

LSB technique is one of the spatial domain method which AES DCT Adnan et al, [12]
uses the least significant bit of image pixels to hide data. In
color image 3 bits can be stored in each pixel because red,
green and blue plane is represented by 8 bits each
respectively. A 300 × 300 pixel image, can thus store a total Secret Message
amount of 90,000 bits or 11,250 bytes of embedded data
[19]. A grid of 3 pixels of a 24-bit image can be seen as
follows: Encrypting the secret
message
(00101101 00011100 11011100)
Cipher Text
(10100110 11000100 00001100)
(11010010 10101101 01100011) Embedding it in the cover
image
The number 100, whose binary representation is 01100100
is embedded into the least significant bits of above shown Stego image
grid, the result is as follows:
Extracting the cipher text
(00101100 00011101 11011101)
Cipher Text
(10100110 11000100 00001101)
(11010010 10101100 01100011) Decrypting the cipher text

The number was embedded into the first 8 bytes of the grid.
Only 5 underlined bits needed to be changed according to
Secret Message
the embedded message. Each primary color has 256 possible
intensity. So embedding data in LSB of pixels results in
Fig -3: Combination of Steganography and Cryptography
small changes in the intensity of the colors. These changes
cannot be distinguished by the human eye, thus the message A pictorial representation of crypto-stegano system is
is successfully hidden. depicted in Fig -3. The secret message is encrypted using
1.4 Crypto-Steganography System cryptography and then encrypted message is hidden using
The aim of both Cryptography and Steganography is to keep steganography. Then resulting stego image can be sent to
the data safe from unwanted parties. So both techniques receiver without revealing the secret information is being
alone cannot guarantee for better security because both exchanged. Even though if the attacker knows the existence
techniques can be cracked after many attempts. It is of secret message in image, attacker has to know the private
necessary to develop a hybrid system of cryptography and key to decrypt and get original message. This crypto-stegano
steganography techniques. The advantages of both system have to comply with a few basic requirements. These
techniques combined together may provide better security. requirements are invisibility, payload capacity, robustness

_______________________________________________________________________________________
Volume: 03 Issue: 03 | May-2015, Available @ http://www.ijretm.com | Paper id - IJRETM-2015-03-03-004 2
International Journal of Research in Engineering Technology and Management ISSN 2347 - 7539

against statistical attacks such as white noise attack, matrices of image steganography techniques are
compression, resize attack, robustness against image embedding capacity, mean square error (MSE), peak signal
manipulation, independent of file format. noise ratio(PSNR), histograms is discussed in [8] .One of
the other main uses for image steganography is for the
2. LITERATURE SURVEY transportation of high-level or top-secret documents
between international governments [5].
Cryptography is an important element of any strategy to
address message transmission security requirements. The aim of both Cryptography and Steganography keeps
Cryptography is the study of methods of sending messages the data safe from unwanted parties. So both techniques
in disguised form so that only the intended recipients can alone cannot provide more security so researchers combined
remove the disguise and read the message [11]. both the techniques for providing the complete security to
Cryptographic systems are generically classified along three the data, i.e. two layer of security i.e. cryptography along
independent dimensions [7].They are (1) Methodology for with Steganography. So many different combinations of
transforming plain text to cipher text.(2) Methodology for cryptography and steganography techniques are used for
the number of keys used.(3) Methodology for processing securing the data].RSA and Hash-LSB technique are
plain text. Cryptography systems can be broadly classified combined to provide secret communication. This paper
into symmetric-key systems that use a single key that both proposed a new technique of image steganography i.e.
the sender and the receiver have, and public-key systems Hash-LSB with RSA algorithm for providing more security
that use two keys, a public key known to everyone and a to data as well as for data hiding method. The proposed
private key that only the recipient of messages uses. technique uses a hash function to generate a pattern for
Examples of symmetric key systems are Blowfish, Twofish, hiding data bits into LSB of RGB pixel values of the cover
DES, and AES. Examples of public key systems are RSA image. This technique makes sure that the message has been
and DSA [9]. encrypted before hiding it into a cover image. If in any case
the cipher text got revealed from the cover image, the
Steganography is another technique for secured
intermediate person other than receiver can't access the
communication. Steganography involves hiding
message as it is in encrypted form. It ensures double security
information so it appears that no information is hidden at all.
using cryptography and steganography technique.[1].
Steganography is the process of hiding a secret message
within cover medium such as image, video, text, audio [3] In [10] two stage (stego-based-crypto) invertible technique
[4]. Image steganography allows for two parties to is proposed based on cryptography and steganography
communicate secretly and covertly. One of the other main algorithms. In order to increase the security, the proposed
uses for image steganography is for the transportation of technique uses Rivest-Shamir-Adleman (RSA)
high-level or top-secret documents between international cryptographic algorithm in the first stage for encrypting the
governments [5]. Confidential information is sent without secret message, and Integer Wavelet Transform (IWT)
worry of detection by hiding it in cover media, which is very based lifting scheme in the second stage as a steganography
difficult to detect by an attacker. Steganography systems can algorithm to hide the secret message, To increase the
be grouped by the type of covers used (graphics, sound, text, capacity of secret message payload and robustness, data are
executable) or by the techniques used to modify the covers embedded in the integer wavelet transform coefficients; in
[4] [6]. Techniques are (1) Substitution system, (2) the low, middle and high frequency sub-bands. The
Transform domain techniques, (3) Spread spectrum alteration component method and Advanced Encryption
techniques, (4) Distortion techniques. Steganography alone Standard technique combination provide better security for
cannot guarantee for better security because steganographic data. These two techniques encrypt the data as well as hide
techniques can be cracked after many attempts. the encrypted data in another medium so the fact that a
message being sent is concealed. In cryptography advanced
Different spatial domain techniques are used for secret encryption standard (AES) algorithm is used to encrypt
communication. LSB (Least Significant Bit) method in the secret messages and then the alteration component method
BMP is most suitable for applications where the focus is on is used to hide encrypted message. By using these two
the amount of information to be transmitted and not on the techniques the security of secret data increases to two tiers
secrecy of that information. LSB in GIF is a very efficient and a high quality of stego image is obtained. [2]. All
algorithm to use when embedding a reasonable amount of steganographic algorithms have to comply with a few basic
data in a grayscale image [3]. Performance evaluation requirements. These requirements are invisibility, payload
_______________________________________________________________________________________
Volume: 03 Issue: 03 | May-2015, Available @ http://www.ijretm.com | Paper id - IJRETM-2015-03-03-004 3
International Journal of Research in Engineering Technology and Management ISSN 2347 - 7539

capacity, robustness against statistical attacks, robustness image. The ciphertext can be hidden in the LSB's of all three
against image manipulation, independent of file format. color planes of the randomly selected pixels in the image.
Steganography does not draw attention of the attacker
because the existence of the message is hidden, but Sender
cryptography reverses it just scrambles messages [3].
Cover
Image
3. PROPOSED APPROACH
Msg 1 Pre-process Encryption Embed the
The proposed approach uses the following techniques to using RSA ciphered
Msg 2 Messages Algorithm messages
provide better two tier security for the information. into all
Msg 3 channels of
(Binary
1. RSA Cryptography Technique: Secret message that is to String) Image
be transmitted is first encrypted using the RSA algorithm
The RSA algorithm is one of the asymmetric (public) key
system where the public key is known to everyone and a Receiv
private key is known to only message recipient. er
Msg 1
2. LSB substitution based Steganography: It proposes LSB Robustness Decryption Extract the
check(PSNR, using RSA ciphered
based steganography, which embeds data in the LSBs of Msg 2 MSE & Algorithm messages
randomly selected pixels of red, green and blue components RMSE) from all
respectively Msg 3 channels of
Image

3. Random Pixel Selection Technique: In this technique, key


is used to choose the pixels randomly and embed the
encrypted message into cover image. This will make the Fig -4: Block Diagram of Proposed System
message bits more difficult to find and hopefully reduce the
C. Extraction module: It extracts the hidden cipher message
realization of patterns in the image [9]. Data can be hidden
from cover image. It involves retrieving the ciphered
in the LSB of a different color plane (red, green and blue) of
message from the file independent of the file format.
the randomly selected pixel in the RGB color space.
D. Decryption module: It decrypts the ciphered message to
4. DESIGN AND IMPLEMENTATION OF retrieve the original message. Decryption can be done by
PROPOSED SYSTEM passing a private key. The private key can be used for
decryption of the message that is hidden. It provides security
The Proposed system consists of following four modules:
by converting the cipher message, into the original data
Encryption module, Embedding module, Extraction module
message.
and Decryption module.

A. Encryption module: It encrypts the message to be hidden On Sender side: Message Encryption and Embedding
into cover image using RSA algorithm. It is done by passing Algorithm
a public key of the receiver which is used for encryption of Aim: Secure transmission of message using cryptography
the message to be hidden.It provides security by converting and steganography technique.
the message into a cipher text, which will be difficult for
eavesdropper to decrypt without the knowledge of the Input: Text messages, cover image, public key
private key
Output: Stego image, PSNR, MSE, RMSE, Elapsed time
B. Embedding module: It embeds the encrypted message in
cover image using LSB substitution based Steganography (1) Read the cover image.
.In order to hide the message, data is first converted into a
byte format and stored in a byte array. The message is then (2) Read the input messages.
encrypted and it becomes cipher text. The key is used to
(3) Convert the characters of input message into
select random pixels in all three components of the color
corresponding ASCII values.

_______________________________________________________________________________________
Volume: 03 Issue: 03 | May-2015, Available @ http://www.ijretm.com | Paper id - IJRETM-2015-03-03-004 4
International Journal of Research in Engineering Technology and Management ISSN 2347 - 7539

(4 ) Read the public key Table -2: Cover image and corresponding stego image

(5) Using an RSA encryption technique convert the ASCII Cover Image Stego Image
value of the character into cipher text

(6) Convert Ciphertext into equivalent binary value into an 8


bit integer array.

(7) Depending upon the number of messages, extract the


red, green and blue component of the cover image into
which the ciphered message is to be embedded.

(8) Using Random Pixel Selection technique pixels are


selected randomly from channels of an image.

(9) Using LSB technique the ciphered text is embedded into


randomly selected pixels.

(10) Display stego image, PSNR, MSE, RMSE and Elapsed


time.

(11) Send the stego image to the receiver.

On Receiver side: Message extraction and decryption


algorithm

Aim: Secure transmission of message using cryptography


and steganography technique.

Input: Stego image, private key

Output: Text message, Elapsed time

(11) Read the stego image.

(12) Extract components from stego image.

(13) Using Random Pixel Selection technique same pixels


are selected randomly from all components of image which
are used for embedding.
a b c
(14) Read the last bit of selected pixels to get the ciphered
messages.

(15) Read the private key

(16) Using RSA decryption module ciphered message


d e f
converted back into the original message.

g h i
Fig -5: Snapshots of Proposed System
_______________________________________________________________________________________
Volume: 03 Issue: 03 | May-2015, Available @ http://www.ijretm.com | Paper id - IJRETM-2015-03-03-004 5
International Journal of Research in Engineering Technology and Management ISSN 2347 - 7539

a) Selecting cover image b) Entering first message c) Choice message is hidden in the cover image. If the attacker knows
for second message d) Entering second message e) entering about the existence of secret message, cannot decrypt it
third message f) Entering public key g) Histogram of stego without the proper key. This proposed approach provides
image h) Displaying cover image ,stego image and PSNR, double layer protection and can hide a large amount of
MSE and RMSE values i) Displaying decrypted messages information because all three channels of an image are used
for data hiding.
5. SIMULATION RESULTS
7. REFERENCES
In current work color image of any format like .bmp, .jpg
and .png can be used. Only color images are used. Test [1]. Anil Kumar, Rohini Sharma, “A Secure Image
images are of size 300 300 pixels. The user has given the Steganography Based on RSA Algorithm and Hash-
LSB Technique”, International Journal of Advanced
choice of inputting single message to maximum three
Research in Computer Science and Software
messages. The single input message is embedded in only Engineering, Vol. 3, Issue No.7July, 2013, pp. 363-
red plane of the image. Two input messages are embedded 372.
into red and green planes of the image respectively. Three
input messages are embedded into red, green and blue [2]. Lokesh Kumar,” Novel Security for Image
planes of the image respectively. Steganography using Cryptography Technique”,
International Journal of Advanced Research in
Computer Science and Software Engineering, Vol. 2,
Table -3: PSNR, MSE and RMSE Values of Tested Issue No.4, April, 2012, pp.143-146.
Images
Image Chann PSNR MSE RMSE [3]. T Morkel,JHP Eloff and MS Olivier,” An Overview of
el (dB) Image Steganography”,in Proceedings of the Fifth
Annual Information Security South Africa
Conference(ISSA 2005), Sandton, South Africa,
Boy Red 1.6721e+0 3.8889e- June/July 2005 (published electronically).
0.0153
8 04
Green 1.8878e+0 3.4444e-
0.0145 [4]. Mehdi Hussain and Mureed Hussain, “A Survey of
8 04
Image Steganography Techniques”, Journal of
Blue 3.0000e-
216750000 0.0137 Advanced Science and Technology, Vol.54, May, 2013,
04
pp. 113-124.
Mickey Red 5.2723e+0
0.0012 0.0291
mouse 7
Green 22950000 0.0028 0.0393 [5]. Ronak Doshi, Pratik Jain, Lalit Gupta,”Steganography
and Its Applications in Security”, Journal of Modern
Tulip Red 1.4778e+0
0.0044 0.0410 Engineering Research, Vol.2, Issue.6, Dec, 2012 pp.
7
4634-4638.
Kids Red 2.5781e+0
0.0025 0.0440
7
Green 1.0055e+0 [6]. Anjali Tiwari, Seema Rani Yadav, N.K.Mittal,”A
0.0065 0.0459
7 Review on Different Image Steganography
Blue 1.1084e+0 Techniques”, Journal of Engineering and Innovative
0.0059 0.0632 Technology, Volume 3, Issue 7, January 2014, pp. 121-
7
124.

6. CONCLUSION
[7]. A. Joseph Raphael, V. Sundaram,”Cryptography and
The proposed system provides means for secure data Steganography-A Survey”, journal of Computer
transmission over the internet. The confidential information Science and Software Engineering, Vol 2 (3), pp. 626-
is transmitted with two tier security. The secret message is 630.
encrypted using RSA algorithm and hidden into random
pixels of the cover image in different planes. Hiding data [8]. Falesh, M. Shelke, Asgwini A. Dongre, Pravn D.
into random pixels is more efficient than the sequential Soni,”Comparison of different techniques for
embedding. The attacker cannot get clues that secret Steganography in images” International Journal of
Application or Innovation in Engineering and
_______________________________________________________________________________________
Volume: 03 Issue: 03 | May-2015, Available @ http://www.ijretm.com | Paper id - IJRETM-2015-03-03-004 6
International Journal of Research in Engineering Technology and Management ISSN 2347 - 7539

Management, Volume 3, Issue 2, Feb.2014, pp. 171-


176.

[9]. Jatinder Kaur, Ira Gabba, “Steganography Using RSA


Algorithm”, International Journal of Innovative
Technology and Exploring Engineering, Volume 3,
Issue 3, August, 2013, pp. 75-79.

[10]. Pye Pye Aung1 and Tun Min Naing,"A Novel


Secure Combination Technique of Steganography
and Cryptography", Journal of Information Technology,
Modeling and Computing (IJITMC) Vol. 2, No. 1,
February 2014, pp. 55-62.

[11]. William Stallings, “Cryptography and Network


Security: Principles and practices”, Pearson Education,
Third Edition, ISBN 81-7808-902-5.

_______________________________________________________________________________________
Volume: 03 Issue: 03 | May-2015, Available @ http://www.ijretm.com | Paper id - IJRETM-2015-03-03-004 7

You might also like