Project on Image Steganography
Presented By:
Student names:-
Suchorit Saha(BCA) Roll no. 30001221011 Reg no. 213001001210011
Rishav Ghosh(BCA) Roll no. 30001221009 Reg no. 213001001210009
Tuhina Kundu(BCA) Roll no. 30001221058 Reg no. 213001001210058
Madhushree Biswas(BCA) Roll no. 30001221030 Reg no. 213001001210030
Prerona Das(BCA) Roll no. 30001221092 Reg no. 213001001210092
Guided By:
DR. Nabanita Ganguly
Department of Information Technology.
Maulana Abul Kalam Azad University Technology, West Bengal, India
Motivation:-
The motivation behind developing image Steganography methods according to its use in various organizations to communicate between its members, as well as, it can be used for communication between members of the military or intelligence operatives or agents of companies to hide secret messages or in the field of espionage. The main goal of using the Steganography is to avoid drawing attention to the transmission of hidden information. If suspicion is raised, then this goal that has been planned to achieve the security of the secret messages, because if the hackers noted any change in the sent message then this observer will try to know the hidden information inside the message.
Literature review:-
ABSTRACT :-
With the digitalization of information, a lot of multimedia data are under attack, information security has become a key issue of public concern. Image steganography, aiming at using cover images to convey secret information has become one of the most challenge and important subjects in the field of information security recently. Different from the traditional image steganography, coverless image steganography does not need to employ the designated cover image for embedding the secret data but directly transfers secret information through its own properties such as pixel brightness value, color, texture, edge, contour and high-level semantics. Therefore, it radically resist the detection of steganalysis tools and significantly improves the security of the image. Its basic idea is to analyze the attributes of the image and map them to the secret information according to certain rules based on the characteristics of the attributes. This paper includes more than 30 key contributions to provide a comprehensive survey in this field, covers the main aspects of coverless image steganography research: the fundamental frameworks, pre-processing, feature extraction, generation of hash sequence and mapping relationships. The existing methods are evaluated and the prospect of future work is also summarized
INTRODUCTION:
Steganography refers to a concept rather than to an algorithm that is involved in the manipulation of visual images which are seen as binary grayscale pixels. Data or messages can be hidden within a picture in the form of gray scales. Recovering such crucial details out of a picture refers to cryptography. It is the method used by an attacker which also decides upon the security of steganography.This article provides an ultimate picture of steganography project ideas based on the technicalities needed for your research.
Data hiding is of importance in many applications. For hobbyists, secretive data transmission,for privacy of users etc. the basic methods are: Steganography and Cryptography.
Steganography is a simple security method. Generally there are three different methods used for hiding information: steganography, cryptography, and watermarking.
In cryptography, the information to be hidden is encoded using certain techniques; this information is generally understood to be coded as the data appears nonsensical.
Steganography is hiding information; this generally cannot be identified because the coded information doesn’t appear to be abnormal i.e. its presence is undetectable by sight.
Detection of steganography is called Steganalysis.
Steganography is of different types:
1. Text steganography
2. Image steganography
3. Audio steganography
. Video steganography
In all of these methods, the basic principle of steganography is that a secret message is to be embedded in another cover object which may not be of any significance in such a way that the encrypted data would finally display only the cover data. So it cannot be detected easily to be containing hidden information unless proper decryption is used.
As the above explanation goes, every steganography consists of three components:
1. Cover object
2. Message object
3. Resulting Steganographic object
In this project Multiple bit embedding substitution method is implemented. PYTHON is used for coding. The codes and result images are in the following report.
There are two different methods for image steganography:
1. Spatial methods
2. Transform methods
As seen in the above image, both the original image file(X) and secret message (M) that needs to be hidden are fed into a steganographic encoder as input. Steganographic Encoder function, f(X,M,K) embeds the secret message into a cover image file by using techniques like multiple bit chenging encoding. The resulting stego image looks very similar to your cover image file, with no visible changes. This completes encoding. To retrieve the secret message, stego object is fed into Steganographic Decoder.[3]
Advantage of using Steganography over Cryptography?
Up to now, cryptography has always had its ultimate role in protecting the secrecy between the sender and the intended receiver. However, nowadays steganography techniques are used increasingly besides cryptography to add more protective layers to the hidden data. The advantage of using steganography over cryptography alone is that the intended secret message does not attract attention to itself as an object of scrutiny. Plainly visible encrypted messages, no matter how unbreakable they are, arouse interest and may in themselves be incriminating in countries in which encryption is illegal.
Proposed Method:-
Flowchart
IMAGE STEGANOGRAPHY ON MULTIPLE BIT CHANGE:-
To establish a secure transfer of an image with high capacity message embedded in it, the proposed method used a 5-7-8 approach to hide 3 byte in a pixel of a 24-bit color image. That means the size of the message can reach up to 33.33% of the size of the cover image. A color picture of 512×512 resolution may contain 1 byte of message for each pixel. Meaning that 512×512 =262144 pixels, which means there will be a maximum of 262144 bytes of information or characters that can be hidden in that image. For the security of the secret message the proposed method uses a Pseudo Random Number Generator (PRNG) in two different stages of the embedding process.
Pseudo Random Number Generator (PRNG):- In Pseudo Random Number Generator (PRNG) is used to randomly select pixels in the cover image for hiding each byte of the message in three pixels. The peak signal-to-noise ratio (PSNR) indicated in this paper shows good hiding capacity with higher visual quality. Since the method uses three pixels for a single byte, it will not be able to hide other multimedia messages such as images and audio due to the low hiding capacity compared to the other methods.
How To Do A Steganography Project Using Python?
Python coding can be used in hiding and driving data in any steganography system and to build advanced steganography project ideas. The following is a brief description of image steganography performed with OpenCV in python
Image steganography using OpenCV in Python
In order to hide the secret data you can make use of the input information
Image steganography process is easy to understand and implement
Pictures are usually considered as a collection of pixels
These pictures are of different colors which are the digital data to be processed
The images consist of pixels having three basic values of Blue, Red, and Green (RGB)
Proper encoding methods are implemented for reading the data as groups from left towards the right
The decoding logic based on the very same encoding technique is used for data extraction
Three pixels at a time are read to retrieve the binary data
While using Python you need to have a great idea and insight into its coding. So we insist you enhance your coding abilities for which our developers will assist you. Please provide your code so that we can understand what went wrong. You can thus surely become a better developer by gathering huge experiences from a field expert.
Visual and histogram analysis:-
A histogram is used to summarize discrete or continuous data. In other words, it provides a visual interpretation of numerical data by showing the number of data points that fall within a specified range of values (called “bins”). It is similar to a vertical bar graph.In comparative histogram analysis, histogram of stego-image is displayed considering the embedding capacity and visual image quality. Through histogram analysis, a new image steganography will be designed that has a high embedding capacity and be robust to histogram attack.The performance of a steganographic technique can be rated by three parameters; (i) hiding capacity, (ii) distortion measure and (iii) security. The hiding capacity means the maximum amount of information tha
can be hidden in an image. It can also be represented as the number of bits per pixel.
MSE:-The mean-square error (MSE) and the peak signal-to-noise ratio (PSNR) are used to compare image compression quality. The MSE represents the cumulative squared error between the compressed and the original image, whereas PSNR represents a measure of the peak error.
PSNR:-
The PSNR block computes the peak signal-to-noise ratio, in decibels, between two images. This ratio is used as a quality measurement between the original and a compressed image. The higher the PSNR, the better the quality of the compressed, or reconstructed image.
Experimental results:
MTLAB CODE FOR SSIM and PSNR:-
InputImage=imread('dani.png');
ReconstructedImage=imread('dani1.png');
n=size(InputImage);
M=n(1);
N=n(2);
MSE = sum(sum((InputImage-ReconstructedImage).^2))/(M*N);
PSNR = 10*log10(255*255/MSE);
fprintf('\nMSE: %7.2f ', MSE)
fprintf('\nPSNR: %9.7f dB', PSNR)
PYTHON CODE FOR HISTOGRAM:-
# importing required libraries of opencv
import cv2
# importing library for plotting
from matplotlib import pyplot as plt
# reads an input image
img_name1 = input("\nenter image name:")
img = cv2.imread(img_name1,0)
# find frequency of pixels in range 0-255
histr = cv2.calcHist([img],[0],None,[256],[0,256],)
# show the plotting graph of an image
plt.plot(histr)
plt.show()
PYTHON CODE IN PYTHON FOR IMPLEMENTATION:-
import cv2
import numpy as np
from PIL import Image
import random
def data2binary(data):
# convert data into binary format
if type(data) == str:
p = ''.join([format(ord(i), '08b') for i in data])
elif type(data) == bytes or type(data) == np.ndarray:
p = [format(i, '08b') for i in data]
return p
def hide_data(img, data):
# hide data in the given image
data += "$$" # '$$' is the secret key
d_index = 0
b_data = data2binary(data)
len_data = len(b_data)
j=2
# iterate over pixels in the image and update pixel values
for row in img:
while d_index<len_data:
for pix in row:
r, g, b = data2binary(pix)
if d_index < len_data:
if j<7:
a=8//j
j+=2
else:
j=2
a=8//j
j+=2
if(a>1):
pix[0]=int(r[:-a]+b_data[d_index]+r[-(8-(a+1))])
d_index += 1
else:
pix[0] = int(r[:-a] + b_data[d_index])
d_index += 1
if d_index < len_data:
if j<7:
a=8//j
j+=2
else:
j=2
a=8//j
j+=2
if(a>1):
pix[1]=int(r[:-a]+b_data[d_index]+r[-(8-(a+1))])
d_index += 1
else:
pix[1] = int(r[:-a] + b_data[d_index])
d_index += 1
if d_index < len_data:
if j<7:
a=8//j
j+=2
else:
j=2
a=8//j
j+=2
if(a>1):
pix[2]=int(r[:-a]+b_data[d_index]+r[-(8-(a+1))])
d_index += 1
else:
pix[2] = int(r[:-a] + b_data[d_index])
d_index += 1
if d_index >= len_data:
break
return img
def encode():
img_name = input("\nEnter image name: ")
image = cv2.imread(img_name)
img = Image.open(img_name, 'r')
w, h = img.size
data = input("\nEnter message: ")
if len(data) == 0:
raise ValueError("Empty data")
enc_img = input("\nEnter encoded image name: ")
enc_data = hide_data(image, data)
cv2.imwrite(enc_img, enc_data)
img1 = Image.open(enc_img, 'r')
img1 = img1.resize((w, h), Image.ANTIALIAS)
# optimize with 65% quality
if w != h:
img1.save(enc_img, optimize=True, quality=65)
else:
img1.save(enc_img)
def find_data(img):
# extract hidden data from the image
bitFind = ""
j=2
a=0
for row in img:
for pix in row:
r, g, b = data2binary(pix)
if j<7:
a=8//j
j+=2
else:
j=2
a=8//j
j+=2
bitFind += r[-a]
if j<7:
a=8//j
j+=2
else:
j=2
a=8//j
j+=2
bitFind += g[-a]
if j<7:
a=8//j
j+=2
else:
j=2
a=8//j
j+=2
bitFind += b[-a]
all_bytes = [bitFind[i:i+8] for i in range(0, len(bitFind),8)]
readable_data = ""
for x in all_bytes:
readable_data += chr(int(x,2))
if readable_data[-2:] == "$$":
break
return readable_data[:-2] if readable_data[-2:] == "$$" else ""
def decode():
img_name = input("\nEnter Image name: ")
image = cv2.imread(img_name)
msg = find_data(image)
if msg:
print("\nYour message: " + msg)
else:
print("\nNo hidden message found in the image.")
def steganography():
x = 1
while x != 0:
print('\nImage steganography')
print('1. Encode')
print('2. Decode')
u_in = int(input('\nEnter your choice: '))
if u_in == 1:
encode()
elif u_in==2:
decode()
steganography()
Future Scope:-
Steganography transmits secrets through apparently innocuous covers in an effort to conceal the existence of a secret. Digital image steganography and its derivatives are growing in use and application. In areas where cryptography and strong encryption are being outlawed, citizens are looking at steganography to circumvent such policies and pass messages covertly. As with the other great innovations of the digital age: the battle between cryptographers and cryptanalysis, security experts and hackers, record companies and pirates, steganography and Steganalysis will continually develop new techniques to counter each other. In the near future, the most important use of steganographic techniques will probably be lying in the field of digital watermarking.Content providers are eager to protect their copyrighted works against illegal distribution and digital watermarks provide a way of tracking the owners of these materials. Steganography might also become limited under laws, since governments already claimed that criminals use these techniques to communicate.
The possible use of steganography technique is as following:
1.Hiding data on the network in case of a breach.
2.Peer-to-peer private communications.
3.Posting secret communications on the Web to avoid transmission.
4.Embedding corrective audio or image data in case corrosion occurs from a poor connection or transmission
REFERENCES:-
1.Kuo W-C, Kuo S-H, Wu L-C (2015) Multi-Bit Data Hiding Scheme for Compressing Secret Messages. Applied Sciences Journal 5(4):1033–1049
https://www.mdpi.com/2076-3417/5/4/1033
.Hole, K.R., Gulhane, V.S., Shellokar, N.D.: Application of genetic algorithm for image enhancement and segmentation. Int. J. Adv. Res. Comput. Eng. Technol. (IJARCET) 2(4), 1342–1346 (2013)
2.Pillai, B., Mounika, M., Rao, P.J., Sriram, P.: Image steganography method using k-means clustering and encryption techniques. In: IEEE International Conference on Advances in Computing, Communications and Informatics (ICACCI), pp. 1206–1211 (2016)
3.Luo, X., Liu, B., Liu, F.: Detecting LSB Steganography Based on Dynamic Masks. In: 5th International Conference on Intelligent Systems Design and Applications, pp. 251–255 (2005)
4.Zhang, X., Wang, S.: Vulnerability of pixel-value differncing steganography to histogram analysis and modification for enhanced security. Pattern Recognition Letter 25, 331–339 (2004)
5.Chugh G, Yadav R, Saini R (2014) A New Image Steganographic Approach Based on Mod Factor for RGB Images. International Journal of Signal Processing, Image Processing and Pattern Recognition 7(3):27–44
6.Fridrich J, Kodovsk J, Holub V (2012) Ensemble classifiers for steganalysis of digital media. IEEE Transactions on Information Forensics and Security 7(2):432–444
7.Cheddad A, Condell J, Curran K, Kevitt PM (2010) Digital image steganography: Survey and analysis of current methods. Signal Process 90:727–752
https://www.sciencedirect.com/science/article/abs/pii/S0165168409003648?via%3Dihub
8.Dumitrescu D, Stan IM, Simion E (2017) Steganography techniques, IACR Cryptology ePrint Archive (2017).
https://eprint.iacr.org/2017/341.
9.Feng B, Lu W, Sun W (2015) Secure Binary Image Steganography Based on Minimizing the Distortion on the Texture. IEEE Transactions on Information Forensics and Security 10(2):243–255
10..Hole, K.R., Gulhane, V.S., Shellokar, N.D.: Application of genetic algorithm for image enhancement and segmentation. Int. J. Adv. Res. Comput. Eng. Technol. (IJARCET) 2(4), 1342–1346 (2013)
11.Lin YT, Wang CM, Chen WS, Lin FP, Lin W (2017) A Novel Data Hiding Algorithm for High Dynamic Range Images. IEEE Transactions on Multimedia 19(1):196–211
https://ieeexplore.ieee.org/document/7558215
12.Singh S, Attri VK (2015) State-of-the-art Review on Steganographic Techniques. International Journal of Signal Processing, Image Processing and Pattern Recognition 8(7):161–170
http://article.nadiapub.com/IJSIP/vol8_no7/15.pdf
13.alandar MY, Ayubi P, Barani MJ (2017) A new transform domain steganography based on modified logistic chaotic map for color images. Journal of Information Security and Applications 34(2):142–151
https://www.sciencedirect.com/science/article/abs/pii/S2214212616302484?via%3Dihub
14.Valandar MY, Ayubi P, Barani MJ (2017) A new transform domain steganography based on modified logistic chaotic map for color images. Journal of Information Security and Applications 34(2):142–151
https://www.sciencedirect.com/science/article/abs/pii/S2214212616302484?via%3Dihub
15.Avinash, K.G., Joshi, M.S.: A secured five pixel pair differencing algorithm for compressed image steganography. In: IEEE Third International Conference on Computer and Communication Technology, pp. 278–282 (2012)
16.Fridrich, J., Goljan, M., Du, R.: Reliable Detection of LSB Steganography in Color and Grayscale Images. In: Proc. of ACM Workshop on Multimedia and Security, Ottawa, CA, pp. 27–30 (October 2001)
https://link.springer.com/chapter/10.1007/11922841_6
17.Wu, D.C., Tsai, W.H.: A steganographic method for images by pixel-value differencing. Pattern Recognition Letter 24, 1613–1626 (2003)
https://www.sciencedirect.com/science/article/abs/pii/S0167865502004026?via%3Dihub
18.Madhu, B., Holi, G., Murthy, S.K.: An overview of image security techniques. Int. J. Comput. Appl. 154(6), 37–46 (2016)
ijca2016911834-libre.pdf (d1wqtxts1xzle7.cloudfront.net)
19.Menon, N., Vaithiyanathan: A survey on image steganography. In: IEEE International Conference on Technological Advancements in Power and Energy (TAP Energy), pp. 1–5 (2017)
Menon, N., Vaithiyanathan: A survey on image steganograph... - Google Scholar
20.Islam S, Modi MR, Gupta P (2014) Edge-based image steganography. EURASIP J Inf Secur, Springer 8:1–14
https://www.sciencedirect.com/science/article/abs/pii/S0165168409003648
21.Ma, X.; Pan, Z.; Hu, S.; Wang, L. Reversible Data Hiding Scheme for VQ Indices based on Modified Locally Adaptive Coding and Double-Layer Embedding Strategy. J. Vis. Commun. Image Represent. 2015, 28, 60–70.
https://www.sciencedirect.com/science/article/abs/pii/S1047320315000103?via%3Dihub
22.Fridrich, J.; Kodovsk, J. Rich models for steganalysis of digital images. IEEE Trans. Inf. Forensics Secur. 2012, 7, 868–882.
https://ieeexplore.ieee.org/document/6197267
23.Luo W, Huang F, Huang J (2010) Edge Adaptive Image Steganography Based on LSB Matching Revisited. IEEE Transactions on Information Forensics and Security 5(2):201–214
https://ieeexplore.ieee.org/document/5411758
24.Paul G, Davidson I, Mukherjee I, Ravi SS (2016) Keyless dynamic optimal multi-bit image steganography using energetic pixels. Multimedia Tools and Applications 75(5):1–27
25.Gedkhaw, E., Soodtoetong, N., Ketcham, M.: The performance of cover image steganography for hidden information within image file using least significant bit algorithm. In: The 18th International Symposium on Communications and Information Technologies (ISCIT 2018), pp. 504–508 (2018)
26.Luo Y, Liu T, Tao D, Xu C (2015) Multiview matrix completion for multilabel image classification. IEEE Trans Image Process 24(8):2355–2368
https://ieeexplore.ieee.org/document/7083747
27.B. Hariharan, L. Zelnik-Manor, S. Vishwanathan and M. Varma, "Large scale max-margin multi-label classification with priors", Proc. Int. Conf. Mach. Learn., pp. 423-430, 201https://icml.cc/Conferences/2010/papers/344.pdf
28.Al-Afandy, K.A., EL-Rabaie, E.-S.M., Faragallah, O.S., ELmhalawy, A., El-Banby, Gh.M.: High security data hiding using image cropping and LSB least significant bit steganography, pp. 400–404. IEEE (2016)
29.Dumitrescu, S., Wu, X., Memon, N.: On steganalysis of random LSB embedding in continuous-tone images. In: Proceedings of International Conference on Image Processing, vol. 3, pp. 641–644 (2002)
30.R. S. Cabral, F. De la Torre, J. P. Costeira and A. Bernardino, "Matrix completion for multi-label image classification", Proc. Adv. Neural Inf. Process. Syst., pp. 190-198, 2011.
Comments
Post a Comment