WO2006129356A1 - 情報処理装置、および、その誤演算検出方法 - Google Patents

情報処理装置、および、その誤演算検出方法 Download PDF

Info

Publication number
WO2006129356A1
WO2006129356A1 PCT/JP2005/010053 JP2005010053W WO2006129356A1 WO 2006129356 A1 WO2006129356 A1 WO 2006129356A1 JP 2005010053 W JP2005010053 W JP 2005010053W WO 2006129356 A1 WO2006129356 A1 WO 2006129356A1
Authority
WO
WIPO (PCT)
Prior art keywords
bit register
bit
value
register
information processing
Prior art date
Application number
PCT/JP2005/010053
Other languages
English (en)
French (fr)
Inventor
Takashi Watanabe
Toshio Okochi
Takashi Endo
Syunsuke Oota
Original Assignee
Renesas Technology Corp.
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 Renesas Technology Corp. filed Critical Renesas Technology Corp.
Priority to JP2007518829A priority Critical patent/JP4382128B2/ja
Priority to PCT/JP2005/010053 priority patent/WO2006129356A1/ja
Publication of WO2006129356A1 publication Critical patent/WO2006129356A1/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/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/75Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by inhibiting the analysis of circuitry or operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1666Error detection or correction of the data by redundancy in hardware where the redundant component is memory or memory area
    • G06F11/167Error detection by comparing the memory output
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/72Indexing scheme relating to groups G06F7/72 - G06F7/729
    • G06F2207/7219Countermeasures against side channel or fault attacks

Definitions

  • the present invention relates to an information processing apparatus and a method for detecting an erroneous operation thereof, and more particularly to a smart card or GSM mobile phone that has tamper resistance and requires high security for performing personal authentication and billing processing.
  • the present invention relates to an information processing apparatus suitable for use in an IC chip and the like, and an erroneous calculation detection method thereof.
  • a microcomputer operates with a clock signal and power input from the outside. If the clock signal and power are supplied as expected, they can be designed to perform the calculations correctly. However, if the clock signal or power is unstable, the expected computation cannot always be completed. Further, there is known an attack method that intentionally creates such an unstable state to generate an erroneous operation, and attempts to decrypt the cipher by the method shown in Non-Patent Document 1 below. For this reason, it can be said that it is desirable that the module that performs cryptographic processing should be configured so that no miscalculation occurs or can be detected even if it occurs.
  • Patent Document 1 Japanese Patent Laid-Open No. 2001-306346
  • a processor installed in a microcomputer includes a plurality of registers and an arithmetic and logical operation unit (hereinafter referred to as “ALU”) for performing an operation between the registers.
  • Registers are temporary storage devices that can be accessed by software in units of 8 bits, 16 bits, 32 bits, and are generally named R0, R1, ..., R31. Named and differentiated.
  • ALU performs an operation between specified registers and outputs the operation result to the specified register.
  • the machine language indicates what kind of operation is performed. Machine language is often defined to have little redundancy for the purpose of mounting area efficiency. For this reason, it is difficult for humans to understand directly.
  • step 1 Read R0 and set as input 1 of the adder.
  • step 2 Read Rl and set as input 2 of the adder.
  • step 3 Operate the adder and obtain the addition result of input 1 and input 2.
  • step 4. Write the addition result to R1.
  • register R1 discards the previous value and holds the new result.
  • it may be configured so that the input value is not discarded by specifying another output destination register name!
  • Patent Document 1 As a conventional method for solving this problem, Patent Document 1 is cited.
  • FIG. 2 is a block diagram showing a configuration of the arithmetic processing apparatus according to Patent Document 1. As shown in FIG.
  • the conventional 2n-bit arithmetic unit 30 is configured to be separated into two n-bit arithmetic units 31 and 32 and can be used independently. If it is desired to detect an erroneous operation, after making a copy of the lower n bits 10 and 12 of the 2n bit register using the selection signals 150 and 151, the two n bit arithmetic units 31 and 32 perform the operation.
  • the comparator 41 confirms that the contents of the registers 14 and 15 storing the results match, thereby checking for the presence of an erroneous operation and notifying the result through the output line 400 to the outside.
  • the value input to the two n-bit arithmetic units is not affected by the attack in the period until the register power is transferred to the arithmetic unit and until the copy of the lower n bits is made. Since an error occurs, an erroneous calculation cannot be detected. Also, due to the high speed of processing speed of the arithmetic unit, it is not possible to cope with the case where it is not always possible to add a circuit for dividing a 2n-bit arithmetic unit into two n-bit arithmetic units. I was strong.
  • the present invention has been made to solve the above-described problems, and its purpose is to detect errors that occur before the value of the operation source is transferred to the stored calculator.
  • it is an object of the present invention to provide an information processing apparatus capable of improving tamper resistance as compared with the prior art and increasing the calculation processing speed, and an erroneous calculation detection method thereof.
  • Means for solving the problem [0013]
  • the basic arithmetic processing of the information processing apparatus of the present invention is as follows.
  • a special mode or a special instruction is provided in the processor for executing the above.
  • the processor has an erroneous operation detection mode (or an operation instruction capable of detecting an erroneous operation).
  • an operation detection mode or an operation instruction capable of detecting an erroneous operation.
  • the size of the internal register is limited, and the remainder of the register is used simultaneously to multiplex the operations.
  • the erroneous operation is detected by comparing the operation results.
  • a special bit is prepared and set as an error operation detection mode operation specification bit (or an operation instruction that can detect an error operation is issued). Can be switched.
  • the error calculation detection mode may be used particularly when security is required, for example, when a personal authentication process or billing process logic is run with a smart card or the like.
  • the invention's effect may be used particularly when security is required, for example, when a personal authentication process or billing process logic is run with a smart card or the like.
  • the present invention it is possible to detect an error that occurs between the time when the value of the operation source is stored and the time when the value is transferred to the register force calculator, and the tamper resistance is improved over the prior art. It is possible to provide an information processing apparatus capable of increasing the calculation processing speed and a method for detecting an erroneous calculation thereof.
  • FIG. 1 is a general configuration diagram of the information processing apparatus according to the first embodiment of the present invention.
  • the information processing apparatus of the present embodiment includes a first n-bit register 10, a second n-bit register 11, a third n-bit register 12, a fourth n-bit register 13, and a first n-bit register 13.
  • the inspection result output line 400 is provided. As shown in FIG. 1, these are the first data line 102, the second data line 103, the third data line 104, the fourth data line 105, the fifth data line 106, and the sixth data line. Connected with 107.
  • the first n-bit register 10 and the second n-bit register 11 are configured so that the two can be treated as a first 2n-bit register.
  • the third n-bit register 12 and the fourth n-bit register 13 are configured so that they can be treated as the second 2n-bit register, and the fifth n-bit register 14 and the sixth n-bit register 14
  • the n-bit register 15 is configured to be treated as a third 2n-bit register.
  • the first copy controller 20 can copy the contents of the second n-bit register 11 to the first n-bit register 10, and the second copy controller 21 receives the fourth n-bit register 13. Can be copied to a third n-bit register 12.
  • the arithmetic unit 30 receives the first 2n-bit register and the second 2n-bit register as inputs, performs a predetermined operation, and then updates the contents of the third 2n-bit register and the status register 16.
  • the inspection device 40 receives the third 2n-bit register and the status register 16 as inputs, verifies the correctness of the processing of the arithmetic unit 30, and outputs the inspection result to the output signal line 400.
  • the information processing apparatus has two types of modes, a normal operation mode and an error calculation detection mode, and operates by switching between these modes as appropriate.
  • the normal operation mode is an original operation mode in which a 2n-bit operation is performed by an arithmetic unit and a result is output.
  • the error detection mode is a mode for improving security and detecting an error operation, and is a mode in which the operator performs n-bit operation and outputs the result.
  • the operation of the information processing apparatus of the present embodiment in the normal operation mode is as follows.
  • the first n-bit register 10 and the second n-bit register 11 are treated as the first 2n-bit register, and the third n-bit register 12 and the fourth n-bit register 13 are the second n-bit register. It is handled as a 2n-bit register.
  • These two 2n-bit registers are processed in a 2n-bit arithmetic unit 30 and the operation result is stored in a third 2n-bit register consisting of a fifth n-bit register 14 and a sixth n-bit register 15.
  • the state such as the carry of the operation value is stored in the state register 16.
  • This operation is understood to be exactly the same as a general information processing device having a 2n-bit arithmetic unit and a 2n-bit register.
  • the information processing apparatus reduces the power consumption by stopping the operations of the first copy controller 20, the second copy controller 21, and the inspection apparatus 40, or uses these circuits. It can be configured so that it can be continuously operated so that there is no change in the operating characteristics such as power consumption when it is used and when it is not used.
  • the contents of the second n-bit register 11 are copied to the first n-bit register 10 by the first copy controller 20, and the contents of the fourth n-bit register 13 are copied by the second copy controller 21. Copy to third n-bit register 12.
  • the first n-bit register 10 and the second n-bit register 11 are regarded as the first 2n-bit register
  • the third n-bit register 12 and the fourth n-bit register 13 are regarded as the second 2n-bit register
  • the 2n-bit processing unit 30 processes the 2n-bit processing result in the fifth n-bit register 14 and the sixth n-bit register 15 which are regarded as the third 2n-bit register.
  • status register 16 is updated.
  • the values of the third 2n-bit register 12 and the status register 16 are input to the inspection device 40.
  • the input value is corrected and then compared to determine whether or not the processing in the arithmetic unit 30 is normally performed, and the result is output through the output signal line 400. Communicate outside.
  • Fig. 3 shows the register structure of a general 32-bit CPU.
  • FIG. 4 is a diagram showing restrictions on register usage of the CPU in the error calculation detection mode of the information processing apparatus of the present invention.
  • ER0 to ER6 are general-purpose registers and are usually used freely by the user as Ex (16bit), RxH, RxL (each 8bit), or Rx (16bit) or ERx (32bit). it can .
  • the error calculation detection mode is newly set as the operation mode of the CPU, and in this mode, as shown in FIG. 4, the user is restricted from using at least some of the Ex registers. To do.
  • operations using the Rx register are multiplexed in parallel, and the result is checked when the result of the computing unit is output, thereby detecting an erroneous operation.
  • FIG. 5 and FIG. 6 are diagrams showing a connection relationship among the copy controller, the register, the arithmetic unit, and the inspection device.
  • the information processing apparatus shown in FIG. 5 includes a first data bus 110 and a second data bus 111, and each register and arithmetic unit are connected to these data buses.
  • the first n-bit register 10 and the second n-bit register 11 can also be read as the first 2n-bit register, and the value of the read first 2n-bit register is the first data
  • the data is input to the arithmetic unit 30 through the bus 110 and the first data line 102 or the second data line 103.
  • the arithmetic unit performs an operation for obtaining one result from two inputs, such as addition and multiplication, the third n-bit register 12 and the fourth n-bit register 13 are used.
  • the value of the second 2n-bit register is read out to the first data bus 110 and further input to the arithmetic unit 30 through the first data line 102 or the second data line 103.
  • the operation result is sent to the second data bus 111 through the third data line 104 and stored in the third 2n-bit register including the fifth n-bit register 14 and the sixth n-bit register 15.
  • the value of the status register 16 that stores the status of the operation is read out during the operation and is rewritten according to the result of the operation.
  • the third 2n-bit register storing the operation result is transferred to the inspection apparatus 40 through the fourth data line 105 and the fifth data line 106, respectively, as two n-bit registers. Sent.
  • the contents of the status register 16 are also sent to the inspection device 40 through the sixth data line 107.
  • the inspection device 40 uses these input values to inspect whether or not the processing performed by the arithmetic unit 30 is correctly performed, and transmits the result to the outside through the output signal line 400.
  • an example is shown in which the fifth n-bit register and the sixth n-bit register are read independently using the second data line 105 and the fifth data line 106.
  • the values of the two registers do not necessarily need to be read separately, but can be read as a 2n-bit register and sent to the inspection device 40.
  • FIG. 6 differs from the example shown in FIG. 5 in the connection location of the copy controller.
  • FIG. 6 particularly shows a copy controller unit that is different from the information processing apparatus shown in FIG.
  • the first copy controller 20 first receives data when writing data to the first n-bit register 10 and / or the second n-bit register 11, and both.
  • the same value is output to the data lines 200 and 201.
  • a value is written through the second data bus 111 when data is transferred from another register or memory, or when the result of an operation by an arithmetic unit is stored. In this configuration, the value is copied. Since the controller 20 writes values to the first n-bit register 10 and the second n-bit register 11 at the same time, the switching from the normal state to the erroneous operation inspection state should be performed more quickly than the information processing device configured in FIG. Can do.
  • a controller 60 for controlling the operations of the copy controllers 20 and 21 and the inspection apparatus 40 may be provided.
  • FIG. 7 is a block diagram of an information processing apparatus including a controller 60 for controlling the operations of the copy controllers 20 and 21 and the inspection apparatus 40.
  • the information processing apparatus having the configuration shown in FIG. 7 receives instructions from the input signal line 600 to the controller 60 and controls the start and stop of the copy controllers 20 and 21 and the inspection apparatus 40. In this way, by configuring the test function so that it can be switched between start and stop, if erroneous operation detection is required, the size of the register that can be used is limited, but erroneous operation detection is possible. In the case where this is unnecessary, an information processing apparatus that can use a normal register size can be configured without increasing the register layout area.
  • the information processing apparatus In the error detection mode, the information processing apparatus according to the present embodiment restricts user access to the n-bit registers 11 and 13 in the error detection mode, so that the user physically registers 2n bits. Control so that only n bits exist. Therefore, it is possible to provide a more reliable information processing apparatus that is not detected as an operation error when a user mistakenly rewrites a register.
  • the information processing apparatus having a general arithmetic unit is described.
  • the arithmetic unit is specifically described as an adder, and a specific example of addition is described. Indication It is a thing.
  • FIG. 8 is a configuration diagram of an information processing apparatus according to the second embodiment of the present invention.
  • FIG. 9 is a diagram showing a specific example of numerical values when detecting an erroneous operation in addition.
  • the information processing apparatus shown in FIG. 8 includes a mechanism that detects an erroneous operation of the adder.
  • the value of the second n-bit register 11 is copied to the first n-bit register 10 by the first copy controller 20, and the fourth n-bit register is copied by the second copy controller 21. Copy the value of 13 to the third n-bit register 12.
  • the first n-bit register 10 and the second n-bit register 11 are combined to form the first 2n-bit register, and the third n-bit register 12 and the fourth n-bit register 13 are combined to form the second n-bit register 13.
  • the 2n-bit register is used, the 2n-bit adder 35 is used to add the first 2n-bit register and the second 2n-bit register, and the result is stored in the third 2n-bit register.
  • the third 2n-bit register can also be handled as a fifth n-bit register 14 and a sixth n-bit register 15. Further, the state of operation is stored in the state register 16.
  • the inspection device 40 includes a subtracter 45 having the fifth n-bit register 14 and the status register 16 as inputs, and a comparison for comparing the output of the subtractor and the value of the sixth n-bit register 15. The comparison result is transmitted through the output signal line 400.
  • the values used in the adder are the second, fourth, and sixth n-bit register sides, which are lower values of the 2n-bit value, and the first, third, and fifth n-bit register sides.
  • a carry flag indicating that an overflow has occurred is generally set in the status register. Therefore, if the status register power also reads the value of the carry flag, and if the result of subtracting the upper n bits of the 2n bits, which is the addition result, and the lower n bits are checked for coincidence, an erroneous operation has occurred. It is possible to determine whether or not there is power.
  • the value of the first 2n-bit register is 0xc362 c362, and the second 2n-bit register. It shows the addition when the register value is 0xal8c al8c.
  • FIG. 10 and FIG. 11 are configuration diagrams of the information processing apparatus according to the third embodiment of the present invention.
  • FIG. 12 is a diagram showing a specific example of numerical values when detecting an erroneous operation in multiplication.
  • the information processing apparatus shown in FIG. 10 includes a mechanism for detecting an erroneous operation of the multiplier.
  • the information processing apparatus according to the present embodiment includes a first sign inversion device 22 in the first copy controller 20, and a value obtained by sign-inversion of the value in the second n-bit register 11 is used as the first n-bit register 10.
  • the second copy controller 21 copies the value of the fourth n-bit register 13 to the third n-bit register 12.
  • the first n-bit register and the second n-bit register together can be regarded as the first 2n-bit register, and the third n-bit register and the fourth n-bit register together are the second 2n bits. It can be regarded as a register.
  • the multiplier 36 multiplies the two 2n-bit inputs by giving a 4n-bit output, and stores the result in the third 2n-bit register 17 and the fourth 2n-bit register 18.
  • the value of the third 2n-bit register 17 and the value of the fourth 2n-bit register 18 are added by the adder 47, the value of the second 2n-bit register is inspected, and the result is output to the output signal line. Communicate through 400.
  • a general 32-bit CPU has a multiply instruction that takes two 16-bit values as input values and outputs a 32-bit result. Therefore, if processing is performed as described above, it is possible to perform an 8-bit X 8-bit operation with an erroneous operation checking mechanism. The correctness of this calculation is confirmed as follows. Consider the case where k and m are 8-bit values and k x m is calculated. Then, a, b, c and d are 8 bits each and a multiplier that can calculate a
  • b means a 16-bit value in which the upper 8 bits are a and the lower 8 bits are b.
  • m is added to the upper 16 bits. Therefore, in the information processing apparatus of the present embodiment, by multiplying the upper 16 bits and the lower 16 bits, and confirming that it matches the 16-bit value c
  • the inspection device has a subtractor, and the value of the second 2n-bit register is subtracted from the upper 2n bits of the multiplication result, and the sum of the result and the lower 2n-bit value of the multiplication result is zero.
  • a specific example shown in FIG. 12 is a case where the value of the second 8-bit register is 0x7f and the value of the fourth register is 0x56.
  • the value of the second 8-bit register is sign-inverted and stored in the first 8-bit register, resulting in 0x81. Copy the value of the fourth 8-bit register to the third 8-bit register, resulting in 0x56.
  • 0x81 x 0x56 + Ox 56 (23 ⁇ 4 + 1) is entered in the upper 16 bits
  • Ox 2aaa is entered in the lower 16 bits as the value of 0x7f X 0x56. Therefore, if 0x56 (2 + 1) is left after these, it means that there is no error calculation and it is operating normally.
  • FIG. 13 is a diagram showing the physical structure of the flip-flop.
  • FIG. 14 shows a mounting arrangement example of the flip-flop integrated circuit.
  • a flip-flop having a physical structure as shown in FIG. 13 is used to store bit information of a register of the information processing apparatus of the present invention.
  • 2n flip-flops are used to hold the value of the 2 n-bit register, and n bits out of 2n are arranged so as to be covered by the remaining n bits.
  • FIG. 1 is a general configuration diagram of an information processing apparatus according to a first embodiment of the present invention.
  • FIG. 2 is a block diagram showing a configuration of an arithmetic processing device according to Patent Document 1.
  • FIG. 3 is a diagram showing a register configuration of a general 32-bit CPU.
  • FIG. 4 is a diagram showing restrictions on CPU register use in the error detection mode of the information processing apparatus of the present invention.
  • FIG. 5 This is a diagram showing the connection relationship among the copy controller, register, arithmetic unit, and inspection device (part 1).
  • FIG. 6 This is a diagram showing the connection relationship among the copy controller, register, arithmetic unit, and inspection device (part 2).
  • FIG. 7 is a block diagram of an information processing apparatus including a controller 60 for controlling the operations of the copy controllers 20 and 21 and the inspection apparatus 40.
  • FIG. 8 is a configuration diagram of an information processing apparatus according to a second embodiment of the present invention.
  • FIG. 9 is a diagram showing a specific example of numerical values when detecting an erroneous operation in addition.
  • FIG. 10 is a configuration diagram of an information processing apparatus according to a third embodiment of the present invention (part 1).
  • FIG. 11 is a configuration diagram of an information processing apparatus according to the third embodiment of the present invention (No. 2).
  • FIG. 12 is a diagram showing a specific example of numerical values when detecting an erroneous operation in multiplication.
  • FIG. 13 is a diagram illustrating a physical structure of a flip-flop.
  • FIG. 14 shows an example of mounting arrangement of flip-flops in an integrated circuit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Detection And Correction Of Errors (AREA)
  • Hardware Redundancy (AREA)

Abstract

 スマートカードやGSMモバイルホンで用いられるICチップの耐タンパー性を高めるための装置および方法に関する。特に、ICチップの内部で実行される演算において、ユーザーが使用可能なレジスタサイズをリアルタイムに制限することによって、物理メモリを追加せずとも動的に誤演算を検出できるように演算系に変化させる。本発明の情報処理装置は、演算に用いる汎用レジスタのサイズを制限することによってその値のコピーを複数もち、かつ、演算器によってこれら複数の値を同時に処理し、結果の値を検査することによって、外乱による演算器の誤演算の検出をおこなう。

Description

明 細 書
情報処理装置、および、その誤演算検出方法
技術分野
[0001] 本発明は、情報処理装置、および、その誤演算検出方法に係り、特に、個人認証、 課金処理をおこなうため耐タンパ性を有し、高 、セキュリティを要するスマートカード や GSMモパイルホンなどで用いられる ICチップなどに用いて好適な情報処理装置 、および、その誤演算検出方法に関する。
背景技術
[0002] マイコンは、外部から入力するクロック信号と電力によって動作する。クロック信号や 電力が期待通りに供給されて 、れば、演算が正しくおこなわれるように設計されて ヽ る。しかし、クロック信号や電力が不安定である場合、必ずしも期待された演算を完了 できるとは限らない。また、そのような不安定な状態を故意に作り出して誤演算を発生 させ、以下の非特許文献 1に示されるような手法で暗号を解読しょうとする攻撃方法 が知られている。そのため、暗号処理をおこなうモジュールにおいては、特に、誤演 算が発生しな 、か、発生しても検出することができるように構成することが望まし 、と いえる。
[0003] 特許文献 1:特開 2001— 306346号公報
特干文献 1: On the Importance of Checking cryptographic Protocols for Faults, Proc. of EUROCRYPT'97, Lecture Notes in Computer Science, Advances in Crypt ology, pp.37- 51, 1997.
発明の開示
発明が解決しょうとする課題
[0004] 以下、一般的なマイコンのプロセッサの構成と誤演算の関係について説明する。
[0005] マイコンが搭載するプロセッサは、複数のレジスタと、レジスタ間の演算をおこなうた めの算術および論理演算ユニット(Arithmetic Logical Unit,以下「ALU」と記述する )を備えている。レジスタは、ソフトウェアから、 8ビット、 16ビット、 32ビットといった単位 でアクセスすることのできる一時記憶装置であり、一般的には、 R0, R1, · · ·, R31のよ うに命名され区別されている。 ALUは、指定されたレジスタ間の演算をおこない、指 定されたレジスタに演算結果を出力する。どのような演算をおこなうかは、機械語によ つて指示される。機械語は、実装面積の効率ィ匕を目的として、冗長性をほとんど持た ないように定義されていることが多い。そのため、人間が直接理解することは困難で ある。そこで、演算は、アセンブラなどの人間が理解できる言語で記述され、コンパィ ラによってプロセッサが解釈することのできる機械語へと翻訳される。例えば、「add R 0, Rl」は、アセンブラによって記述した演算の例である。この記述は、レジスタ R0と R1 の値を加算し、その結果を R1に保存することを意味している。プロセッサが内部でお こなう演算の手順をより詳細に記述すると、以下のようになる。
step 1. R0を読み出し、加算器の入力 1として設定する。
step 2. Rlを読み出し、加算器の入力 2として設定する。
step 3.加算器を動作させ、入力 1と入力 2の加算結果を得る。
step 4.加算結果を、 R1に書き込む。
[0006] よって、本記述による加算命令を実行した後、レジスタ R1は以前の値を破棄し、新 しい結果を保持することになる。なお、入力値となる 2つのレジスタに加えて、出力先 の別のレジスタ名を指示することで、入力値を破棄しな!、ように構成する場合もある。
[0007] ここで、誤演算が発生する場合のメカニズムは以下のように考えられる。レジスタ R0,
R1に記憶されている値をそれぞれ rO, rlと記述する。たとえば、上記 step 1において R0の読み出し処理が誤れば、値 rOではなぐ誤りを含む値 rO' が読み出される。この 場合、 step 3で加算器が処理する値は、本来意図した rOと rlではなぐ rO' と rlである 。よって、 step 4で Rlに書き込まれる値は、 r0+rlではなく rO' +rlとなる。 step 2におい て Rlの読み出し処理が誤った場合も同様の結果となる。また、 R0、 Rlの読み出し処 理が正しくおこなわれたとしても、 step 3での加算処理が誤れば、 step 4で Rlに書き 込まれる値は、本来期待された値とは異なるものになる。さら〖こは、 step 4で Rlへの書 き込み処理が誤れば、 R1が保持する値はやはり、本来期待された値とは異なるもの になる。
[0008] 誤演算の有無を検査する基本的な方法として、複数回同一の演算を繰り返し、そ の結果が一致しているかどうかを検査する方法が挙げられる。これら複数回の演算は 、ひとつのプロセッサを複数回動作させる方法でおこなう場合や、複数のプロセッサ を用いて並列におこなう場合が考えられる。ただし、ひとつのプロセッサによって 2回 以上の繰り返し演算をおこなう方法では処理時間が少なくとも 2倍に増加し、複数の プロセッサを用いる方法では、回路が複雑ィ匕し実装面積が少なくとも 2倍に増加する 。そのため、スマートカードのような、パーソナルコンピューターなどと比較して、計算 能力が必ずしも高くなぐ実装可能面積が制限される小型のデバイスには適用が困 難である。
[0009] この課題を解決するための従来の方法として、上記特許文献 1が挙げられる。
[0010] 以下、図 2を用いて特許文献 1に係る演算処理装置の処理の概要について説明す る。
図 2は、特許文献 1に係る演算処理装置の構成を示すブロック図である。
[0011] この演算処理装置では、まず、従来ある 2nビットの演算器 30を、 2つの nビット演算 器 31と 32に分離して独立に使用することができるように構成している。誤演算を検出 したい場合は、選択信号 150と 151によって、 2nビットレジスタのうち、下位 nビット 10 および 12のコピーを作成した後に、前記の 2つの nビット演算器 31と 32でそれぞれ 演算する。結果を格納するレジスタ 14と 15の内容が一致することを比較器 41で確認 することで、誤演算の有無を検査し、その結果を出力線 400を通じて外部に通知す る。しかし、本方式では、レジスタ力も演算器に転送するまでの間で、下位 nビットのコ ピーを作成するまでの期間において攻撃を受ければ、二つの nビット演算器に入力さ れる値がいずれも誤ることになるため、誤演算を検出することができない。また、演算 器の処理速度の高速ィ匕のために、必ずしも 2nビットの演算器を二つの nビット演算器 に分割して使用するための回路を追加できない場合には、対応することができな力つ た。
[0012] 本発明は、上記問題点を解決するためになされたもので、その目的は、演算元の 値が格納されているレジスタ力 演算器に転送するまでの間に発生するエラー検出 を可能にして、従来技術よりも耐タンパ性を向上させ、演算処理速度の高速化をおこ なうことのできる情報処理装置、および、その誤演算検出方法を提供することにある。 課題を解決するための手段 [0013] 本発明の情報処理装置の基本的な演算処理を以下に示されるようになる。
[0014] セキュリティを確保することが必要な場合のみに、誤演算検出のために以下の処理 をおこない、セキュリティが不要な場合には、通常の演算処理をおこなう。
(1) ユーザーが使用可能なレジスタサイズを制限し、レジスタの使用をできなくした 部分のデータのコピーを作成する。
(2) 元のレジスタサイズで演算をおこなう。
(3) コピー元の部分の演算結果と、コピー先の演算結果を比較する。
(4) 比較結果の検査をおこない、演算の誤りを検出する。
[0015] また、以上を実行するための、プロセッサに特別なモードないしは特別な命令を備 える。
[0016] プロセッサは、誤演算検出モード (または、誤演算検出可能演算命令)を備え、この モードで動作するときには、内部レジスタのサイズを制限し、レジスタの残りを同時に 利用して演算を多重化し、演算結果を比較することによって誤演算を検出する。誤演 算検出モードと通常モードは、特別のビットを用意して、誤演算検出モード動作指定 ビットとして設定する (または、誤演算検出可能演算命令を発行する)ことで、ユーザ 一が任意のタイミングで切り替えることができる。
[0017] 誤演算検出モードは、例えば、スマートカードなどで、本人の認証処理や課金処理 のロジックを走らせるときなど、特に、セキュリティを要するときに使用すればよい。 発明の効果
[0018] 本発明によれば、演算元の値が格納されて 、るレジスタ力 演算器に転送するまで の間に発生するエラー検出を可能にして、従来技術よりも耐タンパ性を向上させ、演 算処理速度の高速化をおこなうことのできる情報処理装置、および、その誤演算検 出方法を提供することができる。
発明を実施するための最良の形態
[0019] 以下、本発明に係る各実施形態を、図 1、図 3ないし図 14を用いて説明する。
[0020] 〔実施形態 1〕
以下、本発明に係る第一の実施形態を、図 1、図 3ないし図 7を用いて説明する。
[0021] 先ず、図 1を用いて本発明に係る第一の実施形態の情報処理装置の一般的な構 成を説明する。
図 1は、本発明に係る第一の実施形態の情報処理装置の一般的な構成図である。
[0022] 本実施形態の情報処理装置は、第一の nビットレジスタ 10と、第二の nビットレジス タ 11と、第三の nビットレジスタ 12と、第四の nビットレジスタ 13と、第五の nビットレジ スタ 14と、第六の nビットレジスタ 15と、 2nビットの演算器 30と、状態レジスタ 16と、第 一のコピーコントローラ 20と、第二のコピーコントローラ 21と、検査装置 40と、検査結 果出力線 400を備えている。これらは、図 1に示すように、第一のデータ線 102、第二 のデータ線 103、第三のデータ線 104、第四のデータ線 105、第五のデータ線 106 、第六のデータ線 107で接続されている。
[0023] 第一の nビットレジスタ 10と第二の nビットレジスタ 11は、二つを合わせて第一の 2n ビットレジスタとみなして取り扱うことが可能であるように構成されており、同様に、第 三の nビットレジスタ 12と第四の nビットレジスタ 13は、第二の 2nビットレジスタとみな して取り扱うことが可能であるように構成されており、第五の nビットレジスタ 14と第六 の nビットレジスタ 15は、第三の 2nビットレジスタとみなして取り扱うことが可能である ように構成される。
[0024] 第一のコピーコントローラ 20は、第二の nビットレジスタ 11の内容を第一の nビットレ ジスタ 10にコピーすることができ、第二のコピーコントローラ 21は、第四の nビットレジ スタ 13の内容を第三の nビットレジスタ 12にコピーすることができる。演算器 30は、第 一の 2nビットレジスタと第二の 2nビットレジスタを入力として受け取り、所定の演算を 行った後に、第三の 2nビットレジスタと状態レジスタ 16の内容を更新する。検査装置 40は、第三の 2nビットレジスタと状態レジスタ 16を入力とし、演算器 30の処理の正し さを検証し、検査結果を出力信号線 400に出力する。
[0025] 本情報処理装置は、通常動作モードと誤演算検出モードに二種類のモードを備え ており、これらを適宜切り替えて動作する。
[0026] 通常動作モードは、本来の動作モードであり演算器で 2nビットの演算をおこない結 果を出力するモードである。誤演算検出モードは、セキュリティを高め、誤演算を検 出するためのモードであり、演算器では nビットの演算をおこない結果を出力するモ ードである。 [0027] 通常動作モード時における本実施形態の情報処理装置の動作は、以下のようにな る。
[0028] 第一の nビットレジスタ 10と第二の nビットレジスタ 11は、第一の 2nビットレジスタとし て取り扱われ、第三の nビットレジスタ 12と第四の nビットレジスタ 13は、第二の 2nビッ トレジスタとして取り扱われる。これら二つの 2nビットレジスタは、 2nビットの演算器 30 において処理され、演算結果は第五の nビットレジスタ 14と第六の nビットレジスタ 15 力 なる第三の 2nビットレジスタに格納される。
[0029] また、演算値の繰り上がり等の状態は、状態レジスタ 16に格納される。本動作は、 2 nビットの演算器と 2nビットのレジスタを備える一般の情報処理装置と全く同様のもの と理解される。このとき、本実施形態の情報処理装置は、第一のコピーコントローラ 20 と第二のコピーコントローラ 21と検査装置 40の動作を停止させることで消費電力を低 減させたり、これらの回路を使用している場合と使用していない場合での消費電力等 の動作特性に変化がな 、ように常に動作させ続けたりすることができるように構成す ることちでさる。
[0030] 誤演算検出モードにおける本実施形態の情報処理装置の動作は、以下のようにな る。
[0031] 第一のコピーコントローラ 20によって、第二の nビットレジスタ 11の内容を第一の n ビットレジスタ 10にコピーし、第二のコピーコントローラ 21によって、第四の nビットレ ジスタ 13の内容を第三の nビットレジスタ 12にコピーする。その際、第一の nビットの レジスタ 10や第三の nビットレジスタ 12に格納されていた値は、上書きされる。第一の nビットレジスタ 10と第二の nビットレジスタ 11は、第一の 2nビットレジスタ、第三の nビ ットレジスタ 12と第四の nビットレジスタ 13は第二の 2nビットレジスタとみなされ、 2nビ ットの演算器 30で処理され、 2nビットの処理結果は、第三の 2nビットレジスタとみなさ れている第五の nビットレジスタ 14と第六の nビットレジスタ 15に格納される。同時に、 状態レジスタ 16も更新される。
[0032] 次に、第三の 2nビットレジスタ 12と状態レジスタ 16の値は、検査装置 40に入力さ れる。検査装置 40では、入力された値を補正した後に比較することで、演算器 30で の処理が正常におこなわれた力否かを判定し、その結果を出力信号線 400を通じて 外部に伝達する。
[0033] この誤演算検出モードにおいては、第二の nビットレジスタ 11と第四の nビットレジス タが書き込まれるあとで以下の各フェーズでのエラーを検出することができる。
(1)コピーコントローラ 20により、第二の nビットレジスタ 11の値を第一の nビットレジス タ 10にコピーするとき、あるいは、コピーコントローラ 21により、第四の nビットレジスタ 13の値を第一の nビットレジスタ 12にコピーするとき。
(2)第一のデータ線 102、第二のデータ線 103によるデータ転送時。
(3)演算器 30に第一のデータ線 102、第二のデータ線 103からのデータが書き込ま れる時。
(4)演算器 30での演算時。
(5)演算器 30の状態レジスタへの状態転送時、書き込み時。
(6)演算器 30から第三の 2nビットレジスタへのデータ線 104による転送時。
(7)データ線 104からのデータが第三の 2nビットレジスタに書き込まれるとき。
(8)データ線 105、 106による検査装置への転送時。
[0034] 次に、図 3ないし図 7を用いて本発明の第一の実施形態に係る情報処理装置の詳 細な構成について説明する。
図 3は、一般的な 32ビット CPUのレジスタ構成を示す図である。
図 4は、本発明の情報処理装置の誤演算検出モードでの CPUのレジスタ使用制限 を示す図である。
[0035] ER0から ER6は汎用レジスタであり、通常は、 Ex (16bit), RxH, RxL (各 8bit)として、 あるいは、 Rx (16bit)や ERx (32bit)として、ユーザーが自由に使用することができる 。本発明の情報処理装置では、 CPUの動作モードとして、新たに誤演算検出モード を設定し、このモードでは、図 4に示すように、ユーザーが少なくとも一部の Exレジス タを使用できないように制限する。さらに、同レジスタを利用して Rxレジスタを用いた 演算を並列多重化し、演算器の結果出力時に結果を検査することで、誤演算を検出 する。
[0036] 図 5および図 6は、コピーコントローラ、レジスタ、演算器、検査装置の接続関係に ついて示した図である。 図 5に示される情報処理装置は、第一のデータバス 110と第二のデータバス 111を そなえ、これらのデータバスに、各レジスタや演算器が接続されている。第一の nビッ トレジスタ 10と第二の nビットレジスタ 11は、第一の 2nビットレジスタとしても読み出す ことが可能であり、読み出された第一の 2nビットレジスタの値は、第一のデータバス 1 10および、第一のデータ線 102ないしは第二のデータ線 103を通じて演算器 30に 入力される。演算器が加法、乗法などの二つの入力から一つの結果を得る演算をお こなう場合であれば、第三の nビットレジスタ 12と第四の nビットレジスタ 13が用いられ る。
[0037] 第二の 2nビットレジスタの値力 第一のデータバス 110に読み出され、さらに第一 のデータ線 102な 、しは第二のデータ線 103を通じて演算器 30に入力される。演算 結果は、第三のデータ線 104を通じて第二のデータバス 111に送られ、第五の nビッ トレジスタ 14および第六の nビットレジスタ 15からなる第三の 2nビットレジスタに格納 される。また、演算の状態を格納する状態レジスタ 16の値は、演算に際して読み出さ れ、演算の結果に応じて書き換えられることになる。
[0038] 次に、演算結果を格納している第三の 2nビットレジスタは、二つの nビットレジスタと して、それぞれ第四のデータ線 105と第五のデータ線 106を通じて、検査装置 40に 送られる。同時に、状態レジスタ 16の内容も第六のデータ線 107を通じて、検査装置 40に送られる。検査装置 40では、これらの入力値を用いて、演算器 30による処理が 正しくおこなわれた力否かを検査し、その結果を出力信号線 400を通じて外部に伝 達する。ここでは、第四のデータ線 105と第五のデータ線 106の二つのデータ線を 用いて、第五の nビットレジスタと第六の nビットレジスタをそれぞれ独立に読み出す 例を示したが、これら二つのレジスタの値は、必ずしも分離して読み出す必要は無く 、 2nビットレジスタとして読み出し、検査装置 40に送ることも可能である。
[0039] 一方、図 6に示される情報処理装置の構成は、図 5に示された例とは、コピーコント ローラの接続場所が異なる。なお、図 6では、図 5に示された情報処理装置との相違 部分であるコピーコントローラ部を特に示している。この情報処理装置の構成では、 第一のコピーコントローラ 20は、第一の nビットレジスタ 10、もしくは、第二の nビットレ ジスタ 11、または、その両方にデータを書き込む際に、まずデータを受け取り、第二 の nビットレジスタ 11に第一の nビットレジスタ 10と同じ値を書き込む必要がある場合 には、データ線 200と 201に同じ値を出力する。
[0040] 第二のデータバス 111を通じて、値が書き込まれるのは、他のレジスタないしはメモ リからのデータ転送の場合や、演算器による演算の結果を格納する場合であり、この 構成では、コピーコントローラ 20が同時に第一の nビットレジスタ 10と第二の nビットレ ジスタ 11に値を書き込むため、通常状態から誤演算検査状態への切替を図 5の構成 の情報処理装置よりも速やかにおこなうことができる。
[0041] また、図 7に示した構成のように、コピーコントローラ 20、 21や検査装置 40の動作を 制御するためのコントローラ 60を備えるようにしてもょ 、。
図 7は、コピーコントローラ 20、 21や検査装置 40の動作を制御するためのコント口 ーラ 60を備えた情報処理装置のブロック図である。
[0042] 図 7に示した構成の情報処理装置は、コントローラ 60への入力信号線 600からの 指示を受け、コピーコントローラ 20、 21や検査装置 40の起動および停止をコントロー ルする。このように、検査機能の起動と停止の切り替えが可能であるように構成するこ とによって、誤演算検出が必要である場合には、使用可能なレジスタのサイズが制限 されるものの、誤演算検出が不要である場合には、通常のレジスタサイズを用いるこ とができる情報処理装置を、レジスタの配置面積を増カロさせること無く構成することが できる。
[0043] 本実施形態の情報処理装置は、誤演算検出モードでは、コントローラ 60が nビット レジスタ 11や 13へのユーザーアクセスを制限することにより、ユーザーからは、物理 的には 2nビット存在するレジスタのうち nビットしか存在しないかのように見えるように 制御する。そのために、ユーザーが誤ってレジスタを書き換えることによって演算誤り として検出されることがなぐより信頼性の高い情報処理装置を提供することができる
[0044] 〔実施形態 2〕
以下、本発明に係る第二の実施形態を、図 8および図 9を用いて説明する。
[0045] 第一の実施形態では、一般的な演算器を有する構成の情報処理装置として記述し たが、本実施形態では、具体的に演算器が加算器として説明し、加算の具体例を示 したものである。
図 8は、本発明の第二の実施形態に係る情報処理装置の構成図である。 図 9は、加算における誤演算を検出する場合の数値の具体例を示した図である。
[0046] 図 8に示される情報処理装置は、加算器の誤演算を検出する機構を備えている。
本実施形態の情報処理装置は、第一のコピーコントローラ 20によって第二の nビット レジスタ 11の値を第一の nビットレジスタ 10にコピーし、第二のコピーコントローラ 21 によって第四の nビットレジスタ 13の値を第三の nビットレジスタ 12にコピーする。そし て、第一の nビットレジスタ 10と第二の nビットレジスタ 11を合わせて第一の 2nビットレ ジスタとし、第三の nビットレジスタ 12と第四の nビットレジスタ 13を合わせて第二の 2n ビットレジスタとし、 2nビットの加算器 35を用いて第一の 2nビットレジスタと第二の 2n ビットレジスタの加算をおこない、結果を第三の 2nビットレジスタに格納する。また、第 三の 2nビットレジスタは、第五の nビットレジスタ 14と第六の nビットレジスタ 15として 取り扱うことも可能である。さらに、演算の状態を状態レジスタ 16に格納する。検査装 置 40には、第五の nビットレジスタ 14と状態レジスタ 16を入力とする減算器 45と、前 記の減算器の出力と第六の nビットレジスタ 15の値を比較するための比較器 46を持 ち、比較結果を出力信号線 400を通じて伝達する。
[0047] ここで、加算器で用いる値は、第二、第四、第六の nビットレジスタ側を 2nビット値の 下位の値とし、第一、第三、第五の nビットレジスタ側を 2nビット値の上位の値として、 実施形態を示している。例えば、 n=16の場合を考えれば、加算結果にオーバーフロ 一が発生する場合、 OxFOOO F000 + 0x1000 1000 = c 0x0001 0000 (Oxは、 16進数、 c は、キャリー)となるので、結果値を保持するレジスタを単純に比較する方法ではエラ 一の検出をおこなうことができない。オーバーフローが発生した場合には、上位から 1 を減じて力も比較する処理が必要となる。演算中にオーバーフローが発生した場合、 一般にオーバーフローが発生したことを表すキャリーフラグが状態レジスタに設定さ れる。よって、状態レジスタ力もキャリーフラグの値を読み出して、加算結果である 2n ビットのうち上位 nビットの値力 減じた結果と、下位 nビットの値の一致検査をおこな えば、誤演算が発生した力否かの判定をおこなうことができる。
[0048] 図 9に示される具体例は、第一の 2nビットレジスタの値が 0xc362 c362、第二の 2nビ ットレジスタの値が 0xal8c al8cのときの加算を示したものてある。加算の結果は、 Oxc 362 c362 + 0xal8c al8c= c 0x64ed 64ecとなり、キャリーが発生する。したがって、上 位ビットの値から 1を引き、互いに等しくなる力否かを検証すればよい。等しくないとき には、どこかで誤演算がおこっていることになる。
[0049] 〔実施形態 3〕
以下、本発明に係る第三の実施形態を、図 10ないし図 12を用いて説明する。
[0050] 第二の実施形態では、具体的に演算器が加算器として説明し、加算の具体例を示 したが、本実施形態では、演算器が乗算器であり、乗算の具体例を示したものである 図 10および図 11は、本発明の第三の実施形態に係る情報処理装置の構成図であ る。
図 12は、乗算における誤演算を検出する場合の数値の具体例を示した図である。
[0051] 図 10に示される情報処理装置は、乗算器の誤演算を検出する機構を備えるもので ある。本実施形態の情報処理装置は、第一のコピーコントローラ 20に第一の符号反 転装置 22を備え、第二の nビットレジスタ 11の値を符号反転させた値を第一の nビッ トレジスタ 10に格納する。第二のコピーコントローラ 21は、第四の nビットレジスタ 13 の値を第三の nビットレジスタ 12にコピーする。第一の nビットレジスタと第二の nビット レジスタは合わせて第一の 2nビットレジスタとみなすことができ、第三の nビットレジス タと第四の nビットレジスタはあわせて第二の 2nビットレジスタとみなすことができる。
[0052] そして、乗算器 36によって、二つの 2nビット入力に対して 4nビット出力を与える乗 算をおこない、結果を第三の 2nビットレジスタ 17と第四の 2nビットレジスタ 18に格納 する。検査装置 40では、第三の 2nビットレジスタ 17の値と第四の 2nビットレジスタ 18 を加算器 47によって加算し、第二の 2nビットレジスタの値と一致検査をおこない、結 果を出力信号線 400を通じて伝達する。
[0053] 一般的な 32ビット CPUは、二つの 16ビットの値を入力値とし、 32ビットの結果を出 力する乗算命令を備えている。よって、上記のように処理すれば、誤演算検査機構を 備える 8ビット X 8ビットの演算をおこなうことができる。この計算の正しさは、次のよう に確認される。 k, mを各 8ビット値とし、 k X mを計算する場合を考える。このとき、 a, b, c, dを各 8ビットとし、 a|b X c|dを計算することができる乗算器を用いる。ここで、 a|bとは 、上位 8ビットが aであり下位 8ビットが bである 16ビット値を意味する。 a = -k, b = k, c = d = mとして、乗算 a|b X c|dを行うと、 32ビットの結果の上位 16ビットには- a X c下位 16ビットには a X cが入る。しかし、一般的な計算機には、符号専用のレジスタが必ず しも存在しないことに注意する必要がある。この場合、 _kを表現するために、 kと加算 することによって下位 8ビットがゼロとなり、キャリーが発生するような値である 8-kを 用いる(いわゆる二の補数表現)。ここで Ίまべき乗を衰す記号であり、 2 とは 2の 8乗 を表す。その結果、 -k + kを計算する際に、キャリーが発生することになる。キャリーの 効果は、
((2¾ - k) X 2¾ + k) X (m X 2^8 + m)
=m(2~24 + 2^16) - mk(2" 6 - 1〉
=(m X 2¾ + m - mk) X 2^16 + mk
より、上位 16ビットに m|mが加算される結果として現れる。よって、本実施例の情報処 理装置では、上位 16ビットと下位 16ビットの乗算をおこない、 m|mに相当する 16ビッ ト値 c|dに一致することを確認することで、誤演算を検出する。
なお、上記の式は、検査装置に、減算器を備え、乗算結果の上位 2nビットから第二 の 2nビットレジスタの値を減じ、その結果と乗算結果の下位 2nビットの値の和がゼロ となることを確認する方法でも、誤演算を検査することができることを意味しており、図 11に示されるように情報処理装置を構成してもよ ヽ。
[0054] 図 12に示される具体例は、第二の 8ビットレジスタの値が 0x7f、第四のレジスタの値 力 0x56の場合である。第二の 8ビットレジスタの値を第一の 8ビットレジスタに符号反 転させて格納し、 0x81となる。第四の 8ビットレジスタの値を第三の 8ビットレジスタにコ ピーして、 0x56となる。これらの値をかけると、上位 16ビットには、 0x81 X 0x56 + Ox 56(2¾ + 1)の値として、 0x2bacが入り、下位 16ビットには、 0x7f X 0x56の値として、 Ox 2aaaが入る。したがって、これらをたして、 0x56(2 + 1)が残ることになれば、誤演算 はなく正常に動作していることになる。
[0055] 〔実施形態 4〕
以下、本発明に係る第四の実施形態を、図 13および図 14を用いて説明する。 図 13は、フリップフロップの物理構造を表す図である。
図 14は、フリップフロップの集積回路での実装配置例を示している。
[0056] 例えば、本発明の情報処理装置のレジスタのビット情報を記憶するために、図 13に 示されるような物理構造を有するフリップフロップを用いる場合を想定する。ここで、 2 nビットレジスタの値を保持するために 2n個のフリップフロップを用い、 2n個のうち nビ ットを残る nビットで覆うような形で配置する。 2nビットレジスタを構成する二つの nビッ トレジスタを、図 14に示されるように物理的に垂直方向に重なるように配置することに よって、一方向力もの光等の入射によってレジスタの値が影響を受けるような場合で も、一方が他方を保護する形となり、入射成分が変化するため、同一の値に変化する ような動作を防止することができ、より高い誤動作耐性を持たせることができるようにな る。
図面の簡単な説明
[0057] [図 1]本発明に係る第一の実施形態の情報処理装置の一般的な構成図である。
[図 2]特許文献 1に係る演算処理装置の構成を示すブロック図である。
[図 3]—般的な 32ビット CPUのレジスタ構成を示す図である。
[図 4]本発明の情報処理装置の誤演算検出モードでの CPUのレジスタ使用制限を 示す図である。
[図 5]コピーコントローラ、レジスタ、演算器、検査装置の接続関係について示した図 である(その一)。
[図 6]コピーコントローラ、レジスタ、演算器、検査装置の接続関係について示した図 である(その二)。
[図 7]コピーコントローラ 20、 21や検査装置 40の動作を制御するためのコントローラ 6 0を備えた情報処理装置のブロック図である。
[図 8]本発明の第二の実施形態に係る情報処理装置の構成図である。
[図 9]加算における誤演算を検出する場合の数値の具体例を示した図である。
[図 10]本発明の第三の実施形態に係る情報処理装置の構成図である(その一)。
[図 11]本発明の第三の実施形態に係る情報処理装置の構成図である(その二)。
[図 12]乗算における誤演算を検出する場合の数値の具体例を示した図である。 [図 13]フリップフロップの物理構造を表す図である。
[図 14]フリップフロップの集積回路での実装配置例を示してレ、る 符号の説明
10、 11、 12、 13、 14、 15···ηビットレジスタ
16…状態レジスタ
17、 18··· 2ηビットレジスタ
20、 21···コピーコントローラ
22、 47···符号反転装置
30··· 2ηビット演算器
31、 32···ηビット演算器
40…検査装置
41、 46···比較器
60 · · ·誤演算検査機構制御装置

Claims

請求の範囲
[1] 第一の m (mは正の整数)ビットレジスタと第二の mビットレジスタとにより mビット演算 をおこなう情報処理装置において、
=ιピー:コントローラと、
演算器と、
検査装置とを有し、
前記コピーコントローラは、前記第一の nビットレジスタおよび前記第二の nビットレ ジスタの n (nは正の整数、 m>n)ビットの値を、各々のレジスタの残りの m—nビットの 所定の領域にコピーし、
前記演算器は、前記第一の mビットレジスタの値と前記第二の mビットレジスタの値 とを演算して、出力し、
前記検査装置は、前記演算器の出力により誤演算が発生したか否かを判定するこ とを特徴とする情報処理装置。
[2] mが偶数であって、 n= mZ2であることを特徴とする請求項 1記載の情報処理装 置。
[3] 前記演算器は、加算器であり、
前記検査装置は、減算器と比較器とからなり、
前記コピーコントローラは、前記第一の mビットレジスタおよび前記第二の mビットレ ジスタの nビットの値を、各々のレジスタの残りの nビットの領域にそれぞれ nビットの同 一の値をコピーし、
前記加算器により前記第一の mビットレジスタと前記第二の mビットレジスタの値とを 加算して、出力し、
前記加算器の加算結果において、桁あふれが生じたときには、前記加算器の出力 の mビット値のうち上位 nビットの値から 1を減じて、出力し、
前記比較器により前記減算器の出力と前記加算器の出力の下位 nビットの値を比 較することにより誤演算を検出することを特徴とする請求項 2記載の情報処理装置。
[4] 前記演算器は、乗算器であり、
前記検査装置は、加算器と比較器とからなり、 さらに、符号反転装置を備え、
前記符号反転装置は、前記第一の mビットレジスタの値のうち nビットの値を残りの n ビットの領域に符号反転してコピーし、
前記コピーコントローラは、前記第二の mビットレジスタの値のうち nビットの値を残り の nビットの領域にコピーし、
前記乗算器により前記第一の mビットレジスタと前記第二の mビットレジスタとを乗 算し、 2mビットの値を出力し、
前記加算器により前記乗算器の出力の 2mビットの値の上位 mビットの値と下位 mビ ットの値を加算して出力し、
前記比較器により前記加算器の出力と前記第二の mビットレジスタの値を比較する ことにより誤演算を検出することを特徴とする請求項 2記載の情報処理装置。
前記演算器は、乗算器であり、
前記検査装置は、加算器と比較器とからなり、
さらに、符号反転装置を備え、
前記符号反転装置は、前記第一の mビットレジスタの値のうち nビットの値を残りの n ビットの領域に符号反転してコピーし、
前記コピーコントローラは、前記第二の mビットレジスタの値のうち nビットの値を残り の nビットの領域にコピーし、
前記乗算器により前記第一の mビットレジスタと前記第二の mビットレジスタとを乗 算し、 2mビットの値を出力し、
前記加算器により前記乗算器の出力の 2mビットの値の上位 mビットの値と下位 mビ ットの値とを加算して出力し、
前記比較器により前記加算器の出力の上位 mビットの値と下位 mビットの値とを比 較することにより誤演算を検出することを特徴とする請求項 2記載の情報処理装置。 レジスタアクセスコントローラを備え、
前記レジスタアクセスコントローラは、 mビットレジスタを演算する第一のモードと第 二のモードとを切り替え、
前記第一のモードでは、 mビットうち所定の nビットをユーザ命令の演算対象とし、 前記第二のモードでは、 mビットうち所定の nビットをユーザ命令の演算対象とはし な!、ことを特徴とする請求項 1記載の情報処理装置。
[7] 前記誤演算が発生したと判定されたときには、リセット動作をおこなうことを特徴とす る請求項 1記載の情報処理装置。
[8] 前記コピーコントローラの消費電力を一定とすることを特徴とする請求項 1記載の情 報処理装置。
[9] コピー元となるレジスタのビットを保持する記憶素子がコピー先のレジスタのビットを 保持する記憶素子と垂直方向に重なるように配置することを特徴とする請求項 1記載 の情報処理装置。
[10] 2nビットのレジスタを二つの nビットのレジスタとして使用可能な情報処理装置の誤 演算検出方法において、
第一の 2nビットレジスタの下位を第一の nビットレジスタ、上位を第二の nビットレジ スタとし、
第二の 2nビットレジスタの下位を第三の nビットレジスタ、上位を第四の nビットレジ スタとして、
(1)第一の nビットレジスタの値を第二の nビットレジスタにコピーするステップ、
(2)第三の nビットレジスタの値を第四の nビットレジスタにコピーするステップ、
(3)前記第一の 2nビットレジスタと、前記第二の 2nビットレジスタを入力とする演算を おこな 、、結果を第三の 2nビットレジスタおよび状態レジスタに格納するステップ、
(4)前記第三の 2nビットレジスタの上位 nビットの値、下位 nビットの値と、前記状態レ ジスタとにより演算の正当性の検査をおこなうステップ
力 なることを特徴とする情報処理装置の誤演算検出方法。
[11] 前記第三の 2nビットレジスタの下位を第五の nビットレジスタ、上位を第六の nビット レジスタとし、
前記(3)のステップは、前記第一の 2nビットレジスタと、前記第二の 2nビットレジス タを加算し、結果を第三の 2nビットレジスタおよび状態レジスタに格納するステップで あって、
前記 (4)のステップは、前記第六の nビットレジスタ力 前記状態レジスタの値を減 算し、第五の nビットレジスタの値と比較するステップであることを特徴とする請求項 1 0記載の情報処理装置の誤演算検出方法。
[12] 2nビットのレジスタを二つの nビットのレジスタとして使用可能であり、 4nビットのレジ スタを二つの 2nビットのレジスタとして使用可能である情報処理装置の誤演算検出 方法において、
第一の 2nビットレジスタの下位を第一の nビットレジスタ、上位を第二の nビットレジ スタとし、
第二の 2nビットレジスタの下位を第三の nビットレジスタ、上位を第四の nビットレジ スタとし、
第一の 4nビットレジスタの下位を第三の 2nビットレジスタ、上位を第四の 2nビットレ ジスタとして、
(1)第一の nビットレジスタの値を符号反転して第二の nビットレジスタにコピーするス テツプ、
(2)第三の nビットレジスタの値を第四の nビットレジスタにコピーするステップ、
(3)前記第一の 2nビットレジスタの値と、前記第二の 2nビットレジスタの値を乗算し、 結果を第一の 4nビットレジスタに格納するステップ、
(4)前記第三の 2nビットレジスタの値と、第四の 2nビットレジスタの値を加算し、出力 するステップ
(5)前記 (4)のステップの加算結果と、前記第二の 2nビットレジスタの値を比較する ステップ
力 なることを特徴とする情報処理装置の誤演算検出方法。
[13] 2nビットのレジスタを二つの nビットのレジスタとして使用可能であり、 4nビットのレジ スタを二つの 2nビットのレジスタとして使用可能である情報処理装置の誤演算検出 方法において、
第一の 2nビットレジスタの下位を第一の nビットレジスタ、上位を第二の nビットレジ スタとし、
第二の 2nビットレジスタの下位を第三の nビットレジスタ、上位を第四の nビットレジ スタとし、 第一の 4nビットレジスタの下位を第三の 2nビットレジスタ、上位を第四の 2nビットレ ジスタとして、
(1)第一の nビットレジスタの値を符号反転して第二の nビットレジスタにコピーするス テツプ、
(2)第三の nビットレジスタの値を第四の nビットレジスタにコピーするステップ、
(3)前記第一の 2nビットレジスタの値と、前記第二の 2nビットレジスタの値を乗算し、 結果を第一の 4nビットレジスタに格納するステップ、
(4)前記第三の 2nビットレジスタの値と、第四の 2nビットレジスタの値を加算し、出力 するステップ
(5)前記(4)のステップの加算結果の上位 2nビットの値と、下位 2nビットの値を比較 するステップ
からなることを特徴とする情報処理装置の誤演算検出方法。
PCT/JP2005/010053 2005-06-01 2005-06-01 情報処理装置、および、その誤演算検出方法 WO2006129356A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2007518829A JP4382128B2 (ja) 2005-06-01 2005-06-01 情報処理装置、および、その誤演算検出方法
PCT/JP2005/010053 WO2006129356A1 (ja) 2005-06-01 2005-06-01 情報処理装置、および、その誤演算検出方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2005/010053 WO2006129356A1 (ja) 2005-06-01 2005-06-01 情報処理装置、および、その誤演算検出方法

Publications (1)

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

Family

ID=37481293

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2005/010053 WO2006129356A1 (ja) 2005-06-01 2005-06-01 情報処理装置、および、その誤演算検出方法

Country Status (2)

Country Link
JP (1) JP4382128B2 (ja)
WO (1) WO2006129356A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015022608A (ja) * 2013-07-22 2015-02-02 大日本印刷株式会社 携帯型記憶媒体
WO2019069042A1 (en) * 2017-10-05 2019-04-11 Arm Limited ERROR MANAGEMENT IN BUFFER

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0314134A (ja) * 1989-06-13 1991-01-22 Nec Corp 算術論理演算器
JPH0527997A (ja) * 1991-07-18 1993-02-05 Matsushita Electric Ind Co Ltd マイクロコンピユータ
JP2001306346A (ja) * 2000-04-19 2001-11-02 Matsushita Electric Ind Co Ltd 演算処理装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0314134A (ja) * 1989-06-13 1991-01-22 Nec Corp 算術論理演算器
JPH0527997A (ja) * 1991-07-18 1993-02-05 Matsushita Electric Ind Co Ltd マイクロコンピユータ
JP2001306346A (ja) * 2000-04-19 2001-11-02 Matsushita Electric Ind Co Ltd 演算処理装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015022608A (ja) * 2013-07-22 2015-02-02 大日本印刷株式会社 携帯型記憶媒体
WO2019069042A1 (en) * 2017-10-05 2019-04-11 Arm Limited ERROR MANAGEMENT IN BUFFER

Also Published As

Publication number Publication date
JP4382128B2 (ja) 2009-12-09
JPWO2006129356A1 (ja) 2008-12-25

Similar Documents

Publication Publication Date Title
CN106575215B (zh) 处理指令的系统、设备、方法、处理器、介质和电子设备
WO2014041596A1 (ja) 安全コントローラ
JP6289778B2 (ja) テストケース生成装置及びテストケース生成プログラム
TW201730770A (zh) 用於記憶體損毀偵測的硬體設備和方法
TWI706321B (zh) 安全模指數處理器、方法、系統、及指令
US20160180095A1 (en) Measured boot capability
US9110768B2 (en) Residue based error detection for integer and floating point execution units
KR20060103317A (ko) 프로세서 유닛의 적어도 두 개의 운영 모드 간의 절환을위한 방법 및 장치
TW201732589A (zh) 用於容錯及錯誤偵測之系統、方法和裝置
US10223117B2 (en) Execution flow protection in microcontrollers
US20130036294A1 (en) System and method for instruction sets with run-time consistency check
CN101689233B (zh) 安全敏感系统中的微处理器
JP2009516276A (ja) プロプラム制御型ユニットおよびその駆動方法
JP2581018B2 (ja) データ処理装置
WO2006129356A1 (ja) 情報処理装置、および、その誤演算検出方法
CN113342671A (zh) 对运算模块进行验证的方法、装置、电子设备和介质
JP4766285B2 (ja) 永久データハードウェアインテグリティ
US10859627B2 (en) In-field system testing
US20090024908A1 (en) Method for error registration and corresponding register
JP3897356B2 (ja) 演算処理装置及びその自己診断方法
US20120297250A1 (en) Creating randomly ordered fields while maintaining the temporal ordering based on the value of the fields
JP2012248022A (ja) 情報処理装置、故障検出装置、故障検出方法
EP4339781A1 (en) Processor and method of detecting soft error from processor
WO2023108600A1 (en) System, method and apparatus for reducing power consumption of error correction coding using compacted data blocks
JP2000040081A (ja) ベクトルデータ処理装置

Legal Events

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

Ref document number: 2007518829

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

WWW Wipo information: withdrawn in national office

Country of ref document: DE

122 Ep: pct application non-entry in european phase

Ref document number: 05745615

Country of ref document: EP

Kind code of ref document: A1