European Journal of Scientific Research ISSN 1450-216X Vol.64 No.3 (2011), pp. 437-445 © EuroJournals Publishing, Inc. 2011 http://www.europeanjournalofscientificresearch.com
Fast Random Bit Encryption Technique for Video Data K. John Singh Assistant Professor (Senior), School of Information Technology and Engineering VIT University, Vellore, Tamil Nadu, India E-mail:
[email protected] R. Manimegalai Senior Professor, Department of Computer Science and Engineering Velammal Engineering College, Chennai, Tamil Nadu, India E-mail:
[email protected] Abstract One of the major issues in video data transmission over internet is the time involved in sending and receiving huge amount of data. The video data should be compressed to aid faster transmission over the network. Security is another important concern during video transmission. Heavyweight and lightweight encryption algorithms are used for secured video transfer over the internet. Heavyweight encryption algorithms are not adopted for mobile devices in wireless networks because encryption process takes more time. Lightweight encryption algorithms are employed in hand held devices, low power operating systems and low power wireless sensor networks because they take less time for encrypting video data [1]. In this paper, a Fast Random Bit Encryption method for encrypting video data is proposed. It is a lightweight encryption algorithm which takes video data from a compressed domain. The proposed algorithm takes very less time for encryption and it gives more security than all other existing algorithms. As the proposed solution employs multi-level encryption along with key encryption, the attacker cannot easily break this algorithm. In this paper, we have also done a comparative study of existing lightweight algorithms with heavyweight algorithms like AES and RSA. Our analysis shows that lightweight algorithms take less time than existing heavyweight algorithms.
Keywords: Advanced Encryption Standard (AES), Fast Random Bit Encryption (FRBE), One Time Pad, Blowfish, Elliptic Curve Cryptography (ECC), Bit Padding
1. Introduction With the advent of e-governance and e-commerce, there is a strong need and growing demand for fast and secured video data transmission. Because we need to transfer huge amount of information, the video data need to be encrypted to avoid security threats. Video encryption is classified into two categories, namely, traditional encryption and selective encryption. Traditional encryption algorithms encrypt the whole data and take more time to generate the cipher text. Algorithms such as AES and RSA are few examples for traditional encryption algorithms. Selective encryption algorithms encrypt
Fast Random Bit Encryption Technique for Video Data
438
only a portion of the data hence take less time to generate the cipher text. To address security issues heavyweight and lightweight encryption algorithms are employed during video transmission. Figure 1 illustrates the common computational steps involved in heavyweight encryption algorithms. Heavyweight algorithms need more memory due to huge amount of computation involved. But, they are secured when compared to lightweight algorithms. RSA and AES are some of the commonly employed heavyweight encryption algorithms for video data encryption. The steps involved in lightweight encryption algorithms are shown in Figure 2. Serpent, Blowfish, PGP, Twofish are few examples for lightweight encryption algorithms. In general, lightweight algorithms are faster in encrypting the video data due to selective encryption technique when compared to heavyweight algorithms [2]. Figure 1: General Stepts in Heavyweight Encryption
Figure 2: General Steps in Lightweight Encryption
The rest of the paper is organized as follows: The literature review is presented in Section 2. The proposed solution, Fast Random Bit Encryption (FRBE) algorithm is explained in Section 3. Section 4 presents the experimental results and Section 5 concludes the paper.
2. Related Work Ben et al [2] have presented a lightweight encryption technique for video sent through email. In [2], the user has to undergo the authentication process to access his/ her email data. This method works well for email authentication. However this method did not address key generation and key management related issues. An encryption scheme based on wavelet packet transform method is proposed in [3]. The methodology proposed in [3], encrypts only a portion of the data and thereby taking less time for generating the cipher text. As, the whole data is not encrypted, this solution is vulnerable to security threats. It has increased computational complexity when compared to other algorithms because the input video data should be converted into a wavelet form before encryption. Elliptic Curve Cryptography (ECC) is proposed by Yvonne in [4]. ECC uses 160 bit key which is shorter than the key used in other heavyweight algorithms like RSA. As the key size is smaller, data is encrypted quickly. This is the advantage of the solution proposed in ECC. But, the key can be
439
K. John Singh and R. Manimegalai
hacked easily because the size is small. Video streaming over wireless networks are vulnerable to privacy and malicious attacks. Twofish [5] was not patented and is free to use. The key size in Twofish algorithm is 256 bits and sixteen rounds of XOR operation is performed for encryption which leads to more computational steps. Hao Wang and Chong-wei Xu have studied lightweight and scalable encryption algorithm for streaming video over wireless networks [6]. Pretty Good Privacy (PGP) algorithm is mainly used for secured communication through an electronic environment [7]. Through this environment we can transfer text data easily. But it is very complex to transfer a video data over this environment because PGP takes more time for video data encryption. The algorithm proposed in [8], known as TEA (Tiny Encryption Algorithm), is vulnerable to brute-force attack due to limited steps involved. RC4 (Rivest Cipher 4) was good for Secured Socket Layer (SSL) security [10]. RC6 (Rivest Cipher 6) could be parameterized to support a wide variety of key sizes, word-lengths, and number of rounds [8, 6]. RC6 has higher time consumption.
3. Fast Random Bit Encryption The steps involved in the proposed solution are shown in Figure 3. Initially, the input video file is converted into compressed format using the tool, General Public License ZIP (GZIP), which yields lossless compression. Comparatively, encryption applied on compressed video data takes less time and thereby leads to high efficiency. In the second step, the compressed data is encrypted using the DES algorithm [3]. The key is divided into four parts and is encrypted with a random number. Since both sender and receiver can have same random number generator, key encryption solves key management and distribution problems. Bit padding is applied after encryption. In bit padding, we should add a single set-bit (‘1’) and many reset-bit (‘0’) with an encrypted data which gives an arbitrary sized data. Hash function MD5 (Message Digest) is applied to convert the data with an arbitrary size into a fixed length hash value. Then, the hash values generated are encrypted by using Salt algorithm [9]. It gives an intermediate encrypted data which is called as Salt. The Salt consists of a random bit which is used to generate the key using a key derivation function PBKDF2 (Password-Based Key Derivation Function) [9]. Next, the key is encrypted using a random number. Hence this method provides more security. Then, PKCS7 (Public-Key Cryptography Standards) padding is applied on the encrypted key.
Fast Random Bit Encryption Technique for Video Data
440
Figure 3: Fast Random Bit Encryption
3.1. Compression Compression compresses the video file using GZIP. This tool will compress the video data without changing its resolution. During video compression, the resolution and edges may likely to be changed which affects the quality. Therefore, the data should be carefully compressed without changing their basic qualities. 3.2. Encryption Compression is followed by encryption. The FileInputStream [13] is used to read the compressed video file. It reads the file bit by bit. Next the fetched file is encrypted using DES algorithm. This will form a block cipher. Then, bit padding is applied at the last block of the cipher. Normally bit padding is
441
K. John Singh and R. Manimegalai
applied with 128 bit block cipher. In this work, we employ bit padding with more than 128 bits. As explained earlier additional bits are added with the key to provide more security. After encryption, the file is stored in the buffer. For this we define an array with size 64. We can use this to write the output data. This process is repeated till we get the complete encrypted file. Encryption is divided into three phases. In the first phase, namely, video encryption phase, encryption is done with padding and salt algorithm. At the end of the first phase 64 bit key is generated using the salt algorithm, namely, PBKDF2 [9]. In the second phase, the key is divided into four parts with 24, 16, 16 and 8 bits and encrypted separately using random number. In the third phase, encryption is done using PKCS7 padding [10]. All phases are explained in detail in the next few subsections. 3.2.1. Video Encryption using Padding and Salt The FileInputStream is used to read the DES cipher such as raw byte of data. FileOutputStream is used for writing streams of raw bytes such as image data. Before start the encryption the video data has to be converted in to frames [11]. Each frame will be treated as an image. The DES encryption will be done for a block cipher. These block ciphers are converted to an arbitrary sized data using bit padding method. When we use bit padding method it will not pad all the bits instead it pads only a selected block of ciphers. So this method again forms a block cipher with few padded bit blocks. Then, hash method, MD5, is applied to convert arbitrary sized data into fixed length hash value [9]. Finally, salt method is applied to generate the key with random bits. 3.2.2. Key Encryption using Random Number As said earlier, in this work, the key is encrypted using random number. In general, when video data is sent over the network both the sender and receiver will have the same random number generator and we assume the same in this work. The generated key is divided into four parts as shown in Figure 4. Encryption of the key is done using XOR operation to each part separately [11, 12]. Finally, each part is decrypted and they are joined to get the original key. Figure 4: Key Segment during encryption using random number 24
16
16
8
3.2.3. Padding using PKCS7 In the phases first and second, the data and the key are encrypted selectively. In phase three these two are again padded in whole bytes using PKCS7 standard. Hence this gives the completed encrypted block cipher and key cipher. Here the decryption of key is very difficult, because its bytes are padded together.
4. Experimental Results and Analysis Table 1:
Comparison of heavyweight encryption algorithms and lightweight encryption algorithms with FRBE algorithm based on their encryption time
File Name
File size in bytes
tree.flv house.avi planet.flv boat.flv car.avi
16,702,513 18,423,294 18,866,018 33,304,295 731,125,010
Heavyweight Algorithms AES RSA 10 12 11 14 11 15 15 20 112 118
Encryption Time in Seconds Lightweight Algorithms PGP Twofish TEA RC4 9 7 6 6 10 7 6 7 11 8 7 6 13 10 9 9 98 102 95 90
RC6 5 6 6 9 92
FRBE 3 5 7 8 60
Fast Random Bit Encryption Technique for Video Data Table 2:
Comparison of heavyweight encryption algorithms and lightweight encryption algorithms with FRBE algorithm based on their CPU utilization ratio
File Name
File size in bytes
tree.flv house.avi planet.flv boat.flv car.avi
16,702,513 18,423,294 18,866,018 33,304,295 731,125,010
Table 3:
442
Heavyweight Algorithms AES RSA 31 33 33 37 35 39 48 51 54 59
CPU Utilization Ratio in % Lightweight Algorithms PGP Twofish TEA RC4 27 29 21 12 31 37 29 20 33 39 34 26 39 41 40 32 46 43 43 37
RC6 14 19 30 34 39
FRBE 10 16 18 22 30
Comparison of heavyweight encryption algorithms and lightweight encryption algorithms with FRBE algorithm based on the memory utilization
File Name
File size in bytes
tree.flv house.avi planet.flv boat.flv car.avi
16,702,513 18,423,294 18,866,018 33,304,295 731,125,010
Heavyweight Algorithms AES RSA 863 867 870 880 881 889 893 897 982 994
Memory Utilization in Mbytes Lightweight Algorithms PGP Twofish TEA RC4 844 849 864 782 871 859 871 778 878 864 875 828 888 866 894 834 972 941 938 906
RC6 795 818 821 829 927
FRBE 744 766 787 812 869
The existing algorithms and proposed algorithms are analyzed with the parameters like encryption time, CPU utilization ratio and memory utilization. From Table.1 we understand that the execution time of heavyweight algorithm and lightweight algorithms is greater than Fast Random Bit Encryption algorithm. In FRBE we have less computation steps. Here we are not repeating any step. But in heavyweight and lightweight we should repeat XOR operation in multiple times [13]. It takes more time. Moreover in FRBE we are using only compressed video which takes only less memory space. Table 2 presents the CPU utilization of heavyweight algorithm and lightweight algorithm is greater than the Fast Random Bit Encryption algorithm. From Table 3 we understand that the heavyweight algorithms and lightweight algorithms are taking more memory utilization also. The above results show that our proposed encryption method Fast Random Bit Encryption is taking less encryption time and CPU utilization than other lightweight algorithms [14, 15]. Moreover its memory utilization is also less than other algorithms. Because here we apply FRBE in compressed video and we are not repeating any steps. Figure 5: Comparison of existing algorithms and FRBE algorithm with encryption time
443
K. John Singh and R. Manimegalai Figure 6: Comparison of existing algorithms and FRBE algorithm with CPU utilization ratio
Figure 7: Comparison of existing algorithms and FRBE algorithm with memory utilization
Figure 5 shows the encryption time of FRBE and other existing algorithms. In FRBE we use only compressed video data which takes less memory space. FRBE consist of some intermediate steps. We are using these steps for intermediate cipher generation, key generation, key encryption and video cipher generation. But here we are not repeating any steps. It takes less time for encryption because of their less memory utilization (see Figure 7). The figures 5, 6, and 7 show that the new algorithm Fast Random Bit Encryption (FRBE) is optimized for good performance. Its encryption time is less than other lightweight and heavyweight algorithms. So it is faster than all other existing algorithms. To measure the performance of the proposed algorithm we used encryption time, CPU utilization ratio and memory utilization as parameters. Here the proposed method shows less CPU utilization and memory utilization because of compression.
5. Conclusions The heavyweight algorithms consume more time for encryption. Their resource utilization is high during the execution time. The lightweight algorithms consume fewer resources, so they consume only less time for execution. But they are not secured algorithms. When we send confidential video data over the network, security and speed are the two key factors. Considering these two key factors we
Fast Random Bit Encryption Technique for Video Data
444
introduced Fast Random Bit Encryption Method for fast and secured video transfer. If the key is encrypted along with the video data, attacker can not break the key easily. The analysis clearly shows that the proposed method has the advantage of increased security and speed that is this algorithm is more secure and fast, because it is integrated with compression and key encryption. Future Work In this method, encryption is performed from the compressed domain. That is separate mechanism is used for compression and encryption. In future, we plan to integrate both compression and encryption as a single algorithm which will give better compression ratio and encryption ratio. Moreover, in Fast Random Bit Encryption we use random bits for encryption which may be affected by random bit attack. The joint algorithm for compression and encryption can avoid this random bit attack also.
References [1]
[2]
[3]
[4] [5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
Axel Poschmann, Gregor Leander, Kai Schramm and Christof Paar, “New Light-Weight Crypto Algorithms for RFID”, IEEE International Symposium on Circuits and Systems, pp. 1843-1846, May 2007. Ben Adida, Susan Hohenberger and Ronald L. Rivest, “Lightweight Encryption for Email”, In Proceedings of the Steps to Reducing Unwanted Traffic on the Internet Workshop, pp. 93-99, August 2005. Dominik Engel and Andreas Uhl, “Secret Wavelet Packet Decompositions for JPEG 2000 Lightweight Encryption”, In Proceedings of IEEE International Conference on Acoustics, Speech and Signal Processing, vol. 5, pp. 465-468, May 2006. Yvonne Roslyn Hitchcock, “Elliptic Curve Cryptography for Lightweight Applications”, Thesis, Queensland University of Technology, pp. 70-72, December 2003. Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall and Niels Ferguson, “Twofish: A 128-Bit Block Cipher”, http://www.schneier.com/paper-twofish-paper.pdf, 15th june 1998. Hao Wang and Chong-wei Xu, “A New Lightweight and Scalable Encryption Algorithm for Streaming Video over Wireless Networks”, In Proceedings of International Conference on Wireless Networks, pp. 180-185, 2007. Yongcheng Li, Zhigang Chen, See-Mong Tan and Roy H. Campbell, “Security Enhanced MPEG Player”, In Proceedings of International Workshop on Multimedia Software Development, p.p 169-175, August 2002. David J. Wheeler and Roger M. Needham, “TEA, a tiny encryption algorithm”, In Fast Software Encryption – Proceedings of the 2nd International Workshop, Lecture Notes in Computer Science Springer, vol. 1008, pp.363-366, December 1994. A. S. Tosun and W. Feng, “A Lightweight Mechanism for Securing Multi-layer Video Streams”, In Proceedings of IEEE International Conference on Information Technology: Coding and Computing, pp. 157-161, April 2001. Anil Kr. Yekkala, Narendranath Udupa, Nagaraju Bussa and C.E. Veni Madhavan, “Lightweight Encryption for Images”, In Proceedings of IEEE International Conference on Consumer Electronics, pp. 1-2, January 2007. Susie Wee and John Apostolopoulos, “Secure Scalable Streaming and Secure Transcoding with JPEG2000”, In Proceedings of IEEE International Conference on Image Processing, vol. 1, pp. 205–208, September 2003. Simon Fong, “On Improving the Lightweight Video Encryption Algorithms for Real-time Video Transmission”, In Proceedings of IEEE third International on Communications and Networking, pp.1287-1293, August 2008.
445
K. John Singh and R. Manimegalai
[13]
Timothy E. Lindquist, Mohamed Diarra and Bruce R. Millard, “A Java Cryptography Service Provider Implementing One-Time Pad”, In Proceedings of IEEE International Conference on System Sciences, pp. 1-6, January 2004. Wang Li-feng, Niu Jian-wei, Ma Jian, Wang Wen-dong and Xiao Chen, “A Lightweight Video Encryption Algorithm for Wireless Application”, In Proceedings of Fifth IEEE International Symposium on Embedded Computing, pp.94-97, October 2008. Jiangtao(Gene) Wen, Michael Severa, Wenjum Zeng, Maximilian H. Luttrell and Weiyin Jin, “A Format-Compliant Configurable Encryption Framework for Access Control of Video”, IEEE Transaction on Circuits and Systems for Video Technology, vol. 12, no. 6, pp. 545-557, June 2002.
[14]
[15]