# An Effective Authentication Scheme Using DCT for Mobile Devices

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

_{L}, A

_{R}) be two neighboring pixels and s

_{1}and s

_{2}are two binary secret bits. First, the pixel A

_{L}is computed using the LSB function to get the lowest bit of A

_{L}. Next, the scheme determines whether the lowest bit is equal to the secret bit s

_{1}. If LSB(A

_{L}) = s

_{1}, then A

_{L}does not need modification and can be input directly into the matching function F(A

_{L}, A

_{R}). Conversely, if LSB(A

_{L}) ≠ s

_{1}, then A

_{L}= A

_{L}− 1, and it is input into the matching function F(A

_{L}, A

_{R}). The matching function is as follows:

_{L}, A

_{R}) is equal to the secret bit s

_{2}and uses four modification rules to conceal data:

- Rule 1: LSB(A
_{L}) = s_{1}and F(A_{L}, A_{R}) = s_{2}, the pixels A_{L}and A_{R}do not need modification. - Rule 2: LSB(A
_{L}) = s_{1}and F(A_{L}, A_{R}) ≠ s_{2}, the pixel A_{L}does not change, and A′_{R}= A_{R}+ 1. - Rule 3: LSB(A
_{L}) ≠ s_{1}and F(A_{L}− 1, A_{R}) = s_{2}, the pixel A′_{L}= A_{L}− 1, and A_{R}does not change. - Rule 4: LSB(A
_{L}) ≠ s_{1}and F(A_{L}− 1, A_{R}) ≠ s_{2}, the pixel A′_{L}= A_{L}+ 1, and A_{R}does not change.

_{L}, A

_{R}) be a pixel pair and i be the location of the pair, where A

_{L}is used to conceal the hash code of the pixel pair, and A

_{R}is used to embed the recovery information. Lyu et al. supposed that the hash value of the location i is k. The hash value is then concealed in the three least significant bits (LSBs) of A

_{L}. The recovered information is the three most significant bits (MSBs) of the mean value of the pixel pair, which will be embedded into the three LSBs of A

_{R}. In the extraction and recovery process, the stego-image is also divided into several 1 $\times $ 2-sized pixel pairs. The authentication code and the recovery information are extracted from the first and the second pixels, respectively. The location $i$ of the pixel pair is used to map the hash table to generate the hash value $k$. If the hash value is equal to the LSBs of the first pixel A′

_{L}, then the pixel has not been tampered with. On the other hand, if the value is unequal to the LSBs of A′

_{L}, then the pixel has been tampered with. In this case, the recovery information is extracted from the three LSBs of A′

_{R}and is used to recover the original pixel.

_{z}is used to determine whether the block is embeddable or not. If the number of AC coefficients with a magnitude of 1 is less than the threshold, then the block is non-embeddable. For the non-embeddable block, the scheme does not change the coefficients to maintain the image quality. For the embeddable block, the coefficients are modified by

^{th}coefficient, $C{\prime}_{i}$ is the stego-coefficient, and $b$ is the secret bit. The function $sign\left(x\right)$ returns the sign of the input value. If the coefficient is equal to 1 or −1, then the secret message is concealed in the coefficient by ${C}_{i}+sign\left({C}_{i}\right)\times b$. On the contrary, if the coefficient is not equal to 1 or −1, it is shifted by ${C}_{i}+sign\left({C}_{i}\right)$.

## 2. Related Works

#### 2.1. Discrete Cosine Transform (DCT)

#### 2.2. Lu et al.’s Diagonal Watermarking Scheme

## 3. Proposed Scheme mark

#### 3.1. Authentication Watermark Generation Phase

_{A}, B

_{B}) be the block pair. Figure 7 shows the diagram of the image blocks of the proposed scheme. The proposed scheme generates an authentication watermark for the block pair (B

_{A}, B

_{B}) and embeds the code into the block pair.

_{A}and B

_{B}.

_{A}and B

_{B}are extracted to form MSB_DC

_{A}and MSB_DC

_{B}, respectively. Concatenate MSB_DC

_{A}and MSB_DC

_{B}to generate the first fourteen authentication watermark bits. Then, use XOR operator bitwise on the fourteen bits to generate a debugging bit $\beta $. Perform NOT operator on the debugging bit $\beta $ to generate the final testing bit $t$.

_{A}and B

_{B}are 11 and 32, respectively. The seven MSBs of 11 are (0000101)

_{2}, where (11)

_{10}= (00001011)

_{2}. Hence, MSB_DC

_{A}= 0000101, and MSB_DC

_{B}= 0010000. The debugging bit is $\beta $ = 0 ⊕ 0 ⊕ 0 ⊕ 0 ⊕ 1 ⊕ 0 ⊕ 1 ⊕ 0 ⊕ 0 ⊕ 1 ⊕ 0 ⊕ 0 ⊕ 0 ⊕ 0 = 1, and the testing bit is $t$ = ~$\beta $ = 0.

_{A}, MSB_DC

_{B}, the debugging bit, and the testing bit to generate an authentication watermark (w), where w = MSB_DC

_{A}|| MSB_DC

_{B}|| $\beta $ || $t$.

_{A}|| MSB_DC

_{B}||$\text{}\beta $||$\text{}t$ = 0000101||0010000||1||0 = 0000101001000010.

#### 3.2. Authentication Watermark Embedding Phase

_{A}, B

_{B}). The watermark is concealed twice in each block using Least Significant Bit Replacement (LSB). The proposed scheme separates each 4 $\times $ 4-sized block into two sub-blocks. Each 2 $\times $ 4-sized sub-block conceals one authentication watermark. Every pixel in the sub-block owns two secret bits.

_{A}. The block B

_{A}is divided into two sub-blocks. The first sub-block is colored gray. The second sub-block is colored white. The watermark w = 0000101001000010 is then concealed in each binary string using LSB. Each pixel conceals two secret message bits to generate the stego-binary string. The watermark is concealed in both sub-blocks. Each sub-block owns one watermark. The results are shown in Figure 11c. Finally, the proposed scheme transforms the binary string into a decimal number to get the stego-pixels, such as in Figure 11e. The watermark is also concealed in B

_{B}to get the stego-block B’

_{B}, such as in Figure 11f.

#### 3.3. Tamper Detection Phase

- Step 1:
- Watermark extraction and block detection
- Divide the block into two $2\times 4$-sized sub-blocks.
- Extract two embedded bits from each stego-pixel to generate a watermark with sixteen bits for each sub-block. The watermark is w’ = MSB_DC
_{A}|| MSB_DC_{B}|| $\beta \prime $ || $t\prime $. - Compare two extracted watermarks. If the watermark of the first sub-block is different from that of the second sub-block, then the block is suspicious.

- Step 2:
- Sub-block detection for suspicious blocks
- Use XOR operator bitwise on the fourteen bits of each watermark to generate a debugging bit ${\beta}^{*}$.
- Compare ${\beta}^{*}$ with the 15th bit of the watermark ${\beta}^{\prime}$. If ${\beta}^{*}$ does not equal to ${\beta}^{\prime}$, then the block is invalid.
- Compare $~{\beta}^{*}$ with the 16th bit of the watermark ${t}^{\prime}$. If $~{\beta}^{*}$ does not equal to ${t}^{\prime}$, then the block is invalid.

- Step 3:
- Corresponding block detection
- Transform the block using DCT to obtain the coefficient DC values DC
_{A}and DC_{B}from the block pair $\left({B}_{A}^{\prime},{B}_{B}^{\prime}\right)$. - Extract the seven most significant bits from DC
_{A}and DC_{B}, called MSB_DC*_{A}and MSB_DC*_{B}. - If MSB_DC*
_{A}$\ne $ MSB_DC_{A}or MSB_DC*_{B}$\ne $ MSB_DC_{B}, then the block is valid. Otherwise, the block is invalid.

- Step 4:
- Closed neighboring detection for the valid block.
- If more than five close neighboring blocks are marked invalid, then the block is invalid.

#### 3.4. Image Recovery Phase

- Step 1:
- Corresponding block recovery
- If both B’
_{A}and B’_{B}are invalid, then the block cannot be recovered. The block is ignored, and the scheme continues to recover other blocks. - Retrieve sixteen bits w’ from the valid block.
- If the block is valid, extract seven bits string from w’, which starts from the 1st bit to the 7th bit as MSB_DC
_{A}, and the bit string starts from the 8th bit to 14th bit as MSB_DC_{B}. - Randomly pad one 0 or 1 to the end of MSB_DC
_{A}and MSB_DC_{B}to form new DC values. - Replace the DC value of the invalid block with the new DC value and transform the coefficients into pixels using inverse DCT.
- Mark the block as valid.

- Step 2:
- Neighboring blocks recovery
- Recover the remaining invalid blocks using the neighboring blocks. The pixel values of the surrounding blocks are used to replace the pixel value of the invalid block.

## 4. Experimental Results

^{®}Core(TM) i7-6700 CPU @ 3.40 GHz 3.40 GHz, 16GB RAM.

## 5. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Tirkel, A.Z.; Rankin, G.A.; Van Schyndel, R.M.; Ho, W.J.; Mee, N.R.A.; Osborne, C.F. Electronic Water Mark. Available online: http://goanna.cs.rmit.edu.au/~ronvs/papers/DICTA93.PDF (accessed on 28 December 2017).
- Mielikainen, J. LSB matching revisited. IEEE Signal Process. Lett.
**2006**, 13, 285–287. [Google Scholar] [CrossRef] - Lyu, W.L.; Chang, C.C.; Wang, F. Image authentication and self-recovery scheme based on the rehashing model. J. Inf. Hiding Multimed. Signal Process.
**2016**, 7, 460–474. [Google Scholar] - Yu, M.; Wang, J.; Jiang, G.; Peng, Z.; Shao, F.; Luo, T. New fragile watermarking method for stereo image authentication with localization and recovery. AEU-J. Electron. Commun.
**2015**, 69, 361–370. [Google Scholar] [CrossRef] - Qi, X.; Xin, X. A singular-value-based semi-fragile watermarking scheme for image content authentication with tamper localization. J. Visual Commun. Image Represent.
**2015**, 30, 312–327. [Google Scholar] [CrossRef] - Al-Otum, H.M. Semi-fragile watermarking for grayscale image authentication and tamper detection based on an adjusted expanded-bit multiscale quantization-based technique. J. Vis. Commun. Image Represent.
**2014**, 25, 1064–1081. [Google Scholar] [CrossRef] - Huang, F.J.; Qu, X.C.; Kim, H.J. Reversible data hiding in JPEG images. IEEE Trans. Circuits Syst. Video Technol.
**2016**, 26, 1610–1621. [Google Scholar] [CrossRef] - Khayam, S.A. The Discrete Cosine Transform (DCT): Theory and Application. 2003. Available online: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.184.6102 (accessed on 20 December 2017).
- Kornblum, J.D. Using JPEG quantization tables to identify imagery processed by software. Digital Investig.
**2008**, 5, 21–25. [Google Scholar] [CrossRef] - Lu, T.C. Diagonal watermark scheme for image manipulation detection and recovering. Commun. CCISA
**2012**, 18, 41–58. [Google Scholar]

**Figure 3.**The DCT coefficients of Figure 2.

Time(s) | Embedding Processing | Extraction Processing | Recovering Processing | |||
---|---|---|---|---|---|---|

DCT | XOR | Embedding | Total | |||

Boat | 1.30 | 2.49 | 1.01 | 4.80 | 1.24 | 1.40 |

Barbara | 1.30 | 2.45 | 0.99 | 4.74 | 1.24 | 1.40 |

Mandrill | 1.31 | 2.46 | 0.99 | 4.76 | 1.25 | 1.41 |

Pepper | 1.30 | 2.46 | 0.99 | 4.76 | 1.25 | 1.41 |

Man | 1.30 | 2.46 | 0.99 | 4.75 | 1.24 | 1.40 |

Lena | 1.31 | 2.48 | 1.01 | 4.80 | 1.25 | 1.40 |

Average | 1.31 | 2.47 | 1.00 | 4.77 | 1.25 | 1.40 |

Image | Method | Boat | Barbara | Mandrill | Pepper | Lena |
---|---|---|---|---|---|---|

Stego-Image | Proposed | 46.30 dB | 45.95 dB | 46.36 dB | 46.24 dB | 46.18 dB |

Lu’s | 38.43 dB | 38.23 dB | 38.20 dB | 38.31 dB | 38.26 dB | |

Recovered Image | Proposed | 37.50 dB | 37.15 dB | 37.69 dB | 39.33 dB | 37.77 dB |

Lu’s | 31.50 dB | 31.98 dB | 32.70 dB | 33.52 dB | 33.10 dB |

Device | File Name | Size | Time (s) | PSNR |
---|---|---|---|---|

PC | Lena | 1252 $\times $ 1252 | 10.4393 | 46.16 |

Jerry | 2016 $\times $ 1512 | 19.7033 | 45.32 | |

Shirly | 4032 $\times $ 3024 | 78.2458 | 46.08 | |

iPad | Lena | 1252 $\times $ 1252 | 11.5551 | 46.16 |

Jerry | 2016 $\times $ 1512 | 27.7589 | 45.32 | |

Shirly | 4032 $\times $ 3024 | 91.1173 | 46.08 |

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Chang, C.-C.; Lu, T.-C.; Zhu, Z.-H.; Tian, H.
An Effective Authentication Scheme Using DCT for Mobile Devices. *Symmetry* **2018**, *10*, 13.
https://doi.org/10.3390/sym10010013

**AMA Style**

Chang C-C, Lu T-C, Zhu Z-H, Tian H.
An Effective Authentication Scheme Using DCT for Mobile Devices. *Symmetry*. 2018; 10(1):13.
https://doi.org/10.3390/sym10010013

**Chicago/Turabian Style**

Chang, Chin-Chen, Tzu-Chuen Lu, Zhao-Hua Zhu, and Hui Tian.
2018. "An Effective Authentication Scheme Using DCT for Mobile Devices" *Symmetry* 10, no. 1: 13.
https://doi.org/10.3390/sym10010013