JP2005285133A - Information processing apparatus - Google Patents

Information processing apparatus Download PDF

Info

Publication number
JP2005285133A
JP2005285133A JP2005109697A JP2005109697A JP2005285133A JP 2005285133 A JP2005285133 A JP 2005285133A JP 2005109697 A JP2005109697 A JP 2005109697A JP 2005109697 A JP2005109697 A JP 2005109697A JP 2005285133 A JP2005285133 A JP 2005285133A
Authority
JP
Japan
Prior art keywords
processing
information
branch
value
processing apparatus
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2005109697A
Other languages
Japanese (ja)
Inventor
Takashi Watanabe
高志 渡邊
Takashi Endo
隆 遠藤
Masahiro Kaminaga
正博 神永
Kunihiko Nakada
邦彦 中田
Yuichiro Nariyoshi
雄一郎 成吉
Chiaki Tanimoto
千晶 谷本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Technology Corp
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 JP2005109697A priority Critical patent/JP2005285133A/en
Publication of JP2005285133A publication Critical patent/JP2005285133A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a malfunction detector appropriately continuing or stopping processing even if an information processing apparatus malfunctions. <P>SOLUTION: An information processing apparatus which receives branch destination information, performs conditional branching dependent upon the branch destination information and performs processing corresponding thereto on data. At such a time, in a conditional branching destination, processing corresponding to the conditional branching destination is performed on data J different from processing data I, and a result is outputted to perform a check later, so that it can be judged whether or not conditional branching is rightly performed. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は情報処理装置に関し、特に電磁波や放射線、電源の瞬断その他の物理手段により誤動作を起こし、その装置内部で使用されている情報を取得しようとする攻撃やその情報取得を目的としたその装置の解析に対抗する手段を持つ耐タンパー装置に関する。   The present invention relates to an information processing apparatus, and more particularly, an attack intended to acquire information used inside the apparatus by causing malfunction due to electromagnetic waves, radiation, instantaneous interruption of power supply, or other physical means, and its information acquisition. The present invention relates to a tamper resistant device having a means to counter the analysis of the device.

電子機器が普及している現代において、各種の機器が様々な周波数の電磁波を放射している。例えば、テレビの隣にスピーカを設置すると、テレビの映像に滲みが生じるなどの現象が起こる。また、車に搭載されるコンピュータに代表されるように、強度の大きい振動や不安定な電源といった環境においても誤動作のない、もしくは規定外動作から確実に復帰するための手段を備えた装置が必要とされている。このような現象について説明するために、「タンパーエビデント(tamper evident)」「タンパーレスポンス(tamper response)」「タンパーフリー(tamper free)(耐タンパー(tamper resistant)とも)」といった用語が用いられ、それぞれ、規定外動作検出、該検出後の応答性、該動作に対する耐性を意味する。   In the present day when electronic devices are widespread, various devices emit electromagnetic waves of various frequencies. For example, when a speaker is installed next to a television, a phenomenon such as blurring in the television image occurs. In addition, as represented by computers installed in cars, there is a need for a device that does not malfunction even in environments such as high-intensity vibrations and unstable power supplies, or that has means for reliably returning from non-standard operation. It is said that. To describe these phenomena, terms such as `` tamper evident '', `` tamper response '', `` tamper free '' (also tamper resistant) are used, Each of them means detection of an unspecified operation, responsiveness after the detection, and resistance to the operation.

一般の装置には、装置本来の目的を正常に果たすために、実際の運用環境におけるノイズなどの誤動作要因をあらかじめ想定して設定された動作マージンがある。タンパーエビデント性を持つ装置は、その装置があらかじめ想定した動作環境外の誤動作環境にさらされたかどうかの履歴を適当な手段で記録することができるため、装置の管理者は装置を常時監視する必要が無く、定期的に履歴を確認することで、誤動作防止のための適切な処置を施すことができる。さらにタンパーレスポンス性を持つ装置は、設計時に想定した以外の誤動作状況になったかどうかを独自に観測して必要な手段で警報などの応答を行うことができる。装置の管理者は、装置が警告を発した場合のみに確認作業を行えば良い。タンパーフリー性を持つ装置は、規定外の動作に陥らないように十分な配慮が行われているか、仮に規定外の動作に陥ったとしても自動的に復旧することができる。または、タンパーという言葉を悪意者からの攻撃と解釈するならば、悪意者の目的物を完全に保護する機構を備えた装置もタンパーフリー装置と呼ぶことができる。例えば、秘密の情報を保持する記憶装置を備える銀行端末などが不正に開封された場合には、その装置自身が自動的にその記憶装置の記憶内容を消去したり破壊したりすることで保護することができる。タンパーフリー性を持つ装置は、管理者が監視を行う必要が無い。   A general apparatus has an operation margin that is set in advance assuming malfunction factors such as noise in an actual operating environment in order to normally achieve the original purpose of the apparatus. Since a device having tamper evidence can record a history of whether or not the device has been exposed to a malfunction environment outside of the assumed operation environment by an appropriate means, the device manager constantly monitors the device. There is no need, and by checking the history periodically, appropriate measures for preventing malfunction can be taken. Furthermore, a device having a tamper response property can independently observe whether a malfunction has occurred other than that assumed at the time of design, and can perform a response such as an alarm using necessary means. The manager of the device only needs to perform the confirmation work when the device issues a warning. A tamper-free device can be automatically restored even if sufficient consideration is given so that it does not fall outside the specified range, or even if it falls outside the specified range. Alternatively, if the term tamper is interpreted as an attack from a Service-to-Self, a device having a mechanism for completely protecting the Service-to-Self object can also be called a tamper-free device. For example, when a bank terminal or the like equipped with a storage device that holds secret information is illegally opened, the device itself is protected by automatically erasing or destroying the storage contents of the storage device. be able to. A tamper-free device does not need to be monitored by an administrator.

ここでは、タンパーとは環境の変化や悪意者による積極的な攻撃を意味する。   Here, tampering means changes in the environment and aggressive attacks by Service-to-Self.

電磁波や放射線、熱、振動など強度などが設計時に意図した範囲を超えたときに、装置はいわゆる誤動作や停止状態に陥る傾向がある。これは、装置が電気的、機械的に動作していることによる。部品点数の少ない装置であれば、単純な総当りを行っても原因の特定と対策にかかるコストは比較的低く抑えることが可能であるが、部品が相互に組み合わされたときに、その種類と方法をすべて網羅的に確認することは不可能であり、したがって誤動作しないことを保証することは非常に困難である。そのため、多数の部品にそのシステム全体の安全性を依存しなければならない装置ほど、耐タンパー性に高度の注意を払うことが必要である。例えば、数10万から数100万個のオーダーで高度に集積化された半導体を使用する中央演算装置(CPU)などのマイクロプロセッサや、CPU、メモリ、外部インターフェースなどを数mm角以下に集積したICカードなどがその一例であろう。従来は、そのようなシステムを運用する上で、上位のシステムは下位のシステムの安全性を全面的に信頼することで設計を行ってきたが、これは下位のシステムの故障や誤動作によりシステム全体が不測の停止や誤動作状態に陥る可能性があることを意味する。   When the intensity of electromagnetic waves, radiation, heat, vibration, etc. exceeds the range intended at the time of design, the device tends to fall into a so-called malfunction or stop state. This is because the device is operating electrically and mechanically. If the device has a small number of parts, the cost of identifying the cause and taking countermeasures can be kept relatively low even with simple round robin, but when the parts are combined with each other, It is impossible to exhaustively check all the methods, so it is very difficult to ensure that they do not malfunction. For this reason, devices that must rely on a large number of components for the safety of the entire system need to pay more attention to tamper resistance. For example, microprocessors such as central processing units (CPUs) that use highly integrated semiconductors on the order of hundreds of thousands to millions of units, CPUs, memories, external interfaces, etc., are integrated in several mm squares or less. An example is an IC card. Conventionally, when operating such a system, the upper system has been designed by fully trusting the safety of the lower system, but this is due to the failure or malfunction of the lower system. Means that there is a possibility of unexpected stoppage or malfunction.

図1に、ICカードを示した。ICカード(101)には接触端子(102)が装着されており、この端子を経由して外部とのやり取りを行う。Vccには電源を供給し、RSTにはリセット信号を、CLKにはクロック信号を、I/OにはI/O信号を伝達する。GNDは接地端子である。 高度な安全性を要求されるICカードなどの場合、図2の中央演算装置(201)を使用して秘密の鍵を使用して暗号処理などの演算を行う。ICカードでは内部と外部とをつなぐのはI/Oポート(207)のみであり、CPUの演算データは外部に出力されないことから、内部で記憶装置(204)に秘密に保持しているデータ(206)は極めて安全であると考えられてきた。しかし、ICカードに外部から放射線や電磁波などのストレスを与えることで誤動作を起こし、その演算結果を観測することにより内部の秘密の鍵情報を取得することができることをBiham氏とShamir氏が以下の非特許文献において示した。ここに示されるように、演算値の一部にエラーを生じさせその演算結果から秘密の鍵を特定することが可能である。ゆえに、ICカードのシステムが動作しつづけていることだけでは必ずしも十分でない。このように、装置自身がシステム設計者の意図通りに「正しく」動作しているかどうかを把握する必要がある。   FIG. 1 shows an IC card. The IC card (101) is equipped with a contact terminal (102), and exchanges with the outside through this terminal. Power is supplied to Vcc, a reset signal is transmitted to RST, a clock signal is transmitted to CLK, and an I / O signal is transmitted to I / O. GND is a ground terminal. In the case of an IC card or the like that requires a high level of security, the central processing unit (201) in FIG. 2 is used to perform operations such as cryptographic processing using a secret key. In the IC card, only the I / O port (207) connects the inside and the outside, and the calculation data of the CPU is not output to the outside. Therefore, the data ( 206) has been considered extremely safe. However, Mr. Biham and Mr. Shamir said that the internal secret key information can be acquired by observing the operation result by causing malfunction by applying stress such as radiation and electromagnetic waves from the outside to the IC card It was shown in non-patent literature. As shown here, it is possible to generate an error in a part of the operation value and specify the secret key from the operation result. Therefore, it is not always sufficient that the IC card system continues to operate. Thus, it is necessary to know whether the device itself is operating “correctly” as intended by the system designer.

Differential Fault Analysis of Secret Key Cryptosystems」(Lecture Notes in Computer Science, Advances in Cryptology, proceedings of CRYPTO'97, Springer-Ferlag, pp513-525, 1997)Differential Fault Analysis of Secret Key Cryptosystems '' (Lecture Notes in Computer Science, Advances in Cryptology, proceedings of CRYPTO'97, Springer-Ferlag, pp513-525, 1997)

従来の装置は、外部からの放射線や電磁波、振動などにより誤動作を起こし、その誤動作の結果として予定外の情報漏洩や故障を招くことがあった。装置の電源を不安定にした場合、装置の中で最も電圧異常に弱い部分から誤動作を始める傾向がある。これは装置の接続関係や設計により様々に異なるため、高度に集積された装置のどの部分が弱いかを決定することは困難である。また、高度に組み合わされた装置の相互関係を追跡することは非常に高コストでもあり、引き起こされる誤動作現象を予測することも困難である。   Conventional devices sometimes malfunction due to external radiation, electromagnetic waves, vibration, or the like, and as a result of the malfunction, unscheduled information leakage or failure may occur. When the power supply of the device is made unstable, there is a tendency that malfunctions start from the portion of the device that is most vulnerable to abnormal voltage. Since this varies depending on the connection relationship and design of the device, it is difficult to determine which part of the highly integrated device is weak. It is also very expensive to track the interrelationships of highly combined devices and it is difficult to predict the malfunctions that are caused.

本発明の目的のひとつは、情報処理装置が誤動作の種類に応じて適切に処理を継続もしくは停止することが可能な情報処理装置を提供することにある。   One of the objects of the present invention is to provide an information processing apparatus in which the information processing apparatus can appropriately continue or stop processing according to the type of malfunction.

I.条件分岐命令を複数回連続的に記述する。 I. Write a conditional branch instruction continuously several times.

グリッチアタックへの対応策の一つとして、条件分岐命令を複数回連続的に記述する構成を本発明の実施例では採る。   As one countermeasure against the glitch attack, the embodiment of the present invention adopts a configuration in which a conditional branch instruction is continuously described multiple times.

グリッチアタックに遭遇してある条件分岐命令が正しく実行されず、実質的にはその命令が実行されなかった場合への対応策である。   This is a countermeasure for a case where a conditional branch instruction that encounters a glitch attack is not executed correctly and is not executed.

それに関連する構成は次の通りである。
1.ICカード用チップ内の一のアプリケーションまたは一の情報へのアクセス権を得るための入力パスワードの正誤を判定するために前記入力パスワードと正しいパスワードとを比較し、両者が一致した場合にはその次の命令を実行し、不一致の場合には分岐命令を実行する第一の分岐命令が記憶装置内に格納され、その第1の分岐命令の後にはそれと同じ命令である第2の分岐命令が前記記憶装置内に格納されていることを特徴とする情報処理装置。
2.前記第1および第2の分岐命令の判定結果に基づき実行される分岐命令での分岐先にはエラー処理命令が設けられていることを特徴とする上記1.記載の情報処理装置。
3.前記第2の分岐命令の判定結果に基づき分岐せずにその次の命令が実行される場合にはその第2の分岐命令の次の命令またはその先の命令には前記アクセス権を付与するルーチンが含まれていることを特徴とする上記1記載の情報処理装置。
4.前記入力パスワードは複数個の文字、数字、符号または記号の列を有し、前記文字、数字、符号または記号の一単位と正しいパスワードの一単位とを比較することにより入力パスワードの正誤判定を行うことを特徴とする請求項1記載の情報処理装置。
5.前記第一の分岐命令に引き続いて前記第二の分岐命令が実行される場合の前記第一の分岐命令の実行開始時刻から前記第二の分岐命令の実行開始時刻までの時間間隔が1マイクロ秒以下となるように構成されていることを特徴とする上記1.記載の情報処理装置。
6.前記正しいパスワードがn個(nは自然数とする。)の文字列よりなる場合、前記第1および第2の分岐命令はそれぞれn個あり、前記第1の分岐命令と前記第2の分岐命令とが交互に実行されるようにコーディングされていることを特徴とする上記1.記載の情報処理装置。
7.前記第1の分岐命令と前記第2の分岐命令との間にはそれ以外の命令が配置されていることを特徴とする上記6.記載の情報処理装置。
8.分岐条件を満足する場合にはその分岐命令を実行し、その分岐条件を満足しない場合にはその次の命令を実行する第一の分岐命令が記憶装置内に格納され、その第1の分岐命令の後にはそれと同じ命令である第2の分岐命令が前記記憶装置内に格納されていることを特徴とする情報処理装置。
9.前記第2の分岐命令は前記第1の分岐命令に引き続いて前記記憶装置内の所定アドレスに記憶されていることを特徴とする上記8.記載の情報処理装置。
10.前記第1および第2の分岐命令は入力パスワードが正しいか否かの判定を行うために用いられるものであり、入力パスワードが正しいとの判定がなされた場合にはその判定の後にICカード用チップ内の一のアプリケーションまたは一の情報へのアクセスする処理が実行されるように構成されたことを特徴とする上記8.記載の情報処理装置。
The configuration related to this is as follows.
1. The input password is compared with the correct password to determine the correctness of the input password to obtain the right to access one application or one information in the IC card chip. A first branch instruction that executes a branch instruction if there is a mismatch is stored in the storage device, and a second branch instruction that is the same instruction is stored after the first branch instruction. An information processing apparatus stored in a storage device.
2. An error processing instruction is provided at a branch destination of a branch instruction executed based on the determination result of the first and second branch instructions. The information processing apparatus described.
3. Routine for granting the access right to the instruction next to the second branch instruction or the instruction ahead thereof when the next instruction is executed without branching based on the determination result of the second branch instruction 2. The information processing apparatus according to 1 above, wherein the information processing apparatus is included.
4). The input password has a sequence of a plurality of characters, numbers, signs, or symbols, and the correctness of the input password is determined by comparing one unit of the letters, numbers, signs, or symbols with one unit of a correct password. The information processing apparatus according to claim 1.
5). When the second branch instruction is executed subsequent to the first branch instruction, the time interval from the execution start time of the first branch instruction to the execution start time of the second branch instruction is 1 microsecond. It is comprised so that it may become the following. The information processing apparatus described.
6). When the correct password consists of n character strings (n is a natural number), there are n first and second branch instructions, and the first branch instruction and the second branch instruction Are coded so as to be executed alternately. The information processing apparatus described.
7). 5. The other instructions are arranged between the first branch instruction and the second branch instruction. The information processing apparatus described.
8). If the branch condition is satisfied, the branch instruction is executed. If the branch condition is not satisfied, a first branch instruction for executing the next instruction is stored in the storage device, and the first branch instruction is stored. And a second branch instruction which is the same instruction is stored in the storage device.
9. The second branch instruction is stored in a predetermined address in the storage device subsequent to the first branch instruction. The information processing apparatus described.
10. The first and second branch instructions are used to determine whether or not the input password is correct. When it is determined that the input password is correct, the IC card chip is determined after the determination. 7. A process for accessing one application or one piece of information is executed. The information processing apparatus described.

上記したものは基本的に同じ分岐命令を連続して記載するものである。これに対して次のものは異なる分岐命令を連続的に記載するものである。
11.ある条件フラグF1の値が0または1のときに分岐命令が実行される第1の分岐命令と、前記条件フラグF1の値が1または0のときに分岐命令が実行される第2の分岐命令とを有し、前記第1の分岐命令実行時に前記条件フラグF1の値に基づき分岐処理が行われないときには、それに続く処理で前記条件フラグF1の値を反転させた後に前記第2の分岐命令が実行されるように構成されたことを特徴
とする情報処理装置。
12.前記第1および第2の分岐命令は入力パスワードが正しいか否かの判定を行うために用いられるものであり、入力パスワードが正しいとの判定がなされた場合にはその判定の後にICカード用チップ内の一のアプリケーションまたは一の情報へのアクセスする処理が実行されるように構成されたことを特徴とする上記11.記載の情報処理装置。
13.ある条件フラグF1の値が0または1のときに分岐命令が実行される第1の分岐命令と、前記条件フラグF2の値が0または1のときに分岐命令が実行される第2の分岐命令とを有し、前記第1の分岐命令実行時に前記条件フラグF1の値に基づき分岐処理が行われないときには、それに続く処理で前記条件フラグF1の値を前記条件フラグF2に複写し、その後に前記第2の分岐命令が実行するように構成したことを特徴とする情報処理装置。
II.つぎのものは分岐経路の把握に関するものである。分岐命令に従い分岐する場合、分岐前にどの分岐先へ分岐すべきかは遅くともその分岐命令実行直前に判明している。一方、その分岐命令が正しく実行されたか否かの確認が必要な場合がある。この場合、個々の分岐先で特有の処理を行い、その処理結果と事前に記憶した分岐先とを比較照合することにより、正しく分岐したか否かをチェックする機能を有するのが以下の構成である。
14.分岐条件に基づき複数個の分岐先のうちのいずれか一を指定する分岐命令と、その分岐先にコーディングされている一連の命令を実行した場合には前記複数個の分岐先のうちのどの分岐先経路を通過したかを第1のデータとして記憶し、前記分岐条件の判断の基準となる分岐先データと前記第1のデータとを比較する手段を有することを特徴とする情報処理装置。
15.前記分岐条件の判断の基準となる分岐先データと前記第1のデータとが一致する場合にはそれに引き続く処理を行い、不一致の場合にはエラー処理を行うように構成されたことを特徴とする上記14.記載の情報処理装置。
III.これは.ループ処理の処理回数を制限する機能に関するものである。
The above description basically describes the same branch instruction in succession. On the other hand, the following describes different branch instructions successively.
11. A first branch instruction that is executed when the value of a certain condition flag F1 is 0 or 1, and a second branch instruction that is executed when the value of the condition flag F1 is 1 or 0 When the branch process is not performed based on the value of the condition flag F1 when the first branch instruction is executed, the value of the condition flag F1 is inverted in the subsequent process and then the second branch instruction An information processing apparatus configured to be executed.
12 The first and second branch instructions are used to determine whether or not the input password is correct. When it is determined that the input password is correct, the IC card chip is determined after the determination. 10. A process for accessing one application or one piece of information is executed. The information processing apparatus described.
13. A first branch instruction that is executed when the value of a certain condition flag F1 is 0 or 1, and a second branch instruction that is executed when the value of the condition flag F2 is 0 or 1 When the branch processing is not performed based on the value of the condition flag F1 when the first branch instruction is executed, the value of the condition flag F1 is copied to the condition flag F2 in the subsequent processing, and thereafter An information processing apparatus configured to execute the second branch instruction.
II. The following relates to grasping the branch path. When branching according to a branch instruction, the branch destination to be branched to before branching is known immediately before execution of the branch instruction at the latest. On the other hand, it may be necessary to check whether the branch instruction has been executed correctly. In this case, the following configuration has the function of checking whether or not the branch has been performed correctly by performing a specific process at each branch destination and comparing and comparing the processing result with the branch destination stored in advance. is there.
14 If a branch instruction that specifies one of a plurality of branch destinations based on the branch condition and a series of instructions coded at the branch destination are executed, which branch of the plurality of branch destinations is executed An information processing apparatus comprising: means for storing whether or not a destination route has been passed as first data, and comparing the branch destination data serving as a reference for determining the branch condition with the first data.
15. The branch destination data serving as a reference for determining the branch condition is configured to perform subsequent processing when the first data matches the first data, and to perform error processing when the data does not match. 14. above. The information processing apparatus described.
III. The present invention relates to a function for limiting the number of loop processing.

これは、ループ処理の処理回数を制限することにより、情報処理装置の異常な動作を抑制する処理に関するものである。カウンタを複数個設け、ループ内で例えば、同様のカウントダウン処理を行い、各カウンタ値が0となるか複数個のカウンタの値に不一致が生じた場合にはループ処理から抜ける処理を行う。これにより規定回数以上のループ処理実行を抑制するものである。以下のものはその具体的な構成例である。
16.第1および第2のカウンタの値を初期化し、ループ内で前記第1および第2のカウンタ値をカウントダウンする処理を行い、前記第1および第2のカウンタに対するカウントダウン後の前記第1および第2のカウンタ値が不一致の場合または前記第1および第2のカウンタに対するカウントダウン後の前記第1および第2の両方のカウンタ値が共に第1の所定値の場合には前記ループから抜ける処理を行い、前記第1および第2のカウンタに対するカウントダウン後の前記第1および第2の両方のカウンタ値が共に第2の所定値の場合には前記ループ内の処理を繰り返すように構成されていることを特徴とする情報処理装置。
17.前記第1の所定値は0であり、前記第2の所定値は自然数であることを特徴とする上記16.記載の情報処理装置。
18.第1および第2のカウンタの値を初期化し、処理ループ内で前記第1および第2のカウンタ値を更新する処理を行い、前記更新処理後の前記第1のカウンタ値と第2のカウンタ値とが不一致の場合または前記更新処理後の前記第1および第2の両方のカウンタ値が共に第1の所定値の場合には前記ループから抜ける処理を行い、それ以外の場合には前記ループ内の処理を繰り返すように構成されていることを特徴とする情報処理装置。
19.前記カウンタ値の更新は更新前のカウンタ値からカウントダウンする処理であるか又はカウントアップ処理するものであることを特徴とする上記18.記載の情報処理装置。
20.前記第1の所定値は0であることを特徴とする上記18.記載の情報処理装置。
IV.情報処理装置の一部を切り離してその部分を使用し続けるような行為を阻止するための手段について説明する。これはそのような部分に関連する独自のカウンタをその装置に設け、その部分を使用するたびにその独自カウンタのカウンタ値を更新し、そのカウンタ値が規定値以下となった場合にはその部分の使用を阻止する機能を設けるものである。以下に具体的な構成を示す。
21.その装置の一部の使用限度回数を記憶するためのカウンタと、その装置の一部の使用回数に応じて前記カウンタ値を更新する手段と、その装置の一部の累積使用回数が前記使用限度回数に至った場合にはその装置の一部のその後の使用を制限する手段と、その装置の一部の使用が制限された場合にはその装置の他の部分からの指示で前記カウンタ値を更新することによりその使用制限を解除する
手段を有することを特徴とする情報処理装置。
22.その装置の一部の累積使用回数が前記使用限度回数に至った場合にはその装置の一部のその後の使用を拒否するものあることを特徴とする上記21.記載の情報処理装置。
23.その装置へのコマンド入力により前記使用制限が解除されるように構成されていることを特徴とする上記21.記載の情報処理装置。
24.前記コマンド入力と併せてそのコマンド入力の正当性を確認する手段が設けられていることを特徴とする上記23.記載の情報処理装置。
This relates to processing that suppresses an abnormal operation of the information processing apparatus by limiting the number of loop processing. A plurality of counters are provided, and for example, the same countdown process is performed in the loop, and when each counter value becomes 0 or a mismatch occurs between the values of the plurality of counters, a process to exit from the loop process is performed. This suppresses execution of loop processing more than the specified number of times. The following is a specific configuration example.
16. The first and second counter values are initialized, the first and second counter values are counted down in a loop, and the first and second counters after the countdown with respect to the first and second counters are performed. When the counter values of the first and second counters do not match or when both the first and second counter values after the countdown with respect to the first and second counters are both the first predetermined value, a process of exiting the loop is performed. When both the first and second counter values after the countdown with respect to the first and second counters are the second predetermined value, the processing in the loop is repeated. Information processing apparatus.
17. 16. The above-mentioned 16.5, wherein the first predetermined value is 0, and the second predetermined value is a natural number. The information processing apparatus described.
18. The first and second counter values are initialized, the first and second counter values are updated in a processing loop, and the first counter value and the second counter value after the update process are performed. Is not matched or when both the first and second counter values after the update processing are at the first predetermined value, the process exiting from the loop is performed. An information processing apparatus configured to repeat the process.
19. 18. The updating of the counter value is a process of counting down from a counter value before updating or a process of counting up. The information processing apparatus described.
20. 18. The above-mentioned 18., wherein the first predetermined value is 0. The information processing apparatus described.
IV. Means for preventing an act of separating a part of the information processing apparatus and continuing to use the part will be described. This is because a unique counter related to such a part is provided in the device, and the counter value of the unique counter is updated every time the part is used. A function to prevent use is provided. A specific configuration is shown below.
21. A counter for storing the number of times of use of a part of the device; means for updating the counter value in accordance with the number of times of use of the part of the device; When the number of times has been reached, the counter value is set by means for restricting the subsequent use of a part of the device, and when the use of a part of the device is restricted, an instruction from the other part of the device. An information processing apparatus having means for releasing the use restriction by updating.
22. 21. The apparatus according to 21., wherein when the cumulative number of times of use of a part of the device reaches the use limit number of times, subsequent use of a part of the device is rejected. The information processing apparatus described.
23. 21. The apparatus according to 21., wherein the use restriction is canceled by inputting a command to the apparatus. The information processing apparatus described.
24. The above 23. characterized in that means for confirming the validity of the command input is provided together with the command input. The information processing apparatus described.

本発明の実施例によれば、情報処理装置の誤動作を検出することが可能である。   According to the embodiment of the present invention, it is possible to detect a malfunction of the information processing apparatus.

今、演算装置を考える。電源を不安定にした場合、演算装置の全体ではなく一部分で誤動作が起こることがある。つまり、ある命令を受け取った演算装置の命令実行部分が沈黙状態に陥り、しかしそれ以外の部分が正常に動作しているならば、外部からはある命令を実行しない演算装置と見ることができる。このような誤動作は条件分岐を行う際に顕著な問題となる。
(1)同様な条件分岐命令を複数個並べることによる誤動作防止対策
図3は一般的に用いられるパスワード照合の処理フローである。パスワード判定装置(300)は、判定部分(301)でパスワードが不正解であると判定すると、もう一度パスワード入力処理に戻るように動作しようとする(302)。
この時に上記の誤動作(条件分岐命令の沈黙)が起こったならば、判定部分(301)の処理を行わずに次の処理に遷移するため、パスワードの正否に関わらず、最終的に正解時の処理(303)に進む可能性がある。
Now consider an arithmetic unit. When the power supply is unstable, malfunction may occur in a part of the arithmetic unit rather than the whole. In other words, if the instruction execution part of the arithmetic unit that has received a certain instruction is in a silent state, but other parts are operating normally, it can be regarded as an arithmetic unit that does not execute a certain instruction from the outside. Such a malfunction becomes a significant problem when performing conditional branching.
(1) Countermeasure for preventing malfunction by arranging a plurality of similar conditional branch instructions FIG. 3 is a processing flow of password verification generally used. If it is determined in the determination part (301) that the password is incorrect, the password determination device (300) tries to return to the password input process again (302).
If the above malfunction (silence of conditional branch instruction) occurs at this time, the process proceeds to the next process without performing the process of the determination part (301). There is a possibility of proceeding to the processing (303).

また、図4に示すように、装置がエラーを起こした場合、装置のリセットをその装置の利用者に対して促すために無限ループ(400)に遷移させることが一般的に行われる。その装置が無限ループ(401)内で動作中に誤動作した場合を考える。すると、無限ループに留まるための無条件ジャンプ命令(402)が実行されないことが起こり得る。この場合、装置は無限ループを抜け出し、それに続くアドレスに記述されているプログラム(403)へ遷移し、以降に記述されているプログラムを順次実行していく可能性がある。これはこのプログラムの作成者が想定していない動作であり、望ましくないものである。   Also, as shown in FIG. 4, when an apparatus has an error, it is generally performed to make an infinite loop (400) in order to prompt the user of the apparatus to reset the apparatus. Consider the case where the device malfunctions during operation in an infinite loop (401). Then, the unconditional jump instruction (402) for staying in the infinite loop may not be executed. In this case, there is a possibility that the apparatus exits the infinite loop, transitions to the program (403) described at the address subsequent thereto, and sequentially executes the programs described thereafter. This is an operation that is not anticipated by the creator of this program and is undesirable.

図5に示すように、条件分岐命令を複数回繰り返す(502,503,504)ことで、図4を用いて説明した問題点の発生を防止することができる。同一の条件での分岐命令を複数回繰り返すことは処理フローに何ら影響を与えず、突発的な誤動作であれば、複数回のうちのいずれかが正常に処理される。ここで、2回目以降の条件分岐先(503,504)を装置の処理を停止する制御を行う装置、あるいは誤動作を警告する装置(506)に設定することもできる。というのは、2回目以降の条件分岐で分岐するのは上記のような誤動作による場合に他ならないからである。この時、装置はタンパーエビデント性を持つといえる。なお、誤動作なき場合には処理A(505)または処理B(507)が実行される。   As shown in FIG. 5, by repeating the conditional branch instruction a plurality of times (502, 503, 504), the problem described with reference to FIG. 4 can be prevented from occurring. Repeating a branch instruction under the same condition a plurality of times does not affect the processing flow, and if it is a sudden malfunction, one of the plurality of times is processed normally. Here, the second and subsequent conditional branch destinations (503, 504) can be set to a device that performs control for stopping the processing of the device or a device that warns of malfunction (506). This is because branching in the second and subsequent conditional branches is none other than in the case of malfunction as described above. At this time, the device can be said to have tamper evidence. If no malfunction occurs, process A (505) or process B (507) is executed.

一般的な情報処理装置はプログラムカウンタを元に動作を行っており、そのプログラムカウンタが指し示す場所にあるプログラムを順次実行する。プログラムやデータを記憶する記憶装置は一般に読み書き時に電力を消費する。また複雑な手順を経るため、電源が不安定になるなどにより誤動作が起こった場合にプログラムやデータを正常に読み込めない場合がある。特別な配慮のされていない装置ではこの誤動作の際に、プログラムカウンタの指し示すプログラムステップを無処理のまま通過し、しかしプログラムカウンタは記憶装置に比較して電力消費が少なく簡単な演算で更新されるため、そのまま次のプログラムステップに進むことがある。条件分岐処理を無処理のまま通過することは、条件判定で条件が偽であった場合と等価であり、設計者の意図しない結果をもたらす。例えば、入力値が負の数であれば再度入力処理に戻り、そうでなければ次の処理に進むという処理を考える。誤動作により入力値の判定が行われないまま次の処理に進んでしまうと、後のプログラムは入力値が正の数であることを想定しているため、予期しない誤動作を引き起こす。本実施例のように、2回以上の条件分岐命令を設置することで、条件分岐命令を無処理のまま通過して次の状態に移行してしまう確率を減らすことができる。条件分岐処理は一般的にシステムに変化をもたらさないため、複数回実行してもなんら新たな問題は起きない。また、条件を反転した命令を使用することや、他の条件フラグによる条件判定を行うことで、異なる条件分岐命令を混在させることができる。ある環境要因による誤動作が命令そのものに依存するものであるとき、本発明により連続する同質の誤動作の影響を受ける確率を効果的に減らすことができる。   A general information processing apparatus operates based on a program counter, and sequentially executes a program at a location indicated by the program counter. A storage device that stores programs and data generally consumes power when reading and writing. In addition, due to a complicated procedure, there is a case where a program or data cannot be read normally when a malfunction occurs due to an unstable power supply. In the case of this malfunction, the device without special consideration passes through the program step indicated by the program counter without processing, but the program counter is updated with a simple operation with less power consumption than the storage device. Therefore, the program step may proceed to the next program step as it is. Passing the conditional branch process without processing is equivalent to the case where the condition is false in the condition determination, and brings a result unintended by the designer. For example, consider a process of returning to the input process again if the input value is a negative number, and proceeding to the next process if not. If the input value is not determined due to a malfunction and the process proceeds to the next process, the subsequent program assumes that the input value is a positive number, which causes an unexpected malfunction. By installing conditional branch instructions two or more times as in this embodiment, it is possible to reduce the probability that a conditional branch instruction passes without processing and moves to the next state. Since conditional branch processing generally does not change the system, no new problem occurs even if executed multiple times. Also, different conditional branch instructions can be mixed by using an instruction with inverted conditions or by performing a condition determination using another condition flag. When a malfunction due to an environmental factor depends on the instruction itself, the present invention can effectively reduce the probability of being affected by the same homogeneous malfunction.

図5に示した情報処理装置は、条件フラグZ(ゼロフラグ)を参照し、Z=0であれば分岐処理(502)を行う。本発明では、分岐処理(502)の後に再度、同じ分岐処理(503)を行う。本実施例ではさらに続けて同じ分岐処理(504)を行っている。これは、処理装置の誤動作により分岐処理が行われなかった場合の保護機構であり、条件分岐命令は処理装置の内部状態を変化させない命令であるため、さらに誤動作確率を減らすために、本例に見られるように3回処理を行うのに留まらず、任意の回数だけ行うことができる。2回目以降の分岐処理により分岐が起こるのは、誤動作により1回目の分岐処理を通過した場合のみであるため、2回目以降の分岐処理の分岐先をエラー処理(506)とすることができる。エラー処理とせず、1回目の分岐処理と同様に処理B(507)に接続すれば、誤動作環境下においても処理を継続することができる。図5に示した条件Z=0とは、演算の結果がゼロであったことを示すものであり、一般の演算器にはこのような演算の結果を示す条件フラグが用意されている。本実施例ではZフラグを参照したが、その他のフラグを用いることも可能である。
(2)他の分岐命令の併用による誤動作防止対策
先に述べたように、電源を不安定にしても装置全体が必ずしも不安定になるわけではなく、最も弱いところから誤動作し始める傾向がある。そのため、受ける影響が演算装置の命令毎に異なり、ある命令は正常動作してもある命令は誤動作する場合がある。ところで、演算装置には各条件フラグの0/1に応じて2種類ずつの命令(図6の602,604)が実装することができる。例えば、Zフラグ(ゼロフラグ)が0であるときに分岐する命令(602)と、Zフラグが1であるときに分岐する命令(604)である。そこで、条件フラグのビット値を反転して(603)再度違う命令で条件分岐を行う。これは、一時的な誤動作であれば同じ分岐命令を列挙することで対策可能であるが、定常的な誤動作であるときには同じ命令の系列はすべて通過してしまうため、違う命令を織り交ぜることで誤動作検出確率を上げることができる。主な手順は以下の通りである。
1.条件分岐命令を実行。
2.条件フラグの値を反転。
3.上記1.の条件を反転した条件分岐命令を実行。
The information processing apparatus shown in FIG. 5 refers to the condition flag Z (zero flag), and performs branch processing (502) if Z = 0. In the present invention, the same branch process (503) is performed again after the branch process (502). In this embodiment, the same branching process (504) is further performed. This is a protection mechanism when branch processing is not performed due to a malfunction of the processing device, and the conditional branch instruction is an instruction that does not change the internal state of the processing device. As can be seen, the process is not limited to three times, but can be performed any number of times. Since branching occurs in the second and subsequent branch processing only when the first branch processing is passed due to a malfunction, the branch destination of the second and subsequent branch processing can be set to error processing (506). If the connection is made to the process B (507) as in the first branch process without using the error process, the process can be continued even in a malfunction environment. The condition Z = 0 shown in FIG. 5 indicates that the result of the calculation is zero, and a general arithmetic unit is provided with a condition flag indicating the result of such a calculation. In the present embodiment, the Z flag is referred to, but other flags may be used.
(2) Measures to prevent malfunction by using other branch instructions together As described above, even if the power supply is unstable, the entire device does not necessarily become unstable, and tends to start malfunctioning from the weakest point. For this reason, the influence is different for each instruction of the arithmetic unit, and a certain instruction may operate normally even if it operates normally. By the way, two types of instructions (602 and 604 in FIG. 6) can be implemented in the arithmetic unit according to 0/1 of each condition flag. For example, there are an instruction (602) that branches when the Z flag (zero flag) is 0, and an instruction (604) that branches when the Z flag is 1. Therefore, the bit value of the condition flag is inverted (603), and a conditional branch is performed again with a different instruction. This can be countered by enumerating the same branch instruction if it is a temporary malfunction, but if it is a steady malfunction, all of the same instruction series will pass, so different instructions will be interwoven. Can increase the malfunction detection probability. The main procedure is as follows.
1. Executes a conditional branch instruction.
2. Inverts the value of the condition flag.
3. Executes a conditional branch instruction that reverses the condition in 1 above.

同等の効果を得るために、ある条件フラグを保存している状態レジスタの値を、別の条件フラグを保存している状態レジスタに複写することで、別命令を用いて条件判定処理を行ってもよい。この場合、
1.条件分岐命令を実行。
2.上記1.で使用した条件フラグ値を、別の条件フラグを保持する状態レジス
タに移動。
3.上記2.での移動先に対応する条件分岐命令を実行。
の手順で処理する。ここでも先と同じ理由で、2回目以降の分岐命令の分岐先を警告装置や停止装置(608)にすることでタンパーエビデント性を得ることができる。ところで、異なる命令間で誤動作の発生確率や発生状態が異なる。そのため、同等の処理を多種の方法で行うことが誤動作への対策となる。図6のように、分岐処理(602)の後で分岐条件を反転する(603)ことで、分岐処理に異なる命令(604)を使用することができ、誤動作を効果的に回避することができる。ここでは条件フラグZについて述べたが、他の条件フラグを用いても同様に処理を行うことができる。
To obtain the same effect, copy the status register value that stores a certain condition flag to the status register that stores another condition flag, and perform a condition determination process using another instruction. Also good. in this case,
1. Executes a conditional branch instruction.
2. Move the condition flag value used in 1 above to the status register holding another condition flag.
3. The conditional branch instruction corresponding to the movement destination in 2 above is executed.
Process according to the procedure. Again, for the same reason as above, tamper evidence can be obtained by setting the branch destination of the second and subsequent branch instructions to a warning device or a stop device (608). By the way, the occurrence probability and occurrence state of malfunctions differ between different instructions. Therefore, performing equivalent processing by various methods is a countermeasure against malfunction. As shown in FIG. 6, by inverting the branch condition (603) after the branch process (602), a different instruction (604) can be used for the branch process, and a malfunction can be effectively avoided. . Although the condition flag Z has been described here, the same processing can be performed using other condition flags.

さらに、ビットシフト命令などにより状態レジスタに保存されているある条件フラグの結果を他の条件フラグ位置に反映させ、その結果を利用して多種の条件分岐命令で条件判定を行うことも可能である。状態レジスタ(コンディションコードレジスタ:CCR)とは、演算器で取り扱うデータの状態を反映するレジスタである。一般にHフラグ、Nフラグ、Zフラグ、Vフラグ、Cフラグがあり、それぞれハーフキャリ、ネガティブ、ゼロ、オーバーフロー、キャリを表している。ハーフキャリには、演算で中央ビットについてキャリまたはボローが発生したときに1がセットされ、ネガティブフラグには、演算結果が負の数であるときに1がセットされ、ゼロフラグには、演算結果がゼロであるときに1がセットされ、オーバーフローフラグには、演算結果がオーバーフローを生じた際に1がセットされ、キャリフラグには、演算でキャリが生じた際に1がセットされる。これらは、状態レジスタの中で各1ビットの位置を占め、順番に配置されている。配置はCPUにより異なる場合があるため、ここでは、HNZVCの順番に配置されているものとし、8ビットの状態レジスタの上位3ビットはここでは常に0であるとする。図7は、ゼロフラグが0である場合に処理B(709)を行いたい場合を示している。最初の分岐処理では、通常通りゼロフラグを利用して条件分岐を行う(702)。次に状態レジスタ(配置は上記したように「000HNZVC」である)を1ビット右にシフトすることにより、Zフラグの位置にあったビットをVフラグの位置に移動する(703)。つまり、Vフラグの判定を行うことで実質的に先のZフラグの判定を行っていることになる(704)。さらに状態レジスタを1ビット右にシフトすると、Vフラグの位置にあったビットはCフラグの位置に移動する(705)。Cフラグの判定を行うことで、先のZフラグの判定を行うことができる(706)。このように複数の異なる命令を使用することで、一部の命令の誤動作を検出することができる。
(3)処理経路の把握
ノイズによる誤動作などによりCPUのプログラムカウンタが異常動作した場合、条件分岐が必ずしも設計者の意図どおりに当該条件に従って処理されないことや、通常先頭から順番に処理されるべき処理順序が、誤動作により変化することが起こりうる。このような事態の発生を前提として、各分岐経路での処理が正しく行われたかどうかを判定する手段を設ける必要がある。その判定は以下の手順に従って行う。
1.分岐情報(どこへ分岐するのかの分岐先の情報)を保存。
2.分岐命令を実行。
3.分岐先での処理命令を実行。
4.分岐先に依存した情報をメモリに保存。
5.分岐先での処理終了後に、上記1.で保存した分岐情報と上記4.で保存した情報を比較。
Furthermore, it is also possible to reflect the result of a certain condition flag stored in the status register by a bit shift instruction or the like to other condition flag positions, and use the result to make a condition determination with various conditional branch instructions. . The status register (condition code register: CCR) is a register that reflects the status of data handled by the computing unit. In general, there are an H flag, an N flag, a Z flag, a V flag, and a C flag, which respectively represent half carry, negative, zero, overflow, and carry. The half carry is set to 1 when a carry or borrow occurs for the central bit in the operation, the negative flag is set to 1 when the operation result is a negative number, and the zero flag contains the operation result. When it is zero, 1 is set, the overflow flag is set to 1 when an operation result overflows, and the carry flag is set to 1 when a carry occurs in the operation. These occupy one bit position in the status register and are arranged in order. Since the arrangement may differ depending on the CPU, it is assumed here that they are arranged in the order of HNZVC, and the upper 3 bits of the 8-bit status register are always 0 here. FIG. 7 shows a case where the process B (709) is desired to be performed when the zero flag is 0. In the first branch process, a conditional branch is performed using a zero flag as usual (702). Next, by shifting the status register (arrangement is “000HNZVC” as described above) to the right by one bit, the bit at the position of the Z flag is moved to the position of the V flag (703). That is, the determination of the V flag is substantially performed to determine the previous Z flag (704). When the status register is further shifted to the right by 1 bit, the bit at the position of the V flag moves to the position of the C flag (705). By determining the C flag, it is possible to determine the previous Z flag (706). By using a plurality of different instructions in this way, it is possible to detect malfunctions of some instructions.
(3) Grasping the processing path If the CPU's program counter malfunctions due to a malfunction due to noise, etc., the conditional branch is not necessarily processed according to the condition as intended by the designer, or processing that should normally be processed in order from the beginning. The order can change due to malfunctions. Assuming that such a situation occurs, it is necessary to provide means for determining whether or not the processing in each branch path has been performed correctly. The determination is made according to the following procedure.
1. Stores branch information (branch destination information about where to branch).
2. Execute branch instruction.
3. Execute processing instruction at branch destination.
4). Information depending on the branch destination is saved in memory.
5). After completion of the processing at the branch destination, the above 1. Branch information saved in step 4 above and 4. Compare the information saved in.

上記処理5.において比較結果が不一致ならば、分岐処理が期待通りに処理されなかったことを意味する。よってその場合はさらにエラー処理として装置を停止したり、分岐前に遡って再処理を行うなどの後処理を適切に行うことができる。   Process 5 above. If the comparison result is inconsistent, it means that the branch process has not been processed as expected. Therefore, in that case, post-processing such as stopping the apparatus as error processing or performing reprocessing retroactively before branching can be appropriately performed.

図8に本実施例に係る処理フローを示す。分岐命令を実行するにあたり、分岐先を決定するための情報を記憶装置に記憶する(801)。分岐命令は分岐先情報を元に分岐経路を決定する(802)。今、分岐先情報により経路Aを選択したとすると、分岐経路では、経路に依存した処理fa(803)を行い、さらに分岐経路に特有の情報Iaを記憶装置に記憶する(804)。処理終了後、分岐先情報と分岐経路情報を比較することにより、正しい分岐経路が選択されたことを確認する。分岐経路が正しくなかったと判定されれば、処理を直ちに終了したり、エラーメッセージを表示するなどの処理を行う(807)。   FIG. 8 shows a processing flow according to the present embodiment. In executing the branch instruction, information for determining the branch destination is stored in the storage device (801). The branch instruction determines a branch path based on the branch destination information (802). If the route A is selected based on the branch destination information, the branch route performs processing fa (803) depending on the route, and further stores information Ia specific to the branch route in the storage device (804). After the processing is completed, it is confirmed that the correct branch path is selected by comparing the branch destination information with the branch path information. If it is determined that the branch path is not correct, the processing is immediately terminated or an error message is displayed (807).

今、例えば、銀行端末機内のプログラムが入金処理を実行する場合を考える。分岐処理に先立ち、分岐先を決定するための情報を保存する。例として、文字列“入金処理”を記憶装置に記憶する。次に分岐命令は文字列“入金処理”を読み、入金処理経路を選択する。入金処理経路では、実際に入金処理を行い、さらに入金処理経路を処理したことを示す文字列 “入金処理経路選択”を記憶装置に記憶する。以上の処理経路の処理が終了した後に、分岐処理に先立ち記憶しておいた文字列“入金処理”と実際の処理経路で記憶した文字列“入金処理経路選択”を比較して、望んだ経路が正しく選択され実行されたことを確認することができる。もし、分岐命令実行時の誤動作により、希望していない処理経路である、例えば、出金処理経路に分岐したならば、当該経路処理中に文字列“出金処理経路選択”が記憶される。そのため、処理経路の処理が終了した後に行う比較において、“入金処理”と“出金処理経路選択”が不整合であることを発見することができ、たとえば処理を中断したり、再度分岐処理をやり直すなどの対策を施すことができる。ここでは、処理経路独自の情報として文字列を保存したが、後で処理経路を特定できるならば、数値を使用しても良い。   Consider a case where a program in a bank terminal executes a deposit process, for example. Prior to branch processing, information for determining the branch destination is saved. As an example, the character string “payment process” is stored in the storage device. Next, the branch instruction reads the character string “deposit process” and selects a deposit process path. In the deposit processing path, the actual deposit process is performed, and the character string “deposit process path selection” indicating that the deposit process path has been processed is stored in the storage device. After the above processing route processing is completed, the character string “payment processing” stored prior to the branch processing is compared with the character string “payment processing route selection” stored in the actual processing route, and the desired route Can be confirmed to have been correctly selected and executed. If a branching instruction is executed due to a malfunction at the time of execution of a branch instruction, for example, if a branch is made to a withdrawal processing path, the character string “withdrawal processing path selection” is stored during the path processing. Therefore, in the comparison performed after processing of the processing path is completed, it is possible to find that the “payment processing” and “withdrawal processing path selection” are inconsistent. For example, the processing is interrupted or the branch processing is performed again. You can take measures such as starting over. Here, the character string is stored as information unique to the processing path, but a numerical value may be used if the processing path can be specified later.

図9に条件分岐処理においてその条件分岐が正常に行われたかどうかを検知するための手段の一例を示す。入金処理経路では、経路情報として“1”を保存する(903)。出勤処理経路では、経路情報として“2”を保存する(905)。照会処理経路では、経路情報として“3”を保存する(907)。装置の使用者は経路情報として1,2,3いずれの値が保存されているかを確認することにより意図した通りの処理経路が選択されたかを知ることができる(909)。このように、単純な値の設定により経路選択の結果を保持することもできる。また、経路情報を装置固有の値に限定することで、装置使用者が本情報処理装置の出力結果を使用する際の手順を定型化することができるため利便性を向上させることができる。この定型化により検査処理の共通化を行い、プログラムメモリの節約が可能であり、汎用検査処理としてハードウェア化することで高速化も可能である。   FIG. 9 shows an example of means for detecting whether or not the conditional branch is normally performed in the conditional branch processing. In the deposit processing route, “1” is stored as route information (903). In the attendance processing route, “2” is stored as route information (905). In the inquiry processing route, “3” is stored as route information (907). The user of the apparatus can know whether the intended processing route has been selected by confirming which value of 1, 2, or 3 is stored as the route information (909). In this way, the result of route selection can be held by setting a simple value. Further, by limiting the route information to values unique to the device, the procedure when the device user uses the output result of the information processing device can be standardized, so that convenience can be improved. This standardization makes it possible to share inspection processing and save program memory, and it is possible to increase the speed by implementing hardware as general-purpose inspection processing.

処理経路独自の情報を保存するための処理は、処理経路に分岐した後のどのタイミングで何度行っても良い。図10に一例として、処理経路中に2回の数値演算を行う場合を示す。   The process for storing information unique to the processing path may be performed any number of times after branching to the processing path. As an example, FIG. 10 shows a case where two numerical calculations are performed in the processing path.

入金処理の先頭では数値“1”を設定し(1003)、出金処理の先頭では数値“2”を設定し(1006)、照会処理の先頭では数値“3”を設定する(1009)。また、入金処理の末端では数値を3倍し(1005)、出金処理の末端では数値を4倍し(1008)、照会処理の末端では数値を5倍する(1011)とする。このとき、最後に得られた数値が“3”ならば、入金処理経路が正しく処理されたことを示し、数値が“4”ならば、入金処理経路の途中で誤動作により出金処理経路に移行したことを示し、数値が“5”ならば、入金処理経路の途中で誤動作により照会処理経路に移行したことを示し、数値が“6”ならば、出金処理経路の途中で誤動作により入金処理経路に移行したことを示し、数値が“8”ならば、出金処理経路が正しく処理されたことを示し、数値が“10”ならば、出金処理経路の途中で誤動作により照会処理に移行したことを示し、数値が“9”ならば、照会処理経路の途中で誤動作により入金処理に移行したことを示し、数値が“12”ならば、照会処理経路の途中で誤動作により出金処理に移行したことを示し、数値が“15”ならば、照会処理が正しく行われたことを示す。それ以外の数値は起こりえない。起こりえない数値が得られた場合は、誤動作が起きていることを意味する。今、入金処理を実行したいとする。分岐先を決定するための情報である文字列“入金処理”を保存(1001)した後、分岐命令を実行する(1402)。分岐命令により入金処理経路に処理を移行し、入金処理経路の先頭で、数値“1”を保存する(1003)。入金処理を終了し(1004)、入金処理経路の末端で、先ほどの数値“1”を3倍する処理を行い、結果“3”を保存する(1005)。処理経路の処理を終了した後で、分岐処理前に保存した文字列“入金処理”から、比較するべき数値は“3”であることを得る。処理経路の処理中に設定された数値が“3”であることを確認すれば(1012)、確かに入金処理が行われたことを確認することができる。このように、起こり得る全ての処理経路が各々独自の値を持つように処理方法を選択することで、処理経路の終了後にどのような経路で処理したかを確認することができるため、経路処理の途中での誤動作も検出することが可能である。分岐先での経路処理中に多くの検査用処理を行えば、より細かく処理経路を把握することができる。   A numerical value “1” is set at the top of the deposit process (1003), a numerical value “2” is set at the top of the withdrawal process (1006), and a numerical value “3” is set at the top of the inquiry process (1009). Also, the numerical value is multiplied by 3 at the end of the deposit process (1005), the numerical value is multiplied by 4 at the end of the withdrawal process (1008), and the numerical value is multiplied by 5 at the end of the inquiry process (1011). At this time, if the last obtained value is “3”, it indicates that the deposit processing path has been processed correctly, and if the number is “4”, the process proceeds to the withdrawal processing path due to a malfunction in the middle of the deposit processing path. If the numerical value is “5”, it indicates that the inquiry processing path has been shifted due to a malfunction in the middle of the deposit processing path. If the value is “8”, it indicates that the withdrawal processing path has been processed correctly, and if the value is “10”, the process proceeds to the inquiry process due to a malfunction in the withdrawal processing path. If the numerical value is “9”, it indicates that the processing has shifted to deposit processing due to a malfunction in the middle of the inquiry processing path. If the numerical value is “12”, the withdrawal processing is performed due to malfunction in the middle of the query processing path. Indicates that it has migrated, and the value is “1” "If, show that the query processing has been performed correctly. No other numbers can occur. If a value that cannot occur is obtained, it means that a malfunction has occurred. Suppose now that you want to execute the deposit process. After storing the character string “payment process” which is information for determining the branch destination (1001), the branch instruction is executed (1402). Processing is shifted to the deposit processing path by the branch instruction, and the numerical value “1” is stored at the head of the deposit processing path (1003). The deposit process is terminated (1004), and at the end of the deposit process path, a process of multiplying the previous numerical value “1” by three is performed, and the result “3” is stored (1005). After the processing of the processing path is completed, the numerical value to be compared is obtained as “3” from the character string “payment processing” stored before the branch processing. If it is confirmed that the numerical value set during the processing of the processing path is “3” (1012), it can be confirmed that the deposit processing has been performed. In this way, by selecting the processing method so that all possible processing paths have their own values, it is possible to check what path was processed after the end of the processing path. It is also possible to detect a malfunction during the process. If many inspection processes are performed during the path processing at the branch destination, the processing path can be grasped more finely.

図11は、図10などで示した情報処理装置Aを内蔵する情報処理装置Bであって、情報処理装置Aの出力を検査して演算が正しく行われた場合に正しい演算結果を出力し、演算が正しく行われなかった場合にはエラーであることを示す情報を出力するものである。分岐処理の検算には、情報処理装置Bへの入力値(本実施例では、そのまま情報処理装置Aへの入力値となる)と情報処理装置Aにおける分岐処理の結果の出力データK、Lを使用する。検算処理をハードウェアで実装すれば、データJに複雑な処理を施しても検算に要する時間を節約することができる。また、装置使用者は情報処理装置Bが誤動作を起こした場合にその旨の出力結果を得てそれに応じて再実行などの適切な後処理を行うことができるため、情報処理装置として条件分岐の検算処理までを含めることには大きな効果がある。情報処理装置Bは入力データ(1101)をそのまま情報処理装置Aの入力部に入力し(1102)、情報処理装置Aの出力(1106)と合わせて検算処理を行う。処理の結果、情報処理装置Aの結果が正しいものと判断されればデータ出力部から正常なデータを出力するようにセットし(1111)、不正であると判断されればデータ出力部から不正を示すデータを出力するようにセットし(1110)、データ出力手段によりセットされたデータを出力する(1112)。今、入力データI、Jが与えられたとき、情報処理装置AによりI、Jに対して演算が行われる。例えば処理fが演算経路に応じた方式でのIを暗号化演算であるとし、処理G0はJに0を、処理G1はJに1を、処理G2はJに2を加える演算とする。入力Jの値に依存して経路が正しく選択されたかどうかを情報処理装置Bはその情報処理装置Aの入出力値から判断する。検算処理(1107)は、情報処理
装置Aにおける経路選択処理(1103)と同等の演算を用いて想定される経路を決定し、その場合の処理GをJに対して行い、判定処理(1108)で情報処理装置Aの出力値であるKと比較を行い、結果が一致すれば正しく経路が選択されたと判定し、(1111)で出力データを正しいデータにセットする。結果が不一致であれば、処理が正しく行われなかったとして(1110)により処理の不正を表すデータをセットする。情報処理装置Bは、情報処理装置Aの結果から誤動作の有無を検出する処理を付加したものであり、これによりユーザーは独自に誤動作の有無を検出する必要がなくなる。図11ではさらに上記検算処理を複数回行い、すべての検算に合格した場合(1109)に正しい演算結果を出力し、演算が正しく行われなかった場合にはエラーであることを示す情報を出力する情報処理装置である。情報処理装置の設置環境や悪意者からの攻撃の種類により誤動作の発生確率やタイミングは変化するため、必ずしも1度の検算処理が正常に処理されるとは限らない。そのため、複数回の検算処理を行うことで効果的に検算処理自体の誤動作の確率を減らすことができる。例えば、1回の検算処理が確率50%で誤って演算が正しく行われたと判断する場合では、2回の検算処理が間違いを出力する確率は25%であり、3回ならば12.5%となり、7回の検算処理で間違える確率は1%以下となる。また、上記情報処理装置が誤動作を検出した際に、演算がエラーである旨の出力をする代わりに装置全体を停止させることができる。環境の変化や悪意者の意図により誤動作が集中した場合に、誤動作を表す出力データを正常に外部に伝達できなくなることがある。このような場合、情報処理装置側で装置全体に停止命令を発行することがシステムの誤動作を最低限に抑える最善の方法を与える。装置の停止は、一時的であることも恒久的なものである場合もある。
(4)カウンタ処理
カウンタは、あるサービスを提供する回数などの限度を規定する上で重要であり、処理装置使用を提供するサービス運用システムでは不可欠である。誤動作によりカウントダウン機能が誤動作すると、利用者は規定の回数を超えてその装置を利用し続けることができるため、確実にカウント処理を行う必要がある。また、カウントダウン機能の誤動作により、利用者が規定回数以下しか利用できなければ、サービスとしての運用ができなくなる。外部処理の終了待ち時間調整には一定回数のループ処理を利用することが一般的であるが、誤動作によりループ処理の回数に変化が起こるとやり取りの整合性が取れず致命的な問題となる。また、ストリーム暗号を利用する際に、途中で同期がずれるとそれ以降の暗号文全体が解読されてしまう問題が知られている。
FIG. 11 is an information processing apparatus B that includes the information processing apparatus A shown in FIG. 10 and the like, and when the operation is correctly performed by examining the output of the information processing apparatus A, the correct operation result is output. When the calculation is not performed correctly, information indicating an error is output. For verification of the branch processing, the input value to the information processing apparatus B (in this embodiment, the input value to the information processing apparatus A is used as it is) and the output data K and L as the result of the branch processing in the information processing apparatus A are used. use. If the verification process is implemented in hardware, the time required for verification can be saved even if complicated processing is performed on the data J. In addition, when the information processing device B malfunctions, the device user can obtain an output result to that effect and perform appropriate post-processing such as re-execution accordingly. Including the check process has a great effect. The information processing apparatus B inputs the input data (1101) as it is to the input unit of the information processing apparatus A (1102), and performs a verification process together with the output (1106) of the information processing apparatus A. If it is determined that the result of the information processing apparatus A is correct as a result of the processing, the data output unit is set to output normal data (1111). The data shown is set to be output (1110), and the data set by the data output means is output (1112). Now, when input data I and J are given, the information processing apparatus A performs an operation on I and J. For example, suppose that the process f is an encryption operation in a method corresponding to the operation path, the process G 0 is 0 for J, the process G 1 is 1 for J, and the process G 2 is an operation for adding 2 to J. To do. The information processing apparatus B determines from the input / output values of the information processing apparatus A whether the path is correctly selected depending on the value of the input J. In the verification process (1107), an assumed path is determined using an operation equivalent to the path selection process (1103) in the information processing apparatus A, the process G in that case is performed on J, and the determination process (1108) Then, a comparison is made with K which is the output value of the information processing apparatus A. If the results match, it is determined that the route has been correctly selected, and the output data is set to the correct data in (1111). If the results do not match, it is determined that the processing has not been performed correctly, and data representing processing fraud is set according to (1110). The information processing apparatus B is provided with a process for detecting the presence or absence of malfunction from the result of the information processing apparatus A, thereby eliminating the need for the user to independently detect the presence or absence of malfunction. In FIG. 11, the verification process is further performed a plurality of times, and if all verifications are passed (1109), the correct calculation result is output, and if the calculation is not performed correctly, information indicating an error is output. Information processing apparatus. Since the probability of occurrence and timing of malfunctioning vary depending on the installation environment of the information processing apparatus and the type of attack from the Service-to-Self, the one check process is not always processed normally. Therefore, the probability of malfunction of the verification process itself can be effectively reduced by performing the verification process a plurality of times. For example, in the case where it is determined that one verification process is erroneously performed with a probability of 50%, the probability that two verification processes output an error is 25%. Thus, the probability of mistakes in seven check processes is 1% or less. Further, when the information processing apparatus detects a malfunction, the entire apparatus can be stopped instead of outputting that the calculation is an error. When malfunctions are concentrated due to changes in the environment or the intentions of the Service-to-Self, output data representing malfunctions may not be normally transmitted to the outside. In such a case, issuing a stop command to the entire apparatus on the information processing apparatus side provides the best method for minimizing system malfunction. The stoppage of the device may be temporary or permanent.
(4) Counter processing A counter is important in defining a limit such as the number of times a certain service is provided, and is essential in a service operation system that provides use of a processing device. If the countdown function malfunctions due to a malfunction, the user can continue to use the device more than the specified number of times, and thus it is necessary to reliably perform the count process. In addition, due to malfunction of the countdown function, if the user can use less than the specified number of times, the service cannot be operated. It is common to use a certain number of loop processes for adjusting the end waiting time of external processing. However, if the number of loop processes changes due to a malfunction, the consistency of exchange cannot be obtained, which is a fatal problem. In addition, when using stream cipher, there is a problem that if the synchronization is lost in the middle, the entire ciphertext after that is decrypted.

そこで、カウンタを2つ以上用意し、それぞれについてカウント処理を行い、すべてのカウンタが終了条件に達した場合にのみ処理を終了する。途中で、一部のカウンタのみが終了条件に達した場合は、誤動作を意味するため、エラー警告を発したり動作を停止するなどの処理を行う。手順を図12および以下に示す。
1.カウンタを初期化する。
2.ループ内の処理を行う。
3.カウンタのカウントダウンを行う。
4.各カウンタの終了判定を行う。
5.各カウンタの終了判定結果を保存する。
6.すべてのカウンタについて、終了判定がNoであれば、2.へ戻る。
7.すべてのカウンタについて、終了判定がYesであれば、処理を終了する。
8.上記6.、7.いずれでもなければエラー処理を行う。
Therefore, two or more counters are prepared, the count process is performed for each counter, and the process is terminated only when all the counters reach the end condition. On the way, if only some of the counters reach the end condition, it means a malfunction, and processing such as issuing an error warning or stopping the operation is performed. The procedure is shown in FIG. 12 and below.
1. Initialize the counter.
2. Perform processing in the loop.
3. Count down the counter.
4). Determine the end of each counter.
5). Save the end judgment result of each counter.
6). If the end determination is No for all the counters, return to 2.
7). For all counters, if the end determination is Yes, the process ends.
8). If none of the above 6. or 7., error processing is performed.

本対策処理では、カウンタを2つ以上用意し、まずそれらを初期化する(1201)。次に、ループ処理に入り、ループ内処理を行う(1202)。各カウンタをカウントダウンし(1203)、カウンタ毎に終了判定を行う(1204)。各カウンタの終了判定結果を保存する(1205)。この終了判定結果を読み込み、すべての判定結果が一様にNoになっていれば、ループ処理を継続する(1202)。すべての判定結果が一様にYesになっていれば、ループ処理を終了する(1210)。これ以外のケースでは、一部のカウンタのみが終了状態に達していることになるため、誤動作をしていると判定し、エラー処理を行う(1209)。   In this countermeasure process, two or more counters are prepared, and first, they are initialized (1201). Next, a loop process is entered and an in-loop process is performed (1202). Each counter is counted down (1203), and end determination is performed for each counter (1204). The end determination result of each counter is stored (1205). This end determination result is read, and if all the determination results are uniformly No, loop processing is continued (1202). If all determination results are uniformly Yes, the loop processing is terminated (1210). In other cases, only some of the counters have reached the end state, so it is determined that a malfunction has occurred and error processing is performed (1209).

従来の繰り返し処理装置は、入力されたカウンタ値を減算し、演算結果が0になるまで繰り返し演算を行う。繰り返し処理時の誤動作によりカウンタ値が変化した場合に、カウンタ値が規定値になる前に繰り返し処理を終えてしまうことを防止する実施例を図13を用いて説明する。ここでは、入力データIは256未満の数値であるとする(1301)。JをJ=256−Iとして生成する(1302)。カウントダウン処理は、I=I−1(1303)、J=J+1(1304)、つまりコンピュータで一般的なデクリメント,インクリメントであるとする。通常のループ処理と同様にカウンタIが0であるかを検査する(1306)。
Iが0でなければ、次に演算I+Jを行い、0である場合にはエラーが起きていないと判断して、次のループへと進む(1309)。ここでエラーがあると判断された場合(I+J≠0)は速やかに、装置がそれ以上の処理を行わないように、必要に応じて異常である旨のデータを出力し、リセットなどの処理を行う(1310)。1806でI=0であった場合も、I+Jが0であるかを確認し、0であれば終了処理に進み(1308)、0でなければエラー処理に進む(1310)。カウンタを256未満としたのは、実際のCPUにおいて8ビットの数値が利用しやすいためであり、この制限は重要ではない。
The conventional iterative processing device subtracts the input counter value and repeatedly performs the operation until the operation result becomes zero. With reference to FIG. 13, a description will be given of an embodiment for preventing the repetition process from being finished before the counter value reaches a specified value when the counter value changes due to a malfunction during the repetition process. Here, it is assumed that the input data I is a numerical value less than 256 (1301). J is generated as J = 256-I (1302). It is assumed that the countdown process is I = I-1 (1303), J = J + 1 (1304), that is, a decrement and increment that are common in a computer. It is checked whether the counter I is 0 as in the normal loop processing (1306).
If I is not 0, then the operation I + J is performed. If it is 0, it is determined that no error has occurred, and the process proceeds to the next loop (1309). If it is determined that there is an error (I + J ≠ 0), data indicating that the device is abnormal is output as necessary so that the device does not perform any further processing, and processing such as resetting is performed. (1310). Even if I = 0 in 1806, it is confirmed whether I + J is 0. If 0, the process proceeds to an end process (1308), and if not 0, the process proceeds to an error process (1310). The reason why the counter is set to less than 256 is that an 8-bit numerical value is easy to use in an actual CPU, and this limitation is not important.

ここでは、カウンタを2つ使用する例を挙げたが、3つ以上の場合についても同様に処理することができる。また、カウントダウン処理としてデクリメント、インクリメントを使用したが、その他の演算を用いても良い。   Here, an example in which two counters are used has been described, but the same processing can be performed for three or more counters. Further, although decrement and increment are used as the countdown process, other operations may be used.

一例として、図14に乗算、除算を使用する場合を示す。ここでは、256回のループ処理を行う。まず、0でない数Iを生成する(1402)。JとしてIの257を法とした逆数を設定する(1403)。カウント処理では257を法として、Iは2倍算、Jは2での除算を行う(1404,1405)。カウンタの終了条件はI=1である(1407)。カウント終了条件のチェックの後にもう1つのカウンタJとの整合性をチェックするためにI×Jmod257が1であるかどうかを確認し(1408,1410)、1でなければ誤動作を意味するため、エラー処理を行う(1411)。カウント終了しており、カウンタIとJの整合性が正しければループ処理を終了する(1409)。本実施例では、オイラーの定理を利用している。同定理によると、pを素数として1≦y<pであるyについてyφ(p)mod p=1となる。ここでφ(x)はオイラー数を表す。つまり、本実施例中で用いた法257について、257と互いに素な数I(257が素数であるため、256以下で0以外の任意の数は257と互いに素である)をφ(257)=256乗すると、1になる。
(5)装置独自のカウンタ
使用者からの呼び出し回数を制限した情報処理装置について以下、説明する。情報処理装置は独自にカウンタを保持し、呼び出し毎にカウントダウンし、呼び出し回数が一定回数を超えた場合、それ以降の呼び出しに対して処理実行を拒否する。これにより、設計者が意図しない誤動作により想定回数以上の処理実行を防止することができる。例えば、データを出力する処理装置を呼び出す際に誤動作を起こせば、必要以上のデータを外部に対して出力することがある。これはセキュリティ上重要な情報を保持する装置(例えばICカードや現金処理端末装置など)においては重要な情報の漏洩に繋がり、致命的な問題となる可能性があるため、本発明による保護が必要である。さらに、実行可能回数を制限することにより、処理装置部分を単独で取り出してきて別装置に内蔵して使用するという不正使用を防止することができる。装置の運用は、以下の手順による。
1.初期化データにより、装置内のカウンタをある値に初期値化する。
2.処理装置は呼び出される毎にカウントダウンし、カウンタが終了条件に達し
ているかどうかをチェックする。
3.カウンタが終了状態でなければ処理を行う。
4.カウンタが終了状態であれば、処理を拒否して終了する。
5.制御システムは、外部からの要求に応じて初期化データを装置に送る。
As an example, FIG. 14 shows a case where multiplication and division are used. Here, 256 loop processes are performed. First, a non-zero number I is generated (1402). The reciprocal number modulo I 257 is set as J (1403). In the count processing, 257 is used as a modulus, I is doubled, and J is divided by 2 (1404 and 1405). The counter termination condition is I = 1 (1407). After checking the count end condition, in order to check the consistency with another counter J, it is checked whether I × Jmod 257 is 1 (1408, 1410). Processing is performed (1411). If the counting is completed and the consistency between the counters I and J is correct, the loop processing is terminated (1409). In this embodiment, Euler's theorem is used. According to the identification theory, yφ (p) mod p = 1 for y where 1 ≦ y <p, where p is a prime number. Here, φ (x) represents the Euler number. That is, for the modulus 257 used in this embodiment, 257 and a prime number I (because 257 is a prime number, any number other than 256 that is less than 256 is prime to 257) is φ (257). = 256, it becomes 1.
(5) Device-specific counter An information processing device that limits the number of calls from the user will be described below. The information processing apparatus independently holds a counter and counts down for each call. When the number of calls exceeds a certain number, the processing execution is refused for subsequent calls. Thereby, it is possible to prevent the execution of processing more than the expected number of times due to a malfunction not intended by the designer. For example, if a malfunction occurs when calling a processing device that outputs data, more data than necessary may be output to the outside. This may lead to the leakage of important information in a device that holds information important for security (for example, an IC card or a cash processing terminal device), and may cause a fatal problem, so protection according to the present invention is necessary. It is. Furthermore, by restricting the number of executable times, it is possible to prevent unauthorized use in which the processing device part is taken out alone and used in another device. The operation of the device is as follows.
1. Based on the initialization data, a counter in the apparatus is initialized to a certain value.
2. Each time the processing device is called, it counts down and checks whether the counter has reached an end condition.
3. If the counter is not in an end state, processing is performed.
4). If the counter is in an end state, the process is rejected and the process ends.
5). The control system sends initialization data to the device in response to an external request.

図15に示すように、ユーザ(1501)は、制御システム(1505)に対して装置の初期化要求を行う。制御システムはその要求に応じて装置内部カウンタ(1506)を初期化するための初期化コードを、装置に対して送る。装置は初期化コードに応じて内部カウンタを初期化する。ユーザが処理装置(1502)を呼び出すと、装置はカウントダウンを行い(1503)、カウンタが終了条件に達したかを判定する(1504)。カウンタが終了条件に達していなければ、処理を実行し(1507)、終了条件に達していれば処理を実行せずに終了する。該装置のカウンタを初期化するには、セキュリティを考慮する場合、暗号化したパスワードの照合などを利用する。   As shown in FIG. 15, the user (1501) makes an apparatus initialization request to the control system (1505). In response to the request, the control system sends an initialization code for initializing the device internal counter (1506) to the device. The device initializes the internal counter according to the initialization code. When the user calls the processing device (1502), the device counts down (1503) and determines whether the counter has reached an end condition (1504). If the counter does not reach the end condition, the process is executed (1507). If the counter reaches the end condition, the process ends without executing the process. In order to initialize the counter of the device, encrypted password verification or the like is used in consideration of security.

図15に示すように、制御システム(1505)は、ユーザ(1501)からの装置初期化要求を受ける。制御システムはユーザ要求の正当性を検証した後に、装置(1502)に対してカウンタ(1506)初期化コードを送信する。装置はカウンタ初期化コードの正当性を検証した後に、カウンタを要求値に設定する。次に、ユーザは装置の実行呼び出しを行う。装置はそれを受けて、内部カウンタのカウントダウンを行い(1503)、カウンタが終了していなければ(1504)処理を実行する(1507)。カウンタが終了していれば、そのまま終了する。呼び出しに対して処理を行わなくなれば、ユーザが制御システムに対して再度、初期化要求を行う。以下同様にして運用する。   As shown in FIG. 15, the control system (1505) receives a device initialization request from the user (1501). After verifying the validity of the user request, the control system sends a counter (1506) initialization code to the device (1502). After verifying the validity of the counter initialization code, the device sets the counter to the requested value. Next, the user makes an execution call of the device. In response to this, the apparatus counts down the internal counter (1503), and if the counter has not ended (1504), executes the processing (1507). If the counter has ended, the process ends. If no processing is performed for the call, the user makes an initialization request to the control system again. The same applies to the following.

装置の内部カウンタの初期化は、ユーザの要求が無くとも制御システムが特定間隔で行っても良い。この場合、図16のように、制御システム(1607)は独自に (例えばクロックに同期して)カウントダウンする(1607)ことで初期化タイミングを決定し、特定間隔でカウンタ初期化コードを送信する。装置のカウンタ初期化コードとして、暗号化パスワードなどで保護された方法を用いれば、装置の不正使用に対して安全性を向上させることができる。これにより、装置提供者は装置使用者に対して利用資源の制限を行うことができる。装置提供者は装置使用者が適当な資格を得ることでカウンタ初期化データの値の大小を調整したり、適当なタイミングで再度初期化を行うことができる。   The internal counter of the device may be initialized at a specific interval without a user request. In this case, as shown in FIG. 16, the control system (1607) determines the initialization timing by counting down (1607) independently (for example, in synchronization with the clock), and transmits the counter initialization code at a specific interval. If a method protected by an encrypted password or the like is used as the counter initialization code of the device, safety against unauthorized use of the device can be improved. As a result, the device provider can limit the resources used by the device user. The device provider can adjust the size of the value of the counter initialization data when the device user obtains an appropriate qualification, or can perform initialization again at an appropriate timing.

以上、警告や制御停止などによるタンパーエビデント性を強調したが、代わりに再計算処理などへ制御を移すことで、装置は動作を続けることが可能である。異常環境が継続すれば、無限のループに陥る可能性があるが、環境が常に変化しつづける場合、最終的に処理を正常に継続すると期待される。本発明の実施例における異常時に動作を停止するか継続するかの選択はシステム設計者の手にゆだねることができる。高セキュリティシステムであれば警告を発して停止しても良く、高度な無人システムであれば、最大限に復旧継続処理の努力を行うように設定することもできる。以上を必要に応じて組み合わせて使用することで、誤動作に対してより高い検出可能性を得ることができる。   As described above, the tamper evidence due to warning or control stop is emphasized, but the apparatus can continue to operate by shifting control to recalculation processing instead. If the abnormal environment continues, there is a possibility of falling into an infinite loop, but if the environment keeps changing, it is expected that the process will eventually continue normally. The choice of whether to stop or continue operation in the event of an abnormality in the embodiment of the present invention can be left to the system designer. If it is a high security system, it may be stopped with a warning, and if it is an advanced unmanned system, it can be set to make a continuous recovery effort as much as possible. By using the above in combination as necessary, it is possible to obtain higher detectability for malfunction.

ICカード外観図。IC card external view. ICカードのシステム図。IC card system diagram. パスワード照合処理フロー。Password verification process flow. 無限ループと、誤動作による無限ループ抜けを示す図。The figure which shows an infinite loop and the infinite loop omission by malfunction. 条件分岐を複数回実行することによる誤動作検出フロー。Malfunction detection flow by executing conditional branch multiple times. 二種類の分岐命令を併用した誤動作検出フロー。A malfunction detection flow that uses two types of branch instructions together. 分岐条件データを他フラグに移動することを利用した誤動作検出フロー。Malfunction detection flow that uses branch condition data to move to another flag. 分岐経路に依存した情報を保存することで、経路選択が正しく行われたかどうかを検査する機構を備えた分岐処理フロー。A branch processing flow equipped with a mechanism for checking whether or not a route has been selected correctly by storing information dependent on the branch route. 分岐経路情報として経路に固有の数値を設定した処理フロー。A processing flow in which a numerical value specific to a route is set as branch route information. 分岐経路情報として、経路先頭と末尾に検査用処理を設けることで、経路処理中の経路遷移を検出する処理フロー。A processing flow for detecting a route transition during route processing by providing inspection processing at the beginning and end of the route as branch route information. 分岐処理の正しさを複数回検査することにより、異常検出率を向上させる処理フロー。A processing flow that improves the abnormality detection rate by inspecting the correctness of branch processing multiple times. 複数のカウンタを用いたループ処理フロー。Loop processing flow using multiple counters. 2つのカウンタの和を使用することにより、カウンタ誤動作を検出するループ処理フロー。A loop processing flow for detecting counter malfunction by using the sum of two counters. 2つのカウンタの積を使用することにより、カウンタ誤動作を検出するループ処理フロー。A loop processing flow for detecting a counter malfunction by using the product of two counters. 装置独自のカウンタを用いた、処理回数制限機構を備える処理装置の運用方法を表す図。The figure showing the operation method of a processing apparatus provided with the processing frequency limiting mechanism using an apparatus original counter. 自動的にカウンタを初期化する制御システムと、カウンタによる実行回数制限を持つ処理装置の運用方法を示す図。The figure which shows the operation method of the control system which initializes a counter automatically, and the processing apparatus which has the frequency | count limit of execution by a counter.

Claims (4)

入力された分岐情報に基づいた分岐命令を実行する手段と、
上記分岐された経路を識別する情報をメモリに記録し、分岐された各処理を行う手段と、
上記メモリに記録した経路を識別する情報と、上記入力された分岐情報とを比較する手段とを有し、分岐処理のエラーを検知することを特徴とする情報処理装置。
Means for executing a branch instruction based on the input branch information;
Means for recording the information for identifying the branched path in a memory and performing each branched process;
An information processing apparatus comprising: information for identifying a route recorded in the memory; and means for comparing the input branch information, and detecting an error in branch processing.
上記分岐された各処理を行う手段は、
処理の先頭で上記分岐された経路を識別する情報を設定し、
上記各処理を実行し、
上記処理の末端で上記設定された情報を所定演算し、
上記比較する手段は、上記所定演算された情報を用いた比較を行うことを特徴とする請求項1記載の情報処理装置。
The means for performing each of the branched processes is as follows:
Set the information to identify the branched route at the beginning of the process,
Execute the above processes,
Predetermined calculation of the set information at the end of the process,
2. The information processing apparatus according to claim 1, wherein the comparing means performs comparison using the predetermined calculated information.
ループによる繰り返し処理を実行する情報処理装置であって、
入力されたカウンタ値を用いた所定演算により、該カウンタ値と一定の関係を有する値を算出し、
上記カウンタ値と上記算出した値それぞれについてのカウントダウン処理を行い、
上記ループ内処理を行い、
上記カウンタ値と上記算出した値を用いてエラー判断を行い、
上記エラー判断によりエラーがあると判断された場合にはエラー処理を実行し、エラーなしと判断された場合には上記カウントダウン処理に戻って繰り返し処理を実行することを特徴とする情報処理装置。
An information processing apparatus that executes loop-based repetitive processing,
Calculate a value having a certain relationship with the counter value by a predetermined calculation using the input counter value,
Perform a countdown process for each of the counter value and the calculated value,
Perform the above loop processing,
An error is determined using the counter value and the calculated value,
An information processing apparatus, wherein if an error is determined by the error determination, error processing is executed, and if it is determined that there is no error, the processing returns to the countdown processing and repeats the processing.
上記カウンタ値と一定の関係を有する値は、上記カウンタ値から所定の値を減算して算出され、
上記カウントダウン処理はインクリメント及びデクリメントを上記カウンタ値と上記算出した値に対して行うものであって、
上記エラー判断は、上記カウンタ値と上記算出した値の加算によることを特徴とする請求項3記載の情報処理装置。
A value having a certain relationship with the counter value is calculated by subtracting a predetermined value from the counter value,
The countdown process performs incrementing and decrementing on the counter value and the calculated value,
The information processing apparatus according to claim 3, wherein the error determination is based on an addition of the counter value and the calculated value.
JP2005109697A 2005-04-06 2005-04-06 Information processing apparatus Pending JP2005285133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005109697A JP2005285133A (en) 2005-04-06 2005-04-06 Information processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005109697A JP2005285133A (en) 2005-04-06 2005-04-06 Information processing apparatus

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2001138073A Division JP4009437B2 (en) 2001-05-09 2001-05-09 Information processing device

Publications (1)

Publication Number Publication Date
JP2005285133A true JP2005285133A (en) 2005-10-13

Family

ID=35183367

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005109697A Pending JP2005285133A (en) 2005-04-06 2005-04-06 Information processing apparatus

Country Status (1)

Country Link
JP (1) JP2005285133A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008126491A1 (en) 2007-03-29 2008-10-23 Kabushiki Kaisha Toshiba Information memory medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008126491A1 (en) 2007-03-29 2008-10-23 Kabushiki Kaisha Toshiba Information memory medium
US8469278B2 (en) 2007-03-29 2013-06-25 Kabushiki Kaisha Toshiba Information storage medium

Similar Documents

Publication Publication Date Title
JP4009437B2 (en) Information processing device
US11893112B2 (en) Quantitative digital sensor
JP4849606B2 (en) Control flow error detection method, data processing apparatus, and compiler
TWI512520B (en) Systems and methods for detecting attacks against a digital circuit
US7205794B2 (en) Microprocessor resistant to power analysis
US8583880B2 (en) Method for secure data reading and data handling system
US10319457B2 (en) Methods and systems of testing interfaces of computer storage for storage vulnerabilities
US9021316B2 (en) Register protected against fault attacks
US10289871B2 (en) Integrated circuit lifecycle security with redundant and overlapping crosschecks
US10223117B2 (en) Execution flow protection in microcontrollers
JP2006522968A (en) Control execution of programs for virtual machines on portable data carriers
Hasan et al. Translating circuit behavior manifestations of hardware Trojans using model checkers into run-time Trojan detection monitors
Patel et al. Architectural frameworks for security and reliability of MPSoCs
US11704128B2 (en) Method for executing a machine code formed from blocks having instructions to be protected, each instruction associated with a construction instruction to modify a signature of the block
US9111072B1 (en) Anti-reverse engineering unified process
US11288405B2 (en) Integrated circuit(s) with anti-glitch canary circuit(s)
JP2005285133A (en) Information processing apparatus
Bouffard et al. Detecting laser fault injection for smart cards using security automata
Saarinen et al. Development of the RISC-V entropy source interface
Markantonakis et al. Secure and trusted application execution on embedded devices
Del Tedesco et al. Fault-resilient non-interference
Sakamoto et al. How to code data integrity verification secure against single-spot-laser-induced instruction manipulation attacks
Bouffard et al. Security automaton to mitigate laser-based fault attacks on smart cards
Tiempo et al. Employing Linear Feedback Shift Register as a New Hardware Trojan and Extending ML-FASTrust Method as its Detection Algorithm
CN117378170A (en) Enhanced cryptography system and method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061114

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070105

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20070105

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070130

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070322

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070417

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070615

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20070622

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20070713