WO2008056700A1 - Système de détection de falsification, procédé de détection de falsification, programme de détection de falsification, support d'enregistrement, circuit intégré, dispositif de génération d'informations d'authentification et dispositif de détection de fals - Google Patents

Système de détection de falsification, procédé de détection de falsification, programme de détection de falsification, support d'enregistrement, circuit intégré, dispositif de génération d'informations d'authentification et dispositif de détection de fals Download PDF

Info

Publication number
WO2008056700A1
WO2008056700A1 PCT/JP2007/071638 JP2007071638W WO2008056700A1 WO 2008056700 A1 WO2008056700 A1 WO 2008056700A1 JP 2007071638 W JP2007071638 W JP 2007071638W WO 2008056700 A1 WO2008056700 A1 WO 2008056700A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing
program
data
authentication
tampering detection
Prior art date
Application number
PCT/JP2007/071638
Other languages
English (en)
French (fr)
Inventor
Tomoyuki Haga
Hideki Matsushima
Takayuki Ito
Manabu Maeda
Taichi Sato
Original Assignee
Panasonic Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corporation filed Critical Panasonic Corporation
Priority to EP07831369A priority Critical patent/EP2053533A4/en
Priority to US12/377,040 priority patent/US8453206B2/en
Priority to JP2008543103A priority patent/JP5049288B2/ja
Publication of WO2008056700A1 publication Critical patent/WO2008056700A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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

Definitions

  • Tamper detection system Tamper detection system, tamper detection method, tamper detection program, recording medium, accumulation circuit, authentication information generation device, and tamper detection device
  • the present invention relates to a technique for detecting unauthorized tampering of a program.
  • Patent Document 1 In recent years, various techniques related to program tampering detection have been developed. As a typical technique, there is one disclosed in Patent Document 1.
  • Patent Document 1 authentication data created using a hash function, which is a one-way function, for a program to be tampered with, and a program that is created using a hash function for a program that is a tampering check target.
  • the falsification detection is performed by comparing with the comparison data.
  • it takes a lot of time to generate a hash value for the entire program when falsification detection processing is performed in parallel with the execution of other programs, the execution of other programs may be hindered. .
  • Patent Document 2 correctness is verified based on whether a program satisfies a specific condition at execution time without using a hash value. Specifically, as the specific condition, it is checked whether the return address of the program is within a predetermined address space, whether the execution mode is correct or not, and whether the processing is completed within a predetermined time. If the specific condition is not satisfied, it is determined that the program has been tampered with. According to this, the time required for the falsification detection process without the need to generate a hash value is shortened.
  • Patent Document 1 US Patent No. 6026293
  • Patent Document 2 U.S. Pat. No. 6,178,509
  • the method of Patent Document 2 has a falsification detection processing time shorter than the method of Patent Document 1, only the partial condition is checked, and only the partial verification is performed.
  • a tampering point may exist in addition to the above-mentioned part.
  • the present invention provides a tampering detection system, a tampering detection method, a tampering detection program, a recording medium, and an integrated circuit capable of performing tampering detection of a program at high speed without degrading detection accuracy as compared with the prior art. Intended to be provided.
  • the present invention is a tampering detection system for tampering detection of a program, wherein a program to be executed is processed so as to be shorter than the program, and processing for authentication is performed.
  • the first processing means for generating data, the summarizing process having a larger amount of calculation than the processing for the processing data for authentication, and the first generating means for generating authentication information, and the generated authentication information is held
  • the summarizing process is performed on the holding means, the second processing means for performing the processing on the execution target program to generate comparison processing data, and the summary processing on the comparison processing data.
  • a detection unit that detects tampering of the execution program using the authentication information held by the holding unit and the comparison information generated by the second generation unit.
  • the tampering detection system includes the first processing means and the second processing means as the invention-specifying matters for performing the processing, it is necessary to realize the falsification detection system as two substantially different means. There is no.
  • the present invention also includes the case where the first processing means and the second processing means are realized substantially as one means.
  • the first generation means and the second generation means are provided as the invention specific items for performing the summary processing, but it is not necessary to realize the invention as the two substantially different means.
  • the present invention also includes the case where the first generation means and the second generation means are substantially realized as one means.
  • the tampering detection system of the present invention having the above-described configuration, reduces the program size by processing and then performs summary processing with a large amount of calculation to generate authentication information and comparison information. As compared with the case of performing calculation processing over many programs and summarizing for the whole program, authentication information and comparison information can be generated at high speed.
  • the first processing means performs processing depending on parameters determined at random
  • the second processing means includes parameters used for the processing by the first processing means. It is also possible to carry out the processing using the same parameters as in.
  • the generation of the authentication information by the first generation means is performed before the program is executed, and the generation of the comparison information by the second generation means and the tampering detection by the detection means are performed as described above. It may be performed during program execution.
  • the parameter indicates a size of data
  • the first processing means and the second processing means may process the program into a size indicated by the parameter.
  • the first processing means and the second processing means divide the program into a plurality of block data of the size as the processing and perform the logical operation of the same digit among the block data. It is also possible to generate the processing data for authentication of the size and the processing data for comparison.
  • first processing means and the second processing means may perform an exclusive OR operation as the logical operation.
  • the program can be shortened by the logical operation capable of high-speed processing. Processing can be completed in a short time.
  • the first generation means includes a cache memory, and performs input / output with the memory in which the processed data for authentication is stored via the cache memory, and the first processing means uses the parameter as the parameter.
  • the processing may be performed using information specifying a size equal to or less than a size of a data read / write unit in a cache memory included in the first generation means.
  • the size of data to be subjected to authentication processing can be suppressed to a unit of data handling in the cache memory or less.
  • the data to be subjected to the authentication process can be performed at once without replacing the data in the cache memory, so that the speed of tampering detection can be further increased.
  • the first generation unit may calculate a hash value of the processing data for authentication as the authentication information
  • the second generation unit may calculate a hashed direct of the processing data for comparison as the comparison information. It is also good.
  • first generation unit and the second generation unit may use SHA1 operation to calculate the hash value.
  • the first processing means and the second processing means determine whether the program includes a relocation code to be relocated at the time of loading, and when the program includes a relocation code, The relocation code may be removed, and the program from which the relocation code has been removed may be processed.
  • the first processing means and the second processing means determine whether the program includes a relocation code to be relocated at the time of loading, and when the program includes a relocation code, the included relocation code is a predetermined one. It is possible to replace the code not to be relocated and process the program to which the above relocation code has been replaced. According to this configuration, even in the case where the program includes the relocation code, it is possible to avoid the situation where the contents of the authentication information and the comparison information change for each relocation, and to avoid the situation from the program. Certain authentication information and comparison information can be generated, and tampering detection can be performed using the authentication information and the comparison information.
  • the first processing means generates a random number as the parameter
  • the second processing means holds the random number
  • the first processing means and the second processing means perform the etching process.
  • the processing may be performed after attaching the random number to the program.
  • the first generation means generates a random number, and calculates a hash value of the processed data for authentication using the hash function having the random number as a key as the authentication information, and the second generation means generates the random number.
  • a random number may be held, and the hash value of the processed data for comparison may be calculated using the hash function with the random number as a key as the comparison information.
  • the parameter indicates a size of data
  • the first processing means further performs processing depending on each of a plurality of parameters to generate a plurality of authentication processing data having different sizes
  • the first processing means The generation means performs the summary process on each of the plurality of processing data for authentication to generate a plurality of authentication information
  • the tampering detection system further selects at least one of the plurality of authentication information.
  • causing the second processing means to shrink the program to the size of the selected authentication information by the processing, and the detection means generates the selected authentication information and the second generation means. It is also possible to provide control means for performing tampering detection of the program to be executed using the comparison information and the above! /.
  • control means calculates a process status calculation value related to resource allocation to a process being executed, and selects at least one piece of authentication information based on the process status calculation value. Good thing.
  • control means stores a correspondence table of the process situation calculation value and the authentication information, and may select authentication information corresponding to the calculated process situation calculation value from the correspondence table.
  • the processing load for tampering detection is changed according to the processing status of the tampering detection system.
  • the load on the tampering detection system increases as the size of the data to be subjected to the abstracting process increases, because the load on the summary process is larger than that on the processing process.
  • the program size is too short in processing, the information to be removed from the original program will increase, which will lower the accuracy of tamper detection.
  • the processing status (for example, the operating status of another program) in the tampering detection system is taken into consideration by selecting the size to perform the processing by looking at the status of the process. It enables control to perform tampering detection with appropriate accuracy and speed.
  • the first processing means and the second processing means may, as the processing, randomly identify and extract a part of the program and generate the processing data for authentication and the comparison data for comparison. ! / ⁇ .
  • the first processing means randomly generates information indicating the extraction start position and the extraction end position, and the first processing means and the second processing means calculate the information about the program from the extraction start position.
  • the extraction end position may be extracted.
  • the first processing means randomly generates information indicating the extraction start position and the extraction size of the data, and the first processing means and the second processing means execute the program from the extraction start position.
  • the data for the extraction size may be extracted.
  • a part of the program used to generate the authentication information is changed each time the authentication information is generated, so that the authentication information and the comparison that can pass the check at the time of tampering detection illegally are made. It makes it difficult to generate information and prevents unauthorized programs from being executed.
  • the processing and the summarizing may be processing using different one-way functions. According to this configuration, safe processing data for authentication, comparison processing data, authentication information, and comparison information can be generated by processing using different one-way functions.
  • the present invention is a tampering detection method for performing tampering detection of a program, and processing is performed so that a program to be executed becomes shorter than the program, thereby generating authentication processing data; and the authentication
  • the first processing step of processing the processing data for calculation processing with a larger amount of calculation than the processing processing to generate authentication information, the holding step of holding the generated authentication information, and the program to be executed A second processing step of performing the processing to generate comparison processing data; and a second generation step of performing the summary processing on the comparison processing data to generate comparison information; And a detection step of detecting falsification of the execution program by using authentication information and the comparison information generated by the second generation means.
  • the present invention is a tampering detection program used in a tampering detection system for tampering detection of a program, and processing is performed so that a program to be executed becomes shorter than the program, and authentication processing data is generated.
  • Performing the first processing step performing summary processing on the processing data for authentication that is more computationally intensive than the processing, and generating authentication information, and holding the generated authentication information
  • the summary processing is performed on the step and the second addition process for performing the processing to generate comparison processing data for the program to be executed, and the comparison processing on the comparison processing data.
  • a step to be executed by the Konbyu over data is a tampering detection program used in a tampering detection system for tampering detection of a program, and processing is performed so that a program to be executed becomes shorter than the program,
  • the present invention is a computer readable recording medium, and a first processing step of processing an execution target program so as to be shorter than the program and generating authentication processing data;
  • a tampering detection program is recorded that causes a computer to execute a detecting step of tampering detection of the execution program using the authentication information and the comparison information generated by the second generation unit.
  • the present invention is an integrated circuit for detecting falsification of a program, which is a first processing means for processing an execution target program so as to be shorter than the program and generating authentication processing data; A first generation unit that performs summary processing on the processing data for authentication with a larger amount of calculation than the processing and generates authentication information; a holding unit that holds the generated authentication information; and a program to be executed In contrast, a second processing means for performing the processing process to generate comparison processing data, a second generation means for performing the summary processing on the comparison processing data, and generating comparison information, and And a detection unit that performs tampering detection on the execution program using the authentication information held by the holding unit and the comparison information generated by the second generation unit.
  • the integrated circuit may be a Trusted Platform Module.
  • the present invention is an authentication information generating device for generating authentication information used for tampering detection of a program, which is a program to be executed.
  • the present invention is a tampering detection device that detects tampering of a program, and a program to be executed
  • Processing means for processing the ram to be shorter than the program, and further, holding means for holding authentication information generated by performing summary processing having a larger amount of calculation than the processing, and the program to be executed.
  • detection means for performing tampering detection on the execution program using the held authentication information and the comparison information generated by the generation means.
  • the processing size reduces the size of the program, and then a large amount of calculation amount V and summary processing are performed to generate comparison information. As compared with the case where it is performed, the generation of comparison information can be performed at high speed, and the processing time required for tampering detection can be shortened.
  • FIG. 1 is a block diagram showing an entire configuration of a tampering detection device in a first embodiment of the present invention.
  • FIG. 2 is a diagram showing an example of an authentication data list in Embodiment 1 of the present invention.
  • FIG. 3 is a flowchart showing a program execution operation by the tampering detection apparatus in the first embodiment of the present invention.
  • FIG. 4 is a diagram showing an authentication data generation process in the first embodiment of the present invention.
  • FIG. 5 is a view for explaining transition of data in authentication data generation processing in the first embodiment of the present invention.
  • FIG. 6 is a diagram showing comparison data generation processing in the first embodiment of the present invention.
  • FIG. 7 is a diagram showing authentication data generation processing in a second embodiment of the present invention.
  • FIG. 8 is a diagram showing an example of an authentication data list in a second embodiment of the present invention.
  • FIG. 9 is a diagram showing tampering detection request means in the second embodiment of the present invention.
  • FIG. 10 is a view showing an example of a process management table stored in a process management table storage unit in the second embodiment of the present invention.
  • FIG. 11 is a diagram showing a process of generating a process situation calculation value in scheduling means in a second embodiment of the present invention. 12) A flow showing a process of selecting authentication data using the process situation calculated value according to the second embodiment of the present invention.
  • FIG. 13 is a diagram for describing a program including relocation target code in the modification of the present invention.
  • FIG. 14 shows data generated by removing the relocation target code from the program to be tampered with.
  • (B) shows the data generated by replacing the relocation target code with a prescribed code etc. in the program to be tampered with.
  • FIG. 16 is a diagram for explaining transition of data in authentication data generation processing using HMAC-SHA1 in a modified example of the present invention.
  • a tampering detection device performs tampering detection processing of a program executed at high speed while maintaining a security level in a trade-off relationship with a tampering detection processing speed as much as possible. It is.
  • the tampering detection device stores the program in the ROM, and this program is executed after being stored in the RAM.
  • the tampering detection device first generates authentication data as tampering detection information by a process described later on the program stored in the ROM before loading it into the RAM.
  • the tampering detection device generates comparison data as tampering detection information by processing described later for the program stored in the RAM during execution of the program after loading into the RAM, and the like.
  • the tampering detection device compares the authentication data with the comparison data, and determines that the program is tampered with! /> If the authentication data and the comparison data do not match.
  • the tampering detection apparatus divides a program to be tampered with into blocks, and applies a first hash function to the division result as an example of shortening processing that is processing with relatively low load.
  • the original program is converted into small size conversion temporary data.
  • the tampering detection device applies, to the converted temporary data, a high-load second hash function as a process of generating tampering detection information.
  • the second hash function provides tampering detection information.
  • the first hash function is, for example, a process of performing an exclusive OR operation on data.
  • the second hash function is an SHA1 processing function as an example.
  • the tampering detection information obtained before the loading of the program is the authentication data
  • the tampering detection information obtained after the loading of the program is the comparison data
  • the first hash function since the first hash function has a security level lower than that of the second hash function, it is necessary to use random numbers by random numbers in order to maintain the security level. I have added the element.
  • Embodiment 1 of the present invention will be described below.
  • the tampering detection apparatus 1 is an apparatus for loading a program from a non-volatile memory such as a flash memory to a volatile memory such as a RAM and executing it. To detect.
  • the tampering detection device 1 is a computer configured of a central processing unit (CPU), a read only memory (ROM), a random access memory (RAM), an ice plate, a keypad, and the like. It is a system. A computer program is stored in the ROM, and the tamper detection device 1 achieves its function by the CPU operating according to the computer program read on the RAM.
  • CPU central processing unit
  • ROM read only memory
  • RAM random access memory
  • ice plate an ice plate
  • keypad a keypad
  • a computer program is stored in the ROM, and the tamper detection device 1 achieves its function by the CPU operating according to the computer program read on the RAM.
  • FIG. 1 is a block diagram showing an entire configuration of the tampering detection device 1.
  • the tampering detection apparatus 1 includes a RAM 2, a flash memory 3, a loading unit 4, an executing unit 5, a tampering detection request unit 6, and a tampering detection unit 7. Each component will be described below.
  • the RAM 2 is a random access memory.
  • a program card S is loaded to the RAM 2 by the loading means 4, and data at the time of program execution is written and read out by the execution means 5.
  • the flash memory 3 is a Flash ROM.
  • the flash memory 3 stores a program to be executed and an authentication data list.
  • the flash memory 3 stores the programs 21, 22 ⁇ as programs to be executed.
  • the authentication data list is data including authentication data used for tampering detection. Details of the authentication data list will be described later.
  • the program 24 stored in the RAM 2 is, for example, a program 21 that is a flash memory. It is loaded from 3 to RAM2.
  • the loading unit 4 loads the program stored in the flash memory 3 into the RAM 2 at an appropriate timing.
  • every predetermined time interval can be considered.
  • the loading means 4 stores in advance the timing and the program identifier of the program to be executed at the timing in association with each other.
  • timing it is also conceivable that execution of a program is requested by user operation using the keypad.
  • the program identifier associated with the program to be executed shall be designated by the user operation.
  • the loading means 4 starts loading of the programs stored in the flash memory 3 identified by the program identifier into the RAM 2.
  • the loading means 4 sends a load start notification including a program identifier related to the program that has started loading to the tampering detection request means 6.
  • the loading unit 4 adds information on the program that has started loading to the flash memory 3 as an authentication data list. If the authentication data list is not recorded in the flash memory 3, the authentication data list is newly generated and recorded in the flash memory 3.
  • FIG. 2 is a diagram showing an example of the authentication data list.
  • the authentication data list 23 includes a program identifier 41, a program address 42, a program size 43, a block division size 44, and authentication data 45.
  • the program identifier 41 is ID information for identifying a program.
  • the program recorded in the flash memory 3 is previously provided with a program identifier for identifying the program.
  • the program address 42 is a top address of an area where the loading unit 4 loads a program on the RAM 2.
  • the program size 43 indicates the size of the program identified by the program identifier 41.
  • the loading unit 4 is programmed with the program from the flash memory 3 at the start of loading.
  • the identifier is read out to be the program identifier 41, the address to load the program is the program address 42, and the size of the program to be loaded is added to the authentication data list as the program size 43.
  • the block division size and the contents of the authentication data are written later by a means other than the loading means 4.
  • the block division size 44 and the authentication data 45 will be described later.
  • the loading means 4 transmits to the executing means 5 an execution instruction including the program identifier of the program to be executed.
  • the loading means 4 is an appropriate timing such as when the loaded program is erased from the memory 2 when the loaded program is not executed by the execution means 5, etc. Delete the combination of program identifier, program address, program size, block division size and authentication data.
  • the execution means 5 is a CPU.
  • the execution means 5 receives the execution instruction from the loading means 4 and executes the program identified by the program identifier included in the execution instruction among the programs loaded on the RAM 2.
  • the execution means 5 transmits a trigger notification including the program identifier related to the program being executed to the tampering detection request means 6 at an appropriate timing.
  • the trigger notification can be a trigger for tamper detection start in the tamper detection request means 6.
  • the execution means 5 When the execution means 5 receives the program execution stop instruction from the tampering detection request means 6, the execution means 5 stops the execution of the program identified by the program identifier included in the execution stop instruction.
  • the falsification detection request means 6 relates to falsification detection of the program on the flash memory 3. Control to
  • the tampering detection request unit 6 receives the load start notification from the loading unit 4, and transmits an authentication data generation request including the program identifier included in the load start notification to the tampering detection unit 7.
  • the authentication data is data used for tampering detection. Details of the authentication data will be described later.
  • the tampering detection request unit 6 tries to detect a trigger for starting tampering detection processing while the program is executed by the execution unit 5.
  • the tampering detection request unit 6 transmits a tampering detection request including the program identifier of the program to the tampering detection unit 7. Then, a tampering detection response including a program identifier and a tampering detection result is received from the tampering detection unit 7 as a response to the tampering detection request.
  • the tampering detection result indicates the presence or absence of tampering.
  • the tampering detection request unit 6 transmits, to the executing unit 5, an instruction to stop execution of the program including the program identifier included in the tampering detection response, when the tampering detection result indicates that tampering is present. On the other hand, when the tampering detection result indicates that there is no tampering, the tampering detection request unit 6 does not instruct the execution unit 5 in particular.
  • the above-mentioned trigger for tampering detection start is generated at an appropriate timing when tampering detection should be started.
  • the tampering detection request means 6 itself may periodically generate a trigger and detect the trigger.
  • the execution means 5 starts the execution of a predetermined module in the program
  • the falsification detection request means 6 may be notified, and the falsification detection request means 6 may detect the notification as a trigger.
  • the tampering detection unit 7 includes an input / output unit 11, a division size determination unit 12, a division unit 13, a first conversion unit 14, a second conversion unit 15, a storage unit 16, and a determination unit. Consists of seventeen. Each component will be described below.
  • the input / output unit 11 When receiving the authentication data generation request from the tampering detection request unit 6, the input / output unit 11 transmits the program identifier included in the authentication data generation request to the division size determination unit. When receiving the tampering detection request from the tampering detection request unit 6, the input / output unit 11 transmits the tampering detection request to the judging unit 17.
  • the input / output unit 11 When receiving the tampering detection response from the judging unit 17, the input / output unit 11 transmits the tampering detection response to the tampering detection request unit 6.
  • the division size determination unit 12 determines a block division size BS which is a size per block for dividing the program into a plurality of blocks.
  • a block division size BS which is a size per block for dividing the program into a plurality of blocks.
  • block division the process of dividing a program into a plurality of blocks.
  • the division size determination unit 12 When receiving the authentication data generation request from the input / output unit 11, the division size determination unit 12 generates a random number, and determines the block division size according to the generated random number.
  • the generated random number is used as it is. Since the random number is recalculated each time the program is loaded into memory, the block division size will also be changed according to the recalculation of the random number.
  • the division size determination unit 12 divides the division instruction including the program identifier, the block division size, and the generation data type indicating the type of data to be generated. Send to
  • the generated data type is information indicating generation of either authentication data or comparison data. According to the contents of the generated data type, the processing to be executed by the division means 13 and the second conversion means 15 etc., which will be described later, is selected.
  • the authentication data is data for tampering detection generated from the program before loading by the first conversion unit 14 and the second conversion unit 15.
  • the comparison data is data for tampering detection generated by the first conversion unit 14 and the second conversion unit 15 from the program after loading, and the determination unit 17 also instructs division, as described later for the division unit 13.
  • the determination unit 17 transmits a division instruction including the program identifier, the block division size, and the generated data type indicating generation of comparison data to the division unit 13.
  • the division means 13 When the division means 13 receives the division instruction, the division means 13 reads the program relating to the program identifier included in the division instruction from the flash memory 3. Next, the dividing unit 13 reads the program size corresponding to the program identifier from the authentication data list 23. Then, padding processing is performed according to the read program size.
  • the padding process is performed by adding meaningless data (for example, 0) to the end of the program so that the program size becomes a multiple of the block division size.
  • the dividing unit 13 sets the size of the block division size of the padded program.
  • N pieces of block data (B [1] to B [N]), which are sizes of block division sizes, are generated by block division.
  • the division unit 13 transmits, to the first conversion unit 14, the first conversion instruction including the program identifier included in the division instruction and the generated data type to the first conversion unit 14. Then, when the generated data type indicates generation of authentication data, the dividing unit 13 adds the block division size to the authentication data list 23 in association with the program identifier included in the division instruction.
  • First conversion The means 14, upon receiving the first conversion instruction, converts each block data as a result of being divided into blocks by the dividing means 13 by a conversion process by a predetermined algorithm capable of reducing the data size.
  • this conversion process be a process that can be executed at high speed, such as a simple logical operation.
  • the conversion process performed by the first conversion means 14 is an XOR (eXclusive OR) process. That is, the first conversion means 14 calculates 01 ⁇ of 8 [1] to 8 [. Then, a second conversion instruction including the program identifier, the generated data type, and the authentication temporary data which is the result of the operation included in the first conversion instruction is output to the second conversion means 15.
  • XOR eXclusive OR
  • the second conversion means 15 converts the temporary authentication data included in the second conversion instruction, using a predetermined algorithm.
  • the data conversion process by the second conversion means 15 is a process of calculating the tampering detection value in a relatively long time.
  • the data conversion process performed by the second conversion means 15 is a one-way function.
  • Shall be SHA1 processing.
  • the second conversion means 15 performs SHA1 processing on the authentication temporary data.
  • the second conversion means 15 transmits the result of SHA1 processing to the storage means 16 as the authentication data together with the program identifier.
  • the result of the SHA1 process is transmitted to the determination means 17 together with the program identifier as comparison data.
  • the storage unit 16 When the storage unit 16 receives the program identifier and the authentication data from the second conversion unit 15, the storage unit 16 writes the authentication data in the authentication data list 23 in association with the program identifier.
  • the generated authentication data is the authentication data A3 and the value of the program identifier is 0003, the authentication data A3 is written in the blank space 47.
  • the determination unit 17 receives a tampering detection request from the tampering detection request unit 6 through the input / output unit 11. Then, in the authentication data list 23, a program identifier having the same value as the program identifier included in the tampering detection request is searched. If the program identifier can be found, the block division size corresponding to the program identifier! /, Is read from the authentication data list 23. Then, the determination unit 17 transmits a division instruction including the program identifier, the block division size, and the generated data type indicating generation of comparison data to the division unit 13.
  • the determination means 17 receives the program identifier and the comparison data from the second conversion means 15 after the transmission of the division instruction.
  • the determination means 17 reads out the authentication data corresponding to the program identifier from the authentication data list and compares it with the received comparison data.
  • the judging means 17 sends the tampering detection request means 6 through the input / output means 11 a tampering detection result indicating that there is no tampering if the authentication data and the comparison data match, and the second conversion means 15 And send a tampering detection response including the program identifier acquired from. If the authentication data and the comparison data do not match, the tampering detection result indicating tampering presence, and the second conversion means A tampering detection response including the program identifier acquired from step 15 is sent to the tampering detection request means 6.
  • FIG. 3 is a flowchart showing the program execution operation by the tampering detection device 1.
  • the loading unit 4 reads a program to be executed by the execution unit 5 from the flash memory 3 at an appropriate timing and starts loading the program into the RAM 2 (step Sl).
  • the loading means 4 transmits to the tampering detection request means 6 a loading start notification including the program identifier related to the program that has started loading.
  • the tampering detection request unit 6 receives the load start notification, the tampering detection request unit 6 transmits an authentication data generation request including the program identifier included in the load start notification to the tampering detection unit 7.
  • step S2 When the tampering detection means 7 receives the authentication data generation request, the tampering detection unit 7 generates authentication data for authentication of program tampering and an authentication data list (step S2). The details of step S2 will be described later using FIG.
  • the loading means 4 sends an execution instruction including the program identifier indicating the loaded program to the executing means 5.
  • the executing means 5 starts the execution of the program identified by the program identifier included in the execution instruction (step S3).
  • steps S2 and S3 are described to be sequentially executed, but steps S2 and S3 may of course be executed in parallel.
  • the tampering detection request unit 6 monitors the occurrence of the tampering detection trigger (Step S4).
  • step S4 NO
  • step S8 YES
  • step S4 When the tampering detection trigger occurs (step S4: YES), the tampering detection request unit 6 transmits a tampering detection request including the program identifier of the program loaded in step S2 to the tampering detection unit 7.
  • the tampering detection unit 7 When the tampering detection means 7 receives the tampering detection request, the tampering detection unit 7 includes a program included in the tampering detection request.
  • the above comparison data is generated for the program identified by the program identifier (step S5). Step S5 will be described later.
  • the determination means 17 in the tampering detection means 7 reads out the authentication data from the authentication data list, and compares the authentication data with the comparison data (step S6).
  • the tampering detection means 7 inputs / outputs a tampering detection response including a tampering detection result indicating no tampering and a program identifier. Transmit to the tampering detection request unit 6 via the unit 11.
  • the falsification detection request means 6 does not perform any particular processing when it receives a falsification detection result indicating no falsification. As a result, the processing after step S4 is continued.
  • the tampering detection means 7 is a tampering result including tampering detection result indicating that tampering exists, and a program identifier, in the case (step S6: NO) where authentication data and comparison data are exchanged.
  • the detection response is sent to the tampering detection request unit 6 through the input / output unit 11.
  • the falsification detection request means 6 transmits, to the execution means 5, an execution stop instruction including the program identifier included in the falsification detection response, when the falsification detection result indicating the presence of falsification is included in the falsification detection response.
  • the execution means 5 stops the execution of the program identified by the program identifier included in the execution stop instruction (step S7).
  • step S2 Next, the details of step S2 will be described using FIG.
  • FIG. 4 is a diagram showing an authentication data generation process which is a detail of step S2.
  • the input / output unit 11 in the tampering detection unit 7 receives an authentication data generation request including the program identifier from the tampering detection request unit 6.
  • the input / output unit 11 transmits the authentication data generation request to the division size determination unit 12
  • the division size determination unit 12 generates a random number upon receiving the authentication data generation request, and determines a block division size BS based on the random number (step S21).
  • the division size determination unit 12 transmits a division instruction including the program identifier, the block division size, and the generated data type indicating generation of authentication data to the division unit 13.
  • the division means 13 reads out from the flash memory 3 the program relating to the program identifier included in the division instruction.
  • the dividing unit 13 reads the program size PS corresponding to the program identifier from the authentication data list 23.
  • the dividing unit 13 performs padding processing according to the read program size PS (step S22).
  • the dividing unit 13 divides the program after padding into block data (B [1] to B [N]) of the size of the block division size (step S23).
  • the division unit 13 transmits, to the first conversion unit 14, the first conversion instruction including the program identifier included in the division instruction and the generated data type to the first conversion unit 14.
  • the dividing unit 13 adds the block division size to the authentication data list 23 in association with the program identifier included in the division instruction (step S24).
  • the first conversion means 14 initializes a variable i to 1 and secures a buffer area Buf whose size is BS, and initializes Buf to a value 0 (step S25).
  • step S26 YES
  • XOR exclusive OR
  • step S28 i is incremented by 1 (step S28), and the process returns to step S26.
  • step S26 NO
  • the first conversion means 14 If i exceeds N (step S26: NO), the first conversion means 14 outputs the program identifier to the second conversion means 15 and outputs the contents of Buf as authentication temporary data (step S26). Step S29).
  • the second conversion means 15 performs SHA1 processing which is a predetermined operation on the authentication temporary data, and generates authentication data which is a 20-byte hash value as a result (step S30).
  • the second conversion means 15 transmits the result of the SHA1 process to the storage means 16 together with the program identifier as authentication data.
  • FIG. 5 is a diagram for explaining the transition of data in the authentication data generation process.
  • the program 21 is a program to be subjected to tampering check.
  • the program size of program 21 is 62 KB, and the block division size determined by division size determination unit 12 is 4 KB.
  • the program 21 is padded.
  • the data used for padding is, for example, meaningless data whose value is all 0.
  • the size of the padded program is a multiple of the block division size 4 KB.
  • the result of block division is program 61 shown in FIG.
  • the authentication temporary data 63 is the result of operating B [l] (+) B [2] (+) ⁇ ⁇ ⁇ (+) B [16].
  • Authentication data 65 which is a 20-byte hash value, is generated.
  • step S5 in FIG. 3 details of step S5 in FIG. 3 will be described using FIG.
  • FIG. 6 is a diagram showing a comparison data generation process which is a detail of step S5.
  • the input / output unit 11 in the tampering detection unit 7 receives the tampering detection request from the tampering detection request unit 6, and transmits the tampering detection request to the judging unit 17.
  • Judgment means 17 receives a tampering detection request from tampering detection request means 6 through input / output means 11. To receive. Then, in the authentication data list 23, a program identifier having the same value as the program identifier included in the tampering detection request is searched. If the program identifier can be found, the block division size corresponding to the program identifier is read out from the authentication data list 23. Then, a division instruction including the program identifier, the block division size, and the generated data type indicating generation of comparison data is transmitted to the dividing means 13 (step S41).
  • the dividing means 13 When the dividing means 13 receives the division instruction, it reads out the program size corresponding to the program identifier from the authentication data list 23. Then, the dividing unit 13 performs padding processing according to the program size for the program identified by the program identifier among the programs loaded on the RAM 2 (step S42). The contents of this padding process are the same as those described in step S22.
  • the dividing unit 13 divides the padded program into block data (B [1] to B [N]) of the size of the block division size (step S43).
  • the contents of this division process are the same as those described in step S23.
  • the division unit 13 transmits, to the first conversion unit 14, the first conversion instruction including the program identifier included in the division instruction and the generated data type to the first conversion unit 14.
  • the first conversion means 14 calculates the XOR of the block generated in step S43 and stores the result in Buf in the same manner as described in steps S25 to S28 (steps S44 to S47).
  • the first conversion means 14 outputs the contents of Buf to the second conversion means 15 as comparison temporary data.
  • the second conversion means 15 performs SHA1 processing which is a predetermined operation on the comparison temporary data, and generates comparison data which is a 20-byte hash value as a result thereof (step S 49), and compares the comparison data. End the generation process.
  • the program subjected to tampering check is subjected to conversion by the first conversion unit 14 which is a process with very light load such as XOR processing, leaving the program features. Reduce data volume fast.
  • the second conversion means 15 which is processing with high load such as SHA1 processing is performed on the data whose data amount has already been reduced. Therefore, as a whole, the power for tampering detection processing is reduced by the power S.
  • the first data conversion process by the first conversion unit 14 can be easily identified.
  • the first data conversion process is specified, it is possible to tamper the original legitimate program with an illegal operation while making the results of the first data conversion process equal. I will.
  • the block division size is set to be random by making it difficult to predict!
  • the block division size is randomly determined each time the program is loaded on the Flash. Therefore, even if unauthorized analysis is performed focusing on one program, the block division size changes with each load, making it difficult to predict the block division size, thereby effectively preventing unauthorized tampering. be able to.
  • the XOR processing of the first conversion means 14 has a lower level of safety than the SHA1 of the second conversion means 15! /
  • the force division size determination means 12 that is processing determines the block division size using random numbers. By doing this, tampering detection processing is possible without lowering the level of safety.
  • the authentication data is dynamically generated in the authentication data generation process, unlike the prior art, it is not necessary to leave an execution log in memory in advance. Furthermore, since there is no need to hold authentication data in advance, memory saving is achieved. Furthermore, it is possible to prevent the data stored in memory from being stolen and taken as a clue to fraud analysis.
  • one authentication data is generated for one tampering check target program.
  • a plurality of authentication data is generated for one tampering check target program.
  • a plurality of different block division sizes are used to generate the plurality of authentication data.
  • one of the plurality of authentication data is selected according to the status of the process being executed by the tampering detection device (hereinafter referred to as the process status), and the selected authentication data is compared with the comparison data.
  • the process status the status of the process being executed by the tampering detection device
  • the tampering detection means 7 in the present embodiment is the same as that described in FIG. 1 of the first embodiment. However, the operation of each component is slightly different from that according to the first embodiment.
  • the division size determination unit 12 in the present embodiment determines a plurality of block division sizes. Then, the dividing unit 13, the first conversion unit 14 and the second conversion unit 15 generate a plurality of authentication data corresponding to each block division size. Then, the storage unit 16 registers the plurality of generated authentication data in the authentication data list. Further, the judging means 17 selects one of the authentication data of a plurality of sizes recorded in the authentication data list according to the process status, and notifies the dividing means 13 of the size of the selected authentication data.
  • the operation of the tampering detection request means 6 is somewhat different from that of the first embodiment.
  • FIG. 7 The process shown in FIG. 7 is the same as the process shown in FIG. The parts that perform data conversion processing are almost common.
  • the tampering detection request unit 6 transmits an authentication data generation request including the program identifier to the division size determination unit 12 through the input / output unit 11.
  • the division size determination means 12 generates M random numbers upon receiving the authentication data generation request.
  • M is a predetermined natural number.
  • this M may be randomly generated and stored in the device.
  • a block division size (BS- ;! to BS-M) corresponding to each of the M random numbers is generated (step S61).
  • the procedure for determining the block division size from each random number is the same as the procedure in the first embodiment.
  • division size determination means 12 sends division instructions to division means 13 including a program identifier, block division sizes (BS-1 to BS-M), and a generation data type indicating generation of authentication data. To send.
  • the division means 13 When the division means 13 receives the division instruction, the division means 13 reads from the flash memory 3 the program relating to the program identifier included in the division instruction. Next, the dividing means 13 reads the program size PS corresponding to the program identifier from the authentication data list 23.
  • the dividing means 13 initializes the internal variable j to 1 (step S62). Then, let BS be BSJ (step S63).
  • Steps S64 to S72 are the same as Steps S22 to S30 described above.
  • N in the first embodiment is replaced with NJ in the second embodiment.
  • the division number of the block is N in the first embodiment and is in the second embodiment. Further, the authentication data in the first embodiment is replaced with the authentication data J in the second embodiment. It is
  • the authentication data list generated by the dividing unit 13 in step S66 is different from that generated in the first embodiment.
  • FIG. 8 is a view for explaining an authentication data list 81 generated by the dividing unit 13 in step S66.
  • the authentication data list 81 four different block division sizes and four different authentication data are registered for one program identifier whose value is 0001.
  • M the value of M is four.
  • step 66 the dividing unit 13 adds BS J to the block division size 85 column every time the block division is performed for “BS”.
  • the storage means 16 records the authentication data J generated by the second conversion means 15 in step S 72.
  • the dividing unit 13 increments j (step S73).
  • step S 74 YES
  • step S74 NO
  • the processing of step S63 and thereafter is performed.
  • the second embodiment at the time of tampering detection processing, it is registered in the above-described authentication data list 81.
  • One is selected from M (four in the present embodiment) authentication data, and comparison data to be compared with the authentication data is calculated. Then, tampering of the program is detected by comparing the comparison data and the authentication data.
  • the authentication data used for the above-mentioned comparison is selected based on the process status calculation value calculated based on the status of the currently operating process. Details of the process situation calculation value will be described later.
  • the tampering detection request means 6 has the necessary functions added to those in the embodiment 1 in order to generate the process status calculation value.
  • the tampering detection request means 6 in the present embodiment has a function of monitoring the process status.
  • FIG. 9 is a schematic diagram showing the tampering detection request means 6 in the second embodiment, centering on the configuration added from the first embodiment.
  • the falsification detection request means 6 has the functions described in the first embodiment, and further, as an internal configuration, scheduling means 101 for monitoring the entire group of processes that can be switched, priority of each process, and CPU use And a process management table storage unit 102 for storing process information such as rates.
  • the process management table storage unit 102 stores a process management table.
  • FIG. 10 shows an example of the process management table 121 stored in the process management table storage unit 102.
  • the process management table 121 includes a process identifier 122, a priority 123, and a CPU utilization 124.
  • the process identifier 122 is a process ID for identifying a process being executed.
  • the priority 123 is a priority of the priority given to the process identified by the process identifier 122.
  • the CPU usage rate 124 is a numerical value representing how much CPU power is used to process power identified by the process identifier 122.
  • the process management table 121 indicates that the priority of the process identified by the process identifier “0001” is “10” and the CPU utilization is “40%”. Similarly, the priority of each process identified by the process identifiers "0002""0003""0004""0005" is "4""8""1""3", and the CPU utilization is "10%. “30%” “1%” “5%”.
  • process management table is generated by the execution means 5 executing the process and updated one by one.
  • the scheduling unit 101 reads the process management table 121 from the process management table storage unit 102 (step S101).
  • step S102 using the information registered in the process management table 121, a process situation calculation value is calculated by a predetermined algorithm.
  • the predetermined algorithm the number of processes registered in the process management table is calculated, and the calculated number of processes is set as the process status calculation value.
  • the process management table 121 is in the state of FIG. 10, the number of processes registered in the process management table 121 is! /, And the number of process identifiers “0001” to “00 05”. 5
  • the scheduling means 101 sets the process status calculated value to “5” according to the above-mentioned algorithm.
  • step S 102 the process situation calculation value calculated in step S 102 is transmitted to the input / output means 11 of the tampering detection means 7 (step S 103).
  • the input / output unit 11 having received the process status calculated value transmits the process status calculated value to the determination unit 17.
  • FIG. 12 is a flow showing processing for selecting authentication data using the process status calculated value. is there.
  • the determination means 17 receives the process status calculation value before the generation of comparison data is started (step S 121).
  • the determination means 17 holds threshold information consisting of a set of the maximum threshold and the minimum threshold in advance.
  • the threshold information is information used to select authentication data, and is compared with the process status calculation value.
  • the determination means 17 reads out the threshold information (step S122), and determines whether the process status calculated value is equal to or greater than the maximum threshold (step S123).
  • step S123 If the process status calculated value is equal to or larger than the maximum threshold (step S123: YES), the authentication data having the smallest block division size in the authentication data list 121 is selected (step S124).
  • authentication data list 81 has the contents shown in FIG. 8, authentication data-1 corresponding to the minimum block division size 1 KB is selected.
  • step S123 if the process status calculated value is less than the maximum threshold (step S123: NO), it is further determined whether the process status calculated value is less than or equal to the minimum threshold (step S125).
  • step S125 If the process status calculated value is less than or equal to the minimum threshold (step S125: YES), the authentication data list 81 selects authentication data having the largest block division size (step S126).
  • the maximum block division size is 20 KB, so that authentication data 4 is selected.
  • the authentication data list 81 is randomly selected from all the authentication data in the list 81 (step S 127).
  • one authentication data can be selected from a plurality of authentication data.
  • the determination unit 17 reads the program address 83, the program size 84, and the block division size 85 from the authentication data list 81 corresponding to the selected authentication data.
  • the comparison data is calculated, and the comparison data and the authentication data are calculated. Compare and perform tampering detection processing.
  • the load applied to the tampering detection process can be adjusted by using the process state calculation value. As a result, tampering detection processing is possible with minimal impact on other processes.
  • the RAM 2 is not limited to a random access memory, and may be a readable and writable memory.
  • the flash memory 3 is not limited to the flash ROM and is not limited to this, and may be another nonvolatile memory such as an EEPROM (Electrically Erasable Programmable ROM) or an HDD (Hard Disk Drive).
  • EEPROM Electrically Erasable Programmable ROM
  • HDD Hard Disk Drive
  • the program identifier is not only information that identifies ID information for identifying a program, but it may be information that can identify a program, such as a process ID or a file name.
  • the block division size is not limited to the power used to generate the generated random number as it is.
  • a correspondence table of random numbers and block division sizes may be stored in advance, and the generated random numbers may be converted into block division sizes by using the correspondence table.
  • a predetermined number for example, five
  • one of the candidate values may be used in order.
  • padding may be performed on the final block divided into blocks, which has been subjected to padding before being divided into blocks.
  • B [16] is a 2 KB block.
  • the padding process may be omitted.
  • B [16] has fewer bits than the data in Buf.
  • the result of performing an XOR operation with the data of B [16] only on part of the data in Buf may be used as authentication temporary data 63.
  • the result of the XOR operation up to 5] may be taken as authentication temporary data 63.
  • the top address of the portion to be tampered with for the program may be registered as the program address 42, and the program size of the portion to be tampered with may be registered as the program size 43 in the authentication data list 23.
  • the time required for tampering detection can be shortened. In particular, it is effective when detecting tampering with a large program that requires a considerable amount of time S even if authentication temporary data is generated.
  • a set of program address 42, program size 43, block division size 44 and authentication data 45 is associated with one program identifier. You may register more than one!
  • a method for selecting a program to be tampered with from a plurality of programs has not been described in particular. Is considered. First, a method may be considered in which one of the programs stored in the flash memory 3 selected at random among the programs stored in the flash memory 3 is used as the program subjected to the tampering check.
  • the tampering detection request unit 6 receives the selection of a program for requesting tampering check from the outside of the apparatus, and transmits the selected program program identifier to the tampering detection unit 7 by including it in the authentication data generation request. It may be
  • an interrupt for tampering check may be generated at some timing, and a program being executed at that time may be selected as a program to be tampered with.
  • the program execution means 50 is executing a program on the RAM
  • the tampering detection request means 6 generates an interrupt to the execution means 5 and acquires the program counter value at that time.
  • the program counter value is transmitted to the input / output means 11, and the program counter value received by the input / output means 11 is transmitted to the determination means 17.
  • the judging means 17 may read program information corresponding to the address indicated by the program counter value from the received program counter value and the program address and program size in the authentication data list 23.
  • the tampering detection request unit 6 may notify the input / output unit 11 of a comparison data generation request, and may periodically notify the timing to perform tampering detection of the program, or the tampering on the RAM 2 may be performed. It may be performed at the timing when a predetermined event occurs, such as embedding processing for transmitting an authentication data generation request to the tampering detection request means 6 and processing for transmitting a tampering detection request in the program to be checked. ! /.
  • a threshold of block division size may be set for the division size determination unit 12 so that the block division size generated by the division size determination unit 12 becomes equal to or less than the threshold.
  • the data conversion process by the first conversion means 14 is XOR
  • the data conversion process by the second conversion means 15 is SHA1, which is limited to this.
  • an algorithm in which a logical product operation and an exclusive OR operation are alternately performed can be considered as an algorithm in which a combination of logical operations and a unidirectional function may be used.
  • the algorithm will be specifically described, taking the case of performing this algorithm by the first conversion means 14 as an example.
  • the ratio of the number of executions of the AND operation and the exclusive OR operation may not be 1: 1 as described above, but may be another ratio such as 2: 1.
  • this algorithm By implementing the ratio to be determined at random, this algorithm also becomes a light-weight and random algorithm.
  • the first conversion means 14 for reducing data volume has a lightweight one-way function
  • the second conversion means 15 for calculating authentication data has high safety! // one-way function Let's use it.
  • the divided data by the dividing unit 13 and the XOR processing of the first data conversion processing unit 75 may be performed on the concatenated data.
  • the conversion by the first conversion means 14 as a conversion that generates different first authentication data depending on the order of linked programs, it does not know the order in which the connected programs are connected. It can be difficult for fraud analysts.
  • the temporary authentication data generated by the first conversion means 14 changes depending on the order of the programs connected as described above, the program connected in the same order when generating the comparison data as well. Since it is necessary to perform conversion, the program order information is also registered in association with the authentication data.
  • the process of dividing the block by the dividing unit 13 and generating the authentication temporary data by the first conversion unit 14 is performed. It is possible to loop only the number of programs subject to tampering check.
  • the storing means 16 registers the correspondence between the generated authentication data and the program subjected to the tampering check in the flash memory 3.
  • the dividing unit 13 divides the program into blocks of block division sizes determined by the division size determining unit 12. Then, the first conversion means 14 performs processing with the program divided into blocks as an input, and as a result, it is not limited to the force of outputting data of the block division size.
  • the processing by the division size determination means 12, the division means 13 and the first conversion means 14 is reduced to a size that is determined at random when the input program power is loaded and is given to the second conversion means 15. May be replaced with another process. Even in this case, The effects described in Form 1 can be obtained unchanged.
  • the number M of block division sizes is determined in advance, and the force stored by the division size determination unit 12 is not limited to this.
  • the tampering detection request unit 6 may notify the division size determination unit 12 of M instructed by the user operation.
  • the value of M may be determined according to the number of authentication data that can be stored in the flash memory 3 or the like.
  • authentication data may be selected randomly. In this way, comparison data of a random size is generated within the range of the block division size pattern of authentication data, which can make analysis of comparison data difficult.
  • the authentication data list stored in the flash memory 3 is stored in the plaintext as S, and in order to store it more safely, the tamper resistance such as secure flash memory is used. It is also possible to store it in a memory with sex! /.
  • the force of storing the authentication data list in the flash memory 3 is not limited to this.
  • a small-capacity secure memory may be provided in the storage unit 16 and the authentication data list may be stored in the secure memory.
  • the tampering detection means 7 may have the decryption means and the encryption key, and the authentication data list may be stored in an encrypted state using the encryption key.
  • the encrypted authentication data list is decrypted using the encryption key in the tampering detection means 7 and the decoy decryption means. If the file is stored again after reference and appending is completed, the authentication data list is encrypted and saved using the encryption key and the decryption means.
  • the authentication data list can be stored safely, and the block division size can be reliably protected from unauthorized analysts.
  • the authentication data list is dynamically generated by the tampering detection means 7 when the program to be tampered with on the flash memory 3 is loaded into the RAM 2;
  • the authentication data list is stored in advance 16 or flash memory 3 It may be stored in the
  • the program to be tampered with on the flash memory 3 is loaded into the RAM using the authentication data list stored in advance in the storage unit 16 or the flash memory 3, the program is tampered with. It may be detected. By doing this, it is possible to detect tampering even for the program on the flash memory 3 which is not only the program on the RAM 2.
  • the program after conversion to the data format after loading to RAM 2 may be stored in the authentication data list.
  • the program is compressed and stored on the Flash, and the compressed program is decompressed at the time of loading to the RAM, and the decompressed program is executed, etc. It is possible to detect tampering with the program of
  • a tamper detection device 1 is added with transmission / reception means for transmitting / receiving data to / from an external terminal, and a new authentication data list is obtained from the external terminal using the transmission / reception means, and the old authentication data list is obtained. May be updated. In this way, the authentication data list can be updated and security can be maintained.
  • the tampering detection apparatus 1 may be provided with a storage medium reading means for reading data of the storage medium. A new authentication data list is stored in the storage medium. Then, the tampering detection device 1 reads a new authentication data list from the storage medium, and updates the old authentication data list with the new authentication data list. In this way, the authentication data list can be updated and security can be maintained.
  • the loading unit 4 is a flash memory.
  • the program may be read out again from 3 and loaded again. In this way, when it is detected that the program on RAM 2 has been tampered with, it is possible to execute the program that has not been tampered with and loaded again, so that the program can be executed more safely. It becomes possible.
  • information indicating that tampering has been detected may be left as log information in the non-volatile memory.
  • log information indicating that tampering has been detected may be transmitted to the server via the network.
  • the tampering detection device 1 or the tampering detection means 7 described above may be a secure execution environment.
  • the Trusted Computing Group is an example of a secure implementation.
  • TPM Trusted Platform Module
  • MTM Mobile Trusted Module
  • the first conversion means 14 must output data of this size, which always outputs data of the block division size as a processing result Do not mean.
  • the above-described embodiment is based on the block division size and the data to be taken by the conversion result. This is an example in which the task sizes are the same, and these sizes may be determined independently. An example of the implementation will be briefly described below.
  • the division size determination means 12 randomly determines both the block division size and the data size to be taken of the conversion result, and notifies the first conversion means 14 of the data size to be taken of the conversion result.
  • the first conversion means 14 reduces the data size of the program so as to be equal to or less than the notified data size. Also, the certification data list additionally records the data size to be converted.
  • the first conversion means 14 reduces the amount of data until the data size to be taken of the conversion result recorded in the authentication data list and continues the processing.
  • the program is divided into block division sizes determined at random, and the result is subjected to an XOR operation or the like to provide randomness with respect to data reduction, thereby attacking data reduction processing. It was difficult.
  • the method of giving randomness for data reduction is not limited to this.
  • a plurality of types of algorithms themselves for reducing the amount of data may be prepared, and it may be randomly determined which algorithm is used to reduce the data.
  • the second conversion means 15 may perform the processing.
  • the force that makes it difficult to attack even if the block division size or the data size to be taken by the conversion result is a fixed value is determined randomly. It goes without saying that the safety may be further enhanced by doing this.
  • each means for calculating authentication data and each means for calculating comparison data may be provided separately.
  • the process management table 121 includes the process identifier 122.
  • the present invention is not limited to this, and any information such as other program identifiers may be used to identify the process.
  • the process management table 121 is as shown in FIG. 10 as an example, the CPU utilization of the process identifiers “000 ;!” to “0005” is “40” respectively. Since%, 10%, 30%, 1%, and 5%, the total CPU utilization, which is the total, is 86%. Therefore, the process status calculated value is “86”.
  • step S127 of the second embodiment when authentication data is selected, the power S, which is selected at random from all authentication data in the authentication data list 81, is selected. Not limited to this.
  • the maximum and minimum block division sizes may be excluded // or randomly selected! //.
  • the authentication data list 81 is as shown in FIG. 8, the authentication data-2 and the authentication data-3 are randomly selected.
  • the program includes non-relocation target code (NC;! To NC3), relocation target code (RC;! To RC2), and a relocation table.
  • Non-relocation target code is code that is not relocated, and code is not replaced even if it is loaded into RAM.
  • the relocation target code is a code to be relocated, and as described above, symbolic loads in the code are replaced with specific memory addresses when loaded. Therefore, the program after being loaded into the RAM is different from the one stored in the flash memory 3 at the part where the above replacement has been made.
  • the relocation table contains information for performing relocation. It does not replace code when loaded into RAM.
  • the program loaded into the RAM includes the non-relocation target code (NC;! To NC3), the relocated code (RC:!, To RC2,), and the relocation table.
  • the program to be relocated is If authentication data is generated from the pre-program and comparison data is generated from the loaded program, the authentication data and the comparison data are always different, and it is determined that tampering has been performed.
  • the program to be tampered with is processed so as to become the data shown in FIG. 14 (a) or FIG. 14 (b), and authentication data and comparison data are generated from the processed data.
  • FIG. 14 (a) shows the data generated by removing the relocation target code from the program to be tampered with.
  • FIG. 14 (b) shows the data generated by replacing the relocation target code with a specified code (SC), for example, a meaningless code OxFFFF ' ⁇ in the program to be tampered with.
  • SC specified code
  • the division size determination unit 12 generates a random number, and determines the block division size using the random number! /. Since the block division size is changed for each program entry, the authentication data generated from the program has randomness, which increases the difficulty of deducing authentication data.
  • the following modifications are possible without being limited thereto.
  • authentication data is generated from a part of the program.
  • FIG. 15 is a diagram for describing an outline of generation of authentication data from a program in the present modification.
  • the tampering detection means 7 generates, for example, two random numbers, and sets one of the random numbers as an offset (141) from the start address of the program and the other random number as a data size (142).
  • the authentication data is generated using data (144) for the address (143) force obtained by adding the offset (141) to the start address of the program, and the data size (142).
  • the offset (141) and the data size (142) are registered in the authentication data list.
  • the offset (141) and the data size (142) are read from the authentication data list, and the offset is added to the start address of the program recorded in the RAM (141).
  • the comparison data is generated in the same way as the authentication data is generated using the data for the data size (142) from the part added with).
  • the part of the program used to generate authentication data and comparison data is changed for each loading of the program, so the authentication data has randomness, making it difficult to estimate authentication data. It can be increased.
  • the generation speed of authentication data can be improved as compared to the case of generating authentication data of the whole program.
  • the block division size is random information.
  • the following modifications are possible without being limited thereto.
  • HMAC-SHA1 keyed-Hashing for Message Authentication Code Secure Hash Algorithm 1
  • FIG. 16 is a diagram for explaining the process of this modification using HMAC-SHA1.
  • the tampering detection means 7 generates two random numbers RP and RK.
  • Two random numbers RP and RK are stored in the authentication data list.
  • padding is performed with a fixed value such as data having a value of 0.
  • FIG. Perform padding processing at (161).
  • two random numbers RP and RK are generated, and processing using two pieces of random information S is not limited to this, and three or more or one piece of random information may be used. Needless to say, even in this case, random information is used to make it difficult to deduce authentication data.
  • a fixed key may be used without generating a random number RK, or a fixed padding may be performed without generating a random number RP.
  • the block division size should be less than or equal to the data handling unit (for example, the size of paging) in a cache memory such as a secondary cache provided by the CPU.
  • authentication data or comparison data can be generated without replacing data in the cache memory.
  • the cache use efficiency can be improved, and the speeding up of the tamper detection process can be realized.
  • a plurality of different sized authentication data are generated from one program before loading the program, and one authentication data is selected after loading the program, and the selected authentication data is used.
  • the power described in the example of tampering detection Not limited to this, even if tampering detection is performed using a plurality of authentication data.
  • the comparison data corresponding to each authentication data is generated in the same number as the selected authentication data, and the corresponding authentication data is compared with the comparison data.
  • falsification detection may be performed using two or more pieces of authentication data and comparison data subjected to concatenation, addition, and the like.
  • the program is stored in the ROM and loaded into the RAM. Forces to be implemented after being
  • the program may be stored in a hard disk or non-volatile memory. Also, at runtime, programs may be loaded into memory other than RAM! /.
  • the above-mentioned device is specifically a computer system comprising a microprocessor, ROM, RAM, hard disk unit, display unit, keyboard, mouse and the like.
  • a computer program is stored in the RAM or the hard disk unit.
  • the microprocessor achieves its functions by operating according to the computer program.
  • the computer program is configured by combining a plurality of instruction codes indicating instructions to the computer in order to achieve a predetermined function.
  • the system LSI is a super-multifunctional LSI manufactured by integrating a plurality of components on one chip, and more specifically, is a computer system including a microprocessor, ROM, RAM and the like. is there. A computer program is stored in the RAM. Microprocessor Power The system LSI achieves its functions by operating according to the computer program.
  • each component of the components constituting each of the above-described devices may be individually integrated into one chip, or may be integrated into one chip so as to include part or all.
  • system LSI may also be called “IC, LSI, super LSI, ultra LSI” depending on the degree of integration.
  • the method of circuit integration is not limited to LSI's, and implementation using dedicated circuitry or general purpose processors is also possible.
  • FPGA field programmable gate array
  • reconfigurable 'processor that can reconfigure the connection and setting of the circuit cells inside the LSI.
  • Some or all of the constituent elements of the device described above may be configured as a removable IC card or a single module force.
  • the IC card or the module is a computer system including a microprocessor, a ROM, a RAM, and the like.
  • the IC card or the module may include the above-described ultra-multifunctional LSI.
  • Microprocessor Power By operating according to a computer program, the IC card or the module achieves its function. This DIC card or this module may be tamper resistant!
  • the present invention may be methods shown above. Further, the present invention may be a computer program that realizes these methods by a computer, or may be a digital signal composed of the computer program.
  • the present invention is also directed to a computer-readable recording medium that can read the computer program or the digital signal, such as a flexible disk, a hard disk, a CD-ROM, an MO, a DVD, a DVD-ROM, a DVD-RAM, a BD (Blu- (ray disc), semiconductor memory, etc. Moreover, even if it is the above-mentioned digital signal currently recorded on these recording media, it is /.
  • a computer-readable recording medium such as a flexible disk, a hard disk, a CD-ROM, an MO, a DVD, a DVD-ROM, a DVD-RAM, a BD (Blu- (ray disc), semiconductor memory, etc.
  • the computer program or the digital signal may be transmitted via a telecommunications line, a wireless or wired communication line, a network represented by the Internet, data broadcasting, and the like.
  • the present invention may be a computer system provided with a microprocessor and a memory, wherein the memory stores the computer program, and the microprocessor operates according to the computer program.
  • another computer which is independent by recording the program or the digital signal on the recording medium and transferring it, or transferring the program or the digital signal through the network or the like. It may be implemented by a system.
  • the tampering detection device can detect tampering with programs and data quickly and safely. Since it is possible, it is suitable to be used as a computer, a portable terminal, etc. which executes authentication, a high degree of secrecy that handles personal information, a program etc.

Landscapes

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

Description

明 細 書
改竄検出システム、改竄検出方法、改竄検出プログラム、記録媒体、集 積回路、認証情報生成装置及び改竄検出装置
技術分野
[0001] 本発明は、プログラムの不正な改竄を検出する技術に関する。
背景技術
[0002] 近年、プログラムの改竄検出に関する様々な技術が開発されている。典型的な技 術としては、特許文献 1に開示されたものがある。
特許文献 1では、改竄検出対象となるプログラムに対して一方向性関数であるハツ シュ関数を用いて作成した認証データと、改竄チェック対象となるプログラムに対して ノ、ッシュ関数を用いて作成した比較データとを比較して改竄検出を行っている。しか し、プログラム全体についてハッシュ値を生成するには多大な時間を要するため、他 のプログラムの実行と並行して改竄検出処理を行うような場合には、他のプログラム の実行に支障が生じ得る。
[0003] 特許文献 2では、ハッシュ値を利用せず、プログラムが実行時に特定の条件を満た すか否かにより正当性を検証している。具体的には、前記特定の条件として、プログ ラムのリターンアドレスが所定のアドレス空間内か否力、、実行モードが正しいか否力、、 所定の時間内で処理が終わるか否かについて調べ、前記特定の条件を満たさない 場合に、プログラムが改竄されていると判定する。これによると、ハッシュ値を生成す る必要はなぐ改竄検出処理に要する時間は短縮される。
特許文献 1:米国特許第 6026293号
特許文献 2:米国特許第 6178509号
発明の開示
発明が解決しょうとする課題
[0004] しかしながら、特許文献 2の方法は、特許文献 1の方法に比べ、改竄検出処理時間 は短くなるものの、前記特定の条件についてチェックするに過ぎず、部分的な検証に しかならないため、検証された部分以外に改竄箇所が存在し得るという問題がある。 上述の問題に鑑み、本発明は、プログラムの改竄検出を、従来と比べて検出精度 を落とすことなく高速に行うことのできる改竄検出システム、改竄検出方法、改竄検出 プログラム、記録媒体及び集積回路を提供することを目的とする。
課題を解決するための手段
[0005] 上記の課題を解決するために、本発明は、プログラムの改竄検出を行う改竄検出シ ステムであって、実行対象のプログラムを前記プログラムよりも短くなるよう加工処理を して認証用加工データを生成する第 1加工手段と、前記認証用加工データに、前記 加工処理より計算量の多い要約処理を行い、認証情報を生成する第 1生成手段と、 生成された前記認証情報を保持する保持手段と、前記実行対象のプログラムに対し て、前記加工処理を行って比較用加工データを生成する第 2加工手段と、前記比較 用加工データに対して、前記要約処理を行って、比較情報を生成する第 2生成手段 と、前記保持手段の保持する認証情報と前記第 2生成手段が生成した比較情報とを 用いて、前記実行プログラムの改竄検出を行う検出手段とを備える。
[0006] ここで、前記改竄検出システムは、加工処理を行う発明特定事項として、第 1加工 手段と第 2加工手段とを備えることとしているが、実体的に異なる 2つの手段として実 現する必要はない。第 1加工手段と第 2加工手段が、実体的に 1つの手段として実現 される場合も本発明に含まれる。
要約処理についても同様に、要約処理を行う発明特定事項として第 1生成手段と 第 2生成手段とを備えることとしているが、実体的に異なる 2つの手段として実現する 必要はない。第 1生成手段と第 2生成手段が、実体的に 1つの手段として実現される 場合も本発明に含まれる。
発明の効果
[0007] 本発明の改竄検出システムは、上述の構成を備えることにより、加工処理によりプロ グラムのサイズを削減した上で計算量の多い要約処理を行って認証情報及び比較 情報を生成するので、計算量の多レ、要約処理をプログラム全体に対して行う場合に 比べて認証情報及び比較情報の生成を高速に行うことができる。
また、前記第 1加工手段は、ランダムに定まるパラメータに依存する加工処理を行 い、前記第 2加工手段は、前記第 1加工手段による加工処理に用いられたパラメータ と同じパラメータを用いて前記加工処理を行うこととしてもょレ、。
[0008] この構成によれば、加工処理ごとに、生成される前記認証用加工データ及び前記 比較用加工データにランダムな要素が加わるため、前記認証用加工データ及び前 記比較用加工データに基づき生成される認証情報及び比較情報についても、ランダ ムな要素が加わることになる。よって、改竄検出時にチェックを不正に通過しうるような 前記認証情報及び前記比較情報と同一の情報を不正に生成するのを困難にし、不 正なプログラムが実行されるのを防ぐことができる。
[0009] また、前記第 1生成手段による認証情報の生成は、前記プログラムが実行される以 前に行われ、前記第 2生成手段による比較情報の生成及び前記検出手段による改 竄検出は、前記プログラムの実行中に行われることとしてもよい。
この構成によれば、実行中のプログラムが改竄された場合に、その改竄を検出する こと力 Sでさる。
[0010] また、前記パラメータは、データのサイズを示し、前記第 1加工手段及び前記第 2加 工手段は、前記プログラムを前記パラメータにより示されるサイズに加工処理すること としてあよい。
この構成によれば、加工処理ごとに、ランダムなサイズの前記認証用加工データ及 び前記比較用加工データを生成するため、前記認証用加工データ及び前記比較用 加工データに基づき生成される認証情報及び比較情報についても、ランダムな要素 力 Sカロわることになる。よって、改竄検出時にチェックを不正に通過しうるような前記認 証情報及び前記比較情報と同一の情報を不正に生成するのを困難にし、不正なプ ログラムが実行されるのを防ぐことができる。
[0011] また、前記第 1加工手段及び第 2加工手段は、前記加工処理として、前記プロダラ ムを前記サイズの複数のブロックデータに区切り、前記ブロックデータ同士で同一桁 の論理演算を行うことにより前記サイズの前記認証用加工データ及び比較用加工デ ータを生成することとしてもよ!/ヽ。
また、前記第 1加工手段及び第 2加工手段は、前記論理演算として排他的論理和 演算を fiうこととしてもよい。
[0012] この構成によれば、高速に処理が可能な論理演算によってプログラムを短くするの で、短時間で加工処理を完了することができる。
なお、排他的論理和などの論理演算は、一般的なプロセッサにおいて 1クロックの 間に処理可能な基本的な処理である。
また、前記第 1生成手段は、キャッシュメモリを含み、前記キャッシュメモリを介して 認証用加工データが記憶されているメモリとの間で入出力を行い、前記第 1加工手 段は、前記パラメータとして、前記第 1生成手段に含まれるキャッシュメモリにおける データ読み書き単位のサイズ以下のサイズを特定する情報を用いて前記加工処理を fiうこととしてあよい。
[0013] この構成によれば、認証処理の対象となるデータの大きさをキャッシュメモリにおけ るデータの取り扱い単位以下に抑えることができる。これにより、認証処理の対象とな るデータを、キャッシュメモリ上のデータの入れ替えを行わずに一度で行うことができ るので、改竄検出処理の更なる高速化を図ることができる。
また、前記第 1生成手段は、前記認証情報として前記認証用加工データのハッシュ 値を算出し、前記第 2生成手段は、前記比較情報として前記比較用加工データのハ ッシユイ直を算出することとしてもよい。
[0014] また、前記第 1生成手段及び第 2生成手段は、前記ハッシュ値の算出に SHA1演 算を用いることとしてもよい。
この構成によれば、ハッシュを用いることにより、認証情報及び比較情報と同一の情 報を不正に生成されるのを防ぐことができるため、より安全な認証情報及び比較情報 を用いて改竄検出を行うことができる。
[0015] また、前記第 1加工手段及び第 2加工手段は、前記プログラムが、ロード時に再配 置されるリロケーションコードを含むか否かを判定し、リロケーションコードを含む場合 に、前記プログラムから前記リロケーションコードを除去し、前記リロケーションコード が除かれたプログラムを加工処理することとしてもよい。
また、前記第 1加工手段及び第 2加工手段は、前記プログラムが、ロード時に再配 置されるリロケーションコードを含むか否かを判定し、リロケーションコードを含む場合 に、含まれるリロケーションコードを所定のリロケーションされないコードに置換し、前 記リロケーションコードが置換がされたプログラムを加工処理することとしてもよい。 [0016] この構成によれば、前記プログラムにリロケーションコードが含まれている場合であ つても、リロケーション毎に認証情報及び比較情報の内容が変化してしまう状況を回 避して、前記プログラムから一定の認証情報及び比較情報を生成し、前記認証情報 及び前記比較情報を用いて改竄検出を行うことができる。
また、前記第 1加工手段は、前記パラメータとして乱数を生成し、前記第 2加工手段 は、前記乱数を保持しており、前記第 1加工手段及び前記第 2加工手段は、前記加 ェ処理において、前記プログラムに前記乱数を付した上で前記加工処理することとし てもよい。
[0017] この構成によれば、ロード毎に異なる認証情報及び比較情報を生成し、解析を困 難化できる。
また、前記第 1生成手段は、乱数を生成し、前記認証情報として、前記乱数を鍵と するハッシュ関数を用いて前記認証用加工データのハッシュ値を算出し、前記第 2 生成手段は、前記乱数を保持しており、前記比較情報として、前記乱数を鍵とする前 記ハッシュ関数を用いて前記比較用加工データのハッシュ値を算出することとしても よい。
[0018] この構成によれば、乱数が認証情報及び比較情報に反映させて、認証情報及び 比較情報の解析を困難化できる。
また、前記パラメータは、データのサイズを示し、前記第 1加工手段は、更に、複数 のパラメータそれぞれに依存する加工処理を行って、サイズの異なる複数の認証用 加工データを生成し、前記第 1生成手段は、前記複数の認証用加工データそれぞれ に、前記要約処理を行って複数の認証情報を生成し、前記改竄検出システムは、更 に、前記複数の認証情報のうち少なくとも 1つを選出し、前記第 2加工手段に、前記 加工処理によって、前記プログラムを前記選出した認証情報のサイズに縮めさせ、前 記検出手段に、前記選出された認証情報と、前記第 2生成手段により生成された前 記比較情報とを用いて前記実行対象のプログラムの改竄検出を行わせる制御手段 を備えることとしてもよ!/、。
[0019] また、前記制御手段は、実行中のプロセスへの資源割り当てに係るプロセス状況算 出値を算出し、前記プロセス状況算出値に基づき少なくとも 1の認証情報を選出する こととしてあよい。
また、前記制御手段は、プロセス状況算出値と認証情報との対応表を記憶しており 、算出したプロセス状況算出値に対応する認証情報を前記対応表から選出すること としてあよい。
[0020] この構成によれば、改竄検出システムの処理状況に応じて、改竄検出にかかる処 理の負荷を変更することが可能となる。本発明に係る改竄検出の処理では、加工処 理よりも要約処理の方が負荷が大きいため、要約処理にかけるデータのサイズが大 きくなるほどに改竄検出システムに与える負荷が大きくなる。一方、加工処理でプログ ラムのサイズを短くしすぎると元のプログラムから抜ける情報が増えてしまうため、改 竄検出の精度が下がってしまう。
[0021] そこで、本発明では、プロセスの状況を見て加工処理を行うサイズを選択することで 、改竄検出システム内の処理状況(例えば、他のプログラムの動作状況など)を踏ま えた上で、適切な精度及び速度で改竄検出を行うよう制御できるようにしている。 また、前記第 1加工手段及び第 2加工手段は、前記加工処理として、前記プロダラ ムの一部分をランダムに特定し抽出して前記認証用加工データ及び前記比較用加 ェデータを生成することとしてもよ!/ヽ。
[0022] また、前記第 1加工手段は、抽出開始位置と抽出終了位置を示す情報をランダム に生成し、前記第 1加工手段及び前記第 2加工手段は、前記プログラムについて、 前記抽出開始位置から前記抽出終了位置までを抽出することとしてもよい。
また、前記第 1加工手段は、データの抽出開始位置と抽出サイズを示す情報をラン ダムに生成し、前記第 1加工手段及び前記第 2加工手段は、前記プログラムについ て、前記抽出開始位置から前記抽出サイズ分のデータを抽出することとしてもよい。
[0023] この構成によれば、認証情報の生成毎に、認証情報の生成に用いられるプログラム の一部分が変更されるので、改竄検出時のチェックを不正に通過しうるような認証情 報及び比較情報の生成を困難化し、不正なプログラムが実行されるのを防ぐことがで きる。
また、前記加工処理と前記要約処理とは、相異なる一方向性関数を用いる処理で あってもよい。 [0024] この構成によれば、異なる一方向性関数を用いた処理により安全な認証用加工デ ータ、比較用加工データ、認証情報及び比較情報を生成することができる。
本発明は、プログラムの改竄検出を行う改竄検出方法であって、実行対象のプログ ラムを前記プログラムよりも短くなるよう加工処理をして認証用加工データを生成する 第 1加工ステップと、前記認証用加工データに、前記加工処理より計算量の多い要 約処理を行い、認証情報を生成する第 1生成ステップと、生成された前記認証情報 を保持する保持ステップと、前記実行対象のプログラムに対して、前記加工処理を行 つて比較用加工データを生成する第 2加工ステップと、前記比較用加工データに対 して、前記要約処理を行って、比較情報を生成する第 2生成ステップと、前記保持し て!/、る認証情報と前記第 2生成手段が生成した比較情報とを用いて、前記実行プロ グラムの改竄検出を行う検出ステップとを含む。
[0025] 本発明は、プログラムの改竄検出を行う改竄検出システムに用いられる改竄検出プ ログラムであって、実行対象のプログラムを前記プログラムよりも短くなるよう加工処理 をして認証用加工データを生成する第 1加工ステップと、前記認証用加工データに、 前記加工処理より計算量の多い要約処理を行い、認証情報を生成する第 1生成ステ ップと、生成された前記認証情報を保持する保持ステップと、前記実行対象のプログ ラムに対して、前記加工処理を行って比較用加工データを生成する第 2加エステツ プと、前記比較用加工データに対して、前記要約処理を行って、比較情報を生成す る第 2生成ステップと、前記保持して!/、る認証情報と前記第 2生成手段が生成した比 較情報とを用いて、前記実行プログラムの改竄検出を行う検出ステップとをコンビュ ータに実行させる。
[0026] 本発明は、コンピュータ読み取り可能な記録媒体であって、実行対象のプログラム を前記プログラムよりも短くなるよう加工処理をして認証用加工データを生成する第 1 加工ステップと、前記認証用加工データに、前記加工処理より計算量の多い要約処 理を行い、認証情報を生成する第 1生成ステップと、生成された前記認証情報を保 持する保持ステップと、前記実行対象のプログラムに対して、前記加工処理を行って 比較用加工データを生成する第 2加工ステップと、前記比較用加工データに対して、 前記要約処理を行って、比較情報を生成する第 2生成ステップと、前記保持している 認証情報と前記第 2生成手段が生成した比較情報とを用いて、前記実行プログラム の改竄検出を行う検出ステップとをコンピュータに実行させる改竄検出プログラムを 記録している。
[0027] 本発明は、プログラムの改竄検出を行う集積回路であって、実行対象のプログラム を前記プログラムよりも短くなるよう加工処理をして認証用加工データを生成する第 1 加工手段と、前記認証用加工データに、前記加工処理より計算量の多い要約処理を 行い、認証情報を生成する第 1生成手段と、生成された前記認証情報を保持する保 持手段と、前記実行対象のプログラムに対して、前記加工処理を行って比較用加工 データを生成する第 2加工手段と、前記比較用加工データに対して、前記要約処理 を行って、比較情報を生成する第 2生成手段と、前記保持手段の保持する認証情報 と前記第 2生成手段が生成した比較情報とを用いて、前記実行プログラムの改竄検 出を行う検出手段とを備える。
[0028] この構成によれば、加工処理によりプログラムのサイズを削減した上で計算量の多
V、要約処理を行って認証情報及び比較情報を生成するので、計算量の多レ、要約処 理をプログラム全体に対して行う場合に比べて認証情報及び比較情報の生成を高 速に行うことができる。
また、前記集積回路は、 Trusted Platform Moduleであることとしてもよい。
[0029] この構成によれば、改竄検出処理について安全な実行環境を構築することができ 本発明は、プログラムの改竄検出に用いる認証情報を生成する認証情報生成装置 であって、実行対象のプログラムを前記プログラムよりも短くなるよう加工処理をして 認証用加工データを生成する加工手段と、前記認証用加工データに前記加工処理 よりも計算量の多い要約処理を行い、認証情報を生成する生成手段と、生成された 前記認証情報を前記改竄検出装置に提供する提供手段とを備える。
[0030] この構成によれば、加工処理によりプログラムのサイズを削減した上で計算量の多
V、要約処理を行って認証情報を生成するので、計算量の多レ、要約処理をプログラム 全体に対して行う場合に比べて認証情報の生成を高速に行うことができる。
本発明は、プログラムの改竄検出を行う改竄検出装置であって、実行対象のプログ ラムを前記プログラムよりも短くなるよう加工処理をし、さらに、前記加工処理よりも計 算量の多い要約処理を行うことで生成された認証情報を保持する保持手段と、前記 実行対象のプログラムに対して、前記加工処理を行って比較用加工データを生成す る加工手段と、前記比較用加工データに対して、前記要約処理を行って、比較情報 を生成する生成手段と、前記保持手段の保持する認証情報と前記生成手段が生成 した比較情報とを用いて、前記実行プログラムの改竄検出を行う検出手段とを備える
[0031] この構成によれば、加工処理によりプログラムのサイズを削減した上で計算量の多 V、要約処理を行って比較情報を生成するので、計算量の多レ、要約処理をプログラム 全体に対して行う場合に比べて比較情報の生成を高速に行うことができ、改竄検出 に要する処理時間を短縮することができる。
図面の簡単な説明
[0032] [図 1]本発明の実施の形態 1における改竄検出装置の全体構成を示すブロック図で ある。
[図 2]本発明の実施の形態 1における認証データリストの一例を示す図である。
[図 3]本発明の実施の形態 1における改竄検出装置によるプログラム実行動作を示す フローチャートである。
[図 4]本発明の実施の形態 1における認証データ生成処理を示す図である。
[図 5]本発明の実施の形態 1における認証データ生成処理におけるデータの変遷に ついて説明するための図である。
[図 6]本発明の実施の形態 1における比較データ生成処理を示す図である。
[図 7]本発明の実施の形態 2における認証データ生成処理を示す図である。
[図 8]本発明の実施の形態 2における認証データリストの一例を示す図である。
[図 9]本発明の実施の形態 2における改竄検出要求手段を示す図である。
[図 10]本発明の実施の形態 2におけるプロセス管理テーブル格納部に格納されるプ ロセス管理テーブルの一例を示す図である。
[図 11]本発明の実施の形態 2におけるスケジューリング手段におけるプロセス状況算 出値を生成処理を示す図である。 園 12]本発明の実施の形態 2におけるプロセス状況算出値を用いて認証データを選 択する処理を示すフローである。
[図 13]本発明の変形例におけるリロケーション対象コードを含むプログラムについて 説明するための図である。
[図 14] (a)は、改竄検出対象であるプログラムのうち、リロケーション対象コードを除い て生成したデータを示す。 (b)は、改竄検出対象であるプログラムのうち、リロケーショ ン対象コードを規定コードなどに置き換えて生成したデータを示す。
園 15]本発明の変形例における、プログラムから認証データを生成するまでの概要を 説明するための図である。
[図 16]本発明の変形例における、 HMAC— SHA1を用レ、た認証データ生成処理に おけるデータの変遷について説明するための図である。
符号の説明
1 改竄検出装置
2 RAM
3 フラッシュメモリ
4 ロード手段
5 実行手段
6 改竄検出要求手段
7 改竄検出手段
11 入出力手段
12 分割サイズ決定手段
13 分割手段
14 第 1変換手段
15 第 2変換手段
16 格納手段
17 判定手段
23 認証データリスト
発明を実施するための最良の形態 [0034] 本発明の一実施形態である改竄検出装置は、改竄検出処理速度とトレードオフの 関係にあるセキュリティレベルを出来る限り維持しつつ実行するプログラムの改竄検 出処理を従来より高速に行うものである。
改竄検出装置は ROMにプログラムを格納しており、このプログラムを RAMへと口 ードしてから実行する。ここで、前記改竄検出装置は、まず ROMに格納されたプログ ラムについて、 RAMへのロード前に後述する処理によって改竄検出情報として認証 データを生成する。次に、前記改竄検出装置は、 RAMへのロード以後プログラムの 実行中などに、 RAMに記憶されたプログラムについて後述する処理によって改竄検 出情報としての比較データを生成する。そして、改竄検出装置は、前記認証データと 前記比較データとを比較し、認証データと比較データとがー致しな力 た場合にプロ グラムが改竄されて!/、ると判定する。
[0035] ここで、前記認証データと前記比較データとの生成は以下のように行う。
まず、前記改竄検出装置は、改竄検出対象のプログラムをブロック分割し、分割結 果に対して比較的低負荷の処理である短縮処理の一例として第 1のハッシュ関数を 施す。第 1のハッシュ関数を施した結果、元のプログラムは、サイズの小さな変換一時 データに変換されている。
[0036] そして、前記改竄検出装置は、前記変換一時データに対し、改竄検出情報を生成 する処理として負荷の高い第 2のハッシュ関数を施す。この第 2のハッシュ関数により 、改竄検出情報が得られる。
第 1のハッシュ関数は、一例として、データについて排他的論理和演算を行う処理 である。第 2のハッシュ関数は一例として SHA1処理関数である。
[0037] 時間を要する SHA1処理は、プログラムより小さな変換一時データに対し行うのみ なので、プログラム全体に SHA1処理を行う場合に比べて全体の処理時間は大幅に 短縮することになる。
ここで、プログラムのロード前に得られた改竄検出情報が前記認証データであり、プ ログラムのロード以後に得られた改竄検出情報が前記比較データである。
[0038] なお、本実施の形態では、第 1のハッシュ関数は第 2のハッシュ関数よりもセキユリ ティレベルが低いので、セキュリティレベルを維持するために乱数によるランダムな要 素を加えている。
以下に、本発明の実施の形態の詳細について説明する。
1.実施の形態 1
本発明の実施の形態 1につ!/ヽて、以下に説明する。
[0039]
1. 1.構成
本発明の一実施形態に係る改竄検出装置 1は、プログラムをフラッシュメモリなどの 不揮発性メモリから RAMなどの揮発メモリにロードして実行する装置であり、ロードさ れて実行中のプログラムについて改竄を検出する。
[0040] 改竄検出装置 1は、具体的には、 CPU (Central Processing Unit)、 ROM (R ead Only Memory)、 RAM (Ranaom Access Memory)、アイスプレイュニッ ト、キーパッドなどから構成されるコンピュータシステムである。前記 ROMにはコンビ ユータプログラムが記憶されており、 RAM上に読み出されたコンピュータプログラム に従って前記 CPUが動作することにより、改竄検出装置 1はその機能を達成する。
[0041] 図 1は、改竄検出装置 1の全体構成を示すブロック図である。
改竄検出装置 1は、図 1に示すように、 RAM2、フラッシュメモリ 3、ロード手段 4、実 行手段 5、改竄検出要求手段 6及び改竄検出手段 7を含んで構成される。以下、各 構成要素について説明する。
RAM2は、ランダムアクセスメモリである。 RAM2には、ロード手段 4によりプログラ ムカ Sロードされ、実行手段 5によりプログラム実行時のデータが書き込まれ、また読み 出される。
[0042] フラッシュメモリ 3は、具体的には Flash ROMである。フラッシュメモリ 3は、実行さ れるべきプログラムと、認証データリストとを記憶する。
フラッシュメモリ 3は、本実施の形態では、図 1に示すように、実行されるべきプログ ラムとしてプログラム 21、 22 · · ·を記憶している。認証データリストは、改竄検出に用 V、る認証データを含むデータである。認証データリストの詳細は後述する。
[0043] RAM2に記録されているプログラム 24は、例えば、プログラム 21がフラッシュメモリ 3から RAM2にロードされたものである。
ロード手段 4は、適宜のタイミングで、フラッシュメモリ 3に記憶されているプログラム を RAM2にロードする。
前記タイミングとしては、例えば電源投入時、他のプログラムからロードを指示され た時、所定時間間隔毎などが考えられる。
[0044] ロード手段 4は、前記タイミングと、そのタイミングにおレ、て実行すべきプログラムの プログラム識別子とを対応づけて予め記憶しているものとする。
また、前記タイミングとしては、更に、前記キーパッドを用いてユーザ操作によりプロ グラムの実行を要望される時も考えられる。この場合、実行すべきプログラムに係るプ ログラム識別子は、ユーザ操作により指定されるものとする。
[0045] そして、前記タイミングを検出した場合に、ロード手段 4は、フラッシュメモリ 3に記憶 されているプログラムのうちプログラム識別子により識別されるものの RAM2へのロー ドを開始する。ロードを開始すると、ロード手段 4は、ロードを開始したプログラムに係 るプログラム識別子を含むロード開始通知を改竄検出要求手段 6に対して送信する。 ここで、ロード手段 4は、ロードを開始したプログラムに関する情報を認証データリス トとしてフラッシュメモリ 3に追記する。フラッシュメモリ 3に認証データリストが記録され ていない場合には、認証データリストを新たに生成してフラッシュメモリ 3に記録する。
[0046] 図 2は、認証データリストの一例を示す図である。
認証データリスト 23は、プログラム識別子 41、プログラムアドレス 42、プログラムサイ ズ 43、ブロック分割サイズ 44、認証データ 45から構成される。
プログラム識別子 41は、プログラムを識別するための ID情報である。フラッシュメモ リ 3に記録されているプログラムには、プログラムを識別するためのプログラム識別子 が予め付されている。
[0047] プログラムアドレス 42は、ロード手段 4が RAM2上でプログラムをロードする領域の 先頭アドレスである。
プログラムサイズ 43は、プログラム識別子 41で識別されるプログラムのサイズを示 す。
ロード手段 4は、ロード開始時に、フラッシュメモリ 3からプログラムと共にプログラム 識別子を読み出してプログラム識別子 41とし、プログラムをロードするアドレスをプロ グラムアドレス 42とし、ロードするプログラムのサイズをプログラムサイズ 43として、認 証データリストに追記する。
[0048] ここで、認証データリスト 23に上述の追記がなされた直後には、図 2においてプログ ラム識別子の値が 0003である行において空欄 46、 47として示すように、ブロック分 割サイズ、認証データの欄が空欄となってレ、る。
ブロック分割サイズ、認証データの内容は、ロード手段 4以外によって後ほど書き込 まれる。ブロック分割サイズ 44、認証データ 45については後述する。
[0049] ロード手段 4は、プログラムのロードが終了すると、実行手段 5に対し、実行すべきプ ログラムのプログラム識別子を含む実行指示を送信する。
また、ロード手段 4は、ロードしたプログラムが実行手段 5により実行されることが無く なった場合、ロードしたプログラムがメモリ 2中から消去される場合等の適宜のタイミン グで、そのプログラムについての、プログラム識別子、プログラムアドレス、プログラム サイズ、ブロック分割サイズ及び認証データの組を削除する。
[0050] 実行手段 5は、具体的には CPUである。
実行手段 5は、ロード手段 4から実行指示を受け取り、 RAM2上にロードされている プログラムのうち、前記実行指示に含まれるプログラム識別子により識別されるプログ ラムを実行する。
実行手段 5は、適宜のタイミングで、改竄検出要求手段 6に対して、実行中のプログ ラムに係るプログラム識別子を含むトリガ通知を送信する。前記トリガ通知は、改竄検 出要求手段 6において、改竄検出開始のトリガとなり得るものである。
[0051] ここで、実行手段 5が前記トリガ通知を送信する前記適宜のタイミングとしては、予め 定められている特定のプログラムの実行を開始するときや、プログラムのうち予め定め た特定のモジュール、サブルーチンの実行を開始するときなどが考えられる。
実行手段 5は、改竄検出要求手段 6からプログラムの実行停止指示を受け取った 場合、前記実行停止指示に含まれるプログラム識別子により識別されるプログラムの 実行を停止する。
[0052] 改竄検出要求手段 6は、フラッシュメモリ 3上のプログラムについての改竄検出に関 する制御を行う。
改竄検出要求手段 6は、ロード手段 4からロード開始通知を受信し、ロード開始通 知に含まれていたプログラム識別子を含む認証データ生成要求を改竄検出手段 7に 対して送信する。
[0053] ここで、認証データは、改竄検出に用いられるデータである。認証データの詳細に ついては後述する。
また、改竄検出要求手段 6は、実行手段 5によるプログラムの実行中に、改竄検出 処理を開始するためのトリガの検出を試みる。
そして前記トリガを検出した場合には、改竄検出要求手段 6は、前記プログラムのプ ログラム識別子を含む改竄検出要求を改竄検出手段 7に対し送信する。そして、改 竄検出手段 7から前記改竄検出要求に対する応答としてプログラム識別子、改竄検 出結果を含む改竄検出応答を受け取る。
[0054] ここで、改竄検出結果は、改竄の有無を示す。
改竄検出要求手段 6は、改竄検出結果が改竄有りを示す場合、改竄検出応答に 含まれていたプログラム識別子を含むプログラムの実行停止指示を実行手段 5に対 し送信する。一方、改竄検出結果が改竄無しを示す場合、改竄検出要求手段 6は、 実行手段 5に対して特に指示は行わない。
[0055] なお、上述の改竄検出開始のトリガは、改竄検出を開始すべき適切なタイミングで 発生するものとする。例えば、改竄検出要求手段 6自身が、定期的にトリガを発生さ せ、そのトリガを検出してもよい。また、実行手段 5がプログラムのうち所定のモジユー ルの実行を開始する際に改竄検出要求手段 6に対して通知を行い、改竄検出要求 手段 6が当該通知をトリガとして検出してもよい。
[0056] 改竄検出手段 7は、図 1に示すように、入出力手段 11、分割サイズ決定手段 12、分 割手段 13、第 1変換手段 14、第 2変換手段 15、格納手段 16及び判定手段 17を含 んで構成される。以下、各構成について説明する。
入出力手段 11は、改竄検出要求手段 6から認証データ生成要求を受けた場合、 分割サイズ決定手段に対し、認証データ生成要求に含まれるプログラム識別子を送 信する。 [0057] 入出力手段 11は、改竄検出要求手段 6から改竄検出要求を受けた場合、その改 竄検出要求を判定手段 17に送信する。
入出力手段 11は、判定手段 17から改竄検出応答を受けた場合、改竄検出要求手 段 6に対してその改竄検出応答を送信する。
分割サイズ決定手段 12は、プログラムを複数のブロックに分割するための 1ブロック あたりのサイズであるブロック分割サイズ BSを決定する。以下、プログラムを複数のブ ロックに分割する処理をブロック分割という。
[0058] 分割サイズ決定手段 12は、入出力手段 11から認証データ生成要求とを受け付け ると、乱数を生成し、生成した乱数に応じてブロック分割サイズを決定する。
ここで、上述したブロック分割サイズは、生成した乱数をそのまま使用するものとす る。プログラムがメモリにロードされる毎に乱数が再計算されるので、ブロック分割サイ ズも乱数の再計算に応じて変更されることになる。
[0059] 上述のようにブロック分割サイズが決定すると、分割サイズ決定手段 12は、プロダラ ム識別子と、ブロック分割サイズと、生成するデータの種別を示す生成データ種別と を含む分割指示を分割手段 13に対して送信する。
ここで、生成データ種別は、認証データ、比較データのいずれかの生成を示す情 報である。生成データ種別の内容に従い、後述の分割手段 13、第 2変換手段 15等 にお!/、て実行する処理が選択される。
[0060] また、認証データは、ロード前のプログラムから第 1変換手段 14、第 2変換手段 15 により生成される改竄検出用のデータである。比較データは、ロード以後のプロダラ ムから第 1変換手段 14、第 2変換手段 15により生成される改竄検出用のデータであ 分割手段 13に対しては、後述するが、判定手段 17も分割指示を送信する。この場 合、判定手段 17は、プログラム識別子と、ブロック分割サイズと、比較データの生成を 示す生成データ種別とを含む分割指示を分割手段 13に対して送信する。
[0061] 分割手段 13は、分割指示を受け付けると、分割指示に含まれるプログラム識別子 に係るプログラムをフラッシュメモリ 3から読み出す。次に、分割手段 13は、プログラム 識別子に対応するプログラムサイズを認証データリスト 23から読み出す。 そして、読み出したプログラムサイズに応じたパディング処理を行う。
ここで、パディング処理は、プログラムサイズがブロック分割サイズの倍数になるよう 、プログラムの最後尾に意味のない値 (例えば 0)のデータを付加することで行う。
[0062] そして、分割手段 13は、パディングされたプログラムを、ブロック分割サイズの大きさ
Figure imgf000019_0001
ここで、ブロック分割により、ブロック分割サイズの大きさである N個のブロックデータ (B [1]〜B [N] )が生成されたものとする。
分割が終了すると、分割手段 13は、第 1変換手段 14に対し、分割指示に含まれて いたプログラム識別子、生成データ種別を含む第 1変換指示を第 1変換手段 14に送 信する。そして、分割手段 13は、前記生成データ種別が認証データの生成を示す場 合に、ブロック分割サイズを、分割指示に含まれるプログラム識別子に対応づけて、 認証データリスト 23に追記する。
[0063] 前述の図 2の例であれば、プログラム識別子の値が 0003であり、決定したブロック 分割サイズ力 096バイトであった場合には、空欄 46に値 4096を書き込むことにな 第 1変換手段 14は、第 1変換指示を受け取ると、分割手段 13によりブロック分割さ れた結果である各ブロックデータを、データサイズを減らすことのできる所定のァルゴ リズムによる変換処理によって変換する。
[0064] この変換処理は、簡単な論理演算等の高速に実行できる処理が望ましい。
本実施の形態では、第 1変換手段 14が行う変換処理は XOR(eXclusive OR)処 理であるものとする。即ち、第 1変換手段 14は、 8 [1]〜8 [ の 01^を演算する。 そして、第 1変換指示に含まれるプログラム識別子、生成データ種別及び前記演算 の結果である認証一時データを含む第 2変換指示を、第 2変換手段 15に出力する。
[0065] 第 2変換手段 15は、第 2変換指示を受け取ると、前記第 2変換指示に含まれる認証 一時データに対し、所定のアルゴリズムを用いてデータ変換を行う。
第 2変換手段 15によるデータ変換処理は、比較的時間をかけて改竄検出値を算出 する処理である。
本実施の形態では、第 2変換手段 15が行うデータ変換処理は一方向性関数であ る SHA1処理であるものとする。
[0066] 第 2変換手段 15は、前記認証一時データに対して SHA1処理を行う。
第 2変換手段 15は、第 2変換指示に含まれる生成データ種別が認証データの生成 を示す場合には、 SHA1処理の結果を認証データとしてプログラム識別子と共に格 納手段 16に送信する。一方、生成データ種別が比較データの生成を示す場合には 、 SHA1処理の結果を比較データとしてプログラム識別子と共に判定手段 17に送信 する。
[0067] 格納手段 16は、第 2変換手段 15から、プログラム識別子と認証データとを受け取る と、前記プログラム識別子に対応づけて認証データを認証データリスト 23に書き込む
前述の図 2の例であれば、生成した認証データが認証データ A3であり、プログラム 識別子の値が 0003であった場合には、空欄 47に認証データ A3を書き込むことにな
[0068] 判定手段 17は、改竄検出要求手段 6から入出力手段 11を介して改竄検出要求を 受信する。そして、認証データリスト 23中で、前記改竄検出要求に含まれるプロダラ ム識別子と同値のプログラム識別子を検索する。そのプログラム識別子を発見できた 場合、認証データリスト 23から、プログラム識別子に対応付けられて!/、るブロック分割 サイズを読み出す。そして、判定手段 17は、プログラム識別子とブロック分割サイズと 比較データの生成を示す生成データ種別とを含む分割指示を分割手段 13へと送信 する。
[0069] また、判定手段 17は、前記分割指示の送信後に、第 2変換手段 15からプログラム 識別子と比較データとを受け取る。
この場合、判定手段 17は、プログラム識別子に対応する認証データを認証データリ ストから読み出して、受け取った比較データと比較する。
判定手段 17は、入出力手段 11を介して改竄検出要求手段 6に対して、認証デー タと比較データとがー致する場合には改竄無しを示す改竄検出結果と、第 2変換手 段 15から取得したプログラム識別子とを含む改竄検出応答を送信する。認証データ と比較データとがー致しない場合には、改竄有りを示す改竄検出結果と、第 2変換手 段 15から取得したプログラム識別子とを含む改竄検出応答を改竄検出要求手段 6に 対して送信する。
[0070]
1. 2.動作
上述のように構成された改竄検出装置 1による改竄検出処理について説明する。 図 3は、改竄検出装置 1によるプログラム実行動作を示すフローチャートである。 まず、ロード手段 4は、適宜のタイミングで、実行手段 5に実行させるべきプログラム をフラッシュメモリ 3から読み出して RAM2へのロードを開始する(ステップ Sl)。ロー ドを開始すると、ロード手段 4は、ロードを開始したプログラムに係るプログラム識別子 を含むロード開始通知を改竄検出要求手段 6に対して送信する。改竄検出要求手段 6は、前記ロード開始通知を受け取ると、ロード開始通知に含まれていたプログラム識 別子を含む認証データ生成要求を改竄検出手段 7に対して送信する。
[0071] 改竄検出手段 7は、前記認証データ生成要求を受信すると、プログラム改竄検出用 の認証データ及び認証データリストの生成を行う(ステップ S2)。ステップ S2の詳細に ついては、図 4を用いて後ほど説明する。
前記プログラムの RAM2へのロードが完了すると、ロード手段 4は、ロードしたプロ グラムを示すプログラム識別子を含んだ実行指示を実行手段 5に対して送信する。
[0072] 実行手段 5は、前記実行指示に含まれるプログラム識別子によって識別されるプロ グラムの実行を開始する(ステップ S3)。
ここで、図 3のフローチャートにおいては、ステップ S2及び S3を順次実行するように 記載しているが、ステップ S2、 S3は並行して実行してももちろんよい。
そして、改竄検出要求手段 6は、改竄検出トリガの発生を監視する (ステップ S4)。
[0073] 改竄検出トリガが発生せず (ステップ S4 : NO)、実行中のプログラムが実行終了し た場合 (ステップ S8 : YES)、処理を終了する。
改竄検出トリガが発生した場合 (ステップ S4 : YES)、改竄検出要求手段 6は、ステ ップ S2にてロードされたプログラムのプログラム識別子を含む改竄検出要求を改竄 検出手段 7に対し送信する。
[0074] 改竄検出手段 7は、前記改竄検出要求を受け取ると、改竄検出要求に含まれるプ ログラム識別子により識別されるプログラムについて前述の比較データを生成する(ス テツプ S5)。ステップ S 5については、後述する。
そして、改竄検出手段 7における判定手段 17は、認証データリストから認証データ を読み出し、前記認証データと前記比較データとを比較する(ステップ S6)。
[0075] 改竄検出手段 7は、認証データと比較データとがー致する場合には (ステップ S6: YES)、改竄無しを示す改竄検出結果と、プログラム識別子とを含む改竄検出応答 を、入出力手段 11を介して改竄検出要求手段 6に対して送信する。改竄検出要求 手段 6は、改竄無しを示す改竄検出結果を受け取った場合、特に処理を行わない。 この結果、ステップ S4以降の処理が継続される。
[0076] 一方、改竄検出手段 7は、認証データと比較データとがー致しな!/、場合には (ステ ップ S6 : NO)、改竄有りを示す改竄検出結果と、プログラム識別子を含む改竄検出 応答を入出力手段 11を介して改竄検出要求手段 6に対して送信する。
改竄検出要求手段 6は、改竄有りを示す改竄検出結果が改竄検出応答に含まれ ていた場合、改竄検出応答に含まれているプログラム識別子を含む実行停止指示を 実行手段 5に送信する。
[0077] 実行手段 5は、前記実行停止指示を受け取ると、前記実行停止指示に含まれるプ ログラム識別子により識別されるプログラムの実行を停止する (ステップ S7)。
次に、ステップ S2の詳細について、図 4を用いて説明する。
図 4は、ステップ S2の詳細である、認証データ生成処理を示す図である。 改竄検出手段 7における入出力手段 11は、プログラム識別子を含む認証データ生 成要求を改竄検出要求手段 6から受け取る。
[0078] 入出力手段 11は、前記認証データ生成要求を分割サイズ決定手段 12に送信する
分割サイズ決定手段 12は、認証データ生成要求を受け付けると乱数を生成し、乱 数に基づきブロック分割サイズ BSを決定する(ステップ S21)。
そして、分割サイズ決定手段 12は、プログラム識別子と、ブロック分割サイズと、認 証データの生成を示す生成データ種別とを含む分割指示を分割手段 13に対して送 信する。 [0079] 分割手段 13は、分割指示を受け付けると、分割指示に含まれるプログラム識別子 に係るプログラムをフラッシュメモリ 3から読み出す。次に、分割手段 13は、プログラム 識別子に対応するプログラムサイズ PSを認証データリスト 23から読み出す。
そして、分割手段 13は、読み出したプログラムサイズ PSに応じたパディング処理を 行う(ステップ S 22)。
[0080] 次に、分割手段 13は、パディング後のプログラムをブロック分割サイズの大きさのブ ロックデータ(B [1]〜B[N] )へと分割する(ステップ S23)。
分割が終了すると、分割手段 13は、第 1変換手段 14に対し、分割指示に含まれて いたプログラム識別子、生成データ種別を含む第 1変換指示を第 1変換手段 14に送 信する。
[0081] そして、分割手段 13は、ブロック分割サイズを、分割指示に含まれるプログラム識別 子に対応づけて、認証データリスト 23に追記する (ステップ S24)。
第 1変換手段 14は、変数 iを 1で初期化し、大きさが BSのバッファ領域 Bufを確保し 、 Bufを値 0で初期化する(ステップ S25)。
iが N以下である場合(ステップ S26 :YES)、 Bufと B[i]との排他的論理和(XOR) を計算し、その計算結果を Bufに格納する(ステップ S27)。図中では Buf = Buf XOR B [i]のように記載している。
[0082] そして、 iを 1インクリメントし(ステップ S28)、ステップ S26に戻る。
また、 iが Nを超える場合 (ステップ S26 : NO)、第 1変換手段 14は、第 2変換手段 1 5に対して、プログラム識別子を出力すると共に、認証一時データとして Bufの内容を 出力する(ステップ S29)。
次に、第 2変換手段 15は、認証一時データに対して所定の演算である SHA1処理 を施し、その結果である 20バイトのハッシュ値である認証データを生成する(ステップ S30)。
[0083] 第 2変換手段 15は、 SHA1処理の結果を認証データとしてプログラム識別子と共 に格納手段 16に送信する。
ステップ S2の認証データ生成処理において取り扱われるデータの変遷は重要なの で、ここで図 5を用いて補足説明する。 図 5は、認証データ生成処理におけるデータの変遷について説明するための図で ある。
[0084] プログラム 21は、改竄チェック対象となるプログラムである。プログラム 21のプロダラ ムサイズは 62KBであり、分割サイズ決定手段 12により決定されたブロック分割サイ ズは 4KBとする。
プログラム 21には、パディング処理がなされる。
ここで、パデイングに用いられるデータは、例えば値が全て 0などの無意味なデータ とする。
[0085] パディングされたプログラムのサイズはブロック分割サイズ 4KBの倍数となる。
本例の場合、プログラム 21の最後部に、 2KBのパディング用のデータが付加され よって、パディング後のプログラム 21の総サイズは、 64KBとなる(図 5の 21)。
[0086] 続いて、パディング後の 64KBのプログラム 21に対して、 4KBごとにブロック分割を 行う。
ブロック分割の結果が図 5に示すプログラム 61となる。
ここでは、 B[l]、 B[2]、 · · ·、 B[16]の 16個のブロックに分割される。
[0087] 次に、各ブロックに対して、第 1変換手段 14である XOR演算 62を、図 4のステップ S25〜27、 29、 30にしたカつて処理する。
XOR演算 62によって生成された 4KBのデータ力 S、認証一時データ 63となる。 ここで、 XOR演算を(+ )と表すと、認証一時データ 63は、 B[l] (+ ) B[2] ( + ) · · · (+ ) B [16]を演算した結果となる。
[0088] 次に、認証一時データ 63に対し、第 2変換手段 15による SHA1処理 64が施され、
20バイトのハッシュ値である認証データ 65が生成される。
次に、図 3のステップ S5の詳細について、図 6を用いて説明する。
図 6は、ステップ S5の詳細である、比較データ生成処理を示す図である。 改竄検出手段 7における入出力手段 11は、改竄検出要求手段 6から改竄検出要 求を受け取り、その改竄検出要求を判定手段 17に送信する。
[0089] 判定手段 17は、改竄検出要求手段 6から入出力手段 11を介して改竄検出要求を 受信する。そして、認証データリスト 23中で、前記改竄検出要求に含まれるプロダラ ム識別子と同値のプログラム識別子を検索する。そのプログラム識別子を発見できた 場合、前記プログラム識別子に対応付けられて!/、るブロック分割サイズを認証データ リスト 23から読み出す。そして、プログラム識別子とブロック分割サイズと比較データ の生成を示す生成データ種別とを含む分割指示を分割手段 13へと送信する (ステツ プ S41)。
[0090] 分割手段 13は、分割指示を受け付けると、プログラム識別子に対応するプログラム サイズを認証データリスト 23から読み出す。そして、分割手段 13は、 RAM2上にロー ドされているプログラムのうち前記プログラム識別子で識別されるプログラムについて 、前記プログラムサイズに応じたパディング処理を行う(ステップ S42)。このパディン グ処理の内容は、ステップ S22で説明したものと同様である。
[0091] 次に、分割手段 13は、パディングされたプログラムをブロック分割サイズの大きさの ブロックデータ(B [1]〜B [N] )へと分割する(ステップ S43)。この分割処理の内容 は、ステップ S23で説明したものと同様である。
分割が終了すると、分割手段 13は、第 1変換手段 14に対し、分割指示に含まれて いたプログラム識別子と生成データ種別とを含む第 1変換指示を第 1変換手段 14に 送信する。
[0092] 第 1変換手段 14は、ステップ S25〜S28にて説明したのと同様に、ステップ S43で 生成したブロックの XORを計算し、その結果を Bufに格納する(ステップ S44〜S47)
そして、第 1変換手段 14は、 Bufの内容を比較一時データとして第 2変換手段 15に 対して出力する。
[0093] 第 2変換手段 15は、比較一時データに対して所定の演算である SHA1処理を施し 、その結果である 20バイトのハッシュ値である比較データを生成し(ステップ S49)、比 較データ生成処理を終了する。
以上の処理により、 RAM上のプログラムが改竄された場合に改竄を検知して、 RA M上の不正なプログラムの実行を防止することができる。
[0094] 1. 3.効果についての補足説明
以下、本実施の形態 1の構成によって得られる効果を更に詳細に述べる。 従来の改竄検出方法では、改竄チェック対象のプログラムに対する認証データで あるハッシュ値を生成するために、チェック対象となるプログラムのサイズ分のデータ に対して SHA1などの一方向性関数を用いてハッシュ値を生成処理をする必要があ
[0095] そのため、改竄チェック対象プログラムのサイズが大きくなると、ハッシュ値生成処 理に多大な時間を要する。
一方、本実施の形態の改竄検出装置 1では、まず、改竄チェック対象のプログラム に XOR処理等の非常に負荷の軽い処理である第 1変換手段 14による変換をかけて 、プログラムの特徴を残しつつデータ量を高速に削減する。次いで、データ量が既に 削減されたデータに対して、 SHA1処理等の負荷の高い処理である第 2変換手段 1 5による変換をおこなう。よって、全体として改竄検出処理に力、かる時間を低減させる こと力 Sでさる。
[0096] なお、上記構成において、第 1変換手段 14による変換で用いるブロック分割サイズ を固定サイズにしてしまうと、第 1変換手段 14による第 1のデータ変換処理が特定さ れやすくなる。第 1のデータ変換処理が特定されると、本来の正当なプログラムを、第 1のデータ変換処理の結果が同等になるようにしつつ、不正な動作をするよう改竄す ることが可能となってしまう。
[0097] この問題に対し、本実施の形態では、ブロック分割サイズをランダムに設定すること によって予測しにくいものとにして!/、る。
これにより、第 1のデータ変換処理の結果が同等になるようにしつつ不正な動作を するよう改竄するには、ブロック分割サイズを予め知ることが必要なので、たとえ第 1 変換手段が特定されたとしても不正な改竄行為は成されにくくなる。
[0098] また、本実施の形態では、ブロック分割サイズは、 Flash上のプログラムのロードの 度に毎回ランダムに決定される。従って、一つのプログラムに着目して不正解析を行 つたとしても、ロードの度にブロック分割サイズが変化するため、ブロック分割サイズが 予測しにくいものとなり、不正な改竄行為をより効果的に防止することができる。 なお、第 1変換手段 14の XOR処理は、第 2変換手段 15の SHA1よりも安全性のレ ベルが低!/、処理である力 分割サイズ決定手段 12がブロック分割サイズを乱数によ り決定していることで、安全性のレベルを落とすことなく改竄検出処理が可能となって いる。
[0099] また、認証データは、認証データ生成処理にて動的に生成するので、従来技術と は異なり、予めメモリに実行ログを残しておく必要はない。さらに、予め認証データを 保持しておく必要もないため、省メモリの効果がある。さらには、メモリに残しておいた データが奪われて不正解析の手掛力、りとされることも防止できる。
2.実施の形態 2
実施の形態 1では、 1つの改竄チェック対象のプログラムに対して、 1つの認証デー タを生成していた。これに対し本実施の形態では、 1つの改竄チェック対象のプログ ラムについて複数の認証データを生成する。これら複数の認証データの生成には、 それぞれ異なる複数のブロック分割サイズを用いる。そして、複数の認証データのう ちの 1つを、改竄検出装置で実行されているプロセスの状況(以下、プロセス状況と いう)に応じて選出し、選出した認証データと比較データとを比較して改竄有無をチェ ックする。
[0100] 装置の構成要素としては、本実施の形態における改竄検出手段 7は、実施の形態 1の図 1で説明したものと相違はない。しかし、各構成要素の動作については、実施 の形態 1によるものと若干相違する。
具体的には、本実施の形態における分割サイズ決定手段 12は、複数のブロック分 割サイズを決定している。そして、分割手段 13と第 1変換手段 14と第 2変換手段 15と が各ブロック分割サイズに応じた複数の認証データを生成する。そして、生成された 複数の認証データは、格納手段 16により認証データリストに登録する。また、判定手 段 17は、認証データリストに記録されている複数のサイズの認証データからプロセス 状況に応じて 1つを選択し、選択した認証データのサイズを分割手段 13に通知する 。また、改竄検出要求手段 6の動作は、実施の形態 1とは多少異なっている。
[0101] 以下、実施の形態 1と異なる点を中心に、認証データの生成と、比較データの生成 及び改竄検出について説明する。
2. 1.認証データの生成
以下、図 7を用いて、実施の形態 2における認証データ生成フローについて説明す 図 7で示す処理は、図 4で示した処理のうちプログラムに対してブロック分害 I 第 1及 び第 2のデータ変換処理を行う部分につ!/、ては、ほぼ共通する。
[0102] よって、以下では、図 4で既に説明した部分と異なる箇所を中心に説明する。
まず、改竄検出要求手段 6が、プログラム識別子を含む認証データ生成要求を、入 出力手段 11を介して分割サイズ決定手段 12に対し送信する。
ここまでの処理は、実施の形態 1と変わらない。
分割サイズ決定手段 12は、前記認証データ生成要求を受信すると M個の乱数を 生成する。
[0103] ここで、 Mは予め定めた自然数とする。本実施の形態では、 M = 4の例で説明する 。ただし、この Mは、ランダムに生成して、装置内に記憶しておくこととしても構わない
そして、 M個の乱数それぞれに対応するブロック分割サイズ (BS—;!〜 BS—M)を 生成する(ステップ S61)。
各乱数からブロック分割サイズを決定する手順は、実施の形態 1における手順と同 様である。
[0104] そして、分割サイズ決定手段 12は、プログラム識別子と、ブロック分割サイズ (BS— 1〜BS— M)と、認証データの生成を示す生成データ種別とを含む分割指示を分割 手段 13に対して送信する。
分割手段 13は、分割指示を受け付けると、前記分割指示に含まれるプログラム識 別子に係るプログラムをフラッシュメモリ 3から読み出す。次に、分割手段 13は、プロ グラム識別子に対応するプログラムサイズ PSを認証データリスト 23から読み出す。
[0105] 分割手段 13は、内部変数 jを 1で初期化する(ステップ S62)。そして、 BSを、 BSJ とする(ステップ S63)。
以後、ステップ S64〜S72に関しては、前述のステップ S22〜S30と同様である。 ただし、実施の形態 1における Nは、実施の形態 2では N Jに置き換わっている。
[0106] また、ブロックの分割数は、実施の形態 1では Nであり、実施の形態 2では であ また、実施の形態 1の認証データは、実施の形態 2では認証データ Jに置き換わ つている。
また、ステップ S66において、分割手段 13が生成する認証データリストは、実施の 形態 1におレ、て生成されるものと相違する。
[0107] 図 8は、ステップ S66において、分割手段 13が生成する認証データリスト 81を説明 するための図である。
図 8を参照すると、認証データリスト 81には、値が 0001である 1つのプログラム識別 子に対し、 4つの異なるブロック分割サイズと、 4つの異なる認証データが登録されて いる。
[0108] 図 8のブロック分割サイズ 85を参照すると、 lkB、 4kB、 6kB、 20kBの 4つのサイズ が登録されているが、これらが、上述の BS—;!〜 BS— Mの一例である。
すなわち、 BS— 1 = 1、 BS— 2 = 4、 BS— 3 = 6、 BS— 4 = 20である。ただし、 Mの 値が 4の場合である。
ステップ 66においては、分割手段 13は、 BS」について、ブロック分割を行う毎に 、 BS Jをブロック分割サイズ 85の欄に追記することになる。
[0109] また、その BS Jに対応する認証データ 86の欄には、ステップ S72において、格納 手段 16が、第 2変換手段 15により生成される認証データ Jを記録することとなる。 次に、ステップ S73において、分割手段 13は、 jをインクリメントする(ステップ S73)
[0110] そして、 jが Mを超える場合(ステップ S 74 : YES)、処理を終了する。
jが Mを超えない場合(ステップ S74: NO)、ステップ S63以降の処理を行う。
以上で、図 8の説明を終える。
2. 2.比較データの生成及び改竄検出
2. 2. 1.改竄検出要求手段 6への追加機能
実施の形態 2では、改竄検出処理時に、上述した認証データリスト 81に登録された M個(本実施の形態では 4個)の認証データから 1つを選択し、その認証データと比 較するための比較データを算出する。そして、比較データと認証データを比較するこ とによりプログラムの改竄を検出する。
[0111] 改竄検出処理において、前述の比較に用いる認証データは、現在動作しているプ 口セスの状況に基づき算出されるプロセス状況算出値に基づいて選択される。プロセ ス状況算出値の詳細は、後述する。
ここで、改竄検出要求手段 6は、プロセス状況算出値を生成するために、実施の形 態 1におけるものに対して必要な機能の追加がなされている。
[0112] 本実施の形態における改竄検出要求手段 6は、プロセス状況を監視する機能を持 つ。
図 9は、実施の形態 2において、実施の形態 1から追加された構成を中心とした改 竄検出要求手段 6を示す概略図である。
改竄検出要求手段 6は、実施の形態 1で説明した機能を備えており、更に、内部構 成として、切り替え実行可能なプロセス群全体を監視するスケジューリング手段 101と 、各プロセスの優先度や CPU使用率などのプロセス情報を記憶して!/、るプロセス管 理テーブル格納部 102とを有している。
[0113] プロセス管理テーブル格納部 102は、プロセス管理テーブルを格納している。
図 10は、プロセス管理テーブル格納部 102に格納されるプロセス管理テーブル 12 1の一例を示している。
プロセス管理テーブル 121は、プロセス識別子 122、優先度 123、 CPU使用率 12 4から構成されている。
[0114] プロセス識別子 122は、実行中のプロセスを識別するためのプロセス IDである。
優先度 123は、プロセス識別子 122で識別されるプロセスに付与されている優先度 のィ直である。
CPU使用率 124は、プロセス識別子 122で識別されるプロセス力 どの程度 CPU を使用してレ、るかを表す数値である。
[0115] 図 10に示す例では、プロセス管理テーブル 121には 5つのプロセスが登録されて いる。 プロセス管理テーブル 121は、プロセス識別子「0001」で識別されるプロセスの優 先度が「10」であり、 CPU使用率が「40%」であることを示す。同様に、プロセス識別 子「0002」「0003」「0004」「0005」で識別される各プロセスの優先度は「4」「8」「1」 「3」であり、 CPU使用率は「10%」「30%」「1 %」「5%」であることを示す。
[0116] なお、プロセス管理テーブルは、プロセスを実行している実行手段 5により生成され 、逐次更新されるものとする。
2. 2. 2.プロセス状況算出値の生成
続いて、スケジューリング手段 101が、プロセス管理テーブルに登録されている情 報を用いてプロセス状況算出値を生成する処理につ!/、て図 11を用いて説明する。
[0117] まず、スケジューリング手段 101は、プロセス管理テーブル格納部 102からプロセス 管理テーブル 121を読み出す(ステップ S101)。
次に、プロセス管理テーブル 121に登録されている情報を用いて所定のァルゴリズ ムによりプロセス状況算出値を算出する(ステップ S 102)。
ここでは、所定のアルゴリズムとして、プロセス管理テーブルに登録されているプロ セスの数を算出し、算出したプロセス数をプロセス状況算出値とする。
[0118] 一例として、プロセス管理テーブル 121が図 10の状態であるとすると、プロセス管 理テーブル 121に登録されて!/、るプロセスの数は、プロセス識別子「0001」から「00 05」までの 5である。
この場合、スケジューリング手段 101は、上述のアルゴリズムに従って、プロセス状 況算出値を「5」とする。
[0119] 次に、ステップ S 102にて算出したプロセス状況算出値を改竄検出手段 7の入出力 手段 11に送信する(ステップ S 103)。
プロセス状況算出値を受信した入出力手段 11は、判定手段 17にプロセス状況算 出値を送信する。
2. 2. 3.認証データの選択と改竄検出
前述のように、入出力手段 11が、前記プロセス状況算出値を送信した後の処理に ついては、図 12を用いて説明する。
[0120] 図 12は、プロセス状況算出値を用いて認証データを選択する処理を示すフローで ある。
まず、判定手段 17は比較データの生成が開始されるより前に、前記プロセス状況 算出値を受信する (ステップ S 121 )。
ここで、判定手段 17は、最大閾値と最小閾値の組から成る閾値情報を予め保持し ているものとする。前記閾値情報は、認証データを選出するのに用いられる情報であ り、プロセス状況算出値と比較される。
[0121] 次に、判定手段 17は閾値情報を読み出し (ステップ S 122)、プロセス状況算出値 が最大閾値以上であるか否かを判定する (ステップ S 123)。
プロセス状況算出値が最大閾値以上の場合 (ステップ S123 : YES)、認証データリ スト 121内でブロック分割サイズが最小サイズである認証データを選択する(ステップ S 124)。
[0122] 例えば、認証データリスト 81が図 8に示す内容の場合、最小のブロック分割サイズ 1 KBに対応する認証データ— 1が選択される。
一方、プロセス状況算出値が最大閾値未満の場合 (ステップ S123 : NO)、更に、 プロセス状況算出値が最小閾値以下であるかを判定する (ステップ S 125)。
プロセス状況算出値が最小閾値以下である場合 (ステップ S125 : YES)、認証デ 一タリスト 81内のブロック分割サイズが最大サイズの認証データを選択する (ステップ S 126)。
[0123] 認証データリスト 81が図 8に示す内容の場合、最大のブロック分割サイズは 20KB なので認証データ— 4が選択される。
最小閾値くプロセス状況算出値く最大閾値の場合 (ステップ S 125 : NO)、認証デ 一タリスト 81内の全ての認証データからランダムに選択する(ステップ S127)。
以上のフローにより複数ある認証データから 1つの認証データを選択することができ
[0124] 認証データが選択されると、判定手段 17は、選択した認証データに対応する認証 データリスト 81から、プログラムアドレス 83、プログラムサイズ 84、ブロック分割サイズ 85を判定手段 17が読み込む。
そして、これらの情報を用いて、比較データを算出し、比較データと認証データを 比較し、改竄検出処理を行う。
[0125] 比較データを算出する処理から、比較データと認証データ比較するまでの処理に ついては、説明済みの実施の形態 1と同様であるとする。
以上より、本実施の形態 2では、プロセス状況算出値を利用することで、改竄検出 処理にかける負荷を調整することができる。そのため、他のプロセスへの影響を最小 限に抑えて改竄検出処理が可能になる。
[0126]
3.その他変形例
なお、本発明を上記実施の形態に基づいて説明してきた力 本発明は、上記の実 施の形態に限定されないのはもちろんである。以下のような場合も本発明に含まれる
(1)上述の実施の形態において、 RAM2は、ランダムアクセスメモリとしている力 こ れに限らず、読み出し及び書き込み可能なメモリであればよい。また、フラッシュメモリ 3は、 FlashROMとしていた力 これに限定されず、 EEPROM (Electrically Eras able Programmable ROM)や HDD (Hard Disk Drive)などの他の不揮発性 のメモリでもよい。
[0127] (2)上述の実施の形態において、プログラム識別子は、プログラムを識別するため の ID情報としている力 これに限らずプロセス IDやファイル名などプログラムを識別 できる情報であればよい。
(3)上述の実施の形態において、ブロック分割サイズは、生成した乱数をそのまま 使用するものとしていた力 これに限らず、ブロック分割サイズがある程度ランダムに 生成される方法であればょレ、。
[0128] 例えば、予め、乱数とブロック分割サイズの対応表を記憶しておき、生成した乱数を 対応表を用いてブロック分割サイズに変換することとしてもよい。
また、例えば、ブロック分割サイズの候補値を予め所定個数(例えば、 5つ)決めて おき、候補値の 1つを順番に用いることとしてもよい。
(4)上述の実施の形態において、ブロック分割する前にパディング処理を行ってい る力 ブロック分割した最終ブロックに対してパディング処理を行っても良い。この場 合、 B[16]は 2KBのブロックとなる。 [0129] また、パディング処理を省略することとしてもよい。この場合、 B [16]が Buf中のデ ータよりもビット数が少なくなつてしまう。
これに対応するため、例えば、 Buf中のデータの一部分に対してのみ B [16]のデ ータとの XOR演算を行った結果を認証一時データ 63とするとしてもよい。また、 B [l
5]まで XOR演算を行った結果を認証一時データ 63とするとしてもよい。
[0130] (5)上述の実施の形態において、プログラム全体の改竄チェックを行っていた力 こ れに限らず、プログラム内を部分的に改竄検出するようにしてもよい。
この場合、プログラムに係る改竄検出したい部分の先頭アドレスをプログラムァドレ ス 42とし、改竄検出したい部分のプログラムサイズをプログラムサイズ 43として、認証 データリスト 23に登録すればよい。
[0131] このような構成とすれば、 1つのプログラムに対して部分的に改竄検出ができるので
、改竄検出に要する時間を短縮することができる。特に、認証一時データの生成です ら相当の時間力 Sかかるほどの大きなプログラムに対して改竄検出する場合には有効 である。
また、 1つのプログラムに対して改竄検出を行いたい部分が複数ある場合などには 、 1つのプログラム識別子に対応づけて、プログラムアドレス 42、プログラムサイズ 43 、ブロック分割サイズ 44及び認証データ 45の組を複数登録してもよ!/、。
[0132] これにより、 1つのプログラムについて複数の部分的なプログラム領域それぞれに対 する改竄を検出することができる。
さらに、フラッシュメモリ 3上で 1つだったプログラムを同一内容の複数のプログラムと して RAM2上にロードし並行処理を行う場合などには、 1つのプログラム識別子に対 応づけて、プログラムアドレス 42、プログラムサイズ 43、ブロック分割サイズ 44及び認 証データ 45の組を複数登録してもよ!/、。
[0133] この場合、プログラムサイズ 43しては、部分的なプログラムのサイズではなくプログ ラム全体のサイズが登録される。
(6)上述の実施の形態において、改竄検出開始のトリガが発生した場合に、複数の プログラムから改竄チェック対象となるプログラムを選択する方法について特には説 明しなかったが、以下のようなものが考えられる。 [0134] まず、判定手段 17が、フラッシュメモリ 3に格納されているプログラムのうちからラン ダムに選択した 1つのプログラムを改竄チェック対象のプログラムとする方法が考えら れる。
また、改竄検出要求手段 6が、装置外部から改竄チェックを要求するプログラムの 選択を受け付け、その選択されたプログラムのプログラム識別子を認証データ生成要 求に含めて改竄検出手段 7に対して送信することとしてもよい。
[0135] また、何らかのタイミングで改竄チェック用の割り込みを発生させ、その時点で実行 中のプログラムを改竄チェック対象となるプログラムとして選択するとしてもよい。 この場合、プログラム実行手段 50が RAM上のプログラムを実行している間に、改 竄検出要求手段 6が、実行手段 5に対して割り込みを発生させて、そのときのプログ ラムカウンタ値を取得し、そのプログラムカウンタ値を入出力手段 11へ送信し、入出 力手段 11が受信したプログラムカウンタ値を判定手段 17に送信する。その後、判定 手段 17が、受信したプログラムカウンタ値と認証データリスト 23内のプログラムァドレ スとプログラムサイズから、プログラムカウンタ値が示すアドレスに対応するプログラム 情報を読み込んでもよい。
[0136] また、改竄検出要求手段 6が、入出力手段 11に比較データ生成要求を通知し、プ ログラムの改竄検出を行うタイミングについては、定期的に通知してもよいし、 RAM2 上の改竄チェック対象のプログラム内に、改竄検出要求手段 6への認証データ生成 要求を送信する処理、改竄検出要求を送信する処理を埋め込んでおくなど、所定の イベントが発生するタイミングで行うようにしてもよ!/、。
[0137] (7)分割サイズ決定手段 12に対してブロック分割サイズの閾値を設定しておき、分 割サイズ決定手段 12が生成するブロック分割サイズが閾値以下になるように生成し てもよい。このようにすることで、第 1変換手段 14にて生成されるデータサイズが前記 閾値以下のサイズでランダムに選ばれることとなるため、改竄チェック対象プログラム のサイズにかかわらず、第 2変換手段 15の処理時間を一定以下の処理時間に抑え ること力 Sでさる。
[0138] (8)上述の実施形態では、第 1変換手段 14によるデータ変換処理を XORとし、第 2 変換手段 15によるデータ変換処理を SHA1としている力、これに限定されるわけで はなぐ論理演算を組み合わせたアルゴリズムや一方向性関数などを利用してもよい 論理演算を組み合わせたアルゴリズムには、例えば、論理積演算と排他的論理和 演算を交互に行うアルゴリズム等が考えられる。
[0139] このアルゴリズムを第 1変換手段 14で行う場合を例に、具体的に説明すると、まず ブロックデータ B [l]と B [2]との論理積演算を行う。次に、 B [l]と B[2]との論理積演 算結果と、 B[3]との排他的論理和演算を行う。次に排他的論理和演算の結果と、 B
[4]との論理積演算を行う。以下、同様に、排他的論理和演算と、論理積演算とを交 互に繰り返す。
[0140] なお、この場合、論理積演算と、排他的論理和演算の実行回数の比を、上記のよう に 1: 1とせず、 2 : 1など、他の比率を用いることとしてもよい。
例えば、 2 : 1とする場合であれば、 B [l]と B [2]との論理積演算を行い、その論理 積演算の結果と B [3]との論理積演算を行う。論理積演算が 2回終了したので、今度 は、 B [3]に係る前記論理積演算の結果と、 B[4]との排他的論理和演算を行う。排 他的論理和演算が 1回終了したので、次に、その排他的論理和演算の結果と、 B[5] との論理積演算を行う。以降は、排他的論理和演算 1回に対し、論理積演算 2回を実 行していくことになる。
[0141] 比率をランダムに定めるよう実装することで、このアルゴリズムも処理が軽くかつラン ダム性のあるアルゴリズムとなる。
また、第 1変換手段 14と第 2変換手段 15との両方で一方向性関数を使う場合には 、それぞれで異なる一方向性関数を用いることが望ましい。例えば、データ量の削減 を目的とする第 1変換手段 14では軽量な一方向性関数を、認証データの算出を目 的とする第 2変換手段 15では安全性の高!/、一方向性関数を用いるとよレ、。
[0142] また、改竄チェック対象のプログラムの全データに対して、第 1のデータ変換処理を 行うことにより、改竄チェック対象が部分的でなぐ網羅的にチェックできる。すなわち 、改竄チェック対象プログラムのどこ力、 1ビットが改竄されても、その改竄を効率的に 検出すること力 Sでさる。
(9)上述の実施の形態において、 1つの改竄チェック対象のプログラムに対して 1つ の認証データを生成しているが、複数の改竄チェック対象のプログラムに対して 1つ の言忍証データを生成することとしてもよレヽ。
[0143] 具体的には、複数の改竄チェック対象のプログラムに対して、 1つの認証データを 生成する場合、複数の改竄チェック対象のプログラムを連結させたデータを 1つの改 竄チェック対象のデータとして扱い、前記連結されたデータに対して、分割手段 13に よる分割処理と第 1のデータ変換処理手段 75の XOR処理をしてもよい。この場合、 連結させたプログラムの順序によって異なる第 1の認証データを生成するような変換 を第 1変換手段 14による変換とすることによって、どのような順序で連結されているの 力、を知らない不正解析者に対して困難にすることができる。
[0144] なお、上記のように連結させたプログラムの順序によって、第 1変換手段 14によって 生成される認証一時データが変わるようであれば、比較データを生成する際にも同じ 順序で連結したプログラムにつ!/、て変換を施す必要があるので、前記プログラムの順 序情報も認証データと関連づけて登録する。
また、複数の改竄チェック対象のプログラムに対してプログラムの連結をせず 1つの 認証データを生成する方法として、分割手段 13によるブロック分割、第 1変換手段 1 4による認証一時データの生成の処理を改竄チェック対象のプログラムの数だけルー プさせることが考えられる。
[0145] この場合、生成された認証データと改竄チェック対象のプログラムの対応関係を格 納手段 16がフラッシュメモリ 3に登録する。
このようにすることで、登録する認証データの数を削減することができるので、省メモ リの効果がある。
(10)上述の実施の形態 1では、分割手段 13は、プログラムを分割サイズ決定手段 12により決定されたブロック分割サイズのブロックに分割していた。そして、第 1変換 手段 14が、ブロック分割されたプログラムを入力として、処理を行い、結果としてプロ ック分割サイズのデータを出力していた力、これに限られるものではない。
[0146] 分割サイズ決定手段 12と分割手段 13と第 1変換手段 14とによる処理は、入力され たプログラム力 ロード時にランダムに定まるサイズに削減された上で第 2変換手段 1 5に与えられるような他の処理に置き換えても構わない。この場合であっても、実施の 形態 1につ!/、て述べた効果は変わらず得られる。
(11)上述の実施の形態 2において、ブロック分割サイズの数 Mは予め定められて おり、分割サイズ決定手段 12が記憶しているとしている力、これには限られない。
[0147] 例えば、改竄検出要求手段 6が、ユーザ操作により指示された Mを、分割サイズ決 定手段 12に通知するものとしてもよい。
また、 Mの値は、フラッシュメモリ 3が格納できる認証データの数などに応じて決めて いてもよい。
(12)実施の形態 2において、プロセス状況算出値を利用して認証データを選択す る代わりに、ランダムに認証データを選択するものとしてもよい。このようにすれば、認 証データのブロック分割サイズのパターンの範囲内で、ランダムなサイズの比較デー タが生成されるので比較データに対する解析を困難にすることが出来る。
[0148] (13)上述の実施の形態においては、フラッシュメモリ 3に格納される認証データリス トを平文のまま格納していた力 S、より安全に格納するためにセキュアフラッシュメモリな どの耐タンパ性を有するメモリに格納することとしてもよ!/、。
また、認証データリストをフラッシュメモリ 3に格納していた力 これに限らない。 例えば、小容量のセキュアなメモリを格納手段 16に具備させ、当該セキュアなメモリ に認証データリストを格納することとしてもょレ、。
[0149] (14)改竄検出手段 7に喑復号手段と暗号鍵を持たせて、認証データリストを前記 暗号鍵を用いて暗号化した状態で格納することとしてもょレ、。
この構成においては、認証データリストのデータを参照、追記する場合には、暗号 化された認証データリストを改竄検出手段 7内の暗号鍵と喑復号手段を用いて復号 する。参照、追記が終了した後、再度、保存する場合は、暗号鍵と喑復号手段を用 いて認証データリストを暗号化した上で保存する。
[0150] このようにすれば、認証データリストを安全に格納しておくことが可能になり、ブロッ ク分割サイズを不正解析者から確実に守ることができる。
(15)上述の実施の形態では、フラッシュメモリ 3上の改竄チェック対象であるプログ ラムを RAM2にロードする時に改竄検出手段 7にて認証データリストを動的に生成し ていたが、これに限らず、認証データリストを予め格納手段 16又はフラッシュメモリ 3 に記憶させておいてもよい。
[0151] このようにすることで、フラッシュメモリ 3上の改竄チェック対象であるプログラムから、 認証データをロード時に生成する必要がなくなる。そして、予め格納手段 16又はフラ ッシュメモリ 3に記憶させておいた認証データリストを用いて RAM上のプログラムの改 竄を検出するので、プログラムのロード時に力、かる負荷を軽減できる。なお、この場合 には、認証データリストが改竄される恐れがあるため、格納手段 16又はフラッシュメモ リ 3を耐タンパ化技術などによって保護することが望ましい。
[0152] また、さらに、予め格納手段 16又はフラッシュメモリ 3に記憶させておいた認証デー タリストを用いて、フラッシュメモリ 3上の改竄チェック対象であるプログラムを RAMへ ロードする時に、前記プログラムについて改竄検出してもよい。このようにすることで、 RAM2上のプログラムだけでなぐフラッシュメモリ 3上のプログラムについても改竄 検出が可能となる。
[0153] (16)フラッシュメモリ 3上のプログラムについて、ロード前のデータ形式と、 RAM2 へロードされた後のデータ形式が異なる場合、 RAM2へロードされた後のデータ形 式にした後のプログラムについての認証データを、認証データリストに記憶させてお いてもよい。このようにすることで、 Flash上ではプログラムが圧縮されて保存されてお り、 RAMへのロード時に圧縮されたプログラムが伸張されて、伸張されたプログラム が実行される場合などにおいても、 RAM上のプログラムの改竄検出が可能となる。
[0154] (17)改竄検出装置 1に、外部端末との間でデータの送受信を行う送受信手段を付 加し、外部端末から送受信手段を用いて新しい認証データリストを取得し、古い認証 データリストを更新するようにしてもよい。このようにすれば、認証データリストの更新 が可能となって安全性を維持することができる。
(18)改竄検出装置 1に、記憶媒体のデータを読み込む記憶媒体読み取り手段を 付加してもよい。前記記憶媒体には新しい認証データリストを記憶させておく。そして 、改竄検出装置 1は、前記記憶媒体から新しい認証データリストを読み取り、前記新 しい認証データリストで古い認証データリストを更新する。このようにすれば、認証デ 一タリストの更新が可能となって安全性を維持することができる。
[0155] (19)上述の実施の形態では、プログラムに対する改竄が検出された時には、実行 手段 5による前記プログラムの実行を停止させる例について説明してきた。しかし、こ れに限らず、他の実行妨害を行ってもよい。例えば、警告画面を表示したり、プロダラ ムを実行できる時間に制限を設けたり、データ保存等の一部の機能を無効にするな どしてもよレ、。
[0156] また、プログラムに対する改竄が検出された場合に、ロード手段 4がフラッシュメモリ
3から前記プログラムを改めて読み出して、再びロードするような構成としてもよい。 このようにすることで、 RAM2上のプログラムが改竄されたことを検出した場合に、 再びロードされた改竄のされていないプログラムを実行することができるので、より安 全にプログラムを実行することが可能となる。
[0157] さらに、改竄が検出されたときには、改竄を検出したことを示す情報を不揮発性メモ リにログ情報として残すようにしてもよい。このようにすることで、端末を提供するメーカ 一等が不正な端末を回収した際に、どのプログラムに対して改竄が行われたかを把 握することが可能になる。
また、さらに、端末がネットワークと接続する機能を備えていれば、改竄を検知したと いうログ情報をネットワーク経由でサーバーに送信するようにしてもよい。このようにす ることで、サーバー側で、そのログ情報を基に、どのプログラムに対して不正な改竄が 行われたかを把握することができる。
[0158] さらなる効果としては、ログ情報に基づき、適切な処置を施した更新プログラムを配 布することあ可倉 となる。
(20)上述してきた改竄検出装置 1又は改竄検出手段 7は、セキュアな実行環境で あるとしてもよい。セキュアな実装環境の例としては、 Trusted Computing Group
(TCG)で規定している Trusted Platform Module (TPM)や Mobile Trusted Module (MTM)が考えられる。このようにすることで改竄検出装置 1又は改竄検出 手段 7の全構成要素がセキュアな環境で実行することができるため、より安全な実行 環境を構築することができる。
[0159] (21)上述の実施の形態では、第 1変換手段 14は、処理結果としてブロック分割サ ィズのデータを出力していた力 S、必ずこのサイズのデータを出力しなくてはならない わけではない。上述の実施の形態は、ブロック分割サイズと変換結果の取るべきデー タサイズを同一とした例であり、これらのサイズをそれぞれ独立して決定してもよい。 以下、実装する場合の例を簡単に説明する。
[0160] 分割サイズ決定手段 12が、ブロック分割サイズと変換結果の取るべきデータサイズ との両方をランダムに決定し、第 1変換手段 14に変換結果の取るべきデータサイズを 通知する。
第 1変換手段 14は、通知されたデータサイズ以下になるようプログラムのデータサ ィズを削減する。また、認証データリストには変換結果の取るべきデータサイズをさら に記録する。
[0161] 比較データの生成時には、認証データリストに記録されている変換結果の取るべき データサイズにまで第 1変換手段 14がデータ量を削減した上で処理を続ける。
(22)上述の実施の形態では、プログラムをランダムに定まるブロック分割サイズに 分割し、その結果に XOR演算等をかけてることで、データの削減に関してランダム性 を持たせ、データ削減処理に対する攻撃を困難にしていた。しかし、データの削減に 関しランダム性を持たせる方法はこれに限らない。
[0162] 例えば、データ量を削減するアルゴリズム自体を複数種類用意しておき、どのァノレ ゴリズムを用いてデータを削減するかをランダムに決定してもよい。
具体的なアルゴリズムの候補としては、ブロックごとの ANDを取るなど XOR以外の 論理演算を用いる変換や、プログラム全体のチェックサムを取るなど比較的軽量な関 数による変換などが考えられる。
[0163] 具体的な実装としては、認証データの生成時に、使用したデータ量の変換処理を 識別できる情報を認証データリストに記録しておく。比較データの生成時には、認証 データリストを参照し、認証データの生成に用いたものと同じアルゴリズムを把握する 。そして、その同じアルゴリズムでプログラムのデータ量を削減した上で、第 2変換手 段 15が処理を行えばよい。
[0164] なお、アルゴリズム自体がランダムに決定される場合は、ブロック分割サイズや変換 結果の取るべきデータサイズが固定の値であっても攻撃は困難となる力 これらのサ ィズをランダムに決定することでさらに安全性を高めてもよいことは言うまでもない。
(23)認証データの算出と比較データの算出とで、同一の分割手段 13と第 1変換手 段 14と第 2変換手段 15とを用いているが、認証データの算出用の各手段と比較デ ータの算出用の各手段とを別々に設けてもよい。
[0165] (24)実施の形態 2で、プロセス管理テーブル 121には、プロセス識別子 122を含 めることとしている力 これに限らず、その他のプログラム識別子などプロセスを識別 できる情報であればよい。
(25)実施の形態 2において、プロセス状況算出値を算出するアルゴリズムとして、 プロセス数をそのまま用いる方法につ!/、て説明したが、これには限らな!/、。
[0166] 別のアルゴリズムとしては、プロセス管理テーブル格納部 102に登録されているプ 口セスの総 CPU使用率を算出し、総 CPU使用率をプロセス状況算出値とする方法 が考えられる。
この方法を用いた場合、一例としてプロセス管理テーブル 121が図 10の状態であ つたならば、プロセス識別子「000;!」〜「0005」までのプロセスの CPU使用率は、そ れぞれ「40%」「10%」「30%」「1 %」「5%」であるので、その合計である総 CPU使用 率が 86%となる。よってプロセス状況算出値は「86」となる。
[0167] また、別のアルゴリズムとしては、各プロセス優先度と CPU使用率を掛けあせたもの の合計値を、プロセス状況算出値としてもよい。
この場合、一例としてプロセス管理テーブル 121が図 10の状態であったならば、合 計値は、
10 X 40 (プロセス識別子「0001」の優先度 X CPU使用率)
+ 4 X 10 (プロセス識別子「0002」の優先度 X CPU使用率)
+ 8 X 30 (プロセス識別子「0003」の優先度 X CPU使用率)
+ I X 1 (プロセス識別子「0004」の優先度 X CPU使用率)
+ 3 X 5 (プロセス識別子「0005」の優先度 X CPU使用率)
= 696
となるので、プロセス状況算出値は 696となる。
[0168] なお、上述したアルゴリズムは一例であるので、これ以外の方法であってもよい。
(26)実施の形態 2のステップ S 127においては、認証データを選択する場合に、認 証データリスト 81内の全ての認証データからランダムに選択することとしていた力 S、こ れに限らない。
例えば、認証データリスト 81内の全ての情報のうち最大、最小ブロック分割サイズを 除!/、たものから、ランダムに選択することとしてもよ!/、。
[0169] 例えば、認証データリスト 81が図 8に示されるような場合であれば、認証データ— 2 及び認証データ— 3からランダムに選択することとなる。
(27)上述の実施の形態は、プログラムがリロケーションされないことが前提であった 。リロケーションとは、オブジェクトファイル内のシンボリックな参照を具体的なメモリア ドレスに置き換えることを意味する。一般にオブジェクトファイルはその中のコードが 0 番地から始まるものとしてコードが生成されており、実際に実行する前にそのコードが 置かれたアドレスに応じてコードの調整がなされる。
[0170] ここで、リロケーションについて図 13を用いて具体的に説明する。フラッシュメモリ 3 には、図 13に示すようなロード対象となるプログラムが記憶されているものとする。 プログラムは、非リロケーション対象コード(NC;!〜 NC3)と、リロケーション対象コー ド(RC;!〜 RC2)と、リロケーションテーブルとを含んでいる。
非リロケーション対象コードは、リロケーションされないコードであり、 RAMにロード されてもコードが置き換わることはない。
[0171] リロケーション対象コードは、リロケーションされるコードであり、上述のように、ロード される場合にコード中のシンボリックな参照が具体的なメモリアドレスに置き換えられ る。よって、 RAMにロードされた後のプログラムは、前述の置き換えがなされた部分 にお!/、てフラッシュメモリ 3に記録されて!/、たときとは異なる。
リロケーションテーブルは、リロケーションを行うための情報を含む。 RAMにロードさ れてもコードが置き換わることはない。
[0172] RAMへとロードされたプログラムはは、非リロケーション対象コード(NC;!〜 NC3) と、リロケーション済コード(RC:!,〜 RC2,)と、リロケーションテーブルとを含むことと なる。
すなわち、ロード前とロード後のプログラムを比較すると、リロケーション対象コード の部分と、リロケーション済コードの部分が必ず相違することになる。
[0173] よって、リロケーションされるプログラムについて上述の実施の形態と同じように、口 ード前のプログラムから認証データを生成し、ロード後のプログラムから比較データを 生成すると、認証データと比較データとは必ず異なり、改竄が行われていると判定さ れてしまう。
そこで、本変形例では、改竄検出対象のプログラムを図 14 (a)又は図 14 (b)に示 すデータとなるよう処理し、その処理後のデータから認証データ及び比較データを生 成することとしている。
[0174] 図 14 (a)は、改竄検出対象であるプログラムのうち、リロケーション対象コードを除 V、て生成したデータを示す。
図 14 (b)は、改竄検出対象であるプログラムのうち、リロケーション対象コードを規 定コード(SC)、例えば、無意味なコード OxFFFF' · ·などに置き換えて生成したデ ータを示す。
[0175] これにより、リロケーションが生じるプログラムについて、前述のように、改竄が行わ れたと常に判定されてしまうという不都合を回避できる。
(28)上述の実施の形態においては、分割サイズ決定手段 12が乱数を生成し、乱 数を用いてブロック分割サイズを決定して!/、た。ブロック分割サイズがプログラムの口 ード毎に変更されるので、プログラムから生成される認証データがランダム性を有して 、認証データの推測の困難性を増していた。しかし、これに限られるものではなぐ以 下のような変形例も考えられる。
[0176] 本変形例は、改竄検出対象のプログラムの全体から認証データを生成するのに代 えて、プログラムの一部分から認証データを生成する。
その一部分を決定するために、一例として乱数を用いる場合について説明する。 図 15は、本変形例における、プログラムから認証データを生成するまでの概要を説 明するための図である。
[0177] 図 15中のプログラム 21が、改竄検出対象のプログラムであるとする。
改竄検出手段 7は、例えば、乱数を 2つ生成し、一方の乱数をプログラムの先頭ァ ドレスからのオフセット(141)、他方の乱数をデータサイズ(142)とする。
そして、プログラムの先頭アドレスにオフセット(141)を加えたアドレス(143)力、らデ ータサイズ(142)分のデータ(144)を用いて認証データを生成する。 [0178] 前記オフセット(141)及び前記データサイズ(142)は、認証データリストに登録して おくものとする。
そして、データ(144)に対し、 SHA1処理を行い、その結果として認証データ(145
)を得る。
改竄検出を行うために比較データを生成する場合には、認証データリストから、オフ セット(141)及びデータサイズ(142)を読み出して、 RAMに記録されているプロダラ ムの先頭アドレスにオフセット(141)を加えた部分からデータサイズ(142)分のデー タを用いて、認証データを生成したのと同様に比較データを生成する。
[0179] 以上により、プログラムのうち認証データ及び比較データを生成するために用いる 部分がプログラムのロード毎に変更されるので、認証データがランダム性を有して、 認証データの推測の困難性を増すことができる。また、プログラムの一部分を認証デ ータの生成に用いているため、プログラム全体力 認証データを生成する場合に比 ベ、認証データの生成速度を向上することができる。
[0180] (29)上述の実施の形態においては、ブロック分割サイズをランダムな情報としてい た。しかし、これに限られるものではなぐ以下のような変形例も考えられる。
本変形例では、 HMAC— SHA1 (keyed— Hashing for Message Authenti cation Code Secure Hash Algorithm 1)の鍵及びパディングデータをラ ンダムな情報としている。
[0181] 図 16は、 HMAC— SHA1を用いる本変形例の処理について説明するための図で ある。
改竄検出手段 7は、 2つの乱数 RP及び RKを生成する。
2つの乱数 RP、 RKは、認証データリストに記憶しておく。
そして、上述の実施の形態では、改竄検出対象であるプログラム 21に対し、値が 0 のデータなど一定の値でパディング処理を行っていた力 本変形例では、図 16に示 すように乱数 RP (161)でパディング処理を行う。
[0182] そして、上述の実施の形態と同様に、パディング後のプログラムについて、ブロック 分割、 XORの算出を行!/、結果として認証一時データ 63を得る。
そして、認証一時データ 63について、乱数 RKを鍵とする HMAC— SHA1処理(1 65)を行い、結果として認証データ 65を得る。
比較データを生成する場合には、 RAM上のプログラムに対し、図 16に示したのと 同様の処理を行って比較データを生成する。
[0183] なお、本変形例は、乱数 RP、 RKの 2つを生成し、 2つのランダム情報を用いた処 理としていた力 S、これに限らず、 3以上又は 1つのランダム情報を用いることとしてもよ ぐこの場合でもランダム情報を用いて認証データの推測を困難にする効果があるこ とは言うまでもない。
すなわち、乱数 RKを生成せずに固定の鍵を用いてもよいし、乱数 RPを生成せず に固定 でパディングすることとしてもよい。
[0184] (30)上述の実施の形態においては、乱数を用いて決定していたブロック分割サイ ズについて、特に制約は設けていなかった力 S、決定するブロック分割サイズに制約を 設けてもよい。
例えば、ブロック分割サイズを CPUが具備する 2次キャッシュなどのキャッシュメモリ におけるデータの取り扱い単位(例えば、ページングのサイズ)以下にする。
[0185] これにより、認証データ又は比較データを、キャッシュメモリ上のデータの入れ替え を行うことなく生成することができる。これにより、キャッシュの使用効率が向上し、改 竄検出処理の更なる高速化を実現できる。
(31)上述の実施の形態において、プログラムのロード前に 1のプログラムから複数 の異なるサイズの認証データを生成し、プログラムのロード以後に 1の認証データを 選出し、選出した認証データを用いて改竄検出を行う例について説明した力 これに 限らず、複数の認証データを用いて改竄検出を行ってもょレ、。
[0186] 例えば、 2つ以上の認証データを選出し、選出した 2つ以上の認証データを用いて 改賓検出することとしてあよレ、。
この場合、選出した認証データの数と同数の、各認証データに対応する比較デー タを生成し、対応する認証データと比較データとを比較することになる。
また、 2つ以上の認証データ、比較データについて、連結、加算等行ったものを用 いて、改竄検出してもよい。
[0187] (32)上述の実施形態では、プログラムが ROMに格納されており、 RAMにロードさ れた後に、実行されることとしていた力 これには限定されない。例えば、プログラム は、ハードディスクや不揮発性メモリに格納されていてもよい。また、実行時には、プ ログラムは RAM以外のメモリにロードされることとしてもよ!/、。
(33)上記の装置は、具体的には、マイクロプロセッサ、 ROM、 RAM,ハードデイス クユニット、ディスプレイユニット、キーボード、マウスなどから構成されるコンピュータ システムである。前記 RAMまたはハードディスクユニットには、コンピュータプログラ ムが記憶されている。前記マイクロプロセッサ力 前記コンピュータプログラムにしたが つて動作することにより、上記装置は、その機能を達成する。ここでコンピュータプロ グラムは、所定の機能を達成するために、コンピュータに対する指令を示す命令コー ドが複数個組み合わされて構成されたものである。
[0188] (34)上記の各装置を構成する構成要素の一部または全部は、 1個のシステム LSI
(Large Scale Integration:大規模集積回路)から構成されているとしてもよい。 システム LSIは、複数の構成部を 1個のチップ上に集積して製造された超多機能 LSI であり、具体的には、マイクロプロセッサ、 ROM、 RAMなどを含んで構成されるコン ピュータシステムである。前記 RAMには、コンピュータプログラムが記憶されている。 前記マイクロプロセッサ力 前記コンピュータプログラムにしたがって動作することによ り、システム LSIは、その機能を達成する。
[0189] また、上記の各装置を構成する構成要素の各部は、個別に 1チップ化されていても 良レ、し、一部又は全てを含むように 1チップ化されてもよレ、。
また、ここでは、システム LSIとしたが、集積度の違いにより、 IC、 LSI,スーパー LS I、ウルトラ LSIと呼称されることもある。また、集積回路化の手法は LSIに限るもので はなぐ専用回路又は汎用プロセッサで実現してもよい。 LSI製造後に、プログラムす ることが可能な FPGA(Field Programmable Gate Array)や、 LSI内部の回路 セルの接続や設定を再構成可能なリコンフィギユラブル 'プロセッサーを利用しても良 い。
[0190] さらには、半導体技術の進歩又は派生する別技術により LSIに置き換わる集積回 路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行って もよい。ノ ィォ技術の適用等が可能性としてありえる。 (35)上記の装置を構成する構成要素の一部または全部は、装置に脱着可能な IC カードまたは単体のモジュール力も構成されているとしてもよい。前記 ICカードまたは 前記モジュールは、マイクロプロセッサ、 ROM、 RAMなどから構成されるコンビユー タシステムである。前記 ICカードまたは前記モジュールは、上記の超多機能 LSIを含 むとしてもよい。マイクロプロセッサ力 コンピュータプログラムにしたがって動作するこ とにより、前記 ICカードまたは前記モジュールは、その機能を達成する。こ (DICカー ドまたはこのモジュールは、耐タンパ性を有するとしてもよ!/、。
[0191] (36)本発明は、上記に示す方法であるとしてもよい。また、これらの方法をコンビュ ータにより実現するコンピュータプログラムであるとしてもよいし、前記コンピュータプ ログラムからなるデジタル信号であるとしてもよい。
また、本発明は、前記コンピュータプログラムまたは前記デジタル信号をコンビユー タ読み取り可能な記録媒体、例えば、フレキシブルディスク、ハードディスク、 CD— R OM、 MO、 DVD, DVD— ROM、 DVD— RAM、 BD (Blu— ray Disc)、半導体 メモリなどに記録したものとしてもよい。また、これらの記録媒体に記録されている前 記デジタル信号であるとしてもよ!/、。
[0192] また、本発明は、前記コンピュータプログラムまたは前記デジタル信号を、電気通信 回線、無線または有線通信回線、インターネットを代表とするネットワーク、データ放 送等を経由して伝送するものとしてもよい。
また、本発明は、マイクロプロセッサとメモリを備えたコンピュータシステムであって、 前記メモリは、上記コンピュータプログラムを記憶しており、前記マイクロプロセッサは 、前記コンピュータプログラムにしたがって動作するとしてもよい。
[0193] また、前記プログラムまたは前記デジタル信号を前記記録媒体に記録して移送する ことにより、または前記プログラムまたは前記デジタル信号を前記ネットワーク等を経 由して移送することにより、独立した他のコンピュータシステムにより実施するとしても よい。
(37)上記実施の形態及び上記変形例をそれぞれ組み合わせるとしてもよ!/、。 産業上の利用可能性
[0194] 本発明に係る改竄検出装置は、高速かつ安全にプログラムやデータの改竄検出が 可能なことから、認証を行ったり、個人情報を取り扱うような秘匿性の高レ、プログラム 等を実行させるコンピュータ、携帯端末等として利用するのに好適である。

Claims

請求の範囲
[1] プログラムの改竄検出を行う改竄検出システムであって、
実行対象のプログラムを前記プログラムよりも短くなるよう加工処理をして認証用加 ェデータを生成する第 1加工手段と、
前記認証用加工データに、前記加工処理より計算量の多い要約処理を行い、認証 情報を生成する第 1生成手段と、
生成された前記認証情報を保持する保持手段と、
前記実行対象のプログラムに対して、前記加工処理を行って比較用加工データを 生成する第 2加工手段と、
前記比較用加工データに対して、前記要約処理を行って、比較情報を生成する第 2生成手段と、
前記保持手段の保持する認証情報と前記第 2生成手段が生成した比較情報とを用 V、て、前記実行プログラムの改竄検出を行う検出手段と
を備えることを特徴とする改竄検出システム。
[2] 前記第 1加工手段は、ランダムに定まるパラメータに依存する加工処理を行い、 前記第 2加工手段は、前記第 1加工手段による加工処理に用いられたパラメータと 同じパラメータを用!/、て前記加ェ処理を行う
ことを特徴とする請求項 1に記載の改竄検出システム。
[3] 前記第 1生成手段による認証情報の生成は、前記プログラムが実行される以前に 行われ、
前記第 2生成手段による比較情報の生成及び前記検出手段による改竄検出は、前 記プログラムの実行中に行われる
ことを特徴とする請求項 2に記載の改竄検出システム。
[4] 前記パラメータは、データのサイズを示し、
前記第 1加工手段及び前記第 2加工手段は、前記プログラムを前記パラメータによ り示されるサイズに加工処理する
ことを特徴とする請求項 3記載の改竄検出システム。
[5] 前記第 1加工手段及び第 2加工手段は、前記加工処理として、前記プログラムを前 記サイズの複数のブロックデータに区切り、前記ブロックデータ同士で同一桁の論理 演算を行うことにより前記サイズの前記認証用加工データ及び比較用加工データを 生成する
ことを特徴とする請求項 4に記載の改竄検出システム。
[6] 前記第 1加工手段及び第 2加工手段は、前記論理演算として排他的論理和演算を 行う
ことを特徴とする請求項 5に記載の改竄検出システム。
[7] 前記第 1生成手段は、キャッシュメモリを含み、前記キャッシュメモリを介して認証用 加工データが記憶されて!/、るメモリとの間で入出力を行い、
前記第 1加工手段は、前記パラメータとして、前記第 1生成手段に含まれるキヤッシ ュメモリにおけるデータ読み書き単位のサイズ以下のサイズを特定する情報を用いて 前記加工処理を行う
ことを特徴とする請求項 3に記載の改竄検出システム。
[8] 前記第 1生成手段は、前記認証情報として前記認証用加工データのハッシュ値を 昇 JL|し、
前記第 2生成手段は、前記比較情報として前記比較用加工データのハッシュ値を 算出する
ことを特徴とする請求項 3に記載の改竄検出システム。
[9] 前記第 1生成手段及び第 2生成手段は、前記ハッシュ値の算出に SHA1演算を用 いる
ことを特徴とする請求項 8記載の改竄検出システム。
[10] 前記第 1加工手段及び第 2加工手段は、前記プログラムが、ロード時に再配置され るリロケーションコードを含むか否かを判定し、リロケーションコードを含む場合に、前 記プログラムから前記リロケーションコードを除去し、前記リロケーションコードが除か れたプログラムを加工処理する
ことを特徴とする請求項 3に記載の改竄検出システム。
[11] 前記第 1加工手段及び第 2加工手段は、前記プログラムが、ロード時に再配置され るリロケーションコードを含むか否かを判定し、リロケーションコードを含む場合に、含 まれるリロケーションコードを所定のリロケーションされないコードに置換し、前記リロケ ーシヨンコードが置換がされたプログラムを加工処理する
ことを特徴とする請求項 3に記載の改竄検出システム。
[12] 前記第 1加工手段は、前記パラメータとして乱数を生成し、
前記第 2加工手段は、前記乱数を保持しており、
前記第 1加工手段及び前記第 2加工手段は、前記加工処理において、前記プログ ラムに前記乱数を付した上で前記加工処理する
ことを特徴とする請求項 3に記載の改竄検出システム。
[13] 前記第 1生成手段は、乱数を生成し、前記認証情報として、前記乱数を鍵とするハ ッシュ関数を用いて前記認証用加工データのハッシュ値を算出し、
前記第 2生成手段は、前記乱数を保持しており、前記比較情報として、前記乱数を 鍵とする前記ハッシュ関数を用いて前記比較用加工データのハッシュ値を算出する ことを特徴とする請求項 3に記載の改竄検出システム。
[14] 前記パラメータは、データのサイズを示し、前記第 1加工手段は、更に、複数のパラ メータそれぞれに依存する加工処理を行って、サイズの異なる複数の認証用加工デ ータを生成し、
前記第 1生成手段は、前記複数の認証用加工データそれぞれに、前記要約処理 を行って複数の認証情報を生成し、
前記改竄検出システムは、更に、
前記複数の認証情報のうち少なくとも 1つを選出し、
前記第 2加工手段に、前記加工処理によって、前記プログラムを前記選出した認証 情報のサイズに縮めさせ、
前記検出手段に、前記選出された認証情報と、前記第 2生成手段により生成された 前記比較情報とを用いて前記実行対象のプログラムの改竄検出を行わせる制御手 段
を備えることを特徴とする請求項 3に記載の改竄検出システム。
[15] 前記制御手段は、実行中のプロセスへの資源割り当てに係るプロセス状況算出値 を算出し、前記プロセス状況算出値に基づき少なくとも 1の認証情報を選出する ことを特徴とする請求項 14に記載の改竄検出システム。
[16] 前記制御手段は、プロセス状況算出値と認証情報との対応表を記憶しており、算 出したプロセス状況算出値に対応する認証情報を前記対応表から選出する ことを特徴とする請求項 15に記載の改竄検出システム。
[17] 前記第 1加工手段及び第 2加工手段は、前記加工処理として、前記プログラムの一 部分をランダムに特定し抽出して前記認証用加工データ及び前記比較用加工デー タを生成する
ことを特徴とする請求項 3に記載の改竄検出システム。
[18] 前記第 1加工手段は、抽出開始位置と抽出終了位置を示す情報をランダムに生成 し、
前記第 1加工手段及び前記第 2加工手段は、前記プログラムについて、前記抽出 開始位置から前記抽出終了位置までを抽出する
ことを特徴とする請求項 17に記載の改竄検出システム。
[19] 前記第 1加工手段は、データの抽出開始位置と抽出サイズを示す情報をランダム に生成し、
前記第 1加工手段及び前記第 2加工手段は、前記プログラムについて、前記抽出 開始位置から前記抽出サイズ分のデータを抽出する
ことを特徴とする請求項 17に記載の改竄検出システム。
[20] 前記加工処理と前記要約処理とは、相異なる一方向性関数を用いる処理である ことを特徴とする請求項 3に記載の改竄検出システム。
[21] プログラムの改竄検出を行う改竄検出方法であって、
実行対象のプログラムを前記プログラムよりも短くなるよう加工処理をして認証用加 ェデータを生成する第 1加工ステップと、
前記認証用加工データに、前記加工処理より計算量の多い要約処理を行い、認証 情報を生成する第 1生成ステップと、
生成された前記認証情報を保持する保持ステップと、
前記実行対象のプログラムに対して、前記加工処理を行って比較用加工データを 生成する第 2加工ステップと、 前記比較用加工データに対して、前記要約処理を行って、比較情報を生成する第 2生成ステップと、
前記保持して!/、る認証情報と前記第 2生成手段が生成した比較情報とを用いて、 前記実行プログラムの改竄検出を行う検出ステップと
を含むことを特徴とする改竄検出方法。
[22] プログラムの改竄検出を行う改竄検出システムに用いられる改竄検出プログラムで あって、
実行対象のプログラムを前記プログラムよりも短くなるよう加工処理をして認証用加 ェデータを生成する第 1加工ステップと、
前記認証用加工データに、前記加工処理より計算量の多い要約処理を行い、認証 情報を生成する第 1生成ステップと、
生成された前記認証情報を保持する保持ステップと、
前記実行対象のプログラムに対して、前記加工処理を行って比較用加工データを 生成する第 2加工ステップと、
前記比較用加工データに対して、前記要約処理を行って、比較情報を生成する第 2生成ステップと、
前記保持して!/、る認証情報と前記第 2生成手段が生成した比較情報とを用いて、 前記実行プログラムの改竄検出を行う検出ステップと
をコンピュータに実行させることを特徴とする改竄検出プログラム。
[23] コンピュータ読み取り可能な記録媒体であって、
実行対象のプログラムを前記プログラムよりも短くなるよう加工処理をして認証用加 ェデータを生成する第 1加工ステップと、
前記認証用加工データに、前記加工処理より計算量の多い要約処理を行い、認証 情報を生成する第 1生成ステップと、
生成された前記認証情報を保持する保持ステップと、
前記実行対象のプログラムに対して、前記加工処理を行って比較用加工データを 生成する第 2加工ステップと、
前記比較用加工データに対して、前記要約処理を行って、比較情報を生成する第 2生成ステップと、
前記保持して!/、る認証情報と前記第 2生成手段が生成した比較情報とを用いて、 前記実行プログラムの改竄検出を行う検出ステップと
をコンピュータに実行させる改竄検出プログラムを記録していることを特徴とする記 録媒体。
[24] プログラムの改竄検出を行う集積回路であって、
実行対象のプログラムを前記プログラムよりも短くなるよう加工処理をして認証用加 ェデータを生成する第 1加工手段と、
前記認証用加工データに、前記加工処理より計算量の多い要約処理を行い、認証 情報を生成する第 1生成手段と、
生成された前記認証情報を保持する保持手段と、
前記実行対象のプログラムに対して、前記加工処理を行って比較用加工データを 生成する第 2加工手段と、
前記比較用加工データに対して、前記要約処理を行って、比較情報を生成する第 2生成手段と、
前記保持手段の保持する認証情報と前記第 2生成手段が生成した比較情報とを用 V、て、前記実行プログラムの改竄検出を行う検出手段と
を備えることを特徴とする集積回路。
[25] 前記集積回路は、 Trusted Platform Moduleであることを特徴とする請求項 24 に記載の集積回路。
[26] プログラムの改竄検出に用いる認証情報を生成する認証情報生成装置であって、 実行対象のプログラムを前記プログラムよりも短くなるよう加工処理をして認証用加 ェデータを生成する加工手段と、
前記認証用加工データに前記加工処理よりも計算量の多い要約処理を行い、認証 情報を生成する生成手段と、
生成された前記認証情報を前記改竄検出装置に提供する提供手段と
を備えることを特徴とする認証情報生成装置。
[27] プログラムの改竄検出を行う改竄検出装置であって、 実行対象のプログラムを前記プログラムよりも短くなるよう加工処理をし、さらに、前 記加工処理よりも計算量の多い要約処理を行うことで生成された認証情報を保持す る保持手段と、
前記実行対象のプログラムに対して、前記加工処理を行って比較用加工データを 生成する加工手段と、
前記比較用加工データに対して、前記要約処理を行って、比較情報を生成する生 成手段と、
前記保持手段の保持する認証情報と前記生成手段が生成した比較情報とを用い て、前記実行プログラムの改竄検出を行う検出手段と
を備えることを特徴とする改竄検出装置。
PCT/JP2007/071638 2006-11-09 2007-11-07 Système de détection de falsification, procédé de détection de falsification, programme de détection de falsification, support d'enregistrement, circuit intégré, dispositif de génération d'informations d'authentification et dispositif de détection de fals WO2008056700A1 (fr)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP07831369A EP2053533A4 (en) 2006-11-09 2007-11-07 FAKE DETECTION SYSTEM, FAKE DETECTION METHOD, FAKE IDENTIFICATION PROGRAM, RECORDING MEDIUM, INTEGRATED CIRCUIT, DEVICE FOR GENERATING AUTHENTICATION INFORMATION AND FAKE DETECTION DEVICE
US12/377,040 US8453206B2 (en) 2006-11-09 2007-11-07 Detecting unauthorized tampering of a program
JP2008543103A JP5049288B2 (ja) 2006-11-09 2007-11-07 改竄検出システム、改竄検出方法、改竄検出プログラム、記録媒体、集積回路、認証情報生成装置及び改竄検出装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2006-304197 2006-11-09
JP2006304197 2006-11-09

Publications (1)

Publication Number Publication Date
WO2008056700A1 true WO2008056700A1 (fr) 2008-05-15

Family

ID=39364514

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2007/071638 WO2008056700A1 (fr) 2006-11-09 2007-11-07 Système de détection de falsification, procédé de détection de falsification, programme de détection de falsification, support d'enregistrement, circuit intégré, dispositif de génération d'informations d'authentification et dispositif de détection de fals

Country Status (4)

Country Link
US (1) US8453206B2 (ja)
EP (1) EP2053533A4 (ja)
JP (1) JP5049288B2 (ja)
WO (1) WO2008056700A1 (ja)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011087871A (ja) * 2009-10-26 2011-05-06 Kyoraku Sangyo Kk 電子機器、遊技機、主制御基板、周辺基板、認証方法および認証プログラム
JP2011087870A (ja) * 2009-10-26 2011-05-06 Kyoraku Sangyo Kk 電子機器、遊技機、主制御基板、周辺基板、認証方法および認証プログラム
JP2011087873A (ja) * 2009-10-26 2011-05-06 Kyoraku Sangyo Kk 電子機器、遊技機、主制御基板、周辺基板、認証方法および認証プログラム
JP2011087872A (ja) * 2009-10-26 2011-05-06 Kyoraku Sangyo Kk 電子機器、遊技機、主制御基板、周辺基板、認証方法および認証プログラム
JP2018081349A (ja) * 2016-11-14 2018-05-24 日本電信電話株式会社 改竄検知システム、検証ecu、被検証ecu、プログラム
US10073973B2 (en) 2013-09-25 2018-09-11 Mitsubishi Electric Corporation Process testing apparatus, computer-readable medium, and process testing method
JP2019012498A (ja) * 2017-07-03 2019-01-24 株式会社デンソー 電子制御装置
JP2019067065A (ja) * 2017-09-29 2019-04-25 富士通株式会社 検知プログラム、装置、及び方法
US10796003B2 (en) 2016-11-17 2020-10-06 Toshiba Memory Corporation Divided integrity verification using memory segment protection
WO2021015204A1 (ja) * 2019-07-23 2021-01-28 株式会社ソニー・インタラクティブエンタテインメント アクセス制御装置、アクセス制御方法及びプログラム
JP7380251B2 (ja) 2020-01-27 2023-11-15 株式会社Ihi 仮想マシンにおけるデータ改ざんの監視方法及び装置

Families Citing this family (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7644282B2 (en) 1998-05-28 2010-01-05 Verance Corporation Pre-processed information embedding system
US6737957B1 (en) 2000-02-16 2004-05-18 Verance Corporation Remote control signaling using audio watermarks
WO2004036352A2 (en) 2002-10-15 2004-04-29 Verance Corporation Media monitoring, management and information system
US20060239501A1 (en) 2005-04-26 2006-10-26 Verance Corporation Security enhancements of digital watermarks for multi-media content
US8020004B2 (en) 2005-07-01 2011-09-13 Verance Corporation Forensic marking using a common customization function
US8781967B2 (en) 2005-07-07 2014-07-15 Verance Corporation Watermarking in an encrypted domain
WO2009123221A1 (ja) 2008-03-31 2009-10-08 全薬工業株式会社 細胞保護作用を有するピリミジン誘導体およびその用途
EP2365438A1 (de) * 2010-03-09 2011-09-14 Siemens Aktiengesellschaft Verfahren zum Betrieb eines Automatisierungssystems
US8838978B2 (en) * 2010-09-16 2014-09-16 Verance Corporation Content access management using extracted watermark information
KR101665562B1 (ko) * 2010-11-05 2016-10-25 삼성전자주식회사 검출 회로, 그 검출 방법, 및 이를 포함하는 메모리 시스템
KR101960036B1 (ko) * 2011-05-23 2019-07-26 삼성전자주식회사 비휘발성 저장 장치의 인증 방법 및 장치
US8923548B2 (en) 2011-11-03 2014-12-30 Verance Corporation Extraction of embedded watermarks from a host content using a plurality of tentative watermarks
US8615104B2 (en) 2011-11-03 2013-12-24 Verance Corporation Watermark extraction based on tentative watermarks
US8682026B2 (en) 2011-11-03 2014-03-25 Verance Corporation Efficient extraction of embedded watermarks in the presence of host content distortions
US9262631B2 (en) * 2011-11-15 2016-02-16 Mstar Semiconductor, Inc. Embedded device and control method thereof
US8745403B2 (en) 2011-11-23 2014-06-03 Verance Corporation Enhanced content management based on watermark extraction records
US9547753B2 (en) 2011-12-13 2017-01-17 Verance Corporation Coordinated watermarking
US9323902B2 (en) 2011-12-13 2016-04-26 Verance Corporation Conditional access using embedded watermarks
US8910307B2 (en) * 2012-05-10 2014-12-09 Qualcomm Incorporated Hardware enforced output security settings
US9571606B2 (en) 2012-08-31 2017-02-14 Verance Corporation Social media viewing system
US8869222B2 (en) 2012-09-13 2014-10-21 Verance Corporation Second screen content
US20140075469A1 (en) 2012-09-13 2014-03-13 Verance Corporation Content distribution including advertisements
US9262794B2 (en) 2013-03-14 2016-02-16 Verance Corporation Transactional video marking system
US9251549B2 (en) 2013-07-23 2016-02-02 Verance Corporation Watermark extractor enhancements based on payload ranking
US9208334B2 (en) 2013-10-25 2015-12-08 Verance Corporation Content management using multiple abstraction layers
US9596521B2 (en) 2014-03-13 2017-03-14 Verance Corporation Interactive content acquisition using embedded codes
KR102509594B1 (ko) * 2016-06-28 2023-03-14 삼성전자주식회사 어플리케이션 코드의 위변조 여부 탐지 방법 및 이를 지원하는 전자 장치
US10824737B1 (en) * 2017-02-22 2020-11-03 Assa Abloy Ab Protecting data from brute force attack
JP6949416B2 (ja) * 2017-07-13 2021-10-13 株式会社デンソー 電子制御装置、プログラム改ざん検知方法
JP7105640B2 (ja) * 2018-07-10 2022-07-25 キヤノン株式会社 画像処理装置、その制御方法、及びプログラム
JP7374780B2 (ja) * 2020-01-20 2023-11-07 キヤノン株式会社 情報処理装置および情報処理装置の制御方法
JP7249968B2 (ja) 2020-03-09 2023-03-31 株式会社東芝 情報処理装置およびストレージ
JP2022142263A (ja) * 2021-03-16 2022-09-30 富士フイルムビジネスイノベーション株式会社 情報処理装置及び情報処理プログラム

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63229541A (ja) * 1987-03-04 1988-09-26 シーメンス、アクチエンゲルシヤフト データ交換システム
JPH10254840A (ja) * 1997-03-13 1998-09-25 Fujitsu Ltd モーバイルコード実行システム
US6026293A (en) 1996-09-05 2000-02-15 Ericsson Inc. System for preventing electronic memory tampering
US6178509B1 (en) 1996-06-13 2001-01-23 Intel Corporation Tamper resistant methods and apparatus
JP2002140126A (ja) * 2000-10-31 2002-05-17 Toshiba Corp プログラム配布システム、暗号化プログラム配布装置、プログラム不具合情報収集システム、及びプログラム配布方法
JP2003533788A (ja) * 2000-05-09 2003-11-11 ブル・セー・ペー・8 可搬オブジェクトを認証する方法、当該の可搬オブジェクト、およびその方法を実施するための装置
JP2004184516A (ja) * 2002-11-29 2004-07-02 Canon Inc デジタルデータ送信端末
WO2004114045A2 (en) * 2003-06-25 2004-12-29 Nokia Inc. Two-phase hash value matching technique in message protection systems
WO2005029223A2 (en) * 2003-09-18 2005-03-31 Apple Computer, Inc. Method and apparatus for incremental code signing
JP2006053787A (ja) * 2004-08-12 2006-02-23 Ntt Docomo Inc プログラム実行装置及びプログラム実行方法
JP2006154997A (ja) * 2004-11-26 2006-06-15 Ntt Data Corp アプリケーション設定装置、icチップ及びプログラム
JP2006202270A (ja) * 2005-01-18 2006-08-03 Microsoft Corp 部分イメージハッシュを使用して実行可能ファイルのインテグリティーを検証するためのシステムおよび方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5475826A (en) * 1993-11-19 1995-12-12 Fischer; Addison M. Method for protecting a volatile file using a single hash
US7287166B1 (en) * 1999-09-03 2007-10-23 Purdue Research Foundation Guards for application in software tamperproofing
EP1395890A2 (en) * 2001-05-09 2004-03-10 ECD Systems, Inc. Systems and methods for the prevention of unauthorized use and manipulation of digital content
US6880149B2 (en) * 2002-04-01 2005-04-12 Pace Anti-Piracy Method for runtime code integrity validation using code block checksums
JP2003302900A (ja) 2002-04-12 2003-10-24 Toyo Commun Equip Co Ltd メッセージダイジェスト生成装置及び方法
WO2004057461A2 (en) * 2002-12-19 2004-07-08 Ntt Communications Corporation Data division method and device using exclusive or calculation
JP4497450B2 (ja) 2003-12-10 2010-07-07 独立行政法人科学技術振興機構 プログラム認証システム
JP2006039206A (ja) 2004-07-27 2006-02-09 Canon Inc 暗号化装置および復号化装置
US7734926B2 (en) * 2004-08-27 2010-06-08 Microsoft Corporation System and method for applying security to memory reads and writes
US7757275B2 (en) 2005-06-15 2010-07-13 Microsoft Corporation One time password integration with Kerberos
JP4718340B2 (ja) * 2006-02-02 2011-07-06 富士通株式会社 ストレージシステム、制御方法及びプログラム

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63229541A (ja) * 1987-03-04 1988-09-26 シーメンス、アクチエンゲルシヤフト データ交換システム
US6178509B1 (en) 1996-06-13 2001-01-23 Intel Corporation Tamper resistant methods and apparatus
US6026293A (en) 1996-09-05 2000-02-15 Ericsson Inc. System for preventing electronic memory tampering
JPH10254840A (ja) * 1997-03-13 1998-09-25 Fujitsu Ltd モーバイルコード実行システム
JP2003533788A (ja) * 2000-05-09 2003-11-11 ブル・セー・ペー・8 可搬オブジェクトを認証する方法、当該の可搬オブジェクト、およびその方法を実施するための装置
JP2002140126A (ja) * 2000-10-31 2002-05-17 Toshiba Corp プログラム配布システム、暗号化プログラム配布装置、プログラム不具合情報収集システム、及びプログラム配布方法
JP2004184516A (ja) * 2002-11-29 2004-07-02 Canon Inc デジタルデータ送信端末
WO2004114045A2 (en) * 2003-06-25 2004-12-29 Nokia Inc. Two-phase hash value matching technique in message protection systems
WO2005029223A2 (en) * 2003-09-18 2005-03-31 Apple Computer, Inc. Method and apparatus for incremental code signing
JP2006053787A (ja) * 2004-08-12 2006-02-23 Ntt Docomo Inc プログラム実行装置及びプログラム実行方法
JP2006154997A (ja) * 2004-11-26 2006-06-15 Ntt Data Corp アプリケーション設定装置、icチップ及びプログラム
JP2006202270A (ja) * 2005-01-18 2006-08-03 Microsoft Corp 部分イメージハッシュを使用して実行可能ファイルのインテグリティーを検証するためのシステムおよび方法

Non-Patent Citations (1)

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

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011087870A (ja) * 2009-10-26 2011-05-06 Kyoraku Sangyo Kk 電子機器、遊技機、主制御基板、周辺基板、認証方法および認証プログラム
JP2011087873A (ja) * 2009-10-26 2011-05-06 Kyoraku Sangyo Kk 電子機器、遊技機、主制御基板、周辺基板、認証方法および認証プログラム
JP2011087872A (ja) * 2009-10-26 2011-05-06 Kyoraku Sangyo Kk 電子機器、遊技機、主制御基板、周辺基板、認証方法および認証プログラム
JP2011087871A (ja) * 2009-10-26 2011-05-06 Kyoraku Sangyo Kk 電子機器、遊技機、主制御基板、周辺基板、認証方法および認証プログラム
US10073973B2 (en) 2013-09-25 2018-09-11 Mitsubishi Electric Corporation Process testing apparatus, computer-readable medium, and process testing method
JP2018081349A (ja) * 2016-11-14 2018-05-24 日本電信電話株式会社 改竄検知システム、検証ecu、被検証ecu、プログラム
US10796003B2 (en) 2016-11-17 2020-10-06 Toshiba Memory Corporation Divided integrity verification using memory segment protection
JP2019012498A (ja) * 2017-07-03 2019-01-24 株式会社デンソー 電子制御装置
JP2019067065A (ja) * 2017-09-29 2019-04-25 富士通株式会社 検知プログラム、装置、及び方法
WO2021015204A1 (ja) * 2019-07-23 2021-01-28 株式会社ソニー・インタラクティブエンタテインメント アクセス制御装置、アクセス制御方法及びプログラム
JPWO2021015204A1 (ja) * 2019-07-23 2021-01-28
JP7178500B2 (ja) 2019-07-23 2022-11-25 株式会社ソニー・インタラクティブエンタテインメント アクセス制御装置、アクセス制御方法及びプログラム
JP7380251B2 (ja) 2020-01-27 2023-11-15 株式会社Ihi 仮想マシンにおけるデータ改ざんの監視方法及び装置

Also Published As

Publication number Publication date
EP2053533A1 (en) 2009-04-29
JPWO2008056700A1 (ja) 2010-02-25
US20100162352A1 (en) 2010-06-24
EP2053533A4 (en) 2011-03-23
US8453206B2 (en) 2013-05-28
JP5049288B2 (ja) 2012-10-17

Similar Documents

Publication Publication Date Title
WO2008056700A1 (fr) Système de détection de falsification, procédé de détection de falsification, programme de détection de falsification, support d'enregistrement, circuit intégré, dispositif de génération d'informations d'authentification et dispositif de détection de fals
US8006078B2 (en) Central processing unit having branch instruction verification unit for secure program execution
US10032030B2 (en) Trusted kernel starting method and apparatus
KR101397637B1 (ko) 다중 사용자 감응 코드 및 데이터를 보호하는 아키텍처를 포함하는 방법 및 장치
US20080162949A1 (en) Program Conversion Device and Program Execution Device
US9158924B2 (en) Information processing apparatus and information processing method
US8966272B2 (en) Method for author verification and software authorization
US20080320263A1 (en) Method, system, and apparatus for encrypting, integrity, and anti-replay protecting data in non-volatile memory in a fault tolerant manner
CN105531713A (zh) 从单个数据缓冲器生成多个安全散列
US20070061897A1 (en) Hardware driver integrity check of memory card controller firmware
US20130081144A1 (en) Storage device and writing device
JP2011170847A (ja) ソフトウェアのインテグリティを実行中に確かめる方法及び装置、並びにこのようなソフトウェアを生成する装置
EP3662404A1 (en) Counter integrity tree for memory security
US20080244261A1 (en) Separation of logical trusted platform modules within a single physical trusted platform module
US11874925B2 (en) Data processing method for coping with ransomware, program for executing the method, and computer-readable recording medium storing the program
CN101901316B (zh) 基于Bloom Filter的数据完整性保护方法
US8311212B2 (en) Method of processing data protected against attacks by generating errors and associated device
US8423787B2 (en) Apparatus and method of measuring integrity
US11347858B2 (en) System and method to inhibit firmware downgrade
CN117272286A (zh) 基于tee的进程动态完整性度量方法及系统
CN106650342B (zh) 一种Jar包加固方法及系统
KR20080092813A (ko) 분기 명령 검증부를 구비한 중앙 처리 장치
Jakobsson et al. Assured detection of malware with applications to mobile platforms
US9213864B2 (en) Data processing apparatus and validity verification method
CN101281576A (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: 07831369

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2008543103

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 12377040

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2007831369

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE