JP2009258772A - Application execution device - Google Patents
Application execution device Download PDFInfo
- Publication number
- JP2009258772A JP2009258772A JP2006216861A JP2006216861A JP2009258772A JP 2009258772 A JP2009258772 A JP 2009258772A JP 2006216861 A JP2006216861 A JP 2006216861A JP 2006216861 A JP2006216861 A JP 2006216861A JP 2009258772 A JP2009258772 A JP 2009258772A
- Authority
- JP
- Japan
- Prior art keywords
- class file
- encrypted
- decryption key
- class
- application
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 description 24
- 230000008569 process Effects 0.000 description 11
- 238000012545 processing Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000001514 detection method Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 238000013478 data encryption standard Methods 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000001172 regenerating effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/12—Protecting executable software
- G06F21/121—Restricting unauthorised execution of programs
- G06F21/125—Restricting unauthorised execution of programs by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code
Abstract
Description
本発明はアプリケーションの著作権保護に関するものである。 The present invention relates to application copyright protection.
従来のアプリケーションの著作権保護としては、クラスファイルを暗号化するものがあった。たとえば非特許文献1にはクラスファイルを暗号化する方法および暗号化されたクラスファイルを実行時に復号化するための方法が開示されている。図12は、従来のアプリケーションの著作権保護を行う一般的な再生装置の構成図であり、仮想マシーン101とJava(登録商標)アプリケーション102で構成されている。仮想マシーン(Java(登録商標)バーチャルマシーンとも言う)101はインタプリタ103、ヒープメモリ104、ローダ105で構成されている。アプリケーションは復号クラスローダ107、保護対象クラスファイル108、復号鍵109で構成されている。アプリケーションの著作権保護を行うために保護対象クラスファイル108は暗号化形式で配布されていて解釈実行される前に復号化し解釈可能な形式に変換される。保護対象クラスが暗号化されたクラスファイルからクラスオブジェクトに変更される制御フローを図13で示す。まず復号クラスローダ107が復号鍵109を利用し、保護対象クラスファイル108を復号化する(S201)。復号化することによりクラスファイルを得る。その後、復号化クラスローダ107がローダ105にクラスファイルを渡しクラスオブジェクトを得る(S202)。保護対象クラスファイル108は暗号化形式で配布されることでアプリケーションの著作権保護が行われる。
Conventional copyright protection for applications includes encryption of class files. For example, Non-Patent
上述の方式以外に、従来のコンテンツのコピープロテクションを適応し配布ファイル全体を暗号化するやり方も考えられる。
しかしながら、従来の技術ではJava(登録商標)アプリケーションの著作権を十分に保護することができない。復号化とロードの間で平文クラスファイルを受け渡しするためのインターフェースは明確であり、復号化とロード処理の間に平文クラスファイルの傍受が容易であるという貧弱性がある。また、復号化された後の平文クラスファイルはヒープメモリ104上に配置されるため、解析が容易である。また、攻撃者が配信メディアを通常のリバースエンジニアリング技術で解析し著作権保護を無効化することが可能だという欠点もある。リバースエンジニアリングとは逆アセンブラなどのツールを利用しアプリケーションを解析する技術である。
However, the conventional technology cannot sufficiently protect the copyright of the Java (registered trademark) application. The interface for passing the plaintext class file between decryption and loading is clear, and there is a weakness that it is easy to intercept the plaintext class file between decryption and loading processing. Further, since the decrypted plaintext class file is arranged on the
また、配布ファイル全体を暗号化した場合、実行の際に配布ファイル全体の復号化を行い、配布ファイル全体をメモリ上に配置するため、長時間配布ファイルを平文としたものをメモリ上に保持する必要があるためメモリの傍受に対し極めて弱い。 In addition, when the entire distribution file is encrypted, the entire distribution file is decrypted at the time of execution, and the entire distribution file is placed in the memory, so that the long distribution file in plain text is held in the memory. Because it is necessary, it is extremely vulnerable to memory interception.
本発明のアプリケーション実行装置は、オブジェクト指向型のプログラムで記述されたアプリケーションの実行を行うアプリケーション実行装置であって、入力される前記アプリケーションに含まれる暗号化クラスファイルを復号し平文のクラスファイルとした後、クラスオブジェクトに変換してヒープメモリへロードするデクリプタローダ、入力される前記アプリケーション内の平文クラスファイルをクラスオブジェクトに変換して前記ヒープメモリへロードするローダおよび前記ヒープメモリへロードされたクラスオブジェクトを解釈実行するインタプリタを有する仮想マシンと、前記インタプリタにて実行すべきクラスファイルが暗号化されたクラスファイルまたは平文クラスファイルかを判定するローディング判定部とを備え、前記ローディング判定部において、前記インタプリタにて実行すべきクラスファイルが暗号化されたクラスファイルであると判定された場合には前記クラスファイルを前記デクリプタローダへ送り、前記ローディング判定部において前記仮想マシンへ送られるクラスファイルが平文クラスファイルであると判定された場合には前記クラスファイルを前記ローダへ送るように構成したことを特徴とする。 An application execution apparatus according to the present invention is an application execution apparatus that executes an application described in an object-oriented program, and decrypts an encrypted class file included in the input application into a plain text class file. Then, a decrypter loader that converts the class object into a heap memory and loads it into the heap memory, a loader that converts the input plain text class file in the application into a class object and loads it into the heap memory, and a class loaded into the heap memory A virtual machine having an interpreter that interprets and executes an object; and a loading determination unit that determines whether a class file to be executed by the interpreter is an encrypted class file or a plain text class file. When the coding determination unit determines that the class file to be executed by the interpreter is an encrypted class file, the class determination unit sends the class file to the decryptor loader, and the loading determination unit transfers the class file to the virtual machine. In the case where it is determined that the class file to be sent is a plain text class file, the class file is sent to the loader.
また、前記アプリケーションは記録媒体内に記録され、かつ前記記録媒体は、前記アプリケーションに含まれる暗号化されたクラスファイルを復号するための復号鍵をマスター鍵にて暗号化して記録し、かつ前記デクリプタローダは前記マスター鍵を予め保持しており、前記暗号化されたクラスファイルが入力されると暗号化されたクラスファイルに対応する暗号化された復号鍵を前記記録媒体から取得し、前記暗号化された復号鍵を前記予め保持するマスター鍵を用いて復号し、前記復号された復号鍵を用いて前記暗号化されたクラスファイルを復号することを特徴とする。 In addition, the application is recorded in a recording medium, and the recording medium encrypts and records a decryption key for decrypting an encrypted class file included in the application with a master key, and stores the data in the recording medium. The crypt loader holds the master key in advance, and when the encrypted class file is input, obtains an encrypted decryption key corresponding to the encrypted class file from the recording medium, and The encrypted decryption key is decrypted using the master key stored in advance, and the encrypted class file is decrypted using the decrypted decryption key.
また、前記デクリプタローダは前記記録媒体から前記暗号化された復号鍵を取得し、暗号化されたクラスファイルが入力される前に前記マスター鍵を用いて前記暗号化された復号鍵を復号し、キャッシュするようにしたことを特徴とする。 The decrypter loader obtains the encrypted decryption key from the recording medium and decrypts the encrypted decryption key using the master key before the encrypted class file is input. It is characterized by being cached.
また、前記アプリケーションは記録媒体内に記録され、かつ前記記録媒体は、前記アプリケーションに含まれる暗号化されたクラスファイルを復号するための復号鍵であってタイトル鍵で暗号化された復号鍵および前記復号鍵を取り出すための情報を記述したメタファイルを記録し、前記ローディング判定部は前記アプリケーション実行時に前記アプリケーションに含まれる前記暗号化されたクラスファイルに対応する復号鍵を取り出すための情報を記述したメタファイルに基づいて対応する復号鍵を取り出すための情報を前記デクリプタローダへ送り、前記デクリプタローダは前記復号鍵を取り出すための情報に基づき前記暗号化された復号鍵を前記記録媒体から取得し、前記デクリプタローダが保持するタイトル鍵を用いて復号した復号鍵を用いて前記暗号化されたクラスファイルを復号することを特徴とする。 Further, the application is recorded in a recording medium, and the recording medium is a decryption key for decrypting an encrypted class file included in the application, the decryption key encrypted with a title key, and the A metafile describing information for extracting a decryption key is recorded, and the loading determination unit describes information for extracting a decryption key corresponding to the encrypted class file included in the application when the application is executed. Information for retrieving the corresponding decryption key based on the metafile is sent to the decryptor loader, and the decrypter loader obtains the encrypted decryption key from the recording medium based on the information for retrieving the decryption key Decrypted using the title key held by the decryptor loader Characterized by decrypting the encrypted class files with.
また、前記デクリプタローダは前記記録媒体から取得した復号鍵を保持するようにしたことを特徴とする。 The decrypter loader holds a decryption key acquired from the recording medium.
本発明のアプリケーション実行装置は、オブジェクト指向型のプログラムで記述されたアプリケーションの実行を行うアプリケーション実行装置であって、入力される前記アプリケーションに含まれる暗号化されたクラスファイルを復号し、平文クラスファイルをローダへ送るためのデクリプタおよび入力される前記アプリケーション内の平文クラスファイルまたは前記デクリプタにより復号された平文クラスファイルをクラスオブジェクトに変換しヒープメモリへロードするローダおよび前記ヒープメモリへロードされたクラスオブジェクトを解釈実行するインタプリタを有する仮想マシンと、前記インタプリタにて実行すべきクラスファイルが暗号化されたクラスファイルか平文クラスファイルかを判定するローディング判定部とを備え、前記ローディング判定部により前記インタプリタにて実行すべきクラスファイルが暗号化されたクラスファイルであると判定された場合、前記暗号化されたクラスファイルを前記デクリプタへ送り、前記ローディング判定部により前記仮想マシンへ送られるクラスファイルが平文クラスファイルであると判定された場合には前記クラスファイルを前記ローダへ送るように構成したことを特徴とする。 An application execution apparatus according to the present invention is an application execution apparatus that executes an application described in an object-oriented program, decrypts an encrypted class file included in the input application, and outputs a plaintext class file. And a loader that converts the input plaintext class file in the application or the plaintext class file decrypted by the decryptor into a class object and loads it into the heap memory, and the class object loaded into the heap memory A virtual machine having an interpreter that interprets and executes, and a loading determination unit that determines whether a class file to be executed by the interpreter is an encrypted class file or a plain text class file When it is determined by the loading determination unit that the class file to be executed by the interpreter is an encrypted class file, the encrypted class file is sent to the decryptor, and the virtual machine is transmitted by the loading determination unit. When the class file to be sent to is determined to be a plain text class file, the class file is sent to the loader.
また、前記アプリケーションは記録媒体内に記録され、かつ前記記録媒体は、前記アプリケーションに含まれる暗号化されたクラスファイルを復号するための復号鍵をマスター鍵にて暗号化して記録し、前記デクリプタは前記マスター鍵を予め保持しており、前記暗号化されたクラスファイルが入力されると、前記暗号化されたクラスファイルを復号するための復号鍵を前記記録媒体から取得し、前記取得した暗号化された復号鍵を前記予め保持するマスター鍵を用いて復号し、前記復号された復号鍵を用いて前記暗号化されたクラスファイルを復号することを特徴とする。 The application is recorded in a recording medium, and the recording medium encrypts and records a decryption key for decrypting an encrypted class file included in the application with a master key, and the decryptor The master key is held in advance, and when the encrypted class file is input, a decryption key for decrypting the encrypted class file is obtained from the recording medium, and the obtained encryption The decrypted key is decrypted using the master key held in advance, and the encrypted class file is decrypted using the decrypted decryption key.
また、前記デクリプタは前記記録媒体から前記暗号化された復号鍵を取得し、前記暗号化されたクラスファイルが入力される前に前記復号鍵をキャッシュするようにしたことを特徴とする。 The decryptor acquires the encrypted decryption key from the recording medium and caches the decryption key before the encrypted class file is input.
また、前記アプリケーションは記録媒体内に記録され、かつ前記記録媒体は、前記アプリケーションに含まれる暗号化されたクラスファイルを復号するための復号鍵であってタイトル鍵で暗号化された復号鍵および前記復号鍵を取り出すための情報を記述したメタファイルを記録し、前記ローディング判定部は前記アプリケーション実行時に前記アプリケーションに含まれる前記暗号化されたクラスファイルに対応する復号鍵を取り出すための情報を記述したメタファイルに基づいて対応する復号鍵を取り出すための情報を前記デクリプタへ送り、前記デクリプタは前記復号鍵を取り出すための情報に基づき前記暗号化された復号鍵を前記記録媒体から取得し、前記デクリプタが保持するタイトル鍵を用いて復号した復号鍵を用いて前記暗号化されたクラスファイルを復号することを特徴とする。 Further, the application is recorded in a recording medium, and the recording medium is a decryption key for decrypting an encrypted class file included in the application, the decryption key encrypted with a title key, and the A metafile describing information for extracting a decryption key is recorded, and the loading determination unit describes information for extracting a decryption key corresponding to the encrypted class file included in the application when the application is executed. Information for retrieving a corresponding decryption key based on the metafile is sent to the decryptor, and the decryptor obtains the encrypted decryption key from the recording medium based on the information for retrieving the decryption key, and the decryptor Using the decryption key decrypted using the title key held by Wherein the decoding the class file.
また、前記デクリプタは前記記録媒体から取得した復号鍵を保持するようにしたことを特徴とする。 Further, the decryptor holds a decryption key acquired from the recording medium.
本発明のアプリケーション実行装置は、オブジェクト指向型のプログラムで記述されたアプリケーションの実行を行うアプリケーション実行装置であって、入力される前記アプリケーションに含まれる暗号化クラスファイルを復号し平文のクラスファイルとした後、クラスオブジェクトに変換してヒープメモリへロードするデクリプタローダ、入力される前記アプリケーション内の平文クラスファイルをクラスオブジェクトに変換して前記ヒープメモリへロードするローダおよび前記ヒープメモリへロードされたクラスオブジェクトを解釈実行するインタプリタを有する仮想マシンと、前記インタプリタにて実行すべきクラスファイルが暗号化されたクラスファイルまたは平文クラスファイルかを判定するローディング判定部とを備え、前記ローディング判定部において、前記インタプリタにて実行すべきクラスファイルが暗号化されたクラスファイルであると判定された場合には前記クラスファイルを前記デクリプタローダへ送り、前記ローディング判定部において前記仮想マシンへ送られるクラスファイルが平文クラスファイルであると判定された場合には前記クラスファイルを前記ローダへ送るように構成したので、仮想マシン内で暗号化されたクラスファイルを復号し、ロードすることが可能となり、アプリケーション実行時の秘匿性が高くなるばかりか、クラスファイル単位でのロードが可能となるため、アプリケーション実行時の秘匿性が高くなる。 An application execution apparatus according to the present invention is an application execution apparatus that executes an application described in an object-oriented program, and decrypts an encrypted class file included in the input application into a plain text class file. Then, a decrypter loader that converts the class object into a heap memory and loads it into the heap memory, a loader that converts the input plain text class file in the application into a class object and loads it into the heap memory, and a class loaded into the heap memory A virtual machine having an interpreter that interprets and executes an object; and a loading determination unit that determines whether a class file to be executed by the interpreter is an encrypted class file or a plain text class file. When the coding determination unit determines that the class file to be executed by the interpreter is an encrypted class file, the class determination unit sends the class file to the decryptor loader, and the loading determination unit transfers the class file to the virtual machine. If it is determined that the class file to be sent is a plain text class file, the class file is sent to the loader, so it is possible to decrypt and load the encrypted class file in the virtual machine. Thus, not only the confidentiality at the time of executing the application becomes high, but also the loading at the class file unit becomes possible, so the confidentiality at the time of executing the application becomes high.
更に、アプリケーションの中に著作権保護されるべきクラスファイルを暗号化クラスファイルとし、著作権保護される必要のないクラスファイルを通常のクラスファイルとすることで、通常のクラスファイルをロードさせる場合にローダをチューニングすることにより通常のクラスファイルのローディング処理速度の向上を図ることが可能となる。 In addition, when a class file that should be copyright-protected in an application is an encrypted class file and a class file that does not need to be copyright-protected is a normal class file, the normal class file is loaded. By tuning the loader, it is possible to improve the normal class file loading processing speed.
また、前記アプリケーションは記録媒体内に記録され、かつ前記記録媒体は、前記アプリケーションに含まれる暗号化されたクラスファイルを復号するための復号鍵であってタイトル鍵で暗号化された復号鍵および前記復号鍵を取り出すための情報を記述したメタファイルを記録し、前記ローディング判定部は前記アプリケーション実行時に前記アプリケーションに含まれる前記暗号化されたクラスファイルに対応する復号鍵を取り出すための情報を記述したメタファイルに基づいて対応する復号鍵を取り出すための情報を前記デクリプタローダへ送り、前記デクリプタローダは前記復号鍵を取り出すための情報に基づき前記暗号化された復号鍵を前記記録媒体から取得し、前記デクリプタローダが保持するタイトル鍵を用いて復号した復号鍵を用いて前記暗号化されたクラスファイルを復号するので、復号鍵および暗号化されたクラスファイルのリバースエンジニアリング技術での解析が困難となる。 Further, the application is recorded in a recording medium, and the recording medium is a decryption key for decrypting an encrypted class file included in the application, the decryption key encrypted with a title key, and the A metafile describing information for extracting a decryption key is recorded, and the loading determination unit describes information for extracting a decryption key corresponding to the encrypted class file included in the application when the application is executed. Information for retrieving the corresponding decryption key based on the metafile is sent to the decryptor loader, and the decrypter loader obtains the encrypted decryption key from the recording medium based on the information for retrieving the decryption key Decrypted using the title key held by the decryptor loader Since decrypting the encrypted class file with, it is difficult to analyze in reverse engineering techniques decryption key and the encrypted class files.
また、前記デクリプタローダは前記記録媒体から前記暗号化された復号鍵を取得し、暗号化されたクラスファイルが入力される前に前記マスター鍵を用いて前記暗号化された復号鍵を復号し、キャッシュするようにしたので、復号鍵を用いて暗号化されたクラスファイルを復号する処理を速くすることができる。 The decrypter loader obtains the encrypted decryption key from the recording medium and decrypts the encrypted decryption key using the master key before the encrypted class file is input. Therefore, the process of decrypting the class file encrypted using the decryption key can be speeded up.
また、前記アプリケーションは記録媒体内に記録され、かつ前記記録媒体は、前記アプリケーションに含まれる暗号化されたクラスファイルを復号するための復号鍵であってタイトル鍵で暗号化された復号鍵および前記復号鍵を取り出すための情報を記述したメタファイルを記録し、前記ローディング判定部は前記アプリケーション実行時に前記アプリケーションに含まれる前記暗号化されたクラスファイルに対応する復号鍵を取り出すための情報を記述したメタファイルに基づいて対応する復号鍵を取り出すための情報を前記デクリプタローダへ送り、前記デクリプタローダは前記復号鍵を取り出すための情報に基づき前記暗号化された復号鍵を前記記録媒体から取得し、前記デクリプタローダが保持するタイトル鍵を用いて復号した復号鍵を用いて前記暗号化されたクラスファイルを復号するこので、暗号化されたクラスファイルに対応する復号鍵を取り出すための情報を記述したメタファイルに複数の復号鍵を特定することで複数の復号鍵が利用可能になり、複数の復号鍵のひとつが暗号解読法により攻撃者にわかってしまっても、他の復号鍵が攻撃者に分らない限りは、他の復号鍵を用いて復号する暗号化されたクラスファイルの解読が出来ないため、より秘匿性が高くなる。 Further, the application is recorded in a recording medium, and the recording medium is a decryption key for decrypting an encrypted class file included in the application, the decryption key encrypted with a title key, and the A metafile describing information for extracting a decryption key is recorded, and the loading determination unit describes information for extracting a decryption key corresponding to the encrypted class file included in the application when the application is executed. Information for retrieving the corresponding decryption key based on the metafile is sent to the decryptor loader, and the decrypter loader obtains the encrypted decryption key from the recording medium based on the information for retrieving the decryption key Decrypted using the title key held by the decryptor loader The decrypted class file is decrypted by using a plurality of decryption keys by specifying a plurality of decryption keys in a metafile that describes information for extracting a decryption key corresponding to the encrypted class file. Even if the key becomes available and one of the multiple decryption keys is known to the attacker by cryptanalysis, the decryption key can be decrypted using another decryption key unless the attacker knows the other decryption key. Since the class file cannot be decrypted, the secrecy becomes higher.
また、前記デクリプタローダは前記記録媒体から取得した復号鍵を保持するようにしたので、復号鍵を用いて暗号化されたクラスファイルを復号する処理を速くすることができる。 In addition, since the decrypter loader holds the decryption key acquired from the recording medium, the process of decrypting the class file encrypted using the decryption key can be accelerated.
本発明のアプリケーション実行装置は、オブジェクト指向型のプログラムで記述されたアプリケーションの実行を行うアプリケーション実行装置であって、入力される前記アプリケーションに含まれる暗号化されたクラスファイルを復号し、平文クラスファイルをローダへ送るためのデクリプタおよび入力される前記アプリケーション内の平文クラスファイルまたは前記デクリプタにより復号された平文クラスファイルをクラスオブジェクトに変換しヒープメモリへロードするローダおよび前記ヒープメモリへロードされたクラスオブジェクトを解釈実行するインタプリタを有する仮想マシンと、前記インタプリタにて実行すべきクラスファイルが暗号化されたクラスファイルか平文クラスファイルかを判定するローディング判定部とを備え、前記ローディング判定部により前記インタプリタにて実行すべきクラスファイルが暗号化されたクラスファイルであると判定された場合、前記暗号化されたクラスファイルを前記デクリプタへ送り、前記ローディング判定部により前記仮想マシンへ送られるクラスファイルが平文クラスファイルであると判定された場合には前記クラスファイルを前記ローダへ送るように構成したことを特徴とする。 An application execution apparatus according to the present invention is an application execution apparatus that executes an application described in an object-oriented program, decrypts an encrypted class file included in the input application, and outputs a plaintext class file. And a loader that converts the input plaintext class file in the application or the plaintext class file decrypted by the decryptor into a class object and loads it into the heap memory, and the class object loaded into the heap memory A virtual machine having an interpreter that interprets and executes, and a loading determination unit that determines whether a class file to be executed by the interpreter is an encrypted class file or a plain text class file When it is determined by the loading determination unit that the class file to be executed by the interpreter is an encrypted class file, the encrypted class file is sent to the decryptor, and the virtual machine is transmitted by the loading determination unit. When the class file to be sent to is determined to be a plain text class file, the class file is sent to the loader.
また、前記アプリケーションは記録媒体内に記録され、かつ前記記録媒体は、前記アプリケーションに含まれる暗号化されたクラスファイルを復号するための復号鍵をマスター鍵にて暗号化して記録し、前記デクリプタは前記マスター鍵を予め保持しており、前記暗号化されたクラスファイルが入力されると、前記暗号化されたクラスファイルを復号するための復号鍵を前記記録媒体から取得し、前記取得した暗号化された復号鍵を前記予め保持するマスター鍵を用いて復号し、前記復号された復号鍵を用いて前記暗号化されたクラスファイルを復号するので、仮想マシン内で暗号化されたクラスファイルを復号し、ロードすることが可能となり、アプリケーション実行時の秘匿性が高くなるばかりか、クラスファイル単位でのロードが可能となるため、アプリケーション実行時の秘匿性が高くなる。 The application is recorded in a recording medium, and the recording medium encrypts and records a decryption key for decrypting an encrypted class file included in the application with a master key, and the decryptor The master key is held in advance, and when the encrypted class file is input, a decryption key for decrypting the encrypted class file is obtained from the recording medium, and the obtained encryption The decrypted key is decrypted using the master key held in advance, and the encrypted class file is decrypted using the decrypted decryption key, so the encrypted class file is decrypted in the virtual machine. It can be loaded, and the confidentiality at the time of application execution becomes high, and loading by class file unit is possible. Made for, confidentiality at the time of application execution is higher.
更に、アプリケーションの中に著作権保護されるべきクラスファイルを暗号化クラスファイルとし、著作権保護される必要のないクラスファイルを通常のクラスファイルとすることで、通常のクラスファイルをロードさせる場合にローダをチューニングすることにより通常のクラスファイルのローディング処理速度の向上を図ることが可能となる。 In addition, when a class file that should be copyright-protected in an application is an encrypted class file and a class file that does not need to be copyright-protected is a normal class file, the normal class file is loaded. By tuning the loader, it is possible to improve the normal class file loading processing speed.
また、前記アプリケーションは記録媒体内に記録され、かつ前記記録媒体は、前記アプリケーションに含まれる暗号化されたクラスファイルを復号するための復号鍵をマスター鍵にて暗号化して記録し、前記デクリプタは前記マスター鍵を予め保持しており、前記暗号化されたクラスファイルが入力されると、前記暗号化されたクラスファイルを復号するための復号鍵を前記記録媒体から取得し、前記取得した暗号化された復号鍵を前記予め保持するマスター鍵を用いて復号し、前記復号された復号鍵を用いて前記暗号化されたクラスファイルを復号するので、復号鍵および暗号化されたクラスファイルのリバースエンジニアリング技術での解析が困難となる。 The application is recorded in a recording medium, and the recording medium encrypts and records a decryption key for decrypting an encrypted class file included in the application with a master key, and the decryptor The master key is held in advance, and when the encrypted class file is input, a decryption key for decrypting the encrypted class file is obtained from the recording medium, and the obtained encryption Since the decrypted key is decrypted using the master key held in advance, and the encrypted class file is decrypted using the decrypted decryption key, the reverse engineering of the decrypted key and the encrypted class file is performed. Analysis with technology becomes difficult.
また、前記デクリプタは前記記録媒体から前記暗号化された復号鍵を取得し、前記暗号化されたクラスファイルが入力される前に前記復号鍵をキャッシュするようにしたので、復号鍵を用いて暗号化されたクラスファイルを復号する処理を速くすることができる。 Further, the decryptor obtains the encrypted decryption key from the recording medium and caches the decryption key before the encrypted class file is input. It is possible to speed up the process of decrypting the converted class file.
また、前記アプリケーションは記録媒体内に記録され、かつ前記記録媒体は、前記アプリケーションに含まれる暗号化されたクラスファイルを復号するための復号鍵であってタイトル鍵で暗号化された復号鍵および前記復号鍵を取り出すための情報を記述したメタファイルを記録し、前記ローディング判定部は前記アプリケーション実行時に前記アプリケーションに含まれる前記暗号化されたクラスファイルに対応する復号鍵を取り出すための情報を記述したメタファイルに基づいて対応する復号鍵を取り出すための情報を前記デクリプタへ送り、前記デクリプタは前記復号鍵を取り出すための情報に基づき前記暗号化された復号鍵を前記記録媒体から取得し、前記デクリプタが保持するタイトル鍵を用いて復号した復号鍵を用いて前記暗号化されたクラスファイルを復号するので、暗号化されたクラスファイルに対応する復号鍵を取り出すための情報を記述したメタファイルに複数の復号鍵を特定することで複数の復号鍵が利用可能になり、複数の復号鍵のひとつが暗号解読法により攻撃者にわかってしまっても、他の復号鍵が攻撃者に分らない限りは、他の復号鍵を用いて復号する暗号化されたクラスファイルの解読が出来ないため、より秘匿性が高くなる。 Further, the application is recorded in a recording medium, and the recording medium is a decryption key for decrypting an encrypted class file included in the application, the decryption key encrypted with a title key, and the A metafile describing information for extracting a decryption key is recorded, and the loading determination unit describes information for extracting a decryption key corresponding to the encrypted class file included in the application when the application is executed. Information for retrieving a corresponding decryption key based on the metafile is sent to the decryptor, and the decryptor obtains the encrypted decryption key from the recording medium based on the information for retrieving the decryption key, and the decryptor Using the decryption key decrypted using the title key held by Since the decrypted class file is decrypted, a plurality of decryption keys can be used by specifying a plurality of decryption keys in the metafile that describes information for extracting the decryption key corresponding to the encrypted class file. Even if one of the multiple decryption keys is known to the attacker by the decryption method, unless the other decryption key is known to the attacker, the decryption of the encrypted class file that is decrypted using the other decryption key Since it cannot be performed, confidentiality becomes higher.
また、前記デクリプタは前記記録媒体から取得した復号鍵を保持するようにしたので、復号鍵を用いて暗号化されたクラスファイルを復号する処理を速くすることができる。 In addition, since the decryptor holds the decryption key acquired from the recording medium, it is possible to speed up the process of decrypting the class file encrypted using the decryption key.
以下に、本発明の実施形態を、図面を参照しながら説明する。 Embodiments of the present invention will be described below with reference to the drawings.
(実施の形態1)
図1は、本実施の形態に用いる記録媒体の一例であるBD−ROM(BDともいう)の構成を示した図である。BDディスクは、他の光ディスク、例えばDVDやCDなどと同様にその内周から外周に向けてらせん状に記録領域を持ち、内周のリード・インと外周のリード・アウトの間に論理データを記録できる論理アドレス空間を有している。また、リード・インの内側にはBCA(Burst Cutting Area)と呼ばれるドライブでしか読み出せない特別な領域がある。この領域はアプリケーションから読み出せないため、例えば著作権保護技術などに利用されることがよくある。
(Embodiment 1)
FIG. 1 is a diagram illustrating a configuration of a BD-ROM (also referred to as a BD) which is an example of a recording medium used in the present embodiment. A BD disc has a spiral recording area from the inner circumference to the outer circumference like other optical discs such as DVDs and CDs, and logical data is transferred between the inner lead-in and outer lead-out. It has a logical address space that can be recorded. Further, inside the lead-in, there is a special area that can be read only by a drive called BCA (Burst Cutting Area). Since this area cannot be read from an application, it is often used for copyright protection technology, for example.
論理アドレス空間には、ファイルシステム情報(ボリューム)を先頭に映像データなどのアプリケーションデータが記録されている。ファイルシステムの実現例として、UDFやISO9660などの方式があり、通常のPCと同じように記録されている論理データをディレクトリ、ファイル構造を使って読み出しする事が可能になっている。 Application data such as video data is recorded in the logical address space with file system information (volume) at the head. As an implementation example of the file system, there are methods such as UDF and ISO9660, and logical data recorded in the same way as a normal PC can be read using a directory and file structure.
本実施の形態の場合、BDディスク上のディレクトリ、ファイル構造は、ルートディレクトリ(ROOT)直下にBDDATAディレクトリが置かれている。このディレクトリはBD−ROMで扱うJava(登録商標)アプリケーションが記録されているディレクトリである。 In the case of the present embodiment, the directory and file structure on the BD disc is a BDDATA directory placed directly under the root directory (ROOT). This directory is a directory in which Java (registered trademark) applications handled by the BD-ROM are recorded.
BDDATAディレクトリの下には、次の2種類のファイルが記録されている。 The following two types of files are recorded under the BDDATA directory.
(1) XXX.JAR(「XXX」は可変、拡張子「JAR」は固定)
Jarファイル仕様に準拠したJava(登録商標)アーカイブファイルである(以下Jarファイルと称する)。Jarファイルは複数のファイルをディレクトリ構造の形で格納している。一つのJarファイルは一つ以上のクラスファイル、Jarファイルの属性を示すメタファイル、画像などのデータが格納されている。基本的に一つのJarファイルに一つのJava(登録商標)アプリケーションが格納されており、Java(登録商標)アプリケーションはJava(登録商標)バーチャルマシーン上で実行することができる。Java(登録商標)アプリケーションは一つ以上のクラスファイルより構成されるが、Java(登録商標)アプリケーションの著作権保護を行う必要がある場合、一つ以上のクラスファイルが暗号化される。暗号化されていないクラスファイルは拡張子「class」を利用する。また、暗号化されているクラスファイルは拡張子「secure」を利用する。暗号化されているクラスファイルは、復号鍵(後述)がなければリバースエンジニアリングを利用しJava(登録商標)アプリケーションを復元することが不可能である。
(1) XXX. JAR ("XXX" is variable, extension "JAR" is fixed)
It is a Java (registered trademark) archive file conforming to the Jar file specification (hereinafter referred to as a Jar file). A Jar file stores a plurality of files in a directory structure. One Jar file stores data such as one or more class files, a metafile indicating attributes of the Jar file, and an image. Basically, one Java (registered trademark) application is stored in one Jar file, and the Java (registered trademark) application can be executed on the Java (registered trademark) virtual machine. A Java (registered trademark) application is composed of one or more class files. When it is necessary to protect the copyright of a Java (registered trademark) application, one or more class files are encrypted. An unencrypted class file uses the extension “class”. The encrypted class file uses the extension “secure”. An encrypted class file cannot restore a Java (registered trademark) application using reverse engineering without a decryption key (described later).
(2) XXX.KEY(「XXX」は可変、拡張子「KEY」は固定)
クラスファイルの復号化に必要な復号鍵である。復号鍵はマスター鍵で暗号化されており、再生装置でしか復号化できないようになっている。マスター鍵は再生装置の内部で保持されている。
(2) XXX. KEY ("XXX" is variable, extension "KEY" is fixed)
This is the decryption key required for decrypting the class file. The decryption key is encrypted with the master key and can be decrypted only by the playback device. The master key is held inside the playback device.
図2はJarファイルの中のファイル構造の一例である。ルートディレクトリ401以下に「META−INF」ディレクトリ402、「NotProtected.class」ファイル403、「Protected.secure」ファイル404が格納されている。「META−INF」ディレクトリ402以下に「MANIFEST.MF」に対応するマニフェストファイル405が格納されている。
FIG. 2 shows an example of the file structure in the Jar file. Under the
「NotProtected.class」ファイル403はクラスファイルの一例である。クラスファイルの仕様に準拠したファイルである。
A “NotProtected.class”
「Protected.secure」ファイル404は暗号化クラスファイルの一例である。暗号化されているため、現状でのリバースエンジニアリングでの解析が不可能と見なせるものである。
The “Protected.secure”
図3は再生制御のレイヤモデルを示した図である。図3の第1層は、物理層であり、処理対象たるJarファイルの供給制御である。この第1層に示すように、処理対象たるJarファイルは、BD−ROMだけではなく、HD、メモリカード、ネットワークといったあらゆる記録媒体、通信媒体を供給源としている。これらHD、メモリカード、ネットワークといった供給源に対する制御(ディスクアクセス、カードアクセス、ネットワーク通信)が第1層の制御である。 FIG. 3 is a diagram showing a layer model for reproduction control. The first layer in FIG. 3 is a physical layer and is supply control of a Jar file to be processed. As shown in the first layer, the Jar file to be processed uses not only the BD-ROM but also any recording medium such as HD, memory card, network, and communication medium as the supply source. The control of the supply sources such as HD, memory card, network (disk access, card access, network communication) is the first layer control.
第2層は、ミドルウェアのレイアである。第1層で供給されたJarファイルを、どのように実行するのかを規定しているのがこの第2層である。たとえばオペレーティングシステムやJava(登録商標)バーチャルマシーンやCPUに依存したネイティブライブラリや実行ファイルなどがミドルウェア層に存在する。 The second layer is a middleware layer. It is this second layer that defines how to execute the Jar file supplied in the first layer. For example, an operating system, a Java (registered trademark) virtual machine, a CPU-dependent native library, an execution file, and the like exist in the middleware layer.
第3層は、Java(登録商標)のレイアである。Java(登録商標)バーチャルマシーン上で実行されるJava(登録商標)アプリケーションおよびクラスライブラリは第3層に存在する。Java(登録商標)アプリケーションは記述された命令やユーザ入力に基づき処理を行い一定の出力、例えばオーディオやビデオの出力を行う。クラスライブラリはJava(登録商標)アプリケーションに対してJava(登録商標)のプロファイルで定義されているアプリケーションプログラミングインターフェース(API)を提供する。Java(登録商標)アプリケーションおよびクラスライブラリはJava(登録商標)の中間コードで書かれていて、第2層のJava(登録商標)バーチャルマシーンにより解釈実行される。Java(登録商標)アプリケーションは複数のクラスファイルにより構成されるが解釈実行されるためにクラスファイルがクラスオブジェクトに変換される必要がある。クラスオブジェクトはクラスファイルの内部表現とも言える。 The third layer is a Java (registered trademark) layer. Java applications and class libraries that run on Java virtual machines exist in the third layer. A Java (registered trademark) application performs processing based on a written command and user input, and outputs a certain output, for example, audio or video. The class library provides an application programming interface (API) defined by a Java (registered trademark) profile for a Java (registered trademark) application. Java (registered trademark) applications and class libraries are written in Java (registered trademark) intermediate code, and are interpreted and executed by the Java (registered trademark) virtual machine in the second layer. A Java (registered trademark) application is composed of a plurality of class files, but needs to be converted into class objects in order to be interpreted and executed. A class object is also an internal representation of a class file.
図4は、再生装置の大まかな機能構成を示すブロック図である。図3に示すように、再生装置は、BD−ROMドライブ601、ヒープメモリ104、インタプリタ103、デクリプタローダ602、ローダ105、UO検知モジュール603、出力エンジン604から構成される。
FIG. 4 is a block diagram showing a rough functional configuration of the playback apparatus. As shown in FIG. 3, the playback device includes a BD-
但し、図4の例ではJarファイルの供給源をBD−ROMとしたものを例にして説明するものであり、Jarファイルの供給源として他にHD、メモリカード、ネットワークといった記録媒体、通信媒体を供給源とするのであればそれらの情報を取り込む手段がBD−ROMドライブ601に代替することが可能である。
However, in the example of FIG. 4, the description will be made by taking an example in which the supply source of the Jar file is a BD-ROM. If it is a supply source, a means for capturing such information can be substituted for the BD-
BD−ROMドライブ601は、BD−ROMのローディング/イジェクトを行い、BD−ROMに対するアクセスを実行する。
The BD-
ヒープメモリ104は、Jarファイルを格納しJava(登録商標)層に必要なメモリである。ヒープメモリ104には後述するクラスファイルの内部形式(Java(登録商標)バーチャルマシーンに依存した構造体)であるクラスオブジェクトも格納される。
The
インタプリタ103はJava(登録商標)バーチャルマシーンの中核であり、クラスオブジェクトの中にあるバイトコードの解釈実行を行う。インタプリタ103はJava(登録商標)アプリケーションの実行速度に直接影響を与える重要な部分である。解釈実行の高速化を図るためにバイトコードをネイティブコードに変換するJITコンパイラを備えたインタプリタ(図示せず)やインタプリタの一部をハードウェア(図示せず)で実装される製品も市販されている。
The
ローディング判定部(図示せず)はクラスオブジェクトの生成(ロードともいう)の必要性を判定する。ローディング判定部はインタプリタ103上で解釈実行される。クラスオブジェクトが必要な場合、インタプリタ103がローディング判定部の解釈実行を行う。
A loading determination unit (not shown) determines the necessity for generation (also referred to as loading) of class objects. The loading determination unit is interpreted and executed on the
解釈実行により、インタプリタがヒープメモリ104上のクラスファイルのロードをデクリプタローダまたはローダに要求する。ローディング判定部はヒープメモリ103上にクラスオブジェクトのキャッシュを持っている。ローディング判定部はJava(登録商標)層にあるClassLoaderクラスまたはその継承クラスとして実装される。尚ローディング判定部は高速化のため、一部ミドルウェア層で実装されることもある。
By executing the interpretation, the interpreter requests the descriptor loader or loader to load the class file on the
デクリプタローダ602はBD−ROMに存在する復号鍵を利用し暗号化クラスファイルを復号化した後、ヒープメモリ104上にクラスオブジェクトを生成する。BD−ROMに記録された復号鍵はマスター鍵で暗号化されている。デクリプタローダ602はマスター鍵を保持しており、マスター鍵を利用することで暗号化された復号鍵を復号した上で、この復号鍵を用いて暗号化されたクラスファイルを平文に復元することができる。デクリプタローダ602は著作権保護を行う上で重要な部分である。
The
デクリプタローダ602内に保持されるマスター鍵が第3者にわかってしまうと、マスター鍵にて暗号化された復号鍵の詳細な情報わかってしまい、その第3者に対して著作権保護ができなくなる。
When the third party knows the master key held in the
その場合、マスター鍵に関する情報が第3者により公開されてしまう恐れがある上に、復号鍵やその中間データや平文クラスファイルが傍受されてしまう危険性があるため、マスター鍵については実装する場合にセキュリティの配慮が多いに必要である。 In that case, there is a risk that information about the master key may be disclosed by a third party, and there is a risk that the decryption key, its intermediate data, or plain text class file may be intercepted. This is necessary for security considerations.
デクリプタローダ602がハードウェアで実装される場合、マスター鍵をハードウェアに隠蔽することが可能になり秘匿性が高くなる。デクリプタローダ602は暗号化クラスファイルを復号した後、平文クラスファイルを一時的にヒープメモリ104上に配置することもできるが、その場合ヒープメモリ104内の情報の傍受を困難にさせるため、復号した平文のクラスファイルをヒープメモリへ配置する期間をなるべく短くする必要があり、復号した平文のクラスファイルの利用が完了した後、速やかにヒープメモリ104から削除(たとえば、0で上書き)しなければならない。
When the
ローダ105は平文クラスファイルを対応するクラスオブジェクトに変換し、ヒープメモリ104上にロードするものである。ヒープメモリ104上にロードされたクラスオブジェクトはインタプリタ103より解釈実行が可能である。
The
UO検知モジュール603は、リモコン(図示せず)や再生装置のフロントパネルといった入力手段に対してなされたユーザ操作を検知して、Java(登録商標)バーチャルマシーンへの通知を行う。
The
出力エンジン604はJava(登録商標)バーチャルマシーンより要求されるオーディオやビデオの出力を行う。
The
インタプリタ103はアプリケーションプログラムを解釈実行中に、アプリケーションに含まれるクラスファイル(暗号化されたクラスファイルまたは平文のクラスファイル)の実行を必要とした場合、ローディング判定部を呼び出して、実行すべき対象となるクラスファイルをデクリプタローダ602によりロードさせるべきか、ローダ105によりロードさせるべきかを判定する。これは、例えばClassLoaderクラスが持つメソッドloadClass(クラス名)において、括弧内のクラス名を引数にして呼び出すことにより開始される。
When the
ローディング判定部とJava(登録商標)バーチャルマシーンとのインターフェースを図5に示す。 FIG. 5 shows an interface between the loading determination unit and the Java (registered trademark) virtual machine.
ローディング判定部は例えばロードすべきクラスファイルの拡張子を調べ、対象となるクラスファイルが暗号化されている(例えば図2に示すものでは拡張子が「.secure」である)と判断した場合、APIであるdefineEncryptedClass(クラス名、暗号化クラスファイル)の呼び出しを行い暗号化クラスファイルのロードをミドルウェア層のデクリプタローダ602に依頼する。
For example, when the loading determination unit checks the extension of the class file to be loaded and determines that the target class file is encrypted (for example, the extension is “.secure” in FIG. 2), The API calls defineEncryptedClass (class name, encrypted class file) to request the middleware
また、ローディング判定部はロードすべきクラスファイルが暗号化されていない(例えば図2に示すものでは拡張子が「.class」である)と判断した場合、APIであるdefineClass(クラス名、平文クラスファイル)の呼び出しを行い平文クラスファイルのロードをミドルウェア層のローダ105に依頼する。ローディング判定部はクラスライブラリの1つとして格納されており、呼び出しに応じて解釈実行されるため、ローディング判定部からデクリプタローダ602/ローダ105への依頼はインタプリタ103を通して行われる。
When the loading determination unit determines that the class file to be loaded is not encrypted (for example, the extension is “.class” in the case of FIG. 2), the API defines class (class name, plaintext class). File) is called to request the
図6を参照して、Java(登録商標)層で実行されるローディング判定部がクラスオブジェクトを返す制御フローを説明する。 With reference to FIG. 6, the control flow in which the loading determination unit executed in the Java (registered trademark) layer returns the class object will be described.
クラスオブジェクトを要求されたローディング判定部はまずキャッシュ(図示せず)に対象となるクラスオブジェクトがキャッシュされているかどうかを検索する(S601)。ローディング判定部は自身がロードしたクラスオブジェクトのキャッシュを持っていて同じクラスオブジェクトを2回以上ヒープメモリ104へロードしないようにしている。
The loading determination unit that has requested the class object first searches whether a target class object is cached in a cache (not shown) (S601). The loading determination unit has a cache of class objects loaded by itself, and prevents the same class object from being loaded into the
対象のクラスオブジェクトを見つけた場合(S602)、クラスオブジェクトをインタプリタ103に返す(S603)。 When the target class object is found (S602), the class object is returned to the interpreter 103 (S603).
ローディング判定部がキャッシュから対象となるクラスオブジェクトを見つからなかった場合(S602)、対象のクラスを定義するクラスファイルをJarファイルの中から取得する(S604)。 When the loading determination unit does not find the target class object from the cache (S602), the class file defining the target class is acquired from the Jar file (S604).
クラスファイルはJarファイルの中に格納されていて必要なクラスの名前に基づきクラスファイルを取得することができる。例えば、クラス名が「Abracadabra」の場合、暗号化されているクラスファイルのファイル名は「Abracadabra.secure」であり、暗号化されていないクラスファイルのファイル名は「Abracadabra.class」である。ローディング判定部は優先的に暗号化されているクラスファイルを選択する。 The class file is stored in the Jar file, and the class file can be acquired based on the necessary class name. For example, when the class name is “Abracadara”, the file name of the encrypted class file is “Abracabara.secure”, and the file name of the unencrypted class file is “Abracabara.class”. The loading determination unit selects a class file that is preferentially encrypted.
ローディング判定部はJarファイルより取得したクラスファイルが暗号化されているかどうかの判断を行う(S605)。クラスファイルが暗号化されているかどうかはクラスファイルの拡張子を調べることにより行うことができる。 The loading determination unit determines whether or not the class file acquired from the Jar file is encrypted (S605). Whether the class file is encrypted can be determined by examining the extension of the class file.
ローディング判定部はクラスファイルが暗号化されていると判断した場合、暗号化クラスファイルのロードを依頼する(S606)。暗号化クラスファイルのロードはAPIであるdefineEncryptedClass(クラス名、暗号化クラスファイル)の呼び出しにより行われる。暗号化クラスファイルのロードによりヒープメモリ104上の一つのクラスオブジェクトを取得する。
When it is determined that the class file is encrypted, the loading determination unit requests loading of the encrypted class file (S606). The encryption class file is loaded by calling defineEncryptedClass (class name, encryption class file) which is an API. One class object on the
ローディング判定部はクラスファイルが暗号化されていないと判断した場合、平文クラスファイルのロードを依頼する(S607)。平文クラスファイルのロードはAPIであるdefineClass(クラス名、平文クラスファイル)の呼び出しにより行われる。平文クラスファイルのロードによりヒープメモリ104上に一つのクラスオブジェクトを取得する。
If the loading determination unit determines that the class file is not encrypted, it requests the loading of the plaintext class file (S607). The plaintext class file is loaded by calling defineClass (class name, plaintext class file) which is an API. One class object is acquired on the
ローディング判定部は新しくできたクラスオブジェクトをキャッシュした後(S609)、新しくできたクラスオブジェクトを返す(S610)。 After loading the newly created class object (S609), the loading determination unit returns the newly created class object (S610).
暗号化クラスファイルのロードを行うためのAPI呼び出しdefineEncryptedClass(クラス名、暗号化クラスファイル)はデクリプタローダ602より処理される。図7を参照して、デクリプタローダ602が暗号化クラスファイルを復号し、ヒープメモリ104上にクラスオブジェクトを生成する制御フローを説明する。
The API call defineEncryptedClass (class name, encrypted class file) for loading the encrypted class file is processed by the
デクリプタローダ602は受け取った暗号化クラスファイルを復号し対応する平文のクラスファイルにする(S701)。この復号は、デクリプタローダ602が内部で保持する復号鍵で復号化できる。
The
デクリプタローダ602はクラスファイルのベリファイを行いクラスファイルが改竄されていないかなどをチェックする(S702)。
The
デクリプタローダ602はベリファイを行った後、クラスファイルをクラスオブジェクトに変換する(S703)。クラスオブジェクトはJava(登録商標)バーチャルマシーンに依存した構造体という形でヒープメモリ104に格納され、ヒープメモリ104上の情報が傍受されてもクラスオブジェクトをクラスファイルに復元することが困難である。
After verifying, the
デクリプタローダ602は著作権保護対象のクラスファイルを一時的に内部で保持している間はクラスファイルの傍受を避ける。クラスファイルの傍受を避けるために第2層のミドルウェア層や第1層の物理層に存在しなければならない。
The
デクリプタローダは第3層のJava(登録商標)層に平文クラスファイルや復号鍵などを渡さないように構成している。第2層のミドルウェア層では処理中にヒープメモリのダンプが行われクラスファイルが傍受されてしまう危険性がある。傍受されないために、インタプリタ103等のほかのモジュールとのインタラクションを避け、ソフトウェア難読化技術を適用することが望ましい。また、ソフトウェア難読化技術の適用以外にCPUがセキュアな実行モードを提供するものもある。セキュアな実行モードで実行されるソフトウェアは他のソフトよりヒープメモリを傍受されることが困難になるため、CPUがその機能を提供する場合はデクリプタローダはセキュアな実行モードで実行されることが望ましい。
The decrypter loader is configured not to pass a plaintext class file, a decryption key, or the like to the third Java (registered trademark) layer. In the middleware layer of the second layer, there is a risk that the heap memory is dumped during processing and the class file is intercepted. In order not to be intercepted, it is desirable to avoid software interaction with other modules such as the
平文クラスファイルのロードを行うためのAPI呼び出しdefineClass(クラス名、平文クラスファイル)はローダ105より処理される。図8を参照して、ローダ105が平文クラスファイルよりクラスオブジェクトを生成する制御フローを説明する。
An API call defineClass (class name, plaintext class file) for loading a plaintext class file is processed by the
まずローダ105はクラスファイルのベリファイを行いクラスファイルが改竄されていないかなどをチェックする(S801)。
First, the
ローダ105はベリファイを行った後、平文のクラスファイルをクラスオブジェクトに変換する(S802)。クラスオブジェクトはJava(登録商標)バーチャルマシーンに依存した構造体という形でヒープメモリ104に格納されるので、ヒープメモリ104上の情報が傍受されてもクラスオブジェクトをクラスファイルに復元することが困難である。
After verifying, the
ローダ105とデクリプタローダ602はクラスオブジェクトの生成に共通点が多く存在するがローダが生成するクラスオブジェクトは著作権保護の配慮を行う必要が特にないため、実装の高速化を計るためのチューニングが可能になる。
The
または、デクリプタローダ602により暗号化されたクラスファイルを平文のクラスファイルへと変換した後の処理は、ローダ105による処理と同じ処理を行うため、デクリプタローダにおいて、平文のクラスファイルをクラスオブジェクトへと変換しヒープメモリへ格納する処理についてはローダ105を使用するような構成としても良い。
Alternatively, since the process after the class file encrypted by the
これは例えば、ローダ105とデクリプタローダ602による処理の一部が共通のライブラリを共有することなどにより実現が可能となる。
This can be realized, for example, by sharing a common library by a part of processing by the
図9は再生装置で再生されるBD−ROMのマスタリングを行うマスタリング装置の大まかな機能構成を示すブロック図である。図9に示すように、マスタリング装置は、クラスファイル取得モジュール1101、暗号化判定部1102、鍵生成部1103、クラスファイルエンクリプタ1104、アーカイバ1105、マスター鍵取得モジュール1106、復号鍵エンクリプタ1107、BD−ROMバーナー1108から構成される。
FIG. 9 is a block diagram showing a rough functional configuration of a mastering apparatus that performs mastering of a BD-ROM reproduced by the reproducing apparatus. As shown in FIG. 9, the mastering device includes a class
クラスファイル取得モジュール1101は処理対象のJava(登録商標)アプリケーションを構成するクラスファイルを順次取得する。
A class
暗号化判定部1102はクラスファイル取得モジュール1101より取得されたクラスファイルの暗号化の必要性を判断する。暗号化の必要性はクラスファイルの属性情報を用いたり、暗号化を行う前にユーザに問い合わせることで、暗号化の有無の判断を実現することが可能である。
The
鍵生成部1103は復号鍵および暗号鍵を生成する。再生装置での復号化を高速化するためにAES(Advanced Encryption Standard)やDES(Data Encryption Standard)のような対称鍵暗号を利用することが望ましい。対称鍵暗号を利用する場合は暗号鍵と復号鍵が同じであるため、これらを秘匿としておく機構(図示せず)を設けるのが望ましい。
The
クラスファイルエンクリプタ1104は暗号化判定部1102より暗号化する必要があると判断されたクラスファイルを、鍵生成部1103より生成された暗号鍵で暗号化する。
The
アーカイバ1105はクラスファイルを一つのJarファイルに格納する。暗号化の必要がないクラスファイルを拡張子「class」で格納し、クラスファイルエンクリプタ1104より得られた暗号化クラスファイルを拡張子「secure」で格納する。
The
マスター鍵取得モジュール1106は再生装置のマスター鍵を内部で保持し、復号鍵エンクリプタ1107に渡す。
The master
復号鍵エンクリプタ1107は復号鍵をマスター鍵で暗号化する。復号鍵はマスター鍵で暗号化されるため、このプロセスより作成されたBD−ROMはマスター鍵がなければ復号化は極めて困難となる。
The
BD−ROMバーナー1108はJarファイルおよび暗号化された復号鍵を一つのBD−ROMに焼き付ける。
The BD-
マスタリング装置より作成された光ディスクは図1に示す構成を持つ。マスター鍵がなければJarファイルの中の暗号化クラスファイルを復号化するためにはクラスファイルエンクリプタ1104にて用いた暗号化アルゴリズムを破る必要が有り、リバースエンジニアリング技術での解析が不可能と見なせる。
An optical disc created from the mastering apparatus has the configuration shown in FIG. Without the master key, it is necessary to break the encryption algorithm used in the
(実施の形態2)
本実施の形態は、マニフェストファイルに復号鍵の情報を格納するようにし、格納した復号鍵に関する情報に基づき記録媒体から復号鍵を取得し、デクリプタローダは取得した復号鍵を用いて暗号化されたクラスファイルを復号するように構成したことを特徴とする。
(Embodiment 2)
In this embodiment, the decryption key information is stored in the manifest file, the decryption key is obtained from the recording medium based on the stored decryption key information, and the decryptor loader is encrypted using the obtained decryption key. The class file is configured to be decrypted.
実施の形態1にて、説明した事項と同一もしくは同一とみなせる事項については説明を簡潔にするため、本実施の形態では詳しい説明を省略する。
In the first embodiment, in order to simplify the description of items that can be regarded as the same as or the same as the items described in
本実施の形態にて用いる記録媒体の一例であるBD−ROMは図1にて説明をしたとおりである。 A BD-ROM which is an example of a recording medium used in this embodiment is as described with reference to FIG.
BDDATAディレクトリの下には、次の2種類のファイルが記録されている。 The following two types of files are recorded under the BDDATA directory.
(1) XXX.JAR(「XXX」は可変、拡張子「JAR」は固定)
Jarファイル仕様に準拠したJava(登録商標)アーカイブファイルである(以下Jarファイルと称する)。Jarファイルは複数のファイルをディレクトリ構造の形で格納している。一つのJarファイルは一つ以上のクラスファイル、Jarファイルの属性を示すメタファイル、画像などのデータが格納されている。基本的に一つのJarファイルに一つのJava(登録商標)アプリケーションが格納されており、Java(登録商標)アプリケーションはJava(登録商標)バーチャルマシーン上で実行することができる。Java(登録商標)アプリケーションは一つ以上のクラスファイルより構成されるが、Java(登録商標)アプリケーションの著作権保護を行う必要がある場合、一つ以上のクラスファイルが暗号化される。暗号化されていないクラスファイルは拡張子「class」を利用する。また、暗号化されているクラスファイルは拡張子「secure」を利用する。暗号化されているクラスファイルは、復号鍵(後述)がなければリバースエンジニアリングを利用しJava(登録商標)アプリケーションを復元することが不可能である。
(1) XXX. JAR ("XXX" is variable, extension "JAR" is fixed)
It is a Java (registered trademark) archive file conforming to the Jar file specification (hereinafter referred to as a Jar file). A Jar file stores a plurality of files in a directory structure. One Jar file stores data such as one or more class files, a metafile indicating attributes of the Jar file, and an image. Basically, one Java (registered trademark) application is stored in one Jar file, and the Java (registered trademark) application can be executed on the Java (registered trademark) virtual machine. A Java (registered trademark) application is composed of one or more class files. When it is necessary to protect the copyright of a Java (registered trademark) application, one or more class files are encrypted. An unencrypted class file uses the extension “class”. The encrypted class file uses the extension “secure”. An encrypted class file cannot restore a Java (registered trademark) application using reverse engineering without a decryption key (described later).
(2) XXX.KEY(「XXX」は可変、拡張子「KEY」は固定)
クラスファイルの復号化に必要な一つ以上の復号鍵の暗号化形式である。複数の復号鍵が同じファイルに存在することが可能。ファイル全体がタイトル鍵で暗号化されており、再生装置で復号化できるようになっている。再生装置はCopy Protection for Recordable Media(CPRM)を利用し、再生装置が持っているデバイス鍵を元に光ディスクのタイトル鍵を取得することができる。
(2) XXX. KEY ("XXX" is variable, extension "KEY" is fixed)
This is an encryption format for one or more decryption keys necessary for decrypting class files. Multiple decryption keys can exist in the same file. The entire file is encrypted with the title key and can be decrypted by the playback device. The playback apparatus can use Copy Protection for Recordable Media (CPRM) to acquire the title key of the optical disc based on the device key possessed by the playback apparatus.
図10は図2に示すマニフェストファイル405の内容の一例である。マニフェストファイル405に情報を記載する文法に関してはJarファイル仕様の中で公開されている。本実施の形態では通常のマニフェストファイルにキー「Key−ID」を追加することを特徴とする。キー「Key−ID」はファイルの復号化に利用する復号鍵のIDを示す。
FIG. 10 shows an example of the contents of the
キー「Key−ID」を複数指定することにより、異なる暗号化されたクラスファイルを復号するために異なる復号鍵を用いて復号することが可能となり、複数の復号鍵が存在した場合一つ目の鍵を0番、二つ目の鍵を1番、と順番によりIDを設定する。マニフェストファイルでは復号化に必要な復号鍵のIDを指定する。マニフェストファイルのメインセッションにデフォルトの鍵IDを設定し、個別セッションに個別のファイルの鍵IDを設定する。たとえば、図10の例ではデフォルトの鍵は0番の鍵IDに対応する復号鍵を用い、「Protected.secure」ファイルの復号に用いる復号鍵は1番の鍵IDに対応する復号鍵を用いることを示すものである。
By specifying a plurality of keys “Key-ID”, it is possible to decrypt using different decryption keys to decrypt different encrypted class files. The ID is set according to the order of 0 for the key and 1 for the second key. In the manifest file, the ID of the decryption key necessary for decryption is designated. The default key ID is set for the main session of the manifest file, and the key ID of the individual file is set for the individual session. For example, in the example of FIG. 10, the default key uses the decryption key corresponding to the
再生制御のレイヤモデルは図3に示したとおりである。図3の第1層は、物理層であり、処理対象たるJarファイルの供給制御である。この第1層に示すように、処理対象たるJarファイルは、BD−ROMだけではなく、HD、メモリカード、ネットワークといったあらゆる記録媒体、通信媒体を供給源としている。これらHD、メモリカード、ネットワークといった供給源に対する制御(ディスクアクセス、カードアクセス、ネットワーク通信)が第1層の制御である。 The layer model for playback control is as shown in FIG. The first layer in FIG. 3 is a physical layer and is supply control of a Jar file to be processed. As shown in the first layer, the Jar file to be processed uses not only the BD-ROM but also any recording medium such as HD, memory card, network, and communication medium as the supply source. The control of the supply sources such as HD, memory card, network (disk access, card access, network communication) is the first layer control.
第2層は、ミドルウェアのレイアである。第1層で供給されたJarファイルを、どのように実行するのかを規定しているのがこの第2層である。たとえばオペレーティングシステムやJava(登録商標)バーチャルマシーンやCPUに依存したネイティブライブラリや実行ファイルなどがミドルウェア層に存在する。 The second layer is a middleware layer. It is this second layer that defines how to execute the Jar file supplied in the first layer. For example, an operating system, a Java (registered trademark) virtual machine, a CPU-dependent native library, an execution file, and the like exist in the middleware layer.
第3層は、Java(登録商標)のレイアである。Java(登録商標)バーチャルマシーン上で実行されるJava(登録商標)アプリケーションおよびクラスライブラリは第3層に存在する。Java(登録商標)アプリケーションはユーザ入力に基づき処理を行いオーディオやビデオの出力を行う。クラスライブラリはJava(登録商標)アプリケーションに対してJava(登録商標)のプロファイルで定義されているアプリケーションプログラミングインターフェース(API)を提供する。Java(登録商標)アプリケーションおよびクラスライブラリはJava(登録商標)の中間コードで書かれていて、第2層のJava(登録商標)バーチャルマシーンにより解釈実行される。Java(登録商標)アプリケーションは複数のクラスファイルにより構成されるが解釈実行されるためにクラスファイルがクラスオブジェクトに変換される必要がある。クラスオブジェクトはクラスファイルの内部表現とも言える。 The third layer is a Java (registered trademark) layer. Java applications and class libraries that run on Java virtual machines exist in the third layer. The Java (registered trademark) application performs processing based on user input and outputs audio and video. The class library provides an application programming interface (API) defined by a Java (registered trademark) profile for a Java (registered trademark) application. Java (registered trademark) applications and class libraries are written in Java (registered trademark) intermediate code, and are interpreted and executed by the Java (registered trademark) virtual machine in the second layer. A Java (registered trademark) application is composed of a plurality of class files, but needs to be converted into class objects in order to be interpreted and executed. A class object is also an internal representation of a class file.
本実施の形態の再生装置の構成は図4に示すとおりである。図4に示すように、再生装置は、BD−ROMドライブ601、ヒープメモリ104、インタプリタ103、デクリプタローダ602、ローダ105、UO検知モジュール603、出力エンジン604から構成される。
The configuration of the playback apparatus of the present embodiment is as shown in FIG. As shown in FIG. 4, the playback device includes a BD-
BD−ROMドライブ601は、BD−ROMのローディング/イジェクトを行い、BD−ROMに対するアクセスを実行する。BD−ROMドライブ601の内部でCPRMで定義しているデバイス鍵を持っており、BD−ROMドライブ601はBD−ROMのタイトル鍵を復元することができる。
The BD-
ヒープメモリ104は、Jarファイルを格納しJava(登録商標)層に必要なメモリである。ヒープメモリ104にクラスファイルの内部形式であるクラスオブジェクトも格納される。
The
インタプリタ103はJava(登録商標)バーチャルマシーンの中核であり、クラスオブジェクトの中にあるバイトコードの解釈実行を行う。インタプリタ103はJava(登録商標)アプリケーションの実行速度に直接影響を与える重要な部分である。解釈実行の高速化を図るためにバイトコードをネイティブコードに変換するJITコンパイラを備えたインタプリタやインタプリタの一部をハードウェアで実装される製品も市販されている。また、インタプリタの実装は高速化を考えた実装となっているため著作権保護の観点では解析されやすい点を、設計上考慮する必要がある。
The
ローディング判定部(図示せず)はクラスオブジェクトの生成(ロードともいう)の必要性を判定する。ローディング判定部はインタプリタ103上解釈実行される。クラスオブジェクトが必要な場合、インタプリタ103がローディング判定部の解釈実行を行う。解釈実行により、インタプリタがヒープメモリ104上のクラスファイルのロードをデクリプタローダまたはローダに要求する。また、ローディング判定部はクラスオブジェクトのキャッシュを持っている。ローディング判定部はJava(登録商標)層にあるClassLoaderクラスまたはその継承クラスとして実装される。ローディング判定部はJava(登録商標)層にあるClassLoaderクラスまたはその継承クラスとして実装される。尚ローディング判定部は高速化のため、一部ミドルウェア層で実装されることもある。
A loading determination unit (not shown) determines the necessity for generation (also referred to as loading) of class objects. The loading determination unit is interpreted and executed on the
デクリプタローダ602はBD−ROMドライブ601より平文形式のタイトル鍵を受け取る。BD−ROMドライブ601がデクリプタローダ602にタイトル鍵を渡すときに、鍵が傍受される可能性があるのでBD−ROMドライブ601がデクリプタローダ602を認証し、お互いの暗号化チャネル(SAC:Secure Authenticated Channel)を開き、開いた暗号化チャネルを通じて平文形式のタイトル鍵を受け取る。このとき、暗号化チャネルの実現には楕円曲線暗号化(ECC:Ellipic Curve Cryptosystem)とDiffie−Hellmanアルゴリズムとを利用することができる。
The
デクリプタローダ602はさらにタイトル鍵で暗号化された復号鍵をBD−ROMを読み込んだBD−ROMドライブ601より受け取る。暗号化された復号鍵を先に受け取ったタイトル鍵にて復号した後、この復号鍵を用いて、暗号化クラスファイルを復号することができる。暗号化クラスファイルを平文のクラスファイルへ復号した後、ヒープメモリ104上にクラスオブジェクトを生成する。
The
デクリプタローダ602は著作権保護を行う上で重要な部分である。デクリプタローダ602内にあるSACで利用される暗号鍵、タイトル鍵、復号鍵などが第3者より傍受されてしまうとシステム全体として著作権保護ができなくなる。また、内部に一時的に保持する平文クラスファイルが傍受されてしまう危険性があり、実装にセキュリティの配慮が必要である。
The
ローダ105は平文クラスファイルを対応するクラスオブジェクトに変換し、ヒープメモリ104上へ配置する。ヒープメモリ104上に配置されたクラスオブジェクトはインタプリタ103より解釈実行が可能である。
The
UO検知モジュール603は、リモコン(図示せず)や再生装置のフロントパネルなどの入力手段(図示せず)に対してなされたユーザ操作を検知して、検知した入力があったことをJava(登録商標)バーチャルマシーンへ通知する。
The
出力エンジン604はJava(登録商標)バーチャルマシーンにより解釈実行された結果、要求されるオーディオやビデオの出力を行う。
The
インタプリタ103による解釈実行を行う中、クラスオブジェクトを必要とした場合、インタプリタがローディング判定部の解釈実行を行う。要求はClassLoaderクラスが持つメソッドloadClass(クラス名)の呼び出しより開始される。
If interpretation is performed by the
ローディング判定部とJava(登録商標)バーチャルマシーンとのインターフェースは、図5に示すとおりである。但し、ローディング判定部はロードすべきクラスファイルが暗号化されていると判断した場合、API呼び出しdefineEncryptedClass(クラス名、暗号化クラスファイル、鍵ID)を行い、引数としてクラス名、暗号化クラスファイル、鍵IDを指定して暗号化クラスファイルのロードをミドルウェア層のデクリプタローダ602に依頼する。
The interface between the loading determination unit and the Java (registered trademark) virtual machine is as shown in FIG. However, if the loading determination unit determines that the class file to be loaded is encrypted, it performs an API call defineEncryptedClass (class name, encrypted class file, key ID), and the class name, encrypted class file, The middleware
また、ローディング判定部はロードすべきクラスファイルが暗号化されていないと判断した場合、API呼び出しdefineClass(クラス名、平文クラスファイル)を行い、引数としてクラス名、クラスファイルを指定し、クラスファイルのロードをミドルウェア層のローダ105に依頼する。ローディング判定部は解釈実行されるため、これらの依頼はインタプリタ103を通して行われる。
If the loading determination unit determines that the class file to be loaded is not encrypted, it performs an API call defineClass (class name, plain text class file), specifies the class name and class file as arguments, and The load is requested to the
Java(登録商標)層で実行されるローディング判定部がクラスオブジェクトを返す制御フローは基本的には図6に示すものに同じである。 The control flow in which the loading determination unit executed in the Java (registered trademark) layer returns the class object is basically the same as that shown in FIG.
但し、S605による判定の結果、ローディング判定部はクラスファイルが暗号化されていると判断した場合、暗号化クラスファイルのロードを依頼する(S606)場合、暗号化クラスファイルのロードはAPIであるdefineEncryptedClassを呼び出すことにより行われるが、この場合引数としてクラス名、暗号化クラスファイル、鍵IDを指定する必要がある点が実施の形態1に説明したものとは異なる(つまり、defineEncryptedClass(クラス名、暗号化クラスファイル、鍵ID)として、APIであるdefineEncryptedClassを呼び出す)。より行われる。 However, if the loading determination unit determines that the class file is encrypted as a result of the determination in S605, and requests the loading of the encrypted class file (S606), the load of the encrypted class file is definedEncryptedClass, which is an API. Is different from that described in the first embodiment in that it is necessary to specify a class name, an encrypted class file, and a key ID as arguments (that is, defineEncryptedClass (class name, encryption API class, defineEncryptedClass, is called as the conversion class file and key ID). More done.
ここで、クラス名は再生すべきクラスオブジェクトの名前である。暗号化クラスファイルはJarファイルより取得されたファイルである。鍵IDは図10に示すメタファイルより得られたクラス名に対応する鍵IDである。暗号化クラスファイルのロードによりヒープメモリ104上の一つのクラスオブジェクトを取得する。
Here, the class name is the name of the class object to be reproduced. The encryption class file is a file acquired from the Jar file. The key ID is a key ID corresponding to the class name obtained from the metafile shown in FIG. One class object on the
暗号化クラスファイルのロードを行うためのAPI呼び出しdefineEncryptedClass(クラス名、暗号化クラスファイル、鍵ID)はデクリプタローダ602より処理される。デクリプタローダ602が暗号化クラスファイルよりヒープメモリ104上にクラスオブジェクトを生成する制御フローは基本的には図7に示すものに同じである。
The API call defineEncryptedClass (class name, encrypted class file, key ID) for loading the encrypted class file is processed by the
但し、本実施の形態においては、複数の復号鍵をマニフェストファイルにて指定できるようにしたので、S701において、デクリプタローダ602は引数にて指定される鍵IDに相当する復号鍵を用いて受け取った暗号化されたクラスファイルを平文のクラスファイルに復号する。
However, in this embodiment, since a plurality of decryption keys can be specified by the manifest file, the
たとえば鍵IDが0の場合、一つ目の復号鍵を利用する。鍵IDが1の場合、二つ目の復号鍵を利用する。 For example, when the key ID is 0, the first decryption key is used. When the key ID is 1, the second decryption key is used.
S702、S703については実施の形態1の説明と重複するためここでは、詳しい説明を省略する。 Since S702 and S703 overlap with the description of the first embodiment, a detailed description thereof is omitted here.
デクリプタローダ602は著作権保護対象のクラスファイルを一時的に内部で保持している間はクラスファイルの傍受を避ける。クラスファイルの傍受を避けるために第2層や第1層の物理層に存在しなければならない。デクリプタローダは第3層のJava(登録商標)層に平文クラスファイルや復号鍵などを渡してはならない。第2層のミドルウェア層では処理中にメモリのダンプが行われクラスファイルが傍受されてしまう危険性がある。傍受されないために、インタプリタ103等のほかのモジュールとのインタラクションを避け、なんらかのソフトウェア難読化技術を適用することが望ましい。また、ソフトウェア難読化技術の適応以外にCPUがセキュアな実行モードを提供するものもある。セキュアな実行モードで実行されるソフトウェアは他のソフトよりメモリを傍受されることが困難になるため、CPUがその機能を提供する場合はデクリプタローダはセキュアな実行モードで実行されることが望ましい。
The
平文クラスファイルのロードを行うためのAPI呼び出しdefineClass(クラス名、平文クラスファイル)はローダ105より処理される。その具体的な説明は実施の形態1にて説明したので、ここではその詳細な説明を省略する。
An API call defineClass (class name, plaintext class file) for loading a plaintext class file is processed by the
ローダ105とデクリプタローダ602はクラスオブジェクトの生成に共通点が多く存在するがローダが生成するクラスオブジェクトは著作権保護の配慮を行う必要が特にないため、実装の高速化を計るためのチューニングが可能になる。ただし開発コストを考えた場合、実装上ローダ105とデクリプタローダ602が共通のライブラリを共有することが考えられる。
The
図11は再生装置で再生されるBD−ROMのマスタリングを行うマスタリング装置の構成の一例を示す図である。 FIG. 11 is a diagram illustrating an example of a configuration of a mastering device that performs mastering of a BD-ROM played back by a playback device.
図11に示すように、マスタリング装置は、クラスファイル取得モジュール1101、暗号化判定部1102、鍵生成部1103、クラスファイルエンクリプタ1104、アーカイバ1105、CPRMモジュール1301、復号鍵エンクリプタ1107、BD−ROMバーナー1108から構成される。
As shown in FIG. 11, the mastering device includes a class
クラスファイル取得モジュール1101は処理対象のJava(登録商標)アプリケーションを構成するクラスファイルを順次取得する。
A class
暗号化判定部1102はクラスファイル取得モジュール1101より取得されたクラスファイルの暗号化の必要性を判断する。暗号化の必要性はクラスファイルの属性情報を用いたり、暗号化を行う前にユーザに問い合わせることで実現することが可能である。
The
鍵生成部1103は復号鍵および暗号鍵を生成する。対称暗号化を利用するため暗号鍵と復号鍵が同じである。
The
クラスファイルエンクリプタ1104は暗号化判定部1102より暗号化する必要があると判断されたクラスファイルを、鍵生成部1103より生成された暗号鍵で暗号化する。暗号鍵には鍵IDがついており、クラスファイルエンクリプタ1104は利用した鍵のIDを記憶する。
The
アーカイバ1105はクラスファイルを一つのJarファイルに格納する。暗号化の必要がないクラスファイルを拡張子「class」で格納し、クラスファイルエンクリプタ1104より得られた暗号化クラスファイルを拡張子「secure」で格納する。
The
また、暗号に用いた暗号鍵の鍵IDの情報をクラスファイルエンクリプタ1104より受け取り、その情報をメタファイルに格納する。メタファイルはJarファイルのMETA−INFディレクトリにあるMANIFEST.MFファイルである。
Also, the key ID information of the encryption key used for encryption is received from the
CPRMモジュール1301はCPRMに必要な鍵生成および情報保持を行う。CPRMモジュール1301はタイトル鍵を復号鍵エンクリプタ1107に渡す。また、CPRMの仕様で定められている情報をBD−ROMバーナー1108に渡す。CPRMの仕様は、例えば「http://www.4centity.com/tech/cprm/」より入手することができる。
The
復号鍵エンクリプタ1107は必要な復号鍵をタイトル鍵で暗号化する。鍵ID=0の復号鍵より順番に連結した上でタイトル鍵で暗号化を行い復号鍵ファイルを生成する。
The
BD−ROMバーナー1108はJarファイルと復号鍵ファイルとCPRM用情報を一つのBD−ROMに焼き付ける。
The BD-
マスタリング装置より作成された光ディスクは図3に示す構成を持つ。Jarファイルの中の暗号化クラスファイルは、リバースエンジニアリングを利用しての解析が不可能である。CPRMが定めるデバイス鍵がなければタイトル鍵を取得することができないため、Jarファイルの中の暗号化クラスファイルを復号化するためには復号鍵を用いることなく暗号化されたクラスファイルを復号する必要が有り、きわめて困難である。 An optical disc created from the mastering apparatus has the configuration shown in FIG. The encryption class file in the Jar file cannot be analyzed using reverse engineering. Since the title key cannot be obtained without the device key defined by CPRM, it is necessary to decrypt the encrypted class file without using the decryption key in order to decrypt the encrypted class file in the Jar file. It is extremely difficult.
本発明は光ディスクやSDカードといった記録媒体またはインターネットといった通信媒体を介して受け取ったJava(登録商標)アプリケーションの著作権保護に利用できる。 The present invention can be used for copyright protection of a Java (registered trademark) application received via a recording medium such as an optical disk or an SD card or a communication medium such as the Internet.
101 仮想マシン
102 Java(登録商標)アプリケーション
103 インタプリタ
104 ヒープメモリ
105 ローダ
107 復号クラスローダ
108 保護対象クラスファイル
109 復号鍵
401 ルートディレクトリ
402 META−INFディレクトリ
403 暗号化されていないクラスファイル
404 暗号化されたクラスファイル
405 マニフェストファイル
601 BD−ROMドライブ
602 デクリプタローダ
603 UO検知モジュール
604 出力エンジン
1101 クラスファイル取得モジュール
1102 暗号化判定部
1103 鍵生成部
1104 クラスファイルエンクリプタ
1105 アーカイバ
1106 マスター鍵取得モジュール
1107 復号鍵エンクリプタ
1108 BD−ROMバーナー
1301 CPRMモジュール
DESCRIPTION OF SYMBOLS 101
Claims (10)
入力される前記アプリケーションに含まれる暗号化クラスファイルを復号し平文のクラスファイルとした後、クラスオブジェクトに変換してヒープメモリへロードするデクリプタローダ、入力される前記アプリケーション内の平文クラスファイルをクラスオブジェクトに変換して前記ヒープメモリへロードするローダおよび前記ヒープメモリへロードされたクラスオブジェクトを解釈実行するインタプリタを有する仮想マシンと、
前記インタプリタにて実行すべきクラスファイルが暗号化されたクラスファイルまたは平文クラスファイルかを判定するローディング判定部とを備え、
前記ローディング判定部において、前記インタプリタにて実行すべきクラスファイルが暗号化されたクラスファイルであると判定された場合には前記クラスファイルを前記デクリプタローダへ送り、
前記ローディング判定部において前記仮想マシンへ送られるクラスファイルが平文クラスファイルであると判定された場合には前記クラスファイルを前記ローダへ送るように構成したことを特徴とするアプリケーション実行装置。 An application execution device that executes an application described in an object-oriented program,
A decryptor loader that decrypts the encrypted class file included in the input application and converts it into a plain text class file, then converts it into a class object and loads it into the heap memory, and classifies the plain text class file in the input application A virtual machine having a loader that converts into an object and loads it into the heap memory, and an interpreter that interprets and executes the class object loaded into the heap memory;
A loading determination unit that determines whether a class file to be executed by the interpreter is an encrypted class file or a plaintext class file;
In the loading determination unit, when it is determined that the class file to be executed by the interpreter is an encrypted class file, the class file is sent to the decryptor loader,
An application execution apparatus configured to send the class file to the loader when the loading judgment unit judges that the class file sent to the virtual machine is a plain text class file.
前記デクリプタローダは前記マスター鍵を予め保持しており、前記暗号化されたクラスファイルが入力されると暗号化されたクラスファイルに対応する暗号化された復号鍵を前記記録媒体から取得し、
前記暗号化された復号鍵を前記予め保持するマスター鍵を用いて復号し、前記復号された復号鍵を用いて前記暗号化されたクラスファイルを復号することを特徴とする請求項1記載のアプリケーション実行装置。 The application is recorded in a recording medium, and the recording medium encrypts and records a decryption key for decrypting an encrypted class file included in the application with a master key, and the decrypter loader Holds the master key in advance, and when the encrypted class file is input, obtains an encrypted decryption key corresponding to the encrypted class file from the recording medium,
2. The application according to claim 1, wherein the encrypted decryption key is decrypted using the master key held in advance, and the encrypted class file is decrypted using the decrypted decryption key. Execution device.
前記ローディング判定部は前記アプリケーション実行時に前記アプリケーションに含まれる前記暗号化されたクラスファイルに対応する復号鍵を取り出すための情報を記述したメタファイルに基づいて対応する復号鍵を取り出すための情報を前記デクリプタローダへ送り、
前記デクリプタローダは前記復号鍵を取り出すための情報に基づき前記暗号化された復号鍵を前記記録媒体から取得し、
前記デクリプタローダが保持するタイトル鍵を用いて復号した復号鍵を用いて前記暗号化されたクラスファイルを復号することを特徴とする請求項1記載のアプリケーション実行装置。 The application is recorded in a recording medium, and the recording medium is a decryption key for decrypting an encrypted class file included in the application, the decryption key encrypted with a title key and the decryption key Record a metafile that describes the information to retrieve
The loading determination unit includes information for extracting a corresponding decryption key based on a metafile describing information for extracting a decryption key corresponding to the encrypted class file included in the application when the application is executed. To the decryptor loader
The decryptor loader acquires the encrypted decryption key from the recording medium based on information for extracting the decryption key,
The application execution apparatus according to claim 1, wherein the encrypted class file is decrypted using a decryption key decrypted using a title key held by the decryptor loader.
入力される前記アプリケーションに含まれる暗号化されたクラスファイルを復号し、平文クラスファイルをローダへ送るためのデクリプタおよび入力される前記アプリケーション内の平文クラスファイルまたは前記デクリプタにより復号された平文クラスファイルをクラスオブジェクトに変換しヒープメモリへロードするローダおよび前記ヒープメモリへロードされたクラスオブジェクトを解釈実行するインタプリタを有する仮想マシンと、
前記インタプリタにて実行すべきクラスファイルが暗号化されたクラスファイルか平文クラスファイルかを判定するローディング判定部とを備え、
前記ローディング判定部により前記インタプリタにて実行すべきクラスファイルが暗号化されたクラスファイルであると判定された場合、前記暗号化されたクラスファイルを前記デクリプタへ送り、
前記ローディング判定部により前記仮想マシンへ送られるクラスファイルが平文クラスファイルであると判定された場合には前記クラスファイルを前記ローダへ送るように構成したことを特徴とするアプリケーション実行装置。 An application execution device that executes an application described in an object-oriented program,
A decryptor for decrypting the encrypted class file included in the input application and sending the plaintext class file to the loader, and a plaintext class file in the input application or a plaintext class file decrypted by the decryptor A virtual machine having a loader for converting into a class object and loading it into a heap memory and an interpreter for interpreting and executing the class object loaded into the heap memory;
A loading determination unit that determines whether a class file to be executed by the interpreter is an encrypted class file or a plain text class file;
When it is determined by the loading determination unit that the class file to be executed by the interpreter is an encrypted class file, the encrypted class file is sent to the decryptor,
An application execution apparatus configured to send the class file to the loader when the loading judgment unit judges that the class file sent to the virtual machine is a plain text class file.
前記デクリプタは前記マスター鍵を予め保持しており、前記暗号化されたクラスファイルが入力されると、前記暗号化されたクラスファイルを復号するための復号鍵を前記記録媒体から取得し、
前記取得した暗号化された復号鍵を前記予め保持するマスター鍵を用いて復号し、前記復号された復号鍵を用いて前記暗号化されたクラスファイルを復号することを特徴とする請求項6記載のアプリケーション実行装置。 The application is recorded in a recording medium, and the recording medium is recorded by encrypting a decryption key for decrypting an encrypted class file included in the application with a master key,
The decryptor holds the master key in advance, and when the encrypted class file is input, obtains a decryption key for decrypting the encrypted class file from the recording medium,
7. The obtained encrypted decryption key is decrypted using the master key held in advance, and the encrypted class file is decrypted using the decrypted decryption key. Application execution device.
前記ローディング判定部は前記アプリケーション実行時に前記アプリケーションに含まれる前記暗号化されたクラスファイルに対応する復号鍵を取り出すための情報を記述したメタファイルに基づいて対応する復号鍵を取り出すための情報を前記デクリプタへ送り、
前記デクリプタは前記復号鍵を取り出すための情報に基づき前記暗号化された復号鍵を前記記録媒体から取得し、
前記デクリプタが保持するタイトル鍵を用いて復号した復号鍵を用いて前記暗号化されたクラスファイルを復号することを特徴とする請求項6記載のアプリケーション実行装置。 The application is recorded in a recording medium, and the recording medium is a decryption key for decrypting an encrypted class file included in the application, the decryption key encrypted with a title key and the decryption key Record a metafile that describes the information to retrieve
The loading determination unit includes information for extracting a corresponding decryption key based on a metafile describing information for extracting a decryption key corresponding to the encrypted class file included in the application when the application is executed. To the decryptor
The decryptor obtains the encrypted decryption key from the recording medium based on information for extracting the decryption key,
7. The application execution apparatus according to claim 6, wherein the encrypted class file is decrypted using a decryption key decrypted using a title key held by the decryptor.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006216861A JP2009258772A (en) | 2006-08-09 | 2006-08-09 | Application execution device |
PCT/JP2007/064851 WO2008018310A1 (en) | 2006-08-09 | 2007-07-30 | Application execution device, method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006216861A JP2009258772A (en) | 2006-08-09 | 2006-08-09 | Application execution device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009258772A true JP2009258772A (en) | 2009-11-05 |
Family
ID=39032844
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006216861A Pending JP2009258772A (en) | 2006-08-09 | 2006-08-09 | Application execution device |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP2009258772A (en) |
WO (1) | WO2008018310A1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013511077A (en) * | 2009-11-13 | 2013-03-28 | イルデト カナダ コーポレーション | System and method for protecting Java bytecode from static and dynamic attacks within a malicious execution environment |
JP2016522489A (en) * | 2013-05-15 | 2016-07-28 | ソフトキャンプ カンパニー,リミテッド | Data processing system security apparatus and security method |
US10275592B2 (en) | 2013-11-15 | 2019-04-30 | Kabushiki Kaisha Toshiba | Information processing device, information processing method, and computer program product |
JP2020016926A (en) * | 2018-07-23 | 2020-01-30 | キヤノン株式会社 | Information processing device, control method of information processing device, and program |
WO2020196959A1 (en) * | 2019-03-28 | 2020-10-01 | 라인플러스 주식회사 | Method and system for protecting executable file by using heap memory |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010217975A (en) * | 2009-03-13 | 2010-09-30 | Nec System Technologies Ltd | Information processor, application program, and method for executing application program |
KR101471589B1 (en) * | 2013-08-22 | 2014-12-10 | (주)잉카엔트웍스 | Method for Providing Security for Common Intermediate Language Program |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007233426A (en) * | 2004-04-05 | 2007-09-13 | Matsushita Electric Ind Co Ltd | Application execution device |
WO2006009081A1 (en) * | 2004-07-16 | 2006-01-26 | Matsushita Electric Industrial Co., Ltd. | Application execution device and application execution device application execution method |
-
2006
- 2006-08-09 JP JP2006216861A patent/JP2009258772A/en active Pending
-
2007
- 2007-07-30 WO PCT/JP2007/064851 patent/WO2008018310A1/en active Application Filing
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013511077A (en) * | 2009-11-13 | 2013-03-28 | イルデト カナダ コーポレーション | System and method for protecting Java bytecode from static and dynamic attacks within a malicious execution environment |
US9213826B2 (en) | 2009-11-13 | 2015-12-15 | Irdeto B.V. | System and method to protect Java bytecode code against static and dynamic attacks within hostile execution environments |
JP2016522489A (en) * | 2013-05-15 | 2016-07-28 | ソフトキャンプ カンパニー,リミテッド | Data processing system security apparatus and security method |
US10275592B2 (en) | 2013-11-15 | 2019-04-30 | Kabushiki Kaisha Toshiba | Information processing device, information processing method, and computer program product |
JP2020016926A (en) * | 2018-07-23 | 2020-01-30 | キヤノン株式会社 | Information processing device, control method of information processing device, and program |
US11474855B2 (en) | 2018-07-23 | 2022-10-18 | Canon Kabushiki Kaisha | Information processing apparatus, information processing method, and storage medium |
JP7195796B2 (en) | 2018-07-23 | 2022-12-26 | キヤノン株式会社 | Information processing device, control method for information processing device, and program |
WO2020196959A1 (en) * | 2019-03-28 | 2020-10-01 | 라인플러스 주식회사 | Method and system for protecting executable file by using heap memory |
Also Published As
Publication number | Publication date |
---|---|
WO2008018310A1 (en) | 2008-02-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9767322B2 (en) | Data transcription in a data storage device | |
KR101192546B1 (en) | Use of media storage structure with multiple pieces of content in a content-distribution system | |
CN104581214B (en) | Multimedia content guard method based on ARM TrustZone systems and device | |
US6789177B2 (en) | Protection of data during transfer | |
EP1944905B1 (en) | An encrypted transmission method and equipment system for preventing copying the data resource | |
TWI394419B (en) | System and method for managing encrypted content using logical partitions | |
EP1612988A1 (en) | Apparatus and/or method for encryption and/or decryption for multimedia data | |
EP2466511B1 (en) | Media storage structures for storing content and devices for using such structures | |
JP2001256113A (en) | Contents processing system and contents protection method | |
KR20060047953A (en) | Secure storage on recordable medium in a content protection system | |
JP2009258772A (en) | Application execution device | |
JP2005512258A (en) | System data integrity verification method and apparatus | |
US20160204939A1 (en) | Media storage structures for storing content, devices for using such structures, systems for distributing such structures | |
TWI352976B (en) | Record carrier comprising encryption indication in | |
JP2005505853A (en) | Apparatus and method for reading or writing user data | |
KR20080091785A (en) | Method for recording and distributing digital data and related device | |
US9009489B2 (en) | Device archiving of past cluster binding information on a broadcast encryption-based network | |
US8929547B2 (en) | Content data reproduction system and collection system of use history thereof | |
CN107688729B (en) | Application program protection system and method based on trusted host | |
JP5175494B2 (en) | Encrypted content editing method and content management apparatus | |
TWI375160B (en) | Method and system for locally activating a drm engine | |
US10929549B1 (en) | System and method for protecting audio and video files | |
JP6992437B2 (en) | Log recording device, log recording method, log decoding device, and log decoding method | |
US8689014B2 (en) | Data encryption device and control method thereof | |
WO2011012594A1 (en) | Content encryption using broadcast encryption |