Matrix Encryption Algorithm for MP4 Video
by

Sandeep M Chandrashekaregowda

Bachelor of Engineering VTU, India
2011

A Project

Submitted to the Graduate School Faculty of Graduate School of the

University of Colorado at Colorado Springs

In Partial Fulfillment of the Requirements

For the Degree of Master of Science

Department of Computer Science

Spring 2014

This project for the Master of Science degree by

Sandeep M Chandrashekaregowda

Has been approved for the
Department of Computer Science
By

______

Advisor: Dr. C. Edward Chow

______

Dr. Rory Lewis

______

Dr. Jia Rao

Contents

1. INTRODUCTION 5

1.1 Aim and Objective of the project: 5

1.2 Need of Secure communication 5

1.3 Introduction to Multimedia 6

Multimedia Building Blocks 6

1.3.1 Audio: 7

1.3.2 Video 7

1.3.3 Images 9

1.4. Introduction to Secure Communication 9

1.4.1 Need of secure communication 9

1.4.2 Secure communication 10

1.4.3. How security is provided? 10

1.5. Structure of MP4 11

1.5 .1 Terms and definitions [17] 11

1.5.2Object-structured File Organization 12

1.6 Introduction to Multimedia 14

1.6.1 Audio: 15

1.6.2 Video 16

1.6.3 Images 18

1.7. Introduction to Secure Communication 19

1.7.1 Need of secure communication 19

1.7.2 Secure communication 19

1.7.3. How security is provided? 19

1.7.4. Structure of MP4 20

1 .8 Terms and definitions [17] 21

1.8.2Object-structured File Organization 21

2. Background and Prior Work 23

2.1. SECMPEG by Meyer and Gadegast, 1995 23

2.2 Video Encryption Algorithm by Qiao and Nahrstedt, 1997 24

2.3. Video Encryption Methods by Alattar, Al-Regib and Al-Semari, 1999 25

2.4 Partial Encryption Algorithms for Videos by Cheng and Li, 2000 26

3. Matrix Encryption Algorithm 27

3.1 Matrix Encryption Algorithm 28

3.2 Schema: 30

3.3 Encryption: 30

6.4 Decryption 33

5. Implementation 37

6. Challenges Encountered 38

7. Performance Evaluation 38

8. Conclusion 42

9. Future work 43

10. References 43

Appendix A: Installation and Configuration of Matrix Encryption Algorithm. 45

Appendix B: Demo of Matrix Encryption Algorithm. 45

1. INTRODUCTION

With the advancement of the ages, man has greatly found the need to communicate through distances. Initially this being accomplished through snail-mail was not real enough. He wanted to communicate vital moments of his file, his thoughts through the usage of more realistic means by the usage of multimedia, which is nothing but audio and video, which helped to share interesting thoughts, interesting audio/video files among people. Sharing of such files often requires communicating through networks of computers, which is not always secure enough. It is often a requirement that the file being shared is only visible or usable by the intended recipient, sometimes it is also may be essential to disguise the intruder of the file being different than what it really is. And in some commercial purposes it also may be required that only parts of the communicated audio/video files are playable. This arouses the need to device a methodology to securely communicate these multimedia files and hence protect the intellectual property of multimedia from attacks arising out of a hostile network environment.

1.1 Aim and Objective of the project:


Aim:
To develop a methodology by which the video and audio files are secured in time and space efficient manner.
Objective:

To develop an encryption methodology that utilizes various available encryption techniques and helps secure multimedia data files in such a manner that securing only information in the frame data provides an effect of securing the file as a whole. This securing process is to be carried out in a manner so as to reduce the amount of time used in securing the file.

1.2 Need of Secure communication

With the advent and consequent vast growth of the technology, intellectual property has become vulnerable to a number of threats that range from information retrieval to destruction of the intellectual property. Hence one has found the extensive need to secure such intellectual property. Intellectual property in the form of multimedia data files has been under constant threat over the years. Given the fact that often files (including multimedia) would need to be communicated through possibly insecure channels where an imposter or an intruder may cause extensive damage to such intellectual property. It has become the need of the hour that methods are developed to ensure secure communication of such file.

1.3 Introduction to Multimedia

Multimedia is media and content that uses a combination of different content forms. The term can be used as a noun (a medium with multiple content forms) or as an adjective describing a medium as having multiple content forms. The term is used in contrast to media which only use traditional forms of printed or hand-produced material. Multimedia includes a combination of text, audio, still images, animation, video, and interactivity content forms. Multimedia has become an inevitable part of any presentation. It has found a variety of applications right from entertainment to education. The evolution of internet has also increased the demand for multimedia content. Multimedia is the media that uses multiple forms of information content and information processing (e.g. text, audio, graphics, animation, video, interactivity) to inform or entertain the user. Multimedia also refers to the use of electronic media to store and experience multimedia content. Multimedia is similar to traditional mixed media in fine art, but with a broader scope. The term "rich media" is synonymous for interactive multimedia.

Multimedia may be broadly divided into linear and non-linear categories. Linear active content progresses without any navigation control for the viewer such as a cinema presentation. Non-linear content offers user interactivity to control progress as used with a computer game or used in self-paced computer based training. Non-linear content is also known as hypermedia content. Multimedia presentations may be viewed in person on stage, projected, transmitted, or played locally with a media player. A broadcast may be a live or recorded multimedia presentation. Broadcasts and recordings can be either analog or digital electronic media technology. Digital online multimedia may be downloaded or streamed. Streaming multimedia may be live or on-demand. Multimedia games and simulations may be used in a physical environment with special effects, with multiple users in an online network, or locally with an offline computer, game system, or simulator.

Multimedia Building Blocks

Any multimedia application consists any or all of the following components:

1.  Text: Text and symbols are very important for communication in any medium. With the recent explosion of the Internet and World Wide Web, text has become more the important than ever. Web is HTML (Hypertext Markup language) originally designed to display simple text documents on computer screens, with occasional graphic images.

2.  Audio: Sound is perhaps the most element of multimedia. It can provide the listening pleasure of music, the startling accent of special effects or the ambience of a mood-setting background.

3.  Images: Images whether represented analog or digital plays a vital role in a multimedia. It is expressed in the form of still picture, painting or a photograph taken through a digital camera.

4.  Video: Digital video has supplanted analog video as the method of choice for making video for multimedia use. Video in multimedia are used to portray real time moving pictures in a multimedia project.

1.3.1 Audio:

Sound is perhaps the most important element of multimedia. It is meaningful "speech" in any language, from a whisper to a scream. It can provide the listening pleasure of music, the startling accent of special effects or the ambience of a mood setting background. Sound is the terminology used in the analog form, and the digitized form of sound is called as audio.

An audio file format is a file format for storing audio data on a computer system. It can be a raw bit stream, but it is usually a container format or an audio data format with defined storage layer. The general approach towards storing digital audio is to sample the audio voltage which, on playback, would correspond to a certain level of signal in an individual channel with a certain resolution—the number of bits per sample—in regular intervals (forming the sample rate). This data can then be stored uncompressed, or compressed to reduce the file size. [15]

It is important to distinguish between a file format and a codec. A codec performs the encoding and decoding of the raw audio data while the data itself is stored in a file with a specific audio file format. Most of the publicly documented audio file formats can be created with one of two or more encoders or codecs. Although most audio file formats support only one type of audio data (created with an audio coder), a multimedia container format (as MKV or AVI) may support multiple types of audio and video data.

1.3.2 Video

Video can be basically understood as a process of displaying still images at a rapid rate giving a notion of a moving image, which is coupled with perfectly synchronized audio stream. Each such still image is referred to as a frame.


Modern video file formats interleave audio and video to allow for playing even partially loaded video stream on the network. And they also employ video compression methodologies to conserve space. This compression is made possible by using relative references that is to say if two consecutive frames have almost the same content except for partial changes, it is preferable to record only the changes and use the reference frame to generate the current frame.

Thus we normally find the frames distinguished as,

I-frame (intra-coded frame) is an infra-coded pictures in effect a fully specified picture, like a conventional static image file. I-frames are pictures coded without reference to any pictures except themselves. They may be generated by an encoder to create a random access point (to allow a decoder to start decoding properly from scratch at that picture location). They may also be generated when differentiating image details prohibit generation of effective P or B frames. I-frames typically require more bits to encode than other picture types. Often, I-frames are used for random access and are used as references for the decoding of other pictures. Intra refresh periods of a half-second are common on such applications as digital television broadcast and DVD storage. Longer refresh periods may be used in some environments. [18]


P-frame (Predicted frames) holds the changes in the image from the previous frame (Ex: Moving a car across a stationary background, only car’s movement needs to be recorded).


P-frames require the prior decoding of some other picture(s) in order to be decoded. They may contain both image data and motion vector displacements and combinations of the two. They can reference previous pictures in decoding order.

In the older standard designs (such as MPEG-2), use only one previously-decoded picture as a reference during decoding, and require that picture to also precede the P picture in display order. In H.264, it can use multiple previously-decoded pictures as references during decoding, and can have any arbitrary display-order relationship relative to the picture(s) used for its prediction. Typically, P-frames require fewer bits for encoding than I-frames do. [17]

B-frame (bi-directional predicted frame) helps specify the content by using differences between the current and both preceding and following frames. [17]

B-frames require the prior decoding of some other picture(s) in order to be decoded. It may contain both image data and motion vector displacements and combinations of the two. They include some prediction modes that form a prediction of a motion region by averaging the predictions obtained using two different previously-decoded reference regions.

In older standard designs (such as MPEG-2), B pictures are never used as references for the prediction of other pictures. As a result, a lower quality encoding (resulting in the use of fewer bits than would otherwise be the case) can be used for such B pictures because the loss of detail will not harm the prediction quality for subsequent pictures. In H.264, they may or may not be used as references for the decoding of other pictures.

In older standard designs (such as MPEG-2), use exactly two previously-decoded ^pictures as references during decoding, and require one of those pictures to precede the B j picture in display order and the other one to follow it. In H.264, can use one, two, or more than two previously-decoded pictures as references during decoding, and can have any arbitrary display-order relationship relative to the picture(s) used for its prediction. Typically, B-frames require fewer bits for encoding than either I or P frames do. The following figure shows the relationship among the various frame types mentioned above. [17]

1.3.3 Images

An image (from Latin imago) is an artifact, for example a two-dimensional picture that has a similar appearance to some subject, usually a physical object or a person. Image file formats are standardized means of organizing and storing digital images. Image files are composed of either pixel or vector (geometric) data that are rasterized to pixels when displayed (with few exceptions) in a vector graphic display. The pixels that constitute an image are ordered as a grid (columns and rows); each pixel consists of numbers representing magnitudes of brightness and color.

1.4. Introduction to Secure Communication

1.4.1 Need of secure communication


The requirements of information security within an organization have undergone two major changes in the last several decades. Before the wide spread use of data processing equipment, the security of information felt of be valuable to an organization was provided primarily by physical and administrative means.

With the advent of the computer, the need for automated tools for protecting files and other information stored on the computer became evident. This is especially the case for a shared system.

1.4.2 Secure communication

When two entities are communicating with each other, and they do not want a third party to listen to their communication, then they want to pass on their message in such a way that nobody else can understand their message. This is known as communicating in a secure manner or secure communication. Secure communication includes means by which people can share information with varying degrees of certainty that third parties cannot know what was said. Other than communication spoken face to face out of possibility of listening, it is probably safe to say that no communication is guaranteed secure in this sense, although practical limitations such as legislation, resources, technical issues (interception and encryption), and the sheer volume of communication are limiting factors to surveillance.