chapter 6 lsb based data hiding with double...

24
102 CHAPTER 6 LSB based data hiding with double Encryption 6.1 Introduction In image steganography, the amount of secret data that can be embedded depends on the method and the cover-image as capacity limitation is a matter in steganographic systems. The frequency domain based steganography has drawback that the amount of secret data that can be embedded is limited. On the other hand, the spatial domain (LSB) based steganography has the benefit over the frequency method (DCT) in that the hiding capacity is much more and the working mechanism of LSB based method is simple. So in order to form a steganography system that provides high capacity, the LSB approach can be replaced with frequency domain based method. The basic concept of Least Significant Bit Substitution includes the embedding of the secret data at the bits having minimum weightage so that it will not affect the value of original pixel (Sharda and Budhiraja, 2013). The spatial domain based method enables simple form of data embedding by directly manipulating the LSBs of the cover-image and is also prone to detection as it embeds data sequentially in all pixels. The statistical attack may detect the presence of secret data in LSB embedding by simply verifying the bits of the cover-image pixel (Westfeld and Pfitzmann, 2000; Fridrich et al., 2001; Patil et al., 2012). In case the stego-image is known, the attacker can simply extract the LSBs of the cover-image to estimate the secret message (Chandramouli et al., 2004). Due to the possible attacks LSB embedding is relatively insecure, at least in its primitive form. However, due to the advantageous features of such method, it is useful for applications where security is desired. It also forms a good foundation for more secure steganographic techniques. Different variations of LSB based embedding can be performed and one of such variations is encrypting the secret message before embedding into the cover-image (Pavani et al., 2013).

Upload: others

Post on 30-Jun-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

102

CHAPTER 6

LSB based data hiding with double

Encryption

6.1 Introduction

In image steganography, the amount of secret data that can be embedded depends on

the method and the cover-image as capacity limitation is a matter in steganographic

systems. The frequency domain based steganography has drawback that the amount of

secret data that can be embedded is limited. On the other hand, the spatial domain

(LSB) based steganography has the benefit over the frequency method (DCT) in that

the hiding capacity is much more and the working mechanism of LSB based method

is simple. So in order to form a steganography system that provides high capacity, the

LSB approach can be replaced with frequency domain based method. The basic

concept of Least Significant Bit Substitution includes the embedding of the secret data

at the bits having minimum weightage so that it will not affect the value of original

pixel (Sharda and Budhiraja, 2013). The spatial domain based method enables simple

form of data embedding by directly manipulating the LSBs of the cover-image and is

also prone to detection as it embeds data sequentially in all pixels. The statistical

attack may detect the presence of secret data in LSB embedding by simply verifying

the bits of the cover-image pixel (Westfeld and Pfitzmann, 2000; Fridrich et al., 2001;

Patil et al., 2012). In case the stego-image is known, the attacker can simply extract

the LSBs of the cover-image to estimate the secret message (Chandramouli et al.,

2004). Due to the possible attacks LSB embedding is relatively insecure, at least in its

primitive form. However, due to the advantageous features of such method, it is

useful for applications where security is desired. It also forms a good foundation for

more secure steganographic techniques. Different variations of LSB based embedding

can be performed and one of such variations is encrypting the secret message before

embedding into the cover-image (Pavani et al., 2013).

Page 2: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

103

As in chapter 5, transform domain based steganographic method is combined with

cryptographic method to enhance the security of the secret message. Such technique is

not suitable for high rate of data embedding. Thus in order to achieve higher

embedding capacity and also security, LSB method can be combined with the

encryption technique. Spatial domain method tries to substitute redundant parts of a

digital image with secret message and is based on the fact that data manipulation

results in the smallest change in the value of the byte. This technique does not need

any transformation or decomposition on the original images and is fit for real-time

processing. Although spatial domain based steganographic process ensures simple

form of embedding than the frequency domain based technique, however it is not

simple as certain variations (encrypting the secret message before embedding) can

make such embedding process complex.

Employing the LSB technique for data hiding achieves both invisibility and

reasonably high storage payload (Johnson and Katzenbeisser, 2000). According to

Chandramouli and Memon, (2001) LSB based techniques pose challenge to a

steganalyst as it is difficult to differentiate cover-images from stego-images because

of the small changes that it makes. They suggested that in order to maintain the

random looking appearance of the LSB, the secret message can be encrypted before it

is embedded. Cryptography and LSB steganography techniques can be combined for

ensuring security, robustness and capacity. The role of cryptography is to assure

privacy whereas steganography assures secrecy. Such combining technique can result

in a better protection system by providing different layers of security. Even though

both methods provide security, to add multiple layers of security it is always a good

practice to use cryptography and steganography together (Raphael and Sundaram,

2011).

Chan and Cheng, (2004) introduced a data hiding scheme by simple LSB substitution

with an optimal pixel adjustment process (OPAP). They described that by applying an

optimal pixel adjustment process to the stego-image obtained by the simple LSB

substitution method, the image quality of the stego-image can be greatly improved

with low extra computational complexity. Song et al., (2011) stated that a secured

communication protocol can be formed by that combines LSB steganography and

cryptography techniques. Karim et al., (2011), introduced an approach of least

Page 3: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

104

significant bit (LSB) based image steganography that enhances the existing LSB

substitution techniques, to improve the security level of hidden information. The

security concept hides secret information within the LSB of the pixel of the image,

where a secret key encrypts the hidden information to protect it from unauthorized

users. According to their simulation results the value of PSNR gives better result and

it is difficult to extract the hidden information. According to Tyagi et al., (2012), LSB

steganography along with cryptography may be some of the future solution for

protection method against unauthorized access and data secrecy. They used

symmetric encoding process for encrypting the secret message and then embedded the

bits of the encrypted message into the LSBs of the cover-image. They further stated

that detection process is one of the active fields where the problems are big. So with

some variations in LSB method, the secrecy of the steganographic process can be

further enhanced.

Tomar et al., (2012) stated that combining LSB based steganography and

cryptography forms an effective data hiding technique and provide better security of

hidden data. They encrypted the secret data by RSA (Rivest-Shamir-Adleman)

algorithm and then embedded the secret bits into each cover pixel by modifying the

least significant bits (LSBs). The average PSNR value of their scheme is 52-54 dB.

Phad et al., (2012), developed a security model for secret data that uses Advanced

encryption standard (AES) based cryptography and LSB Steganography approach,

where the encrypted secret message is embedded into image by using pixel value

differencing (PVD) and K-bit least-significant-bit (LSB) substitution. According to

them, such combining process provides two-tier security to secret data and enables

more significant promotion in the terms of adaptability, capacity, and imperceptivity.

They further stated that the experimental result shows the proposed approach obtains

both larger capacity and higher image quality. In their case for embedding 2045260

bits the average PSNR is 42 dB for color image.

The encryption process uses a key for changing the order or replacing the letters of

the secret message and the use of a key in any processing itself provides a measure of

security. As the size of the key is not fixed, thus it will be extremely difficult for the

unauthorized person to predict the size of key and data. The LSB approach when

Page 4: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

105

combined with the encryption process provides both capacity and security of the data

to be protected.

The objective of this chapter is to study the method that uses cryptography

(Transposition and Substitution cipher with keys) together with LSB steganography.

The joining of these three techniques can create a robust steganography-based

communication system capable of withstanding attacks and detection process. The

secret data and the key used for encryptions can pass multiple levels of security

checks by assuring the integrity, authenticity and security which can make a reliable

process for sensitive data. While both encryption methods assure that the message

becomes secure with the usage of keys, the steganographic algorithm introduces an

additional level of security.

6.2 Proposed Method

To enhance the embedding capacity of image steganography, a framework is

proposed by combining cryptography and LSB steganography that can attain minimal

perceptual degradation and protect from unauthorized data access. Here the secret

message undergoes double encryption before embedding it into the cover-image. The

secret message is first encrypted by transposition cipher method using a key. Then the

ciphertext is encrypted further using substitution cipher technique with another key.

The double encrypted message is then embedded into the cover-image by using LSB

substitution. Minimizing embedding impact and maximizing embedding capacity are

the key factors of any steganography algorithm and LSB method comply with this

requirement. The objective of such mechanism is to form a steganographic model that

meets both security as well as capacity. For this reason, LSB steganography is

enhanced using an extra level of security, which encrypts the secret message two

times using two different methods before embedding it into the cover-image.

6.2.1 Transpose-Substitute Encryption

The encryption process used in the proposed work is based on classical techniques i.e.

substitution and transposition which are regarded as building blocks of cryptography

Page 5: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

106

(Kahate, 2008). The proposed encryption technique is based on combining

transposition and substitution cipher method in a way to create ciphertexts which are

double encrypted. Transposition cipher encrypt secret message (plaintext) by

changing the order of the letters of the message. In such cipher the plaintext remains

the same, but the order of characters is shuffled around or the plaintext symbols are

rearranged (i.e., transposed or permuted) to produce ciphertext. Transposition does

not alter any of the bits in the plaintext, but instant moves the position around within

it (Smith, 2001). In this encryption, the key defines the possible ordered arrangements

or groupings of the letters of the plaintext. This ciphertext is the disguised form of the

information and could be transmitted across a network or stored within a file system

with the objective of providing confidentiality (Stallings, 2003). A transposition

cipher, also sometimes called a permutation cipher, for which applying encoding to

plaintext produces ciphertext with the same symbols as the plaintext with a fixed

period, but rearranged in different positions (Mao, 2004). A permutation cipher is a

transposition cipher in which the key is a permutation, where the plaintext is grouped

randomly. The larger the size of the permutation the more secure the cipher-text will

be.

On the other hand, instead of changing the order of characters as in transposition

cipher, the substitution cipher replaces the character of the message with other

character so as to make the message unintelligible (Friedman, 1967). In such

encryption method, the letters or characters of the plain text are substituted by another

letter in a way to make it meaningless. A substitution cipher is an encryption scheme

that uses only substitution transformations where the method is to replace the

character and the key is the number of characters to replace it. The two other

techniques related with transposition and substitution encryption method for

obscuring the plaintext message are diffusion and confusion (Smith, 2001). Diffusion

changes the plaintext by spreading it over the ciphertext and the simplest way to cause

diffusion is through transposition. Confusion obscures the relationship between the

plaintext and the ciphertext and is done through substitution.

Page 6: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

107

Figure 6.1: Block diagram of Transpose-Substitute Encryption process

Although the two techniques differ in their way of encrypting the message but they

can work together. In the proposed method the secret message is initially encrypted

using transposition cipher and then another round of encryption is performed using

substitution cipher technique as shown in figure 6.1. In the first phase of the

encryption, the transposition cipher is used which rearranges of the letters of the

secret message based on the key (i.e. it permutes the secret message). Such

arrangement is done with K columns and K rows and thus forming a block of size K ×

K, where K is the key that forms the permutation of the plaintext within the block.

The transposition method operates by arranging the letters of the plaintext (secret

message) into the blocks row-wise and then the letters are read-off in column-wise to

form the ciphertext. Thus the plaintext is broken into segments of size of the

permutation and the letters within that segment are permuted according to this key.

Both the length of the rows and the subsequent arrangement of the columns are

defined by the key. Once the message exactly fits the first block, then the next block

is used to fill the remaining plaintext and so on. The key determines the number of

rows and columns, and the number of letters in the message (based on the key)

determines the number of blocks. The arrangement of plaintext in the blocks is

performed using the spaces between the texts, so in encryption process the spaces are

placed in the sequence it comes. Such enables in decoding process to retrieve the

Page 7: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

108

exact plaintext. Here is an example of the first encryption step i.e., the transposition

encryption, in which the letters are written in the block row-wise, where the key is 7

that forms blocks of 7X7 and the number of blocks is formed by the number of

characters as in table 6.1.

Table 6.1: Plain Text entered into the two blocks in row-wise

If the following text, written below is used as plaintext:

BY COMBINING STEGANOGRAPHY AND CRYPTOGRAPHY WE CAN ACHIEVE

BETTER SECURITY OF DATA AND INFORMATION

Then it is placed row-wise into the block. To form the ciphertext, it is read off in

columns to get the following:

BITRNTYYNEAD IGP GWCNAHCREOGNYRA M O YPCBSGAPHANVER NR

ERIDDMA TA ACBSYTITHEE ANIITCO FOETUFAON

Thus it forms a different text (ciphertext) which is not understandable. In the second

encryption phase, the ciphertext generated by transposition technique is further

encrypted by using substitution cipher technique. In this process each letter is

substituted by an arbitrary letter to form second state of ciphertext. In such

replacement of letter another key is used that defines how much to shift. Thus the

ciphertext formed as a result of substitution encryption produces different ciphertext

depending on the specific key being used. If the substitution cipher‟s key is 17, then

the ciphertext formed by encrypting the transposed cipher is given below:

B Y C O M B

I N I N G S

T E G A N O G

R A P H Y A

N D C R Y P

T O G R A P H

Y W E C A

N A C H I E

V E B E T T

E R S E C U

R I T Y O F

D A T A A

N D I N F O

R M A T I O N

Page 8: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

109

SZKIEKPPEVRUF ZXG XNTERYTIVFXEPIR D F PGTSJXRGYREMVI EI

VIZUUDR KR RTSJPKZKYVV REZZKTF WFVKLWRFE

Such ciphertext is the substituted form of the transposed cipher which is the final

ciphertext formed by combining transposition and substitution encryption technique.

Decrypting the cipher-text: The decryption of the ciphertext for combined

transposition and substitution technique is performed in the reverse order as shown in

figure 6.1. Firstly the ciphertext is decrypted using substitution decryption process

based on key that outputs the encrypted form of the transposition cipher. Then the

ciphertext is arranged into the blocks in the order of columns and then it is read in

row-wise. The order of the permutation of column and row is defined by same key as

used in encryption process. For each of the blocks, all of the possible permutations of

the columns are considered. The letters are arranged column-wise and are read off

row-by-row to get the original plaintext. Thus the decryption process also requires

two keys one each for transposition and substitution cipher to get back the original

plaintext (secret message).

6.2.2 Data embedding procedure

In this data hiding process the bits of the double encrypted message is embedded in to

the LSBs of the cover-image. As image comprises of pixel contribution from red,

green and blue components and each pixel has numbers from the color components

(for 24-bit bitmap image each of red, green and blue plane has 8 bit). At 8 bit of the

color number, if least significant bits are changed, the visual system cannot detect

changes in pixel and thus it is possible to replace message bits with image pixels bit.

For example if the following pixel value 10111011 is considered and the secret

information is stored in the least significant bit, at the worst situation the pixel

changes to 10111010 and examinations shows that such alteration is not perceptible.

If the LSB in a byte of an image is manipulated, either one is added or subtracted

from the value it represents. So, the proposed method uses LSB based process to

embed the encrypted data into the cover-image.

Page 9: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

110

In order to hide the encrypted message, data is first converted into byte format and

stored in a byte array. The secret message is embedded into the LSB position of each

pixel. If the original pixel consist of bits as follows:

(r7 r6 r5 r4 r3 r2 r1 r0, g7 g6 g5 g4 g3 g2 g1 g0, b7 b6 b5 b4 b3 b2 b1 b0)

In addition, the encrypted character (bytes) consists of bits: (c7 c6 c5 c4 c3 c2 c1 c0).

Then the first secret bit is replaced with the LSB of the selected pixel‟s blue plane,

next secret bit with the green plane‟s LSB and then with the LSB of red plane (r7 r6

r5 r4 r3 r2 r1 c2, g7 g6 g5 g4 g3 g2 g1 c1, b7 b6 b5 b4 b3 b2 b1 c0). The pixels of the

cover-image are selected sequentially and the embedding process operates in the

pixels by first inserting the secret bit in the LSB of the blue plane, then green and

finally the red plane. Such method of manipulating the secrets bits into LSBs also

increases the security because the embedding is done in reverse order. Once the

insertion in the first pixel is over, then data embedding takes place in the rest of the

pixels in the similar way. In this way entire secret message is inserted into the pixels

of the cover-image.

If a pixel with value (225,107,100) is used to embed message character „a‟, then the

new pixel is formed as shown below:

Original pixel = (11100001, 01101011, 01100100)

„a‟ = 01100001(ASCII value 97)

New pixel = (11100000, 01101010, 01100101)

New pixel = (224, 106,101)

Here it is noticed that at worst case, the pixel value of (225,107,100) is changed to a

new pixel value of (224, 106,101) and such manipulation does not affect the overall

quality and statistics of the cover-image. The embedding process operates over the

image, and embeds the message character into cover-image pixel by pixel at a time.

Once all the message characters are embedded into the cover-image, a target character

is inserted into the pixels of the cover-image immediately after the last character of

the secret message. The target character can be a special symbol and is also known as

Page 10: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

111

terminator character which is the last character that is embedded and after its

embedding, insertion process stops i.e., the target character signifies the termination

of the embedding process. The binary representation of the target character is

embedded into the pixels in the same way as the message bits are embedded. This

helps the decoding process to stop extracting of data from stego-image after getting

the target character, which signifies the end of the message.

Algorithm to embed secret message:

Step 1: Read the cover image and text message which is to be hidden in the cover

image.

Step 2: Encrypt the message using transposition cipher.

Step 3: Perform the second round of encryption using substitution cipher.

Step 4: Convert encrypted message into binary.

Step 5: Calculate LSBs of each pixels of cover image.

Step 6: Replace LSBs of cover image with each bit of secret message sequentially.

Step 7: Repeat step 6 until the entire secret bits are embedded. Then place the binary

representation of the target character at the end of the embedding.

Step 8: Write stego image.

6.2.3 Message extraction process

The embedding process stated above gives a picture to what extent it is possible to

extract the secret message bits from the LSBs of the pixels. Using the same sequence

as in the embedding process, the set of pixels storing the secret message bits are

extracted sequentially from the stego-image. The LSBs of the selected pixels are

extracted and lined up to reconstruct the secret message bits. As in the embedding

process a target (terminator) character is inserted into the stego-image which is the

last character to signify the end of embedding of data. When the binary representation

of the target character is found the extraction process stops. The purpose of putting

this character is that, in the process of retrieving the message the extraction algorithm

may take extra bits and thus the target character will terminate the extraction process.

The bits of the LSB are retrieved and placed in the array. Then content of the array

Page 11: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

112

converts into decimal value that is actually ASCII value of encrypted message. Each

8 bit from the array is converted into character. Thus the message that is retrieved

from the stego-image is actually encrypted form of the original message. The

retrieved message is firstly decrypted using substitution decryption method based on

the key to get back the encrypted message and then further decrypted using the

transposition method. In decrypting the message using transposition cipher method,

the ciphertext is written column-wise in blocks of same size as in encrypting method

and is read out row-wise in a order depending on the key. If the decryption keys do

not match with the keys used in the encryption methods, the original plaintext (secret

message) will not retrieve.

Algorithm to extract secret message:

Step 1: Read the stego image.

Step 2: Calculate LSBs of each pixel of stego image.

Step 3: Retrieve bits & convert each 8 bit into character.

Step 4: Repeat Step 2 and 3 until the binary representation of the target character is

found.

Step 5: Perform substitution decryption technique to the retrieved characters.

Step 6: Again decrypt the message using transposition decryption method.

Step 7: The retrieved characters are placed sequentially to get back the original secret

message.

6.3 Results and Discussion

In order to examine the performance of the proposed steganographic technique, an

evaluation scheme for steganographic system is conducted. As steganographic

systems have two fundamental characteristics - imperceptibility and the hiding

capacity which are investigated in order to evaluate the system that determines the

superiority of a steganography technique. The secret data are embedded in the LSBs

of the cover-image as mentioned in the proposed algorithm. The issues relating to the

experimental approach is considered, which is used to measure the impact of such

Page 12: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

113

embedding. The experiments have been conducted using the MATLAB R2009b

program on Windows 7 platform. Various performance parameters like PSNR, MSE,

payload size, time computation etc. have been used to evaluate the performance using

various images which include both well known standard and natural images. Initially,

the experimental analysis presents a comparison of the proposed method with OPAP

(Chan and Cheng, 2004) to demonstrate its performance. Fourteen well-known

images each with size 512 × 512, namely „„Lena‟‟, „„Baboon‟‟, „„Peppers‟‟, „„Jet‟‟,

„„Tank‟‟, „„Airplane‟‟, „„Truck‟‟, „„Elaine‟‟, „„Couple‟‟, „„Boat‟‟, „„Man‟‟, and

„„Tiffany‟‟, “Barbara”,” House”, are used as cover-images in the experiments. The

secret messages consist of the texts of this article that are encrypted before embedding

into the cover-images. The experiments are based on embedding 300000 and 600000

bits of secret message into the cover images. Some of the cover-images and the

resulting stego-images formed are shown in figure 6.2 and figure 6.3.

(a)Cover-image: Airplane (c) Stego-image: Steg-airplane

(b) Cover-image: Boat (d) Stego-image: Steg-boat

Figure 6.2: (a)-(b) Cover-images and (c)-(d) their resulting Stego-images

Page 13: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

114

(a) Cover-image: Barbara (c) Stego-image: Steg-barbara

(b) Cover-image: House (d) Stego-image: Steg-house

Figure 6.3: (a)-(b) Cover-images and (c)-(d) their resulting Stego-images

The difference between the resulting cover-images and stego-images are

indistinguishable as seen in figure 6.2 and figure 6.3. Thus it can pass the

perceptibility test as there is no visual distortion between stego-image and the original

cover image. The more the outlet of algorithm is similar to the original image, the

more perceptibility of algorithm is achieved therefore the recognition of hidden data

will be more difficult. The generated stego-images show that they contain no artifacts

that can be identified by human eyes.

Page 14: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

115

Table 6.2: Comparison of PSNR values of OPAP (Chan and Cheng, 2004) and the

proposed method obtained by embedding 300000 encrypted bits

Cover-image OPAP (Chan and

Cheng, 2004)

Proposed

Method

PSNR MSE PSNR MSE

Airplane 50.0 0.6502 55.4 0.1875

Boat 50.1 0.6354 55.4 0.1875

Baboon 50.1 0.6354 55.3 0.1919

Barbara 50.1 0.6354 55.3 0.1919

Couple 50.1 0.6354 55.3 0.1919

Elaine 50.1 0.6354 55.4 0.1875

House 50.1 0.6354 55.2 0.1964

Jet 50.0 0.6502 55.2 0.1964

Lena 50.1 0.6354 55.4 0.1875

Man 50.1 0.6354 55.4 0.1875

Peppers 50.1 0.6354 55.3 0.1919

Tank 50.1 0.6354 55.2 0.1964

Tiffany 50.0 0.6502 55.3 0.1919

Truck 50.1 0.6354 55.4 0.1875

Zelda 50.1 0.6354 55.3 0.1919

The PSNR and MSE values of the proposed scheme and OPAP (Chan and Cheng,

2004) based on embedding 300000 bits secret data into the fourteen cover images is

presented in table 6.2. Referring to the table, it is seen that the proposed method

presents better PSNR values than OPAP.

Page 15: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

116

Figure 6.4: Shows the results of PSNR values of the proposed method in comparison

with OPAP (Chan and Cheng, 2004) for embedding 300000 encrypted bits

A larger PSNR value indicates the fact that the discrepancy between the cover image

and the stego-image is not visible to the human eye and also it can override some of

the statistical measures of detecting the secret data. As seen in figure 6.4, the

proposed method acquires an average PSNR value 55 dB and OPAP has 50 dB for the

fourteen images each with size 512 × 512. Thus in evaluating Objective Quality

performance the proposed method performs better than OPAP. It is observed that the

PSNR values of the proposed method increased by 5 dB. This is because the

distortion of the cover-image can be greatly improved by the proposed scheme.

In order to evaluate further and to analyze image quality and perceptibility of the

proposed method in comparison to OPAP with regard to increasing capacity, the next

experiment is based on embedding 600000 bits of data in the same standard cover

images. The results of the embedding are shown in table 6.3 where the secret data is

increased by two times of the earlier experiment.

Page 16: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

117

Table 6.3: Comparison of PSNR values of OPAP (Chan and Cheng, 2004) and the

proposed method obtained by embedding 600000 encrypted bits

Cover-image OPAP (Chan and

Cheng, 2004)

Proposed

Method

PSNR MSE PSNR MSE

Airplane 45.3 1.9190 52.3 0.3829

Boat 45.4 1.8753 52.3 0.3829

Baboon 45.3 1.9190 52.3 0.3829

Barbara 45.6 1.7909 52.3 0.3829

Couple 45.3 1.9190 52.2 0.3918

Elaine 45.4 1.8753 52.3 0.3829

House 45.2 1.9637 52.1 0.4009

Jet 45.2 1.9637 52.3 0.3829

Lena 45.7 1.7502 52.3 0.3829

Man 45.3 1.9190 52.3 0.3829

Peppers 45.4 1.8753 52.3 0.3829

Tank 45.5 1.8327 52.2 0.3918

Tiffany 45.6 1.7909 52.3 0.3829

Truck 45.7 1.7502 52.3 0.3829

Zelda 45.4 1.8753 52.3 0.3829

From the table 6.3, it is seen that by increasing the embedding capacity the proposed

method still exhibits better PSNR values in comparison to OPAP. For a given attack,

PSNR is used as quality metrics can be used in determining the desired visual quality

for a given robustness.

Page 17: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

118

Figure 6.5: Shows the results of PSNR values of the proposed method in comparison

with OPAP (Chan and Cheng, 2004) for embedding 600000 encrypted bits

For embedding 600000 encrypted bits, the proposed method shows an average PSNR

value of 52.2 dB which is 6 dB more compared to OPAP as shown in figure 6.5.

Thus, in deciding whether an image is stego or not, the quality measure plays a vital

role. The results indicate that the quality of the stego-image is improved using such

approach.

From table 6.2, it is observed that for all images when 300000 encrypted bits is

embedded, the proposed scheme exhibits PSNR value ranging from 55.2 to 55.4 dB

while OPAP shows value ranging from 50.0 to 50.1. In table 6.3, it is observed that

when the secret data is doubled i.e. when 600000 encrypted bits is embedded, the

proposed method shows PSNR value ranging from 52.1 to 52.3 dB and it is 45.2 to

45.7 in case of OPAP. It is also observed that incase of OPAP, PSNR values

decreases from 50 db to 45 dB and the proposed method decreases from 55 db to 52

dB when the hiding capacity is increased from 300000 bits to 600000 bits. Thus the

decrease in PSNR value is high in case of OPAP compared to the proposed method. It

can also be stated that the proposed method can afford higher capacity without major

changes and degradation of stego-images compared to OPAP. By comparing table 6.2

and table 6.3, it is observed that there is a tradeoff between capacity and PSNR, when

the capacity is increased PSNR value decreases. However, steganographic capacity

and imperceptibility are at odds with each other. Thus, it is not possible to

simultaneously maximize the capacity and imperceptibility of a steganographic

system for a given cover-image. Consequently, steganographic systems must achieve

a balance among these requirements.

Page 18: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

119

Furthermore, in order to compute the performance of the proposed method, some

color images are taken as cover-medium to embed three set of random sized

encrypted messages. In this evaluation several criteria such as the size of stego-image

and cover-image, size of the embedded and extracted message, the quality of the

images (PSNR and MSE) and the computational time (embedding and extracting

time) are considered. In this case, the size of the secret message and images has been

considered to investigate the impact of embedding data on the final stego-image. The

results of the embedding process are listed in table 6.4.

(a) Cover-image: Desert (b) Stego-image: Stegdesert1

(c) Stego –image: Stegdesert2 (d) Stego-image: Stegdesert3

Figure 6.6: (a) Cover-image: Desert and (c)-(d) its resulting Stego-images

Page 19: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

120

(a) Cover-image: Park (b) Stego-image: Stegpark1

(c) Stego –image: Stegpark2 (d) Stego-image: Stegpark3

Figure 6.7: (a) Cover-image: Park and (c)-(d) its resulting Stego-images

From the figure 6.6 and 6.7 it is observed that the cover-images and its resulting

stego-images are indistinguishable to the naked eyes. Based on this distinction, there

appears no visual distortion on the stego-images. This is because of the fact that the

secret bits are embedded by replacing the LSB‟s of an image. In an image changing

the LSBs does not result in image distortion and thus the resulting stego-image is

identical to the cover-image. If a steganographic algorithm leave a trace during

embedding than it can be detected through statistical analysis. For an algorithm to be

statistically undetectable, it should not form any visible distortion to the resulting

image.

Page 20: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

121

Table 6.4: Results of embedding variable sized encrypted messages into some color images takes as cover-medium

Cover

image

Size of the

Cover

Image

(in KB)

Size of the

Secret

Message

(in KB)

Time

required to

embed the

message

(in Seconds)

Stego

image

Size of

Stego

Image

(in KB)

Time

required to

extract the

message

(in Seconds)

Size of the

Extracted

Message

(in KB)

MSE

(in %)

PSNR

(in dB)

Bud 47 1.05 0.062324 Stegbud1 47 2.011823 1.05 0.0923 58.4782

2.80 0.076491 Stegbud2 47 5.439426 2.80 0.2476 54.1930

4.79 0.083206 Stegbud3 47 9.164710 4.79 0.4219 51.8788

Desert 733 14.8 0.120127 Stegdesert1 733 28.226130 14.8 0.0808 59.0565

51.6 0.193557 Stegdesert2 733 100.357572 51.6 0.2820 53.6276

90.8 0.453920 Stegdesert3 733 184.500716 90.8 0.4948 51.1863

Scene 1409 50.8 0.173254 Stegscene1 1409 99.171983 50.8 0.1440 56.5465

106 0.280689 Stegscene2 1409 222.911781 106 0.3035 53.3096

175 0.346176 Stegscene3 1409 401.935536 175 0.4985 51.1543

Park 2092 81.1 0.299805 Stegpark1 2092 161.117167 81.1 0.1555 56.2175

167 0.494514 Stegpark2 2092 367.577583 167 0.3203 53.0755

260 0.985483 Stegpark3 2092 608.358001 260 0.4991 51.1490

Page 21: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

122

Different sets of message ranging from 1.05 K.B to 260 K.B that are encrypted firstly by

transposition cipher and then using substitution cipher method are used to embed into the

LSB of the cover-images namely bud, desert, scene and park which are of different

dimensions. Table 6.4, presents the results of embedding, evaluated using different

parameters. It is observed that the variation in PSNR values obtained with increasing

values of embedded capacity. The PSNR value lowers slightly with the increase in

message capacity. The PSNR values obtained are better in regard to the fact that the color

images should show PSNR values larger than 40dB. In the proposed method the PSNR

values ranges from 51 dB to 59 dB. The MSE is inversely proportional to PSNR, an

increase in PSNR leads to decrease in MSE value and vice versa. A good steganographic

method should have lower MSE value.

Figure 6.8: Shows the PSNR values of four cover images with secret message of different

sizes

As expected, Table 6.4 shows that the increase of payload affects the value of PSNR. In

the experimental work it is found that by increasing the payload, PSNR value drops

down. Thus it is necessary to make a compromise between payload and PSNR. Table 6.4

shows the average results for each group of colored images and figure 6.8 shows the

Page 22: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

123

results in graph to help study results more easily. If the set of images is changed, results

will change accordingly. As it is clear when the value of correlation factor is increased,

value of MSE increases and ultimately decreases the value of PSNR. From the table 6.4,

it is also seen that the size of the stego-image is same as the size of the cover-image as

the proposed embedding procedure follows lossless compression which maintains the

original image data exactly. Lossless compression attains low reduction of bits compared

to lossy and thus the image size remains the same. LSB method tries to substitute

redundant parts of a digital image with secret message and does not need any

transformation or decomposition on the original images. The basic concept of such

scheme includes the embedding of the secret data at the bits which having minimum

weighting so that it will not affect the value of original pixel.

The proposed method also enables high embedding of secret data as seen in the table 6.4,

where 260 K.B of encrypted data is hidden in the cover-image park which also shows a

good PSNR value of 51 dB. Spatial domain steganographic techniques offer lossless

compression to embed secret data into the LSB of an image and thus they are preferred

for high capacity data hiding. Such technique does not make any serious perceptual

change in image as they involve in removing redundant parts of information of the cover-

image for data hiding.

The amount of secret data that is embedded is retrieved fully without any error and

without any data loss as in table 6.4. It is also from the fact that the proposed method only

changes the LSB of the cover-image which embeds secret messages in a subset of the

LSB plane of the image by altering least significant bit in a certain layer of the image file.

This is also from the fact that lossless compression attains very low compression and thus

the original secret message remains intact and is extracted successfully.

The processing time for embedding and extraction technique using different cover images

is presented in Table 6.4. It shows that for embedding 1.05 K.B of secret data the time to

embed is 0.062324 seconds while time required in extracting the message is 2.011823

seconds. On the other hand for embedding 260 K.B of secret data the time to embed is

0.985483seconds and the extracting time is 608.358001 seconds. The execution time of

Page 23: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

124

extracting process is longer compared to embedding and is in direct ratio with the size of

embedded files. The reason for such increase in time processing is that more time

required in extracting secret message of larger size and finding the binary representation

of the target character. As in the embedding process a target character is inserted as the

last character to facilitate in the extraction process.

Figure 6.9: Shows the computation time for embedding the secret message into four

cover-images

The embedding time increases gradually with the increase in the size of the secret

message as in figure 6.9. As for the execution time, it is based on the size of the message.

With increasing payload the computation time increases. Basically, the processing time

depends on the specifications of the computer that used to run the program. Even though,

the processing times for embedding and extraction are acceptable.

6.4 Chapter Summary

In this chapter LSB based steganography is combined with double-encryption technique

to enhance the embedding capacity of image steganography and provide an imperceptible

stego-image. As Steganography pay attention to the degree of invisibility and

Page 24: CHAPTER 6 LSB based data hiding with double Encryptionshodhganga.inflibnet.ac.in/bitstream/10603/97221/8/th-1816_ch6.pdf · LSB based data hiding with double Encryption 106 (Kahate,

LSB based data hiding with double Encryption

125

cryptography ensures security of the message. Thus, the combining model will result a

steganographic image by performing cryptographic functionality and, preserving its

steganographic nature. Hiding data using LSB modification alone is not highly secure.

The combination of these two methods will enhance the security of the data embedded.

The secret message undergoes double encryption firstly using transposition cipher

method and then with substitution method before embedding into the cover-image file.

Then encrypted message is embedded in the cover-image by using least-significant-bit

(LSB) technique that enables high capacity of data embedding. The embedding process is

also different which operates in the pixels by first inserting the secret bit in the LSB of

the blue plane, then green and finally the red plane. Once all the message characters are

embedded into the cover-image, the target character is inserted in the pixel of the cover-

image immediately next to the one containing the last input character of the message.

The main security lies in the encryption method where the secret message which is

embedded undergoes double encryption process and both the encryption process is

controlled by two different keys. In examining the performance using various

parameters, it is seen that the proposed steganographic technique shows good results.