## 1.

## Introduction

Several means have been proposed to protect media data, among which, media encryption^{1} and digital watermarking^{2} have been attracting more and more researchers. Media encryption encodes media data into an unintelligible form, which protects media data’s confidentiality. Digital watermarking embeds identification information into media data imperceptibly, which protects media data’s ownership. Because they realize different functionalities, the two means are often applied independently. To remain secure, they can be used together. For example, media data are first watermarked, and then encrypted. However, in this case, the encrypted media data should be decrypted before the watermark can be extracted or another watermark can be embedded.

It is secure to commutate watermarking and encryption,^{3} although it is still difficult to find a practical solution. As a commutative watermarking and encryption process, the following condition is satisfied:

## Eq. 1

$$\{\begin{array}{c}M={\mathrm{E}}_{\mathrm{m}}(C,W,{K}_{w})={\mathrm{E}}_{\mathrm{m}}[{\mathrm{E}}_{\mathrm{n}}(P,{K}_{c}),W,{K}_{w}]\hfill \\ M={\mathrm{E}}_{\mathrm{n}}({P}^{\prime},{K}_{c})={\mathrm{E}}_{\mathrm{n}}[{\mathrm{E}}_{\mathrm{m}}(P,W,{K}_{w}),{K}_{c}].\hfill \end{array}$$In the past decade, some partial encryption algorithms have been reported that encrypt only some significant parts of the media data, such as the significant frequency bands, bit planes, and/or coding passes in JPEG2000 images,^{4, 5} the motion vectors or discrete cosine transform (DCT) coefficients in MPEG2 streams,^{6, 7} and the intraprediction modes and/or DCT coefficients in advanced video coding.^{8, 9} Similarly, media watermarking often embeds watermark information into parts of media data, such as the dc or ac’s in DCT blocks,^{10, 11} and the wavelet coefficients in middle frequency bands.^{12, 13} Considering that these operations are often applied to media data partially, it is possible to combine watermarking and encryption together. In the following, we present a commutative watermarking and encryption scheme that encrypts and marks media data partially or selectively.

## 2.

## Proposed Commutative Scheme

The proposed scheme is shown in Fig. 1. Here, $P$ , $C$ , $M$ , ${P}^{\prime}$ , $W$ , ${K}_{c}$ , and ${K}_{w}$ denote the original media, cipher media, watermarked cipher media, watermarked media, watermark, encryption key and decryption key, respectively; and ${E}_{n}\left(\right)$ , ${D}_{e}\left(\right)$ , ${E}_{m}\left(\right)$ , and ${E}_{x}\left(\right)$ denote the encryption function, decryption function, watermark embedding function, and watermark extraction function, respectively. The original media $P$ is partitioned into two parts: the significant part $X$ and the other part $Y$ . Among them, $X$ will be encrypted, and $Y$ will be watermarked. Thus, $P=X\mid \mid Y$ , $C=Z\mid \mid Y$ , $M=Z\mid \mid {Y}^{\prime}$ , and ${P}^{\prime}=X\mid \mid Y$ . The proposed commutative scheme is defined as follows.

1. The partial encryption/decryption process is

2. The selective watermark embedding/extraction process is

3. The commutative encryption and watermarking process is

## Eq. 4

$$\{\begin{array}{c}M={\mathrm{E}}_{\mathrm{m}}[{\mathrm{E}}_{\mathrm{n}}(X\mid \mid Y,{K}_{c}),W,{K}_{w}]={\mathrm{E}}_{\mathrm{m}}(Z\mid \mid Y,W,{K}_{w})=Z\mid \mid {Y}^{\prime}\hfill \\ M={\mathrm{E}}_{\mathrm{n}}[{\mathrm{E}}_{\mathrm{m}}(X\mid \mid Y,W,{K}_{w}),{K}_{c}]={\mathrm{E}}_{\mathrm{n}}(X\mid \mid {Y}^{\prime},{K}_{c})=Z\mid \mid {Y}^{\prime}.\hfill \end{array}$$4. The watermark extraction process is

## 3.

## Practical Scheme Based on Wavelet Codec

Based on wavelet transformation, we propose the commutative scheme shown in Fig. 2. Here, the $M\times N$ image is transformed by a four-level wavelet.

1. The subbands in the lowest level ( ${\mathrm{LL}}_{3},{\mathrm{LH}}_{3},{\mathrm{HL}}_{3}$ , and ${\mathrm{HH}}_{3}$ ), composed of $(M\u22158)\times (N\u22158)$ coefficients, are encrypted completely. The algorithms proposed in Refs. 4, 5 can be used.

2. The subbands in the high level ( ${\mathrm{LH}}_{1},{\mathrm{HL}}_{1},$ {\mathrm{HH}}_{1},{\mathrm{LH}}_{0},{\mathrm{HL}}_{0} , and ${\mathrm{HH}}_{0}$ ), composed of $3\times \left[\right(M\u22154)\times (N\u22154)+(M\u22152)\times (N\u22152\left)\right]$ coefficients, are encrypted with sign encryption, which keeps the coefficient amplitudes unchanged.

3. The subbands in the middle level ( ${\mathrm{LH}}_{2},{\mathrm{HL}}_{2}$ , and ${\mathrm{HH}}_{2}$ ), composed of $3\times (M\u22158)\times (N\u22158)$ coefficients, are both encrypted and watermarked. The encryption algorithm is sign encryption, and the watermarking algorithm can be spread spectrum method,

^{14}the quantization index modulation (QIM) method,^{15}the methods proposed in Refs. 12, 13, etc.

In our scheme, the selection of the wavelet coefficients in middle frequency depends on the requirements of security and robustness. Without considering sign encryption, the more the coefficients in the low-frequency band are encrypted, the more confused is the encrypted image. Figure 3 shows the relation between the encrypted frequency band and the quality of the encrypted image. The coefficients are encrypted with the Advanced Encryption Standard (AES) as proposed in Ref. 4. Similarly, the more watermarked coefficients are in the low-frequency bands, the more robust the watermark is to signal processing operations (compression, noise, filtering, etc.). Figure 4 gives the relation between the watermarked frequency band and the robustness to JPEG2000 compression. The QIM method^{15} is used as the watermark algorithm. To obtain a trade-off between the security and robustness, the coefficients in the highest level frequency bands (
${\mathrm{LL}}_{4},{\mathrm{HL}}_{4},{\mathrm{LH}}_{4}$
, and
${\mathrm{HH}}_{4}$
) should be encrypted, and the coefficients in the second highest level frequency bands (
${\mathrm{HL}}_{3},{\mathrm{LH}}_{3}$
, and
${\mathrm{HH}}_{3}$
) can be watermarked.

This method can be combined with JPEG2000; that is, the image can be compressed and encrypted/watermarked simultaneously. The watermark is embedded immediately after quantization, coefficient encryption, and sign encryption can be applied following the entropy encoding process. As an example, “Airplane” (colorful, $256\times 256$ ) is encrypted partially, then watermarked with QIM, finally decrypted and extracted. The results in Fig. 5 show that the scheme is commutative.

## 4.

## Conclusions and Future Work

We proposed a commutative encryption and watermarking scheme that is based on partial encryption. Based on the scheme, a commutative image encryption and watermarking algorithm in wavelet codec was presented, and the trade-off between security and robustness was analyzed. The encryption/watermarking algorithm can be combined with JPEG2000 codec, which is time-efficient compared with the compression process. In future work, the commutative scheme’s security and robustness and its extension to other codecs will be further studied.

## Acknowledgments

The authors want to thank editors for their great help and reviewers for their valuable advice.

## References

**,” IEEE Trans. Multimedia, 5 (1), 118 –129 (2003). 1520-9210 Google Scholar**

*Efficient frequency domain selective scrambling of digital video***,” (2005) http://www.ecrypt.eu.org/documents/D.WVL.5-1.0.pdf Google Scholar**

*TR: IST-2002-507932 ECRYPT European Network of Excellence in Cryptology***,” 65 –72 (2004). Google Scholar**

*A selective image encryption scheme based on JPEG2000 Codec***,” 9 (3), 279 –287 (2003) Google Scholar**

*Selective encryption of wavelet-packet encoded image data: efficiency and security***,” 219 –230 (1996). Google Scholar**

*Methods for encrypting and decrypting MPEG video data efficiently***,” 386 –393 (2004). Google Scholar**

*Digital video scrambling method using intra prediction mode***,” 281 –290 (2005). Google Scholar**

*Selective video encryption based on advanced video coding***,” IEEE Trans. Circuits Syst. Video Technol., 10 (6), 974 –979 (2000). https://doi.org/10.1109/76.867936 1051-8215 Google Scholar**

*Embedding image watermarks in DC components***,” IEEE Trans. Image Process., 9 (1), 55 –68 (2000). https://doi.org/10.1109/83.817598 1057-7149 Google Scholar**

*DCT-domain watermarking techniques for still images: detector performance analysis and a new structure***,” Proc. SPIE, 4657 659 –670 (2002). 0277-786X Google Scholar**

*New semi-fragile image authentication watermarking techniques using random bias and non-uniform quantization***,” (1998). Google Scholar**

*A new wavelet-based scheme for watermarking images***,” IEEE Trans. Image Process., 6 (12), 1673 –1687 (1997). https://doi.org/10.1109/83.650120 1057-7149 Google Scholar**

*Secure spread spectrum watermarking for multimedia***,” IEEE Trans. Inf. Theory, 47 (4), 1423 –1443 (2001). https://doi.org/10.1109/18.923725 0018-9448 Google Scholar**

*Quantization index modulation: a class of provably good methods for digital watermarking and information embedding*