WO2008018310A1 - Application execution device, method, and program - Google Patents

Application execution device, method, and program Download PDF

Info

Publication number
WO2008018310A1
WO2008018310A1 PCT/JP2007/064851 JP2007064851W WO2008018310A1 WO 2008018310 A1 WO2008018310 A1 WO 2008018310A1 JP 2007064851 W JP2007064851 W JP 2007064851W WO 2008018310 A1 WO2008018310 A1 WO 2008018310A1
Authority
WO
WIPO (PCT)
Prior art keywords
class
class file
file
encrypted
loader
Prior art date
Application number
PCT/JP2007/064851
Other languages
French (fr)
Japanese (ja)
Inventor
Germano Leichsenring
Hidetaka Ohto
Tomonori Nakamura
Kazufumi Miyatake
Original Assignee
Panasonic Corporation
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Panasonic Corporation filed Critical Panasonic Corporation
Publication of WO2008018310A1 publication Critical patent/WO2008018310A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs
    • G06F21/125Restricting unauthorised execution of programs by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code

Definitions

  • the present invention belongs to the technical field of application execution technology.
  • Application execution technology is technology that causes a virtual machine to execute an application by generating a class object that is an instance from a class file that defines the program structure of the application and providing it to a virtual machine.
  • Industrial products that are applied products include an application execution device having a function as a BD-ROM playback device, and an embedded program incorporated in the BD-ROM playback device. The application execution method performed by these industrial products during operation is also a product of the application execution technology.
  • a class file is a class structure described based on the grammar of an object-oriented programming language such as Java (TM) language, and is composed of intermediate code.
  • a class object is generated by converting such intermediate code into bytecode.
  • the process of converting the intermediate code to the executable code and generating the class object in the heap memory of the virtual machine is called “load”.
  • a program that performs such a loading process is called a “loader”.
  • the class files that make up the application are encrypted and recorded on a recording medium, and the application execution device prior to loading the class files, there is a need force s decrypts the hunt class file.
  • Non-Patent Document 1 discloses a method of encrypting a class file and a method of decrypting an encrypted class file at the time of execution.
  • the prior art described in this document will be described below.
  • a class file to be protected is distributed in an encrypted form.
  • Conventional application execution devices include a decryptor and a client.
  • a lath loader is provided.
  • the decryptor decrypts the encrypted class file. If a plain text class file is obtained by decryption, the decryptor passes the class finale to the class loader.
  • the class loader creates a class object on the heap memory based on this class file.
  • Non-Patent Document 1 "Java (TM) World", online, Internet URL: http: ⁇ www.java world.com/javaworid/javaqa/2003_05/01_qa_0509_jcrypt.html>
  • An object of the present invention is to provide a robust tamper resistance technique for the physical layer and the middleware layer.
  • the interface in the loader is clarified! /, So if the plaintext class file is scammed, an application execution device that can close the security loophole is provided. That is.
  • An application execution device that is effective in the present invention for solving the above-described problems is a decryptor that obtains a plaintext class file by decrypting an encrypted class file, and a plaintext class obtained by decoding.
  • the intermediate code that configures the file is converted to byte code, the byte code obtained by the conversion is stored in the heap memory, and the byte code stored in the heap memory is converted into native code.
  • the loader is a middleware program written in native code, or a hardware module composed of hardware elements.
  • the decryptor In the application execution apparatus as described above, the decryptor often has an original use of decrypting an encrypted AV stream. In particular, in a BD-ROM playback apparatus or the like, the processing speed is increased. Therefore, it is often implemented in hardware.
  • the middleware layer or the hardware layer delivers the plain text class file from the decryptor to the loader, and then the loader A class object will be created in memory. Since the class object consists of bytecodes and depends on the internal format of the virtual machine, it is difficult to analyze the program structure.
  • the processing in the middleware layer or the hardware layer is usually performed with a tamper-proof technology and highly confidential, so that it is highly sophisticated. As long as reverse technology is not applied, plaintext class files will not be stolen.
  • a place where the confidentiality of the plaintext class file is maintained is selected for the delivery of the plaintext class file. This level of reverse analysis does not reveal the confidentiality of plaintext class files.
  • the physical layer and the middleware layer are protected by a strong tamper-resistant technology and have a layer structure such as! It is possible to close the security loopholes that can be used and to strengthen the protection of applications.
  • the loader is a decryptor loader for an encrypted class file
  • the application execution device includes a class loader defined by a class structure, and the class loader receives a plain text class file. Converts intermediate code to byte code and stores the byte code obtained by the conversion in heap memory, and includes a judgment method.
  • Class file power S corresponding to the argument of S, it is determined whether it is a plain text class file or an encrypted class file, and if it is a plain text class file, byte code is sent to the class loader. If it is an encrypted class file, the decryptor log It is also possible to cause the reader to perform conversion to bytecode.
  • FIG. 1 is a diagram showing a configuration of a BD-ROM (also referred to as a BD) that is an example of a recording medium used in the present embodiment.
  • a BD-ROM also referred to as a BD
  • FIG. 2 is a diagram showing an example of a file structure in a JAR file.
  • FIG. 3 is a diagram showing a hardware configuration of an application execution apparatus that is effective in the present invention.
  • FIG. 4 is a diagram showing a layer model for playback control.
  • FIG. 5 is a diagram showing the relationship between the class loader 14 and the loading determination method 16 in more detail.
  • FIG. 6 is a diagram showing the relationship between the class loader 14 and the loading determination method 16 in more detail.
  • FIG. 7 is a flowchart showing a processing procedure when calling the Load Class of the loading determination method 16 and the interpreter 12.
  • FIG. 8 is a flowchart showing the procedure of the middleware loader 15.
  • FIG. 9 is a diagram showing a hardware configuration of an application execution device according to a second embodiment.
  • FIG. 10 is a diagram showing the positioning of the hardware loader 22 according to the second embodiment.
  • FIG. 11 is a diagram showing the positioning of a loading determination routine 18 according to the third embodiment.
  • FIG. 12 is a block diagram showing a general functional configuration of a mastering device that performs mastering of a BD-ROM played back by a playback device. It is.
  • FIG. 14 A diagram in which constituent elements with improvements specific to the sixth embodiment are extracted, and exchanges between these constituent elements are added. In other words, the arrow force S added between the components in this figure, and the interaction between these components are schematically shown.
  • FIG. 15 A diagram showing an example of the configuration of a BD-ROM mastering device played back by the playback device shown in the sixth embodiment.
  • This application execution device has a function as a BD-ROM playback device, and provides a Java (TM) application supplied on the BD-ROM for execution by a virtual machine. Since the BD-ROM corresponds to the execution target of the application execution device, the internal configuration of the BD-ROM will be described prior to the description of the application execution device.
  • TM Java
  • FIG. 1 is a diagram showing a configuration of a BD-ROM (also referred to as a BD) that is an example of a recording medium used in the present embodiment.
  • a BD-ROM also referred to as a BD
  • the first row in the figure shows the appearance of the BD-ROM.
  • the BD-ROM has a spiral recording area formed from the inner periphery to the outer periphery, as in the case of DVDs and CDs, for example.
  • the spiral recording area is drawn in the horizontal direction.
  • the recording area has a logical address space in which logical data can be recorded between the inner lead “in” and the outer lead “out”.
  • BCA Burt Cut Area
  • file system information In the logical address space, video data and the like are recorded with file system information at the head.
  • file systems such as UDF and ISO9660.
  • the third row shows the directory and file structure of the recording area.
  • BD-ROM The directory and file structure are the BDDATA directory and the BDMV directory directly under the root directory (ROOT).
  • the BDDATA directory is a directory in which extreme Java (TM) applications are recorded on the BD-ROM.
  • the BDMV directory is a directory in which an encrypted AV stream (YYY.M2TS) handled by the BD-ROM is recorded.
  • Java (TM) archive file is a ZIP file format specialized for Java (TM), and its contents can be confirmed by commercially available ZIP expansion software.
  • “XXX” is variable and the extension “JAR” is fixed (hereinafter referred to as JAR file).
  • a JAR file stores multiple files in a directory structure.
  • One JAR file contains one or more class files, metafiles indicating the attributes of the JAR file, and data such as images.
  • one Java (TM) application is stored in one JAR file, and the Java (TM) application can be executed on the Java (TM) virtual machine.
  • a Java (TM) application consists of one or more class files.
  • one or more class files are encrypted.
  • An unencrypted class file uses the extension “cl ass ”.
  • the encrypted class file uses the extension “secure”. An encrypted class file cannot be restored without a decryption key (described later).
  • 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.
  • FIG. 2 shows an example of the file structure in the JAR file.
  • the file structure of the JAR file is as follows: “META-INF” directory 202, “NotProtected.classj finale 203, and“ Protected.secure ”finale 204 exist under the root directory 201! /.
  • a manifest file 205 corresponding to “MAMFEST.MF” is stored under the “META-INF” directory 202! /.
  • the “N 0 tProtected.class” file 203 is a non-encrypted class file and stores a structure that defines a Java (TM) application that can be executed on the virtual machine. .
  • the Java (TM) application defined in this class file is a Java (TM) Xlet controlled through the Xlet interface. The Xlet interface takes four states at any time: “loa ded, paused, active, destroyed”.
  • the “Protected.secure” file 204 is an example of an encrypted format class file. Like the “NotRotated.class” file 203, the class structure that defines the Java (TM) application is encoded. Is stored in. Because it is encrypted, it can be considered that this file cannot be analyzed by reverse engineering.
  • TM Java
  • the “MAMFEST.MF” file 205 is a file in which the attributes of the JAR file, the hash value of the class file and the data file are described.
  • the attributes of the JAR file include the application ID given to the Java (TM) application and the class file name that should be executed first in order to execute the JAR file. If the above attribute does not exist, the Java (TM) application that is an instance of the class file in the JAR file is not executed.
  • File open is a process of searching a directory by a file name given at the time of a system call, securing a FCB (File Control Block) if a file exists, and returning a file handle number.
  • FCB File Control Block
  • the FCB is generated by copying the contents of the directory entry of the target file onto the S-memory.
  • the application execution apparatus which is effective in the present invention has an internal configuration as shown in FIG. 3, and can be used as a BD-ROM playback apparatus.
  • the application execution apparatus according to the present invention fully implements Java (TM) 2Micro_Edition (J2ME) Pers onal Basis Profile (PBP 1.0) and Globally Executable MHP specification (GEM 1.0.2) for package media targets.
  • Java (TM) platform consisting of
  • FIG. 3 is a diagram showing a hardware configuration of the application execution apparatus that is effective in the present invention.
  • the application execution device consists of BD-ROM drive 1, HD drive 2, memory card drive 3, network I / F unit 4, CPU5, decryptor Chip6, AV playback engine 7, RAM8, embedded program Consists of ROM9 and UO detection device 10.
  • the BD-ROM drive 1 performs loading / ejection of a BD-ROM having an internal configuration as shown in FIG. 1 and accesses the BD-ROM.
  • HD drive 2 is a hard disk drive that can store class files supplied with BD-ROM and equivalent class files.
  • Memory card drive 3 is a drive device that can be loaded with a semiconductor memory card in which a class file supplied with BD-ROM and an equivalent class file are written.
  • the network I / F unit 4 executes a protocol stack for network connection, and causes the application execution apparatus to recognize the drive included in the computer on the network as the network drive 4a.
  • the CPU 5 executes the native code stored in the embedded program ROM 9. (Decryptor Chip6)
  • the decryptor Chip 6 holds a master key, decrypts the encryption / decryption key by using the master key, obtains the decryption key, and uses this decryption key to decrypt the encrypted form Is restored to a plain text file.
  • the decryption key recorded on the BD-ROM is recorded on the BD-ROM in the state of being encoded with the master key!
  • the encrypted file recorded on the BD-ROM has a stream file storing the AV stream and the class file and the file S as described above, and the decryptor Chip 6 mainly stores the stream file. It is provided in the application execution device for the purpose of decryption. However, the present invention is not limited to this, and decryption can be performed even with class files of the same encryption format.
  • the decryptor Chip 6 caches the decryption key obtained by decrypting the decryption key encrypted with the master key. This cached decryption key is used to decrypt the encrypted class file. This makes it possible to omit the decryption process using the master key as described above when the same decryption process as the encrypted class file is performed again. . The use of such a cache can significantly reduce the time required to decrypt an encrypted class file.
  • the AV playback engine 7 plays back the AV stream obtained by decoding the decryptor Chip 6 when requested by the Sjava (TM) virtual machine for audio and video playback, and outputs the audio video.
  • the RAM 8 stores data necessary for the CPU 5 to perform data processing. (ROM9 for embedded program)
  • ROM9 for embedded programs stores embedded programs such as interpreters, native libraries, class libraries, etc. that are preinstalled in application execution devices.
  • the UO detection device 10 detects and notifies a user operation performed on an input device such as a remote control or a front panel of a playback device. This notification is made by generating a UOP according to the interrupt generated by the interrupt handler in the device driver corresponding to these input devices.
  • UOP is a key matrix provided on the remote control or front panel. This is an event (UOP event) that occurs when a key press is detected in a service, and has an attribute corresponding to the pressed key. Specifically, when the interrupt handle of the device driver corresponding to the remote control or front panel detects a key press by key sense for the key matrix, the UOP event is generated by generating an interrupt signal based on the key press. Is generated.
  • the above is the hardware configuration of the application execution apparatus. Next, the software configuration based on the above hardware configuration will be described.
  • FIG. 4 shows a layer model for playback control.
  • the first layer in the figure is a physical layer, and includes a supply control layer for the JAR file to be processed and a hardware control layer.
  • the internal structure of the playback device shown in Fig. 3 exists in this physical layer.
  • the target JAR file is not only BD-R OM but also any recording media such as HD, memory card, network, embedded program ROM, and communication media. Control of these HDs, memory cards, networks, and embedded program ROM (disk access, card access, network communication) is called “supply control”.
  • supply control There are several types of supply sources. In the following explanation, BD-ROM is selected as the JAR file supply source.
  • the second layer is a middleware layer. It is this second layer that specifies how to execute the JAR file supplied in the first layer! /.
  • the middleware layer consists of native code, is in a format dependent on the first layer CPU, and is executed directly by the CPU. As this native library, the middleware loader described later exists in the second layer.
  • the virtual machine includes a user class loader that reads a class file from a BD-ROM, a heap memory that stores an instance corresponding to the class file as a Java (TM) application, a thread, and a Java (TM) stack.
  • a thread is a logical execution subject that executes a method in a Java (TM) application. Operates using arguments stored in the command stack as operands, and stores the result in a local variable or operand stack. Method execution by a thread is performed by converting the byte code that forms the method into the CPU's native code and then issuing it to the CPU.
  • Layer 3 is a Java (TM) layer.
  • the Java (TM) application, class library, and class loader executed on the Java (TM) virtual machine exist in the third layer.
  • the Java (TM) application performs processing based on the described command and user input, and outputs a certain output, for example, audio or video. As described above, the Java (TM) application is supplied by the BD-ROM while being stored in the JAR file.
  • Java TM application is composed of a plurality of class files.
  • Java (TM) applications and class libraries are defined in Java (TM) intermediate code.
  • TM Java
  • a class object is generated by converting such intermediate code into Neut code.
  • the class library provides an application product programming interface (API) for Java (TM) applications. This API is defined in the Java (TM) profile.
  • API application product programming interface
  • the class library is stored in ROM9 for embedded programs and is loaded as necessary.
  • a characteristic of this layer structure is that it has the same function as a class loader composed of bytecode, and exists in the second layer of middleware loader power composed of native code.
  • FIG. 5 is a diagram in which software elements related to the class loader 14 and the middleware loader 15 are added to the control layer shown in FIG.
  • the arrows in the figure symbolically indicate the plaintext class file, the encrypted class file, the encrypted AV stream power, and the power provided to the heap memory 13 or AV playback engine 7 via any path.
  • the arrows yl and y2 are the supply path of the encrypted AV stream, and the encrypted AV stream is transmitted to the AV via the decryptor Chip6. It can be seen that it is supplied to the playback engine 7 and used for playback output.
  • Arrows y3 and y4 symbolically indicate the supply path of the plaintext class file.
  • the plain text class file is supplied to the heap memory 13 by the class loader 14.
  • Arrows y5, y6, and y7 schematically show the supply path of the encrypted class file.
  • the encrypted class file is supplied to the heap memory 13 via the decryptor Chip 6—middleware loader 15 and is received.
  • the interpreter 12, heap memory 13, class loader 14, and middleware loader 15 will be described.
  • the interpreter 12 interprets and executes the byte code constituting the class object, and instructs the class loader 14 and the middleware loader 15 to load in response to the class file being called by the class object.
  • Interpreter 12 is an important part that directly affects the execution speed of Java (TM) applications, and can be implemented as an interpreter with a JIT compiler that converts bytecode into native code. . By having such a JIT compiler, it is possible to speed up interpretation execution. A part of the interpreter can be implemented using hardware.
  • the heap memory 13 is a memory in which class objects are stored by the class loader 14 and the middleware loader 15. Since the class object is stored in the heap memory 13 in the form of a structure that depends on the Java (TM) virtual machine, the class object is restored to the class file even if the information on the heap memory 13 is intercepted. It is difficult.
  • TM Java
  • the class loader 14 is a system application and is defined by a class structure according to the grammar of the object-oriented programming language. When calling a class file from the heap memory 13, the plaintext class file is converted into a corresponding class object and loaded onto the heap memory 13.
  • the middleware loader 15 is a middleware program composed of native code, and the encrypted class file is decrypted by the decryptor Chip6. If so, a class object is generated on the heap memory 13.
  • the middleware loader 15 uses the decrypted plaintext class file because it is difficult to intercept information in the heap memory 13 and it is necessary to shorten the period during which the decrypted plaintext class file is allocated to the heap memory.
  • the plain text class file is deleted from the cache of the heap memory 13 immediately. This deletion is done by overwriting the plain text class file in the heap memory with, for example, a null code (value 0).
  • the middleware loader 15 is configured by native code, and is directly executed by the CPU in the application execution device. Therefore, the application operating on the virtual machine does not correspond to the class library. Since it is written in native code, it corresponds to a component of a virtual machine, just like an interpreter. That is, it can be seen that the middleware loader 15 is incorporated as a component inside the virtual machine that does not exist on the virtual machine. In a general implementation of a BD-ROM playback device, a strong tamper-resistant technology is applied to the platform portion of the virtual machine. Therefore, the middleware loader 15 in this embodiment is part of this strong tamper-resistant technology. Will enter. By placing a loader for reading class files into a tamper-resistant technology, the protection of encryption format class files is as strong as the protection of AV streams.
  • the class loader 14 of this embodiment is characterized in that a new method inheriting the function of the class loader 14, that is, a loading determination method is provided.
  • FIG. 6 is a diagram showing the relationship between the class loader 14 and the loading determination method 16 in more detail.
  • the class loader 14 according to the present embodiment has the same function as the conventional class loader, but the loading determination method 16 is newly added as a method inheriting the function of the class loader 14! / The point is new!
  • the loading determination method 16 is a successor class of the ClassLoader class that is the base of the class loader 14, and when a class file is called, the class object to be executed is loaded.
  • the power to load the project from its own internal cache 17, the force to be loaded by the middleware loader 15, and the force to be loaded by the class loader 14 are determined.
  • the loading determination method 16 includes a program area that defines the processing to be performed by the virtual machine, and a variable area. This variable area is used in the program area. Various local variable storage areas are secured on the RAM 8. Within the variable area, a cache area of 17 that can store a predetermined number of class objects is declared, and the cache is allocated on the RAM 8 when the loading judgment method 16 is executed. . Since the loading determination method 16 has a cache 17 therein, the latest predetermined number of class objects loaded in the past can be stored in the cache 17. When a class file is called, a search is performed to determine whether the class object to be called exists in this cache.
  • the class object to be called exists in this cache 17, For example, loading is omitted by transferring this class object from the cache 17 to the heap memory 13 as indicated by an arrow cl. By doing this, the same class file that has been loaded once can be loaded at high speed. As a result, access to the BD-ROM, etc. can be omitted, so the time from when the LoadClass method is called until the target class object is obtained in the heap memory 13 can be greatly reduced. Can do.
  • the class file is called by, for example, calling a method loadClass (class name) of the ClassLoader class with the class name in parentheses as an argument.
  • the target class file does not exist in the cache 17, it is determined whether the target class file is in encrypted format or plain text format. If the target class file is in the encrypted format and the extension attached to it is “.secure”, it is sent to the call interpreter 12 of the API de fmeEncryptedClass (class name, encrypted class file), Request the middleware loader 15 of the middleware layer to load the encryption class file. If the target class file is in plain text format and the extension is ".class”, the interpreter 12 is called to call the API defineClass (class name, plain text class file), and the plain text class file is loaded. Ask loader 14. [0044] An arrow gO in the figure symbolically shows a call to the method LoadClass.
  • Arrows gl, g2, and g3 in the figure symbolically indicate the flow of instructions to the class loader 14. It can be seen that the instruction to the class loader 14 is made by calling define Class via the interpreter 12—loading determination method 16—interpreter 12. Calling this defineClass, as indicated by an arrow y 4, the class loader 14, this generating a class object in the heap memory 13 and the force s Wakakaru.
  • Arrows gl, g2, and g4 in the figure symbolically indicate the flow of instructions to the middleware loader 15. It can be seen that the middleware loader 15 is instructed by calling defmeEncryptedClass via the interpreter 12—loading determination method 16—interpreter 12. By calling this defmeEncryptedClass, the middleware loader 15 can generate a class object in the heap memory 13 as indicated by an arrow y7.
  • the class object that constitutes the currently executing application calls the method LoadClass as indicated by the arrow gO to the interpreter 12.
  • the class loader 14 or middle loader 15 is loaded is determined by the loading judgment method 16 in the class loader 14. Based on this determination result, it can be seen that interpreter 12 is calling defineEncryptedClass and defineClass.
  • a loading determination method 16 that is a powerful inheritance method of the class loader 14, and this loading determination method 16 determines which of the class loader 14 and the middleware loader 15 generates a class object. Therefore, Java (TM) applications executed in a virtual machine need only be loaded without paying particular attention to whether the class file to be loaded is in encrypted form or compared. .
  • TM Java
  • FIG. 7 is a flowchart showing a processing procedure of the loading determination method 16.
  • Step S1 is a determination of whether or not a class object with the class name corresponding to the argument exists in the cache.
  • Step S2 has a file name corresponding to the argument and has an extension of “.secure”.
  • Step S3 has a file name corresponding to the argument and a class file with an extension of “.class” Judgment whether or not it exists in the JAR file.
  • step S 1 The determination in step S 1 is that the loading determination method 16 has its own power cache, and the loaded class object may be stored in the cache. This is the force that prevents heap memory 13 from being loaded.
  • the file name of the encrypted class file will be “Abracadabra. Secure”, and the class name of the unencrypted class file (“Abracadabra” , class " ⁇ ⁇ d.
  • step S I the class object in the cache is sent to the heap memory in step S4.
  • step S2 the API of defmeEncryptedClass (class name, encrypted class file) is called in step S5.
  • step S3 the API of defmeClass (class name, encryption class file) is called in step S6.
  • step S6 After making an API call in either step S5 or step S6, wait for the class object to be obtained in the heap memory in step S7, and if the class object is obtained, the class object is cached in step S8. After storing, the address of the class object in the heap memory is returned to the interpreter 12 in step S9.
  • the determination in steps S2 and S3 is performed by first searching for an encrypted class file.
  • the plaintext class file is searched first, so if both the encrypted class file and the plaintext class file exist in the JAR file, the loading judgment method 16 is preferentially encrypted class file. Select.
  • priority selection for example, if it exists in the plaintext class file of the trial version, the class file of the encrypted version of the product version, and the SJAR file, it is automatically based on the class file of the encrypted form. A class object will be created. In this way, even when a call to a class file with the same class name is issued, an encrypted class file can be preferentially loaded.
  • the processing procedure of the loading determination method 16 has been described above.
  • FIG. 8 is a flowchart showing the procedure of the middleware loader 15.
  • step S11 issue a command to instruct the BD-ROM drive to open the file specified by the argument.
  • step S12 the decryptor Chip 6 is instructed to decrypt the encrypted file.
  • step S13 the plaintext class file is obtained in the RAM 8.
  • step S15 the plaintext class file is verified in step S15, and it is checked whether the class file has been tampered with! /, NA! /, Etc. Thereafter, the process proceeds to a loop process from step S16 to step S20.
  • the intermediate code i indicates the intermediate code to be processed.
  • step S16 the intermediate code existing at the head of the file reading area in which the plain text class file is stored is set as the intermediate code i, and the process proceeds to a loop process including steps S17 to S20.
  • the intermediate code i is converted to byte code i (step S17), and byte code i is stored in the heap memory (step S 18).
  • Step S 19 is a determination of whether the intermediate code i is the last intermediate code of the plaintext class file. If it is not the last intermediate code, the next intermediate code in the plaintext class file is As the intermediate code i, the process from step S17 to step S20 is repeated. If the intermediate code i is the last intermediate code in the plaintext class file, the process of this flowchart is terminated. Since class objects are stored in the heap memory 13 in the form of bytecode structures that depend on the Java (TM) virtual machine, the class object can be restored to a class file even if information on the heap memory 13 is intercepted. Have difficulty.
  • TM Java
  • a procedure for creating the middleware loader 15 will be described.
  • the software developer uses a programming language to write a source program that realizes the flowchart of FIG.
  • the software developer describes the source program that implements each flowchart and functional components using class structure, variables, array variables, and external function calls according to the syntax of the programming language. .
  • the described source program is given to the compiler as a file.
  • the compiler translates these source programs to generate an object program.
  • Translation by the compiler consists of processes such as syntax analysis, optimization, resource allocation, and code generation.
  • syntax analysis lexical analysis, syntax analysis, and semantic analysis of the source program are performed, and the source program is converted into an intermediate program.
  • the intermediate program is divided into basic blocks, control flow analysis, and data flow analysis.
  • resource allocation variables in the intermediate program are allocated to registers or memory of the processor of the target processor in order to adapt to the instruction set of the target processor.
  • code generation each intermediate instruction in the intermediate program is converted into program code to obtain an object program.
  • variables in the source program are allocated to hardware resources such as registers and memories provided in the CPU of the application execution apparatus.
  • the CPU generates native code that can be deciphered directly.
  • the middleware loader 15 can be configured by compiling the CPU as described above.
  • the programmer activates the linker for these.
  • the linker allocates these object programs and related library programs in memory space and combines them into one.
  • the middleware loader 15 can be created with the power S.
  • the middleware layer delivers the plain text class file from the decryptor to the loader.
  • a class object will be generated in the heap memory. Since the class object consists of bytecodes and depends on the internal format of the virtual machine, it is difficult to analyze the program structure.
  • a place where the confidentiality of the plaintext class file is maintained is selected for delivery of the plaintext class file, so that the confidentiality of the plaintext class file is enhanced. Can be kept in.
  • FIG. 9 is a diagram illustrating a hardware configuration of the application execution device according to the second embodiment. This figure is based on the hardware configuration shown in Fig. 3. Compared to this base hardware configuration, the hardware loader 22 is newly added between the decryptor Chip6 and RAM8. Different from the hardware configuration in Figure 3.
  • FIG. 10 is a diagram showing the positioning of the hardware loader 22 according to the second embodiment.
  • FIG. 5 This figure is drawn based on the control layer of FIG. 5. Compared to this control layer, the middleware loader 15 does not exist in the second layer. Instead, the hardware loader 22 is used. Is present in the first layer, which is an improvement specific to this embodiment. Arrows in the figure The marks hi and h2 schematically show the supply path of the encrypted class file in this embodiment. It can be seen that the class file in the encrypted format is supplied to the heap memory 13 via the decryptor Chip6—hardware loader 22.
  • the hardware loader 22 is a hardware module including hardware elements such as a ROM, a decoder, and a DMA controller.
  • the ROM stores a plurality of byte codes in association with addresses.
  • the decoder incorporates wire logic indicating the correspondence between individual addresses in the ROM and multiple intermediate codes, decodes each intermediate code making up the plaintext class file, converts it into an address, and outputs it to the ROM To do. By doing this, the byte code corresponding to the intermediate code is read from the ROM.
  • the DMA controller stores each byte code in the heap memory 13 by performing DMA transfer for the byte code read from the ROM.
  • the individual intermediate codes that make up the plaintext class file are converted to byte codes and sent to the heap memory 13. .
  • the loader since the loader is configured using hardware elements, when a call to the load class API is instructed, a plaintext from the decryptor to the loader is generated in the hardware layer. After passing the class file, the class object is generated in the heap memory.
  • a place where the confidentiality of the plaintext class file is maintained is selected for delivery of the plaintext class file, so that the confidentiality of the plaintext class file is kept high. Can do.
  • the loading judgment method 16 is provided in the class loader 14.
  • the embodiment relates to an improvement in which a middleware loader 15 has a routine (loading determination routine 18) for determining loading.
  • FIG. 11 is a diagram showing the positioning of the loading determination routine 18 according to the third embodiment. This figure is based on FIG. 6. Compared to this base configuration, the class loader 14 does not exist in the heap memory 13, and instead, the loading judgment routine is inside the middleware loader 15. 18 exists. In other words, the loading judgment method 16 force in the class loader 14 is replaced with the loading judgment routine 18, which is an improvement specific to this embodiment.
  • the loading judgment routine 18 is a middleware loader written in native code.
  • middleware loader 15 loads the plaintext class file. If the class file is in the encrypted format, the middleware loader 15 causes the decryptor Chip6 to decrypt the encrypted format class file, and then receives the plaintext class file obtained by the decryption from the decryptor Chip6. The middleware loader 15 loads the plaintext class file.
  • the instruction to the middleware loader 15 is made when the method LoadClass calling force S interpreter 12 as indicated by an arrow g0 is issued.
  • the loading judgment routine 18 determines whether the plaintext class file should be loaded and whether the plaintext class file obtained by decryption by the CPU 5 should be loaded, as in the first embodiment.
  • the arrow il symbolizes the loading of a plain text class file based on the result of this determination, and the arrow i2 symbolizes the loading of the encrypted class file.
  • the arrow i3 in the figure symbolically indicates the flow of instructions to the middleware loader 15 and the class file vocabulary.
  • the middleware loader 15 can perform processing for loading a plaintext class file and processing for loading an encrypted class file, and the software configuration of the application execution device can be made compact. If you can! Also, by writing the plaintext class file load in native code, The plaintext class file can be loaded at high speed.
  • the middleware loader 15 in the first embodiment has the ability to load the class files that make up the Java (TM) application.
  • the embodiment loads the class files that make up the class library. It is. Since the class library is stored in the ROM 9 for embedded programs, the loading judgment routine 18 has the capability that the class file of the call destination is a plaintext class file when the load class API is called. It is determined whether it is a class file in the format.
  • interpreter 12 issues an instruction (defmeClasss) to class loader 14 to convert the intermediate code constituting the plain text class file stored in ROM 9 for embedded programs into byte code. To get a class object in the heap memory.
  • the interpreter 12 issues an instruction (defmeEncryptedClass) to the middleware loader 15.
  • decryptor Chip6 This allows the decryptor Chip6 to decrypt the encrypted class file, and the plaintext class file can be obtained on the memory by decryption.
  • a class object is obtained on the heap memory by converting the intermediate code constituting the plain text class file on the memory into byte code.
  • the load determination routine 18 is configured as a base for the loading determination routine 18, that is, the flow chart algorithm shown in FIG. Write a source program that In this description
  • the software developer follows the syntax of the programming language and uses the class structure, variables, array variables, and external function calls to describe each flowchart and the source program that defines the functional components.
  • the described source program is given to the compiler as a file.
  • the compiler translates these source programs to generate an object program.
  • variables in the source program are allocated to hardware resources such as registers and memory that the CPU in the application execution device has.
  • the CPU generates a native code that can be directly decoded by the CPU.
  • the loading judgment routine 18 can be created by compiling the CPU as described above.
  • the programmer invokes the linker for these.
  • the linker allocates these object programs and related library programs in memory space and combines them into one.
  • the internal configuration of a playback device using a BD-ROM as a supply source has been disclosed. It is embodiment regarding production.
  • BD-ROM production involves the following planning process, material creation process, and mastering process. In this process, the scenario for determining the BD-ROM playback power is determined.
  • a material creation step is performed. This process involves creating materials such as video recording and audio recording.
  • a mastering process is performed.
  • an overall image (generally called a volume image) of data to be recorded in the volume area of the BD-ROM is obtained from the scenario created in the planning process and the material obtained in the material creation process.
  • the volume image is converted into a physical data string, and the master disk is cut based on the physical data string to obtain a disk master disk.
  • BD-ROM is industrially produced in large quantities.
  • This production mainly consists of various processes such as substrate molding, reflection film formation, protective film coating, bonding, label printing and labeling.
  • FIG. 12 is a block diagram showing a rough functional configuration of a mastering apparatus that performs BD-ROM mastering.
  • the mastering device has a class file acquisition module. It consists of a yule 51, an encryption determination unit 52, a key generation unit 53, a class file encryptor 54, an ichiichi kino 55, a master key acquisition module 56, a decryption key encryptor 57, and a BD-ROM burner 58.
  • the class file acquisition module 51 sequentially acquires the class files constituting the Java (TM) application.
  • the encryption determination unit 52 determines the necessity of encryption of the class file acquired from the class file acquisition module 51.
  • the necessity of encryption can be determined by using the attribute information of the class file or by asking the user before encryption.
  • the key generation unit 53 generates a decryption key and an encryption key. It is desirable to use symmetric key cryptography such as AEs (Advanced Encryption Standard) A ⁇ DES (Data Encryption Standard) in order to speed up decryption on playback devices. When using symmetric key cryptography, since the signature key and the decryption key are the same, it is desirable to provide a mechanism (not shown) for keeping them secret.
  • AEs Advanced Encryption Standard
  • a DES Data Encryption Standard
  • the class file encryptor 54 encrypts the class file determined to be encrypted by the encryption determination unit 52 with the encryption key generated by the key generation unit 53.
  • the archiver 55 stores the class file in one JAR file.
  • the class file that does not need to be encrypted is attached to the JAR file with the extension “class”.
  • the encrypted class file obtained from the class file encryptor 54 is stored with the extension “secure” in the JAR file.
  • the master key acquisition module 56 holds the master key of the playback device inside and passes it to the decryption key decryptor 57.
  • the decryption key encryptor 57 encrypts the decryption key with the master key. Since the decryption key is encrypted with the master key, the BD-ROM created by this mastering is extremely difficult to decrypt without the master key.
  • the BD burner 58 converts the JAR file and decrypted decryption key into a file and directory structure as shown in Fig. 2, and covers the data that should be stored in BD-ROM— Is obtained.
  • An optical disc created by the mastering device has the configuration shown in FIG.
  • the class file encryptor To decrypt an encrypted class file in a JAR file without using a master key, the class file encryptor must analyze the encryption algorithm used for encryption. Since the analysis of this encryption algorithm takes a lot of time, it can be considered that analysis using reverse engineering technology is impossible.
  • the present embodiment relates to an improvement in which decryption key information is stored in a manifest file, and the decryptor Chip 6 decrypts an encrypted class file based on the decryption key information.
  • FIG. 13 is a diagram showing an example of the storage contents of the XXX.KEY file and the manifest file according to the sixth embodiment.
  • This XXX.KEY file is an encryption format file that stores one or more decryption keys necessary for decrypting the class file.
  • XXX. KEY file can store multiple decryption keys.
  • the right side of Fig. 13 shows the contents stored in the XXX.KEY file according to this embodiment.
  • the XXX.KEY file itself is also encrypted, and can only be decrypted by a legitimate device.
  • a legitimate device refers to a device that can use Copy Protection for Recordable Media (CPRM) and obtain a decryption key unique to an optical disk based on the device key that the device itself has.
  • This decryption key unique to the optical disc is a decryption key that is determined by the title producer, and is called a title key in CPRM.
  • a plurality of decryption keys are stored in the XXX.KEY file. Which of these is used for decryption is specified in the manifest file in the JAR file shown on the left side of FIG.
  • the MAMFEST.MF file the information as described in the first embodiment is described by the grammar according to the JAR file specification.
  • the MAMFEST.MF file according to the present embodiment is characterized in that the ID of the decryption key necessary for decryption can be designated.
  • the MAMFEST.MF file contains a main session (Manifest-Version: 1.0 in the figure) and an individual session (Name: Protected. Secure). The default KEY-ID is assigned to this main session.
  • multiple keys “Key_ID” in the MAMFEST.MF file multiple class files with different encryption formats can be decrypted.
  • FIG. 14 is a diagram in which constituent elements to which improvements specific to the sixth embodiment are applied are extracted, and exchanges between these constituent elements are added.
  • the arrow force added between the components in this figure schematically shows the interaction between these components.
  • BD-ROM drive 1 holds the device key defined by CPRM inside. BD-ROM drive 1 reads the encoded title key from the BD-ROM and The title key is decrypted using the chair key.
  • the decryptor Chip 6 receives the plaintext title key from the BD-ROM drive 1 and decrypts the encrypted decryption key in the XXX / KEY file using the title key. After that, the encryption class file is decrypted using this decryption key. In delivering the title key, the decryptor Chip 6 performs mutual authentication with the BD-ROM drive 1. This mutual authentication is performed because the key may be intercepted when the BD-ROM drive 1 passes the title key to the decryptor Chip6. If the BD-ROM drive 1 and the decryptor Chip6 authenticate each other's validity, they open each other's encrypted channel (SAC: Secure Authenticated Channel) and receive the plaintext title key through the opened encrypted channel.
  • SAC Secure Authenticated Channel
  • the Ellipic Curve Cryptosy stem ECC
  • the Diffie-Hellman algorithm can be used to realize the encrypted channel.
  • the decryptor Chip 6 After passing the title key and the encrypted decryption key, the decryptor Chip 6 decrypts the encrypted class file.
  • the decryptor Chip 6 caches the decryption key extracted from the XXX.KEY file, and thereafter decrypts the same encrypted class file. This cached decryption key is used.
  • the arrow u0 in FIG. 14 symbolically shows the transfer of the encrypted title key from the BD-ROM to the BD-ROM drive 1, and the arrow ul indicates the SAC between the decryptor Chip66 and the BD-ROM drive 1. Symbolically shows mutual authentication by.
  • the arrow u2 in the figure symbolically indicates the delivery of the plaintext title key from the BD-ROM drive 1 to the decryptor Chip 6.
  • the encrypted XXX.KEY file delivered in this way will be decrypted using the plaintext title key delivered earlier.
  • the middleware loader 15 generates a class object on the heap memory 13 after the encrypted class file is decrypted into a plain text class file.
  • the interpreter 12 instructs the class loader 14 and the middleware loader 15 to load the class file according to the determination result of the loading determination method 16.
  • the interpreter 12 determines that the class file to be loaded by the loading determination method 16 is encrypted.
  • the class name, encrypted class file, and key-ID must be specified as arguments. In other words, it is necessary to call defmeEncryptedClass which is API as defmeEncryptedClass (class name, encryption class file, Key-ID).
  • class name is the name of the class object to be reproduced.
  • the encryption class file is a file obtained from the JAR file.
  • Key-ID is the Key-ID corresponding to the class name obtained from the MAMFEST.MF file.
  • a call to defineEncryptedClass like this The middleware loader 15 is requested to load the encryption class file.
  • the loading determination method 16 determines that the class file to be loaded is not encrypted, it makes an API call defmeClass (class name, plain text class file), specifies the class name and class file as arguments, and class Request class loader 1 4 to load file
  • the arrow u4 in the figure symbolically shows the output of the determination result from the loading determination method 16 to the interpreter 12.
  • An arrow u5 symbolically indicates a call to defineEncryptedClass (class name, encryption class, Key-ID) based on the determination result.
  • the arrow u6 in the figure symbolically indicates the decryption instruction to the decryptor Chip6 based on the Key-ID specified by the argument.
  • An arrow u7 in the figure symbolizes the delivery of an encrypted class file.
  • the encrypted class file delivered in this way is decrypted using the decryption key corresponding to the Key-ID instructed to be used for decryption.
  • the arrow u8 in the figure symbolically shows the delivery of the plaintext class file obtained by decryption from the decryptor Chip6 to the AV playback engine 7. As described in the first embodiment, this delivery is performed in the first layer or the second layer. As described above, according to this embodiment, the information for extracting the decryption key corresponding to the encrypted class file is obtained.
  • BD-ROM mastering provided to the application execution device shown in the sixth embodiment will be described.
  • FIG. 15 is a diagram illustrating an example of a configuration of a mastering apparatus that performs BD-ROM mastering used in the application execution apparatus illustrated in the sixth embodiment.
  • This figure is drawn based on FIG. 12, and compared to this base configuration, the key generation unit 53, the class file encryptor 54, the archiver 55, the CPRM module 56, and the decryption key encryptor.
  • a new feature is that 57 has been replaced with a key generator 63, class file encryptor 64, archiver 65, CPRM module 66, and decryption key encryptor 67.
  • Constituent elements already described in the previous embodiment are denoted by the same reference numerals, and description thereof is omitted.
  • components that appear for the first time in the present embodiment will be described.
  • the key generation unit 63 generates a decryption key and an encryption key. Since symmetric encryption is used, the decryption key is the same as the encryption key.
  • the class file encryptor 64 encrypts the class file that needs to be encrypted with the encryption key generated by the key generation unit 63. Key-ID is attached to the encryption key, and the class file cryptor 64 stores the ID of the key used.
  • Archiver 65 adds the extension “class” to the file name of the class file that does not require encryption, and adds the extension “secure” to the file name of the encrypted class file obtained from class file encryptor 64.
  • a JAR file containing these plaintext class files and class files in encrypted format is obtained.
  • the key-ID information of the key number used for the key number is received from the class file encryptor 64, and the information is stored in the metafile.
  • the metafile is a MANIFEST.MF file in the META-INF directory of the JAR file.
  • the CPRM module 66 performs key generation and information holding necessary for CPRM.
  • CPRM module 66 passes the title key to decryption key encryptor 67.
  • the information specified in the CPRM specifications is passed to the BD burner 58.
  • the specification of CPRM is disclosed, for example, at “http: ⁇ www.4centity.com/tech/cprm/J”.
  • the decryption key encryptor 67 encrypts the necessary decryption key with the title key.
  • the decryption key file is generated by encrypting the chain of decryption keys created in this way with the title key.
  • An optical disc created by the mastering apparatus according to the present embodiment 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 specified 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.
  • the decryptor in each embodiment is implemented by hardware. However, if there is a guarantee that the security of the master key can be ensured, the decryptor may be implemented by software! /, .
  • confidentiality can be enhanced by executing a software-based decryptor in a secure execution mode.
  • a software-based decryptor By executing the secure decryptor in the secure execution mode, the confidentiality of the master key is kept high. (Room for tuning)
  • the class loader 14 and the middleware loader 15 have a lot in common in the generation of class objects, but the class objects generated by the class loader 14 do not need to pay special attention to copyright protection. There is room for tuning to speed up the implementation. Therefore, by tuning the class loader 14, it is possible to speed up the process of loading the plaintext class file among the class files that constitute the application.
  • middleware loader 15 If the middleware loader 15 is placed in the middleware layer of the second layer, there is a risk that the heap memory will be dumped while the middleware loader 15 is processing and the class file will be intercepted. In order to avoid force and interception, it is desirable that the middleware loader 15 avoids interaction with other modules such as the interpreter 12 and applies software obfuscation technology.
  • middleware loader 15 In addition to the application of software obfuscation technology, confidentiality can be enhanced by executing the middleware loader 15 in a secure execution mode by the CPU.
  • Software running in secure execution mode makes it more difficult to intercept heap memory, so it is desirable that middleware loader 15 be executed in secure execution mode.
  • the processing after the middleware loader 15 converts the encrypted class file into a plain text class file is the same as the processing by the class loader 14.
  • an implementation that uses a part of the middleware loader 15 may be realized for the part that converts the plain text class file into a class object and stores it in the heap memory. This can be realized by, for example, sharing a common library between the processing by the class loader 14 and the processing by the middleware loader 15.
  • the class loader 14, loading judgment method 16, and hardware loader 22 load class files based on application signaling by the application manager. You may be fi.
  • the application manager is a system application that operates in a heap area in the virtual machine, and executes application signaling.
  • ⁇ Application signaling ⁇ is a control that starts and executes an application using a service ⁇ as a life cycle in MHP (Multimedei Home Platform) defined by GEM1.0.2.
  • the application manager in the BD-R OM playback device Instead of this “service”, the “Title on BD-ROM” is used as the life cycle, and application startup and execution control is realized.
  • the “title” is a playback unit of video and audio data recorded on the BD-ROM, and an application management table (AMT) is arbitrarily assigned.
  • the title boundary application signaling includes an application management table (AMT) corresponding to the previous title and an application management table corresponding to the current title ( Signaling performed using (AMT).
  • AMT application management table
  • AMT application management table
  • This signaling is written in the AMT corresponding to the previous title! /
  • the power is written in the AMT corresponding to the current title! /, Na! /
  • This is a control that is not described in the AMT corresponding to the title, but is described in the AMT corresponding to the current title!
  • the class loader 14, the middleware loader 15, and the hardware loader 22 shown in each embodiment generate a class object from the class file that configures the application to be started, and Used for machine execution.
  • the HD drive 2 and the memory card drive 3 shown in FIG. 3 may be a local storage that can be accessed by using a method from Java (TM) 10 Package.
  • This local storage has a plurality of domain areas.
  • the domain area is a directory corresponding to a disk root certificate unique to the BD-ROM, and a directory for each organization is stored under these directories.
  • the disk root certificate is a BD-ROM assigned to the BD-ROM by the creator who created this BD-ROM and the root certificate distributed by the root certificate authority.
  • Disk root certificate Is encoded in the X.509 format, for example.
  • the X.509 specification is published by the International Brass and Telephone Consultative Committee and is listed in CCITT Recommendation X.509 (1988), "The Directory-Au thentication Framework"! / ⁇ o.
  • the directory for each application in the organization is the same as that of MHP.
  • the directory for each application of each organization specified in MHP is arranged under the directory corresponding to the root certificate. In this way, compatibility with the MHP storage method can be maintained.
  • the part corresponding to the root certificate in the file path for accessing the directory structure of the local storage is called “local storage storage rate”.
  • the class loader 14, the middleware loader 15, and the hardware order 22 shown in the respective embodiments use the local storage root from the directory corresponding to the disk root certificate in the BD-ROM. It is desirable to create a class object based on this class file and execute it on the virtual machine! /.
  • BD-ROM and local storage are encrypted with Advancend Access Content System (AACS), signed information is added, and usage rights are expected to be specified in the permission file. Masle.
  • AACS Advancend Access Content System
  • the Java (TM) application includes the HAVi framework specified in GEM1.0.2, The remote control navigation mechanism in GEM1.0.2 may be realized.
  • the Java (TM) application can realize a screen display that combines the display such as button display, text display, and online display (for example, BBS contents) based on the HAVi framework with the display of moving images. Remote control Operations for this screen display can be performed using the roll.
  • the Java (TM) application may be, for example, an electronic commerce (EC) client application or an online online game. In addition, it provides various online services to users in cooperation with search engines.
  • EC electronic commerce
  • the application execution apparatus which is effective in the present invention may be a Java (TM) platform incorporated in a device for receiving satellite broadcasting.
  • the application execution apparatus which is effective in the present invention may be a Java (TM) platform incorporated in a device for processing control of a mobile phone.
  • the BD-J Extension includes various packages specialized to give the Java (TM) platform functionality beyond GEM [1.0.2].
  • the packages supplied with BD-J Extension are as follows.
  • This package provides special functions that should be added to Java (TM) Media FrameWork. Control over the selection of angles, audio, and subtitles Added to this package. Org.bluray.ti
  • This package selects APIs for mapping "services” to “titles” in GEM [1.0.2] and operating, title information from BD-ROMs, matching mechanisms, and new titles. Including a mechanism.
  • This package includes an API for managing the lifetime of an application. It also includes an API for inquiring information necessary for signaling when executing the application.
  • this package can be recorded on BD-ROM (on-disc content) and recorded on BD-ROM! /, NA! / ⁇ Provides a mechanism (Binding Scheme) for binding content on local storage (off-disc content).
  • the Binding Scheme associates content (AVClip, subtitles, BD-J application) on BD-ROM with related content on Local Storage. This Binding Scheme realizes seamless playback regardless of the location of the content.
  • decryptor Chip6 When decryptor Chip6 is operated as a task on a real-time OS such as Linux, it is desirable that the decryption request for decryptor Chip6 be realized by a system call via the kernel of the real-time OS.
  • a real-time OS such as Linux
  • the kernel allocates a memory block from the memory pool and creates a parameter block used for the call in that block. Then, the request processing unit of the device driver corresponding to the decrypter Chip 6 is called by using the head address of the parameter block and the address of the device table in which device information is described as arguments.
  • the device driver corresponding to the decryptor Chip 6 includes an “interrupt handler section”, an “interrupt task section”, and a “request processing section” that are activated by a hardware interrupt signal.
  • the request processing unit of the device driver registers the parameter block in the I / O queue, enables interrupts, and returns to the kernel.
  • the interrupt handler When the interrupt handler receives an interrupt signal from the hardware corresponding to the decryptor Chip6, it performs the requested input / output with the device. When the scheduled I / O is completed, interrupts are disabled and the interrupt task section is activated. If not completed, return to the device driver. When the next I / O request is made, the interrupt handle is activated again and the remaining I / O continues. [0109] The interrupt task unit notifies the kernel of input / output completion by a system call using the input completion state as an argument. Upon receiving such notification, the kernel notifies the requesting decryptor Chip6.
  • Midoreware loader 15 Descriptor Decryptor that does not use the interface described in Non-Patent Document 1 at all if the plaintext class file is handed over on RAM8 by performing input / output as described above with Chip6 device driver.
  • the plaintext class file can be transferred from to the middleware loader 15.
  • Such exchange between the middleware driver 15 and the device driver of the decryptor Chip 6 is performed under the tamper-resistant technology in the BD-ROM playback device, so the confidentiality of the plaintext class file is guaranteed. .
  • the present invention can be used for copyright protection of a Java (TM) application received via a recording medium such as an optical disk or an SD card or a communication medium such as the Internet.
  • a Java (TM) application received via a recording medium such as an optical disk or an SD card or a communication medium such as the Internet.

Abstract

An application execution device includes a physical layer, a middleware layer, and a Java layer as control layer. A decryptor for decrypting an encrypted class file to obtain a plain text file exists in the physical layer and the middleware layer. In the physical layer and the middleware layer, there exists a middleware loader described by a native code or a hardware loader configured by a hardware element. These loaders convert intermediate codes constituting the plain class file obtained by decryption into byte codes and store the byte codes obtained by the conversion in a heap memory. Thus, the plain text class file is passed in the physical layer and the middleware layer, which maintains confidentiality.

Description

明 細 書  Specification
アプリケーション実行装置、方法、プログラム  Application execution apparatus, method, and program
技術分野  Technical field
[0001] 本発明は、アプリケーション実行技術の技術分野に属する発明である。  [0001] The present invention belongs to the technical field of application execution technology.
背景技術  Background art
[0002] アプリケーション実行技術とは、アプリケーションのプログラム構造を規定したクラス ファイルから、そのインスタンスであるクラスオブジェクトを生成して、仮想マシンに供 することにより、アプリケーションを仮想マシンに実行させる技術である。その応用物 たる工業製品には、 BD-ROM再生装置としての機能をもつアプリケーション実行装置 、この BD-ROM再生装置に組み込まれて使用される組込プログラム等がある。これら の工業製品が動作時に行う、アプリケーションの実行方法も、アプリケーション実行技 術の成果物であるとレ、える。  [0002] Application execution technology is technology that causes a virtual machine to execute an application by generating a class object that is an instance from a class file that defines the program structure of the application and providing it to a virtual machine. Industrial products that are applied products include an application execution device having a function as a BD-ROM playback device, and an embedded program incorporated in the BD-ROM playback device. The application execution method performed by these industrial products during operation is also a product of the application execution technology.
[0003] クラスファイルは、 Java(TM)言語等のオブジェクト指向プログラミング言語の文法に 基づいて記述されたクラス構造体であり、中間コードにて構成される。かかる中間コ ードを、バイトコードに変換することによりクラスオブジェクトが生成される。以上のよう に、中間コードから実行コードへの変換を行って、仮想マシンのヒープメモリ上にクラ スオブジェクトを生成する処理のことを"ロード"という。また、このようなロード処理を行 うようなプログラムを"ローダ"という。  [0003] A class file is a class structure described based on the grammar of an object-oriented programming language such as Java (TM) language, and is composed of intermediate code. A class object is generated by converting such intermediate code into bytecode. As described above, the process of converting the intermediate code to the executable code and generating the class object in the heap memory of the virtual machine is called “load”. A program that performs such a loading process is called a “loader”.
[0004] 力、かるアプリケーションの著作権を保護するにあたっては、アプリケーションを構成 するクラスファイルを暗号化した上で記録媒体に記録しておき、アプリケーション実行 装置は、クラスファイルのロードに先立ち、力、かるクラスファイルの復号化を行う必要 力 sある。 [0004] In order to protect the copyright of such applications, the class files that make up the application are encrypted and recorded on a recording medium, and the application execution device prior to loading the class files, there is a need force s decrypts the hunt class file.
たとえば非特許文献 1にはクラスファイルを暗号化する方法と、暗号化形式のクラス ファイルを実行時に復号化する方法とが開示されている。以下、本文献に記載された 先行技術について説明する。  For example, Non-Patent Document 1 discloses a method of encrypting a class file and a method of decrypting an encrypted class file at the time of execution. The prior art described in this document will be described below.
[0005] アプリケーションの著作権保護を実現するにあたって、保護対象となるクラスフアイ ノレは、暗号化形式で配布される。従来のアプリケーション実行装置は、デクリプタ、ク ラスローダを備える。デクリプタは、暗号化形式のクラスファイルを復号化する。復号 化により、平文のクラスファイルが得られれば、デクリプタはクラスローダにクラスフアイ ノレを渡す。クラスローダは、このクラスファイルに基づきクラスオブジェクトをヒープメモ リ上に生成する。 [0005] When realizing the copyright protection of an application, a class file to be protected is distributed in an encrypted form. Conventional application execution devices include a decryptor and a client. A lath loader is provided. The decryptor decrypts the encrypted class file. If a plain text class file is obtained by decryption, the decryptor passes the class finale to the class loader. The class loader creates a class object on the heap memory based on this class file.
[0006] 上述の方式以外に、従来のコンテンツのコピープロテクションを適応し配布ファイル 全体を暗号化するやり方も考えられる。  [0006] In addition to the method described above, a method of encrypting the entire distribution file by applying copy protection of conventional content is also conceivable.
非特許文献 1: "Java(TM) World"、オンライン、インターネットく URL:http:〃 www.java world.com/javaworid/javaqa/2003_05/01_qa_0509_jcrypt.html〉  Non-Patent Document 1: "Java (TM) World", online, Internet URL: http: 〃 www.java world.com/javaworid/javaqa/2003_05/01_qa_0509_jcrypt.html>
発明の開示  Disclosure of the invention
発明が解決しょうとする課題  Problems to be solved by the invention
[0007] ところで、上記先行技術では、デクリプタとローダとの間で平文クラスファイルを受け 渡しするためのインターフェースが明確に規定されている。このインターフェイスでの やりとりを、傍受するような不正なプログラムが起動していれば、デクリプタと、クラス口 ーダとの間の平文クラスファイルの受け渡し時に、平文クラスファイルが詐取されるこ とがある。力、かる平文クラスファイルは、中間コードにて記述されており、この中間コー ドを解析すれば、その母体となったソースプログラム、つまり、 Java(TM)言語等のォブ ジェタト指向プログラミング言語で記述されたソースプログラムのプログラム構造を容 易に類推することができる。このように、上述したような先行技術では、平文クラスファ ィルの受渡しインターフェースを理解した程度の、幼稚なレベルのリバース解析によ り、プログラム構造が類推されてしまうとレ、う脆弱性を有して!/、る。  By the way, in the above prior art, an interface for passing a plaintext class file between the decryptor and the loader is clearly defined. If an illegal program that intercepts exchanges via this interface is running, the plaintext class file may be scammed when the plaintext class file is passed between the decryptor and the class reader. . The plain text class file is written in intermediate code, and if this intermediate code is analyzed, the source program that is the base, that is, the object-oriented programming language such as Java (TM) language, etc. The program structure of the described source program can be easily estimated. In this way, with the prior art as described above, if the program structure is inferred by a childish level reverse analysis to the extent that the plaintext class file delivery interface is understood, the vulnerability will be reduced. Have it!
[0008] 一方、 BD-ROM再生装置のように、喑号化された AVストリームを復号して再生する ような機器では、制御のレイヤ構造のうち、物理層及びミドルウェア層力 強固な耐タ ンパ技術により保護されていることが多い。しかし、クラスローダと、デクリプタとの平文 クラスフアイノレのやりとりがなされ、力、かるやりとりが上述したようなインターフェイスに 準ずる以上、いくら物理層及びミドルウェア層に、強固な耐タンパ技術を施したとして も、クラスローダと、デクリプタとの間での、平文クラスファイルのやりとりをなくすことが できず、セキュリティの抜け穴を埋めることは、不可能である。  [0008] On the other hand, in a device that decodes and plays back a coded AV stream, such as a BD-ROM playback device, the physical layer and middleware layer strengths of the control layer structure are robust. Often protected by technology. However, since plain text classifiers are exchanged between the class loader and the decryptor, and the force and exchange follow the above-mentioned interface, no matter how strong the tamper resistance technology is applied to the physical layer and middleware layer. It is impossible to fill the security loopholes because it is impossible to eliminate the exchange of plaintext class files between the class loader and the decryptor.
[0009] 本発明の目的は、物理層及びミドルウェア層に対して、強固な耐タンパ技術により 保護されているようなレイヤ構造において、ローダにおけるインターフェイスが明確に されて!/、ることから、平文クラスファイルが詐取されるとレ、うセキュリティの抜け穴を塞ぐ ことができるアプリケーション実行装置を提供することである。 [0009] An object of the present invention is to provide a robust tamper resistance technique for the physical layer and the middleware layer. In the layer structure that is protected, the interface in the loader is clarified! /, So if the plaintext class file is scammed, an application execution device that can close the security loophole is provided. That is.
課題を解決するための手段  Means for solving the problem
[0010] 上記課題を解決するための、本発明に力、かるアプリケーション実行装置は、暗号化 形式のクラスファイルを復号することにより、平文クラスファイルを得るデクリプタと、復 号により得られた平文クラスファイルを構成する中間コードをバイトコードに変換して、 変換により得られたバイトコードをヒープメモリに格納するローダと、ヒープメモリに格 納されたバイトコードを、ネイティブコードに変換して、装置における CPUに実行させ るインタプリタとを備え、前記ローダは、ネイティブコードで記述されたミドルウェアプロ グラム、又は、ハードウェア素子で構成されたハードウェアモジュールであることを特 徴としている。 [0010] An application execution device that is effective in the present invention for solving the above-described problems is a decryptor that obtains a plaintext class file by decrypting an encrypted class file, and a plaintext class obtained by decoding. The intermediate code that configures the file is converted to byte code, the byte code obtained by the conversion is stored in the heap memory, and the byte code stored in the heap memory is converted into native code. The loader is a middleware program written in native code, or a hardware module composed of hardware elements.
発明の効果  The invention's effect
[0011] 上述したようなアプリケーション実行装置においてデクリプタは、暗号化された AVス トリームを復号するという本来の用途をもっていることが多ぐ特に、 BD-ROM再生装 置等では、処理の高速化のためハードウェア化されていることが多い。一方本発明に 係るアプリケーション実行装置では、ロードクラス APIの呼び出しが命じられた場合、ミ ドルウェア層又はハードウェア層で、デクリプタからローダへの平文クラスファイルの 引き渡しを行った上、ローダが、ヒープメモリ内にクラスオブジェクトを生成することに なる。力、かるクラスオブジェクトはバイトコードからなり、仮想マシンの内部形式に依存 したものなので、そのプログラム構造の解析は困難なものとなる。  [0011] In the application execution apparatus as described above, the decryptor often has an original use of decrypting an encrypted AV stream. In particular, in a BD-ROM playback apparatus or the like, the processing speed is increased. Therefore, it is often implemented in hardware. On the other hand, in the application execution device according to the present invention, when a call to the load class API is instructed, the middleware layer or the hardware layer delivers the plain text class file from the decryptor to the loader, and then the loader A class object will be created in memory. Since the class object consists of bytecodes and depends on the internal format of the virtual machine, it is difficult to analyze the program structure.
[0012] BD-ROM再生装置等の場合、これらミドルウェア層又はハードウェア層での処理は 、大抵の場合、耐タンパ技術が施され、機密性が高度に保たれているので、よほど高 度なリバース技術が適用されない限り、平文クラスファイルが詐取されることはない。 本発明では、 BD-ROM再生装置のレイヤ構造において、平文クラスファイルの機密 性が保てるような場所を、平文クラスファイルの引き渡しに選んでいるので、上述した ようなインターフェイスを知得した程度の幼稚なレベルのリバース解析では、平文クラ スファイルの機密性が暴露されることはなレ、。 [0013] 以上のように本発明では、物理層及びミドルウェア層に対して、強固な耐タンパ技 術により保護されてレ、るようなレイヤ構造にお!/、て、平文クラスファイルの詐取がされ るというセキュリティの抜け穴を塞ぐことができ、アプリケーションの保護を強固にする こと力 Sでさる。 [0012] In the case of a BD-ROM playback device or the like, the processing in the middleware layer or the hardware layer is usually performed with a tamper-proof technology and highly confidential, so that it is highly sophisticated. As long as reverse technology is not applied, plaintext class files will not be stolen. In the present invention, in the layer structure of the BD-ROM playback device, a place where the confidentiality of the plaintext class file is maintained is selected for the delivery of the plaintext class file. This level of reverse analysis does not reveal the confidentiality of plaintext class files. [0013] As described above, in the present invention, the physical layer and the middleware layer are protected by a strong tamper-resistant technology and have a layer structure such as! It is possible to close the security loopholes that can be used and to strengthen the protection of applications.
ここで、任意的ではあるが、アプリケーション実行装置に以下の改良を施すことがで きる。つまり、前記ローダは、暗号化形式のクラスファイルのためのデクリプタ用ローダ であり、前記アプリケーション実行装置は、クラス構造体により定義されるクラスローダ を備え、前記クラスローダは、平文形式のクラスファイルを構成する中間コードをバイ トコードに変換して、変換により得られたバイトコードをヒープメモリに格納するもので あり、判定メソッドを含み、前記判定メソッドは、ロードクラスの呼び出しがあった場合、 その呼び出しの引数に対応するクラスファイル力 S、平文形式のクラスファイルであるか 、暗号化形式のクラスファイルであるかの判定を行い、平文クラスファイルのクラスファ ィルであれば、クラスローダにバイトコードへの変換を行わせ、暗号化形式のクラスフ アイルであれば、デクリプタ用ローダにバイトコードへの変換を行わせてもよい。  Here, although optional, the following improvements can be made to the application execution device. That is, the loader is a decryptor loader for an encrypted class file, the application execution device includes a class loader defined by a class structure, and the class loader receives a plain text class file. Converts intermediate code to byte code and stores the byte code obtained by the conversion in heap memory, and includes a judgment method. Class file power S corresponding to the argument of S, it is determined whether it is a plain text class file or an encrypted class file, and if it is a plain text class file, byte code is sent to the class loader. If it is an encrypted class file, the decryptor log It is also possible to cause the reader to perform conversion to bytecode.
[0014] このアプリケーション実行装置は、ローダを二重に設けるという冗長構成を採用して いるので、一般的な Java(TM)プラットフォームの内部構成との互換を維持することが できる。 [0014] Since this application execution device employs a redundant configuration in which loaders are provided twice, compatibility with the internal configuration of a general Java (TM) platform can be maintained.
呼び出しの引数が、暗号化形式のクラスファイルに対応するか否かの判定に基づき 、どちらのローダを用いるかを決定するので、暗号化形式のクラスファイルと、そうでな いクラスファイルとカ、混在する場合であっても、アプリケーション側のロードクラス呼 出時の記述は、変わらないものとなり、アプリケーションの記述の複雑化を避けること ができる。  Based on the determination of whether the call argument corresponds to the encrypted class file, it determines which loader to use, so the encrypted class file and the class file and Even in a mixed case, the description at the time of calling the load class on the application side will not change, and it is possible to avoid complication of the application description.
[0015] アプリケーション実行装置の上記構成では、アプリケーションが複数のクラスフアイ ルから構成されている場合でも、クラスファイル単位で、ロードを行い、このクラスファ ィルが暗号化形式である力、、非暗号化形式であるかに応じて、ローダ、クラスローダ のどちらかがクラスファイルをロードするので、アプリケーションを実行するにあたての 秘匿性が高まる。  [0015] With the above configuration of the application execution device, even when an application is configured from a plurality of class files, loading is performed in units of class files, and the power of the class file in an encrypted format is not encrypted. Either the loader or the class loader loads the class file depending on whether it is a computerized format, which increases confidentiality when executing the application.
[0016] また上記構成では、著作権保護の必要がないクラスファイルを通常のクラスファイル とすることにより、平文クラスファイルのロードにあたっては、ローダをチューニングす るという余地が生まれる。力、かる余地の範囲内における改良を施すことにより、通常の クラスファイルのローデイング性能の向上を図ることが可能となる。 [0016] In the above configuration, a class file that does not require copyright protection is replaced with a normal class file. As a result, there is room for tuning the loader when loading plaintext class files. By making improvements within the range of power and room, it is possible to improve the loading performance of ordinary class files.
図面の簡単な説明 Brief Description of Drawings
[図 1]本実施の形態に用いる記録媒体の一例である BD-ROM (BDともいう)の構成を 示した図である。 FIG. 1 is a diagram showing a configuration of a BD-ROM (also referred to as a BD) that is an example of a recording medium used in the present embodiment.
[図 2]JARファイルの中のファイル構造の一例を示す図である。  FIG. 2 is a diagram showing an example of a file structure in a JAR file.
[図 3]本発明に力、かるアプリケーション実行装置のハードウェア構成を示す図である。  FIG. 3 is a diagram showing a hardware configuration of an application execution apparatus that is effective in the present invention.
[図 4]再生制御のレイヤモデルを示した図である。 FIG. 4 is a diagram showing a layer model for playback control.
[図 5]クラスローダ 14と、ローデイング判定メソッド 16との関係を、より詳細に示す図で ある。  FIG. 5 is a diagram showing the relationship between the class loader 14 and the loading determination method 16 in more detail.
[図 6]クラスローダ 14と、ローデイング判定メソッド 16との関係を、より詳細に示す図で ある。  FIG. 6 is a diagram showing the relationship between the class loader 14 and the loading determination method 16 in more detail.
[図 7]ローデイング判定メソッド 16及びインタプリタ 12の Load Class呼出時における処 理手順を示すフローチャートである。  FIG. 7 is a flowchart showing a processing procedure when calling the Load Class of the loading determination method 16 and the interpreter 12.
[図 8]ミドルウェアローダ 15の手順を示すフローチャートである。  FIG. 8 is a flowchart showing the procedure of the middleware loader 15.
[図 9]第 2実施形態に係るアプリケーション実行装置のハードウェア構成を示す図で ある。  FIG. 9 is a diagram showing a hardware configuration of an application execution device according to a second embodiment.
[図 10]第 2実施形態に係るハードウェアローダ 22の位置付けを示す図である。  FIG. 10 is a diagram showing the positioning of the hardware loader 22 according to the second embodiment.
[図 11]第 3実施形態に係るローデイング判定ルーチン 18の位置付けを示す図である  FIG. 11 is a diagram showing the positioning of a loading determination routine 18 according to the third embodiment.
[図 12]再生装置で再生される BD-ROMのマスタリングを行うマスタリング装置の大ま 力、な機能構成を示すブロック図である。 である。 FIG. 12 is a block diagram showing a general functional configuration of a mastering device that performs mastering of a BD-ROM played back by a playback device. It is.
[図 14]第 6実施形態特有の改良が施された構成要素を抜き出して、これらの構成要 素間のやり取りを書き加えた図である。つまり、本図の構成要素間に書き加えられた 矢印力 S、これら構成要素側のやりとりを模式的に示している。 園 15]第 6実施形態に示した再生装置で再生される BD-ROMのマ マ スタリング装置の構成の一例を示す図である。 [FIG. 14] A diagram in which constituent elements with improvements specific to the sixth embodiment are extracted, and exchanges between these constituent elements are added. In other words, the arrow force S added between the components in this figure, and the interaction between these components are schematically shown. FIG. 15] A diagram showing an example of the configuration of a BD-ROM mastering device played back by the playback device shown in the sixth embodiment.
符号の説明 Explanation of symbols
1 BD-ROMドライブ  1 BD-ROM drive
2 HDドライブ  2 HD drive
3 メモリカードドライブ 3  3 Memory card drive 3
4 ネットワーク I/F部  4 Network I / F section
5 CPU  5 CPU
6  6
7 AV再生エンジン  7 AV playback engine
8 RAM  8 RAM
9 組込みプログラム用 ROM  9 Embedded program ROM
10 UO検知デバイス  10 UO detection device
11  11
13 ヒープメモリ  13 Heap memory
14 クラスローダ  14 Class loader
15 ミドルウェアローダ  15 middleware loader
22 ノヽードウエアローダ  22 Nodeware loader
51 クラスファイル取得 -一ノレ  51 Get class file-
52 暗号化判定部  52 Encryption judgment part
53 鍵生成部  53 Key generator
54  54
55 アーカイバ  55 Archiver
56 マスター鍵取得モ -ーノレ  56 Master Key Acquisition Monore
57 復号鍵ェンクリプタ  57 Decryption Key Encryptor
58 BD-ROMバーナー  58 BD-ROM burner
63 鍵生成部  63 Key generator
66 CPRMモジュール 201 ノレートディレクトリ 66 CPRM modules 201 Norreto Directory
202 META- INFディレクトリ  202 META-INF directory
203 暗号化されていないクラスファイル  203 Unencrypted class file
204 暗号化形式のクラスファイル  204 Encrypted class file
205 マニフェストフアイノレ  205 Manifest Juinore
発明を実施するための最良の形態  BEST MODE FOR CARRYING OUT THE INVENTION
[0019] (実施の形態 1) [0019] (Embodiment 1)
以下、本発明に力、かるアプリケーション実行装置の実施形態について、図面を参照 しながら説明する。このアプリケーション実行装置は、 BD-ROM再生装置としての機 能を備え、 BD-ROMにて供給される Java(TM)アプリケーションを、仮想マシンによる 実行に供する。 BD-ROMは、アプリケーション実行装置の実行対象に該当するもの なので、アプリケーション実行装置の説明に先立ち、 BD-ROMの内部構成について 説明を行う。  Hereinafter, embodiments of an application execution apparatus that are useful for the present invention will be described with reference to the drawings. This application execution device has a function as a BD-ROM playback device, and provides a Java (TM) application supplied on the BD-ROM for execution by a virtual machine. Since the BD-ROM corresponds to the execution target of the application execution device, the internal configuration of the BD-ROM will be described prior to the description of the application execution device.
[0020] 図 1は、本実施の形態に用いる記録媒体の一例である BD-ROM (BDともいう)の構 成を示した図である。  FIG. 1 is a diagram showing a configuration of a BD-ROM (also referred to as a BD) that is an example of a recording medium used in the present embodiment.
本図の第 1段目は、 BD-ROMの外観を示す。 BD-ROMは、例えば DVDや CDなどと 同様にその内周から外周に向けて形成された螺旋状の記録領域を持つ。  The first row in the figure shows the appearance of the BD-ROM. The BD-ROM has a spiral recording area formed from the inner periphery to the outer periphery, as in the case of DVDs and CDs, for example.
第 2段目は、螺旋状の記録領域を横方向に引き伸ばして描いている。この第 2段目 において、記録領域は、内周のリード'インと外周のリード '·アウトの間に論理データを 記録できる論理アドレス空間を有している。リード'インの内側には BCA (Burst Cutti ng Area)と呼ばれるドライブでしか読み出せない特別な領域がある。この領域はァ プリケーシヨンから読み出せな!/、ため、例えば著作権保護技術などに利用されること がよくある。  In the second row, the spiral recording area is drawn in the horizontal direction. In the second stage, the recording area has a logical address space in which logical data can be recorded between the inner lead “in” and the outer lead “out”. Inside the lead-in is a special area called BCA (Burst Cut Area) that can only be read by a drive. Since this area cannot be read from the application! /, It is often used for copyright protection technology, for example.
[0021] 論理アドレス空間には、ファイルシステム情報を先頭に映像データなどが記録され る。ファイルシステムには、 UDFや ISO9660などの方式がある、このファイルシステムを 介することで、上記のような記録領域に記録されている論理データの読み出しが可能 になる。  In the logical address space, video data and the like are recorded with file system information at the head. There are file systems such as UDF and ISO9660. By using this file system, the logical data recorded in the recording area as described above can be read.
第 3段目は、記録領域のディレクトリ及びファイル構造を示す。 BD-ROMにおけるデ ィレクトリ及びファイル構造は、ルートディレクトリ (ROOT)直下に BDDATAディレクトリ 、 BDMVディレクトリが置かれている。 BDDATAディレクトリは BD- ROMで极ぅ Java(TM) アプリケーションが記録されているディレクトリである。 BDMVディレクトリは、 BD-ROM で扱う暗号化形式の AVストリーム (YYY.M2TS)が記録されているディレクトリである。 The third row shows the directory and file structure of the recording area. BD-ROM The directory and file structure are the BDDATA directory and the BDMV directory directly under the root directory (ROOT). The BDDATA directory is a directory in which extreme Java (TM) applications are recorded on the BD-ROM. The BDMV directory is a directory in which an encrypted AV stream (YYY.M2TS) handled by the BD-ROM is recorded.
[0022] BDDATAディレクトリの下には、次の 2種類のファイルが存在する。 [0022] The following two types of files exist under the BDDATA directory.
(1) XXX.JAR (「XXX」は可変、拡張子「JAR」は固定)  (1) XXX.JAR ("XXX" is variable, extension "JAR" is fixed)
これは、 Java(TM)アーカイブファイルである。 Java(TM)アーカイブファイルは、 ZIPフ アイルの形式を、 Java(TM)に特化したものであり、市販されている ZIP展開ソフトウェア により中身を確認することができる。ここで「XXX」は可変、拡張子「JAR」は固定である (以下 JARファイルと称する)。 JARファイルは複数のファイルをディレクトリ構造の形で 格納している。一つの JARファイルは一つ以上のクラスファイル、 JARファイルの属性 を示すメタファイル、画像などのデータが格納されている。基本的に一つの JARフアイ ルに一つの Java(TM)アプリケーションが格納されており、 Java(TM)アプリケーションは Java(TM)仮想マシン上で実行することができる。 Java(TM)アプリケーションは一つ以 上のクラスファイルより構成されるが、 Java(TM)アプリケーションの著作権保護を行う 必要がある場合、一つ以上のクラスファイルが暗号化される。暗号化されていないク ラスファイルは拡張子「class」を利用する。また、暗号化されているクラスファイルは拡 張子「secure」を利用する。暗号化されているクラスファイルは、復号鍵 (後述)がなけ れば Java(TM)アプリケーションを復元することが不可能になる。 This is a Java (TM) archive file. Java (TM) archive file is a ZIP file format specialized for Java (TM), and its contents can be confirmed by commercially available ZIP expansion software. Here, “XXX” is variable and the extension “JAR” is fixed (hereinafter referred to as JAR file). A JAR file stores multiple files in a directory structure. One JAR file contains one or more class files, metafiles indicating the attributes of the JAR file, and data such as images. Basically, one Java (TM) application is stored in one JAR file, and the Java (TM) application can be executed on the Java (TM) virtual machine. A Java (TM) application consists of one or more class files. If it is necessary to protect the copyright of a Java (TM) application, one or more class files are encrypted. An unencrypted class file uses the extension “cl ass ”. The encrypted class file uses the extension “secure”. An encrypted class file cannot be restored without a decryption key (described later).
[0023] (2) ΧΧΧ·ΚΕΥ (「ΧΧΧ」は可変、拡張子「ΚΕΥ」は固定) [0023] (2) ΧΧΧ · ΚΕΥ ("ΧΧΧ" is variable, extension "ΚΕΥ" 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ファイルの中のファイル構造の一例を示す図である。 JARファイルのファ ィル構造は、ルートディレクトリ 201の配下に「META-INF」ディレクトリ 202、「NotProt ected.classjフアイノレ 203、「Protected.secure」フアイノレ 204が存在すると!/、うものであ る。この他、「META-INF」ディレクトリ 202以下に「MAMFEST.MF」に対応するマニフ エストファイル 205が格納されて!/、る。 [0024] 「N0tProtected.class」ファイル 203は、非暗号化形式のクラスファイルであり、仮想 マシン上で実行することができる Java(TM)アプリケーションを定義するような構造体を 格納している。このクラスファイルにて定義される Java(TM)アプリケーションは、 Xletィ ンターフェイスを通じて制御される Java(TM) Xletである。 Xletインターフェイスは、 "loa ded, paused、 active, destroyed"といつに 4つの状 を ¾つ。 FIG. 2 shows an example of the file structure in the JAR file. The file structure of the JAR file is as follows: “META-INF” directory 202, “NotProtected.classj finale 203, and“ Protected.secure ”finale 204 exist under the root directory 201! /. In addition, a manifest file 205 corresponding to “MAMFEST.MF” is stored under the “META-INF” directory 202! /. [0024] The “N 0 tProtected.class” file 203 is a non-encrypted class file and stores a structure that defines a Java (TM) application that can be executed on the virtual machine. . The Java (TM) application defined in this class file is a Java (TM) Xlet controlled through the Xlet interface. The Xlet interface takes four states at any time: “loa ded, paused, active, destroyed”.
[0025] 「Protected.secure」ファイル 204は、暗号化形式クラスファイルの一例であり、「NotP rotected.class」ファイル 203同様、 Java(TM)アプリケーションを定義するクラス構造体 を喑号化された形式で格納している。暗号化されているため、このファイルは、リバ一 スエンジニアリングでの解析が不可能とみなすことができる。  [0025] The “Protected.secure” file 204 is an example of an encrypted format class file. Like the “NotRotated.class” file 203, the class structure that defines the Java (TM) application is encoded. Is stored in. Because it is encrypted, it can be considered that this file cannot be analyzed by reverse engineering.
「MAMFEST.MF」ファイル 205は、 JARファイルの属性、クラスファイルやデータファ ィルのハッシュ値が記載されているファイルである。 JARファイルの属性には、 Java(T M)アプリケーションに付与されるアプリ ID、 JARファイルを実行するために最初に実行 すべきクラスファイル名がある。上記の属性が存在しない場合、 JARファイル中のクラ スファイルのインスタンスである Java(TM)アプリケーションを実行しない。  The “MAMFEST.MF” file 205 is a file in which the attributes of the JAR file, the hash value of the class file and the data file are described. The attributes of the JAR file include the application ID given to the Java (TM) application and the class file name that should be executed first in order to execute the JAR file. If the above attribute does not exist, the Java (TM) application that is an instance of the class file in the JAR file is not executed.
[0026] 上; ^し 7こよつな JARフアイノレ (MANIFEST. MF,NotProtected.class,Protected.secure)、 XXX.KEYファイル、 AVストリームは、ファイル構造、ディレクトリ構造に従って BD-RO Mに記録されているので、アプリケーション実行装置は、ファイルオープンのためのシ ステムコ一ノレをネ亍うことで、 MAMFEST.MF,NotProtected.class,Protected.secureをメ モリに読み出すことができる。  [0026] Above; ^ 7 Kyotsuna JAR Finale (MANIFEST. MF, NotProtected.class, Protected.secure), XXX.KEY file, AV stream is recorded on BD-ROM according to the file structure and directory structure Therefore, the application execution device can read MAMFEST.MF, NotProtected.class, and Protected.secure into the memory by requesting a system console for opening the file.
[0027] ファイルオープンとは、システムコール時に与えられたファイル名によってディレクト リを検索し、ファイルが存在すれば FCB(File Control Block)を確保して、ファイルハン ドルの番号を返す処理をいう。 FCBは、 目的のファイルのディレクトリエントリーの内容 力 Sメモリ上にコピーされることにより生成される。  [0027] File open is a process of searching a directory by a file name given at the time of a system call, securing a FCB (File Control Block) if a file exists, and returning a file handle number. The FCB is generated by copying the contents of the directory entry of the target file onto the S-memory.
以上力 本発明が前提としている記録媒体についての説明である。  This is the description of the recording medium on which the present invention is predicated.
(アプリケーション実行装置)  (Application execution device)
次に、本発明に力、かるアプリケーション実行装置の実施形態について説明する。本 発明に力、かるアプリケーション実行装置は、図 3に示すような内部構成を有しており、 BD-ROM再生装置として使用すること力 Sできる。 [0028] 本発明にかかるアプリケーション実行装置は、 Java(TM)2Micro_Edition(J2ME) Pers onal Basis Profile(PBP 1.0)と、 Globally Executable MHP specification(GEM 1.0.2)for package media targetsとをフル実装することで構成される Java(TM)プラットフォームで ある。 Next, an embodiment of an application execution apparatus that is effective in the present invention will be described. The application execution apparatus which is effective in the present invention has an internal configuration as shown in FIG. 3, and can be used as a BD-ROM playback apparatus. [0028] The application execution apparatus according to the present invention fully implements Java (TM) 2Micro_Edition (J2ME) Pers onal Basis Profile (PBP 1.0) and Globally Executable MHP specification (GEM 1.0.2) for package media targets. Java (TM) platform consisting of
図 3は、本発明に力、かるアプリケーション実行装置のハードウェア構成を示す図で ある。本図に示すように、アプリケーション実行装置は、 BD-ROMドライブ 1、 HDドライ ブ 2、メモリカードドライブ 3、ネットワーク I/F部 4、 CPU5、デクリプタ Chip6、 AV再生ェ ンジン 7、 RAM8、組込みプログラム用 ROM9、 UO検知デバイス 10から構成される。  FIG. 3 is a diagram showing a hardware configuration of the application execution apparatus that is effective in the present invention. As shown in this figure, the application execution device consists of BD-ROM drive 1, HD drive 2, memory card drive 3, network I / F unit 4, CPU5, decryptor Chip6, AV playback engine 7, RAM8, embedded program Consists of ROM9 and UO detection device 10.
(BD-ROMドライブ 1)  (BD-ROM drive 1)
BD-ROMドライブ 1は、図 1に示すような内部構成を有する BD-ROMのローデイング /イジェクトを行い、 BD-ROMに対するアクセスを実行する。  The BD-ROM drive 1 performs loading / ejection of a BD-ROM having an internal configuration as shown in FIG. 1 and accesses the BD-ROM.
[0029]  [0029]
(HDドライブ 2)  (HD drive 2)
HDドライブ 2は、 BD-ROMにて供給されるクラスファイルと、同等のクラスファイルを 格納しておくことができるハードディスクドライブである。  HD drive 2 is a hard disk drive that can store class files supplied with BD-ROM and equivalent class files.
(メモリカードドライブ 3)  (Memory card drive 3)
メモリカードドライブ 3は、 BD-ROMにて供給されるクラスファイルと、同等のクラスフ アイルが書き込まれた半導体メモリカードを、装填することができるドライブ装置である Memory card drive 3 is a drive device that can be loaded with a semiconductor memory card in which a class file supplied with BD-ROM and an equivalent class file are written.
Yes
(ネットワーク I/F部 4)  (Network I / F part 4)
ネットワーク I/F部 4は、ネットワーク接続のためのプロトコルスタックを実行するもの であり、ネットワーク上のコンピュータが具備しているドライブを、ネットワークドライブ 4 aとして、アプリケーション実行装置に認識させる。  The network I / F unit 4 executes a protocol stack for network connection, and causes the application execution apparatus to recognize the drive included in the computer on the network as the network drive 4a.
(CPU5)  (CPU5)
CPU5は、組込みプログラム用 ROM9に格納されたネイティブコードを実行する。 (デクリプタ Chip6)  The CPU 5 executes the native code stored in the embedded program ROM 9. (Decryptor Chip6)
デクリプタ Chip6は、マスター鍵を保持しており、マスター鍵を利用することで暗号化 復号鍵を復号して、復号鍵を得た上で、この復号鍵を用いて暗号化形式のフアイノレ を平文ファイルに復元する。 BD-ROMに記録された復号鍵はマスター鍵で喑号化さ れた状態で BD-ROMに記録されて!/、る。 BD-ROMに記録されて!/、る暗号化形式のフ アイルには、 AVストリームを格納したストリームファイルと、上述したようなクラスフアイ ルとカ Sあり、デクリプタ Chip6は、主として、このストリームファイルを復号化するという 用途のため、アプリケーション実行装置に設けられている。し力、しこれに限らず、同様 の暗号化形式のクラスファイルにつレ、ても、復号化を行うことができる。 The decryptor Chip 6 holds a master key, decrypts the encryption / decryption key by using the master key, obtains the decryption key, and uses this decryption key to decrypt the encrypted form Is restored to a plain text file. The decryption key recorded on the BD-ROM is recorded on the BD-ROM in the state of being encoded with the master key! The encrypted file recorded on the BD-ROM has a stream file storing the AV stream and the class file and the file S as described above, and the decryptor Chip 6 mainly stores the stream file. It is provided in the application execution device for the purpose of decryption. However, the present invention is not limited to this, and decryption can be performed even with class files of the same encryption format.
[0030] 更にデクリプタ Chip6は、暗号化形式のクラスファイルを復号する際、マスター鍵で 暗号化された復号鍵を復号した際、復号により得られた復号鍵をキャッシュして、以 降、同じ暗号化形式のクラスファイルを復号するにあたっては、このキャッシュされた 復号鍵を用いる。こうすることで、一度復号処理を行った暗号化形式のクラスファイル と同じものの復号処理を、再度行う場合、上述したようなマスター鍵を用いた復号処 理については、省略することが可能になる。力、かるキャッシュの利用により、暗号化形 式のクラスファイルの復号に要する時間を大幅に短縮することができる。 [0030] Further, when decrypting the encrypted class file, the decryptor Chip 6 caches the decryption key obtained by decrypting the decryption key encrypted with the master key. This cached decryption key is used to decrypt the encrypted class file. This makes it possible to omit the decryption process using the master key as described above when the same decryption process as the encrypted class file is performed again. . The use of such a cache can significantly reduce the time required to decrypt an encrypted class file.
(AV再生エンジン 7)  (AV playback engine 7)
AV再生エンジン 7は、オーディオ、ビデオの再生力 Sjava(TM)仮想マシンから要求さ れれば、デクリプタ Chip6の復号化によりえられた AVストリームを再生して、オーディ ォゃビデオの出力を fiう。  The AV playback engine 7 plays back the AV stream obtained by decoding the decryptor Chip 6 when requested by the Sjava (TM) virtual machine for audio and video playback, and outputs the audio video.
(RAM8)  (RAM8)
RAM8は、 CPU5がデータ処理を行うにあたって、必要なデータが格納される。 (組込みプログラム用 ROM9)  The RAM 8 stores data necessary for the CPU 5 to perform data processing. (ROM9 for embedded program)
組込みプログラム用 ROM9は、インタプリタ、ネイティブライブラリ、クラスライブラリ等 、アプリケーション実行装置に予め組み込まれて!/、る組込みプログラムが格納される  ROM9 for embedded programs stores embedded programs such as interpreters, native libraries, class libraries, etc. that are preinstalled in application execution devices.
[0031] (UO検知デバイス 10) [0031] (UO detection device 10)
UO検知デバイス 10は、リモコンや再生装置のフロントパネルといった入力機器に 対してなされたユーザ操作を検知して、通知する。この通知は、これらの入力機器に 対応するデバイスドライバ内の割込みハンドラが発生する割込みに従い、 UOPを生 成することでなされる。 UOPとは、リモコンやフロントパネルに設けられたキーマトツリク スでキー押下を検知した際、発生するイベント (UOPイベント)であり、押下されたキー に対応した属性をもつ。具体的には、リモコンやフロントパネルに対応するデバイスド ライバの割込みハンドルが、キーマトリックスに対するキーセンスでキー押下を検出し た際、そのキー押下に基づき割込み信号を発生することで、 UOPイベントは、生成さ れる。 The UO detection device 10 detects and notifies a user operation performed on an input device such as a remote control or a front panel of a playback device. This notification is made by generating a UOP according to the interrupt generated by the interrupt handler in the device driver corresponding to these input devices. UOP is a key matrix provided on the remote control or front panel. This is an event (UOP event) that occurs when a key press is detected in a service, and has an attribute corresponding to the pressed key. Specifically, when the interrupt handle of the device driver corresponding to the remote control or front panel detects a key press by key sense for the key matrix, the UOP event is generated by generating an interrupt signal based on the key press. Is generated.
以上が、アプリケーション実行装置のハードウェア構成である。続いて、以上のハー ドウエア構成を前提にしたソフトウェア構成について説明する。  The above is the hardware configuration of the application execution apparatus. Next, the software configuration based on the above hardware configuration will be described.
[0032] 図 4は、再生制御のレイヤモデルを示した図である。  FIG. 4 shows a layer model for playback control.
(第 1層)  (1st layer)
本図の第 1層は、物理層であり、処理対象たる JARファイルの供給制御の層と、ハー ドウエア制御の層とを含む。図 3に示した再生装置の内部構成は、この物理層に存在 する。 Java(TM)アプリケーションの供給制御は、処理対象たる JARファイルは、 BD-R OMだけではなぐ HD、メモリカード、ネットワーク、組込みプログラム用 ROMといった あらゆる記録媒体、通信媒体を供給源とする。これら HD、メモリカード、ネットワーク、 組込みプログラム用 ROMに対する制御(ディスクアクセス、カードアクセス、ネットヮー ク通信)を、 "供給制御"という。供給源には、複数種別のものがある力 以降の説明 においては JARファイルの供給源として BD-ROMを選んで説明を行う。  The first layer in the figure is a physical layer, and includes a supply control layer for the JAR file to be processed and a hardware control layer. The internal structure of the playback device shown in Fig. 3 exists in this physical layer. For supply control of Java (TM) applications, the target JAR file is not only BD-R OM but also any recording media such as HD, memory card, network, embedded program ROM, and communication media. Control of these HDs, memory cards, networks, and embedded program ROM (disk access, card access, network communication) is called “supply control”. There are several types of supply sources. In the following explanation, BD-ROM is selected as the JAR file supply source.
[0033] (第 2層) [0033] (Second layer)
第 2層は、ミドルウェアのレイァである。第 1層で供給された JARファイルを、どのよう に実行するのかを規定して!/、るのがこの第 2層である。たとえばオペレーティングシス テムや Java(TM)仮想マシン、ネイティブライブラリや実行ファイルなどがミドルウェア層 に存在する。ネイティブライブラリは、ネイティブコードにて構成されていて、第 1層に ある CPUに依存した形式になっており、 CPUにより直接実行される。このネイティブラ イブラリとして、第 2層には、後述するミドルウェアローダが存在する。  The second layer is a middleware layer. It is this second layer that specifies how to execute the JAR file supplied in the first layer! /. For example, operating systems, Java (TM) virtual machines, native libraries, and executable files exist in the middleware layer. The native library consists of native code, is in a format dependent on the first layer CPU, and is executed directly by the CPU. As this native library, the middleware loader described later exists in the second layer.
[0034] 仮想マシンは、クラスファイルを BD-ROMから読み出すユーザクラスローダ、クラス ファイルに対応するインスタンスを Java(TM)アプリケーションとして格納するヒープメモ リ、スレッド、 Java(TM)スタックから構成される。ここでスレッドは、 Java(TM)アプリケー シヨンにおけるメソッドを実行する論理的な実行主体であり、ローカル変数や、オペラ ンドスタックに格納された引数をオペランドにして演算を行い、演算結果を、ローカル 変数又はオペランドスタックに格納する。スレッドによるメソッド実行は、メソッドをなす バイトコードを、 CPUのネイティブコードに変換した上、 CPUに発行することでなされる [0034] The virtual machine includes a user class loader that reads a class file from a BD-ROM, a heap memory that stores an instance corresponding to the class file as a Java (TM) application, a thread, and a Java (TM) stack. Here, a thread is a logical execution subject that executes a method in a Java (TM) application. Operates using arguments stored in the command stack as operands, and stores the result in a local variable or operand stack. Method execution by a thread is performed by converting the byte code that forms the method into the CPU's native code and then issuing it to the CPU.
(第 3層) (3rd layer)
第 3層は、 Java(TM)のレイァである。 Java(TM)仮想マシン上で実行される Java(TM) アプリケーションおよびクラスライブラリ、クラスローダは第 3層に存在する。  Layer 3 is a Java (TM) layer. The Java (TM) application, class library, and class loader executed on the Java (TM) virtual machine exist in the third layer.
[0035] Java(TM)アプリケーションは記述された命令やユーザ入力に基づき処理を行い一 定の出力、例えばオーディオやビデオの出力を行う。 Java(TM)アプリケーションは、 上述したように、 JARファイルに格納された状態で、 BD-ROMにより供給される。 [0035] The Java (TM) application performs processing based on the described command and user input, and outputs a certain output, for example, audio or video. As described above, the Java (TM) application is supplied by the BD-ROM while being stored in the JAR file.
(Java(TM)アプリケーション)  (Java (TM) application)
Java(TM)アプリケーションは、複数のクラスファイルにより構成される。このクラスファ ィルにおいて、 Java(TM)アプリケーションおよびクラスライブラリは Java(TM)の中間コ ードにて規定される。かかる中間コードが、ノイトコードに変換されることにより、クラス オブジェクトが生成される。  A Java ™ application is composed of a plurality of class files. In this class file, Java (TM) applications and class libraries are defined in Java (TM) intermediate code. A class object is generated by converting such intermediate code into Neut code.
[0036] (クラスライブラリ) [0036] (Class library)
クラスライブラリは、 Java(TM)アプリケーションに対してアプリケーションプロダラミン グィンターフェース (API)を提供する。この APIは、 Java(TM)のプロファイルで定義され たものである。クラスライブラリは、組込みプログラム用 ROM9に格納されており、必要 に応じてロードされる。  The class library provides an application product programming interface (API) for Java (TM) applications. This API is defined in the Java (TM) profile. The class library is stored in ROM9 for embedded programs and is loaded as necessary.
このレイヤ構造で特徴的なのは、バイトコードで構成されたクラスローダと同等の機 能をもち、ネイティブコードで構成されているミドルウェアローダ力 第 2層に存在する 点である。  A characteristic of this layer structure is that it has the same function as a class loader composed of bytecode, and exists in the second layer of middleware loader power composed of native code.
[0037] 図 5は、図 4に示した制御レイヤに、クラスローダ 14、ミドルウェアローダ 15に関連す るソフトウェア要素を書き加えた図である。図中の矢印は、平文クラスファイル、暗号 化形式のクラスファイル、暗号化 AVストリーム力 どのような経路を経てヒープメモリ 1 3又は AV再生エンジン 7に供される力、を象徴的に示す。矢印 yl,y2は、暗号化 AVスト リームの供給経路であり、当該暗号化 AVストリームは、デクリプタ Chip6を経由して AV 再生エンジン 7に供され、再生出力に供されることがわかる。 FIG. 5 is a diagram in which software elements related to the class loader 14 and the middleware loader 15 are added to the control layer shown in FIG. The arrows in the figure symbolically indicate the plaintext class file, the encrypted class file, the encrypted AV stream power, and the power provided to the heap memory 13 or AV playback engine 7 via any path. The arrows yl and y2 are the supply path of the encrypted AV stream, and the encrypted AV stream is transmitted to the AV via the decryptor Chip6. It can be seen that it is supplied to the playback engine 7 and used for playback output.
矢印 y3,y4は、平文クラスファイルの供給経路を象徴的に示す。当該平文クラスファ ィルは、クラスローダ 14によりヒープメモリ 13に供給される。矢印 y5,y6,y7は、暗号化 形式のクラスファイルの供給経路を模式的に示す。当該暗号化形式のクラスフアイノレ は、デクリプタ Chip6—ミドルウェアローダ 15を経由してヒープメモリ 13に供給されて レヽる。以降、インタプリタ 12、ヒープメモリ 13、クラスローダ 14、ミドノレウェアローダ 15 について説明する。  Arrows y3 and y4 symbolically indicate the supply path of the plaintext class file. The plain text class file is supplied to the heap memory 13 by the class loader 14. Arrows y5, y6, and y7 schematically show the supply path of the encrypted class file. The encrypted class file is supplied to the heap memory 13 via the decryptor Chip 6—middleware loader 15 and is received. Hereinafter, the interpreter 12, heap memory 13, class loader 14, and middleware loader 15 will be described.
(インタプリタ 12)  (Interpreter 12)
インタプリタ 12は、クラスオブジェクトを構成するバイトコードの解釈実行を行うもの であり、クラスオブジェクトによるクラスファイルの呼出しに応じて、クラスローダ 14、ミド ルウェアローダ 15にロードを命じる。インタプリタ 12は Java(TM)アプリケーションの実 行速度に直接影響を与える重要な部分であり、具体的な実装としては、バイトコード をネイティブコードに変換する JITコンパイラを備えたインタプリタとして実装することが できる。このような JITコンパイラの具備により、解釈実行の高速化を図ることができる。 また、インタプリタの一部についてはハードウェアを用いて実装することができる。  The interpreter 12 interprets and executes the byte code constituting the class object, and instructs the class loader 14 and the middleware loader 15 to load in response to the class file being called by the class object. Interpreter 12 is an important part that directly affects the execution speed of Java (TM) applications, and can be implemented as an interpreter with a JIT compiler that converts bytecode into native code. . By having such a JIT compiler, it is possible to speed up interpretation execution. A part of the interpreter can be implemented using hardware.
(ヒープメモリ 13)  (Heap memory 13)
ヒープメモリ 13は、クラスローダ 14、ミドノレウェアローダ 15により、クラスオブジェクト が格納されるメモリである。ヒープメモリ 13にお!/、てクラスオブジェクトは Java(TM)仮想 マシンに依存した構造体の形式で格納されるので、ヒープメモリ 13上の情報が傍受 されてもクラスオブジェクトをクラスファイルに復元することが難しい。  The heap memory 13 is a memory in which class objects are stored by the class loader 14 and the middleware loader 15. Since the class object is stored in the heap memory 13 in the form of a structure that depends on the Java (TM) virtual machine, the class object is restored to the class file even if the information on the heap memory 13 is intercepted. It is difficult.
(クラスローダ 14)  (Class loader 14)
クラスローダ 14は、システムアプリケーションであり、オブジェクト指向プログラミング 言語の文法に従ったクラス構造体にて定義されている。ヒープメモリ 13からクラスファ ィルの呼び出しが命じられれば、平文クラスファイルを対応するクラスオブジェクトに 変換し、ヒープメモリ 13上にロードする。  The class loader 14 is a system application and is defined by a class structure according to the grammar of the object-oriented programming language. When calling a class file from the heap memory 13, the plaintext class file is converted into a corresponding class object and loaded onto the heap memory 13.
(ミドルウェアローダ 15)  (Middleware loader 15)
ミドルウェアローダ 15は、インタプリタ 12同様、ネイティブコードで構成されたミドル ウェアプログラムであり、暗号化形式のクラスファイルがデクリプタ Chip6により復号さ れれば、ヒープメモリ 13上にクラスオブジェクトを生成する。ロードの対象たる暗号化 形式のクラスファイルには、 Java(TM)アプリケーションを構成するものと、クラスライブラ リイを構成するものとがある。ヒープメモリ 13内の情報の傍受を困難にし、復号した平 文のクラスファイルをヒープメモリへ配置する期間をなるベく短くする必要があるので、 ミドルウェアローダ 15は、復号した平文のクラスファイルの利用が完了した後、速やか にヒープメモリ 13のキャッシュから平文クラスファイルを削除する処理を行う。この削除 は、ヒープメモリ上の平文クラスファイルを、たとえば、ヌルコード (値 0)で上書きするこ とでなされる。 Like the interpreter 12, the middleware loader 15 is a middleware program composed of native code, and the encrypted class file is decrypted by the decryptor Chip6. If so, a class object is generated on the heap memory 13. There are two types of encrypted class files that can be loaded: those that make up a Java (TM) application and those that make up a class library. The middleware loader 15 uses the decrypted plaintext class file because it is difficult to intercept information in the heap memory 13 and it is necessary to shorten the period during which the decrypted plaintext class file is allocated to the heap memory. After the above is completed, the plain text class file is deleted from the cache of the heap memory 13 immediately. This deletion is done by overwriting the plain text class file in the heap memory with, for example, a null code (value 0).
[0039] ミドルウェアローダ 15は、ネイティブコードにて構成され、アプリケーション実行装置 内の CPUにより、直接実行に供されるので、仮想マシン上で動作するアプリケーショ ンゃクラスライブラリイには該当しない。ネイティブコードで記述されるので、インタプリ タと同様、仮想マシンの構成要素に該当することになる。つまりミドルウェアローダ 15 は、仮想マシン上に存在するのではなぐ仮想マシン内部に、構成要素として組込ま れることがわかる。 BD-ROM再生装置の一般的な実装において、仮想マシンのプラッ トフオーム部には、強固な耐タンパ技術が適用されるので、本実施形態におけるミド ルウェアローダ 15は、この強固な耐タンパ技術の傘下に入ることになる。クラスフアイ ノレ読み込みのためのローダを、耐タンパ技術の傘下に入れることにより、暗号化形式 クラスファイルの保護は、 AVストリームの保護と同様、強固なものになる。  [0039] The middleware loader 15 is configured by native code, and is directly executed by the CPU in the application execution device. Therefore, the application operating on the virtual machine does not correspond to the class library. Since it is written in native code, it corresponds to a component of a virtual machine, just like an interpreter. That is, it can be seen that the middleware loader 15 is incorporated as a component inside the virtual machine that does not exist on the virtual machine. In a general implementation of a BD-ROM playback device, a strong tamper-resistant technology is applied to the platform portion of the virtual machine. Therefore, the middleware loader 15 in this embodiment is part of this strong tamper-resistant technology. Will enter. By placing a loader for reading class files into a tamper-resistant technology, the protection of encryption format class files is as strong as the protection of AV streams.
[0040] 本実施形態のクラスローダ 14が特徴的なのは、クラスローダ 14の機能を継承した 新しいメソッド、つまり、ローデイング判定メソッドを具備している点である。図 6は、クラ スローダ 14と、ローデイング判定メソッド 16との関係を、より詳細に示す図である。 つまり本実施形態に係るクラスローダ 14は、従来のクラスローダと同一の機能を有 しつつも、このクラスローダ 14の機能を継承したメソッドとして、ローデイング判定メソッ ド 16が新規に追加されて!/、る点が新し!/、。  [0040] The class loader 14 of this embodiment is characterized in that a new method inheriting the function of the class loader 14, that is, a loading determination method is provided. FIG. 6 is a diagram showing the relationship between the class loader 14 and the loading determination method 16 in more detail. In other words, the class loader 14 according to the present embodiment has the same function as the conventional class loader, but the loading determination method 16 is newly added as a method inheriting the function of the class loader 14! / The point is new!
[0041] 以降、このローデイング判定メソッド 16について説明する。  Hereinafter, the loading determination method 16 will be described.
(ローデイング判定メソッド 16)  (Loading judgment method 16)
ローデイング判定メソッド 16は、クラスローダ 14の母体となる ClassLoaderクラスの継 承クラスであり、クラスファイルの呼び出しがあった場合、実行対象となるクラスォブジ ェクトを、自身の内部のキャッシュ 17からロードする力、、ミドルウェアローダ 15により口 ードさせるべき力、、クラスローダ 14によりロードさせるべき力、を判定する。 The loading determination method 16 is a successor class of the ClassLoader class that is the base of the class loader 14, and when a class file is called, the class object to be executed is loaded. The power to load the project from its own internal cache 17, the force to be loaded by the middleware loader 15, and the force to be loaded by the class loader 14 are determined.
[0042] 具体的にいうと、ローデイング判定メソッド 16の内部には、仮想マシンに行わせる処 理を規定したプログラム領域と、変数領域とがあり、この変数領域は、プログラム領域 で使用されるような様々なローカル変数の格納領域を、 RAM8上に確保するものであ る。その変数領域の内部には、所定数のクラスオブジェクトを格納できるようなキヤッ シュ 17の領域が宣言されており、力、かるキャッシュは、ローデイング判定メソッド 16の 実行時において、 RAM8上に確保される。ローデイング判定メソッド 16は、その内部 にキャッシュ 17を有しているので、過去にロードがなされたクラスオブジェクトのうち、 最新となる所定数のものを、このキャッシュ 17に格納しておくことができる。クラスファ ィルの呼び出しがあった際、呼出しの対象となるクラスオブジェクトが、このキャッシュ に存在するかどうかの検索を行い、呼出しの対象となるクラスオブジェクトが、このキヤ ッシュ 17の中に存在すれば、矢印 clに示すように、このクラスオブジェクトをキヤッシ ュ 17からヒープメモリ 13に転送することにより、ロードを省略する。こうすることで、一 度ロードを行ったクラスファイルと同じもののロードを、高速に行うことができる。これに より、 BD-ROMのアクセス等を省略することができるので、 LoadClassメソッドの呼び出 しがあってから、対象となるクラスオブジェクトがヒープメモリ 13に得られるまでの時間 を大幅に短縮することができる。  [0042] Specifically, the loading determination method 16 includes a program area that defines the processing to be performed by the virtual machine, and a variable area. This variable area is used in the program area. Various local variable storage areas are secured on the RAM 8. Within the variable area, a cache area of 17 that can store a predetermined number of class objects is declared, and the cache is allocated on the RAM 8 when the loading judgment method 16 is executed. . Since the loading determination method 16 has a cache 17 therein, the latest predetermined number of class objects loaded in the past can be stored in the cache 17. When a class file is called, a search is performed to determine whether the class object to be called exists in this cache. If the class object to be called exists in this cache 17, For example, loading is omitted by transferring this class object from the cache 17 to the heap memory 13 as indicated by an arrow cl. By doing this, the same class file that has been loaded once can be loaded at high speed. As a result, access to the BD-ROM, etc. can be omitted, so the time from when the LoadClass method is called until the target class object is obtained in the heap memory 13 can be greatly reduced. Can do.
[0043] ここでクラスファイルの呼び出しは、例えば ClassLoaderクラスが持つメソッド loadClas s (クラス名)において、括弧内のクラス名を引数にして呼び出すことでなされる。  Here, the class file is called by, for example, calling a method loadClass (class name) of the ClassLoader class with the class name in parentheses as an argument.
対象となるクラスファイルがキャッシュ 17に存在しない場合、対象となるクラスフアイ ルが、暗号化形式であるか、平文形式であるかの判定を行う。対象となるクラスフアイ ルが暗号化形式であり、これに付された拡張子が「.secure」である場合、 APIである de fmeEncryptedClass (クラス名、暗号化クラスファイル)の呼び出しインタプリタ 12に行 わせ、暗号化クラスファイルのロードをミドルウェア層のミドルウェアローダ 15に依頼 する。対象となるクラスファイルが平文形式であり、拡張子が「.class」である場合、 API である defineClass (クラス名、平文クラスファイル)の呼び出しをインタプリタ 12に行わ せ、平文クラスファイルのロードをクラスローダ 14に依頼する。 [0044] 図中の矢印 gOは、メソッド LoadClassの呼出しを象徴的に示す。図中の矢印 gl,g2,g 3は、クラスローダ 14に対する指示の流れを象徴的に示す。クラスローダ 14への指示 は、インタプリタ 12—ローデイング判定メソッド 16—インタプリタ 12を経由した、 define Classの呼び出しにてなされることがわかる。この defineClassの呼び出しにより、矢印 y 4に示すように、クラスローダ 14は、ヒープメモリ 13中にクラスオブジェクトを生成する こと力 sゎカゝる。 If the target class file does not exist in the cache 17, it is determined whether the target class file is in encrypted format or plain text format. If the target class file is in the encrypted format and the extension attached to it is “.secure”, it is sent to the call interpreter 12 of the API de fmeEncryptedClass (class name, encrypted class file), Request the middleware loader 15 of the middleware layer to load the encryption class file. If the target class file is in plain text format and the extension is ".class", the interpreter 12 is called to call the API defineClass (class name, plain text class file), and the plain text class file is loaded. Ask loader 14. [0044] An arrow gO in the figure symbolically shows a call to the method LoadClass. Arrows gl, g2, and g3 in the figure symbolically indicate the flow of instructions to the class loader 14. It can be seen that the instruction to the class loader 14 is made by calling define Class via the interpreter 12—loading determination method 16—interpreter 12. Calling this defineClass, as indicated by an arrow y 4, the class loader 14, this generating a class object in the heap memory 13 and the force s Wakakaru.
[0045] 図中の矢印 gl,g2,g4は、ミドルウェアローダ 15に対する指示の流れを象徴的に示 す。ミドルウェアローダ 15への指示は、インタプリタ 12—ローデイング判定メソッド 16 —インタプリタ 12を経由した、 defmeEncryptedClassの呼び出しにてなされることがわ かる。この defmeEncryptedClassの呼び出しにより、矢印 y7に示すように、ミドルウェア ローダ 15は、ヒープメモリ 13中にクラスオブジェクトを生成することがわ力、る。  [0045] Arrows gl, g2, and g4 in the figure symbolically indicate the flow of instructions to the middleware loader 15. It can be seen that the middleware loader 15 is instructed by calling defmeEncryptedClass via the interpreter 12—loading determination method 16—interpreter 12. By calling this defmeEncryptedClass, the middleware loader 15 can generate a class object in the heap memory 13 as indicated by an arrow y7.
[0046] クラスローダ 14、ミドルウェアローダ 15の何れに指示を放つ場合でも、実行中のァ プリケーシヨンを構成するクラスオブジェクトは、インタプリタ 12に対し、矢印 gOに示す ようなメソッド LoadClassの呼び出しを行っており、ロードをクラスローダ 14、ミドルゥェ ァローダ 15の何れに行わせるかの判断は、クラスローダ 14中のローデイング判定メソ ッド 16にてなされていることがわかる。そしてこの判断結果に基づき、インタプリタ 12 は、 defineEncryptedClass, defineClassの呼び出しを行っていることがわかる。  [0046] Regardless of whether the class loader 14 or the middleware loader 15 is instructed, the class object that constitutes the currently executing application calls the method LoadClass as indicated by the arrow gO to the interpreter 12. Thus, it can be seen that whether the class loader 14 or middle loader 15 is loaded is determined by the loading judgment method 16 in the class loader 14. Based on this determination result, it can be seen that interpreter 12 is calling defineEncryptedClass and defineClass.
[0047] クラスローダ 14の継承メソッドとして力、かるローデイング判定メソッド 16が存在してお り、クラスローダ 14、ミドルウェアローダ 15の何れにクラスオブジェクトの生成を行わせ るかは、このローデイング判定メソッド 16に委ねられているので、仮想マシンにて実行 される Java(TM)アプリケーションは、ロードすべきクラスファイルが暗号化形式である 力、、比較であるかを特に意識することなぐロードを行えばよい。  [0047] There is a loading determination method 16 that is a powerful inheritance method of the class loader 14, and this loading determination method 16 determines which of the class loader 14 and the middleware loader 15 generates a class object. Therefore, Java (TM) applications executed in a virtual machine need only be loaded without paying particular attention to whether the class file to be loaded is in encrypted form or compared. .
[0048] 以上でローデイング判定メソッド 16についての説明を終える。  [0048] This completes the description of the loading determination method 16.
(口一デイング判定メソッド 16の処理手順)  (Procedure of Talking Determination Method 16)
以降、ローデイング判定メソッド 16のソフトウェア的な実装について説明する。ロー デイング判定メソッド 16の実装は、図 7のフローチャートのアルゴリズムをオブジェクト 指向プログラミング言語である Java(TM)言語で記述して、コンパイルを行い、クラスフ アイルを生成すればよい。 [0049] 図 7は、ローデイング判定メソッド 16の処理手順を示すフローチャートである。本フロ 一チャートが実行されれば、ステップ S l、ステップ S2、ステップ S3の判定ステップに 移行する。ステップ S 1は、引数に対応するクラス名のクラスオブジェクトが、キャッシュ に存在するかどうかの判定であり、ステップ S2は、引数に対応するファイル名を有し ていて、「.secure」の拡張子が付されたクラスファイルが JARファイルに存在するかどう かの判定であり、ステップ S3は、引数に対応するファイル名を有していて、「.class」の 拡張子が付されたクラスファイルが JARファイルに存在するかどうかの判定である。 Hereinafter, the software implementation of the loading determination method 16 will be described. The loading decision method 16 can be implemented by describing the algorithm of the flowchart in Fig. 7 in the Java (TM) language, which is an object-oriented programming language, compiling, and generating a class file. FIG. 7 is a flowchart showing a processing procedure of the loading determination method 16. When this flow chart is executed, the process proceeds to the determination steps of Step S1, Step S2, and Step S3. Step S1 is a determination of whether or not a class object with the class name corresponding to the argument exists in the cache. Step S2 has a file name corresponding to the argument and has an extension of “.secure”. This is a determination of whether or not a class file with is present in the JAR file.Step S3 has a file name corresponding to the argument and a class file with an extension of “.class” Judgment whether or not it exists in the JAR file.
[0050] ステップ S 1で判定を行うのは、ローデイング判定メソッド 16が自身力 キャッシュを 持っていて、ロードしたクラスオブジェクトが、当該キャッシュに格納されている可能性 があり、同じクラスオブジェクトを 2回以上ヒープメモリ 13へロードしないようにしている 力 である。  [0050] The determination in step S 1 is that the loading determination method 16 has its own power cache, and the loaded class object may be stored in the cache. This is the force that prevents heap memory 13 from being loaded.
JARファイルに存在するかどうかの判定は、クラスの名前に、 .class又は .secureの拡 張子を付与することにより、ロードすべきクラスファイルのファイル名を決定して、 JAR ファイルの中に、当該ファイル名のファイルが存在するかどうかをサーチすることでな される。  To determine whether it exists in the JAR file, add the extension of .class or .secure to the name of the class, determine the file name of the class file to be loaded, This is done by searching for a file with the file name.
[0051] 例えば、クラスの名前が「Abracadabra」の場合、暗号化されているクラスファイルの ファイル名は「 Abracadabra. secure」になり、暗号化されていないクラスファイルのファ Ίノレ名 (ュ「 Abracadabra, class」 ίこな d。  [0051] For example, if the class name is “Abracadabra”, the file name of the encrypted class file will be “Abracadabra. Secure”, and the class name of the unencrypted class file (“Abracadabra” , class "ί こ d.
ステップ S Iが Yesであれば、ステップ S4において、キャッシュ中のクラスオブジェクト をヒープメモリに送る。ステップ S2が Yesであれば、ステップ S5において defmeEncrypt edClass (クラス名,暗号化クラスファイル)の APIを呼び出す。ステップ S3力 Wesであれ ば、ステップ S6において defmeClass (クラス名,暗号化クラスファイル)の APIを呼び出 す。これらステップ S5、ステップ S6の何れかで、 API呼び出しをおこなった後、ステツ プ S7で、クラスオブジェクトがヒープメモリに得られるのを待ち、クラスオブジェクトが得 られれば、ステップ S8においてクラスオブジェクトをキャッシュに格納した上で、ステツ プ S9においてヒープメモリにおけるクラスオブジェクトのアドレスを、インタプリタ 12に 返す。  If step S I is Yes, the class object in the cache is sent to the heap memory in step S4. If step S2 is Yes, the API of defmeEncryptedClass (class name, encrypted class file) is called in step S5. If step S3 power Wes, API of defmeClass (class name, encryption class file) is called in step S6. After making an API call in either step S5 or step S6, wait for the class object to be obtained in the heap memory in step S7, and if the class object is obtained, the class object is cached in step S8. After storing, the address of the class object in the heap memory is returned to the interpreter 12 in step S9.
[0052] ステップ S2及び S3における判定は、先ず暗号化形式のクラスファイルをサーチし てから、平文クラスファイルをサーチするというものなので、これら暗号化形式のクラス ファイル、平文クラスファイルの両者が JARファイルに存在する場合、ローデイング判 定メソッド 16は優先的に暗号化されているクラスファイルを選択する。このような優先 選択により、例えば、試供版の平文クラスファイルと、製品版の暗号化形式のクラスフ アイルとカ SJARファイル内に存在している場合、自動的に、暗号化形式のクラスフアイ ルに基づきクラスオブジェクトが生成されることになる。このように、同じクラス名のクラ スファイルの呼び出しが命じられた場合でも、暗号化形式のクラスファイルを優先して ロードすることができる。以上が、ローデイング判定メソッド 16の処理手順である。 [0052] The determination in steps S2 and S3 is performed by first searching for an encrypted class file. The plaintext class file is searched first, so if both the encrypted class file and the plaintext class file exist in the JAR file, the loading judgment method 16 is preferentially encrypted class file. Select. By such priority selection, for example, if it exists in the plaintext class file of the trial version, the class file of the encrypted version of the product version, and the SJAR file, it is automatically based on the class file of the encrypted form. A class object will be created. In this way, even when a call to a class file with the same class name is issued, an encrypted class file can be preferentially loaded. The processing procedure of the loading determination method 16 has been described above.
[0053]  [0053]
(ミドルウェアローダ 15の処理手順)  (Processing procedure of middleware loader 15)
次に、図 8のフローチャートを参照しながら、ミドルウェアローダ 15の処理手順につ いて説明する。  Next, the processing procedure of the middleware loader 15 will be described with reference to the flowchart of FIG.
図 8は、ミドルウェアローダ 15の手順を示すフローチャートである。ステップ S 11に おいて引数で指定されたファイルのオープンを BD-ROMドライブに命じるコマンドを 発行する。これにより RAM8におけるファイル読出用領域には、暗号化形式のクラス ファイルが読み出されるので、ステップ S12において、かかる暗号化形式ファイルの 復号化を、デクリプタ Chip6に命じる。この復号化の指示にあたって、平文クラスフアイ ルを格納すべきメモリ領域のアドレスをデクリプタ Chip6に引き渡す。この復号化によ り、平文のクラスファイルが RAM8に得られることになるので、ステップ S13では、平文 のクラスファイル力 メモリに得られるのを待つ。  FIG. 8 is a flowchart showing the procedure of the middleware loader 15. In step S11, issue a command to instruct the BD-ROM drive to open the file specified by the argument. As a result, the encrypted class file is read into the file reading area in the RAM 8, and in step S12, the decryptor Chip 6 is instructed to decrypt the encrypted file. In this decryption instruction, the address of the memory area where the plain text class file is to be stored is delivered to the decryptor Chip6. As a result of this decryption, a plaintext class file is obtained in the RAM 8. In step S13, the plaintext class file is awaited to be obtained in the memory.
[0054] デクリプタ Chip6によるク復号化が終了すれば、ステップ S 15において平文クラスフ アイルのべリファイを行い、クラスファイルが改竄されて!/、な!/、かなどをチェックする。 その後、ステップ S 16〜ステップ S20のループ処理に移行する。本ループ処理に おいて、中間コード iは、処理対象となる中間コードを示す。ステップ S16では、平文ク ラスファイルが格納されたファイル読出用領域の先頭に存在する中間コードを、この 中間コード iに設定して、ステップ S17〜ステップ S20からなるループ処理に移行する 。このループ処理は、中間コード iをバイトコード iに変換して (ステップ S17)、バイトコ ード iをヒープメモリに格納するという処理 (ステップ S 18)を、ステップ S 19力 SYesと判定 されるまで繰り返すものである。ステップ S 19は、中間コード iが平文クラスファイルの 最後の中間コードであるかどうかの判定であり、もし、最後の中間コードでなければ、 ステップ S20において、平文クラスファイルにおける次の中間コードを、中間コード iと して、ステップ S 17〜ステップ S20の処理の繰り返しを継続する。中間コード iが平文 クラスファイルの最後の中間コードであるなら、本フローチャートの処理を終了する。 クラスオブジェクトは Java(TM)仮想マシンに依存したバイトコードの構造体という形で ヒープメモリ 13に格納されるので、ヒープメモリ 13上の情報が傍受されてもクラスォブ ジェタトをクラスファイルに復元することが困難である。 [0054] When the decryption by the decryptor Chip6 is completed, the plaintext class file is verified in step S15, and it is checked whether the class file has been tampered with! /, NA! /, Etc. Thereafter, the process proceeds to a loop process from step S16 to step S20. In this loop process, the intermediate code i indicates the intermediate code to be processed. In step S16, the intermediate code existing at the head of the file reading area in which the plain text class file is stored is set as the intermediate code i, and the process proceeds to a loop process including steps S17 to S20. In this loop processing, the intermediate code i is converted to byte code i (step S17), and byte code i is stored in the heap memory (step S 18). Repeat until it is done. Step S 19 is a determination of whether the intermediate code i is the last intermediate code of the plaintext class file. If it is not the last intermediate code, the next intermediate code in the plaintext class file is As the intermediate code i, the process from step S17 to step S20 is repeated. If the intermediate code i is the last intermediate code in the plaintext class file, the process of this flowchart is terminated. Since class objects are stored in the heap memory 13 in the form of bytecode structures that depend on the Java (TM) virtual machine, the class object can be restored to a class file even if information on the heap memory 13 is intercepted. Have difficulty.
[0055]  [0055]
(ミドルウェアローダ 15の作成)  (Create middleware loader 15)
ミドルウェアローダ 15の作成手順について説明する。ソフトウェア開発者は、プログ ラミング言語を用いて、上述したように、図 8のフローチャートを実現するようなソース プログラムを記述する。この記述にあたって、ソフトウェア開発者は、プログラミング言 語の構文に従い、クラス構造体や変数、配列変数、外部関数のコールを用いて、各 フローチャートや、機能的な構成要素を具現するソースプログラムを記述する。  A procedure for creating the middleware loader 15 will be described. As described above, the software developer uses a programming language to write a source program that realizes the flowchart of FIG. In this description, the software developer describes the source program that implements each flowchart and functional components using class structure, variables, array variables, and external function calls according to the syntax of the programming language. .
[0056] 記述されたソースプログラムは、ファイルとしてコンパイラに与えられる。コンパイラは 、これらのソースプログラムを翻訳してオブジェクトプログラムを生成する。 [0056] The described source program is given to the compiler as a file. The compiler translates these source programs to generate an object program.
コンパイラによる翻訳は、構文解析、最適化、資源割付、コード生成といった過程か らなる。構文解析では、ソースプログラムの字句解析、構文解析および意味解析を行 い、ソースプログラムを中間プログラムに変換する。最適化では、中間プログラムに対 して、基本ブロック化、制御フロー解析、データフロー解析という作業を行う。資源割 付では、ターゲットとなるプロセッサの命令セットへの適合を図るため、中間プログラム 中の変数をターゲットとなるプロセッサのプロセッサが有しているレジスタまたはメモリ に割り付ける。コード生成では、中間プログラム内の各中間命令を、プログラムコード に変換し、オブジェクトプログラムを得る。  Translation by the compiler consists of processes such as syntax analysis, optimization, resource allocation, and code generation. In syntax analysis, lexical analysis, syntax analysis, and semantic analysis of the source program are performed, and the source program is converted into an intermediate program. For optimization, the intermediate program is divided into basic blocks, control flow analysis, and data flow analysis. In resource allocation, variables in the intermediate program are allocated to registers or memory of the processor of the target processor in order to adapt to the instruction set of the target processor. In code generation, each intermediate instruction in the intermediate program is converted into program code to obtain an object program.
[0057] このコンパイラによる翻訳の過程のうち、資源割付の工程において、アプリケーショ ン実行装置における CPUが具備している、レジスタ、メモリなどのハードウェア資源に 、ソースプログラムにおける変数を割り付ける。 そしてコード生成の工程において、 CPUが直接、解読すること力 sできるネイティブコ ードを生成する。以上のような、 CPUを想定したコンパイルを行うことにより、ミドルゥェ ァローダ 15を構成することができる。 Of the translation process by the compiler, in the resource allocation process, variables in the source program are allocated to hardware resources such as registers and memories provided in the CPU of the application execution apparatus. In the code generation process, the CPU generates native code that can be deciphered directly. The middleware loader 15 can be configured by compiling the CPU as described above.
[0058] オブジェクトプログラムが生成されるとプログラマはこれらに対してリンカを起動する 。リンカはこれらのオブジェクトプログラムや、関連するライブラリプログラムをメモリ空 間に割り当て、これらを 1つに結合する。以上の処理を経て、ミドルウェアローダ 15を 作成すること力 Sでさる。 [0058] When object programs are generated, the programmer activates the linker for these. The linker allocates these object programs and related library programs in memory space and combines them into one. Through the above processing, the middleware loader 15 can be created with the power S.
以上のように本実施形態によれば、ローダプログラムをネイティブコードで構成して いるので、ロードクラス APIの呼び出しが命じられた場合、ミドルウェア層で、デクリプタ からローダへの平文クラスファイルの引き渡しを行った上、ヒープメモリ内にクラスォブ ジェタトを生成することになる。力、かるクラスオブジェクトはバイトコードからなり、仮想 マシンの内部形式に依存したものなので、そのプログラム構造の解析は困難なものと なる。  As described above, according to the present embodiment, since the loader program is configured by native code, when a call to the load class API is instructed, the middleware layer delivers the plain text class file from the decryptor to the loader. In addition, a class object will be generated in the heap memory. Since the class object consists of bytecodes and depends on the internal format of the virtual machine, it is difficult to analyze the program structure.
[0059] 本発明では、 BD-ROM再生装置のレイヤ構造において、平文クラスファイルの機密 性が保てるような場所を、平文クラスファイルの引き渡しに選んでいるので、平文クラ スファイルの機密性を高度に保つことができる。  [0059] In the present invention, in the layer structure of the BD-ROM playback device, a place where the confidentiality of the plaintext class file is maintained is selected for delivery of the plaintext class file, so that the confidentiality of the plaintext class file is enhanced. Can be kept in.
(第 2実施形態)  (Second embodiment)
第 1実施形態では、ネイティブコードで構成されたミドルウェアローダ 15を第 2層に 設けたが、本実施形態は、ハードウェア素子で構成されたローダ (ハードウェアローダ )を、アプリケーション実行装置内に設けるという改良を開示する。図 9は、第 2実施形 態に係るアプリケーション実行装置のハードウェア構成を示す図である。本図は、図 3 のハードウェア構成をベースとして作図されており、このベースとなるハードウェア構 成と比較して、デクリプタ Chip6、 RAM8間にハードウェアローダ 22が新規に追加され ている点力 図 3のハードウェア構成と異なる。  In the first embodiment, the middleware loader 15 configured by native code is provided in the second layer, but in this embodiment, a loader (hardware loader) configured by hardware elements is provided in the application execution device. An improvement is disclosed. FIG. 9 is a diagram illustrating a hardware configuration of the application execution device according to the second embodiment. This figure is based on the hardware configuration shown in Fig. 3. Compared to this base hardware configuration, the hardware loader 22 is newly added between the decryptor Chip6 and RAM8. Different from the hardware configuration in Figure 3.
[0060] 図 10は、第 2実施形態に係るハードウェアローダ 22の位置付けを示す図である。 FIG. 10 is a diagram showing the positioning of the hardware loader 22 according to the second embodiment.
本図は、図 5の制御レイヤをベースとして作図されており、このベースとなる制御レイ ャと比較して、ミドルウェアローダ 15が第 2層に存在せず、代わりに、ハードウェア口 ーダ 22が第 1層に存在する点が、本実施形態特有の改良になっている。図中の矢 印 hi, h2は、本実施形態における暗号化形式のクラスファイルの供給経路を模式的 に示す。当該暗号化形式のクラスファイルは、デクリプタ Chip6—ハードウェアローダ 22を経由してヒープメモリ 13に供給されていることがわかる。 This figure is drawn based on the control layer of FIG. 5. Compared to this control layer, the middleware loader 15 does not exist in the second layer. Instead, the hardware loader 22 is used. Is present in the first layer, which is an improvement specific to this embodiment. Arrows in the figure The marks hi and h2 schematically show the supply path of the encrypted class file in this embodiment. It can be seen that the class file in the encrypted format is supplied to the heap memory 13 via the decryptor Chip6—hardware loader 22.
[0061] ハードウェアローダ 22が第 1層に存在するので、平文クラスファイルの引き渡しは、 第 1層でなされることになる。これにより、クラスファイルの引き渡しインターフェイスを 知得している程度のリバース技術では、平文クラスファイルの内容が詐取されることは ない。 [0061] Since the hardware loader 22 exists in the first layer, the delivery of the plaintext class file is performed in the first layer. As a result, the contents of the plain text class file will not be scammed by reverse technology that only knows the class file delivery interface.
次に、ハードウェアローダ 22の内部構成について説明する。  Next, the internal configuration of the hardware loader 22 will be described.
[0062] ハードウェアローダ 22は、 ROM,デコーダ、 DMAコントローラというハードウェア素 子から構成されるハードウェアモジュールである。 ROMは、複数のバイトコードを、ァ ドレスと対応付けて格納している。デコーダは、 ROMにおける個々のアドレスと、複数 の中間コードとの対応付けを示すワイヤロジックが組込まれており、平文クラスフアイ ルを構成する各中間コードをデコードして、アドレスに変換し、 ROMに出力する。こう することで、中間コードに対応するバイトコードが ROMから読み出されることになる。  [0062] The hardware loader 22 is a hardware module including hardware elements such as a ROM, a decoder, and a DMA controller. The ROM stores a plurality of byte codes in association with addresses. The decoder incorporates wire logic indicating the correspondence between individual addresses in the ROM and multiple intermediate codes, decodes each intermediate code making up the plaintext class file, converts it into an address, and outputs it to the ROM To do. By doing this, the byte code corresponding to the intermediate code is read from the ROM.
[0063] DMAコントローラは、 ROMから読み出されたバイトコードに対して、 DMA転送を fiう とにより、それぞれのバイトコードをヒープメモリ 13に格納する。  The DMA controller stores each byte code in the heap memory 13 by performing DMA transfer for the byte code read from the ROM.
以上のような、デコーダによるデコード、 ROMからの読み出し、 DMAコントローラによ る DMA転送にて、平文クラスファイルを構成する個々の中間コードはバイトコードに 変換され、ヒープメモリ 13に送り込まれることになる。  Through the decoding by the decoder, reading from the ROM, and DMA transfer by the DMA controller, the individual intermediate codes that make up the plaintext class file are converted to byte codes and sent to the heap memory 13. .
[0064] 以上のように本実施形態によれば、ハードウェア素子を用いてローダを構成してい るので、ロードクラス APIの呼び出しが命じられた場合、ハードウェア層で、デクリプタ からローダへの平文クラスファイルの引き渡しを行った上、ヒープメモリ内にクラスォブ ジェタトを生成することになる。  As described above, according to the present embodiment, since the loader is configured using hardware elements, when a call to the load class API is instructed, a plaintext from the decryptor to the loader is generated in the hardware layer. After passing the class file, the class object is generated in the heap memory.
本発明では、 BD-ROM再生装置のレイヤ構造において、平文クラスファイルの機密 性が保てるような場所を、平文クラスファイルの引き渡しに選んでいるので、平文クラ スファイルの機密性を高度に保つことができる。  In the present invention, in the layer structure of the BD-ROM playback device, a place where the confidentiality of the plaintext class file is maintained is selected for delivery of the plaintext class file, so that the confidentiality of the plaintext class file is kept high. Can do.
[0065] (第 3実施形態)  [0065] (Third embodiment)
第 1実施形態では、ローデイング判定メソッド 16をクラスローダ 14内に設けた力 本 実施形態は、ローディング判定を行うようなルーチン (口一ディング判定ルーチン 18) をミドルウェアローダ 15内に設けるという改良に関する。 In the first embodiment, the loading judgment method 16 is provided in the class loader 14. The embodiment relates to an improvement in which a middleware loader 15 has a routine (loading determination routine 18) for determining loading.
図 11は、第 3実施形態に係るローデイング判定ルーチン 18の位置付けを示す図で ある。本図は、図 6をベースとして作図されており、このベースとなる構成と比較して、 ヒープメモリ 13内にクラスローダ 14が存在せず、その代わりに、ミドルウェアローダ 15 の内部にローデイング判定ルーチン 18が存在する。つまりクラスローダ 14内における ローデイング判定メソッド 16力 ローデイング判定ルーチン 18に置き換えられている 点が、本実施形態特有の改良になっている。  FIG. 11 is a diagram showing the positioning of the loading determination routine 18 according to the third embodiment. This figure is based on FIG. 6. Compared to this base configuration, the class loader 14 does not exist in the heap memory 13, and instead, the loading judgment routine is inside the middleware loader 15. 18 exists. In other words, the loading judgment method 16 force in the class loader 14 is replaced with the loading judgment routine 18, which is an improvement specific to this embodiment.
[0066] ローデイング判定ルーチン 18は、ネイティブコードで記述された、ミドルウェアローダ  [0066] The loading judgment routine 18 is a middleware loader written in native code.
15のサブルーチンであり、ロードクラスの呼び出しがあった場合、その呼び出しの引 数に対応するクラスファイルが、平文形式のクラスファイルである力、、暗号化形式のク ラスファイルであるかの判定を行う。平文クラスファイルであるなら、ミドルウェアローダ 15力 平文クラスファイルのロードを行う。暗号化形式のクラスファイルであるなら、ミ ドルウェアローダ 15は、デクリプタ Chip6に暗号化形式クラスファイルの復号化を行わ せた上で、復号により得られた平文クラスファイルをデクリプタ Chip6から受け取り、か 力、る平文クラスファイルのロードをミドルウェアローダ 15が行う。  If there is a call to the load class in 15 subroutines, it is determined whether the class file corresponding to the call argument is a plain text class file or an encrypted class file. Do. If it is a plaintext class file, middleware loader 15 loads the plaintext class file. If the class file is in the encrypted format, the middleware loader 15 causes the decryptor Chip6 to decrypt the encrypted format class file, and then receives the plaintext class file obtained by the decryption from the decryptor Chip6. The middleware loader 15 loads the plaintext class file.
[0067] ミドルウェアローダ 15への指示は、矢印 g0に示すようなメソッド LoadClassの呼出し 力 Sインタプリタ 12からなされた場合に行われる。この LoadClassの呼び出し時に、平文 クラスファイルをロードすべき力、、 CPU5による復号により得られた平文クラスファイル をロードすべきかの判定が第 1実施形態と同様、ローデイング判定ルーチン 18により なされる。矢印 ilは、この判定の結果に基づぐ平文形式のクラスファイルのロードを 象徴的に示し、矢印 i2は、暗号化形式のクラスファイルのロードを象徴的に示す。 The instruction to the middleware loader 15 is made when the method LoadClass calling force S interpreter 12 as indicated by an arrow g0 is issued. When loading LoadClass, the loading judgment routine 18 determines whether the plaintext class file should be loaded and whether the plaintext class file obtained by decryption by the CPU 5 should be loaded, as in the first embodiment. The arrow il symbolizes the loading of a plain text class file based on the result of this determination, and the arrow i2 symbolizes the loading of the encrypted class file.
[0068] 図中の矢印 i3は、ミドルウェアローダ 15に対する指示の流れと、クラスファイルの口 一ドとを象徴的に示す。 [0068] The arrow i3 in the figure symbolically indicates the flow of instructions to the middleware loader 15 and the class file vocabulary.
以上のように本実施形態によれば、平文クラスファイルをロードする処理と、暗号化 形式のクラスファイルをロードする処理とをミドルウェアローダ 15にもたせることができ 、アプリケーション実行装置のソフトウェア構成をコンパクトにすることができると!/、う効 果がある。また、平文クラスファイルのロードをネイティブコードで記述することにより、 平文クラスファイルのロードを高速に行うことができる。 As described above, according to the present embodiment, the middleware loader 15 can perform processing for loading a plaintext class file and processing for loading an encrypted class file, and the software configuration of the application execution device can be made compact. If you can! Also, by writing the plaintext class file load in native code, The plaintext class file can be loaded at high speed.
(第 4実施形態)  (Fourth embodiment)
第 1実施形態におけるミドルウェアローダ 15は、 Java(TM)アプリケーションを構成す るクラスファイルをロードの対象としていた力 本実施形態では、クラスライブラリィを構 成するクラスファイルをロードの対象とする実施形態である。力、かるクラスライブラリィは 、組込みプログラム用 ROM9に格納されているので、ローデイング判定ルーチン 18は 、ロードクラス APIの呼び出しがなされた場合、呼出先のクラスファイルが平文クラスフ アイルである力、、暗号化形式のクラスファイルであるかを判定する。  The middleware loader 15 in the first embodiment has the ability to load the class files that make up the Java (TM) application.In this embodiment, the embodiment loads the class files that make up the class library. It is. Since the class library is stored in the ROM 9 for embedded programs, the loading judgment routine 18 has the capability that the class file of the call destination is a plaintext class file when the load class API is called. It is determined whether it is a class file in the format.
[0069] 平文クラスファイルである場合、インタプリタ 12は、クラスローダ 14に指示 (defmeCla ss)を放つことにより、組込みプログラム用 ROM9に格納されている平文クラスファイル を構成する中間コードをバイトコードに変換させ、ヒープメモリ上にクラスオブジェクト を得る。 [0069] If it is a plain text class file, interpreter 12 issues an instruction (defmeClasss) to class loader 14 to convert the intermediate code constituting the plain text class file stored in ROM 9 for embedded programs into byte code. To get a class object in the heap memory.
暗号化形式のクラスファイルである場合、インタプリタ 12は、ミドルウェアローダ 15に 指示 (defmeEncryptedClass)を放つ。これにより、デクリプタ Chip6に暗号化形式のクラ スファイルの復号化を行わせ、復号化により平文クラスファイルがメモリ上に得ること ができる。このメモリ上の平文クラスファイルを構成する中間コードをバイトコードに変 換させることで、ヒープメモリ上にクラスオブジェクトを得る。  If it is an encrypted class file, the interpreter 12 issues an instruction (defmeEncryptedClass) to the middleware loader 15. This allows the decryptor Chip6 to decrypt the encrypted class file, and the plaintext class file can be obtained on the memory by decryption. A class object is obtained on the heap memory by converting the intermediate code constituting the plain text class file on the memory into byte code.
[0070] 力、かるローデイング判定ノレ一チン 18を構成するには、第 1実施形態で述べたように 、ローデイング判定ルーチン 18のベースとなるアルゴリズム、つまり、図 7のフローチヤ ートのアルゴリズムを実現するようなソースプログラムを記述する。この記述にあたって[0070] As described in the first embodiment, the load determination routine 18 is configured as a base for the loading determination routine 18, that is, the flow chart algorithm shown in FIG. Write a source program that In this description
、ソフトウェア開発者は、プログラミング言語の構文に従い、クラス構造体や変数、配 列変数、外部関数のコールを用いて、各フローチャートや、機能的な構成要素を具 現するソースプログラムを記述する。 The software developer follows the syntax of the programming language and uses the class structure, variables, array variables, and external function calls to describe each flowchart and the source program that defines the functional components.
[0071] 記述されたソースプログラムは、ファイルとしてコンパイラに与えられる。コンパイラは 、これらのソースプログラムを翻訳してオブジェクトプログラムを生成する。 [0071] The described source program is given to the compiler as a file. The compiler translates these source programs to generate an object program.
コンパイラによる翻訳のうち、資源割付の工程において、アプリケーション実行装置 における CPUが具備している、レジスタ、メモリなどのハードウェア資源に、ソースプロ グラムにおける変数を割り付ける。 [0072] そしてコード生成の工程にお!/、て、 CPUが直接、解読すること力 Sできるネイティブコ ードを生成する。以上のような、 CPUを想定したコンパイルを行うことにより、ローディ ング判定ルーチン 18を作成することができる。 Among the translations by the compiler, in the resource allocation process, variables in the source program are allocated to hardware resources such as registers and memory that the CPU in the application execution device has. [0072] Then, in the code generation process! /, The CPU generates a native code that can be directly decoded by the CPU. The loading judgment routine 18 can be created by compiling the CPU as described above.
オブジェクトプログラムが生成されるとプログラマはこれらに対してリンカを起動する 。リンカはこれらのオブジェクトプログラムや、関連するライブラリプログラムをメモリ空 間に割り当て、これらを 1つに結合する。以上の処理を経て、本実施形態に係るロー デイング判定ルーチン 18が組込まれたミドルウェアローダ 15を作成することができる  When object programs are generated, the programmer invokes the linker for these. The linker allocates these object programs and related library programs in memory space and combines them into one. Through the above processing, the middleware loader 15 incorporating the loading determination routine 18 according to the present embodiment can be created.
[0073] (第 5実施形態) [0073] (Fifth embodiment)
第 1実施形態は、 BD-ROMを供給源とした再生装置の内部構成を開示したが、本 実施形態では、アプリケーションの供給源となる BD-ROMを、どのように生産するかと いう BD-ROMの生産に関する実施形態である。  In the first embodiment, the internal configuration of a playback device using a BD-ROM as a supply source has been disclosed. It is embodiment regarding production.
BD-ROMの生産は、以下の企画工程、素材作成工程、マスタリング工程 先ず初めに、企画工程を行う。この工程では、 BD-ROMをどのような筋書きで再生 させる力、を決める。  BD-ROM production involves the following planning process, material creation process, and mastering process. In this process, the scenario for determining the BD-ROM playback power is determined.
[0074] 次に、素材作成工程を行う。この工程は、動画収録、音声収録等の素材作成を行う ものである。  [0074] Next, a material creation step is performed. This process involves creating materials such as video recording and audio recording.
そしてマスタリングの工程を行う。この工程は、企画工程において作成された筋書き と、素材作成工程にて得られた素材とから BD-ROMのボリューム領域に記録すべき データの全体像 (一般にボリュームイメージという)を得る。その後、ボリュームイメージ を物理データ列に変換して、この物理データ列に基づき原盤カッティングを行い、デ イスク原盤を得る。  Then, a mastering process is performed. In this process, an overall image (generally called a volume image) of data to be recorded in the volume area of the BD-ROM is obtained from the scenario created in the planning process and the material obtained in the material creation process. After that, the volume image is converted into a physical data string, and the master disk is cut based on the physical data string to obtain a disk master disk.
[0075] こうして、ディスク原盤が作成されれば、 BD-ROMを工業的に大量に生産する。この 生産は主に、基板成形、反射膜成膜、保護膜コーティング、張り合わせ、レーベルの 印刷とレ、つた諸工程からなる。  [0075] Thus, once the master disc is created, BD-ROM is industrially produced in large quantities. This production mainly consists of various processes such as substrate molding, reflection film formation, protective film coating, bonding, label printing and labeling.
以上の過程を経て、各実施形態に示した記録媒体 (BD-ROM)を作ることができる。 図 12は、 BD-ROMのマスタリングを行うマスタリング装置の大まかな機能構成を示 すブロック図である。本図に示すように、マスタリング装置は、クラスファイル取得モジ ユール 51、暗号化判定部 52、鍵生成部 53、クラスファイルェンクリプタ 54、了一カイ ノ 55、マスター鍵取得モジュール 56、復号鍵ェンクリプタ 57、 BD-ROMバーナー 58 力、ら構成される。 Through the above process, the recording medium (BD-ROM) shown in each embodiment can be manufactured. FIG. 12 is a block diagram showing a rough functional configuration of a mastering apparatus that performs BD-ROM mastering. As shown in this figure, the mastering device has a class file acquisition module. It consists of a yule 51, an encryption determination unit 52, a key generation unit 53, a class file encryptor 54, an ichiichi kino 55, a master key acquisition module 56, a decryption key encryptor 57, and a BD-ROM burner 58.
[0076] クラスファイル取得モジュール 51は、 Java(TM)アプリケーションを構成するクラスファ ィルを順次取得する。  [0076] The class file acquisition module 51 sequentially acquires the class files constituting the Java (TM) application.
暗号化判定部 52は、クラスファイル取得モジュール 51より取得されたクラスファイル の暗号化の必要性を判断する。暗号化の必要性はクラスファイルの属性情報を用い たり、暗号化を行う前にユーザに問い合わせることで、暗号化の有無の判断を実現 することが可能である。  The encryption determination unit 52 determines the necessity of encryption of the class file acquired from the class file acquisition module 51. The necessity of encryption can be determined by using the attribute information of the class file or by asking the user before encryption.
[0077] 鍵生成部 53は、復号鍵および暗号鍵を生成する。再生装置での復号化を高速化 するにめに AEs (Advanced Encryption Standard) A^DES (Data Encryption Standa rd)のような対称鍵暗号を利用することが望ましい。対称鍵暗号を利用する場合は喑 号鍵と復号鍵が同じであるため、これらを秘匿としておく機構(図示せず)を設けるの が望ましい。  [0077] The key generation unit 53 generates a decryption key and an encryption key. It is desirable to use symmetric key cryptography such as AEs (Advanced Encryption Standard) A ^ DES (Data Encryption Standard) in order to speed up decryption on playback devices. When using symmetric key cryptography, since the signature key and the decryption key are the same, it is desirable to provide a mechanism (not shown) for keeping them secret.
クラスファイルェンクリプタ 54は、暗号化判定部 52より暗号化する必要があると判断 されたクラスファイルを、鍵生成部 53より生成された暗号鍵で暗号化する。  The class file encryptor 54 encrypts the class file determined to be encrypted by the encryption determination unit 52 with the encryption key generated by the key generation unit 53.
[0078] アーカイバ 55は、クラスファイルを一つの JARファイルに格納する。ここで、暗号化 の必要がなレ、クラスファイルには拡張子「class」を付して JARファイルに格納する。一 方、クラスファイルェンクリプタ 54より得られた暗号化クラスファイルに対しては、拡張 子「secure」を付して JARファイルに格納する。 The archiver 55 stores the class file in one JAR file. Here, the class file that does not need to be encrypted is attached to the JAR file with the extension “class”. On the other hand, the encrypted class file obtained from the class file encryptor 54 is stored with the extension “secure” in the JAR file.
マスター鍵取得モジュール 56は、再生装置のマスター鍵を内部で保持し、復号鍵 ェンクリプタ 57に渡す。  The master key acquisition module 56 holds the master key of the playback device inside and passes it to the decryption key decryptor 57.
[0079] 復号鍵ェンクリプタ 57は、復号鍵をマスター鍵で暗号化する。復号鍵はマスター鍵 で暗号化されるため、このマスタリングより作成された BD-ROMはマスター鍵がなけれ ば復号化は極めて困難となる。  [0079] The decryption key encryptor 57 encrypts the decryption key with the master key. Since the decryption key is encrypted with the master key, the BD-ROM created by this mastering is extremely difficult to decrypt without the master key.
BDバーナー 58は、 JARファイルおよび喑号化された復号鍵を、図 2に示したような ファイル、ディレクトリ構造に変換して、 BD-ROM—枚分に格納すべきデータを網羅し たボリュームイメージが得られる。 [0080] マスタリング装置により作成された光ディスクは図 1に示す構成を持つ。マスター鍵 を用いることなく、 JARファイルの中の暗号化クラスファイルを復号化するには、クラス ファイルェンクリプタが暗号化に用いた暗号化アルゴリズムを解析せねばならない。こ の暗号化アルゴリズムの解析には多大な時間カかかるので、リバースエンジニアリン グ技術での解析が不可能と見なすことができる。 The BD burner 58 converts the JAR file and decrypted decryption key into a file and directory structure as shown in Fig. 2, and covers the data that should be stored in BD-ROM— Is obtained. An optical disc created by the mastering device has the configuration shown in FIG. To decrypt an encrypted class file in a JAR file without using a master key, the class file encryptor must analyze the encryption algorithm used for encryption. Since the analysis of this encryption algorithm takes a lot of time, it can be considered that analysis using reverse engineering technology is impossible.
(第 6実施形態)  (Sixth embodiment)
本実施形態は、マニフェストファイルに復号鍵の情報を格納しておき、デクリプタ Chi p6は、この復号鍵に関する情報に基づき、暗号化形式のクラスファイルを復号すると いう改良に関する。  The present embodiment relates to an improvement in which decryption key information is stored in a manifest file, and the decryptor Chip 6 decrypts an encrypted class file based on the decryption key information.
[0081] 図 13は、第 6実施形態に係る XXX.KEYファイル及びマニフェストファイルの格納内 容の一例を示す図である。  FIG. 13 is a diagram showing an example of the storage contents of the XXX.KEY file and the manifest file according to the sixth embodiment.
( 1 ) XXX. EY (「XXX」は可変、拡張子「KEY」は固定)  (1) XXX.EY ("XXX" is variable, extension "KEY" is fixed)
この XXX.KEYファイルは、クラスファイルの復号化に必要な一つ以上の復号鍵を格 納した暗号化形式ファイルである。 XXX. KEYファイルには、複数の復号鍵を格納さ せておくこと力 Sできる。図 13の右側は、本実施形態に係る XXX.KEYファイルの格納 内容を示す。この XXX.KEYファイルは、複数の復号鍵からなるチェーンを格納してい て、これらの復号鍵のチェーンには、一つ目の鍵には KEY-ID=0、二つ目の鍵には K EY-ID=1、二つ目の鍵には KEY-ID=2というように、出現する順番に、 KEY-IDが設定 される。マニフェストファイルに含まれる複数の復号鍵は、この Key-IDを用いて、個別 に指定される。また、 XXX.KEYファイル自体も暗号化されていて、正当な装置でのみ 復号が可能になる。ここで正当な装置とは、 Copy Protection for Recordable Medi a (CPRM)を利用し、自装置が持っているデバイス鍵を元に光ディスク固有の復号鍵 を取得することができる装置をいう。この光ディスク固有の復号鍵は、タイトル制作者 がー意に定める復号鍵であり、 CPRMでは、タイトル鍵と呼ばれる。  This XXX.KEY file is an encryption format file that stores one or more decryption keys necessary for decrypting the class file. XXX. KEY file can store multiple decryption keys. The right side of Fig. 13 shows the contents stored in the XXX.KEY file according to this embodiment. This XXX.KEY file stores a chain consisting of multiple decryption keys. These decryption key chains have KEY-ID = 0 for the first key and K for the second key. KEY-ID is set in the order of appearance, such as EY-ID = 1 and KEY-ID = 2 for the second key. Multiple decryption keys included in the manifest file are individually specified using this Key-ID. The XXX.KEY file itself is also encrypted, and can only be decrypted by a legitimate device. Here, a legitimate device refers to a device that can use Copy Protection for Recordable Media (CPRM) and obtain a decryption key unique to an optical disk based on the device key that the device itself has. This decryption key unique to the optical disc is a decryption key that is determined by the title producer, and is called a title key in CPRM.
[0082] XXX.KEYファイルには、複数の復号鍵が格納されるが、これらのうちどれを復号に 用いるかは、図 13の左側に記載された JARファイル内のマニフェストファイルで指定 される。 この MAMFEST.MFファイルには、 JARファイル仕様に従った文法により、第 1実施 形態で述べたような情報が記述される。本実施形態に係る MAMFEST.MFファイルは 、復号化に必要な復号鍵の IDを指定し得る点が特徴になる。ここで、 MAMFEST.MF ファイルの内部には、メインセッション (図中の Manifest-Version: 1.0)と、個別セッション (Name:Protected. secure)とが存在し、このメインセッションにデフォルトの KEY-IDを記 述すること力でき、個別セッションに個別ファイルの KEY-IDを記述することができる。 図 13における MAMFEST.MFファイルの内部構成のうち、 Manifest -Version: 1.0という の力 Sメインセッションであり、ここに Key_ID:0が記載されていることがわかる。 Name:Pro tected.secureというの力 フアイノレ Protected.secureについての個別セッションであり、 ここに Key-ID: 1が記載されていることがわかる。これらの「Key_ID」は、 XXX.KEYファ ィルに存在する個々の復号鍵を指定するもので、たとえば、図 13の例では、 XXX.KE Yファイル内に存在する鍵のチェーンのうち、 Key_ID=0に対応する復号鍵がデフオル トの復号鍵として用いられることになる。 JARファイル内に存在する暗号化形式のクラ スファイルのうち、復号鍵が個別指定されていないものの復号時には、この Key_ID=0 に対応する復号鍵が利用される。 [0082] A plurality of decryption keys are stored in the XXX.KEY file. Which of these is used for decryption is specified in the manifest file in the JAR file shown on the left side of FIG. In the MAMFEST.MF file, the information as described in the first embodiment is described by the grammar according to the JAR file specification. The MAMFEST.MF file according to the present embodiment is characterized in that the ID of the decryption key necessary for decryption can be designated. The MAMFEST.MF file contains a main session (Manifest-Version: 1.0 in the figure) and an individual session (Name: Protected. Secure). The default KEY-ID is assigned to this main session. It is possible to describe, and the KEY-ID of individual files can be described in individual sessions. Of the internal structure of the MAMFEST.MF file in Figure 13, it is Manifest-Version: 1.0. The main S session shows that Key_ID: 0 is described here. Power of Name: Protected.secure This is an individual session for Protected.secure, and it can be seen that Key-ID: 1 is listed here. These “Key_IDs” specify individual decryption keys that exist in the XXX.KEY file. For example, in the example of FIG. 13, the Key_ID of the key chain that exists in the XXX.KE Y file The decryption key corresponding to = 0 is used as the default decryption key. The decryption key corresponding to this Key_ID = 0 is used when decrypting the encrypted class files that are not specified individually among the encrypted class files in the JAR file.
「Protected.secure」ファイルの復号には Key_ID=lに対応する復号鍵が用いられるこ とになる。 MAMFEST.MFファイルにお!/、てキー「Key_ID」を複数指定することにより、 暗号化形式が異なる複数のクラスファイルを復号することができる。  The decryption key corresponding to Key_ID = l will be used to decrypt the “Protected.secure” file. By specifying multiple keys “Key_ID” in the MAMFEST.MF file, multiple class files with different encryption formats can be decrypted.
以上が本実施形態に係る BD-ROMについての改良点である。続いて、アプリケー シヨン実行装置の改良点について詳細に説明する。本実施形態におけるアプリケー シヨン実行装置には、 BD-ROMドライブ 1、デクリプタ Chip6、ミドルウェアローダ 15、口 ーデイング判定メソッド 16に改良点が存在する。図 14は、第 6実施形態特有の改良 が施された構成要素を抜き出して、これらの構成要素間のやり取りを書き加えた図で ある。つまり、本図の構成要素間に書き加えられた矢印力 これら構成要素側のやり とりを模式的に示している。  The above is the improvement on the BD-ROM according to this embodiment. Next, the improvements of the application execution device will be described in detail. In the application execution apparatus according to the present embodiment, there are improvements in the BD-ROM drive 1, the decryptor Chip 6, the middleware loader 15, and the opening determination method 16. FIG. 14 is a diagram in which constituent elements to which improvements specific to the sixth embodiment are applied are extracted, and exchanges between these constituent elements are added. In other words, the arrow force added between the components in this figure schematically shows the interaction between these components.
(BD-ROMドライブ 1の改良点)  (Improved points of BD-ROM drive 1)
BD-ROMドライブ 1は、その内部に、 CPRMで定義されているデバイス鍵を保持して おり、 BD-ROMドライブ 1は BD-ROMから、喑号化されたタイトル鍵を読み出し、デバ イス鍵を用いて、このタイトル鍵を復号する。 BD-ROM drive 1 holds the device key defined by CPRM inside. BD-ROM drive 1 reads the encoded title key from the BD-ROM and The title key is decrypted using the chair key.
(デクリプタ Chip6の改良点)  (Decryptor Chip6 improvements)
デクリプタ Chip6は、 BD-ROMドライブ 1から平文タイトル鍵の引き渡しを受け、 XXX· KEYファイルにおける暗号化された復号鍵をタイトル鍵を用いて復号する。その後、 この復号鍵を用いて、暗号化クラスファイルを復号する。このタイトル鍵の引き渡しに あたって、デクリプタ Chip6は、 BD-ROMドライブ 1との相互認証を行う。かかる相互認 証を行うのは、 BD-ROMドライブ 1がデクリプタ Chip6にタイトル鍵を渡すときに、鍵が 傍受される可能性があるからである。 BD-ROMドライブ 1と、デクリプタ Chip6とが互い の正当性を認証すれば、お互いの暗号化チャネル(SAC : Secure Authenticated C hannel)を開き、開いた暗号化チャネルを通じて平文形式のタイトル鍵を受け取る。こ のとき、暗号化チャネルの実現には楕円曲線暗号化(ECC : Ellipic Curve Cryptosy stem)と Diffie-Hellmanアルゴリズムとを利用することができる。このような、タイトル鍵の 受渡しと、暗号化された復号鍵の受渡しとを経て、デクリプタ Chip6は、暗号化形式の クラスファイルの復号を行う。  The decryptor Chip 6 receives the plaintext title key from the BD-ROM drive 1 and decrypts the encrypted decryption key in the XXX / KEY file using the title key. After that, the encryption class file is decrypted using this decryption key. In delivering the title key, the decryptor Chip 6 performs mutual authentication with the BD-ROM drive 1. This mutual authentication is performed because the key may be intercepted when the BD-ROM drive 1 passes the title key to the decryptor Chip6. If the BD-ROM drive 1 and the decryptor Chip6 authenticate each other's validity, they open each other's encrypted channel (SAC: Secure Authenticated Channel) and receive the plaintext title key through the opened encrypted channel. At this time, the Ellipic Curve Cryptosy stem (ECC) and the Diffie-Hellman algorithm can be used to realize the encrypted channel. After passing the title key and the encrypted decryption key, the decryptor Chip 6 decrypts the encrypted class file.
[0084] また本実施形態では、 MAMFEST.MFファイルにおいて複数の復号鍵を指定できる ようにしたので、デクリプタ Chip6は、ミドルウェアローダ 15から復号が命じられた際、ミ ドルウェアローダ 15から Key-IDを受け取り、この Key-IDに相当する復号鍵を用いて、 暗号化形式のクラスファイルを平文のクラスファイルに復号する。たとえば読み出そう とする暗号化形式のクラスファイル力 MAMFEST.MFファイルにおいて Key_ID="l" に対応付けられているなら、暗号化形式のクラスファイルの復号には、 Key_ID="l"に 対応付けられた復号鍵を利用することになる。 MAMFEST.MFファイルにおいて、 Key -IDが対応付けられてないのなら、デフォルトの復号鍵として、 Key-ID=0に対応付け れらている復号鍵を利用することになる。  In the present embodiment, since a plurality of decryption keys can be specified in the MAMFEST.MF file, the decryptor Chip 6 receives the key-ID from the middleware loader 15 when the decryption is ordered from the middleware loader 15. And decrypts the encrypted class file into a plain text class file using the decryption key corresponding to this Key-ID. For example, if an encrypted class file to be read is associated with Key_ID = "l" in the MAMFEST.MF file, it is associated with Key_ID = "l" for decryption of the encrypted class file. The obtained decryption key is used. If Key-ID is not associated in the MAMFEST.MF file, the decryption key associated with Key-ID = 0 is used as the default decryption key.
[0085] デクリプタ Chip6内にある SACで利用される暗号鍵、タイトル鍵、復号鍵などが第 3 者より傍受されてしまうとシステム全体として著作権保護ができなくなる。また、内部に 一時的に保持する平文クラスファイルが傍受されてしまう危険性があり、実装には、デ タリプタ Chip6本体を単体のシステム LSIとして実装する等、セキュリティの配慮がなさ れる。 [0086] 更にデクリプタ Chip6は、暗号化形式のクラスファイルを復号する際、 XXX.KEYファ ィルから取り出した復号鍵をキャッシュして、以降、同じ暗号化形式のクラスファイル を復号するにあたっては、このキャッシュされた復号鍵を用いる。こうすることで、一度 復号処理を行った暗号化形式のクラスファイルと同じものの復号処理を、再度行う場 合、上述したような BD-ROMドライブ 1との相互認証については、省略することが可能 になる。力、かるキャッシュの利用により、暗号化形式のクラスファイルの復号に要する 時間を大幅に短縮することができる。 [0085] If the encryption key, title key, decryption key, etc. used in the SAC in the decryptor Chip6 are intercepted by a third party, the copyright protection of the entire system becomes impossible. In addition, there is a risk that a plain text class file temporarily stored inside may be intercepted, and security is taken into consideration, such as mounting the descriptor chip 6 itself as a single system LSI. [0086] Further, when decrypting the encrypted class file, the decryptor Chip 6 caches the decryption key extracted from the XXX.KEY file, and thereafter decrypts the same encrypted class file. This cached decryption key is used. In this way, when performing the same decryption process as the encrypted class file once decrypted, the mutual authentication with the BD-ROM drive 1 as described above can be omitted. become. The use of such a cache can significantly reduce the time required to decrypt an encrypted class file.
[0087] 図 14の矢印 u0は、 BD-ROMから BD-ROMドライブ 1への暗号化タイトル鍵の引き渡 し象徴的に示し、矢印 ulは、デクリプタ Chip66と、 BD-ROMドライブ 1との SACによる 相互認証を象徴的に示す。図中の矢印 u2は、 BD-ROMドライブ 1からデクリプタ Chip 6への平文タイトル鍵の引き渡しを象徴的に示す。図中の矢印 u3は、 BD-ROMドライ ブ 1からの暗号化 XXX.KEYファイルの弓 Iき渡しを象徴的に示す。こうして引き渡され た暗号化 XXX.KEYファイルは、先に引き渡された平文のタイトル鍵を用いて復号され ることになる。  [0087] The arrow u0 in FIG. 14 symbolically shows the transfer of the encrypted title key from the BD-ROM to the BD-ROM drive 1, and the arrow ul indicates the SAC between the decryptor Chip66 and the BD-ROM drive 1. Symbolically shows mutual authentication by. The arrow u2 in the figure symbolically indicates the delivery of the plaintext title key from the BD-ROM drive 1 to the decryptor Chip 6. The arrow u3 in the figure symbolically indicates the passing of the encrypted XXX.KEY file from BD-ROM drive 1. The encrypted XXX.KEY file delivered in this way will be decrypted using the plaintext title key delivered earlier.
(ミドルウェアローダ 15の改良点)  (Improvement of middleware loader 15)
ミドルウェアローダ 15は、暗号化クラスファイルが平文のクラスファイルに復号された 後、ヒープメモリ 13上にクラスオブジェクトを生成する。  The middleware loader 15 generates a class object on the heap memory 13 after the encrypted class file is decrypted into a plain text class file.
(インタプリタ 12の改良点)  (Improvements of interpreter 12)
インタプリタ 12は、ローデイング判定メソッド 16の判定結果に従って、クラスローダ 1 4、ミドルウェアローダ 15にクラスファイルのロードを指示する。本実施形態では、複 数の復号鍵を MAMFEST.MFファイルにて指定できるようにしたので、ローデイング判 定メソッド 16がロードすべきクラスファイルが暗号化されていると判断した場合、インタ プリタ 12は、引数としてクラス名、暗号化クラスファイル、 Key-IDを指定する必要があ る。つまり、 defmeEncryptedClass (クラス名、暗号化クラスファイル、 Key-ID)として、 A PIである defmeEncryptedClassを呼び出す必要がある。  The interpreter 12 instructs the class loader 14 and the middleware loader 15 to load the class file according to the determination result of the loading determination method 16. In this embodiment, since multiple decryption keys can be specified in the MAMFEST.MF file, the interpreter 12 determines that the class file to be loaded by the loading determination method 16 is encrypted. The class name, encrypted class file, and key-ID must be specified as arguments. In other words, it is necessary to call defmeEncryptedClass which is API as defmeEncryptedClass (class name, encryption class file, Key-ID).
[0088] ここで、 "クラス名"は再生すべきクラスオブジェクトの名前である。暗号化クラスファ ィルは JARファイルより取得されたファイルである。 Key-IDは、 MAMFEST.MFファイル より得られたクラス名に対応する Key-IDである。このような defineEncryptedClassの呼 び出しにより、暗号化クラスファイルのロードをミドルウェアローダ 15に依頼する。 一方、ローデイング判定メソッド 16は、ロードすべきクラスファイルが暗号化されてい ないと判断した場合、 API呼び出し defmeClass (クラス名、平文クラスファイル)を行い 、引数としてクラス名、クラスファイルを指定し、クラスファイルのロードをクラスローダ 1 4に依頼する Here, “class name” is the name of the class object to be reproduced. The encryption class file is a file obtained from the JAR file. Key-ID is the Key-ID corresponding to the class name obtained from the MAMFEST.MF file. A call to defineEncryptedClass like this The middleware loader 15 is requested to load the encryption class file. On the other hand, when the loading determination method 16 determines that the class file to be loaded is not encrypted, it makes an API call defmeClass (class name, plain text class file), specifies the class name and class file as arguments, and class Request class loader 1 4 to load file
図中の矢印 u4は、ローデイング判定メソッド 16からインタプリタ 12への判定結果の 出力を象徴的に示す。また矢印 u5は、この判定結果に基づぐ defineEncryptedClass (クラス名、暗号化クラス、 Key-ID)の呼び出しとを象徴的に示す。図中の矢印 u6は、 引数で指定された Key-IDに基づぐデクリプタ Chip6への復号化の指示を象徴的に 示す。  The arrow u4 in the figure symbolically shows the output of the determination result from the loading determination method 16 to the interpreter 12. An arrow u5 symbolically indicates a call to defineEncryptedClass (class name, encryption class, Key-ID) based on the determination result. The arrow u6 in the figure symbolically indicates the decryption instruction to the decryptor Chip6 based on the Key-ID specified by the argument.
[0089] 図中の矢印 u7は、暗号化形式のクラスファイルの引き渡しを象徴的に示す。こうして 引き渡された暗号化形式のクラスファイルは、復号化に用いるとの指示がなされた Ke y-IDに対応する復号鍵を用いて復号化される。図中の矢印 u8は、デクリプタ Chip6か ら AV再生エンジン 7への復号化により得られた平文クラスファイルの引き渡しを象徴 的に示す。この引き渡しは、第 1実施形態で述べたように、第 1層又は第 2層でなされ 以上のように本実施形態によれば、暗号化形式のクラスファイルに対応する復号 鍵を取り出すための情報を MAMFEST.MFファイルに記述しているので、この MAMF EST.MFファイルの記述により、複数復号鍵の利用が可能になる、複数の復号鍵のひ とつが暗号解読法により攻撃者にわかってしまっても、他の復号鍵が攻撃者に分らな い限りは、他の復号鍵を用いて復号する暗号化形式のクラスファイルの解読を困難 にすることができるので、暗号化形式のクラスファイルの機密性を高めることができる  [0089] An arrow u7 in the figure symbolizes the delivery of an encrypted class file. The encrypted class file delivered in this way is decrypted using the decryption key corresponding to the Key-ID instructed to be used for decryption. The arrow u8 in the figure symbolically shows the delivery of the plaintext class file obtained by decryption from the decryptor Chip6 to the AV playback engine 7. As described in the first embodiment, this delivery is performed in the first layer or the second layer. As described above, according to this embodiment, the information for extracting the decryption key corresponding to the encrypted class file is obtained. Is described in the MAMFEST.MF file, the description of this MAMF EST.MF file makes it possible to use multiple decryption keys, and one of the multiple decryption keys is known to the attacker by cryptanalysis. However, unless the attacker knows the other decryption key, it can be difficult to decrypt the encrypted class file that is decrypted using the other decryption key. Can increase confidentiality
[0090] (第 7実施形態) [0090] (Seventh embodiment)
本実施形態では、第 6実施形態に示したアプリケーション実行装置に供される BD- ROMのマスタリングにつ!/、て説明する。  In the present embodiment, BD-ROM mastering provided to the application execution device shown in the sixth embodiment will be described.
図 15は、第 6実施形態に示したアプリケーション実行装置に供される BD-ROMのマ スタリングを行うマスタリング装置の構成の一例を示す図である。 [0091] 本図は、図 12をベースとして作図されており、このベースとなる構成と比較して、鍵 生成部 53、クラスファイルェンクリプタ 54、アーカイバ 55、 CPRMモジュール 56、復 号鍵ェンクリプタ 57が、鍵生成部 63、クラスファイルェンクリプタ 64、アーカイバ 65、 CPRMモジュール 66、復号鍵ェンクリプタ 67に置き換えられている点が新しい。先の 実施形態で既に述べた構成要素については同一の参照符号を付すことにより説明 を省略する。以降、本実施形態で初めて登場する構成要素について説明する。 FIG. 15 is a diagram illustrating an example of a configuration of a mastering apparatus that performs BD-ROM mastering used in the application execution apparatus illustrated in the sixth embodiment. [0091] This figure is drawn based on FIG. 12, and compared to this base configuration, the key generation unit 53, the class file encryptor 54, the archiver 55, the CPRM module 56, and the decryption key encryptor. A new feature is that 57 has been replaced with a key generator 63, class file encryptor 64, archiver 65, CPRM module 66, and decryption key encryptor 67. Constituent elements already described in the previous embodiment are denoted by the same reference numerals, and description thereof is omitted. Hereinafter, components that appear for the first time in the present embodiment will be described.
[0092] (鍵生成部 63)  [0092] (Key generator 63)
鍵生成部 63は復号鍵および暗号鍵を生成する。対称暗号化を利用するため、復 号鍵は、暗号鍵と同じになる。  The key generation unit 63 generates a decryption key and an encryption key. Since symmetric encryption is used, the decryption key is the same as the encryption key.
(クラスフアイルェンタリプタ 64)  (Class File Entrepter 64)
クラスファイルェンクリプタ 64は、暗号化する必要があるクラスファイルを、鍵生成部 63より生成された暗号鍵で暗号化する。暗号鍵には Key-IDがついており、クラスファ ィルェンクリプタ 64は利用した鍵の IDを記憶する。  The class file encryptor 64 encrypts the class file that needs to be encrypted with the encryption key generated by the key generation unit 63. Key-ID is attached to the encryption key, and the class file cryptor 64 stores the ID of the key used.
(アーカイバ 65)  (Archiba 65)
アーカイバ 65は、暗号化の必要がないクラスファイルのファイル名に拡張子「class」 を付し、クラスファイルェンクリプタ 64より得られた暗号化クラスファイルのファイル名 に拡張子「secure」を付して、これらの平文クラスファイル、暗号化形式のクラスフアイ ルをまとめた JARファイルを得る。また、喑号に用いた喑号鍵の Key-IDの情報をクラス ファイルェンクリプタ 64より受け取り、その情報をメタファイルに格納する。メタファイル は JARファイルの META-INFディレクトリにある MANIFEST. MFファイルである。  Archiver 65 adds the extension “class” to the file name of the class file that does not require encryption, and adds the extension “secure” to the file name of the encrypted class file obtained from class file encryptor 64. As a result, a JAR file containing these plaintext class files and class files in encrypted format is obtained. In addition, the key-ID information of the key number used for the key number is received from the class file encryptor 64, and the information is stored in the metafile. The metafile is a MANIFEST.MF file in the META-INF directory of the JAR file.
(CPRMモジュール 66)  (CPRM module 66)
CPRMモジュール 66は、 CPRMに必要な鍵生成および情報保持を行う。 CPRMモジ ユール 66はタイトル鍵を復号鍵ェンクリプタ 67に渡す。また、 CPRMの仕様で定めら れている情報を BDバーナー 58に渡す。 CPRMの仕様は、例えば「http:〃 www.4cent ity.com/tech/cprm/ Jに公開されている。  The CPRM module 66 performs key generation and information holding necessary for CPRM. CPRM module 66 passes the title key to decryption key encryptor 67. In addition, the information specified in the CPRM specifications is passed to the BD burner 58. The specification of CPRM is disclosed, for example, at “http: 〃 www.4centity.com/tech/cprm/J”.
(復号鍵ェンクリプタ 67)  (Decryption key encryptor 67)
復号鍵ェンクリプタ 67は必要な復号鍵をタイトル鍵で暗号化する。この暗号化にあ たって、 Key-ID=0の復号鍵を先頭として、各復号鍵を順番に連結してゆき、復号鍵 のチェーンを作成する。そうして作成された復号鍵のチェーンをタイトル鍵で暗号化 することで、復号鍵ファイルを生成する。 The decryption key encryptor 67 encrypts the necessary decryption key with the title key. In this encryption, the decryption keys with Key-ID = 0 are headed and the decryption keys are connected in order, Create a chain. The decryption key file is generated by encrypting the chain of decryption keys created in this way with the title key.
[0093] 本実施形態に係るマスタリング装置より作成された光ディスクは図 1に示す構成をも つ。 JARファイルの中の暗号化クラスファイルは、リバースエンジニアリングを利用して の解析が不可能になる。 CPRMが定めるデバイス鍵がなければタイトル鍵を取得する ことができないため、 JARファイルの中の暗号化クラスファイルを復号化するためには 復号鍵を用いることなく暗号化形式のクラスファイルを復号する必要が有り、きわめて 困難である。  [0093] An optical disc created by the mastering apparatus according to the present embodiment 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 specified 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.
[0094] (備考)  [0094] (Remarks)
以上、本願の出願時点において、出願人が知り得る最良の実施形態について説明 したが、以下に示す技術的トピックについては、更なる改良や変更実施を加えること ができる。各実施形態に示した通り実施するか、これらの改良'変更を施すか否かは 、何れも任意的であり、実施する者の主観によることは留意されたい。  As described above, the best embodiment that the applicant can know at the time of filing of the present application has been described. However, the technical topics shown below can be further improved or modified. It should be noted that the implementation as shown in each embodiment or whether these improvements or changes are made is arbitrary and depends on the subjectivity of the practitioner.
(ソフトウェアによるデクリプタの実装)  (Decryptor implementation by software)
デクリプタ Chip6が保持しているマスター鍵が第 3者にわかってしまうと、マスター鍵 にて暗号化された復号鍵の詳細な情報がわかってしまい、その第 3者に対して著作 権保護ができなくなる。その場合、マスター鍵に関する情報が第 3者により公開され てしまう恐れがある上に、復号鍵やその中間データや平文クラスファイルが傍受され てしまう危険性がある。マスター鍵に対するセキュリティの配慮から、各実施形態にお けるデクリプタは、ハードウェアで実装したが、マスター鍵のセキュリティを確保しうる 保証があるのなら、デクリプタをソフトウェアを実装してもよ!/、。  If the master key held by the decryptor Chip6 is known to the third party, detailed information on the decryption key encrypted with the master key is known, and the copyright can be protected for the third party. Disappear. In that case, there is a risk that information on the master key may be disclosed by a third party, and there is a risk that the decryption key, its intermediate data, and the plaintext class file will be intercepted. In consideration of security for the master key, the decryptor in each embodiment is implemented by hardware. However, if there is a guarantee that the security of the master key can be ensured, the decryptor may be implemented by software! /, .
[0095] そのような保証を実現するには、ソフトウェア化されたデクリプタは、インタプリタ 12 等のほかのモジュールとのインタラクションを避け、ソフトウェア難読化技術を適用す ることが望ましい。 [0095] In order to realize such a guarantee, it is desirable to apply software obfuscation technology for software decryptors to avoid interaction with other modules such as interpreter 12.
また、ソフトウェア難読化技術の適用以外に CPUがセキュアな実行モードで、ソフト ウェア化されたデクリプタを実行することにより、機密性を高めることができる。セキュ アデクリプタがセキュアな実行モードで実行されることにより、マスタ鍵の機密性は高 度に保たれることになる。 (チューニングの余地) In addition to applying software obfuscation technology, confidentiality can be enhanced by executing a software-based decryptor in a secure execution mode. By executing the secure decryptor in the secure execution mode, the confidentiality of the master key is kept high. (Room for tuning)
クラスローダ 14とミドルウェアローダ 15はクラスオブジェクトの生成に共通点が多く 存在するが、クラスローダ 14が生成するクラスオブジェクトは著作権保護の配慮を行 う必要が特にないため、クラスローダ 14には、実装の高速化を計るためのチューニン グの余地が存在する。よって、クラスローダ 14に対してチューニングを施すことにより 、アプリケーションを構成するクラスファイルのうち、平文クラスファイルをロードする処 理を高速にすることができる。  The class loader 14 and the middleware loader 15 have a lot in common in the generation of class objects, but the class objects generated by the class loader 14 do not need to pay special attention to copyright protection. There is room for tuning to speed up the implementation. Therefore, by tuning the class loader 14, it is possible to speed up the process of loading the plaintext class file among the class files that constitute the application.
[0096]  [0096]
(ヒープメモリのダンプ対策)  (Heap memory dump countermeasures)
第 2層のミドルウェア層にミドルウェアローダ 15が配置された場合、ミドルウェアロー ダ 15が処理を行っている途中でヒープメモリのダンプが行われクラスファイルが傍受 されてしまう危険性がある。力、かる傍受を避けるために、ミドルウェアローダ 15は、イン タプリタ 12等のほかのモジュールとのインタラクションを避け、ソフトウェア難読化技術 を適用することが望ましい。  If the middleware loader 15 is placed in the middleware layer of the second layer, there is a risk that the heap memory will be dumped while the middleware loader 15 is processing and the class file will be intercepted. In order to avoid force and interception, it is desirable that the middleware loader 15 avoids interaction with other modules such as the interpreter 12 and applies software obfuscation technology.
[0097] また、ソフトウェア難読化技術の適用以外に CPUがセキュアな実行モードで、ミドル ウェアローダ 15を実行することにより、機密性を高めることができる。セキュアな実行 モードで実行されるソフトウェアでは、ヒープメモリの傍受がより困難になるため、ミド ルウェアローダ 15は、セキュアな実行モードで実行されることが望ましい。 In addition to the application of software obfuscation technology, confidentiality can be enhanced by executing the middleware loader 15 in a secure execution mode by the CPU. Software running in secure execution mode makes it more difficult to intercept heap memory, so it is desirable that middleware loader 15 be executed in secure execution mode.
(共用化)  (Shared)
ミドルウェアローダ 15により暗号化形式のクラスファイルを平文のクラスファイルへと 変換した後の処理は、クラスローダ 14による処理と同じになる。クラスローダ 14の処 理のうち、平文のクラスファイルをクラスオブジェクトへと変換しヒープメモリへ格納す る部分については、ミドルウェアローダ 15の一部分を利用するような実装を実現して も良い。これは例えば、クラスローダ 14による処理と、ミドルウェアローダ 15による処 理とで、共通のライブラリを共有することなどにより実現が可能となる。 クラスローダ 14、ローデイング判定メソッド 16、ハードウェアローダ 22は、アプリケー シヨンマネージャによるアプリケーションシグナリングに基づき、クラスファイルのロード を fiつてもよい。 The processing after the middleware loader 15 converts the encrypted class file into a plain text class file is the same as the processing by the class loader 14. Of the processing of the class loader 14, an implementation that uses a part of the middleware loader 15 may be realized for the part that converts the plain text class file into a class object and stores it in the heap memory. This can be realized by, for example, sharing a common library between the processing by the class loader 14 and the processing by the middleware loader 15. The class loader 14, loading judgment method 16, and hardware loader 22 load class files based on application signaling by the application manager. You may be fi.
[0098] アプリケーションマネージャとは、仮想マシン内のヒープ領域内で動作するシステム アプリケーションであり、アプリケーションシグナリングを実行する。〃アプリケーション シグナリング〃とは、 GEM1.0.2が規定する MHP(Multimedei Home Platform)において 、 "サービス〃を生存区間としてアプリケーションの起動、実行を行う制御をいう。 BD-R OM再生装置におけるアプリケーションマネージャは、この"サービス"の代わりに、 BD -ROMにおける〃タイトル"を生存区間にして、アプリケーションの起動、実行の制御を 実現する。ここで、 "タイトル"とは、 BD-ROMに記録されている映像'音声データの再 生単位であり、アプリケーション管理テーブル (AMT)がー意に割り当てられている。  The application manager is a system application that operates in a heap area in the virtual machine, and executes application signaling. 〃Application signaling〃 is a control that starts and executes an application using a service 〃 as a life cycle in MHP (Multimedei Home Platform) defined by GEM1.0.2. The application manager in the BD-R OM playback device Instead of this “service”, the “Title on BD-ROM” is used as the life cycle, and application startup and execution control is realized. Here, the “title” is a playback unit of video and audio data recorded on the BD-ROM, and an application management table (AMT) is arbitrarily assigned.
[0099] タイトルバウンダリのアプリケーションシグナリングは、 BD-ROM再生装置によりタイト ルの選択が行われた際、前のタイトルに対応するアプリケーション管理テーブル (AM T)と、カレントタイトルに対応するアプリケーション管理テーブル (AMT)とを用いて実行 されるシグナリングをいう。このシグナリングは、前のタイトルに対応する AMTには記 載されて!/、る力 カレントタイトルに対応する AMTには記載されて!/、な!/、アプリケーシ ヨンの動作を終了させ、前のタイトルに対応する AMTには記載されておらず、カレント タイトルに対応する AMTには記載されて!/、るアプリケーションの動作を開始させると!/ヽ う制御である。そして、このアプリケーションシグナリングがなされる度に、各実施形態 に示したクラスローダ 14、ミドルウェアローダ 15、ハードウェアローダ 22は、起動すベ きアプリケーションを構成するクラスファイルからクラスオブジェクトを生成して、仮想マ シンによる実行に供する。  [0099] When the title selection is performed by the BD-ROM playback device, the title boundary application signaling includes an application management table (AMT) corresponding to the previous title and an application management table corresponding to the current title ( Signaling performed using (AMT). This signaling is written in the AMT corresponding to the previous title! /, And the power is written in the AMT corresponding to the current title! /, Na! /, And terminates the operation of the application. This is a control that is not described in the AMT corresponding to the title, but is described in the AMT corresponding to the current title! Each time this application signaling is performed, the class loader 14, the middleware loader 15, and the hardware loader 22 shown in each embodiment generate a class object from the class file that configures the application to be started, and Used for machine execution.
(ローカルストレージ内のディレクトリ構成)  (Directory structure in local storage)
図 3に示した HDドライブ 2、メモリカードドライブ 3は、 Java(TM) 10 Packageからのメ ソッドを用いることにより、アクセスすることができるローカルストレージであってもよい。 このローカルストレージは、複数のドメイン領域を有する。ここでドメイン領域とは、 BD -ROMに固有なディスクルート証明書に対応するディレクトリのことであり、これらのデ ィレクトリの配下に、組織毎のディレクトリを格納するというものである。  The HD drive 2 and the memory card drive 3 shown in FIG. 3 may be a local storage that can be accessed by using a method from Java (TM) 10 Package. This local storage has a plurality of domain areas. Here, the domain area is a directory corresponding to a disk root certificate unique to the BD-ROM, and a directory for each organization is stored under these directories.
[0100] ディスクルート証明書とは、この BD-ROMを作成した作成者力、ルート認証局から配 布を受けたルート証明書を、 BD-ROMに割り当てたものである。ディスクルート証明書 はたとえば X.509の形式で符号されている。 X.509の仕様は国際電信電話諮問委員 会より発行されており、 CCITT Recommendation X.509 (1988), "The Directory - Au thentication Framework' こ記載 れて!/ヽ o。 [0100] The disk root certificate is a BD-ROM assigned to the BD-ROM by the creator who created this BD-ROM and the root certificate distributed by the root certificate authority. Disk root certificate Is encoded in the X.509 format, for example. The X.509 specification is published by the International Telegraph and Telephone Consultative Committee and is listed in CCITT Recommendation X.509 (1988), "The Directory-Au thentication Framework"! / ヽ o.
[0101] 組織のアプリケーション毎のディレクトリは、 MHPのものと同じである。つまりローカル ストレージでは、 MHPに規定された各組織のアプリケーション毎のディレクトリを、ルー ト証明書に対応したディレクトリの配下に配置した構成になっている。こうすることで、 MHPの格納方式と、互換を維持することができる。ここでローカルストレージのディレ クトリ構成をアクセスするためのファイルパスのうち、ルート証明書に対応した部分ま でを、〃ローカノレストレージノレート〃という。  [0101] The directory for each application in the organization is the same as that of MHP. In other words, in the local storage, the directory for each application of each organization specified in MHP is arranged under the directory corresponding to the root certificate. In this way, compatibility with the MHP storage method can be maintained. Here, the part corresponding to the root certificate in the file path for accessing the directory structure of the local storage is called “local storage storage rate”.
[0102] そして、各実施形態に示したクラスローダ 14、ミドルウェアローダ 15、ハードウェア口 ーダ 22は、 BD-ROMにおけるディスクルート証明書に対応するディレクトリから、ロー カルストレージルートを用いてクラスファイルを読み出し、このクラスファイルに基づき クラスオブジェクトを生成して、仮想マシンによる実行に供するのが望まし!/、。  [0102] Then, the class loader 14, the middleware loader 15, and the hardware order 22 shown in the respective embodiments use the local storage root from the directory corresponding to the disk root certificate in the BD-ROM. It is desirable to create a class object based on this class file and execute it on the virtual machine! /.
また BD- ROM、ローカルストレージの記録内容は、 Advancend Access Content Syst em(AACS)にて暗号化され、署名情報が付されて、利用権限が、パーミッションフアイ ルに規定されてレ、るのが望ましレ、。  In addition, the recorded contents of BD-ROM and local storage are encrypted with Advancend Access Content System (AACS), signed information is added, and usage rights are expected to be specified in the permission file. Masle.
[0103] 例えば、ファイルパス「/Persistent/l/l/streams/に、所望のファイルが存在 するか否かの確認は、 java(TM).ioの exitsOメソッドを用いることで行われる。所望のフ アイルが 0.m2tsである場合の、 java(TM).ioの exitsOメソッドの用例を以下に示す。 例:  For example, whether or not the desired file exists in the file path “/ Persistent / l / l / streams /” is confirmed by using the exitsO method of java (TM) .io. An example of using the exitsO method of java (TM) .io when the file is 0.m2ts is shown below.
new javau'M).io.File( /Persistent/丄 /上/ streams/ 0.m2ts ).exists();  new javau'M) .io.File (/ Persistent / 丄 / up / streams / 0.m2ts) .exists ();
(Java(TM)アプリケーション)  (Java (TM) application)
仮想マシンが、 JFIF(JPEG)や PNG,その他のイメージデータを表示するためのスタン ダードライブラリを含んでいる場合、 Java(TM)アプリケーションは、 GEM1.0.2にて規定 された HAViフレームワークを含み、 GEM1.0.2におけるリモートコントロールナビゲー シヨン機構実現してもよい。これにより、 Java(TM)アプリケーションは、 HAViフレームヮ ークに基づくボタン表示、テキスト表示、オンライン表示 (例えば BBSの内容)といった 表示を、動画像の表示と組み合わせた画面表示を実現することができ、リモートコント ロールを用いて、この画面表示に対する操作を行うことができる。 If the virtual machine includes a standard library for displaying JFIF (JPEG), PNG, and other image data, the Java (TM) application includes the HAVi framework specified in GEM1.0.2, The remote control navigation mechanism in GEM1.0.2 may be realized. As a result, the Java (TM) application can realize a screen display that combines the display such as button display, text display, and online display (for example, BBS contents) based on the HAVi framework with the display of moving images. Remote control Operations for this screen display can be performed using the roll.
また Java(TM)アプリケーションは、例えば電子商取引 (EC(Electronic Commerce))の クライアントアプリケーションであってもよレ、し、ネット対戦型のオンラインゲームであつ てもよい。更に、検索エンジンと連携して、様々なオンラインサービスを、ユーザに供 給するあのであよレヽ。  The Java (TM) application may be, for example, an electronic commerce (EC) client application or an online online game. In addition, it provides various online services to users in cooperation with search engines.
(アプリケーション実行装置のバリエーション)  (Variation of application execution device)
本発明に力、かるアプリケーション実行装置は、衛星放送受信のために機器に組み 込まれた Java(TM)プラットフォームであってもよい。また、本発明に力、かるアプリケー シヨン実行装置は、携帯電話の処理制御のために機器に組み込まれた Java(TM)ブラ ットフォームであってもよい。その他、デジタルカメラやデジタルテレビに組込まれた Ja va(TM)プラットフォームであってもよ!/、。  The application execution apparatus which is effective in the present invention may be a Java (TM) platform incorporated in a device for receiving satellite broadcasting. In addition, the application execution apparatus which is effective in the present invention may be a Java (TM) platform incorporated in a device for processing control of a mobile phone. Other than that, Java ™ platform built into digital cameras and digital TVs!
(実装すべきパッケージ)  (Package to be mounted)
アプリケーション実行装置の実施にあたっては、以下の BD-J Extensionをアプリケ ーシヨン実行装置に実装するのが望ましい。 BD-J Extensionは、 GEM[1.0.2]を越えた 機能を、 Java(TM)プラットフォームに与えるために特化された、様々なパッケージを含 んでいる。 BD-J Extensionにて供給されるパッケージには、以下のものがある。  When implementing the application execution device, it is desirable to implement the following BD-J Extension on the application execution device. The BD-J Extension includes various packages specialized to give the Java (TM) platform functionality beyond GEM [1.0.2]. The packages supplied with BD-J Extension are as follows.
• org.bluray.meaia  • org.bluray.meaia
このパッケージは、 Java(TM) Media FrameWorkに追加すべき、特殊機能を提供す る。アングル、音声、字幕の選択についての制御力 このパッケージに追加される。 •org.bluray.ti  This package provides special functions that should be added to Java (TM) Media FrameWork. Control over the selection of angles, audio, and subtitles Added to this package. Org.bluray.ti
このパッケージは、 GEM[1.0.2]における"サービス"を"タイトル"にマップして動作す るための APIや、 BD-ROMからタイトル情報を問!/、合わせる機構や新たなタイトルを選 択する機構を含む。  This package selects APIs for mapping "services" to "titles" in GEM [1.0.2] and operating, title information from BD-ROMs, matching mechanisms, and new titles. Including a mechanism.
• org. bluray. application  • org. Bluray. Application
このパッケージは、アプリケーションの生存区間を管理するための APIを含む。また 、アプリケーションを実行させるにあたってのシグナリングに必要な情報を問い合わせ る APIを含む。  This package includes an API for managing the lifetime of an application. It also includes an API for inquiring information necessary for signaling when executing the application.
•org. bluray. ui このパッケージは、 BD-ROMに特化されたキーイベントのための定数を定義し、映 像再生との同期を実現するようなクラスを含む。 • org. Bluray. Ui This package defines constants for key events specific to BD-ROM, and includes classes that realize synchronization with video playback.
•org.bluray.vrs  Org.bluray.vrs
このパッケージは、データの所在に拘らず、データをシームレスに再生するため、 B D-ROMに記録されたコンテンツ (on-discコンテンツ)と、 BD-ROMに記録されて!/、な!/ヽ Local Storage上のコンテンツ (off-discコンテンツ)とをバインドする機構 (Binding Schem e)を提供する。  In order to seamlessly play back data regardless of the location of this data, this package can be recorded on BD-ROM (on-disc content) and recorded on BD-ROM! /, NA! / 、 Provides a mechanism (Binding Scheme) for binding content on local storage (off-disc content).
[0105] Binding Schemeとは、 BD- ROM上のコンテンツ (AVClip、字幕、 BD-Jアプリケーショ ン)と、 Local Storage上の関連コンテンツとを関連付けるものである。この Binding Sche meは、コンテンツの所在に拘らず、シームレス再生を実現する。  [0105] The Binding Scheme associates content (AVClip, subtitles, BD-J application) on BD-ROM with related content on Local Storage. This Binding Scheme realizes seamless playback regardless of the location of the content.
(デクリプタ Chip6に対する復号化要求)  (Decryption request for decryptor Chip6)
デクリプタ Chip6を、 Linux等のリアルタイム OS上のタスクとして動作させる場合、デ タリプタ Chip6に対する復号化の要求は、リアルタイム OSのカーネルを介したシステ ムコールで実現するのが望ましレ、。  When decryptor Chip6 is operated as a task on a real-time OS such as Linux, it is desirable that the decryption request for decryptor Chip6 be realized by a system call via the kernel of the real-time OS.
[0106] カーネルは、デバイス入出力要求のシステムコールがタスクから発行されれば、メモ リプールからメモリブロックを確保し、そのブロックに、呼び出しに使用されたパラメ一 タブロックを作成する。そしてそのパラメータブロックの先頭アドレスと、デバイス情報 を記載したデバイステーブルのアドレスを引数にして、デクリプタ Chip6に対応するデ バイスドライバのリクエスト処理部をコールする。  [0106] When a system call for a device I / O request is issued from a task, the kernel allocates a memory block from the memory pool and creates a parameter block used for the call in that block. Then, the request processing unit of the device driver corresponding to the decrypter Chip 6 is called by using the head address of the parameter block and the address of the device table in which device information is described as arguments.
[0107] デクリプタ Chip6に対応するデバイスドライバは、ハードウェア的な割込み信号により 起動する「割込ハンドラ部」と、「割込タスク部」、「リクエスト処理部」から構成される。 デバイスドライバのリクエスト処理部は、パラメータブロックを入出力キューに登録し た後、割り込み許可を行って、カーネルに復帰する。  The device driver corresponding to the decryptor Chip 6 includes an “interrupt handler section”, an “interrupt task section”, and a “request processing section” that are activated by a hardware interrupt signal. The request processing unit of the device driver registers the parameter block in the I / O queue, enables interrupts, and returns to the kernel.
[0108] 割込ハンドラ部は、デクリプタ Chip6に対応するハードウェアから割込み信号を受け 付けると、デバイスとの間で、要求された入出力を行う。予定されている入出力が完 了すれば、割り込みを禁止し、割込みタスク部を起動する。未完了ならば、デバイスド ライバに復帰する。次の入出力要求がなされると、再び割り込みハンドルが起動され 、残りの入出力を続ける。 [0109] 割込みタスク部は、入力完了状態を引数にして、システムコールにより、入出力完 了を、カーネルに通知する。かかる通知を受け取れば、カーネルは、依頼元のデクリ プタ Chip6に通知する。 [0108] When the interrupt handler receives an interrupt signal from the hardware corresponding to the decryptor Chip6, it performs the requested input / output with the device. When the scheduled I / O is completed, interrupts are disabled and the interrupt task section is activated. If not completed, return to the device driver. When the next I / O request is made, the interrupt handle is activated again and the remaining I / O continues. [0109] The interrupt task unit notifies the kernel of input / output completion by a system call using the input completion state as an argument. Upon receiving such notification, the kernel notifies the requesting decryptor Chip6.
ミドノレウェアローダ 15力 デクリプタ Chip6のデバイスドライバと上述したような入出 力を行い、 RAM8上で平文クラスファイルの引き渡しを行えば、非特許文献 1に記載 されたインターフェイスを全く利用することなぐデクリプタ Chip6からミドルウェアロー ダ 15への平文クラスファイルの引き渡しを行うことができる。このような、ミドルウェア口 ーダ 15と、デクリプタ Chip6とのデバイスドライバとのやりとりは、 BD-ROM再生装置に おける、耐タンパ技術の傘下でなされるので、平文クラスファイルの機密性が保証さ れる。  Midoreware loader 15 Descriptor Decryptor that does not use the interface described in Non-Patent Document 1 at all if the plaintext class file is handed over on RAM8 by performing input / output as described above with Chip6 device driver. The plaintext class file can be transferred from to the middleware loader 15. Such exchange between the middleware driver 15 and the device driver of the decryptor Chip 6 is performed under the tamper-resistant technology in the BD-ROM playback device, so the confidentiality of the plaintext class file is guaranteed. .
産業上の利用可能性  Industrial applicability
[0110] 本発明は光ディスクや SDカードといった記録媒体またはインターネットといった通信 媒体を介して受け取った Java(TM)アプリケーションの著作権保護に利用できる。 The present invention can be used for copyright protection of a Java (TM) application received via a recording medium such as an optical disk or an SD card or a communication medium such as the Internet.

Claims

請求の範囲 The scope of the claims
[1] アプリケーション実行装置であって、 [1] An application execution device,
暗号化形式のクラスファイルを復号することにより、平文クラスファイルを得るデクリ プタと、  A decryptor that obtains a plaintext class file by decrypting the encrypted class file;
復号により得られた平文クラスファイルを構成する中間コードをバイトコードに変換し て、変換により得られたバイトコードをヒープメモリに格納するローダと、  A loader that converts the intermediate code constituting the plaintext class file obtained by decryption into bytecode, and stores the bytecode obtained by the conversion in heap memory;
ヒープメモリに格納されたバイトコードを、ネイティブコードに変換して、装置におけ る CPUに実行させるインタプリタとを備え、  An interpreter that converts the bytecode stored in the heap memory into native code and causes the CPU in the device to execute it.
前記ローダは、  The loader is
ネイティブコードで記述されたミドルウェアプログラム、又は、ハードウェア素子で構 成されたハードウェアモジユーノレである  A middleware program written in native code, or a hardware module composed of hardware elements
ことを特徴とするアプリケーション実行装置。  An application execution device.
[2] 前記ローダは、暗号化形式のクラスファイルのためのデクリプタ用ローダであり、 前記アプリケーション実行装置は、  [2] The loader is a decryptor loader for an encrypted class file, and the application execution device includes:
クラス構造体により定義されるクラスローダを備え、  With a class loader defined by a class structure,
前記クラスローダは、平文形式のクラスファイルを構成する中間コードをバイトコード に変換して、変換により得られたバイトコードをヒープメモリに格納するものであり、判 定メソッドを含み、  The class loader converts intermediate code constituting a plain text class file into byte code, stores the byte code obtained by the conversion in a heap memory, includes a determination method,
前記判定メソッドは、ロードクラスの呼び出しがあった場合、その呼び出しの引数に 対応するクラスファイルが、平文形式のクラスファイルである力、、暗号化形式のクラス ファイルであるかの判定を行い、平文クラスファイルのクラスファイルであれば、クラス ローダにバイトコードへの変換を行わせ、暗号化形式のクラスファイルであれば、デク リプタ用ローダにバイトコードへの変換を行わせる  When the load class is called, the determination method determines whether the class file corresponding to the argument of the call is a plain text class file or an encrypted class file. If the class file is a class file, let the class loader convert it to byte code. If it is an encrypted class file, let the descriptor loader convert it to byte code.
ことを特徴とする請求項 1記載のアプリケーション実行装置。  The application execution device according to claim 1, wherein:
[3] 前記判定メソッドは、一度ヒープメモリに格納されたクラスオブジェクトを格納してお くためのキャッシュを、アプリケーション実行装置のメモリ上に確保するものであり、 ロードクラスで呼び出すべきクラスファイルに対応するクラスオブジェクトが、前記キ ャッシュに存在しない場合、前記デクリプタ用ローダ及びクラスローダにバイトコード への変換を命じる [3] The determination method secures the cache for storing the class object once stored in the heap memory in the memory of the application execution device, and corresponds to the class file to be called by the load class. If the class object to be created does not exist in the cache, bytecode is stored in the descriptor loader and class loader. Order conversion to
ことを特徴とする請求項 2記載のアプリケーション実行装置。  The application execution device according to claim 2, wherein:
[4] ノイトコードへの変換の対象となる平文クラスファイルには、 [4] The plain text class file to be converted to Neut code contains
記録媒体にて供給されるアプリケーシヨンを構成するものと、機器に組込まれたクラ スライブラリを構成するものとがある  There are those that make up the application supplied on the recording medium, and those that make up the class library built into the device.
ことを特徴とする請求項 1記載のアプリケーション実行装置。  The application execution device according to claim 1, wherein:
[5] 前記ローダは、 [5] The loader
ロードクラスの呼び出しがあった場合、その呼び出しの引数に対応するクラスフアイ ルが、平文形式のクラスファイルである力、、暗号化形式のクラスファイルであるかの判 定を行い、平文形式のクラスファイルであれば、クラスファイルを構成する中間コード を、バイトコードに変換する処理を行い、暗号化形式のクラスファイルであれば、当該 暗号化形式のクラスファイルの復号をデクリプタに行わせ、その結果得られた平文ク ラスファイルを、バイトコードに変換する  When a load class is called, it is determined whether the class file corresponding to the argument of the call is a plain text class file or an encrypted class file. If so, the intermediate code that makes up the class file is converted to byte code. If it is an encrypted class file, the decrypted class file is decrypted by the decryptor. The specified plain text class file into bytecode
ことを特徴とする請求項 1記載のアプリケーション実行装置。  The application execution device according to claim 1, wherein:
[6] 前記暗号化形式のクラスファイルは、記録媒体に記録されており、 [6] The encrypted class file is recorded on a recording medium,
前記記録媒体には、暗号化形式のクラスファイルを復号するための復号鍵が、マス ター鍵にて暗号化された状態で記録されており、  On the recording medium, a decryption key for decrypting an encrypted class file is recorded in a state encrypted with a master key,
前記デクリプタは、  The decryptor is
前記マスター鍵を予め保持しており、前記暗号化形式のクラスファイルが復号対象 であれば、当該暗号化形式のクラスファイルに対応する暗号化状態の復号鍵を前記 記録媒体から取得し、  If the master key is held in advance and the class file in the encrypted format is to be decrypted, the decryption key in the encrypted state corresponding to the class file in the encrypted format is acquired from the recording medium,
デクリプタが、暗号化形式クラスファイルの復号に用いる復号鍵は、  The decryption key used by the decryptor to decrypt the encrypted class file is
前記暗号化復号鍵を前記予め保持しているマスター鍵を用いて復号することで得 られた復号鍵である  A decryption key obtained by decrypting the encrypted decryption key using the master key held in advance.
ことを特徴とする請求項 1記載のアプリケーション実行装置。  The application execution device according to claim 1, wherein:
[7] 前記デクリプタは、 [7] The decryptor is:
暗号化形式のクラスファイルが記録媒体から読み出される前に、前記マスター鍵を 用いて前記暗号化された復号鍵を復号し、キャッシュに格納しておく ことを特徴とする請求項 6記載のアプリケーション実行装置。 Before the encrypted class file is read from the recording medium, the encrypted decryption key is decrypted using the master key and stored in the cache. 7. The application execution device according to claim 6, wherein
[8] 前記暗号化形式のクラスファイルは、記録媒体に記録されており、 [8] The encrypted class file is recorded on a recording medium,
前記記録媒体には、タイトル鍵と、暗号化形式のクラスファイルを復号するための復 号鍵であってタイトル鍵で暗号化された暗号化復号鍵と、前記復号鍵を取り出すた めの情報を記述したメタファイルとが記録されており、  The recording medium includes a title key, an decryption key for decrypting an encrypted class file, which is encrypted with the title key, and information for extracting the decryption key. With the metafile you have written,
前記ローダは、前記アプリケーション実行時に、対応する復号鍵を取り出すための 情報をメタファイルから読み出して、前記デクリプタへ送り、  The loader reads information for extracting a corresponding decryption key from the metafile when the application is executed, and sends the information to the decryptor.
前記デクリプタは、前記復号鍵を取り出すための情報に基づき前記暗号化された 復号鍵をドライブから取得し、  The decryptor obtains the encrypted decryption key from the drive based on the information for extracting the decryption key,
前記記録媒体からタイトル鍵を取得して、取得したタイトル鍵を用いて復号鍵の復 号を行い、復号によりえら選れた復号鍵を用いて前記暗号化形式のクラスファイルを 復号することを特徴とする請求項 1記載のアプリケーション実行装置。  Obtaining a title key from the recording medium, decrypting the decryption key using the obtained title key, and decrypting the class file in the encrypted format using the decryption key selected by decryption The application execution device according to claim 1.
[9] 前記デクリプタは前記記録媒体から取得した復号鍵を保持するようにしたことを特 徴とする請求項 8記載のアプリケーション実行装置。 9. The application execution device according to claim 8, wherein the decryptor holds a decryption key acquired from the recording medium.
[10] アプリケーションの実行方法であって、 [10] An application execution method,
暗号化形式のクラスファイルを復号することにより、平文クラスファイルを得る復号ス 復号により得られた平文クラスファイルを構成する中間コードをバイトコードに変換し て、変換により得られたバイトコードをヒープメモリに格納するローダステップと、 ヒープメモリに格納されたバイトコードを、ネイティブコードに変換して、装置におけ る CPUに実行させる変換ステップとを備え、  Decrypting the encrypted class file to obtain a plaintext class file Decryption code that obtains a plaintext class file Converts the intermediate code that makes up the plaintext class file obtained by decryption into bytecode, and converts the bytecode obtained by the conversion into heap memory A loader step that stores data in the heap memory, and a conversion step that converts the byte code stored in the heap memory into a native code and causes the CPU in the device to execute it.
前記ローダステップは、  The loader step includes
ネイティブコードで記述されたミドルウェアプログラムを CPUに実行させる力、、又は、 ハードウェア素子で構成されたハードウェアモジュールを動作させることで実現される ことを特徴とする実行方法。  An execution method characterized by being realized by causing a CPU to execute a middleware program described in native code, or operating a hardware module composed of hardware elements.
[11] コンピュータにプリケーシヨンを実行させるプログラムであって、  [11] A program for causing a computer to execute a prescription,
暗号化形式のクラスファイルを復号することにより、平文クラスファイルを得る復号ス 復復号号にによよりり得得らられれたた平平文文ククララススフファァイイルルをを構構成成すするる中中間間ココーードドををババイイトトココーードドにに変変換換しし てて、、変変換換にによよりり得得らられれたたババイイトトココーードドををヒヒーーププメメモモリリにに格格納納すするるロローーダダスステテッッププとと、、 ヒヒーーププメメモモリリにに格格納納さされれたたババイイトトココーードドをを、、ネネイイテティィブブココーードドにに変変換換ししてて、、装装置置ににおおけけ るる CCPPUUにに実実行行ささせせるる変変換換スステテッッププととををココンンピピュューータタにに実実行行ささせせるるももののでであありり、、 Decryption class that obtains a plaintext class file by decrypting an encrypted class file The intermediate intermediate code that constitutes the plaintext text class file obtained by the decryption code is converted into a byte code. Then, a loader code step that stores the stored byte code obtained by the transformation conversion in a hi-pe memory memory, and Convert the stored code stored in the hi-pe memory memory into a native code and convert it into a device. In this case, the computer is allowed to execute the conversion step and the conversion step that causes the CCPPUU to execute the actual execution.
ネネイイテティィブブココーードドでで記記述述さされれたたミミドドルルウウェェアアププロロググララムムををココンンピピュューータタのの CCPPUUにに実実行行ささ せせるるかか、、又又はは、、ハハーードドウウェェアア素素子子でで構構成成さされれたたハハーードドウウェェアアモモジジュューールルをを動動作作ささせせるるここ ととにによよりり、、前前記記ロローーダダスステテッッププをを実実現現すするる  Whether to allow the CCPPUU of the computer to execute the program that was written in the native code as described in the native program code , Or, or to operate a hardwired module composed of hardwired elements. According to the above, the above-mentioned Rolloda dashes step will be realized.
*  *
PCT/JP2007/064851 2006-08-09 2007-07-30 Application execution device, method, and program WO2008018310A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2006216861A JP2009258772A (en) 2006-08-09 2006-08-09 Application execution device
JP2006-216861 2006-08-09

Publications (1)

Publication Number Publication Date
WO2008018310A1 true WO2008018310A1 (en) 2008-02-14

Family

ID=39032844

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2007/064851 WO2008018310A1 (en) 2006-08-09 2007-07-30 Application execution device, method, and program

Country Status (2)

Country Link
JP (1) JP2009258772A (en)
WO (1) WO2008018310A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
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
CN105612527A (en) * 2013-08-22 2016-05-25 Inka安特沃客有限公司 Method for providing security for common intermediate language-based program

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
KR101500512B1 (en) * 2013-05-15 2015-03-18 소프트캠프(주) Device and method for securing computer
JP6207984B2 (en) 2013-11-15 2017-10-04 株式会社東芝 Information processing apparatus, information processing method, and program
JP7195796B2 (en) 2018-07-23 2022-12-26 キヤノン株式会社 Information processing device, control method for information processing device, and program
KR20210133961A (en) * 2019-03-28 2021-11-08 라인플러스 주식회사 Method and system for protecting executable files using heap memory

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005098570A1 (en) * 2004-04-05 2005-10-20 Matsushita Electric Industrial Co., Ltd. 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

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005098570A1 (en) * 2004-04-05 2005-10-20 Matsushita Electric Industrial Co., Ltd. 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

Cited By (3)

* Cited by examiner, † Cited by third party
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
CN105612527A (en) * 2013-08-22 2016-05-25 Inka安特沃客有限公司 Method for providing security for common intermediate language-based program
JP2016535354A (en) * 2013-08-22 2016-11-10 インカ・エントワークス・インコーポレイテッドInka Entworks, Inc. Security providing method for common intermediate language based programs

Also Published As

Publication number Publication date
JP2009258772A (en) 2009-11-05

Similar Documents

Publication Publication Date Title
CN104581214B (en) Multimedia content guard method based on ARM TrustZone systems and device
RU2406116C2 (en) Migration of digital licence from first platform to second platform
JP4235691B2 (en) Self-protection document system
US7171558B1 (en) Transparent digital rights management for extendible content viewers
EP1642206B1 (en) Reprogrammable security for controlling piracy and enabling interactive content
US7356682B2 (en) Attesting to a value of a register and/or memory region
US7469346B2 (en) Dual virtual machine architecture for media devices
KR100946042B1 (en) Tamper-resistant trusted virtual machine
US7181603B2 (en) Method of secure function loading
WO2008018310A1 (en) Application execution device, method, and program
CN101099211A (en) Protection method for shared content, method and apparatus for reproducing a data recorded in recording medium using a local storage
EP1031910A1 (en) Software program protection mechanism
JP2001521654A (en) Digital information self-decoding system and method
KR20060081338A (en) Protection method for shared content, method and apparatus for reproducing a data recorded in recording medium using a local storage
JP7388803B2 (en) Tying the secure guest's secure key to the hardware security module
WO2008021682A2 (en) Portable mass storage with virtual machine activation
KR20010034000A (en) Content supplied as software objects for copyright protection
EP1836707A2 (en) Method and apparatus for protecting shared data and method and apparatus for reproducing data from recording medium using local storage
WO2021148144A1 (en) Container with encrypted software packages
KR20080012724A (en) Recording medium, method and apparatus for reproducing data, and method and apparatus for recording data
US20100218234A1 (en) Method and apparatus for limiting operation of digital rights management module
CA2615030A1 (en) Transparent digital rights management for extendible content viewers

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 07791544

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: RU

122 Ep: pct application non-entry in european phase

Ref document number: 07791544

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP