Chapter 4 Lossless Visible Watermarking for Copyright Protection of Videos
4.2. Proposed Lossless Visible Watermarking Method
4.2.3. Watermark Image Embedding Process
In the process of embedding of watermark image, the macroblock of each I-frame are taken as a unit. Each macroblock includes six blocks of 8×8 pixels, four luminance blocks, and two chrominance blocks. In order to retain the black watermark pixels in a macroblock, a modification is made in the DC coefficient in every block in the macroblock. If the embedded watermark pixel is a white pixel, no change will be done in the DC coefficient in the macroblock. A flowchart of the watermark image embedding process is shown in Figure 4.5 and a corresponding detailed algorithm is described in the following.
Algorithm 4.1: Watermark image embedding process
Input: An I-frame F expect the first one, a user key K, and a binary watermark W.
Output: A watermarked I-frame F′ with a visible watermark.
Steps:
1. Use the user input key K as a seed for a random number generator to produce two random sequence S and S′. S is a sequence of m×n elements with its value being in the range of 0 through 255 and S' is a sequence of m×n elements which are either 0 or 1, where m is the number of GOBs in every frame and n is the number of macroblocks in every GOB. Denote S and S′ as follows:
S = {Sij | i = 1, 2, …, m and j = 1, 2, …, n } S′ = {S'ij | i = 1, 2, …, m and j = 1, 2, …, n }.
2. For each macroblock in the input I-frame, the modification of the DC coefficient
Cdc will be made to every block in this macroblock as follows:
set = XOR ' , if =1 and =1;
set = NXOR ' , if =1 and =0;
keep unchanged, otherwise.
dc dc ij ij ij
dc dc ij ij ij
dc
C C S W S
C C S W S
C
⎧⎪
⎨⎪
⎩
Figure 4.5 Flowchart of the watermark image embedding process.
4.2.4.
W
Watermarking Information Embedding Process
In the proposed method, we use the first I-frame of the videos to record the watermarking information for lossless recovery. Hence, the watermarked videos can be recovered without the watermark image. We use a recording token which is fit in with the H.263 format but will not be used in normal encoding to record a black watermark pixel.
As mentioned in Section 4.2.1, some codes of LEVEL in FLC are not used, such as (00000000)2 and (10000000)2. Therefore, we use the token which is a combination of the ESCAPE code, the LAST with its code being (1)2, the RUN with its code being (000000)2, and the LEVEL with its code being (00000000)2. The structure of the recording token is shown in Figure 4.6 and a flowchart of the embedding process is shown in Figure 4.7. A detailed algorithm is described as follows.
Algorithm 4.2: Process of watermarking information embedding.
Input: The first I-frame F of a video, the watermark image W, and the recording token T.
Output: A recorded I-frame F′.
Steps:
1. For every macroblock in F, take the first luminance block as the recording block.
2. Find the last coefficient code C in the block and modify the block data as follows:
change into the non-last code and insert the recording token , if the = 1;
no change to , otherwise.
C T ij
C
⎧⎨
⎩
ESCAPE LAST RUN LEVEL Binary format 0000 011 1 0000 00 0000 0000
Figure 4.6 Structure of the recording token.
Figure 4.7 Flowchart of watermarking information embedding process.
4.2.5. Recovery of Watermarked 3GP Video by Removing Visible Watermarks
When the server receives requests for the watermarked video, it uses the user input key to recover the watermarked video and then delivers it to the client. If the input key is wrong, the watermark can not be removed losslessly, thus achieving the purpose of copyright protection. The recovery process is shown in Figure 4.8 and a detailed algorithm is described as follows.
Algorithm 4.3: The process of recovery of watermarked videos
Input: A user input key K and a watermarked video V.
Output: A recovered video V′. Steps:
1. Use the user input key K as a seed for a random number generator to produce two random sequence S and S' different types, where S is a sequence of m×n elements with its value being in the range of 0 through 255 and S′ is a sequence of m×n elements which are either 0 or 1, where m is the number of GOBs in every frame and n is the number of macroblocks in every GOB. Denote S and S′ as follows:
S = {Sij | i = 1, 2, …, m and j = 1, 2, …, n };
S′ = {S′ij | i = 1, 2, …, m and j = 1, 2, …, n }.
2. Extract the video track Tv and audio track Ta from V.
3. For the first I-frame in Tv, search and remove the recording token and record the watermarking information in W which is an m×n matrix. If there is a recording
token in the corresponding macroblocks, set Wij as 1; else, as 0.
4. For every macroblock Mij of the following I-frames in Tv, modify the DC coefficient Cdc of the blocks as follows:
set = XOR ' , if =1 and =1;
set = NXOR ' , if =1 and =0;
keep unchanged, otherwise.
dc dc ij ij ij
dc dc ij ij ij
dc
C C S W S
C C S W S
C
⎧⎪
⎨⎪
⎩
5. After every I-frame is processed, the recovered video track Tv' is produced.
Combine Tv' and Ta into a 3GP video V'.
Figure 4.8 Flowchart of recovery process.
4.3. Experimental Results
In our experiments, a watermarked video was put on a public web page. When a user browses this web page, the key is needed to recover the watermarked video and then the recovered video can be download. A watermarked video is shown in Figure 4.9 and the procedure of downloading the shared videos from the web server is shown in Figure 4.10.
(a) (b)
(c) (d)
(e) (f) Figure 4.9 Some frames extracted from the watermarked videos. (a) The first
I-frame with the watermark information embedded. (b) (c) (d) (e) (f) Some frames after watermarking with user input key.
(a) (b)
(c) (d) Figure 4.10 Procedure of downloading the shared videos. (a) Browse the movie list
of the shared watermarked videos by browser. (b) After choosing the movies, the key is requested. (c) The downloading process. (d) Display of the downloading video.
Some frames from the recovered video with correct and incorrect keys are shown in Figure 4.11 and Figure 4.12, respectively.
(a) (b)
(c) (d)
(e) (f)
Figure 4.11 Illustration of the recovered video with the correct key. (a) (b) (c) (d) (e) (f) Some frames extracted from the recovered video with the correct key.
(a) (b)
(c) (d)
(e) (f)
Figure 4.12 Illustration of the recovered video with an incorrect key. (a) (b) (c) (d) (e) (f) Some frames extracted from the recovered video with the incorrect key.
4.4. Discussions
In this chapter, a lossless watermarking technique for videos has been proposed.
Users can share their videos on the Internet with more security. Even though the web server is cracked by hackers, the watermarked videos are still defended by the proposed watermark technique for copyright protection. Furthermore, the watermarked videos can be shared to the people who know the protected key of the videos. Without the correct key, the watermarked videos cannot be losslessly recovered. The complexity of recovery of the watermarked videos with the correct key is up to (256)n, where n is the number of macroblocks whose DC values are changed by the watermark embedding process.
Chapter 5
Covert Communication by Videos on Mobile Phones
5.1. Introduction
Due to the advance of mobile computing technologies and the high capacity network, more and more applications on mobile phones are developed. Because of the popularity of using mobile phones, the application of data hiding on mobile phones is useful.
Since video transmission on the Internet is common, a method of covert communication by videos is proposed in this chapter. In Section 5.2.1, the proposed method is described and in Section 5.2.2, a detailed algorithm is presented. In Section 5.3, some experimental results will be shown and in Section 5.4, some discussions will be made.
5.2. Proposed Data Hiding Method for Covert Communication
The idea of the proposed application of covert communication is achieved by transmission of covert videos, in which a secret message is embedded. This application on mobile phones is composed of two parts: the web server in which there are some covert videos in which secret messages are embedded, as well as the client application on a mobile phone which may be used to download covert videos and extract the secret message. A system configuration is shown in Figure 5.1.
Figure 5.1 System configuration of proposed covert communication method.
5.2.1. Proposed Idea Using AC Coefficients of DCT
As mentioned in Section 4.2.1, there are two kinds of encoding formats of the AC coefficients of the DCT in the block layer in the H.263 format: the VLC encoding and the FLC encoding. There are 127 codes encoded by the VLC and the others are encoded by the FLC.
The proposed method of embedding secret messages in videos is achieved by changing the VLC code to the FLC code. For every intra-coded macroblock, if there are VLC codes, we can use them to embed the secret message. A flowchart of the secret embedding process is shown in Figure 5.2.
Figure 5.2 Flowchart of the secret embedding process.
5.2.2. Detailed Algorithm
Because I-frames are coded without referencing to other frames, all macroblocks in an I-frame are intra-coded. Every intra-coded macroblock is composed of six blocks. The coding fashion is similar to the compression technique of the JPEG standard. A DCT-based method is applied.
Every block can be used to hide secret messages by making a slight modification of the AC coefficients of the DCT. A detailed algorithm is described as follows and
the process is shown in Figure 5.3.
Algorithm 5.1: Hiding process for videos.
Input: A video V, a secret message D, and a user’s key K.
Output: A stego-video V′. Steps:
1. Take K as the input of a random number generator to generate a sequence S of bytes with the same size as D.
2. For every byte in D, perform the Exclusive-OR operation on the i-th byte of D and the i-th byte of S to generate the i-th byte of D′, where D′ is a sequence of bytes with the same length as D.
3. Set S as the binary format of D′ with N bits. Denote S as follows:
S = {Sj | j = 1, 2, …, N }.
4. For every I-frame in V, read the data of every block and search the VLC code token. If the encoding bit Sk is 1, change the VLC token to the corresponding FLC code; else, do nothing. That is, perform the following operation:
Change the VLC token into FLC token, if is 1;
Make no modification, otherwise.
Sk
⎧⎪⎨
⎪⎩
5. Repeat Step 4 until all bits in S are encoded completely.
Figure 5.3 The flowchart of embedding process
When a user uses the client program on a mobile phone, he/she inputs the address of the covert video to download it and then inputs a key to recover the secret message. A detailed algorithm is described in the following and the process is shown in Figure 5.4.
Algorithm 5.2: Extracting of a secret message.
Input: The covert video V and a user key K.
Output: A secret message S.
Steps:
1. Search for every AC coefficient token T in the intra-coded blocks of V.
2. Check the encoding type of T. If the token is an FLC token, go to Step 3;
else, go to Step 4.
3. Check if the coded pair of (LAST, RUN, LEVEL) were encoded in the VLC code originally. If so, take the hidden bit to be 1; else, ignore the FLC token. Go to Step 5.
4. If the encoding type of T is a VLC token, take the hidden bit to be 0.
5. Transform the binary format secret into byte data Spre.
6. Take K as the input to a random number generator to generate a sequence B of bytes with the same size as Spre.
7. For every byte in Spre, perform the exclusive-OR operation on the i-th byte of Spre and the i-th byte of B to generate the i-th byte of S.
Covert video
Figure 5.4 A flowchart of secret message extracting process
5.3. Experimental Results
In our experiments, a video in which a secret message is embedded is put on the Internet. When a user gets the video, the secret message can be extracted and recovered by the use of the user key. The video with a secret message embedded is shown in Figure 5.5.
(a) (b)
(c) (d) Figure 5.5 Comparison between the original video and the stego-video.(a) (c) (e) (g)
(i) (k) The original frames of the video. (b) (d) (f) (h) (j) (l) The frames after a secret message is embedded with a user key.
(e) (f)
(g) (h)
(i) (j) Figure 5.5 Comparison between the original video and the stego-video.(a) (c) (e) (g)
(i) (k) The original frames of the video. (b) (d) (f) (h) (j) (l) The frames after a secret message is embedded with a user key(continued).
(k) (l) Figure 5.5 Comparison between the original video and the stego-video.(a) (c) (e) (g)
(i) (k) The original frames of the video. (b) (d) (f) (h) (j) (l) The frames after a secret message is embedded with a user key(continued).
Then the process of getting a secret message from a stego-video is shown in Figure 5.6.
(a) (b) Figure 5.6 Process of getting a secret message from a stego-video.(a) Downloading
movies by keying in a public URL. (b) Sending the request. (c) Inputting the key to extract and recover the secret message. (d) The secret message extracted by a correct key. (e) Inputting a wrong key. (f) The result of extracting the secret message by a wrong key.
(c) (d)
(e) (f) Figure 5.6 Process of getting a secret message from a stego-video.(a) Downloading
movies by keying in a public URL. (b) Sending the request. (c) Inputting the key to extract and recover the secret message. (d) The secret message extracted by a correct key. (e) Inputting a wrong key. (f) The result of extracting the secret message by a wrong key(continued).
5.4. Discussions
In this chapter, a covert communication technique by videos has been proposed.
The video files used here are very large. Hence, the size of the secret message can be huge. This is an advantage of the proposed method. Not only text messages but also pictures can be embedded into videos for transmission. A key is used to increase the security of covert communication. Covert communication by mobile devices is very convenient. By the proposed method, large volumes of secret data can be transferred securely.
Chapter 6
Secret Message Sharing on Mobile Phones by An Information Sharing Technique
6.1. Introduction
With the increasing of the population of carrying mobile phones, sharing secret messages by the mobile phone is very convenient. Shares of a secret can be stored in the mobile phone and collected together by the SMS to compose the original secret message.
The size of a message transmitted between mobile phones is usually limited.
Hence, the size of a share cannot exceed the size limit of a message. On the other hand, we adopt the basic idea of secret sharing proposed by Huang and Tsai [6] as mentioned in Chapter 2. And some modification of their method is made in this study to fit in with the size limit of short messages.
The proposed secret sharing method is described in Section 6.2. Some experimental results will be shown in Section 6.3. Finally, some discussions will be made in Section 6.4.
6.2. Proposed Secret Sharing Method
The system configuration of the proposed method is described in Figure 6.1.
Some application can adopt this method. For example, the manager of several agents
can assign a job to the agents that must be completed together. The manager creates shares of the content of the job and then uploads the shares on the Internet. Then, each agent can download one piece of shares by the client program on his/her mobile phone and transmits the share by SMS to a specific agent who can recover the content of the job.
In this section, the focus is on the employed process of secret sharing. In Section 6.2.1, a process of creation of secret shares from a pure text secret is described. In Section 6.2.2, a process of fitting a large noise share into a mobile phone message is described, and a process of disguising noise shares by a steganographic scheme is also proposed. Finally, a process of pure text secret recovery is described.
Figure 6.1 System configuration of proposed method.
6.2.1. Creation of Secret Shares
Figure 6.2 Flowchart of secret pure text sharing process.
Figure 6.2 shows the process of sharing a secret text S among participants and creating steganographic effects on the noise data yielded by the secret sharing process.
Suppose that the number of participants is n. First, n texts T1, T2, …,Tn are selected
from a text database. Second, these n texts are taken as input to a random number generator to generate n stego-texts with their lengths all the same as that of S. Third, exclusive-OR S with the n stego-texts to generate a string of noise data, which is a sequence of meaningless bytes. The string is then partitioned into n pieces, denoted as ND1, ND2, …, NDn. They are then translated into simple sentences to form n stego-shares SS1, SS2, …, SSn which are meaningful. Finally, each SSi is appended to the front of Ti to produce n final shares. The procedure of creation of secret shares is described as an algorithm in the following.
Algorithm 6.1: Creation of secret shares.
Input: Secret text S with length L in bytes, a text database TDB, and the number n of participants.
Output: n pieces of share data Di, for i = 1, 2, … , n.
Steps:
1. For i = 1 to n, choose a piece of text Ti from TDB.
2. For i = 1 to n, take Ti as input to a random number generator to generate one piece of stego-texts STi with L bytes.
3. Create an empty text PN with L bytes. Set PN = ST1. 4. For i= 2 to n, do the following steps.
i. For k = 1 to L, set PN(k) = PN(k) ⊕ STi(k), where ⊕ means the exclusive-OR operation.
5. Partition PN into n pieces of data, denoted as NDi, for i = 1 to n.
6. For i=1 to n, translate NDi into a simple sentence to produce a piece of text,
Fitting Large Noise Share into Mobile Phone Message
There are two steps made in this study to fit the size of shares to the size limit of mobile phone messages. First, the stego-texts are generated as short-lengthed texts.
Because of the variation of the lengths of secret texts, the texts selected from the text database cannot be used directly. However, this problem can be solved by using a random number generator to generate stego-texts with lengths all the same as that of the secret message. Hence, if the length of a secret text is out of the size limit of the SMS, we can still use the short texts which fit the size limit of the SMS.
Second, the exclusive-ORed noise data is partitioned into n pieces. This step is to disperse the content of the noise data.
Steganographic scheme for Disguising Noise Share
As mentioned in Section 6.2.1, the n pieces of noise data are translated to simple sentences by a sentence translation machine designed in this study. First, the machine transforms the noise data to its binary format. Then, the result is divided into several parts and each part is encoded into a simple sentence by certain sentence patterns and a database of words.
The technique uses four sentence patterns, the subject-verb-object pattern, the subject-be-adjective pattern, the pronominal-be-number-object pattern, and the subject-be-article-career pattern. Each pattern can be represented with two bits. And five databases, a name database, a verb database, an adjective database, a career database, and, a noun database are designed. The index of each word in the databases represents a sequence of bits. Before the binary format of the noise data is encoded, the length and the index of the noise data will be encoded first. A flowchart of the proposed noise data translation process is shown in Figure 6.3 and the details are described in Algorithm 2.
Figure 6.3 Flowchart of noise data translation process.
Some examples of words in the five databases are shown as follows:
(3) The adjective database:
nascent
last
And some examples of sentences generated with the four sentence patterns
Algorithm 6.2: Translation of noise data to simple sentences.
Input: A noise data NDk where k is an index.
Output: An encoded string Se. Steps:
1. Transform NDk to its binary format denoted as BND. Set n as the number of bits in BND.
2. Transform k and n to their binary forms, and denote the results as bk and bn.
3. Combine bk, bn, and BND together to form a bit string BBc. Let L be the
5. Apply the sentence pattern A, the subject-verb-object pattern. Perform the following steps.
i. Extract the initial 9 bits of BBc, starting at j and denote the result as S. Replace S with the item whose index is S in the name database
and append the item to Se. Set j = j+9.
ii. Extract the initial 8 bits of BBc, starting at j and denote the result as V. Replace V with the item whose index is V in the verb database
and append the item to Se. Set j = j+8.
iii. Extract initial 9 bits of BBc started at j and denote as O. Replace O to the item whose index is O in the verb database and append the item to Se. Then, the punctuation “.” and a space are appended to the back of the sentence. Finally, set j = j+9.
iii. Extract initial 9 bits of BBc started at j and denote as O. Replace O to the item whose index is O in the verb database and append the item to Se. Then, the punctuation “.” and a space are appended to the back of the sentence. Finally, set j = j+9.