# Data Hiding and Authentication Scheme for Medical Images Using Double POB
## 3 The Proposed Scheme
### Double Hiding
#### 3.2.2 Double Embedding Based on POB  
The POB algorithm is used to embed sensitive messages (such as patient identity, condition, medical history, etc.) into the encrypted Share, which has the function of embedding and re-encryption synchronization. Since encrypted ShareB\({}^{\prime}\) contains less important pixel information than encrypted ShareA\({}^{\prime}\), in order to protect the information in sensitive areas from being damaged, the former has a higher priority than the latter when embedding secret messages, so the secret message is first embedded in encrypted ShareB\({}^{\prime}\).  
Secret message embedding based on POB concrete steps is as follows:  
**Step 1:** Firstly, it traverses the pixels of encrypted ShareB\({}^{\prime}\) to determine whether the length of the secret message exceeds the capacity of encrypted ShareB\({}^{\prime}\). If not, the secret message is directly embedded, and the second and third steps are repeated until all information is embedded. If it exceeds the capacity, step 4 is completed after completing step 2 and step 3.  
**Step 2:** The secret message \(w_{0},w_{1}\in\{0,\ 1\}\) is selected and embed it in each pixel of encrypted ShareB\({}^{\prime}\) to make the pixel turn to a ten-bit binary number.  
**Step 3:** Through the POB number system, the pixels embedded with secret information in encrypted ShareB\({}^{\prime}\) are compressed from ten-bit binary numbers to eight-bit binary numbers, and new pixels containing secret information are generated.  
**Step 4:** If the capacity of encrypted ShareB\({}^{\prime}\) is not enough, the embedding is continued in encrypted ShareA\({}^{\prime}\) using the methods in steps 2 and 3.  
After the secret message is embedded, the encrypted image containing the secret message is obtained, and the POB is used again to embed the authentication bit in the two encrypted images containing the secret information.  
The authentication information embedding based on POB concrete steps is as follows:  
**Step 1:** Each 8-bit pixel of the encrypted image that contains the secret message is used to calculate two authentication bits, and they are then attached to the 8-bit pixel.  
**Step 2:** The first one in the authentication bit is denoted as the number of 1s in the first four digits of the eight pixels, and the second one is denoted as the number of 1s in the last four digits, which is denoted as 1 when odd and 0 when even.  
Figure 3: Processes of data compression and data filling.  
**Step 3:** Finally, the ten-bit pixels embedded with authentication bits are converted into eight-bit POB values through the POB number system, and ShareA\" and ShareB\" are generated.  
As shown in Figure 4, pixels 169 and 98 are selected as examples to carry out double embedding based on the POB system.  
The double embedding based on the POB algorithm not only greatly increases the capacity of data hiding but also enhances the security of images. This is because the method can automatically re-encrypt the currently processed pixels during data hiding and authentication bit embedding, thus destroying the local correlation preserved by the design of the cryptosystem, and the encrypted image, after embedding, is more difficult to understand.