• 沒有找到結果。

3.   SYSTEM DESIGN

3.1   System Structure

In this way, we can set our own signature or unique watermark into our videos to protect the intelligent authentication and also we can embed some text, which may be a code in the video. We use the function to protect our digital content authentication by embedding watermark in it. Whenever our video is duplicated or distributed by unauthorized users, we can claim the authority of the videos by extracting our own authentication.

3.1 System Structure

The whole system can be separated into three main parts, including the front-end, back-end and the data processing.

Figure 11. System Architecture (Encryption) Carrier (Video)

Figure 12. System Architecture (Decryption)

In the front-end, we use some general web skill, such as HTML, CSS and Javascript. Use AngularJS [35] as the framework that is provided by Google to implement our website presentation.

In the back-end, we use PHP as programing language and implement Model-View-Control (MVC) [32]design pattern to set up an API (Application Interface) service. With these APIs, we can connect the front-end and our database for data presentation, communication and manipulation.

The data processing is the most important part of the three. In this part we use OpenPuff [23] application to resolve data hiding of encryption and decryption.

OpenPuff [23] has been discussed in the previous section. However, the author of it didn’t publish the source code so that we implement the encryption and decryption with another program named 按鍵精靈 9[27]. We use it in order to automate the data

Carrier (Video)

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

hiding function by simulating mouse to click the button on OpenPuff [23] for all the embedding work.

Figure 13. Simulating mouse by按鍵精靈 9

Figure 14. The interface of OpenPuff[23]

This is the interface of OpenPuff[23], the functions we use is Hide and Unhide.

We use these two functions to hide image into video, and to extract it from video so we need to follow some rules of this software.

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

Figure 15. The data hiding function

In this page, we need to insert three passwords as the keys for encryption, which we could get from our database after they are inserted by the user in our website.

Then, we have to choose a carrier and an embedded file. In our research, we focused on hiding image or text in video format.

Figure 16. The data unhiding function

This page is the screenshot of data unhiding function, we need to insert the

exactly the same three keys to decryption. Then select a carrier file.

For all the steps of encryption and decryption, we use 按鍵精靈 9[27] to

recorded every step of mouse’s positions to automate the function as mention above.

We use it to write scripts to record every step of the embedding and extracting work like the screenshot.

Figure 17. The data flow for script of按鍵精靈 9

First, we have to let the mouse move to the position (x,y), then left click the button. Sometimes, we need a delay between actions to wait the program executing.

The script will load one established text file to get the variable including the input path of image and video, the inserted passwords and the output path. The variables will be output at the step of selecting the file, inserting passwords or selecting the path of output finished file.

Figure 18. A part of 按鍵精靈 9 code

About the information in the text file, we store them in the database by php and Insert

use java to establish the text file for按鍵精靈 9. After all the steps, we’ll output them

as .exe files. These .exe files will be executed whenever java scheduler calls it because of discovering the new input video.

Moreover, another providing function is embedding text in the video. When we want to embed text into the video, we use php to create a text file and save it as a bmp file. The action can mislead OpenPuff[23] as it will regard the text file as an image. In this way, the steps of embedding text are the same as embedding image. The variable keyText is somewhat we want to embed in the video.

Figure 19. PHP code of changing text into image

However, Openpuff [23] has a few limitations on the input files. As show in the figure we mentioned in chapter two. Three passwords cannot be similar with each other or we would not pass the examination by the tool to go to the next step. Also, the input size has to be many times bigger than the embedded data size or all the steganography work will not start. According to our testing, a 250 mb carrier can only embed approximately 3kb image. We need to follow all of these rules or we cannot complete the steganography work, and we cannot return the finished video to our user.

The last part of the system is about the Scheduler. We schedule jobs in Java, and

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

detect whether the file is empty according to the column “is_finish”. The column records 0 for not finished and 1 as the work is completed. Once java program detects that we receive data uploaded form the front-end, the it will automatically call the scrip of 按鍵精靈 9 to automatically complete all the encryption and decryption

works. After the works, the is_finish column will be modified to 1 and the user of our website fianlly can play the encrypted video online.

Figure 20. Database

Figure 21. Java file

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

相關文件