JPS62211756A - IC card test method - Google Patents
IC card test methodInfo
- Publication number
- JPS62211756A JPS62211756A JP61054455A JP5445586A JPS62211756A JP S62211756 A JPS62211756 A JP S62211756A JP 61054455 A JP61054455 A JP 61054455A JP 5445586 A JP5445586 A JP 5445586A JP S62211756 A JPS62211756 A JP S62211756A
- Authority
- JP
- Japan
- Prior art keywords
- card
- terminal
- memory
- data
- test program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000010998 test method Methods 0.000 title claims 2
- 238000012360 testing method Methods 0.000 abstract description 16
- 239000011159 matrix material Substances 0.000 description 12
- 238000000034 method Methods 0.000 description 6
- 230000004913 activation Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 101100247628 Mus musculus Rcl1 gene Proteins 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Landscapes
- Storage Device Security (AREA)
Abstract
Description
【発明の詳細な説明】
[発明の技術分野]
この発明はICカード内に格納されたテストプログラム
を起動する際の安全性を考慮したICカードのテスト方
式に関する。DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to an IC card testing method that takes into consideration safety when starting a test program stored in an IC card.
[従来技術とその問題点]
近年、キャッシュレス時代と呼ばれており、クレジット
カード会社などにより発行されたカードを使用すること
により現金の取扱いをせずに商品の購入が可能になって
いる。[Prior art and its problems] In recent years, it has become known as the cashless era, and by using cards issued by credit card companies, it has become possible to purchase products without handling cash.
従来、使用されているカードとしては、プラスチックカ
ード、エンボスカード、磁気ストライプカードなどがあ
るが、これらカードは構造上偽造が容易であるため、不
正使用が問題になっている。Cards conventionally used include plastic cards, embossed cards, and magnetic stripe cards, but these cards are easy to forge due to their structure, so unauthorized use has become a problem.
そこで、このような問題を解決するため、カード内部に
認証番号などを記憶したIC回路を組込み、認証番号が
外部から容易に読出せないようにした情報カード、いわ
ゆるICカードが考えられている。In order to solve this problem, an information card, a so-called IC card, is being considered in which an IC circuit that stores an authentication number and the like is built into the card so that the authentication number cannot be easily read from the outside.
ところで、このようなICカードにはデータメモリおよ
びシステムプログラムROMなど各種のLSIが収納さ
れているが、特にデータメモリのアドレス指定、書込み
/読出し動作およびシステムプログラムROMのビット
パターン状態などは常に正常に保たれていなければなら
ず、このためカードの完成時あるいはカード使用中であ
っても、これらの状態をテストできることが必要である
。Incidentally, such an IC card stores various LSIs such as data memory and system program ROM, but in particular, data memory addressing, write/read operations, and bit pattern status of system program ROM are always normally performed. Therefore, it is necessary to be able to test these conditions when the card is completed or even while the card is in use.
そこで、従来のICカードではテストプログラムを記憶
させておき、このプログラムをカードに設けたテスト端
子を利用してカード外部より実行せしめ所定のテストを
可能にしている。Therefore, in conventional IC cards, a test program is stored, and this program is executed from outside the card using a test terminal provided on the card to enable a predetermined test.
ところが、このようにテストプログラムの起動によりI
Cカードをテストモードとすると、カードの総ての秘密
性が保たれなくなるため、ICカード側のメモリに保持
されたままの秘密性の島い内容が総て外部に読出される
おそれがある。このことは、これらの情報を基にカード
の偽造が可能となり、安全性を著しく低下させるだけで
なく、最悪の場合はICカードを使用するシステム全体
の技術が分析され、大計りに悪用されるおそれがあった
。However, by starting the test program like this, I
If the C card is placed in the test mode, all of the card's secrecy is no longer maintained, so there is a risk that all confidential contents held in the IC card's memory may be read out. This not only makes it possible to forge cards based on this information, significantly reducing security, but in the worst case scenario, the technology of the entire system that uses IC cards can be analyzed and exploited for grand scheme. There was a risk.
この発明は上記の事情に鑑みてなされたもので、ICカ
ード内のテストプログラム実行の際の安全性を確実に確
保できるICカードのテスト方式を提供することを目的
とする。The present invention has been made in view of the above circumstances, and an object of the present invention is to provide an IC card testing method that can reliably ensure safety when executing a test program in an IC card.
[発明の要点]
この発明にかかるICカードのテスト方式はICカード
内部のテストプログラムに対して起動勅令が与えられる
と、これを検出し正規なテストプログラム起動指令か判
断するとともに、テストモードに入る前にデータメモリ
の内容を総て消去するような構成になっている。[Summary of the Invention] The IC card testing method according to the present invention detects when a start command is given to the test program inside the IC card, determines whether it is a legitimate test program start command, and switches the IC card to test mode. The configuration is such that all contents of the data memory are erased before entering.
[発明の実施例] 以下、この発明の一実施例を図面にしたがい説明する。[Embodiments of the invention] An embodiment of the present invention will be described below with reference to the drawings.
第1図は同実施例の回路構成を示すものである。FIG. 1 shows the circuit configuration of the same embodiment.
図において、11はシステムバスで、このシステムバス
11にはデータROM12、アプリケーションデータR
OM13、ワーキングRAM14、システムプログラム
ROM15、テストプログラムROM16、メインコン
トローラ17、データメモリコントローラ18、暗号比
較器19、USART回路20が夫々接続されている。In the figure, 11 is a system bus, and this system bus 11 includes a data ROM 12, an application data R
An OM 13, a working RAM 14, a system program ROM 15, a test program ROM 16, a main controller 17, a data memory controller 18, a cryptographic comparator 19, and a USART circuit 20 are connected, respectively.
ここで、データROM12はICカード自身に対するあ
らゆる動作条件を記憶するもので、これらの条件データ
はカード自身の内部イニシャルが終了すると、予め定め
られたフォーマットにのっとりアンサ・ツー・リセット
・データとして図示しないターミナル側に送信されるよ
うになっている。Here, the data ROM 12 stores all operating conditions for the IC card itself, and these condition data are stored as answer-to-reset data (not shown) in accordance with a predetermined format when the internal initialization of the card itself is completed. It is configured to be sent to the terminal side.
アプリケーションデータROM13は、このカードがい
かなる種類のものかを示すカード種別データrAPNJ
を記憶するもので、このデータは上記のアンサ・ツー・
リセット・データにもとずくイニシャルパラメータ設定
後、ターミナルとの属性交換の際に所定のデータフォー
マットにのせられ送出される。The application data ROM 13 contains card type data rAPNJ indicating what type of card this card is.
This data is stored in the answer to
After setting the initial parameters based on the reset data, it is sent out in a predetermined data format when exchanging attributes with the terminal.
ワーキングRAM14はカード内での演算データなどが
記憶される。The working RAM 14 stores calculation data within the card.
システムプログラムROM15は各種システムプログラ
ムとともにターミナル側より伝送供給される信号が正し
いか否かを表わすコード信号rAcKJまたはrNAC
Jを備えている。また、このシステムプログラムROM
15にはターミナルからのテストプログラム起動指令を
最終的にチェックするための特定コードが書込まれてい
る。The system program ROM 15 contains various system programs as well as code signals rAcKJ or rNAC indicating whether the signals transmitted and supplied from the terminal side are correct or not.
Equipped with J. In addition, this system program ROM
15 is written with a specific code for finally checking the test program starting command from the terminal.
テストプログラムROM16はカード内部のテストとし
てシステムプログラムROM15でのピットパターンの
チェック、あるいはデータメモリのアクセスなどを実行
するためのテストプログラムを記憶している。The test program ROM 16 stores a test program for checking the pit pattern in the system program ROM 15 or accessing the data memory as a test inside the card.
メインコントローラ17はターミナル側から伝送供給さ
れるデータ信号および動作状態に応じて各回路に動作指
令を出力するものである。The main controller 17 outputs operation commands to each circuit in accordance with the data signal transmitted and supplied from the terminal side and the operating state.
データメモリコントローラ18はメインコントローラ1
7からの指令に応じてデータメモリ21に対するアドレ
ス指定およびデータの書込み/読出しを行ない、さらに
はこれらアドレス指定およびデータの書込み/読・出し
を一切停止させることができるようにもなっている。The data memory controller 18 is the main controller 1
Addressing and data writing/reading to the data memory 21 can be performed in response to commands from 7, and furthermore, these addressing and data writing/reading can be completely stopped.
データメモリ21は例えばEEP−ROMが使用されて
いる。この場合、かかるデータメモリ25はrc、Aj
、rIPINJ、[PANj、rcHNJ、rEPDJ
、rPRKJの各コード、スティタスデータrsTJな
どの情報を記憶している。ここで、rcAJ (Ca
rd Authenticator)はランダムなコ
ードで、メツセージの暗号化および解読に使用される。For example, an EEP-ROM is used as the data memory 21. In this case, such data memory 25 is rc, Aj
, rIPINJ, [PANj, rcHNJ, rEPDJ
, rPRKJ codes, status data rsTJ, and other information. Here, rcAJ (Ca
rd Authenticator) is a random code used to encrypt and decrypt messages.
rIPINJ (Initialzation P
ersonal IdentificationNu
mber)はランダムな例えば6ビツトのコードで、自
己の照合番号rPINJが使用されるまでの番号で有る
。rPANJ (Primary Account
Number)は口座番号を表わしている。rCH
NJ (Card hotder′s Name
)はカード所有者の名前を表わしている。rEPDJ
(Exp i rat i 。rIPINJ (Initialization P
personalIdentificationNu
mber) is a random code, for example, 6 bits, and is a number until the own verification number rPINJ is used. rPANJ (Primary Account
Number) represents the account number. rCH
NJ (Card hotter's Name
) represents the cardholder's name. rEPDJ
(Exp i rat i.
n Date)は有効期限を表わしている。n Date) represents the expiration date.
rPRKJ (Private Key Cod
e)は暗号解読用コードである。rsTJは現在のカー
ド状態を表わす為のもので、データフォーマットでター
ミナル側に送信される。rPRKJ (Private Key Cod
e) is a decryption code. rsTJ is used to represent the current card status and is sent to the terminal side in data format.
暗号比較器1つはターミナル側から伝送された入力デー
タをrR3AJアルゴリズムに基づき暗号解読するとと
もに、必要によりシステムプログラムROM15から読
出される特定コードとの比較を行なうようになっている
。そして、この暗号比較器19の出力はメインコントロ
ーラ17に送られる。One code comparator decodes the input data transmitted from the terminal side based on the rR3AJ algorithm, and also compares it with a specific code read from the system program ROM 15 if necessary. The output of this cryptographic comparator 19 is then sent to the main controller 17.
USART回路20はターミナルとの間のデータ伝送を
制■するようなものである。The USART circuit 20 controls data transmission to and from the terminal.
一方、22はカードのテストプログラム起動要請の可否
をチェックするチェック回路で、このチェック回路22
はカードをターミナルに装着した状態でターミナルとの
データのやりとりを行なうためのI10端子およびリセ
ット信号が与えられるRe5et端子を有している。そ
して、これらI10端子およびRe5et端子にはレベ
ル検出器23.24を接続している。この場合、これら
I10端子およびRe5et端子には夫々正規のリセッ
ト信号の他にレベルの異なる複数のアナログ信号が、c
l ock端子のクロック信号Φに同期して直列的に
入力される。具体的には第3図に示すようにレベルの異
なる多値信号として、例えば1位の異なる31a(7)
1f圧VCc1V1、V2が用いられ、これら3値の信
号がクロック信号Φに同期して所定の順序でI10端子
およびRe5et@子に与えられるようになる。そして
、この状態でレベル検出器23.24より上記の3値付
号に対応してVCCでは「O」、Vlでは「1」、■2
では「2」のレベル情報が得られる。On the other hand, 22 is a check circuit for checking whether or not a request to start the test program of the card is made.
has an I10 terminal for exchanging data with the terminal when the card is attached to the terminal, and a Re5et terminal to which a reset signal is applied. Level detectors 23 and 24 are connected to these I10 and Re5et terminals. In this case, in addition to the regular reset signal, a plurality of analog signals with different levels are connected to the I10 terminal and the Re5et terminal, respectively.
It is input in series in synchronization with the clock signal Φ of the lock terminal. Specifically, as shown in FIG. 3, as multi-level signals with different levels, for example, 31a (7) with different 1st positions.
1f voltages VCc1V1 and V2 are used, and these three-value signals are given to the I10 terminal and the Re5et@ terminal in a predetermined order in synchronization with the clock signal Φ. In this state, the level detectors 23 and 24 indicate "O" for VCC, "1" for Vl, and ■2, corresponding to the above three-valued numbers.
In this case, level information of "2" is obtained.
このレベル検出器23.24の出力は比較部25に与え
られる。この比較部25にはレベルマトリクス26の出
力が与えられている。このレベルマトリクス26は上記
レベル検出器23.24からのレベル情報に対応するカ
ード固有のレベル情報を有している。また、レベルマト
リクス26には上記クロック信号のが与えられる。The outputs of the level detectors 23 and 24 are given to the comparator 25. The comparator 25 is supplied with the output of the level matrix 26 . This level matrix 26 has card-specific level information corresponding to the level information from the level detectors 23, 24. Further, the level matrix 26 is given the above clock signal.
そして、比較部25の比較結果はメインコントローラ1
7に送られる。Then, the comparison result of the comparison section 25 is the main controller 1.
Sent to 7.
ここで、このようなチェック回路22を第2図に基づい
て更に具体的に述べると、レベル検出器23.24は出
力端子01 、o2を有し、レベル情報「0」の時「O
O」、レベル情報「1」の時ro1J、レベル情報「2
」の時「10」を出力する。また、これらのレベル検出
器23.24の出力が与えられる比較部25はレベル検
出器23.24の出力が各別に与えられる2個の一致回
路251.252と論理回路253を有し、これら一致
回路251.252にて同時に一致出力が得られると、
論理回路253より「1」出力が得られるようになって
いる。Here, to describe the check circuit 22 in more detail based on FIG. 2, the level detectors 23 and 24 have output terminals 01 and o2, and when the level information is "0",
O”, level information “1” ro1J, level information “2”
”, outputs “10”. The comparator 25 to which the outputs of the level detectors 23 and 24 are supplied has two matching circuits 251 and 252 and a logic circuit 253 to which the outputs of the level detectors 23 and 24 are respectively given, When coincidence outputs are obtained at the same time in circuits 251 and 252,
The logic circuit 253 is configured to provide an output of "1".
一方、レベルマトリクス26はクロック信号のをカウン
トするカウンタ261、該カウンタ261のカラン1−
内容に応じて読出しアドレス1〜10を出力するマトリ
クス部262および該マトリクス部262にて指定され
たアドレスに応じて予め記憶された3値のレベル情報「
0」、「1」、「2」を出力する記憶部263.264
を有している。この場合、レベル情報「0」はroOJ
、レベル情報「1」は「01」、レベル情報「2」は「
10」のコードデータとして出力される。On the other hand, the level matrix 26 includes a counter 261 that counts the clock signal, and a count 1-1 of the counter 261.
A matrix unit 262 that outputs read addresses 1 to 10 according to the contents and ternary level information stored in advance according to the address specified in the matrix unit 262.
Storage units 263 and 264 that output “0”, “1”, and “2”
have. In this case, level information "0" is roOJ
, level information "1" is "01", level information "2" is "
10" is output as code data.
そして、記憶部263の出力は一致回路251、記憶部
264の出力は一致回路252に与えられる。The output of the storage section 263 is given to the matching circuit 251, and the output of the storage section 264 is given to the matching circuit 252.
一方、第1図に戻ってチェック回路22の比較部25で
の比較結果に応じた出力はメモリ消去回路28に与えら
れる。このメモリ消去回路28は比較部25での比較結
果が正規なプログラム起動要請に対応したものであれば
メモリ消去スタート信号として取込み、データメモリ2
1に対して例えばチップイレーズ命令を与え、該メモリ
21の内容を総て消去するようにしている。そして、メ
モリ21の内容消去の終了を侍ってメモリ消去終了信号
をメインコントローラ17に送出する。On the other hand, returning to FIG. 1, an output corresponding to the comparison result of the comparing section 25 of the check circuit 22 is given to the memory erasing circuit 28. If the comparison result in the comparator 25 corresponds to a normal program start request, the memory erasing circuit 28 takes it in as a memory erasing start signal and sends it to the data memory 2.
For example, a chip erase command is given to the memory 21 to erase the entire contents of the memory 21. Then, after the completion of erasing the contents of the memory 21, a memory erasure completion signal is sent to the main controller 17.
なお、ターミナル側よりVcc端子にカード駆動用電源
、VDp端子にデータメモリ21に対する書込み用電源
が印加される。この時の電源電圧はデータROM12に
て記憶されるアンサ・ツー・リセット・データに基づき
ターミナル側にて設定される。また、GND端子にター
ミナル側のGNDラインが接続される。さらに、c l
ock端子のクロック信号は分周器27を介してΦ′
として各回路に供給される。Note that from the terminal side, power for driving the card is applied to the Vcc terminal, and power for writing to the data memory 21 is applied to the VDp terminal. The power supply voltage at this time is set on the terminal side based on answer-to-reset data stored in the data ROM 12. Further, the GND line on the terminal side is connected to the GND terminal. Furthermore, c l
The clock signal at the ock terminal is passed through the frequency divider 27 to Φ'
is supplied to each circuit as
ここで、このようなICカードと、該カードが装着され
るターミナルとの関係を簡単に述べると、次のようにな
る。いま、ICカードをターミナルに装着すると、予め
ターミナル側にて設定された初期設定信号が送信されて
くる。すると、この信号に基づく動作条件にてICカー
ドが動作される。Here, the relationship between such an IC card and the terminal to which the card is installed will be briefly described as follows. Now, when an IC card is inserted into a terminal, an initial setting signal set in advance on the terminal side is transmitted. Then, the IC card is operated under operating conditions based on this signal.
つまり、メインコントローラ17の制御によりデータR
OM12に記憶されていたアンサ・ツー・リセット・デ
ータが読出され、ターミナル側に送出される。そして、
ターミナル側にてこのデータが正しいものと判定される
と、カード専用の動作条件が設定されるとともにrEN
QJ (間合わせ)コードが返送されてくる。このコ
ードはワーキングRAM14に書込まれる。この状態で
、メインコントローラ17にてrENQJコードを正常
の動作で正規に受けることができるか否かが判断され、
システムプログラムROM15よりYESの場合「AC
K」、NOの場合rNAcJの夫々の信号が取出されタ
ーミナル側に送出される。そして、ターミナル側にてr
AcKJ信号が確認されると、ターミナルの種類に応じ
て異なるターミナルコードrTcJが返送されてくる。In other words, the data R is controlled by the main controller 17.
The answer-to-reset data stored in OM12 is read out and sent to the terminal side. and,
If this data is determined to be correct on the terminal side, the card-specific operating conditions are set and rEN
A QJ (makeshift) code will be sent back to you. This code is written into working RAM 14. In this state, the main controller 17 determines whether or not the rENQJ code can be properly received through normal operation.
If YES from system program ROM15, “AC
K", and in the case of NO, the rNAcJ signals are extracted and sent to the terminal side. Then, on the terminal side, r
When the AcKJ signal is confirmed, a different terminal code rTcJ is returned depending on the type of terminal.
一方、rNAcJ信号が確認されると、ターミナルとの
接続関係が断たれる。ターミナル側よりターミナルコー
ドrTcJが送られてくると、ICカードではメインコ
ントローラ17にてアプリケーションデータROM13
に記憶されているカードの種類に応じて異なるアプリケ
ーションネームrAPNJが取出されターミナル側に返
送する。On the other hand, if the rNAcJ signal is confirmed, the connection with the terminal is severed. When the terminal code rTcJ is sent from the terminal side, the main controller 17 in the IC card stores the application data in the ROM 13.
A different application name rAPNJ is extracted depending on the type of card stored in the terminal and sent back to the terminal side.
その後、ターミナル側にてrAPNJを基にその用途種
別が対応関係にあるか否かが判断されると、命令コード
が返送されてくる。一方、一致しないと判断されると、
ターミナルとの接続関係が断たれる。こうして命令コー
ドが得られるとターミナルから入力される自己の認証番
号rPINJとICカードに予め記憶されている認証番
号との比較が行なわれ、両者が一致するのをまって、そ
の後の金銭取引などの情報交換が実行されるようになる
。Thereafter, when it is determined on the terminal side whether or not the application types have a correspondence relationship based on rAPNJ, an instruction code is returned. On the other hand, if it is determined that there is no match,
The connection with the terminal is severed. When the command code is obtained in this way, the own authentication number rPINJ entered from the terminal is compared with the authentication number pre-stored in the IC card, and after waiting for the two to match, subsequent financial transactions etc. Information exchange begins.
次に、このように構成される実施例の動作を第4図のフ
ローチャートにしたがい説明する。Next, the operation of the embodiment configured as described above will be explained according to the flowchart shown in FIG.
まず、テストを行なうべくICカードをテスト用のター
ミナルに装着する。するとICカードの110端子、R
e5et端子、clock端子、ycc端子、vpp端
子、GND端子がターミナル側の対応する端子に接続さ
れる。First, to perform a test, an IC card is attached to a test terminal. Then, the 110 terminal of the IC card, R
The e5et terminal, clock terminal, ycc terminal, vpp terminal, and GND terminal are connected to corresponding terminals on the terminal side.
これによりステップA1に進む。このステップA1では
、テストプログラムの起動要請に対する可否が判断され
る。これには、まずターミナル側よりテストプログラム
起動指令としてI10端子およびRe5et*子にレベ
ルの異なる多値信号が与えられる。具体的にはターミナ
ル側でのテスト指令により、第3図に示すようにクロッ
ク信号のと同期して2組のレベルの異なる3値電圧Vc
c、Vl、V2が直列的に出力され、これが110端子
およびRe5et端子に与えられる。This causes the process to proceed to step A1. In this step A1, it is determined whether or not the request to start the test program is accepted. To do this, first, multi-value signals of different levels are applied from the terminal side to the I10 terminal and the Re5et* child as a test program starting command. Specifically, by a test command on the terminal side, two sets of ternary voltages Vc with different levels are generated in synchronization with the clock signal as shown in Figure 3.
c, Vl, and V2 are output in series and applied to the 110 terminal and the Re5et terminal.
この場合、図示例ではI10端子にV2−VCC−Vl
−VCC・・・−■2の順に10個の3値信号が与えら
れ、Re5et端子にVl−V2−Vcc・・・−Vl
の順に10個の3値付号が与えられている。すると、こ
れら3値付号に対応する直列レベル情報がレベル検出器
23.24の出力端子o1 、o2より順に発生され、
比較部25の一致回路251.252に与えられる。In this case, in the illustrated example, V2-VCC-Vl is applied to the I10 terminal.
-VCC...-■10 ternary signals are given in the order of 2, and Vl-V2-Vcc...-Vl is applied to the Re5et terminal.
Ten ternary numbers are given in this order. Then, serial level information corresponding to these ternary numbers is sequentially generated from the output terminals o1 and o2 of the level detectors 23 and 24,
The signal is applied to matching circuits 251 and 252 of the comparator 25.
一方、レベルマトリクス26では、ターミナルからのク
ロック信号Φがカウンタ261にてカウントされる。す
ると、このカウンタ261のカウント内容に応じてマト
リクス部262より読出しアドレスが1から10まで出
力される。これにより、記憶部263.264はアドレ
ス1から10まで順に予め記憶されている直列レベル情
報が読出される。この場合、記憶部253より読出され
るレベル情報はr2J rOJ rlJ・・・「2
」の順で出力され、記憶部254より読出されるレベル
情報はrlJ r2J rOJ・・・「1」の順で出
力される。そして、これらの出力は夫々比較部25の一
致回路251.252に与えられる。On the other hand, in the level matrix 26, a counter 261 counts the clock signal Φ from the terminal. Then, read addresses from 1 to 10 are outputted from the matrix section 262 according to the count contents of the counter 261. As a result, the serial level information stored in advance in the storage units 263 and 264 in order from addresses 1 to 10 is read out. In this case, the level information read from the storage unit 253 is r2J rOJ rlJ..."2
", and the level information read from the storage unit 254 is output in the order rlJ r2J rOJ . . . "1". These outputs are then given to matching circuits 251 and 252 of the comparator 25, respectively.
これにより一致回路251,252では、レベル検出器
23.24からのレベル情報とレベルマトリクス26か
らのレベル情報の一致を調べる。As a result, the matching circuits 251 and 252 check whether the level information from the level detectors 23, 24 and the level information from the level matrix 26 match.
この場合、一致結果が得られたとすると、論理回路25
3より「1」出力が発生されるが、仮に不正なプログラ
ム起動要請でターミナルからの3値付号の組合わせが、
予め記憶部263,264に記憶されたものと異なると
、不一致結果として「0」出力のままとなる。In this case, if a matching result is obtained, the logic circuit 25
3 will generate a "1" output, but if the combination of ternary numbers from the terminal is incorrect due to an unauthorized program startup request,
If it differs from what has been stored in advance in the storage units 263 and 264, "0" remains as a non-coincidence result.
この状態での論理回路253の出力はメインコントロー
ラ17に送られる。The output of the logic circuit 253 in this state is sent to the main controller 17.
この場合、第3図に示す311信号がI10端子および
Re5et端子に入力されていれば一致回路251.2
52は総て一致結果が得られるので、論理回路253よ
り「1」出力が発生される。すると、正規なプログラム
起動要請と判断され、ステップA2に進む。In this case, if the 311 signal shown in FIG. 3 is input to the I10 terminal and the Re5et terminal, the matching circuit 251.2
Since matching results are obtained for all of the circuits 52, the logic circuit 253 generates an output of "1". Then, it is determined that the request is a legitimate program activation request, and the process proceeds to step A2.
このステップA2では、メインコントローラ17の指令
によりターミナル側に対し正規なプログラム起動要請と
して受付けられた旨が知らされる。In step A2, the main controller 17 commands the terminal side to notify that the request has been accepted as a legitimate program startup request.
この状態で、ターミナル側からプログラム起動のだめの
特定コードが送られ、暗号比較器1つに与えられる。In this state, a specific code to start the program is sent from the terminal side and given to one cryptographic comparator.
一方、メインコントローラ17の指令によりシステムプ
ログラムROM15に書込まれた特定コードが読出され
、これが暗号比較器19に与えられる。これにより、ス
テップA3にてターミナルからの特定コードはカード自
身の特定コードと比較される。そして、この比較結果が
不一致ならばステップA4に進み、カード無効処理が実
行される。この場合のカード無効処理はメインコントロ
ーラ17の指令をまってデータメモリコントローラ18
によるデータメモリ21に対するアドレス指定およびデ
ータの1込み/読出しが一切停止されるようになる。一
方、一致していれば、ステップA5に進む。On the other hand, a specific code written in the system program ROM 15 is read out according to a command from the main controller 17, and is given to the code comparator 19. Thereby, in step A3, the specific code from the terminal is compared with the specific code of the card itself. If the comparison results do not match, the process proceeds to step A4, where card invalidation processing is executed. In this case, card invalidation processing is performed by the data memory controller 18 after receiving a command from the main controller 17.
Address designation and writing/reading of data to/from the data memory 21 by the data memory 21 are completely stopped. On the other hand, if they match, the process advances to step A5.
このステップA5では、上記ステップA1における比較
部25での比較結果が正規なプログラム起動要請に対応
したものであるので、これがメモリ消去スタート信号と
してメモリ消去回路28に取込まれる。すると、このメ
モリ消去回路28よりデータメモリ21に対してチップ
イレーズ命令が与えられ、これによりデータメモリ21
の内容は総て消去される。そして、データメモリ21の
内容消去が終了すると、メモリ消去終了信号がメインコ
ントローラ17に出力される。この状態で、ステップ八
6に進み、メインコントローラ17の指令によりテスト
プログラムROM16の内容が読出さ、れ、ターミナル
側にてカード内のシステムプログラムROM15のビッ
トパターンのチェック、あるいはデータメモリ21のア
クセスなどが可能となる。In this step A5, since the comparison result by the comparator 25 in step A1 corresponds to a normal program activation request, this is taken into the memory erasing circuit 28 as a memory erasing start signal. Then, this memory erase circuit 28 gives a chip erase command to the data memory 21, and as a result, the data memory 21
All contents will be deleted. Then, when erasing the contents of the data memory 21 is completed, a memory erasure completion signal is output to the main controller 17. In this state, the process advances to step 86, where the contents of the test program ROM 16 are read out in response to a command from the main controller 17, and the terminal side checks the bit pattern of the system program ROM 15 in the card or accesses the data memory 21. becomes possible.
ところが、いま仮に、ステップA1において不正なプロ
グラム起動要請でターミナルからの311信号の組合わ
せが正規のものと異なると、一致回路251.252の
いずれかに一致しないものが生じる。これにより論理回
路253の出力は「0」のままで、不正起動要請と判断
され、ステップA4に進む。したがって、上述と同様に
してデータメモリコントローラ18によるデータメモリ
21に対するアドレス指定およびデータの書込み/El
!出しが一切停止されるようになり、カードは無効処理
される。However, if the combination of 311 signals from the terminal is different from the normal one due to an illegal program activation request in step A1, a mismatch will occur in either of the matching circuits 251 and 252. As a result, the output of the logic circuit 253 remains at "0", and it is determined that an unauthorized activation request has been made, and the process proceeds to step A4. Therefore, in the same manner as described above, the data memory controller 18 performs addressing and data writing/El to the data memory 21.
! All withdrawals will be stopped and the card will be invalidated.
したがって、このようにすれば、ICカード内部のテス
トプログラムの起動要請が与えられると、テストモード
に入る前にデータメモリの内容を総て消去するようにで
きるので、テストモードになってカードの総ての秘密性
が保たれなくなってもデータメモリの内容が読出される
おそれが全くなくなる。このことは、仮にICカード内
部のテストプログラムが不正に起動されたとしてもIC
カードの安全性を確実に確保することができ、また秘密
性の高い情報を外部に取出そうとする試みを未然に阻止
できることからカードの偽造行為を始めとしてシステム
全体の技術的分析行為などを確実に防止でき、カードシ
ステムの安全性を飛躍的に向上させることができる。Therefore, in this way, when a request to start the test program inside the IC card is given, all the contents of the data memory can be erased before entering the test mode. Even if the confidentiality of the data is no longer maintained, there is no possibility that the contents of the data memory will be read out. This means that even if the test program inside the IC card is started illegally, the IC card
The security of the card can be reliably ensured, and attempts to extract highly confidential information to the outside can be prevented, so it is possible to prevent counterfeiting of cards and technical analysis of the entire system. This can dramatically improve the security of the card system.
なお、この発明は上記実施例にのみ限定されず、要旨を
変更しない範囲で適宜変形して実施できる。It should be noted that the present invention is not limited to the above-mentioned embodiments, but can be implemented with appropriate modifications without changing the gist.
上述のレベルマトリクス26の記憶部263.264で
のレベル情報の組合わせは一例であり、これ以外の組合
わせのものを用いることもできる。The above-described combination of level information in the storage units 263 and 264 of the level matrix 26 is an example, and other combinations may also be used.
こうすれば、同じIC回路を使用したカードでも異なる
IC回路を使用したものとして用いることができる。ま
た、上述では一貫して3値付号を使用したが、4値以上
の信号でもよく、アナログ的な信号を用いてもよく、さ
らには用いる端子の種類数に限定されるものでもない。In this way, even cards using the same IC circuit can be used as cards using different IC circuits. Furthermore, although three-valued numbers have been used throughout in the above description, signals of four or more values may be used, analog signals may be used, and there is no limitation on the number of types of terminals used.
[発明の効果コ
この発明によればICカード内のテストプログラム実行
の際データメモリの内容を前もって消去し、メモリ内容
が不正に読出されるおそれを除去するようにしたのでカ
ードの偽造行為などを確実に防止できるなどカードの安
全性を確実に確保することができる。[Effects of the Invention] According to this invention, the contents of the data memory in the IC card are erased in advance when the test program is executed, thereby eliminating the possibility that the memory contents may be read out illegally, thereby preventing card forgery, etc. It is possible to reliably ensure the safety of the card, such as by being able to reliably prevent this.
第1図はこの発明の一実施例の回路構成を示すブロック
図、第2図は同実施例に用いられるチェック回路を示す
回路構成図、第3図は同実施例に使用される3Wi信号
を説明するためのタイムチャート、第4図は同実施例の
動作を説明するためのフローチャートである。
15・・・システムプログラムROM、16・・・テス
トプログラムROM、17・・・メインコントローラ、
18・・・データメモリコントローラ1.21・・・デ
ータメモリ、22・・・チェック回路、23.24・・
・レベル検出器、25・・・比較部、251.252・
・・一致回路、253・・・論理回路、26・・・レベ
ルマトリクス、261・・・カウンタ、262・・・マ
トリクス部、263.264・・・記憶部、28・・・
メモリ消去回路。FIG. 1 is a block diagram showing the circuit configuration of an embodiment of the present invention, FIG. 2 is a circuit diagram showing a check circuit used in the embodiment, and FIG. 3 is a 3Wi signal diagram used in the embodiment. A time chart is provided for explanation, and FIG. 4 is a flowchart for explanation of the operation of the same embodiment. 15... System program ROM, 16... Test program ROM, 17... Main controller,
18...Data memory controller 1.21...Data memory, 22...Check circuit, 23.24...
・Level detector, 25... Comparison section, 251.252・
... Matching circuit, 253 ... Logic circuit, 26 ... Level matrix, 261 ... Counter, 262 ... Matrix section, 263.264 ... Storage section, 28 ...
Memory erase circuit.
Claims (1)
外部から与えられるテストプログラム起動指令により実
行させICカードのテストを行なうようにしたものにお
いて、上記カード外部から与えられるテストプログラム
起動指令を検出し該起動指令が正規な指令か判定する判
定手段と、この手段による正規なテストプログラム起動
指令との判定結果によりICカードの秘密情報を記憶す
るデータメモリの内容を消去するメモリデータ消去手段
とを有し、このメモリデータ消去手段によるデータメモ
リの内容消去の後上記テストプログラムを実行させるよ
うにしたことを特徴とするICカードのテスト方式。In an IC card test program in which a test program stored in an IC card is executed by a test program start command given from outside the card, the test program start command given from the outside of the card is detected and the start command is executed. and a memory data erasing means for erasing the contents of the data memory that stores the secret information of the IC card based on the result of the judgment made by the means as to whether the command is a legitimate test program starting command. A test method for an IC card, characterized in that the test program is executed after the contents of the data memory are erased by a memory data eraser.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61054455A JPS62211756A (en) | 1986-03-12 | 1986-03-12 | IC card test method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61054455A JPS62211756A (en) | 1986-03-12 | 1986-03-12 | IC card test method |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS62211756A true JPS62211756A (en) | 1987-09-17 |
Family
ID=12971154
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP61054455A Pending JPS62211756A (en) | 1986-03-12 | 1986-03-12 | IC card test method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS62211756A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5039850A (en) * | 1990-06-15 | 1991-08-13 | Mitsubishi Denki Kabushiki Kaisha | IC card |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5638650A (en) * | 1979-04-25 | 1981-04-13 | Cii | Data delete device |
JPS5715498B2 (en) * | 1973-06-29 | 1982-03-31 | ||
JPS5823398A (en) * | 1981-08-04 | 1983-02-12 | Fujitsu Ltd | Microcomputer with memory content protective |
JPS603083A (en) * | 1983-06-20 | 1985-01-09 | 三菱電機株式会社 | Fare receiving system |
JPS60171553A (en) * | 1984-02-17 | 1985-09-05 | Hitachi Ltd | Secret protection system |
-
1986
- 1986-03-12 JP JP61054455A patent/JPS62211756A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5715498B2 (en) * | 1973-06-29 | 1982-03-31 | ||
JPS5638650A (en) * | 1979-04-25 | 1981-04-13 | Cii | Data delete device |
JPS5823398A (en) * | 1981-08-04 | 1983-02-12 | Fujitsu Ltd | Microcomputer with memory content protective |
JPS603083A (en) * | 1983-06-20 | 1985-01-09 | 三菱電機株式会社 | Fare receiving system |
JPS60171553A (en) * | 1984-02-17 | 1985-09-05 | Hitachi Ltd | Secret protection system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5039850A (en) * | 1990-06-15 | 1991-08-13 | Mitsubishi Denki Kabushiki Kaisha | IC card |
FR2663441A1 (en) * | 1990-06-15 | 1991-12-20 | Mitsubishi Electric Corp | INTEGRATED CIRCUIT CARD. |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4816656A (en) | IC card system | |
US5379344A (en) | Smart card validation device and method | |
EP0973125B1 (en) | Method for managing security for card-type storage medium, and a card-type storage medium and a transaction apparatus therefor | |
US6094724A (en) | Secure memory having anti-wire tapping | |
US4910774A (en) | Method and system for suthenticating electronic memory cards | |
USRE47621E1 (en) | Secure transaction microcontroller with secure boot loader | |
US4839506A (en) | IC card identification system including pin-check time means | |
EP0707270B1 (en) | Method and apparatus for validating system operation | |
US6957338B1 (en) | Individual authentication system performing authentication in multiple steps | |
US8675868B1 (en) | Encrypting an address-dependent value along with code to prevent execution or use of moved code | |
US20020017558A1 (en) | Smart card technology | |
JPS6265168A (en) | Authentication method in IC card system | |
JPS6049942B2 (en) | data processing equipment | |
JPS6256556B2 (en) | ||
JPH0434788B2 (en) | ||
JPS62211756A (en) | IC card test method | |
US20030140236A1 (en) | Method and arrangement for preventing unauthorized execution of computer programs and a corresponding software product and a corresponding computer-legible storage medium | |
JP2712148B2 (en) | Test program starting method and test program starting device | |
JP2712149B2 (en) | Test program starting method and test program starting device | |
JP3231466B2 (en) | Information recording medium storing keys | |
AU651584B2 (en) | Smart card validation device and method | |
JP3652409B2 (en) | Portable information recording medium | |
JPS63259785A (en) | IC card authentication method | |
JPH0530203Y2 (en) | ||
JPH0916740A (en) | Portable information recording medium and method for writings/reading information to/from the same |