WO2016185577A1 - プログラム検証方法、検証プログラム、及び情報処理装置 - Google Patents

プログラム検証方法、検証プログラム、及び情報処理装置 Download PDF

Info

Publication number
WO2016185577A1
WO2016185577A1 PCT/JP2015/064428 JP2015064428W WO2016185577A1 WO 2016185577 A1 WO2016185577 A1 WO 2016185577A1 JP 2015064428 W JP2015064428 W JP 2015064428W WO 2016185577 A1 WO2016185577 A1 WO 2016185577A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
value
computer
storage unit
time
Prior art date
Application number
PCT/JP2015/064428
Other languages
English (en)
French (fr)
Inventor
保彦 阿部
Original Assignee
富士通株式会社
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 富士通株式会社 filed Critical 富士通株式会社
Priority to EP15892576.8A priority Critical patent/EP3299986A4/en
Priority to PCT/JP2015/064428 priority patent/WO2016185577A1/ja
Priority to JP2017518679A priority patent/JP6601491B2/ja
Publication of WO2016185577A1 publication Critical patent/WO2016185577A1/ja
Priority to US15/817,020 priority patent/US10872141B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/575Secure boot
    • 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/442Shutdown
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/033Test or assess software

Definitions

  • Programs of devices connected to networks such as the Internet may be rewritten due to unauthorized access from outside, and rewriting may cause serious troubles. For example, if a program installed in an automobile is rewritten illegally, the equipment in the automobile will malfunction, leading to an accident involving human life.
  • the user of the device on which the program is installed may intentionally rewrite the program (for example, rewriting to cancel the speed limit). It may become unusable.
  • the computer divides the program into a plurality of pages, and calculates a hash value for each of the plurality of pages. Then, the computer generates a hash array based on the hash value, and further generates a digital signature of the hash array.
  • the microprocessor performs a hash calculation on the contents of the memory to derive an audit hash value, and the derived hash value is obtained by performing a hash calculation on the authentic memory contents. Compare with
  • the authentication device reads the digest table and the electronic signature from the storage unit into the memory. Then, the authentication device authenticates the validity of the content data using the electronic signature read into the memory and the digest value included in the digest table.
  • an object of the present invention is to provide a technique for shortening the time required for activation when verifying the validity of a program at the time of activation.
  • the first value calculated from each part of the program before the computer stops is read from the first storage unit when the computer is started, and the read first value and the second storage Processing for determining the legitimacy of the program based on the second value calculated from each part of the legitimate program stored in the section.
  • the time required for startup can be shortened.
  • FIG. 1 is a diagram showing a system outline of the present embodiment.
  • FIG. 2 is a diagram illustrating a hardware configuration of the main control device.
  • FIG. 3 is a functional block diagram of the main controller.
  • FIG. 4 is a diagram showing a processing flow of processing executed by the main control device at startup.
  • FIG. 5 is a diagram for explaining the basic function module.
  • FIG. 6 is a diagram for explaining hash calculation in the present embodiment.
  • FIG. 7 is a diagram for explaining hash calculation in the present embodiment.
  • FIG. 8 is a diagram for explaining the state transition of the RAM.
  • FIG. 9 is a diagram for explaining the state transition of the RAM.
  • FIG. 10 is a diagram for explaining the state transition of the RAM.
  • FIG. 11 is a diagram for explaining the extended function module.
  • FIG. 12 is a diagram illustrating a processing flow of the second verification processing.
  • FIG. 13 is a diagram illustrating a processing flow of calculation processing.
  • FIG. 14 is a diagram illustrating a processing flow of processing that is executed by the main control device after activation.
  • FIG. 15 is a diagram illustrating the relationship between trigger combinations and CPU occupancy rates.
  • FIG. 16 is a functional block diagram of a computer.
  • Fig. 1 shows the system outline of this embodiment.
  • the main control device 1 incorporated in an automobile can perform wireless communication with the server 3 via a network such as the Internet or VPN (Virtual Private Network).
  • a network such as the Internet or VPN (Virtual Private Network).
  • the main control device 1 is installed with drivers, OS, middleware, application programs, and the like at the time of manufacture, but additional programs may be downloaded from the server 3 even after the operation is started.
  • the additionally installed program is, for example, a program for adding a function or a correction program.
  • the program installed in the main control device 1 may be illegally rewritten by an attack from the network (for example, sending a malicious program).
  • FIG. 2 shows the hardware configuration of the main controller 1.
  • the main control device 1 includes a CPU (Central Processing Unit) 1001, a display device 1003, a communication control unit 1005, a bus 1007, a RAM (Random Access Memory) 1009, and a storage device 1011.
  • CPU Central Processing Unit
  • display device 1003 a display device 1003
  • communication control unit 1005 a communication control unit 1005
  • bus 1007 a bus 1007
  • RAM Random Access Memory
  • the storage device 1011 is an HDD (Hard Disk Drive) or NAND (Not AND AND) type flash memory, and stores a program, a driver, an OS, middleware, an application program, and the like for executing the processing of this embodiment. Is done.
  • the program stored in the storage device 1011 is read by the CPU 1001, loaded into the RAM 1009, and executed.
  • the display device 1003 which is a monitor displays a screen for displaying a warning or a screen for navigation.
  • the communication control unit 1005 is hardware for performing communication via a network.
  • FIG. 3 shows a functional block diagram of the main controller 1.
  • the main controller 1 includes a first verification unit 101, a second verification unit 102, a calculation unit 103, a valid value storage unit 104, a setting data storage unit 105, a first hash value storage unit 106, and a second A hash value storage unit 107 and a third hash value storage unit 108 are included.
  • the first verification unit 101 executes processing for determining the validity of the program loaded in the RAM 1009 when the main control device 1 is activated. Specifically, the first verification unit 101 calls the calculation unit 103, and the calculation unit 103 stores the data stored in the valid value storage unit 104, the data stored in the setting data storage unit 105, and the first hash A process is executed based on the data stored in the value storage unit 106, and the processing result is stored in the second hash value storage unit 107 and the third hash value storage unit 108. The second verification unit 102 executes processing for determining the validity of the program loaded in the RAM 1009 after the main control device 1 is activated.
  • the second verification unit 102 calls the calculation unit 103, and the calculation unit 103 executes processing based on the data stored in the valid value storage unit 104 and the data stored in the setting data storage unit 105. Then, the processing result is stored in the first hash value storage unit 106, the second hash value storage unit 107, and the third hash value storage unit 108.
  • the valid value storage unit 104, the setting data storage unit 105, the first hash value storage unit 106, the second hash value storage unit 107, and the third hash value storage unit 108 are provided in the storage device 1011. Therefore, even if the main controller 1 is turned off, the data is not erased.
  • main controller 1 processing executed by main controller 1 will be described with reference to FIGS. 4 to 15.
  • the driver of the vehicle turns on the main controller 1.
  • the CPU 1001 of the main control device 1 loads the basic function module stored in the storage device 1011 into the RAM 1009 (FIG. 4: step S1).
  • the basic function module includes a program initially installed in the apparatus and a program for realizing a basic function. Therefore, the basic function module includes, for example, as shown in FIG. 5, a driver for controlling the devices of the main control device 1, an OS, and middleware and application programs for realizing basic functions.
  • the first verification unit 101 of the main control device 1 calls the calculation unit 103. Then, the calculation unit 103 reads the hash value stored in the first hash value storage unit 106, calculates a new hash value from the read hash value, and stores it in the second hash value storage unit 107. Further, the calculation unit 103 newly calculates a hash value from the calculated hash value (step S3) and stores it in the third hash value storage unit.
  • the hash calculation in the present embodiment will be described with reference to FIG.
  • the dashed arrow indicates the hash calculation.
  • the program loaded into the memory and subject to hash calculation is divided into a predetermined number (in FIG. 6, n is a natural number of 2 or more), and the divided blocks are used. Calculate a hash value.
  • n hash values are calculated and stored in the first hash value storage unit 106.
  • one new hash value is calculated from the n hash values stored in the first hash value storage unit 106.
  • the calculated hash value is stored in the second hash value storage unit 107.
  • one hash value is calculated from the hash value stored in the second hash value storage unit 107 and stored in the third hash value storage unit 108.
  • one hash value is calculated from one hash value.
  • the second hash value may be used as it is as the third hash value.
  • FIG. 7 is used to explain hash calculation when a program is additionally loaded into the RAM 1009 after the main control device 1 is started.
  • the dashed arrow represents hash calculation.
  • the originally loaded program is divided into n blocks, and each of the additionally loaded programs is also divided into n blocks.
  • N hash values are calculated from the originally loaded program, n hash values are also calculated from each of the additionally loaded programs, and the calculated hash values are stored in the first hash value storage unit 106. Stored.
  • one new hash value is calculated from the n hash values stored in the first hash value storage unit 106 and stored in the second hash value storage unit 107. Further, for each of the additionally loaded programs, one new hash value is calculated from the n hash values stored in the first hash value storage unit 106 and stored in the second hash value storage unit 107. .
  • one hash value is calculated from the hash value stored in the second hash value storage unit 107 and stored in the third hash value storage unit 108.
  • one hash value is calculated from two or more hash values.
  • step S3 by using the hash value calculated before the main controller 1 shuts down, the time until the hash value to be finally stored in the third hash value storage unit 108 is calculated. Can be shortened.
  • FIG. 8 is a diagram illustrating the state of the RAM 1009 immediately after startup.
  • the RAM 1009 stores programs loaded at the time of startup (in this embodiment, basic function modules and extended function modules).
  • the target of hash calculation is a program loaded at startup, which is surrounded by a thick solid line.
  • FIG. 9 shows the state of the RAM 1009 when an additional program is loaded after startup.
  • the RAM 1009 stores a program loaded at startup and an additional program loaded after startup.
  • the target of hash calculation is a program loaded at startup and a program loaded after startup, which are surrounded by a thick solid line.
  • FIG. 10 is a diagram showing the state of the RAM 1009 when some programs are unloaded.
  • the RAM 1009 stores a program loaded at startup and an additional program loaded after startup. However, since a part of the programs additionally loaded after the activation is unloaded, the area in which the programs are stored is narrow compared with the state of FIG. In this case, the target of hash calculation is a program loaded at start-up and a program that has not been unloaded among the programs loaded after start-up, which are surrounded by a thick solid line.
  • the hash value corresponding to the unloaded program is deleted.
  • the first verification unit 101 reads the hash value calculated from the valid program from the valid value storage unit 104, and the hash value calculated in step S ⁇ b> 3 from the third hash value storage unit 108. Is read. Then, the first verification unit 101 determines whether the program installed in the main control device 1 is valid (that is, has not been rewritten) depending on whether the former hash value and the latter hash value match. Determine (step S5).
  • the program to be verified in step S5 is a program before the main control device 1 stops, and is not a program installed in the main control device 1 at the time of processing in step S5.
  • the program before the main controller 1 stops includes a basic function module, an extended function module, an additionally installed program, and the like.
  • the extended function module includes a program for realizing functions other than basic functions. Therefore, the extended function module includes a driver, middleware, and an application program for realizing an extended function, for example, as shown in FIG.
  • step S5 when the program is not valid (step S5: No route), the first verification unit 101 displays a warning message indicating that the program is not valid on the display device 1003 (step S7). Then, the process ends.
  • step S5 if the program is valid (step S5: Yes route), the first verification unit 101 allows the CPU 1001 to execute the basic function module loaded in the RAM 1009 in step S1 (step S9). In response to this, the CPU 1001 starts executing the basic function module.
  • the first verification unit 101 executes the first verification process for the basic function module loaded in the RAM 1009 by calling the calculation unit 103 (step S11).
  • step S11 the basic function module is divided into n blocks, and a hash value is calculated by the method described with reference to FIG. Since the size of the basic function module is smaller than that of the later-described extended function module, periodic hash calculation is not performed in the first verification process.
  • the first verification unit 101 uses the hash value calculated for the basic function module (here, the hash value stored in the third hash value storage unit 108) and the hash value stored in the valid value storage unit 104. By comparing, it is determined whether the basic function module is valid (step S13).
  • step S13 If the basic function module is not valid (step S13: No route), the first verification unit 101 causes the display device 1003 to display a warning message indicating that the basic function module is not valid (step S15). Then, the process ends.
  • step S13 Yes route
  • the first verification unit 101 loads the extended function module into the RAM 1009 (step S16).
  • the first verification unit 101 calls the calculation unit 103 to execute the second verification process for the extended function module loaded in the RAM 1009 (step S17). Since the size of the extended function module is larger than that of the basic function module, periodic hash calculation is performed in the second verification process.
  • the second verification process will be described with reference to FIGS.
  • the calculation unit 103 determines whether it is the first process (that is, the calculation process described later has not been executed yet in this call) (FIG. 12: step S51). If it is not the first process (step S51: No route), the calculation unit 103 determines whether a time-out of the periodic timer has occurred (step S53). When the time-out of the periodic timer has not occurred (step S53: No route), the process proceeds to step S57.
  • the period timer is a timer for managing the period calculated in step S55.
  • step S55 when it is the first process (step S51: Yes route) or when a timeout occurs (step S53: Yes route), the calculation unit 103 executes a calculation process (step S55).
  • the calculation process will be described with reference to FIG.
  • step S61 it is determined whether or not the cycle CIT (seconds) of the cycle timer has been set.
  • step S65 the calculation unit 103 sets the cycle CIT of the cycle timer (step S65).
  • a process of calculating a hash value from one block can be executed within a certain time.
  • the time required to complete the hash calculation for all blocks is approximately constant.
  • step S65 CIT is set as the initial cycle of the cycle timer.
  • the maximum allowable time MOCT (seconds) required for calculating hash values from CIT, BN, and all blocks is used when calculating hash values from a program.
  • the designer determines the size APS (bytes) of the initial program and the processing speed CPP (bytes / second) of the process of calculating the hash value from the program. Is predetermined.
  • the maximum response delay time for an event is the maximum allowable time required for completing the control performed when a specific event occurs.
  • These parameters are stored in the setting data storage unit 105 in advance. These parameters are set such that MOCT> APS / (CPP * MOR), MRT> (APS / BN) / CPP, and MOR> ((APS / BN) / CPP) / CIT. Determined.
  • step S67 the calculation unit 103 initializes the block number N (step S67). In step S67, “0” is set to the block number N. Then, the process returns to the calling process.
  • step S68 the calculation unit 103 starts the cycle timer (step S68). Time measurement is started by the process of step S68.
  • the calculation unit 103 increments the block number N by 1 (step S69). Then, the calculation unit 103 calculates a hash value from the Nth block in the program (here, the extended function module) loaded in the RAM 1009, and stores the hash value in the first hash value storage unit 106 (step S71).
  • step S73 Yes route
  • the calculation unit 103 newly calculates a hash value from the hash value stored in the first hash value storage unit 106, and the second hash value Store in the storage unit 107 (step S75).
  • the calculation unit 103 newly calculates a hash value from the hash value stored in the second hash value storage unit 107 and stores it in the third hash value storage unit 108. Then, the calculation unit 103 cancels the setting by stopping the cycle timer (step S77). Then, the process returns to the calling process.
  • step S57 No route
  • the process returns to step S51.
  • step S57 Yes route
  • the process returns to the caller process.
  • the first verification unit 101 stores the hash value calculated for the extended function module (here, the hash value stored in the third hash value storage unit 108) and the valid value storage unit 104. It is determined whether the extended function module is valid by comparing with the hash value (step S19).
  • step S19 No route
  • the first verification unit 101 causes the display device 1003 to display a warning message indicating that the extended function module is not valid (step S15). Then, the process ends.
  • step S19 Yes route
  • the first verification unit 101 allows the CPU 1001 to execute the extended function module loaded in the RAM 1009 in step S16 (step S20). In response to this, the CPU 1001 starts executing the extended function module. Then, the process ends.
  • the processing for calculating the hash value from the program does not have to be performed at the time of starting, so the time required for starting can be shortened. Further, since the extended function module is larger in size than the basic function module, it takes time to simply perform verification. However, since the block number BN, the cycle CIT, and the like are determined in advance and the hash value is calculated according to them, it is possible to suppress an increase in the time required for verification. According to the present embodiment, verification of the extended function module can be completed in a substantially constant time.
  • a warning message is displayed, so that the user can take action according to the warning message.
  • the second verification unit 102 determines whether a trigger for starting verification has occurred (FIG. 14: step S21).
  • the verification start trigger is (1) the amount of data received per unit time exceeds a threshold (hereinafter referred to as RT), and (2) the amount of data transmitted per unit time. Exceeds the threshold value (hereinafter referred to as ST), (3) rewriting to the area loaded with the basic function module occurs, and (4) the amount of data rewritten in the area loaded with the extended function module. (5) a certain time has elapsed since the last occurrence of the trigger.
  • RT> ST and RT and ST are larger than the maximum amount of communication data assumed at the time of design.
  • step S23 When the trigger for starting verification has not occurred (step S23: No route), the process ends.
  • step S23: Yes route the verification start trigger occurs (step S23: Yes route)
  • the second verification unit 102 determines whether the second verification process is being executed (step S25). Since the above-mentioned trigger is generated at an arbitrary timing, a new trigger may be generated during execution of the second verification process, and the second verification process may be executed in duplicate.
  • step S27 If the second verification process is not being executed (step S27: No route), the second verification unit 102 records information on the trigger determined to have occurred in step S21 (step S29). And the 2nd verification part 102 performs the 2nd verification process about the program loaded into RAM1009 by calling the calculation part 103 (step S31). Since the second detection process has been described with reference to FIGS. 12 and 13, the description thereof is omitted here.
  • the program to be verified in step S31 includes a basic function module, an extended function module, and an additionally loaded program.
  • step S31 when the second verification process in step S31 is completed, the second verification unit 102 returns the changed cycle CIT to the default value.
  • the second verification unit 102 calculates the hash value calculated for the program loaded in the RAM 1009 (here, the hash value stored in the third hash value storage unit 108) and the hash value stored in the valid value storage unit 104. Is compared to determine whether the program loaded in the RAM 1009 is valid (step S38).
  • step S38 When the program loaded in the RAM 1009 is not valid (step S38: No route), the second verification unit 102 displays a warning message indicating that the program loaded in the RAM 1009 is not valid on the display device 1003 (step S38). S39). If the program loaded in the RAM 1009 is valid (step S38: Yes route), the process ends.
  • step S27 Yes route
  • the second verification unit 102 records the information of the trigger that has occurred this time, and the combination of the trigger that has already occurred and the trigger that has occurred this time. Determination is made (step S33). Since the information of the generated trigger is recorded in step S29 and step S33, the combination is determined using the information.
  • FIG. 15 shows the relationship between the combination of generated triggers and MOR.
  • the numbers in parentheses are numbers representing triggers used in the description of step S21. However, only the combinations for triggers (1) to (4) are shown here. “*” Indicates that one of the triggers (1) to (4) is generated or no trigger is generated.
  • the larger the number of triggers included in the combination of triggers the higher the MOR is set.
  • CIT becomes shorter according to CIT> APS / (MOR * CPP * BN). This shortens the time required to calculate a hash value from one block. However, the setting is performed so that the MOR does not become 100 (%).
  • the second verification unit 102 determines whether to change the cycle CIT (step S35). If the cycle CIT is not changed (step S35: No route), the process is terminated. On the other hand, when changing the cycle CIT (step S35: Yes route), the second verification unit 102 changes the MOR according to the combination of triggers and the relationship shown in FIG. Further, the second verification unit 102 changes the cycle CIT according to the changed MOR (step S37). Then, the process ends. Note that once the cycle CIT is changed, the value of the cycle CIT does not return to the original value until the second verification process in step S31 is completed.
  • the cycle CIT can be changed according to the situation, so that it is possible to further suppress the time taken for the verification process.
  • the present invention is not limited to this.
  • the functional block configuration of the main control device 1 described above may not match the actual program module configuration.
  • the data holding configuration described above is an example and does not have to be the above configuration.
  • the processing order can be changed if the processing result does not change. Further, it may be executed in parallel.
  • the activation may be stopped.
  • the server 3 described above is a computer device. As shown in FIG. 16, a memory 2501, a CPU (Central Processing Unit) 2503, a hard disk drive (HDD: Hard Disk Drive) 2505, and a display device 2509 are included. A display control unit 2507 to be connected, a drive device 2513 for the removable disk 2511, an input device 2515, and a communication control unit 2517 for connecting to a network are connected by a bus 2519. An operating system (OS: Operating System) and an application program for performing the processing in this embodiment are stored in the HDD 2505, and are read from the HDD 2505 to the memory 2501 when executed by the CPU 2503.
  • OS Operating System
  • the CPU 2503 controls the display control unit 2507, the communication control unit 2517, and the drive device 2513 according to the processing content of the application program, and performs a predetermined operation. Further, data in the middle of processing is mainly stored in the memory 2501, but may be stored in the HDD 2505.
  • an application program for performing the above-described processing is stored in a computer-readable removable disk 2511 and distributed, and installed in the HDD 2505 from the drive device 2513. In some cases, the HDD 2505 may be installed via a network such as the Internet and the communication control unit 2517.
  • Such a computer apparatus realizes various functions as described above by organically cooperating hardware such as the CPU 2503 and the memory 2501 described above and programs such as the OS and application programs. .
  • the first value calculated from each part of the program before the computer stops is read from the first storage unit when the computer is started, and (B) the read first value This includes processing for determining the validity of the program based on the value of 1 and the second value calculated from each part of the legitimate program stored in the second storage unit.
  • this program verification method determines whether a start condition, which is a condition for starting verification, is satisfied after the computer is started. (D) If the start condition is satisfied, the program is loaded into the memory. For each part of the program, a third value is calculated within the first time, and (E) a process for determining the validity of the program based on the second value and the calculated third value is further included. But you can. In this way, it is possible to suppress an increase in the time required for the process of calculating a value from each part of the program.
  • the program verification method when the start condition is further satisfied during execution of the process of calculating the third value for each part of the program (F), the program verification method is performed for each part of the program loaded in the memory.
  • a process of calculating the third value within a second time shorter than one time may be further included. In this way, when the start condition is satisfied in a superimposed manner, the time required for completing the verification can be shortened.
  • the start condition described above is that the amount of data received by the computer per unit time exceeds the first amount, and the amount of data transmitted by the computer per unit time exceeds the second amount.
  • the first time and the second time are determined based on at least the size of the program, the occupation rate of the processor, the amount of data that can be processed per unit time, and the number of divisions of the program. Processing may further be included. In this way, the first time and the second time can be appropriately calculated.
  • the value calculated from each part of the program may be a hash value
  • the first value and the second value may be a hash value
  • a program for causing the processor to perform the processing according to the above method can be created.
  • the program is, for example, a computer-readable storage medium such as a flexible disk, CD-ROM, magneto-optical disk, semiconductor memory, or hard disk. It is stored in a storage device.
  • the intermediate processing result is temporarily stored in a storage device such as a main memory.

Landscapes

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

Abstract

本プログラム検証方法は、コンピュータが停止する前にプログラムの各部分から算出した第1の値を、コンピュータの起動時に第1記憶部から読み出し、読み出した第1の値と、第2記憶部に記憶された、正当なプログラムの各部分から算出した第2の値とに基づき、プログラムの正当性を判定する処理を含む。

Description

プログラム検証方法、検証プログラム、及び情報処理装置
 プログラムの検証技術に関する。
 インターネット等のネットワークに接続された装置のプログラムは、外部からの不正なアクセスにより書き換えられてしまうことがあり、書き換えが重大なトラブル等を発生させる場合がある。例えば自動車に搭載されたプログラムが不正に書き換えられると、自動車内の機器が動作不良に陥り、人命にかかわる事故につながる。
 また、プログラムが搭載された装置の使用者が意図的にプログラムを書き換える(例えば、スピード制限を解除するための書き換えを行う)こともあり、そのような書き換えが原因で不具合が発生し、装置を使用できなくなることがある。
 プログラムが正当であることを検証する技術として、装置の起動時にOS(Operating System)等のプログラムが正当であるか確認するセキュアブートという技術が知られている。但し、セキュアブートを利用すると装置の起動に要する時間が長くなるという問題がある。
 また、或る文献は以下のような技術を開示する。具体的には、コンピュータが、プログラムを複数のページに分割し、複数のページのそれぞれについてハッシュ値を計算する。そして、コンピュータが、ハッシュ値に基づいてハッシュアレイを生成し、さらにハッシュアレイのデジタル署名を生成する。
 また、或る文献は以下のような技術を開示する。具体的には、マイクロプロセッサが、監査ハッシュ値を導出するためにメモリの内容にハッシュ計算を実行し、導出されたハッシュ値を、真正なメモリ内容にハッシュ計算を実行して導出した有効ハッシュ値と比較する。
 また、或る文献は、以下のような技術を開示する。具体的には、認証装置が、ダイジェストテーブルと電子署名とを記憶手段からメモリに読み出す。そして、認証装置が、メモリに読み出された電子署名とダイジェストテーブルに含まれるダイジェスト値とを用いてコンテンツデータの正当性を認証する。
 しかし、これらの文献に記載の技術を利用したとしても、起動時にプログラムの正当性を検証することと、起動時間を短縮することとを両立することはできない。
特表2007-506187号公報 特表2001-500293号公報 特開2012-114934号公報
 従って、1つの側面では、本発明の目的は、起動時にプログラムの正当性を検証する場合において、起動に要する時間を短縮するための技術を提供することである。
 本発明に係るプログラム検証方法は、コンピュータが停止する前にプログラムの各部分から算出した第1の値を、コンピュータの起動時に第1記憶部から読み出し、読み出した第1の値と、第2記憶部に記憶された、正当なプログラムの各部分から算出した第2の値とに基づき、プログラムの正当性を判定する処理を含む。
 1つの側面では、起動時にプログラムの正当性を検証する場合において、起動に要する時間を短縮できるようになる。
図1は、本実施の形態のシステム概要を示す図である。 図2は、主制御装置のハードウエア構成を示す図である。 図3は、主制御装置の機能ブロック図である。 図4は、主制御装置が起動時に実行する処理の処理フローを示す図である。 図5は、基本機能モジュールについて説明するための図である。 図6は、本実施の形態におけるハッシュ計算について説明するための図である。 図7は、本実施の形態におけるハッシュ計算について説明するための図である。 図8は、RAMの状態遷移について説明するための図である。 図9は、RAMの状態遷移について説明するための図である。 図10は、RAMの状態遷移について説明するための図である。 図11は、拡張機能モジュールについて説明するための図である。 図12は、第2検証処理の処理フローを示す図である。 図13は、算出処理の処理フローを示す図である。 図14は、主制御装置が起動後に実行する処理の処理フローを示す図である。 図15は、トリガの組合せとCPU占有率との関係を示す図である。 図16は、コンピュータの機能ブロック図である。
 図1に、本実施の形態のシステム概要を示す。例えば自動車に組み込まれた主制御装置1は、インターネット或いはVPN(Virtual Private Network)等のネットワークを介してサーバ3と無線通信を行うことができる。
 主制御装置1には製造時にドライバ、OS、ミドルウエア、及びアプリケーションプログラム等がインストールされるが、運用の開始後にもサーバ3から追加でプログラムがダウンロードされる場合がある。追加でインストールされるプログラムは、例えば、機能を追加するためのプログラムや修正プログラム等である。主制御装置1に搭載されたプログラムは、ネットワークからの攻撃(例えば、悪意のあるプログラムの送り込み)によって不正に書き換えられる可能性がある。
 図2に、主制御装置1のハードウエア構成を示す。主制御装置1は、CPU(Central Processing Unit)1001と、表示装置1003と、通信制御部1005、バス1007と、RAM(Random Access Memory)1009と、記憶装置1011とを有する。
 記憶装置1011は、HDD(Hard Disk Drive)或いはNAND(Not AND)型フラッシュメモリ等であり、本実施の形態の処理を実行するためのプログラム、ドライバ、OS、ミドルウエア、及びアプリケーションプログラム等が格納される。記憶装置1011に格納されたプログラムは、CPU1001によって読み出され、RAM1009にロードされて実行される。例えばモニタである表示装置1003は、警告を表示する画面或いはナビゲーションのための画面等を表示する。通信制御部1005は、ネットワークを介した通信を行うためのハードウエアである。
 図3に、主制御装置1の機能ブロック図を示す。主制御装置1は、第1検証部101と、第2検証部102と、算出部103と、正当値格納部104と、設定データ格納部105と、第1ハッシュ値格納部106と、第2ハッシュ値格納部107と、第3ハッシュ値格納部108とを含む。
 第1検証部101は、主制御装置1の起動時に、RAM1009にロードされたプログラムの正当性を判定する処理を実行する。具体的には、第1検証部101は算出部103を呼び出し、算出部103は、正当値格納部104に格納されているデータ、設定データ格納部105に格納されているデータ、及び第1ハッシュ値格納部106に格納されているデータに基づき処理を実行し、処理結果を第2ハッシュ値格納部107及び第3ハッシュ値格納部108に格納する。第2検証部102は、主制御装置1の起動後に、RAM1009にロードされたプログラムの正当性を判定する処理を実行する。具体的には、第2検証部102は算出部103を呼び出し、算出部103は、正当値格納部104に格納されているデータ及び設定データ格納部105に格納されているデータに基づき処理を実行し、処理結果を第1ハッシュ値格納部106、第2ハッシュ値格納部107及び第3ハッシュ値格納部108に格納する。正当値格納部104、設定データ格納部105、第1ハッシュ値格納部106、第2ハッシュ値格納部107、及び第3ハッシュ値格納部108は、記憶装置1011に設けられる。従って、主制御装置1の電源が切断されたとしてもデータは消去されない。
 次に、図4乃至図15を用いて、主制御装置1が実行する処理について説明する。例えば車両の運転手が、主制御装置1に電源を投入する。主制御装置1に電源が投入された場合、主制御装置1のCPU1001は、記憶装置1011に格納されている基本機能モジュールをRAM1009にロードする(図4:ステップS1)。
 基本機能モジュールは、装置に初期的に搭載されたプログラム及び基本的な機能を実現するためのプログラムを含む。従って、基本機能モジュールは、例えば図5に示すように、主制御装置1の機器を制御するためのドライバと、OSと、基本的な機能を実現するためのミドルウエア及びアプリケーションプログラムとを含む。
 主制御装置1の第1検証部101は、算出部103を呼び出す。そして、算出部103は、第1ハッシュ値格納部106に格納されたハッシュ値を読み出し、読み出したハッシュ値から新たにハッシュ値を算出して第2ハッシュ値格納部107に格納する。さらに、算出部103は、算出したハッシュ値から新たにハッシュ値を算出し(ステップS3)、第3ハッシュ値格納部108に格納する。
 図6を用いて、本実施の形態におけるハッシュ計算について説明する。図6において、破線の矢印はハッシュ計算を示す。本実施の形態においては、メモリにロードされた、ハッシュ計算の対象となるプログラムを予め定めた数(図6においてはn(nは2以上の自然数))に分割し、分割後の各ブロックからハッシュ値を算出する。ここでは、ハッシュ値はn個算出され、第1ハッシュ値格納部106に格納される。
 そして、第1ハッシュ値格納部106に格納されたn個のハッシュ値から新たに1つのハッシュ値が算出される。そして、算出されたハッシュ値は第2ハッシュ値格納部107に格納される。
 さらに、第2ハッシュ値格納部107に格納されたハッシュ値から1つのハッシュ値が算出され、第3ハッシュ値格納部108に格納される。図6の例では第2ハッシュ値格納部107に格納されたハッシュ値は1つであるので、1つのハッシュ値から1つのハッシュ値が算出される。なお、この場合には第2ハッシュ値をそのまま第3ハッシュ値としてもよい。
 図7を用いて、主制御装置1の起動後にRAM1009に追加でプログラムがロードされた場合におけるハッシュ計算について説明する。図7において、破線の矢印はハッシュ計算を表す。追加でプログラムがロードされた場合においては、元々ロードされていたプログラムがn個のブロックに分割され、追加でロードされたプログラムのそれぞれもn個のブロックに分割される。元々ロードされていたプログラムからはn個のハッシュ値が算出され、追加でロードされたプログラムのそれぞれからもn個のハッシュ値が算出され、算出されたハッシュ値は第1ハッシュ値格納部106に格納される。
 そして、元々ロードされていたプログラムについて、第1ハッシュ値格納部106に格納されたn個のハッシュ値から新たに1つのハッシュ値が算出され、第2ハッシュ値格納部107に格納される。また、追加でロードされたプログラムのそれぞれについて、第1ハッシュ値格納部106に格納されたn個のハッシュ値から新たに1つのハッシュ値が算出され、第2ハッシュ値格納部107に格納される。
 さらに、第2ハッシュ値格納部107に格納されたハッシュ値から1つのハッシュ値が算出され、第3ハッシュ値格納部108に格納される。図7の例では、第2ハッシュ値格納部107に格納されているハッシュ値の数は2以上であるので、2以上のハッシュ値から1つのハッシュ値が算出される。
 このように、プログラムからハッシュ値を算出する処理と、ハッシュ値からハッシュ値を計算する処理とが有り、起動時間を長くする原因となるのは前者の処理である。そこで、ステップS3においては、主制御装置1がシャットダウンする前に算出したハッシュ値を利用することで、最終的に第3ハッシュ値格納部108に格納されるべきハッシュ値を算出するまでの時間を短縮できる。
 図8乃至図10に、RAM1009の状態遷移を示す。図8は、起動直後のRAM1009の状態を示す図である。RAM1009には、起動時にロードされたプログラム(本実施の形態においては、基本機能モジュール及び拡張機能モジュール)が格納されている。この場合、ハッシュ計算の対象となるのは、太い実線で囲まれた、起動時にロードされたプログラムである。
 図9は、起動後に追加でプログラムがロードされた場合におけるRAM1009の状態を示す図である。RAM1009には、起動時にロードされたプログラムと、起動後に追加でロードされたプログラムとが格納される。この場合、ハッシュ計算の対象となるのは、太い実線で囲まれた、起動時にロードされたプログラム及び起動後に追加でロードされたプログラムである。
 図10は、一部のプログラムがアンロードされた場合におけるRAM1009の状態を示す図である。RAM1009には、起動時にロードされたプログラムと、起動後に追加でロードされたプログラムとが格納される。但し、起動後に追加でロードされたプログラムのうち一部のプログラムはアンロードされたので、図9の状態と比較すると、プログラムが格納された領域は狭い。この場合、ハッシュ計算の対象となるのは、太い実線で囲まれた、起動時にロードされたプログラム、及び、起動後に追加でロードされたプログラムうちアンロードされていないプログラムである。なお、第1ハッシュ値格納部106に格納されたハッシュ値及び第2ハッシュ値格納部107に格納されたハッシュ値のうちアンロードされたプログラムに対応するハッシュ値は削除される。
 図4の説明に戻り、第1検証部101は、正当値格納部104から、正当なプログラムから算出されたハッシュ値を読み出し、第3ハッシュ値格納部108から、ステップS3において算出されたハッシュ値を読み出す。そして、第1検証部101は、前者のハッシュ値と後者のハッシュ値とが一致するか否かによって、主制御装置1に搭載されたプログラムが正当であるか(すなわち、書き換えられていないか)判定する(ステップS5)。但し、ステップS5において検証が行われるプログラムは、主制御装置1が停止する前のプログラムであって、ステップS5の処理時点において主制御装置1に搭載されたプログラムではない。主制御装置1が停止する前のプログラムは、基本機能モジュール、拡張機能モジュール、及び追加でインストールされたプログラム等を含む。
 なお、正当値格納部104には、プログラム全体、基本機能モジュール、及び拡張機能モジュール等のそれぞれについて正当値が格納されているとする。また、プログラムをダウンロードして追加でロードするような場合には、ダウンロードの時点において正当値を求め直すものとする。なお、拡張機能モジュールは、基本的な機能以外の機能を実現するためのプログラムを含む。従って、拡張機能モジュールは、例えば図11に示すように、拡張的な機能を実現するためのドライバ、ミドルウエア、及びアプリケーションプログラムを含む。
 図4の説明に戻り、プログラムが正当ではない場合(ステップS5:Noルート)、第1検証部101は、プログラムが正当ではないことを示す警告メッセージを表示装置1003に表示させる(ステップS7)。そして処理を終了する。
 一方、プログラムが正当である場合(ステップS5:Yesルート)、第1検証部101は、ステップS1においてRAM1009にロードされた基本機能モジュールの実行をCPU1001に許可する(ステップS9)。これに応じ、CPU1001は、基本機能モジュールの実行を開始する。
 第1検証部101は、算出部103を呼び出すことにより、RAM1009にロードされた基本機能モジュールについて第1検証処理を実行する(ステップS11)。ステップS11においては、基本機能モジュールがn個のブロックに分割され、図6を用いて説明した方法によってハッシュ値が算出される。基本機能モジュールのサイズは後述の拡張機能モジュールと比較してサイズが小さいため、第1検証処理においては、周期的なハッシュ計算を行わない。そして、第1検証部101は、基本機能モジュールについて算出されたハッシュ値(ここでは、第3ハッシュ値格納部108に格納されたハッシュ値)と正当値格納部104に格納されたハッシュ値とを比較することで、基本機能モジュールが正当であるか判定する(ステップS13)。
 基本機能モジュールが正当ではない場合(ステップS13:Noルート)、第1検証部101は、基本機能モジュールが正当ではないことを示す警告メッセージを表示装置1003に表示させる(ステップS15)。そして処理を終了する。
 一方、基本機能モジュールが正当である場合(ステップS13:Yesルート)、第1検証部101は、拡張機能モジュールをRAM1009にロードする(ステップS16)。
 第1検証部101は、算出部103を呼び出すことにより、RAM1009にロードされた拡張機能モジュールについて第2検証処理を実行する(ステップS17)。拡張機能モジュールのサイズは基本機能モジュールと比較してサイズが大きいため、第2検証処理においては、周期的なハッシュ計算がおこなわれる。第2検証処理については、図12及び図13を用いて説明する。
 まず、算出部103は、初回の処理である(すなわち、今回の呼び出しにおいて後述の算出処理を未だ実行していない)か判定する(図12:ステップS51)。初回の処理ではない場合(ステップS51:Noルート)、算出部103は、周期タイマのタイムアウトが発生したか判定する(ステップS53)。周期タイマのタイムアウトが発生していない場合(ステップS53:Noルート)、ステップS57の処理に移行する。周期タイマとは、ステップS55において算出する周期を管理するためのタイマである。
 一方、初回の処理である場合(ステップS51:Yesルート)又はタイムアウトが発生した場合(ステップS53:Yesルート)、算出部103は、算出処理を実行する(ステップS55)。算出処理については、図13を用いて説明する。
 まず、算出部103は、周期タイマを設定済みであるか判定する(図13:ステップS61)。ステップS61においては、周期タイマの周期CIT(秒)を設定済みであるか否かが判定される。
 周期タイマを設定済みではない場合(ステップS63:Noルート)、算出部103は、周期タイマの周期CITを設定する(ステップS65)。このような周期CITを利用することで、1つのブロックからハッシュ値を算出する処理を一定の時間内に実行できるようにする。結果として、全ブロックについてのハッシュ計算が完了するのに要する時間がおおよそ一定になる。
 本実施の形態においては、主制御装置1の設計時に周期CIT及びプログラムの分割数BNを設計者が予め定める。ステップS65においては、周期タイマの初期的な周期としてCITが設定される。CIT、BN、及び全ブロックからハッシュ値を算出するのに要する時間の最大許容時間MOCT(秒)は、プログラムからハッシュ値を算出する際に利用される。
 また、主制御装置1のハードウエアの選定及びソフトウエアの設計を行う際に、初期プログラムのサイズAPS(バイト)及びプログラムからハッシュ値を算出する処理の処理速度CPP(バイト/秒)を設計者が予め定める。
 また、設計者等は、機器の設計において、イベントに対する反応の最大遅延時間MRT(秒)及び最大CPU占有率MOR(%)の値を優先的に定める。なお、イベントに対する応答の最大遅延時間とは、特定のイベントが発生した場合に行う制御が完了するまでに要する時間の最大許容時間である。
 これらのパラメタは、設定データ格納部105に予め格納される。これらのパラメタは、MOCT>APS/(CPP*MOR)、且つ、MRT>(APS/BN)/CPP、且つ、MOR>((APS/BN)/CPP)/CIT、という関係が成立するように定められる。
 これらの関係から、BN>APS/(MRT*CPP)、CIT>APS/(MOR*CPP*BN)、MOCT>APS/(MOR*CPP)という関係を導出することができる。
 図13の説明に戻り、算出部103は、ブロック番号Nを初期化する(ステップS67)。ステップS67においては、ブロック番号Nに「0」が設定される。そして呼び出し元の処理に戻る。
 一方、周期タイマを設定済みである場合(ステップS63:Yesルート)、算出部103は、周期タイマを起動する(ステップS68)。ステップS68の処理により、時間の計測が開始される。
 算出部103は、ブロック番号Nを1インクリメントする(ステップS69)。そして、算出部103は、RAM1009にロードされたプログラム(ここでは、拡張機能モジュール)におけるN番目のブロックからハッシュ値を算出し、第1ハッシュ値格納部106に格納する(ステップS71)。
 算出部103は、ブロック番号N=BNが成立するか判定する(ステップS73)。ブロック番号N=BNが成立しない場合(ステップS73:Noルート)、呼び出し元の処理に戻る。
 一方、ブロック番号N=BNが成立する場合(ステップS73:Yesルート)、算出部103は、第1ハッシュ値格納部106に格納されたハッシュ値から新たにハッシュ値を算出し、第2ハッシュ値格納部107に格納する(ステップS75)。
 算出部103は、第2ハッシュ値格納部107に格納されたハッシュ値から新たにハッシュ値を算出し、第3ハッシュ値格納部108に格納する。そして、算出部103は、周期タイマを停止して設定を解除する(ステップS77)。そして呼び出し元の処理に戻る。
 図12の説明に戻り、算出部103は、ブロック番号N=BNが成立するか判定する(ステップS57)。ブロック番号N=BNが成立しない場合(ステップS57:Noルート)、ステップS51の処理に戻る。一方、ブロック番号N=BNが成立する場合(ステップS57:Yesルート)、呼び出し元の処理に戻る。
 図4の説明に戻り、第1検証部101は、拡張機能モジュールについて算出されたハッシュ値(ここでは、第3ハッシュ値格納部108に格納されたハッシュ値)と正当値格納部104に格納されたハッシュ値とを比較することで、拡張機能モジュールが正当であるか判定する(ステップS19)。
 拡張機能モジュールが正当ではない場合(ステップS19:Noルート)、第1検証部101は、拡張機能モジュールが正当ではないことを示す警告メッセージを表示装置1003に表示させる(ステップS15)。そして処理を終了する。
 一方、拡張機能モジュールが正当である場合(ステップS19:Yesルート)、第1検証部101は、ステップS16においてRAM1009にロードされた拡張機能モジュールの実行をCPU1001に許可する(ステップS20)。これに応じ、CPU1001は、拡張機能モジュールの実行を開始する。そして処理を終了する。
 以上のような処理を実行すれば、プログラムからハッシュ値を算出する処理を起動時にしなくてよいので、起動に要する時間を短縮できるようになる。また、基本機能モジュールと比較すると拡張機能モジュールはサイズが大きいので、単純に検証を行うと時間がかかる。しかし、予めブロック数BN及び周期CIT等を定めておき、それらに従ってハッシュ値の算出を行うので、検証に要する時間が長くなることを抑制できるようになる。本実施の形態によれば、おおよそ一定の時間で拡張機能モジュールの検証を完了できるようになる。
 そして、プログラムが正当ではない(例えば、製造時のプログラムと同じではない)と判定した場合には警告メッセージを表示するので、ユーザは警告メッセージに応じた対応を行えるようになる。
 次に、図14及び図15を用いて、主制御装置1が起動後に実行する処理について説明する。本処理を実行するためのスレッドは定期的に起動される。なお、本処理が複数スレッドによって並行して行われる場合もある。
 まず、第2検証部102は、検証開始のトリガが発生したか判定する(図14:ステップS21)。本実施の形態において、検証開始のトリガとは、(1)単位時間当たりに受信するデータの量が閾値(以下、RTとする)を超えること、(2)単位時間当たりに送信するデータの量が閾値(以下、STとする)を超えること、(3)基本機能モジュールがロードされた領域への書き換えが発生したこと、(4)拡張機能モジュールがロードされた領域において書き換えられたデータの量が閾値を超えたこと、(5)前回にトリガが発生してから一定時間が経過したこと、といったトリガである。但し、RT>STとし、RT及びSTは、設計時に想定する最大の通信データの量より多いとする。
 検証開始のトリガが発生していない場合(ステップS23:Noルート)、処理を終了する。検証開始のトリガが発生した場合(ステップS23:Yesルート)、第2検証部102は、第2検証処理を実行中であるか判定する(ステップS25)。上述のトリガは任意のタイミングで発生するため、第2検証処理を実行中に新たなトリガが発生し、第2検証処理が重複して実行される場合がある。
 第2検証処理を実行中ではない場合(ステップS27:Noルート)、第2検証部102は、ステップS21において発生したと判定されたトリガの情報を記録する(ステップS29)。そして、第2検証部102は、算出部103を呼び出すことにより、RAM1009にロードされたプログラムについて第2検証処理を実行する(ステップS31)。第2検出処理については図12及び図13を用いて説明したので、ここでは説明を省略する。なお、ステップS31において検証の対象となるプログラムは、基本機能モジュール、拡張機能モジュール、及び追加でロードされたプログラムを含む。
 なお、ステップS31の第2検証処理が完了した場合、第2検証部102は、変更された周期CITをデフォルトの値に戻すものとする。
 第2検証部102は、RAM1009にロードされたプログラムについて算出されたハッシュ値(ここでは、第3ハッシュ値格納部108に格納されたハッシュ値)と正当値格納部104に格納されたハッシュ値とを比較することで、RAM1009にロードされたプログラムが正当であるか判定する(ステップS38)。
 RAM1009にロードされたプログラムが正当ではない場合(ステップS38:Noルート)、第2検証部102は、RAM1009にロードされたプログラムが正当ではないことを示す警告メッセージを表示装置1003に表示させる(ステップS39)。RAM1009にロードされたプログラムが正当である場合(ステップS38:Yesルート)、処理を終了する。
 一方、第2検証処理を実行中である場合(ステップS27:Yesルート)、第2検証部102は、今回発生したトリガの情報を記録し、既に発生したトリガと今回発生したトリガとの組合せを判定する(ステップS33)。発生したトリガの情報は、ステップS29及びステップS33において記録されているので、その情報を用いて組合せが判定される。
 図15に、発生したトリガの組合せとMORとの関係を示す。括弧付きの数字は、ステップS21についての説明において使用した、トリガを表す番号である。但し、ここではトリガ(1)から(4)についての組合せのみを示す。「*」は(1)から(4)のうちいずれかのトリガが発生するか或いはいずれのトリガも発生しないことを表す。図15に示すように、本実施の形態においては、トリガの組合せに含まれるトリガの数が多いほど、MORを高い値に設定する。すると、CIT>APS/(MOR*CPP*BN)に従って、CITはより短くなる。これにより、1ブロックからハッシュ値を算出するのに要する時間が短くなる。但し、MORが100(%)にならないように設定が行われる。
 図14の説明に戻り、第2検証部102は、周期CITを変更するか判断する(ステップS35)。周期CITを変更しない場合(ステップS35:Noルート)、処理を終了する。一方、周期CITを変更する場合(ステップS35:Yesルート)、第2検証部102は、トリガの組合せ及び図15に示した関係に従いMORを変更する。さらに、第2検証部102は、変更後のMORに従い周期CITを変更する(ステップS37)。そして処理を終了する。なお、一旦周期CITが変更されると、ステップS31の第2検証処理が完了するまで周期CITの値は元の値には戻らない。
 以上のような処理を実行すれば、状況に応じて周期CITを変更できるので、検証処理に時間がかかってしまうことをさらに抑制できるようになる。
 また、起動後においてはトリガが発生した場合にのみ検証を開始するので、CPU1001に過剰な負荷がかかることがない。
 以上本発明の一実施の形態を説明したが、本発明はこれに限定されるものではない。例えば、上で説明した主制御装置1の機能ブロック構成は実際のプログラムモジュール構成に一致しない場合もある。
 また、上で説明したデータ保持構成は一例であって、上記のような構成でなければならないわけではない。さらに、処理フローにおいても、処理結果が変わらなければ処理の順番を入れ替えることも可能である。さらに、並列に実行させるようにしても良い。
 なお、起動時に基本機能モジュール或いは拡張機能モジュールが正当ではないと判定された場合、起動を停止してもよい。
 なお、上で述べたサーバ3は、コンピュータ装置であって、図16に示すように、メモリ2501とCPU(Central Processing Unit)2503とハードディスク・ドライブ(HDD:Hard Disk Drive)2505と表示装置2509に接続される表示制御部2507とリムーバブル・ディスク2511用のドライブ装置2513と入力装置2515とネットワークに接続するための通信制御部2517とがバス2519で接続されている。オペレーティング・システム(OS:Operating System)及び本実施例における処理を実施するためのアプリケーション・プログラムは、HDD2505に格納されており、CPU2503により実行される際にはHDD2505からメモリ2501に読み出される。CPU2503は、アプリケーション・プログラムの処理内容に応じて表示制御部2507、通信制御部2517、ドライブ装置2513を制御して、所定の動作を行わせる。また、処理途中のデータについては、主としてメモリ2501に格納されるが、HDD2505に格納されるようにしてもよい。本発明の実施例では、上で述べた処理を実施するためのアプリケーション・プログラムはコンピュータ読み取り可能なリムーバブル・ディスク2511に格納されて頒布され、ドライブ装置2513からHDD2505にインストールされる。インターネットなどのネットワーク及び通信制御部2517を経由して、HDD2505にインストールされる場合もある。このようなコンピュータ装置は、上で述べたCPU2503、メモリ2501などのハードウエアとOS及びアプリケーション・プログラムなどのプログラムとが有機的に協働することにより、上で述べたような各種機能を実現する。
 以上述べた本発明の実施の形態をまとめると、以下のようになる。
 本実施の形態に係るプログラム検証方法は、(A)コンピュータが停止する前にプログラムの各部分から算出した第1の値を、コンピュータの起動時に第1記憶部から読み出し、(B)読み出した第1の値と、第2記憶部に記憶された、正当なプログラムの各部分から算出した第2の値とに基づき、プログラムの正当性を判定する処理を含む。
 このようにすれば、プログラムから値を算出する処理をコンピュータの起動時に行わなくてもよいので、起動に要する時間を短縮できるようになる。
 また、本プログラム検証方法は、(C)コンピュータの起動後に、検証を開始するための条件である開始条件が満たされるか判断し、(D)開始条件が満たされた場合、メモリにロードされたプログラムの各部分について、第1の時間内に第3の値を算出し、(E)第2の値と、算出した第3の値とに基づき、プログラムの正当性を判定する処理をさらに含んでもよい。このようにすれば、プログラムの各部分から値を算出する処理に要する時間が長くなることを抑制できるようになる。
 また、本プログラム検証方法は、(F)プログラムの各部分について第3の値を算出する処理を実行中に、開始条件がさらに満たされた場合、メモリにロードされたプログラムの各部分について、第1の時間より短い第2の時間内に第3の値を算出する処理をさらに含んでもよい。このようにすれば、開始条件が重畳的に満たされるような場合には検証が完了するまでに要する時間を短くできるようになる。
 また、上で述べた開始条件は、単位時間あたりにコンピュータが受信するデータの量が第1の量を超えたという条件、単位時間あたりにコンピュータが送信するデータの量が第2の量を超えたという条件、プログラムのうちオペレーティングシステムを含む第1の部分がロードされた領域に書き込みが行われたという条件、プログラムのうち第1の部分以外の分がロードされた領域に書き込まれたデータの量が第3の量を超えたという条件、及び前回開始条件が満たされてから所定時間が経過したという条件の少なくともいずれかを含んでもよい。このようにすれば、プログラムが書き換えられる可能性がある場合に検証を開始できるようになる。
 また、本プログラム検証方法は、(G)コンピュータの起動後に、プログラムとは異なる他のプログラムがさらにメモリにロードされた場合、メモリにロードされた他のプログラムの各部分について、第1の時間内に第4の値を算出し、(H)第3の値及び第4の値と、第2の値とに基づき、プログラム及び他のプログラムの正当性を判定する処理をさらに含んでもよい。このようにすれば、他のプログラムが追加でロードされるような場合においても、値を算出するのに要する時間が長くなることを抑制しつつ、他のプログラムの正当性を判定できるようになる。
 また、本プログラム検証方法は、(I)第1の時間及び第2の時間を、少なくともプログラムのサイズ、プロセッサの占有率、単位時間あたりに処理できるデータ量、及びプログラムの分割数に基づき決定する処理をさらに含んでもよい。このようにすれば、第1の時間及び第2の時間を適切に算出できるようになる。
 また、プログラムの各部分から算出される値はハッシュ値であり、第1の値及び第2の値はハッシュ値であってもよい。
 なお、上記方法による処理をプロセッサに行わせるためのプログラムを作成することができ、当該プログラムは、例えばフレキシブルディスク、CD-ROM、光磁気ディスク、半導体メモリ、ハードディスク等のコンピュータ読み取り可能な記憶媒体又は記憶装置に格納される。尚、中間的な処理結果はメインメモリ等の記憶装置に一時保管される。

Claims (9)

  1.  プログラムから算出した値によって前記プログラムの正当性を検証するプログラム検証方法であって、
     コンピュータが、
     前記コンピュータが停止する前に前記プログラムの各部分から算出した第1の値を、前記コンピュータの起動時に第1記憶部から読み出し、
     読み出した前記第1の値と、第2記憶部に記憶された、正当なプログラムの各部分から算出した第2の値とに基づき、前記プログラムの正当性を判定する、
     処理を実行するプログラム検証方法。
  2.  前記コンピュータが、
     前記コンピュータの起動後に、検証を開始するための条件である開始条件が満たされるか判断し、
     前記開始条件が満たされた場合、メモリにロードされた前記プログラムの各部分について、第1の時間内に第3の値を算出し、
     前記第2の値と、算出した前記第3の値とに基づき、前記プログラムの正当性を判定する、
     処理をさらに実行する請求項1記載のプログラム検証方法。
  3.  前記コンピュータが、
     前記プログラムの各部分について前記第3の値を算出する処理を実行中に、前記開始条件がさらに満たされた場合、前記メモリにロードされた前記プログラムの各部分について、前記第1の時間より短い第2の時間内に前記第3の値を算出する、
     処理をさらに実行する請求項2記載のプログラム検証方法。
  4.  開始条件は、単位時間あたりに前記コンピュータが受信するデータの量が第1の量を超えたという条件、単位時間あたりに前記コンピュータが送信するデータの量が第2の量を超えたという条件、前記プログラムのうちオペレーティングシステムを含む第1の部分がロードされた領域に書き込みが行われたという条件、前記プログラムのうち前記第1の部分以外の分がロードされた領域に書き込まれたデータの量が第3の量を超えたという条件、及び前回前記開始条件が満たされてから所定時間が経過したという条件の少なくともいずれかを含む
     請求項2又は3記載のプログラム検証方法。
  5.  前記コンピュータが、
     前記コンピュータの起動後に、前記プログラムとは異なる他のプログラムがさらに前記メモリにロードされた場合、前記メモリにロードされた前記他のプログラムの各部分について、前記第1の時間内に第4の値を算出し、
     前記第3の値及び前記第4の値と、前記第2の値とに基づき、前記プログラム及び前記他のプログラムの正当性を判定する、
     処理をさらに実行する請求項2記載のプログラム検証方法。
  6.  前記コンピュータが、
     前記第1の時間及び前記第2の時間を、少なくとも前記プログラムのサイズ、プロセッサの占有率、単位時間あたりに処理できるデータ量、及び前記プログラムの分割数に基づき決定する、
     処理をさらに実行する請求項3記載のプログラム検証方法。
  7.  前記プログラムの各部分から算出される値はハッシュ値であり、
     前記第1の値及び前記第2の値はハッシュ値である、
     請求項1記載のプログラム検証方法。
  8.  プログラムから算出した値によって前記プログラムの正当性を検証する処理を実行させるための検証プログラムであって、
     コンピュータに、
     前記コンピュータが停止する前に前記プログラムの各部分から算出した第1の値を、前記コンピュータの起動時に第1記憶部から読み出し、
     読み出した前記第1の値と、第2記憶部に記憶された、正当なプログラムの各部分から算出した第2の値とに基づき、前記プログラムの正当性を判定する、
     処理を実行させるための検証プログラム。
  9.  プログラムから算出した値によって前記プログラムの正当性を検証する処理を実行させる情報処理装置であって、
     前記情報処理装置が停止する前に前記プログラムの各部分から算出した第1の値を格納する第1記憶部と、
     正当なプログラムの各部分から算出した第2の値を格納する第2記憶部と、
     前記情報処理装置の起動時に前記第1の値を第1記憶部から読み出し、読み出した前記第1の値と、前記第2記憶部に記憶された前記第2の値とに基づき、前記プログラムの正当性を判定する判定部と、
     を有する情報処理装置。
PCT/JP2015/064428 2015-05-20 2015-05-20 プログラム検証方法、検証プログラム、及び情報処理装置 WO2016185577A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP15892576.8A EP3299986A4 (en) 2015-05-20 2015-05-20 Program verification method, verification program, and information processing device
PCT/JP2015/064428 WO2016185577A1 (ja) 2015-05-20 2015-05-20 プログラム検証方法、検証プログラム、及び情報処理装置
JP2017518679A JP6601491B2 (ja) 2015-05-20 2015-05-20 プログラム検証方法、検証プログラム、及び情報処理装置
US15/817,020 US10872141B2 (en) 2015-05-20 2017-11-17 Method and apparatus for program verification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2015/064428 WO2016185577A1 (ja) 2015-05-20 2015-05-20 プログラム検証方法、検証プログラム、及び情報処理装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/817,020 Continuation US10872141B2 (en) 2015-05-20 2017-11-17 Method and apparatus for program verification

Publications (1)

Publication Number Publication Date
WO2016185577A1 true WO2016185577A1 (ja) 2016-11-24

Family

ID=57319690

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/064428 WO2016185577A1 (ja) 2015-05-20 2015-05-20 プログラム検証方法、検証プログラム、及び情報処理装置

Country Status (4)

Country Link
US (1) US10872141B2 (ja)
EP (1) EP3299986A4 (ja)
JP (1) JP6601491B2 (ja)
WO (1) WO2016185577A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019012952A1 (ja) * 2017-07-13 2019-01-17 株式会社デンソー 電子制御装置、プログラム改ざん検知方法、プログラム改ざん検知方法のプログラム、およびコンピュータ読み出し可能持続的有形記録媒体
JP6463435B1 (ja) * 2017-10-04 2019-02-06 三菱電機株式会社 制御装置および制御方法
JP2019185575A (ja) * 2018-04-16 2019-10-24 三菱電機株式会社 制御装置および制御方法
WO2020158377A1 (ja) * 2019-01-30 2020-08-06 日立オートモティブシステムズ株式会社 電子制御装置、電子制御装置のセキュリティ検証方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7074146B2 (ja) * 2018-02-02 2022-05-24 日本電気株式会社 情報処理装置、情報処理方法及びプログラム
JP7179482B2 (ja) * 2018-04-19 2022-11-29 キヤノン株式会社 情報処理装置、制御方法、およびそのプログラム

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009009372A (ja) * 2007-06-28 2009-01-15 Panasonic Corp 情報端末、クライアントサーバシステムおよびプログラム
JP2012032925A (ja) * 2010-07-29 2012-02-16 Canon Inc プラットフォーム完全性検証システム
JP2015049785A (ja) * 2013-09-03 2015-03-16 株式会社デンソー プログラム処理装置
JP2015055898A (ja) * 2013-09-10 2015-03-23 富士通セミコンダクター株式会社 セキュアブート方法、半導体装置、及び、セキュアブートプログラム

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6026293A (en) 1996-09-05 2000-02-15 Ericsson Inc. System for preventing electronic memory tampering
US6263431B1 (en) * 1998-12-31 2001-07-17 Intle Corporation Operating system bootstrap security mechanism
US7103779B2 (en) 2003-09-18 2006-09-05 Apple Computer, Inc. Method and apparatus for incremental code signing
US7533274B2 (en) * 2003-11-13 2009-05-12 International Business Machines Corporation Reducing the boot time of a TCPA based computing system when the core root of trust measurement is embedded in the boot block code
US7594124B2 (en) * 2004-06-09 2009-09-22 Intel Corporation Cross validation of data using multiple subsystems
US8291226B2 (en) * 2006-02-10 2012-10-16 Qualcomm Incorporated Method and apparatus for securely booting from an external storage device
SE531992C2 (sv) * 2006-02-24 2009-09-22 Oniteo Ab Metod och system för säker programvaruprovisionering
US8122258B2 (en) * 2006-05-22 2012-02-21 Hewlett-Packard Development Company, L.P. System and method for secure operating system boot
US20080126779A1 (en) * 2006-09-19 2008-05-29 Ned Smith Methods and apparatus to perform secure boot
WO2009044533A1 (ja) * 2007-10-05 2009-04-09 Panasonic Corporation セキュアブート端末、セキュアブート方法、セキュアブートプログラム、記録媒体及び集積回路
US20090193211A1 (en) * 2008-01-24 2009-07-30 Broadcom Corporation Software authentication for computer systems
EP2339499A4 (en) * 2008-08-22 2012-05-09 Ibm MEMORY DEVICE, INFORMATION PROCESSING DEVICE AND PROGRAM
US8738932B2 (en) * 2009-01-16 2014-05-27 Teleputers, Llc System and method for processor-based security
US8812854B2 (en) * 2009-10-13 2014-08-19 Google Inc. Firmware verified boot
JP5315422B2 (ja) 2012-01-10 2013-10-16 任天堂株式会社 データ認証方法およびデータ認証システム
US9070251B2 (en) * 2013-03-08 2015-06-30 Igt Multi-tiered static chain of trust
US9740863B2 (en) * 2014-11-25 2017-08-22 Intel Corporation Protecting a secure boot process against side channel attacks
US10153904B2 (en) * 2015-04-29 2018-12-11 Ncr Corporation Validating resources execution

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009009372A (ja) * 2007-06-28 2009-01-15 Panasonic Corp 情報端末、クライアントサーバシステムおよびプログラム
JP2012032925A (ja) * 2010-07-29 2012-02-16 Canon Inc プラットフォーム完全性検証システム
JP2015049785A (ja) * 2013-09-03 2015-03-16 株式会社デンソー プログラム処理装置
JP2015055898A (ja) * 2013-09-10 2015-03-23 富士通セミコンダクター株式会社 セキュアブート方法、半導体装置、及び、セキュアブートプログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3299986A4 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019012952A1 (ja) * 2017-07-13 2019-01-17 株式会社デンソー 電子制御装置、プログラム改ざん検知方法、プログラム改ざん検知方法のプログラム、およびコンピュータ読み出し可能持続的有形記録媒体
JP2019020872A (ja) * 2017-07-13 2019-02-07 株式会社デンソー 電子制御装置、プログラム改ざん検知方法
US11392722B2 (en) 2017-07-13 2022-07-19 Denso Corporation Electronic control device, program falsification detection method, and computer readable non- transitory tangible storage medium
JP6463435B1 (ja) * 2017-10-04 2019-02-06 三菱電機株式会社 制御装置および制御方法
JP2019068341A (ja) * 2017-10-04 2019-04-25 三菱電機株式会社 制御装置および制御方法
JP2019185575A (ja) * 2018-04-16 2019-10-24 三菱電機株式会社 制御装置および制御方法
WO2020158377A1 (ja) * 2019-01-30 2020-08-06 日立オートモティブシステムズ株式会社 電子制御装置、電子制御装置のセキュリティ検証方法
JPWO2020158377A1 (ja) * 2019-01-30 2021-10-14 日立Astemo株式会社 電子制御装置、電子制御装置のセキュリティ検証方法
JP7091486B2 (ja) 2019-01-30 2022-06-27 日立Astemo株式会社 電子制御装置、電子制御装置のセキュリティ検証方法

Also Published As

Publication number Publication date
EP3299986A1 (en) 2018-03-28
US20180096132A1 (en) 2018-04-05
US10872141B2 (en) 2020-12-22
EP3299986A4 (en) 2018-05-16
JP6601491B2 (ja) 2019-11-06
JPWO2016185577A1 (ja) 2018-02-22

Similar Documents

Publication Publication Date Title
JP6601491B2 (ja) プログラム検証方法、検証プログラム、及び情報処理装置
JP6244759B2 (ja) セキュアブート方法、半導体装置、及び、セキュアブートプログラム
US9940119B2 (en) Providing limited versions of applications
US9092598B2 (en) Version-based software product activation
JP5575338B2 (ja) 情報処理装置、情報処理方法、およびコンピュータプログラム
US9205809B2 (en) Vehicle unit and method for operating the vehicle unit
JP2004295871A (ja) ハードウェア変更の許容度を有するコンピュータシステムにソフトウェアパッケージを結び付けるための詳細ハードウェア識別
KR20140016280A (ko) 운영 체제 구성 값 보호
US20170255775A1 (en) Software verification systems with multiple verification paths
EP3076324B1 (en) Information processing apparatus and method of controlling the apparatus
TW201337630A (zh) 保護軟體授權之方法及系統
US20130080751A1 (en) Method and device for updating bios program for computer system
JP7411902B1 (ja) 情報処理装置、情報処理装置の制御方法及びプログラム
TWI604336B (zh) 使用外部裝置之運行時驗證技術
JP2019020872A (ja) 電子制御装置、プログラム改ざん検知方法
JP6829168B2 (ja) 情報処理装置、情報処理方法およびプログラム
CN108647119A (zh) Linux系统的启动方法、装置及设备
US20060129744A1 (en) Method and apparatus for enabling non-volatile content filtering
JP5621914B2 (ja) 情報処理装置、修正適用判定プログラムおよび修正適用判定方法
CN112882733A (zh) 应用更新方法及装置、电子设备、存储介质
US20210397705A1 (en) Return-oriented programming protection
WO2024057571A1 (ja) 情報処理装置、情報処理装置の制御方法及びプログラム
WO2022255005A1 (ja) 監視システム、監視方法、監視装置および機能制限装置
JP7341376B2 (ja) 情報処理装置、情報処理方法、及び、情報処理プログラム
CN116992431B (zh) 一种镜像文件的版本验证方法及相关装置

Legal Events

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

Ref document number: 15892576

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017518679

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE