Reversible Data Hiding in Encrypted Images Based on Bit plane Compression of Prediction Error
Youqing Wu, Wenjing Ma, Yinyin Peng, Ruiling Zhang, Zhaoxia Yin
IIEEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY 1
Reversible Data Hiding in Encrypted Images Basedon Bit plane Compression of Prediction Error
Youqing Wu, Wenjing Ma, Yinyin Peng, Ruiling Zhang, Zhaoxia Yin,
Member, IEEE
Abstract —As a technology that can protect the information onthe original image of being disclosed and accurately extract theembedded information, the reversible data hiding in encryptedimages (RDHEI) has been widely concerned by researchers.One of the current challenges is how to further improve theperformance of the RDHEI method. In this paper, a high-capacity RDHEI method based on bit plane compression ofprediction error is proposed. Firstly, the image owner calculatesthe prediction error of the original image, next rearrangesand compresses the obtained bit plane of prediction error, soas to reserve the room for embedding information, and thenuses the encryption key to encrypt the prediction error aftervacating the room. The information hiding device encrypts theadditional information by the information hiding key, and embedsadditional information into the encrypted image. Finally, theimage receiver extracts the additional information and recoversthe image according to the acquired key. This paper makes fulluse of the correlation between neighboring pixels and obtainshigh capacity. Experimental results show that this method canprovide higher embedding capacity than state-of-the-art methods.
Index Terms —reversible data hiding, encrypted images, pre-diction error, bit plane compression , high-capacity.
I. I
NTRODUCTION I N the past decades, with the increasing demand for infor-mation security, reversible data hiding(RDH) technology[1]–[4]have been widely studied. Reversible data hiding canrestore the embedded information and the original carrier with-out loss. That is to say, the reversible data hiding technologycan not only embed and extract the additional information, butalso restored the carrier to the original state. At present, manyreversible data hiding methods have been proposed, whichcan be divided into three categories according to differenttechnologies: (1) lossless compression [5]–[7]. (2) differenceexpansion [8]–[10]. (3) histogram shifting [11]–[16]. As thedemand for privacy and data security continuously strengthen,the wide application of encryption algorithm makes the signalprocessing of encrypted domain generalised. This applicationprovides a good platform for reversible data hiding in theencrypted domain, at the same time, puts forward a newchallenge: carrier of encrypted domain lost the expressly
This research work is partly supported by National Natural Science Foun-dation of China (61872003, U1636206).Wenjing Ma, Yinyin Peng, Ruiling Zhang and Zhaoxia Yin are withthe school of Anhui Province Key Laboratory of Multimodal CognitiveComputation, School of Computer Science and Technology, Anhui University,Hefei 230601, China, e-mail: [email protected] Wu is with the school of Computer Science and Technology, HefeiNormal University, Hefei 230601, P. R. China.
Corresponding author: Zhaoxia Yin. structure redundancy, cause traditional reversible data hidingalgorithm failed to apply for encrypted domain.To meet this challenge, reversible data hiding in encryptedimages (RDHEI) [17]–[20] are proposed and developed inrecent years. RDHEI method is gradually divided into twodifferent types: vacating room after encryption (VRAE)[21]–[24], reserving room before encryption (RRBE) [25]–[29]. The VRAE method vacated room for embedding afterencryption. Zhang et al. proposed a block-splitting method forthe encrypted image in [21]. By flipping three Least Signif-icant Bit(LSB) of pixels in the block, additional informationcan be embedded and extracted. Although this method canextract the information and restore the image, it may produceerrors in some regions. In order to improve this method,Hong et al. in [30] proposed a spatial correlation and edgematching mechanism between adjacent blocks to reduce theerror rate in the recovery stage. Recently, an adaptive codingmethod has been proposed in [22] and applied to RDHEI.The adaptive coding method is used to compress the MostSignificant Bit(MSB) of the encrypted image to vacate theroom for embedding information. These methods make useof the correlation between the pixels of the encrypted imageto vacate room for embedding information. Although theinformation can be extracted and the original image can berestored, insufficiencies such as low embedding capacity andbit error rate in the information extraction or image recoverystage also existed.Embedding capacity is an important indicator to measure theperformance of RDHEI. To further improved the embeddingcapacity, Ma et al. in [25] put forward a RDHEI methodof reserving room before encryption for the first time. TheRRBE method combined the traditional method of RDH andencryption methods well. Using the traditional RDH methodto reserve room before encryption, so that the reserved roomcan be used for embedding information. This method can notonly protect the original image information on being leaked,but also realize the real reversibility. Then, many methods areproposed to improve the performance. Zhang et al. proposeda RDHEI method combining the prediction error histogramwith encryption in [31], which embedded information in theprediction error histogram. In [32], the MSB of the pixelis predicted to mark, so as to reserve the room where theinformation can be embedded. This method uses the MSBwhich is easier to prediction instead of LSB for a RDHEI,and obtains a high capacity. Recently, Qiu et al. proposed aRDHEI method in [33] that utilizes reversible integer trans-formation to generate data redundancy, embedding informationin the encrypted redundancy position. These methods greatly a r X i v : . [ c s . MM ] J u l EEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY 2 improve the embedding capacity and provide more embeddingspace for additional information.In recent years, some high-capacity RDHEI methods usepredicted value are proposed. Yi et al. in [28] proposed amethod of parameter binary tree label, pixels with differentrange prediction error are marked in the image respectively,and then information hiding is carried out in the reservedroom of marker pixels, so as to obtain a high embeddingcapacity . In [34], compare the binary form of the originalpixel and the predicted value, Then, record the number of thesame bits from MSB to LSB and encoding it with Huffmancoding. Finally, the reserved room in MSB is substituted byadditional information. In [29] Wu et al. divided images intoLSB images and MSB images, and embedded LSB imagesinto MSB images by using histogram translation of predictionerror, so as to embed information in LSB.Among the aforementioned methods, the embedding ca-pacity is improved by exploiting the spatial redundancy ofthe original image. This indicates that finding a suitablecarrier with higher redundancy is very important to improvethe performance of RDHEI method. Of course, it is alsoimportant to make the most of these redundancies. Basedon this, this paper puts forward a RDHEI method based onbit plane compression of prediction error. It not only selectsthe prediction error with high redundancy as the compressioncarrier, but also proposes a joint compression algorithm, thisalgorithm can reserve more room to improve the embeddingcapacity of RDHEI method.In this paper, firstly, the prediction error bit planes is losslesscompressed, and the compressed bit stream is connected tothe uncompressed bit stream of bit plane to reserve room inLSB planes. Then the compressed image is encrypted using astream cipher to prevent the information from leaking. Next,the information hiding device can embed the additional infor-mation into the reserved room of the encrypted image. Finally,the image receiver can extract the additional information andrecover the original image. The experimental results show thatthis method greatly improves the embedding rate of RDHEI.This paper has the following two contributions: . A joint compression algorithm on bit plane compressionis proposed in this paper. This compression algorithm combinethe Huffman coding and run-length coding well, with thismethod, the bit plane can be compressed efficiently. . A RDHEI method based on bit plane compression ofprediction error is proposed. This method make well use of thecorrelation between adjacent pixels, obtains a higher capacitycompared with state-of-the-art RDHEI methods.The rest of this paper will be introduced from the followingaspects: Section II introduced the joint compression algorithmfor bit plane reconstruction. The detailed description of theRDHEI method based on the bit plane compression of pre-diction error is shown in Section III. Section IV analyzed theexperimental results. Finally, Section V summarized the wholepaper. II. B
IT PLANE COMPRESSION ALGORITHM
To take advantage of the spatial redundancy of the image,this paper proposes a joint bit plane compression algorithm.
TABLE IH
UFFMAN CODING RULE WHEN L fix = 3 AND L run = 5 Bit string 001 010 011 100 101 110Huffman coding 011 010 101 00 11 100For the carrier image with high redundancy, the adjacent bitsof the bit plane are often the same, compress the bit streamof bit plane can reduce the room occupied by the originalcarrier image information, thus providing room for additionalinformation.The carrier image can be divided into eight bit planes, andeach bit plane has its corresponding bit stream. In this paper,a compression algorithm combining Huffman coding and run-length coding is adopted to compress these bit streams. Theconcrete compression algorithm is introduced in Section II-A.Section II-B introduced the special treatment of compressionalgorithm.
A. Joint compression algorithm
The bit plane bit stream of the carrier image with highredundancy contains many bit strings of the same bit. By com-pressing the bit stream, more room is reserved for embeddinginformation. We define the length of bit string as L , compare L with a predefined parameter named L fix , if L ≥ L fix , treatthe current bit string as a long bit string, otherwise, regardthe current bit string as a short bit string. In the bit streamcompression algorithm, the short bit string are compressed byHuffman coding, while the long bit string are encoded by run-length encoding. The compression algorithm is described asfollows:Case1: When L < L fix , it is judged as a short bit string,and the Huffman coding is adopted. The encoding consistsof two parts: the prefix L pre and the L fix bits starting fromthe head of current short bit string. L pre is the flag bit, and L pre = 1 means that the current bit string is a short code word,compress it with Huffman coding. As for the L fix bits, recordthe occurrence probability of each bit string, and encodingthese bit strings with Huffman coding. The Huffman codingproposed in Section II-A is used to compress.Case2: When L ≥ L fix , it is determined to be a long bitstring, and the run-length coding is adopted. The run-lengthcoding consists of three parts: the prefix L pre , the middle part L mid and the suffix L tai . L pre is the flag bit, equal to (cid:48) (cid:48) means it is a long code word. L mid is represented L run bitsbinary form of L , L run is a predefined positive integer. If L run = 4 and L = 10 , then L mid = (1010) ; The suffix L tai is represented by (cid:48) (cid:48) or (cid:48) (cid:48) to represent its repeating bit.Coding in sequence until traversing the entire bit stream.Taking a part of bit stream as an example, the bit streamwith the length of 23 is ’00000000000000000101010’. When L fix = 3 and L run = 5 , the corresponding Huffman codingTable is shown in Table I. Combined with the Huffman codingtable in Table I, the specific compression of bit stream is asAlgorithm 1.After the compression algorithm, the bit stream is com-pressed into ’01000101111010’, whose length is 14. Obvi- EEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY 3
Algorithm 1:
The Proposed compression algorithm
Input: original bit stream BO block size n predefined parameter L fix predefined parameter L run Output: compressed bit stream BC Computes the length L of current bit string while (BO != NULL) if ( L ≥ L fix ) L pre = 0 ; L mid = ( L ) ,a total of L run bits; L tai = (cid:48) (cid:48) or (cid:48) (cid:48) , reprents the repeat bits; else L pre = 1 ; select L fix bits from the head of a short bit string,then encoding it with corresponding Huffman coding; Finally, connect all of the compressed bit strings andgenerate the compressed bit stream BC ; return BC ;ously, the length of compressed bit stream is less than thelength of the original bit stream, so compress the bit stringcan reserve room for embedding information. B. Special treatment on compression algorithms
A joint bit plane compression method is obtained by specialprocessing of Huffman and run length coding. As Table IIis shown, when compress Lena with Huffman coding, Run-length coding and joint compression algorithm respectively.The original bit planes size of Lena is 2097152 bits. Afterto compress Lena with different compression algorithms, thesize of compressed image is 1957560 bits, 3393345 bits and1271438 bits. The joint compression algorithm can obtain min-imum compressed image. In other words, the joint compres-sion algorithm is more effective than the single compressionalgorithm.
1) Huffman coding:
Huffman coding constructs the codeword with the shortest average length according to the proba-bility of character occurrence. When constructing the Huffmanencoding table, the probability of each character’s occurrenceshould be firstly calculated. The Huffman tree is then con-structed from the two characters of the lowest probability (orminimum weight), and the sum of the probabilities of thetwo characters is deemed as the probability of new character,then compare the new probability of the probability of theremaining character. Repeat the above steps until traversed allthe characters to form a complete Huffman tree. Finally, markeach edge of the generated Huffman tree corresponds to (cid:48) (cid:48) and (cid:48) (cid:48) (left side corresponds to (cid:48) (cid:48) , right side corresponds to (cid:48) (cid:48) ),so that the Huffman coding corresponding to each characteris obtained.As shown in Fig.1, character A,B,C and D can generate aHuffman tree according to the probability of occurrence, andthen encode characters according to the corresponding value of the edge to obtain the Huffman coding table. Table III showsthe Huffman code corresponding to the Huffman tree in Fig.1.In this way, the code with the shortest average length can beobtained. Fig. 1. schematic diagram of Huffman tree generation.
To apply Huffman coding to the bit plane compressionalgorithm proposed in this paper, some special treatments areneeded. First, a flag bit named L pre is adopted to distin-guish the current compression coding. if current bit stringis compressed by Huffman coding, the flag bit L pre = 1 .Then, due to the bit stream of bit plane includes a lot ofshort bit strings, coding all of these short bit strings withHuffman coding doesn’t work very well. Therefore, we selectthe fixed-length short bit strings for Huffman coding, so thatbetter compression effect can be obtained, this fixed-length isdepending on the predefined parameter L fix .
2) Run-length coding:
To obtain better bit plane compres-sion effect, this paper not only uses Huffman coding, but alsouses run-length coding to obtain a joint bit plane compressionalgorithm with higher compression rate.The run-length coding consists of three parts, respectivelyis a prefix L pre , a infix L mid and a suffix L tai . The prefixis used to represent the type of current bit string, L pre = 0 represents the current bit string is a long bit string and adoptthe run-length coding to compress. The infix L mid representsthe binary form of the bit string length L, a total of L run bits.a suffix L tai that represents the current repetitive bits. whenthe length of compressible bit string is L , adopt the run-lengthcoding to compress the bit string. The prefix L pre = 0 . Theinfix L mid = ( L ) , the number of bits is represented by thepredefined parameter L run . The suffix represents the currentduplicate bit, that is L tai = (cid:48) (cid:48) or (cid:48) (cid:48) .III. RDHEI METHOD BASED ON BIT PLANE COMPRESSIONOF PREDICTION ERROR
In Section II, we mentioned that the compression algorithmis more suitable for carriers with high spatial redundancy.Therefore, combined with the compression algorithm proposedto Section II, this paper proposes a reversible data hidingmethod in encrypted images based on bit plane compression ofprediction error. The proposed compression algorithm is usedto compress each bit plane of the carrier, then the compressedbit plane is reconstructed, and the reconstructed carrier withmore reserved room can be obtained.As shown in Fig.2, the proposed method is divided intothree stages: The content owner preprocesses the image toreserve room and encrypts the image; Information hidingdevice embeds additional information in encrypted images;
EEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY 4
TABLE IIT
HE SIZE OF THE COMPRESSED IMAGE L ENA ACCORDING TO DIFFERENT COMPRESSION ALGORITHMS . compression algorithm original image Huffman coding Run-length coging Joint compression algorithmcompressed image size/bit 2097152 1957560 3393345 1271438 TABLE IIIA
N EXAMPLE OF H UFFMAN CODING TABLE . character probability Huffman codingA 0.1 010B 0.2 011C 0.2 00D 0.5 1 The image receiver performs information extraction andimage recovery. In the first stage, in order to reserve moreroom, the processed prediction error of the original imageis used for bit plane rearrangement and compression. Thedetails are described in Section III-A and III-B. The imageencryption is then performed in Section III-C. In the secondphase, Section III-D describes the embedding of additionalinformation. For the receiver, the additional information can beextracted correctly and the image can be recovered losslessly,Section III-E describes this process.
A. Processing of prediction error
For any pixel x ( i, j ) in the original image I with the sizeof m × n , where ≤ i ≤ m , ≤ j ≤ n . The first row andfirst column pixels are recorded as reference pixels withoutany operations. As shown in Fig.3, the unprocessed predictedvalue px ( i, j ) of x ( i, j ) is calculated according to the medianedge predictor(MED), and the formula is as follows: px = max ( x , x ) , x ≤ min ( x , x ) min ( x , x ) , x ≥ max ( x , x ) x + x − x , otherwise (1)Next, according to the pixel value x ( i, j ) and its predictedvalue px ( i, j ) of the original image, the prediction error e ( i, j ) is calculated as follows: e ( i, j ) = x ( i, j ) − px ( i, j ) (2)After the above steps, the unprocessed prediction error isobtained. As is shown in Fig.4, only pixels with predictionerror of [ − , , named as available pixels are used,and the pixel value beyond the prediction error range isdenoted as overflow pixels, without any modification. Then,convert the prediction error between [ − , into an eight-bit binary number. The highest bit represents the symbolmarker bit. When the prediction error is negative, the highestbit replaced by (cid:48) (cid:48) , if not, replace the highest bit with (cid:48) (cid:48) .The lower seven bits represent the binary form of its abso-lute value. After above operations, the processed predictionerror which can be compressed is obtained. For example,if e ( i, j ) = ( − , convert it with above descriptionand e (cid:48) ( i, j ) = (11100100) = (228) can be obtained, where e (cid:48) ( i, j ) denotes as the pixel value of the processed prediction error. The bit plane calculation formula of the processedprediction error is as follows: e (cid:48) k ( i, j ) = (cid:98) e (cid:48) ( i, j )2 k − (cid:99) mod , k = 1 , , ..., (3) e (cid:48) ( i, j ) represents the value of prediction error, and e (cid:48) k ( i, j ) represents the k − th bit binary value of e (cid:48) ( i, j ) . Aftertraversing all the values in processed prediction error, eightbit plane of the processed prediction error is obtained. B. Bit plane rearrangement of prediction error
To make use of the correlation between adjacent pixels ofan image, Chen et al. proposed a bit stream rearrangementmethod in [35]. As shown in Fig.5, the bit plane is firstdivided into non-overlapping blocks of the same size n × n , andthen generated four kinds of bit plane rearrangement methodsaccording to different rearrangement modes within and be-tween blocks. The bit plane rearrangement type is composedof two bits. The first bit represents the rearrangement withinthe block. When it is (cid:48) (cid:48) , it represents the arrangement withinthe block row by row, and when it is (cid:48) (cid:48) , it represents thearrangement within the block column by column. The secondbit represents the rearrangement between the blocks, (cid:48) (cid:48) and (cid:48) (cid:48) represent the same meaning as above. After the bit planerearrangement, each bit plane corresponds to four different bitstreams. C. Compression of bit plane and image reconstruction
Since the adjacent pixels of the original image are corre-lated, the adjacent bits of the corresponding prediction errorbit plane are often the same. For the processed predictionerror, the bit plane could be compressed to reserve room forembedding information. Then the compressed bit plane can bereconstruct into a image. Experiments show that this algorithmcan effectively compress the bit plane of processed predictionerror. The compression has been introduced in Section II. Thedescription of prediction error bit plane compression is shownin Section III-C-1. The reconstruction of compressed bit planeis described in Section III-C-2.
1) Compression of prediction error bit plane:
The completebit plane compression algorithm of processed prediction erroris introduced next. It mainly includes the following steps:
Step
Eight bit planes of processed prediction error wereobtained by using the prediction error calculation methodmentioned in Section III-A.
Step
The bit plane rearrangement method proposed byChen et al. in [39] was used to rearrange the eight bit planesof prediction error. The detailed process has been described inSection III-B.
Step
After step , each prediction error bit plane generated EEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY 5
Prediction error processing Bit plane compression Image encryption Encrypted image Informationembeded
Marked encrypted imageDetermine key typeDecrypted by encryption key Extracted informationAdditional information
Information hide key
Encryption key Information hide key Encrypted key
Original imageOriginal image en K d K en K d K Fig. 2. The framework of the proposed method. X X X X Fig. 3. MED predictor is used for pixel prediction. four different bit streams according to different rearrangementtypes. In order to obtain efficient Huffman coding table withless time, the generation of Huffman coding is determinedaccording to the compression effect of long bit strings. Itis assumed that only the compression of long bit strings(When L ≥ L fix ) is considered, according to the bit streamcompression algorithm described in Section II, each bit planewill generate four kinds of bit streams that only compresslong bit strings. Then the shortest bit stream after compressionis selected and its rearrangement type is best type k , k isthe bit plane index. The subsequent rearrangement of the bitplane only uses best type k . For example, if the shortestbit plane rearrangement type of − th bit plane is (cid:48) (cid:48) ,after that, the − th bit plane all adopts the (cid:48) (cid:48) as bitplane rearrangement mode. With the eight rearrangement type best type ,..., best type , eight bit streams are generated.Then according to the occurrence probability of each short bitstring within the eight bit streams, a complete Huffman codingtable is generated. Step
With the compression algorithm introduced in SectionII, compress the rearrangement bit plane of prediction errorobtained in step3 orderly.After the above compression operations, the bit plane of prediction error has been compressed. After each bit planeis compressed, the corresponding compressed bit plane in-formation is obtained. Compared the compressed bit planeinformation with the original bit plane. If the compressed bitplane information is greater than the original bit plane, nocompression is performed. If less than, compress and markthe current bit plane. The compressed bit plane informationis part of auxiliary information, include compression markerbit, bit plane rearrangement type, length of bit stream aftercompression, and bit stream of compressed bit plane. Thecompression marker bit is used to judge whether the currentbit plane is compressed or not. When the flag bit is (cid:48) (cid:48) , itmeans the current bit plane can be compressed, and a flag bitof (cid:48) (cid:48) indicates that the bit plane will not be compressed. Thenthe image reconstruction is carried out.
2) Image reconstruction:
Before reconstruct the image,the auxiliary information should be introduced. The auxiliaryinformation consists of the following parts: part
The predefined parameters block size n, L fix and L run ; part Huffman coding rules and information of overflowpixels; part
The compressed bit plane information; part
The net compressed space size, it means the netreserved room.To losslessly recover the compressed bit stream, As shownin Fig.6, while reconstructing the compressed image, theauxiliary information except the net compressed space sizeshould be stored in the MSB planes, the net compressionspace size is recorded in the LSB. For the blank region ofcompressed bit plane which means the net reserved room, fillit with (cid:48) (cid:48) . Finally, the reconstructed compressed image I c isobtained. The calculation formula of the reconstructed image EEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY 6
162 162 161 162162 161 162
162 162162 165163 161 165
157 163 161 165163 161
157 163157160
155 157 158
155 158 158 159158 155 161158164160 163
156 157 159
160 157 157 163159 160 160156159162 159
Original image -1 -7 2 -1 -3 1 0 -1 Unprocessed prediction error
135 2 129
131 1 0
Processed prediction errorMED processing
Fig. 4. Schematic diagram of prediction error generation.
000 0 10 0 0 00 0 0111 00 00 0 00 0 0 00 0 0000 00 Type ‘ ’ :0001100010001000010000000000001010001010000100000000000000000000Type ‘ ’ :0001100010001000100010100001000001000000000000100000000000000000Type ‘ ’ :0111000000001000000010000001000011000000010000100000000000000000 Type ‘ ’ :0111000000001000110000000100001000 Fig. 5. Four types of bit-plane rearrangement(the block size is × ). is as follows: x c ( i, j ) = (cid:88) k =1 x kc ( i, j ) × − k , k = 1 , , ..., (4)Where x c ( i, j ) represents the value of reconstructed image I c , and x kc ( i, j ) represents the k − th bit binary value of x c ( i, j ) . D. Image encryption
In the image encryption stage, firstly, an m × n pseudo-random matrix H is generated by the encryption key K en .The pixel value x c ( i, j ) of the reconstruct image I c and thecorresponding value h ( i, j ) in the pseudo-random matrix H are first converted into an eight-bit binary number. The formulais as follows: h k ( i, j ) = (cid:98) h ( i, j )2 k − (cid:99) mod , k = 1 , , ..., (5)Where h k ( i, j ) represents k − th bit of the binary form of h ( i, j ) and ≤ i ≤ m , ≤ j ≤ n . Then implement eachbit with xor operation to achieve encryption. Noticed the bitsin the LSB that store the net compression space size are notencrypted. The encryption calculation formula is as follows: x ke ( i, j ) = x kc ( i, j ) ⊕ h k ( i, j ) , k = 1 , , ..., (6) Where k is the k − th bit of the current binary number, x ke ( i, j ) represents the k − th bit value of the binary pixel valueof the encrypted image, (cid:48) ⊕ (cid:48) represents exclusive or operation.Finally, translate the encrypted binary value into the decimal,that is, the encrypted reconstruct image I ce . E. Embedding additional information into the encrypted im-age
In this section, while embedding the additional informa-tion into the reserved room, the net compression space sizerecorded on the LSB is extracted firstly and the location ofthe reserved room is obtained based on it. Then, the additionalinformation is encrypted with the information hiding key K d .Finally, the encrypted additional information is embedded intothe reserved room by bit substitution. In the end, generate amarked encrypted image I ee . F. Information extraction and image recovery
In the stage of information extraction and image recovery,the image receiver first extracts all information of eight bitplanes, then extracts the net compression space size in the LSBto locate the position of the embedded additional information,so the bit plane bit stream can be divided into two parts: (1) bit stream of auxiliary information (2) bit stream of embeddedadditional information. The above operation can be carriedout without any key. According to the key held by the imagereceiver, it can be divided into the following three cases:
EEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY 7
00 0 0
00 0 00 1 1 00 0 0000 00 00 0 01 1 0 00 0 0000 00
00 0 0
11 0 10 1 0 10 1 1000 10 11 1 01 0 0 00 1 0001 1100 0 00 0 0 00 0 0000 00 00 0 00 0 0 00 0 0000 0001 1 0
00 0 00 0 0 0
00 0 00 0 0 00 0 00 Processed prediction error 8-th bit plane 7-th bit planeSecond bit plane
Frist bit plane
00 0 0
11 0 10 1 0 10 1 1000 10 11 1 01 0 0 00 1 0001 1100 0 00 0 0 00 0 0000 00 00 0 00 0 0 00 0 0000 0001 1 0
00 0 00 0 0 0
00 0 00 0 0 00 0 00 L_fix L_runHuffman coding length Huffman coding tableNumber of overflow pixels Compression tagRearrangement type Length of compressed bit planeCompressed bit plane Net compressed space size
01 1 01 0 1 1
11 0 11 1 0 11 0 0011 11 10 1 10 0 0 10 1 1101 01
Fig. 6. Detailed sketch of bit plane compression and reconstruction.
1) Only information hiding key K d : When the imagereceiver has only the information hiding key K d , he can onlyextract the embedded additional information. Firstly, obtainthe bit stream of embedded additional information from the bitstream of eight bit planes. Then decrypt the bit stream of theembedded additional information using the information hidingkey K d , the decryption formula is shown in formula (6). Inthis way, additional information can be correctly obtained.
2) Only the encryption key K en : When the image receiverhas only the encryption key K en , he can only recover theoriginal image. The information of the compressed bit planeis extracted first and then decrypted using the encryption key K en , next extract the auxiliary information from the decryptedbit stream and then recover the prediction error according tothe auxiliary information. Finally, restore the original imageaccording to formula (2).
3) Both the encryption key K en and the information hidingkey K d : The embedded information can be extracted correctlyby the key K d and the original image can be recovered by thekey K en .IV. E XPERIMENTAL RESULTS AND ANALYSIS
In order to verify the feasibility of the proposed method, alot of experiments are carried out in this section. Experimentalresults show that the proposed method has a higher embed-ding rate than the current method. Firstly, we analyze thereversibility of the proposed method in Section III-A. Next,toget better performance, the parameters involved are optimized.The details are described in Section III-B. Then, compare theperformance of this RDHEI method with three state-of-the-art methods [32], [34], [36] in Section III-C. As shown inFig.7, six gray scale images were selected as the test images,respectively ( a ) Lena, ( b ) Baboon, ( c ) Tiffany, ( d ) Peppers, ( e ) Man, ( f ) Lake. Three data sets: UCID [37], BOSSbase
TABLE IVT HE MSE
OF TEST IMAGES . Image Lena Baboon Tiffany Peppers Man LakeMSE 0 0 0 0 0 0[38] and BOWS2OrigEp3 [39] are used. The experimentalresults and analyses are introduced as follows.
A. Reversibility analysis
Fig.8 shows the Lena image in different stages. Fig.8 ( a ) isa standard gray scale image Lena with the size of × ,Fig.8 ( b ) shows the encrypted Lena image, Fig.8 ( c ) is theencrypted image after the additional information is embedded,while Fig.8 ( d ) is the recovered Lena image. It can be seenthat the restored image is exactly the same as the originalimage.To intuitively prove the invertibility of the proposed method,mean square deviation (MSE) is introduced here. The calcu-lation formula of mean square error (MSE) is: M SE = 1 m × n m − (cid:88) i =0 n − (cid:88) j =0 [ I ( i, j ) − K ( i, j )] (7)Where K ( i, j ) and I ( i, j ) represent the recovered imagepixel and original image pixel respectively.When MSE is (cid:48) (cid:48) , it means the two images are the same.Therefore, to prove the reversibility of this method, calculatethe MSE of the recovered image and the original image. Asshown in Table 3, MSE of the test images are all (cid:48) (cid:48) . Thismeans that the recovered image is exactly the same as theoriginal image. In other words, the proposed method can betruly reversible. EEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY 8 .
977 0 .
838 0 .
993 0 .
976 0 .
981 0 . .
645 0 .
969 2 .
652 2 .
494 2 .
479 1 . .
583 1 .
006 2 .
824 2 .
187 2 .
349 1 . .
15 1 .
526 3 .
253 2 .
759 2 .
763 2 . E R \ bpp Puteaux et al. Wu et al. Yin et al. Proposed method
Fig. 7. Comparison of ER on test images.Puteaux and Puech [32] Wu et al. [36] Yin et al. [34] and proposed method. .
977 0 .
966 0 . .
268 2 .
561 2 . .
688 3 .
361 3 . .
048 3 .
763 3 . E R \ bpp Puteaux et al. Wu et al. Yin et al. Proposed method
Fig. 8. Comparison of average ER on image set. Puteaux and Puech [32] Wu et al. [36] Yin et al. [34] and proposed method.
B. Parameter optimization
In the proposed method, there are mainly three parameters,block size n × n , L fix which is used to judge the type ofcode word, and the length of extend run-length code L run .According to the description in Section II-C, one shouldchoose the compression algorithm that can reserved moreroom after compression, and the choice of block size, L fix and L run will affect the compression effect. To optimize theparameters, two of the three parameters are kept unchanged,the remaining parameters are changed, and the parameter withthe best performance is selected as the optimized parameter.The subsequent experiments were carried out with optimized parameters.Table V describes the embedding rate of the correspondingtest image when n is 4, L fix is from 3 to 6, and L run isfrom 3 to 6. It can be seen from Table V that when L fix = 6 and L run = 4 or , a high embedding rate can be obtained.Beyond this boundary, the embedding rate shows a decreasingtrend. To explore the influence of block size on embeddingrate, Table VI describes the image embedding rate when L fix = 6 and L run = 5 , corresponding block size is × , × , × and × . It can be seen from Table VI that whenthe block size is × , a high embedding rate can be achieved.As the block size continues to increase, the embedding ratewill decrease. To prove that the selection of parameters is not EEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY 9
TABLE V N =4, L fix FROM TO L run FROM TO THE EMBEDDING RATE OF TEST IMAGES . L fix L run Lena Baboon Tiffany Peppers Man Lake3 3 3.1084 1.409 3.1831 2.6918 2.6771 2.24284 3.1117 1.398 3.1864 2.6958 2.6832 2.25115 3.072 1.3325 3.165 2.6626 2.6397 2.23836 3.0364 1.2633 3.1292 2.6081 2.574 2.20944 3 3.1144 1.4512 3.1893 2.7072 2.6887 2.24544 3.1296 1.4697 3.2014 2.7304 2.715 2.27225 3.1243 1.4393 3.1951 2.7215 2.697 2.25236 3.1055 1.3929 3.1796 2.6877 2.6452 2.23725 3 3.1094 1.4664 3.1863 2.7024 2.7115 2.24444 3.1312 1.4989 3.216 2.7346 2.7478 2.28375 3.131 1.4865 3.2058 2.7402 2.7428 2.2736 3.1221 1.4594 3.1928 2.7149 2.7143 2.25426 3 3.1203 1.4882 3.2053 2.7119 2.7182 2.27754 3.1458 1.5263 3.243 2.7494 2.7594 2.32415 3.1498 1.5245 3.2531 2.7589 2.7625 2.3236 3.1443 1.5066 3.2283 2.7427 2.7436 2.3047
TABLE VI
THE EMBEDDING RATE OF THE TEST IMAGE WHEN L fix = 6 , L run = 5 AND THE BLOCK SIZE CHANGES . L fix = 6 , L run = 5 Block-size Lena Baboon Tiffany Peppers Man Lake × × × × TABLE VIIT
HE COMPRESSION RATE OF DIFFERENT BIT PLANES . Image − th bit plane − th bit plane − th bit plane − th bit plane − th bit plane − th bit planeLena 1 67.096 15.943 4.915 1.768 1Baboon 1 7.021 2.021 1.982 1 1Tiffany 1 70.148 14.694 4.853 2.066 1.030Peppers 1 93.723 15.464 3.325 1.161 1Man 1 65.397 12.693 3.277 1.198 1Lake 1 69.905 5.689 1.874 1.053 1related to the texture complexity of the image, this paper alsocarries out experiments on the image set. Similarly, keep twoof the three parameters unchanged, select the parameters whichcan obtain best average performance. Just as Table VIII, whenthe block size n = 4 , L fix is from 3 to 6, and L run is from 3 to6, the average performance of three image set is recorded. Byanalyzing the embedding capacity corresponding to differentparameters, n = 4 , L fix = 6 and L run = 5 was selected asthe parameters of the subsequent experiment. C. Preference analyses
To directly analyze the compression effect of the proposedmethod, the compression rate of the test image is first calcu-lated. The image compression rate is the space occupied by theimage bit plane before compression divided by the actual space occupied by the image bit plane. As shown in table Table VII,with the same compression method, the high-order bit plane ofprediction error image can obtain a higher compression rate.The compression rate=1 means that the compressed bit planeis greater than the original bit plane. As for the − th bitplane which represents the symbol bit of the prediction errorimage, its compression effect is poor.In order to further explore the performance of the proposedmethod, some experiments have been done to demonstratethe improvement of embedding capacity. Test images areencrypted and the additional information is embedded intothe encrypted test images, experimental results show that theembedded additional information can be extracted completely,and the recovered image is consistent with the original image.In order to better verify the performance of the proposed EEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY 10
TABLE VIII N =4, L fix FROM TO L run FROM TO THE EMBEDDING RATE OFIMAGE SET . L fix L run BOSSBase BOWS2 UCID3 3 2.2307 3.6738 2.46504 2.3648 3.6512 2.45365 3.3854 3.5932 2.40616 3.3174 3.5235 2.34464 3 3.5155 3.7183 2.50494 3.5278 3.7304 2.52065 3.4987 3.7049 2.49826 3.4542 3.6624 2.45845 3 3.5329 3.7346 2.52044 3.5615 3.7640 2.55045 3.5533 3.7586 2.54546 3.5276 3.7339 2.51966 3 3.5502 3.7512 2.53644 3.5885 3.7894 2.57505 3.5910 3.7938 2.57916 3.5756 3.7802 2.5635method, we compare the embedding capacity of the proposedmethod with three state-of-the-art RDHEI methods [32], [34],[36]. In this experiment, images of Fig.7 are also selected asthe test images, and the maximum additional information thatcan be embedded in each method is selected as its embeddingcapacity. As shown in Fig.9, we first compare the embeddingrate of the test images. It can be seen that the proposed methodhas a highest embedding rate, that is, it can provide moreembedding room for additional information.Compared with other methods, the RDHEI method in thispaper has a great improvement in embedding rate. Althoughsome invalid pixels cannot participate in the reserved roomprocess in the method proposed in this paper, the number ofsuch invalid pixels is very small and the effect is weeny. Inorder to further prove the universality of such performanceimprovement, this paper also conducts contrast experiment onimage sets such as UCID, BOSSBase and BOWS2OrigEp3.The effectiveness of the proposed method is illustrated bycomparing the average embedding rate of all images in theimage set. As shown in Fig.10, it is a comparison graph of theaverage embedding rate of different image sets. Similarly, themethod proposed in this paper can also obtain the best averageembedding performance in the image set. As can be seen fromthe figure, the average embedding rate obtained by the methodof this paper is significantly higher than that of the other threemethods. Compared with methods [32], [34], [36], the averageembedding rate in UCID of proposed method is increased by1.1153 bpp , 0.7793 bpp and 0.3596 bpp , respectively.V. S
UMMARY
In this paper, a reversible data hiding method in encryptedimages based on bit plane compression of prediction errorimage is proposed. The method of bit plane rearrangementis adopted for the prediction error image, which not onlymakes well use of the correlation between adjacent pixels, but also makes use of the correlation between the pixel value ofthe whole image. Experimental results show that this methodcan extract information and restore images separately, and itsembedding rate is higher than the state-of-the-art methods. Inthe future, more effective predictors can be found to generateprediction errors with smaller fluctuating values, so as tofurther improve the embedding capacity. A more efficient bitstream compression method can also be explored to furtherimprove the performance of bit plane compression.A
CKNOWLEDGEMENT
This research work is partly supported by National NaturalScience Foundation of China (61872003, U1636206).R
EFERENCES[1] J. M. Barton, “Method and apparatus for embedding authenticationinformation within digital data,” 1997, uS Patent 5,646,997.[2] Y. Q. Shi, Z. Ni, D. Zou, C. Liang, and G. Xuan, “Lossless data hiding:fundamentals, algorithms and applications,” , vol. 2, pp. II–33–II–36, 2004.[3] Y. Q. Shi, “Reversible data hiding,”
International workshop on digitalwatermarking , pp. 1–12, 2004.[4] R. Caldelli, F. Filippini, and R. Becarelli, “Reversible watermarkingtechniques: An overview and a classification,”
EURASIP Journal onInformation Security , vol. 2010, no. 1, p. 134546, 2010.[5] J. Fridrich, M. Goljan, and R. Du, “Invertible authentication,” vol. 4314,pp. 197–208, 2001.[6] W. Zhang, X. Hu, X. Li, and N. Yu, “Recursive histogram modification:establishing equivalency between reversible data hiding and lossless datacompression,”
IEEE transactions on image processing , vol. 22, no. 7,pp. 2775–2785, 2013.[7] C. Qin and Y.-C. Hu, “Reversible data hiding in vq index table withlossless coding and adaptive switching mechanism,”
Signal Processing ,vol. 129, pp. 48–55, 2016.[8] J. Tian, “Reversible data embedding using a difference expansion,”
IEEEtransactions on circuits and systems for video technology , vol. 13, no. 8,pp. 890–896, 2003.[9] L. Kamstra and H. J. Heijmans, “Reversible data embedding into imagesusing wavelet techniques and sorting,”
IEEE transactions on imageprocessing , vol. 14, no. 12, pp. 2082–2090, 2005.[10] H. J. Kim, V. Sachnev, Y. Q. Shi, J. Nam, and H.-G. Choo, “A noveldifference expansion transform for reversible data embedding,”
IEEETransactions on Information Forensics and Security , vol. 3, no. 3, pp.456–465, 2008.[11] Z. Ni, Y.-Q. Shi, N. Ansari, and W. Su, “Reversible data hiding,”
IEEETransactions on circuits and systems for video technology , vol. 16, no. 3,pp. 354–362, 2006.[12] D. M. Thodi and J. J. Rodr´ıguez, “Expansion embedding techniquesfor reversible watermarking,”
IEEE transactions on image processing ,vol. 16, no. 3, pp. 721–730, 2007.[13] B. Ou, X. Li, Y. Zhao, R. Ni, and Y.-Q. Shi, “Pairwise prediction-errorexpansion for efficient reversible data hiding,”
IEEE Transactions onImage Processing , vol. 22, no. 12, pp. 5010–5021, 2013.[14] M. Xiao, X. Li, Y. Wang, Y. Zhao, and R. Ni, “Reversible data hidingbased on pairwise embedding and optimal expansion path,”
SignalProcessing , vol. 158, pp. 210–218, 2019.[15] T. Zhang, X. Li, W. Qi, and Z. Guo, “Location-based pvo and adaptivepairwise modification for efficient reversible data hiding,”
IEEE Trans-actions on Information Forensics and Security , vol. 15, pp. 2306–2319,2020.[16] J. Wang, X. Chen, J. Ni, N. Mao, and Y. Shi, “Multiple histograms basedreversible data hiding: Framework and realization,”
IEEE Transactionson Circuits and Systems for Video Technology , 2019.[17] X. Zhang, J. Long, Z. Wang, and H. Cheng, “Lossless and reversibledata hiding in encrypted images with public-key cryptography,”
IEEETransactions on Circuits and Systems for Video Technology , vol. 26,no. 9, pp. 1622–1631, 2015.[18] Z. Qian and X. Zhang, “Reversible data hiding in encrypted imageswith distributed source encoding,”
IEEE Transactions on Circuits andSystems for Video Technology , vol. 26, no. 4, pp. 636–646, 2015.
EEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY 11 [19] F. Huang, J. Huang, and Y.-Q. Shi, “New framework for reversible datahiding in encrypted domain,”
IEEE transactions on information forensicsand security , vol. 11, no. 12, pp. 2777–2789, 2016.[20] Y.-C. Chen, T.-H. Hung, S.-H. Hsieh, and C.-W. Shiu, “A new reversibledata hiding in encrypted image based on multi-secret sharing andlightweight cryptographic algorithms,”
IEEE Transactions on Informa-tion Forensics and Security , vol. 14, no. 12, pp. 3332–3343, 2019.[21] X. Zhang, “Reversible data hiding in encrypted image,”
IEEE signalprocessing letters , vol. 18, no. 4, pp. 255–258, 2011.[22] Y. Fu, P. Kong, H. Yao, Z. Tang, and C. Qin, “Effective reversible datahiding in encrypted image with adaptive encoding strategy,”
InformationSciences , vol. 494, pp. 21–36, 2019.[23] X. Zhang, “Separable reversible data hiding in encrypted image,”
IEEEtransactions on information forensics and security , vol. 7, no. 2, pp.826–832, 2011.[24] R. Zhang, C. Lu, and J. Liu, “A high capacity reversible data hidingscheme for encrypted covers based on histogram shifting,”
Journal ofInformation Security and Applications , vol. 47, pp. 199–207, 2019.[25] K. Ma, W. Zhang, X. Zhao, N. Yu, and F. Li, “Reversible datahiding in encrypted images by reserving room before encryption,”
IEEETransactions on information forensics and security , vol. 8, no. 3, pp.553–562, 2013.[26] S. Yi and Y. Zhou, “Binary-block embedding for reversible data hidingin encrypted images,”
Signal Processing , vol. 133, pp. 40–51, 2017.[27] Y. Puyang, Z. Yin, and Z. Qian, “Reversible data hiding in encryptedimages with two-msb prediction,” pp. 1–7, 2018.[28] S. Yi and Y. Zhou, “Separable and reversible data hiding in encryptedimages using parametric binary tree labeling,”
IEEE Transactions onMultimedia , vol. 21, no. 1, pp. 51–64, 2018.[29] H.-T. Wu, Z. Yang, Y.-M. Cheung, L. Xu, and S. Tang, “High-capacityreversible data hiding in encrypted images by bit plane partition andmsb prediction,”
IEEE Access , vol. 7, pp. 62 361–62 371, 2019.[30] W. Hong, T.-S. Chen, and H.-Y. Wu, “An improved reversible data hidingin encrypted images using side match,”
IEEE Signal Processing Letters ,vol. 19, no. 4, pp. 199–202, 2012.[31] W. Zhang, K. Ma, and N. Yu, “Reversibility improved data hiding inencrypted images,”
Signal Processing , vol. 94, pp. 118–127, 2014.[32] P. Puteaux and W. Puech, “An efficient msb prediction-based methodfor high-capacity reversible data hiding in encrypted images,”
IEEEtransactions on information forensics and security , vol. 13, no. 7, pp.1670–1681, 2018.[33] Y. Qiu, Z. Qian, H. Zeng, X. Lin, and X. Zhang, “Reversible data hidingin encrypted images using adaptive reversible integer transformation,”
Signal Processing , vol. 167, p. 107288, 2020.[34] Z. Yin, Y. Xiang, and X. Zhang, “Reversible data hiding in encryptedimages based on multi-msb prediction and huffman coding,”
IEEETransactions on Multimedia , vol. 22, no. 4, pp. 874–884, 2019.[35] K. Chen and C.-C. Chang, “High-capacity reversible data hiding inencrypted images based on extended run-length coding and block-basedmsb plane rearrangement,”
Journal of Visual Communication and ImageRepresentation , vol. 58, pp. 334–344, 2019.[36] Y. Wu, Y. Xiang, Y. Guo, J. Tang, and Z. Yin, “An improved reversibledata hiding in encrypted images using parametric binary tree labeling,”
IEEE Transactions on Multimedia , 2019.[37] G. Schaefer and M. Stich, “Ucid: An uncompressed color imagedatabase,” vol. 5307, pp. 472–480, 2003.[38] P. Bas, T. Filler, and T. Pevn`y, “ break our steganographic system: theins and outs of organizing boss,” pp. 59–70, 2011.[39] P. Bas and T. Furon, “Image database of bows-2,”