JP2010128571A - Semiconductor device, and method and program for controlling the same - Google Patents
Semiconductor device, and method and program for controlling the same Download PDFInfo
- Publication number
- JP2010128571A JP2010128571A JP2008299697A JP2008299697A JP2010128571A JP 2010128571 A JP2010128571 A JP 2010128571A JP 2008299697 A JP2008299697 A JP 2008299697A JP 2008299697 A JP2008299697 A JP 2008299697A JP 2010128571 A JP2010128571 A JP 2010128571A
- Authority
- JP
- Japan
- Prior art keywords
- storage area
- area information
- information
- setting
- application program
- 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
Links
Landscapes
- Storage Device Security (AREA)
Abstract
【課題】本発明は、レーザー攻撃を受けた場合であっても、自身が管理する範囲外のデータをアクセスすることを防止することが可能な半導体装置等を提供することを目的とする。
【解決手段】アプリケーションプログラムが選択される選択手段(131)と、記憶領域情報を取得する記憶領域情報取得手段(132)と、記憶領域情報が前記半導体装置(101)の前記記憶領域内か否かを判断し、記憶領域が他のアプリケーションの前記記憶領域を含んでいるか否かを判断する記憶領域情報判断手段(133)と、記憶領域情報が前記半導体装置(101)の記憶領域内であって、記憶領域情報が他のアプリケーションの前記記憶領域を含んでいないと判断された場合には、チェック情報を追加し、アプリケーションプログラムに対応する記憶領域情報を設定記憶領域情報として設定する記憶領域情報設定手段(134)と、を備える構成である。
【選択図】図2An object of the present invention is to provide a semiconductor device or the like capable of preventing access to data outside the range managed by the device even when subjected to a laser attack.
A selection means (131) for selecting an application program, a storage area information acquisition means (132) for acquiring storage area information, and whether the storage area information is within the storage area of the semiconductor device (101). Storage area information determination means (133) for determining whether or not the storage area includes the storage area of another application, and the storage area information is within the storage area of the semiconductor device (101). If the storage area information is determined not to include the storage area of another application, check area is added, and the storage area information corresponding to the application program is set as the setting storage area information. Setting means (134).
[Selection] Figure 2
Description
本発明は、本発明は、たとえば、書込み、書換え可能な不揮発性メモリおよびCPU(セントラル・プロセッシング・ユニット)などの制御素子を有するIC(集積回路)チップを内蔵し、外部装置から入力されるコマンド(命令)に基づき、各種処理を実行するICカードなどの半導体装置、半導体装置の制御方法および半導体装置の制御プログラムに関する。 The present invention incorporates an IC (integrated circuit) chip having a control element such as a writable and rewritable nonvolatile memory and a CPU (Central Processing Unit), for example, and a command input from an external device The present invention relates to a semiconductor device such as an IC card that executes various processes based on (command), a semiconductor device control method, and a semiconductor device control program.
最近、携帯可能電子装置として、不揮発性メモリとしてのEEPROM、揮発性メモリとしてのRAM、これらのメモリに対してアクセス(データの読出しおよびまたは書込み等)を行なう制御素子としてのCPU、および、CPUの動作用プログラム等を格納したROMを有し、外部から供給されるコマンド(命令)に基づきデータの書込みや読出し等を行なう手段を備えたICチップを内蔵したICカードが各産業方面で利用されている。 Recently, as a portable electronic device, an EEPROM as a nonvolatile memory, a RAM as a volatile memory, a CPU as a control element for accessing (reading or writing data, etc.) the memory, and the CPU An IC card having an IC chip having a ROM storing an operation program and the like and having means for writing and reading data based on a command (instruction) supplied from the outside is used in various industrial fields. Yes.
一般に、この種のICカードは、外部装置(ICカードリーダ・ライタ)からのデータ
書込みコマンドを受信すると、当該コマンドに付加されたデータを不揮発性メモリのコマ
ンドで指定された領域に書込むようになっている。
In general, when this type of IC card receives a data write command from an external device (IC card reader / writer), the data added to the command is written to an area designated by the command of the nonvolatile memory. It has become.
また、外部装置からのデータ読出しコマンドを受信すると、対象となるデータを不揮発
性メモリから検索し、該当したデータが存在する場合、当該データをその先頭からデータ
長分、読出すようになっている。
When a data read command is received from an external device, the target data is retrieved from the nonvolatile memory, and when the corresponding data exists, the data is read from the head for the data length. .
近年、クレジットカード、キャッシュカードなど、高いセキュリティが必要とされる分
野を対象に、磁気カードに変わってICチップを搭載したICカードの普及が始まっている。このようなICチップを搭載したICカードは、外部の機器と接触もしくは非接触でデータの読み書きをするようになされる。また、データの授受を第3者に読み取られた際に解読を困難にするため、外部の機器とデータの読み書きする際にデータを暗号化して読み書きするようになされる。
In recent years, IC cards equipped with IC chips instead of magnetic cards have begun to spread in fields requiring high security, such as credit cards and cash cards. An IC card on which such an IC chip is mounted reads and writes data with or without contact with an external device. Further, in order to make it difficult to decode data when it is read and received by a third party, the data is encrypted and read / written when the data is read / written from / to an external device.
しかし、放射、フラッシュ、光、レーザー、グリッチ、またはそれ以外による攻撃によりプログラム命令の実行が妨げられる事態が発生している。こうした攻撃は、実行される命令を変更し、結果としてプログラムの特定部分の不実行または不正確な実行を生じる。 However, there are situations in which execution of program instructions is hindered by attacks by radiation, flash, light, laser, glitch, or otherwise. Such attacks change the instructions that are executed, resulting in inexecution or inaccurate execution of certain parts of the program.
プログラムを実行すると、たとえばレーザー、グリッチ、または電磁放射による攻撃が、プロセッサによって実行される命令コードを変更し、たとえばどの命令codopも、codop 00h(6805ではBRSET0、8051およびAVRではNOP)にコンバートする。すなわち、プログラム命令は、動作不能な命令で置き換えられる。したがって、コードの特定のセクションは、実行に失敗し、または不規則に実行し、たとえばスマートカード向けのオペレーティングシステムにおけるセキュリティ処理シーケンスではなく、動作不能な命令の実行となる。攻撃は、プロセッサ動作を妨げ、プログラムメモリ内での時機を失したジャンプを引き起こす場合がある。 When the program is executed, an attack by, for example, laser, glitch, or electromagnetic radiation changes the instruction code executed by the processor, eg, any instruction codeop is converted to codeop 00h (BRSET0 in 6805, NOP in AVR) . That is, the program instruction is replaced with an inoperable instruction. Thus, certain sections of code fail to execute or execute irregularly, resulting in the execution of inoperable instructions rather than a security processing sequence in an operating system for smart cards, for example. Attacks can interfere with processor operation and cause untimely jumps in program memory.
そこで、最近、ICカードの偽造や改竄のために内部の不揮発性メモリのデータを不
正に読出すなどのいわゆる、タンパ攻撃への対策のため様々な対応策(耐タンパ対策)が
考えられている。その中で、不揮発性メモリに書込まれるデータを二重化することで、デ
ータが改竄されたことを検知する手法がある(たとえば、特許文献1参照)。
Therefore, various countermeasures (anti-tamper countermeasures) have been considered recently for countermeasures against so-called tampering attacks such as illegally reading data in an internal nonvolatile memory for counterfeiting or falsification of IC cards. . Among them, there is a method of detecting that data has been tampered with by duplicating data written to the nonvolatile memory (see, for example, Patent Document 1).
また、命令コードそのものに対するチェックを実施する方法がある(たとえば、特許文献2参照)。
しかし、攻撃技術の進歩によりコード自体は正常であるにも関わらず、メモリアクセスのタイミングで読み書きの対象アドレスを変化させる攻撃を行うことが可能となっている(レーザー攻撃)。 However, due to advances in attack technology, it is possible to perform an attack that changes the read / write target address at the timing of memory access even though the code itself is normal (laser attack).
したがって、データの読み書きを行う際に悪意のある第三者が外部からアドレスを攻撃しアドレスを変化させた場合、自身が管理する範囲外のデータをアクセスする可能性がある。 Therefore, when a malicious third party attacks an address from the outside and changes the address when reading or writing data, there is a possibility of accessing data outside the range managed by the third party.
そこで、本発明は、レーザー攻撃を受けた場合であっても、データへアクセスする場合にデータを管理するメモリ管理処理を経由すること、さらにメモリ管理処理がデータへアクセスする際に、指定されたアドレスがアクセス可能な領域であることを確認することにより、自身が管理する範囲外のデータをアクセスすることを防止することが可能な半導体装置、半導体装置の制御方法および半導体装置の制御プログラムを提供することを目的とする。 Therefore, the present invention is specified even when the data is accessed by going through a memory management process for managing the data when accessing the data, and when the memory management process accesses the data. Provided are a semiconductor device, a semiconductor device control method, and a semiconductor device control program capable of preventing access to data outside the range managed by the address by confirming that the address is an accessible area The purpose is to do.
上記課題を解決するため、本発明は次のような構成を採用する。 In order to solve the above problems, the present invention employs the following configuration.
すなわち、請求項1に係る発明は、少なくとも2つ以上のアプリケーションプログラムを備えるデータ情報を処理する半導体装置(101)において、前記アプリケーションプログラムの選択情報に基づいて前記アプリケーションプログラムが選択される選択手段(131)と、前記選択手段(131)によって選択された前記アプリケーションプログラムから記憶領域情報を取得する記憶領域情報取得手段(132)と、前記記憶領域情報によって示される記憶領域が前記半導体装置(101)の前記記憶領域内か否かを判断し、前記記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいるか否かを判断する記憶領域情報判断手段(133)と、前記記憶領域情報判断手段(133)によって、前記記憶領域情報によって示される前記記憶領域が前記半導体装置(101)の前記記憶領域内であって、前記記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいないと判断された場合には、前記記憶領域情報にチェック情報を追加し、前記アプリケーションプログラムに対応する前記記憶領域情報を設定記憶領域情報として設定する記憶領域情報設定手段(134)と、を備えることを特徴とする。 That is, according to the first aspect of the present invention, in the semiconductor device (101) for processing data information including at least two or more application programs, the selection means (101) for selecting the application program based on the selection information of the application program. 131), storage area information acquisition means (132) for acquiring storage area information from the application program selected by the selection means (131), and the storage area indicated by the storage area information is the semiconductor device (101). Storage area information determining means (133) for determining whether or not the storage area indicated by the storage area information includes the storage area of another application; The storage area information judging means (133) It is determined that the storage area indicated by the storage area information is within the storage area of the semiconductor device (101), and the storage area indicated by the storage area information does not include the storage area of another application. Storage area information setting means (134) for adding check information to the storage area information and setting the storage area information corresponding to the application program as setting storage area information. To do.
また、請求項2に係る発明は、請求項1に記載の半導体装置(101)おいて、前記記憶領域情報取得手段(132)が、前記選択手段(131)によって選択された前記アプリケーションプログラムから読み出し記憶領域情報を取得した場合に、前記記憶領域情報設定手段(134)によって設定された前記設定記憶領域情報に追加された前記チェック情報を用いて前記設定記憶領域情報が書き換えられていないかをチェックする設定記憶領域情報チェック手段(135)と、前記設定記憶領域情報チェック手段(135)によって前記設定記憶領域情報が書き換えられていないことがチェックされた場合に、前記読み出し記憶領域情報によって示される前記記憶領域が前記選択手段(131)によって選択された前記アプリケーションプログラムに対応する前記設定記憶領域情報によって示される前記記憶領域に含まれるかを判定する読み出し記憶領域情報チェック手段(136)と、前記読み出し記憶領域情報チェック手段(136)によって、前記読み出し記憶領域情報によって示される前記記憶領域が前記選択手段(131)によって選択された前記アプリケーションプログラムに対応する前記設定記憶領域情報によって示される前記記憶領域に含まれていると判定された場合に、前記読み出し記憶領域情報に対応する記憶領域のデータ情報を読み出すデータ情報読出手段(137)と、を更に備えることを特徴とする。 According to a second aspect of the present invention, in the semiconductor device (101) according to the first aspect, the storage area information acquisition unit (132) reads out from the application program selected by the selection unit (131). When storage area information is acquired, it is checked whether the setting storage area information has been rewritten using the check information added to the setting storage area information set by the storage area information setting means (134) When the setting storage area information check means (135) and the setting storage area information check means (135) check that the setting storage area information is not rewritten, the read storage area information indicates The application program whose storage area has been selected by the selection means (131). Read storage area information check means (136) for determining whether or not it is included in the storage area indicated by the setting storage area information corresponding to the gram, and the read storage area information check means (136). When it is determined that the storage area indicated by is included in the storage area indicated by the setting storage area information corresponding to the application program selected by the selection means (131), the read storage area Data information reading means (137) for reading data information in the storage area corresponding to the information is further provided.
さらに、請求項3に係る発明は、請求項1に記載の半導体装置(101)おいて、前記記憶領域情報取得手段(134)が、前記選択手段(131)によって選択された前記アプリケーションプログラムから更新記憶領域情報を取得した場合に、前記記憶領域情報設定手段(134)によって設定された前記設定記憶領域情報に追加された前記チェック情報を用いて前記設定記憶領域情報が書き換えられていないかをチェックする設定記憶領域情報チェック手段(135)と、前記設定記憶領域情報チェック手段(135)によって前記設定記憶領域情報が書き換えられていないことがチェックされた場合に、前記更新記憶領域情報によって示される前記記憶領域が前記選択手段(131)によって選択された前記アプリケーションプログラムに対応する前記設定記憶領域情報によって示される前記記憶領域に含まれるかを判定する更新記憶領域情報チェック手段(138)と、前記更新記憶領域情報チェック手段(138)によって、前記更新記憶領域情報によって示される前記記憶領域が前記選択手段によって選択された前記アプリケーションプログラムに対応する前記設定記憶領域情報によって示される前記記憶領域に含まれていると判定された場合に、前記更新記憶領域情報に対応する前記記憶領域の前記データ情報を更新するデータ情報更新手段(139)と、を更に備えることを特徴とする。 Further, the invention according to claim 3 is the semiconductor device (101) according to claim 1, wherein the storage area information acquisition means (134) is updated from the application program selected by the selection means (131). When storage area information is acquired, it is checked whether the setting storage area information has been rewritten using the check information added to the setting storage area information set by the storage area information setting means (134) When the setting storage area information check means (135) to check and the setting storage area information check means (135) check that the setting storage area information has not been rewritten, the update storage area information indicates the The application program whose storage area has been selected by the selection means (131) The update storage area information check means (138) for determining whether or not it is included in the storage area indicated by the setting storage area information corresponding to the update storage area information by the update storage area information check means (138) When it is determined that the indicated storage area is included in the storage area indicated by the setting storage area information corresponding to the application program selected by the selection means, the update storage area information corresponds to the update storage area information Data information updating means (139) for updating the data information in the storage area is further provided.
さらに、請求項4に係る発明は、請求項2に記載の半導体装置(101)おいて、前記データ情報読出手段(137)が前記データ情報をバイト単位で読み出す毎に、前記設定記憶領域情報チェック手段(135)は、前記記憶領域情報設定手段(134)によって設定された前記設定記憶領域情報に追加された前記チェック情報を用いて前記設定記憶領域情報が書き換えられていないかをチェックし、前記読み出し記憶領域情報チェック手段(136)は前記読み出し記憶領域情報によって示される前記記憶領域が前記選択手段(131)によって選択された前記アプリケーションプログラムに対応する前記設定記憶領域情報によって示される前記記憶領域に含まれるか否かを判定することを特徴とする。 Further, the invention according to claim 4 is the semiconductor device (101) according to claim 2, wherein the setting storage area information check is performed each time the data information reading means (137) reads the data information in byte units. The means (135) checks whether the setting storage area information has been rewritten using the check information added to the setting storage area information set by the storage area information setting means (134), and A read storage area information check means (136) is provided in the storage area indicated by the setting storage area information corresponding to the application program in which the storage area indicated by the read storage area information is selected by the selection means (131). It is characterized by determining whether it is included.
さらに、請求項5に係る発明は、請求項3に記載の半導体装置(101)おいて、前記データ情報更新手段(139)が前記データ情報をバイト単位で更新する毎に、前記設定記憶領域情報チェック手段(135)は、前記記憶領域情報設定手段(134)によって設定された前記設定記憶領域情報に追加された前記チェック情報を用いて前記設定記憶領域情報が書き換えられていないかをチェックし、前記更新記憶領域情報チェック手段(138)は前記更新記憶領域情報によって示される前記記憶領域が前記選択手段(131)によって選択された前記アプリケーションプログラムに対応する前記設定記憶領域情報によって示される前記記憶領域に含まれるか否かを判定することを特徴とする。 Furthermore, the invention according to claim 5 is the semiconductor device (101) according to claim 3, wherein each time the data information update means (139) updates the data information in byte units, the setting storage area information Check means (135) checks whether the setting storage area information has been rewritten using the check information added to the setting storage area information set by the storage area information setting means (134), The update storage area information check means (138) indicates the storage area indicated by the setting storage area information corresponding to the application program in which the storage area indicated by the update storage area information is selected by the selection means (131). It is characterized by determining whether it is contained in.
さらに、請求項6に係る発明は、少なくとも2つ以上のアプリケーションプログラムを備えるデータ情報を処理する半導体装置(101)の制御方法において、前記アプリケーションプログラムの選択情報に基づいて前記アプリケーションプログラムが選択される選択工程(131)と、前記選択工程(131)において選択された前記アプリケーションプログラムから記憶領域情報を取得する記憶領域情報取得工程(132)と、前記記憶領域情報によって示される記憶領域が前記半導体装置(101)の前記記憶領域内か否かを判断し、前記記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいるか否かを判断する記憶領域情報判断工程(133)と、前記記憶領域情報判断工程(133)において、前記記憶領域情報によって示される前記記憶領域が前記半導体装置(101)の前記記憶領域内であって、前記記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいないと判断された場合には、前記記憶領域情報にチェック情報を追加し、前記アプリケーションプログラムに対応する前記記憶領域情報を設定記憶領域情報として設定する記憶領域情報設定工程(134)と、を備えることを特徴とする。 Furthermore, the invention according to claim 6 is a control method of a semiconductor device (101) for processing data information comprising at least two or more application programs, wherein the application program is selected based on selection information of the application program. A selection step (131), a storage region information acquisition step (132) for acquiring storage region information from the application program selected in the selection step (131), and a storage region indicated by the storage region information is the semiconductor device A storage area information determination step (133) for determining whether or not the storage area is within the storage area in (101) and determining whether or not the storage area indicated by the storage area information includes the storage area of another application And in the storage area information judging step (133). The storage area indicated by the storage area information is within the storage area of the semiconductor device (101), and the storage area indicated by the storage area information does not include the storage area of another application. A storage area information setting step (134) for adding check information to the storage area information and setting the storage area information corresponding to the application program as setting storage area information. It is characterized by.
さらに、請求項7に係る発明は、少なくとも2つ以上のアプリケーションプログラムを備えるデータ情報を処理する半導体装置(101)に含まれるコンピュータを、前記アプリケーションプログラムの選択情報に基づいて前記アプリケーションプログラムが選択される選択手段(131)、前記選択手段(131)によって選択された前記アプリケーションプログラムから記憶領域情報を取得する記憶領域情報取得手段(132)、前記記憶領域情報によって示される記憶領域が前記半導体装置(101)の前記記憶領域内か否かを判断し、前記記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいるか否かを判断する記憶領域情報判断手段(133)、前記記憶領域情報判断手段(133)によって、前記記憶領域情報によって示される前記記憶領域が前記半導体装置(101)の前記記憶領域内であって、前記記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいないと判断された場合には、前記記憶領域情報にチェック情報を追加し、前記アプリケーションプログラムに対応する前記記憶領域情報を設定記憶領域情報として設定する記憶領域情報設定手段(134)として機能させることを特徴とする。 Furthermore, in the invention according to claim 7, a computer included in the semiconductor device (101) that processes data information including at least two or more application programs is selected based on the selection information of the application program. Selection means (131), storage area information acquisition means (132) for acquiring storage area information from the application program selected by the selection means (131), and the storage area indicated by the storage area information is the semiconductor device ( 101) a storage area information determination unit (133) for determining whether the storage area is within the storage area and determining whether the storage area indicated by the storage area information includes the storage area of another application; According to the storage area information judging means (133) The storage area indicated by the storage area information is within the storage area of the semiconductor device (101), and the storage area indicated by the storage area information does not include the storage area of another application. If it is determined that the storage area information is added, check information is added to the storage area information and the storage area information corresponding to the application program is set as storage area information setting means (134). Features.
さらに、請求項8に係わる発明では、請求項1乃至4の何れか一項に記載の前記半導体装置(101)はIC(Integrate Circuit)チップ(102)を搭載したICカード(101)であることを特徴とする。 Furthermore, in the invention according to claim 8, the semiconductor device (101) according to any one of claims 1 to 4 is an IC card (101) on which an IC (Integrated Circuit) chip (102) is mounted. It is characterized by.
本発明によれば、アプリケーションプログラム毎のアクセス可能領域を示す情報に対してレーザー攻撃をされた場合であっても、アクセス可能領域を示す情報にチェック情報が付加されており、チェック情報が正当でない場合にはアクセス可能領域を設定しないので、レーザー攻撃による誤動作を回避することが可能になる。 According to the present invention, even when a laser attack is performed on information indicating the accessible area for each application program, the check information is added to the information indicating the accessible area, and the check information is not valid. In some cases, an accessible area is not set, so that malfunction due to a laser attack can be avoided.
また、本発明によれば、データアクセスアドレスに対してレーザー攻撃をされた場合であっても、そのレーザー攻撃を検知することが可能となり、重要なデータを読み出されることなくプログラムが正常に動作するので、レーザー攻撃による重要なデータの読み出し動作を回避することが可能になる。 Further, according to the present invention, even when a laser attack is performed on a data access address, the laser attack can be detected, and the program operates normally without reading important data. Therefore, it becomes possible to avoid an important data reading operation due to a laser attack.
さらに、本発明によれば、データアクセスアドレスに対してレーザー攻撃をされた場合であっても、そのレーザー攻撃を検知することが可能となり、重要なデータを更新される(書き換えられる)ことなくプログラムが正常に動作するので、レーザー攻撃による重要なデータの更新(書き換え)動作を回避することが可能になる。 Furthermore, according to the present invention, even when a laser attack is performed on a data access address, the laser attack can be detected and a program can be executed without updating (rewriting) important data. Since it operates normally, it becomes possible to avoid an important data update (rewrite) operation by a laser attack.
さらに、本発明によれば、データアクセスアドレスに対してレーザー攻撃をされた場合であっても、より確実にそのレーザー攻撃を検知することが可能となり、重要なデータを読み出される(あるいは書き換えられる)ことなくプログラムが正常に動作し、安全性が高まるので、レーザー攻撃による重要なデータの読み出し(書き換え)動作を確実に回避することが可能になる。 Furthermore, according to the present invention, even when a laser attack is performed on a data access address, the laser attack can be detected more reliably, and important data can be read (or rewritten). Since the program operates normally and the safety is improved, it is possible to reliably avoid the important data read (rewrite) operation by the laser attack.
以下、図面を参照して本発明を実施するための最良の形態について説明する。 The best mode for carrying out the present invention will be described below with reference to the drawings.
但し、本発明は多くの異なる態様で実施することが可能であり、本発明の趣旨及びその範囲から逸脱することなくその形態及び詳細を様々に変更し得ることは当業者であれば容易に理解される。従って、本実施の形態の記載内容に限定して解釈されるものではない。なお、実施の形態を説明するための全図において、同一部分又は同様な機能を有する部分には同一の符号を付し、その繰り返しの説明は省略する。 However, the present invention can be implemented in many different modes, and those skilled in the art can easily understand that the modes and details can be variously changed without departing from the spirit and scope of the present invention. Is done. Therefore, the present invention is not construed as being limited to the description of this embodiment mode. Note that in all the drawings for describing the embodiments, the same portions or portions having similar functions are denoted by the same reference numerals, and repetitive description thereof is omitted.
(実施形態)
本実施の形態では、本発明におけるレーザー攻撃を阻止する機能を実現するための装置構成及び、フローチャートについて説明する。
(Embodiment)
In this embodiment, an apparatus configuration and a flowchart for realizing a function of preventing a laser attack in the present invention will be described.
図1に本発明におけるレーザー攻撃を阻止する機能を搭載する対象であるデータ情報を処理する半導体装置であるICチップを含むICカードのブロック図を示す。 FIG. 1 shows a block diagram of an IC card including an IC chip which is a semiconductor device for processing data information which is a target for mounting a function for preventing a laser attack in the present invention.
図1において、ICカード101は、演算回路106、アナログ部115を有する。演算回路106は、CPU102(Central Processing Unit;中央処理装置ともいう。またMPU(microprocessor)ともいう。)、ROM103(Read Only Memory;読み出し専用メモリともいう)、RAM104(Random Access Memory;ランダムアクセスメモリともいう)、補助演算装置124、フラッシュメモリ等の不揮発性メモリ125、コントローラ105を有する。また、アナログ部115は、アンテナ107、共振回路108、電源回路109、リセット回路110、クロック生成回路111、復調回路112、変調回路113、電源管理回路114を有する。また、コントローラ105は、CPUインターフェース116(CPUIF)、制御レジスタ117、コード抽出回路118、符号化回路119より構成される。なお、図1では、説明の簡略化のため通信信号として、受信信号120と送信信号121とに分けて示したが、実際には両者は重ね合わされており、ICカード101及びリーダライタ装置の間で同時に送受信される。受信信号120は、アンテナ107と共振回路108とで受信された後、復調回路112により復調される。また、送信信号121は、変調回路113により変調された後、アンテナ107より送信される。なお、受信信号及び送信信号とは、ICカード側を主体とした表現であり、ICカードが外部からの信号を受信、外部に信号を送信するものであることを付記する。本明細書においては、リーダライタよりICカードが受信する信号、換言すればリーダライタが送信する信号のことを外部からの信号といい、外部からの信号をICカードが受信及びリーダライタが送信することを外部からの信号の送受信という。 In FIG. 1, the IC card 101 includes an arithmetic circuit 106 and an analog unit 115. The arithmetic circuit 106 includes a CPU 102 (also referred to as a central processing unit; also referred to as an MPU (micro processor)), a ROM 103 (also referred to as a read only memory), and a RAM 104 (random access memory). An auxiliary arithmetic unit 124, a non-volatile memory 125 such as a flash memory, and a controller 105. The analog unit 115 includes an antenna 107, a resonance circuit 108, a power supply circuit 109, a reset circuit 110, a clock generation circuit 111, a demodulation circuit 112, a modulation circuit 113, and a power management circuit 114. The controller 105 includes a CPU interface 116 (CPUIF), a control register 117, a code extraction circuit 118, and an encoding circuit 119. In FIG. 1, for the sake of simplification of explanation, the received signal 120 and the transmitted signal 121 are shown separately as communication signals. However, in actuality, they are superimposed on each other between the IC card 101 and the reader / writer device. Are sent and received at the same time. The reception signal 120 is received by the antenna 107 and the resonance circuit 108 and then demodulated by the demodulation circuit 112. The transmission signal 121 is transmitted from the antenna 107 after being modulated by the modulation circuit 113. Note that the received signal and the transmitted signal are expressions mainly on the IC card side, and it is added that the IC card receives an external signal and transmits the signal to the outside. In this specification, a signal received by the IC card from the reader / writer, in other words, a signal transmitted by the reader / writer is referred to as an external signal, and the external signal is received by the IC card and transmitted by the reader / writer. This is called external signal transmission / reception.
なお、図1は非接触の場合について説明しているが、「アナログ部(115)+コード抽出回路(118)+符号化回路(119)」を「入出力部」と考えれば、図1の全体は接触ICカードと考えることができる。このように、本実施形態は非接触ICカードとしてだけではなく接触ICカードの実施形態と考えることもできる。 Although FIG. 1 illustrates the case of non-contact, if “analog portion (115) + code extraction circuit (118) + encoding circuit (119)” is considered as “input / output portion”, FIG. The whole can be considered as a contact IC card. Thus, this embodiment can be considered not only as a non-contact IC card but also as an embodiment of a contact IC card.
また、ROM103は、リーダライタから受信した受信データを処理する際に機能するプログラム(レーザー攻撃阻止プログラムである本実施形態に係わるメモリ管理処理プログラム、プログラムA、プログラムBおよびプログラムC)が格納され、RAM104にはプログラムが機能した際の処理データが格納される。ROM103にはマスクROM等があり、RAM104にはスタティック型メモリ(SRAM)やダイナミック型メモリ(DRAM)等があり、不揮発性メモリ125にはNAND型フラッシュメモリ、NOR型フラッシュメモリ等のフラッシュメモリがある。不揮発性メモリ125には、履歴等のデータ、暗証番号等の情報が記憶され、レーザー攻撃の対象となり得るデータが記憶(格納)されている。 The ROM 103 stores a program that functions when processing the received data received from the reader / writer (memory management processing program according to the present embodiment, which is a laser attack prevention program, program A, program B, and program C). The RAM 104 stores processing data when the program functions. The ROM 103 includes a mask ROM, the RAM 104 includes a static memory (SRAM), a dynamic memory (DRAM), and the like, and the nonvolatile memory 125 includes a flash memory such as a NAND flash memory and a NOR flash memory. . The nonvolatile memory 125 stores data such as history, information such as a password, and stores (stores) data that can be a target of a laser attack.
また、リーダライタから受信した受信データを処理する際に機能するプログラム(レーザー攻撃阻止プログラムである本実施形態に係わるメモリ管理処理プログラム、プログラムA150、プログラムB151およびプログラムC152)が不揮発性メモリ125に格納されていてもよい(本実施形態ではこの場合について説明する)。 Further, a program (memory management processing program according to the present embodiment, which is a laser attack prevention program, program A150, program B151, and program C152) that functions when processing the received data received from the reader / writer is stored in the nonvolatile memory 125. (This case will be described in this embodiment).
さらに、記憶領域に設けられるべきROM103および/またはRAM104の代わりに記憶領域を不揮発性メモリ125で構成することも可能である。 Furthermore, the storage area can be configured by a nonvolatile memory 125 instead of the ROM 103 and / or the RAM 104 to be provided in the storage area.
例えば、レーザー攻撃から情報を保護する本実施形態に係わるメモリ管理処理プログラム、アプリケーションプログラムA150、アプリケーションプログラムB151およびアプリケーションプログラムC152に不具合が発生した場合には外部からいつでも自由にメモリ管理処理プログラム、アプリケーションプログラムA150、アプリケーションプログラムB151およびアプリケーションプログラムC152を書き換え可能に構成することができる。 For example, when a failure occurs in the memory management processing program, application program A150, application program B151, and application program C152 according to the present embodiment that protects information from laser attacks, the memory management processing program and application program are freely available from the outside at any time. A150, application program B151, and application program C152 can be configured to be rewritable.
また図2には、ROM103または不揮発性メモリ125に記憶されている、メモリ管理処理プログラム、アプリケーションプログラムA150、アプリケーションプログラムB151およびアプリケーションプログラムC152のブロック図を示す。メモリ管理処理プログラム、はCPU102上で実行されるので、図2には、CPU102上に展開された選択部131、記憶領域情報取得部132、記憶領域情報判断部133、記憶領域情報設定部134、設定記憶領域情報チェック部135、読み出し記憶領域情報チェック部136、データ情報読出部137、更新記憶領域情報チェック部138、データ情報更新部139、としてのメモリ管理処理プログラムの各機能ブロックを示した。 FIG. 2 shows a block diagram of the memory management processing program, application program A150, application program B151, and application program C152 stored in the ROM 103 or the nonvolatile memory 125. Since the memory management processing program is executed on the CPU 102, FIG. 2 shows a selection unit 131, a storage area information acquisition unit 132, a storage area information determination unit 133, a storage area information setting unit 134, which are expanded on the CPU 102. Each functional block of the memory management processing program as the setting storage area information check unit 135, the read storage area information check unit 136, the data information read unit 137, the update storage area information check unit 138, and the data information update unit 139 is shown.
メモリ管理処理プログラム、アプリケーションプログラムA150、アプリケーションプログラムB151およびアプリケーションプログラムC152の動作については、後述するフローチャートでさらに詳細に説明することにする。 The operations of the memory management processing program, application program A150, application program B151, and application program C152 will be described in more detail with reference to flowcharts described later.
また、後述するフローチャートで説明される不揮発性メモリ125領域に記憶されるレーザー攻撃の対象となるデータ情報(履歴等)と暗証番号情報等の情報は図2においてアプリケーションプログラムAデータ150d、アプリケーションプログラムB151dデータおよびアプリケーションプログラムCデータ152dとして示した。 Further, information such as data information (history, etc.) targeted for laser attack and personal identification number information stored in the non-volatile memory 125 area, which will be described later with reference to a flowchart, is the application program A data 150d and application program B 151d in FIG. Data and application program C data 152d are shown.
RAM104は、送信データレジスタ203、受信データレジスタ204を有する。送信データレジスタ203は、ICカードが送信するデータを格納する機能を有する。受信データレジスタ204は、ICカードが受信したデータを格納する機能を有する。RAM104は、ROM103に比べて情報量が少ないため、その面積は小さい。 The RAM 104 has a transmission data register 203 and a reception data register 204. The transmission data register 203 has a function of storing data transmitted by the IC card. The reception data register 204 has a function of storing data received by the IC card. Since the RAM 104 has a smaller amount of information than the ROM 103, its area is small.
また、リーダライタからICカードに送信される信号、換言するとICカードが受信する信号の構成の一例について説明する。受信信号は、SOF(Start Of Frame;フレームの開始)、フラグ、コマンド、データ、CRC(cyclic redundancy check、巡回冗長検査ともいう)、EOF(End Of Frame;フレームの終了)を有する信号である。SOF,EOFは単に信号の開始と終了を示すものである。フラグはASK、FSK等の変調の種類の情報を有する。データには、暗号解読するデータが含まれる。CRCはデータの誤認を防止するためにデータより生成される固有のコードの情報を有する。 An example of a configuration of a signal transmitted from the reader / writer to the IC card, in other words, a signal received by the IC card will be described. The received signal is a signal having SOF (Start Of Frame; start of frame), flag, command, data, CRC (also referred to as cyclic redundancy check), EOF (End Of Frame; end of frame). SOF and EOF simply indicate the start and end of the signal. The flag has modulation type information such as ASK and FSK. The data includes data to be decrypted. The CRC has information on a unique code generated from the data in order to prevent misidentification of the data.
なお、本発明でいうコンピュータとは、記憶部、制御部等を備えた情報処理装置をいい、ICカード101では、CPU102、不揮発性メモリ125等を備えて構成される。 Note that the computer in the present invention refers to an information processing apparatus including a storage unit, a control unit, and the like. The IC card 101 includes a CPU 102, a nonvolatile memory 125, and the like.
また、本発明に係るICカード101は、上述のような構成を有することにより、処理されるべきプログラムであるアプリケーションプログラムを選択し、アプリケーションプログラムがアクセスすべき記憶領域情報を取得し、記憶領域情報がICカード101上のメモリ空間であり他のアプリケーションプログラムがアクセスする範囲と重複しない場合には、記憶領域情報に記憶領域情報の改竄を判定するためのチェック情報を追加して設定記憶領域情報としてアプリケーションプログラムのデータアクセス範囲を設定する。 Further, the IC card 101 according to the present invention has the above-described configuration, so that an application program that is a program to be processed is selected, storage area information to be accessed by the application program is acquired, and storage area information is acquired. Is a memory space on the IC card 101 and does not overlap with a range accessed by another application program, check information for determining whether or not the storage area information is falsified is added to the storage area information as setting storage area information. Set the data access range of the application program.
また、アプリケーションプログラムがそのアプリケーションプログラムの設定記憶領域情報をアクセスする場合には、設定記憶領域情報が改竄されていなかをチェックし、更にアプリケーションプログラムがアクセスしようとする記憶領域情報(読み出し記憶領域情報、更新記憶領域情報)が、そのアプリケーションプログラムの設定記憶領域情報の範囲内か否かをチェックしてから、アプリケーションプログラムのアクセスを許可する機能を有している。 When the application program accesses the setting storage area information of the application program, the application program checks whether the setting storage area information has been tampered with, and further stores the storage area information (read storage area information, The update storage area information) has a function of permitting access to the application program after checking whether it is within the range of the setting storage area information of the application program.
ここで、当該機能を発揮するための構成について、図2に示す機能ブロック図を用いて説明する。本発明におけるレーザー攻撃を阻止する機能を搭載する対象であるデータ情報を処理する半導体装置であるICチップを含むICカード101は、選択部131、記憶領域情報取得部132、記憶領域情報判断部133、記憶領域情報設定部133、設定記憶領域情報チェック部134、読み出し記憶領域情報チェック部136、データ情報読出部137、更新記憶領域情報チェック部138、データ情報更新部139、を含んで構成される。 Here, a configuration for exhibiting the function will be described with reference to a functional block diagram shown in FIG. An IC card 101 including an IC chip, which is a semiconductor device that processes data information that is a target for mounting a function to prevent laser attacks in the present invention, includes a selection unit 131, a storage area information acquisition unit 132, and a storage area information determination unit 133. A storage area information setting unit 133, a setting storage area information check unit 134, a read storage area information check unit 136, a data information read unit 137, an update storage area information check unit 138, and a data information update unit 139. .
選択部131は、アプリケーションプログラムの選択情報に基づいてアプリケーションプログラムが選択される機能を有する。 The selection unit 131 has a function of selecting an application program based on application program selection information.
アプリケーションプログラムの選択情報は、上位の関数から与えられ、または受信信号120、およびICカード101のアンテナを介して入力されてもよい。 The selection information of the application program may be given from an upper function, or may be input via the reception signal 120 and the antenna of the IC card 101.
また、アプリケーションプログラムとはICカード101上で記憶されているアプリケーションプログラムA150、アプリケーションプログラムB151およびアプリケーションプログラムC152を示し、アプリケーションプログラムの選択情報に基づき、アプリケーションプログラムA150、アプリケーションプログラムB151およびアプリケーションプログラムC152の何れかが実行される場合と、複数のアプリケーションプログラムが選択され、時分割的に実行される場合とがある。 The application program refers to application program A150, application program B151, and application program C152 stored on IC card 101. Based on the selection information of the application program, any of application program A150, application program B151, and application program C152 is used. May be executed, and a plurality of application programs may be selected and executed in a time-sharing manner.
記憶領域情報取得部132は、選択部131によって選択された前記アプリケーションプログラムから記憶領域情報を取得する機能を有する。 The storage area information acquisition unit 132 has a function of acquiring storage area information from the application program selected by the selection unit 131.
この実施形態におけるアプリケーションプログラムは、処理の対象となるアプリケーションプログラムデータの読み出し、または更新をするプログラムであるので、処理の対象となるアプリケーションプログラムデータのアドレス範囲情報を示す記憶領域情報を取得する。 Since the application program in this embodiment is a program for reading or updating application program data to be processed, storage area information indicating address range information of the application program data to be processed is acquired.
記憶領域情報判断部133は、記憶領域情報によって示される記憶領域(アドレス範囲)が半導体装置であるICカード101の記憶領域内(ROM103、RAM104、不揮発メモリ125のデータを示すアドレス範囲内)か否かを判断し、記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいるか否かを判断する。 The storage area information determination unit 133 determines whether or not the storage area (address range) indicated by the storage area information is within the storage area of the IC card 101 that is a semiconductor device (within the address range indicating data in the ROM 103, RAM 104, and nonvolatile memory 125). It is determined whether or not the storage area indicated by the storage area information includes the storage area of another application.
ICカード101の記憶領域内(ROM103、RAM104、不揮発メモリ125のデータを示すアドレス範囲内)であるか否かを判断するのは、ICカード101の記憶領域外を記憶領域情報が示す場合には、プログラムが(故意、悪意等によって改竄され)暴走する可能性があるため、暴走を未然に防ぐ目的がある。 It is determined whether or not the storage area of the IC card 101 is within the storage area of the IC card 101 (within the address range indicating the data in the ROM 103, RAM 104, and nonvolatile memory 125) if the storage area information indicates the storage area outside the IC card 101. Because the program may run away (deliberately or maliciously altered), it has the purpose of preventing runaway.
記憶領域情報によって示される記憶領域が他のアプリケーションの記憶領域を含んでいるか否かを判断するのは、例えば、アプリケーションプログラムA150のデータ領域はアプリケーションプログラムAデータ150dであり、アプリケーションプログラムA150はアプリケーションプログラムAデータ150dしかアクセスできないことになっているからである。 For example, the data area of the application program A150 is the application program A data 150d, and the application program A150 determines whether the storage area indicated by the storage area information includes a storage area of another application. This is because only the A data 150d can be accessed.
アプリケーションプログラムA150から記憶領域情報取得部132が取得した記憶領域情報がアプリケーションプログラムAデータ150d以外のアプリケーションプログラムBデータ151dまたはアプリケーションプログラムCデータ152d等のデータ領域をアクセスするものである場合には、記憶領域情報が改竄されている可能性があるので範囲外へのアクセスを防ぐために、他のアプリケーションの前記記憶領域を含んでいるか否かを判断する。 If the storage area information acquired by the storage area information acquisition unit 132 from the application program A150 is to access a data area such as the application program B data 151d or the application program C data 152d other than the application program A data 150d, the storage is performed. Since there is a possibility that the area information has been tampered with, in order to prevent access outside the range, it is determined whether or not the storage area of another application is included.
記憶領域情報設定部134は、記憶領域情報判断部133によって、記憶領域情報によって示される記憶領域が半導体装置の記憶領域内であって、記憶領域情報によって示される記憶領域が他のアプリケーションの記憶領域を含んでいないと判断された場合には、前記記憶領域情報にチェック情報を追加し、前記アプリケーションプログラムに対応する前記記憶領域情報を設定記憶領域情報として設定する機能を有する。 The storage area information setting unit 134 causes the storage area information determination unit 133 to store the storage area indicated by the storage area information in the storage area of the semiconductor device, and the storage area indicated by the storage area information is a storage area of another application. When it is determined that the storage area information is not included, check information is added to the storage area information, and the storage area information corresponding to the application program is set as setting storage area information.
すなわち、記憶領域情報設定部134は、記憶領域情報がICカード101の記憶領域内(ROM103、RAM104、不揮発メモリ125のデータを示すアドレス範囲内)であり、他のアプリケーションの記憶領域を含んでいないと判断された場合には、記憶領域情報が改竄されておらず、正当であると判断し、記憶領域情報をそのアプリケーションプログラムの設定記憶領域情報として設定し、設定記憶領域情報に基づいて以降のアプリケーションプログラムのアクセス範囲をチェックする。 That is, the storage area information setting unit 134 has storage area information in the storage area of the IC card 101 (in the address range indicating data in the ROM 103, RAM 104, and nonvolatile memory 125) and does not include storage areas of other applications. If it is determined that the storage area information has not been falsified, it is determined that the storage area information is valid, and the storage area information is set as the setting storage area information of the application program. Check the access range of the application program.
また、アプリケーションプログラムは、処理の対象となるアプリケーションプログラムデータの読み出し、または更新をするプログラムであるので、改竄されないように処理の対象となるアプリケーションプログラムデータのアドレス範囲情報を示す取得した記憶領域情報にチェックサム方式やCRC方式(Cyclic Redundancy Check)、パリティチェック方式等によるチェック情報を付加する。 Further, since the application program is a program for reading or updating the application program data to be processed, the acquired storage area information indicating the address range information of the application program data to be processed is prevented from being tampered with. Check information by a checksum method, a CRC method (Cyclic Redundancy Check), a parity check method, or the like is added.
これらのチェック情報は、アプリケーションプログラムA150、アプリケーションプログラムB151およびアプリケーションプログラムC152のそれぞれのアプリケーションプログラム毎に設定されたアプリケーションプログラムAデータ150dのアドレス範囲である設定記憶領域情報、アプリケーションプログラムB151dデータのアドレス範囲である設定記憶領域情報およびアプリケーションプログラムCデータ152dのアドレス範囲である設定記憶領域情報が改竄されたか否かをチェックするために用いられる。 The check information includes setting storage area information that is an address range of application program A data 150d set for each application program of application program A150, application program B151, and application program C152, and an address range of application program B151d data. This is used for checking whether or not the setting storage area information and the setting storage area information which is the address range of the application program C data 152d have been falsified.
設定記憶領域情報チェック部135は、記憶領域情報取得部132が、選択部131によって選択されたアプリケーションプログラムから読み出し記憶領域情報を取得した場合に、記憶領域情報設定部134によって設定された設定記憶領域情報に追加されたチェック情報を用いて設定記憶領域情報が書き換えられていないかをチェックする機能を有する。 The setting storage area information check unit 135 sets the setting storage area set by the storage area information setting unit 134 when the storage area information acquisition unit 132 acquires read storage area information from the application program selected by the selection unit 131. It has a function of checking whether the setting storage area information has been rewritten using the check information added to the information.
このように設定記憶領域情報チェック部135は、アプリケーションプログラムからデータ領域へのアクセスがある度に、チェック情報を用いて設定記憶領域情報が書き換えられていないかをチェックし、設定記憶領域情報の改竄を事前に察知し、重要な他のデータ領域のデータ情報が読み出し、または、更新されないようにしている。 In this way, the setting storage area information check unit 135 checks whether the setting storage area information has been rewritten using the check information every time the application program accesses the data area, and falsifies the setting storage area information. Is detected in advance so that data information in other important data areas is not read or updated.
読み出し記憶領域情報チェック部136は、設定記憶領域情報チェック部135によって設定記憶領域情報が書き換えられていないことがチェックされた場合に、読み出し記憶領域情報によって示される記憶領域が選択部131によって選択されたアプリケーションプログラムに対応する設定記憶領域情報によって示される記憶領域に含まれるか否かを判定する機能を有する。 The read storage area information check unit 136 selects the storage area indicated by the read storage area information by the selection unit 131 when the setting storage area information check unit 135 checks that the setting storage area information has not been rewritten. It has a function of determining whether or not it is included in the storage area indicated by the setting storage area information corresponding to the application program.
このように、読み出し記憶領域情報チェック部136は、読み出し記憶領域情報によって示される記憶領域が、その選択されたアプリケーションプログラムがアクセスすることが許容されている記憶領域(設定記憶領域情報)内のデータをアクセスするものか否かを判定し、読み出し記憶領域情報がアクセスすることが許容されている記憶領域(設定記憶領域情報)内の場合にのみ、そのアクセスを許容する。 In this way, the read storage area information check unit 136 stores data in the storage area (setting storage area information) that the selected application program is allowed to access to the storage area indicated by the read storage area information. The access is permitted only when the read storage area information is within the storage area (set storage area information) that is allowed to be accessed.
例えば、アプリケーションプログラムA150の設定記憶領域情報が示す設定記憶領域のデータはアプリケーションプログラムAデータ150dであり、アプリケーションプログラムB151の設定記憶領域情報が示す設定記憶領域のデータはアプリケーションプログラムBデータ151dであり、アプリケーションプログラムC152の設定記憶領域情報が示す設定記憶領域のデータはアプリケーションプログラムCデータ152dである。 For example, the data in the setting storage area indicated by the setting storage area information of the application program A150 is application program A data 150d, and the data in the setting storage area indicated by the setting storage area information of the application program B151 is application program B data 151d. The data in the setting storage area indicated by the setting storage area information of the application program C152 is application program C data 152d.
データ情報読出部137は、読み出し記憶領域情報チェック部136によって、読み出し記憶領域情報によって示される記憶領域が選択部131によって選択されたアプリケーションプログラムに対応する設定記憶領域情報によって示される前記記憶領域に含まれていると判定された場合に、前記読み出し記憶領域情報に対応する記憶領域のデータ情報を読み出す機能を有する。 The data information reading unit 137 includes the storage area indicated by the read storage area information by the read storage area information check unit 136 in the storage area indicated by the setting storage area information corresponding to the application program selected by the selection unit 131. When it is determined that the data is read, it has a function of reading data information in a storage area corresponding to the read storage area information.
更新記憶領域情報チェック部138は、設定記憶領域情報チェック部135によって設定記憶領域情報が書き換えられていないことがチェックされた場合に、更新記憶領域情報によって示される記憶領域が選択部131によって選択されたアプリケーションプログラムに対応する設定記憶領域情報によって示される記憶領域に含まれるかを判定する機能を有する。 The update storage area information check unit 138 selects the storage area indicated by the update storage area information by the selection unit 131 when the setting storage area information check unit 135 checks that the setting storage area information has not been rewritten. A function of determining whether the data is included in the storage area indicated by the setting storage area information corresponding to the application program.
このように、更新設定記憶領域情報チェック部138は、更新記憶領域情報によって示される記憶領域が、その選択されたアプリケーションプログラムがアクセスすることが許容されている記憶領域(設定記憶領域情報)内のデータをアクセスするものか否かを判定し、更新記憶領域情報がアクセスすることが許容されている記憶領域(設定記憶領域情報)内の場合にのみ、そのアクセスを許容する。 As described above, the update setting storage area information check unit 138 has the storage area indicated by the update storage area information in the storage area (setting storage area information) that the selected application program is allowed to access. It is determined whether or not the data is to be accessed, and the access is permitted only when the update storage area information is within the storage area (set storage area information) that is allowed to be accessed.
例えば、アプリケーションプログラムA150の設定記憶領域情報が示す設定記憶領域のデータはアプリケーションプログラムAデータ150dであり、アプリケーションプログラムB151の設定記憶領域情報が示す設定記憶領域のデータはアプリケーションプログラムBデータ151dであり、アプリケーションプログラムC152の設定記憶領域情報が示す設定記憶領域のデータはアプリケーションプログラムCデータ152dであり、それぞれのデータが、それぞれのアプリケーションプログラムのアクセス許容範囲である。 For example, the data in the setting storage area indicated by the setting storage area information of the application program A150 is application program A data 150d, and the data in the setting storage area indicated by the setting storage area information of the application program B151 is application program B data 151d. The data in the setting storage area indicated by the setting storage area information of the application program C152 is application program C data 152d, and each piece of data is an allowable access range of each application program.
データ情報更新部139は、更新記憶領域情報チェック部138によって、更新記憶領域情報によって示される記憶領域が選択部131によって選択されたアプリケーションプログラムに対応する設定記憶領域情報によって示される記憶領域に含まれていると判定された場合に、更新記憶領域情報に対応する記憶領域のデータ情報を更新する(書き換える)機能を有する。 In the data information update unit 139, the storage area indicated by the update storage area information by the update storage area information check unit 138 is included in the storage area indicated by the setting storage area information corresponding to the application program selected by the selection unit 131. A function to update (rewrite) data information in the storage area corresponding to the update storage area information.
[実施例1]
次に、図2におけるCPU102でのレーザー攻撃を阻止する機能をもつメモリ管理処理プログラムの動作の一部を、図3のフローチャートと対応させながら説明する。
[Example 1]
Next, a part of the operation of the memory management processing program having a function of preventing the laser attack in the CPU 102 in FIG. 2 will be described in correspondence with the flowchart of FIG.
図3は、本実施形態のメモリ管理処理プログラムの一部であるアプリケーションプログラムが設定記憶領域情報によって示される記憶領域を設定する動作を示すフローチャートである。 FIG. 3 is a flowchart showing an operation of setting a storage area indicated by the setting storage area information by an application program which is a part of the memory management processing program of the present embodiment.
より、具体的には、処理されるべきプログラムであるアプリケーションプログラムを選択し、アプリケーションプログラムがアクセスすべき記憶領域情報を取得し、記憶領域情報がICカード101上のメモリ空間であり他のアプリケーションプログラムがアクセスする範囲と重複しない場合には、記憶領域情報に記憶領域情報の改竄を判定するためのチェック情報を追加して設定記憶領域情報としてアプリケーションプログラムのデータアクセス範囲を設定する処理について説明する。 More specifically, an application program which is a program to be processed is selected, storage area information to be accessed by the application program is acquired, and the storage area information is a memory space on the IC card 101 and other application programs Is not overlapped with the access range, a process for adding the check information for determining whether the storage area information is falsified to the storage area information and setting the data access range of the application program as the setting storage area information will be described.
ステップS1において、ICカード101上のメモリ空間にあるアプリケーションプログラムA150、アプリケーションプログラムB151およびアプリケーションプログラムC152の何れかの実行が指示される。 In step S1, execution of any of the application program A150, application program B151, and application program C152 in the memory space on the IC card 101 is instructed.
ステップS2において、メモリ管理処理プログラムにおいて実現される機能である選択部131は、アプリケーションプログラムの選択情報に基づいてアプリケーションプログラムを選択する。 In step S2, the selection unit 131, which is a function realized in the memory management processing program, selects an application program based on selection information of the application program.
ステップS3において、記憶領域情報取得部132は、選択部131によって選択されたアプリケーションプログラムから記憶領域情報を取得する。 In step S <b> 3, the storage area information acquisition unit 132 acquires storage area information from the application program selected by the selection unit 131.
ステップS4において、記憶領域情報判断部133は、ステップS3において取得した記憶領域情報によって示される記憶領域(アドレス範囲)がICカード101の記憶領域内(ROM103、RAM104、不揮発メモリ125のデータを示すアドレス範囲内)であるか否かを判断するとともに、記憶領域が他のアプリケーションプログラムの記憶領域を含んでいるか否かを判断する。 In step S4, the storage area information determination unit 133 sets the storage area (address range) indicated by the storage area information acquired in step S3 within the storage area of the IC card 101 (addresses indicating data in the ROM 103, RAM 104, and nonvolatile memory 125). And whether or not the storage area includes the storage area of another application program is determined.
記憶領域情報によって示される記憶領域が、ICカード101の記憶領域内であるとともに、他のアプリケーションプログラムの記憶領域を含んでいない場合(ステップS4:YES)にはステップS5に進み、記憶領域情報によって示される記憶領域が、ICカード101の記憶領域内でないか、または、他のアプリケーションプログラムの記憶領域を含んでいる場合(ステップS4:NO)にはステップS7に進む。 If the storage area indicated by the storage area information is within the storage area of the IC card 101 and does not include the storage area of another application program (step S4: YES), the process proceeds to step S5, and the storage area information When the storage area shown is not within the storage area of the IC card 101 or includes a storage area of another application program (step S4: NO), the process proceeds to step S7.
ステップS5において、記憶領域情報設定部134は、記憶領域情報にチェック情報を追加するとともに、ステップ3において取得したアプリケーションプログラムの記憶領域情報に基づいて設定記憶領域を設定する。 In step S5, the storage area information setting unit 134 adds check information to the storage area information and sets a setting storage area based on the storage area information of the application program acquired in step 3.
ステップS6において、メモリ管理処理プログラムは、記憶領域情報が異常であることを、メモリ管理処理プログラムを呼び出したアプリケーションプログラムに通知する。 In step S6, the memory management processing program notifies the application program that called the memory management processing program that the storage area information is abnormal.
このように図3に関わる動作によれば、アプリケーションプログラムのアクセス可能範囲である設定記憶領域の改竄を防止することが可能になる。また、記憶領域情報が異常であることを、メモリ管理処理プログラムを呼び出したプログラムに通知することが可能になる。 As described above, according to the operation related to FIG. 3, it is possible to prevent the setting storage area that is the accessible range of the application program from being falsified. It is also possible to notify the program that called the memory management processing program that the storage area information is abnormal.
[実施例2]
次に、図2におけるCPU102でのレーザー攻撃を阻止する機能をもつメモリ管理処理プログラムの動作の一例を、図4のフローチャートと対応させながら説明する。
[Example 2]
Next, an example of the operation of the memory management processing program having a function of preventing the laser attack in the CPU 102 in FIG. 2 will be described in correspondence with the flowchart of FIG.
図4は、本実施形態のメモリ管理処理プログラムの一部であるアプリケーションプログラムの読み出し記憶領域情報がアクセス可能な範囲にあるか否かをチェックする動作を示すフローチャートである。 FIG. 4 is a flowchart showing an operation for checking whether or not the read storage area information of the application program which is a part of the memory management processing program of this embodiment is within the accessible range.
具体的には、アプリケーションプログラムがそのアプリケーションプログラムの設定記憶領域情報をアクセスする場合には、設定記憶領域情報が改竄されていなかをチェックし、更にアプリケーションプログラムがアクセスしようとする記憶領域情報(読み出し記憶領域情報)が、そのアプリケーションプログラムの設定記憶領域情報の範囲内か否かをチェックしてから、アプリケーションプログラムのアクセスを許可する機能を有している。 Specifically, when the application program accesses the setting storage area information of the application program, the application program checks whether the setting storage area information has been tampered with, and further stores the storage area information (read storage) to be accessed by the application program. The area information) has a function of permitting access to the application program after checking whether it is within the range of the setting storage area information of the application program.
ステップS10において、ICカード101上のメモリ空間にあるアプリケーションプログラムA150、アプリケーションプログラムB151またはアプリケーションプログラムC152によってデータ情報の読み出し処理が指示される。 In step S10, the application program A150, application program B151, or application program C152 in the memory space on the IC card 101 instructs the data information reading process.
ステップS11において、選択部131は、アプリケーションプログラムの選択情報に基づいてアプリケーションプログラムを選択し、記憶領域情報取得部132は、選択部131によって選択されたアプリケーションプログラムから読み出し記憶領域情報を取得する。 In step S11, the selection unit 131 selects an application program based on the selection information of the application program, and the storage area information acquisition unit 132 acquires read storage area information from the application program selected by the selection unit 131.
ステップS12において、設定記憶領域情報チェック部135は、記憶領域情報設定部134によって設定された設定記憶領域情報に追加されたチェック情報を用いて設定記憶領域情報が書き換えられていないかをチェックする。 In step S12, the setting storage area information check unit 135 checks whether the setting storage area information has been rewritten using the check information added to the setting storage area information set by the storage area information setting unit 134.
設定記憶領域情報が書き換えられていない場合(ステップS12:YES)にはステップS13に進み、設定記憶領域情報が書き換えられている場合(ステップS12:NO)にはステップS17に進む。 If the setting storage area information has not been rewritten (step S12: YES), the process proceeds to step S13. If the setting storage area information has been rewritten (step S12: NO), the process proceeds to step S17.
ステップS13において、読み出し記憶領域情報チェック部136は、読み出し記憶領域情報によって示される記憶領域が選択部131によって選択されたアプリケーションプログラムに対応する設定記憶領域情報によって示される記憶領域に含まれるか否かを判定する。 In step S13, the read storage area information check unit 136 determines whether or not the storage area indicated by the read storage area information is included in the storage area indicated by the setting storage area information corresponding to the application program selected by the selection unit 131. Determine.
読み出し記憶領域情報によって示される記憶領域が選択されたアプリケーションプログラムに対応する設定記憶領域情報によって示される記憶領域に含まれる場合(ステップS13:YES)の場合にはステップS14に進み、読み出し記憶領域情報によって示される記憶領域が選択されたアプリケーションプログラムに対応する設定記憶領域情報によって示される記憶領域に含まれない場合(ステップS13:NO)の場合にはステップS17に進む。 When the storage area indicated by the read storage area information is included in the storage area indicated by the setting storage area information corresponding to the selected application program (step S13: YES), the process proceeds to step S14, and the read storage area information If the storage area indicated by is not included in the storage area indicated by the setting storage area information corresponding to the selected application program (step S13: NO), the process proceeds to step S17.
ステップS14において、データ情報読出部137は、読み出し記憶領域情報に対応する記憶領域のデータ情報を読み出す。 In step S14, the data information reading unit 137 reads the data information in the storage area corresponding to the read storage area information.
ステップS15において、データ情報読出部137は、ステップS14で読み出したデータ情報をステップS12で選択されたアプリケーションプログラムに通知する。 In step S15, the data information reading unit 137 notifies the application program selected in step S12 of the data information read in step S14.
ステップS16において、メモリ管理処理プログラムはデータの読み出し処理を終了する。 In step S16, the memory management processing program ends the data reading process.
ステップS17において、メモリ管理処理プログラムは、設定記憶領域情報の異常(改竄されている)、または、読み出し記憶領域情報が異常(アクセスが許可された範囲外をアクスしようとしている)であることを、メモリ管理処理プログラムを呼び出したアプリケーションプログラムに通知する。 In step S17, the memory management processing program indicates that the setting storage area information is abnormal (tampered) or the read storage area information is abnormal (accessing outside the permitted access range). Notify the application program that called the memory management processing program.
このように図4に関わる動作によれば、アプリケーションプログラムのアクセス可能範囲である設定記憶領域の改竄を察知することが可能になる。また、読み出し記憶領域情報が異常であることを、メモリ管理処理プログラムを呼び出したプログラムに通知することが可能になる。 As described above, according to the operation related to FIG. 4, it is possible to detect the falsification of the setting storage area which is the accessible range of the application program. In addition, it is possible to notify the program that called the memory management processing program that the read storage area information is abnormal.
[実施例3]
次に、図2におけるCPU102でのレーザー攻撃を阻止する機能をもつメモリ管理処理プログラムの動作の一例を、図5のフローチャートと対応させながら説明する。
[Example 3]
Next, an example of the operation of the memory management processing program having a function of preventing the laser attack in the CPU 102 in FIG. 2 will be described in correspondence with the flowchart of FIG.
図5は、本実施形態のメモリ管理処理プログラムの一部であるアプリケーションプログラムの更新記憶領域情報がアクセス可能な範囲にあるか否かをチェックする動作を示すフローチャートである。 FIG. 5 is a flowchart showing an operation for checking whether or not the update storage area information of the application program which is a part of the memory management processing program of the present embodiment is in an accessible range.
具体的には、アプリケーションプログラムがそのアプリケーションプログラムの設定記憶領域情報をアクセスする場合には、設定記憶領域情報が改竄されていなかをチェックし、更にアプリケーションプログラムがアクセスしようとする記憶領域情報(更新記憶領域情報)が、そのアプリケーションプログラムの設定記憶領域情報の範囲内か否かをチェックしてから、アプリケーションプログラムのアクセスを許可する機能を有している。 Specifically, when the application program accesses the setting storage area information of the application program, the application program checks whether the setting storage area information has been tampered with, and further stores the storage area information (update memory to be accessed) by the application program. The area information) has a function of permitting access to the application program after checking whether it is within the range of the setting storage area information of the application program.
ステップS20において、ICカード101上のメモリ空間にあるアプリケーションプログラムA150、アプリケーションプログラムB151またはアプリケーションプログラムC152によってデータ情報の更新処理が指示される。 In step S20, an update process of data information is instructed by the application program A150, application program B151, or application program C152 in the memory space on the IC card 101.
ステップS21において、選択部131は、アプリケーションプログラムの選択情報に基づいてアプリケーションプログラムを選択し、記憶領域情報取得部132は、選択部131によって選択されたアプリケーションプログラムから更新記憶領域情報を取得する。 In step S21, the selection unit 131 selects an application program based on the selection information of the application program, and the storage area information acquisition unit 132 acquires update storage area information from the application program selected by the selection unit 131.
ステップS22において、設定記憶領域情報チェック部135は、記憶領域情報設定部134によって設定された設定記憶領域情報に追加されたチェック情報を用いて設定記憶領域情報が書き換えられていないかをチェックする。 In step S22, the setting storage area information check unit 135 checks whether the setting storage area information has been rewritten using the check information added to the setting storage area information set by the storage area information setting unit 134.
設定記憶領域情報が書き換えられていない場合(ステップS22:YES)にはステップS23に進み、設定記憶領域情報が書き換えられている場合(ステップS22:NO)にはステップS27に進む。 If the setting storage area information has not been rewritten (step S22: YES), the process proceeds to step S23. If the setting storage area information has been rewritten (step S22: NO), the process proceeds to step S27.
ステップS23において、更新記憶領域情報チェック部138は、更新記憶領域情報によって示される記憶領域が選択部131によって選択されたアプリケーションプログラムに対応する設定記憶領域情報によって示される記憶領域に含まれるか否かを判定する。 In step S23, the update storage area information check unit 138 determines whether the storage area indicated by the update storage area information is included in the storage area indicated by the setting storage area information corresponding to the application program selected by the selection unit 131. Determine.
更新記憶領域情報によって示される記憶領域が選択されたアプリケーションプログラムに対応する設定記憶領域情報によって示される記憶領域に含まれる場合(ステップS23:YES)の場合にはステップS24に進み、更新記憶領域情報によって示される記憶領域が選択されたアプリケーションプログラムに対応する設定記憶領域情報によって示される記憶領域に含まれない場合(ステップS23:NO)の場合にはステップS26に進む。 When the storage area indicated by the update storage area information is included in the storage area indicated by the setting storage area information corresponding to the selected application program (step S23: YES), the process proceeds to step S24, and the update storage area information When the storage area indicated by is not included in the storage area indicated by the setting storage area information corresponding to the selected application program (step S23: NO), the process proceeds to step S26.
ステップS24において、データ情報更新部139は、更新記憶領域情報に対応する記憶領域のデータ情報を更新する。 In step S24, the data information update unit 139 updates the data information in the storage area corresponding to the update storage area information.
また、データ情報更新部139は、ステップS24で読み出したデータ情報をステップS22で選択されたアプリケーションプログラムに通知し、アプリケーションプログラムにおいて更新したデータ情報が正しいかをチェックしてもよい。 The data information updating unit 139 may notify the data information read in step S24 to the application program selected in step S22 and check whether the data information updated in the application program is correct.
ステップS25において、メモリ管理処理プログラムはデータ情報の更新処理を終了する。 In step S25, the memory management processing program ends the data information update processing.
ステップS26において、メモリ管理処理プログラムは、設定記憶領域情報の異常(改竄されている)、または、更新記憶領域情報が異常(アクセスが許可された範囲外をアクスしようとしている)であることを、メモリ管理処理プログラムを呼び出したアプリケーションプログラムに通知する。 In step S26, the memory management processing program indicates that the setting storage area information is abnormal (tampered) or the update storage area information is abnormal (accessing outside the permitted range of access). Notify the application program that called the memory management processing program.
このように図5に関わる動作によれば、アプリケーションプログラムのアクセス可能範囲である設定記憶領域の改竄を察知することが可能になる。また、更新記憶領域情報が異常であることを、メモリ管理処理プログラムを呼び出したプログラムに通知することが可能になる。 As described above, according to the operation related to FIG. 5, it is possible to detect the falsification of the setting storage area which is the accessible range of the application program. In addition, it is possible to notify the program that called the memory management processing program that the update storage area information is abnormal.
なお、本実施例は、本明細書中の他の実施の形態の記載とも適宜組み合わせて実施することが可能である。 Note that this example can be implemented in combination with any of the other embodiments in this specification as appropriate.
[本実施形態の概念の説明]
図6を用いて、本実施形態の概念について説明する。
(1)アプリケーション選択後にアプリケーションプログラムAは、自身が管理するアプリケーションプログラムAデータのメモリ範囲情報をメモリ管理処理へ通知する。そしてメモリ範囲情報にはチェックコード等の改竄を判定できるような情報を付加しておく。
[Description of the concept of this embodiment]
The concept of the present embodiment will be described with reference to FIG.
(1) After selecting the application, the application program A notifies the memory management process of the memory range information of the application program A data managed by itself. Then, information that can determine whether the check code has been tampered with is added to the memory range information.
(2)アクセス可能範囲の設定
メモリ管理処理は、指定されたメモリ範囲情報(チェックコード等のチェック情報を含む)をアクセス可能範囲として内部へ保持する。
(2) Setting of accessible range The memory management process holds designated memory range information (including check information such as a check code) as an accessible range.
(3)データ読み出し(またはデータの更新)
アプリケーションプログラムAは、読み出す(または更新する)データのアドレスを指定しメモリ管理処理を経由しデータへアクセスする。
(3) Data read (or data update)
The application program A specifies the address of data to be read (or updated) and accesses the data via the memory management process.
(4)アクセス可能範囲判定
メモリ管理処理は、内部で保持しているアクセス可能範囲が改竄されていないことを確認する。続いて指定されたアドレスがアクセス可能範囲内であるかを判定する。
ここでアクセス可能範囲が改竄されているか、またはアドレスがアクセス可能範囲外であることを確認した場合は次のステップへ進まず異常動作として異常動作情報をアプリケーションプログラムA通知する。
(4) Accessible range determination The memory management process confirms that the accessible range held internally has not been tampered with. Subsequently, it is determined whether the designated address is within the accessible range.
If it is confirmed that the accessible range has been tampered with or the address is outside the accessible range, the application program A is notified of abnormal operation information as an abnormal operation without proceeding to the next step.
(5)データアクセス
指定されたアドレスからデータの読み出し、または更新を行う。
(5) Data access Data is read or updated from the specified address.
(6)読み出しデータ取得
(3)にてデータ読み出しを指定した場合は、読み出したデータをアプリケーションに通知する。
(6) Read data acquisition When data read is specified in (3), the read data is notified to the application.
本発明によれば、レーザー攻撃を阻止する機能を有するICチップを備えたICカードにおいて、メモリ管理処理を備えることにより、レーザー攻撃によって内部情報を取り出すことが殆ど不可能になり、セキュリティを高めることが出来る。また、レーザー攻撃を阻止する機能を有するICチップにおいて、レーザー攻撃を阻止する方法が変更になることに伴う仕様の変更があった場合にも、ICチップのマスク設計の段階から作り直す必要がない。そのため、製造コストの削減及び製造時間の短縮ができる。また、マスク設計の変更によって再度作り直したICチップに不具合が生じているといった懸念もない。 According to the present invention, in an IC card equipped with an IC chip having a function of preventing a laser attack, by providing a memory management process, it becomes almost impossible to extract internal information by a laser attack, thereby improving security. I can do it. Further, in the case of an IC chip having a function of preventing a laser attack, even if there is a change in specifications accompanying a change in the method of preventing a laser attack, it is not necessary to recreate the IC chip from the mask design stage. Therefore, it is possible to reduce the manufacturing cost and the manufacturing time. Further, there is no concern that the IC chip that has been remade due to the change in the mask design has a defect.
さらに、従来においては、レーザー攻撃を阻止する機能を有するICチップを製造する際においては、レーザー攻撃を阻止する回路を搭載することもあった。しかしながら、本発明を採用することで、レーザー攻撃を阻止する機能を読み出し専用メモリまたは不揮発性メモリにプログラムとして格納することにより、別途レーザー攻撃を阻止する機能を備えた回路を設ける場合より、ICチップを小型化することができる。そのため、ICチップの軽量化、1枚の基板から作製できるICチップの数の増加に伴うコストの削減、またレーザー攻撃を阻止する機能を備えた回路の分だけ、トランジスタ数が減少することによる歩留まりの向上に貢献することができる。 Further, conventionally, when manufacturing an IC chip having a function of preventing a laser attack, a circuit for preventing the laser attack is sometimes mounted. However, by adopting the present invention, the function of preventing the laser attack is stored as a program in the read-only memory or the non-volatile memory, so that an IC chip is provided rather than the case of providing a circuit having the function of preventing the laser attack separately. Can be miniaturized. Therefore, the yield due to the reduction in the number of transistors by the weight reduction of the IC chip, the cost reduction accompanying the increase in the number of IC chips that can be manufactured from one substrate, and the circuit having the function of preventing the laser attack. It can contribute to improvement.
以上のように、本発明の半導体装置は物品であればどのようなものにでも設けて使用し
てもよく、ほかにも免許証、保険証、定期券、キャッシュカード、クレジットカード、電
子キー、電子マネー等に使用することができる。
As described above, the semiconductor device of the present invention may be provided and used in any goods, in addition to a license, insurance card, commuter pass, cash card, credit card, electronic key, It can be used for electronic money.
なお、図3乃至図5における動作手順を、ハードディスク等の記録媒体に予め記録しておき、或いはインターネット等のネットワークを介して予め記録しておき、これを汎用のマイクロコンピュータ等により読み出して実行することにより、当該汎用のマイクロコンピュータ等を実施形態に係わるCPUとして機能させることも可能である。 3 to 5 are recorded in advance on a recording medium such as a hard disk, or are recorded in advance via a network such as the Internet, and are read out and executed by a general-purpose microcomputer or the like. Accordingly, it is possible to cause the general-purpose microcomputer or the like to function as the CPU according to the embodiment.
さらに、本発明は上記実施例に限定されるものではなく、本発明の要旨の範囲内において種々変更可能である。 Furthermore, the present invention is not limited to the above-described embodiments, and various modifications can be made within the scope of the gist of the present invention.
さらに、本明細書に記載および図示されている実施形態は具体例としてのものであるに過ぎず、本発明の範囲を限定するものと考えるべきではないと理解すべきである。本発明の精神および範囲にしたがって上述以外の変更および修正を施すことも可能である。 Furthermore, it is to be understood that the embodiments described and illustrated herein are exemplary only and should not be considered as limiting the scope of the present invention. Other changes and modifications may be made in accordance with the spirit and scope of the invention.
101 ICカード
102 CPU102
103 ROM
104 RAM
105 コントローラ
106 演算回路
107 アンテナ
108 共振回路
109 電源回路
112 復調回路
113 変調回路
114 電源管理回路
115 アナログ部
125 フラッシュメモリ等の不揮発性メモリ
131 選択部
132 記憶領域情報取得部
133 記憶領域情報判断部
134 記憶領域情報設定部
135 設定記憶領域情報チェック部
136 読み出し記憶領域情報チェック部
137 データ情報読出部
138 更新記憶領域情報チェック部
139 データ情報更新部
101 IC card 102 CPU 102
103 ROM
104 RAM
105 Controller 106 Arithmetic Circuit 107 Antenna 108 Resonant Circuit 109 Power Supply Circuit 112 Demodulation Circuit 113 Modulation Circuit 114 Power Management Circuit 115 Analog Unit 125 Nonvolatile Memory such as Flash Memory 131 Selection Unit 132 Storage Area Information Acquisition Unit 133 Storage Area Information Determination Unit 134 Storage area information setting section 135 Setting storage area information checking section 136 Reading storage area information checking section 137 Data information reading section 138 Updating storage area information checking section 139 Data information updating section
Claims (8)
前記アプリケーションプログラムの選択情報に基づいて前記アプリケーションプログラムが選択される選択手段と、
前記選択手段によって選択された前記アプリケーションプログラムから記憶領域情報を取得する記憶領域情報取得手段と、
前記記憶領域情報によって示される記憶領域が前記半導体装置の前記記憶領域内か否かを判断し、前記記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいるか否かを判断する記憶領域情報判断手段と、
前記記憶領域情報判断手段によって、前記記憶領域情報によって示される前記記憶領域が前記半導体装置の前記記憶領域内であって、前記記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいないと判断された場合には、前記記憶領域情報にチェック情報を追加し、前記アプリケーションプログラムに対応する前記記憶領域情報を設定記憶領域情報として設定する記憶領域情報設定手段と、
を備えることを特徴とする半導体装置。 In a semiconductor device for processing data information comprising at least two or more application programs,
Selection means for selecting the application program based on selection information of the application program;
Storage area information acquisition means for acquiring storage area information from the application program selected by the selection means;
It is determined whether or not the storage area indicated by the storage area information is within the storage area of the semiconductor device, and whether or not the storage area indicated by the storage area information includes the storage area of another application. Storage area information judging means for judging;
The storage area information judging means determines that the storage area indicated by the storage area information is in the storage area of the semiconductor device, and the storage area indicated by the storage area information is the storage area of another application. A storage area information setting means for adding check information to the storage area information and setting the storage area information corresponding to the application program as setting storage area information,
A semiconductor device comprising:
前記記憶領域情報取得手段が、前記選択手段によって選択された前記アプリケーションプログラムから読み出し記憶領域情報を取得した場合に、前記記憶領域情報設定手段によって設定された前記設定記憶領域情報に追加された前記チェック情報を用いて前記設定記憶領域情報が書き換えられていないかをチェックする設定記憶領域情報チェック手段と、
前記設定記憶領域情報チェック手段によって前記設定記憶領域情報が書き換えられていないことがチェックされた場合に、前記読み出し記憶領域情報によって示される前記記憶領域が前記選択手段によって選択された前記アプリケーションプログラムに対応する前記設定記憶領域情報によって示される前記記憶領域に含まれるかを判定する読み出し記憶領域情報チェック手段と、
前記読み出し記憶領域情報チェック手段によって、前記読み出し記憶領域情報によって示される前記記憶領域が前記選択手段によって選択された前記アプリケーションプログラムに対応する前記設定記憶領域情報によって示される前記記憶領域に含まれていると判定された場合に、前記読み出し記憶領域情報に対応する記憶領域のデータ情報を読み出すデータ情報読出手段と、
を更に備えることを特徴とする半導体装置。 The semiconductor device according to claim 1,
The check added to the set storage area information set by the storage area information setting means when the storage area information acquisition means acquires read storage area information from the application program selected by the selection means Setting storage area information check means for checking whether the setting storage area information has been rewritten using information;
When the setting storage area information check means checks that the setting storage area information is not rewritten, the storage area indicated by the read storage area information corresponds to the application program selected by the selection means. Read storage area information check means for determining whether the storage area indicated by the setting storage area information is included,
The storage area indicated by the read storage area information is included in the storage area indicated by the setting storage area information corresponding to the application program selected by the selection means by the read storage area information check means. Data information reading means for reading data information of a storage area corresponding to the read storage area information,
A semiconductor device further comprising:
前記記憶領域情報取得手段が、前記選択手段によって選択された前記アプリケーションプログラムから更新記憶領域情報を取得した場合に、前記記憶領域情報設定手段によって設定された前記設定記憶領域情報に追加された前記チェック情報を用いて前記設定記憶領域情報が書き換えられていないかをチェックする設定記憶領域情報チェック手段と、
前記設定記憶領域情報チェック手段によって前記設定記憶領域情報が書き換えられていないことがチェックされた場合に、前記更新記憶領域情報によって示される前記記憶領域が前記選択手段によって選択された前記アプリケーションプログラムに対応する前記設定記憶領域情報によって示される前記記憶領域に含まれるかを判定する更新記憶領域情報チェック手段と、
前記更新記憶領域情報チェック手段によって、前記更新記憶領域情報によって示される前記記憶領域が前記選択手段によって選択された前記アプリケーションプログラムに対応する前記設定記憶領域情報によって示される前記記憶領域に含まれていると判定された場合に、前記更新記憶領域情報に対応する前記記憶領域の前記データ情報を更新するデータ情報更新手段と、
を更に備えることを特徴とする半導体装置。 The semiconductor device according to claim 1,
The check added to the set storage area information set by the storage area information setting means when the storage area information acquisition means acquires update storage area information from the application program selected by the selection means Setting storage area information check means for checking whether the setting storage area information has been rewritten using information;
When the setting storage area information check means checks that the setting storage area information has not been rewritten, the storage area indicated by the update storage area information corresponds to the application program selected by the selection means. Update storage area information check means for determining whether the storage area is included in the storage area indicated by the setting storage area information
The storage area indicated by the update storage area information is included in the storage area indicated by the setting storage area information corresponding to the application program selected by the selection means by the update storage area information check means. Data information updating means for updating the data information in the storage area corresponding to the update storage area information,
A semiconductor device further comprising:
前記データ情報読出手段が前記データ情報をバイト単位で読み出す毎に、前記設定記憶領域情報チェック手段は、前記記憶領域情報設定手段によって設定された前記設定記憶領域情報に追加された前記チェック情報を用いて前記設定記憶領域情報が書き換えられていないかをチェックし、前記読み出し記憶領域情報チェック手段は前記読み出し記憶領域情報によって示される前記記憶領域が前記選択手段によって選択された前記アプリケーションプログラムに対応する前記設定記憶領域情報によって示される前記記憶領域に含まれるか否かを判定することを特徴とする半導体装置。 The semiconductor device according to claim 2,
Each time the data information reading means reads the data information in bytes, the setting storage area information checking means uses the check information added to the setting storage area information set by the storage area information setting means. The setting storage area information is rewritten, and the read storage area information check means corresponds to the application program in which the storage area indicated by the read storage area information is selected by the selection means. A semiconductor device comprising: determining whether or not the storage area is indicated by setting storage area information.
前記データ情報更新手段が前記データ情報をバイト単位で更新する毎に、前記設定記憶領域情報チェック手段は、前記記憶領域情報設定手段によって設定された前記設定記憶領域情報に追加された前記チェック情報を用いて前記設定記憶領域情報が書き換えられていないかをチェックし、前記更新記憶領域情報チェック手段は前記更新記憶領域情報によって示される前記記憶領域が前記選択手段によって選択された前記アプリケーションプログラムに対応する前記設定記憶領域情報によって示される前記記憶領域に含まれるか否かを判定することを特徴とする半導体装置。 The semiconductor device according to claim 3,
Each time the data information updating unit updates the data information in units of bytes, the setting storage area information checking unit adds the check information added to the setting storage area information set by the storage area information setting unit. And checking whether the setting storage area information has been rewritten, and the update storage area information check means corresponds to the application program in which the storage area indicated by the update storage area information is selected by the selection means It is determined whether or not it is included in the storage area indicated by the setting storage area information.
前記アプリケーションプログラムの選択情報に基づいて前記アプリケーションプログラムが選択される選択工程と、
前記選択行程において選択された前記アプリケーションプログラムから記憶領域情報を取得する記憶領域情報取得工程と、
前記記憶領域情報によって示される記憶領域が前記半導体装置の前記記憶領域内か否かを判断し、前記記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいるか否かを判断する記憶領域情報判断工程と、
前記記憶領域情報判断工程において、前記記憶領域情報によって示される前記記憶領域が前記半導体装置の前記記憶領域内であって、前記記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいないと判断された場合には、前記記憶領域情報にチェック情報を追加し、前記アプリケーションプログラムに対応する前記記憶領域情報を設定記憶領域情報として設定する記憶領域情報設定工程と、
を備えることを特徴とする半導体装置の制御方法。 In a method for controlling a semiconductor device that processes data information including at least two or more application programs,
A selection step in which the application program is selected based on selection information of the application program;
A storage area information acquisition step of acquiring storage area information from the application program selected in the selection step;
It is determined whether or not the storage area indicated by the storage area information is within the storage area of the semiconductor device, and whether or not the storage area indicated by the storage area information includes the storage area of another application. A storage area information determination step to determine;
In the storage area information determining step, the storage area indicated by the storage area information is in the storage area of the semiconductor device, and the storage area indicated by the storage area information is the storage area of another application. A storage area information setting step of adding check information to the storage area information and setting the storage area information corresponding to the application program as setting storage area information,
A method for controlling a semiconductor device, comprising:
前記アプリケーションプログラムの選択情報に基づいて前記アプリケーションプログラムが選択される選択手段、
前記選択手段によって選択された前記アプリケーションプログラムから記憶領域情報を取得する記憶領域情報取得手段、
前記記憶領域情報によって示される記憶領域が前記半導体装置の前記記憶領域内か否かを判断し、前記記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいるか否かを判断する記憶領域情報判断手段、
前記記憶領域情報判断手段によって、前記記憶領域情報によって示される前記記憶領域が前記半導体装置の前記記憶領域内であって、前記記憶領域情報によって示される前記記憶領域が他のアプリケーションの前記記憶領域を含んでいないと判断された場合には、前記記憶領域情報にチェック情報を追加し、前記アプリケーションプログラムに対応する前記記憶領域情報を設定記憶領域情報として設定する記憶領域情報設定手段、
として機能させることを特徴とする半導体装置の制御プログラム。 A computer included in a semiconductor device for processing data information comprising at least two or more application programs;
Selection means for selecting the application program based on selection information of the application program;
Storage area information acquisition means for acquiring storage area information from the application program selected by the selection means;
It is determined whether or not the storage area indicated by the storage area information is within the storage area of the semiconductor device, and whether or not the storage area indicated by the storage area information includes the storage area of another application. Storage area information judging means for judging,
The storage area information judging means determines that the storage area indicated by the storage area information is in the storage area of the semiconductor device, and the storage area indicated by the storage area information is the storage area of another application. A storage area information setting means for adding check information to the storage area information and setting the storage area information corresponding to the application program as setting storage area information,
A program for controlling a semiconductor device, wherein
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008299697A JP2010128571A (en) | 2008-11-25 | 2008-11-25 | Semiconductor device, and method and program for controlling the same |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008299697A JP2010128571A (en) | 2008-11-25 | 2008-11-25 | Semiconductor device, and method and program for controlling the same |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2010128571A true JP2010128571A (en) | 2010-06-10 |
Family
ID=42328947
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008299697A Pending JP2010128571A (en) | 2008-11-25 | 2008-11-25 | Semiconductor device, and method and program for controlling the same |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2010128571A (en) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH01134644A (en) * | 1987-11-12 | 1989-05-26 | Internatl Business Mach Corp <Ibm> | Memory addressing error detection circuit |
| JPH04180142A (en) * | 1990-11-15 | 1992-06-26 | Nec Ibaraki Ltd | Memory access control circuit |
| JPH1196318A (en) * | 1997-09-19 | 1999-04-09 | Toshiba Corp | Issue processing method and issue processing device for wireless information storage medium |
| JP2001256460A (en) * | 2000-03-14 | 2001-09-21 | Sharp Corp | One-chip microcomputer and IC card using the same |
| JP2002014825A (en) * | 2000-06-30 | 2002-01-18 | Fujitsu Ltd | Program installation method, program installation system, program execution device, and storage medium |
| JP2003242030A (en) * | 2001-12-14 | 2003-08-29 | Matsushita Electric Ind Co Ltd | Memory management device and memory management method |
| JP2011028688A (en) * | 2009-07-29 | 2011-02-10 | Felica Networks Inc | Information processing apparatus, program and information processing system |
-
2008
- 2008-11-25 JP JP2008299697A patent/JP2010128571A/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH01134644A (en) * | 1987-11-12 | 1989-05-26 | Internatl Business Mach Corp <Ibm> | Memory addressing error detection circuit |
| JPH04180142A (en) * | 1990-11-15 | 1992-06-26 | Nec Ibaraki Ltd | Memory access control circuit |
| JPH1196318A (en) * | 1997-09-19 | 1999-04-09 | Toshiba Corp | Issue processing method and issue processing device for wireless information storage medium |
| JP2001256460A (en) * | 2000-03-14 | 2001-09-21 | Sharp Corp | One-chip microcomputer and IC card using the same |
| JP2002014825A (en) * | 2000-06-30 | 2002-01-18 | Fujitsu Ltd | Program installation method, program installation system, program execution device, and storage medium |
| JP2003242030A (en) * | 2001-12-14 | 2003-08-29 | Matsushita Electric Ind Co Ltd | Memory management device and memory management method |
| JP2011028688A (en) * | 2009-07-29 | 2011-02-10 | Felica Networks Inc | Information processing apparatus, program and information processing system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102037499B (en) | NFC mobile communication device and NFC reader | |
| JP5200664B2 (en) | Fault attack detection method, security device, and computer program for falsifying memory contents | |
| JP5041980B2 (en) | Data processing circuit and communication portable terminal device | |
| JP2005515542A (en) | Apparatus and method for writing to NV memory in a controller architecture together with a corresponding computer program and a corresponding computer-readable storage medium | |
| CN100428187C (en) | non-volatile memory device | |
| KR20170102285A (en) | Security Elements | |
| JP6769265B2 (en) | Electronic information storage medium, IC card, data abnormality confirmation method, and data abnormality confirmation program | |
| JP5050893B2 (en) | IC card attack detection method, IC card and IC card program | |
| JP2010128571A (en) | Semiconductor device, and method and program for controlling the same | |
| US20060289656A1 (en) | Portable electronic apparatus and data output method therefor | |
| JP5293113B2 (en) | SEMICONDUCTOR DEVICE, SEMICONDUCTOR DEVICE CONTROL METHOD, AND SEMICONDUCTOR DEVICE CONTROL PROGRAM | |
| JP6396119B2 (en) | IC module, IC card, and IC card manufacturing method | |
| JP4104990B2 (en) | Memory card | |
| JP2020009305A (en) | IC chip, IC card and program | |
| JP5998452B2 (en) | IC chip, IC card, information processing method, information processing program, and computer-readable recording medium recording the information processing program | |
| JP5131378B2 (en) | Portable security device | |
| JP4961834B2 (en) | IC card issuing method and IC card | |
| JP4899499B2 (en) | IC card issuing method, IC card issuing system, and IC card | |
| JP7247638B2 (en) | Electronic information storage medium, IC card, falsification check method, and program | |
| JP7559492B2 (en) | IC card, IC card logging information processing method, and program | |
| JP4583305B2 (en) | Recording method, recording apparatus, and IC card | |
| US7806319B2 (en) | System and method for protection of data contained in an integrated circuit | |
| JP2020013249A (en) | IC chip and IC card | |
| JP5018199B2 (en) | Portable security device | |
| JP2018163446A (en) | Electronic information storage medium, ic card, tampering check method, and tampering check program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110920 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20121031 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121106 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20121228 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20130319 |