[go: up one dir, main page]

JP2003036206A - Unauthorized access monitoring device, IC card, unauthorized access monitoring method - Google Patents

Unauthorized access monitoring device, IC card, unauthorized access monitoring method

Info

Publication number
JP2003036206A
JP2003036206A JP2002131186A JP2002131186A JP2003036206A JP 2003036206 A JP2003036206 A JP 2003036206A JP 2002131186 A JP2002131186 A JP 2002131186A JP 2002131186 A JP2002131186 A JP 2002131186A JP 2003036206 A JP2003036206 A JP 2003036206A
Authority
JP
Japan
Prior art keywords
access
address
application
memory area
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
Application number
JP2002131186A
Other languages
Japanese (ja)
Inventor
Tadakatsu Masaki
忠勝 正木
Shinji Kawano
眞二 川野
Futoshi Nakabe
太志 中部
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002131186A priority Critical patent/JP2003036206A/en
Publication of JP2003036206A publication Critical patent/JP2003036206A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Storage Device Security (AREA)

Abstract

(57)【要約】 【課題】 簡便な構成を用いて、アプリケーションによ
る所定のメモリ領域への不正なアクセスを防止すると共
に、リバースエンジニアリングも防止する不正アクセス
監視装置、ICカード、不正アクセス監視方法を提供す
る。 【解決手段】 アクセス監視手段は、所定のメモリ領域
へのアクセスを監視し、検知信号発生手段は、アクセス
監視手段の監視結果とアクセス情報とに基づいて不正ア
クセスがある旨を示す不正検知信号を発生する不正アク
セス監視装置、ICカード、不正アクセス監視方法を提
供する。
(57) [Summary] [Problem] To provide an unauthorized access monitoring device, an IC card, and an unauthorized access monitoring method that use a simple configuration to prevent an application from illegally accessing a predetermined memory area and also prevent reverse engineering. provide. An access monitoring unit monitors access to a predetermined memory area, and a detection signal generation unit outputs an unauthorized detection signal indicating that there is an unauthorized access based on a monitoring result of the access monitoring unit and access information. Provided are an unauthorized access monitoring device, an IC card, and an unauthorized access monitoring method that occur.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、メモリ領域への不
正なアクセスを監視すると共に、当該不正アクセスを防
止し、さらにリバースエンジニアリングも防止する不正
アクセス監視装置、ICカード、不正アクセス監視方法
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an unauthorized access monitoring device, an IC card, and an unauthorized access monitoring method for monitoring unauthorized access to a memory area, preventing the unauthorized access, and preventing reverse engineering.

【0002】[0002]

【従来の技術】現在、容易に個人を認証する手段として
磁気記録カードが利用されている。当該磁気記録カード
は、例えば銀行カードとして利用されており、当該磁気
記録カード内に個人を特定するIDを格納し、該磁気記
録カードを所定のカードリーダに認識させて上記IDを
読み取らせ、さらにユーザが対応するパスワードを入力
することで個人を認証するのが主な利用方法である。
2. Description of the Related Art Currently, a magnetic recording card is used as a means for easily authenticating an individual. The magnetic recording card is used as, for example, a bank card, stores an ID for identifying an individual in the magnetic recording card, causes a predetermined card reader to recognize the magnetic recording card, and causes the ID to be read. The main usage is to authenticate an individual by the user entering the corresponding password.

【0003】さらに近年、上記磁気記録カードに替えて
IC(Integrated Circuit)カードが普及しつつある。当
該ICカードは、格納された情報を容易に書き換えるこ
とができるため、上記磁気記録カードよりもさらに多種
多様なサービスを提供することが可能である。例えば、
当該ICカードを利用したサービスとして、該ICカー
ドに紙幣や貨幣などに相当する情報を電子マネーとして
記憶し、当該ICカードを用いることであたかも現金を
持っているかのように各所で買い物ができる電子マネー
サービスがある。
Further, in recent years, IC (Integrated Circuit) cards are becoming popular in place of the above magnetic recording cards. Since the IC card can easily rewrite the stored information, it is possible to provide a wider variety of services than the magnetic recording card. For example,
As a service using the IC card, information corresponding to banknotes, coins, and the like is stored in the IC card as electronic money, and using the IC card, the user can shop at various places as if he / she has cash. There is a money service.

【0004】上記電子マネーサービスでは、例えばIC
カードは電子マネーサービス専用カードとして提供され
る。ICカードが所定のサービス専用として提供される
場合には、当該ICカードは、図25(a)に示すよう
に、例えばICカードOS(Operating System)上にて
電子マネーサービスを提供するアプリケーション250
1が動作する。この構成では、上記アプリケーション2
501は、上記電子マネーサービス専用であるため書き
換える必要は無く、即ち上記ICカードOSと同じく例
えばROM2403に格納される。
In the above electronic money service, for example, IC
The card is provided as a dedicated card for electronic money services. When the IC card is provided only for a predetermined service, the IC card is an application 250 that provides an electronic money service on, for example, an IC card OS (Operating System) as shown in FIG.
1 works. In this configuration, the application 2
Since 501 is dedicated to the electronic money service, it does not need to be rewritten, that is, it is stored in the ROM 2403, for example, like the IC card OS.

【0005】また更に、上記電子マネー以外にも、1枚
のカードで様々なサービスの提供を受けることができる
ICカードも開発されている。即ち、例えば、当該IC
カードに、持ち主(ユーザ)の住所や電話番号のユーザ
情報等を格納し、当該ICカードに格納されたユーザ情
報を用いて行政サービスを受けたり、さらには過去に医
者に診断を受けた際のカルテ(治療履歴)等の情報を格
納することで、異なる医者にかかった際には治療履歴に
基づいて適正な診断を受けることが可能な多目的ICカ
ードである。
Further, in addition to the electronic money, an IC card that can receive various services with one card has been developed. That is, for example, the IC
The card stores user information such as the owner's (user's) address and telephone number, and uses the user information stored in the IC card to receive administrative services, or when a doctor has previously diagnosed the patient. By storing information such as a medical record (treatment history), it is a multi-purpose IC card that can receive an appropriate diagnosis based on the treatment history when a different doctor is consulted.

【0006】上記多目的ICカードでは、図25(b)
に示すように、ROM2403に格納されたICカード
OSに対して、EEPROM(Electrically Erasable
Programmable Read-Only Memory)2405に複数のア
プリケーション2501〜2503を格納することで、
複数のサービスを一枚のICカードで提供するのが代表
的な構成である。尚、上記EEPROMはFeRAM
(Ferroelectric RandomAccess Memory)等でもよく、
即ち書き換え可能な不揮発メモリであればよい。
In the above multipurpose IC card, FIG.
As shown in FIG. 3, an EEPROM (Electrically Erasable) is stored in the IC card OS stored in the ROM 2403.
By storing a plurality of applications 2501-2503 in the Programmable Read-Only Memory 2405,
A typical configuration is to provide a plurality of services with a single IC card. The EEPROM is FeRAM.
(Ferroelectric RandomAccess Memory) etc.,
That is, any rewritable nonvolatile memory may be used.

【0007】この構成では、例えばアプリケーションを
読み書き可能なEEPROM2405に格納し、必要に
応じてアプリケーションをダウンロードしたり消去した
りすることで、ユーザが必要とする機能を随時提供する
ことが可能となる。
With this configuration, for example, by storing the application in the readable / writable EEPROM 2405 and downloading or erasing the application as needed, it becomes possible to provide the function required by the user at any time.

【0008】以下、従来のICカードを用いたICカー
ドシステムについて図24、図25、図26、図27を
用いて説明する。
An IC card system using a conventional IC card will be described below with reference to FIGS. 24, 25, 26 and 27.

【0009】図24において、ICカード2401は、
CPU(Central Processing Unit)2402、ROM
(Read Only Memory)2403、RAM(Random Acces
s Memory)2404、EEPROM2405、EEPR
OM書込回路2406、及び外部通信回路2406を備
える。尚、上記EEPROM書込回路2406は、上記
EEPROM2405に格納される情報を書き換える際
の、データの消去に必要な高い電圧を得るために用いら
れる。
In FIG. 24, the IC card 2401 is
CPU (Central Processing Unit) 2402, ROM
(Read Only Memory) 2403, RAM (Random Acces
s Memory) 2404, EEPROM 2405, EEPR
An OM writing circuit 2406 and an external communication circuit 2406 are provided. The EEPROM writing circuit 2406 is used to obtain a high voltage necessary for erasing data when rewriting the information stored in the EEPROM 2405.

【0010】さて、上記ICカード2401が例えばア
プリケーション2603に備えられる機能を提供する場
合、まずCPU2402がROM2403内のICカー
ドOS格納領域2607に格納されるICカードOSを
読み出して実行し、当該ICカードOSの制御下で、例
えばEEPROM2405内のアプリケーション格納領
域2603に格納されているアプリケーションを読み出
して実行する。
When the IC card 2401 provides a function provided in the application 2603, for example, the CPU 2402 first reads and executes the IC card OS stored in the IC card OS storage area 2607 in the ROM 2403, and the IC card concerned is executed. Under the control of the OS, for example, the application stored in the application storage area 2603 in the EEPROM 2405 is read and executed.

【0011】ここで、上記ICカードOSは、例えば各
種計算に必要なメモリ領域を、RAM2404内にOS
作業領域2602として確保する。また、アプリケーシ
ョンも同様に、RAM2404内にアプリケーション作
業領域2601を確保し、必要に応じて各種計算時等に
使用する。
Here, the IC card OS has, for example, a memory area required for various calculations in the RAM 2404.
It is secured as a work area 2602. Similarly, the application secures an application work area 2601 in the RAM 2404 and uses it for various calculations as needed.

【0012】ここで、上記ICカードOSや各種アプリ
ケーションが利用する情報、例えば各ICカード240
1に固有のカードID情報や、暗号解読のための鍵情
報、書き込み領域を示すインデックス情報等は、不揮発
性を活かしたOSの作業領域(OS作業領域260
5)、即ち上記EEPROM2405内に格納(記憶)
されている。また、上記ICカードを利用するユーザの
各種情報等は、例えばユーザ情報格納領域2604に記
憶されている。
Information used by the IC card OS and various applications, for example, each IC card 240 is used.
The card ID information unique to No. 1, the key information for decryption, the index information indicating the writing area, and the like are the work area of the OS (OS work area 260
5) That is, stored (stored) in the EEPROM 2405.
Has been done. Further, various information of the user who uses the IC card is stored in, for example, the user information storage area 2604.

【0013】以上が基本的なICカード2401の動作
及び構成であるが、更に上記ICカードが電子マネーの
機能を提供する場合について簡単に説明する。尚、上記
ICカードが電子マネーの機能を提供する際には、電子
マネーの機能をICカードに実施させるための各種処理
を所定のプログラミング言語で記述し、アプリケーショ
ンとしてROM2403やEEPROM2405に格納
する。
The basic operation and configuration of the IC card 2401 have been described above, and a case where the IC card provides the function of electronic money will be briefly described. When the IC card provides the electronic money function, various processes for causing the IC card to perform the electronic money function are described in a predetermined programming language and stored in the ROM 2403 or the EEPROM 2405 as an application.

【0014】まず、上記ICカードが電子マネーとして
機能する場合には、例えば上記EEPROM2405内
のOS作業領域2605に、該ICカード2401の金
額情報を格納する。当該金額情報とは、ICカード24
01を用いて例えば商品を購入することにより、当該商
品代金分が減額されていく値であり、例えば10000
円として示すことができる。
First, when the IC card functions as electronic money, for example, the amount information of the IC card 2401 is stored in the OS work area 2605 in the EEPROM 2405. The amount information is the IC card 24
This is a value in which the price of the product is reduced by purchasing the product using 01, for example, 10,000.
It can be shown as a circle.

【0015】上記ICカード2401のユーザが、当該
ICカード2401を用いて3000円の商品を購入し
た場合、例えばユーザは上記ICカード2401をIC
カードリーダライタ2408に挿入する。但し、当該I
Cカード2401が非接触にて読み書き可能である場合
(非接触型ICカード)には、上記ICカードリーダラ
イタ2408と通信可能な距離に近づけるのみでよい。
When the user of the IC card 2401 purchases a product of 3000 yen using the IC card 2401, the user uses the IC card 2401 as an IC.
The card reader / writer 2408 is inserted. However, the I
When the C card 2401 can read and write in a non-contact manner (non-contact type IC card), it is only necessary to bring it closer to a distance where the IC card reader / writer 2408 can communicate.

【0016】上記ICカードリーダライタ2408にI
Cカード2401が挿入されると、当該ICカード24
01内のアプリケーション2603は、当該ICカード
2401を構成する外部通信回路2407、及び上記I
Cカードリーダライタ2408を介してホストPC24
09と通信し、互いの機器(ICカードとICカードリ
ーダライタ、又はICカードとホストPC)が正当な通
信先であるか否かの認証を行なう。尚、当該認証は以下
のように行われる。即ち、アプリケーションは、認証を
行なう必要がある場合には、OS−API(Applicatio
n Program Interface)エントリ2606(メモリ領
域)に格納されると共に、ICカードOSより提供され
る所定のAPIをコールする。
The IC card reader / writer 2408 has an I
When the C card 2401 is inserted, the IC card 24
The application 2603 in 01 is the external communication circuit 2407 that constitutes the IC card 2401 and the I
Host PC 24 via C card reader / writer 2408
09 to authenticate each other's devices (IC card and IC card reader / writer, or IC card and host PC) as to whether or not they are valid communication destinations. The authentication is performed as follows. That is, when the application needs to perform authentication, the OS-API (Applicatio
(n Program Interface) entry 2606 (memory area) and calls a predetermined API provided by the IC card OS.

【0017】ここで、例えば認証APIがコールされた
場合、ICカードOSは、当該認証APIに記述される
他のAPIや、ICカードOS内のサブルーチンを呼び
出して所定の処理を行なうことで、ICカードリーダラ
イタ2408、又はホストPC2409との認証を行
い、例えば認証に問題がある場合には“1”を、問題が
ない場合には“0”をリザルトコードとして上記アプリ
ケーション2603に返す。
Here, for example, when the authentication API is called, the IC card OS calls another API described in the authentication API or a subroutine in the IC card OS to perform a predetermined process, thereby performing IC processing. Authentication with the card reader / writer 2408 or the host PC 2409 is performed. For example, if there is a problem with the authentication, “1” is returned, and if there is no problem, “0” is returned to the application 2603 as a result code.

【0018】上記リザルトコードを受信した上記アプリ
ケーション2603は、以後、受信したリザルトコード
に応じた処理を行なう。
The application 2603 that has received the result code then performs processing according to the received result code.

【0019】上記認証にて互いの機器が正当なものであ
ると確認されると、続いて上記ホストPC2409は、
ICカードリーダライタ2408を介して上記ICカー
ド2401に、上記金額情報から3000円を減額する
要求を送信する。
If it is confirmed by the above authentication that the mutual devices are valid, then the host PC 2409
A request for reducing 3000 yen from the amount information is transmitted to the IC card 2401 via the IC card reader / writer 2408.

【0020】上記アプリケーションは上記3000円の
減額要求を受信すると、上記同様、所定のAPIを用い
て、OS作業領域2605に格納されている上記金額情
報から3000円を減額する要求をICカードOSに送
信する。
When the application receives the 3000 yen reduction request, the IC card OS is requested to reduce 3000 yen from the amount information stored in the OS work area 2605 by using a predetermined API as described above. Send.

【0021】上記APIを介して減額の要求を受けたI
CカードOSは、上記OS作業領域内の金額情報を確認
し(内部処理1、図27:S2701)、当該金額情報
が要求額より大きければ3000円を減額し(内部処理
2、図27:S2702)、当該減額した旨を示す情報
を上記アプリケーション2603に通知する(内部処理
3、図27:S2703)。尚、APIを介して受信し
た命令(上記S2701〜2703)は、ICカードO
Sの処理(内部処理)として実行される。
I received a request for a reduction through the above API
The C card OS confirms the money amount information in the OS work area (internal processing 1, FIG. 27: S2701), and if the money amount information is larger than the requested amount, deducts 3000 yen (internal processing 2, FIG. 27: S2702). ), And notifies the application 2603 of the information indicating the reduction (internal processing 3, FIG. 27: S2703). The command received through the API (S2701 to 2703 above) is the IC card O
This is executed as the processing of S (internal processing).

【0022】次に、上記通知を受けたアプリケーション
は、上記外部通信回路2407、及びICカードリーダ
ライタ2408を介してホストPC2409と通信し、
上記ICカード2401内の金額情報から3000円を
減額した旨を示す情報を通知する。尚、上記ホストPC
2409との通信にも、例えばAPIが利用される。
Next, the application that has received the notification communicates with the host PC 2409 via the external communication circuit 2407 and the IC card reader / writer 2408,
Information indicating that 3000 yen has been reduced from the amount information in the IC card 2401 is notified. The above host PC
The API, for example, is also used for communication with the 2409.

【0023】以上により、上記ICカード2401に格
納される金額情報は所定の金額分減額(変更)され、さ
らに当該減額された旨を示す情報はホストPC2409
にて認識される。以後、当該減額された旨を示す情報
は、ホストPCから例えばインターネット2410を介
して上記電子マネーを管理するサーバシステム2411
に送信されて、様々な処理(使用履歴管理等)が行われ
る。
As described above, the money amount information stored in the IC card 2401 is reduced (changed) by a predetermined amount, and the information indicating the reduction is the host PC 2409.
Be recognized in. Thereafter, the information indicating that the amount has been reduced is sent to the server system 2411 that manages the electronic money from the host PC via the Internet 2410, for example.
Is transmitted to the server and various processes (use history management, etc.) are performed.

【0024】以上が、ICカードを用いた電子マネーサ
ービスの概要である。また更に、上記ICカードに複数
の機能を持たせた構成、即ち図25(b)に示すよう
な、必要に応じてアプリケーションをダウンロードした
り消去したりする構成では、上記電子マネーサービスに
おける認証や金額情報の処理と同様、APIを用いてI
Cカードリーダライタ2408を介してホストPC24
09と通信することで様々なアプリケーションをダウン
ロード可能である。
The above is the outline of the electronic money service using the IC card. Furthermore, in the configuration in which the IC card has a plurality of functions, that is, in the configuration in which an application is downloaded or erased as necessary as shown in FIG. As with the processing of monetary information, I
Host PC 24 via C card reader / writer 2408
Various applications can be downloaded by communicating with 09.

【0025】[0025]

【発明が解決しようとする課題】上記従来のICカード
によれば、ICカードの多目的化を図ると共に自由度の
高い運用を可能とするために、様々なアプリケーション
をダウンロード可能としている。又、通常、アプリケー
ションのダウンロード時には、当該アプリケーションが
正しいか(信用できるか)否かの認証を行っている。
According to the above-mentioned conventional IC card, various applications can be downloaded in order to make the IC card versatile and to allow highly flexible operation. In addition, when an application is downloaded, it is usually authenticated whether the application is correct (trustworthy).

【0026】しかしながら、上記認証において問題がな
い場合であっても、必ずしもダウンロードしたアプリケ
ーションは信用できるものとは限らず、悪意を持ったア
プリケーションが上記認証をクリアしてダウンロードさ
れることも十分予想される。
However, even if there is no problem in the above authentication, the downloaded application is not always reliable, and it is sufficiently expected that a malicious application will be downloaded after clearing the above authentication. It

【0027】上記悪意を持ったアプリケーションが一旦
ICカード内にダウンロードされてさらに実行される
と、ICカード内の重要な情報、例えばユーザ情報や金
額情報、カードID情報等に自由にアクセス可能とな
り、当該重要な情報の消失、漏洩といった様々なトラブ
ルが起こりうる。
Once the malicious application is downloaded into the IC card and executed further, it becomes possible to freely access important information in the IC card, such as user information, amount information, and card ID information. Various troubles such as loss and leakage of the important information may occur.

【0028】即ち、従来のICカードでは、悪意のある
アプリケーションが認証をクリアしてICカード内にダ
ウンロードされ、実行された場合には、当該悪意のある
アプリケーションの不正な動作(処理)、例えばアプリ
ケーションが従来はアクセスできないメモリ領域等への
不正なアクセス等に対する防御手段がなかった。
In other words, in the conventional IC card, when a malicious application clears the authentication and is downloaded into the IC card and executed, the malicious operation (processing) of the malicious application, for example, the application. However, there has been no protection measure against unauthorized access to a memory area that cannot be accessed conventionally.

【0029】また、悪意を持たないアプリケーションで
あっても、バグ等による予期しない動作により、従来は
アクセスできないメモリ領域等への不正なアクセス等を
行うことで例えば記憶されているデータを消去するとい
った処理を行ってしまうこともある。
In addition, even an application having no malicious intent, for example, erases stored data by performing an illegal access to a memory area or the like which is conventionally inaccessible due to an unexpected operation due to a bug or the like. It may be processed.

【0030】また更に、所定のメモリ領域への不正なア
クセスを防ぐ技術として、汎用パーソナルコンピュータ
等にハードウェアとして実装されるMMU(Memory Man
agement Unit)を利用することも考えられる。しかしな
がら当該MMUは大量のメモリを利用した比較的大規模
なコンピュータに適用するものであり、例えばICカー
ドのような少量のメモリしか扱わず、且つ物理的な大き
さ・強度の制限(カードサイズよりも小さく、さらにあ
る程度柔軟性を持つ必要)があるシステムについては適
用するのが困難である。
Furthermore, as a technique for preventing unauthorized access to a predetermined memory area, an MMU (Memory Man) installed as hardware in a general-purpose personal computer or the like.
It is also possible to use the agement Unit). However, the MMU is applied to a relatively large-scale computer using a large amount of memory, handles only a small amount of memory such as an IC card, and limits physical size and strength (than the card size). It is difficult to apply it to a system that is small and needs to have some flexibility).

【0031】即ち、ICカードの機能を実現するICチ
ップは通常プラスチックを素材としたカードの中に埋め
込まれている。このため、カード自体を容易に曲げるこ
とや圧力を加えることを想定する必要があり、ICチッ
プ自体の大きさが制限され、従って複雑な回路を内蔵す
ることができないといった制約がある。又、ICカード
の中でも非接触型と呼ばれるものはICカードリーダラ
イタからICカード内に形成されたアンテナを介してI
Cチップに対する電力供給が行われるため、供給される
電力が極めて小さく、複雑な回路を駆動することができ
ないといった制約もある。
That is, an IC chip that realizes the function of an IC card is usually embedded in a card made of plastic. Therefore, it is necessary to assume that the card itself is easily bent or pressure is applied, and the size of the IC chip itself is limited, so that there is a restriction that a complicated circuit cannot be built in. Further, among IC cards, a non-contact type IC card is connected to the IC card reader / writer via an antenna formed in the IC card.
Since power is supplied to the C chip, there is a restriction that the supplied power is extremely small and a complicated circuit cannot be driven.

【0032】以上に述べた制約から、ICカードにおい
ては従来用いられてきた上記MMUを適用することは困
難であり、所定のメモリ領域への不正アクセスをICカ
ードの特性に適した簡便な回路で実現することが必須と
なる。
Due to the above-mentioned restrictions, it is difficult to apply the above-described MMU to the IC card, and unauthorized access to a predetermined memory area can be performed by a simple circuit suitable for the characteristics of the IC card. It is essential to realize it.

【0033】また、上記ICカードは、金銭の代替的役
割を担うケースが多く、リバースエンジニアリングの対
象となりやすい。このため、不正に対していかなる防御
策を講じても、当該防御策をリバースエンジニアリング
等にて解析されることで当該防御策が無意味になること
がある。
In addition, the IC card often plays an alternative role of money, and is easily the target of reverse engineering. Therefore, even if any countermeasure is taken against fraud, the countermeasure may be meaningless by being analyzed by reverse engineering or the like.

【0034】本発明は、上記従来の事情に基づいて提案
されたものであって、簡便な構成を用いて、アプリケー
ションによる所定のメモリ領域への不正なアクセスを防
止すると共に、リバースエンジニアリングも防止する不
正アクセス監視装置、ICカード、不正アクセス監視方
法を提供することを目的とする。
The present invention has been proposed based on the above conventional circumstances, and uses a simple structure to prevent unauthorized access to a predetermined memory area by an application and also to prevent reverse engineering. An object is to provide an unauthorized access monitoring device, an IC card, and an unauthorized access monitoring method.

【0035】[0035]

【課題を解決するための手段】本発明は、上記目的を達
成するために以下の手段を採用している。すなわち、本
発明は、メモリ領域への不正なアクセスを監視する不正
アクセス監視装置を前提としている。ここで、アクセス
監視手段は、所定のメモリ領域へのアクセスを監視し、
検知信号発生手段は、アクセス監視手段の監視結果とア
クセス情報とに基づいて不正アクセスがある旨を示す不
正検知信号を発生する。尚、アクセス情報とは、当該メ
モリ領域へアクセスを行っているプログラムを判別可能
な情報であり、例えばアクセスがOSによるアクセスか
否かを表す情報である。又、上記アクセス情報は、アク
セス情報管理手段により管理される構成があり、この場
合、当該アクセス情報管理手段は、検知信号発生手段に
対してアクセス情報を送信する。
The present invention employs the following means in order to achieve the above object. That is, the present invention is premised on an unauthorized access monitoring device that monitors unauthorized access to a memory area. Here, the access monitoring means monitors access to a predetermined memory area,
The detection signal generating means generates a fraud detection signal indicating that there is an unauthorized access based on the monitoring result of the access monitoring means and the access information. The access information is information that can identify the program that is accessing the memory area, and is, for example, information that indicates whether the access is by the OS. The access information may be managed by the access information management means, and in this case, the access information management means transmits the access information to the detection signal generation means.

【0036】以上の構成では、所定のメモリ領域へのア
クセスを監視し、当該所定のメモリ領域にアクセスがあ
った場合には、さらにOSからのアクセスかアプリケー
ションからのアクセスかを判定することが可能となる。
従って、アプリケーションによるアクセスが禁止されて
いるメモリ領域へのアクセスを知ることで、悪意のある
アプリケーションによる重要な情報の消失、漏洩といっ
た様々なトラブルを防ぐことが可能となる。
With the above configuration, it is possible to monitor the access to the predetermined memory area and, when the predetermined memory area is accessed, further determine whether the access is from the OS or the application. Becomes
Therefore, by knowing the access to the memory area where the access by the application is prohibited, it is possible to prevent various troubles such as the loss or leakage of the important information by the malicious application.

【0037】また更に、上記検知信号発生手段が発生し
た不正検知信号を受けて、CPUに対して割り込み信号
を送信する割込信号発生手段を備える構成では、不正ア
クセスがあった場合に所定のプログラムを実行すること
が可能であるため、不正アクセスに対して様々な対応が
可能となる。
Further, in the configuration including the interrupt signal generating means for transmitting the interrupt signal to the CPU upon receiving the illegality detecting signal generated by the detecting signal generating means, a predetermined program is executed when an illegal access is made. Since it is possible to execute, it becomes possible to deal with various unauthorized access.

【0038】また更に、アクセス監視手段は、所定のメ
モリ領域のアドレスを格納したアドレス格納手段と、C
PUが上記メモリ領域にアクセスする際に利用するアド
レスバスから取得したアドレスと、上記アドレス格納手
段に格納された所定のメモリ領域のアドレスとの比較に
より所定のメモリ領域へのアクセスを監視する比較手段
とを備える構成や、さらにCPUが上記メモリ領域にア
クセスする際に命令を送信する制御バスを監視し、当該
命令に応じて監視結果を出力する構成がある。
Furthermore, the access monitoring means includes an address storage means for storing an address of a predetermined memory area, and C
Comparing means for monitoring access to the predetermined memory area by comparing the address acquired from the address bus used when the PU accesses the memory area with the address of the predetermined memory area stored in the address storing means And a configuration in which the CPU monitors the control bus that transmits an instruction when the CPU accesses the memory area, and outputs the monitoring result according to the instruction.

【0039】この構成では、CPUの様々なアクセス態
様(読み出し、書き込み等)に対応したアクセス監視が
可能となる。
With this configuration, it is possible to perform access monitoring corresponding to various access modes (reading, writing, etc.) of the CPU.

【0040】尚、アクセス情報管理手段が、OSの提供
する機能をアプリケーションが利用する際に用いられる
所定のインターフェイスを介して受信した命令に基づい
てアクセス情報を制御する構成とし、例えば所定のイン
ターフェイスに、APIを用いることにより、従来技術
を用いて容易にアクセス情報を管理することができる。
The access information management means is configured to control access information based on a command received via a predetermined interface used when an application uses a function provided by the OS, and for example, a predetermined interface is used. , API, it is possible to easily manage the access information by using the conventional technique.

【0041】また更に、上記所定のメモリ領域に、外部
との通信に利用される外部通信回路やEEPROM書込
回路のアドレスを含めることで、当該外部通信回路やE
EPROM書込回路への不正アクセスを監視することが
可能となる。
Furthermore, by including the address of the external communication circuit or the EEPROM writing circuit used for communication with the outside in the predetermined memory area, the external communication circuit or the E
It is possible to monitor unauthorized access to the EPROM writing circuit.

【0042】さらに、割り込み処理を利用してOSの不
正アクセス監視処理への介在を防止する構成がある。
Further, there is a configuration in which the interrupt processing is used to prevent the OS from intervening in the unauthorized access monitoring processing.

【0043】この構成では、ハードウェアによる割り込
み処理を用いてアプリケーション間の処理を連携させる
ことにより、ソフトウェア(プログラム)による誤動作
や不正アクセスを確実に防止することが可能になるた
め、後述するアドレス情報更新問題、アクセス情報更新
問題を解決し、しかもアプリケーション間の処理を連携
可能とすることができる。
With this configuration, by coordinating the processing between the applications by using the interrupt processing by the hardware, it is possible to surely prevent the malfunction and the unauthorized access by the software (program), and therefore, the address information described later. It is possible to solve the update problem and the access information update problem, and to make it possible to link the processes between the applications.

【0044】また更に、制御バスを監視し、当該命令と
アドレスバスから取得したアドレスと上記アドレス格納
手段に格納されたアドレスとに基づいて実行中のプログ
ラムを通知するプログラム通知手段を備え、当該通知に
基づいてアクセス情報を変更する構成がある。
Furthermore, there is provided program notifying means for monitoring the control bus and notifying the program being executed on the basis of the instruction and the address obtained from the address bus and the address stored in the address storing means. There is a configuration for changing the access information based on.

【0045】この構成でも、後述するアドレス情報更新
問題、アクセス情報更新問題を解決し、さらにアプリケ
ーションを一連の処理として容易に記述することが可能
になるため、アプリケーションの開発効率を上げること
が可能になる。
Even with this configuration, the address information update problem and the access information update problem, which will be described later, can be solved and the application can be easily described as a series of processes, so that the application development efficiency can be improved. Become.

【0046】また、リバースエンジニアを防止する構成
として、CPUにクロックを与えるクロック供給手段か
らクロックを入力し、当該クロックの速度が正常か否か
を判定する判定手段と、判定手段が判定した結果に基づ
いて割込信号発生手段に不正検知信号を送信する無効化
手段とを備える構成がある。
As a structure for preventing a reverse engineer, a clock is input from a clock supply means for supplying a clock to a CPU, and a determination means for determining whether or not the speed of the clock is normal and a result determined by the determination means Based on this, there is a configuration including an invalidation unit that transmits a fraud detection signal to the interrupt signal generation unit.

【0047】尚、上記判定手段は、入力したクロックと
不正検知信号の送信の閾値となるリファレンス電圧との
比較によりCPUに与えられるクロックの速度が正常か
否かを判定する構成や、入力したクロックと、CPUに
与えられるクロックとは独立のクロックを発生する独立
クロック発生手段が発生したクロックとの比較により、
CPUに与えられるクロックの速度が正常か否かを判定
する構成がある。
The above-mentioned judging means judges whether or not the speed of the clock given to the CPU is normal by comparing the inputted clock with the reference voltage which is the threshold value for transmitting the fraud detection signal, and the inputted clock. And a clock generated by an independent clock generating means for generating a clock independent of the clock given to the CPU,
There is a configuration for determining whether or not the speed of the clock given to the CPU is normal.

【0048】以上に挙げた不正アクセス監視装置は、簡
便な回路又はプログラムにより構成可能であるため、物
理的な大きさ・強度の制限があるICカードにも容易に
適用可能である。即ち、上記不正アクセス監視装置を、
ICカードに問題なく適用することができる。
The above-mentioned unauthorized access monitoring device can be configured by a simple circuit or program, and therefore can be easily applied to an IC card having physical size and strength restrictions. That is, the unauthorized access monitoring device
It can be applied to IC cards without problems.

【0049】従来ではICカード内にダウンロードされ
た悪意のあるアプリケーションの不正な動作(処理)を
防ぐ手段が無かったが、上記不正アクセス監視装置をI
Cカードに設けることで、上記不正な動作(処理)を防
ぐことが可能となる。
Conventionally, there is no means for preventing the illegal operation (processing) of the malicious application downloaded in the IC card, but the illegal access monitoring device is
By providing the C card, it is possible to prevent the illegal operation (processing).

【0050】[0050]

【発明の実施の形態】以下、添付図面を参照して、本発
明の実施の形態につき説明し、本発明の理解に供する。
尚、以下の実施の形態は、本発明を具体化した一例であ
って、本発明の技術的範囲を限定する性格のものではな
い。また、以下の実施の形態では、理解に供するため、
OSとアプリケーションとを使い分けているが、当該O
S及びアプリケーションは双方ともプログラムである。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the accompanying drawings to provide an understanding of the present invention.
It should be noted that the following embodiment is an example in which the present invention is embodied, and does not limit the technical scope of the present invention. Further, in the following embodiments, in order to provide understanding,
The OS and the application are used properly.
Both S and the application are programs.

【0051】(実施の形態1)図1は、本実施の形態1
における不正アクセス防止装置、及びICカードの概略
機能ブロック図である。ここで、本実施の形態1に係る
ICカードは、上記従来技術にて説明したICカードの
構成と同じく、CPU102、ROM103、RAM1
04、EEPROM105、EEPROM書込回路10
6及び外部通信回路107を具備する。
(First Embodiment) FIG. 1 shows the first embodiment.
2 is a schematic functional block diagram of an unauthorized access prevention device and an IC card in FIG. Here, the IC card according to the first embodiment has the CPU 102, the ROM 103, and the RAM 1 similarly to the configuration of the IC card described in the above-mentioned related art.
04, EEPROM 105, EEPROM writing circuit 10
6 and the external communication circuit 107.

【0052】ここで、従来技術と同様、例えば上記RA
M104には、図3に示すようにアプリケーション作業
領域301、OS作業領域302が確保され、EEPR
OM105のアプリケーション格納領域303にはアプ
リケーション(プログラム)が、ユーザ情報格納領域3
04にはユーザ情報等が記憶され、さらに必要に応じて
OS作業領域305が確保される。また更に、上記外部
通信回路107が、ICカードリーダライタや、ホスト
PC等の外部端末との通信の際に利用され、EEPRO
M書込回路106が、EEPROM105内の情報を書
き換える際の、データの消去に必要な高い電圧を得るた
めに用いられる点も上記従来技術と同様である。
Here, as in the prior art, for example, the above RA
An application work area 301 and an OS work area 302 are secured in the M104 as shown in FIG.
In the application storage area 303 of the OM 105, the application (program) is stored in the user information storage area 3
User information and the like are stored in 04, and an OS work area 305 is secured if necessary. Furthermore, the external communication circuit 107 is used when communicating with an IC card reader / writer or an external terminal such as a host PC, and EEPRO
The point that the M writing circuit 106 is used to obtain a high voltage necessary for erasing data when rewriting the information in the EEPROM 105 is also similar to the above-mentioned conventional technique.

【0053】本実施の形態1においては、上記に加えて
更にアクセス監視手段110、検知信号発生手段11
1、アクセス情報管理手段112、及び割込信号発生手
段113を備え、各々不正アクセス監視装置100を構
成するが、各手段の処理の詳細は後述する。
In the first embodiment, in addition to the above, the access monitoring means 110 and the detection signal generating means 11 are further added.
1, the access information management means 112, and the interrupt signal generation means 113 are provided to configure the unauthorized access monitoring device 100, and the details of the processing of each means will be described later.

【0054】まず、図1、図2、図3を用いて、CPU
102がROM103、RAM103、EEPROM1
05に記憶されたデータ(プログラム等も含む)を読み
書きする方法について説明する。
First, referring to FIGS. 1, 2, and 3, the CPU
102 is a ROM 103, a RAM 103, and an EEPROM 1
A method of reading and writing data (including programs) stored in 05 will be described.

【0055】上記CPU102は、上記各メモリ内のあ
るメモリ領域のデータを読み出す場合、CPU102よ
り各メモリに接続された3つのバスを用いる。即ち、こ
こではアドレスバス201、データバス202、及び制
御バス203である。
When reading data in a certain memory area in each memory, the CPU 102 uses three buses connected to each memory by the CPU 102. That is, here, the address bus 201, the data bus 202, and the control bus 203.

【0056】上記CPU102は、上記各メモリに格納
されるデータの中から所定のデータを読み出す場合、上
記アドレスバス201を介してROM103、RAM1
04、EEPROM105に対して目的とするアドレス
を送信する。この際に、同時に上記制御バス203から
「read」命令を送信することで、上記アドレスに格納さ
れるデータを読み出す旨が伝えられる。上記アドレス、
及び「read」命令を受けた各メモリは、該当アドレスが
自らに割り当てられたアドレスであれば、当該アドレス
の内容を上記アドレスより読み出す。次に、上記CPU
102は、各メモリにて読み出された信号(内容)を、
データバス202を介して受け取る。
When the CPU 102 reads out predetermined data from the data stored in each of the memories, the ROM 103 and the RAM 1 via the address bus 201.
04, the target address is transmitted to the EEPROM 105. At this time, by sending a "read" command from the control bus 203 at the same time, the fact that the data stored at the address is read out is transmitted. The above address,
Each memory receiving the "read" command reads the content of the address from the above address if the corresponding address is the address assigned to itself. Next, the CPU
Reference numeral 102 denotes the signal (content) read by each memory,
Received via the data bus 202.

【0057】以上が各メモリからデータを読み出す処理
であるが、データを書き込む際には、上記CPU102
よりアドレスバス201を介してアドレスが、上記制御
バス203を介して「write」命令がそれぞれ送信さ
れ、さらにデータバス202を介して書き込むべきデー
タが送信される。
The above is the process of reading data from each memory. When writing data, the CPU 102
An address is sent via the address bus 201, a “write” command is sent via the control bus 203, and data to be written is sent via the data bus 202.

【0058】上記各信号(命令)を受けたメモリは、所
定のメモリ領域に上記送信されたデータを記憶すること
でデータの書き込みが行われる。
The memory receiving the above-mentioned signals (commands) writes the data by storing the transmitted data in a predetermined memory area.

【0059】さて、上記読み出し、及び書き込みは、上
記CPU102にて行われるが、当該CPUを制御する
のはここではICカードOSであり、当該ICカードO
Sの制御のもと、アプリケーションが様々な処理を行
う。尚、上記アプリケーションは、当該アプリケーショ
ンの処理において必要とされる作業領域を、アプリケー
ション作業領域301として、例えばRAM104内に
確保する。
Now, the reading and writing are performed by the CPU 102, but it is the IC card OS that controls the CPU here, and the IC card O
Under the control of S, the application performs various processes. The application secures a work area required for processing the application as the application work area 301 in the RAM 104, for example.

【0060】ここで、例えば複数のアプリケーションを
実行可能とするICカードOS等では、上記アプリケー
ションにICカードOSの備える基本的な機能を提供す
るためのインターフェイス、例えばAPIを備える。上
記APIは、例えば図3のROM103内のOS−AP
Iエントリに格納され、アプリケーションにてコールさ
れた後、上記ICカードOSにて実行される。具体的
に、上記アプリケーションが、例えばユーザの住所を必
要とする場合には、当該アプリケーションは住所取得A
PIをコールする。当該住所取得APIがコールされる
と、上記ICカードOSは、上記住所取得APIを実行
することでEEPROM105に格納されるユーザ情報
格納領域304からユーザの住所を読み出して、上記ア
プリケーションに当該住所を通知する。
Here, for example, an IC card OS or the like capable of executing a plurality of applications is provided with an interface, for example an API, for providing the above-mentioned applications with the basic functions of the IC card OS. The API is, for example, the OS-AP in the ROM 103 of FIG.
It is stored in the I entry, called by the application, and then executed by the IC card OS. Specifically, when the application requires the address of the user, for example, the application acquires the address acquisition A.
Call PI. When the address acquisition API is called, the IC card OS reads the user's address from the user information storage area 304 stored in the EEPROM 105 by executing the address acquisition API, and notifies the application of the address. To do.

【0061】以上がアプリケーションの一般的な処理で
あり、即ち、アプリケーションが読み出す(アクセスす
る)メモリ領域は、アプリケーション作業領域301と
OS−APIエントリ306に限られることになる。言
い換えると、上記アプリケーションがアプリケーション
作業領域301とOS−APIエントリ306以外のメ
モリ領域、即ち、OS作業領域302、アプリケーショ
ン格納領域303、ユーザ情報格納領域304、OS作
業領域305、ICカードOS格納領域307にアクセ
スした場合、当該アクセスは不正なアクセス(不正アク
セス)と考えることができる。
The above is the general processing of the application, that is, the memory area read (accessed) by the application is limited to the application work area 301 and the OS-API entry 306. In other words, the application is a memory area other than the application work area 301 and the OS-API entry 306, that is, the OS work area 302, the application storage area 303, the user information storage area 304, the OS work area 305, the IC card OS storage area 307. When the user accesses to, the access can be considered as an unauthorized access (unauthorized access).

【0062】上記不正アクセスを検知するためには、ま
ず、各メモリ領域にアクセスを行っているプログラム
が、ICカードOSか、それともアプリケーションかを
認識する必要があり、当該認識はアクセス情報管理手段
112が管理するアクセス情報によって認識することが
できる。即ち、まず、ICカードOSが起動し、当該I
CカードOSが所定のアプリケーションを動作させる際
には、ICカードOSは、アプリケーションをEEPR
OM105内のアプリケーション格納領域303から読
み出した後、上記アクセス情報管理手段112に対し、
アクセス情報を例えば“1”に変更する命令を送信する
(図5(b):S510)。
In order to detect the unauthorized access, first, it is necessary to recognize whether the program accessing each memory area is the IC card OS or the application. The recognition is the access information management means 112. It can be recognized by the access information managed by. That is, first, the IC card OS is activated and the I
When the C card OS runs a predetermined application, the IC card OS executes the application by EEPR.
After reading from the application storage area 303 in the OM 105,
A command for changing the access information to, for example, "1" is transmitted (FIG. 5B: S510).

【0063】上記アクセス情報 の“1”は、アプリケ
ーションモード、即ち現在CPU上にて動作(処理)を
しているプログラムはアプリケーションであることを示
すものである。
"1" of the access information indicates that the application mode, that is, the program currently operating (processing) on the CPU is an application.

【0064】上記アプリケーションは、以後様々な機能
を提供するためにアプリケーション作業領域301を利
用して処理を行い、例えばユーザ情報304に含まれる
ユーザの住所を参照する必要が生じたものとする。この
場合、上記アプリケーションは、OS−APIエントリ
306より例えば住所取得APIをコールし、処理をI
CカードOSに渡す。
It is assumed that the above-mentioned application needs to refer to the user's address contained in the user information 304, for example, by performing processing using the application work area 301 to provide various functions. In this case, the application calls, for example, the address acquisition API from the OS-API entry 306, and executes the process.
Hand over to C card OS.

【0065】上記住所取得APIのコールと共に処理を
渡されたICカードOSは、まず当該API(住所取得
API)内の最初の処理にて、上記アクセス情報管理手
段112に対して、アクセス情報を“0”(OSモー
ド)に変更する命令を送信する(図5(b):S51
1)。
The IC card OS to which the processing is handed over together with the call for the address acquisition API first sends the access information to the access information management means 112 in the first processing in the API (address acquisition API). Send an instruction to change to 0 "(OS mode) (FIG. 5 (b): S51
1).

【0066】上記命令を受信したアクセス情報管理手段
112は、管理するアクセス情報の内容を“0”に変更
する(図5(b):S511Yes→S512、図4:
S401)。
Upon receipt of the above command, the access information management means 112 changes the content of the managed access information to "0" (FIG. 5 (b): S511 Yes → S512, FIG. 4 :).
S401).

【0067】上記アクセス情報の内容が“0”に変更さ
れた後、上記ICカードOSは、例えば他のAPIや、
ICカードOS格納領域307に格納される様々なサブ
ルーチンにアクセスして実行することで、例えば内部処
理1〜3(図4:S402〜S404)を実行する。
After the content of the access information is changed to "0", the IC card OS may change another API,
By accessing and executing various subroutines stored in the IC card OS storage area 307, for example, internal processes 1 to 3 (FIG. 4: S402 to S404) are executed.

【0068】上記内部処理1〜3、ここではICカード
OSによる、ユーザ情報304に格納されるユーザの住
所の取得が完了すると、上記ICカードOSは、上記ア
クセス情報管理手段112に対してアクセス情報を
“1”(アプリケーションモード)に変更する命令を送
信する。
When the acquisition of the user's address stored in the user information 304 by the internal processes 1 to 3, here the IC card OS, is completed, the IC card OS makes access information to the access information management means 112. Send an instruction to change to "1" (application mode).

【0069】上記命令を受信したアクセス情報管理手段
112は、管理するアクセス情報の内容を“1”に変更
する(図5(b):S513Yes→S514、図4:
S405)。
Upon receipt of the above command, the access information management means 112 changes the content of the access information to be managed to "1" (FIG. 5 (b): S513 Yes → S514, FIG. 4 :).
S405).

【0070】以上のように、APIの最初、及び最後に
アクセス情報を変更する命令を挿入することで、ICカ
ードOSが提供するAPIを介した場合には、OSモー
ドとして所定のメモリ領域にアクセスすることができ
る。尚、APIを用いることにより、従来技術を用いて
容易にアクセス情報を管理可能としている。
As described above, by inserting the instruction to change the access information at the beginning and the end of the API, the predetermined memory area is accessed as the OS mode when the API provided by the IC card OS is used. can do. By using the API, the access information can be easily managed by using the conventional technique.

【0071】次に、以上のアクセス情報の状態を踏まえ
た上で、アクセス監視手段110、検知信号発生手段1
11、及び割り込み信号発生手段113の処理を説明す
る。
Next, based on the above-mentioned access information state, the access monitoring means 110 and the detection signal generating means 1
11 and the processing of the interrupt signal generating means 113 will be described.

【0072】上記CPU102による、各メモリへのア
クセスの処理は既に述べたとおりであるが、上記アクセ
ス監視手段110は、上記アドレスバス201を常時監
視する(図5(a):S501)。即ち、上記アクセス
監視手段110は、CPU102から各メモリにアクセ
スがあった場合、アクセスがあった旨、及びアクセスし
ているメモリ領域(メモリアドレス)を知ることができ
る(図5(a):S502)。
The access processing to each memory by the CPU 102 is as described above, but the access monitoring means 110 constantly monitors the address bus 201 (FIG. 5 (a): S501). That is, when the CPU 102 accesses each memory, the access monitoring unit 110 can know the access and the memory area (memory address) being accessed (FIG. 5A: S502). ).

【0073】上記アクセスがあった場合、上記アクセス
監視手段110を構成する比較手段202は、アクセス
を監視すべきメモリ領域、即ちここでは、OS作業領域
302、アプリケーション格納領域303、ユーザ情報
格納領域304、OS作業領域305、ICカードOS
格納領域307のアドレス(範囲:メモリ領域)を格納
したアドレス格納手段201から、アドレスを読み出
し、現在CPU102が参照しているメモリアドレスと
比較する。
When the access is made, the comparison means 202 constituting the access monitoring means 110 has a memory area for monitoring the access, that is, here, the OS work area 302, the application storage area 303, and the user information storage area 304. , OS work area 305, IC card OS
The address is read from the address storage unit 201 that stores the address (range: memory area) of the storage area 307 and is compared with the memory address currently referred to by the CPU 102.

【0074】ここで、上記比較手段202が、上記アド
レス格納手段201に格納されているアドレスと、現在
CPU102が参照しているアドレスとを比較し、一致
した(あるいは範囲内にあった)場合には、当該アクセ
スは所定のメモリ領域への不正アクセスである可能性が
あるものとして、検知信号発生手段111に通知を行う
(図5(a):S503Yes→S504)。
Here, the comparing means 202 compares the address stored in the address storing means 201 with the address currently referred to by the CPU 102, and when they match (or are within the range), Notifies the detection signal generating means 111 that the access may be an unauthorized access to a predetermined memory area (FIG. 5 (a): S503 Yes → S504).

【0075】続いて、上記アクセス監視手段110から
の通知を受けた検知信号発生手段111は、上記アクセ
ス情報管理手段112が管理するアクセス情報を参照す
る(図6(a):S601→S602)。
Subsequently, the detection signal generating means 111, which has received the notification from the access monitoring means 110, refers to the access information managed by the access information management means 112 (FIG. 6 (a): S601 → S602).

【0076】ここで、上記アクセス情報が“1”(アプ
リケーションモード)であった場合は、当該メモリ領域
へのアクセスは、ICカードOSによるアクセスではな
くアプリケーションによるアクセスであり、即ち、不正
アクセスであるために、割込信号発生手段113に対し
て不正検知信号を送信する(図6(a):S603Ye
s→S604)。
Here, when the access information is "1" (application mode), the access to the memory area is not the access by the IC card OS but the access by the application, that is, the unauthorized access. Therefore, a fraud detection signal is transmitted to the interrupt signal generating means 113 (FIG. 6A: S603Ye).
s → S604).

【0077】上記割込信号発生手段113は、上記検知
信号発生手段111より不正検知信号を受信すると、C
PU102に対して割り込み信号を送信する(図6
(b):S610→S611)。
When the interrupt signal generation means 113 receives the fraud detection signal from the detection signal generation means 111, it outputs C
An interrupt signal is transmitted to the PU 102 (see FIG. 6).
(B): S610 → S611).

【0078】上記割込信号を受信したCPU102は、
それまで行っていたアプリケーションの処理を中断し、
例えば割込信号に応じて所定の割り込みハンドラと呼ば
れるルーチン、即ちプログラムを実行する。
When the CPU 102 receives the interrupt signal,
The processing of the application that had been done until then is interrupted,
For example, a routine called a predetermined interrupt handler, that is, a program is executed in response to an interrupt signal.

【0079】ここで、上記割込信号受信時に行なうCP
U102の処理はどのようなものであってもよいが、例
えば上記アプリケーションが悪意を持っている可能性が
あるため、例えばICカード自体の機能を停止してしま
ったり、当該アプリケーションのみ削除してしまうとい
った処理が考えられる。
Here, the CP performed when the interrupt signal is received
Although any processing may be performed by the U102, for example, the application may have malicious intent, so that the function of the IC card itself is stopped or only the application is deleted. Such processing is possible.

【0080】以上のように、所定のメモリ領域へのアク
セスを監視し、当該所定のメモリ領域にアクセスがあっ
た場合には、さらにOSからのアクセスかアプリケーシ
ョンからのアクセスかを判定することで、アプリケーシ
ョンによるアクセスが禁止されているメモリ領域へのア
クセスを知ることができる。このため、悪意のあるアプ
リケーションによる重要な情報の消失、漏洩といった様
々なトラブルを防ぐことが可能となる。
As described above, the access to the predetermined memory area is monitored, and when the predetermined memory area is accessed, it is further determined whether the access is from the OS or the application. It is possible to know the access to the memory area for which access by the application is prohibited. Therefore, it is possible to prevent various troubles such as loss or leakage of important information due to a malicious application.

【0081】また、上記各手段(アクセス監視手段11
0、アクセス情報管理手段112、検知信号発生手段1
11、及び割込信号発生手段113)は簡便な回路、又
はプログラムにより構成可能であるため、物理的な大き
さ・強度の制限があるICカードにも容易に適用可能で
ある。
Further, each of the above means (access monitoring means 11
0, access information management means 112, detection signal generation means 1
Since 11 and the interrupt signal generating means 113) can be configured by a simple circuit or program, they can be easily applied to an IC card having physical size and strength restrictions.

【0082】また更に、従来ではICカード内にダウン
ロードされた悪意のあるアプリケーションの不正な動作
(処理)を防ぐ手段が無かったが、本発明を適用するこ
とで、上記不正な動作(処理)を防ぐことが可能とな
る。
Furthermore, in the past, there was no means for preventing the illegal operation (processing) of the malicious application downloaded in the IC card. However, by applying the present invention, the illegal operation (processing) is prevented. It becomes possible to prevent it.

【0083】尚、上記アクセス情報管理手段112は、
例えば上記アクセス情報をCPU102のレジスタ内に
記憶するが、必ずしも情報として記憶する必要は無く、
アクセス情報管理手段112が、上記検知信号発生手段
111に対して動作をオン・オフする信号を送信しても
よい。
The access information management means 112 is
For example, although the access information is stored in the register of the CPU 102, it is not always necessary to store it as information.
The access information management means 112 may transmit a signal for turning on / off the operation to the detection signal generation means 111.

【0084】また更に、上記アクセス監視手段110
は、アドレスバス201に加えて制御バス203を監視
することで、さらにデータの読み出し、及び書き込みに
応じた不正アクセスの監視が可能になる。即ち、読み出
し時にはアプリケーションのアクセスを許すが、書き込
みは不正アクセスとする、といった処理の場合わけが可
能となる。
Furthermore, the access monitoring means 110 described above.
By monitoring the control bus 203 in addition to the address bus 201, it becomes possible to further monitor unauthorized access according to data reading and writing. That is, it is possible to perform a process in which the application is allowed to access at the time of reading but the access is illegally performed at the time of writing.

【0085】(実施の形態2)本実施の形態2では、上
記アクセス監視手段110が外部通信回路107、及び
EEPROM書込回路106に対する不正なアクセスを
監視する場合について説明する。
(Second Embodiment) In the second embodiment, a case will be described in which the access monitoring means 110 monitors unauthorized access to the external communication circuit 107 and the EEPROM writing circuit 106.

【0086】上記実施の形態1にて、CPU102がR
OM103、RAM104、EEPROM105に対す
るアクセス処理を簡単に説明したが、通常、上記CPU
102は外部通信回路107、及びEEPROM書込回
路106に対しても同様にアクセスする。
In the above-described first embodiment, the CPU 102 makes the R
The access processing to the OM 103, the RAM 104, and the EEPROM 105 has been briefly described.
The external access circuit 102 also accesses the external communication circuit 107 and the EEPROM writing circuit 106 in the same manner.

【0087】即ち、CPU102から見た場合、外部通
信回路107、及びEEPROM書込回路106に対し
ても、上記各メモリと同様のアドレスが与えられ、CP
U102は、当該アドレスに対して命令及びデータを送
信することで、所定のデータの送受信等を行う。
That is, when viewed from the CPU 102, the same addresses as those in the above memories are given to the external communication circuit 107 and the EEPROM writing circuit 106, and CP
The U 102 transmits and receives predetermined data by transmitting a command and data to the address.

【0088】従って、上記実施の形態1におけるアクセ
ス監視手段110を構成するアドレス格納手段201に
上記外部通信回路107、及びEEPROM書込回路1
06のアドレスを記憶することにより、上記外部通信回
路107、及びEEPROM書込回路106に対する不
正アクセスも監視することが可能となる。
Therefore, the external communication circuit 107 and the EEPROM writing circuit 1 are stored in the address storing means 201 which constitutes the access monitoring means 110 in the first embodiment.
By storing the address 06, it is possible to monitor unauthorized access to the external communication circuit 107 and the EEPROM writing circuit 106.

【0089】(実施の形態3)続いて、本実施の形態3
において、複数のアプリケーションを上記ICカード1
01上にて動作させる場合の処理を説明する。
(Third Embodiment) Next, the third embodiment will be described.
In the IC card 1
A process for operating on 01 will be described.

【0090】図7に示すのは、複数のアプリケーション
(アプリケーションA、アプリケーションB)を実行し
た際の、上記RAM104、EEPROM105、RO
M103の各メモリ領域のイメージ図である。即ち、ア
プリケーション格納領域303に格納されている例えば
2つのアプリケーションA・Bをそれぞれ実行させた場
合、アプリケーション作業領域301には、上記アプリ
ケーションAの作業領域であるアプリケーションA作業
領域701、及びアプリケーションBの作業領域である
アプリケーションB作業領域702が設けられる。
FIG. 7 shows the RAM 104, the EEPROM 105, and the RO when a plurality of applications (application A, application B) are executed.
It is an image figure of each memory area of M103. That is, when, for example, two applications A and B stored in the application storage area 303 are respectively executed, the application work area 301 includes the application A work area 701, which is the work area of the application A, and the application A work area 701. An application B work area 702, which is a work area, is provided.

【0091】ここで、例えばアプリケーションAが不正
なアプリケーションであると仮定する。上記アプリケー
ションAがアプリケーションB作業領域702に自由に
アクセス可能であれば、上記アプリケーションAが上記
アプリケーションBを正常に機能させないようにした
り、アプリケーションBの機能を悪用したりすることが
考えられる。
Here, for example, it is assumed that the application A is an unauthorized application. If the application A can freely access the application B work area 702, it is conceivable that the application A may prevent the application B from functioning normally, or the function of the application B may be abused.

【0092】具体例を挙げると、例えばダウンロードさ
れたアプリケーションAが電子商取引を行なうプログラ
ムであり、当該アプリケーションAが、ICカードに予
め備えられている電子マネー管理プログラム(アプリケ
ーションB)を利用して電子商取引に応じた金額を減額
するような場合である。上記アプリケーションAが上記
電子マネー管理プログラムに不正にアクセスできてしま
うと、例えば電子商取引を行って物品を購入したにもか
かわらず、当該ICカードに記憶された電子マネーを減
額しないといった不正を働くことが可能になる。
To give a concrete example, for example, the downloaded application A is a program for conducting electronic commerce, and the application A uses the electronic money management program (application B) provided in advance in the IC card to perform electronic transactions. This is the case when the amount of money corresponding to a commercial transaction is reduced. If the application A can illegally access the electronic money management program, the electronic money stored in the IC card is not reduced even if the electronic money transaction is performed to purchase the article. Will be possible.

【0093】そこで、本実施の形態3では、ICカード
OSが、アプリケーションに処理を渡す直前、即ち、上
記アクセス情報管理手段112に対しアクセス情報を
“1”に変更する命令を送信する際に、上記アクセス監
視手段110内のアドレス格納手段201の内容を変更
する。
Therefore, in the third embodiment, immediately before the IC card OS passes the processing to the application, that is, when the command for changing the access information to “1” is transmitted to the access information management means 112, The contents of the address storage means 201 in the access monitoring means 110 are changed.

【0094】例えば、アプリケーションAに処理を移す
場合、上記ICカードOSは、上記アドレス格納手段2
01に、アプリケーションB作業領域702のアドレス
を格納するのである。これにより、例えば以後上記アプ
リケーションAが上記アプリケーションB作業領域70
2にアクセスした場合、実施の形態1にて説明したよう
に検知信号発生手段111により検知信号が発せられ
る。つまり、上記アプリケーションAは、アプリケーシ
ョンBの処理に関するメモリ領域にもアクセス不可能と
なる。当然、アプリケーションBに処理を移す場合、上
記ICカードOSは、上記アドレス格納手段201に、
アプリケーションA作業領域701のアドレスを格納
し、さらにアプリケーションB作業領域702のアドレ
スを削除する。
For example, when processing is transferred to the application A, the IC card OS uses the address storage means 2
The address of the application B work area 702 is stored in 01. As a result, for example, the application A is subsequently used by the application B work area 70.
When 2 is accessed, the detection signal generation means 111 issues a detection signal as described in the first embodiment. That is, the application A cannot access the memory area related to the processing of the application B. Of course, when the processing is transferred to the application B, the IC card OS stores in the address storage unit 201.
The address of the application A work area 701 is stored, and the address of the application B work area 702 is deleted.

【0095】以上のように、アドレス格納手段に格納さ
れているアドレスを、ICカードOSにて書き換え可能
とすることで、複数アプリケーションを起動した際にも
各アプリケーション間の不正アクセスを防止することが
可能になる。
As described above, by making the address stored in the address storage means rewritable by the IC card OS, it is possible to prevent unauthorized access between applications even when a plurality of applications are activated. It will be possible.

【0096】尚、各アプリケーション作業領域のメモリ
アドレスは、あらかじめ決定しておいてもよいが、各ア
プリケーションの起動時に動的に割り当てたメモリアド
レスとしてもよい。
The memory address of each application work area may be determined in advance, or may be a memory address dynamically assigned when starting each application.

【0097】(実施の形態4)続いて、本実施の形態4
において、OSに依存しない不正アクセスの監視処理を
説明する。
(Fourth Embodiment) Next, a fourth embodiment will be described.
In the following, a monitoring process for unauthorized access that does not depend on the OS will be described.

【0098】上記実施の形態1〜3においては、例えば
アプリケーションに悪意やバグがある場合を想定して説
明を行ってきた。しかし、OSも広義のアプリケーショ
ンであり、悪意があるプログラムとして提供される恐れ
がある。また、アプリケーションに比べてOSはプログ
ラム規模(ステップ数)が大きくなる傾向があり、バグ
がある可能性はアプリケーションよりも高いともいえ
る。このようなOSを完全に信用することは、セキュリ
ティの面から見れば好ましいとはいえない。
In the above-described first to third embodiments, description has been made assuming that the application has malicious intent or bug. However, the OS is also a broad application and may be provided as a malicious program. In addition, the OS tends to have a larger program scale (the number of steps) than the application, and it can be said that there is a higher possibility that the OS has a bug. It is not preferable to completely trust such an OS from the viewpoint of security.

【0099】上記実施の形態1〜3における好ましくな
い点は、具体的には、・上記実施の形態1〜3にて複数
のアプリケーションを動作させる場合には、アドレス格
納手段201に格納するアドレスを、OSにて更新する
必要がある点(以後アドレス情報更新問題と称する)、
・また、アクセス情報管理手段112に格納されている
アクセス情報においては、現在処理を行っているプログ
ラムがOSであるか、又はOS以外(アプリケーショ
ン)であるかを、OSが変更する必要がある点(以後ア
クセス情報更新問題と称する)、である。
The disadvantages of the first to third embodiments are as follows. Specifically, when operating a plurality of applications in the first to third embodiments, the address to be stored in the address storage means 201 is changed. , Point that needs to be updated by OS (hereinafter referred to as address information update problem),
Further, in the access information stored in the access information management unit 112, the OS needs to change whether the program currently being processed is the OS or a program other than the OS (application). (Hereinafter referred to as the access information update problem).

【0100】つまり、十分には信用できないOSによる
上記セキュリティに関わる処理の実行は避けたほうがよ
いといえる。
In other words, it can be said that it is better to avoid the execution of the above security-related processing by an OS that is not sufficiently trusted.

【0101】そこで、以下に、容易に上記問題を解決す
る構成を3例挙げる。但し、以下に示す例は、上記問題
を十分に解決するものではないことを予め述べておくと
共に、各々の問題点を併記する。
Therefore, three examples of configurations for easily solving the above problems will be given below. However, it is stated in advance that the following example does not sufficiently solve the above problem, and each problem is also described.

【0102】1例目は、CPUを複数設ける構成であ
る。即ち、例えば図8(a)に示すように、ICカード
801内において、例えば2つのアプリケーション(ア
プリケーション1(802)、アプリケーション2(8
05)を異なるCPU804、807上でそれぞれOS
1(803)、OS2(806)を介して動作させるの
である。こうすることで、上記実施の形態1と同様の実
施形態になり、上記アドレス更新問題が解決できると共
に、1枚のICカードで複数のアプリケーションを実行
可能となる。
The first example has a configuration in which a plurality of CPUs are provided. That is, for example, as shown in FIG. 8A, in the IC card 801, for example, two applications (application 1 (802) and application 2 (8
05) OS on different CPUs 804 and 807 respectively
1 (803) and OS2 (806). By doing so, an embodiment similar to that of the above-described first embodiment is realized, the address update problem can be solved, and a plurality of applications can be executed by one IC card.

【0103】しかしながら、依然として上記アクセス情
報問題が残ると共に、同時に実行可能とするアプリケー
ション数と同じ数のCPUが必要になり、ICカードの
コストが高くなるという問題が生じる。また、上記アプ
リケーション1(802)とアプリケーション2(80
5)との間で連携処理が行なえないという問題も新たに
発生する。
However, the above-mentioned access information problem still remains, and the same number of CPUs as the number of applications that can be executed at the same time are required, and the cost of the IC card increases. In addition, the application 1 (802) and the application 2 (80
There is a new problem that cooperation processing with 5) cannot be performed.

【0104】次に、2例目を図8(b)に示す。ICカ
ード810内において、例えば2つのアプリケーション
(アプリケーション1(812)、アプリケーション2
(815)を同一のCPU817上で動作させるのであ
る。この際、各アプリケーションの制御は、OS1(8
13)、OS2(816)が行なう。尚、OSは各アプ
リケーション毎に割り当てているため、結果としてOS
もアプリケーションと同様にみなすことが可能となり、
それぞれアプリケーション1メモリ領域811、アプリ
ケーション2メモリ領域814が割り当てられる。
Next, a second example is shown in FIG. In the IC card 810, for example, two applications (application 1 (812), application 2
(815) is operated on the same CPU 817. At this time, control of each application is controlled by OS1 (8
13), OS2 (816). Since the OS is assigned to each application, as a result, the OS
Can be regarded as an application,
An application 1 memory area 811 and an application 2 memory area 814 are allocated respectively.

【0105】この場合、上記ICカードのコストが高く
なるという問題が解決し、さらに一アプリケーションに
対して一OSを割り当てているため、アプリケーション
1(812)とOS1(813)との間でのアクセス情
報の処理は必要ない。但し、アプリケーション1メモリ
領域811とアプリケーション2メモリ領域814との
間でのアクセス情報の処理が必要になる。さらに、例え
ばアプリケーション1がアプリケーション2メモリ領域
814にアクセスした場合には、前述のアクセス監視手
段110、検知信号発生手段111、割込信号発生手段
113により例えば処理が停止してしまう。結果とし
て、上記アプリケーション1(812)とアプリケーシ
ョン2(815)との間で連携処理が行なえないという
問題は解決しない。
In this case, the problem that the cost of the IC card becomes high is solved, and since one OS is assigned to one application, access between the application 1 (812) and the OS 1 (813) is performed. No information processing is required. However, it is necessary to process access information between the application 1 memory area 811 and the application 2 memory area 814. Further, for example, when the application 1 accesses the application 2 memory area 814, the access monitoring means 110, the detection signal generating means 111, and the interrupt signal generating means 113 stop the processing, for example. As a result, the problem that cooperation processing cannot be performed between the application 1 (812) and the application 2 (815) cannot be solved.

【0106】次に、3例目を図9に示す。3例目のIC
カード901では、上記ICカード810内において、
アクセス監視手段110の監視対象外となる共有領域9
02を備えた構成となっている。ここで、例えば上記ア
プリケーション1(812)は、上記共有領域902に
上記アプリケーション2(815)へのコマンドを書き
込み、上記アプリケーション2(815)は上記共有領
域902から上記コマンドを読み出して実行し、結果を
上記共有領域902に書き込む。続いて上記アプリケー
ション812は、上記結果を上記共有領域902から読
み出すことで処理を継続するのである。
Next, FIG. 9 shows a third example. Third example IC
In the card 901, in the IC card 810,
Shared area 9 that is not monitored by the access monitoring unit 110
02 is provided. Here, for example, the application 1 (812) writes a command to the application 2 (815) in the shared area 902, and the application 2 (815) reads the command from the shared area 902 and executes the command. Is written in the shared area 902. Subsequently, the application 812 continues the process by reading the result from the shared area 902.

【0107】この構成では、一見アプリケーション間の
連携処理が可能であるが、ここで、例えば上記アプリケ
ーション1(812)がコマンドを書き込んだ旨を示す
情報を上記アプリケーション2(815)に通知する必
要がある。しかし、上記アプリケーション1(812)
がOS1(813)を介して上記通知を行なうと、OS
1(813)が介在することになるため問題の解決にな
らない。当然、上記アプリケーション1(812)が直
接アプリケーション2(815)を呼び出すのは問題外
である。
With this configuration, it is possible to perform the cooperative processing between the applications at first glance, but here, for example, it is necessary to notify the application 2 (815) of the information indicating that the application 1 (812) has written the command. is there. However, the above application 1 (812)
Sends the above notification via OS1 (813),
Since 1 (813) is present, the problem cannot be solved. Of course, it is out of the question that the application 1 (812) directly calls the application 2 (815).

【0108】そこで、本実施の形態4では、OSによる
セキュリティに関わる処理の実行を避けることで、さら
に強固なセキュリティを備えた不正アクセス監視装置、
ICカードの処理について説明する。
Therefore, in the fourth embodiment, the unauthorized access monitoring apparatus having stronger security by avoiding execution of security-related processing by the OS,
The processing of the IC card will be described.

【0109】尚、本実施の形態4の理解に供するため、
まず、図10を用いて従来の割り込み処理の概要につい
て簡単に説明を行なう。
In order to provide an understanding of the fourth embodiment,
First, the outline of the conventional interrupt processing will be briefly described with reference to FIG.

【0110】例えばキーボードやマウス等のデバイスか
らCPUへのデータ転送は、CPUの処理とはまったく
非同期に行なわれる。このため、いつ起こるか分からな
いキーボード入力をCPUが待っているのでは効率が悪
い。そこで、CPUには他のプログラムを実行させてお
き、上記キーボードからの入力が発生した時点で上記他
のプログラムの処理に割り込み、キーボードの処理を行
なわせるのが割り込み処理である。
Data transfer from a device such as a keyboard or a mouse to the CPU is performed completely asynchronously with the processing of the CPU. For this reason, it is inefficient if the CPU waits for a keyboard input that is unknown when it will occur. Therefore, the interrupt processing is to cause the CPU to execute another program, interrupt the processing of the other program when the input from the keyboard occurs, and cause the keyboard processing to be performed.

【0111】上記例を具体的に図10を用いて説明す
る。ここに図10は、割り込み処理を説明するための概
略図である。
The above example will be specifically described with reference to FIG. FIG. 10 is a schematic diagram for explaining the interrupt processing.

【0112】まず、CPU1001は、メモリ1002
の所定のアドレスからプログラムを読み出し、当該プロ
グラムを順次実行する。ここで例えば上記CPU100
1は、アドレスAからアドレスCにかけて格納されるプ
ログラム1010の、アドレスBに格納されたコマンド
を実行中であるとする。現在実行中のコマンドのアドレ
スBは、CPU1001のプログラムカウンタ1003
にて管理されており、各コマンドが実行し終わる毎にプ
ログラムカウンタ1003のアドレスが変更される。
First, the CPU 1001 has the memory 1002.
The program is read from a predetermined address of and the program is sequentially executed. Here, for example, the CPU 100
It is assumed that 1 is executing the command stored in the address B of the program 1010 stored in the address A to the address C. The address B of the command currently being executed is the program counter 1003 of the CPU 1001.
The address of the program counter 1003 is changed every time each command is executed.

【0113】ここで、例えばキーボードやマウス等のデ
バイス1004より入力が行われた場合、当該デバイス
1004から割り込み信号1005がCPU1001に
送信される。ここで、各デバイス毎に割り込みが決まっ
ており、例えば上記デバイス1004からの割り込みは
“割り込み1”であるとする。
Here, when an input is made from a device 1004 such as a keyboard or a mouse, an interrupt signal 1005 is transmitted from the device 1004 to the CPU 1001. Here, an interrupt is determined for each device, and for example, the interrupt from the device 1004 is “interrupt 1”.

【0114】上記割り込み信号1005がCPU100
1に受信されると、CPU1001は、プログラムカウ
ンタ1003に格納されている、現在実行しているプロ
グラム1010のアドレスBを一旦退避し、上記“割り
込み1”に対応する割り込みベクタ1(1006)を参
照する。ここで、割り込みベクタとは、割り込みハンド
ラのアドレスを収めたメモリ領域であり、割り込みハン
ドラとは割り込みが起こったときに実行される小さなプ
ログラムコードである。
The interrupt signal 1005 is the CPU 100.
1, the CPU 1001 temporarily saves the address B of the currently executing program 1010 stored in the program counter 1003, and refers to the interrupt vector 1 (1006) corresponding to the “interrupt 1”. To do. Here, the interrupt vector is a memory area containing the address of the interrupt handler, and the interrupt handler is a small program code executed when an interrupt occurs.

【0115】上記CPU1001は、上記割り込みベク
タ1(1006)を参照して割り込みハンドラ、即ちこ
こではアドレスCからアドレスDにかけて格納されてい
る割り込みプログラム1(1008)のアドレスを取得
する。
The CPU 1001 refers to the interrupt vector 1 (1006) to obtain the address of the interrupt handler, that is, the interrupt program 1 (1008) stored from address C to address D here.

【0116】上記CPU1001は、上記割り込みプロ
グラム1(1008)の開始アドレスを取得すると、当
該開始アドレスを上記プログラムカウンタ1003に格
納し、順次割り込みプログラム1008を実行する。
When the CPU 1001 obtains the start address of the interrupt program 1 (1008), the CPU 1001 stores the start address in the program counter 1003 and sequentially executes the interrupt program 1008.

【0117】これにより、デバイス1004より入力さ
れた命令は、割り込みプログラム1として実行され例え
ばマウスカーソルの移動等が行われる。
As a result, the instruction input from the device 1004 is executed as the interrupt program 1 and the mouse cursor is moved, for example.

【0118】上記割り込みプログラム1(1008)の
処理が完了すると、退避したアドレスBが上記プログラ
ムカウンタ1003に書き込まれ、当該アドレスBから
プログラム1010が実行される。
When the processing of the interrupt program 1 (1008) is completed, the saved address B is written in the program counter 1003, and the program 1010 is executed from the address B.

【0119】以上が従来の割り込み処理の例であるが、
当該割り込み処理は割り込み信号により開始され、予め
決められた割り込みプログラムが実行される。このた
め、非常に信頼が置ける処理ということができる。
The above is an example of conventional interrupt processing.
The interrupt process is started by an interrupt signal, and a predetermined interrupt program is executed. Therefore, it can be said that the process is very reliable.

【0120】さて、従来の割り込み処理について説明し
たが、本実施の形態4では、上記割り込み処理を利用す
ることでさらに強固なセキュリティを実現している。
The conventional interrupt processing has been described, but in the fourth embodiment, stronger security is realized by using the interrupt processing.

【0121】最初に、本実施の形態4における、各アプ
リケーションの関係について簡単に説明する。図12に
示すのは、CPU1203上でアプリケーション1(1
205)が実行されているイメージであり、また必要に
応じてアプリケーション2(1209)も実行可能であ
る。具体的には、上記実施の形態3で挙げたように、例
えばダウンロードされたアプリケーション1が電子商取
引を行なうプログラムであり、当該アプリケーション1
が、ICカードに予め備えられている電子マネー管理プ
ログラム(アプリケーション2)を利用して電子商取引
に応じた金額を減額するような場合が考えられる。尚、
本実施の形態4では、アプリケーション1(1205)
とアプリケーション(1209)が例えばタイムシェア
リングを利用したマルチタスクとして動作するものでは
なく、アプリケーション1(1205)がアプリケーシ
ョン2(1209)を呼び出す場合等が当てはまる。
First, the relationship between the applications in the fourth embodiment will be briefly described. FIG. 12 shows that the application 1 (1
205) is the image being executed, and the application 2 (1209) can also be executed if necessary. Specifically, as described in the third embodiment, for example, the downloaded application 1 is a program for conducting electronic commerce, and the application 1
However, there may be a case where an electronic money management program (application 2) provided in advance in the IC card is used to reduce the amount of money according to the electronic commerce. still,
In the fourth embodiment, the application 1 (1205)
For example, the application (1209) does not operate as multitask using time sharing, and the application 1 (1205) calls the application 2 (1209).

【0122】尚、上記アプリケーション1(1205)
は、アプリケーション1メモリ領域(1204)内に格
納されており、当該アプリケーション1メモリ領域(1
204)には他のプログラムであるOS1(1206)
及び割り込みプログラム1(1207)が格納されて一
群のプログラムを構成する。尚、理解に供するため例え
ばアプリケーション1(1205)とOS1(120
6)を併せてアプリケーション1と定義しても問題はな
い。
The above application 1 (1205)
Are stored in the application 1 memory area (1204), and the application 1 memory area (1
204) is another program OS1 (1206)
And an interrupt program 1 (1207) are stored to form a group of programs. For the sake of understanding, for example, the application 1 (1205) and the OS 1 (120
There is no problem if 6) is defined together as application 1.

【0123】さらにアプリケーション1メモリ領域12
04と同じくアプリケーション2メモリ領域1208が
設けられ、アプリケーション2(1209)、OS2
(1210)、割り込みプログラム2(1211)が格
納される。当然、さらにアプリケーション3、4がある
場合は同様にアプリケーション3、4メモリ格納領域が
設けられる。
Furthermore, application 1 memory area 12
As with 04, an application 2 memory area 1208 is provided, and application 2 (1209), OS2
(1210) and the interrupt program 2 (1211) are stored. Of course, when there are further applications 3 and 4, the applications 3 and 4 memory storage areas are similarly provided.

【0124】また、上記アプリケーション1メモリ領域
1204とアプリケーション2メモリ領域1208に対
するアクセスは、アクセス監視手段1101にて監視さ
れている。その他検知信号発生手段1108、割込信号
発生手段1106、アクセス情報管理手段1108、共
有領域1202を備えるが処理の詳細は順を追って説明
する。
Access to the application 1 memory area 1204 and the application 2 memory area 1208 is monitored by the access monitoring means 1101. Others are provided with a detection signal generation means 1108, an interrupt signal generation means 1106, an access information management means 1108, and a shared area 1202, but the details of the processing will be described in order.

【0125】上記図12にて示したイメージをハードウ
ェア構成として示したのが図11である。
FIG. 11 shows the hardware configuration of the image shown in FIG.

【0126】上記図11において、アクセス監視手段1
101を構成するアドレス格納手段1102が格納する
メモリ領域のアドレスは、アプリケーション単位で格納
される。つまり、図12におけるアプリケーション1メ
モリ領域1204に対応するメモリ領域のアドレスは、
アプリケーション1メモリ領域のアドレス1103に格
納されており、同じくアプリケーション2メモリ領域1
208に対応するメモリ領域のアドレスは、アプリケー
ション2メモリ領域のアドレス1104に格納されてい
る。尚、上記アプリケーション単位とは、所定のアプリ
ケーション(プログラム)が格納されたメモリ領域及び
当該アプリケーション(プログラム)によるアクセスが
許されたメモリ領域よりなるアドレスとすることができ
る。
In FIG. 11, the access monitoring means 1
The address of the memory area stored by the address storage unit 1102 forming 101 is stored in units of applications. That is, the address of the memory area corresponding to the application 1 memory area 1204 in FIG.
It is stored at address 1103 of the application 1 memory area, and is also stored in the application 2 memory area 1
The address of the memory area corresponding to 208 is stored in the address 1104 of the application 2 memory area. The application unit may be an address composed of a memory area in which a predetermined application (program) is stored and a memory area permitted to be accessed by the application (program).

【0127】また、図13に示すメモリイメージ130
1はROM103、RAM104、EEPROM105
上の各プログラムの領域を示すイメージである。上記メ
モリイメージ1301には、アプリケーション1メモリ
領域1204に属するプログラム及びアプリケーション
2メモリ領域1208に属するプログラムが格納され、
さらに共有領域として利用されるメモリ(共有領域12
02)が確保されている。
Further, the memory image 130 shown in FIG.
1 is a ROM 103, a RAM 104, an EEPROM 105
It is an image showing the area of each program above. The memory image 1301 stores a program belonging to the application 1 memory area 1204 and a program belonging to the application 2 memory area 1208,
Further, a memory used as a shared area (shared area 12
02) is secured.

【0128】つまり、上記メモリイメージ1301に示
される割り込みベクタ1(1310)、アプリケーショ
ン1(1311)、OS1(1312)、割り込みプロ
グラム1(1313)、データ1(1314)は、上記
アプリケーション1メモリ領域1204に属するプログ
ラムと、当該プログラムが利用するデータであり、その
アドレスがアプリケーション1メモリ領域のアドレス1
103に格納されている。
That is, the interrupt vector 1 (1310), application 1 (1311), OS 1 (1312), interrupt program 1 (1313), data 1 (1314) shown in the memory image 1301 are stored in the application 1 memory area 1204. And the data used by the program, the address of which is the address 1 of the application 1 memory area.
It is stored in 103.

【0129】また同様に、割り込みベクタ2(132
0)、アプリケーション2(1321)、OS2(13
22)、割り込みプログラム2(1323)、データ2
(1324)は、上記アプリケーション2メモリ領域1
208に属するプログラムと、当該プログラムが利用す
るデータであり、そのアドレスがアプリケーション2メ
モリ領域のアドレス1104に格納されている。
Similarly, interrupt vector 2 (132
0), application 2 (1321), OS2 (13
22), interrupt program 2 (1323), data 2
(1324) is the application 2 memory area 1
A program belonging to 208 and data used by the program, the address of which is stored in the address 1104 of the application 2 memory area.

【0130】続いて、上記構成を踏まえたうえで、以下
に各アプリケーションの動作を説明する。尚、理解に供
するため、アプリケーション1(1205)の処理を図
14の破線1420に示した処理とする。また、アクセ
ス情報管理手段1108に格納されるアクセス情報は、
現在動作しているプログラムが、アプリケーション1メ
モリ領域1204に属することを示す“1”であるもの
とする。
Next, based on the above configuration, the operation of each application will be described below. For the sake of understanding, the processing of the application 1 (1205) is the processing shown by the broken line 1420 in FIG. The access information stored in the access information management means 1108 is
It is assumed that the currently operating program is “1” indicating that it belongs to the application 1 memory area 1204.

【0131】まず、アプリケーション1(1205)が
例えば内部処理1(S1401)を行っている状態で
は、CPU102からの各メモリへのアクセスは、必ず
割り込みベクタ1(1310)、アプリケーション1
(1311)、OS1(1312)、割り込みプログラ
ム1(1313)、データ1(1314)のいずれか、
または共有領域1202へのアクセスである。当該アク
セスは、アドレスバス201を介して比較手段1105
に常時監視されている。ここで、比較手段1105は、
上記アドレス格納手段1102に格納されているアドレ
スと、上記アドレスバス201を介して得られるアドレ
スに基づいて、現在アクセスされているメモリ領域がア
プリケーション1メモリ領域1204に対応することを
示す“1”を出力している。
First, in the state where the application 1 (1205) is performing the internal processing 1 (S1401), for example, access to each memory from the CPU 102 is always interrupt vector 1 (1310), application 1
(1311), OS1 (1312), interrupt program 1 (1313), data 1 (1314),
Alternatively, the access is to the shared area 1202. The access is performed by the comparison means 1105 via the address bus 201.
Is constantly monitored. Here, the comparison means 1105
Based on the address stored in the address storage means 1102 and the address obtained via the address bus 201, "1" indicating that the memory area currently accessed corresponds to the application 1 memory area 1204 is set. It is outputting.

【0132】上記出力“1”を受けた検知信号発生手段
1108は、アクセス情報管理手段1107よりアクセ
ス情報を取得する。ここで、当該アクセス情報は、現在
動作しているプログラムが、アプリケーション1メモリ
領域1204に属することを示す“1”であるため、検
知信号発生手段1108は検知信号を発生しない。
Upon receiving the output "1", the detection signal generation means 1108 acquires the access information from the access information management means 1107. Here, since the access information is “1” indicating that the currently operating program belongs to the application 1 memory area 1204, the detection signal generation means 1108 does not generate a detection signal.

【0133】尚、アプリケーション1(1205)が処
理を行っている状態(図14:S1401)では、アク
セス情報の値が“1”であるために、メモリイメージ1
301の状態にある。つまり、上記メモリイメージ13
01中のドットで示した領域である割り込みベクタ2
(1320)、アプリケーション2(1321)、OS
2(1322)、割り込みプログラム2(1323)、
データ2(1324)は、アクセスが禁止されている状
態を示す。この状態で、上記アプリケーションが例えば
アプリケーション2(1321)領域にアクセスする
と、上記比較手段1105は、アプリケーション2メモ
リ領域1204に属することを示す例えば“2”を出力
するため、検知信号発生手段1108は、アクセス情報
の“1”とに基づいて検知信号を発生するに至る。こう
なると、割り込み信号発生手段1106は、例えば当該
検知信号を受けてCPU102に所定の割り込みを発生
させ、例えばCPU102の処理をストップしたり、不
正なアクセスを行ったアプリケーションを強制終了す
る。
In the state where the application 1 (1205) is performing the processing (FIG. 14: S1401), the value of the access information is “1”, so the memory image 1
It is in the state of 301. That is, the memory image 13
Interrupt vector 2 which is the area indicated by the dot in 01
(1320), application 2 (1321), OS
2 (1322), interrupt program 2 (1323),
Data 2 (1324) indicates a state where access is prohibited. In this state, when the application accesses, for example, the application 2 (1321) area, the comparison means 1105 outputs, for example, “2” indicating that it belongs to the application 2 memory area 1204. Therefore, the detection signal generation means 1108 The detection signal is generated based on the access information “1”. In this case, the interrupt signal generation means 1106 receives the detection signal, for example, and causes the CPU 102 to generate a predetermined interrupt, and for example, stops the processing of the CPU 102 or forcibly terminates the application that has made an unauthorized access.

【0134】続いて、上記アプリケーション1(120
5)がアプリケーション2(1209)との連携処理を
行なう場合、上記アプリケーション1(1205)は、
共有領域1202に、上記アプリケーション2(120
9)に対するコマンド、及びアプリケーション1(12
05)を示すコードを書き込む(図14:S1402−
1)。
Subsequently, the application 1 (120
5) performs the cooperative processing with the application 2 (1209), the application 1 (1205)
In the shared area 1202, the application 2 (120
Command for 9) and application 1 (12
05) is written (FIG. 14: S1402-
1).

【0135】次に、上記アプリケーション1(120
5)は、割り込み2を発生させるコマンドを用いて所定
の信号をCPU102から割込信号発生手段1106に
送信する(図14:S1402−2)。つまり、上記ア
プリケーション1(1205)は、上記割り込み2に対
応する割り込みプログラム2(1211)を呼び出せば
よいのであるが、アプリケーション(OSを含む)によ
る直接の呼び出しではセキュリティが脆弱になるため一
旦ハードウェアによる割り込み処理を介するのである。
Next, the application 1 (120
5) sends a predetermined signal from the CPU 102 to the interrupt signal generating means 1106 using the command for generating the interrupt 2 (FIG. 14: S1402-2). In other words, the application 1 (1205) only needs to call the interrupt program 2 (1211) corresponding to the interrupt 2. However, if the application (including the OS) is directly called, the security becomes weak. Through the interrupt processing by.

【0136】上記信号をCPUより受信した割込信号発
生手段1106は、当該信号に対応する割り込み信号を
CPU102に送信すると共に、アクセス情報管理手段
1107に対して、割り込み処理2を行なうための割り
込み信号を送信した旨を示す情報を送信する。
Upon receiving the above signal from the CPU, the interrupt signal generating means 1106 transmits an interrupt signal corresponding to the signal to the CPU 102, and at the same time, causes the access information managing means 1107 to perform the interrupt processing 2. The information indicating that is transmitted is transmitted.

【0137】上記割り込み信号を送信した旨を示す情報
を受信すると、上記アクセス情報管理手段1107は、
当該アクセス情報管理手段1107が格納するアクセス
情報を“2”に変更する。これにより、図13に示した
メモリイメージ1301はメモリイメージ1302に変
更され、即ち、上記メモリイメージ1302中のドット
で示した領域である割り込みベクタ1(1310)、ア
プリケーション1(1311)、OS1(1312)、
割り込みプログラム1(1313)、データ1(131
4)は、アクセスが禁止されている状態となる。
Upon receiving the information indicating that the interrupt signal has been transmitted, the access information management means 1107
The access information stored in the access information management means 1107 is changed to "2". As a result, the memory image 1301 shown in FIG. 13 is changed to the memory image 1302, that is, the interrupt vector 1 (1310), the application 1 (1311), the OS 1 (1312), which is the area shown by the dot in the memory image 1302. ),
Interrupt program 1 (1313), data 1 (131
In 4), access is prohibited.

【0138】また、上記割り込み信号を受信したCPU
102は、当該割り込み信号に対応する処理、即ち、上
記割り込み信号に対応する割り込みベクタ2(132
0)を参照して割り込みプログラム2(1323)を実
行する。
Further, the CPU that has received the interrupt signal
Reference numeral 102 denotes a process corresponding to the interrupt signal, that is, an interrupt vector 2 (132) corresponding to the interrupt signal.
0) to execute the interrupt program 2 (1323).

【0139】この状態では、上記CPU102は、アプ
リケーション2メモリ領域1208に属するメモリ領域
(割り込みプログラム2)を参照する。このため上記比
較手段1105は、上記アプリケーション2メモリ領域
のアドレス1104に基づいて、例えば“2”を検知信
号発生手段1108に出力する。
In this state, the CPU 102 refers to the memory area (interrupt program 2) belonging to the application 2 memory area 1208. Therefore, the comparison means 1105 outputs, for example, "2" to the detection signal generation means 1108 based on the address 1104 of the application 2 memory area.

【0140】しかし、上記アクセス情報は、既に上記割
込信号発生手段1106からの通知に基づき“2”に変
更されているため、上記検知信号発生手段1108は検
知信号を発生しない。
However, since the access information has already been changed to "2" based on the notification from the interrupt signal generating means 1106, the detecting signal generating means 1108 does not generate the detecting signal.

【0141】上記割り込みプログラム2(1323)の
処理では、図14に示したように、上記共有領域120
2に格納されているコマンド、及びアプリケーション1
を示すコードを取り出す(図14:S1403)。続い
て、上記割り込みプログラム2(1323)は、当該取
り出したコマンドに基づく処理を行い、その結果、及び
アプリケーション1を示すコードを上記共有領域120
2に書き込む(図14、図15:S1404〜S140
5)。次に、上記割り込みプログラム2(1323)
は、上記取り出したアプリケーション1を示すコードに
基づき、割り込み1を発生させる。つまり、割り込み1
を発生させるコマンドを用いて所定の信号をCPU10
2から割込信号発生手段1106に送信する(図14:
S1406)。
In the processing of the interrupt program 2 (1323), as shown in FIG.
Command stored in 2 and application 1
The code indicating the is extracted (FIG. 14: S1403). Subsequently, the interrupt program 2 (1323) performs processing based on the extracted command, and the result and the code indicating the application 1 are added to the shared area 120.
2 (FIGS. 14 and 15: S1404 to S140)
5). Next, the interrupt program 2 (1323)
Generates an interrupt 1 based on the extracted code indicating the application 1. That is, interrupt 1
A predetermined signal using the command for generating
2 to the interrupt signal generating means 1106 (FIG. 14:
S1406).

【0142】上記信号をCPUより受信した割込信号発
生手段1106は、当該信号に対応する割り込み信号を
CPU102に送信すると共に、アクセス情報管理手段
1107に対して、割り込み処理1を行なうための割り
込み信号を送信した旨を示す情報を送信する。
Upon receiving the above signal from the CPU, the interrupt signal generating means 1106 transmits an interrupt signal corresponding to the signal to the CPU 102, and at the same time, an interrupt signal for performing the interrupt processing 1 to the access information managing means 1107. The information indicating that is transmitted is transmitted.

【0143】上記割り込み信号を送信した旨を示す情報
を受信すると、上記アクセス情報管理手段1107は、
当該アクセス情報管理手段1107が格納するアクセス
情報を“1”に変更する。これにより、図13に示した
メモリイメージ1302はメモリイメージ1301に変
更され、即ち、上記メモリイメージ1301中のドット
で示した領域である割り込みベクタ2(1320)、ア
プリケーション2(1321)、OS2(1322)、
割り込みプログラム2(1323)、データ2(132
4)は、アクセスが禁止されている状態となる。
When the information indicating that the interrupt signal has been transmitted is received, the access information management means 1107
The access information stored in the access information management means 1107 is changed to "1". As a result, the memory image 1302 shown in FIG. 13 is changed to the memory image 1301, that is, the interrupt vector 2 (1320), the application 2 (1321), the OS 2 (1322) which is the area shown by the dot in the memory image 1301. ),
Interrupt program 2 (1323), data 2 (132
In 4), access is prohibited.

【0144】また、上記割り込み信号を受信したCPU
102は、当該割り込み信号に対応する処理、即ち、上
記割り込み信号に対応する割り込みベクタ1(131
0)を参照して割り込みプログラム1(1313)を実
行する。
Also, the CPU that has received the interrupt signal
Reference numeral 102 denotes a process corresponding to the interrupt signal, that is, an interrupt vector 1 (131 corresponding to the interrupt signal.
0) to execute the interrupt program 1 (1313).

【0145】上記割り込みプログラム1(1313)
は、上記共有領域1202を参照し、当該領域に格納さ
れる結果を取り出す(図14:S1407)。また、さ
らにアプリケーション1を示すコードに基づいて上記ア
プリケーション1が割り込み2を発生させた処理(図1
4:S1402−2)に連続する内部処理2を呼び出す
(図14:S1407〜S1408)。
Interrupt program 1 (1313)
Refers to the shared area 1202 and extracts the result stored in the area (FIG. 14: S1407). Further, based on the code indicating the application 1, a process in which the application 1 causes the interrupt 2 (see FIG. 1).
4: S1402-2) to call the internal processing 2 (FIG. 14: S1407 to S1408).

【0146】上記割り込みプログラム1(1207)に
より呼び出されたアプリケーション1(1205)は、
呼び出された内部処理2を実行する(図14:S140
9)。
The application 1 (1205) called by the interrupt program 1 (1207) is
The called internal process 2 is executed (FIG. 14: S140).
9).

【0147】これにより、アプリケーション1とアプリ
ケーション2との連携処理が完了する。
As a result, the cooperation process between the application 1 and the application 2 is completed.

【0148】以上のように、ハードウェアによる割り込
み処理を用いてアプリケーション間の処理を連携させる
ことにより、上記アドレス格納手段に格納するアドレス
をOSにて更新する必要がなく、即ち上記アドレス情報
更新問題を解決することができる。また、アクセス情報
管理手段に格納されているアクセス情報は、割り込み処
理に基づき割込信号発生手段により更新されるため、当
該アクセス情報をOSが変更する問題、即ち上記アクセ
ス情報更新問題も解決することが可能となる。従って、
アドレス情報更新問題、アクセス情報更新問題を解決
し、しかもアプリケーション間の処理を連携可能な不正
アクセス監視装置、及びICカードを提供することがで
きる。
As described above, by coordinating the processing between applications using the interrupt processing by hardware, it is not necessary to update the address stored in the address storing means by the OS, that is, the address information updating problem. Can be solved. Further, since the access information stored in the access information management means is updated by the interrupt signal generation means based on the interrupt processing, the problem that the OS changes the access information, that is, the access information update problem is solved. Is possible. Therefore,
It is possible to provide an unauthorized access monitoring device and an IC card which can solve the address information update problem and the access information update problem and can cooperate with the processing between applications.

【0149】尚、上記アプリケーション2からアプリケ
ーション1の処理を呼び出す場合が考えられる。このよ
うな場合は、上述した処理におけるアプリケーション1
及びアプリケーション2に関連する部分を読み替えれば
解決する。但し、この場合には、コマンドを送信する割
り込みプログラムと結果を取り出す割り込みプログラム
を別々に用意し、さらにそれぞれの割り込みプログラム
に対応する割り込みを用意する必要がある。この無駄を
省くために、上記割り込みプログラムは、図15に示す
ように、開始直後の処理(S1501)にて共有領域に
格納される情報がコマンドか結果かを判断し、当該判断
に応じて分岐するようにする。これにより、他のアプリ
ケーションと連携処理を行なうアプリケーション1つに
対して、割り込みプログラムを1つ設けるだけでよい。
It is possible to call the processing of the application 1 from the application 2. In such a case, the application 1 in the processing described above
And the problem can be solved by replacing the part related to the application 2. However, in this case, it is necessary to separately prepare an interrupt program for transmitting a command and an interrupt program for extracting a result, and further prepare an interrupt corresponding to each interrupt program. In order to save this waste, the interrupt program determines, as shown in FIG. 15, whether the information stored in the shared area is a command or a result in the process immediately after the start (S1501), and branches according to the determination. To do so. As a result, it is only necessary to provide one interrupt program for each application that performs cooperative processing with other applications.

【0150】また、各割り込みプログラムが呼び出すプ
ログラムやアドレスを例えば上記共有領域にコマンドと
同様に格納することで、アクセス監視手段が許す範囲で
呼び出し先を自由に設定することができる。
Further, by storing the program or address called by each interrupt program in the shared area in the same manner as the command, the call destination can be freely set within the range permitted by the access monitoring means.

【0151】(実施の形態5)続いて、図14〜図20
を用いて、上記実施の形態4と異なる不正アクセスの監
視処理について説明する。
(Fifth Embodiment) Next, FIGS.
An unauthorized access monitoring process different from the fourth embodiment will be described with reference to FIG.

【0152】上記実施の形態4においては、例えばアプ
リケーション1メモリ領域1204に格納される一連の
プログラムは、OSを除くと、図14に示すアプリケー
ション1(1420)及び図15に示す割り込みプログ
ラムより構成されることになる。つまり、アプリケーシ
ョンの開発において、開発者はアプリケーションと割り
込みプログラムの2つの連携を意識せねばならず、記述
が複雑になり開発効率が下がるということが予想され
る。
In the fourth embodiment, for example, a series of programs stored in the application 1 memory area 1204 is composed of the application 1 (1420) shown in FIG. 14 and the interrupt program shown in FIG. 15 excluding the OS. Will be. In other words, in developing an application, the developer has to be aware of the cooperation between the application and the interrupt program, and it is expected that the description will be complicated and the development efficiency will be reduced.

【0153】そこで、本実施の形態5では、OSに依存
しないと共に、アプリケーション開発効率の向上を可能
とする不正アクセス監視処理について説明する。本実施
の形態5でも、上記アドレス情報更新問題、アクセス情
報更新問題を解決するために、以下の構成とする。
Therefore, in the fifth embodiment, an unauthorized access monitoring process which does not depend on the OS and which can improve the efficiency of application development will be described. Also in the fifth embodiment, in order to solve the address information update problem and the access information update problem, the following configuration is adopted.

【0154】即ち、図18に示すICカード1801
は、上記実施の形態4におけるICカード1201と同
様の構成を有するが、所定のメモリ領域に中断情報保持
領域1802を備える。さらに、アクセス監視手段18
05は、アドレス格納手段1901を備える。ここで、
上記アドレス格納手段1901に格納される各メモリ領
域のアドレスは、 ・アプリケーション1メモリ領域のアドレス1902、 ・アプリケーション2メモリ領域のアドレス1903、 ・割り込みプログラムメモリ領域のアドレス1904 に分割され、さらにプログラムによる書き換えができな
いように固定されている。
That is, the IC card 1801 shown in FIG.
Has the same configuration as the IC card 1201 in the fourth embodiment, but has an interruption information holding area 1802 in a predetermined memory area. Furthermore, the access monitoring means 18
Reference numeral 05 includes address storage means 1901. here,
The address of each memory area stored in the address storage means 1901 is divided into: an application 1 memory area address 1902; an application 2 memory area address 1903; an interrupt program memory area address 1904; and rewriting by a program. It is fixed so that it cannot be done.

【0155】さらに、アプリケーション1メモリ領域の
アドレス1902には、図20のメモリイメージ200
1の白抜きで示すメモリ領域のアドレスが格納されてい
る。つまり、アプリケーション1(1311)及びOS
1(1312)のメモリ領域と、これらのプログラム
(アプリケーション1(1311)及びOS1(131
2))がアクセス可能なメモリ領域であるデータ1(1
314)、割り込みベクタ1(1310)、割り込みベ
クタ2(1320)、及び共有領域1202のアドレス
により構成される。上記アプリケーション1(131
1)は図18におけるアプリケーション1(1610)
が該当し、上記OS1(1312)は、図18における
OS1(1206)が該当する。
Further, at the address 1902 of the application 1 memory area, the memory image 200 of FIG.
The address of the memory area indicated by the outline of 1 is stored. That is, application 1 (1311) and OS
1 (1312) memory area and these programs (application 1 (1311) and OS 1 (131
2)) is the accessible memory area Data 1 (1
314), interrupt vector 1 (1310), interrupt vector 2 (1320), and the address of the shared area 1202. Application 1 (131
1) is application 1 (1610) in FIG.
The OS1 (1312) corresponds to the OS1 (1206) in FIG.

【0156】また、アプリケーション2メモリ領域のア
ドレス1903には、図20のメモリイメージ2003
の白抜きで示すメモリ領域のアドレスが格納されてい
る。つまり、アプリケーション2(1321)及びOS
2(1322)のメモリ領域と、これらのプログラム
(アプリケーション2(1321)及びOS2(132
2))がアクセス可能なメモリ領域であるデータ2(1
324)、割り込みベクタ1(1310)、割り込みベ
クタ2(1320)、及び共有領域1202のアドレス
により構成される。上記アプリケーション2(132
1)は図18におけるアプリケーション2(1710)
が該当し、上記OS2(1322)は、図18における
OS2(1210)が該当する。
Further, at the address 1903 of the application 2 memory area, the memory image 2003 of FIG.
The address of the memory area shown in white is stored. That is, the application 2 (1321) and the OS
2 (1322) memory area and these programs (application 2 (1321) and OS 2 (132
2)) is the accessible memory area, data 2 (1
324), interrupt vector 1 (1310), interrupt vector 2 (1320), and the address of the shared area 1202. Application 2 (132
1) is application 2 (1710) in FIG.
The OS2 (1322) corresponds to the OS2 (1210) in FIG.

【0157】さらに、割り込みプログラムメモリ領域の
アドレス1904には、図20のメモリイメージ200
2の白抜きで示すメモリ領域のアドレスが格納されてい
る。つまり、割り込みプログラム1(1313)、割り
込みプログラム2(1323)、中断情報保持領域20
04のアドレスにより構成される。上記割り込みプログ
ラム1(1313)及び割り込みプログラム2(132
3)は、図18における割り込みプログラム1(162
0)、及び割り込みプログラム2(1720)がそれぞ
れ該当する。又、上記中断情報保持領域2004は、図
18における中断情報保持領域1802が該当する。
Further, at the address 1904 of the interrupt program memory area, the memory image 200 of FIG.
The addresses of the memory areas indicated by white circles 2 are stored. That is, the interrupt program 1 (1313), the interrupt program 2 (1323), the interruption information holding area 20
It is composed of addresses 04. Interrupt program 1 (1313) and interrupt program 2 (132
3) is the interrupt program 1 (162 in FIG. 18).
0) and interrupt program 2 (1720) correspond to each. Further, the interruption information holding area 2004 corresponds to the interruption information holding area 1802 in FIG.

【0158】従って、上記アドレス格納手段1901に
格納される各メモリ領域のアドレスは、所定のプログラ
ムが格納されたメモリ領域及び当該プログラムによるア
クセスが許されたメモリ領域を1つの単位としていると
いえる。
Therefore, it can be said that the addresses of the respective memory areas stored in the address storage means 1901 have a memory area in which a predetermined program is stored and a memory area permitted by the program as one unit.

【0159】また、上記アクセス監視手段1805は、
比較手段1905及びプログラム通知手段1906を備
えるが詳細は後述する。
Further, the access monitoring means 1805 is
The comparison means 1905 and the program notification means 1906 are provided, but the details will be described later.

【0160】続いて、上記構成を踏まえたうえで、以下
に各アプリケーションの動作を説明する。尚、上記構成
により、上記実施の形態4にて示したアプリケーション
1の処理は、図16のアプリケーション1(1610)
として示すことが可能となる。
Next, based on the above configuration, the operation of each application will be described below. With the above configuration, the processing of the application 1 shown in the fourth embodiment is the same as the application 1 (1610) shown in FIG.
It becomes possible to show as.

【0161】まず、アプリケーション1(1610)が
処理を行なう場合、CPU102が当該アプリケーショ
ン1(1610)の格納されているメモリ領域である、
アプリケーション1(1311)からアプリケーション
1を読み出す。この際に、アドレスバス201は上記ア
プリケーション1(1311)のメモリ領域のアドレス
が送られ、さらに、制御バス203にはプログラムの読
み出しを示す命令取込信号が送られる。
First, when the application 1 (1610) performs processing, the CPU 102 is a memory area in which the application 1 (1610) is stored.
The application 1 is read from the application 1 (1311). At this time, the address of the memory area of the application 1 (1311) is sent to the address bus 201, and an instruction fetch signal indicating reading of the program is sent to the control bus 203.

【0162】上記アドレス及び命令取込信号が送信され
ると、当該信号は上記バスを監視しているアクセス監視
手段1805に送信される。つまり上記アドレスは比較
手段1905に送信され、上記命令取込信号はプログラ
ム通知手段1906に送信される。
When the address and instruction fetch signal is transmitted, the signal is transmitted to the access monitoring means 1805 which monitors the bus. That is, the address is transmitted to the comparison means 1905, and the instruction fetch signal is transmitted to the program notification means 1906.

【0163】上記比較手段は、上記アドレスを取得する
と上記アドレス格納手段1901を参照し、当該アドレ
スがどのアプリケーション(プログラム)に対応するか
を判断する。ここでは、実行されているプログラムがア
プリケーション1(1610)であるため、上記アドレ
スは上記アプリケーション1メモリ領域のアドレス19
02に対応すると判断される。
When the comparison means acquires the address, it refers to the address storage means 1901 to determine which application (program) the address corresponds to. Here, since the program being executed is the application 1 (1610), the address is the address 19 of the application 1 memory area.
It is determined to correspond to 02.

【0164】上記比較手段1905は、上記アドレスに
対応するアプリケーションを判断すると、当該アプリケ
ーションの情報を検知信号発生手段1807に送信す
る。ここでは、例えば“1”であるとする。
When the comparing means 1905 judges the application corresponding to the address, it sends the information of the application to the detection signal generating means 1807. Here, it is assumed to be “1”, for example.

【0165】また、上記比較手段1905は、上記アド
レスに対応するアプリケーションが“1”である旨の情
報を上記プログラム通知手段1906に通知する。
Further, the comparing means 1905 notifies the program notifying means 1906 of information that the application corresponding to the address is "1".

【0166】一方で、上記プログラム通知手段1906
は、上記制御バスから送信された命令取込信号と、上記
比較手段から得られた “1”とに基づいて、現在実行
されているプログラムを示す“1”をアクセス情報管理
手段1806に送信する。
On the other hand, the program notification means 1906 described above.
Transmits "1" indicating the program currently being executed to the access information management means 1806 based on the instruction fetch signal transmitted from the control bus and "1" obtained from the comparison means. .

【0167】上記アクセス情報管理手段1806は、上
記プログラム通知手段1906より送信された情報を基
に、アクセス情報を“1”に変更する。当該“1”は、
現在実行されているプログラムがアプリケーション1に
対応することを示す。
The access information management means 1806 changes the access information to "1" based on the information transmitted from the program notification means 1906. The "1" is
Indicates that the program currently being executed corresponds to application 1.

【0168】これにより、メモリ領域へのアクセスの可
否を示すメモリイメージは、図20に示したメモリイメ
ージ2001になる。即ち、上記メモリイメージ200
1中のドットで示した領域である割り込みプログラム1
(1313)、アプリケーション2(1321)、OS
2(1322)、割り込みプログラム2(1323)、
データ2(1324)、及び中断情報保持領域2004
は、アクセスが禁止されている状態となる。
As a result, the memory image showing whether or not the memory area can be accessed becomes the memory image 2001 shown in FIG. That is, the memory image 200
Interrupt program 1 which is the area indicated by the dot in 1
(1313), application 2 (1321), OS
2 (1322), interrupt program 2 (1323),
Data 2 (1324) and interruption information holding area 2004
Indicates that access is prohibited.

【0169】以上により、上記アクセス監視手段は、上
記アドレス格納手段1901及びアドレスバス、制御バ
スからの情報に基づいて、メモリ領域へのアクセスを行
っているプログラムを判定することができる。
As described above, the access monitoring means can determine the program accessing the memory area based on the information from the address storage means 1901 and the address bus and the control bus.

【0170】続いて、上記アプリケーション1(161
0)がCPU102にて読み出された後、上記アプリケ
ーション1(1610)は内部処理1を実行する(図1
6:S1401)。当該内部処理1の処理内容は、上記
実施の形態4で示したものと同一でよい。
Then, the application 1 (161)
0) is read by the CPU 102, the application 1 (1610) executes the internal processing 1 (FIG. 1).
6: S1401). The processing content of the internal processing 1 may be the same as that shown in the fourth embodiment.

【0171】上記アプリケーション1(1610)が上
記内部処理1に基づいて、例えばデータ1(1314)
にアクセスしたとする。この場合、当該データ1(13
14)のアドレスは、アドレスバス201を介して比較
手段1905は上記アドレス格納手段1901を参照し
て、アプリケーション1メモリ領域のアドレス1902
に対応することを示す“1”を上記検知信号発生手段1
807に送信する。
The application 1 (1610) uses, for example, the data 1 (1314) based on the internal processing 1.
Suppose you have accessed. In this case, the data 1 (13
The address of 14) refers to the address 1902 of the application 1 memory area by the comparing means 1905 referring to the address storing means 1901 via the address bus 201.
"1" indicating that the detection signal generating means 1 corresponds to
Send to 807.

【0172】この場合、上記データ1(1314)の参
照であるため上記制御バスには命令取込信号が送信され
ず、上記プログラム通知手段1906は上記アクセス情
報管理手段1806に対して実行されているプログラム
を通知しない。つまり、上記アクセス情報は“1”のま
まである。
In this case, since the data 1 (1314) is referenced, no instruction fetch signal is transmitted to the control bus, and the program notification means 1906 is executed by the access information management means 1806. Do not notify the program. That is, the access information remains "1".

【0173】上記検知信号発生手段1807は、上記比
較手段1905より送信される“1”と、上記アクセス
情報管理手段1806より得られる“1”とに基づい
て、上記メモリ領域へのアクセスは問題が無いと判定
し、不正検知信号を発生しない。
The detection signal generating means 1807 has no problem in accessing the memory area based on "1" transmitted from the comparing means 1905 and "1" obtained from the access information managing means 1806. It is determined that there is not, and the fraud detection signal is not generated.

【0174】ただし、上記アプリケーション1(161
0)が例えばデータ2(1324)を参照した場合等
は、上記比較手段1905は、アクセスしているアドレ
スが、アプリケーション2メモリ領域のアドレス190
3であることを示す例えば“2”を上記検知信号派生手
段1807に送信する。このため、検知信号発生手段1
807は、上記比較手段1905から得られる“2”
と、上記アクセス情報管理手段1806より得られる
“1”とに基づいて、上記メモリ領域へのアクセスは不
正アクセスだと判定し不正検知信号を発生する。
However, the above application 1 (161
0) refers to, for example, data 2 (1324), the comparing unit 1905 determines that the address being accessed is the address 190 of the application 2 memory area.
For example, “2” indicating 3 is transmitted to the detection signal derivation means 1807. Therefore, the detection signal generating means 1
807 is “2” obtained from the comparison means 1905.
And "1" obtained from the access information management means 1806, it is determined that the access to the memory area is an unauthorized access, and an unauthorized access detection signal is generated.

【0175】さて、上記内部処理1は、アプリケーショ
ン2(1710)と連携を伴わない処理である。ここ
で、上記アプリケーション1(1610)が上記アプリ
ケーション2(1710)と連携処理を行なう場合、上
記実施の形態4と同様、共有領域にコマンドを書き込ん
だ後、割り込み2を発生する(図16:S1402−1
→S1402−2)。
By the way, the internal process 1 is a process which is not associated with the application 2 (1710). Here, when the application 1 (1610) performs cooperative processing with the application 2 (1710), an interrupt 2 is generated after writing a command in the shared area, as in the fourth embodiment (FIG. 16: S1402). -1
→ S1402-2).

【0176】上記割り込み2が発生すると、CPU10
2(アプリケーション1)により割り込みベクタ2(1
320)が参照され、割り込みプログラム2が読み出さ
れる。この際、CPU102が割り込みプログラム2を
読み出すため、上記比較手段1905はアドレスバスよ
り得られた情報を基に、現在アクセスされているアドレ
スが割り込みプログラムメモリ領域のアドレス1904
に対応することを示す例えば“3”を検知信号発生手段
1807に送信する。
When the interrupt 2 occurs, the CPU 10
2 (application 1) causes interrupt vector 2 (1
320), and the interrupt program 2 is read. At this time, since the CPU 102 reads the interrupt program 2, the comparing means 1905 determines that the currently accessed address is the address 1904 of the interrupt program memory area based on the information obtained from the address bus.
Then, for example, “3” indicating that it corresponds to is transmitted to the detection signal generating means 1807.

【0177】また、上記プログラム通知手段は、上記比
較手段1906より得られた“3”と、上記制御バス2
03より得られた命令取込信号とに基づいて、現在実行
されているプログラムを示す“3”をアクセス情報管理
手段1806に送信することで、アクセス情報は例えば
“3”に変更される。
Further, the program notifying means is "3" obtained from the comparing means 1906 and the control bus 2
The access information is changed to, for example, "3" by transmitting "3" indicating the program currently being executed to the access information management means 1806 based on the command fetch signal obtained from 03.

【0178】これにより、メモリ領域へのアクセスの可
否を示すメモリイメージは、図20に示したメモリイメ
ージ2002になる。即ち、上記メモリイメージ200
2中のドットで示した領域であるアプリケーション1
(1311)、アプリケーション2(1321)、OS
1(1312)、OS2(1322)、データ1(13
14)、データ2(1324)、及び中断情報保持領域
2004は、アクセスが禁止されている状態となる。た
だし、後述するように、割り込みプログラムは予め固定
のプログラムとして提供されてもよいため、例えばすべ
ての領域をアクセス可能にしてもよい。
As a result, the memory image 2002 showing whether or not the memory area can be accessed becomes the memory image 2002 shown in FIG. That is, the memory image 200
Application 1 which is the area indicated by the dot in 2
(1311), application 2 (1321), OS
1 (1312), OS2 (1322), data 1 (13
14), the data 2 (1324), and the interruption information holding area 2004 are in a state where access is prohibited. However, as will be described later, since the interrupt program may be provided as a fixed program in advance, all areas may be accessible, for example.

【0179】以上により、実行されるプログラムがアプ
リケーション1(1610)から割り込みプログラム2
(1620)に変更されても、上記検知信号発生手段1
807は不正検知信号を発生しない。
As described above, the program to be executed is changed from the application 1 (1610) to the interrupt program 2
Even if changed to (1620), the detection signal generating means 1
807 does not generate the fraud detection signal.

【0180】続いて、上記CPU102に読み出された
割り込みプログラム2(1620)は、以下の処理を行
なう。
Then, the interrupt program 2 (1620) read by the CPU 102 performs the following processing.

【0181】即ち、上記割り込みプログラム2(162
0)は、まず、現在CPU102内にあるレジスタ等の
記憶領域をすべて上記中断情報保持領域2004に中断
情報として格納することで、アプリケーション1(16
10)が割り込み2を発生した直後からの再開を可能と
する(図16:S1621)。
That is, the interrupt program 2 (162
0) first stores all storage areas such as registers currently in the CPU 102 in the interruption information holding area 2004 as interruption information, so that the application 1 (16
10) enables the restart immediately after the interrupt 2 is generated (FIG. 16: S1621).

【0182】続いて、以前に上記中断情報保持領域20
04に記憶していたアプリケーション2(1710)の
中断情報を取り出し、アプリケーション2(1710)
を再開する(図16:S1622→S1623)。ただ
し、中断情報が無い状態であれば、当該アプリケーショ
ン2(1702)の最初より実行する。
Subsequently, the interruption information holding area 20 is previously set.
The interruption information of the application 2 (1710) stored in 04 is retrieved, and the application 2 (1710) is interrupted.
Is restarted (FIG. 16: S1622 → S1623). However, if there is no interruption information, the application 2 (1702) is executed from the beginning.

【0183】上記アプリケーション2(1710)が再
開されると、CPU102によりアプリケーション2
(1710)が読み出される。この際、CPU102が
アプリケーション2(1710)を読み出すため、上記
比較手段1905はアドレスバスより得られた情報を基
に、現在アクセスされているアドレスがアプリケーショ
ン2メモリ領域のアドレス1903に対応することを示
す例えば“2”を検知信号発生手段1807に送信す
る。
When the application 2 (1710) is restarted, the CPU 2 causes the application 2
(1710) is read. At this time, since the CPU 102 reads the application 2 (1710), the comparison means 1905 indicates that the currently accessed address corresponds to the address 1903 of the application 2 memory area based on the information obtained from the address bus. For example, “2” is transmitted to the detection signal generating means 1807.

【0184】また、上記プログラム通知手段は、上記比
較手段1906より得られた“2”と、上記制御バス2
03より得られた命令取込信号とに基づいて、現在実行
されているプログラムを示す“2”をアクセス情報管理
手段1806に送信することで、アクセス情報は例えば
“2”に変更される。
Further, the program notifying means is "2" obtained from the comparing means 1906 and the control bus 2
The access information is changed to, for example, "2" by transmitting "2" indicating the program currently being executed to the access information management means 1806 based on the instruction fetch signal obtained from 03.

【0185】これにより、メモリ領域へのアクセスの可
否を示すメモリイメージは、図20に示したメモリイメ
ージ2003になる。即ち、上記メモリイメージ200
3中のドットで示した領域であるアプリケーション1
(1311)、OS1(1312)、割り込みプログラ
ム1(1313)、割り込みプログラム2(132
3)、データ1(1314)、及び中断情報保持領域2
004は、アクセスが禁止されている状態となる。
As a result, the memory image showing whether or not the memory area can be accessed becomes the memory image 2003 shown in FIG. That is, the memory image 200
Application 1 which is the area indicated by the dot in 3
(1311), OS1 (1312), interrupt program 1 (1313), interrupt program 2 (132
3), data 1 (1314), and interruption information holding area 2
004 is a state in which access is prohibited.

【0186】上記アプリケーション2(1710)は、
以後、共有領域1202からのコマンド取り出し、処
理、結果書き込み等を行なうが、上記実施の形態4と同
様であるため詳細は省略する(図17:S1403〜S
1405)。
The application 2 (1710) is
After that, the command is fetched from the shared area 1202, the process, the result is written, etc., but the details are omitted because it is the same as that of the fourth embodiment (FIG. 17: S1403 to S1403.
1405).

【0187】続いて、上記アプリケーション2(171
0)は、割り込み1を発生する(図17:S140
6)。
Subsequently, the application 2 (171)
0) generates an interrupt 1 (FIG. 17: S140)
6).

【0188】上記割り込み1が発生すると、上記割り込
み2が発生したときと同様、割り込みプログラム1(1
720)に処理が移ると共に、アクセス情報管理手段1
806のアクセス情報が上記“3”に変更される。
When the interrupt 1 is generated, the interrupt program 1 (1
720) and the access information management means 1
The access information of 806 is changed to "3".

【0189】次に、上記割り込みプログラム1(172
0)は、まず、現在CPU102内にあるレジスタ等の
記憶領域をすべて上記中断情報保持領域2004に中断
情報として格納することで、アプリケーション2(17
10)が割り込み2を発生した直後からの再開を可能と
する(図17:S1721)。尚、この例においては、
アプリケーション2(1710)は処理を終了している
ため、再開時には当該アプリケーション2(1710)
の最初から実行されることになる。
Next, the interrupt program 1 (172
0) first stores all storage areas such as registers currently in the CPU 102 in the interruption information holding area 2004 as interruption information, so that the application 2 (17)
10) enables restarting immediately after the interrupt 2 is generated (FIG. 17: S1721). In this example,
Since the application 2 (1710) has finished the processing, the application 2 (1710) concerned is restarted.
Will be executed from the beginning.

【0190】続いて、以前に上記中断情報保持領域20
04に記憶していたアプリケーション1(1610)の
中断情報を取り出し、アプリケーション1(1610)
を再開する(図17:S1722→S1723)。上記
中断情報を取り出すことで、CPU102内の各記憶領
域は、上記アプリケーション1(1610)が割り込み
2発生処理を行った直後に戻るため、上記アプリケーシ
ョン1(1610)は続く結果取り出し処理を実行する
(図17:S1407)。また、上記同様、アドレスバ
ス201及び制御バス203の監視により、アクセス情
報は“1”に変更される。
Subsequently, the interruption information holding area 20 is previously set.
The interruption information of the application 1 (1610) stored in 04 is retrieved, and the application 1 (1610) is interrupted.
Is restarted (FIG. 17: S1722 → S1723). By extracting the interruption information, each storage area in the CPU 102 returns immediately after the application 1 (1610) performs the interrupt 2 generation process, so that the application 1 (1610) executes the subsequent result retrieval process ( FIG. 17: S1407). Further, similarly to the above, the access information is changed to "1" by monitoring the address bus 201 and the control bus 203.

【0191】上記アプリケーション1(1610)は、
上記実施の形態4にて示した結果取り出し処理と同様、
アプリケーション2(1710)が書き込んだ結果を共
有領域1202から取り出し、連続する内部処理2を行
なう(図16:S1407→S1409)。
The application 1 (1610) is
Similar to the result retrieval process shown in the fourth embodiment,
The result written by the application 2 (1710) is taken out from the shared area 1202, and continuous internal processing 2 is performed (FIG. 16: S1407 → S1409).

【0192】さて、各アプリケーション1、2及び割り
込みプログラム1、2の処理を上記に述べたが、結果と
して、上記アプリケーション1(1610)の処理は、
図16に示したように、アプリケーション2との連携処
理も含めて一連の処理として記述可能である。また、ア
プリケーション2(1710)もコマンド取り出しから
処理の終了まで一連の処理として記述可能である。さら
に、割り込みプログラム1(1720)、割り込みプロ
グラム2(1620)共にアプリケーション1、2とは
まったく独立した処理であるため、予めメモリ領域内の
例えばROM103などに記述しておくことが可能にな
る。
The processing of each of the applications 1 and 2 and the interrupt programs 1 and 2 has been described above. As a result, the processing of the application 1 (1610) is as follows.
As shown in FIG. 16, it can be described as a series of processes including a process of cooperation with the application 2. The application 2 (1710) can also be described as a series of processes from the command fetch to the end of the process. Further, since the interrupt program 1 (1720) and the interrupt program 2 (1620) are completely independent processes from the applications 1 and 2, it is possible to describe them in advance in, for example, the ROM 103 in the memory area.

【0193】以上のように、アドレス格納手段に、所定
のプログラムが格納されたメモリ領域及び当該プログラ
ムによるアクセスが許されたメモリ領域を一単位として
格納することで、アドレス格納手段に格納するアドレス
を、OSにて更新する必要がなく、即ち上記アドレス情
報更新問題を解決することができる。
As described above, by storing the memory area in which the predetermined program is stored and the memory area permitted to be accessed by the program as one unit in the address storing means, the address to be stored in the address storing means is stored. , OS does not need to be updated, that is, the address information update problem can be solved.

【0194】また、比較手段がアクセスされているアド
レスに対応するプログラムを監視結果として通知すると
共に、プログラム通知手段が、実行中のプログラムを通
知することでアクセス情報管理手段がアクセス情報を変
更するため、当該アクセス情報をOSが変更する問題、
即ち上記アクセス情報更新問題も解決することが可能と
なる。
Further, since the comparing means notifies the program corresponding to the accessed address as a monitoring result and the program notifying means notifies the program being executed, the access information managing means changes the access information. , The problem that the OS changes the access information,
That is, it becomes possible to solve the above access information update problem.

【0195】さらに、図16、図17に示したように、
アプリケーションを一連の処理として容易に記述するこ
とが可能になるため、アプリケーションの開発効率を上
げることが可能になる。
Further, as shown in FIG. 16 and FIG.
Since the application can be easily described as a series of processes, it is possible to improve the development efficiency of the application.

【0196】(実施の形態6)上記実施の形態1〜5で
は、所定のメモリ領域へのアクセスを監視することで、
プログラムによる不正処理を防止する方法について説明
したが、本実施の形態6では、リバースエンジニアリン
グに対して耐性を有する不正アクセス監視装置の処理を
説明する。
(Sixth Embodiment) In the above first to fifth embodiments, by monitoring access to a predetermined memory area,
Although the method of preventing the illegal processing by the program has been described, the sixth embodiment will explain the processing of the illegal access monitoring device having resistance to reverse engineering.

【0197】リバースエンジニアリングとは、製品を分
析し、 その仕様や基本設計などを探ることをいい、場
合によっては悪用されることもある。例えば、上記実施
の形態1〜5におけるCPUの動作を解析し、アクセス
監視手段や検知信号発生手段等の動作を予想すること
で、上記不正アクセス監視装置の機能を無効化してしま
うことが可能となる可能性がある。
Reverse engineering means analyzing a product and searching for its specifications, basic design, etc. In some cases, it may be abused. For example, it is possible to invalidate the function of the unauthorized access monitoring device by analyzing the operation of the CPU in the first to fifth embodiments and predicting the operation of the access monitoring means, the detection signal generating means and the like. Could be.

【0198】そこで、本実施の形態6では、上記リバー
スエンジニアリングに対して耐性を備えた不正アクセス
監視装置を提供する。
Therefore, the sixth embodiment provides an unauthorized access monitoring device having resistance to the reverse engineering.

【0199】まず、本実施の形態6に係る不正アクセス
監視装置の説明の前に、リバースエンジニアリングの一
手段について簡単に説明する。
First, one means of reverse engineering will be briefly described before the description of the unauthorized access monitoring apparatus according to the sixth embodiment.

【0200】通常、ICカードなどに備えられたCPU
はクロック速度が高速であるため、各動作を解析するの
は非常に困難である。そこで、通常よりも遅いクロック
をCPUに与えることで、当該CPUの各動作を解析す
るのである。
[0200] A CPU normally provided in an IC card or the like
The clock speed is high, so it is very difficult to analyze each operation. Therefore, each operation of the CPU is analyzed by giving a clock slower than usual to the CPU.

【0201】従って、本実施の形態6では、CPUに与
えられるクロックが正常か否かを判断し、当該判断にて
正常ではないとされた時に例えばCPUの動作を停止す
るのである。
Therefore, in the sixth embodiment, it is judged whether the clock given to the CPU is normal, and when it is judged that the clock is not normal, for example, the operation of the CPU is stopped.

【0202】即ち、本実施の形態6に係る不正アクセス
監視装置2100は、図21に示すように、上記実施の
形態1における不正アクセス監視装置100に加えて無
効化手段2101を有する。当該無効化手段2101
は、クロック供給手段2102からCPU102に与え
られているクロックを入力し、当該クロックの速度が正
常か否かを判定する。ここで、上記クロック供給手段2
102は、CPUの処理速度を決定するために従来より
備えられているものである。
That is, the unauthorized access monitoring apparatus 2100 according to the sixth embodiment has a revocation means 2101 in addition to the unauthorized access monitoring apparatus 100 according to the first embodiment, as shown in FIG. The invalidation means 2101
The clock supplied from the clock supply means 2102 to the CPU 102 is input to determine whether or not the speed of the clock is normal. Here, the clock supply means 2
102 is conventionally provided for determining the processing speed of the CPU.

【0203】上記無効化手段2101が、上記CPUに
与えられているクロックの速度が正常か否かを判定する
方法を以下に示す。
A method for the invalidating means 2101 to judge whether or not the speed of the clock given to the CPU is normal will be described below.

【0204】第1の例では、例えば図22(a)に示す
ように、上記無効化手段2101は、CPUに与えられ
ているクロック(CPUクロック)と、リファレンス電
圧とが入力されている。ここで、上記CPUクロックが
入力されるライン2203にはコンデンサ2202が接
続され、CPUクロックの電圧値の降下を遅らせてい
る。
In the first example, as shown in FIG. 22A, for example, the invalidating means 2101 is supplied with the clock (CPU clock) given to the CPU and the reference voltage. Here, a capacitor 2202 is connected to the line 2203 to which the CPU clock is input to delay the drop in the voltage value of the CPU clock.

【0205】上記CPUクロックが正常な場合の、上記
CPUクロックの電圧イメージを図22(b)に示す。
つまり、無効化手段2101を構成する判定手段220
1に一定の電圧Vxで与えられるCPUクロックは、上
記コンデンサ2202により電圧Vyが最低値となる。
尚、上記電圧Vyは、閾値である上記リファレンス電圧
Vzを下回ることがないように設定されている(Vx>
Vy>Vz)。
FIG. 22B shows a voltage image of the CPU clock when the CPU clock is normal.
That is, the determination unit 220 that constitutes the invalidation unit 2101
In the CPU clock given to the constant voltage Vx of 1, the voltage Vy becomes the minimum value by the capacitor 2202.
The voltage Vy is set so as not to fall below the reference voltage Vz, which is a threshold value (Vx>
Vy> Vz).

【0206】ここで、例えばリバースエンジニアリング
のために、上記CPU102に不正なクロックが与えら
れたとする。上述したように、不正なクロックとは正常
なクロックに比べて速度が遅いものである。このため、
上記CPUクロックの電圧イメージは例えば図22
(c)に示したように、リファレンス電圧Vz以下にな
る。そこで、上記判定手段2201は、上記CPUクロ
ックが上記閾値であるリファレンス電圧Vzを下回った
際(ポイント2204)に、割り込み信号発生手段11
3に不正検知信号を送信するのである。
Here, it is assumed that an illegal clock is given to the CPU 102 for reverse engineering, for example. As described above, the incorrect clock is slower than the normal clock. For this reason,
The voltage image of the CPU clock is shown in FIG. 22, for example.
As shown in (c), the reference voltage becomes Vz or less. Therefore, the determining means 2201 causes the interrupt signal generating means 11 when the CPU clock falls below the reference voltage Vz which is the threshold value (point 2204).
The injustice detection signal is transmitted to No. 3.

【0207】上記不正検知信号を受信した割込信号発生
手段113は、上記CPU102に対して割り込み信号
を送信する。
The interrupt signal generating means 113 which has received the fraud detection signal transmits an interrupt signal to the CPU 102.

【0208】当該割り込み信号を受信したCPU102
は、例えばCPU102の処理を停止したり、所定の割
り込みプログラムを動かすことで上記リバースエンジニ
アリングに対応する。
CPU 102 which has received the interrupt signal
Corresponds to the above reverse engineering by stopping the processing of the CPU 102 or moving a predetermined interrupt program.

【0209】続いて、第2の例について説明する。第2
の例では、例えば図23(a)に示すように、上記無効
化手段2101は、CPUに与えられているクロック
(CPUクロック)が入力されている。また、当該無効
化手段2101内には上記CPUクロックとは独立した
クロックを発生する独立クロック発生手段2303と、
当該独立クロック発生手段2303からの独立クロック
のパルスをカウントするカウンタ2302が備えられて
いる。
Subsequently, the second example will be described. Second
In the example, as shown in FIG. 23A, for example, the invalidating unit 2101 is input with the clock (CPU clock) given to the CPU. Further, in the invalidating means 2101, an independent clock generating means 2303 for generating a clock independent of the CPU clock,
A counter 2302 for counting the pulses of the independent clock from the independent clock generating means 2303 is provided.

【0210】以下、上記構成を踏まえたうえで無効化手
段2001の処理を説明する。
The processing of the invalidation means 2001 will be described below based on the above configuration.

【0211】まず、上記カウンタ2302は、上記独立
クロック発生手段2303より与えられる独立クロック
パルスのカウントを行なう。但し、CPUクロックのパ
ルスを受信した際には当該カウントをゼロ(リセット)
にする。尚、独立クロックパルスのカウント数が2にな
った場合に、判定手段2301はCPUクロックが不正
であると判定するものとする。
First, the counter 2302 counts the independent clock pulse supplied from the independent clock generating means 2303. However, when the CPU clock pulse is received, the count is reset to zero (reset).
To When the count number of the independent clock pulse becomes 2, the determining unit 2301 determines that the CPU clock is invalid.

【0212】ここで、正常なCPUクロックが与えられ
ている場合のイメージが図23(b)である。つまり、
独立クロック2305のパルスは上記カウンタ2302
によりカウントされるが、CPUクロック2304は十
分に早いため上記カウンタを即座にリセットする。
FIG. 23B shows an image when the normal CPU clock is applied. That is,
The pulse of the independent clock 2305 is the counter 2302.
However, since the CPU clock 2304 is fast enough, the counter is immediately reset.

【0213】この状態では、上記カウント数が2になる
ことはない。つまりCPUクロックが正常な状態であ
る。
In this state, the count number never becomes 2. That is, the CPU clock is in a normal state.

【0214】ここで、例えばリバースエンジニアリング
のために、上記CPU102に不正なクロックが与えら
れたとする。上述したように、不正なクロックとは正常
なクロックに比べて速度が遅いものである。このため、
上記カウンタ2302は、上記独立クロック2307の
パルスを複数回(2以上)カウントすることになる(図
23(c))。この場合には、上記判定手段2301
は、割り込み信号発生手段113に不正検知信号を送信
するのである。
Here, it is assumed that an illegal clock is given to the CPU 102 for reverse engineering, for example. As described above, the incorrect clock is slower than the normal clock. For this reason,
The counter 2302 counts the pulse of the independent clock 2307 a plurality of times (2 or more) (FIG. 23 (c)). In this case, the determination means 2301
Sends a fraud detection signal to the interrupt signal generating means 113.

【0215】以後の処理は、上記第1の例と同様であ
る。
The subsequent processing is the same as in the first example.

【0216】以上のように、無効化手段がCPUに与え
られているクロックを入力し、当該クロックの速度が正
常か否かを判定し、判定に応じて不正検知信号を送信す
ることで、通常よりも遅いクロックをCPUに与えるリ
バースエンジニアリングによる各動作の解析を防ぐこと
が可能になる。
As described above, the invalidating means inputs the clock given to the CPU, determines whether or not the speed of the clock is normal, and transmits the fraud detection signal in accordance with the determination. It is possible to prevent analysis of each operation by reverse engineering that gives a slower clock to the CPU.

【0217】[0217]

【発明の効果】アクセス監視手段は、所定のメモリ領域
へのアクセスを監視し、検知信号発生手段は、アクセス
監視手段の監視結果とアクセス情報とに基づいて不正ア
クセスがある旨を示す不正検知信号を発生する。従っ
て、アプリケーションによるアクセスが禁止されている
メモリ領域へのアクセスを知ることで、悪意のあるアプ
リケーションによる重要な情報の消失、漏洩といった様
々なトラブルを防ぐことが可能となる。
The access monitoring means monitors the access to the predetermined memory area, and the detection signal generating means detects the unauthorized access based on the monitoring result of the access monitoring means and the access information. To occur. Therefore, by knowing the access to the memory area where the access by the application is prohibited, it is possible to prevent various troubles such as the loss or leakage of the important information by the malicious application.

【0218】また更に、検知信号発生手段が発生した不
正検知信号を受けて、CPUに対して割り込み信号を送
信する割込信号発生手段を備えることで、不正アクセス
があった場合に所定のプログラムを実行することが可能
であるため、不正アクセスに対して様々な対応が可能と
なる。
Furthermore, by providing an interrupt signal generating means for transmitting an interrupt signal to the CPU in response to the illegality detection signal generated by the detection signal generating means, a predetermined program can be executed in case of illegal access. Since it can be executed, various measures can be taken against unauthorized access.

【0219】また更に、アクセス監視手段は、所定のメ
モリ領域のアドレスを格納したアドレス格納手段と、C
PUが上記メモリ領域にアクセスする際に利用するアド
レスバスから取得したアドレスと、上記アドレス格納手
段に格納された所定のメモリ領域のアドレスとの比較に
より所定のメモリ領域へのアクセスを監視する比較手段
とを備えることで、CPUの様々なアクセス態様(読み
出し、書き込み等)に対応したアクセス監視が可能とな
る。
Furthermore, the access monitoring means includes an address storage means for storing an address of a predetermined memory area, and C
Comparing means for monitoring access to the predetermined memory area by comparing the address acquired from the address bus used when the PU accesses the memory area with the address of the predetermined memory area stored in the address storing means By including the above, it is possible to perform access monitoring corresponding to various access modes (read, write, etc.) of the CPU.

【0220】また更に、アクセス情報管理手段を、OS
の提供する機能をアプリケーションが利用する際に用い
られる所定のインターフェイスを介して受信した命令に
基づいてアクセス情報を制御する構成とし、例えば所定
のインターフェイスに、APIを用いることにより、従
来技術を用いて容易にアクセス情報を管理することがで
きる。
Furthermore, the access information management means is the OS.
Is configured to control access information based on a command received through a predetermined interface used when an application uses a function provided by, for example, using a conventional technique by using an API for the predetermined interface. The access information can be easily managed.

【0221】また更に、ハードウェアによる割り込み処
理を用いてアプリケーション間の処理を連携させること
により、ソフトウェア(プログラム)による誤動作や不
正アクセスを確実に防止することが可能になるため、ア
ドレス情報更新問題、アクセス情報更新問題を解決し、
しかもアプリケーション間の処理を連携可能とすること
ができる。
Furthermore, by coordinating the processing between the applications using the interrupt processing by the hardware, it is possible to surely prevent the malfunction and the unauthorized access by the software (program). Solved the access information update problem,
Moreover, the processing between the applications can be linked.

【0222】また更に、CPUにクロックを与えるクロ
ック供給手段からクロックを入力し、当該クロックの速
度が正常か否かを判定する判定手段と、判定手段が判定
した結果に基づいて割込信号発生手段に不正検知信号を
送信する無効化手段とを備えることで、リバースエンジ
ニアを防止することが可能になる。
Furthermore, the clock is supplied from the clock supplying means for supplying the CPU with the clock, and the judging means for judging whether or not the speed of the clock is normal, and the interrupt signal generating means based on the result judged by the judging means. By providing the invalidation means for transmitting the fraud detection signal, it is possible to prevent the reverse engineer.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明に係る不正アクセス監視装置及びICカ
ードの概略機能ブロック図。
FIG. 1 is a schematic functional block diagram of an unauthorized access monitoring device and an IC card according to the present invention.

【図2】不正アクセス監視装置の詳細ブロック図。FIG. 2 is a detailed block diagram of an unauthorized access monitoring device.

【図3】アクセス監視対象を示したメモリ領域イメージ
図。
FIG. 3 is an image diagram of a memory area showing an access monitoring target.

【図4】APIを用いたアクセス情報変更を示すフロー
チャート。
FIG. 4 is a flowchart showing access information change using API.

【図5】アクセス監視手段及びアクセス情報管理手段の
処理を示すフローチャート。
FIG. 5 is a flowchart showing processing of an access monitoring unit and an access information management unit.

【図6】検知信号発生手段及び割り込み信号発生手段の
処理を示すフローチャート。
FIG. 6 is a flowchart showing the processing of a detection signal generating means and an interrupt signal generating means.

【図7】複数のアプリケーションを実行した際の各メモ
リ領域のイメージ図。
FIG. 7 is an image diagram of each memory area when a plurality of applications are executed.

【図8】CPUを複数設けた構成例を示す図。FIG. 8 is a diagram showing a configuration example in which a plurality of CPUs are provided.

【図9】共有領域を設けた構成例を示す図。FIG. 9 is a diagram showing a configuration example in which a shared area is provided.

【図10】割り込み処理を説明するための概略図。FIG. 10 is a schematic diagram for explaining interrupt processing.

【図11】実施の形態4における各手段の概略図。FIG. 11 is a schematic diagram of each means according to the fourth embodiment.

【図12】実施の形態4における、CPU上でアプリケ
ーションが実行されているイメージを示す図。
FIG. 12 is a diagram showing an image in which an application is executed on a CPU according to the fourth embodiment.

【図13】実施の形態4におけるメモリイメージを示す
図。
FIG. 13 is a diagram showing a memory image in the fourth embodiment.

【図14】実施の形態4における一連のプログラム処理
を示すフローチャート。
FIG. 14 is a flowchart showing a series of program processing according to the fourth embodiment.

【図15】実施の形態4における割り込みプログラムの
処理を示すフローチャート。
FIG. 15 is a flowchart showing the processing of an interrupt program according to the fourth embodiment.

【図16】実施の形態5における一連のプログラム処理
を示す第1のフローチャート。
FIG. 16 is a first flowchart showing a series of program processing according to the fifth embodiment.

【図17】実施の形態6における一連のプログラム処理
を示す第2のフローチャート。
FIG. 17 is a second flowchart showing a series of program processing according to the sixth embodiment.

【図18】実施の形態5における、CPU上でアプリケ
ーションが実行されているイメージを示す図。
FIG. 18 is a diagram showing an image of an application being executed on a CPU according to the fifth embodiment.

【図19】実施の形態5における各手段の概略図。FIG. 19 is a schematic diagram of each means according to the fifth embodiment.

【図20】実施の形態5におけるメモリイメージを示す
図。
FIG. 20 is a diagram showing a memory image in the fifth embodiment.

【図21】実施の形態6における不正アクセス監視装置
及びICカードの概略機能ブロック図。
FIG. 21 is a schematic functional block diagram of an unauthorized access monitoring device and an IC card according to the sixth embodiment.

【図22】実施の形態6における無効化手段の第1の概
略機能ブロック図。
FIG. 22 is a first schematic functional block diagram of invalidation means according to the sixth embodiment.

【図23】実施の形態6における無効化手段の第2の概
略機能ブロック図。
FIG. 23 is a second schematic functional block diagram of an invalidating unit according to the sixth embodiment.

【図24】従来のICカード及びICカードシステムの
概略機能ブロック図。
FIG. 24 is a schematic functional block diagram of a conventional IC card and IC card system.

【図25】ICカード内でのOS及びアプリケーション
を示すイメージ図。
FIG. 25 is an image diagram showing an OS and applications in the IC card.

【図26】メモリ領域イメージ図。FIG. 26 is an image diagram of a memory area.

【図27】APIの処理を示すフローチャート。FIG. 27 is a flowchart showing the processing of API.

【符号の説明】 100 不正アクセス監視装置 101 ICカード 102 CPU 103 ROM 104 RAM 105 EEPROM(書き換え可能不揮発メモリを構
成) 106 EEPROM書込回路(書き換え可能不揮発メ
モリ書込回路を構成) 107 外部通信回路 110 アクセス監視手段 111 検知信号発生手段 112 アクセス情報管理手段 113 割込信号発生手段
[Description of Reference Signs] 100 Unauthorized Access Monitoring Device 101 IC Card 102 CPU 103 ROM 104 RAM 105 EEPROM (Constitutes Rewritable Nonvolatile Memory) 106 EEPROM Writing Circuit (Constitutes Rewritable Nonvolatile Memory Writing Circuit) 107 External Communication Circuit 110 Access monitoring means 111 Detection signal generating means 112 Access information managing means 113 Interrupt signal generating means

───────────────────────────────────────────────────── フロントページの続き (72)発明者 中部 太志 東広島市鏡山3丁目10番18号株式会社松下 電器情報システム広島研究所内 Fターム(参考) 5B017 AA03 BA01 CA14 5B035 AA13 BB09 CA11 CA22 CA38 5B042 GA21 GA33 GA38 JJ29 JJ46 JJ47 KK01 MC12    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Taishi Nakabe             3-10-18 Kagamiyama, Higashihiroshima-shi Matsushita Co., Ltd.             Electric Appliance Information System Hiroshima Laboratory F-term (reference) 5B017 AA03 BA01 CA14                 5B035 AA13 BB09 CA11 CA22 CA38                 5B042 GA21 GA33 GA38 JJ29 JJ46                       JJ47 KK01 MC12

Claims (21)

【特許請求の範囲】[Claims] 【請求項1】 メモリ領域への不正なアクセスを監視す
る不正アクセス監視装置において、 所定のメモリ領域へのアクセスを監視するアクセス監視
手段と、 上記アクセス監視手段の監視結果と、上記メモリ領域へ
のアクセスを行っているプログラムを判別可能な情報で
あるアクセス情報とに基づいて不正アクセスがある旨を
示す不正検知信号を発生する検知信号発生手段と、を備
えたことを特徴とする不正アクセス監視装置。
1. An unauthorized access monitoring apparatus for monitoring unauthorized access to a memory area, access monitoring means for monitoring access to a predetermined memory area, monitoring results of the access monitoring means, and access to the memory area. An unauthorized access monitoring apparatus, comprising: a detection signal generating unit that generates an unauthorized detection signal indicating that there is an unauthorized access based on access information that is information that can identify a program that is accessing. .
【請求項2】 さらに上記アクセス情報を管理するアク
セス情報管理手段を具備し、 上記検知信号発生手段は、上記アクセス監視手段の監視
結果と、上記アクセス情報管理手段より受け取ったアク
セス情報とに基づいて不正アクセスがある旨を示す不正
検知信号を発生する請求項1に記載の不正アクセス監視
装置。
2. An access information managing means for managing the access information is further provided, wherein the detection signal generating means is based on the monitoring result of the access monitoring means and the access information received from the access information managing means. The unauthorized access monitoring device according to claim 1, which generates an unauthorized access detection signal indicating that there is unauthorized access.
【請求項3】 さらに、上記検知信号発生手段が発生し
た不正検知信号を受けて、CPU(Central Processing
Unit)に対して割り込み信号を送信する割込信号発生
手段を備える請求項2に記載の不正アクセス監視装置。
3. The CPU (Central Processing) in response to the fraud detection signal generated by the detection signal generating means.
3. The unauthorized access monitoring device according to claim 2, further comprising an interrupt signal generating means for transmitting an interrupt signal to the unit).
【請求項4】 上記アクセス監視手段は、 上記所定のメモリ領域のアドレスを格納したアドレス格
納手段と、 CPUが上記メモリ領域にアクセスする際に利用するア
ドレスバスから取得したアドレスと上記アドレス格納手
段に格納された所定のメモリ領域のアドレスとの比較に
より所定のメモリ領域へのアクセスを監視する比較手段
とを備える請求項3に記載の不正アクセス監視装置。
4. The access monitoring means includes an address storage means for storing an address of the predetermined memory area, an address acquired from an address bus used when a CPU accesses the memory area, and the address storage means. 4. The unauthorized access monitoring device according to claim 3, further comprising: a comparison unit configured to monitor access to the predetermined memory area by comparing the stored address of the predetermined memory area.
【請求項5】 上記アクセス監視手段は、さらにCPU
が上記メモリ領域にアクセスする際に命令を送信する制
御バスを監視し、当該命令に応じて監視結果を出力する
請求項4に記載の不正アクセス監視装置。
5. The access monitoring means further comprises a CPU.
5. The unauthorized access monitoring device according to claim 4, wherein the unauthorized access monitoring device monitors a control bus that transmits a command when accessing the memory area, and outputs a monitoring result according to the command.
【請求項6】 上記アクセス情報は、上記メモリ領域へ
のアクセスがOS(Operating System)によるアクセス
か否かを表す請求項1に記載の不正アクセス監視装置。
6. The unauthorized access monitoring device according to claim 1, wherein the access information indicates whether or not the access to the memory area is performed by an OS (Operating System).
【請求項7】 上記アクセス情報管理手段は、 上記OSの機能をアプリケーションに提供するためのイ
ンターフェイスが当該アプリケーションに利用された際
に上記OSが送信した命令に基づいて上記アクセス情報
を変更する請求項2に記載の不正アクセス監視装置。
7. The access information management means changes the access information based on a command transmitted by the OS when an interface for providing the function of the OS to the application is used by the application. The unauthorized access monitoring device described in 2.
【請求項8】 上記所定のインターフェイスは、API
(Application Program Interface)である請求項7に
記載の不正アクセス監視装置。
8. The predetermined interface is an API
The unauthorized access monitoring device according to claim 7, which is (Application Program Interface).
【請求項9】 上記所定のメモリ領域は、OS格納領
域、OS作業領域、アプリケーション格納領域、ユーザ
情報格納領域の少なくとも1つを含む請求項1に記載の
不正アクセス監視装置。
9. The unauthorized access monitoring device according to claim 1, wherein the predetermined memory area includes at least one of an OS storage area, an OS work area, an application storage area, and a user information storage area.
【請求項10】 上記所定のメモリ領域は、外部との通
信に利用される外部通信回路、又は書き換え可能不揮発
メモリ書込回路を含む請求項1に記載の不正アクセス監
視装置。
10. The unauthorized access monitoring device according to claim 1, wherein the predetermined memory area includes an external communication circuit used for communication with the outside or a rewritable nonvolatile memory writing circuit.
【請求項11】 上記アクセス監視手段は、 所定のプログラムが格納されたメモリ領域及び当該プロ
グラムによるアクセスが許されたメモリ領域により構成
される上記所定のメモリ領域のアドレスを上記プログラ
ム単位で格納したアドレス格納手段と、 CPUが上記所定のメモリ領域にアクセスする際に利用
するアドレスバスから取得したアドレスと上記アドレス
格納手段に格納されたアドレスとに基づいて、アクセス
されているアドレスに対応するプログラムを監視結果と
して通知する比較手段とを備え、 上記割込信号発生手段は、 上記CPUの命令により割り込み信号を送信すると共に
当該割り込み信号を送信した旨を示す情報を上記アクセ
ス情報管理手段に送信し、 上記アクセス情報管理手段は、 上記割込信号発生手段からの上記割り込み信号を発生し
た旨を示す情報に基づいて上記メモリ領域へのアクセス
を行っているプログラムを示すアクセス情報を変更し、 上記検知信号発生手段は、 上記アクセス監視手段の監視結果と上記アクセス情報と
に基づいて上記不正検知信号を発生する請求項3に記載
の不正アクセス監視装置。
11. The address monitoring means stores an address of the predetermined memory area, which is composed of a memory area storing a predetermined program and a memory area permitted to be accessed by the program, in the program unit. Based on the storage means, the address obtained from the address bus used when the CPU accesses the predetermined memory area, and the address stored in the address storage means, the program corresponding to the accessed address is monitored. Comparing means for notifying as a result, the interrupt signal generating means transmits an interrupt signal in accordance with an instruction from the CPU, and transmits information indicating that the interrupt signal has been transmitted to the access information managing means, The access information management means uses the interrupt signal from the interrupt signal generating means. The access information indicating the program that is accessing the memory area is changed based on the information indicating that the access signal has been generated, The unauthorized access monitoring device according to claim 3, wherein the unauthorized access detection signal is generated based on
【請求項12】 上記所定のメモリ領域は、上記アクセ
ス監視手段の監視対象とならない共有領域を備える請求
項11に記載の不正アクセス監視装置。
12. The unauthorized access monitoring device according to claim 11, wherein the predetermined memory area includes a shared area that is not monitored by the access monitoring means.
【請求項13】 上記アクセス監視手段は、 所定のプログラムが格納されたメモリ領域及び当該プロ
グラムによるアクセスが許されたメモリ領域により構成
される上記所定のメモリ領域のアドレスを上記プログラ
ム単位で格納したアドレス格納手段と、 CPUが上記所定のメモリ領域にアクセスする際に利用
するアドレスバスから取得したアドレスと上記アドレス
格納手段に格納されたアドレスとに基づいて、アクセス
されているアドレスに対応するプログラムを監視結果と
して通知する比較手段と、 上記CPUが上記メモリ領域にアクセスする際に命令を
送信する制御バスを監視し、当該命令とアドレスバスか
ら取得したアドレスと上記アドレス格納手段に格納され
たアドレスとに基づいて実行中のプログラムを通知する
プログラム通知手段を備え、 上記アクセス情報管理手段は、 上記プログラム通知手段からの上記通知に基づいて上記
メモリ領域へのアクセスを行っているプログラムを示す
アクセス情報を変更し、 上記検知信号発生手段は、 上記アクセス監視手段の監視結果と上記アクセス情報と
に基づいて上記不正検知信号を発生する請求項3に記載
の不正アクセス監視装置。
13. The access monitoring means stores the address of the predetermined memory area, which is composed of a memory area storing a predetermined program and a memory area permitted to be accessed by the program, in the program unit. Based on the storage means, the address obtained from the address bus used when the CPU accesses the predetermined memory area, and the address stored in the address storage means, the program corresponding to the accessed address is monitored. The comparison means for notifying as a result and the control bus for transmitting an instruction when the CPU accesses the memory area are monitored, and the instruction and the address acquired from the address bus and the address stored in the address storage means are displayed. Program notification hand that notifies the running program based on The access information management unit changes access information indicating a program accessing the memory area based on the notification from the program notification unit, and the detection signal generation unit includes the access unit. The unauthorized access monitoring device according to claim 3, wherein the unauthorized access detection signal is generated based on a monitoring result of a monitoring unit and the access information.
【請求項14】 上記所定のメモリ領域は、上記アクセ
ス監視手段の監視対象とならない共有領域を備える請求
項13に記載の不正アクセス監視装置。
14. The unauthorized access monitoring device according to claim 13, wherein the predetermined memory area comprises a shared area which is not monitored by the access monitoring means.
【請求項15】 さらに、上記CPUにクロックを与え
るクロック供給手段からクロックを入力し、当該クロッ
クの速度が正常か否かを判定する判定手段と、 上記判定手段が判定した結果に基づいて上記割込信号発
生手段に不正検知信号を送信する無効化手段とを備える
請求項3に記載の不正アクセス監視装置。
15. Further, the clock is inputted from a clock supplying means for giving a clock to the CPU, and a judging means for judging whether or not the speed of the clock is normal; The unauthorized access monitoring device according to claim 3, further comprising invalidation means for transmitting a fraud detection signal to the built-in signal generation means.
【請求項16】 上記判定手段は、上記入力したクロッ
クと上記不正検知信号の送信の閾値となるリファレンス
電圧との比較によりCPUに与えられるクロックの速度
が正常か否かを判定する請求項15に記載の不正アクセ
ス監視装置。
16. The method according to claim 15, wherein the determination means determines whether or not the speed of the clock given to the CPU is normal by comparing the input clock with a reference voltage serving as a threshold for transmitting the fraud detection signal. Unauthorized access monitoring device described.
【請求項17】 上記判定手段は、上記入力したクロッ
クと、上記CPUに与えられるクロックとは独立のクロ
ックを発生する独立クロック発生手段が発生したクロッ
クとの比較により、CPUに与えられるクロックの速度
が正常か否かを判定する請求項15に記載の不正アクセ
ス監視装置。
17. The speed of the clock given to the CPU by the judging means comparing the inputted clock with the clock generated by the independent clock generating means for generating a clock independent of the clock given to the CPU. The unauthorized access monitoring device according to claim 15, wherein it is determined whether or not is normal.
【請求項18】 上記請求項1〜17のいずれか1項に
記載の不正アクセス監視装置を備えたIC(Integrated
Circuit)カード。
18. An IC (Integrated) equipped with the unauthorized access monitoring device according to claim 1. Description:
Circuit) card.
【請求項19】 メモリ領域への不正なアクセスを監視
する不正アクセス監視方法において、 所定のメモリ領域へのアクセスを監視するアクセス監視
ステップと、 上記アクセス監視ステップにおける監視結果と、上記メ
モリ領域へのアクセスを行っているプログラムを判別可
能な情報であるアクセス情報とに基づいて不正アクセス
がある旨を示す不正検知信号を発生する検知信号発生ス
テップと、を備えたことを特徴とする不正アクセス監視
方法。
19. A method for monitoring unauthorized access to a memory area, comprising: an access monitoring step for monitoring access to a predetermined memory area; a monitoring result in the access monitoring step; An unauthorized access monitoring method, comprising: a detection signal generating step of generating a fraud detection signal indicating that there is an unauthorized access based on access information which is information capable of discriminating an accessing program. .
【請求項20】 さらに上記アクセス情報を管理するア
クセス情報管理ステップを具備し、 上記検知信号発生ステップは、上記アクセス情報管理ス
テップより上記アクセス情報を受け取る請求項19に記
載の不正アクセス監視方法。
20. The unauthorized access monitoring method according to claim 19, further comprising an access information management step of managing the access information, wherein the detection signal generating step receives the access information from the access information management step.
【請求項21】 さらに、上記検知信号発生ステップが
発生した不正検知信号を受けて、CPU(Central Proc
essing Unit)に対して割り込み信号を送信する割込信
号発生ステップを備える請求項20に記載の不正アクセ
ス監視方法。
21. Further, in response to the fraud detection signal generated by the detection signal generating step, the CPU (Central Proc
21. The unauthorized access monitoring method according to claim 20, further comprising an interrupt signal generating step of transmitting an interrupt signal to the essing unit).
JP2002131186A 2001-05-14 2002-05-07 Unauthorized access monitoring device, IC card, unauthorized access monitoring method Pending JP2003036206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002131186A JP2003036206A (en) 2001-05-14 2002-05-07 Unauthorized access monitoring device, IC card, unauthorized access monitoring method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001-143458 2001-05-14
JP2001143458 2001-05-14
JP2002131186A JP2003036206A (en) 2001-05-14 2002-05-07 Unauthorized access monitoring device, IC card, unauthorized access monitoring method

Publications (1)

Publication Number Publication Date
JP2003036206A true JP2003036206A (en) 2003-02-07

Family

ID=26615049

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002131186A Pending JP2003036206A (en) 2001-05-14 2002-05-07 Unauthorized access monitoring device, IC card, unauthorized access monitoring method

Country Status (1)

Country Link
JP (1) JP2003036206A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005275841A (en) * 2004-03-25 2005-10-06 Nec Electronics Corp Memory protection system
JP2006146407A (en) * 2004-11-17 2006-06-08 Matsushita Electric Ind Co Ltd Program viewing system
JP2014174758A (en) * 2013-03-08 2014-09-22 Denso Corp Processor
US10599208B2 (en) 2015-09-08 2020-03-24 Toshiba Memory Corporation Memory system and controller

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005275841A (en) * 2004-03-25 2005-10-06 Nec Electronics Corp Memory protection system
JP2006146407A (en) * 2004-11-17 2006-06-08 Matsushita Electric Ind Co Ltd Program viewing system
JP2014174758A (en) * 2013-03-08 2014-09-22 Denso Corp Processor
US10599208B2 (en) 2015-09-08 2020-03-24 Toshiba Memory Corporation Memory system and controller

Similar Documents

Publication Publication Date Title
USRE47621E1 (en) Secure transaction microcontroller with secure boot loader
US5682027A (en) System and method for performing transactions and a portable intelligent device therefore
JP2755828B2 (en) Secure application card for sharing application data and procedures between multiple microprocessors
US6145739A (en) System and method for performing transactions and an intelligent device therefor
US4816656A (en) IC card system
US7350023B2 (en) Memory card
JP4409056B2 (en) LSI, LSI mounted electronic device, debugging method, LSI debugging device
US7269747B2 (en) Physical presence determination in a trusted platform
US7481358B2 (en) Communication system, card, management server, communication method, program, and record medium having recorded thereon program
US20090248583A1 (en) Device, system, and method for secure online transactions
US20030014643A1 (en) Electronic apparatus and debug authorization method
US5202923A (en) Portable electronic device capable of registering subprograms
US20020188852A1 (en) Illegal access monitoring device, IC card, and illegal access monitoring method
US20050222958A1 (en) Information processing terminal and information security and protection method therefor
CN101089869B (en) Method and device for using RFID technology as computer security login mechanism
EP1331600A2 (en) Memory card
US10528928B1 (en) Scanning system with direct access to memory
JPH11195102A (en) IC card with sensor
JP2003036206A (en) Unauthorized access monitoring device, IC card, unauthorized access monitoring method
US7590870B2 (en) Physical presence determination in a trusted platform
JP2003523029A (en) Real-time writing method with protection for nonvolatile memory
JP2000181870A (en) Portable electronic device, failure detection method
JP7247638B2 (en) Electronic information storage medium, IC card, falsification check method, and program
JP2001184567A (en) Transaction processing equipment
KR19980065912A (en) Electronic Commerce Method Using Remote Hardware Security Module (SAM)

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050826

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050909

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060106