Вы находитесь на странице: 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
2

IV Sem MTech, Computer Science and Engineering, K.S.S.E.M. , Bengaluru, Karnataka, India, Yamuna.dasar@gmail.com
Assistant Professor, Computer Science and Engineering, K.S.S.E.M. , Bengaluru, Karnataka, India, preethi.p@kssem.edu.in

Abstract
Todays 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
Cryptography is one of the branch of information security
which
scrambles the message such that the unintended
receiver cannot understand the message very easily. In
cryptography, the sender encrypts the message into a form
that only the intended recipient of the message can decrypt
and read. Present Cryptography includes secure algorithms
for encryption and decryption of messages. The
cryptography system may be symmetric key system or
asymmetric key system. In symmetric key systems single
key is shared between sender and receiver. In an asymmetric
key system two keys are used, one is a public key which is
known to everyone and another is private key which is
known to only message recipient. It is very difficult for an
attacker to decrypt the encrypted message without knowing
the key. Below shows the cryptographic model in Fig -1.

Key

Key
Cipher Text

Plain Text
Encryption

Decryption

Fig -1: Cryptographic Model

Plain Text

Steganography means covered writing. Steganography hides


the existence of the message. Steganography uses different
cover media like text, image, audio and video for
information hiding. Depending on the type of cover media
different steganographic techniques are followed. For
example, taking the cover media as the image is known as
image steganography. The Advantage of steganography over
cryptography is it avoids user suspicious attention on
transmitting data.

1.3 Image Steganography


Taking the cover object as an image in steganography is
known as image steganography [3]. Image pixel intensities
are used to hide the information. Different carrier file
formats like text, audio, video can be used but image is more
popular because of its frequency of use in the internet.
Below shows image steganographic model described in Fig
-2. Different types of image steganography are
Spatial Domain Technique
Transform Domain Technique
Distortion Techniques
Masking and Filtering

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

International Journal of Research in Engineering Technology and Management

Cover
Image

Stego Key

Message

Embedding
Algorithm

Message

Stego Key

Extraction
Algorithm

Stego
Image

Fig -2: Image Steganographic Model


LSB technique is one of the spatial domain method which
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
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:

ISSN 2347 - 7539

Few researchers have made an attempt to combine the


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.
Table -1: Different Crypto-Steganography Systems
Cryptographic
Technique
RSA

Steganographic
Technique
Hash-LSB

Reference

AES

Lokesh [2]

DES

Alteration Component
Method
LSB

AES

DCT

Adnan et al, [12]

Anil et al, [1]

Pye et al, [11]

Secret Message

Encrypting the secret


message

(00101101 00011100 11011100)


(10100110 11000100 00001100)
(11010010 10101101 01100011)
The number 100, whose binary representation is 01100100
is embedded into the least significant bits of above shown
grid, the result is as follows:

Cipher Text
Embedding it in the cover
image

Stego image
Extracting the cipher text

(00101100 00011101 11011101)


(10100110 11000100 00001101)
(11010010 10101100 01100011)
The number was embedded into the first 8 bytes of the grid.
Only 5 underlined bits needed to be changed according to
the embedded message. Each primary color has 256 possible
intensity. So embedding data in LSB of pixels results in
small changes in the intensity of the colors. These changes
cannot be distinguished by the human eye, thus the message
is successfully hidden.

1.4 Crypto-Steganography System


The aim of both Cryptography and Steganography is to keep
the data safe from unwanted parties. So both techniques
alone cannot guarantee for better security because both
techniques can be cracked after many attempts. It is
necessary to develop a hybrid system of cryptography and
steganography techniques. The advantages of both
techniques combined together may provide better security.

Cipher Text
Decrypting the cipher text

Secret Message

Fig -3: Combination of Steganography and Cryptography


A pictorial representation of crypto-stegano system is
depicted in Fig -3. The secret message is encrypted using
cryptography and then encrypted message is hidden using
steganography. Then resulting stego image can be sent to
receiver without revealing the secret information is being
exchanged. Even though if the attacker knows the existence
of secret message in image, attacker has to know the private
key to decrypt and get original message. This crypto-stegano
system have to comply with a few basic requirements. These
requirements are invisibility, payload capacity, robustness

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

International Journal of Research in Engineering Technology and Management

against statistical attacks such as white noise attack,


compression, resize attack, robustness against image
manipulation, independent of file format.

2. LITERATURE SURVEY
Cryptography is an important element of any strategy to
address message transmission security requirements.
Cryptography is the study of methods of sending messages
in disguised form so that only the intended recipients can
remove the disguise and read the message [11].
Cryptographic systems are generically classified along three
independent dimensions [7].They are (1) Methodology for
transforming plain text to cipher text.(2) Methodology for
the number of keys used.(3) Methodology for processing
plain text. Cryptography systems can be broadly classified
into symmetric-key systems that use a single key that both
the sender and the receiver have, and public-key systems
that use two keys, a public key known to everyone and a
private key that only the recipient of messages uses.
Examples of symmetric key systems are Blowfish, Twofish,
DES, and AES. Examples of public key systems are RSA
and DSA [9].
Steganography is another technique for secured
communication.
Steganography involves hiding
information so it appears that no information is hidden at all.
Steganography is the process of hiding a secret message
within cover medium such as image, video, text, audio [3]
[4]. Image steganography allows for two parties to
communicate secretly and covertly. One of the other main
uses for image steganography is for the transportation of
high-level or top-secret documents between international
governments [5]. Confidential information is sent without
worry of detection by hiding it in cover media, which is very
difficult to detect by an attacker. Steganography systems can
be grouped by the type of covers used (graphics, sound, text,
executable) or by the techniques used to modify the covers
[4] [6]. Techniques are (1) Substitution system,
(2)
Transform domain techniques, (3) Spread spectrum
techniques, (4) Distortion techniques. Steganography alone
cannot guarantee for better security because steganographic
techniques can be cracked after many attempts.
Different spatial domain techniques are used for secret
communication. LSB (Least Significant Bit) method in the
BMP is most suitable for applications where the focus is on
the amount of information to be transmitted and not on the
secrecy of that information. LSB in GIF is a very efficient
algorithm to use when embedding a reasonable amount of
data in a grayscale image [3]. Performance evaluation

ISSN 2347 - 7539

matrices
of
image steganography techniques are
embedding capacity, mean square error (MSE), peak signal
noise ratio(PSNR), histograms is discussed in [8] .One of
the other main uses for image steganography is for the
transportation of high-level or top-secret documents
between international governments [5].
The aim of both Cryptography and Steganography keeps
the data safe from unwanted parties. So both techniques
alone cannot provide more security so researchers combined
both the techniques for providing the complete security to
the data, i.e. two layer of security i.e. cryptography along
with Steganography. So many different combinations of
cryptography and steganography techniques are used for
securing the data].RSA and Hash-LSB technique are
combined to provide secret communication. This paper
proposed a new technique of image steganography i.e.
Hash-LSB with RSA algorithm for providing more security
to data as well as for data hiding method. The proposed
technique uses a hash function to generate a pattern for
hiding data bits into LSB of RGB pixel values of the cover
image. This technique makes sure that the message has been
encrypted before hiding it into a cover image. If in any case
the cipher text got revealed from the cover image, the
intermediate person other than receiver can't access the
message as it is in encrypted form. It ensures double security
using cryptography and steganography technique.[1].
In [10] two stage (stego-based-crypto) invertible technique
is proposed based on cryptography and steganography
algorithms. In order to increase the security, the proposed
technique
uses
Rivest-Shamir-Adleman
(RSA)
cryptographic algorithm in the first stage for encrypting the
secret message, and Integer Wavelet Transform (IWT)
based lifting scheme in the second stage as a steganography
algorithm to hide the secret message, To increase the
capacity of secret message payload and robustness, data are
embedded in the integer wavelet transform coefficients; in
the low, middle and high frequency sub-bands. The
alteration component method and Advanced Encryption
Standard technique combination provide better security for
data. These two techniques encrypt the data as well as hide
the encrypted data in another medium so the fact that a
message being sent is concealed. In cryptography advanced
encryption standard (AES) algorithm is used to encrypt
secret messages and then the alteration component method
is used to hide encrypted message. By using these two
techniques the security of secret data increases to two tiers
and a high quality of stego image is obtained. [2]. All
steganographic algorithms have to comply with a few basic
requirements. These requirements are invisibility, payload

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

International Journal of Research in Engineering Technology and Management

capacity, robustness against statistical attacks, robustness


against image manipulation, independent of file format.
Steganography does not draw attention of the attacker
because the existence of the message is hidden, but
cryptography reverses it just scrambles messages [3].

3. PROPOSED APPROACH
The proposed approach uses the following techniques to
provide better two tier security for the information.

image. The ciphertext can be hidden in the LSB's of all three


color planes of the randomly selected pixels in the image.

Sender
Cover
Image
Msg 1

Pre-process

Msg 2

Messages

Msg 3

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
message bits more difficult to find and hopefully reduce the
realization of patterns in the image [9]. Data can be hidden
in the LSB of a different color plane (red, green and blue) of
the randomly selected pixel in the RGB color space.

4. DESIGN AND IMPLEMENTATION OF


PROPOSED SYSTEM
The Proposed system consists of following four modules:
Encryption module, Embedding module, Extraction module
and Decryption module.
A. Encryption module: It encrypts the message to be hidden
into cover image using RSA algorithm. It is done by passing
a public key of the receiver which is used for encryption of
the message to be hidden.It provides security by converting
the message into a cipher text, which will be difficult for
eavesdropper to decrypt without the knowledge of the
private key

Encryption
using RSA
Algorithm

Embed the
ciphered
messages
into all
channels of
Image

Decryption
using RSA
Algorithm

Extract the
ciphered
messages
from all
channels of
Image

(Binary
String)

1. RSA Cryptography Technique: Secret message that is to


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
private key is known to only message recipient.
2. LSB substitution based Steganography: It proposes LSB
based steganography, which embeds data in the LSBs of
randomly selected pixels of red, green and blue components
respectively

ISSN 2347 - 7539

Receiv
er
Msg 1
Msg 2
Msg 3

Robustness
check(PSNR,
MSE &
RMSE)

Fig -4: Block Diagram of Proposed System


C. Extraction module: It extracts the hidden cipher message
from cover image. It involves retrieving the ciphered
message from the file independent of the file format.
D. Decryption module: It decrypts the ciphered message to
retrieve the original message. Decryption can be done by
passing a private key. The private key can be used for
decryption of the message that is hidden. It provides security
by converting the cipher message, into the original data
message.
On Sender side: Message Encryption and Embedding
Algorithm
Aim: Secure transmission of message using cryptography
and steganography technique.
Input: Text messages, cover image, public 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
.In order to hide the message, data is first converted into a
byte format and stored in a byte array. The message is then
encrypted and it becomes cipher text. The key is used to
select random pixels in all three components of the color

(1) Read the cover image.


(2) Read the input messages.
(3) Convert the characters of input message into
corresponding ASCII values.

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

International Journal of Research in Engineering Technology and Management

(4 ) Read the public key


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

ISSN 2347 - 7539

Table -2: Cover image and corresponding stego image


Cover Image

Stego Image

(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.

(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
converted back into the original message.

Fig -5: Snapshots of Proposed System

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

International Journal of Research in Engineering Technology and Management

a) Selecting cover image b) Entering first message c) Choice


for second message d) Entering second message e) entering
third message f) Entering public key g) Histogram of stego
image h) Displaying cover image ,stego image and PSNR,
MSE and RMSE values i) Displaying decrypted messages

ISSN 2347 - 7539

message is hidden in the cover image. If the attacker knows


about the existence of secret message, cannot decrypt it
without the proper key. This proposed approach provides
double layer protection and can hide a large amount of
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
images are of size 300 300 pixels. The user has given the
choice of inputting single message to maximum three
messages. The single input message is embedded in only
red plane of the image. Two input messages are embedded
into red and green planes of the image respectively. Three
input messages are embedded into red, green and blue
planes of the image respectively.

Table -3: PSNR, MSE and RMSE Values of Tested


Images
Image

Chann
el

PSNR
(dB)

MSE

Boy

Red

1.6721e+0
8
1.8878e+0
8

3.8889e04
3.4444e04
3.0000e04

Green
Blue
Mickey
mouse

Red
Green

Tulip

Red

Kids

Red
Green
Blue

216750000
5.2723e+0
7
22950000
1.4778e+0
7
2.5781e+0
7
1.0055e+0
7
1.1084e+0
7

RMSE

0.0153
0.0145
0.0137

0.0012

0.0291

0.0028

0.0393

0.0044

0.0410

0.0025

0.0440

0.0065

0.0459

0.0059

0.0632

6. CONCLUSION
The proposed system provides means for secure data
transmission over the internet. The confidential information
is transmitted with two tier security. The secret message is
encrypted using RSA algorithm and hidden into random
pixels of the cover image in different planes. Hiding data
into random pixels is more efficient than the sequential
embedding. The attacker cannot get clues that secret

[1]. Anil Kumar, Rohini Sharma, A Secure Image


Steganography Based on RSA Algorithm and HashLSB Technique, International Journal of Advanced
Research in Computer Science and Software
Engineering, Vol. 3, Issue No.7July, 2013, pp. 363372.
[2]. Lokesh Kumar, Novel Security for Image
Steganography using Cryptography Technique,
International Journal of Advanced Research in
Computer Science and Software Engineering, Vol. 2,
Issue No.4, April, 2012, pp.143-146.
[3]. T Morkel,JHP Eloff and MS Olivier, An Overview of
Image Steganography,in Proceedings of the Fifth
Annual
Information
Security
South
Africa
Conference(ISSA 2005), Sandton, South Africa,
June/July 2005 (published electronically).
[4]. Mehdi Hussain and Mureed Hussain, A Survey of
Image
Steganography Techniques, Journal of
Advanced Science and Technology, Vol.54, May, 2013,
pp. 113-124.
[5]. Ronak Doshi, Pratik Jain, Lalit Gupta,Steganography
and Its Applications in Security, Journal of Modern
Engineering Research, Vol.2, Issue.6, Dec, 2012 pp.
4634-4638.
[6]. Anjali Tiwari, Seema Rani Yadav, N.K.Mittal,A
Review
on
Different
Image
Steganography
Techniques, Journal of Engineering and Innovative
Technology, Volume 3, Issue 7, January 2014, pp. 121124.
[7]. A. Joseph Raphael, V. Sundaram,Cryptography and
Steganography-A Survey, journal of Computer
Science and Software Engineering, Vol 2 (3), pp. 626630.
[8]. Falesh, M. Shelke, Asgwini A. Dongre, Pravn D.
Soni,Comparison of different techniques for
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

International Journal of Research in Engineering Technology and Management

ISSN 2347 - 7539

Management, Volume 3, Issue 2, Feb.2014, pp. 171176.


[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

Вам также может понравиться