• 沒有找到結果。

高等數位內容存取系統運用架設於公鑰基礎設施的物件認證服務

N/A
N/A
Protected

Academic year: 2021

Share "高等數位內容存取系統運用架設於公鑰基礎設施的物件認證服務"

Copied!
64
0
0

加載中.... (立即查看全文)

全文

(1)

資訊科學與工程研究所

高等數位內容存取系統

運用架設於公鑰基礎設施的物件認證服務

Advanced Access Content System using

PKI based Authentication Service

研 究 生:李英宗

指導教授:葉義雄 教授

(2)
(3)

中文摘要

隨著數位時代的來臨,以及網際網路的普及,非授權影音內容的散播變得比 以往更加容易。也因此,個人或是企業所創造之智慧財產,也較以往更容易受到 侵犯。為因應內容數位化之潮流與趨勢,娛樂產業對於數位智財管理技術之需求 更勝以往,以期能更進ㄧ步保護數位影音作品之價值及創作者之權益。 光學儲存媒介,如 CD,DVD 等,為目前市面上最受歡迎之影音內容儲存方 式。科技的日新月異,更已造就在儲存空間、影音品質等方面都大幅提升之 新世代藍光儲存技術。本篇論文所探討之「Advanced Access content System」,或 簡稱「AACS」,可翻成「高等數位內容存取系統」,為一逐漸成型之新世代防拷 技術,意在提供影視產業在散佈光學儲存產品之同時,亦可防止非授權盜版之 機制。雖然在設計上 AACS 已包含數項標準化之加密程序,多項創新專有之設計 亦相形降低 AACS 在與其他系統整合上之彈性。另外,在公開密鑰憑證 (Public Key Certificates) 方面,AACS 並無提供標準化之規格,這可能會增加此技術在 推廣上之困難度。在介紹 AACS 之同時,本篇論文意圖闡述將 X.509 架構納入 AACS規格之優點,並提供AACS在規格修正上之建議。

(4)

Abstract

Digital technologies have given entertainment industries tremendous opportunities for content creation. However, they have also granted anyone the ability to create exact duplications and to distribute these copies with ease that facilitates copyright

infringement that reduces the revenue inflow for those creative minds. Hence, there is a great desire for digital rights management (DRM) systems that can preserve the

economic value of digital video and protect the rights of its owners.

Optical storage media have become the most popular vehicle of carrying

audiovisual content after their theatrical debut. The advancement of technology brought us with each new generation increased storage capacity and improved picture and sound quality. Advanced Access Content System is a copy protection mechanism proposed to protect the audiovisual entertainment content stored on the next generation optical storage media. Although the specification has used several standardized cryptographic procedures in its design, several proprietary design decisions may make AACS less flexible and more difficult to integrate with other systems. In particular, the public key certificates in AACS are not defined using any standardized format. This thesis will attempt to suggest some modifications to the AACS specification that incorporate X.509 certificate framework. Some benefits of doing so are also discussed.

(5)

致 謝

能夠順利完成這篇論文,首先要感謝我的指導老師葉義雄教授,在這兩年內, 給予我莫大的空間與自由,讓我在完成碩士學業之餘,也能順利通過博士資格考, 使我在下個階段的學業生涯上,沒有後顧之憂。也非常感謝口試委員—蔡文能教 授及周勝鄰教授—對於我的論文的不吝指教,可以讓我把論文修改的較為完善。 尤其得感謝蔡文能教授的熱心支持,沒有您緊迫釘人的督促,我想這篇論文至今 仍無法成形。在口試前晚陪我一起熬夜修正口試文稿的恩情,我至今仍銘記于心。 此外,還得感謝建興電子的賴遠青先生,在報告技巧的方面,給予我許多修正 及改善的意見,讓我受益良多。實驗室的眾多成員,如陳以德、黃定宇、李鎮宇、 高銘智學長,甘老大、白台柱、昇哥、許鴻祥同窗,Gobby、伯昕以及胖婷學弟妹 都在我碩士生涯中給予我默默的支持與鼓勵。 最後,我必須要感謝我的家人多年來給我的支持與栽培,以及關懷與勉勵,讓 我在學習之路能夠堅持至今。謝謝你們。 詞窮不及達意,族繁不及備載。在這麼短的篇幅中,如有遺漏,在所難免。 在這邊,僅將此論文獻給所有關心、支持我的人。

李英宗

中華民國九十四年七月

(6)

Table of Content

中文摘要... i Abstract...ii 致 謝...iii Table of Content ... iv List of Tables... vi

List of Figures ...vii

List of Figures ...vii

Chapter 1 Introduction ... 1

-1.1 OPTICAL MEDIA COPY PROTECTION...-2-

1.2 MOTIVATION...-5-

1.3 THESIS ORGANIZATION...-5-

Chapter 2 Background Knowledge... 7

-2.1 OPTICAL STORAGE MEDIA FORMAT...-7-

2.1.1 Compact Disc ... 8

-2.1.2 Digital Versatile Disc ... 10

-2.1.3 HD DVD... 13

-2.1.4 Bluray Disc ... 13

-2.2 COPY PROTECTION CONCEPTS AND ISSUES...-14-

2.2.1 Broadcast Encryption ... 15 -2.2.2 Traitor Tracing ... 16 -2.3 CRYPTOGRAPHY PRIMER...-17- 2.3.1 Symmetric Cryptography... 17 -2.3.2 Mode of Operation ... 17 -2.3.3 Hash Functions ... 20

-2.3.4 Message Authentication Code ... 21

-2.3.5 Pseudorandom Generator ... 21

-2.3.6 Asymmetric Cryptography... 21

-2.3.7 Digital Signature ... 22

-2.3.8 X.509 Certificates... 22

-2.3.9 Elliptic Curve Cryptography ... 25

-Chapter 3 Advanced Access Content System ... 27

-3.1 INTRODUCTION...-27-

3.2 SPECIFICATION ORGANIZATION...-28-

3.3 COMMON CRYPTOGRAPHIC FUNCTIONS...-28-

3.3.1 Advanced Encryption System (AES) ... 28

-3.3.2 AES in ECB Mode ... 31

-3.3.3 AES in CBC Mode ... 31

-3.3.4 AESbased Oneway Function... 32

-3.3.5 Secure Hash Algorithm (SHA)... 32

-3.3.6 AESbased Hashing Function... 36

-3.3.7 Cipherbased MAC (CMAC) ... 37

-3.3.8 Random Number Generator ... 39

-3.3.9 Digital Signature Algorithm ... 39

-3.4 KEY MANAGEMENT...-41-

3.4.1 SubsetDifference Tree (NNL Tree)... 41

-3.4.2 Media Key Block ... 44

-3.5 DRIVE-HOST AUTHENTICATION...-44-

3.5.1 Drive and Host Certificates... 45

(7)

-3.5.3 Protocol for Transferring Information ... 46

-3.5.4 Protocol for Updating the Protected Area and Associated on Recordable Media ... 47

-Chapter 4 Proposed Scheme ... 49

-4.1 CONTENT CERTIFICATE...-49-

4.2 DRIVE CERTIFICATE...-51-

4.3 HOST CERTIFICATE...-52-

Chapter 5 Conclusion... 53

(8)

-List of Tables

TABLE 3-1AACSSPECIFICATION ORGANIZATION...-28-

TABLE 3-2SECURE HASH ALGORITHM PROPERTIES...-33-

(9)

List of Figures

FIGURE 2-1X.509CERTIFICATE FORMAT...-24-

FIGURE 2-2X.509CERTIFICATE REVOCATION LIST FORMAT...-24-

FIGURE 3-1AESINPUT TO STATE ASSIGNMENT...-29-

FIGURE 3-2DRIVE CERTIFICATE...-45-

FIGURE 3-3DRIVE AUTHENTICATION ALGORITHM FOR AACS[1] ...-46-

FIGURE 3-4PROTOCOL FOR TRANSFERRING VOLUME IDENTIFIER [1] ...-47-

FIGURE 3-5PROTOCOL FLOW FOR READING PROTECTED AREA DATA [1] ...-48-

(10)

Chapter 1 Introduction

Digital technologies have given entertainment industries tremendous opportunities for content creation. However, they have also granted anyone the ability to create exact duplications and to distribute these copies with ease that facilitates copyright

infringement often referred to as “piracy”. KaZaA [12], BitTorrent [13], eDonkey [14],

and Gnutella [15]are popular Peer-to-Peer (P2P) software that has been used to share

copyrighted music, movies, software and other materials. Future P2P systems may encrypt shared data, preserve user anonymity, support a larger user base, and improve its robustness [21]. Although these systems may have legal usages, content creators and owners are mostly concerned about the consequences of unauthorized copying and distribution on a massive scale. Hence, there is a great desire for digital rights

management (DRM) systems that can preserve the economic value of digital video and protect the rights of its owners.

The Internet is not the only place where digitized audiovisual entertainment products reside. Optical storage media such as compact discs invented in 1980s, although originally developed for storing digital audio only, has long ago become the mainstream storage method for digital video and has revolutionized the entire

distribution channel for music and video contents. The inherent “off-line” nature of optical disc distribution method has created unique challenges for copy protection designers and developers. Some previous approaches have not always succeeded. The content scrambling system [16] (CSS) for protecting pre-recorded movies stored on digital video discs (DVD) is one such failed approach most cited in literatures [19][22]. The system intends to keep the video data stored on the disc in an encrypted form, and only entrusts certain secrets to the compliant players that enable them to playback the encrypted video stream. However, not every player can be trusted to maintain the

(11)

secrecy of the secrets. In 1999, a group of Norwegian programmers successfully reverse-engineered a DVD player software to build a decryption engine aptly named DeCSS. The program quickly spread through the Internet to permit anyone to bypass CSS protection.

Advanced Access Content System (AACS) is one system in development trying to address weaknesses in CSS, and aims to protect the next generation optical storage media. The system incorporates several cryptographic methods to provide security services that could make access control possible. However, some of the AACS cryptographic functions are proprietary. This thesis tries to incorporate a well-established PKI standard to improve AACS’s flexibility.

1.1

Optical Media Copy Protection

The Compact Disc (CD), introduced in 1982, was originally developed as an “audio-only” storage medium. The technology was later evolved to hold other information such as video recordings and computer software, and was known as a CD-ROM. Even though the discs are read-only initially, the technology quickly

expanded to include the capability to write-once or even to write multiple times (CD-R and CD-RW). At this point, PC users were given an alternative means to store huge amount of data. However, the original specification (The Red Book) for audio disc does not include any serious copy protection mechanism.

In September of 1996, version 1.5 of DVD specification was finalized. Although resembling a compact disc in physical appearance, a DVD has a much higher storage capacity, allowing it to record movies with higher video and audio quality. Depending on its format and structured content, the disc is appropriately referred to as DVD-Video, DVD-Audio, and DVD-Data. DVD-Video has four complementary systems designed to

(12)

restrict the DVD user in various ways: region codes, Content Scrambling System (CSS), Macrovision, and disabled user operations (UOPs).

One or more region codes are contained in each DVD-Video disc. They are meant to denote the area(s) of the world in which distribution and playback are intended. Commercial DVD players are mandated by their specification to only play discs with a region code that matches its own. The goal was to enable region-by-region control of the various aspects of a release such as content, date and price by the motion picture studios. However, many DVD players, or their modifications, are able to playback video discs of any region. Since almost all televisions in Europe, Australasia, and Taiwan are capable of displaying NTSC video, the consumers in these regions have a huge choice of discs. Region codes thus lose its intended purpose on the worldwide scale.

Content Scrambling System is a complex system with many components to impede illegal copying of CSS-protected video discs. Its components include encryption to scramble video data written on the discs, a protocol for obfuscating the communications between the DVD reader and attached devices, and copy protection for digital and analog outputs. CSS-compliant readers are given some secret information that enables them to access the decryption keys stored on the disc. However, the successful

discovery of the CSS encryption algorithm by a group of Norwegian programmers through the art of hacking and reverse-engineering led to the development of a software program that can decrypt any CSS-protected DVD. The program is appropriately named DeCSS [22]. It processes a CSS-encrypted DVD disc and produces an unencrypted movie that can be copied and distributed without any restriction. Any DVD reader, including readers that do not recognize CSS protection, can be used to playback these copies.

(13)

Macrovision is a video copy prevention scheme created by a company with the same name. The technology makes use of the off-screen region of a video signal to implant special signals that could prevent DVD recorders from correctly recording encoded video. The recorded video will appear scrambled or fade between overly light and dark.

DVD-Video also provides a way for the content owner to specify the set of

operations that a user is allowed to perform. For example, the disc may prohibit the user from selecting a menu, skipping chapters, forwarding or rewinding. This feature is known as User Operation Prohibitions, or Prohibited User Operations (UOPs or PUOs). However, this feature only works when the DVD player respect these commands. Like region codes, DVD players can be modified to ignore the usage rules demanded by UOPs.

With the development of next generation optical discs, an effective copy protection mechanism is highly sought after. The Advanced Access Content System (AACS) is a standard in development that has been adapted to Blu-ray Disc and HD DVD. The standard is purported to provide content owners the ability to restrict access to and copying of their multimedia content.

The proposal is based on the broadcast encryption model originated from digital TV broadcasting domain. Analogous to a digital TV broadcast, the broadcasted video

content reaches players in the form of optical discs. The idea is to only grant legitimate players the viewing privileges. The governing authority reserves the right to revoke a device if that device is discovered to be compromised.

(14)

1.2

Motivation

In the summer of 2004, a group of companies, which include Disney, Intel, Microsoft, Matsushita (Panasonic), Warner Brothers, IBM, Toshiba, and Sony, have

joined forces to create and administer astandard called Advanced Access Content

System (AACS). The standard has been adopted as the copy protection mechanism for HD DVD and Blu-ray Disc. The two next generation optical storage technologies incorporates a shorter wave-length laser light that could record onto and read more data out of a plastic with the same size as a DVD disc.

AACS combines several cryptographic concepts to control the access to the media. The technology borrows the idea of broadcast encryption to allow only legitimate devices to retrieve the content through subset difference trees. The content encrypting keys would be embedded in the disc itself through a cryptographic process. Legitimate devices would be given enough secret information to obtain the keys that would allow them to view the content. During the decrypting process, AACS would make use of self-defined certificates to either verify the authenticity of the participating devices and to check the integrity of several control information.

However, the proprietary certificate formats might make AACS less flexible and less interoperable with other components of DRM systems. In this thesis, we study the possibility of using a standard X.509 certificate framework to restructure AACS in order to lift these limitations.

1.3

Thesis Organization

Chapter 1gives a brief overview of the optical media industry, and describes some problems occurred in previous copy protection mechanism. This chapter also provide

(15)

research motivations the Advanced Access Content System for the first time. Before we explain the Advanced Access Content System in detail, we first provide the background knowledge required to understand the concepts used in the specification in Chapter 2. Then, Chapter 3attempts to consolidate the AACS v0.91 specification, which is

separated into 7 “books”, into a single chapter. Due to the shear amount of information, the focus will be on the format independent part of the specification. In Chapter 4, we propose a modification to the AACS design that could enhance the system’s flexibility. Finally, we conclude the thesis and make a few suggestions on the future direction to pursue in Chapter 5.

(16)

Chapter 2 Background Knowledge

Advanced Access Content System, the subject matter being studied in this thesis, incorporates many concepts in the fields of cryptography and information security in general to provide its purported copy-protection functions. The system can also be fit into a larger Digital Rights Management (DRM) framework. This chapter attempts to give an abridged background knowledge involved in the development of AACS. Also, the related technologies employed in our proposed scheme are also introduced in this chapter.

2.1

Optical Storage Media Format

For thousands of years, spoken words can only be passed down the generations through the scratches of shells, the carvings of bamboo sheets, and the smudges of dried pulp. Other sounds, natural or artificial, can only be remembered through the heart of the listener. The invention of phonograph by Thomas Edison in 1977 changed all that. People do not have to be told of a magnificence of a masterpiece; the masterpiece can be heard, again and again. Although the technique of Edison had been improved from recording the physical vibration directly onto a wax plate to magnetically onto a flexible strip, the analog nature of the process makes the recording prone to the effect of

ever-present noise. The historical route taken by the humankind to discover a way to make permanent our visual perception is nothing but a bumpy road. It took several decades to bring color television, VCRs, and video camcorders into the hands of an average citizen.

At the inception of the digital era, the need to store huge amount of binary data created by a video stream naturally arises. The portability and the storage capacity of an

(17)

optical media nicely provide a solution. In this section, we will look at some major optical media formats that have evolved over the years.

2.1.1

Compact Disc

A Compact Disc (or CD), introduced in 1982, is an optical disc originally

developed to store digital audio. Commercial record labels continue to produce most of their audio recordings on CDs as of mid-2006. Standard compact discs come in two sizes. Compact discs measuring 12-cm in diameter are probably the most familiar varieties to us, and they can hold approximately 80 minutes of audio. The smaller 8-cm discs can hold approximately 20 minutes of audio only, and thus are sometimes used for CD singles.

Compactdisc technology was later adapted to produce discs that can hold other

forms of data. In addition, consumers are given the ability to store their own data on compact discs with the addition of record-once and rewritable media (CD-R and CD-RW) into the format family. The CD and its extensions have been extremely successful not only in the consumer electronics industry but also in the personal computer arena even up to this day.

History

In 1979, Philips and Sony decided to join forces, setting up a joint task force of

engineers whose mission was to design the new digital audio disc.After a year of

experimentation and discussion, the task force produced the “Red Book”, the Compact

Disc standard.The Compact Disc reached the market in late 1982 in Asia and early the

following year in other markets.This event is often seen as the “Big Bang” of the digital

(18)

as a music format, Compact Disc has grown to encompass other applications. In June 1985, the CD-ROM (read-only memory) and, in 1990, CD-Recordable were introduced, also Developed by Sony and Philips.

Physical Details

Compact discs are made from a 1.2 mm thick pure polycarbonate plastic disc with a thin layer of super purity Aluminum applied, and then protected by a film of lacquer,

which can be printed with a label.Binary data is stored onto a compact disc as a series

of microscopic indentations situated in a tightly packed track molded into the top of the

polycarbonate layer.A CD is read by focusing a 780 nm wavelength semiconductor

laser through the bottom of the polycarbonate layer.The difference in height between I

indented and un-indented areas leads to a phase difference in the light reflected.By

measuring the reflected intensity with a photodiode, the disc drive is able to tell the hills from the valleys. However, the pits and lands themselves do not represent the zeroes

and ones of binary data.Instead, a change in the heights indicates a one, while no

change indicates a zero.Finally, the modulation and coding process used in mastering

the disc is reversed to reveal the raw audio data stored on the disc.

Standard CDs are available in two sizes.By far, the most common is 12 cm in

diameter, with either a (74 min./650 MB) or a (80 min./700 MB) capacity. Eight centimeter discs are also available. They are mainly used for audio CD singles in some regions. Those smaller CDs can hold 21 minutes of music, or 184 MB of data. Other non-standard shapes and smaller form factors have also been sold or given away as promotional items.

(19)

Recordable compact discs, CD-Rs, are molded with a "blank" data spiral applied with a photosensitive dye. Then, the discs are metallized and lacquer coated. The write laser of the CD recorder changes the color of the dye to allow the read laser to “see” the data. CD-R recordings are permanent. The resulting discs can be read by most

CD-ROM drives and played in most audio CD players.

CD-RW is a re-recordable medium that uses a metallic alloy instead of a dye. The write laser in this case is used to heat and alter the chemical properties of the alloy and hence change its reflectivity. A CD-RW does not have as great a difference in the reflectivity of lands and bumps as a pressed CD or a CD-R, and so many CD audio players cannot read CD-RW discs, although the majority of stand-alone DVD players can.

Copy Protection

The Red Book audio specification does not include any serious copy protection mechanism, except to have a simple ‘anti-copy’ bit in the subcode. Starting in early 2002, attempts were made by record companies to market “copy-protected”

non-standard compact discs. However, the public at large are greatly against these copy-protected discs because many see them as a threat to fair use.

2.1.2

Digital Versatile Disc

In early 1990s, Phillips and Sony created a joint venture to develop a new optical storage technology. The result was the DVD specification version 1.5, announced in 1995 and finalized in September 1996. DVDs resemble compact discs with the same physical dimensions, but they have different encoding format and can store much higher

(20)

quality visuals and sounds. The official DVD specification is now maintained by the DVD Forum [11].

History

In the early 1990s, two high density optical storage standards were being developed. MultiMedia Compact Disc (MMCD) were backed by Philips and Sony while the other standard, Super Density disc (SD), were supported by Toshiba,

Time-Warner, Matsushita Electric, Hitachi, Mitsubishi Electric, Pioneer, Thomson, and JVC.

Philips and Sony abandoned their MMCD format and agreed upon Toshiba's SD format with two modifications. The end result was the DVD specification version 1.5, announced in 1995 and finalized in September 1996. In May 1997, the DVD

Consortium, founded by ten companies including Philips and Sony, was replaced by the DVD Forum, and now has over 200 member companies.

“DVD” originally stands for “Digital Video Disc”. Some members of the DVD Forum believe that it should stand for "Digital Versatile Disc" to reflect its widespread use for non-video applications. However, the DVD Forum never reached a consensus on the matter, and so today the official name of the format is simply “DVD” [20].

The first DVD players and discs were available in 1996 for Japan, in 1997 for the United States, in 1998 for the European countries and in 1999 for Australia. The first film released in DVD format was Twister in 1996.

DVD rentals first surpassed those of VHS during the week of June 15, 2003. In June 2005, several retailers in U.S. announced plans to phase out the VHS format

(21)

entirely, in favor of the more popular DVD format. Consumers have predicted that 2006 would be the final year for new releases on VHS.

DVD-Video

DVD-Video is the application format designed to store movies on a DVD disc. The video images are encoded in compressed MPEG-2 file format and the soundtrack is encoded in a variety of audio formats. The storage capacity of a DVD-Video disc allows a wide variety of extra features in addition to the feature film itself. The extra features can include director’s commentary, closed caption and dialogues in multiple languages, extra scenes cut from the theatrical distribution, behind the scenes documentary and simple interactive games.

Other extras comprise animated menus, still pictures, branching for multiple storylines, and views from different camera angles. Also, DVD-Video discs can store additional data files that only can be read by computer DVD drives.

Restrictions

Four complementary systems are designed to restrict DVD-Video users in various ways: Macrovision, Content Scramble System (CSS), region codes, and disabled user operations. Macrovision is a video encoding technology developed by Macrovision Corporation which was established in 1983. The technology would cause VCRs unable to record video streams received from DVD discs encoded with Macrovision. The recording would appear to be scrambled, or else the images would flicker upon playback. CSS utilizes a stream cipher to encrypt the video data to discourage illicit copying. However, a public-domain software called DeCSS has been developed that would render CSS useless. Region codes are designed to restrict the distribution of a

(22)

DVD title within a geographic region. For example, a Taiwanese movie is not accessible on a U.S. DVD player. Furthermore, content providers can specify certain user operations to disable to prevent users from skipping over copyright notice, for instance. However, the last two restriction mechanisms require the cooperation of DVD players.

2.1.3

HD DVD

On November 19, 2003, the DVD Forum decided to adapt HD DVD, previously called the “Advanced Optical Disc (AOD)”, to be the DVD successor for HDTV. HD DVD (High Density DVD or High Definition DVD) is a digital optical media format with the same physical size as CDs and DVDs which can hold high definition video or

other data. HD DVD uses 405 nm wavelength blue laser.The current specification

version for HD DVD-ROM and HD DVD-Rewritable is version 1.2. The specification for HD DVD-RAM is currently at 2.2. HD DVD is promoted by Toshiba, NEC, Sanyo, Microsoft, and Intel, among others. The format is currently backed by major studios such as Universal Studios, Paramount Pictures, Warner Brothers. Studio Canal, and The Weinstein Company. Japanese were the first to see HD DVD players, which were released by Toshiba on March 31, 2006, and Americans followed shortly after on April 18, 2006.

2.1.4

Blu-ray Disc

A Blu-ray Disc (BD) is currently competing with HD DVD format for wide adoption as the preferred next-generation optical disc format meant for high-density storage of high-definition video and data. The Blu-ray standard was jointly developed by the Blu-ray Disc Association (BDA) which consists of a group of consumer

(23)

electronics and PC companies, spearheaded by Sony. As of 2006, neither format has succeeded in superseding the present home video standard, the DVD.

The name Blu-ray is derived from the blue-violet read-write laser. The shorter wavelength (405 nm) of the blue-violet laser allows more information to be stored digitally in the same amount of space, which gives a Blu-ray Disc much higher storage capacity than a DVD disc. In comparison to HD DVD, Blu-ray has more information capacity per layer but may initially be more expensive to produce.

The Blu-ray Disc Association unveiled their plans for a May 23, 2006 release date at the Consumer Electronics Show (CES) in January 2006. Since then, Blu-ray was delayed, but finally shipped in the U.S. on June 20, 2006.

2.2

Copy Protection Concepts and Issues

Digital audio, video, and images have gained importance as a source of

information for professional use and entertainment. Current digital multimedia content has a predefined file format and can be stored and distributed on every medium that can carry digital information. New content creation strategies are developed as content quality, network bandwidth, and digital storage capacity have continued to improve. At the same time they create exciting new products for consumers, content industry is faced with ever increasing threats of lost revenues due to unauthorized copying and distribution of content. Modern computer technologies make it extremely efficient and cost effective to duplicate and distribute multimedia content over the Internet. As a result of this, content owners and distributors are desperately in need to defend their property right and revenue by deploying content protection technologies in an attempt to prevent the unauthorised use of multimedia content.

(24)

Numerous content protection technologies and applications have been devised

based on watermarking and cryptographic principles[27]. Most protection

methodologies focus on technical aspects that are rigid and inflexible, which result in the expense of user friendliness and privacy. Moreover, protected contents may need to be converted to an unprotected format before they can be transferred to an intrinsically untrustworthy device for viewing. Hence, 100% copy protection is believed to be an unattainable end [28].

Nevertheless, this section provides a glimpse of techniques or concepts that have been incorporated into the design of copy protection schemes. Also, this section will give a list of issues in providing digital copy protection.

2.2.1

Broadcast Encryption

Broadcast encryption is the cryptographic problem of encrypting broadcast content

in such a way that only qualified users can decrypt the content.The challenge arises

from the dynamically changing set of qualified users. Users can become qualified by subscribing and they can become illegitimate by not paying the fee. Any solution to such an event should not affect the users already qualified or unqualified. Several solutions exist offering various tradeoffs between the overhead in the broadcast, the number of keys that each user needs to store, and the feasibility of decryption by a collusion of unqualified users.

However, no solution can prevent rogue users from sharing their decryption keys with unqualified users. These rogue users are called traitors in the literature. Therefore, Traitor tracing algorithms are required to retroactively identify the traitors so

(25)

often employ set-top boxes with tamper-resistant smart cards that prevent a user from

learning their own decryption keys.

Multimedia contents distributed on optical discs share many problems as television programs distributed over digital broadcast. Content owners would like to grant

compliant playback devices the privilege to access the contents stored on the discs while deny other devices from the access. They would also like to revoke users from viewing privilege once they discovered the users had violated certain usage rules. Hence, solutions to the broadcast encryption problem may also be adapted to protect content owners from unauthorized copying of their properties.

AACS, the copy protection scheme studied in this thesis, uses a broadcast encryption algorithm that enables the provider to revoke any desired subset of users from the content access by rearranging keys in a binary tree. Each user device has its place in the leaves of the binary tree. The keys are assigned to the device in such a way that the device could not learn the keys on the node from its corresponding leave nodes to the root node. If the master secret is encrypted with one of those keys, the device will not be able to decrypt it. Hence, the device is effectively prevented from viewing the content.

2.2.2

Traitor Tracing

Traitor tracing is a copy prevention strategy which has been around for years. The main concept is that each user device is given a unique key or a unique set of keys. The key(s) are combined with the content encryption key(s) in a certain way to write some signature data on the copy made with that device. If content decryption key is made public, content owners can examine the illegal copy to determine the traitor device from their database of assigned codes.

(26)

2.3

Cryptography Primer

2.3.1

Symmetric Cryptography

Symmetric ciphers are cryptographic algorithms that encrypt and decrypt messages using the same secret key. These algorithms require that the sender and receiver agree on a key before they can communicate securely. The security of a symmetric algorithm rests in the secrecy of the key; compromising the key means that anyone could encrypt and decrypt messages.

Symmetric ciphers can also be divided into two categories: symmetric block cipher and symmetric stream cipher. Symmetric block cipher encrypts a plaintext block into a ciphertext block with an equal length. Symmetric stream cipher, on the other hand, sees messages as a bit stream or a byte stream and encrypts them accordingly.

2.3.2

Mode of Operation

Symmetric block cipher algorithms are designed to operate on fixed length message blocks. National Institute of Standards and Technologies (NIST) has published a special publication 800-38A [10] detailing five ways a block cipher can be used to

encrypt/decrypt longer messages. z Electronic Code Book Mode

Electronic code book (ECB) mode is the most obvious way to use a block cipher. A message is divided into blocks of equal length and each block of plaintext encrypts into a block of ciphertext.

ECB Encryption: Cj =CIPHK(Pj) for j= … n1, ,

(27)

Although this mode is simple, it is not safe to use it to process significant amount of information since identical plaintext blocks would encrypt to identical ciphertext blocks. z Cipher Block Chaining Mode

In cipher block chaining (CBC) mode, the plaintext is XORed with the previous ciphertext block before it is encrypted. The first plaintext block is XORed with an extra initialization vector (IV) block before it is encrypted.

CBC Encryption: C1=CIPHK(IVP1) 1 ( ) for 2, j K j j C =CIPH C P j= …,n CBC Decryption: 1 1 K ( 1) P =IVCIPHC 1 1 ( ) for 2, , j j K j P =C CIPHC j= … n z Cipher Feedback Mode

The Cipher Feedback (CFB) mode is a confidentiality mode that features the feedback of successive ciphertext segments into the input blocks of the forward cipher to generate output blocks that are exclusive-ORed with the plaintext to produce the ciphertext, and vice versa. The CFB mode also requires an IV as the initial input block.

The CFB mode also requires an integer parameter, denoted s, such that . In the

specification of the CFB mode below, each plaintext segment (

1 s≤ ≤b

#

j

P ) and ciphertext

segment (C ) consists of s bits. #j

CFB Encryption: I1=IV 1 # 1 ( ) || for 2, , j j b s j I =LSB I C j= … n ( ) for 1, , j K j O =CIPH I j= … n # # ( ) for 1, , j j s j C =PMSB O j= … n CFB Decryption: I1=IV

(28)

1 # 1 ( ) || for 2, , j j b s j I =LSB I C j= … n ( ) for 1, , j K j O =CIPH I j= … n # # ( ) for 1, , j j s j P =CMSB O j= … n z Output Feeback Mode

The Output Feedback (OFB) mode is a confidentiality mode that features the iteration of the forward cipher on an IV to generate a sequence of output blocks that are exclusive-ORed with the plaintext to produce the ciphertext, and vice versa.

OFB Encryption: I1=IV 1 for 2, , j j I =O j= … n n ( ) for 1, , j K j O =CIPH I j= … for 1, , 1 j j j C =PO j= … −n * * ( ) n n u n C =PMSB O OFB Decryption: I1=IV 1 for 2, , j j I =O j= … n n ( ) for 1, , j K j O =CIPH I j= … for 1, , 1 j j j P =CO j= … n− * * ( ) n n u n P =CMSB O z Counter Mode

The Counter (CTR) mode is a confidentiality mode that features the application of the forward cipher to a set of input blocks, called counters, to produce a sequence of output blocks that are exclusive-ORed with the plaintext to produce the ciphertext, and vice versa. The sequence of counters must have the property that each block in the

(29)

sequence is different from every other block. This condition is not restricted to a single message: across all of the messages that are encrypted under the given key, all of the counters must be distinct.

Given a sequence of counters T T1, 2,…,Tn, the CTR mode is defined as follows:

CTR Encryption: Oj =CIPHK( )Tj for 1,j= …,n

for 1, , 1 j j j C =PO j= … −n n * * ( ) n n u n C =PMSB O

CTR Decryption: Oj =CIPHK( )Tj for 1,j= …,

for 1, , 1 j j j P =CO j= … n− * * ( ) n n u n P =CMSB O

2.3.3

Hash Functions

A hash function, H(M) is a function that operates on an arbitrary length message and returns a fixed-length hash value, h.

*

: n

H Σ → Σ , h = H(M) where h is of length n.

Many functions fit the definition of a hash function; however, hash functions need additional “one-way” characteristics to make them suitable to be used in security protocols [23]:

Given M, it is easy to compute h.

Given h, it is computationally infeasible to find an M such that H(M)= h. Given M, it is computationally infeasible to find another message, M’, such that H(M) = H(M’).

Given h, it is computationally infeasible to find a pair of messages, M and M’, such

(30)

2.3.4

Message Authentication Code

Similar to a one-way hash function, a message authentication code (MAC) is a function that processes a variable length message to produce a fixed length message digest. However, the message digest computed is a function of both the input message and the secret key. In this way, only someone with the key can verify the hash value.

When a sender wants to prove to the receiver that the message he sent has not been modified in transit, he would first share a secret key with the receiver. The sender then uses the secret key together with the message itself to generate a message digest from a MAC generation algorithm, and sends the MAC with the message. Once the receiver receives the message, he can also use the secret key to compute a MAC on the received message. If the message received is not altered, the computed MAC should match the received MAC.

2.3.5

Pseudorandom Generator

A pseudorandom number generator (PRNG) is an algorithm that generates a sequence of numbers that approximates a real random number sequence. The

pseudorandom numbers play an important role in the theory of cryptography.Careful

mathematical analysis is required to place any confidence in a PRNG to generate “sufficiently” random numbers suitable for intended use.

2.3.6

Asymmetric Cryptography

In 1976, Whitfield Diffie and Martin Hellman introduced an entirely new

cryptography paradigm [24].They described public-key cryptography, which uses two

different keys—one public and the other private. The keys, although mathematically related, are computationally infeasible to deduce one from the other. This new

(31)

cryptography paradigm is sometimes referred to as asymmetric cryptography to contrast with the traditional symmetric cryptography.

In public-key cryptography, everyone would have a public key and a private key. To communicate securely under this paradigm, one would first obtain his/her partner’s public key, encrypt the message with this key, and send the ciphertext across the network. Once the partner receives the encrypted message, he/she may use his/her private key to decrypt it.

2.3.7

Digital Signature

In public-key cryptography, messages encrypted with the public key can be decrypted with the corresponding private key. Likewise, messages encrypted with the private key can also be decrypted with the corresponding public key. This property can be used to generate the digital counterpart of a written signature. Since a private key is assumed to be known only by its owner, a sender can prove that a message is really originated from him/her by encrypting the message with his/her private key. Anyone with access to the sender’s public can thus verify the authenticity of the message by decrypting it.

2.3.8

X.509 Certificates

Although public key cryptography solves the problem of having to share a secret key before communication can begin, the sender still does not have a reliable way of obtaining the public key of the receiver. An attacker could trick the sender into using his/her public key instead of the receiver’s and be able to decrypt any message that the sender encrypted with that key. In 1978, Kohnfelder recognized this problem and introduced the concept of using a certificate to convey the public key in his bachelor's

(32)

thesis entitled “Towards a Practical Public-Key Cryptosystem” [25].Simply stated, public-key certificates are used to bind an entity's name with the corresponding public key. A trusted third party, called a certificate authority (CA), would be established to verify an entity’s identify, prepare a document containing the entity’s public key, and certify that document by digitally signing it with CA’s private key.

Today, most public-key certificates are based on X.509 certificate format,

originally defined in the 1988 recommendation issued by ITU-T. Now, three versions of

an X.509 public-key certificate are defined.The original version 1 public-key certificate

suffers from inherent inflexibility because this version cannot be extended to support

additional attributes.Version 2 public-key certificate offers two optional unique

identifier fields for the issuer and the subject and did nothing to correct this shortcoming. Because the demand for these fields was negligible and the same inability to support extensions also applies, version 2 public-key certificate has failed to gain widespread acceptance.

Not surprisingly, the deficiencies associated with the version 1 and version 2 definitions were corrected by the introduction of the version 3 public-key certificates, as specified in the 1997 X.509 Recommendation. Specifically, the addition of optional extensions has given version 3 significant improvements over versions 1 and 2.

(33)

Figure 2-1 X.509 Certificate Format

(34)

2.3.9

Elliptic Curve Cryptography

Public key cryptography is based on the creation of mathematical entities called trap-door one-way function. These functions are difficult to inverse without certain

secret information.The trap-door one-way function can be used to scramble a message

in a way that only people with access to the secret information can unscramble. Early public key systems, such as the RSA algorithm, created their trap-door one-way functions based on the difficulty of integer factorization. However, due to recent progress in factoring, RSA public keys must now be thousands of bits long to provide adequate security.

Solving equations of the form ab =cwhen a and c are known is easy using

logarithms if the numbers involved are real or complex. However, in a large finite group, finding solutions to such equations is quite difficult and is known as the discrete

logarithm problem.

An elliptic curve is a plane curve defined by an equation of the form y2 = x3 + a x + b.

An operation with properties similar to the integer addition can be defined on the

set of points on such a curve with the point at infinity as identify element.If the

coordinates x and y are chosen from a large finite field, the solutions form a finite

abelian group.The discrete logarithm problem on such elliptic curve groups is believed

to be more difficult than the corresponding problem in the multiplicative group of

nonzero elements of the underlying finite field.Thus keys in elliptic curve cryptography

can be chosen to be much shorter for a comparable level of security.

Unlike other popular public key cryptosystems, no mathematical proof of difficulty has been published for ECC as of 2006. However, American National Standards

(35)

Institute (ANSI) has published a digital signature standard based on elliptic curve cryptography in its ANSI X9.62 publication. That standard is also approved in NIST FIPS 186-2 for federal use.

(36)

Chapter 3 Advanced Access Content System

3.1

Introduction

On July 14, 2004, eight companies in three key industry sectors joined forces to establish a licensing entity with the responsibility to create and manage a copy

protection scheme for entertainment content to be incorporated into the next generation optical storage media. The eight companies are Sony, Toshiba and Matsushita

Electronics from the consumer electronics sector; Microsoft, Intel and IBM from the Information Technology sector; and Disney and Warner Brothers from the movie studio sector. The licensing entity they created is forever known as AACS LA, LLC.

After nine months of gestation period, the licensing entity finally comes up with version 0.90 specification on April 14, 2005. The copy protection scheme, Advanced Access Content System (AACS), aims to provide an advanced, robust and renewable method for protecting audiovisual entertainment content, including high-definition content. This version of the specification was published on their website for public review and independent study, and only contained the portion of the design not involving the specifics of any media format. Although AACS LA promised to finalize the specification to version 1.0 by the end of 2005, that time has come and gone. Another ten months has passed since version 0.90 was available, and the AACS

specification is updated with version 0.91 at last on February 17, 2006. This chapter will give a brief description of the essential procedures based on the version 0.91 of AACS specification.

(37)

3.2

Specification Organization

The specification is organized into several “books”. The books can be categorized into format independent portion and dependent portion. The format independent portion defines the cryptographic procedures that are used to protect audiovisual content stored on pre-recorded and recordable storage media. The format dependent portion then defines additional details for using the system on specific media formats.

Format Independent Books

Introduction and Common Cryptographic Elements Book [1] Pre-recorded Video Book [2]

Recordable Video Book [3] Format Specific Books

Blu-ray Disc Pre-recorded Book [4] Blu-ray Disc Recordable Book [5]

HD DVD and DVD Pre-recorded Book [6] HD DVD Recordable Book

Table 3-1 AACS Specification Organization

3.3

Common Cryptographic Functions

This section describes the cryptographic functions upon which AACS protection mechanisms are based. The functions are described in isolation, and their specific uses are described later in this chapter.

3.3.1

Advanced Encryption System (AES)

AES is a symmetric block cipher algorithm, as specified in FIPS Publication 197 [9]. The AES algorithm allows three key lengths: 128, 192, and 256 bits and works with messages in blocks of 128 bits each. Since AACS is based exclusively on AES with 128-bit key, this section will only describe this variant.

The AES algorithm proceeds as follows. An input plaintext block consists of 16

bytes, x0, ,x . The block is initially arranged into a four by four matrix of bytes in a 15

(38)

0,0 s s0,1 s0,2 s0,3 x0 x4 x8 x 12 1,0 s s1,1 s1,2 s1,3 x1 x5 x9 x 13 2,0 s s2,1 s2,2 s2,3 x2 x6 x10 x 14 3,0 s s3,1 s3,2 s3,3 x3 x7 x11 x 15

Figure 3-1 AES Input to State Assignment

Then, AES processes the State in a number of rounds. If the key length is 128 bits, then the number of rounds is 10. Each round performs identical tasks with the final round slightly different. The 128-bit secret key is not used directly but is first expanded into a set of round keys.

Round(State, ExpandedKey[i]) { SubBytes(State); ShiftRows(State); MixColumns(State); AddRoundKey(State, ExpandedKey[i]); } FinalRound(State, ExpandedKey[Nr]) { SubBytes(State); ShiftRows(State); AddRoundKey(State, ExpandedKey[Nr]); } z AddRoundKey:

In this transformation, the state is modified by combining it with a round key using the bitwise XOR operation.

z SubBytes:

In this transformation, each byte of the state is replaced by another byte value. The replacement algorithm is based on advanced mathematics of finite field. However, we could simply implement this operation by hardwiring a lookup table.

(39)

0 1 2 3 4 5 6 7 8 9 A B C D E F 0 63 7C 77 7B F2 6B 6F C5 30 01 67 2B FE D7 AB 76 1 CA 82 C9 7D FA 59 47 F0 AD D4 A2 AF 9C A4 72 C0 2 B7 FD 93 26 36 3F F7 CC 34 A5 E5 F1 71 D8 31 15 3 04 C7 23 C3 18 96 05 9A 07 12 80 E2 EB 27 B2 75 4 09 83 2C 1A 1B 6E 5A A0 52 3B D6 B3 29 E3 2F 84 5 53 D1 00 ED 20 FC B1 5B 6A CB BE 39 6A 4C 58 CF 6 D0 EF AA FB 43 4D 33 85 45 59 02 7F 50 3C 9F A8 7 51 A3 40 8F 92 9D 38 F5 BC B6 DA 21 10 FF F3 D2 8 CD 0C 13 EC 5F 97 44 17 C4 A7 7E 3D 64 5D 19 73 9 60 81 4F DC 22 2A 90 88 46 EE B8 14 DE 5E 0B DB A E0 32 3A 0A 49 06 24 5C C2 D3 AC 62 91 95 E4 79 B E7 C8 37 6D 8D D5 4E A9 6C 56 F4 EA 65 7A AE 08 C BA 78 25 2E 1C A6 B4 C6 E8 DD 74 1F 4B BD 8B 8A D 70 3E B5 66 48 03 F6 0E 61 35 57 B9 86 C1 1D 9E E E1 F8 98 11 69 D9 8E 94 9B 1E 87 E9 CE 55 28 DF F 8C A1 89 0D BF E6 42 68 41 99 2D 0F B0 54 BB 16 z ShiftRows

Each row of the state matrix is cyclically shifted left by different offsets.

a b c d a b c d

f g h e e f g h

k l i j i j k l

p m n o m n o p

z MixColumns

The columns of the state are considered as polynomials over GF(28) and

multiplied modulo x4 + 1 with a fixed polynomial

3 2

( ) 03 01 01 02

c x = ⋅ + ⋅ + ⋅ +x x x .

algorithm AES-128E(State, CipherKey) { KeyExpansion(CipherKey, ExpandedKey); AddRoundKey(State, ExpandedKey[0]); for (i = 1; i < 10; i++) Round(State, ExpandedKey[i]); FinalRound(State, ExpandedKey[10]); }

(40)

3.3.2

AES in ECB Mode

When managing cryptographic keys, the AES cipher is used in the ECB mode of operation. The AES encryption in ECB mode is represented by the function

AES-128E( , )k d

where d is a 128-bit data value to be encrypted, k is a 128-bit key. AES-128E returns the 128-bit encrypted result.

The AES decryption in ECB mode, on the other hand, is represented by the function

AES-128D( , )k d

where d is a 128-bit data value to be decrypted, k is a 128-bit key. AES-128D returns

the 128-bit decryption result.

3.3.3

AES in CBC Mode

When encrypting and decrypting protected content, the AES cipher is used in the CBC mode of operation. The AES encryption in CBC mode is represented by the function

AES-128CBCE( , )k d

where d is a frame of data to be encrypted, k is a 128-bit key. AES-128CBCE returns the encrypted frame.

The AES decryption in CBC mode, on the other hand, is represented by the function

AES-128CBCD( , )k d

where d is a frame of data to be decrypted, k is a 128-bit key. AES-128D returns the decryption frame.

(41)

decryption is a constant, iv0 =0BA0F8DDFEA61FB3D8DF9F566A050F7816.

3.3.4

AES-based One-way Function

AACS defines a cryptographic one-way function based on the AES algorithm. This function is referred to as the AES-based One-way Function, and is represented by

1 2

AES-G( ,x x )

where x and 1 x are 128-bit input values. 2 AES-G( ,x x returns a 128-bit result. 1 2)

2

x

The AES-based One-way Function result is defined by the following formula:

1 2 1 2 2

AES-G( ,x x )=AES-128D( ,x x )⊕x .

3.3.5

Secure Hash Algorithm (SHA)

NIST published a Secure Hash Standard in its FIPS Publication 180-2 [7] on August 1, 2002. The standard specifies four secure hash algorithms, SHA-1, SHA-256,

SHA-384, and SHA-512, for processing a message to produce a condensed

representation called a message digest. When AACS needs to generate or verify digital signatures, it would use SHA-1 algorithm for this purpose.

Each algorithm can be described in two stages: preprocessing and hash computation. Preprocessing involves padding a message, dividing the padded message into m-bit blocks, and setting initialization values to be used in the hash computation. The hash

AES-128D

1

x

1 2

(42)

computation generates a message schedule from the padded message and uses that schedule, along with functions, constants, and word operations to iteratively generate a series of hash values. The final hash value generated by the hash computation is used to determine the message digest.

The four algorithms differ most significantly in the number of bits of security that are provided for the data being hashed – this is directly related to the message digest length. Additionally, the four algorithms differ in terms of the size of the blocks and words of data that are used during hashing. Table 3-2 presents the basic properties of all four secure hash algorithms.

Algorithm Message Size (bits) Block Size (bits) Word Size (bits) Message Digest Size (bits) SHA-1 < 264 512 32 160 SHA-256 < 264 512 32 256 SHA-384 < 2128 1024 64 384 SHA-512 < 2128 1024 64 512

Table 3-2 Secure Hash Algorithm Properties

This section only describes SHA-1 algorithm in detail and refers interested readers to the original specification for more information on SHA-256, SHA-384, and

SHA-512.

SHA-1 may be used to hash a message of length no longer than 264 bits. During the

hash computation, the algorithm uses a message schedule of eighty 32-bit words,

labeled . The algorithm also requires five working variables, labeled a, b,

c, d, and e, and stores intermediate result into five 32-bit words, denoted

. A temporary 32-bit word, T, is also used. The following is the pseudo-code for the SHA-1 algorithm.

0, 1, , 79 W WW ( ) ( ) ( ) 0 , 1 , , 4 i i H HH i

(43)

SHA-1(M) {

/* Preprocessing */ 1. Pad the message, M.

2. Parse the padded message into N 512-bit blocks, M(1),…,M(N).

3. Set the initial hash value, H(0)

/* Hash Computation */ for i = 1 to N:

{

1. Prepare a message schedule, Wt.

2. Initialize the five working variables. 3. Update the five working variables.

4. Compute the ith intermediate hash value, H( )i . }

return H(N) }

z Preprocessing

Preprocessing consists of three steps: padding the message, parsing the padded

message into message blocks, and setting the initial hash value, H(0).

The message, M, shall be padded to ensure that the padded message is a multiple of 512 bits. Suppose that the message, M, is l bits in length. The message, M, is appended

with the bit “1”, followed by k zero bits, where k =min

{

x≥0l+ + ≡1 x 448 mod 512

}

,

and then appended with the 64-bit block that is equal to the binary representation of the number l.

After a message has been padded, it must be parsed into N 512-bit blocks before the

hash computation can begin. The parsed blocks are denoted by .

Also, each 512-bit block can be written as a sequence of sixteen 32-bit words. For example, the message block

(1) (2) ( )

, , , N

M MM

( )i

M can be broken up into M0( )i ,…,M1( )5i .

The initial hash value, , must also be set before hash computation commences,

and shall consist of the following five 32-bit words:

(0)

(44)

(0) 0 (0) 1 (0) 2 (0) 3 (0) 4 67452301 efcdab89 98badcfe 10325476 c3d2e1f0 H H H H H = = = = = z Hash Computation

After the preprocessing stage is done, SHA-1 processes each message block in turn to generate the final hash value. For each message block, the processing includes the preparation of a message schedule, the initialization of the working variables, the updating of the working variables and the computation of the intermediate hash value. The final intermediate hash value computed will be the hash value for the original message.

The message schedule consists of eighty 32-bit words, denoted by .

For the message block

0, 1, , 79

W WW

( )i

M , the message schedule is given by

( ) 1 3 8 14 16 , 0 15 16 79 ( ), i t t t t t t M t W t ROTL W W W W ⎧ ≤ ≤ ⎪ = ⎨ ≤ ≤ ⊕ ⊕ ⊕ ⎪⎩

The working variables are initialized to the previous iteration’s hash value: . The working variables are updated through the use of the message schedule, and pre-defined functions and constants.

( 1) ( 1) ( 1) ( 1) ( 1)

0 , , , 1 2 3 and

i i i i

a=Hb=Hc=Hd =He=H4i

SHA-1 uses a sequence of logical functions, f0, f … f . Each function 1, , 79 f , t

where , operates on three 32-bit words, x, y, and z, and produces a 32-bit

word as output. The function

0≤ ≤ 9t 7 ( , , ) t f x y z is defined as follows: ( , , ) ( ) ( ) 0 19 ( , , ) 20 39 ( , , ) ( , , ) ( ) ( ) ( ) 40 59 ( , , ) 60 79 t Ch x y z x y x z t Parity x y z x y z t f x y z Maj x y z x y x z y z t Parity x y z x y z t = ∧ ⊕ ¬ ∧ ≤ ≤ ⎧ ⎪ = ⊕ ⊕ ≤ ≤ ⎪ = ⎨ = ⊕ ∧ ⊕ ≤ ≤ ⎪ ⎪ = ⊕ ⊕ ≤ ≤

(45)

SHA-1 also uses a sequence of eighty 32-bit constants, K K0, 1,…,K79, given by t + ( )i (i 1) 5 827999 0 19 6 9 1 20 39 8 1 40 59 62 1 6 60 79 t a t ed eba t K f bbcdc t ca c d t ≤ ≤ ⎧ ⎪ ≤ ≤ ⎪ = ⎨ ≤ ≤ ⎪ ⎪ ≤ ≤

The working variables are updated by the following loop: for i = 0 to 79, { T =ROTL a5( )+ f b c dt( , , )+ +e Kt W e=d d =c c=ROTL30( )b b=a a=T }

Finally, the ith intermediate hash value is computed: 0( ) 0( 1),

i i

H = +a H

1 1

H = +b H − , H2( )i = +c H2(i−1), H3( )i = +d H3(i−1), and . The Nth

intermediate hash value, , is returned as the 160-bit hash value.

( ) ( 1) 4 i i− (N) 4 H = +e H H

3.3.6

AES-based Hashing Function

In certain calculations involving keys, data may need to be processed to produce a condensed representation. To this end, AACS defines a hash function based on the AES algorithm. This procedure, referred to as the AES-based Hashing Function, is

represented by

AES-H(M)

where M is input data of arbitrary length. AES-H(M) returns the corresponding 128-bit hash value.

Before the hash value can be computed, the data to be hashed is padded using the standard SHA-1 method as described in section 3.3.5. The padded message is then

(46)

parsed into blocks of length 128-bit each. AES-H processes these blocks sequentially to compute the message digest. The algorithm can be described by the following

pseudo-code.

algorithm AES-H(M) {

/* Preprocessing */ Pad the message, M.

Parse the padded message into N 128-bit blocks, M(1),…,M(N).

Set the initial hash value,

H(0) ←2DC2DF39420321D0CEF1FE2374029D95 ;16

/* Hash Computation */ for i = 1 to N do

{

Compute the ith intermediate hash value H( )i

( ) ( ) ( 1) AES-G( , ) i i HM iH } return H(N) }

3.3.7

Cipher-based MAC (CMAC)

AACS requires a message authentication code algorithm to protect the integrity of information. In 2005, NIST described a method of incorporating a symmetric block cipher to create message authentication code in its Special Publication 800-38b. The MAC function they described is thus called Cipher-based MAC, CMAC for short. CMAC depends on the choice of an underlying symmetric block cipher. The CMAC key is the same as the block cipher key. AACS chooses AES with key length of 128 bits as the underlying cipher algorithm.

The input to the MAC generation function is a bit string called the message,

(47)

bit string called the MAC, denoted . The length of , denoted , is 128-bit as stated in the specification.

T T Tlen

The block cipher key is used to derive two additional secret subkeys, denoted

and . The subkeys has the same length as the block cipher key. During the subkey

generation process, a bit string, denoted

1

K

2

K

b

R , is initialized according to the cipher block

length. In particular, for block length b=128, R128=0 10000111120 . In general, Rb is the binary representation of a certain irreducible polynomial of degree b. The subkeys are generation with the following steps:

algorithm ( )GenSubkey K 1. LCIPHK(0 );b 1 2. K ← << L 1; 1 1 1 3. if MSB ( ) 1 then b; L K K R = ← ⊕ 2 1 4. KK << 1; 1 2 2 5. if MSB ( ) 1 then ; b L K K R = ← ⊕ 1 2 6. return ,K K

As for any MAC algorithm, an authorized party applies the MAC generation process to produce a MAC for the data authentication purpose. Subsequently, any authorized party can apply the same MAC generation to the data and compare the computed MAC with the received MAC. The verification process fails if a mismatch is detected.

The specification of CMAC algorithm for MAC generation is as follows:

algorithm ( ,CMAC k M)

1 2

(48)

2. if 0 then 1; else ; Mlen n n Mlen b = ← ← ⎡ * 1 2 1 1 2 1

3. Parse into blocks such that

|| || || ||

where , , , are complete blocks.

n n n M n M M M M M M M M − − = … * * 1 * 2

4. if is a complete block then

; else ( ||10 ) where 1; n n n j n n M M K M M K M j nb Mlen ← ⊕ ← ⊕ ← − − 0 5. C ←0 ;b 1 6. for 1 to do ( ) i K i i n C CIPH C M ← ← ⊕ i ; 7. T ←MSBTlen(Cn); 8. return ;T

3.3.8

Random Number Generator

Random/pseudorandom number generators are incorporated by AACS to generate values such as cryptographic keys. Unless stated otherwise, one or more of the

following generators shall be used:

1. Pseudorandom number generator based on a design described in ANSI X9.31.

2. Pseudorandom number generators defined in FIPS PUB 186-2 (+Change

Notice).

3. Random or pseudorandom number generator of equal or higher quality as

measured by the tests described in NIST Special Publication 800-22 when using the default parameters and other recommendations provided therein.

3.3.9

Digital Signature Algorithm

All digital signatures in AACS utilize the ECDSA algorithm, which is based on elliptic curve cryptography, and is defined in ANSI X9.62 publication. NIST also

數據

Figure 2-1 X.509 Certificate Format
Table 3-1 AACS Specification Organization
Figure 3-1 AES Input to State Assignment
Table 3-2 Secure Hash Algorithm Properties
+5

參考文獻

相關文件

六、 屬關鍵基礎設施提供者,且業務經中央目的事 業主管機關考量其提供或維運關鍵基礎設施服

不 過他也確有提出一個統一出發點的具體想法, 就是利用學校數學研習組 (School Math- ematics Study Group:SMSG) 的公設系統。 這亦體現於他有份主導的 1999 年加州內容框架 (California

機器人、餐飲服務、花藝、雲端運算、網路安全、3D 數位遊戲藝術、旅 館接待、行動應用開發、展示設計、數位建設

• Content demands – Awareness that in different countries the weather is different and we need to wear different clothes / also culture. impacts on the clothing

This kind of algorithm has also been a powerful tool for solving many other optimization problems, including symmetric cone complementarity problems [15, 16, 20–22], symmetric

(四)訓練場地各班次教室之環境條件、設備數量等級、建築

Following the supply by the school of a copy of personal data in compliance with a data access request, the requestor is entitled to ask for correction of the personal data

• Most programs tend to access the storage at any particular level more frequently than the storage at the lower level.. • Locality: tend to access the same set