Professional Documents
Culture Documents
By
A PROJECT REPORT
of
BACHELOR OF TECHNOLOGY
IN
S.R.M. UNIVERSITY
May 2013
BONAFIDE CERTIFICATE
Certified that this project report titled ‘DATA SECURITY USING SEPRABLE REVERSIBLE
DATA HIDING IN ENCRYPTED IMAGE is the bonafide work of Mr.Galla
Sathish(1030910194) and Mr.Sandeep Kumar Yadav(1030910191) who carried out the
research under my supervision. Certified further, that to the best of my knowledge the work
reported herein does not form part of any other project report or dissertation on the basis of
which a degree or award was conferred on an earlier occasion on this or any other candidate.
DATE :
ABSTRACT
There are also a number of works on data hiding in the encrypted domain. The reversible
data hiding in encrypted image is investigated in. Most of the work on reversible data hiding
focuses on the data embedding/extracting on the plain spatial domain. A content owner encrypts
the original image using an encryption key, and a data-hider can embed additional data into the
encrypted image using a data-hiding key though he does not know the original content. With an
encrypted image containing additional data, a receiver may first decrypt it according to the
encryption key, and then extract the embedded data and recover the original image according to
the data-hiding key. In a novel scheme for separable reversible data hiding in encrypted image.
In the proposed scheme, the original image is encrypted using an encryption key and the
additional data are embedded into the encrypted image using a data-hiding key. If a receiver has
the data-hiding key, he can extract the additional data though he does not know the image
content. If the receiver has the encryption key, he can decrypt the received data to obtain an
image similar to the original one, but cannot extract the additional data. If the receiver has both
the data-hiding key and the encryption key, he can extract the additional data and recover the
original content without any error by exploiting the spatial correlation in natural image when the
amount of additional data is not too large.
ACKNOWLEDGEMENT
University for providing the excellent infrastructure that is required for the development
We would also like to thank Dr.E.Poovammal M.E., Ph.d Professor and Head of
department Computer Science And Engineering , SRM University for providing us conductive
We would also like to thank our B.Tech Project Coordinator , Mrs. Annie Uthra
We would also like to express our sincere gratitude to my project guide Mrs.Kanmani
University for her assistance ,timely suggestions and guidance throughout the duration of this
project.
We also convey our gratitude to all other members in the project panel and those who
TABLE OF CONTENTS
1 INTRODUCTION 1
2 LITERATURE REVIEW 3
3 SYSTEM ANALYSIS 5
DISADVANTAGES
3.2.1 ADVANTAGES OF
PROPOSED SYSTEM 5
4 SOFTWARE REQUIREMENT 7
SPECIFICATION
5 SYSTEM DESCRIPTION 8
6 MODULE DESCRIPTION 16
7 SAMPLE CODE 20
8 SCREENSHOTS 26
9 CONCLUSION 30
REFERENCES 31
LIST OF FIGURES
CHAPTER 1
INTRODUCTION
In recent years, signal processing in the encrypted domain has attracted considerable research
interest. As an effective and popular means for privacy protection, encryption converts the
ordinary signal into unintelligible data, so that the traditional signal processing usually takes
place before encryption or after decryption. However, in some scenarios that a content owner
does not trust the processing service provider, the ability to manipulate the encrypted data when
keeping the plain content unrevealed is desired. For instance, when the secret data to be
transmitted are encrypted, a channel provider without any knowledge of the cryptographic key
may tend to compress the encrypted data due to the limited channel resource. While an encrypted
binary image can be compressed with a lossless manner by finding the syndromes of low-density
parity-check codes, a lossless compression method for encrypted gray image using progressive
decomposition and rate-compatible punctured turbo codes is developed in. With the lossy
compression method presented in, an encrypted gray image can be efficiently compressed by
discarding the excessively rough and fine information of coefficients generated from orthogonal
transform. When having the compressed data, are receiver may reconstruct the principal content
of original image by retrieving the values of coefficients. The computation of transform in the
encrypted domain has also been studied.
Based on the homomorphic properties of the underlying cryptosystem, the discrete Fourier
transform in the encrypted domain can be implemented. In a composite signal representation
method packing together a number of signal samples and processing them as a unique sample is
used to reduce the complexity of computation and the size of encrypted data. There are also a
number of works on data hiding in the encrypted domain. In a buyer–seller watermarking
protocol, the seller of digital multimedia product encrypts the original data using a public key,
and then permutes and embeds an encrypted fingerprint provided by the buyer in the encrypted
domain. After decryption with a private key, the buyer can obtain a watermarked product. This
protocol ensures that the seller cannot know the buyer’s watermarked version while the buyer
cannot know the original version. An anonymous fingerprinting scheme that improves the
enciphering rate by exploiting the Okamoto-Uchiyama encryption method has been proposed in.
By introducing the composite signal representation mechanism, both the computational overhead
and the large communication bandwidth due to the homomorphic public-key encryption are also
significantly reduced In another type of joint data-hiding and encryption schemes, a part of cover
data is used to carry the additional message and the restof the data are encrypted, so that both the
copyright and the privacy can be protected. For example, the intra prediction mode, motion
vector difference and signs of DCT coefficients are encrypted, while a watermark is embedded
into the amplitudes of DCT coefficients. In, the cover data in higher and lower bit-planes of
transform domain are respectively encrypted and watermarked. In, the content owner encrypts
the signs of host DCT coefficients and each content-user uses a different key to decrypt only a
subset of the coefficients, so that a series of versions containing different fingerprints are
generated for the users. The reversible data hiding in encrypted image is investigated in.
Most of the work on reversible data hiding focuses on the data embedding/extracting on the plain
spatial domain But, in some applications, an inferior assistant or a channel administrator hopes to
append some additional message, such as the origin information, image notation or
authentication data, within the encrypted image though he does not know the original image
content. And it is also hopeful that the original content should be recovered without any error
after image decryption and message extraction at receiver side. Reference presents a practical
scheme satisfying the above-mentioned requirements . A content owner encrypts the original
image using an encryption key, and a data-hider can embed additional data into the encrypted
image using a data-hiding key though he does not know the original content. With an encrypted
image containing additional data, a receiver may first decrypt it according to the encryption key,
and then extract the embedded data and recover the original image according to the data-hiding
key. In the scheme, the data extraction is not separable from the content decryption. In other
words, the additional data must be extracted from the decrypted image, so that the principal
content of original image is revealed before data extraction, and, if someone has the data-hiding
key but not the encryption key, he cannot extract any information from the encrypted image
containing additional data.
CHAPTER 2
LITERATURE REVIEW
The reversible data hiding in encrypted image is investigated in most of the work
on reversible data hiding focuses on the data embedding/extracting on the plain spatial
domain [1]. A content owner encrypts the original image using an encryption key, and a
data-hider can embed additional data into the encrypted image using a data-hiding key
though he does not know the original content. With an encrypted image containing
additional data, a receiver may first decrypt it according to the encryption key, and then
extract the embedded data and recover the original image according to the data-hiding
key.
In [2] the concepts of security and robustness in watermarking, in order to be able
to establish a clear frontier between them. A new information-theoretic framework to
study data-hiding and watermarking security is proposed, using the mutual information to
quantify the information about the secret key that leaks from the observation of
watermarked objects. This framework is applied to the analysis of a Spread-Spectrum
data hiding scheme in different scenarios. Finally, we show some interesting links
between a measure proposed in previous works in the literature, which is based on Fisher
Information Matrix, and our proposed measure.
Whereas the embedding distortion, the payload and the robustness of digital
watermarking schemes are well understood, the notion of security is still not completely
well defined. The approach proposed in the last five years is too theoretical and solely
considers the embedding process, which is half of the watermarking scheme. [3] proposes
a new measurement of watermarking security, called the effective key length, which
captures the difficulty for the adversary to get access to the watermarking channel. This
new methodology is applied to additive spread spectrum schemes where theoretical and
practical computations of the effective key length are proposed. It shows that these
schemes are not secure as soon as the adversary gets observations in the Known Message
Attack context.
CHAPTER 3
SYSTEM ANALYSIS
In the existing system are used to cryptography concept for hides the content of the messages
only don’t hide the existence of the messages. To hide the data in particular bit using public key,
so easily extract the original messages. The receiver decrypts the original image and embedded
data using the single key only.
¾ The hackers recover the embedding data in original image because the data placed in
¾ To attack the hidden data using original image because referred the key value. The data
In the proposed system used steganography concept for hide the content of messages and
existence of the message. The original image is encrypted and data hiding with the help of share
image and decrypted using decryption key. In this paper, proposes a novel scheme for separable
reversible data hiding in encrypted image.
• The hacker didn’t recover the embedded data because using shared images.
• The shared image is used embedding to compress image from original image and
• If the receiver having decryption key. He can extract the additional data and
• To extract the data without any error by exploiting the spatial correlation in
natural image when the amount of additional data is not too large.
This paper proposes a novel scheme for separable reversible data hiding in encrypted image. In
the proposed scheme, the original image is encrypted using an encryption key and the additional
data are embedded into the encrypted image using a data-hiding key.
CHAPTER 4
In this chapter, we will see the necessary hardware and software requirements. We will also see a
brief overview of all the different software’s used in this system.
Hard disc : 40 GB
RAM : 1GB
5. Ram : 64 MB.
CHA
APTER 5
YSTEM DESCRIIPTION
SY
5.1Systtem Archittecture:
5 System architecture
5.1 a e for separaable reversib
ble data hid
ding in encryypted imagee
A use case diagram is a type of behavioral diagram defined by use-case analysis. Its
purpose is to present a graphical overview of the functionality provided by a system in terms
of actors and use cases, dependencies between those use cases.
The main purpose of a use case diagram is to show what system functions are performed
for which actor.
Actors
Use Cases
Flow Lines
Dependencies
A class diagram is a type of static structure diagram that describes the structure of a
system by showing the system's classes, their attributes, operations (or methods), and the
relationships among the classes It explains which class contains information.
Class Diagram:
Sequence diagrams are sometimes called event diagrams, event scenarios, and timing diagram
Sequence Diagram:
Communication diagrams show a lot of the same information as sequence diagrams, but
because of how the information is presented, some of it is easier to find in one diagram than the
other. Communication diagrams show which elements each one interacts with better, but
sequence diagrams show the order in which the interactions take place more clearly
CHAPTER 6
MODULE DESCRIPTION
In this chapter, we will look in detail about the various modules used in this project and their
functions.
The project involves the following modules:
DATA HIDING
ENCRYPTION
IMAGE DECRYPTION
DATA EXTRACTION
This module describes about the embedding the data for secret sharing. It takes one random
encrypted image. Watermark gives the identification of the provider. Here we use LSB algorithm
for data embedding. Before data hiding we first encrypt the data using secret key.
1) Assume that the size of the host image is 512×512. Host image is divided into small
M×M blocks Z, block Z is divided into small M ×M blocks Y. If M=8 is used, the
size of block Y is 8×8.
Y Y Y 1 3 0 -1
Z Z Y Y Y 0 28 5 0
-3 23 34 64 A
Z Z Y Y Y
1 9 54 92 B
6.3 ENCRYPTION:
This module describes the encryption of image to be transmitted. So first the image is
converting into streams of data array and each data will be encrypted. The shares will be created
based on the number of users. For example if 5 users are there means we create five shares. For
each share the user can reveal the image but only after five shares he can view the full image.
This algorithm not uses the encryption key because if the key is obtained by some unauthorized
person then he will reveal the image very easily.
Secret Image Encrypted image
Sharing process
No one can obtain any hidden information from a single share, hence ensures the
security. When superimposing k (sheets of share), the possibility for the pixels being stacked into
random pixels remains 1/n, while the possibility rises to k/n, which sharpens the contrast of the
secret image. Therefore it becomes more and more obvious. After superimposing all of the
shares, the contrast rises to (n − 1)/n which is apparently better than the traditional ways that can
only obtain 50% of contrast, consequently, a clearer recovered image can be achieved.
First, choose pseudo-random numbers and mapping key to assign two pixels (ai, bi) for n
pairs from each block and modified value of the assigned pixels after embedded watermark. For
extraction, choose the same pairs, according to the function, the watermark is extracted. Product
Provider decrypts the extracted watermark by chaotic sequence and can restore the user’s
message.
CHAPTER 7
SAMPLE CODE
bimage = gc.createCompatibleImage(image.getWidth(null),
image.getHeight(null), transparency);
if(bimage == null)
{
int type = 1;
if(hasAlpha)
type = 2;
bimage=newBufferedImage(image.getWidth(null),
image.getHeight(null),BufferedImage.TYPE_INT_RGB);
}
Graphics g = bimage.createGraphics();
g.drawImage(image, 0, 0, null);
g.dispose();
return bimage;
}
public static int[] getPixels(BufferedImage image) {
int[] pixels;
pixels= new int[image.getWidth() * image.getHeight()];
return image.getRGB(0, 0, image.getWidth(), image.getHeight(), pixels, 0,
image.getWidth());
}
7.2Image Encryption
package progressive;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
import java.awt.*;
import java.util.*;
import ij.*;
public class encryption {
public static void main(String[] args)throws Exception
{
try{
int h=buf.getHeight();
int w=buf.getWidth();
new ImagePlus("original",buf).show();
ImageIO.write(buf,"JPG",new File("D:\\first.jpg"));
BufferedImage share1encrypt=getPixels(buf);
new ImagePlus("share1", share1encrypt).show();
ImageIO.write(share1encrypt, "JPG",new File("D:\\share1.jpg"));
BufferedImage share2encrypt=getPixels1(share1encrypt);
new ImagePlus("share2",share2encrypt).show();
ImageIO.write(share2encrypt, "JPG",new File("D:\\share2.jpg"));
BufferedImage share3encrypt=getPixels2(share2encrypt);
new ImagePlus("share3",share3encrypt).show();
ImageIO.write(share3encrypt, "JPG",new File("D:\\share3.jpg"));
BufferedImage share4encrypt=getPixels3(share3encrypt);
new ImagePlus("share4",share4encrypt).show();
ImageIO.write(share4encrypt, "JPG",new File("D:\\share4.jpg"));
BufferedImage share5encrypt=getPixels4(share4encrypt);
/* BufferedImage image1 = getimage1(buf,share1encrypt);
BufferedImage image2 = getimage2(buf,share2encrypt);
BufferedImage image3 = getimage3(buf,share3encrypt);
BufferedImage share1encrypt=getimage1(original);
new ImagePlus("share1", share1encrypt).show();
ImageIO.write(share1encrypt, "JPG",new File("D:\\decryption1.jpg"));
BufferedImage share2encrypt=getimage2(share1encrypt);
new ImagePlus("share2",share2encrypt).show();
ImageIO.write(share2encrypt, "JPG",new File("D:\\share2.jpg"));
}
catch(Exception e)
{
System.out.println(e);
}
}
}
7.4Data Extraction
class DragMouseAdapter extends MouseAdapter {
public void mouseReleased(MouseEvent e) {
JLabel jj=(JLabel)e.getSource();
decryption enc=new decryption();
JComponent cmp = (JComponent) e.getSource();
TransferHandler handler = cmp.getTransferHandler();
if(jj.equals(share1icon))
{
handler.exportAsDrag(cmp, e, TransferHandler.LINK)
Icon ic=jl.getIcon();
Image im=((ImageIcon)ic).getImage();
BufferedImage bb=(BufferedImage)im;
try{
BufferedImage bk=enc.getimage4(bb);
jl.setIcon(new ImageIcon(bk));
a=1;
}
catch(Exception ex)
{}
}
if(jj.equals(share2icon))
{
handler.exportAsDrag(cmp, e, TransferHandler.LINK);
Icon ic1=jl.getIcon();
Image im1=((ImageIcon)ic1).getImage();
BufferedImage bb1=(BufferedImage)im1;
try{
BufferedImage bk1=enc.getimage3(bb1);
jl.setIcon(new ImageIcon(bk1));
b=1;
}
catch(Exception ex)
{}
}
}
CHAPTER 8
SCREENSHOTS
We will see with the help of the screenshots how the system is executed step-by-step
8.1 Choose the Image and Enter the Secret Data In Text Box
Chapter 9
CONCLUSION
A novel scheme for separable reversible data hiding [1] in encrypted image is proposed,
which consists of image encryption, data embedding and data-extraction/image-recovery phases.
In the first phase, the content owner encrypts the original uncompressed image using an
encryption key. Although a data-hider does not know the original content, he can compress the
least significant bits of the encrypted image using a data-hiding key to create a sparse space to
accommodate the additional data. With an encrypted image containing additional data, the
receiver may extract the additional data using only the data-hiding key, or obtain an image
similar to the original one using only the encryption key. When the receiver has both of the keys,
he can extract the additional data and recover the original content without any error by exploiting
the spatial correlation in natural image if the amount of additional data is not too large. If the
lossless compression method is used for the encrypted image containing embedded data, the
additional data can be still extracted and the original content can be also recovered since the
lossless compression does not change the content of the encrypted image containing embedded
data. However, the lossy compression method compatible with encrypted images generated by
pixel permutation is not suitable here since the encryption is performed by bit-XOR operation.
FUTURE ENHANCEMENTS
However, the lossy compression method in compatible with encrypted images generated
by pixel permutation is not suitable here since the encryption is performed by bit-XOR
operation. In the future, a comprehensive combination of image encryption and data hiding
compatible with lossy compression deserves further investigation. When the receiver has both of
the keys, he can extract the additional data and recover the original content without any error by
exploiting the spatial correlation in natural image if the amount of additional data is not too
large. In future these will be reduced.
REFERENCES
1. Xinpeng Zhang “separable reversible data hiding in encrypted image.” , IEEE Trans.
Inform. Forensics Security, vol. 7, no. 2, April. 2012.
3. X. Zhang, “Lossy compression and iterative reconstruction for encrypted image,” IEEE
Trans. Inform. Forensics Security, vol. 6, no. 1, pp. 53–58, Feb. 2011.
4. T. Bianchi, A. Piva, and M. Barni, “On the implementation of the discrete Fourier
transform in the encrypted domain,” IEEE Trans. Inform. Forensics Security, vol. 4, no.
1, pp. 86–97, Feb. 2009.
5. T. Bianchi, A. Piva, and M. Barni, “Composite signal representation for fast and storage-
efficient processing of encrypted signals,” IEEE Trans. Inform. Forensics Security, vol.
5, no. 1, pp. 180–187, Feb. 2010.