SlideShare a Scribd company logo
1 of 11
Reversible Data Hiding in Encrypted Images by Reserving
Room Before Encryption
ABSTRACT
Recently, more and more attention is paid to reversible data hiding (RDH) in encrypted images, since it
maintains the excellent property that the original cover can be losslessly recovered after embedded data is
extracted while protecting the image content’s confidentiality. All previous methods embed data by reversibly
vacating room from the encrypted images, which may be subject to some errors on data extract ion and/or
image restoration. In this paper, we propose a novel method by reserving room before encryption with a
traditional RDH algorithm, and thus it is easy for the data hider to reversibly embed data in the encrypted
image. The proposed method can achieve real reversibility, that is, data extraction and image recovery are free
of any error. Experiments show that this novel method can embed more than 10 times as large payloads for the
same image quality as the previous methods, such as for PSNR dB.
Architecture
GLOBALSOFT TECHNOLOGIES
IEEE PROJECTS & SOFTWARE DEVELOPMENTS
IEEE FINAL YEAR PROJECTS|IEEE ENGINEERING PROJECTS|IEEE STUDENTS PROJECTS|IEEE
BULK PROJECTS|BE/BTECH/ME/MTECH/MS/MCA PROJECTS|CSE/IT/ECE/EEE PROJECTS
CELL: +91 98495 39085, +91 99662 35788, +91 98495 57908, +91 97014 40401
Visit: www.finalyearprojects.org Mail to:ieeefinalsemprojects@gmail.com
Existing System
In this Existing System, since losslessly vacating room from the encrypted images is relatively difficult
and sometimes inefficient, why are we still so obsessed to find novel RDH techniques working directly for
Encrypted Images? The method in compressed the encrypted LSBs to vacate room for additional data by finding
syndromes of a parity-check matrix, and the side information used at the receiver side is also the spatial
correlation of decrypted images. All the three methods try to vacate room from the encrypted images directly.
However, since the entropy of encrypted images has been maximized, these techniques can only achieve small
payloads generate marked image with poor quality for large payload and all of them are subject to some error
rates on data extraction and/or image restoration.
Disadvantage
X. Low error rate
X. Data extraction and image restoration problem
Proposed System
In proposed method can achieve real reversibility, that is, data extraction and image recovery are free of
any error. If we reverse the order of encryption and vacating room, i.e., reserving room prior to image
encryption at content owner side, the RDH tasks in encrypted images would be more natural and much easier
which leads us to the novel framework, “reserving room before encryption (RRBE)”
Advantage
Not only does the proposed method separate data extraction from image decryption but also achieves
excellent performance in two different prospects:
 Real reversibility is realized, that is, data extraction and image recovery are free of any error.
 For given embedding rates, the PSNRs of decrypted image containing the embedded data are
significantly improved; and for the acceptable PSNR, the range of embedding rates is greatly
enlarged.
Modules
1. Encrypted Image Generation
a) IMAGE PARTITION
b) SELF REVERSIBLE EMBEDDING
2. Data Hiding In Encrypted Image
3. Data Extraction and Image Recovery
4. Data Extraction and Image Restoration
Modules Description
Encrypted Image Generation
In this module, to construct the encrypted image, the first stage can be divided into three steps:
c) IMAGE PARTITION,
d) SELF REVERSIBLE EMBEDDING followed by image encryption.
At the beginning, image partition step divides original image into two parts and then, the LSBs of are reversibly
embedded into with a standard RDH algorithm so that LSBs of can be used for accommodating messages; at
last, encrypt the rearranged image to generate its final version.
a) IMAGE PARTITION
The operator here for reserving room before encryption is a standard RDH technique, so the goal of
image partition.
b) SELF REVERSIBLE EMBEDDING
The goal of self-reversible embedding is to embed the LSB-planes of into by employing
traditional RDH algorithms. We simplify the method in to demonstrate the process of self-embedding.
Data Hiding In Encrypted Image
In this module, a content owner encrypts the original image using a standard cipher with an encryption
key. After producing the encrypted image, the content owner hands over it to a data hider (e.g., a database
manager) and the data hider can embed some auxiliary data into the encrypted image by losslessly vacating
some room according to a data hiding key. Then a receiver, maybe the content owner himself or an authorized
third party can extract the embedded data with the data hiding key and further recover the original image from
the encrypted version according to the encryption key.
Data Extraction and Image Recovery
In this module, Extracting Data from Encrypted Images to manage and update personal information of
images which are encrypted for protecting clients’ privacy, an inferior database manager may only get access to
the data hiding key and have to manipulate data in encrypted domain. When the database manager gets the data
hiding key, he can decrypt and extract the additional data by directly reading the decrypted version. When
requesting for updating information of encrypted images, the database manager, then, updates information
through LSB replacement and encrypts up dated information according to the data hiding key all over again. As
the whole process is entirely operated on encrypted domain, it avoids the leakage of original content.
Data Extraction and Image Restoration
In this module, after generating the marked decrypted image, the content owner can further extract the
data and recover original image.
Reversible Data Hiding (RDH) – Compression Algorithm
private void Encrypt_btn_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile(EnImage_tbx.Text);
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
saveToImage = saveFileDialog1.FileName;
}
else
return;
if (EnImage_tbx.Text == String.Empty || EnFile_tbx.Text ==
String.Empty)
{
MessageBox.Show("Encrypton information is incomplete!nPlease
complete them frist.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
if (8 * ((height * (width / 3) * 3) / 3 - 1) < fileSize +
fileNameSize)
{
//MessageBox.Show("File size is too large!nPlease use a larger
image to hide this file.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
//return;
}
fileContainer = File.ReadAllBytes(loadedFilePath);
EncryptLayer();
//SqlConnection con = new SqlConnection(constring);
//con.Open();
//SqlCommand cmd2 = new SqlCommand("update Embedding set
saveimagepath='" + saveToImage + "' where id1='" + int2 + "' and autid='" + auid1
+ "'", con);
//cmd2.ExecuteNonQuery();
//SqlCommand cmd1 = new SqlCommand("update Embedding set
loadimagepath='" + EnImage_tbx.Text + "',loadfilepath='" + EnFile_tbx.Text + "'
where id1='" + int2 + "' and autid='" + auid1 + "'", con);
//cmd1.ExecuteNonQuery();
//con.Close();
//MessageBox.Show("your file is ready to split the packets ,click
packets sending!!!");
}
private void EncryptLayer()
{
toolStripStatusLabel1.Text = "Encrypting... Please wait";
Application.DoEvents();
long FSize = fileSize;
Bitmap changedBitmap = EncryptLayer(8, loadedTrueBitmap, 0, (height *
(width / 3) * 3) / 3 - fileNameSize - 1, true);
FSize -= (height * (width / 3) * 3) / 3 - fileNameSize - 1;
if (FSize > 0)
{
for (int i = 7; i >= 0 && FSize > 0; i--)
{
changedBitmap = EncryptLayer(i, changedBitmap, (((8 - i) *
height * (width / 3) * 3) / 3 - fileNameSize - (8 - i)), (((9 - i) * height *
(width / 3) * 3) / 3 - fileNameSize - (9 - i)), false);
FSize -= (height * (width / 3) * 3) / 3 - 1;
}
}
changedBitmap.Save(saveToImage);
toolStripStatusLabel1.Text = "Encrypted image has been successfully
saved.";
EncriptionDone = true;
AfterEncryption = Image.FromFile(saveToImage);
this.Invalidate();
}
private Bitmap EncryptLayer(int layer, Bitmap inputBitmap, long
startPosition, long endPosition, bool writeFileName)
{
Bitmap outputBitmap = inputBitmap;
layer--;
int i = 0, j = 0;
long FNSize = 0;
bool[] t = new bool[8];
bool[] rb = new bool[8];
bool[] gb = new bool[8];
bool[] bb = new bool[8];
Color pixel = new Color();
byte r, g, b;
if (writeFileName)
{
FNSize = fileNameSize;
string fileName = justFName(loadedFilePath);
//write fileName:
for (i = 0; i < height && i * (height / 3) < fileNameSize; i++)
for (j = 0; j < (width / 3) * 3 && i * (height / 3) + (j / 3)
< fileNameSize; j++)
{
byte2bool((byte)fileName[i * (height / 3) + j / 3], ref
t);
pixel = inputBitmap.GetPixel(j, i);
r = pixel.R;
g = pixel.G;
b = pixel.B;
byte2bool(r, ref rb);
byte2bool(g, ref gb);
byte2bool(b, ref bb);
if (j % 3 == 0)
{
rb[7] = t[0];
gb[7] = t[1];
bb[7] = t[2];
}
else if (j % 3 == 1)
{
rb[7] = t[3];
gb[7] = t[4];
bb[7] = t[5];
}
else
{
rb[7] = t[6];
gb[7] = t[7];
}
Color result = Color.FromArgb((int)bool2byte(rb),
(int)bool2byte(gb), (int)bool2byte(bb));
outputBitmap.SetPixel(j, i, result);
}
i--;
}
//write file (after file name):
int tempj = j;
for (; i < height && i * (height / 3) < endPosition - startPosition +
FNSize && startPosition + i * (height / 3) < fileSize + FNSize; i++)
for (j = 0; j < (width / 3) * 3 && i * (height / 3) + (j / 3) <
endPosition - startPosition + FNSize && startPosition + i * (height / 3) + (j /
3) < fileSize + FNSize; j++)
{
if (tempj != 0)
{
j = tempj;
tempj = 0;
}
byte2bool((byte)fileContainer[startPosition + i * (height /
3) + j / 3 - FNSize], ref t);
pixel = inputBitmap.GetPixel(j, i);
r = pixel.R;
g = pixel.G;
b = pixel.B;
byte2bool(r, ref rb);
byte2bool(g, ref gb);
byte2bool(b, ref bb);
if (j % 3 == 0)
{
rb[layer] = t[0];
gb[layer] = t[1];
bb[layer] = t[2];
}
else if (j % 3 == 1)
{
rb[layer] = t[3];
gb[layer] = t[4];
bb[layer] = t[5];
}
else
{
rb[layer] = t[6];
gb[layer] = t[7];
}
Color result = Color.FromArgb((int)bool2byte(rb),
(int)bool2byte(gb), (int)bool2byte(bb));
outputBitmap.SetPixel(j, i, result);
}
long tempFS = fileSize, tempFNS = fileNameSize;
r = (byte)(tempFS % 100);
tempFS /= 100;
g = (byte)(tempFS % 100);
tempFS /= 100;
b = (byte)(tempFS % 100);
Color flenColor = Color.FromArgb(r, g, b);
outputBitmap.SetPixel(width - 1, height - 1, flenColor);
r = (byte)(tempFNS % 100);
tempFNS /= 100;
g = (byte)(tempFNS % 100);
tempFNS /= 100;
b = (byte)(tempFNS % 100);
Color fnlenColor = Color.FromArgb(r, g, b);
outputBitmap.SetPixel(width - 2, height - 1, fnlenColor);
return outputBitmap;
}
private void byte2bool(byte inp, ref bool[] outp)
{
if (inp >= 0 && inp <= 255)
for (short i = 7; i >= 0; i--)
{
if (inp % 2 == 1)
outp[i] = true;
else
outp[i] = false;
inp /= 2;
}
else
throw new Exception("Input number is illegal.");
}
private byte bool2byte(bool[] inp)
{
byte outp = 0;
for (short i = 7; i >= 0; i--)
{
if (inp[i])
outp += (byte)Math.Pow(2.0, (double)(7 - i));
}
return outp;
}
private string justFName(string path)
{
string output;
int i;
if (path.Length == 3) // i.e: "C:"
return path.Substring(0, 1);
for (i = path.Length - 1; i > 0; i--)
if (path[i] == '')
break;
output = path.Substring(i + 1);
return output;
}
private string justEx(string fName)
{
string output;
int i;
for (i = fName.Length - 1; i > 0; i--)
if (fName[i] == '.')
break;
output = fName.Substring(i + 1);
return output;
}
SYSTEM REQUIREMENT SPECIFICATION
HARDWARE REQUIREMENTS
System : Pentium IV 2.4 GHz.
Hard Disk : 80 GB.
Monitor : 15 VGA Color.
Mouse : Logitech.
Ram : 512 MB.
SOFTWARE REQUIREMENTS
Operating system : Windows 7 Ultimate (32-bit) OS
Front End : Visual Studio 2010
Coding Language : C#.NET
Database : SQL Server 2008
CLOUING
DOMAIN: WIRELESS NETWORK PROJECTS

More Related Content

More from IEEEGLOBALSOFTTECHNOLOGIES

More from IEEEGLOBALSOFTTECHNOLOGIES (20)

DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Model based analysis of wireless sys...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Model based analysis of wireless sys...DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Model based analysis of wireless sys...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Model based analysis of wireless sys...
 
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Mobile relay configuration in data i...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Mobile relay configuration in data i...DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Mobile relay configuration in data i...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Mobile relay configuration in data i...
 
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Distributed cooperative caching in s...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Distributed cooperative caching in s...DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Distributed cooperative caching in s...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Distributed cooperative caching in s...
 
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Delay optimal broadcast for multihop...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Delay optimal broadcast for multihop...DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Delay optimal broadcast for multihop...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Delay optimal broadcast for multihop...
 
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Dcim distributed cache invalidation ...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Dcim distributed cache invalidation ...DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Dcim distributed cache invalidation ...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Dcim distributed cache invalidation ...
 
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Cooperative packet delivery in hybri...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Cooperative packet delivery in hybri...DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Cooperative packet delivery in hybri...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Cooperative packet delivery in hybri...
 
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Content sharing over smartphone base...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Content sharing over smartphone base...DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Content sharing over smartphone base...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Content sharing over smartphone base...
 
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Community aware opportunistic routin...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Community aware opportunistic routin...DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Community aware opportunistic routin...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Community aware opportunistic routin...
 
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Capacity of hybrid wireless mesh net...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Capacity of hybrid wireless mesh net...DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Capacity of hybrid wireless mesh net...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Capacity of hybrid wireless mesh net...
 
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Adaptive position update for geograp...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Adaptive position update for geograp...DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Adaptive position update for geograp...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT Adaptive position update for geograp...
 
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT A scalable server architecture for m...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT A scalable server architecture for m...DOTNET 2013 IEEE MOBILECOMPUTING PROJECT A scalable server architecture for m...
DOTNET 2013 IEEE MOBILECOMPUTING PROJECT A scalable server architecture for m...
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Attribute based access to scalable me...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Attribute based access to scalable me...DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Attribute based access to scalable me...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Attribute based access to scalable me...
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Attribute based access to scalable me...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Attribute based access to scalable me...DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Attribute based access to scalable me...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Attribute based access to scalable me...
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Scalable and secure sharing of person...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Scalable and secure sharing of person...DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Scalable and secure sharing of person...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Scalable and secure sharing of person...
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Qos ranking prediction for cloud serv...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Qos ranking prediction for cloud serv...DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Qos ranking prediction for cloud serv...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Qos ranking prediction for cloud serv...
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Privacy preserving public auditing fo...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Privacy preserving public auditing fo...DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Privacy preserving public auditing fo...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Privacy preserving public auditing fo...
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Facilitating document annotation usin...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Facilitating document annotation usin...DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Facilitating document annotation usin...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Facilitating document annotation usin...
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Error tolerant resource allocation an...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Error tolerant resource allocation an...DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Error tolerant resource allocation an...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Error tolerant resource allocation an...
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Dynamic resource allocation using vir...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Dynamic resource allocation using vir...DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Dynamic resource allocation using vir...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Dynamic resource allocation using vir...
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Collaboration in multicloud computing...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Collaboration in multicloud computing...DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Collaboration in multicloud computing...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Collaboration in multicloud computing...
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 

JAVA 2013 IEEE NETWORKSECURITY PROJECT Reversible data hiding in encrypted images by reserving room before encryption

  • 1. Reversible Data Hiding in Encrypted Images by Reserving Room Before Encryption ABSTRACT Recently, more and more attention is paid to reversible data hiding (RDH) in encrypted images, since it maintains the excellent property that the original cover can be losslessly recovered after embedded data is extracted while protecting the image content’s confidentiality. All previous methods embed data by reversibly vacating room from the encrypted images, which may be subject to some errors on data extract ion and/or image restoration. In this paper, we propose a novel method by reserving room before encryption with a traditional RDH algorithm, and thus it is easy for the data hider to reversibly embed data in the encrypted image. The proposed method can achieve real reversibility, that is, data extraction and image recovery are free of any error. Experiments show that this novel method can embed more than 10 times as large payloads for the same image quality as the previous methods, such as for PSNR dB. Architecture GLOBALSOFT TECHNOLOGIES IEEE PROJECTS & SOFTWARE DEVELOPMENTS IEEE FINAL YEAR PROJECTS|IEEE ENGINEERING PROJECTS|IEEE STUDENTS PROJECTS|IEEE BULK PROJECTS|BE/BTECH/ME/MTECH/MS/MCA PROJECTS|CSE/IT/ECE/EEE PROJECTS CELL: +91 98495 39085, +91 99662 35788, +91 98495 57908, +91 97014 40401 Visit: www.finalyearprojects.org Mail to:ieeefinalsemprojects@gmail.com
  • 2. Existing System In this Existing System, since losslessly vacating room from the encrypted images is relatively difficult and sometimes inefficient, why are we still so obsessed to find novel RDH techniques working directly for Encrypted Images? The method in compressed the encrypted LSBs to vacate room for additional data by finding syndromes of a parity-check matrix, and the side information used at the receiver side is also the spatial correlation of decrypted images. All the three methods try to vacate room from the encrypted images directly. However, since the entropy of encrypted images has been maximized, these techniques can only achieve small payloads generate marked image with poor quality for large payload and all of them are subject to some error rates on data extraction and/or image restoration. Disadvantage X. Low error rate X. Data extraction and image restoration problem Proposed System In proposed method can achieve real reversibility, that is, data extraction and image recovery are free of any error. If we reverse the order of encryption and vacating room, i.e., reserving room prior to image
  • 3. encryption at content owner side, the RDH tasks in encrypted images would be more natural and much easier which leads us to the novel framework, “reserving room before encryption (RRBE)” Advantage Not only does the proposed method separate data extraction from image decryption but also achieves excellent performance in two different prospects:  Real reversibility is realized, that is, data extraction and image recovery are free of any error.  For given embedding rates, the PSNRs of decrypted image containing the embedded data are significantly improved; and for the acceptable PSNR, the range of embedding rates is greatly enlarged. Modules 1. Encrypted Image Generation a) IMAGE PARTITION b) SELF REVERSIBLE EMBEDDING 2. Data Hiding In Encrypted Image 3. Data Extraction and Image Recovery 4. Data Extraction and Image Restoration Modules Description Encrypted Image Generation In this module, to construct the encrypted image, the first stage can be divided into three steps: c) IMAGE PARTITION, d) SELF REVERSIBLE EMBEDDING followed by image encryption. At the beginning, image partition step divides original image into two parts and then, the LSBs of are reversibly embedded into with a standard RDH algorithm so that LSBs of can be used for accommodating messages; at last, encrypt the rearranged image to generate its final version. a) IMAGE PARTITION The operator here for reserving room before encryption is a standard RDH technique, so the goal of image partition. b) SELF REVERSIBLE EMBEDDING
  • 4. The goal of self-reversible embedding is to embed the LSB-planes of into by employing traditional RDH algorithms. We simplify the method in to demonstrate the process of self-embedding. Data Hiding In Encrypted Image In this module, a content owner encrypts the original image using a standard cipher with an encryption key. After producing the encrypted image, the content owner hands over it to a data hider (e.g., a database manager) and the data hider can embed some auxiliary data into the encrypted image by losslessly vacating some room according to a data hiding key. Then a receiver, maybe the content owner himself or an authorized third party can extract the embedded data with the data hiding key and further recover the original image from the encrypted version according to the encryption key. Data Extraction and Image Recovery In this module, Extracting Data from Encrypted Images to manage and update personal information of images which are encrypted for protecting clients’ privacy, an inferior database manager may only get access to the data hiding key and have to manipulate data in encrypted domain. When the database manager gets the data hiding key, he can decrypt and extract the additional data by directly reading the decrypted version. When requesting for updating information of encrypted images, the database manager, then, updates information through LSB replacement and encrypts up dated information according to the data hiding key all over again. As the whole process is entirely operated on encrypted domain, it avoids the leakage of original content. Data Extraction and Image Restoration In this module, after generating the marked decrypted image, the content owner can further extract the data and recover original image.
  • 5. Reversible Data Hiding (RDH) – Compression Algorithm private void Encrypt_btn_Click(object sender, EventArgs e) { pictureBox1.Image = Image.FromFile(EnImage_tbx.Text); if (saveFileDialog1.ShowDialog() == DialogResult.OK) { saveToImage = saveFileDialog1.FileName; } else return; if (EnImage_tbx.Text == String.Empty || EnFile_tbx.Text == String.Empty) { MessageBox.Show("Encrypton information is incomplete!nPlease complete them frist.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } if (8 * ((height * (width / 3) * 3) / 3 - 1) < fileSize + fileNameSize) { //MessageBox.Show("File size is too large!nPlease use a larger image to hide this file.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); //return; } fileContainer = File.ReadAllBytes(loadedFilePath); EncryptLayer(); //SqlConnection con = new SqlConnection(constring); //con.Open(); //SqlCommand cmd2 = new SqlCommand("update Embedding set saveimagepath='" + saveToImage + "' where id1='" + int2 + "' and autid='" + auid1 + "'", con); //cmd2.ExecuteNonQuery(); //SqlCommand cmd1 = new SqlCommand("update Embedding set loadimagepath='" + EnImage_tbx.Text + "',loadfilepath='" + EnFile_tbx.Text + "' where id1='" + int2 + "' and autid='" + auid1 + "'", con); //cmd1.ExecuteNonQuery(); //con.Close(); //MessageBox.Show("your file is ready to split the packets ,click packets sending!!!"); } private void EncryptLayer() { toolStripStatusLabel1.Text = "Encrypting... Please wait"; Application.DoEvents(); long FSize = fileSize; Bitmap changedBitmap = EncryptLayer(8, loadedTrueBitmap, 0, (height * (width / 3) * 3) / 3 - fileNameSize - 1, true); FSize -= (height * (width / 3) * 3) / 3 - fileNameSize - 1; if (FSize > 0) {
  • 6. for (int i = 7; i >= 0 && FSize > 0; i--) { changedBitmap = EncryptLayer(i, changedBitmap, (((8 - i) * height * (width / 3) * 3) / 3 - fileNameSize - (8 - i)), (((9 - i) * height * (width / 3) * 3) / 3 - fileNameSize - (9 - i)), false); FSize -= (height * (width / 3) * 3) / 3 - 1; } } changedBitmap.Save(saveToImage); toolStripStatusLabel1.Text = "Encrypted image has been successfully saved."; EncriptionDone = true; AfterEncryption = Image.FromFile(saveToImage); this.Invalidate(); } private Bitmap EncryptLayer(int layer, Bitmap inputBitmap, long startPosition, long endPosition, bool writeFileName) { Bitmap outputBitmap = inputBitmap; layer--; int i = 0, j = 0; long FNSize = 0; bool[] t = new bool[8]; bool[] rb = new bool[8]; bool[] gb = new bool[8]; bool[] bb = new bool[8]; Color pixel = new Color(); byte r, g, b; if (writeFileName) { FNSize = fileNameSize; string fileName = justFName(loadedFilePath); //write fileName: for (i = 0; i < height && i * (height / 3) < fileNameSize; i++) for (j = 0; j < (width / 3) * 3 && i * (height / 3) + (j / 3) < fileNameSize; j++) { byte2bool((byte)fileName[i * (height / 3) + j / 3], ref t); pixel = inputBitmap.GetPixel(j, i); r = pixel.R; g = pixel.G; b = pixel.B; byte2bool(r, ref rb); byte2bool(g, ref gb); byte2bool(b, ref bb); if (j % 3 == 0) { rb[7] = t[0]; gb[7] = t[1]; bb[7] = t[2]; } else if (j % 3 == 1) {
  • 7. rb[7] = t[3]; gb[7] = t[4]; bb[7] = t[5]; } else { rb[7] = t[6]; gb[7] = t[7]; } Color result = Color.FromArgb((int)bool2byte(rb), (int)bool2byte(gb), (int)bool2byte(bb)); outputBitmap.SetPixel(j, i, result); } i--; } //write file (after file name): int tempj = j; for (; i < height && i * (height / 3) < endPosition - startPosition + FNSize && startPosition + i * (height / 3) < fileSize + FNSize; i++) for (j = 0; j < (width / 3) * 3 && i * (height / 3) + (j / 3) < endPosition - startPosition + FNSize && startPosition + i * (height / 3) + (j / 3) < fileSize + FNSize; j++) { if (tempj != 0) { j = tempj; tempj = 0; } byte2bool((byte)fileContainer[startPosition + i * (height / 3) + j / 3 - FNSize], ref t); pixel = inputBitmap.GetPixel(j, i); r = pixel.R; g = pixel.G; b = pixel.B; byte2bool(r, ref rb); byte2bool(g, ref gb); byte2bool(b, ref bb); if (j % 3 == 0) { rb[layer] = t[0]; gb[layer] = t[1]; bb[layer] = t[2]; } else if (j % 3 == 1) { rb[layer] = t[3]; gb[layer] = t[4]; bb[layer] = t[5]; } else { rb[layer] = t[6]; gb[layer] = t[7]; }
  • 8. Color result = Color.FromArgb((int)bool2byte(rb), (int)bool2byte(gb), (int)bool2byte(bb)); outputBitmap.SetPixel(j, i, result); } long tempFS = fileSize, tempFNS = fileNameSize; r = (byte)(tempFS % 100); tempFS /= 100; g = (byte)(tempFS % 100); tempFS /= 100; b = (byte)(tempFS % 100); Color flenColor = Color.FromArgb(r, g, b); outputBitmap.SetPixel(width - 1, height - 1, flenColor); r = (byte)(tempFNS % 100); tempFNS /= 100; g = (byte)(tempFNS % 100); tempFNS /= 100; b = (byte)(tempFNS % 100); Color fnlenColor = Color.FromArgb(r, g, b); outputBitmap.SetPixel(width - 2, height - 1, fnlenColor); return outputBitmap; } private void byte2bool(byte inp, ref bool[] outp) { if (inp >= 0 && inp <= 255) for (short i = 7; i >= 0; i--) { if (inp % 2 == 1) outp[i] = true; else outp[i] = false; inp /= 2; } else throw new Exception("Input number is illegal."); } private byte bool2byte(bool[] inp) { byte outp = 0; for (short i = 7; i >= 0; i--) { if (inp[i]) outp += (byte)Math.Pow(2.0, (double)(7 - i)); } return outp; } private string justFName(string path) { string output; int i; if (path.Length == 3) // i.e: "C:" return path.Substring(0, 1);
  • 9. for (i = path.Length - 1; i > 0; i--) if (path[i] == '') break; output = path.Substring(i + 1); return output; } private string justEx(string fName) { string output; int i; for (i = fName.Length - 1; i > 0; i--) if (fName[i] == '.') break; output = fName.Substring(i + 1); return output; } SYSTEM REQUIREMENT SPECIFICATION HARDWARE REQUIREMENTS System : Pentium IV 2.4 GHz. Hard Disk : 80 GB. Monitor : 15 VGA Color. Mouse : Logitech. Ram : 512 MB. SOFTWARE REQUIREMENTS Operating system : Windows 7 Ultimate (32-bit) OS Front End : Visual Studio 2010 Coding Language : C#.NET Database : SQL Server 2008
  • 10.