# Content and Privacy Protection in JPEG Images by Reversible Visual Transformation
## 2 Related Work  
The algorithms for privacy protection in JPEG images can be classified into two categories: (1) algorithms performed on bit stream (e.g., [2]), and (2) algorithms performed on the quantified DCT coefficients (e.g., [5; 6; 7; 8; 9; 10]). Since modifications of the code stream may change the format of compressed images, the decryption should be completed before decoding and a dedicated decoder needs to be equipped. By contrast, algorithms processed on the quantified DCT coefficients are more flexible and protected images can be decoded directly. Advanced encryption standard (AES) [17] is a classical and popular symmetric encryption algorithm, which was applied in a selective encryption of JPEG2000 in [2]. In the selective encryption algorithm, the bit stream is divided into different packets, and the most significant part of the entire packet data is encrypted by AES. This algorithm works effectively on JPEG2000, but it cannot be applied to JPEG images because of the different coding schemes. Nevertheless, AES can be applied in the encryption of JPEG images in another manner. The encryption is achieved by simply recognizing the JPEG code stream as common plaintext without focusing on the characteristics of JPEG. A series of operations such as byte substitution, row displacement, column mixing, round key addition and exclusive or are conducted on the plaintext. However, the visibility and the file size of JPEG images will be affected. Besides, it requires more time to encrypt an image with AES because of the complicated calculation process. Alternatively, quite a few algorithms have been proposed by utilizing the characteristics of the JPEG coding scheme to achieve privacy protection. These algorithms are processed on the quantified DCT coefficients, and the proposed algorithm also belongs to this category. Specifically, the file size increment should be controlled within an acceptable range while achieving content protection and security against attacks. The P3 algorithm [11] leverages sparsity and the high quality of JPEG images to divide a JPEG image into a public part and a secret part. The public part is exposed to the photo sharing service providers, while the secret part is encrypted and shared between the sender and the recipients. As a result, the two parts need to be stored separately, which introduces an extra cloud storage request for the secret part and complicates the file management system. In addition, the P3 algorithm only works on the whole-image level and it is inconvenient for users to select the protected regions. [PERSON]'s algorithm [12] allows users to select several regions of arbitrary shapes to be protected. The signs of the DCT coefficients in selected regions are modified to scramble the image and the auxiliary information for recovery is inserted into one or more application markers in the JPEG file header. Thus the privacy and its reversibility can be achieved. The data hiding approach is employed to avoid extra overhead to storage, but it causes a larger file increments compared with other algorithms. Both [PERSON]'s algorithm [7] and the algorithm based on false colors [18] modify the value of DCT coefficients to protect the sensitive information and record the difference for recovering. In [PERSON]'s algorithm, a cartoon mask is used to cover a human face by calculating the DCT coefficients of the mask and replacing the original ones. The original value of the DCT coefficients and the difference are embedded in the JPEG image. In the process, the sparse representation is used to find a more concise expression for each original image signal, so the cost of file storage can be decreased. Nevertheless, F5 steganography [19] or another JPEG steganography algorithm (e.g., [20]) is applied in the embedding operation, but the original JPEG images cannot be recovered completely. Similarly, a scalable scrambling algorithm operating in the DCT domain is proposed in [13] within the JPEG codec.