Sunteți pe pagina 1din 11

Secret Communication Combining

Cryptography and Steganography

Ayan Chatterjee and Asit Kumar Das

Abstract Recently, many applications are Internet-based where confidentiality is


maintained by secret communication. Cryptography and steganography are two
popular methods used for the purpose. The proposed method develops a new data
hiding scheme combining the concepts of cryptography and steganography to
enhance the security of communication. In cryptography, basic concept of differ-
ential and integral calculus is used during encryption and decryption, respectively,
and in steganography, data is embedded in an image file and extracting the original
message using discrete cosine transformation. This hybrid technique is sound as the
number of secret keys used for encryption varies with the size of message, and at
the same time generated keys are independent of each other which prevent hacking
of all keys together. As a result, more security is enforced in the communication
channel. The method is evaluated by measuring the distortion of originality of
image file computing peak signal-to-noise ratio.

Keywords Cryptography ⋅ Steganography ⋅ Network security


Discrete cosine transform ⋅ Signal-to-noise ratio ⋅
Mean square error

1 Introduction

The word security signifies the quality of protection, i.e., to be free from any
danger. Network security is protection of secret data among sender and intended
receivers [1, 2] during wireless communication to maintain confidentiality, integ-
rity, and availability of the data. Therefore, communication technique should be
developed in such a way that any unwanted person cannot hack the secret data

A. Chatterjee (✉)
D.El.ED Section, Sarboday Public Academy, East Midnapore, India
e-mail: ayanchatterje2012@gmail.com
A. K. Das
Department of Computer Science & Technology, IIEST, Shibpur, India
e-mail: akdas@cs.iiests.ac.in

© Springer Nature Singapore Pte Ltd. 2018 281


K. Saeed et al. (eds.), Progress in Advanced Computing and Intelligent Engineering,
Advances in Intelligent Systems and Computing 563,
https://doi.org/10.1007/978-981-10-6872-0_26
282 A. Chatterjee and A. K. Das

[3–5]. Cryptography is the art of secret writing [1], and steganography is the art of
hidden communication. In other words, cryptography scrambles a message so that it
cannot be understood and steganography hides the message so that it cannot be
visualized [2]. The word steganography is obtained from Greek dictionary, in which
stego means ‘keep secret’ and Graphy means ‘making words or writing’ [3]. The
general architecture of encryption and decryption of cryptography is shown in
Fig. 1.
From Fig. 1, it is realized that the original message or plaintext which is required
to be made secure will be encrypted through some encryption algorithm and gen-
erated secret key(s). Encrypted message will be sent through some unsecured
medium to the receiver. Receiver will obtain the encrypted message called cipher
text and apply proper decryption algorithm with secret key(s), to decrypt the cipher
text for finding original message. This is the general architecture of cryptography.
Various encryption and decryption techniques of cryptography [1, 3, 4, 6, 7] have
developed previously. Among them, Advanced Encryption Standard (AES), Data
Encryption Standard (DES), and Rivest-Shamir-Adleman (RSA) are the popular
approaches due to their security concern. But the major disadvantage of basic
cryptography model is that if anyone wants to hack the data from the unsecured
channel, though he cannot realize the meaning of data, there is a possibility of
existence of secret communication.
Steganography is another popular concept used to hide the secret communication
[8, 9]. In this approach, the secret data can be inserted into an image, audio, or video
with a minimum change or distortion of the original one. The distortion of the cover
image is so less that the difference between it and stego image cannot be distin-
guished visually [7, 10, 11]. Generally, data is inserted into the least significant bit
(LSB) positions of the image pixels or in the LSB positions of the pixels of video
frame. The quality of a data hiding scheme depends on the rate of distortion between
cover and stego image. The general architecture of steganography is shown in Fig. 2.
Various steganography techniques [3, 5, 12] were developed previously. Among
them, Direct Least Bit Substitution (DLSB), Optimal Pixel Adjustment Procedure
(OPAP), Pixel Indicator Technique (PIT), Pixel-Value Differencing (PVD),
Selected Least Significant Bit substitution (SLSB), etc., were developed depending

Fig. 1 Model of cryptography


Secret Communication Combining Cryptography … 283

Fig. 2 Model of steganography

on spatial domain steganography and JSteg, Outguess, F3, F4, F5 algorithms [3]
were developed depending on Transform domain steganography [3]. Transform
domain is more secured than spatial domain. Some hacking techniques [3, 5] have
also developed gradually. Among them, chi-square attack, visual attack, histogram
attack, and blockiness are very common [3–5]. Generally, PSNR, SNR, etc., are
parameters to check the quality of data hiding algorithms. Now a day, various
hybrid techniques [3, 4, 13, 14] are developed combining cryptography and
steganography, which are more secured than only a steganography approach. The
general architecture of hybrid technique of cryptography and steganography is
shown in Fig. 3.

Fig. 3 Model of hybrid technique of cryptography and steganography


284 A. Chatterjee and A. K. Das

From Fig. 3, it can be realized that the general hybridized technique secrets the
data at first using some encryption algorithm and secret key(s). Then the encrypted
message is sent to the receiver hiding in an image or the frames of a video/audio.
In 2012, Deepak Singla and Rupali Syal proposed a hybrid scheme [6] to send a
message safely and securely. The scheme combines RSA algorithm for cryptog-
raphy DCT-based algorithm for steganography. This technique is used only for a
fixed length message in a block to extract the data from image in the receiver end.
In the same year, Rahul Jain and Naresh Kumar proposed another new scheme [15]
with same demerits. In this scheme in an 8 × 8 block of an image, a 16-bit data is
sent [15]. These techniques are not suitable when the length of messages varies in
an image block. In the paper, we propose a novel approach where number of bits
inserted in an N × N block of image is not always fixed.
In Sect. 2, we discuss our proposed data hiding scheme. In Sect. 3, some
experiments with results are analyzed comparing with other approaches. Finally, the
conclusion is made on Sect. 4.

2 Data Hiding Scheme

In this scheme, we have used basic idea of differential and integral calculus for
encryption and decryption part of cryptography. The uniqueness of encryption is
that the secret keys will be generated at the time of encryption depending on data
and number of keys depending on length of data. In steganography part, the
encrypted message, the secret keys, and number of secret keys obtained after
encryption are embedded in image blocks using DCT transformation. This stego
image is sent through the communication channel and receiver decrypts the
encrypted message and secret keys using decryption algorithm. So, maintaining the
basic architecture of hybridization of cryptography and steganography, secret
communication is done between sender and receiver.

2.1 Encryption Method

Suppose, a message a1a2, …, an of length n is to be sent to the receiver. At first, a


matrix is formed with unique secret values of the letters and is kept in sender and
receiver site before communication. A temporary cipher text A1A2, …, An is
generated corresponding to the message a1a2, …, an with the help of the secret
matrix, where Ai is the position value of the letter ai defined in the secret matrix. We
define a polynomial function f(x) of degree (n−1), given in Eq. (1).
Secret Communication Combining Cryptography … 285

f ðxÞ = A1 xn − 1 + A2 xn − 2 + ⋯ + An − 1 x + An ð1Þ

Now differentiating the function f(x), (n-1) times with respect to x the only
constant term is obtained which is used as the cipher text (encrypted message)
corresponding to the actual message. During the derivation process, the constant
term (i.e., x free terms) in each step is stored as secret keys. In other words, the
constant terms in are named as kn−1, kn−2, kn−3, … , k1th key, respectively. So, after
encryption part, the cipher text (encrypted message) and secret keys (required for
decryption) are generated.

2.2 Embedding Method

In this part, the encrypted message (no. of secret keys) and secret keys are
embedded in a cover image. At first, image blocks are taken from an image for
inserting a secret data. Starting image block (K3) is a secret key block in embedding
method and is predefined in both sender and receiver site. In this block, the cipher
text (encrypted message) is embedded. After K2 no. of image blocks, the number of
secret keys (required for decryption) is inserted and after next K2 number of blocks,
first key is inserted. This process is continued until all the keys (for decryption) are
embedded. The value of K2 is also a secret key among sender and receiver which is
predefined among them. To embed data in each block, we use modified DCT and
LSB substitution in images. At first, 2D DCT is applied to the RGB values of an
N × N block of an image and quantization is performed using a standard quan-
tization matrix. Then by zigzag scanning [6], convert N × N block into a
one-dimensional array. But in this case, receiver cannot realize the length of the
data. So, here a secret key K1 is used to realize the length of the data. Convert the
actual data and K1 into BCD with equal number of bits (inserting 0 in the MSB
positions, if required). Replace the LSB of DCT coefficients in odd positions of 1D
array with data bits sequentially and even positions with the bits of K1. Then
convert 1D zigzag array back to N × N block and perform inverse DCT on that
block and stego image block is ready. The same operation is performed in each
selected image block with same key K1, and all the blocks are combined to form
stego image.

2.3 Extraction Procedure

This is the first part of receiver side work extracting the encrypted message with
proper secret keys (made after encryption procedure) from the stego image. After
getting the stego image, receiver takes all the image blocks sequentially from
beginning. At first, K3th block is selected for extracting the encrypted message. The
286 A. Chatterjee and A. K. Das

values of secret keys K3, K2, K1 (mentioned in Sect. 2.2) are predefined among
sender and receiver. Extraction procedure also follows the same model, which is
used for embedding purpose. To extract data from each block, DCT and LSB
substitution is used. Initially, 2D DCT is applied to the RGB values of the N × N
blocks of the image files. Then quantization using standard quantization matrix is
performed, which is also used for encryption purpose. Then by zigzag scanning [6],
convert N × N block into one-dimensional array. The DCT coefficients are
checked, and LSB of these values are collected. The LSB values of the even
positions of the array are selected until getting the secret key K1 and position (p) of
the last pixel value of K1 is obtained, which helps to get the encrypted data com-
pletely. The receiver collects the LSBs of the pixel values of the positions 1, 3, 5,
…, p-1 of the image block in order to receive the encrypted data. The same process
is followed for the block K3 + K2 to know the number of secret keys and for
remaining blocks (i.e., block number K3 + 2K2, …, K3 + nK2) for obtaining the
secret keys which are required for decryption.

2.4 Decryption Method

After the extraction part, receiver gets the cipher text (C) or encrypted message,
number of secret keys (ns), and secret keys (K1, K2, …, Kns) for decryption.
Considering the cipher text C as a function (x), integration is done ns times with
respect to x. The original function f(x) is obtained from integral constants replacing
it by ki after i-th integration. Finally, A1A2, …, An is obtained and replaced with the
corresponding letters, defined in the secret value matrix. Receiver gets the actual
secret message collecting these letters sequentially.
Procedure
Sender side

Input: Secret message a1a2, …, an


A cover image
Output: Stego image
Secret keys: A matrix with secret values of the letters
Length of secret message indicating key to the receiver side (K1)
Block interval (K2)
First selected image block (K3)
Algorithm
Step 1: Replace the letters (ai) of the secret message sequentially with secret
values (Ai) sequentially. Symbolically, it can be written as
Secret Communication Combining Cryptography … 287

Ai ← secret value ðai Þ

Step 2: Construct a polynomial of x with the secret values Ai as in the following:

n−1
f ð x Þ = ∑ A n − i xi . . . ð2Þ
i=0

Step 3: for r = 1 to (n-1)

Calculate f r ðxÞ

Where f r ðxÞ is the rth derivative of f(x).


Step 4: Take the value of f n − 1 ðxÞ as cipher text or encrypted message C.
Symbolically,

C ← f n − 1 ðxÞ

Step 5: Generate (n−1) secret keys in the following manner

kn − 1 ← A n − 1
for i = 1 to ðn − 2Þ
ki ← ðn − i − 1Þ!*Ai

Where ki is the ith secret key for decryption part.


Step 6: Take the image blocks of the cover image and select K3 th image block
at first for inserting cipher text C.
Step 7: Perform 2D DCT on that block.
Step 8: Perform quantization on that block.
Step 9: Perform zigzag scan to convert NXN block into one-dimensional array
d.
Step 10: Replace the LSB of the DCT coefficients with data bits of secret data and
key K1 in the following manner:
(a) Convert the secret data and key K1 into BCD with equal no.
of bits each (i.e., insert ‘0’ in the higher significant bit posi-
tions, if required).
(b) Insert the secret data bits in the LSB of odd position DCT
coefficients of d sequentially.
(c) Insert the bits of K1 in the LSB of even position DCT coef-
ficients of d sequentially.
Step 11: Convert 1D array d back to NXN block.
Step 12: Perform inverse DCT on that block and stego image is ready.
Step 13: Leave K2 no. of blocks.
288 A. Chatterjee and A. K. Das

Step 14: Insert no. of secret keys formed at the time of encryption and perform the
operations step 7 to step 13.
Step 15: Insert the secret keys formed at the time of encryption one by one and
perform the operations from step 7 to step 13 every time.
Step 16: Combine the image blocks and stego image is ready.

Receiver side

Input: Stego image


Output: Secret message a1a2, …, an
Secret keys: A matrix with secret values of the letters

Length of secret message indicating key to the receiver side (K1)


Block interval (K2)
First selected image block (K3)
Algorithm
Step 1: Take the image blocks of the stego image and select K3 th block at first
for extracting cipher text C.
Step 2: Take the particular NXN block from that image for inserting data.
Step 3: Perform 2D DCT on that block.
Step 4: Perform quantization on that block.
Step 5: Perform zigzag scan to convert NXN block into one-dimensional array.
Step 6: Check the DCT coefficients and take LSB of these values sequentially.
Step 7: POP the even positions LSB values sequentially until getting the secret
key and check position (p) of the last DCT coefficients, at which the key
is obtained fully.
Step 8: POP the corresponding odd positions LSB values sequentially and
concatenate LSB values of the positions 1, 3, 5, …, p−1 sequentially and
take cipher text C.
Step 9: Leave K2 no. of image blocks.
Step 10: Perform the operations from step 2 to step 9 and obtain the no. of secret
keys (ns) for decryption.
Step 11: Do the operations from step 2 to step 9 until obtaining ns (no. of secret
keys for decryption).
Step 12: Evaluate length of the message n as n← ns + 1.
Step 13: Calculate position values of i-th letter of the actual text Pi as

P1 ← C ̸ ðn − 1Þ!
for i = 2 to n
Pi ← ki − 1 ̸ðn − iÞ!
Secret Communication Combining Cryptography … 289

Step 14: Replace the secret values (Pi) sequentially with letters (ai) defined in the
secret value matrix of the letters and print the letters sequentially. In
other words,

for i = 1 to n
ai ← letter ðPi Þ
print ai

3 Experiments and Results

In this section, we will analyze the security of the scheme comparing with some
previous schemes with some standard JPEG images and a message 1500 bits. In
steganography, there are two types of security analysis. In other words, the secret
data can be hacked from secured technique in two different ways. First one is that
hacker cannot trace the procedure of the particular scheme at a particular moment of
communication. Only from stego image, he wants to hack the secret data. To check
this type of security, the only fact is quality of stego image. So, we use PSNR and
MSE as parameters to check the security from first type attack. The working for-
mulas of PSNR and MSE are in the following:
 
MAXi
PSNR = 20 log10 pffiffiffiffiffiffiffiffiffiffi . . . ð3Þ
MSE

1 m−1 n−1
MSE = ∑ ∑ kI ði, jÞ − K ði, jÞk2 . . . ð4Þ
mn i = 0 j = 0

Here, the symbols hold their usual meanings. Here, we observe that PSNR value
is dependent on MSE. So, in this analysis, we only show PSNR to show efficiency
of the scheme from first type unintentional attack (Table 1).
In the PSNR table, we observe that our proposed scheme is good enough from
first type attack comparing with other schemes. Here, the PSNR values of the
images are near about same to the LSB-DCT scheme, which is best among others.
The second type attack is that unintended receiver traced the particular procedure
at a particular moment of hidden communication. We should also check that a

Table 1 Comparison of Images PSNR values


PSNR values of some images
Modulus LSB 4th LSB-DCT/
in different schemes
bit proposed
Mountain. jpg 46.32 52.73 55.43
Dog. jpg 48.54 53.43 57.48
Flower. jpg 48.64 52.57 56.51
Tree. jpg 47.33 52.41 57.44
290 A. Chatterjee and A. K. Das

particular scheme is how much protected from that type attack. The security of a
scheme is parameterized with weights of secret keys for this type of security
analysis. In our proposed scheme, the number of secret keys is not fixed in all the
cases and that is dependent on length of message. These keys are not dependent
among each other. So, our technique is very much protected from both of first and
second type attack.

4 Conclusion

In this paper, a hybridized approach of information security is developed during


wireless communication by mixture of cryptography and steganography. The
concept of differential and integral calculus has improved the encryption and
decryption of information as well as DCT increases the quality of stego image
(measured through PSNR) of transformed domain image steganography. This
approach is attractive for the dynamic use of independent secret keys and becomes
secured from different types of statistical attacks. Also, this approach is equally and
efficiently applicable for long data maintaining the basic requirements of cryptog-
raphy and steganography. Instead of using image, the data can be sent through the
audio and video frames and a comparative study may be considered as a future
scope of this work.

References

1. Pachghare, V.K.: Cryptography and Information Security. PHI Learning Private Limited,
New Delhi (2011)
2. Joseph Raphael, A., Sundaram, V.: Cryptography and steganography—a Survey. Int.
J. Comp. Tech. Appl. 2(3), 626–630. ISSN: 2229-6093
3. Rawat, P., Pandey, A.K., Singh Kushwala, S.: Advanced image steganographic algorithms
and breaking strategies. National Seminar on Recent Advances in Wireless Networks and
Communication, NWNC-2014, IJCA (2014)
4. Rajyaguru, M.H.: Cryptography—combination of cryptography and steganography with
rapidly changing keys. Int. J. Technol. Adv. Eng. 2(10) (2012). ISSN: 2250-2459
5. Bloisi, D.D., Iocchi, L.: Image Based Steganography and Cryptography, Dipartimento di
Informatica e Sistemistica, Sapienza University of Rome, Italy
6. Singla, D., Syal, R.: Data security using LSB & DCT steganography in images. IJCER, 2(2),
359–364 (2012). ISSN: 2250-3005
7. Dutt, D., Hegde, V., Bose, P.T.: AAKRITIed: an image and data encryption—decryption tool.
Int. J. Comput. Sci. Inf. Technol. Res. 3(2), 264–268 (2015). ISSN: 2348-1196 (print), ISSN:
2348-120X (online)
8. Jain, R., Kumar, N.: Efficient data hiding scheme using lossless data compression and image
steganography, IJEST 4(08) (2012). ISSN: 0975–5462
9. Soleimanpour-Moghadam, M., Talebi, S.I.A.M.: A novel technique for steganography
method based on improved algorithm optimization in spatial domain. Iraninan J. Electr.
Electron. Eng. 9(2) (2013)
Secret Communication Combining Cryptography … 291

10. Mehndiratta, A.: Data hiding system using cryptography & steganography: a comprehensive
modern investigation, IRJET 2(1)(2015)
11. Chakrapani, G., Reddy, V.L.: Optimized videotape steganography using genetic algorithm.
IJCS 15 (2014)
12. Walia, Dr. E., Jain, P.: An analysis of LSB & DCT based steganography. Glob. J. Comput.
Sci. Technol. 10(1) (Ver 1.0) (2010)
13. Gokul, M., Umeshbabu, R., Vasudevan, S.K., Karthik, D.: Hybrid steganography using visual
cryptography and LSB encryption method. Int. J. Comput. Appl. 59(14) (0975–8887), (2012)
14. Roy, S., Venkateswaran, P.: Online payment system using steganography and visual
cryptography. In: IEEE Students Conference on Electrical, Electronics and Computer Science,
978-1-4799-2526-1 (2014)
15. Deb, K.: A fast and elitist multiobjective genetic algorithm: NSGA-II, IEEE Trans. Evol
Comput. 6(2) (2002)

S-ar putea să vă placă și