## 2 Materials and Methods
### Proposed Method
#### 2.5.2 Image Forgery Verification Phase  
This section sheds light on the process of watermark extraction and forgery detection, and the localization process. In this phase, the forged image is first divided into 256 non-overlapped blocks, and then we compute the feature share in the same way described earlier in the shares construction phase (Section 2.5.1). After that, the secret share is recovered from the trusted authority (TA) and the key share is received from the owner of the original digital image. The recovered watermark is computed by exclusive OR among the feature, secret and key shares. The forgery verification is started by dividing the original and recovered watermarks into 256 blocks of size (16 \(\times\) 16), and then exclusive OR between these blocks. Depending on the results of the matching between the blocks of two watermarks, we can specify whether the block is authentic or forged. Hence, if the result of exclusive OR between them is 0, then there is no forgery and the block is authentic; otherwise, if the result is 1, then this block is forged. After we specified the authentic and forged blocks, these blocks were marked as authentic or not by setting the pixels in the forged image to 1 or 0. The pseudo-code of the image forgery verification is illustrated in Algorithm 2.  
```
Input: Forged Colour Image (FI), Secret Share (\(S_{\text{S}}\)), Key share (\(K_{\text{S}}\)) and the original watermark (\(W\)) all of size (256 \(\times\) 256). Output: Forged Regions Matrix FRM of size (16 \(\times\) 16) Initialization: No. of Blocks = 16; Block Size = 16 \(\times\) 16 pixels
1: Divide Image FI into (16 \(\times\) 16 = 256) blocks
2: For i = 1 into No. of Blocks
3: For j = 1 into No. of Blocks
4: Extract multi-directional features for block (i, j) using \(\textbf{WHT}\ \to\ F_{\text{WHT}}\) vector
5: Extract texture features for block (i, j) using \(\textbf{LBP}\ \to\ F_{\text{LBP}}\) vector
6: Extract multiscale features for block (i, j) using \(\textbf{DWT}\ \to\ F_{\text{DWT}}\) vector
7: Concatenate these features vector into sin gle vector \(F_{\text{Block}}=[F_{\text{WHT}}\ F_{\text{LBP}}\ F_{\text{DWT}}]\)
8: Reshape \(F_{\text{Block}}\) vector into features block \(F_{\text{Block}}\) (i, j) of size (16 \(\times\) 16)
9: end
10: Add features block at location (i, j) into the secret share of size (256 \(\times\) 256) at location (i, j) \(F_{\text{S}}\ \leftarrow\ F_{\text{Block}}\) (i, j)
11: end
12: Obtain key share \(K_{\text{S}}\) of size (256 \(\times\) 256) from Image Owner
13: Recover \(S_{\text{S}}\) From the trusted authority (TA) to compute watermark
14: Compute Extracted Watermark \(\overline{W}=S_{\text{S}}\oplus F_{\text{S}}\ \oplus K_{\text{S}}\)
15: Divide Watermark \(W\) and \(\overline{W}\) into (16 \(\times\) 16 = 256) blocks
16: Verify if there exist forgery in each block of the image as follows:
17: For i = 1 into No. of Blocks
18: For j = 1 into No. of Blocks
19:\(Verify\ B_{\text{Block}}=W(i,j)\oplus\overline{W}\) (i, j)
20: If (\(Verify\ B_{\text{Block}}=0\)) Then
21:\(W(i,j)\) equal to \(\overline{W}\) (i, j) and the block (i, j) is Authentic
22: Set block (i, j) = 0 in FRM matrix
23: Else
24:\(W(i,j)\) unequal to \(\overline{W}\) (i, j) and the block (i, j) is forged Set block (i, j) = 1 in FRM matrix
25: end
26: end
27: Remove Outlier Blocks
28: If all blocks of the image (FI) equal zero Then
29: Image (FI) is Authentic and there is no forgery in the image
30: Else
31: Image (FI) is forged image and the forged blocks in matrix FRM
32: End
```  
**Algorithm 2**Image Forgery Verification Phase