0% found this document useful (0 votes)
14 views

Video Encryption Algorithm and Key Manag

This document proposes a video encryption algorithm using block shuffling and key generation via the Faro perfect shuffle. It begins with an introduction to video encryption techniques and discusses their limitations for real-time applications. It then describes the Faro perfect shuffle algorithm and how it can be used to generate encryption keys in a non-random but secure manner. The proposed algorithm divides video frames into blocks, rotates the frames, generates keys from the Faro shuffle, and encrypts the frames by shuffling the blocks. Experimental results show the encryption scheme provides security against cryptanalysis while maintaining efficiency for real-time applications.

Uploaded by

sayyada.csepda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Video Encryption Algorithm and Key Manag

This document proposes a video encryption algorithm using block shuffling and key generation via the Faro perfect shuffle. It begins with an introduction to video encryption techniques and discusses their limitations for real-time applications. It then describes the Faro perfect shuffle algorithm and how it can be used to generate encryption keys in a non-random but secure manner. The proposed algorithm divides video frames into blocks, rotates the frames, generates keys from the Faro shuffle, and encrypts the frames by shuffling the blocks. Experimental results show the encryption scheme provides security against cryptanalysis while maintaining efficiency for real-time applications.

Uploaded by

sayyada.csepda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

S.Fahmeeda Sultana.et.al. Int. Journal of Engineering Research and Application www.ijera.

com
ISSN : 2248-9622, Vol. 7, Issue 7, ( Part -3) July 2017, pp.01-05

RESEARCH ARTICLE OPEN ACCESS

Video Encryption Algorithm and Key Management using Perfect


Shuffle
Sayyada Fahmeeda Sultana *, Dr. Shubhangi D C**
*(Department of Computer Science, PDA College Engineering, Kalaburagi, Karnataka
[email protected])
** (Department of Computer Science, VTU PG Center, Kalaburagi, Karnataka
[email protected])

ABSTRACT
Advancements in networking technologies like cloud computing have popularized applications like, Video-On
Demand (VOD), video conferencing, pay-per-view, video broadcast, etc, in all such applications, confidentiality
of the video data during transmission in network and during storage is extremely important. This necessitates
secure video encryption algorithms suitable for multimedia application because of the large data size and real
time constraint. Conventional encryption algorithms are designed for generic data, and as such, it does not
support many specific video application requirements. In the paper we propose a computationally efficient and
secure video encryption algorithm that makes encryption feasible for real-time applications without heavy
computational overhead and reduces key management by utilizing block shuffling technique. Block Shuffling
based video encryption with Faro IN OUT Shuffle and rotation, i.e., first image is rotated by an angle then key is
generated based Block size using Faro IN OUT perfect shuffle which is a perfect shuffling algorithm which is
isomorphic to random permutation. we will show that our proposed method provide more scrambling of image
then random permutation and no need to maintain long key file.
Keywords: Block Shuffling, Faro Perfect Shuffle, Key Management, Mean Squared Error, Peak Signal to Noise
Ratio, Pure Random Permutation, Structural Similarity Index Measure, Video Encryption

I. INTRODUCTION
Security is becoming escalating concern in Categorization of Video Encryption Algorithms
increasing multimedia defined world. With  Layered Encryption, in this technique videos
continuing development of network communications, frames are encrypted using DES, IDEA, AES,
fast advances in Internet technology, easily capturing RSA, etc. those techniques are not suitable for
of videos and cloud computing systems multimedia real time applications due to speed limitations
data are of importance for use more and more widely,  Selective Encryption, encrypt the bytes in frame
in applications such as video-on-demand, video that require more security to reduce
conferencing, broadcasting, etc. as it is closely computational complexities
related to many aspects of daily life, including  Permutation based Encryption, use scrambling of
education, commerce, entertainment, defense and frame to encrypt, random numbers are used as
politics. In order to maintain privacy or security key to scrambling process.
sensitive data need to be protected before The work is motivated to provide video security
transmission or storage. through block shuffling with key generated using
Authorized user only can get back the Faro IN OUT shuffle rather than random
original content using the decryption algorithm. permutation.
Encrypting, a block cipher might take an n-bit block
of plaintext as input and output a corresponding n-bit Random Permutation
block of cipher-text. Exact transformation is Random permutation a random ordering of a set of
controlled using a second input – the secret key. objects, i.e, a permutation valued random variable.
Decryption is similar, takes an n-bit block of cipher- The use of random permutations is often fundamental
text together with the secret key and outputs the to fields that use randomized algorithms such
original n-bit block of plaintext. Block-ciphers as coding theory, cryptography, and simulation.
examples are RC5, AES, DES, Blowfish, many more. Generation of a random permutation for a set of
In this case we use block shuffling in each frame to length n uniformly at random interval is generated as
perform encryption decryption is performed by re- sequence by taking a random number between 1 and
shuffling blocks back. n sequentially, ensuring no repetition, and

www.ijera.com DOI: 10.9790/9622-0707030105 1|Page


S.Fahmeeda Sultana.et.al. Int. Journal of Engineering Research and Application www.ijera.com
ISSN : 2248-9622, Vol. 7, Issue 7, ( Part -3) July 2017, pp.01-05

interpreting this sequence (r1, ..., rn) as the 𝐴𝑙𝑔𝑜𝑟𝑖𝑡𝑕𝑚 1: 𝐾𝑒𝑦 𝐺𝑒𝑛𝑒𝑟𝑎𝑡𝑖𝑜𝑛 𝑈𝑠𝑖𝑛𝑔 𝐹𝑎𝑟𝑜
permutation shown below equ. (1). 𝑃𝑒𝑟𝑓𝑒𝑐𝑡 𝑆𝑕𝑢𝑓𝑓𝑙𝑒
𝐼𝑛𝑝𝑢𝑡: 𝐹𝑟𝑎𝑚𝑒 𝑆𝑖𝑧𝑒 𝑀𝑋𝑁, 𝐵𝑙𝑜𝑐𝑘 𝑆𝑖𝑧𝑒 𝐵
𝑂𝑢𝑡𝑝𝑢𝑡: 𝐴𝑛 𝐴𝑟𝑟𝑎𝑦 𝑜𝑓 𝐼𝑛𝑡𝑒𝑔𝑒𝑟𝑠 𝐾
1,2,3, … . , 𝑛 𝑆𝑡𝑒𝑝 1: 𝐹𝑖𝑛𝑑 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝐵𝑙𝑜𝑐𝑘 𝑖𝑛 𝑓𝑟𝑎𝑚𝑒 ‘2𝑛’
(1)
𝑟1, 𝑟2, 𝑟3, … , 𝑟𝑛 𝑢𝑠𝑖𝑛𝑔 𝑓𝑟𝑎𝑚𝑒 𝑠𝑖𝑧𝑒 𝑎𝑛𝑑 𝑏𝑙𝑜𝑐𝑘 𝑠𝑖𝑧𝑒
𝑆𝑡𝑒𝑝 2: 𝐷𝑖𝑣𝑖𝑑𝑒 𝑛 𝑖𝑛𝑡𝑜 𝑡𝑤𝑜 𝑕 𝑎𝑙𝑣𝑒𝑠 (0, 1, . . . , 𝑛
Image Shuffler: Key Generation using Faro − 1, 𝑛, . . . , 2𝑛 − 1)
Perfect Shuffle 𝑆𝑡𝑒𝑝 3: 𝐼𝑛𝑡𝑒𝑟𝑙𝑎𝑐𝑒 𝑡𝑕𝑒 𝑑𝑖𝑣𝑖𝑑𝑒𝑑 𝑕 𝑎𝑙𝑣𝑒𝑠 𝑢𝑠𝑖𝑛𝑔
Perfect shuffle is a permutation of n 𝐼𝑛 𝑆𝑕𝑢𝑓𝑓𝑙𝑒 𝐼 (𝑛, 0, 𝑛 + 1, . . . , 2𝑛 − 1, 𝑛 − 1)
elements each shuffle produces a new permutation or 𝑆𝑡𝑒𝑝 4: 𝐴𝑝𝑝𝑙𝑦 𝑜𝑢𝑡 𝑠𝑕𝑢𝑓𝑓𝑙𝑒 𝑜𝑛 𝑂 𝑂𝑢𝑡 𝑠𝑕𝑢𝑓𝑓𝑙𝑒 (𝐼)
returns to a previous at some point the process would 𝑆𝑡𝑒𝑝 5: 𝑟𝑒𝑡𝑢𝑟𝑛 𝐾𝑒𝑦 𝐾 ← 𝑂, 𝐵
return to the original order. Moreover, there are n! set
of n elements. The key generated group generated
using Faro perfect shuffle is a non-random process.
There are two ways to perfectly shuffle using faro in
𝐴𝑙𝑔𝑜𝑟𝑖𝑡𝑕𝑚 2: 𝐹𝑟𝑎𝑚𝑒 𝐸𝑛𝑐𝑟𝑦𝑝𝑡𝑖𝑜𝑛 𝑢𝑠𝑖𝑛𝑔
and out shuffle. The process Key generation starts by
𝐵𝑙𝑜𝑐𝑘 𝑆𝑕𝑢𝑓𝑓𝑙𝑖𝑛𝑔
deciding the number of blocks in an image (natural
number - 2n blocks), both the methods cut the 𝐼𝑛𝑝𝑢𝑡 ∶ 𝐹𝑟𝑎𝑚𝑒 𝐹𝑖 𝑤𝑕𝑒𝑟𝑒 𝑖 = 1,2 … . . , 𝑛,
number 2n into half‟s and interlace perfectly. The in 𝐵𝑙𝑜𝑐𝑘 𝑆𝑖𝑧𝑒 𝐵, 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝐵𝑙𝑜𝑐𝑘𝑠 2𝑛
shuffle „I‟ leaves the original first block at second 𝑂𝑢𝑡𝑝𝑢𝑡 ∶ 𝑃𝑒𝑟𝑓𝑒𝑐𝑡𝑙𝑦 𝑆𝑕𝑢𝑓𝑓𝑙𝑒𝑑 𝐹𝑟𝑎𝑚𝑒 𝐹𝑖′
block position. The out shuffle „0‟ leaves the original 𝐹𝑜𝑟 𝑒𝑎𝑐𝑕 𝑖 = 1,2, … , 𝑛
first block on correct position. Let the blocks be 𝑆𝑡𝑒𝑝 1: 𝑅𝑖 → 𝑅𝑜𝑡𝑎𝑡𝑒 𝐹𝑖 (90° 𝑜𝑟 180°)
labeled (0, 1, . . . , n − 1, n, . . . , 2n − 1). After an in 𝑆𝑡𝑒𝑝 2: 𝑈𝑠𝑒 𝐴𝑙𝑔𝑜𝑟𝑖𝑡𝑕𝑚 1 𝑓𝑜𝑟 𝑘𝑒𝑦 𝑔𝑒𝑛𝑒𝑟𝑎𝑡𝑖𝑜𝑛
shuffle the order is (n, 0, n + 1, . . . , 2n − 1, n − 𝑆𝑡𝑒𝑝 3: 𝑈𝑠𝑒 𝐵𝑙𝑜𝑐𝑘 𝑆𝑖𝑧𝑒 𝐵 𝑡𝑜 𝑙𝑜𝑔𝑖𝑐𝑎𝑙𝑙𝑦 𝑑𝑖𝑣𝑖𝑑𝑒 𝑅𝑖
1). After an out shuffle, the order is (O , n, l, n + 𝑖𝑛𝑡𝑜 2𝑛 𝑏𝑙𝑜𝑐𝑘𝑠
l, . . . , n − 1,2n − 1). 𝑆𝑡𝑒𝑝 4: 𝐹𝑖′ ← 𝑃𝑒𝑟𝑓𝑜𝑟𝑚 𝐵𝑙𝑜𝑐𝑘 𝑆𝑕𝑢𝑓𝑓𝑙𝑖𝑛𝑔
The proposed algorithm use a combination 𝑏𝑎𝑠𝑒𝑑 𝑜𝑛 𝑏𝑙𝑜𝑐𝑘𝑠 𝑔𝑒𝑛𝑒𝑟𝑎𝑡𝑒𝑑 𝑖𝑛 𝑠𝑡𝑒𝑝3
of In and Out faro shuffles to generate a group, this 𝑢𝑠𝑖𝑛𝑔 𝐾𝑒𝑦 𝐾
group will be called the shuffle group and denoted (I,
0). Both of the methods preserve symmetry at the Decryption is analogies with encryptions provided
center (0 and 2n - 1, 1 and 2n - 2, etc.) are sent to the receiver of frames has the same degree of
symmetric positions about the center. Thus (I, 0) is a rotation, block size, order of faro shuffle.
subgroup of the centrally symmetric permutations.
This group is isomorphic to the Weyl group (The III. EXPERIMENTAL RESULTS
Weyl group is isomorphic to the group of In order to evaluate the performance of the
permutations [11]) Bn. Where 𝐵𝑛 is the hyper- proposed encryption scheme, The video data used for
octahedral group 𝐵𝑛 is the group of all permutations analysis have different motion characteristics and
w of kl, … , kn such that~ 4 = −w i for i = varying resolution with a frames rate of 25 fps. The
1. 2 … . , n. The order of Bn is n! 2n sample test video sequence include videos toy_plane,
Further, paper is organized as follows: Section bar_100, table_tennis, pond, etc. A good encryption
II, gives the proposed video encryption algorithm. procedure should be robust against all kind of
Experimental analysis of results showing the cryptanalytic, statistical, differential and brute-force
performance of proposed algorithms compared with attacks. Thus the histogram of the ciphered frame
other state of art method given in Section III. Lastly, must not be uniform with original frame to avoid
Section IV serves to present our conclusions and statistical attacks, and the key space must be large
ideas for future work related to this research. enough to avoid brute force attacks. Below show the
performance analysis of the proposed approach.
II. PROPOSED VIDEO ENCRYPTION
ALGORITHM 3.1 Histogram Analysis of Frames
The Proposed algorithm for video In proposed experiment the plain frame and its
encryption works on individual frames. Each frame corresponding ciphered frame histograms are shown
goes through Algorithm 1, Algorithm 2, all the in Fig. 1.
frames are combined to form an encrypted video.

www.ijera.com DOI: 10.9790/9622-0707030105 2|Page


S.Fahmeeda Sultana.et.al. Int. Journal of Engineering Research and Application www.ijera.com
ISSN : 2248-9622, Vol. 7, Issue 7, ( Part -3) July 2017, pp.01-05

Fig.2. Frame-by-frame numerical analysis of PSNR of


Fig.1. (a) Original Frame, (b) Encrypted Frame, (c) proposed method with Random Permutation
Decrypted Frame, (d) Color wise histogram of figure 1(a),
(e) Color wise histogram of figure 1(b), (f) Color wise The larger value of PSNR indicated more distorted
histogram of figure 1(c) frame. The proposed method provides higher PSNR
compare to Pure Random Permutation.
3.2 Numerical Analysis
For qualifying the visual distortion, the 3.2.2 SSIM and MSE Measure
visual results are illustrated in figure(1), we provide Structural Similarity Index of Ciphered frame with
in this section a numerical analysis of the proposed Original Frame the Structural Similarity (SSIM)
Block Shuffling algorithm with rotation and In out index is a method for measuring the similarity
Faro perfect shuffle to describe the scrambling effect between two images gives the formula for SSIM as in
on video frames in comparison with other state of art equ (3).
method of Random permutation on images. The 𝑆𝑆𝐼𝑀 𝑥, 𝑦
metric used in [8] to describe the scrambling effect 2𝜇𝑥 𝜇𝑦 + 𝑐1 (2𝜎𝑥𝑦 + 𝑐2 )
on video contents are peak signal-to-noise ratio = 2 (3)
𝜇𝑥 + 𝜇𝑦2 + 𝑐1 𝜎𝑥2 + 𝜎𝑦2 + 𝑐2
(PSNR), the Structural Similarity measure Where 𝜇𝑥 → 𝑡𝑕𝑒 𝑎𝑣𝑒𝑎𝑟𝑔𝑒 𝑜𝑓 𝑥, 𝜇𝑦 →
index(SSIM) and MSE Mean Squared Error. These
𝑡𝑕𝑒 𝑎𝑣𝑒𝑎𝑟𝑔𝑒 𝑦,
computations allows us to efficiently describe the 𝜎𝑥 , 𝜎𝑦 𝑎𝑛𝑑 𝜎𝑥𝑦 𝑎𝑟𝑒 𝑣𝑎𝑟𝑖𝑎𝑛𝑐𝑒 𝑜𝑓 𝑥, 𝑣𝑎𝑟𝑖𝑎𝑛𝑐𝑒 𝑜𝑓 𝑦 𝑎𝑛𝑑
losses in quality (PSNR) measured in dB and in
𝑐𝑜𝑣𝑎𝑟𝑖𝑎𝑛𝑐𝑒 𝑜𝑓 𝑥, 𝑦, 𝑟𝑒𝑠𝑝𝑒𝑐𝑡𝑖𝑣𝑒𝑙𝑦.
structural coherence (SSIM) 𝑐1 = (𝐾1 𝐿)2 , 𝑐2 = (𝐾2 𝐿)2 : two variables to stabilize
the division with weak denominator; L the dynamic
3.2.1 Peak Signal to Noise Ratio (PSNR) range of the pixel-values (typically this is
PSNR is the ratio between the maximum
2𝑁𝑜 .𝑜𝑓 𝑏𝑖𝑡𝑠 /𝑝𝑖𝑥𝑒𝑙 − 1 );𝐾1 = 0.01 and 𝐾2 = 0.03 by
possible power of a signal and the power of
default.
corrupting noise that affects the fidelity of its
3.2.3 Mean Squared Error (MSE) :
representation. Because many signals have a very 1 𝑛
wide dynamic range, PSNR is usually expressed in 𝑀𝑆𝐸 = (𝐹𝑖′ − 𝐹𝑖 )2 (4)
𝑛 𝑖=1
terms of the logarithmic decibel scale shown in
equ(2).
where n is the number of pixels in a frame
𝑃𝑆𝑁𝑅 𝑭′𝒊 , the encrypted frame, and 𝑭𝒊 the original
(𝑀𝑎𝑥 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑝𝑖𝑥𝑒𝑙 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝐼𝑚𝑎𝑔𝑒)2 frame
= 10𝑙𝑜𝑔10 (2)
𝑀𝑒𝑎𝑛 𝑆𝑞𝑢𝑎𝑟𝑒𝑑 𝐸𝑟𝑟𝑜𝑟
In Fig. 2, we use PSNR to compare the Fig. 3. Shows the comparison of SSIM and MSE for
scrambling effect of our proposed method of “Block proposed method with Pure Random Permutation
Shuffling with rotation and key generated using IN
out group” with frames scrambled using random
permutation.

www.ijera.com DOI: 10.9790/9622-0707030105 3|Page


S.Fahmeeda Sultana.et.al. Int. Journal of Engineering Research and Application www.ijera.com
ISSN : 2248-9622, Vol. 7, Issue 7, ( Part -3) July 2017, pp.01-05

4 0.061489
2 0.285943
1 1.114790

Fig. 3. SSIM for Proposed method with Pure Random


Permutation

Fig. 5. Encryption time of different encryption


algorithms
Fig. 4. MSE for Proposed method with Pure Random Key Management:
Permutation
The proposed method uses the key as block
size, key generation pattern, angle of rotation of
Proposed method provides SSIM closer to
image which takes far smaller amount of memory
zero then Pure Random Permutation, and Higher
then Pure Random Permutation method which
MSE by this we can say that the proposed method
requires a text file to be maintain for each video to
provides more scrambling of image then Random-
store key. The file size will increase as the number
permutation.
of blocks increases. But our proposed method
provide high level of security without the need to
3.2.4 Other Consequences of Encryption with
maintain text file. The proposed method is more
other state of art methods
suitable for real-time application.
Time:
Time taken to encrypt a frame of size
128x128 pixels with different block sizes is shown IV. CONCLUSION AND FUTURE WORK
in Table 1. A Comparison of encryption time of In this paper, in contrast to the conventional
our proposed method with other state of art system of Pure Random permutation, we proposed a
methods is given in Fig. 5. It can be observed that Block Shuffling based video encryption with Faro IN
the smaller the block size more secure will be the OUT Shuffle and rotation, i.e., first image is rotated
image so using 2 pixels per block encryption time by an angle then key is generated based Block size
per frame of size 256 pixels the proposed using Faro IN OUT perfect shuffle which is a perfect
encryption algorithm took 0.252779 seconds, shuffling algorithm which is isomorphic to random
which is less than that of other techniques permutation. Further we showed that our proposed
Blowfish, Rijndael, DES [6] for an image with 256 method provide more scrambling of image then
pixels. This makes our algorithm more suitable for random permutation. Future enhancement to the
real-time video encryption. proposed approach can be done by compressing the
video.
Table 1. Time to Encrypt frame with different block
sizes REFERENCES
Block Size Frame (128 X 128) [1] Jian Zhang, Xuling Jin, “Encryption System Design
(pixels per pixels Encryption Based on DES and SHA-1”,11th International
Symposium on Distributed Computing and
block) Time in seconds Applications to Business, Engineering & Science, IEEE
64 0.002628 2012.
32 0.003354 [2] Shiguo Lian, Dimitris Kanellopoulos, and Giancarlo
16 0.039413 Ruffo, “Recent Advances in Multimedia Information
System Security”, International Journal of Computing
8 0.016458 and Informatics, Vol. 33, No.1, 2009, pp. 3-24.

www.ijera.com DOI: 10.9790/9622-0707030105 4|Page


S.Fahmeeda Sultana.et.al. Int. Journal of Engineering Research and Application www.ijera.com
ISSN : 2248-9622, Vol. 7, Issue 7, ( Part -3) July 2017, pp.01-05

[3] Shiguolian,“Multimedia Content Encryption


Algorithms and Application”, CRC Press 2008.
[4] C. Narsimha Raju, Ganugula Umadevi, Kannan
Srinathan and C. V. Jawahar, “Fast and Secure Real-
Time Video Encryption”, Sixth Indian Conference on
Computer Vision, Graphics & Image Processing, IEEE,
2008, PP.No. 257-264
[5] Mrinal Paliwal, Saddam Hussain, “Selective Video
Encryption using Bit XOR Technique”, International
Journal for Innovative Research in Science &
Technology-Volume 2, Issue 1, June 2015, PP. No.
177-183
[6] Simon Fong, Yang Hang, “On Improving The
LightWeight Video Encryption algorithms for Real
Time Video Transmission”, 3rd International
Conference on Communications and Networking In
China, IEEE 2008.
[7] B.Furht, D. Socek, and A M Eskicioglu, “Fundamentals
of Multimedia Encryption Techniques”, Multimedia
Security Hand book, CRC Press 2005.
[8] Abdel-karim, Al Tamimi, “Performance analysis of
Data Encryption Algorithm”,
http://www.cse.wustl.edu/jain/cse567-
06/ftp/encryption_perf/index.html, PP No. 1-13
[9] Jolly shah, Dr. Vikas Saxena, “Video Encryption: A
Survey”, IJCSI International Journal of Computer
Science Issues, Vol. 8, Issue 2, March 2011, PP.No.
525-534
[10] Cao Guang-hui, Hu Kai , Yang He and E Xu,
“Algorithm of Image Encryption based on Permutation
Information Entropy”, 3rd International Conference on
Computer and Electrical Engineering, 2010
[11] Persi diaconis, “The Mathematics of Perfect
Shuffles”,Advances In Applied Mathematics 4, 175-
196 ( 1983), PP. No. 175-196
[12] RamandeepKaur, Pooja, “A hybrid approach for video
steganography using edge detection and identical match
techniques”, International Conference on Wireless
Communications, Signal Processing and Networking
(WiSPNET), IEEE March 2016

International Journal of Engineering Research and Applications (IJERA) is UGC approved


Journal with Sl. No. 4525, Journal no. 47088.

Sayyada Fahmeeda Sultana. " Video Encryption Algorithm and Key Management using Perfect
Shuffle." International Journal of Engineering Research and Applications (IJERA) 7.7
(2017): 01-05

www.ijera.com DOI: 10.9790/9622-0707030105 5|Page

You might also like