0% found this document useful (0 votes)
45 views23 pages

ISMreport

The document discusses using deep autoencoders for encryption and decryption of images. It proposes generating a latent space based on pixel values that serves as a low memory encryption system, with the autoencoder model as the secret key. It then compares this approach to other existing image encryption techniques, noting advantages such as the ability to recognize redundant image parts and hide data more efficiently, but also limitations like potential difficulties in capturing normal network traffic behaviors for some IoT devices.

Uploaded by

S Dubey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views23 pages

ISMreport

The document discusses using deep autoencoders for encryption and decryption of images. It proposes generating a latent space based on pixel values that serves as a low memory encryption system, with the autoencoder model as the secret key. It then compares this approach to other existing image encryption techniques, noting advantages such as the ability to recognize redundant image parts and hide data more efficiently, but also limitations like potential difficulties in capturing normal network traffic behaviors for some IoT devices.

Uploaded by

S Dubey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

INFORMATION SECURITY MANAGEMENT

ENCRYPTION AND DECRYPTION OF IMAGES


USING DEEP AUTOENCODERS
Under the guidance of
Prof. Ruby D

Name Registration Number


Saurabh Kumar Jha 18BCE0197

Sukriti Dubey 18BCE0927

Anuj Kapoor 18BCE0682

Priyank Kaushik 18BCE0591

Maitreya Bhupesh Kocharekar 18BCE0866

School of Computer Science and Engineering


VIT, Vellore
1. ABSTRACT

There are several image encryption methods currently out there, but few require the automation
of the secret key generation process utilise an unsupervised learning mechanism. In this project,
we are attempting to develop a novel encryption system for images using deep auto-encoders,
where the pixel values of the images are taken as the initial feature vectors. The project is
proposed to be implemented in two ways, to work with greyscale values, as well as RGB values
using a convolutional neural network (CNN). The auto-encoder generates a latent space based on
the initial features, that while having few visual similarity with the same, serves as a low
memory encryption system for the images. The secret key here is the model generated by the
auto-encoder, which comprise the architecture and weights of the neural network, and will be
possessed beforehand by the end users.

2. PROBLEM STATEMENT

1.1 Idea

There are several image encryption techniques currently out there, but few involve the
automation of the secret key generation process using an unsupervised learning mechanism. In
this project, we tried to find the hidden text in the image by encryption and decryption using
deep autoencoders.The aim of an autoencoder is to find out a representation for a group of
knowledge, typically for dimensionality reduction, by training the network to ignore signal
noise. Here we are trying to implement 3 frameworks which are prep network , hide network
and reveal network .They work together and give the expected result.

1.2 Scope

Autoencoders are special types of neural networks that are based on a feedforward system, the
input is same as the output. This process involves compressing the input into its bare minimum
lower dimensional code and, reconstruct the file to produce the output. So what we get is a
summary of the input data also known as latent-space representation. In this freed up space we
can add some data that can be hidden in the file and recovered later on. Autoencoders usually
consist of encoder, code and decoder. The encoder compresses the input and produces the code,
the decoder, reconstructs the input only using this code as shown in Fig 1.1.

Fig 1.1 Autoencoder flow diagram


The input element goes through the encoder. The encoder is made of a ANN, this then produces
the code. The code then passes through the decoder, which is also an ANN, and produces an
output. The model is successful if we get an output similar to the input. The only requirement
that should be satisfied with for the model is that the dimensionality of input is same as that of
the output. The rest of the parameters can be trained in the neural networks.

1.3 Novelty

The network has a recognition for natural images, it is able to recognise what parts get
redundant and which data can be sacrificed to make space to hide data. It saves space all over
the input image and saves up many small pockets of data, resulting in quite a bit of space to
store secrets. As the parameters are randomised, i.e. what is considered redundant/not useful,
they are generated by the training model, therefore the possibilities become endless. This sort of
a system can only have its data extracted by the decoder that is trained along with the encoder.

1.4 Comparative Statement

i) Secure image steganography using cryptography and image transposition


Work Summary:

The paper proposed a new steganographic method. This was based on grey-level
modification for rgb colour images using image transposition. The secret key and secret
information are encrypted using multiple encryption algorithms and are hidden in the
host image pixels. The input is also transposed before data hiding. Image transposition
is done along with bit-shuffling, bitxoring, stego key-based encryption, and grey-level
modification. This introduces five different security levels to the proposed scheme,
increasing the system's security five fold.

Limitations:

● Large sequence of processes for every image is time consuming.


● Once the key is found through possibly leaked sources, hackers can abuse
the system.
● Data possibly transported via this method will be very limited in size, and
no large scale data transportation system can be established.

ii) Network-based Detection of IoT Botnet Attacks Using Deep


Autoencoders

Work Summary:

The goal of this paper was to propose and evaluate a new network based anomaly
detection system that extracts behaviors from snapshots of the provided network and
uses deep autoencoders to detect anomalous network traffic. The devices being
monitored were mostly IoT devices on the system network. To check this method, nine
samples are planted in the commercial IoT devices in a lab. They are infected with
IoT-based botnets, Mirai and BASHLITE. The results showed that the proposed
method’s ability to accurately and instantaneously detect the attacks as they were being
launched from the compromised IoT devices which were part of the botnet.

Limitations:

● The difference in the FPR score upon analysis of the various IoT devices
causes high traffic.
● Devices with multiple functions may be subject to categorization errors as it
may be difficult to obtain its normal behaviour.
● Difficulty in capturing normal traffic behaviour varies among IoT devices,
based on its capabilities.

iii) Image Encryption based on the RGB PIXEL Transposition and


Shuffling

Work Summary:

This paper refers to the knowledge in the field of cryptography application . It mentions
developing a cipher algorithm for encryption of images of m*n size by mixing the RGB
pixel values. The algorithm simplified encryption and cleaned up image encryption
based on RGB pixel values. This algorithm was implemented using MATLAB.

Limitations:

● An additional number of key design encryption tools have been lost.


● Like most steganographical applications, the amount of data that can be
continuously transmitted is limited.
● The subject of transferring a small amount of data is large, as the whole image is
used.

iv) Variational Autoencoder for Deep Learning of Images, Labels and


Captions
Work Summary:

This paper takes a different approach to autoencoders by creating a variant codec to


model both images and associated labels and captions. The image encoder used here is
an optional deep network (DGDN) for the primary purpose of predicting the
distribution of hidden DGDN features. To guess the label or captions of a new image
from the data set below, the measure is applied to all latent code distribution for
computer performance. Since this framework can be used to depict images in both the
absence and absence of related labels or captions, it can serve as a double and
unchecked network.

Limitations:

● The required setup is very expensive, with equipment containing GPU


implementation that can compete with state of the art setups.
● While the practice of partially monitored education is a novel in itself, the
accuracy of the parallel is far from practical.

v) Using Very Deep Autoencoders for Content-Based Image Retrieval

Work Summary:

This paper discusses the study of several layers of features in color images and how
these features are used to start deep autoencoders. These images are then coded in short
binary codes and semantic hashing using 28 codes is performed to retrieve images
similar to the query image with a non-‘n’ time difficulty. 8 improvements in the
accuracy of the mentioned system, the use of 256 binary codes for better matching is
discussed.

Limitations:
● Instead of using a new idea, the paper focused on the basic features of
mapping using autoencoder functions.
● Depending on the results of the retrieval, direct search across the database
yielded better results than the standard euclidean method.
● The novel feature of the paper, the spectral codes, made the metrics the
worst distance.

vi) Autoencoder-based Feature Learning for Cyber Security Applications

Work Summary:

This paper emphasizes the use of autoencoders as a productive learning model for
cyber security activities. It exploits the well-known fact that autoencoders can produce
hidden representations of features with good semantic similarities by taking vectors of
objects from cyber security situations and creating hidden presentations with semantic
similarities and beginnings embedded within them. One of the benefits of this method
is to reduce the memory requirement as a result of the reduction in size brought about
by autoencoders. The function uses publicly available data sets for network anomaly
intrusion detection and malware programming to create improvements in previous
results.

Limitations:

● While the autoencoder method produces better results than the vector of the first
element, there may be very simple methods that can be developed equally well.
● This approach creates a fundamental similarity to the actual aspects of
segregation, and because of its unregulated nature, more discriminatory
segregation will no longer work equally well.

1.5 Dataset
The data set which we used for a project contains different images which in turn helps us to
encode, combine and then decode the image. The dataset comprises around 1200 images which
are stored in array format. At the time of running the project it select any two random images
and does the operation.

1.6 Test Beds

In this project, we have used the jupyter notebook for compilation. The training and testing part
is done in Anaconda navigator using python. We have used libraries like keras and tensorflow
for the project.

1.7 Expected Results

The result which we are expecting via this project is that we can obtain a higher accuracy of
finding missing data through an image with the help of autoencoders which leads to the
encoding and decoding part of the image. We are also trying to plot some graphs for testing and
training sets to understand the working of the project properly.
3. ARCHITECTURE

2.1 High level Design

Fig 2.1 Flowchart of architecture


Basically here in this project we are first importing all the necessary packages to do the
operation necessary for a code to implement. Then we are important the data set which consists
of images that basically are stored in the format of an array.
The next step is to set up the libraries required for a code to run and then creating the training
and testing data set or images which will be using for implementing the algorithmic section.
A 2D convolution is plainly the approach of a mask to a 2D image, conceptually similar to a
blur operation in computer graphics. The prototype of Sequoia Task which implements the 2D
convolution is as follows:

void taskConv2D(int float A[M+U-1][N+V-1], int float H[U][V], out float C[M][N]);

The output image, C, it is computed from the input image, A and the convolutional mask, H.
After this we are encoding the image and trying to hide one image in another and with this will
get an output which we will store to perform decode operation on and then we'll decoded it to
get the hidden image

Fig 2.2 High level design

● The entire network architecture is surprisingly similar to Аutо Encoders. In generаl,


аutо-encoders were built to restore the input after a series of alteration. By following
measures , they get to know аbоut the feаtures оf inрut distributiоn.
● In this following case we are working with a slight different architecture . Instead of
simply reproducing images, it is focusing on the hiding part of image as well as
reproducing an another image.
● The complete framework consists of 3 Parts:
1. The Prepare Network
2. The Hide Network
3. The Reveal Network.
● The Prepare Network clutches in the secret image, and develope it. The Hide Network
clutches in the Output of the Prepare network as well as the Cover Image. These two
inputs are first concatenated across the Channels Axis. The Hide Network mostly outputs
an image, which is the Hidden Image. This is the Image that contains the Secret, but
looks like the Cover.
● In order to get the Secret Image back, it needs to be passed to a Reveal Network. The
Reveal Network will output an Image, which looks like the Secret.

2.2 Low Level Design

Fig 2.3 Low level Design


Here basically we used a weighted L2 Loss_function with Adam optimiser for the training part
of the model. So Basically we are training the model with 100 epoch while the batch size which
we are using is of 2.

Here the function of loss is:

Here c and s are the cover and secret images respectively, and β is how to weigh their
reconstruction errors

To make sure that the network we are using do not plainly encode the secret image in the LSBs
, we are adding a small amount of noise to the output of the second network(eg. into the
generated container image) while training

After the training part , we divided the trained model into two part first one is hide network and
the second one is reveal network ( we removed noisy layer ). The hide network precise of two
inputs correlated to secret and cover image and one output while is correlated to the container
image.The reveal network clutches the container image as input and decode(reveals) the secret
image as output.

Here basically sender is the one using the hide network and the one receiver is using is Reveal
network.The receiver has all the access only to the container image.In addition to the normal
autoencoder hiding mechanism , we are also encrypting out secret image for the sake of
security. Therefore , Both sender and receiver gets a symmetric key for encrypting and
decrypting the shuffled secret image.The encryption is mostly executed by the sender on the
input secret image. Where as the decryption part is executed by the receiver on the final
decoded image.

In last the image are enhanced by applying Non-local means Denoising algorithm and Unsharp
Masking(USM) filter.
4. IMPLEMENTATION

3.1 Autoencoders

An autoencoder neural network is an unsupervised learning algorithm that applies


backpropagation, setting the target values to be equal to the inputs. Autoencoders are a way to
reduce the dimensions of our input into smaller representations. If anyone needs the initial data
they will have to reconstruct it from the compressed data. The aim of an autoencoder is to find
out a representation for a group of knowledge, typically for dimensionality reduction, by
training the network to ignore signal noise. They work by compressing the input into a latent
space representation, then reconstructing the output from this representation.

3.2 Working of Autoencoders

Fig 3.1 Autoencoders

3.3 Methodology

The methodology used in this project involves the implementation of an autoencoder via a
convolutional neural network with the help of the keras and tensorflow libraries in python, to a
large image dataset. The key idea here is to create a model, that is, the architecture and weights
that can transform any image into its corresponding latent space, a visually similar form of the
image that occupies far less memory than the original. This latent space serves as an encrypted
form of the image and can be transmitted to the other party via any public channel. On the other
side, the user should have the decoder model for the corresponding encoder, which, in the case
of this project is symmetric and the exact opposite of the encoder model. The entire process of
training this model is done in the following steps:
● Importing the dataset
● Cleaning the data
● Setting up the libraries
● Training the model using the conv2d, max pooling and upsampling functions
● Create the corresponding decoder model.
● Test against a subset of the dataset.

3.44Algorithm

The algorithm/methods that we have used are:

a) Conv2D
b) MaxPooling2D
c) UpSampling2D

a) Conv2D

Conv2D basically applies a mask to a 2Dimage, as per concepts it is very similar to blurring in
Computer Graphics. The prototype of a Sequoia task which implements a Conv2D is as follows:
void task Conv2D(in float A[M+U-1][N+V-1], in float H[U][V], out float C[M][N]); the input
image A is converted to output image C, and the convolution mask, H, according to the
expression given in Fig 3.2.

Fig 3.2 Conv2D


b) MaxPooling2D

It is a discrete process and is sample based. Aim of it is to downsample an input image or


matrix, to reduce its dimentionality assumptions to be made about features to be contained in
the sub-regions binned. This helps in overfitting by providing an abstracted form of
representation. It aslo kind of reduces the computational cost as it actually tries to reduce the
parameters for learning and providing basic translation invariance to the internal representation.
Max pooling is generally done by applying a max filter to (usually) non-overlapping subregions
of the initial representation.

c) UpSampling2D

It is the process in which 0 valued samples are inserted between original samples to kind off
increase the sampling rate. It adds spectral images to the real or rather original signal, which are
based on multiples of original sampling rate. In our system, we have done the upsampling using
the inbuilt Keras upsampling 2D method to increase the dimentionality for the feature vectors
for further more processing

CNN has always shown how it learns different real life structures that correspond to the
computational world or rather the logical features. The level of abstraction also gets increased
and upscales as we go deep into the networks.ConvNet is the solution to all these problems that
we mentioned above. It has a very good idea about the similarities or patterns that are seen of
natural images, and thus it can simply identify areas that are same or redundant and thus more
pixels can be hidden in there. The total space that we save here can hep us hide more and more
information. And the privacy layer drops in as the architecture and weights can be changed and
randomized, thus no one can get into the system to see what image is being processed as that
person won’t have same weights that we placed.
4. RESULT AND DISCUSSION
4.1 Implementation with Coding
4.2 Results

Input images with the first being cover image and the second one is thesecret image

Below is the hidden image which our algorithm developed


Below is the revealed image when the secret image is passed through decoder.
Graphs ( Loss Curves):

When Beta = 0.25 :

Fig 4.1 Graphs when beta = 0.25

When Beta = 0.75

Fig 4.2 Graphs when beta = 0.75

4.3 Mapping the results with problem statement and existing systems

Problems with Existing Methods


1. Right now there are many methods that can perform image steganography but they
also come with their own disadvantages
2. As we use ConvNet, we can differ the weights, but in those methods, decoding is
relatively simple as encoding is not randomized but is rather fixed
3. In our methods we have a free hand relatively if we count the amount of information that
can be hidden, but in other cases, hiding an image of the same resolution and size can turn
into a disaster as it can take a chunk out of the information making it very lossy.
4. Images have a lot of redundant data stored in them and many algorithms ot there dont
utilize this to full extent. Patterns found in images naturally should be used to overcome this.

The Solution — A Neural Network


CNN has always shown how it learns different real life structures that correspond to the
computational world or rather the logical features. The level of abstraction also gets increased
and upscales as we go deep into the networks.ConvNet is the solution to all these problems that
we mentioned above. It has a very good idea about the similarities or patterns that are seen of
natural images, and thus it can simply identify areas that are same or redundant and thus more
pixels can be hidden in there. The total space that we save here can hep us hide more and more
information. And the privacy layer drops in as the architecture and weights can be changed and
randomized, thus no one can get into the system to see what image is being processed as that
person won’t have same weights that we placed.

CONCLUSIONS

Thus we would like to conclude our beautiful work here. We made a new and unique
Convolutional Neural Network based ED architecture i.e. using autoencoders and decoders for
natural image steganography. Compared to other already present architectures and methods,
which only considered image in the form of a binary matrix like structure, our algorithm
directly takes in a image as a payload, performs Conv2D on it and encodes it robustly. This
thing that we have made in a team of five, we consider it to be pretty novel and we are among
the first, we should say to introduce such novelty in this sector. Various experiments with a large
dataset, with empirically examining them through various different statistics and loss curves,
have made it possible for us, to efficiently produce an output.

FUTURE WORK

The future of our project is bright as steganography can further be applied to videos too.. As our
architecture is dependent on an unsupervised learning method, it is not dependent on a particular type od
information. More forms of unlabelled data can be considered for our architecture to work on. Also it
can further be applied to audio too and the functionality of this piece of art can further be investigated.
Passwords can also be eliminated to face IDs in the future and steganography is going to help us achieve
this by encrypting and decrypting our images when the pass on the web, in the Big Data World!

References

[1] Muhammad, Khan, et al. "Secure image steganography using cryptography and image
transposition." arXiv preprint arXiv:1510.04413 (2015).

[2] Meidan, Yair, et al. "N-baiot—network-based detection of iot botnet attacks using deep
autoencoders." IEEE Pervasive Computing 17.3 (2018): 12-22.

[3] Kester, Quist-Aphetsi. "Image Encryption based on the RGB PIXEL Transposition and
Shuffling." International Journal of Computer Network & Information Security 5.7 (2013).

[4] Pu, Yunchen, et al. "Variational autoencoder for deep learning of images, labels and
captions." arXiv preprint arXiv:1609.08976 (2016).

[5] Krizhevsky, A. and Geoffrey E. Hinton. “Using very deep autoencoders for content-based
image retrieval.” ESANN (2011).
[6] M. Yousefi-Azar, V. Varadharajan, L. Hamey and U. Tupakula, "Autoencoder-based feature
learning for cyber security applications," 2017 International Joint Conference on Neural
Networks (IJCNN), 2017, pp. 3854-3861, doi: 10.1109/IJCNN.2017.7966342.

You might also like