1. Table of contents
1. Introduction
2. Problem Statement
3. Block Diagram
4. Algorithm
5. Result For Work Done
6. Future Work and Conclusion
7. References
2. Introduction
Since the rise of the Internet one of the most important fact of information
technology and communication has been the security of information.
Cryptography is a technique for securing the secrecy of communication where many
different methods have been developed to encrypt and decrypt data in order to keep
the message secret.
Unfortunately it is some times not enough to keep the contents of a message secret,
It may also be necessary to conceal the existence of the message. The technique
used to implement this is called steganography.
Steganography is the art and science of invisible communication. This is
accomplished through hiding sensitive information, thus hiding the existence of the
communicated information.
3. Steganography differs from cryptography in the sense that where
cryptography focuses on keeping the contents of a message secret,
steganography focuses on keeping the existence of a message secret .
Steganography and cryptography are both ways to protect information
from unwanted parties but neither technology alone is perfect and can
be compromised.
Once the presence of hidden information is revealed or even
suspected, the purpose of steganography is partly defeated.
The strength of steganography can thus be enhanced by combining it
with cryptography.
4. Problem Statement
To send the message secretly to the destination, encrypt the secret image
using a cryptographic technique and hide the encrypted image in cover
image using steganography technique.
And at the receiving end the encrypted image is first retrieved from the
stego image and then decrypted to obtain the secret image.
The technique used for cryptography is Data Encryption Standard (DES)
algorithm.
The technique used for steganography is Least Significant Bit (LSB)
technique.
6. Cryptography
Algorithm for encryption:
Data Encryption standard (DES) algorithm needs an input of 64 bits. Therefore,
eight pixels are grouped together and converted into binary to make a group of
64 bits as shown in Fig 3.
Therefore, for a 256x256 secret image there are 8192 such groups of 64 bits.
Each group is sent as an input to DES algorithm.
Each group is undergoing 16 rounds of process in algorithm as shown in Fig 3.
A key of size 56 bits is used for the encryption of image.
Initial permutation is being applied to a 64-bit input. This initial permutation is
basically to rearrange the bits in 64-bit input as shown in Fig 4.
The permuted input data and key is divided into left and right halves
respectively.
The left and right halves of 56-bit key is now left shifted circularly and
permutation choice 2 is applied to it to get a 48-bit key. The number of left
circular shifts depends upon round number of the algorithm.
The right half of 64-bit input is applied to expansion permutation to get 48-bit
output.
XOR operation is performed to expanded right half input and the key from
permutation choice 2 containing 48 bits.
7. This 48-bit output from XOR operation is fed as input to S-box to give a 32-
bit output.
There are eight S-boxes where input to each S-box is 6 bits that produces an
output of 4 bits. Therefore, the overall output from 8 such S-boxes is 32 bits.
The 32-bit output from S-box is then permutated again to rearrange the
order of the bits.
Then this 32-bit output that is obtained after final permutation is XORed
with the left half of the input.
And this XORed output acts as right half input for the next round and the
initial right half of the present round acts as left half input for the next
round.
The left and right half of the key that is obtained from left circular shift
operation is fed as left and right halves of key for the next round.
After 16 such rounds the right and left halves are swapped and the inverse
permutation is applied to get the final cipher data.
The above algorithm is applied to all 8192 groups that are formed from
256x256 secret image to complete the encryption process.
10. Algorithm for embedding
There are two images: 1. Cover image
2. Encrypted image
The encrypted image is hidden inside the cover image by using LSB technique.
If the two images are of unequal sizes then we are hiding the secret image pixels in
cover image as per the ratio (row wise or column wise).
All the bits of encrypted image are hidden in LSB’s of every pixel of cover image.
In all pixels in encrypted image are ANDed with:
1) 192 to retain 1st and 2nd MSB’s.
2) 48 to retain 3rd and 4th MSB’s.
3) 12 to retain 3rd and 4th LSB’s.
4) 3 to retain 1st and 2nd LSB’s as shown in Fig 5.
The pixels that are obtained after ANDing with respective numbers are shifted
accordingly to place the required two bits in 1st and 2nd LSB’s as shown in Fig 6.
All the pixels of cover image are ANDed with 252 to clear 1st and 2nd LSB’s as
shown in Fig 7.
Steganography
11. To obtain stego image each and every pixel of encrypted image is being
hidden in the cover image as shown in Fig 8.
From the stego image only first two LSB’s of every manipulated pixel are
retained by ANDing it with 3.
And thus, the image that was hidden in the stego image is retrieved back.
Fig 5: Pixels of encrypted image ANDed with corresponding
values for further procedure of steganography
Fig 6: The ANDed pixels shifted to 1st and 2nd LSB’s
12. Fig 7: Pixels of cover image ANDed with 252 to clear 1st and 2nd LSB’s
Fig 8: The shifted pixels of Fig 6 ORed with resultant pixels of Fig 7
13. Algorithm for decryption
The reverse process of encryption is applied to the retrieved image to get back the
secret image.
14. Fig 9: Cover image (1024x1024) Fig 10: Secret image (256x256)
Fig 11: Encrypted image of Fig 10 (256x256)
Result
15. Fig 12: Stego image (1024x1024)
after embedding Fig 11 in Fig 9
Fig 13: Retrieved image (256x256) from Fig 12
Fig 14: Decrypted image (256x256) of Fig 13
16. Comparison of stego images
Fig 16: Secret image (Nike) hidden in
3rd and 4th LSB’s.
Fig 15: Secret image (Nike) hidden in 1st and
2nd LSB’s.
17. Secret image hidden in 3rd and 4th LSBs
Fig 17: Cover image (1024x1024) Fig 18:Secret image (256x256)
Fig 19: Encrypted image of Fig 18 (256x256)
18. Fig 21: Retrieved image (256x256) from Fig 20
Fig 22: Decrypted image (256x256) of Fig 21
Fig 20: Stego image (1024x1024)
after embedding Fig 19 in Fig 17
19. Comparison of stego images
Fig 23: Secret image (Cameraman)
hidden in 1st and 2nd LSB’s
Fig 24: Secret image (Cameraman)
hidden in 3rd and 4th LSB’s
20. Fig 26: Secret image (256x256)Fig 25: Cover image (1024x1024)
Fig 27: Encrypted image (256x256) of Fig 26
Secret image hidden in 3rd and 4th LSBs
21. Fig 29: Retrieved image (256x256) from Fig 28
Fig 30: Decrypted image (256x256) of Fig 29
Fig 28: Stego image (1024x1024)
after embedding Fig 27 in Fig 25
22. Fig 31: Secret image (Logo) hidden
in 1st and 2nd LSB’s.
Fig 32: Secret image (Logo) hidden in
3rd and 4th LSB’s.
Comparison of stego images
23. Conclusion
The security has been increased by including both cryptography and
steganography.
The changes in the stego image when compared to the cover image is more
imperceptible to the human eye when encrypted image is stored in 1st and
2nd LSB’s of cover image when compared to the encrypted image stored in
3rd and 4th LSB’s.
The key that was obtained after encryption of the secret image is required to
decrypt the retrieved image obtained from the stego image.
The image that is decrypted is almost the same as that of the secret image.
24. References
1) Atee HA., Ahmad R. and Noor NM., “Cryptography and Image
Steganography using Dynamic Encryption on LSB and Color Image based
Data Hiding”, Middle East Journal of Scientific Research, vol. 23, no. 7, pp.
1450-1460, 2015.
2) Nirmaljeet Kaur, Sukhman Sodhi, “Data Encryption Standard Algorithm
(DES) for Secure Data Transmission”, International Journal of Computer
Applications (0975 – 8887) International Conference on Advances in
Emerging Technology (ICAET 2016).
3) Deepshikha Chopra, Preeti Gupta, Gaur Sanjay B.C., Anil Gupta, “LSB
Based Digital Image Watermarking For Gray Scale Image”, IOSR Journal of
Computer Engineering (IOSRJCE) ISSN: 2278-0661, ISBN: 2278-8727
Volume 6, Issue 1 (Sep-Oct. 2012), pp. 36-41.
4) Reza Tavoli, Maryam Bhakhshi, Fatemeh Salehian, “A New Method for
Text Hiding in the Image by Using LSB”, (IJACSA) International Journal of
Advanced Computer Science and Applications, Vol. 7, No. 4,2016.