Project on Image Steganography



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 LSB substitution method is implemented. PYTHONis 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

In spatial method, the most common method used is LSB substitution method.

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 least significant bit 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]

This article will help you to implement image steganography using Python. It will help you write a Python code to hide text messages using a technique called Least Significant Bit.

 

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. 

 

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

Proposed Method:-

Flowchart

Least significant bit (LSB) method is a common, simple approach to embedding information in a cover file.

In steganography, LSB substitution method is used. I.e. since every image has three

components (RGB). This pixel information is stored in encoded format in one byte. The first bits containing this information for every pixel can be modified to store the hidden text. For this, the preliminary condition is that the text to be stored has to be smaller or of equal size to the image used to hide the text.

LSB based method is a spatial domain method. But this is vulnerable to cropping and noise. In this method, the MSB (most significant bits) of the message image to be hidden are stored in the LSB (least significant bits) of the image used as the cover image. 

It is known that the pixels in an image are stored in the form of bits. In a grayscale image, the intensity of each pixel is stored in 8 bits (1byte). Similarly for a color (RGB-red, green, blue) image, each pixel requires 24 bits (8 bits for each layer).

The Human visual system (HVS) cannot detect changes in the color or intensity of a pixel when the LSB bit is modified. This is psycho-visual redundancy since this can be used as an advantage to store information in these bits and yet notice no major difference in the image.

 

Steps used in LSB steganography:

a. Steps for hiding message image:

1. Read the image to be used as cover image. Noise is added to make it easier to disguise changes due to embedding the message image.

2. Read the image to be sued as message image.

3. Separate the bit planes of each image. As it is known that the LSB (least significant bit) plane contains the least information associated with any image, and the MSB (most significant bit) plane contains most of the shape, colour information of an image. It is generally ideal to replace up to 4 least bitplanes of the cover image, with the upper 4 bitplanes without revealing changes in the resultant image. Lesser number of bitplanes from the message image could be used, but the retrieved image would become distorted and loses information.

4. Replace the least 4 bitplanes of cover image with the 4 most significant bitplanes from message image.

5. Get the resultant Steganographic image by recombining these bitplanes.

b. Retrieving message image:

1. Read the Steganographic image.

2. Extract the required number of bitplanes of the image.

3. Recombining the lower four bitplanes would give the retrieved message image.

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.

Experimental results:

1.

Cover Image StegoImage                                          

 

Histogram

 

Cover Image:                               Stego Image:

 

 

 

 

2.

Cover Image Stego Image

             

Histogram

Cover IMage:                            Stego Image:

 

 

 

 

 

 

 

3.

Cover Image       Stego Image

           

 

Histogram

Cover IMage:                                   Stego Image:

4

Cover Image                                          Stego Image

               

Histogram

            Cover image                               Stego image     

                                                                                                                                                                                    

 

 

 

 

5.

           Cover image                              Stego image

Histogram

             Cover image                                 Stego image

 

 

 

 

6

        Cover image                                             Stego image

 

 

Histogram  

            Cover image                                   Stego image

 

 

7

        Cover image                                 Stego image

 

Histogram

            Cover image                                       Stego image

 

 

8

        Cover image                                 Stego image

 

 

Histogram

             Cover image                                       Stego image

 

 

                                                                                      

 

Conclusion:-

Image steganography is the method used in transmitting secret information by hiding it in plain sight inside a cover image. Deep learning methods are widely used in every field and has been used in the research of steganography. Review of all the related works led to categorizing them into three groups vastly. Most of the traditional based steganography methods use the LSB substitution and some of its variants. Other than LSB, PVD, DCT and EMD are commonly used. The hiding capacity of the traditional methods are limited as over burdening the cover image by exploiting more pixels for hiding the secret message may led to distortions. Also, the autoencoder-decoder structure with VGG as base, U-Net and Xu-Net are the most prevailing architectures used for CNN-based image steganography methods. More recently, GAN architecture has gained significant attention for their ability to deal with image reconstruction tasks. Image steganography can be considered one such image reconstruction task where the cover image and the secret information is taken as input to reconstruct a steganographic image which is close to the cover image in resemblance.

References:-



  1. Nandahini Subramanian ,Ahmed Bouridane, published in IEEE Access (volume :9 pages :23409-23423, Date of publication :25 january 2021 ,DOI-10.1109/ACCESS.2021.3053998


  1.  IJARCCE , date of publication -9th september 2018, vol-7.


link-https://ijarcce.com/wp-content/uploads/2018/10/IJARCCE.2018.7910.pdflink-https://ieeexplore.ieee.org/document/9335027



  1. Prof.Ziad Alqadi Image blocking to hide secret massage published on - IJCMC, Date of publication-11 november 2020, DOI-10.47760/ijcsmc.2020.v09i11.002


link-https://www.academia.edu/79014836/Image_Blocking_to_Hide_Secret_Message?f_ri=129104


  1. Zhaneta Tasheva Research of the characteristics of a steganography algorithm based on LSB method published in Academia date of publication -24 th april 2022


link-https://www.academia.edu/77793649/Research_of_the_Characteristics_of_a_Steganography_Algorithm_Based_on_LSB_Method_of_Embedding_Information_in_Images?f_ri=129104


  1. K.Muhammada , J.Ahmed, H.Farman, Z.Jan , A new image steganography technique using pattern based bitts suffering and magic LSB for Grayscale image published in- sindh university research journal , date of publication- 6th august 2015


link-https://www.academia.edu/77793649/Research_of_the_Characteristics_of_a_Steganography_Algorithm_Based_on_LSB_Method_of_Embedding_Information_in_Images?f_ri=129104


  1. Mohhamed A saleh Image steganography techniques published in


  1. J.Jerisha Liby , T.Jaya hthhiding scheme for video watermarking using horizontal and vertical coefficients of singel level discrete wavelet transform method published in -world scientific research paper ,date of publication -16 september 2021


link-https://www.worldscientific.com/doi/abs/10.1142/S021812662250044X


  1. Jishen Zeng , Shunkuan Tang , Bin Li , Jiwu Huang  Large scale JPEG Image Steganoganalysis using hybrid deep learning Framework published in IEEE, date of publication - 2017 vol - 13 issue - 5

 

Link- https://ieeexplore.ieee.org/abstract/document/8125774


  1. Mo Chen , Vahid Sedigi , Mehdi Boroumand , Jessica Fridrich JPEG phase -Aware Convolutional neural network steganolysis of JPEG images ,published in academic digital library date of publication - 20 june 2017.

  

Link -https://dl.acm.org/doi/abs/10.1145/3082031.3083248


  1.  Kevin alex zhang , Alfredo cuesta Infate , Lie xu , kalyan veeramachaneni High capacity image steganography with GAN’s published in - date of publication -30 january 2019 


Link -https://arxiv.org/pdf/1901.03892v2.pdf


  1. Huang, G., Liu, Z., van der Maaten, L., and Weinberger, K. Q. Densely connected convolutional networks. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), pp. 2261–2269, 2017.

 

Link -https://ieeexplore.ieee.org/document/8099726


  1. Tang, W., Tan, S., Li, B., and Huang, J. Automatic steganographic distortion learning using a generative adversarial network. IEEE Signal Processing Letters, 24(10):1547–1551, Oct 2017. ISSN 1070-9908. doi: 10.1109/LSP.2017.2745572.

 

Link -https://ieeexplore.ieee.org/document/8017430


  1. Baluja, S. Hiding images in plain sight: Deep steganography. In Guyon, I., Luxburg, U. V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (eds.), Advances in Neural Information Processing Systems 30, pp. 2069–2079. Curran Associates, Inc., 2017.

 

Link -https://jivp-eurasipjournals.springeropen.com/articles/10.1186/s13640-020-00534-2

  1. Agustsson, E. and Timofte, R. NTIRE 2017 challenge on single image super-resolution: Dataset and study. In The IEEE Conf. on Computer Vision and Pattern Recognition (CVPR) Workshops, July 2017.


Link -https://ieeexplore.ieee.org/document/8014884


  1. Ye, J., Ni, J., and Yi, Y. Deep learning hierarchical representations for image steganalysis. IEEE Trans. on Information Forensics and Security, 12(11):2545–2557, Nov 2017. ISSN 1556-6013. doi: 10.1109/TIFS.2017. 2710946. 


Link -https://dl.acm.org/doi/10.1109/TIFS.2017.2710946


  1. Zhu, J., Kaplan, R., Johnson, J., and Fei-Fei, L. HiDDeN: Hiding data with deep networks. CoRR, abs/1807.09937, 2018.

 

Link -https://arxiv.org/abs/1807.09937


  1.  Haichao Shi, Xiao-Yu Zhang, Shupeng Wang, Ge Fu, and Jianqi      Tang.Synchronized detection and recovery of steganographic messages with   ad-versarial learning. In International Conference on Computational Science,pages 31–43. Springer, 2019.


Link -https://arxiv.org/ftp/arxiv/papers/1801/1801.10365.pdf


 

  1.  O. Elharrouss, N. Almaadeed, and S. Al-Maadeed. An image steganog-raphy approach based on k-least significant bits (k-lsb). In 2020 IEEEInternational Conference on Informatics, IoT, and Enabling Technologies(ICIoT), pages 131–135, 2020.



 

 

Link -https://www.semanticscholar.org/paper/An-image-steganography-approach-based-on-k-least-Elharrouss-Almaadeed/bf346249fecef363ab8063013df4e1065828599c

 

18. Shwe Sin Myat Than. Secure data transmission in video format based

on lsb and huffman coding. International Journal of Image, Graphics and

Signal Processing, 12(1):10, 2020.

 

Link -https://www.researchgate.net/publication/340604103_Secure_Data_Transmission_in_Video_Format_Based_on_LSB_and_Huffman_Coding

 

  1.  R. J. Mstafa, K. M. Elleithy, and E. Abdelfattah. A robust and secure video steganography method in dwt-dct domains based on multiple objecttracking and ecc. IEEE Access, 5:5354–5365, 2017

 

Link -https://digitalcommons.sacredheart.edu/cgi/viewcontent.cgi?referer=&httpsredir=1&article=1100&context=computersci_fac

 

  1.   Anupriya Arya and Sarita Soni. Performance evaluation of secrete imagesteganography techniques using least significant bit (lsb) method. vol,6:160–165, 2018


Link -http://www.ijcstjournal.org/volume-6/issue-2/IJCST-V6I2P30.pdf


  1.   Gandharba Swain. Very high capacity image steganography techniqueusing quotient value differencing and lsb substitution. Arabian Journalfor Science and Engineering, 44(4):2995–3004, 2019


Link -https://link.springer.com/article/10.1007/s13369-018-3372-2

  1.   Anqi Qiu, Xianyi Chen, Xingming Sun, Shuai Wang, and Wei Guo.Coverless image steganography method based on feature selection. Journalof Information Hiding and Privacy Protection, 1(2):49, 2019.


Link -https://www.techscience.com/jihpp/v1n2/28996


  1.  Rasber Dh Rashid and Taban F Majeed. Edge based image steganography:Problems and solution. In 2019 International Conference on Communi-cations, Signal Processing, and their Applications (ICCSPA), pages 1–5.IEEE, 2019.

Link - https://ieeexplore.ieee.org/abstract/document/8713712


  1.  Xin Liao, Jiaojiao Yin, Sujing Guo, Xiong Li, and Arun Kumar Sanga-iah. Medical jpeg image steganography based on preserving inter-blockdependencies. Computers & Electrical Engineering, 67:320–329, 2018.


Link -https://www.sciencedirect.com/science/article/abs/pii/S0045790617302756


  1.   Wei Lu, Yingjie Xue, Yuileong Yeung, Hongmei Liu, Jiwu Huang, andYun Shi. Secure halftone image steganography based on pixel densitytransition. IEEE Transactions on Dependable and Secure Computing,2019.


Link -https://www.semanticscholar.org/paper/Secure-Halftone-Image-Steganography-Based-on-Pixel-Lu-Xue/9dc26cd9b320b62fbd8c17dc9aa46218f2a2f281



  1.  Yi Zhang, Chuan Qin, Weiming Zhang, Fenlin Liu, and Xiangyang Luo.On the fault-tolerant performance for a class of robust image steganogra-phy. Signal Processing, 146:99–111, 2018


Link - https://www.sciencedirect.com/science/article/abs/pii/S016516841830001X


  1.  Haval Muhammed Sidqi and Muzhir Shaban Al-Ani. Image steganogra-phy: Review study. In Proceedings of the International Conference on Im-age Processing, Computer Vision, and Pattern Recognition (IPCV), pages134–140. The Steering Committee of The World Congress in ComputerScience, Computer . . . , 2019


Link -

  1.  Shumeet Baluja. Hiding images in plain sight: Deep steganography. InAdvances in Neural Information Processing Systems, pages 2069–2079,2017


Link -https://papers.nips.cc/paper/2017/hash/838e8afb1ca34354ac209f53d90c3a43-Abstract.html


  1.  Saiful Islam, Aditya Nigam, Aayush Mishra, and Suraj Kumar. Vstegnet:Video steganography network using spatio-temporal features and micro-bottleneck. 09 2019.


Link -https://www.researchgate.net/publication/338389118_VStegNET_Video_Steganography_Network_using_Spatio-Temporal_features_and_Micro-Bottleneck


  1.  PG Kuppusamy, KC Ramya, S Sheebha Rani, M Sivaram, and Vi-gneswaran Dhasarathan. A novel approach based on modified cycle gener-ative adversarial networks for image steganography. Scalable Computing:Practice and Experience, 21(1):63–72, 2020.


Link -https://www.scpe.org/index.php/scpe/article/view/1613




Appendix :-


Histogram code:

# 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()


Steganography code:

import cv2

import numpy as np

from PIL import Image


#it convert data in binary formate



def data2binary(data):

    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



# hide data in given img


def hidedata(img, data):

    data += "$$"                                   #'$$'--> secrete key

    d_index = 0

    b_data = data2binary(data)

    len_data = len(b_data)


 #iterate pixels from image and update pixel values


    for value in img:

        for pix in value:

            r, g, b = data2binary(pix)

            if d_index < len_data:

                pix[0] = int(r[:-1] + b_data[d_index])

                d_index += 1

            if d_index < len_data:

                pix[1] = int(g[:-1] + b_data[d_index])

                d_index += 1

            if d_index < len_data:

                pix[2] = int(b[:-1] + 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 = hidedata(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)


# decoding


def find_data(img):

    bin_data = ""

    for value in img:

        for pix in value:

            r, g, b = data2binary(pix)

            bin_data += r[-1]

            bin_data += g[-1]

            bin_data += b[-1]


    all_bytes = [bin_data[i: i + 8] for i in range(0, len(bin_data), 8)]


    readable_data = ""

    for x in all_bytes:

        readable_data += chr(int(x, 2))

        if readable_data[-2:] == "$$":

            break

    return readable_data[:-2]



def decode():

    img_name = input("\nEnter Image name : ")

    image = cv2.imread(img_name)

    img=Image.open(img_name,'r')

    msg = find_data(image)

    return msg



def stegnography():

    x = 1

    while x != 0:

       print('''\nImage stegnography

       1.encode

       2.decode''')

       u_in = int(input("\n enter your choice:"))

       if u_in == 1:

           encode()

       else:

           ans = decode()

           print("\n your message:\t"+ans)

       x = int(input("\nenter 1 for continue otherwise 0:"))



stegnography()

User Interface

1.

 Encode:-

Decode:-


2.

 Encode:-


Decode:-


Comments

Popular posts from this blog