JPH0778126A - Microcomputer for ic card - Google Patents

Microcomputer for ic card

Info

Publication number
JPH0778126A
JPH0778126A JP5247372A JP24737293A JPH0778126A JP H0778126 A JPH0778126 A JP H0778126A JP 5247372 A JP5247372 A JP 5247372A JP 24737293 A JP24737293 A JP 24737293A JP H0778126 A JPH0778126 A JP H0778126A
Authority
JP
Japan
Prior art keywords
read
microcomputer
card
area
circuit
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
JP5247372A
Other languages
Japanese (ja)
Inventor
Masao Muramatsu
正男 村松
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.)
Kyodo Printing Co Ltd
Original Assignee
Kyodo Printing 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 Kyodo Printing Co Ltd filed Critical Kyodo Printing Co Ltd
Priority to JP5247372A priority Critical patent/JPH0778126A/en
Publication of JPH0778126A publication Critical patent/JPH0778126A/en
Pending legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Abstract

PURPOSE:To obtain a microcomputer for an IC card capable of securing the secrecy of a program. CONSTITUTION:An one-chip MPU including a RAM, a mask ROM and an EEPROM has a read limiting circuit 46 also. Since the reading of a program in a specific area of the mask ROM is inhibited by the circuit 46, the secrecy of program constitution is secured and data recorded in the mask ROM are prevented from being decoded. The circuit 46 has a read limitation flag generating circuit 15 for selectively setting up the execution of inhibition, a judging circuit 1 for judging the existence of a program stored in the EEPROM, a judging circuit 2 for judging the existence of a read instruction and a judging circuit 3 for judging the existence of an access to a user reference enabled area in the mask ROM, and when all conditions are satisfied, a read limiting signal is outputted from an AND circuit 18.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ICカード用のマイク
ロコンピュータに関し、特に、ICカード内に記憶され
たデータの秘密性を保持するために、該マイクロコンピ
ュータ内の特定領域に記憶されているプログラムデータ
の読出を禁止する措置の施された読出制限機能付きのI
Cカード用のマイクロコンピュータに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer for an IC card, and in particular, in order to maintain the confidentiality of data stored in the IC card, it is stored in a specific area in the microcomputer. I with a read-restriction function that prohibits reading of program data
The present invention relates to a microcomputer for a C card.

【0002】[0002]

【従来の技術】従来、プライベートカードとしてのID
カードが一般的に用いられている。例えば、銀行カー
ド,クレジットカード等である。これらのカードで多く
用いられているのは、磁気記録方式の磁気カードであ
る。この磁気カードは、記録・書き換えが簡便に行え
る、安価である等多くの長所を有している。しかし反
面、記憶容量が小さい,容易にデータの判読・書き換え
ができる等の秘密性・安全性の保持上の欠点が指摘され
ている。
2. Description of the Related Art Conventionally, an ID as a private card
Cards are commonly used. For example, a bank card, a credit card, etc. A magnetic recording type magnetic card is often used in these cards. This magnetic card has many advantages such as easy recording / rewriting and low cost. On the other hand, however, it has been pointed out that the storage capacity is small and that the data can be easily read and rewritten, which is a drawback in maintaining confidentiality and security.

【0003】上記の欠点を克服し得るカードとしてIC
カードが知られている。ICカードは、情報量の多さ,
秘密性および安全性の保持を高める為の各種の措置を講
じ得る等、多くの長所を有している。しかし反面、磁気
カードに比べ価格が高くなる問題を有している。特に、
ロット単位の製作枚数が少ない場合には、この欠点が更
に増幅される。このような欠点を解消する一策としてワ
ンチップマイクロコンピュータに基本プログラムを内蔵
し、電気的に書換可能な記憶素子(EEPROM)の一部をカ
ード発行者に開放することでプログラム開発の自由度を
高め、かつ、ICカードメーカは基本プログラムのみを
開発すれば良く、カード発行者(ユーザ)であるカード
管理者がEEPROM内に、独自のデータおよびプログラム等
を自由に構築できる。このため、ICカードの上記の特
性を保持しつつ柔軟性が向上し応用範囲が拡大し、1ロ
ット単位のICカードの生産量を大きくすることが可能
となる。よって、コストの低減効果が生じる。
An IC as a card capable of overcoming the above-mentioned drawbacks
The card is known. IC cards have a large amount of information,
It has many advantages such as various measures that can be taken to improve the confidentiality and security. However, on the other hand, there is a problem that the price becomes higher than that of the magnetic card. In particular,
This defect is further amplified when the number of manufactured lots is small. As a measure to eliminate such drawbacks, a basic program is built into a one-chip microcomputer, and a part of the electrically rewritable storage element (EEPROM) is opened to the card issuer, thereby increasing the freedom of program development. In addition, the IC card maker needs to develop only the basic program, and the card manager who is the card issuer (user) can freely build his own data and program in the EEPROM. Therefore, while maintaining the above characteristics of the IC card, the flexibility is improved, the range of application is expanded, and the production amount of the IC card for each lot can be increased. Therefore, a cost reduction effect is produced.

【0004】しかし反面、データの書き換えが容易とな
る等の新たな問題点が生じる。この対策として、例えば
特開平3-14052号公報において、EEPROM領域へのアクセ
スを禁止した携帯可能媒体が開示されている。
On the other hand, however, new problems occur such that data can be easily rewritten. As a countermeasure against this, for example, Japanese Patent Laid-Open No. 3-14052 discloses a portable medium in which access to the EEPROM area is prohibited.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上記の
EEPROM領域へのアクセスの禁止策は、ICカードの末端
市場における秘密保持策であり、ICカード管理者等の
中間市場における秘密保持策が不完全と言える。つま
り、EEPROM等によるICカード発行者のプログラミング
可能な独自使用領域を設けた場合、一般的にはICカー
ドを効率的に使いこなすために、ICカードを構成する
マイクロコンピュータの内部の仕様等をICカード発行
者に開示する必要が生じる。部分的に内部の構成を明か
さない場合でも、マスクROMのプログラムデータを読
出すプログラムをユーザ使用領域のEEPROMに書込み、プ
ログラムの内容を解読することは、当業者にとってさほ
ど難しいことではない。これはデータの秘密性を保持す
るために構築した「鍵」の構造を解明されることに通じ
る。ICカード内の部分的自由使用を可能としICカー
ドの利便性を高めた場合、ICカード自体には秘密保持
のための策が講じられていても、ICカード管理者に対
してはICカード発行者に秘密保持策が実質的に解読可
能となるおそれがある。このことは、限られた者への”
ブラックボックス”の内容公開ではあるが、ICカード
の汎用性を高め応用範囲を広げるためにはより多くの者
への内容公開の必要性が伴い、機密性を確保すると言う
ことと矛盾を生じる。
[Problems to be Solved by the Invention]
The measure to prohibit access to the EEPROM area is a confidentiality measure in the end market of the IC card, and it can be said that the confidentiality measure in the intermediate market of IC card managers is incomplete. In other words, if an IC card issuer's programmable unique use area is provided by using an EEPROM or the like, in general, in order to use the IC card efficiently, the internal specifications of the microcomputer constituting the IC card are specified in the IC card. It will be necessary to disclose it to the issuer. Even if the internal structure is not partially revealed, it is not so difficult for those skilled in the art to write the program for reading the program data of the mask ROM into the EEPROM of the user use area and decode the contents of the program. This leads to the elucidation of the structure of the "key" constructed to maintain the confidentiality of the data. If the IC card can be partially used freely and the convenience of the IC card is enhanced, the IC card is issued to the IC card manager even if measures are taken to keep the IC card confidential. It is possible that a person's confidentiality measures will be substantially decipherable. This is for limited people
Although it is the disclosure of the contents of the "black box", it is necessary to disclose the contents to more people in order to increase the versatility of the IC card and to expand the range of applications, which causes a contradiction with ensuring confidentiality.

【0006】本発明は、ICカードに用いられ、ICカ
ード製造者固有のプログラムを含むICカード内のデー
タの機密性を確保し、ICカード内のマスクROMに記
憶されているプログラムの一部をユーザに解放しつつ、
EEPROM内にユーザ独自のプログラミングを可能にするI
Cカードを提供することを目的とする。
The present invention ensures the confidentiality of data in an IC card including a program unique to an IC card manufacturer and is used for an IC card, and stores a part of the program stored in a mask ROM in the IC card. Releasing to the user,
User-specific programming in EEPROM I
The purpose is to provide a C card.

【0007】[0007]

【課題を解決するための手段】かかる目的を達成するた
め、本発明によるICカード用のマイクロコンピュータ
は、少なくとも書換可能型ROMと書換不可能型ROM
とを有するICカード用のマイクロコンピュータであ
り、書換不可能型ROMの所定の領域を指定する領域指
定手段と、書換可能型ROMのプログラムコードの命令
が読出命令であるか否かを判別する読出命令判別手段
と、読出命令により指定された領域が書換不可能型RO
Mの領域指定手段により指定された所定の領域であるか
否かを判定する領域判定手段とを有し、マイクロコンピ
ュータが処理するプログラムコードを領域指定手段、読
出命令判定手段および領域判定手段により有効とされた
場合に限り、書換可能型ROMに記録された読出命令の
プログラムコードの読出処理の実行を許可するものであ
る。
In order to achieve the above object, a microcomputer for an IC card according to the present invention has at least a rewritable ROM and a non-rewritable ROM.
A microcomputer for an IC card having: a region specifying means for specifying a predetermined region of a non-rewritable ROM; and a read for determining whether or not a command of a program code of the rewritable ROM is a read command. The instruction discriminating means and the area designated by the read instruction are non-rewritable RO
Area determination means for determining whether or not the area is a predetermined area designated by the area designation means of M, and the program code processed by the microcomputer is effective by the area designation means, the read instruction determination means and the area determination means. Only in this case, the execution of the reading process of the program code of the reading instruction recorded in the rewritable ROM is permitted.

【0008】[0008]

【作用】本発明のマイクロコンピュータは、領域指定手
段と読出命令判定手段および領域判定手段とにより、プ
ログラムコードが書換可能型ROMに記録されたコード
であり、読出命令であり、かつ所定の領域範囲内を含む
読出命令であるかを判定することとしているため、特定
領域のデータの読出命令の実行を禁止することができ
る。
In the microcomputer of the present invention, the program code is the code recorded in the rewritable ROM by the area designating means, the read command determining means, and the area determining means, and the read code is in the predetermined area range. Since it is determined whether or not the read instruction includes the inside, execution of the read instruction of the data in the specific area can be prohibited.

【0009】[0009]

【実施例】次に添付図面を参照して本発明によるICカ
ード用のマイクロコンピュータの実施例を詳細に説明す
る。図1を参照すると本発明のマイクロコンピュータが
適用されるICカードの実施例が示されている。マイク
ロコンピュータ内のメモリ領域の読出を制限する手順に
は、図1に示すロジック回路構成のハードウエアによる
方法とプログラムステップのソフトウエアによる方法の
2つの手法がある。以下、本発明の構成を図面に示す実
施例に基づいて詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT An embodiment of a microcomputer for an IC card according to the present invention will be described in detail with reference to the accompanying drawings. Referring to FIG. 1, there is shown an embodiment of an IC card to which the microcomputer of the present invention is applied. There are two methods for limiting the reading of the memory area in the microcomputer, that is, a method using a hardware having a logic circuit configuration shown in FIG. 1 and a method using a software of a program step. Hereinafter, the configuration of the present invention will be described in detail based on the embodiments shown in the drawings.

【0010】図3は、読出制限領域付きマイクロコンピ
ュータの全体ユニットの構成例であり、いわゆるカード
管理者の自由使用領域としてのEEPROM70が設けられて
いる。ICカードはこのようなワンチップのマイクロコ
ンピュータ(MPU)により構成され、MPUはCPU
40,RAM50,ROM60及びEEPROM70により構
成されている。
FIG. 3 shows an example of the configuration of the entire unit of a microcomputer with a read-limited area, in which an EEPROM 70 is provided as a so-called free area for card managers. The IC card is composed of such a one-chip microcomputer (MPU), and the MPU is a CPU.
40, RAM 50, ROM 60 and EEPROM 70.

【0011】中央処理装置であるCPU40は、アキュ
ムレータ(Acc)41,レジスタ42,論理演算処理
ユニット(ALU)43,命令解釈部44,プログラム
カウンタ(PC)45,制限回路46とにより構成され
ている。
The CPU 40, which is a central processing unit, is composed of an accumulator (Acc) 41, a register 42, a logical operation processing unit (ALU) 43, an instruction interpreting section 44, a program counter (PC) 45, and a limiting circuit 46. .

【0012】Acc44は、CPU40が演算,制御等
を実行する過程において用いられる一時記憶部である。
レジスタ42は、Acc41の補助的機能を果たし、A
cc41と同一のハード構成による場合とRAMによる
場合とがある。ALU43は、CPU40の四則演算,
比較動作,論理演算等を行う処理部を総称しており、こ
れら処理部の動作は、CPU40の基本動作を構成して
いる。命令解釈部44は、プログラムの命令語の内容分
類、例えば、読出命令,書込命令,演算命令等を行う。
PC45は、プログラムの実行位置を管理するためのカ
ウンタである。制限回路46は、本発明の特徴となる機
能部であり、CPU40が実行に入る前の領域の命令を
判別し、その実行の可否を決める回路部である。
The Acc 44 is a temporary storage unit used in the process in which the CPU 40 executes calculation, control and the like.
The register 42 performs the auxiliary function of the Acc 41,
There are a case where it has the same hardware configuration as the cc41 and a case where it has a RAM. The ALU 43 is the arithmetic operation of the CPU 40,
Processing units that perform comparison operations, logical operations, etc. are collectively referred to, and the operations of these processing units form the basic operation of the CPU 40. The instruction interpreting unit 44 classifies the content of the instruction word of the program, for example, a read instruction, a write instruction, a calculation instruction, and the like.
The PC 45 is a counter for managing the execution position of the program. The limiting circuit 46 is a functional unit that is a feature of the present invention, and is a circuit unit that determines an instruction in an area before the CPU 40 starts execution and determines whether the instruction can be executed.

【0013】RAM50は、データの一時記憶部であ
る。図示されていない電池により記憶データはバックア
ップされている。
The RAM 50 is a temporary storage unit for data. The stored data is backed up by a battery (not shown).

【0014】ROM60は読出専用メモリであり、本実
施例においては書換不能型のマスクROMである。この
ため、マスクROM60内に構成されたプログラムの内
容は、ICカード製造者の工場出荷時に固定されてい
る。このプログラムの中にはRAM50またはEEPROM7
0に記憶されるデータはコード化され、データの内容の
判読・変更等が出来ないように秘密性を確保するための
策がハード的もしくはソフト的に講じられている。
The ROM 60 is a read-only memory, which is a non-rewritable mask ROM in this embodiment. Therefore, the contents of the program configured in the mask ROM 60 are fixed at the time of factory shipment of the IC card manufacturer. RAM50 or EEPROM7 in this program
The data stored in 0 is coded, and hardware or software measures are taken to ensure confidentiality so that the contents of the data cannot be read or changed.

【0015】EEPROM70は、ICカード管理者、すなわ
ちICカードの発行者が独自のデータ又はプログラムを
書き込むための領域を構成する。マスクROM60に構
成された書換不可能のプログラムの他に、ICカード管
理者の独自のデータまたはプログラムをEEPROM70を用
いて付加することにより、ICカードの柔軟性・汎用性
・独自性等を高めることができる。このEEPROM70へ新
たなデータの書込又は消去は、図示しないリーダライタ
装置を用いて行われる。
The EEPROM 70 constitutes an area for the IC card manager, that is, the IC card issuer to write unique data or program. In addition to the non-rewritable program configured in the mask ROM 60, the IC card manager's unique data or program is added using the EEPROM 70 to enhance the flexibility, versatility, and uniqueness of the IC card. You can Writing or erasing new data in the EEPROM 70 is performed using a reader / writer device (not shown).

【0016】CPU40とRAM50,ROM60,EE
PROM70とは、データバス,アドレスバス,コントロー
ル信号の各信号線によって接続されている。
CPU 40, RAM 50, ROM 60, EE
The PROM 70 is connected to each of the signal lines of a data bus, an address bus and a control signal.

【0017】上記の構成を有するICカードとリーダラ
イタ装置またはICカードを活用するためのホスト機器
との信号の接続は、図示しないコネクタを介して行われ
る。ホスト機器等と授受される信号は、信号の同期信号
となるCLK,MPUの起動信号であるRST,総合デ
ータのI/Oとであり、また、駆動電源Vccとグラン
ド(GND)である。
Signal connection between the IC card having the above structure and the reader / writer device or a host device for utilizing the IC card is performed through a connector (not shown). Signals exchanged with the host device and the like are CLK which is a synchronizing signal of signals, RST which is a start signal of MPU, I / O of comprehensive data, and driving power supply Vcc and ground (GND).

【0018】図4は、上記のICカードのメモリの構成
を示すアドレスマップである。既述したが、メモリは、
レジスタ42,RAM50,ROM60,EEPROM70に
よって構成される。レジスタ42はCPU40が演算を
実行する際に用いるメモリである。レジスタ42内に
は、マスクROM60の特定領域であるユーザ参照可能
領域602のアドレスを記憶する領域が設けられてい
る。ユーザ参照可能領域602とは、マスクROM60
に構成されている全体のプログラムの内、ICカード管
理者がプログラム内容を読出し独自に用いることを許可
された領域のことである。また、この領域範囲を記憶す
るためのレジスタ42の、U−ADR0(422)がユーザ
参照可能領域602の始点を、U−ADR1(423)が終
点をそれぞれ示している。ユーザ参照可能領域602以
外の領域601,603のマスクROM領域へアクセス
するプログラムをICカード管理者が組むことは、許可
されていない。
FIG. 4 is an address map showing the structure of the memory of the above IC card. As mentioned above, the memory is
It is composed of a register 42, a RAM 50, a ROM 60, and an EEPROM 70. The register 42 is a memory used when the CPU 40 executes a calculation. In the register 42, an area for storing the address of the user referenceable area 602 which is a specific area of the mask ROM 60 is provided. The user referable area 602 is the mask ROM 60.
In the entire program configured in, the IC card manager is an area permitted to read the program contents and use it independently. Further, in the register 42 for storing the area range, U-ADR0 (422) indicates the start point of the user referenceable area 602, and U-ADR1 (423) indicates the end point. It is not permitted for the IC card manager to create a program for accessing the mask ROM areas of the areas 601 and 603 other than the user referenceable area 602.

【0019】第1の実施例のマイクロコンピュータは、
図1に示されるように、ロジック回路のハード構成によ
って読出領域の制限を行う。この読出制限回路46は、
読出制限フラグ発生回路15,EEPROM内に記憶されたプ
ログラムか否かの判定回路1,リード命令か否かの判定
回路2,マスクROMのユーザ参照可能領域へのアクセ
スか否かの判定回路3、および判定条件の全てを満たし
ているか否かをチェックするAND回路18とにより構
成される。
The microcomputer of the first embodiment is
As shown in FIG. 1, the read area is limited by the hardware configuration of the logic circuit. This read limiting circuit 46
A read restriction flag generation circuit 15, a determination circuit for determining whether or not the program is stored in the EEPROM 1, a determination circuit for determining whether or not a read instruction 2, a determination circuit 3 for determining whether or not to access a user referenceable area of the mask ROM, And an AND circuit 18 for checking whether all the judgment conditions are satisfied.

【0020】読出制限フラグ発生回路15は、Vcc電
源線へ接続された抵抗16と、この抵抗16とグランド
線(GRD)とへ直列接続されたヒューズ17とによっ
て構成される。ヒューズ17はMPU内に構成されたワ
イヤードロジックであり、ICカードのI/O端子へ所
定の信号を印加することにより溶断し、GND線との接
続を切断することが可能である。制限フラグは、「L]
で制限不実行,「H]で制限実行として取り扱われる。
MPU製造時にこのヒューズ17は固定的に構成され制
限不実行状態であるが、ICカード出荷時に溶断され制
限実行状態とされる。読出制限フラグ発生回路15はま
た、マスクROM60で代用することもでき、さらにUV
-EPROMやEEPROMでも代用できる。
The read restriction flag generating circuit 15 is composed of a resistor 16 connected to the Vcc power supply line, and a fuse 17 connected in series to the resistor 16 and the ground line (GRD). The fuse 17 is a wired logic configured in the MPU, and can be blown by applying a predetermined signal to the I / O terminal of the IC card to disconnect the connection with the GND line. The limit flag is "L"
Is treated as non-executable with, and treated as restricted with "H".
The fuse 17 is fixedly configured and is in the non-limiting execution state at the time of manufacturing the MPU, but is blown to be in the limited execution state when the IC card is shipped. The read restriction flag generation circuit 15 can also be replaced by a mask ROM 60, and the UV
-EPROM or EEPROM can be used instead.

【0021】EEPROM70内に記憶されたプログラムか否
かの判定回路1は、プログラムアドレスレジスタ11の
記憶内容とEEPROM領域レジスタ12の記憶内容とを比較
器13によって比較することにより行う。EEPROM領域レ
ジスタ12には、EEPROM70の上限のアドレスであるE
−ADRO,と下限のアドレスであるE−ADR1,と
が固定的に記憶されている。不特定領域のプログラム実
行時に、CPU40がプログラムを実行するために取り
込んだコマンドが、EEPROM70に記憶されているコマン
ドであるか否かを比較器13がチェックする。このチェ
ックはコマンドの属するメモリ領域をプログラムアドレ
スレジスタ11の示すアドレスデータから知り、EEPROM
70のアドレス領域内か外かを比較器13がチェックす
ることにより行う。コマンドがEEPROM領域内に記憶され
ているものである場合は、比較器13が「H]信号を出
力する。
The determination circuit 1 for determining whether or not the program is stored in the EEPROM 70 is performed by comparing the stored content of the program address register 11 and the stored content of the EEPROM area register 12 with the comparator 13. The EEPROM area register 12 has an upper limit address E of the EEPROM 70.
-ADRO and E-ADR1, which is the lower limit address, are fixedly stored. When executing the program in the unspecified area, the comparator 13 checks whether the command fetched by the CPU 40 to execute the program is the command stored in the EEPROM 70. This check knows the memory area to which the command belongs from the address data indicated by the program address register 11, and
This is performed by the comparator 13 checking whether it is inside or outside the address area of 70. If the command is stored in the EEPROM area, the comparator 13 outputs the "H" signal.

【0022】リード命令か否かの判定回路2は、コマン
ド命令語を記憶するインストラクションコードレジスタ
21の記憶内容がリード命令であるか否かをコード解析
器22によって判定する。リード命令の場合は、コード
解析器22が「H]信号を出力する。
The circuit 2 for judging whether or not it is a read command judges by the code analyzer 22 whether or not the content stored in the instruction code register 21 for storing the command command word is a read command. In the case of a read instruction, the code analyzer 22 outputs the "H" signal.

【0023】ROMのユーザ参照可能領域602へのア
クセスか否かの判定回路3は、ROM領域レジスタ32
の記憶しているユーザ参照可能領域602の上限領域で
あるU−ADR0、下限領域であるU−ADR1と、ソ
ースアドレスレジスタ31の示すアクセス先のアドレス
とを比較器33が比較する。アクセス先のアドレスがユ
ーザ参照可能領域602外に及ぶ場合には、比較器33
は「H]信号を出力する。
The determination circuit 3 for determining whether or not to access the user referenceable area 602 of the ROM includes the ROM area register 32.
The comparator 33 compares U-ADR0, which is the upper limit area and U-ADR1 which is the lower limit area, of the user referable area 602 stored by the source address register 31 with the access destination address. If the access destination address extends outside the user referenceable area 602, the comparator 33
Outputs an "H" signal.

【0024】AND回路18は、4入力/1出力の論理
積回路である。4入力の信号は、上記の読出制限フラグ
発生回路15,比較器13,コード解析器22,比較器
33であり、この4信号が全て「H」の場合にAND回
路18は「H」信号を出力する。出力信号が「H」の場
合には、ソースアドレスレジスタ31に記憶されたコマ
ンドは実行不可と判定され、「L」の場合には実行可と
判定される。
The AND circuit 18 is a 4-input / 1-output AND circuit. The signals of four inputs are the read limit flag generating circuit 15, the comparator 13, the code analyzer 22, and the comparator 33, and when all of these four signals are "H", the AND circuit 18 outputs the "H" signal. Output. When the output signal is "H", it is determined that the command stored in the source address register 31 is not executable, and when it is "L", it is determined that the command is executable.

【0025】本発明の他の実施例は、プログラムの構成
によって読出の制限を行うものである。図2のフローチ
ャートによって示すプログラム構成例によれば、プログ
ラムコードを読み込み(ステップS11)、読み込んだ
コードの実行に移る前に4項目のチェックを行う。
In another embodiment of the present invention, reading is restricted by the structure of the program. According to the program configuration example shown by the flowchart of FIG. 2, the program code is read (step S11), and four items are checked before execution of the read code.

【0026】まず、制限フラグが有るか否かを判断し
(ステップS12)、制限フラグが有る場合にはステッ
プS13に進み、ない場合にはステップS17の命令実
行に進む。次に、EEPROM内の命令コードであるか否かを
判断し(ステップS13)、EEPROM内の命令コードであ
る場合には、ステップS14に進み、ない場合にはステ
ップS17の命令実行に進む。次に、命令コードが読出
命令であるか否かを判断し(ステップS14)、読出命
令である場合にはステップS15に進み、ない場合には
ステップS17の命令実行に進む。さらに、読出命令に
より指定される読み出し先が読み出し不可領域か否かを
判断し(ステップS15)、読み出し不可領域である場
合にはステップS16に進み、ない場合にはステップS
17の命令実行に進む。
First, it is determined whether or not there is a restriction flag (step S12). If the restriction flag is present, the process proceeds to step S13. If not, the process proceeds to step S17. Next, it is determined whether the instruction code is in the EEPROM (step S13). If the instruction code is in the EEPROM, the process proceeds to step S14. If not, the process proceeds to step S17. Next, it is determined whether or not the instruction code is a read instruction (step S14). If the instruction code is a read instruction, the process proceeds to step S15, and if not, the process proceeds to step S17. Further, it is judged whether or not the read destination designated by the read command is the unreadable area (step S15), and if it is the unreadable area, the process proceeds to step S16, and if not, the step S15.
Proceed to 17 instruction execution.

【0027】上記4項目の全てがチェック事項に該当す
る場合は、”ゼロデータ”,”エラーデータ”等を出力
する疑似実行(ステップS16)とし、4項目の1項目
でも該当しない項目があれば、プログラムコードの命令
を実行する(ステップS17)。
If all of the above four items correspond to the check items, pseudo execution (step S16) of outputting "zero data", "error data", etc. is performed, and if any one of the four items is not applicable, , Execute the instructions of the program code (step S17).

【0028】ステップ12の「制限フラグ有り?」は、
当該チェックルーチンを実行するか否かの確認である。
チェックが不要であれば以降のチェックを無用とし、残
りの3項目のチェックを行わず、コードのコマンドを実
行する。この制限フラグは、プログラムによっても構成
できるが、第1の発明と同じくワイヤードロジックで固
定的に設定すると制限動作を確実に行うことができる。
In step 12, "Is there a restriction flag?"
It is confirmation whether or not to execute the check routine.
If the check is unnecessary, the following checks are unnecessary, the remaining three items are not checked, and the code command is executed. The limit flag can be configured by a program, but the limit operation can be surely performed by fixedly setting it by the wired logic as in the first invention.

【0029】ステップ13の「EEPROM内の命令?」は、
読み出したコードがEEPROM70内に記録されていたか否
か、の確認である。マスクROM60内の命令であれば
チェックを必要としないからである。
In step 13, "Instruction in EEPROM?"
It is a confirmation whether or not the read code is recorded in the EEPROM 70. This is because the instruction in the mask ROM 60 does not need to be checked.

【0030】ステップ14の「読出命令?」は、コード
の命令内容が読出命令か否かを確認する。読出命令以外
の命令はマスクROM60の内容の機密保持に影響を及
ぼさないからである。
The "read command?" In step 14 confirms whether or not the instruction content of the code is a read command. This is because the commands other than the read command do not affect the confidentiality of the contents of the mask ROM 60.

【0031】ステップ15の「不可領域か?」は、コー
ドが読出命令である場合、読出記憶領域がマスクROM
のユーザ参照可能領域602の中か外かをチェックす
る。読出を指定したアドレスがユーザ読出記憶領域内で
あれば「NO」であり、外であれば「YES」と判定する。
In step 15, "Is the area impossible?", If the code is a read instruction, the read storage area is a mask ROM.
Check whether inside or outside the user referenceable area 602 of. If the address designated for reading is within the user read storage area, it is determined as "NO", and if it is outside, it is determined as "YES".

【0032】上記の読出制限プログラムは、その実効を
確実化するために、ステップが必ず踏襲するメインルー
チンで且つユーザ参照可能領域外に設けると良い。
In order to ensure its effectiveness, the above-mentioned read restriction program is preferably provided in the main routine in which the steps are always followed and outside the user referenceable area.

【0033】上述の実施例は本発明の好適な実施例では
あるが、本発明はこれに限定されるものではなく、本発
明の要旨を逸脱しない範囲において種々変形実施可能で
ある。例えば、上記の2つの実施例の構成に限られず、
両者を重複して用いたり、あるいは、両者を部分的にミ
ックスして構成する等の手法も有効である。
Although the above-described embodiment is a preferred embodiment of the present invention, the present invention is not limited to this, and various modifications can be made without departing from the gist of the present invention. For example, not limited to the configurations of the above two embodiments,
It is also effective to use both of them redundantly or to partially mix the two.

【0034】また、本発明のICカード用のマイクロコ
ンピュータは、カード製造者がICカード製造時に該マ
イクロコンピュータの書換可能型ROMの特定領域の読
出制限処理を行う際の読出制限処理の有効/無効の設定
手段(読出制限実行フラグ発生手段)によって、例え
ば、該読出制限処理が有効とされている場合には、書換
可能型ROMがユーザに開放されているICカード用の
マイクロコンピュータとし、該読出制限処理が無効とさ
れている場合には、書換可能型ROMがユーザに開放さ
れていないICカード用のマイクロコンピュータとして
用途別に利用することもでき、汎用性に富んだマイクロ
コンピュータを提供することが可能である。
Further, the microcomputer for the IC card of the present invention enables / disables the read restriction process when the card manufacturer performs the read restriction process on the specific area of the rewritable ROM of the microcomputer at the time of manufacturing the IC card. When the read restriction processing is enabled by the setting means (read restriction execution flag generating means), the rewritable ROM is used as an IC card microcomputer opened to the user, and the read operation is performed. When the limiting process is invalid, the rewritable ROM can be used as a microcomputer for an IC card that is not open to the user for each purpose, and a microcomputer with high versatility can be provided. It is possible.

【0035】[0035]

【発明の効果】以上の説明より明かなように、本発明の
ICカード用のマイクロコンピュータは、プログラムコ
ードが書換可能型ROMに記録されたコードか、読出命
令か、所定の領域外を含む読出命令であるかを判定して
いるため、特定領域のデータの読出処理を禁止すること
により、特定領域のプログラムによって処理されたデー
タの解読を阻止し、データの機密性を保持することが出
来る。したがって、ユーザに安価な独自のICカードを
製作する自由度を与えることができる。
As is apparent from the above description, in the microcomputer for the IC card of the present invention, the program code is the code recorded in the rewritable ROM, the read command, or the read including the outside of the predetermined area. Since it is determined whether the command is an instruction, by prohibiting the reading process of the data in the specific area, the decryption of the data processed by the program in the specific area can be prevented, and the confidentiality of the data can be maintained. Therefore, it is possible to give the user the freedom to manufacture an inexpensive original IC card.

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

【図1】本発明によるICカード用のマイクロコンピュ
ータの一実施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a microcomputer for an IC card according to the present invention.

【図2】本発明によるICカード用のマイクロコンピュ
ータの動作を示すフローチャートである。
FIG. 2 is a flowchart showing the operation of the microcomputer for the IC card according to the present invention.

【図3】本発明によるICカード用のマイクロコンピュ
ータをICカードに適用した全体ユニットの構成例を示
すブロック図である。
FIG. 3 is a block diagram showing a configuration example of an entire unit in which a microcomputer for an IC card according to the present invention is applied to an IC card.

【図4】本発明によるICカード用のマイクロコンピュ
ータのメモリの構成を示すアドレスマップである。
FIG. 4 is an address map showing a memory configuration of a microcomputer for an IC card according to the present invention.

【符号の説明】[Explanation of symbols]

1、2、3 判定回路 11 プログラムアドレスレジスタ 12 EEPROM領域レジスタ 13、33 比較器 15 読出制限フラグ発生回路 16 抵抗 17 ヒューズ 18 AND回路 21 インストラクションコードレジスタ 22 コード解析器 31 ソースアドレスレジスタ 32 ROM領域レジスタ 46 読出制限回路 1, 2 and 3 Judgment circuit 11 Program address register 12 EEPROM area register 13, 33 Comparator 15 Read restriction flag generation circuit 16 Resistor 17 Fuse 18 AND circuit 21 Instruction code register 22 Code analyzer 31 Source address register 32 ROM area register 46 Read limit circuit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 少なくとも書換可能型ROMと書換不可
能型ROMとを有するICカード用のマイクロコンピュ
ータにおいて、該マイクロコンピュータは、 前記書換不可能型ROMの所定の領域を指定する領域指
定手段と、 前記書換可能型ROMのプログラムコードの命令が読出
命令であるか否かを判別する読出命令判別手段と、 前記読出命令により指定された領域が前記書換不可能型
ROMの前記領域指定手段により指定された所定の領域
であるか否かを判定する領域判定手段とを有し、 前記マイクロコンピュータが処理するプログラムコード
が前記領域指定手段、前記読出命令判定手段および前記
領域判定手段により有効とされた場合に限り、前記書換
可能型ROMに記録された前記読出命令の前記プログラ
ムコードの読出処理の実行を許可することを特徴とする
ICカード用のマイクロコンピュータ。
1. A microcomputer for an IC card having at least a rewritable ROM and a non-rewritable ROM, wherein the microcomputer includes area designating means for designating a predetermined area of the non-rewritable ROM. A read instruction determining means for determining whether the instruction of the program code of the rewritable ROM is a read instruction, and an area designated by the read instruction is designated by the area designating means of the nonrewritable ROM. And a program code processed by the microcomputer is valid by the area designating means, the read command determining means, and the area determining means. Only for executing the reading process of the program code of the reading instruction recorded in the rewritable ROM. Microcomputer for IC cards and permits.
【請求項2】 請求項1に記載のICカード用のマイク
ロコンピュータにおいて、該マイクロコンピュータはさ
らに、前記読出処理の可否を選択する読出制限処理の有
効/無効を設定するための読出制限実行フラグ発生手段
を有し、前記読出制限実行フラグ発生手段により発生さ
れた該フラグにより前記読出制限処理の可否を選択でき
ることを特徴とするICカード用のマイクロコンピュー
タ。
2. The microcomputer for the IC card according to claim 1, wherein the microcomputer further generates a read restriction execution flag for setting valid / invalid of the read restriction process for selecting whether or not the read process is possible. A microcomputer for an IC card, further comprising means, wherein whether or not the read restriction process is possible can be selected by the flag generated by the read restriction execution flag generation means.
【請求項3】 請求項1または請求項2に記載のICカ
ード用のマイクロコンピュータにおいて、前記読出制限
実行フラグ発生手段は回路的に前記マイクロコンピュー
タの内部に構成され、該回路は前記マイクロコンピュー
タへ所定の信号を印加することにより前記読出制限処理
が有効となり、有効状態が不可逆的に設定されることを
特徴とするICカード用のマイクロコンピュータ。
3. The microcomputer for an IC card according to claim 1 or 2, wherein the read restriction execution flag generating means is circuitally configured inside the microcomputer, and the circuit is provided to the microcomputer. A microcomputer for an IC card, characterized in that the read limiting process is enabled by applying a predetermined signal, and the enabled state is set irreversibly.
JP5247372A 1993-09-08 1993-09-08 Microcomputer for ic card Pending JPH0778126A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5247372A JPH0778126A (en) 1993-09-08 1993-09-08 Microcomputer for ic card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5247372A JPH0778126A (en) 1993-09-08 1993-09-08 Microcomputer for ic card

Publications (1)

Publication Number Publication Date
JPH0778126A true JPH0778126A (en) 1995-03-20

Family

ID=17162455

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5247372A Pending JPH0778126A (en) 1993-09-08 1993-09-08 Microcomputer for ic card

Country Status (1)

Country Link
JP (1) JPH0778126A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005008502A1 (en) * 2003-07-16 2005-01-27 Matsushita Electric Industrial Co., Ltd. Access method
KR20060132109A (en) * 2005-06-17 2006-12-21 송원영 Electrical sealing method of rfid tag
JP2014126935A (en) * 2012-12-25 2014-07-07 Dainippon Printing Co Ltd Ic card, data duplication control method, and data duplication control program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005008502A1 (en) * 2003-07-16 2005-01-27 Matsushita Electric Industrial Co., Ltd. Access method
US7559090B2 (en) 2003-07-16 2009-07-07 Matsushita Electric Industrial Co., Ltd. Memory, information apparatus for access to the memory, and method for the information apparatus
KR20060132109A (en) * 2005-06-17 2006-12-21 송원영 Electrical sealing method of rfid tag
JP2014126935A (en) * 2012-12-25 2014-07-07 Dainippon Printing Co Ltd Ic card, data duplication control method, and data duplication control program

Similar Documents

Publication Publication Date Title
JP3396043B2 (en) Micro circuit
US5884026A (en) Personal computer having a security function, a method of implementing the security function, and methods of installing and detaching a security device to/from a computer
US5826007A (en) Memory data protection circuit
EP0707270B1 (en) Method and apparatus for validating system operation
JP2755828B2 (en) Secure application card for sharing application data and procedures between multiple microprocessors
JP2007226839A (en) Memory unit and system for storing data structure
US6453397B1 (en) Single chip microcomputer internally including a flash memory
US5828831A (en) System for preventing unauthorized use of a personal computer and a method therefore security function, and methods of installing and detaching a security device to/from a computer
JPH09508733A (en) Data exchange system with portable data processing unit
JPH021090A (en) Ic card and method for writing its operation program
JP2007148644A (en) Data storage device, ic card and data storage method
JP3125070B2 (en) IC card
JP2005515542A (en) Apparatus and method for writing to NV memory in a controller architecture together with a corresponding computer program and a corresponding computer-readable storage medium
US7054121B2 (en) Protection circuit for preventing unauthorized access to the memory device of a processor
JPH0896106A (en) Ic card and ic card system
US20040186947A1 (en) Access control system for nonvolatile memory
JPH0778126A (en) Microcomputer for ic card
JP2003208586A (en) Method and device for controlling access to eeprom, corresponding computer software product, and corresponding computer-readable storage medium
JP4053245B2 (en) Semiconductor memory device that can prevent unauthorized use
KR100453781B1 (en) Microcomputer
JP3899223B2 (en) How to change / add IC card and IC card loading processing program
JP3234959B2 (en) Microcomputer and card incorporating the same
KR101118494B1 (en) Method for writing data and applications into identification media
KR20040097435A (en) Software unlawfulness reproduction preventing device using universal serial bus portable storing device and preventing method thereof
JP3057326B2 (en) IC card

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040525