Sie sind auf Seite 1von 6


Volume 6, No. 1, Jan-Feb 2015
International Journal of Advanced Research in Computer Science
Available Online at

Efficient and Secure Video Encryption and Decryption using Neural Network
Saraswati Singh Nilmani Verma
M.Tech. Scholar, CSE Department, Head, CSE Departments,
School of Engineering & IT, School of Engineering & IT,
MATS University, Raipur (C.G.), India MATS University, Raipur (C.G.), India

Vinay Kumar
Assistant Professor, ET&T Department,
Bhilai Institute of Technology,
Raipur (C.G.), India

Abstract: With the increase of multimedia data are transmitted in the various fields like commercial, video conferencing, medical image system
and military communication etc., which generally include some sensitive data. Therefore, there is a great demand for secured data storage and
transmission techniques. Information security has traditionally been ensured with data encryption and authentication techniques. Different
encryption standards have been developed where secrecy of communication is maintained by secret key exchange. In this paper we proposed the
video encryption algorithm for secure video transmission using permutation and doping function, thereby security of the original cipher has been
enhanced by addition of impurities to misguide the cryptanalyst. Since the encryption process is one way function, the artificial neural networks
are best suited for this purpose in decryption algorithm. The ANNs have many characteristics such as learning, generalization, less data requirement,
accuracy, ease of implementation, and software and hardware availability, which make it very attractive for many applications. Also need of key
exchange prior to data exchange has been eliminated. This paper presents video compression after encryption algorithms such that compressing
encrypted video can still be efficiently performed. In addition, this paper focuses the quality of video to make it efficient using enhancement

Keywords: Artificial neural networks, Back propagation algorithm, Encryption, Decryption, Cipher and Decipher, Normalization, Lossless
compression, Enhancement.

because of the relative slow speed, complex and less secure

I. INTRODUCTION using symmetric key. M. Abomhara, Omar Zakaria and
Othman O. Khalifa [8] [3] have presented a comparative
Today, cryptography is a cornerstone of the modern study of different video encryption algorithm. Ajay
security technologies used to protect information on both Kulkarni, Saurabh Kulkarni, Ketki Haridas and Aniket More
open and closed networks. It uses mathematical techniques [6] made a safely exchange confidential videos by an
related to aspects of information security such as innovative encryption algorithm for videos compressed
confidentiality, data integrity, entity authentication, and data using H.264.
origin authentication [1]. The encryption algorithm transmits It shuffles the video frames along with the audio to
the video securely over the network so that no unauthorized maintain a balance between security and computational time
user can able to decrypt the video. The challenge in and then AES is used to selectively encrypt the sensitive
multimedia applications is the transport services to media video codewords. Amit Pande, Joseph Zambreno & Prasant
such as text, image and video with limited bandwidth and Mohapatra [7] proposed chaos-based for Joint Video
huge data size. With the huge demand for bandwidth due to Compression and Encryption (JVCE) to reduce the
the large data transmitted in multimedia applications, it computational complexity of video compression, as well as
becomes necessary to apply compression technique on provide encryption of multimedia content for web services.
transmitted data. This approach is recently used which may be fast as
Through years, different encryption algorithms have compared to Compression Followed by Encryption (CE) and
been developed based on symmetric key encryption and Encryption Followed by Compression (EC) but procedure is
asymmetric key encryption were highlighted and evaluated complicated. Some of papers are presented
with respect to their security level and encryption speed. encryption/decryption technique using Neural Network
Most of the algorithms used are generic and there is need of because it plays a very important role in information
key to decrypt the multimedia data [2]. Dual approach of security. Khalil Shihab [9] have used neural network for
video compression & encryption is carried out in two encryption/decryption of text data and Saraswati D. joshi,
processes such as individual or independent compression Dr. V. R. Udupi [10] have used novel neural network
and encryption (i.e. either compression followed by approach for encryption/decryption of digital image. Also
encryption or encryption followed by compression) & Joint need of key exchange prior to data exchange has been
Compression and Encryption. Data encryption standard eliminated. There are trades offs when applying different
(DES) [5] has been proposed for main encryption standard. encryption algorithms and its choice depends on the
DES are generally not to be suitable for video encryption applications. However, many researchers have pointed out

© 2015-19, IJARCS All Rights Reserved 37

Saraswati Singh et al, International Journal of Advanced Research in Computer Science, 6 (1), Jan–Feb, 2015,37-42

the weaknesses of these methods such as either low security, technique. Here we are using the Brightness preserving Bi-
or low speed, or poor quality or stream size increases. Histogram Equalization (BBHE) technique [11] because it
This paper presents for video using one way gives better quality than other enhancement technique with
cryptography based on Artificial Neural Network. Neural less complexity [14]. As the size of video is very huge hence
network and cryptography together can make a great help in field of it focused on the compression technique [4] [13] so that
networks security. The objective of this paper to make an efficient and efficient use of transmission channel can be done.
secures video transmission and reception. Semantic block diagram of proposed approach is given
below in figure1. The proposed model is divided into four
II. ARTIFICIAL NEURAL NETWORKS USING modules- Enhancement, Encryption, Decryption and

Artificial Neural networks (ANN) [9] are simplified

models of the biological nervous system. An ANN, in
general, is a highly interconnected, massively parallel
distributed processing network with a large number of
processing elements called neurons in an architecture
inspired by the brain, which has a natural propensity for
storing experimental knowledge and making it available for
later use. Each neuron is connected to other neurons by
means of directed communication links each with an
associated weight. Each neuron has an internal state, called
its activation or activity level, which is a function of the
inputs it has received. Typically, a neuron sends its
activation as a signal to several other neurons. There are
several architectures in which the neurons can be connected.
Commonly neural networks are adjusted or trained, so that
specific input leads to specific target output. Figure 1: Architecture of Proposed Model.
The Backpropagation learning algorithm is one of the
well known algorithms in Neural Network. The introduction A. Enhancement module:
of back propagation algorithm has overcome the drawback The raw input video is fed to Enhancement module
of previous Neural Network where single layer perceptron which uses brightness preserving bi-histogram equalization
fail to solve a simple XOR problem. Hence multilayer feed (BBHE) technique to improve the quality of video for
forward (MLFF) networks with Back propagation learning human interpretation. BBHE method decomposes the
and non linear node functions are used to overcome these original video frame/image into two sub-images, by using
limitations. Multilayer feed forward network [MLFF] is the image mean gray-level, and then applies the Histogram
made up of multiple layers such as: input layer, output layer Equalization (HE) method on each of the sub-images then it
and intermediary layers called hidden layers. The output composes, and this method is applied in whole video frames.
from a Backpropagation neural network is computed using a It is mathematically shown that the BBHE method produces
procedure known as the forward pass, where input layer an output image with the value of brightness (the mean
propagates a particular input vector‟s components to each gray-level) located in the middle of the mean of the input
node in the middle layer. Middle layer nodes compute image and the middle gray-level (i.e., L/2).
output values, which become inputs to the nodes of the
output layer. And output layer nodes compute the network B. Encryption module:
output for the particular input vector. The forward pass In encryption module, enhanced video is encrypted by
produces an output vector for a given input vector based on using permutation-substitution method with impurity
the current state of the network weights. Since the network addition. There is no secret key on which a permutation is
weights are initialized to random values, it is unlikely that generated since the encryption process is one way function.
reasonable outputs will result before training. The weights There are following steps of encryption algorithm:
are adjusted to reduce the error by propagating the output Step1: Get the pixel value of the image file. [0000001] [1]
error backward through the network. This process is where Step2: Divide the pixel byte value into upper and lower
the Backpropagation neural network gets its name and is nibble [0000 and 0001].
known as the backward pass. The training set is repeatedly Step3: Exchange the nibbles and concatenate to form a byte
presented to the network and the weight values are adjusted [00010000].
until the overall error is below a predetermined tolerance. Step4: Calculate the impurity by EX-ORing the original
msnibble and lsnibble, [0001].
III. PROPOSED METHOD Step5: shift the bits of impurities by 5 bits to right. Now we
get 9 bit number [000100000]
The proposed method has been used compression after
Step6: EX-OR the results of step3 and step5 [000110000] =
encryption algorithm to transmit the video at faster rate with
high level security. In decryption algorithm, it used
Step7: Add impurity to the obtained result in step
Artificial Neural Network to decrypt the video frames which
6.Impurity Value chosen is 117, [48+117].
does not use any secret key hence there is no fear to hacking
Step8: Continue step1 to step7 for all the pixels of the video
of secret information. In addition focus the video quality to
make it better than the original video by using enhancement

© 2015-19, IJARCS All Rights Reserved 38

Saraswati Singh et al, International Journal of Advanced Research in Computer Science, 6 (1), Jan–Feb, 2015,37-42

Additional column required: way encryption based on multi-layer neural network have
Step9: Additional one column is added and the value of 117 presented, as shown in figure.2, which produces the hash
is added in that column. This is required for the value of the video data as input.
normalization of the matrix because after addition of 117 in The neural network is trained for standard mapping
pixel value it exceed the range of 256. value and the weights and biases are stored before applying
Table I shows the transformation of the sample pixel values input to it. Finally, the simulation results showed that after
after encryption. training the artificial neural networks.
Table 1: Sample of Encryption Result
Original Pixel Pixel Value after
Value Encryption
1 165
45 423
67 329
165 559
199 401
255 372
Figure 2: 3-Layer Feed Forward Network using Backpropagation
C. Compression module:
Huffman code method is used for the compression of
encrypted video frames; basically it is a lossless
compression method. There are the following steps for this:
Step1: Compression of encrypted video is performed by
Huffman coding.
Step2: Find the pixel value (i.e. intensity value) which is
Step3: Calculate the probability of each pixel value.
Step4: Probability of pixel values are arranged in decreasing
order and lower probabilities are merged and this step is
wi - weight matrix of the ith layer, f - activation function, bij - biasis of jth
continued until only two probabilities are left and codes are
neuron in ith layer
assigned according to rule that the highest probable symbol
will have a shorter length code. Figure 3: Neurons diagram
Step5: Further Huffman encoding is performed i.e. mapping
of the code words to the corresponding symbols will result IV. RESULTS AND DISCUSSION
in a compressed data. Thus a Huffman code tree is generated
and Huffman codes are obtained from labelling of the code MATLAB R2012a have used as a simulation
tree environment. „Uigetfile‟ function is use for loading and
Step6: At the receiving end, decompression of compress showing the input video sequence. The loaded video
encrypted image/video is performed by Huffman decoding. sequence is converted into frames using „move (k).cdata‟
Step7: Generate a tree equivalent to the encoding tree. function. Here figure.4 (a-d) show the result of the frames
Step8: Output the character encodes in the leaf and returns (15-18) is separated from the input video.
to the root, and continues until all the codes of Figure.5 (a-d) shows the result of enhanced frames,
corresponding symbols are known. which is better than the original video frames. The video
Step9: The original encrypted video is reconstructed i.e. quality is measured by parameters such as Image Brightness
decompression is done by using huffman decoding. Thus Mean (IBM) and Image Contrast Standard Deviation (ICSD)
result find in compressed encrypted video. for each original frame with their enhanced frames (figure 9
& 10).
D. Decryption module: Figure.6(a-d) shows the result of the encrypted video
In decryption algorithm, decrypt the compressed without key using one way function. Hence there is no fear to
encrypted video by Artificial Neural Network [12] which is hacking of secret information.
best suited for one way encryption. Also there is no need of Figure.7(a-d) shows the result of the compressed
key to decrypt the video. Where it is provides high level encrypted video without loss of video quality.
security because it‟s able to perform for non linear input- Finally figure. 8(a-d) shows the result of decrypted
output characteristics. MATLAB‟s neural network tool box frames thus the video frames are recovered in better quality.
is used for training and implementing. The system is
designed for three layers-input, output and hidden layers. A. Video quality analysis by parameters:
The input and output have only one neuron while in The quality of video file is measured by parameters
hidden layer the neurons can vary. Large number of neurons which are Image Brightness Mean (IBM) and Image Contrast
is required to achieving high security. The structure of the Standard Deviation (ICSD).Where image brightness mean
network NxMxN has been used with different numbers of should be either minimum or close to original video frame
hidden neurons M = 4, 6,9,16 and 25 etc. to select the best and image contrast standard deviation should be high for
structure for video encryption purpose; there is no certain better result. Figure.9 shows the graph between IBM and
method or approach to determine the best structure. One number of frames for input frames and enhanced frames and

© 2015-19, IJARCS All Rights Reserved 39

Saraswati Singh et al, International Journal of Advanced Research in Computer Science, 6 (1), Jan–Feb, 2015,37-42

figure.10 shows the graph between ICSD and number of [6] Ajay Kulkarni, Saurabh Kulkarni, Ketki Haridas and Aniket
video frames of input frames and enhanced frames. Thus the More, “Proposed Video Encryption Algorithm v/s Other
proposed method shows better result in terms of contrast of Existing Algorithms: A Comparative Study”, International
the enhanced video then original video and having better in Journal of Computer Applications (0975 – 8887) Volume
preserving the brightness of the enhanced video then original 65– No.1, pp.1-5, March 2013.
[7] Amit Pande, Joseph Zambreno & Prasant Mohapatra, “Joint
V. CONCLUSION Video Compression and Encryption using Arithmetic Coding
and Chaos”, IEEE Intl. Conf. on Internet Multimedia
Presented work discusses an efficient and secure video Systems Architecture and Application, 2010.
encryption and decryption. Proposed method uses the Neural [8] M. Abomhara, Omar Zakaria, Othman O. Khalifa, “An
Network to decrypt the video frames which does not use any Overview of Video Encryption Techniques”, International
secret key hence there is no fear to hacking of secret Journal of Computer Theory and Engineering, Vol. 2, No. 1,
information. A feed forward multilayer perceptron utilize pp. 103-110, February 2010.
Backpropagation algorithm that have been found to be
suitable for one way video encryption. The accuracy of the [9] Khalil Shihab, “a Backpropagation neural network for
system has been found very high. Result shows that the computer network security”, Journal of Computer Science
proposed algorithm not only successfully encrypt and vol. - 2 (9), pp.710-715, 2006.
decrypt the video but also give the video in better quality. It [10] Saraswati D. joshi, Dr. V. R. Udupi and Dr. D. R. joshi, “A
provides flexible, accurate and natural looking video frames. novel neural network approach for digital image data
However, this method ensures that every aspect of security is encryption/decryption”, IEEE International Conference on
maintained without sacrificing the quality of video for real- Power, Signals, Controls and Computation
time applications. (EPSCICON),pp.1-4, 3-6 Jan. 2012.

VI. REFERENCES [11] Yeong-Taeg Kim, “Contrast enhancement using brightness

preserving bi-histogram equalization”, IEEE Trans.
[1] William Stallings,” network security essentials, applications Consumer Electronics, vol. 43, no. 1, pp. 1-8, Feb. 1997.
and standards”, 4th edition Pearson Education India, 2007 - [12] Liew Pol Yee De Silva L.C,”application of multilayer
432 pages. perceptron network as a one way Hash function”, IEEE
[2] Francia G.A, “applied image processing to multimedia International Joint Conference on Neural Networks,vol.2,
information security”, IEEE International Conference on pp.1459-1462, May 2002.
Image Analysis and Signal Processing, pp. 104-107, 11-12 [13] Jagadish h. pujar and Lohit m. kadlaskar, “A new lossless
April 2009. method of image compression and decompression using
[3] B. Furht, D. Socek, and A. M. Eskicioglu, “Fundamentals of huffman coding techniques”, Journal of Theoretical and
Multimedia Encryption Techniques,” Multimedia Security Applied Information Technology, Vol.15, No.1, pp. 18-23,
Handbook, CRC Press, 2005. 2010.
[4] Shiguo lian, Multimedia Content Encryption: Algorithms [14] Vinay Kumar and Himani Bansal, “Performance Evaluation
and Application, CRC Press, 2008. of Contrast enhancement Techniques for Digital Images”
International Journal of Computer Science and Technology,
[5] Wayne G. Barker, “Introduction to the analysis of the Data
pp-23-27, Vol.-2, Issue-1, March 2011.
Encryption Standard (DES)”, Aegean Park Press, 1991.


Figure: 4(a), 4(b), 4(c) & 4(d)

© 2015-19, IJARCS All Rights Reserved 40

Saraswati Singh et al, International Journal of Advanced Research in Computer Science, 6 (1), Jan–Feb, 2015,37-42

Figure: 5(a), 5(b), 5(c) & 5(d)

Figure: 6(a), 6(b), 6(c) & 6(d)

Figure: 7(a), 7(b), 7(c) & 7(d)

Figure: 8(a), 8(b), 8(c) & 8(d)

© 2015-19, IJARCS All Rights Reserved 41

Saraswati Singh et al, International Journal of Advanced Research in Computer Science, 6 (1), Jan–Feb, 2015,37-42

Figure 9: Image Brightness mean (IBM) Figure 10: Image Contrast standard deviation

© 2015-19, IJARCS All Rights Reserved 42