Bitstream-Based JPEG Encryption in Real-time

Bitstream-Based JPEG Encryption in Real-time

Stefan Auer (Salzburg University of Applied Sciences, Salzburg, Austria), Alexander Bliem (Salzburg University of Applied Sciences, Salzburg, Austria), Dominik Engel (Salzburg University of Applied Sciences, Salzburg, Austria), Andreas Uhl (Department of Computer Sciences, University of Salzburg, Salzburg, Austria) and Andreas Unterweger (Department of Computer Sciences, University of Salzburg, Salzburg, Austria)
Copyright: © 2013 |Pages: 14
DOI: 10.4018/jdcf.2013070101
OnDemand PDF Download:
No Current Special Offers


The authors propose a framework to encrypt Baseline JPEG files directly at bitstream level, i.e., without the need to recompress them. The authors’ approach enables encrypting more than 25 pictures per second in VGA resolution, allowing real-time operation in typical video surveillance applications. In addition, their approach preserves the length of the bitstream while being completely format-compliant. Furthermore, the authors show that an attack on the encryption process, which partly relies on AES, is practically infeasible.
Article Preview


The encryption of compressed images to ensure privacy is an active research topic for a variety of different compressed image and video formats. For JPEG-compressed images (International Telecommunication Union, 1992) in particular, several approaches exist due to the widespread use of this image format. Most of them require recompressing the original data to some extent. The method proposed in this paper operates on bitstream level and uses only swap and scramble operations, which makes it very fast.

A number of approaches have been proposed which do either not preserve the length of the original file or break format compliance. These include techniques such as zig zag permutation (Kailasanathan, 2002; Tang, 1996), which significantly increases the file size, and the use of permuted Huffman tables (Wu & Kuo, 2000). Similarly, DC bit plane scrambling as proposed for example by Khan, Jeoti, and Kahn (2010) increases the file size and is therefore not length preserving as opposed to our approach.

In terms of simple length-preserving encryption algorithms on DCT-based images and videos, pseudo-randomly toggling DC and/or AC coefficient signs as proposed for example by Potdar, Talele, and Gandhe (2009), or Bhargava, Shi, and Wang (2003) is frequently used. However, the attack complexity for breaking such themes is significantly lower than in our approach as we encrypt multiple bits per coefficient instead of only one (the sign bit).

Similarly, encrypting a limited number of bits on bitstream level starting from the DC coefficient (Puech & Rodrigues, 2005) or the high-frequency AC coefficients (Puech & Rodrigues, 2007), respectively, is of lower security as compared to the proposed approach which encrypts all coefficients and additionally increases the complexity by reordering blocks. The technique of reordering all blocks within a picture, which is used as part of our approach in a spatially limited fashion, has already been proposed in Ye, Zhengquan, and Wei (2006), Lian, Sun, and Wang (2004) and Niu, Zhou, Ding, and Yang (2008) and analyzed in Wen, Severa, Zeng, Luttrell, and Jin (2002) and others. Although it increases the total attack complexity depending on the picture size, it does not allow for RoI encryption without a significant decrease in attack complexity, as opposed to our approach.

In terms of code-word-based techniques such as the one we propose, only a small number approaches have been published. Besides swapping code words of equal length between blocks for AC value histogram spreading as proposed in Yang, Zhou, Busch, and Niu (2009), a method to shuffle code words with the same in-block position between blocks exists for MPEG-4 (Wen et al., 2002) which could also be applied to JPEG pictures. However, the latter approach may yield non-format-compliant bitstreams and both methods are not intended to be used for RoI encryption as opposed to our approach.

Another method described in Wen et al. (2002) encrypts multiple concatenated VLC (Variable Length Code) symbols and maps them to another string of valid VLC symbols so that the total length is preserved. Note that this approach, which has been applied to MPEG-4 bitstreams, cannot be used for JPEG as, in the latter, each Huffman code word is followed by a signed coefficient residual represented by a number of bits which is encoded in the Huffman code word. Changing the code words in a length-preserving way changes the number of coefficient bits encoded in the Huffman code word as opposed to the actual subsequent bits in the bitstream, making the bitstream parser get out of sync and thus breaking format compliance.

Complete Article List

Search this Journal:
Volume 13: 6 Issues (2021): 2 Released, 4 Forthcoming
Volume 12: 4 Issues (2020)
Volume 11: 4 Issues (2019)
Volume 10: 4 Issues (2018)
Volume 9: 4 Issues (2017)
Volume 8: 4 Issues (2016)
Volume 7: 4 Issues (2015)
Volume 6: 4 Issues (2014)
Volume 5: 4 Issues (2013)
Volume 4: 4 Issues (2012)
Volume 3: 4 Issues (2011)
Volume 2: 4 Issues (2010)
Volume 1: 4 Issues (2009)
View Complete Journal Contents Listing