WO2006129641A1 - コンピュータシステム及びプログラム生成装置 - Google Patents

コンピュータシステム及びプログラム生成装置 Download PDF

Info

Publication number
WO2006129641A1
WO2006129641A1 PCT/JP2006/310744 JP2006310744W WO2006129641A1 WO 2006129641 A1 WO2006129641 A1 WO 2006129641A1 JP 2006310744 W JP2006310744 W JP 2006310744W WO 2006129641 A1 WO2006129641 A1 WO 2006129641A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
secure
management area
instruction
secure program
Prior art date
Application number
PCT/JP2006/310744
Other languages
English (en)
French (fr)
Inventor
Tomoyuki Haga
Hiroshi Okuyama
Hideki Matsushima
Yoshikatsu Ito
Shigehiko Kimura
Yasuki Oiwa
Takafumi Kagawa
Original Assignee
Matsushita Electric Industrial Co., Ltd.
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 Matsushita Electric Industrial Co., Ltd. filed Critical Matsushita Electric Industrial Co., Ltd.
Priority to JP2007518997A priority Critical patent/JP4850830B2/ja
Priority to EP06756740A priority patent/EP1890237A1/en
Priority to US11/915,198 priority patent/US7962746B2/en
Priority to CN2006800191820A priority patent/CN101189586B/zh
Publication of WO2006129641A1 publication Critical patent/WO2006129641A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/468Specific access rights for resources, e.g. using capability register
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/74Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information operating in dual or compartmented mode, i.e. at least one secure mode

Definitions

  • the present invention relates to a technique for preventing unauthorized tampering and analysis of a program.
  • some software sold as knockouts requires users to enter passwords to prevent illegal copying.
  • Such software includes code (computer program) that checks whether the password is correct. If an unauthorized user identifies the location of the code that performs this check in some way in the software, and if this code is tampered with to invalidate this check, Unauthorized users can use this software without knowing the password.
  • paid digital content that can be viewed on a PC (personal computer) has been provided.
  • This paid digital content is encrypted to prevent unauthorized copying, and software for viewing the content includes a decryption algorithm and a decryption key for decrypting the encrypted content. If it is possible to analyze the malicious user viewing software and identify the decryption key, it is possible to create software that can illegally copy the digital content.
  • Non-Patent Document 1 describes basic principles and specific methods for preventing software analysis.
  • Non-Patent Document 2 describes technical problems of TRCS (Tamper Resistant Coding System) developed as a tool for preventing software analysis and countermeasures.
  • TRCS Transmission Resistant Coding System
  • Non-Patent Document 3 to prevent illegal copying of software The technology to prevent the invalidation of software protection (non-copy-prote technology) is described!
  • Non-patent document 1 "Protect software from reverse analysis and modification” Nikkei Electronics 1998. 1. 5 (P209- 220)
  • Non-Patent Document 2 "Software tamper resistance technology" Fuji Xerox Technical Report No. 13
  • Non-Patent Document 3 "The 'Protect” Shuwa System Publishing 1985
  • Patent Document 1 Japanese Patent Laid-Open No. 11 15705
  • an object of the present invention is to provide a computer system, an integrated circuit, and a program generation device that can make it difficult for a fraud analyst to specify a secret process.
  • the present invention provides a computer system, which reads and decodes each instruction included in a basic program, a normal program, and a secure program, and according to a result of the decoding.
  • a processor that operates, and a memory unit that includes a management area and a non-management area different from the management area, and the basic program constitutes an operating system, and the management area includes the management area.
  • the normal program includes an instruction to access the management area via the basic program
  • the secure program is a program independent of an operating system, An instruction for accessing only the unmanaged area as an access space is included.
  • the secure program can access an unmanaged area of the operating system without depending on the basic program that is the operating system.
  • the normal program cannot access the non-managed area of the operating system because it can access the management area of the operating system via the basic program that is the operating system.
  • the software debugger cannot access the unmanaged area, and can maintain the safety of accessing the unmanaged area by a secure program! It has an excellent effect.
  • the management area further stores the basic program and the normal program
  • the non-management area further stores the secure program
  • the processor includes the processor Read each instruction included in the basic program and normal program stored in the management area, and store each instruction included in the secure program stored in the non-management area! Even if you read it.
  • the secure program may include a command for performing a concealment process on information to be concealed stored in the non-management area.
  • the software debugger cannot access the confidential information stored in the non-managed area of the operating system by the secure program, and the contents of the confidential information Can be kept safe.
  • the management area further includes a basic program in accordance with an instruction from the basic program.
  • a switching program including an instruction for switching execution to a secure program is stored, and the processor further reads and decodes an instruction included in the switching program stored in the management area,
  • the basic program further includes an instruction for instructing the switching program to switch to a secure program, and the secure program further includes, after the concealment process is completed,
  • the secure program power may also include an instruction for switching execution to the basic program.
  • the switching program includes an instruction for returning the setting of the stack pointer to the one used by the basic program when switching execution from the secure program to the basic program.
  • an instruction for returning the stack pointer setting to that used by the secure program may be included.
  • the setting of the stack pointer is returned to that used by the basic program, so that the basic program processing can be continued.
  • the stack pointer setting is returned to the one used by the secure program, so that the secure program process can be continued.
  • the secure program may be obfuscated! /.
  • the data used by the target software is initialized.
  • the fraud analyst tries to analyze the software to be analyzed using a software initialization sequence.
  • an unauthorized analyst may focus on the data initialization process and identify the location where the confidential information is used.
  • the secure program requires an initialization process, and the initialization process includes a plurality of initialization processes. It may be performed by a program.
  • each initialization process is performed using a plurality of initialization programs, so that the initialization process is divided and distributed, and the location of use of confidential information focused on the data initialization process by an unauthorized analyst Can be difficult to identify.
  • the plurality of initialization programs may be executed prior to the concealment process by the secure program.
  • each initialization process is executed by executing each initialization program prior to the confidential process by the secure program, so that an incorrect initial value is used in the confidential process, and an incorrect process is performed. None done.
  • a part of the plurality of initialization programs may be executed at a time different from that of the other initial programs.
  • Patent Document 1 As a document relating to a high-speed memory initialization process, there is a memory management method disclosed in Patent Document 1. However, this method is not effective for improving the security of the program data initialization process.
  • a part of the initialization program is executed immediately after the computer system is reset, and the initialization program included in the secure program is executed when the execution of the secure program is requested. Also good.
  • the code executed by the secure program (existing on the ROM) and the work memory used by the secure program (existing on the RAM) are areas outside the OS management. This makes it possible to prevent analysis from a software debugger running on the OS.
  • the secure program since the secure program operates in an environment independent of the OS, the portability of the secure program to the OS is very high. Furthermore, since there is no change in the secure program for the OS when porting to another OS, it is possible to port without lowering the security level.
  • FIG. 1 is a system configuration diagram showing a configuration of a secure processing system 1.
  • FIG. 2 is a block diagram showing a configuration of a compiling device 30.
  • FIG. 3 is a block diagram showing a configuration of a compiling device 40.
  • FIG. 4 is a block diagram showing configurations of a memory card 20 and a mobile phone 10.
  • FIG. 5 is an arrangement diagram showing an arrangement of data in a memory 107.
  • FIG. 6 is an arrangement diagram showing the arrangement of each section of binary data.
  • FIG. 7 is a diagram showing a correspondence relationship between physical addresses and logical addresses in the memory 107.
  • FIG. 8 is an arrangement diagram showing the contents of secure program 202 and secure program work memory 602.
  • FIG. 9 is a data structure diagram showing a data structure of an API branch table 800.
  • FIG. 10 is a diagram showing a sequence from when the OS program 210 is started after the reset until the application software operating on the OS is started.
  • FIG. 11 is a diagram showing a sequence until the initialization process of the ZI section of the secure program 202 is completed.
  • FIG. 12 A diagram showing a sequence from the completion of initialization of the ZI section of the secure program 202 to the start of the secure API.
  • FIG. 13 is a diagram showing a sequence when an interrupt occurs during execution of the secure program 202.
  • the secure processing system 1 includes a compiling device 30, a compiling device 40, a mobile phone 10, and a memory card 20, as shown in FIG.
  • the memory card 20 is attached to the mobile phone 10.
  • the compiling device 30 is a source that describes and describes the operation of the kernel of an OS (Operating System, also referred to as basic software or basic program) installed in the mobile phone 10.
  • OS Operating System
  • One or more executable computer programs (referred to as OS-dependent binary data) are generated from a program and other source programs that describe other operations depending on the OS.
  • the compiling device 40 also generates one or more executable computer programs (referred to as OS-independent binary data) from the source program describing other operations that do not depend on the OS.
  • the cellular phone 10 is a computer system including a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like, as will be described later.
  • the OS-dependent binary data and the OS-independent binary data generated as described above are written into the ROM of the mobile phone 10 by the ROM writer.
  • the ROM stores OS-dependent binary data and OS-independent noisy data, which are computer programs, and the cellular phone 10 operates according to the computer program, so that the mobile phone 10 has a part of its functions.
  • Part of the computer program that is OS-dependent binary data constitutes the OS, and the other part operates under the control of the OS.
  • the memory card 20 stores, as an example, encrypted content generated by encrypting music or video content and a content key used for decrypting the encrypted content.
  • the mobile phone 10 operates according to the OS-dependent binary data and the OS-independent binary data written in the ROM, thereby reading the encrypted content from the memory card 20 and using the content key as the read encrypted content. Decrypts using it, generates decryption content, and outputs the generated decrypted content as music or video.
  • the compiling device 30 includes an OS-dependent compiling unit 310, an OS-dependent link unit 320, a format conversion unit 330, and an information storage unit 350.
  • the compiling device 30 generates binary data to be placed in the OS management area of the memory 107 (to be described later) of the mobile phone 10.
  • the compiling device 30 is a computer including a microprocessor, ROM, RAM, a hard disk unit, a display unit, a keyboard, a mouse, and the like. System.
  • a computer program is stored in the RAM or the hard disk unit.
  • the microprocessor power By operating according to the computer program, the OS-dependent compiling unit 310, the OS-dependent link unit 320, and the format converting unit 330 that constitute the compiling device 30 achieve their functions.
  • Information storage unit 350 includes OS kernel source 301a, 301b, 301c,..., Non-secure program source 302a ⁇ 302b ⁇ 302c ⁇ ⁇ secure program call ⁇ source 303a ⁇ 30 3b, 303c, ..., switching device Dry source 304a, 304b, 304c, ⁇ , addressed finale 322, OS dependent library U321a, 321b, 321c, ⁇
  • the OS kernel sources 301a, 301b, 301c, ... are computers that are part of the source code (source program) that describes various processes of the OS installed in the mobile phone 10!
  • the OS kernel source 301a, 30 lb, 301c,... Describes the OS processing in the entire source code.
  • the OS kernel sources 301a, 301b, 301c,... Generally correspond to noisy data stored as an OS program 210 (described later) on the memory 107 of the mobile phone 10.
  • Non-secure program source 302a, 302b, 302c, ⁇ are computer programs that are source codes (source programs) in which non-secure processing is described.
  • the non-secure program source 302a includes instructions and corresponds to binary data stored as a non-secure program 211 (described later) on the memory 107 of the mobile phone 10.
  • the secure program calling unit source 303a describes a process of requesting the switching device driver 213 (described later) to call the V, secure program 202 (described later) stored in the memory 107 of the mobile phone 10.
  • Switching device driver In this embodiment, it is assumed that the processing requested to the server 213 is performed by a library call of the OS program 210. The same applies to the secure program call source 303b, 303c,.
  • the switching device driver source 304a is a computer program that is a source code (source program) in which processing for branching to the processing of the requested secure program 202 is described. It includes instructions and corresponds to the nounary data stored in the memory 107 as the switching device driver 213 (described later).
  • the address specification file 322 is a file that specifies the location address of binary ROM data and RAM data created by the OS-dependent link unit 320.
  • the address specification file 322 includes, for each OS-dependent binary data generated by the OS-dependent link unit 320, a physical address indicating a position to be arranged in the memory of the target device (that is, the mobile phone 10). Including.
  • the OS-dependent compiling unit 310 includes these OS kernel sources 301a, 301b, 301c, ..., non-secure program sources 302a, 302b, 302c, ..., secure program call source sources 303a, 303b, 303c, ... , Switching device dry source source 304a, 304b, 304c, ⁇ ⁇ ⁇ ⁇ input the program code written in a high-level language into low-level machine code (object code), that is, executable computer program Each generates an object file.
  • object code low-level machine code
  • the OS dependent link unit 320 performs relocation and symbol resolution for each object file generated by the OS dependent compiling unit 310, and the OS dependent libraries 321a, 321b, 321c, ... If a function symbol exists, link the relevant OS-dependent library to generate OS-dependent binary data.
  • the OS dependent link unit 320 arranges ROM data and RAM data at the logical address described in the address specification file 322. (4) Format converter 330
  • the format converter 330 converts each OS-dependent binary data generated by the OS-dependent link unit 320 into a format that can be written to the actual ROM memory by the ROM writer, and the OS-dependent binary data 340a, 340b, ... ⁇ And the generated OS dependent binary data 34 0a, 340b, ⁇ are written into the information storage unit 350.
  • Data formats generated by the format converter 330 include the Intel HEX format and the Motorola S record format.
  • the compiling device 30 sets ROMZRAM that is not managed by the OS as shown below.
  • the designated area size “0xlE00000” becomes the OS management RAM area, and the other areas become the RAM area outside the OS management.
  • MAP DESC (logical address, physical address, size, domain attribute, (READ attribute, WRITE attribute, CACHE attribute, BUFFER attribute);
  • the logical address specifies the logical address to be associated with the physical address
  • the physical address specifies the physical address to be associated with the logical address, and the size.
  • the size is specified by associating the logical and physical addresses.
  • the domain attribute specify whether it is the kernel area or the user area.
  • READ attribute set "1" if READ is possible, set “0” if READ is impossible, and "1" if WRITE is possible. If the WRITE is not possible, set “0”.
  • For the CACHE attribute set “1” if the cache is valid, set "0” if the cache is invalid, and set the BUFFER attribute to "1” if the BUFFER is valid. If BUFFER is disabled, set “0”.
  • MAP_DESC (0xFFB00000,0xllF00000,0x000FFFFF, DOMAIN_KERNEL, 0, l, 1,1)
  • MAP_DESC (0xFFA00000,0x00260000,0x000FFFFF, DOMAIN_KERNEL, 0,0, l, 1)
  • the domain attribute of the secure program is the kernel domain, and access from normal software running on the OS is prohibited.
  • the created object file is linked by the OS-dependent link unit 320.
  • the OS-dependent binary data generated by the OS-dependent link unit 320 is converted into a format that can be written in the ROM by the format conversion unit 330, and the OS-dependent binary data 340a, 340b, ... are written to the information storage unit 350.
  • the OS uses only the management area as an access space, and sends instructions to mediate access to the management area to the non-secure program (normal program) and a switching device driver (switching program). On the other hand, it includes an instruction for switching to a secure program.
  • the non-secure program includes an instruction to access the management area via the OS (basic program).
  • the switching device driver (switching program) is set by the OS (basic program) instruction.
  • Base program Includes instructions for switching execution to a secure program.
  • the secure program includes an instruction for accessing only the non-managed area as an access space and accessing the non-managed area.
  • it includes an instruction for switching execution from the secure program to the basic program after completion of the target process of the secure program, for example, the decryption process using the content key of the encrypted content.
  • the compiling device 40 includes an OS-independent compiling unit 410, an OS-independent link unit 420, a format conversion unit 430, and an information storage unit 450.
  • the compiling device 40 generates binary data to be placed in an area outside the OS management of the memory 107 (to be described later) of the mobile phone 10.
  • the compiling device 40 is a computer system including a microprocessor, ROM, RAM, a hard disk unit, a display unit, a keyboard, a mouse, and the like.
  • a computer program is stored in the RAM or the hard disk unit.
  • the microprocessor power according to the computer program
  • the OS-independent compiling unit 410, the OS-independent link unit 420, and the format conversion unit 430 that constitute the compiling device 40 achieve their functions.
  • the information storage unit 450 stores secure program sources 401a, 401b, 401c,..., An address specification file 422, an OS-independent library 421a, 421b, 421c,. It also has an area to store OS-independent binary data 440a, 440b, 440c, ....
  • the secure program source 401a is a computer program that is a source code (source program) in which processing using secret information is described, and includes computer instructions.
  • the secure program source 401a is a code in which a decryption process for decrypting encrypted content is described, and is stored in binary data stored as a secure program 202 (described later) on the memory 107. It corresponds.
  • the addressing file 422 is the same as the addressing file 322 described in FIG. However, since the secure program 202 generated in response to the secure program sources 401a, 401b, 401c,... Is placed in an unmanaged area of the OS program 210, the addressing file 422 is stored in the unmanaged area. Specify an address.
  • the OS-independent compiling unit 410 converts the source code in which the OS-independent processing is described from a high-level language into a low-level machine code (object).
  • the OS-independent compiling unit 410 creates machine code suitable for the CPU 102 architecture.
  • the OS-independent link unit 420 performs rearrangement and symbol resolution, and if necessary, links an OS-independent library to create binary data that can be executed by the CPU 102.
  • OS independent means that the OS dependent libraries 321a, 321b, 321c, ... are not linked.
  • the format conversion unit 430 is the same as the format conversion unit 330 described with reference to FIG.
  • the memory card 20 includes a normal area 120, a secure area 130, an input / output unit 122, and a secure processing unit 132.
  • the memory card 20 includes a microprocessor, ROM, RAM, and the like. Computer system. A computer program is stored in the RAM. Microprocessor power The memory card 20 achieves a part of its functions by operating according to the computer program.
  • the normal area 120 is a storage area that can be freely accessed by an external device.
  • the encrypted content 121 is stored.
  • the secure area 130 is an area that can be accessed only by authorized external devices, and stores the content key 131.
  • the encrypted content 121 is encrypted music data or moving image data, and is encrypted using an encryption algorithm with the content key 131 as an encryption key.
  • Each encrypted data is identified by a content ID.
  • the encrypted content 121 is encrypted by the common key method, and the decrypted content, that is, music data or moving image data is acquired by using the content key 131 as a decryption key. It shall be possible.
  • the input / output unit 122 inputs / outputs various data between the external device, the normal area 120, and the secure processing unit 132.
  • the secure processing unit 132 performs mutual authentication with an external device based on a CPRM (Content Protection for Recordable Media) mechanism, and when the authentication is successful, shares the key with the authenticated device. Use the shared key to securely input and output data with external devices.
  • CPRM Content Protection for Recordable Media
  • the mobile phone 10 includes a debugger IF101, a CPU102, an MMU (Memory Management Unit) 103, an interrupt controller 104, an input unit 105, a display unit 106, a memory 107, an input / output unit 108, and a notch 109. , A code processing unit 110, a DZA conversion unit 111, a wireless communication control unit 112, a speaker 113, a microphone 114, a communication unit 115, and an antenna 116. Each circuit is connected by a bus 117.
  • MMU Memory Management Unit
  • the memory 107 is composed of ROM and RAM, and stores various programs executed by the CPU 102.
  • the CPU 102 includes an instruction fetch unit, an instruction decoder, an arithmetic unit, a program counter, a link register, a stack pointer, etc., fetches an instruction from a program on the memory 107, decodes the fetched instruction, and executes the decoded instruction. .
  • the MMU 103 implements a virtual storage function that converts a logical address into a physical address.
  • the debugger IF101 is an interface for connecting the mobile phone 10 and an external debugger.
  • the interrupt controller 104 detects hardware interrupts such as FIQ and IRQ, software interrupts (SWI), prefetch aborts, data aborts, resets, and other interrupts, and notifies the CPU 102 interrupt detection register to generate interrupts. Is output.
  • hardware interrupts such as FIQ and IRQ, software interrupts (SWI), prefetch aborts, data aborts, resets, and other interrupts.
  • the communication unit 115 transmits and receives information between the wireless communication control unit 112 and an external device connected to the mobile phone network and the Internet via the antenna 116.
  • the wireless communication control unit 112 includes a baseband unit, a modulation / demodulation unit, an amplification unit, and the like, and performs signal processing of various information transmitted / received via the communication unit and the antenna 116.
  • the code processing unit 110 performs a decoding process on the music data stored in the notch 109 according to an encoding technique such as MP3 and outputs the result to the DZA conversion unit 111.
  • the DZA conversion unit 111 converts the music data decoded by the code processing unit 110 into an analog audio signal and outputs the analog audio signal to the speaker 113.
  • the input unit 105 includes various buttons such as a numeric keypad and an enter button, and accepts these operations by the user.
  • the display unit 106 includes a VRAM and a liquid crystal screen, and displays various screens.
  • the microphone 114 converts sound into an electrical signal and outputs the generated electrical signal to the wireless communication control unit 112.
  • the speaker 113 receives an analog signal from the wireless communication control unit 112 and the DZA conversion unit 111, converts the received analog signal into sound, and outputs the sound.
  • the configuration of the memory 107 is shown in FIG.
  • the memory 107 is composed of ROM and RAM.
  • ROM and RAM are not shown separately, but the distinction between ROM and RAM is illustrated in FIG.
  • the memory 107 includes an OS program 210, a non-secure program 211, a secure program calling unit 212, a switching device driver 213, a secure program 202, an IPL (Initial Program Loader) program 201. Is remembered.
  • two memory areas a management area managed by the OS and an unmanaged area that is not managed by the OS, are allocated and used.
  • the non-secure program 211 operating on the OS, the secure program calling unit 212, and the switching device driver 213 are stored in the OS management area.
  • the IPL program 201 and the secure program 202 are stored in an OS unmanaged area. This allocation method will be described later.
  • the secure program 202 since the secure program 202 operates in an unmanaged area that is not managed by the OS, analysis from a software debugger that operates on the OS becomes impossible, and the secure program can be executed in a secure state. Become.
  • IPL program 201 is a code (computer program) written in assembler
  • the IPL program 201 is a ZI section A7 described later.
  • the OS program 210 is an operating system, and is basic software for initializing hardware used by the OS at the time of kernel initialization, setting the MMU103, managing memory, managing files, providing a user interface, and the like.
  • the non-secure program 211, the secure program calling unit 212, and the switching device driver 213 are a group of programs that operate on a memory managed by the OS.
  • the non-secure program 211 is an application that does not require execution in a secure environment. For example, an application for managing the GUI of the mobile phone 10, a program for managing a personal schedule, a music playback application, and the like. During content playback, it is necessary to securely decrypt the encrypted content 121 stored in the memory card 20 using the content key 131 stored in the memory card 20.
  • the music playback application includes a decryption processing request for calling the secure program calling unit 212. This decryption request is issued when the encrypted content 121 using the content key 131 is restored. Indicates a request for issue processing.
  • the secure program calling unit 212 is a calling program for executing the secure program 202, and requests the switching device driver 213 to execute the secure program 202.
  • the switching device driver 213 serves as an interface for transferring processing to the secure program 202 stored in the unmanaged area.
  • the secure program 202 is a program that processes secret information.
  • the secure program 202 is a decryption program that decrypts the encrypted content 121 using the content key 131. Further, immediately after the secure program 202 is activated, the secure program 202 executes a zero initialization process of a ZI section B712, which will be described later.
  • the memory 107 is composed of ROM and RAM.
  • the memory 107 only needs to include a program storage unit that can store a program and a work memory storage unit that can store a work memory used during program operation.
  • HDD Hard Disk Drive
  • EEPROM Electrical Erasable Programmable ROM
  • Flash ROM etc.
  • SDRAM Synchronous DRAM
  • SRAM Static RAM
  • the OS program 210, the non-secure program 211, the secure program calling unit 212, and the switching device driver 213 described above are generated as one or more OS-dependent binary data in the compiling device 30, and the secure program 202 is In 40, it is generated as one or more OS-independent binary data.
  • Each OS dependent binary data is composed of a ZI section 501, an RW section 502, and an RO section 503 as shown in FIG.
  • the ZI section 501 is a zero initialization target data area. At the initialization stage of each program, the data in this section must be initialized with zeros.
  • the RW section 502 is a readable / writable section, and is a section in which readable / writable data is arranged.
  • the RO section 503 is a section that can only be read and in which executable code (instructions) is placed.
  • the memory 107 is not described separately as ROM and RAM, but in fact, as shown in Fig. 6, the ZI section and RW section of each OS-dependent binary data are placed in RAM, The one corresponding to the RO section is placed in the ROM.
  • each OS-independent binary data 440a, 440b, ⁇ generated by the compiling and linking in the compiling device 40 is composed of a ZI section, an RW section, and an RO section, respectively, as shown in FIG. !
  • the ZI sections that make up the secure program 202 must be initialized with zeros. However, if the size of the ZI section is large, the zero initialization process will take time. In electronic devices where the response performance of the terminal is important, we would like to reduce the initialization process time and start up the secure program 202 at high speed.
  • the ZI section is divided into a plurality of subsections, and before the secure program 202 is activated, some subsections are zero-initialized, and the secure program 202 is Immediately after activation, zero initialization processing of the remaining subsections is performed.
  • the initialization process in the secure program 202 can be performed at high speed. This sequence will be described later with reference to FIGS.
  • the address used in each program is a logical address.
  • 03 is converted into a physical address and the memory 107 is actually accessed. That is, the address indicating the storage space formed by the memory 107 in the OS program 210, the non-secure program 211, the secure program calling unit 212, the switching device driver 213, and the secure program 202 is a logical address.
  • the MMU 103 changes a logical address used in these programs to a physical address, and an area indicating a storage space formed by the memory 107 is accessed by the physical address.
  • the MMU 103 is not initialized immediately after the mobile phone 10 is turned on, no logical address is assigned to each program. Also, the physical address and logical address can be converted when the MMU 103 is in a valid state.
  • FIG. 7 shows the correspondence between physical addresses and logical addresses in the memory 107.
  • the memory 107 includes the secure program 202, the IPL program 201, the OS program 210, the non-secure program 211, the secure program call unit 212, and the switching device driver 213.
  • the memory 601 and the secure program work memory 602 are arranged.
  • the secure program 202 is arranged in the non-OS management area 651 on the ROM, and the OS program 210, the non-secure program 211, the secure program calling unit 212, and the switching device driver 213 are in the OS management area on the ROM. It is located at 652. Further, the OS main memory 601 is arranged in the OS management area 653 on the RAM, and the secure program work memory 602 is arranged in the OS non-management area 654 on the RAM.
  • the IPL program 201 exists in the area in the ROM indicated by the physical addresses 0x08000000 to 0x080C0000.
  • the IPL program 201 is a code (program instruction) that is executed before the OS program 210 is activated, and no logical address is assigned to the IPL program 201.
  • the character string following Ox is expressed in hexadecimal.
  • OS program 210 non-secure program 211, secure program calling unit 212 and The switching device driver 213 exists in the ROM area indicated by the physical address 0x080D0000 to ⁇ , and the logical address OxDOOOOOOO to 0xD3D40 000 is assigned to this area by the OS.
  • the OS main memory 601 is the work memory used by the OS and programs running on the OS. It exists in the RAM area from 0x10000000 to OxllEOOOOO, and logical addresses 0xC0000000 to 0xClE00000 are assigned to this area. It is done.
  • the secure program 202 has an execution code (program instruction) of the secure program written therein, and exists in an area in the ROM of the physical addresses 0x00260000 to 0x00350000. This area is assigned logical addresses 0xFFA00000 to OxFFAFFFFF. It is done.
  • the secure program work memory 602 is a work memory used by the secure program 202, and exists in an area in the RAM from the physical addresses OxllFOOOOO to OxllFFFFFF, and logical addresses 0xFFB00000 to OxFFBFFFFF are assigned to this area.
  • the logical address designation as described above is performed in the kernel initialization process of the OS program 210.
  • the address specification file 322 stored in the compiling device 30 and used in the OS-dependent link unit 320 and the address specification file 422 stored in the compiling device 40 and used in the OS-independent link unit 420 are! / As described, the address is assigned.
  • the physical address and the logical address are assigned as described above.
  • the physical address and the logical address are changed depending on the device to be mounted, and the present invention is not limited to this address value. Absent.
  • the secure program work memory 602 is composed of a ZI section A711, a ZI section B712, and an RW section 713 obtained by dividing the ZI section into two!
  • ZI section A711 and ZI section B712 are zero-initialized before the secure program 202 is executed, and data used by the secure program 202 is stored in the ZI section A711 and ZI section B712. Data storage section.
  • the ZI section is divided into a ZI section A711 and a ZI section B712 in order to speed up the initialization process of the secure program 202.
  • the initialization process of the secure program 202 can be performed after the content reproduction request by the user.
  • the time until completion can be shortened, and the waiting time of the user can be shortened.
  • by distributing the initialization processing of the ZI section it is possible to make it difficult for an unauthorized analyst to analyze the secure program 202.
  • the RW section 713 is an area in which read / write data used by the secure program 202 is stored.
  • secure program work memory 602 may be used as a stack area of the secure program 202.
  • Secure program 202 is secure API branch processing 701, ZI section B initialization API
  • rOxFFAOlOOOj “ 0xFFA02000 ”and“ 0xFFA03000 ”are stored in an area in the secure program 202 indicated by the start position.
  • Secure API branch processing 701 is ZI section B initialization API702, secure API—A7
  • API branch table 800 (which will be described later) including branch destination address information to B704 is stored.
  • the identifier for identifying each API of the secure program 202 is the secure program call unit 2 12 to the secure API branch process 701 via the switching device driver 213.
  • the secure API branch process 701 receives an identifier from the switching device driver 213, extracts a branch destination address corresponding to the identifier received from the API branch table 800, and branches execution to the extracted branch destination address.
  • ZI section B initialization API 702 is an execution code (program instruction) for performing zero initialization processing of ZI section B712.
  • the secure API—A703 and the secure API—B704 are execution codes (program instructions) for performing API processing of the secure program, respectively.
  • the secure API of the secure program is not limited to the two forces described as secure API—A703 and secure API—B704. Good.
  • Figure 9 shows the data structure of the API branch table 800.
  • the API branch table 800 includes a plurality of branch destination address information 811, 812, and 813.
  • the branch destination address information 811, 812, and 813 are included in the secure program 202! / It corresponds to Section B Initialization API 702, Secure API—A703, and Secure API—B704, and each branch destination address information includes an identifier and a branch destination address.
  • the identifier is identification information for identifying an API that corresponds to the branch destination address information including the identifier.
  • the branch destination address is a logical address indicating a position where the API corresponding to the branch destination address information including the branch destination address is stored in the secure program 202.
  • branch destination address information 811, 812, and 813 will be further described.
  • the branch destination address information 811 includes an identifier 801 “1” and a branch destination address 802 “0xFFA01000”.
  • the identifier 801 “1” is assigned to the ZI section B initialization API 702, and the start position is indicated by the logical address “0xFFA01000”.
  • the branch destination address information 812 includes an identifier 803 “2” and a branch destination address 8O4 “0xFFA02000”.
  • identifier 803 “2” is assigned to secure API—A703, and in the area within secure program 202 where the start position is indicated by logical address “0xFFA02000”, secure API—A703 is executed. Indicates that a line code (program instruction) is stored.
  • branch destination address information 813 includes an identifier 805 “3” and a branch destination address 8O6 “0xFFA03000” as shown in FIG.
  • the identifier 805 “3” is assigned to the secure API—B704, and the start address is indicated by the logical address “0xFFA03000”! — Indicates that the execution code (program command) of B704 is stored.
  • the API branch table 800 is composed of a plurality of branch destination address information cards including an identifier and a branch destination address.
  • the API branch table 800 is not limited to this configuration, and is not limited to this configuration. It is only necessary to store address information for processing to branch to.
  • the secure program 202 memory 107 is a secure program work memory used as a work memory (RAM) in an area outside the OS management in the memory 107.
  • the initialization process of the secure program RAM data is divided as described above. Specifically, the ZI section initialization process is divided into two stages.
  • the mobile phone 10 receives a reset when the user turns on the power (step S900).
  • Step S901 the IPL program 201 initializes hardware necessary for starting the OS.
  • Step S902 the IPL program 201 performs initialization of data in the ZI section A711.
  • the process branches to the kernel (steps S903 to S904).
  • the MMU 103 is initialized (step S905), and then various devices included in the mobile phone 10 and used by the OS are executed (step S906).
  • step S907 there may be application software that is activated by a user operation.
  • step S907 the function as a mobile phone is enabled, and a state where incoming calls, outgoing calls, etc. can be performed, and a user can perform various operations on the mobile phone.
  • Fig. 11 shows a sequence until the initialization process of the ZI section of the secure program 202 is completed
  • Fig. 12 shows the sequence of the secure API after the initialization of the ZI section of the secure program 202 is completed. The sequence up to startup is shown.
  • step S1000 When the user performs a music playback button operation (step S1000), the OS shifts the processing to the secure program calling unit 212 (steps S1001 to S1002). [0102] Next, the secure program calling unit 212 opens the switching device driver 213 (step S1003), specifies "1" as the identifier, makes a library call to the switching device driver 213, and switches to the switching device. Processing proceeds to driver 213 (steps S 1004 to S 1005).
  • the switching device driver 213 that has received the identifier “1” branches to the secure API branch process 701, and the process moves to the secure API branch process 701 (steps S1006 to S1007).
  • the secure API branch processing 701 returns the stack pointer setting to that used by the secure program 202 (step S1008), and acquires the branch destination address corresponding to the identifier "1" from the API branch table 800. .
  • the branch destination address 8O2 “0xFFA01000” of the ZI section B initialization API 702 corresponding to the identifier “1” is acquired, and the execution code stored in the storage location indicated by the logical address “0xFF A01000J”, that is, ZI Branch to section B initialization API 702 (step S1009 to step S1010).
  • step S1011 the ZI section B initialization API 702 is executed (step S1011). This completes the initialization of ZI section B712.
  • the secure API branch process 701 returns the stack pointer setting to that used by the OS (step S1012).
  • the secure program calling unit 212 designates the identifier of the secure API, makes a library call to the switching device driver 213, and the processing moves to the switching device driver 213 (steps S1015 to S1016).
  • the switching device driver 213 outputs the specified identifier to the secure API branch process 701, and branches to the secure API branch process 701 (steps S1017 to S1018).
  • the secure API branch processing 701 returns the stack pointer setting to that used by the secure program 202 (step S1019), and then receives it from the API branch table 800.
  • the branch destination address corresponding to the identified identifier is acquired and branched to the acquired branch destination address (steps S1020 to S1021).
  • API processing of the secure program 202 stored at the position indicated by the branch destination address is executed (step S 1022).
  • step S1023 the stack pointer setting is returned to the one used by the OS (step S1023), and then the processing moves to the secure program calling unit 212 and the OS (step S1024 to step S1026).
  • step S1015 to step S1026 shown in Fig. 12 may be executed a plurality of times after the processing from step S1000 to step S1014 shown in Fig. 11 is completed.
  • the completion of all the steps shown in Fig. 11 means that the initialization process of the ZI section to be initialized when the secure program is executed is completed.
  • the secure API—A703 is a computer program for acquiring a content key
  • the secure API—B704 is a computer program for decrypting the encrypted content 121 using the content key 131.
  • the content key 131 is acquired. Next, with the identifier set to “3”, all the steps shown in FIG. 12 are executed, whereby the encryption key content 121 is decrypted using the content key 131.
  • the secure program 202 temporarily interrupts processing by the secure program 202 when an interrupt such as IRQ, FIQ, or software interrupt occurs during execution of the secure program 202, and is processed by the secure program 202. After the secure data is encrypted and the processing corresponding to the interrupt is completed, the encrypted data is decrypted and the processing by the secure program 202 is temporarily suspended. Such processing may be executed continuously. Specifically, it is as shown below.
  • An initialization completion flag for the secure program 202 is provided in the ZI section A711 that is an area initialized by IPL or the ZI section B712 that is an area initialized by the secure program 202.
  • the initialization completion flag is set to “1” after the initialization of the ZI section B 712 by the secure program 202 and is always “1” while the secure program 202 is being executed.
  • an initialization completion flag may be provided in the ZI section!
  • an initialization completion flag may be provided in the RW section without being limited to the ZI section.
  • an interrupt such as IRQ, FIQ, or software interrupt occurs, it branches to the CPU exception vector table.
  • an interrupt processing routine is registered for each interrupt factor.
  • the exception vector table branches to the interrupt processing routine for each interrupt factor and performs desired interrupt processing.
  • the exception vector table is registered in advance to branch to the secure program 202 when an interrupt occurs. By doing this, every time an interrupt occurs, the secure program 202 ⁇ — and the process moves.
  • step S1011 When the initialization of ZI section B is completed (step S1011), secure program 202 then sets an initialization completion flag to "1" (step S1201).
  • the initialization completion flag is always “1”.
  • the secure program 202 starts execution of the secure API (step S1022).
  • step S1202 When an interrupt such as IRQ, FIQ, or software interrupt occurs (step S1202), the process moves to the CPU exception vector table. Since the vector is registered in the exception vector table so as to branch to the secure program 202 in advance, the branch is made to the secure program 202 (step S1203).
  • interrupt such as IRQ, FIQ, or software interrupt
  • secure program 202 After branching to secure program 202, secure program 202 has an initialization completion flag. It is determined whether or not “1” (step S 1204).
  • the secure program 202 saves the point when the interrupt occurred because the process targeted for the secure program 202 is being executed. (Step S 1206), and the secure data (runtime data) related to the secure information used by the secure program 202 during execution is encrypted to generate encrypted secure data (Step S 1207). .
  • the process proceeds to OS (step S1208), and the OS performs an interrupt process (step SI 209).
  • the process proceeds to the secure program 202 (step S1210).
  • the secure program 202 determines whether or not the initialization completion flag power is “l” (step S1211).
  • step S1211 If the initialization completion flag is “1” (YES in step S1211), the secure program 202 decrypts the encrypted data and generates decrypted secure data (step S1213), and an interrupt occurs. Thus, the process returns to the point where the processing of the secure program 202 was interrupted (step S1214), and the processing of the secure program 202 is continued (step S1215).
  • the secure program 202 sets the initialization completion flag to "0" (step S1216), and then the secure program 202 is executed. finish.
  • step S1204 If the initialization completion flag is not "1" (NO in step S1204, or step S121
  • the secure program 202 may be a decryption program that decrypts encrypted content, and may be a program that handles confidential information without being limited thereto. .
  • the switching device driver 213 starts from the OS dependent binary data.
  • the secure API branch processing 701 returns the stack pointer setting to that used by the secure program 202, and the stack pointer setting is changed to the OS.
  • switching device driver 213 When switching from OS to secure program, switching device driver 213 saves the stack pointer used by the OS at the time of switching, and saves the stack pointer settings in advance. It may contain instructions to return to the stack pointer. The switching device driver 213 also saves the stack pointer used by the secure program at the time of switching when the secure program power is switched to the OS, and the settings of the stack pointer are saved in advance. It may also contain an instruction to return to the stack pointer.
  • secure API branching process 701 may perform the above.
  • the secure program described above may be a part of the program that constitutes the BIOS (Basic Input / Output System).
  • BIOS Basic Input / Output System
  • the BIOS is generally a group of programs that control peripheral devices such as disk drives, keyboards, and video cards connected to the computer.
  • the compiling device 30 and the compiling device 40 are forces that are assumed to be separate devices.
  • the compiling device 30 and the compiling device 40 may be configured as one compiling device including the components.
  • This compiling device compiles the source code constituting the operating system to generate a first object, a symbol compiling and relocation of the first object, and a program included in the first library.
  • first link part that generates the first software in the executable format that is the operating system and the source code that constitutes the process that uses the confidential information
  • second object Executable second software that also has the processing power to use confidential information by linking the second compiling section that generates the symbol, the symbol resolution and rearrangement of the second object, and the program contained in the second library
  • tamper resistance is provided for a secure program source.
  • a tamper resistance method may be applied to a secure program source!
  • the anti-tampering technique is the addition of unnecessary redundant code that does not affect execution to the original code (program instructions), the replacement of one instruction code with another equivalent instruction code, and the complexity of the control structure Either obfuscation such as dividing one module (a set of program instructions) into multiple modules, or encrypting the original code in advance and decrypting it at runtime.
  • Secure program by applying anti-tampering technique
  • the security level of 202 may be improved.
  • the RAM area where the decrypted code is expanded is an area that the OS cannot access, that is, an unmanaged area.
  • the zero initialization processing of the ZI section A711 is executed from the IPL program 201, and then the content playback request is made by the user. Therefore, the zero initialization process of ZI section B712 is executed, but it is not limited to this.
  • the force for initializing the ZI section with a zero value is not limited to this.
  • a fixed value other than zero for example “0xffif”, may be written to the ZI section.
  • the present invention includes a program storage unit and a data storage unit, the program storage unit stores first software and second software, and the data storage unit
  • the first data storage unit is an area accessible by the first software
  • the second data storage unit is an area accessible by the second software.
  • the secure processing device is characterized in that the first software is inaccessible to the second data storage unit.
  • the first software may be an operating system
  • the second software may be software using secret information.
  • the first compiler takes the source code of the first software as input and outputs the first object, and the first linker functions to link the symbol resolution, rearrangement, and first library of the first object.
  • the first object is input, the first software is output, the first software is executable data created by the first compiler and the first linker, and the second compiler
  • the second compiler is different from the first compiler, receives the source code of the second software, outputs a second object, and the second linker is a different linker from the first linker, It has a function of linking symbol resolution and rearrangement of two objects and a second library group, and taking the second object as an input, Outputs software, the second software, but it may also as an executable data created by the second compiler and the second linker.
  • the second software may be software having resistance to tampering and analysis.
  • the initialization process of the second data storage unit used by the second software may be divided into at least one division initialization process.
  • At least one of the division initialization processes may be executed before the execution request for the second software is generated.
  • the division initialization process may be distributed and stored in the program storage unit so as to be processed before the execution of the second software.
  • the program storage unit may further include an IPL, and the IPL executes at least one of the division initialization processes.
  • the program storage unit may further include a switching device driver, and the processing may be transferred to the switching device driver power, the first software power, or the second software.
  • the switching device driver manages a first stack pointer used by the first software and a second stack pointer used by the second software, and the first software is executed.
  • the switching device driver sets the stack pointer to the first stack pointer, and when the second software is executed, the switching device driver The device driver may set the stack pointer to the second stack pointer.
  • each of the above devices is a computer system including a microprocessor, a ROM, a RAM, and the like.
  • a computer program is stored in the RAM.
  • the computer program is configured by combining a plurality of instruction codes indicating instructions to the computer in order to achieve a predetermined function.
  • Microprocessor power Each device achieves its functions by operating according to the computer program. That is, the microprocessor reads each instruction included in the combo program one by one, decodes the read instruction, and operates according to the decoding result.
  • System L SI is an ultra-multifunctional LSI manufactured by integrating multiple components on a single chip. Specifically, it is a computer system that includes a microprocessor, ROM, RAM, and so on. Stem. A computer program is stored in the RAM. The microphone processor power By operating according to the computer program, the system LSI achieves its functions.
  • each part of the constituent elements constituting each of the above-described devices may be individually made into one chip, or may be made into one chip so as to include a part or all of them. Also, here, it is also called IC, system LSI, super LSI, or ultra LSI, depending on the difference in power integration as LSI.
  • the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. It is also possible to use an FPGA (Field Programmable Gate Array) that can be programmed after LSI manufacture and a reconfigurable processor that can reconfigure the connection and settings of circuit cells inside the LSI!
  • FPGA Field Programmable Gate Array
  • each of the above devices may be configured as an IC card that can be attached to and detached from each device or a single module force.
  • the IC card or the module is a computer system including a microprocessor, ROM, RAM, and the like.
  • the IC card or the module may include the super multifunctional LSI described above.
  • the IC card or the module achieves its function by the microprocessor operating according to the computer program. This IC card or module may be tamper resistant! /.
  • the present invention may be the method described above. Further, the present invention may be a computer program that realizes these methods by a computer, or may be a digital signal that also has the computer program power.
  • the present invention also provides a computer-readable recording medium such as a flexible disk, hard disk, CD-ROM, MO, DVD, DVD-ROM, DVD-RAM, BD (Blu-ray). Disc), semiconductor memory, etc. may be recorded. Further, the present invention may be the computer program or the digital signal recorded on these recording media.
  • the present invention may transmit the computer program or the digital signal via an electric communication line, a wireless or wired communication line, a network typified by the Internet, a data broadcast, or the like.
  • the present invention may also be a computer system including a microprocessor and a memory.
  • the memory may store the computer program, and the microprocessor may operate according to the computer program.
  • the secure processing device and method according to the present invention provide a program using secret information.
  • the analysis from the software debugger running on the OS can be prevented, and the RAM data initialization processing for programs running outside the OS management can be divided. It has the effect of shortening the processing from the occurrence of a user request until the program is started, and is useful as a secure software processing method.
  • Each of the devices that make up the present invention is managed, continuously and repetitively in the content distribution industry that produces and distributes content, and in other industries that handle information that needs to be kept secret. Can be used for
  • each device constituting the present invention can be manufactured and sold in the electric appliance manufacturing industry in a management manner, continuously and repeatedly.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Storage Device Security (AREA)

Abstract

 携帯電話10は、OS、ノンセキュアプログラム、切替デバイスドライバ及びセキュアプログラムに含まれている各命令を読み出し、解読し、その解読結果に応じて動作するCPU102と、管理領域及び管理外領域から構成されるメモリ107とを備える。OSは、管理領域のみをアクセス空間として、ノンセキュアプログラムに対して管理領域へのアクセスを仲介する命令と、切替デバイスドライバに対して、セキュアプログラムへの切替を指示する命令とを含む。ノンセキュアプログラムは、OSを介して、管理領域にアクセスする命令を含む。切替デバイスドライバは、OSの指示により、OSからセキュアプログラムへの実行の切替えを行う命令を含む。セキュアプログラムは、管理外領域のみをアクセス空間とし、管理外領域へアクセスする命令を含む。

Description

明 細 書
コンピュータシステム及びプログラム生成装置
技術分野
[0001] 本発明は、プログラムの不正な改ざんや解析を防止する技術に関する。
背景技術
[0002] プログラムの不正な改ざんや解析を防止する技術にっ 、ては従来から研究されて いる。
例えば、ノ ッケージとして売られているソフトウェアには、違法コピーによる使用を防 ぐために、利用者に対してパスワードの入力を要求するものがある。このようなソフトゥ エアには、パスワードが正しいかどうかをチェックするコード(コンピュータプログラム) が含まれている。不正な利用者が、このソフトウェア内において、何らかの方法により 、このチェックを行うコードが存在する場所を特定し、このチェックを無効にするように このコードに改ざんをカ卩えたとするならば、この不正な利用者は、パスワードを知らな くてもこのソフトウェアを使用することができてしまう。
[0003] また、近年、 PC (パーソナルコンピュータ)で視聴できる有料のデジタルコンテンツ が提供されるようになってきている。この有料のデジタルコンテンツは不正にコピーさ れることを防ぐために暗号ィ匕されており、これを視聴するためのソフトウェアは、暗号 を解くための復号アルゴリズム及び復号鍵を含んでいる。もしも、悪意のあるユーザ 力 視聴用のソフトウェアを解析して、復号鍵を特定することができれば、デジタルコ ンテンッを不正にコピーすることができるソフトウェアを作成することが可能になる。
[0004] 以上のように、ソフトウェアの内容が解析されると、そのソフトウェアやデジタルコンテ ンッによるビジネスが成り立たなくなる。そのため、これらのソフトウェアの解析を防止 する技術は必要不可欠である。
例えば、非特許文献 1では、ソフトウェアの解析を防ぐための基本原則や具体的手 法が記述されている。また、非特許文献 2では、ソフトウェアの解析を防ぐためのツー ルとして開発された TRCS (Tamper Resistant Coding System)の技術課題とその対 策が記述されている。また、非特許文献 3では、ソフトウェアの違法コピーを防ぐため のソフトウェア的な保護手段 (コピープロテ外技術)を無効化されな!/、ようにする技術 が解説されている。
[0005] このようなソフトウェアの不正な解析や改ざんを防ぐ技術を「耐タンパ技術」と呼ぶ. 非特許文献 1:「逆解析や改変からソフトを守る」 日経エレクトロニクス 1998. 1. 5 (P209- 220)
非特許文献 2 :「ソフトウェアの耐タンパ一化技術」富士ゼロックス テク-カルレポート No. 13
非特許文献 3 :「ザ'プロテクト」秀和システム出版 1985年
特許文献 1:特開平 11 15705号公報
発明の開示
発明が解決しょうとする課題
[0006] 複数の OSが普及している現在において、 OS上で動作するソフトウェアデバッガな どの解析ツールが比較的容易に入手できるようになってきて!/、る。
そのため、 OSに依存するライブラリを利用して、 OS上で動作するソフトウェア力 秘 匿情報を第三者に知られることなぐ安全に処理するように、当該ソフトウェアについ てセキュアな実装をした場合であっても、当該ソフトウェアについて、 OS上で動作す るデバッガに対して耐性が低いという問題点がある。すなわち、不正解析者により、 o
S上で動作するデバッガを用いて、 OSに依存するライブラリを呼び出している部分が 特定され、さらに、秘密情報が特定される危険性がある。
[0007] 本発明は、上記問題点に鑑み、不正解析者による秘密の処理の特定を困難にする ことができるコンピュータシステム、集積回路及びプログラム生成装置を提供すること を目的とする。
課題を解決するための手段
[0008] 前記目的を達成するために、本発明は、コンピュータシステムであって、基本プログ ラム、通常プログラム及びセキュアプログラムに含まれている各命令を読み出し、解 読し、その解読結果に応じて動作するプロセッサと、管理領域及び前記管理領域と は異なる管理外領域から構成されるメモリ手段とを備え、前記基本プログラムは、ォ ペレ一ティングシステムを構成し、前記通常プログラムに対して前記管理領域のみを アクセス空間とするアクセスを仲介する命令を含み、前記通常プログラムは、前記基 本プログラムを介して、前記管理領域にアクセスする命令を含み、前記セキュアプロ グラムは、オペレーティングシステムに依存しないプログラムであり、前記管理外領域 のみをアクセス空間としてアクセスする命令を含むことを特徴とする。
発明の効果
[0009] この構成によると、セキュアプログラムは、オペレーティングシステムである基本プロ グラムに依存することなぐオペレーティングシステムの管理外領域にアクセスするこ とが可能である。一方、通常プログラムは、オペレーティングシステムである基本プロ グラムを介して、オペレーティングシステムの管理領域にアクセス可能である力 オペ レーティングシステムの管理外領域に対してはアクセスできな 、ので、通常プログラム
1S 例えばソフトゥヱァデバッガである場合に、ソフトゥヱァデバッガは、管理外領域に アクセスできず、セキュアプログラムによる管理外領域へのアクセスにつ 、ての安全 性を保つことができると!、う優れた効果を奏する。
[0010] ここで、前記管理領域は、さらに、前記基本プログラム及び前記通常プログラムを記 憶しており、前記管理外領域は、さらに、前記セキュアプログラムを記憶しており、前 記プロセッサは、前記管理領域に記憶されている前記基本プログラム、前記通常プロ グラムに含まれて 、る各命令を読み出し、前記管理外領域に記憶されて!、る前記セ キュアプログラムに含まれて 、る各命令を読み出すとしてもよ 、。
[0011] この構成によると、セキュアプログラムは、オペレーティングシステムの管理外領域 に記憶されているので、上記のソフトウェアデバッガは、管理外領域に記憶されてい るセキュアプログラムにアクセスできず、セキュアプログラム自身の内容を安全に保つ ことができる。
ここで、前記セキュアプログラムは、前記管理外領域において格納される秘匿すベ き情報に関する秘匿処理を行う命令を含むとしてもよい。
[0012] この構成によると、上記のソフトウェアデバッガは、前記セキュアプログラムにより、ォ ペレ一ティングシステムの管理外領域において格納される秘匿すべき情報にァクセ スできず、これらの秘匿すべき情報の内容を安全に保つことができる。
ここで、前記管理領域は、さらに、基本プログラムの指示により、基本プログラムから セキュアプログラムへの実行の切替えを行う命令を含む切替プログラムを記憶してお り、前記プロセッサは、さらに、前記管理領域に記憶されている前記切替プログラムに 含まれている命令を読み出し、解読し、その解読結果に応じて動作し、前記基本プロ グラムは、さらに、前記切替プログラムに対して、セキュアプログラムへの切替を指示 する命令を含み、前記セキュアプログラムは、さらに、前記秘匿処理の終了後、セキ ユアプログラム力も基本プログラムへの実行の切替えを行う命令を含むとしてもよい。
[0013] この構成によると、基本プログラム力 秘匿処理が必要な時等に、切替プログラムを 介して、本来アクセスできないセキュアプログラムに一時的に処理を移すことができ、 また、秘匿処理の終了後、再度オペレーティングシステムである基本プログラムに処 理を戻すことができる。これにより、基本プログラム力もでも、セキュアプログラムの安 全性を確保したまま、セキュアプログラムの秘匿処理を利用することができる。
[0014] ここで、前記切替プログラムは、セキュアプログラムから基本プログラムへの実行の 切替えの際に、スタックポインタの設定を基本プログラムが利用するものに戻す命令 を含み、セキュアプログラム力 基本プログラムへの実行の切替えの際に、スタックポ インタの設定をセキュアプログラムが利用するものに戻す命令を含むとしてもよい。 この構成によると、セキュアプログラム力 基本プログラムへの切り替えの際、スタツ クポインタの設定を基本プログラムが利用するものに戻すので、基本プログラムの処 理を続行することができる。また、基本プログラムカもセキュアプログラムへの切り替え の際に、スタックポインタの設定をセキュアプログラムが利用するものに戻すので、セ キュアプログラムの処理を続行することができる。
[0015] ここで、前記セキュアプログラムは、難読化が施されて 、るとしてもよ!/、。
この構成によると、難読ィ匕により、セキュアプログラムの解析が困難となるので、セキ ユアプログラムの安全性をさらに高めることができる。
また、一般にソフトウェアの処理が実行される前に、実行対象となるソフトウェアが利 用するデータは初期化される。不正解析者は、解析対象のソフトウェアの解析を、ソ フトウェア初期化シーケンスカゝら行おうとする。この場合、不正解析者が、データ初期 化処理に注目し、秘密情報の利用場所を特定する可能性がある。
[0016] ここで、前記セキュアプログラムは、初期化処理を必要とし、初期化処理は、複数の プログラムにより行われるとしてもよい。
この構成によると、複数の初期化プログラムを用いて、それぞれの初期化処理が行 われることにより、初期化処理が分割,分散し、不正解析者によるデータ初期化処理 に注目した秘密情報の利用場所の特定を困難にすることができる。
[0017] ここで、前記複数の初期化プログラムは、前記セキュアプログラムによる前記秘匿処 理に先行して実行されるとしてもよ 、。
この構成によると、セキュアプログラムによる秘匿処理に先行して、各初期化プログ ラムに実行により、各初期化処理が行われるので、秘匿処理において、誤った初期 値が使われて、誤った処理が行われることはない。
[0018] ここで、前記複数の初期化プログラムのうちの一部の初期化プログラムは、他の初 期プログラムとは異なる時期にお 、て、実行されるとしてもよ 、。
この構成〖こよると、不正解析者によるデータ初期化処理に注目した秘密情報の利 用場所の特定を、さらに、困難にすることができる。
さらに、携帯電話などの電子機器においても耐タンパ技術を適用する場合、耐タン パ化されたソフトウェア力 利用するメモリサイズは増加する。そのため、前記耐タン パ化されたソフトウェアの初期化処理に要する時間が大きくなつてしまい、即応性の 求められる電子機器においては、ユーザによる所望の処理要求から、実際にソフトゥ エアが処理を開始するまでの初期化処理に多大な時間を要することになつてしまう。
[0019] メモリの初期化処理の高速ィ匕に関する文献として、特許文献 1に示されて 、るメモリ 管理方法がある。しかし、この方法ではプログラムのデータ初期化処理の高速ィ匕ゃセ キユリティの向上に対する効果は得られない。
ここで、一部の初期化プログラムは、当該コンピュータシステムのリセットの直後にお いて実行され、セキュアプログラムに含まれる初期化プログラムは、セキュアプロダラ ムの実行が要求された時に、実行されるとしてもよい。
[0020] この構成によると、 OSに依存しない環境で動作可能なセキュアソフトウェアの初期 化処理を分割'分散することで、ユーザによる所望の処理要求から、実際にセキュア ソフトウェアが処理を開始するまでの処理時間を短縮するとともに、さらに悪意のある 解析者に対する耐性を向上させることができる。 以上説明したように、本発明によると、セキュアプログラムが実行するコード (ROM 上に存在する)およびセキュアプログラムが利用するワークメモリ(RAM上に存在す る)は、 OS管理外の領域としているため、 OS上で動作するソフトウェアデバッガから の解析を防ぐことが可能となる。
[0021] さらに、セキュアプログラムの RAMデータの初期化処理を分割しているため、ユー ザによるセキュアプログラム処理要求発生力 セキュアプログラムの起動までの処理 時間を短縮することができる。
さらに、分割した初期化処理を分散して実行することにより、セキュアプログラムの 初期化処理カゝら解析を行う悪意のある解析者に対して、解析対象範囲を拡大させる ことが可能となるため、解析を困難にし、セキュリティレベルを向上させることができる
[0022] また、セキュアプログラムが OSに依存しない環境で動作するものであるので、セキ ユアプログラムの他 OSへの移植性が非常に高い。さらに、他 OSへ移植する際にもセ キュアプログラムの OS向けの変更が発生しな 、ため、セキュリティレベルを落とすこと なく移植することが可能となる。
図面の簡単な説明
[0023] [図 1]セキュア処理システム 1の構成を示すシステム構成図である。
[図 2]コンパイル装置 30の構成を示すブロック図である。
[図 3]コンパイル装置 40の構成を示すブロック図である。
[図 4]メモリカード 20及び携帯電話 10の構成を示すブロック図である。
[図 5]メモリ 107のデータの配置を示す配置図である。
[図 6]バイナリデータの各セクションの配置を示す配置図である。
[図 7]メモリ 107における物理アドレスと論理アドレスとの対応関係を示す図である。
[図 8]セキュアプログラム 202とセキュアプログラム用ワークメモリ 602の内容を示す配 置図である。
[図 9]API分岐テーブル 800のデータ構造を示すデータ構造図である。
[図 10]リセットの後、 OSプログラム 210を起動し、 OS上で動作するアプリケーションソ フトが起動されるまでのシーケンスを示す図である。 [図 11]セキュアプログラム 202の ZIセクションの初期化処理が完了するまでのシーケ ンスを示す図である。
[図 12]セキュアプログラム 202の ZIセクションの初期化完了後、セキュア APIの起動 までのシーケンスを示す図である。
[図 13]セキュアプログラム 202の実行中に割込みが発生した場合のシーケンスを示 す図である。
符号の説明
10 携帯電話
20 .メモリカード
30 :コンパイル装置
40 :コンノ ィノレ装置
101 デバッガ IZF
102 CPU
103 MMU
104 割込コントローラ
105 入力部
106 表示部
107 メモリ
108 入出力部
109 ノ ッファ
110 符号処理部
111 DZA変換部
112 無線通信制御部
113 スピーカ
114 マイク
115 通信部
116 アンテナ
117 ノ ス 120 通常領域
122 入出力部
130 セキュア領域
132 セキュア処理部
201 IPLプログラム
202 セキュアプログラム
210 OSプログラム
211 ノンセキュアプログラム
212 セキュアプログラム呼出部
213 切替デバイスドライバ
310 OS依存コンパイル部
320 OS依存リンク部
330 形式変換部
350 情報記憶部
410 OS非依存コンパイル部
420 OS非依存リンク部
430 形式変換部
450 情報記憶部
発明を実施するための最良の形態
[0025] 1.実施の形態
以下、本発明に係る 1の実施の形態としてのセキュア処理システム 1について、図 面を参照しながら説明する。
1. 1 セキュア処理システム 1の構成
セキュア処理システム 1は、図 1に示すように、コンパイル装置 30、コンパイル装置 4 0、携帯電話 10及びメモリカード 20から構成されている。メモリカード 20は、携帯電 話 10に装着される。
[0026] コンパイル装置 30は、携帯電話 10に導入される OS (Operating System。基本ソフト ウェア又は基本プログラムとも呼ぶ。)のカーネルの動作にっ 、て記述して 、るソース プログラム、及び当該 OSに依存するその他の動作を記述しているソースプログラム から、 1個以上の実行形式のコンピュータプログラム (OS依存バイナリデータと呼ぶ。 )を生成する。また、コンパイル装置 40は、前記 OSに依存しないその他の動作を記 述しているソースプログラムから、 1個以上の実行形式のコンピュータプログラム(OS 非依存バイナリデータと呼ぶ。)を生成する。
[0027] 携帯電話 10は、後述するように、 CPU (Central Processing Unit)、 ROM (Read On ly Memory)、 RAM (Random Access Memory)などを含んで構成されるコンピュータ システムである。上記にお 、て生成された OS依存バイナリデータ及び OS非依存バ イナリデータは、 ROMライタにより、携帯電話 10が備える ROMに書き込まれる。こう して、 ROMは、コンピュータプログラムである OS依存バイナリデータ及び OS非依存 ノイナリデータを記憶し、前記 CPUが、前記コンピュータプログラムに従って動作す ることにより、携帯電話 10は、その一部の機能を達成する。 OS依存バイナリデータで あるコンピュータプログラムの一部は、 OSを構成しており、他の部分は、当該 OSの 制御の元に動作する。
[0028] メモリカード 20は、一例として、音楽又は映像のコンテンツが暗号ィ匕されて生成され た暗号化コンテンツ及び前記暗号化コンテンツを復号するために用いられるコンテン ッ鍵を記憶している。
携帯電話 10は、 ROMに書き込まれた OS依存バイナリデータ及び OS非依存バイ ナリデータに従って動作することにより、メモリカード 20から暗号ィ匕コンテンツを読み 出し、読み出した暗号ィ匕コンテンツを前記コンテンツ鍵を用いて復号し、復号コンテ ンッを生成し、生成した復号コンテンツを音楽又は映像として出力する。
[0029] 1. 2 コンパイル装置 30の構成
コンパイル装置 (プログラム生成装置とも呼ぶ。) 30は、図 2に示すように、 OS依存 コンパイル部 310、 OS依存リンク部 320、形式変換部 330及び情報記憶部 350から 構成されている。コンパイル装置 30は、携帯電話 10の後述するメモリ 107の OSの管 理領域に配置するバイナリデータを生成する。
[0030] コンパイル装置 30は、具体的には、マイクロプロセッサ、 ROM、 RAM,ハードディ スクユニット、ディスプレイユニット、キーボード、マウスなどから構成されるコンピュータ システムである。前記 RAM又は前記ハードディスクユニットには、コンピュータプログ ラムが記憶されている。前記マイクロプロセッサ力 前記コンピュータプログラムに従つ て動作することにより、コンパイル装置 30を構成する OS依存コンパイル部 310、 OS 依存リンク部 320、形式変換部 330は、その機能を達成する。
[0031] (1)情報記憶部 350
情報記憶部 350は、 OSカーネルソース 301a、 301b, 301c, . . .、ノンセキュアプ ログラムソース 302aゝ 302bゝ 302cゝ…ゝセキュアプログラム呼出咅ソース 303aゝ 30 3b、 303c, · · ·、切替デバイスドライノ ソース 304a、 304b, 304c, · · ·、アドレス指 定フアイノレ 322、 OS依存ライブラ U321a、 321b, 321c, · · ·を記 '慮して ヽる。また、 OS依存バイナリデータ 340a、 340b, 340c, · · ·を記憶するための領域を備えてい る。
[0032] OSカーネルソース 301a、 301b, 301c, · · ·は、それぞれ、携帯電話 10に導入さ れる OSの各種処理を記述して!/、るソースコード(ソースプログラム)の一部分であるコ ンピュータプログラムであってコンピュータ命令を含み、 OSカーネルソース 301a、 30 lb、 301c, · · ·は、これらのソースコード全体で、当該 OS処理を記述している。また 、 OSカーネルソース 301a、 301b, 301c, · · ·は、全体として、携帯電話 10のメモリ 107上に OSプログラム 210 (後述する)として記憶されるノイナリデータに対応してい る。
[0033] ノンセキュアプログラムソース(通常プログラムとも呼ぶ。) 302a、 302b, 302c, · · · は、それぞれ、ノンセキュアな処理が記述されたソースコード(ソースプログラム)であ るコンピュータプログラムであってコンピュータ命令を含み、ノンセキュアプログラムソ ース 302aは、携帯電話 10のメモリ 107上にノンセキュアプログラム 211 (後述する)と して記憶されるバイナリデータに対応して 、る。
[0034] セキュアプログラム呼出部ソース 303aは、携帯電話 10のメモリ 107上に記憶されて V、るセキュアプログラム 202 (後述する)を呼び出すように切替デバイスドライバ 213 ( 後述する)に依頼する処理が記述されたソースコード (ソースプログラム)であるコンビ ユータプログラムであってコンピュータ命令を含み、メモリ 107上にはノンセキュアプロ グラム 211 (後述する)として記憶されるノイナリデータに対応する。切替デバイスドラ ィバ 213に依頼する処理は、本実施の形態では、 OSプログラム 210のライブラリコー ルで行うものとする。セキュアプログラム呼出部ソース 303b、 303c, · · ·についても同 様である。
[0035] 切替デバイスドライバソース 304aは、メモリ 107上のセキュアプログラム呼出部 212 力 依頼されたセキュアプログラム 202の処理へ分岐させる処理が記述されたソース コード(ソースプログラム)であるコンピュータプログラムであってコンピュータ命令を含 み、メモリ 107上には切替デバイスドライバ 213 (後述する)として記憶されるノイナリ データに対応する。
[0036] アドレス指定ファイル 322は、 OS依存リンク部 320によって作成されるバイナリの R OMデータや RAMデータの配置アドレスを指定するファイルである。例えば、ァドレ ス指定ファイル 322は、 OS依存リンク部 320により生成される各 OS依存バイナリデ ータについて、ターゲット装置(つまり、携帯電話 10)のメモリにおいて、配置されるべ き位置を示す物理アドレスを含む。
[0037] (2) OS依存コンパイル部 310
OS依存コンパイル部 310は、これらの OSカーネルソース 301a、 301b, 301c, · · ·、ノンセキュアプログラムソース 302a、 302b, 302c, · · ·、セキュアプログラム呼出 部ソース 303a、 303b, 303c, · · ·、切替デバイスドライノくソース 304a、 304b, 304c 、 · · ·を入力とし、高級言語で記述されたプログラムコードを低レベルなマシンコード( オブジェクトコード)、つまり、実行形式のコンピュータプログラムに変換して、それぞ れ、オブジェクトファイルを生成する。
[0038] (3) OS依存リンク部 320
OS依存リンク部 320は、 OS依存コンパイル部 310で生成された各オブジェクトファ ィルに対し、再配置とシンボルの解決を行い、各オブジェクトファイル内に OS依存ラ イブラリ 321a、 321b, 321c, · · ·の関数シンボルが存在するのであれば、関連する OS依存ライブラリをリンクして、 OS依存バイナリデータを生成する。
[0039] OS依存リンク部 320は、アドレス指定ファイル 322が指定されると、アドレス指定フ アイル 322内に記載された論理アドレスにおいて ROMデータ、 RAMデータを配置 する。 (4)形式変換部 330
形式変換部 330は、 OS依存リンク部 320により生成された各 OS依存バイナリデー タを、 ROMライターにより実際の ROMメモリに書き込み可能な形式に変換して、 OS 依存バイナリデータ 340a、 340b, · · ·を生成し、生成した OS依存バイナリデータ 34 0a、 340b, · · ·を情報記憶部 350へ書き込む。形式変換部 330により生成されるデ ータ形式には、インテル HEX形式やモトローラ Sレコード形式などがある。
[0040] (5) 03管理外の1^01^71^^1の設定
コンパイル装置 30は、以下に示すようにして、 OS管理外の ROMZRAMの設定を 行う。
(a) OS管理外の RAM領域の確保
例えば、物理アドレス「0x10000000」力 物理アドレス「0x11FFFFFFJまでをアクセス 対象のメモリ空間として扱うことができる OSに対して、物理アドレス「0x10000000」から 物理アドレス「0x11E00000」までを OS管理の RAM領域として割り当て、物理アドレス 「0x11F00000J力 物理アドレス「0x11FFFFFFJまでを OS管理外の RAM領域として 割り当てる場合には、カーネル起動時に必要な RAMメモリパラメタのサイズを「0xlE 00000」(バイト)と指定して、コンパイルする。
[0041] これにより、物理アドレス「0x10000000」から、指定されたサイズ「0xlE00000」の領域 力 OS管理の RAM領域となり、その他の領域が、 OS管理外の RAM領域となる。
(b)セキュアプログラム用の OS管理外の ROM領域と OS管理外の RAM領域の物 理 餘理のマッピングの設定
セキュアプログラム用の OS管理外の ROM領域と OS管理外の RAM領域の物理 —論理のマッピングを設定する場合には、以下に示すようにする。
[0042] OSカーネルのメモリマッピングを指定するソースファイルにおいては、メモリマップ を指定する構造体が存在する。 Linuxの場合は、メモリマップ指定の構造体として、 map― desc standard― ιο― desc口― mitdata
が用意されている。
static struct map― desc standard― ιο― desc口― initdata= {
MAP DESC (論理アドレス、物理アドレス、サイズ、ドメイン属性、 READ属性、 WRITE属性、 CACHE属性、 BUFFER属性); ここで、論理アドレスでは、物理アドレスに対応付けたい論理アドレスを指定し、物 理アドレスでは、論理アドレスに対応付けたい物理アドレスを指定し、サイズでは、上 記アドレス力も論理 ·物理アドレスの対応付けを行 ヽた 、サイズを指定する。ドメイン 属性では、カーネル領域かユーザ領域なのかを指定し、 READ属性では、 READ可な ら「1」を設定し、 READ不可なら「0」を設定し、 WRITE属性では、 WRITE可なら「1」を 設定し、 WRITE不可なら「0」を設定し、 CACHE属性では、キャッシュ有効なら「1」を 設定し、キャッシュ無効なら「0」を設定し、 BUFFER属性では、 BUFFER有効なら「1」 を設定し、 BUFFER無効なら「0」を設定する。
[0043] 後述する図 7に示すように、 OS管理外の ROM、 RAMを指定する場合には、この 構造体に対して、以下のように、ソースファイルに記述し、このソースファイルを含む力 一ネルソースファイルをコンパイルする。
static struct map― aesc standard― ιο― desc[]― initdata= {
MAP_DESC(0xFFB00000,0xllF00000,0x000FFFFF,DOMAIN_KERNEL,0,l ,1,1)
/*セキュアプログラム用 RAM*/
MAP_DESC(0xFFA00000,0x00260000,0x000FFFFF,DOMAIN_KERNEL,0,0,l , 1)
/*セキュアプログラム用 ROM*/ なお、セキュアプログラムのドメイン属性は、カーネルドメインとし、 OS上で動作する 通常ソフトウェアからのアクセスを禁止する。
[0044] さらに、セキュアプログラムのメモリへのアクセスは、切替デバイスドライバ経由で実 行されるため、デバイスドライバから、 READ/WRITE実行可能かつ CPUキャッシュが 有効であることか必要である。
(6)まとめ
以上説明したように、 OSカーネルソース 301a、 301b, 301c, · · ·、ノンセキュアプ ログラムソース 302aゝ 302bゝ 302cゝ…ゝセキュアプログラム呼出咅ソース 303aゝ 30 3b、 303c, · · ·、切替デノ イスドライノ ソース 304a、 304b, 304c, それぞれ 、 OS依存コンパイル部 310によりコンパイルされ、コンパイルによって作成されたォ ブジェクトファイルは OS依存リンク部 320によりリンク処理が行われる。 OS依存リンク 部 320によって生成された OS依存バイナリデータは、形式変換部 330により、 ROM に書き込める形式に変換され、 OS依存バイナリデータ 340a、 340b, · · ·が情報記 憶部 350に書き込まれる。
[0045] OS (基本プログラム)は、前記管理領域のみをアクセス空間とし、ノンセキュアプロ グラム (通常プログラム)に対して前記管理領域へのアクセスを仲介する命令と、切替 デバイスドライバ (切替プログラム)に対して、セキュアプログラムへの切替を指示する 命令とを含む。
ノンセキュアプログラム (通常プログラム)は、 OS (基本プログラム)を介して、前記管 理領域にアクセスする命令を含む。
[0046] 切替デバイスドライバ (切替プログラム)は、 OS (基本プログラム)の指示により、 OS
(基本プログラム)セキュアプログラムへの実行の切替えを行う命令を含む。
セキュアプログラムは、前記管理外領域のみをアクセス空間とし、前記管理外領域 へアクセスする命令を含む。また、セキュアプログラムの対象処理、例えば、暗号化コ ンテンッの前記コンテンツ鍵を用いた復号の処理の終了後、セキュアプログラムから 基本プログラムへの実行の切替えを行う命令を含む。
[0047] 1. 3 コンパイル装置 40の構成
コンパイル装置 (プログラム生成装置とも呼ぶ。)40は、図 3に示すように、 OS非依 存コンパイル部 410、 OS非依存リンク部 420、形式変換部 430及び情報記憶部 450 力も構成されている。コンパイル装置 40は、携帯電話 10の後述するメモリ 107の OS の管理外領域に配置するバイナリデータを生成する。
[0048] コンパイル装置 40は、具体的には、マイクロプロセッサ、 ROM、 RAM,ハードディ スクユニット、ディスプレイユニット、キーボード、マウスなどから構成されるコンピュータ システムである。前記 RAM又は前記ハードディスクユニットには、コンピュータプログ ラムが記憶されている。前記マイクロプロセッサ力 前記コンピュータプログラムに従つ て動作することにより、コンパイル装置 40を構成する OS非依存コンパイル部 410、 O S非依存リンク部 420、形式変換部 430は、その機能を達成する。
[0049] 情報記憶部 450は、セキュアプログラムソース 401a、 401b, 401c, · · ·、アドレス 指定ファイル 422、 OS非依存ライブラリ 421a、 421b, 421c, · · ·を記憶している。ま た、 OS非依存バイナリデータ 440a、 440b, 440c, · · ·を記憶するための領域を備 えている。
セキュアプログラムソース 401aは、秘密情報を利用した処理が記述されて 、るソ一 スコード(ソースプログラム)であるコンピュータプログラムであってコンピュータ命令を 含む。このセキュアプログラムソース 401aは、本実施の形態では、暗号化コンテンツ を復号するための復号処理が記述されたコードであり、メモリ 107上にセキュアプログ ラム 202 (後述する)として記憶されるバイナリデータに対応している。セキュアプログ ラムソース 401b、 401c, · · ·についても同様である。
[0050] アドレス指定ファイル 422は、図 2で説明したアドレス指定ファイル 322同じであるの で説明を省略する。ただし、セキュアプログラムソース 401a、 401b, 401c, · · ·、に 対応して生成されるセキュアプログラム 202等を、 OSプログラム 210の管理外領域に 配置するため、アドレス指定ファイル 422は、管理外領域のアドレスを指定する。
[0051] OS非依存コンパイル部 410は、 OS非依存な処理が記述されたソースコードを高 級言語から低レベルなマシンコード (オブジェクト)に変換する。 OS非依存コンパイル 部 410は、 CPU102のアーキテクチャに合ったマシンコードを作成する。
OS非依存リンク部 420は、再配置とシンボル解決を行い、必要であれば OS非依 存ライブラリをリンクし CPU102で実行可能なバイナリデータを作成する。 OS非依存 とは、 OS依存ライブラリ 321a、 321b, 321c, · · ·をリンクしないことを示している。
[0052] 形式変換部 430は、図 2で説明した形式変換部 330と同じであるので説明を省略 する。
1. 4 メモリカード 20の構成
メモリカード 20は、図 4に示すように、通常領域 120、セキュア領域 130、入出力部 122、セキュア処理部 132から構成される。
[0053] メモリカード 20は、具体的には、マイクロプロセッサ、 ROM、 RAMなどから構成さ れるコンピュータシステムである。前記 RAMには、コンピュータプログラムが記憶され ている。前記マイクロプロセッサ力 前記コンピュータプログラムに従って動作すること により、メモリカード 20は、その一部の機能を達成する。
通常領域 120は、外部機器により自由にアクセスできる記憶領域であり、本実施の 形態では暗号化コンテンッ 121が記憶されて 、る。
[0054] セキュア領域 130は、許可された外部機器のみがアクセスできる領域であり、コンテ ンッ鍵 131が記憶されて 、る。
暗号ィ匕コンテンツ 121は、暗号ィ匕された音楽データまたは動画データであり、コン テンッ鍵 131を暗号鍵として暗号アルゴリズムを用いて暗号化されたデータである。 各暗号化データは、コンテンツ IDにより識別される。なお、本実施の形態では、暗号 化コンテンツ 121は共通鍵方式で暗号化されているものとし、コンテンツ鍵 131を復 号鍵として用いることにより、復号されたコンテンツ、すなわち音楽データまたは動画 データを取得可能であるものとする。
[0055] 入出力部 122は、外部機器と通常領域 120とセキュア処理部 132との間での各種 データを入出力する。
セキュア処理部 132は、外部機器との間で、 CPRM (Content Protection for Recor dable Media)の仕組みに基づいて相互認証を行い、認証に成功した場合に、認証し た機器と鍵を共有する。共有した鍵を用いて、外部機器との間で安全にデータの入 出力を行う。なお、 CPRMは公知であるので説明を省略する。
[0056] 1. 5 携帯電話 10の構成
携帯電話 10は、図 4に示すように、デバッガ IF101、 CPU102、 MMU (Memory M anagement Unit ) 103、割込コントローラ 104、入力部 105、表示部 106、メモリ 107、 入出力部 108、ノ ッファ 109、符号処理部 110、 DZA変換部 111、無線通信制御 部 112、スピーカ 113、マイク 114、通信部 115、アンテナ 116から構成され、各回路 はバス 117で接続されて!、る。
[0057] (1)携帯電話 10の各構成要素
メモリ 107は、 ROMおよび RAMから構成され、 CPU102により実行される各種プ ログラムを記憶している。 CPU102は、命令フェッチ部、命令デコーダ、演算器、プログラムカウンタ、リンクレ ジスタ、スタックポインタなどを備え、メモリ 107上のプログラムから命令をフェッチし、 フ ツチした命令を解読し、解読した命令を実行する。
[0058] MMU103は、論理アドレスを物理アドレスに変換する仮想記憶機能を実現する。
デバッガ IF101は、携帯電話 10と外部のデバッガとを接続するためのインターフエ ースである。
割込コントローラ 104は、 FIQ、 IRQなどのハードウェア割込みやソフトウェア割込 み(SWI)、プリフェッチアボート、データアボート、リセットなどの各種割込みを検知し 、 CPU102の割込検出用のレジスタへ割込み発生通知を出力する。
[0059] 通信部 115は、無線通信制御部 112と、携帯電話網、インターネットに接続された 外部機器との間でアンテナ 116を介して情報の送受信を行う。
無線通信制御部 112は、ベースバンド部、変復調部、増幅部などを備えており、通 信部およびアンテナ 116を介して送受信される各種情報の信号処理を行う。
符号処理部 110は、ノ ッファ 109に記憶されている音楽データに MP3などの符号 化技術に従った復号処理を施し、 DZA変換部 111へ出力する。
[0060] DZA変換部 111は、符号処理部 110により復号された音楽データをアナログ音声 信号に変換し、スピーカ 113へ出力する。
入力部 105は、テンキー、決定ボタンなどの各種ボタンを備え、利用者によるこれら の操作を受け付ける。
表示部 106は、 VRAM、液晶画面を備え、各種の画面を表示する。
[0061] マイク 114は、音を電気信号に変換し、生成した電気信号を無線通信制御部 112 へ出力する。
スピーカ 113は、無線通信制御部 112および DZA変換部 111から、アナログ信号 を受け取り、受け取ったアナログ信号を音に変換して出力する。
(2)メモリ 107の構成
メモリ 107の構成を図 5に示す。メモリ 107は、 ROMと RAMから構成される。図 5で は、 ROMと RAMとを区別して図示していないが、 ROMと RAMとの区別は、図 7に おいて図示している。 [0062] 一例として図 5に示すように、メモリ 107は、 OSプログラム 210、ノンセキュアプログ ラム 211、セキュアプログラム呼出部 212、切替デバイスドライバ 213、セキュアプログ ラム 202、 IPL (Initial Program Loader)プログラム 201を記憶している。
さらに、本実施の形態では、メモリ 107〖こ、 OSが管理する管理領域と OSの管理外 である管理外領域との 2つを割り当てて利用する。 OS上で動作するノンセキュアプロ グラム 211、セキュアプログラム呼出部 212、切替デバイスドライバ 213は、 OSの管 理領域に記憶される。一方、 IPLプログラム 201、セキュアプログラム 202は OSの管 理外領域に記憶される。この割り当て方法については、後述する。
[0063] このようにセキュアプログラム 202は、 OSの管理外の管理外領域で動作するため、 OS上で動作するソフトウェアデバッガからの解析が不可能となり、セキュア状態でセ キュアプログラムの実行が可能となる。
(各プログラムの説明)
IPLプログラム 201は、アセンブラで書かれたコード(コンピュータプログラム)であり
、 OSが起動するために必要なハードウェアの初期化を行い、 OSのカーネル初期化 処理へ分岐する命令を含む。また、 IPLプログラム 201は、後述する ZIセクション A7
11のデータの初期化を実施する命令を含む。
[0064] OSプログラム 210は、オペレーティングシステムであり、カーネル初期化時に OSが 利用するハードウェアの初期ィ匕、 MMU103の設定やメモリ管理やファイルの管理、 ユーザーインターフェースの提供等を行う基本ソフトウェアである。 ノンセキュアプログラム 211とセキュアプログラム呼出部 212と切替デバイスドライバ 213は、 OSが管理するメモリで動作するプログラム群である。
[0065] ノンセキュアプログラム 211は、セキュア環境での実行を必要としないアプリケーショ ンである。例えば、携帯電話 10の GUIを管理するアプリケーションや個人のスケジュ ールを管理するプログラムや音楽再生アプリケーション等である。コンテンツ再生時、 メモリカード 20に記憶されている暗号ィ匕コンテンツ 121に対して、メモリカード 20に記 憶されているコンテンツ鍵 131を用いて、セキュアに復号処理を施す必要がある。音 楽再生アプリケーションは、セキュアプログラム呼出部 212を呼び出す復号処理要求 を含む。この復号処理要求は、コンテンツ鍵 131を用いた暗号化コンテンツ 121の復 号処理の要求を示す。
[0066] セキュアプログラム呼出部 212は、セキュアプログラム 202を実行するための呼出プ ログラムであり、切替デバイスドライバ 213にセキュアプログラム 202の実行を依頼す る。
切替デバイスドライバ 213は、管理外領域に記憶されたセキュアプログラム 202へ 処理を移すインターフェースの役割をする。
[0067] セキュアプログラム 202は、秘密情報を扱って処理を行うプログラムである。本実施 の形態では、セキュアプログラム 202は、暗号化コンテンツ 121をコンテンツ鍵 131を 用いて復号する復号プログラムである。また、セキュアプログラム 202は、当該セキュ ァプログラム 202の起動直後に、後述する ZIセクション B712のゼロ初期化処理を実 行する。
[0068] なお、本実施の形態において、メモリ 107は、 ROMと RAMと力も構成されるとして いるが、これに限定するわけではない。メモリ 107は、プログラムが記憶できるプロダラ ム記憶部と、プログラム動作時に利用するワークメモリが記憶できるワークメモリ記憶 手段とを備えていればよい。例えば、プログラム記憶手段として、 HDD (Hard Disk D rive )や EEPROM (Electrically Erasable Programmable ROM )や FlashROMなど を利用してもよいし、ワークメモリ記憶手段として、 SDRAM (Synchronous DRAM )、 SRAM (Static RAM )などを利用してもよい。
[0069] 上述した OSプログラム 210、ノンセキュアプログラム 211、セキュアプログラム呼出 部 212及び切替デバイスドライバ 213は、コンパイル装置 30において、 1個以上の O S依存バイナリデータとして生成され、セキュアプログラム 202は、コンパイル装置 40 にお 、て、 1個以上の OS非依存バイナリデータとして生成される。
こうして生成された 1個以上の OS依存バイナリデータと 1個以上の OS非依存バイ ナリデータとが、 ROMライタにより、 ROMに書き込まれる。図 5は、こうして ROMに 書き込まれた結果を示して!/ヽる。
[0070] (各バイナリデータのセクション構成)
ここで、コンパイル装置 30におけるコンノ ィル及びリンクにより生成された各 OS依 存バイナリデータのセクション構成について説明する。 各 OS依存バイナリデータは、図 6に示すように、 ZIセクション 501、 RWセクション 5 02及び ROセクション 503から構成されて!、る。
[0071] ZIセクション 501は、ゼロ初期化対象データ領域である。各プログラムの初期化の 段階で、このセクション内のデータは、ゼロで初期化されなければならない。
RWセクション 502は、読み書き可能なセクションであり、読み書き可能なデータが 配置されるセクションである。
ROセクション 503は、読み込みのみ可能なセクションであり、実行可能なコード (命 令)が配置されるセクションである。
[0072] 図 5では、メモリ 107内を ROMと RAMに区別して記述していないが、実際は、図 6 に示すように、各 OS依存バイナリデータの ZIセクションと RWセクションは RAMに配 置され、 ROセクションに対応するものは ROMに配置される。
また、コンパイル装置 40におけるコンノィル及びリンクにより生成された各 OS非依 存バイナリデータ 440a、 440b, · · 'も、それぞれ、図 6に示すように、 ZIセクション、 R Wセクション及び ROセクションから構成されて!、る。
[0073] セキュアプログラム 202が起動する前に、セキュアプログラム 202を構成する ZIセク シヨンは、ゼロで初期化されなければならない。し力し、 ZIセクションのサイズが大きい と、ゼロ初期化処理に時間を要することになる。端末の応答性能が重要とされる電子 機器においては、初期化処理の時間をなるベく削減して、セキュアプログラム 202の 起動を高速に行いたい。
[0074] この高速化のために、 ZIセクションを複数のサブセクションに分割し、セキュアプロ グラム 202が起動される以前に、一部のサブセクションのゼロ初期化処理を行い、セ キュアプログラム 202が起動された直後に、残りのサブセクションのゼロ初期化処理を 行う。このように、初期化処理を分割することにより、セキュアプログラム 202における 初期化処理の高速ィ匕が可能となる。このシーケンスについては、図 10及び図 11を用 いて、後述する。
[0075] (メモリ 107の論理アドレスと物理アドレス)
次に、メモリ 107の論理アドレスと物理アドレスの関係について簡単に説明をする。 各プログラム中において用いられるアドレスは、論理アドレスであり、これを MMU1 03が物理アドレスに変換して実際にメモリ 107にアクセスする。つまり、上述した OS プログラム 210、ノンセキュアプログラム 211、セキュアプログラム呼出部 212、切替デ バイスドライバ 213及びセキュアプログラム 202にお!/、て、メモリ 107が形成する記憶 空間を指し示すアドレスは、論理アドレスであり、 MMU103は、これらのプログラムに おいて用いられる論理アドレスを物理アドレスへ変更し、物理アドレスにより、メモリ 10 7が形成する記憶空間を指し示す領域へのアクセスが行われる。
[0076] 携帯電話 10の電源が投入された直後であって、 MMU103の初期化が行われて いない場合には、各プログラムには、論理アドレスは割り当てられない。また、物理ァ ドレスと論理アドレスの変換作業が可能となるのは、 MMU103が有効な状態にある ときである。
(メモリ 107のメモリマップ)
メモリ 107における物理アドレスと論理アドレスとの対応関係を図 7に示す。
[0077] メモリ 107には、上述したように、セキュアプログラム 202、 IPLプログラム 201、 OS プログラム 210、ノンセキュアプログラム 211、セキュアプログラム呼出部 212及び切 替デバイスドライバ 213が配置され、また、 OS用メインメモリ 601及びセキュアプログ ラム用ワークメモリ 602が配置されて!、る。
ここで、セキュアプログラム 202は、 ROM上における OSの管理外領域 651に配置 され、 OSプログラム 210、ノンセキュアプログラム 211、セキュアプログラム呼出部 21 2及び切替デバイスドライバ 213は、 ROM上における OSの管理領域 652に配置さ れている。また、 OS用メインメモリ 601は、 RAM上における OSの管理領域 653に配 置され、セキュアプログラム用ワークメモリ 602は、 RAM上における OSの管理外領 域 654に配置されている。
[0078] 物理アドレス 0x08000000から 0x080C0000により示される ROM内の領域に、 IPLプ ログラム 201が存在する。 IPLプログラム 201は、 OSプログラム 210が起動する前に 実行されるコード(プログラム命令)であり、 IPLプログラム 201には、論理アドレスは 割り当てられていない。なお、本明細書において、 Oxに続く文字列は、 16進数による 表現である。
[0079] OSプログラム 210、ノンセキュアプログラム 211、セキュアプログラム呼出部 212及 び切替デバイスドライバ 213は、物理アドレス 0x080D0000から ΟχΟΒΕΙΟΟΟΟにより示さ れる ROM内の領域に存在し、この領域には、論理アドレス OxDOOOOOOOから 0xD3D40 000が OSにより割り当てられる。
OS用メインメモリ 601は、 OSや OS上で動作するプログラムが利用するワークメモリ であり、物理アドレスが 0x10000000から OxllEOOOOOの RAM内の領域に存在し、この 領域には、論理アドレス 0xC0000000から 0xClE00000が割り当てられる。
[0080] セキュアプログラム 202は、セキュアプログラムの実行コード(プログラム命令)が書 かれており、物理アドレス 0x00260000から 0x00350000の ROM内の領域に存在し、こ の領域には、論理アドレス 0xFFA00000から OxFFAFFFFFが割り当てられる。
セキュアプログラム用ワークメモリ 602は、セキュアプログラム 202が利用するワーク メモリであり、物理アドレス OxllFOOOOOから OxllFFFFFFの RAM内の領域に存在し、 この領域には、論理アドレス 0xFFB00000から OxFFBFFFFFが割り当てられる。
[0081] 上述したような論理アドレスの指定は、 OSプログラム 210のカーネルの初期化処理 において行われる。
なお、コンパイル装置 30が記憶し OS依存リンク部 320において用いられるアドレス 指定ファイル 322、及びコンパイル装置 40が記憶し OS非依存リンク部 420において 用いられるアドレス指定ファイル 422にお!/、ては、上述したようにアドレスが割り当てら れるように記述されて 、る。
[0082] なお、本実施の形態では、上述したように物理アドレス及び論理アドレスを割り当て ているが、実装対象の機器によって変わるものであり、本発明が、このアドレス値に限 定されるわけではない。
(セキュアプログラム 202とセキュアプログラム用ワークメモリ 602)
次に、セキュアプログラム 202とセキュアプログラム用ワークメモリ 602の内容につい て、図 8を用いて、さらに詳しく説明する。
[0083] セキュアプログラム用ワークメモリ 602は、 ZIセクションを 2個に分割した ZIセクション A711、 ZIセクション B712及び RWセクション 713から構成されて!、る。
ZIセクション A711及び ZIセクション B712は、セキュアプログラム 202が実行される 前にゼロ初期化され、セキュアプログラム 202により利用されるデータが格納されるデ ータ格納セクションである。本実施の形態では、セキュアプログラム 202の初期化処 理を高速にするために、 ZIセクションは、 ZIセクション A711及び ZIセクション B712 に分割されている。
[0084] セキュアプログラム用ワークメモリ 602の ZIセクションのゼロ初期化処理にお!、ては 、携帯電話 10の電源が投入された直後に、 IPLプログラム 201により、 ZIセクション A 711のゼロ初期化処理が実行され、次にユーザによるコンテンツ再生要求がされ、セ キュアプログラム 202の起動直後に、セキュアプログラム 202により、 ZIセクション B71 2のゼロ初期化処理が実行される。
[0085] このようにユーザによるコンテンツ再生要求がされるよりも前に、 ZIセクション A711 のゼロ初期化処理を行っておくことにより、ユーザによるコンテンツ再生要求後からセ キュアプログラム 202の初期化処理が完了するまでの時間を短縮することができ、ュ 一ザの待ち時間を短縮することが可能となる。また、 ZIセクションの初期化処理を分 散させることにより、不正解析者によるセキュアプログラム 202の解析を困難にさせる ことも可能となる
RWセクション 713は、セキュアプログラム 202が利用する読み書き可能なデータが 格納される領域である。
[0086] なお、セキュアプログラム用ワークメモリ 602は、セキュアプログラム 202のスタック領 域として利用してもよい。
セキュアプログラム 202は、セキュア API分岐処理 701、 ZIセクション B初期化 API
702、セキュア API— A703及びセキュア API— B704から構成される。
[0087] セキュア API分岐処理 701、 ZIセクション B初期化 API702、セキュア API— A703 及びセキュア API— B704は、図 8に示すように、それぞれ、論理アドレス「0xFFA000
00」、 rOxFFAOlOOOj ,「0xFFA02000」及び「0xFFA03000」により開始位置が示される セキュアプログラム 202内の領域に格納されて 、る。
セキュア API分岐処理 701は、 ZIセクション B初期化 API702、セキュア API— A7
03及びセキュア API— B704のそれぞれへの分岐先アドレス情報を含む API分岐テ 一ブル 800 (後述する)を格納して 、る。
[0088] セキュアプログラム 202の各 APIを識別する識別子は、セキュアプログラム呼出部 2 12から、切替デバイスドライバ 213を経由し、セキュア API分岐処理 701へ出力され る。セキュア API分岐処理 701は、切替デバイスドライバ 213より識別子を受け取り、 API分岐テーブル 800から受け取った識別子に対応する分岐先アドレスを抽出し、 抽出した分岐先アドレスへ実行を分岐する。
[0089] ZIセクション B初期化 API702は、 ZIセクション B712のゼロ初期化処理を行う実行 コード (プログラム命令)である。
セキュア API— A703及びセキュア API— B704は、それぞれ、セキュアプログラム の API処理を行う実行コード(プログラム命令)である。
なお、本実施の形態 1では、セキュアプログラムのセキュアな APIをセキュア API— A703及びセキュア API— B704の 2個として説明している力 2個に限定するわけで はなぐ 2個以上存在してもよい。
[0090] (API分岐テーブル 800のデータ構造)
API分岐テーブル 800のデータ構造を図 9に示す。
API分岐テーブル 800は、複数の分岐先アドレス情報 811、 812及び 813から構 成されており、分岐先アドレス情報 811、 812及び 813は、それぞれ、セキュアプログ ラム 202に含まれて!/、る ZIセクション B初期化 API702、セキュア API— A703及び セキュア API— B704に対応しており、各分岐先アドレス情報は、識別子と分岐先ァ ドレスとを含む。
[0091] ここで、識別子は、当該識別子を含む分岐先アドレス情報に対応して ヽる APIを識 別する識別情報である。また、分岐先アドレスは、当該分岐先アドレスを含む分岐先 アドレス情報に対応して 、る APIがセキュアプログラム 202内にお!、て格納されて!ヽ る位置を示す論理アドレスである。
次に、分岐先アドレス情報 811、 812及び 813についてさらに説明する。
[0092] 分岐先アドレス情報 811は、図 9に示すように、識別子 801「1」と分岐先アドレス 80 2「0xFFA01000」とを含む。分岐先アドレス情報 811は、 ZIセクション B初期化 API70 2に対して、識別子 801「1」が割り当てられ、論理アドレス「0xFFA01000」により開始 位置が示されるセキュアプログラム 202内の領域において、 ZIセクション B初期化 AP 1702の実行コード (プログラム命令)が記憶されて 、ることを示して 、る。 [0093] 従って、識別子として「1」が指定され、セキュア API分岐処理 701により、「0xFFA0 1000」に分岐すると、 ZIセクション B初期化 API702が実行される。
また、分岐先アドレス情報 812は、図 9に示すように、識別子 803「2」と分岐先アド レス 8O4「0xFFA02000」とを含む。分岐先アドレス情報 812は、セキュア API— A703 に対して、識別子 803「2」が割り当てられ、論理アドレス「0xFFA02000」により開始位 置が示されるセキュアプログラム 202内の領域において、セキュア API— A703の実 行コード (プログラム命令)が記憶されて 、ることを示して 、る。
[0094] 従って、識別子として「2」が指定され、セキュア API分岐処理 701により、「0xFFA0 2000」に分岐すると、セキュア API— A703が実行される。
さらに、分岐先アドレス情報 813は、図 9に示すように、識別子 805「3」と分岐先アド レス 8O6「0xFFA03000」とを含む。分岐先アドレス情報 813は、セキュア API— B704 に対して、識別子 805「3」が割り当てられ、論理アドレス「0xFFA03000」により開始位 置が示されるセキュアプログラム 202内の領域にお!、て、セキュア API— B704の実 行コード (プログラム命令)が記憶されて 、ることを示して 、る。
[0095] 従って、識別子として「3」が指定され、セキュア API分岐処理 701により、「0xFFA0 3000」に分岐すると、セキュア API— B704が実行される。
なお、本実施の形態では、 API分岐テーブル 800は、識別子と分岐先アドレスとを 含む複数個の分岐先アドレス情報カゝら構成されているが、この構成に限定されるわけ ではなぐ所望の APIに分岐する処理を行うるためのアドレス情報が格納されていれ ばよい。
[0096] (3)セキュア APIの実行のシーケンス
次に、セキュアプログラム 202のセキュア APIが実行されるまでのシーケンスについ て説明する。
(a)アプリケーションソフト起動までのシーケンス
ここでは、リセットの後、 OSプログラム 210を起動し、 OS上で動作するアプリケーシ ヨンソフトが起動されるまでのシーケンスについて、図 10を用いて説明する。
[0097] 本実施の形態においては、セキュアプログラム 202力 メモリ 107内の OSの管理外 領域においてワークメモリ(RAM)として利用するセキュアプログラム用ワークメモリ 6 02内の ZIセクションのデータの初期化処理に係る時間を短縮するために、上述した ように、セキュアプログラムの RAMデータの初期化処理を分割している。具体的には 、 ZIセクションの初期化処理を 2段階に分割して 、る。
[0098] 携帯電話 10は、利用者による電源投入などにより、リセットを受け付ける (ステップ S 900)。
リセット後、 IPLプログラム 201は、 OSの起動に必要なハードウェアを初期化する。 ( ステップ S 901)
次に、 IPLプログラム 201は、 ZIセクション A711のデータの初期化を実施する。(ス テツプ S902)
ZIセクション A711のデータの初期化が終了すると、カーネルに分岐する(ステップ S903〜S904)。
[0099] カーネルに分岐後、以下に示すカーネルの初期化処理が実行される。まず、カー ネルの初期化処理としては、 MMU103の初期化が実行され (ステップ S905)、次に 、携帯電話 10が備え、 OSが利用する各種デバイスの初期化が実行される (ステップ S906)。
カーネルの初期化が終了すると、 OSが起動されたことになり、その後、各アプリケ ーシヨンソフトが起動される(ステップ S907)。
[0100] ここで、アプリケーションソフトのうち、ユーザによる操作により起動されるものが存在 してもよい。ステップ S907が実行されると、携帯電話としての機能が有効となり、着信 、発信等が行える状態となり、ユーザが携帯電話上の各種操作を行える状態となる。
(b)セキュアプログラム 202の実行までのシーケンス
ここでは、セキュアプログラム 202が実行されるまでのシーケンスを、図 11及び図 1 2を用いて、説明する。
[0101] ここで、図 11は、セキュアプログラム 202の ZIセクションの初期化処理が完了するま でのシーケンスを示し、図 12は、セキュアプログラム 202の ZIセクションの初期化完 了後、セキュア APIの起動までのシーケンスを示している。
ユーザによる音楽再生のボタン操作が行われると (ステップ S 1000)、 OSは、セキ ユアプログラム呼出部 212へ処理を移す (ステップ S1001〜ステップ S1002)。 [0102] 次に、セキュアプログラム呼出部 212は、切替デバイスドライバ 213をオープンし (ス テツプ S1003)、識別子として「1」を指定して、切替デバイスドライバ 213に対し、ライ ブラリコールし、切替デバイスドライバ 213へ処理が移る(ステップ S 1004〜ステップ S1005)。
次に識別子「 1」を受け取った切替デバイスドライバ 213は、セキュア API分岐処理 701に分岐し、セキュア API分岐処理 701へ処理が移る(ステップ S 1006〜ステップ S1007)。
[0103] セキュア API分岐処理 701は、スタックポインタの設定を、セキュアプログラム 202が 利用するものに戻し (ステップ S1008)、 API分岐テーブル 800から、識別子「1」に対 応する分岐先アドレスを取得する。ここでは、識別子「1」に対応する ZIセクション B初 期化 API702の分岐先アドレス 8O2「0xFFA01000」が取得され、論理アドレス「0xFF A01000Jにより示される格納位置に格納されている実行コード、つまり、 ZIセクション B 初期化 API702に分岐する(ステップ S1009〜ステップ S1010)。
[0104] 「0xFFA01000」に処理が分岐すると、 ZIセクション B初期化 API702が実行される( ステップ S1011)。これにより、 ZIセクション B712の初期化が完了する。
ZIセクション B712の初期化が完了すると、セキュア API分岐処理 701は、スタック ポインタの設定を、 OSが利用するものに戻す (ステップ S1012)。
その後、 OS上で動作するセキュアプログラム呼出部 212へ処理が移る (ステップ S 1013〜ステップ S1014)。
[0105] 以上により、セキュア API— A703及びセキュア API— B704が利用する ZIセクショ ン A711及び ZIセクション B712の初期化が完了する。
次に、セキュアプログラム呼出部 212は、セキュア APIの識別子を指定し、切替デ バイスドライバ 213に対し、ライブラリコールし、切替デバイスドライバ 213へ処理が移 る(ステップ S 1015〜ステップ S 1016)。
[0106] 切替デバイスドライバ 213は、指定された識別子をセキュア API分岐処理 701へ出 力し、セキュア API分岐処理 701へ分岐する(ステップ S 1017〜ステップ S 1018)。 セキュア API分岐処理 701は、スタックポインタの設定を、セキュアプログラム 202が 利用するものに戻し (ステップ S1019)、次に、 API分岐テーブル 800から、受け取つ た識別子に対応する分岐先アドレスを取得し、取得した分岐先アドレスへ分岐する( ステップ S1020〜ステップ S1021)。
[0107] 次に、分岐先アドレスで示される位置に格納されるセキュアプログラム 202の API処 理が実行される (ステップ S 1022)。
セキュア APIの処理が終了すると、スタックポインタの設定を、 OSが利用するものに 戻し (ステップ S1023)、その後、セキュアプログラム呼出部 212及び OSへ処理が移 る(ステップ S 1024〜ステップ S 1026)。
[0108] 図 12に示すステップ S1015からステップ S1026までの処理は、図 11に示すステツ プ S1000からステップ S1014までの処理が完了した後、複数回実行されてもよい。 図 11に示す全てのステップが完了していることは、セキュアプログラムが実行する際 に初期化されるべき ZIセクションの初期化処理完了を意味しているからである。 なお、本実施の形態では、セキュア API— A703は、コンテンツ鍵取得を行うコンビ ユータプログラムであり、セキュア API— B704は、暗号化コンテンツ 121をコンテンツ 鍵 131を用いて復号するコンピュータプログラムである。
[0109] この場合、まず図 11に示す全てのステップが実行され ZIセクションの初期化が完了 する。次に、識別子を「2」として、図 12に示す全てのステップが実行されることにより
、コンテンツ鍵 131が取得される。次に、識別子を「3」として、図 12に示す全てのステ ップが実行されることにより、コンテンッ鍵 131を用 、て暗号ィ匕コンテンッ 121が復号 される。
[0110] 2.その他の変形例
なお、本発明を上記実施の形態に基づいて説明してきた力 本発明は、上記の実 施の形態に限定されないのはもちろんである。以下のような場合も本発明に含まれる
(1)セキュアプログラム 202は、セキュアプログラム 202の実行中に、 IRQ、 FIQ、ソ フトウェア割込み等の割込みが発生した場合に、セキュアプログラム 202による処理 を一時的に中断し、セキュアプログラム 202による処理対象のセキュアデータを暗号 化し、割込みに対応する処理が完了した後に、暗号ィ匕セキュアデータを復号し、セキ ユアプログラム 202による処理を一時的に中断した点から、セキュアプログラム 202に よる処理を継続して実行するとしてもよい。具体的には、以下に示す通りである。
[0111] IPLで初期化される領域である ZIセクション A711又はセキュアプログラム 202によ り初期化される領域である ZIセクション B712に、セキュアプログラム 202の初期化完 了フラグを設ける。初期化完了フラグは、セキュアプログラム 202による ZIセクション B 712の初期化完了後、「1」に設定され、セキュアプログラム 202が実行されている間 は、常に、「1」となっている。
[0112] このように、初期化完了フラグを ZIセクションに設けてもよ!、。しかし ZIセクションに 限定されることなぐ RWセクションに初期化完了フラグを設けるとしてもよい。
一般的に、コンピュータシステムにおいては、 IRQ、 FIQ、ソフトウェア割込み等の 割込みが発生すると、 CPUの例外べクタテーブルに分岐する。例外べクタテーブル には、割込み要因毎に割込み処理ルーチンが登録されており、例外べクタテーブル により、割込み要因毎に、割込み処理ルーチンへ分岐し、所望の割込み処理が行わ れる。
[0113] 本変形例においては、例外べクタテーブルにおいて、予め、割込みが発生するとセ キュアプログラム 202に分岐するように登録しておく。このようにすることで、割込みが 発生するたびに、セキュアプログラム 202^ ^—且処理が移るようになる。
セキュアプログラム 202の実行中に割込みが発生した場合のシーケンスを、図 13を 用いて、説明する。
[0114] セキュアプログラム 202は、 ZIセクション Bの初期化を完了すると(ステップ S 1011) 、次に、初期化完了フラグを「1」にセットする (ステップ S1201)。
セキュアプログラム 202が、実行されている間は、初期化完了フラグは、常に、「1」と なっている。
セキュアプログラム 202は、セキュア APIの実行を開始する(ステップ S 1022)。
[0115] IRQ, FIQ、ソフトウェア割込み等の割込みが発生すると (ステップ S1202)、 CPU の例外べクタテーブルに処理が移る。例外べクタテーブルには、あらかじめセキュア プログラム 202へ分岐するように、ベクタが登録されているので、セキュアプログラム 2 02に分岐する(ステップ S 1203)。
セキュアプログラム 202に分岐後、セキュアプログラム 202は、初期化完了フラグが 「 1」であるか否かを判断する (ステップ S 1204)。
[0116] 初期化完了フラグが、「1」であれば (ステップ S1204で YES)、セキュアプログラム 2 02の対象となる処理が実行中であるので、セキュアプログラム 202は、割込み発生時 のポイントを退避し (ステップ S 1206)、セキュアプログラム 202が実行中に利用して V、るセキュアな情報に関連するセキュアデータ (ランタイムデータ)を暗号ィ匕して暗号 化セキュアデータを生成する(ステップ S 1207)。暗号化セキュアデータの生成後、 O Sへ処理を移し (ステップ S1208)、 OSは、割込み処理を実施し (ステップ SI 209)、 割込み処理が終了したら、セキュアプログラム 202へ処理を移す (ステップ S1210)。 セキュアプログラム 202は、初期化完了フラグ力 「l」であるか否かを判断する (ステツ プ S1211)。初期化完了フラグが、「1」であれば (ステップ S1211で YES)、セキュア プログラム 202は、暗号ィ匕セキュアデータを復号して復号セキュアデータを生成し (ス テツプ S 1213)、割込みが発生してセキュアプログラム 202の処理が中断していたポ イントに復帰し (ステップ S 1214)、セキュアプログラム 202の処理を継続する(ステツ プ S1215)。
[0117] セキュアプログラム 202の対象である処理の実行が終了する直前に、セキュアプロ グラム 202は、初期化完了フラグを「0」に設定し (ステップ S1216)、その後、セキュ ァプログラム 202の実行が終了する。
初期化完了フラグが、「1」でなければ (ステップ S1204で NO、又はステップ S121
1で NO)、 OSへ処理を移す (ステップ S 1205、又はステップ S1212)。
[0118] (2)本実施の形態では、セキュアプログラム 202は、暗号ィ匕コンテンツを復号する復 号プログラムであるとしている力 これに限定されることなぐ秘密情報を扱うプロダラ ムであるとしてもよい。
(3)本実施の形態では、切替デバイスドライバ 213が、 OS依存バイナリデータから
OS非依存バイナリデータへの切替インターフェースの働きをして 、るが、切替デバイ スドライバ 213を利用することなぐセキュアプログラム呼出部 212からセキュア API分 岐処理 701へ直接分岐するようにしてもよい。
[0119] (4)本実施の形態では、セキュア API分岐処理 701が、スタックポインタの設定を、 セキュアプログラム 202が利用するものに戻し、また、スタックポインタの設定を、 OS が利用するものに戻すとしている力 これには、限定されない。
切替デバイスドライバ 213は、 OSからセキュアプログラムへの切替の際に、切替の 時点で OSが利用しているスタックポインタを退避し、スタックポインタの設定を、予め 退避してお!ヽたセキュアプログラム用のスタックポインタへ戻す命令を含むとしてもよ い。また、切替デバイスドライバ 213は、セキュアプログラム力も OSへの切替の際に、 切替の時点でセキュアプログラムが利用して 、るスタックポインタを退避し、スタックポ インタの設定を、予め退避しておいた OS用のスタックポインタへ戻す命令を含むとし てもよい。
[0120] また、セキュア API分岐処理 701が上記を行うとしてもよい。
(5)上述したセキュアプログラムは、 BIOS (Basic Input/Output System)を構成する その一部のプログラムであるとしてもよい。 BIOSとは、一般的に、コンピュータに接続 されたディスクドライブ、キーボード、ビデオカードなどの周辺機器を制御するプログ ラム群である。
[0121] (6)上記の実施の形態では、コンパイル装置 30及びコンパイル装置 40は、別々の 装置であるとしている力 これには限定されない。コンパイル装置 30及びコンパイル 装置 40のそれぞれが有する構成要素を備えた 1台のコンパイル装置カゝら構成される としてちよい。
このコンパイル装置は、オペレーティングシステムを構成するソースコードにコンパ ィルを施して、第 1オブジェクトを生成する第 1コンパイル部と、前記第 1オブジェクト のシンボル解決と再配置と第 1ライブラリに含まれるプログラムとのリンクとを行って、 オペレーティングシステムである実行可能形式の第 1ソフトウエアを生成する第 1リンク 部と、秘匿情報を利用する処理を構成するソースコードにコンノィルを施して、第 2ォ ブジェクトを生成する第 2コンパイル部と、前記第 2オブジェクトのシンボル解決と再配 置と第 2ライブラリに含まれるプログラムとのリンクを行って、秘匿情報を利用する処理 力もなる実行可能形式の第 2ソフトウェアを生成する第 2リンク部とを備える。
[0122] (7)本実施の形態では、セキュアプログラムソースに対して耐タンパ化するような例 を示して ヽな 、が、セキュアプログラムソースに対して耐タンパイ匕手法を施してもよ!ヽ 耐タンパイ匕手法とは、オリジナルコード (プログラム命令)に対して、実行に影響のな い不要な冗長コードの追加、ある命令コードの別の等価な命令コードへの置換え、制 御構造の複雑化、 1つのモジュール(プログラム命令の集合)の複数のモジュールへ の分割化などの難読ィ匕をしておくこと、又はオリジナルコードを予め暗号ィ匕しておき、 実行時に復号することである。耐タンパイ匕手法を適用させることでセキュアプログラム
202のセキュリティレベルを向上させてもよい。コード暗号ィ匕を施す場合は、復号した コードを展開する RAM領域は、 OSがアクセス不可能なエリア、つまり、管理外領域 とする。
[0123] この技術に関しては、非特許文献 1、非特許文献 2、非特許文献 3に詳細に述べら れて 、るので説明は省略する。
(8)上記の実施の形態では、 IPLプログラム 201〖こより、 ZIセクション A711のゼロ 初期化処理が実行され、次にユーザによるコンテンツ再生要求がされ、セキュアプロ グラム 202の起動直後に、セキュアプログラム 202により、 ZIセクション B712のゼロ初 期化処理が実行されるとしているが、これには、限定されない。
[0124] IPLプログラム 201により、 ZIセクション A711の中の一部の変数のゼロ初期化処理 が実行され、セキュアプログラム 202により、 ZIセクション B712の一部の変数のゼロ 初期化処理が実行されるとしてもょ ヽ。
また、上記の実施の形態及び変形例においては、 ZIセクションを、ゼロ値で初期す るとしている力 これには限定されない。ゼロ値以外の固定値、例えば、「0xffif」などを 、 ZIセクションに書き込むとしてもよい。
[0125] (9)以上説明したように、本発明は、プログラム記憶部とデータ記憶部を備え、前記 プログラム記憶部は、第一ソフトウェアと第二ソフトウェアを記憶し、前記データ記憶 部は、第一データ記憶部と第二データ記憶部力 なり、前記第一データ記憶部は、 前記第一ソフトウェアがアクセス可能なエリアであり、前記第二データ記憶部は、前記 第二ソフトウェアがアクセス可能なエリアであり、前記第一ソフトウェアは、前記第二デ ータ記憶部にアクセス不可能であることを特徴とするセキュア処理装置である。
[0126] ここで、前記第一ソフトウェアは、オペレーティングシステムであり、前記第二ソフトゥ エアは、秘密情報を利用するソフトウェアであるとしてもよい。 ここで、第一コンパイラは、第一ソフトウェアのソースコードを入力とし、第一オブジェ タトを出力し、第一リンカは、前記第一オブジェクトのシンボル解決と再配置と第一ラ イブラリをリンクする機能を有し、前記第一オブジェクトを入力とし、前記第一ソフトゥ エアを出力し、前記第一ソフトウェアは、前記第一コンパイラおよび前記第一リンカで 作成された実行可能データであり、第二コンパイラは、前記第一コンパイラとは異なる コンパイラであって、前記第二ソフトウェアのソースコードを入力とし、第二オブジェク トを出力し、第二リンカは、前記第一リンカとは異なるリンカであり、前記第二オブジェ タトのシンボル解決と再配置と第二ライブラリ群をリンクする機能を有し、前記第二ォ ブジェクトを入力とし、前記第二ソフトウェアを出力し、前記第二ソフトウェアは、前記 第二コンパイラおよび前記第二リンカで作成された実行可能データであるとしてもよ い。
[0127] ここで、前記第二ソフトウェアは、改ざんや解析に対して耐性をもったソフトウェアで あるとしてもよ 、。
ここで、前記第二ソフトウェアが利用する前記第二データ記憶部の初期化処理を少 なくとも 1つ以上の分割初期化処理に分割するとしてもよい。
ここで、前記分割初期化処理のうち、少なくとも 1つ以上の分割初期化処理は、前 記第二ソフトウェアの実行要求が発生するよりも前に実行されるとしてもよい。
[0128] ここで、前記分割初期化処理は、前記第二ソフトウェアの実行前に処理されるように 分散して前記プログラム記憶部に記憶されているとしてもよ。
ここで、前記プログラム記憶部は、さらに IPLを含み、前記 IPLが少なくとも 1つ以上 の前記分割初期化処理を実行するとしてもよ 、。
ここで、前記プログラム記憶部は、さらに切替デバイスドライバを含み、前記切替デ バイスドライバ力 前記第一ソフトウェア力 第二ソフトウェアに処理を移すとしてもよ い。
[0129] ここで、前記切替デバイスドライバは、前記第一ソフトウェアが利用する第一スタック ポインタと前記第二ソフトウェアが利用する第二スタックポインタを管理し、前記第一ソ フトウエアが実行される場合に、前記切替デバイスドライバは、スタックポインタを前記 第一スタックポインタに設定し、前記第二ソフトウェアが実行される場合に、前記切替 デバイスドライバは、スタックポインタを前記第二スタックポインタに設定するとしてもよ い。
[0130] (10)上記の各装置は、具体的には、マイクロプロセッサ、 ROM、 RAM,などから 構成されるコンピュータシステムである。前記 RAMには、コンピュータプログラムが記 憶されている。ここで、コンピュータプログラムは、所定の機能を達成するために、コン ピュータに対する指令を示す命令コードが複数個組み合わされて構成されたもので ある。前記マイクロプロセッサ力 前記コンピュータプログラムに従って動作することに より、各装置は、その機能を達成する。つまり、前記マイクロプロセッサは、前記コンビ ユータブログラムに含まれる各命令を 1個ずつ読み出し、読み出した命令を解読し、 解読結果に従って動作する。
[0131] (11)上記の各装置を構成する構成要素の一部又は全部は、 1個のシステム LSI (L arge Scale Integration:大規模集積回路)から構成されているとしてもよい。システム L SIは、複数の構成部を 1個のチップ上に集積して製造された超多機能 LSIであり、具 体的には、マイクロプロセッサ、 ROM, RAMなどを含んで構成されるコンピュータシ ステムである。前記 RAMには、コンピュータプログラムが記憶されている。前記マイク 口プロセッサ力 前記コンピュータプログラムに従って動作することにより、システム LS Iは、その機能を達成する。
[0132] また、上記の各装置を構成する構成要素の各部は、個別に 1チップィ匕されても良い し、一部又は全てを含むように 1チップ化されてもよい。また、ここでは、 LSIとした力 集積度の違いにより、 IC、システム LSI、スーパー LSI、ウルトラ LSIと呼称されること もめる。
また、集積回路化の手法は LSIに限るものではなぐ専用回路又は汎用プロセッサ で実現してもよい。 LSI製造後に、プログラムすることが可能な FPGA (Field Program mable Gate Array)や LSI内部の回路セルの接続や設定を再構成可能なリコンフィギ ュラブノレ ·プロセッサを利用しても良!、。
[0133] さらには、半導体技術の進歩又は派生する別技術により LSIに置き換わる集積回 路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積ィ匕を行って もよい。バイオ技術の適応等が可能性としてありえる。 (12)上記の各装置を構成する構成要素の一部又は全部は、各装置に脱着可能な ICカード又は単体のモジュール力も構成されて 、るとしてもよ 、。前記 ICカード又は 前記モジュールは、マイクロプロセッサ、 ROM, RAM,などから構成されるコンビュ ータシステムである。前記 ICカード又は前記モジュールは、上記の超多機能 LSIを 含むとしてもよい。マイクロプロセッサが、コンピュータプログラムに従って動作するこ とにより、前記 ICカード又は前記モジュールは、その機能を達成する。この ICカード 又はこのモジュールは、耐タンパ性を有するとしてもよ!/、。
[0134] (13)本発明は、上記に示す方法であるとしてもよい。また、これらの方法をコンビュ ータにより実現するコンピュータプログラムであるとしてもよいし、前記コンピュータプ ログラム力もなるデジタル信号であるとしてもよい。
また、本発明は、前記コンピュータプログラム又は前記デジタル信号をコンピュータ 読み取り可能な記録媒体、例えば、フレキシブルディスク、ハードディスク、 CD— RO M、 MO、 DVD, DVD-ROM, DVD -RAM, BD (Blu— ray Disc)、半導体メ モリなど、〖こ記録したものとしてもよい。また、これらの記録媒体に記録されている前 記コンピュータプログラム又は前記デジタル信号であるとしてもよい。
[0135] また、本発明は、前記コンピュータプログラム又は前記デジタル信号を、電気通信 回線、無線又は有線通信回線、インターネットを代表とするネットワーク、データ放送 等を経由して伝送するものとしてもよい。
また、本発明は、マイクロプロセッサとメモリとを備えたコンピュータシステムであって 、前記メモリは、上記コンピュータプログラムを記憶しており、前記マイクロプロセッサ は、前記コンピュータプログラムに従って動作するとしてもよい。
[0136] また、前記プログラム又は前記デジタル信号を前記記録媒体に記録して移送する ことにより、又は前記プログラム又は前記デジタル信号を前記ネットワーク等を経由し て移送することにより、独立した他のコンピュータシステムにより実施するとしてもよい
(14)上記実施の形態及び上記変形例をそれぞれ組み合わせるとしてもよい。 産業上の利用可能性
[0137] 本発明にかかるセキュア処理装置および方法は、秘密情報を利用したプログラムを OS管理外のメモリ上で動作させることで、 OS上で動作するソフトウェアデバッガから の解析を防止する効果と、さらに OS管理外で動作するプログラムの RAMデータの 初期化処理を分割して行うことで、ユーザ要求発生後から前記プログラム起動までの 処理を短縮する効果とを有し、セキュアなソフトウェアの処理方法として有用である。 本発明を構成する各装置は、コンテンツを制作し、配給するコンテンツ配給産業に おいて、また、その他の秘密を維持する必要がある情報を扱う産業において、経営的 に、また継続的及び反復的に使用することができる。また、本発明を構成する各装置 は、電器機器製造産業において、経営的に、また継続的及び反復的に、製造し、販 売することができる。

Claims

請求の範囲
[1] コンピュータシステムであって、
基本プログラム、通常プログラム及びセキュアプログラムに含まれて 、る各命令を読 み出し、解読し、その解読結果に応じて動作するプロセッサと、
管理領域及び前記管理領域とは異なる管理外領域から構成されるメモリ手段とを 備え、
前記基本プログラムは、オペレーティングシステムを構成し、前記通常プログラムに 対して前記管理領域のみをアクセス空間とするアクセスを仲介する命令を含み、 前記通常プログラムは、前記基本プログラムを介して、前記管理領域にアクセスす る命令を含み、
前記セキュアプログラムは、オペレーティングシステムに依存しな 、プログラムであり 、前記管理外領域のみをアクセス空間としてアクセスする命令を含む
ことを特徴とするコンピュータシステム。
[2] 前記管理領域は、さらに、前記基本プログラム及び前記通常プログラムを記憶して おり、
前記管理外領域は、さらに、前記セキュアプログラムを記憶しており、
前記プロセッサは、前記管理領域に記憶されている前記基本プログラム、前記通常 プログラムに含まれている各命令を読み出し、前記管理外領域に記憶されている前 記セキュアプログラムに含まれている各命令を読み出す
ことを特徴とする請求項 1に記載のコンピュータシステム。
[3] 前記セキュアプログラムは、前記管理外領域にお!、て格納される秘匿すべき情報 に関する秘匿処理を行う命令を含む
ことを特徴とする請求項 2に記載のコンピュータシステム。
[4] 前記管理領域は、さらに、基本プログラムの指示により、基本プログラム力もセキュ ァプログラムへの実行の切替えを行う命令を含む切替プログラムを記憶しており、 前記プロセッサは、さらに、前記管理領域に記憶されている前記切替プログラムに 含まれている命令を読み出し、解読し、その解読結果に応じて動作し、
前記基本プログラムは、さらに、前記切替プログラムに対して、セキュアプログラムへ の切替を指示する命令を含み、
前記セキュアプログラムは、さらに、前記秘匿処理の終了後、セキュアプログラムか ら基本プログラムへの実行の切替えを行う命令を含む
ことを特徴とする請求項 3に記載のコンピュータシステム。
[5] 前記切替プログラムは、セキュアプログラム力 基本プログラムへの実行の切替え の際に、スタックポインタの設定を基本プログラムが利用するものに戻す命令を含み、 セキュアプログラム力 基本プログラムへの実行の切替えの際に、スタックポインタの 設定をセキュアプログラムが利用するものに戻す命令を含む
ことを特徴とする請求項 4に記載のコンピュータシステム。
[6] 前記セキュアプログラムは、難読化が施されている
ことを特徴とする請求項 3に記載のコンピュータシステム。
[7] 前記セキュアプログラムは、初期化処理を必要とし、初期化処理は、複数のプログ ラムにより行われる
ことを特徴とする請求項 3に記載のコンピュータシステム。
[8] 前記複数の初期化プログラムは、前記セキュアプログラムによる前記秘匿処理に先 行して実行される
ことを特徴とする請求項 7に記載のコンピュータシステム。
[9] 前記複数の初期化プログラムのうちの一部の初期化プログラムは、他の初期プログ ラムとは異なる時期において、実行される
ことを特徴とする請求項 8に記載のコンピュータシステム。
[10] 一部の初期化プログラムは、当該コンピュータシステムのリセットの直後において実 行され、
セキュアプログラムに含まれる初期化プログラムは、セキュアプログラムの実行が要 求された時に、実行される
ことを特徴とする請求項 9に記載のコンピュータシステム。
[11] 集積回路であって、
基本プログラム、通常プログラム及びセキュアプログラムに含まれて 、る各命令を読 み出し、解読し、その解読結果に応じて動作するプロセッサと、 管理領域及び前記管理領域とは異なる管理外領域から構成されるメモリ手段とを 備え、
前記基本プログラムは、オペレーティングシステムを構成し、前記通常プログラムに 対して前記管理領域のみをアクセス空間とするアクセスを仲介する命令を含み、 前記通常プログラムは、前記基本プログラムを介して、前記管理領域にアクセスす る命令を含み、
前記セキュアプログラムは、オペレーティングシステムに依存しな 、プログラムであり 、前記管理外領域のみをアクセス空間としてアクセスする命令を含む
ことを特徴とする集積回路。
[12] プログラム生成装置であって、
オペレーティングシステムを構成するソースコードから、実行対象の装置が有する 管理領域にのみアクセスする第 1オブジェクトを生成する第 1オブジェクト生成部と、 秘匿情報を使う処理のソースコードから、前記実行対象の装置が有し、前記管理領 域とは異なる管理外領域にのみアクセスする第 2オブジェクトを生成する第 2オブジェ タト生成部と
を備えることを特徴とするプログラム生成装置。
[13] 基本プログラム及びセキュアプログラムを記録して 、るコンピュータ読み取り可能な 記録媒体であって、
前記基本プログラムは、オペレーティングシステムを構成し、前記オペレーティング システムの管理下で動作する通常プログラムに対して、実行対象の装置が有する管 理領域のみをアクセス空間とするアクセスを仲介する命令を含み、
前記セキュアプログラムは、オペレーティングシステムに依存しな 、プログラムであり 、前記実行対象の装置が有し、前記管理領域とは異なる管理外領域のみをアクセス 空間としてアクセスする命令を含む
ことを特徴とする記録媒体。
PCT/JP2006/310744 2005-06-01 2006-05-30 コンピュータシステム及びプログラム生成装置 WO2006129641A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2007518997A JP4850830B2 (ja) 2005-06-01 2006-05-30 コンピュータシステム及びプログラム生成装置
EP06756740A EP1890237A1 (en) 2005-06-01 2006-05-30 Computer system and program creating device
US11/915,198 US7962746B2 (en) 2005-06-01 2006-05-30 Computer system and program creating device
CN2006800191820A CN101189586B (zh) 2005-06-01 2006-05-30 计算机系统及程序生成装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005161359 2005-06-01
JP2005-161359 2005-06-01

Publications (1)

Publication Number Publication Date
WO2006129641A1 true WO2006129641A1 (ja) 2006-12-07

Family

ID=37481570

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/310744 WO2006129641A1 (ja) 2005-06-01 2006-05-30 コンピュータシステム及びプログラム生成装置

Country Status (6)

Country Link
US (1) US7962746B2 (ja)
EP (1) EP1890237A1 (ja)
JP (1) JP4850830B2 (ja)
KR (1) KR20080014786A (ja)
CN (1) CN101189586B (ja)
WO (1) WO2006129641A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009070327A (ja) * 2007-09-18 2009-04-02 Panasonic Corp 情報端末及び情報端末の制御方法
JP2009223629A (ja) * 2008-03-17 2009-10-01 Hitachi Software Eng Co Ltd アプリケーションの実行ファイル及び構成ファイルの漏洩防止装置
JP2015195053A (ja) * 2008-12-31 2015-11-05 インテル コーポレイション セキュアな埋め込みコンテナの実行のためのプロセッサの拡張

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7861046B2 (en) * 2007-06-29 2010-12-28 Sandisk Corporation Secure digital host sector application flag compression
US8775824B2 (en) * 2008-01-02 2014-07-08 Arm Limited Protecting the security of secure data sent from a central processor for processing by a further processing device
US9207968B2 (en) * 2009-11-03 2015-12-08 Mediatek Inc. Computing system using single operating system to provide normal security services and high security services, and methods thereof
US20120079278A1 (en) * 2010-09-28 2012-03-29 Microsoft Corporation Object security over network
US8910307B2 (en) 2012-05-10 2014-12-09 Qualcomm Incorporated Hardware enforced output security settings
GB2515047B (en) 2013-06-12 2021-02-10 Advanced Risc Mach Ltd Security protection of software libraries in a data processing apparatus
CN103365687B (zh) * 2013-06-28 2017-02-08 北京创毅讯联科技股份有限公司 处理器启动方法、装置及提供初始程序装入程序的装置
US10754967B1 (en) * 2014-12-15 2020-08-25 Marvell Asia Pte, Ltd. Secure interrupt handling between security zones
KR102000861B1 (ko) * 2015-01-27 2019-07-16 애리스 엔터프라이지즈 엘엘씨 스트리밍 미디어 및 다른 데이터 흐름들의 보호를 위한 난독화
CN108416209B (zh) * 2018-03-07 2021-10-22 北京元心科技有限公司 程序安全验证方法、装置及终端设备

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1115705A (ja) 1997-06-25 1999-01-22 Sony Corp メモリ管理方法及び記録媒体、メモリ管理装置
JP2002251326A (ja) * 2001-02-22 2002-09-06 Hitachi Ltd 耐タンパ計算機システム

Family Cites Families (54)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0290330A (ja) * 1988-09-28 1990-03-29 Hitachi Ltd プログラム構成方式
US5522072A (en) * 1990-09-04 1996-05-28 At&T Corp. Arrangement for efficiently transferring program execution between subprograms
US5303378A (en) * 1991-05-21 1994-04-12 Compaq Computer Corporation Reentrant protected mode kernel using virtual 8086 mode interrupt service routines
US5826057A (en) * 1992-01-16 1998-10-20 Kabushiki Kaisha Toshiba Method for managing virtual address space at improved space utilization efficiency
US5515538A (en) * 1992-05-29 1996-05-07 Sun Microsystems, Inc. Apparatus and method for interrupt handling in a multi-threaded operating system kernel
US5892899A (en) * 1996-06-13 1999-04-06 Intel Corporation Tamper resistant methods and apparatus
US5757919A (en) * 1996-12-12 1998-05-26 Intel Corporation Cryptographically protected paging subsystem
US6393569B1 (en) * 1996-12-18 2002-05-21 Alexander S. Orenshteyn Secured system for accessing application services from a remote station
US6269409B1 (en) * 1997-09-02 2001-07-31 Lsi Logic Corporation Method and apparatus for concurrent execution of operating systems
US6772419B1 (en) * 1997-09-12 2004-08-03 Hitachi, Ltd. Multi OS configuration system having an interrupt process program executes independently of operation of the multi OS
US6996828B1 (en) * 1997-09-12 2006-02-07 Hitachi, Ltd. Multi-OS configuration method
US6385727B1 (en) * 1998-09-25 2002-05-07 Hughes Electronics Corporation Apparatus for providing a secure processing environment
US7140015B1 (en) * 1999-09-29 2006-11-21 Network Appliance, Inc. Microkernel for real time applications
JP2001290665A (ja) * 2000-04-11 2001-10-19 Nec Software Hokuriku Ltd プロセッサシステム
AU2001247941B2 (en) * 2000-04-11 2007-09-06 Mathis, Richard M. Method and apparatus for computer memory protection and verification
US6889378B2 (en) * 2000-07-24 2005-05-03 Sony Corporation Information processing method, inter-task communication method, and computer-executable program for the same
US7149878B1 (en) * 2000-10-30 2006-12-12 Mips Technologies, Inc. Changing instruction set architecture mode by comparison of current instruction execution address with boundary address register values
JP2002353960A (ja) * 2001-05-30 2002-12-06 Fujitsu Ltd コード実行装置およびコード配布方法
US7272832B2 (en) * 2001-10-25 2007-09-18 Hewlett-Packard Development Company, L.P. Method of protecting user process data in a secure platform inaccessible to the operating system and other tasks on top of the secure platform
JP2003280754A (ja) * 2002-03-25 2003-10-02 Nec Corp 隠蔽化ソースプログラム、ソースプログラム変換方法及び装置並びにソース変換プログラム
JP2003280755A (ja) * 2002-03-25 2003-10-02 Nec Corp 自己復元型プログラム、プログラム生成方法及び装置、情報処理装置並びにプログラム
US7313797B2 (en) * 2002-09-18 2007-12-25 Wind River Systems, Inc. Uniprocessor operating system design facilitating fast context switching
GB2395583B (en) * 2002-11-18 2005-11-30 Advanced Risc Mach Ltd Diagnostic data capture control for multi-domain processors
KR100941104B1 (ko) * 2002-11-18 2010-02-10 에이알엠 리미티드 데이터 처리 장치, 데이터 처리 방법 및 컴퓨터 프로그램을 기억한 컴퓨터 판독가능한 기억매체
GB2411254B (en) * 2002-11-18 2006-06-28 Advanced Risc Mach Ltd Monitoring control for multi-domain processors
KR101099463B1 (ko) * 2002-11-18 2011-12-28 에이알엠 리미티드 보안 도메인과 비보안 도메인을 갖는 시스템 내에서 가상메모리 어드레스의 물리적 메모리 어드레스로의 매핑
US7383587B2 (en) * 2002-11-18 2008-06-03 Arm Limited Exception handling control in a secure processing system
AU2003278342A1 (en) * 2002-11-18 2004-06-15 Arm Limited Security mode switching via an exception vector
DE60308215T2 (de) * 2002-11-18 2007-08-23 Arm Ltd., Cherry Hinton Prozessorschaltung zwischen sicheren und nicht sicheren modi
GB2396930B (en) * 2002-11-18 2005-09-07 Advanced Risc Mach Ltd Apparatus and method for managing access to a memory
GB2396451B (en) * 2002-11-18 2005-12-07 Advanced Risc Mach Ltd Delivering data processing requests to a suspended operating system
GB0226874D0 (en) * 2002-11-18 2002-12-24 Advanced Risc Mach Ltd Switching between secure and non-secure processing modes
US7539853B2 (en) * 2002-11-18 2009-05-26 Arm Limited Handling interrupts in data processing of data in which only a portion of a function has been processed
US7370210B2 (en) * 2002-11-18 2008-05-06 Arm Limited Apparatus and method for managing processor configuration data
GB2411027B (en) * 2002-11-18 2006-03-15 Advanced Risc Mach Ltd Control of access to a memory by a device
US7231476B2 (en) * 2002-11-18 2007-06-12 Arm Limited Function control for a processor
GB2396034B (en) * 2002-11-18 2006-03-08 Advanced Risc Mach Ltd Technique for accessing memory in a data processing apparatus
US7171539B2 (en) * 2002-11-18 2007-01-30 Arm Limited Apparatus and method for controlling access to a memory
GB2396712B (en) * 2002-11-18 2005-12-07 Advanced Risc Mach Ltd Handling multiple interrupts in a data processing system utilising multiple operating systems
US7117284B2 (en) * 2002-11-18 2006-10-03 Arm Limited Vectored interrupt control within a system having a secure domain and a non-secure domain
GB2396713B (en) * 2002-11-18 2005-09-14 Advanced Risc Mach Ltd Apparatus and method for controlling access to a memory unit
US7149862B2 (en) * 2002-11-18 2006-12-12 Arm Limited Access control in a data processing apparatus
US20040168078A1 (en) * 2002-12-04 2004-08-26 Brodley Carla E. Apparatus, system and method for protecting function return address
JP4347582B2 (ja) * 2003-02-04 2009-10-21 パナソニック株式会社 情報処理装置
US7401335B2 (en) * 2003-02-28 2008-07-15 Wind River Systems, Inc. Single stack kernel
US20040243783A1 (en) * 2003-05-30 2004-12-02 Zhimin Ding Method and apparatus for multi-mode operation in a semiconductor circuit
US7415618B2 (en) * 2003-09-25 2008-08-19 Sun Microsystems, Inc. Permutation of opcode values for application program obfuscation
KR20070005917A (ko) * 2003-09-30 2007-01-10 쟈루나 에스에이 운영체제
WO2005052769A1 (ja) * 2003-11-28 2005-06-09 Matsushita Electric Industrial Co.,Ltd. データ処理装置
JP4447977B2 (ja) * 2004-06-30 2010-04-07 富士通マイクロエレクトロニクス株式会社 セキュアプロセッサ、およびセキュアプロセッサ用プログラム。
FR2872933B1 (fr) * 2004-07-06 2008-01-25 Trusted Logic Sa Procede de partage de temps d'un processeur
EP2296089B1 (en) * 2004-08-18 2019-07-03 Red Bend Software Operating systems
US7568186B2 (en) * 2005-06-07 2009-07-28 International Business Machines Corporation Employing a mirror probe handler for seamless access to arguments of a probed function
US7797681B2 (en) * 2006-05-11 2010-09-14 Arm Limited Stack memory selection upon exception in a data processing system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1115705A (ja) 1997-06-25 1999-01-22 Sony Corp メモリ管理方法及び記録媒体、メモリ管理装置
JP2002251326A (ja) * 2001-02-22 2002-09-06 Hitachi Ltd 耐タンパ計算機システム

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Software no Tai-tampering Technology (Software Tamper Resistant Technology", FUJI XEROX TECHNICAL REPOR, no. 13
"The Protect", 1985, SHUWA SYSTEM PUBLICATION
GYAKU-KAISEKI YA KAIHEN KARA SOFT WO MAMORU: "Protecting Software from Inverse Analysis and Tampering", NIKKEI ELECTRONICS, vol. 1, no. 5, 1998, pages 209 - 220

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009070327A (ja) * 2007-09-18 2009-04-02 Panasonic Corp 情報端末及び情報端末の制御方法
JP2009223629A (ja) * 2008-03-17 2009-10-01 Hitachi Software Eng Co Ltd アプリケーションの実行ファイル及び構成ファイルの漏洩防止装置
JP2015195053A (ja) * 2008-12-31 2015-11-05 インテル コーポレイション セキュアな埋め込みコンテナの実行のためのプロセッサの拡張

Also Published As

Publication number Publication date
CN101189586B (zh) 2011-06-15
US7962746B2 (en) 2011-06-14
CN101189586A (zh) 2008-05-28
JPWO2006129641A1 (ja) 2009-01-08
EP1890237A1 (en) 2008-02-20
US20090106832A1 (en) 2009-04-23
JP4850830B2 (ja) 2012-01-11
KR20080014786A (ko) 2008-02-14

Similar Documents

Publication Publication Date Title
JP4850830B2 (ja) コンピュータシステム及びプログラム生成装置
US11783081B2 (en) Secure public cloud
CN111638943B (zh) 具有受保护的访客机验证主机控制的装置和方法
JP5821034B2 (ja) 情報処理装置、仮想マシン生成方法及びアプリ配信システム
JP5175856B2 (ja) セキュアデバイス・システムにおけるフラッシュメモリ・ブロックの保護と方法
US9104602B2 (en) Method and apparatus for performing mapping within a data processing system having virtual machines
WO2011138852A1 (ja) 情報処理装置、情報処理方法、及びプログラム配信システム
JP2010517424A (ja) Usbトークン上の暗号化キーコンテナ
US7908450B2 (en) Memory management unit, code verifying apparatus, and code decrypting apparatus
JP2023047278A (ja) トランスフォーマ鍵識別子を使用する仮想機械マネージャによる信頼されたドメイン保護メモリへのシームレスなアクセス
CN110597496B (zh) 应用程序的字节码文件获取方法及装置
KR20240038774A (ko) 보안 가상 머신들의 진단 상태 저장
CN114424166A (zh) 加密表签名
Tang et al. Techniques for IoT System Security
CN116049844A (zh) 一种可信平台模块调用方法、系统、装置及存储介质
CN117235711A (zh) 一种用于隐私保护的数据处理方法和模型训练设备
WO2021011138A1 (en) A hybrid security-enabled lookahead microprocessor based method and apparatus for securing computer systems and data
KR20010069227A (ko) 컴퓨터 보안 시스템 및 그 보안 방법

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200680019182.0

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2007518997

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 11915198

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 1020077027157

Country of ref document: KR

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2006756740

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 2006756740

Country of ref document: EP