[go: up one dir, main page]

JPH11282992A - Ic card - Google Patents

Ic card

Info

Publication number
JPH11282992A
JPH11282992A JP10085642A JP8564298A JPH11282992A JP H11282992 A JPH11282992 A JP H11282992A JP 10085642 A JP10085642 A JP 10085642A JP 8564298 A JP8564298 A JP 8564298A JP H11282992 A JPH11282992 A JP H11282992A
Authority
JP
Japan
Prior art keywords
card
nonvolatile memory
command
data
inspection
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
JP10085642A
Other languages
Japanese (ja)
Inventor
Yasuhiro Ito
伊藤泰宏
Mayumi Inada
稲田真弓
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon 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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP10085642A priority Critical patent/JPH11282992A/en
Publication of JPH11282992A publication Critical patent/JPH11282992A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide the rewrite function of an inspection purpose and the rewrite inhibition function of a falsification prevention purpose. SOLUTION: In this IC card provided with an EEPROM for interpreting an instruction from a connection device, executing a processing and returning a processing result to the connection device as a response, data for indicating whether it is during a manufacture inspection or the manufacture inspection is completed are recorded in the specified area of a nonvolatile memory surely accessed between activation and inactivation. Then the permission and non- permission of a write processing to the nonvolatile memory are switched corresponding to an analyzed result obtd. at the access to the specified area.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は書き換え禁止機能を
持たせたICカードに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an IC card having a rewrite inhibiting function.

【0002】[0002]

【従来の技術】近年、プリペイドカード等さまざまな形
でICCが使用され、CPUを内蔵して利便性の観点か
らいろいろな機能が付加されて汎用性を持たせたものが
開発されている。このような従来のICCについて概略
説明する。図7において、CPUを内蔵したICC1
は、接続装置2(インターフェース・デバイス:IF
D)からの処理要求であるコマンド(命令)を受け付け
るコマンド入力部11、受け付けたコマンドを解析する
コマンド解析部12、解析したコマンドに基づき要求さ
れている処理を実行する要求処理実行部13、処理の実
行過程においてアクセスされるメモリ(不揮発性メモリ
を含む)14、処理結果をレスポンスとして接続装置2
へ返すレスポンス出力部とからなっている。
2. Description of the Related Art In recent years, ICCs have been used in various forms, such as prepaid cards, and those having a built-in CPU and various functions added from the viewpoint of convenience have been developed. Such a conventional ICC will be briefly described. In FIG. 7, an ICC1 having a built-in CPU
Is the connection device 2 (interface device: IF
D) a command input unit 11 for receiving a command (instruction) as a processing request from the command, a command analysis unit 12 for analyzing the received command, a request processing execution unit 13 for executing a requested process based on the analyzed command, a process (Including a non-volatile memory) 14 accessed in the execution process of the connection device 2 and the processing result as a response
And a response output section that returns the response.

【0003】接続装置2とICC1の間で交換される情
報(コマンド、レスポンス)の最小単位はキャラクタで
あり、図8に示すように、先頭からスタートビット(S
T)、8個のデータビット(a〜h)・パリティビット
(i)の順に送信され、直後にキャラクタ保護時間(G
T)が1ビット以上続く形になっている。
The minimum unit of information (command, response) exchanged between the connection device 2 and the ICC 1 is a character. As shown in FIG. 8, a start bit (S
T), eight data bits (a to h) and parity bits (i) in this order, and immediately after the character protection time (G
T) continues for one or more bits.

【0004】このようなキャラクタ複数個から、図9に
示すような情報ブロックが構成される。情報ブロック
は、先頭フィールド、情報フィールド(INF)、最終
フィールドからなり、先頭フィールドは、ブロックの送
信元のアドレス、あて先アドレス及びVPP端子の状態
制御を示すノードアドレス(NAD)1バイト、伝送制
御情報を含むプロトコル制御バイト(PCB)1バイ
ト、および情報フィールド長(LEN)1バイトからな
り、情報フィールドは、最大254バイトまで挿入可能
であり、ブロックの最後は必ず誤り検出符合(EDC)
1または2バイトとなる。なお、各1バイトには、実際
にはSTビット、パリティ検査ビット、GTが付加され
ている。
An information block as shown in FIG. 9 is composed of a plurality of such characters. The information block includes a first field, an information field (INF), and a last field. The first field has a source address of the block, a destination address, and one byte of a node address (NAD) indicating the state control of the VPP terminal, transmission control information. Consists of one byte of a protocol control byte (PCB) including one byte and one byte of an information field length (LEN). The information field can be inserted up to a maximum of 254 bytes, and the end of a block is always an error detection code (EDC).
One or two bytes. Note that each byte is actually added with an ST bit, a parity check bit, and a GT.

【0005】接続装置2からICC1に送られるコマン
ドは図9に示すブロックの情報フィールド内に収めら
れ、図10に示すように、見出し部と本体部から構成さ
れる。見出し部は、ISOのコマンドか否かを示すクラ
スバイト(CLA)、命令コード(INS)、アクセス
するファイルを指示するパラメータP1、P2からな
り、本体部はコマンドデータフィールドバイト長(L
c)、コマンドデータフィールド(cデータ:可変
長)、レスポンスデータフィールド長(Le)からなっ
ている。
The command sent from the connection device 2 to the ICC 1 is contained in the information field of the block shown in FIG. 9, and is composed of a heading part and a main body as shown in FIG. The heading part includes a class byte (CLA) indicating whether or not the command is an ISO command, an instruction code (INS), and parameters P1 and P2 indicating a file to be accessed. The main body part has a command data field byte length (L).
c), a command data field (c data: variable length), and a response data field length (Le).

【0006】また、ICC1から接続装置2へ送られる
レスポンスは、図11に示すように、本体部、後続部か
らなり、先頭からレスポンスデータフィールド(rデー
タ)、処理結果を示すステータスデータバイト1(SW
1)、ステータスデータバイト2(SW2)の順に送ら
れる。
As shown in FIG. 11, a response sent from the ICC 1 to the connection device 2 is composed of a main unit and a subsequent unit, a response data field (r data) from the beginning, and a status data byte 1 (processing data) indicating a processing result. SW
1) and status data byte 2 (SW2).

【0007】[0007]

【発明が解決しようとする課題】ICカードに内蔵され
る不揮発性メモリはIC製造検査段階では書き込み機能
が正常に動作するか否かを確認するために書き換え機能
を有する必要がある。しかし、ICチップをカードに実
装し、ICカードとして発行した後の実使用環境では、
カードID等の更新されてはならない情報が存在する。
不揮発性メモリへの書き込みは、少なくとも数バイトの
一括した単位でしか書けないようになっているが、その
ための書き換え禁止機能の実現方法としては、容量の大
きな不揮発性メモリの場合、書き換え単位に対応した書
き換え禁止情報を専用に格納する部分を設置している。
これらの書き換え禁止情報は製造検査段階までは禁止、
許可の双方向に設定可能であるが、製造検査完了後に物
理的加工によって、例えば高電圧を印加することによ
り、書き込み線を切断し、禁止方向にしか設定できない
ように限定している。
A nonvolatile memory built in an IC card needs to have a rewriting function in order to confirm whether or not a writing function normally operates in an IC manufacturing inspection stage. However, in an actual usage environment after mounting an IC chip on a card and issuing it as an IC card,
There is information that must not be updated, such as a card ID.
Writing to non-volatile memory can be done only in batches of at least several bytes, but the method of realizing the rewrite inhibition function for that A part for storing the rewrite prohibition information exclusively is provided.
This rewrite prohibition information is prohibited until the manufacturing inspection stage,
Although it is possible to set the permission in both directions, the writing line is cut off by physical processing, for example, by applying a high voltage after the completion of the manufacturing inspection, so that it can be set only in the prohibition direction.

【0008】しかし、このような方式では、 製造検査完了後に物理的加工を必要とする。 不揮発性メモリの容量が小さく、かつ書き換え単位が
細かい場合、書き換え禁止情報を専用に格納する部分の
チップ面積が相対的に大きくなる。これは、例えば図1
2(a)に示すように書き込み単位が大きい場合の書き
換え禁止情報であるカードIDの格納領域(図の斜線部
分)の占める部分のチップ面積は相対的に小さいが、図
12(b)に示すように、書き込み単位が小さくなった
時、この専用のカードID格納領域が占める部分のチッ
プ面積が相対的に大きくなってしまい、このため、製造
コスト上の問題が発生する。
However, such a method requires physical processing after the completion of the manufacturing inspection. When the capacity of the non-volatile memory is small and the rewriting unit is small, the chip area of the portion for exclusively storing the rewrite prohibition information becomes relatively large. This is, for example, FIG.
As shown in FIG. 12A, the chip area occupied by the storage area of the card ID, which is the rewrite prohibition information when the writing unit is large (shaded area in the figure), is relatively small, but is shown in FIG. As described above, when the writing unit is reduced, the chip area of the portion occupied by the dedicated card ID storage area becomes relatively large, which causes a problem in manufacturing cost.

【0009】本発明は上記課題を解決するためのもの
で、検査目的の書き換え機能と偽造防止目的の書き換え
禁止機能とを持たせられるようにすることを目的とす
る。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and has as its object to provide a rewriting function for inspection purposes and a rewriting inhibition function for forgery prevention purposes.

【0010】[0010]

【課題を解決するための手段】本発明は、接続装置から
の命令を解釈し、処理を実行して処理結果をレスポンス
として接続装置に返す不揮発性メモリを有するICカー
ドにおいて、活性化から非活性化の間に必ずアクセスさ
れる不揮発性メモリの特定領域に製造検査中か製造検査
完了かを示すデータを記録し、前記特定領域へのアクセ
ス時の解析結果に応じて不揮発性メモリへの書き込み処
理の許可、不許可を切り換えるようにしたことを特徴と
する。
SUMMARY OF THE INVENTION The present invention relates to an IC card having a nonvolatile memory that interprets a command from a connection device, executes a process, and returns a processing result as a response to the connection device. In a specific area of the nonvolatile memory which is always accessed during the initialization, data indicating whether the manufacturing inspection is being performed or the manufacturing inspection is completed is recorded, and a write process to the nonvolatile memory is performed according to an analysis result at the time of accessing the specific area. Is switched between permission and non-permission.

【0011】[0011]

【発明の実施の形態】以下本発明の実施の形態について
説明する。以下で対象とするICカードは図7〜図12
で説明したと同様な構成を有する不揮発性メモリを備え
たICカードである。一般に、使い捨てタイプのプリペ
イド方式のICカードにおいて、使用済みICカードの
カードID(各々のカードに固有な情報)を書き換え、
あたかも新規なICカードであるかのような偽造が行わ
れるのを防止する必要がある。そのため、ICカードに
内蔵される不揮発性メモリには検査目的の書き換え機能
と偽造防止目的の書き換え禁止機能が要求されている。
これら2つの目的を達成するために、本発明は活性化の
応答としてテストデータを出力する場合は書き込み禁止
条件を解除し、正しい初期応答データを出力する場合
は、書き込み禁止条件を保持するようにしたものであ
る。
Embodiments of the present invention will be described below. The target IC cards are shown in FIGS.
This is an IC card provided with a nonvolatile memory having a configuration similar to that described above. Generally, in a disposable type prepaid IC card, the card ID (information unique to each card) of the used IC card is rewritten,
It is necessary to prevent counterfeiting as if it were a new IC card. Therefore, a nonvolatile memory incorporated in an IC card is required to have a rewriting function for inspection and a rewriting inhibition function for preventing forgery.
In order to achieve these two objects, the present invention releases the write inhibit condition when outputting test data as an activation response, and retains the write inhibit condition when outputting correct initial response data. It was done.

【0012】図1はICカードの活性化を説明する図で
ある。ICカードの活性化は接続装置2で開始される。
接続装置2からは電源電圧の供給、クロック信号の供給
が行われると共に、リセット信号が与えられて、これが
解除されるとICカード1は接続装置2に対して初期応
答動作を実行する。初期応答動作では情報交換のパラメ
ータであるATR信号を送出する。ATR信号は10数
バイトからなるデータであるが、本発明ではその先頭8
ビットのTSキャラクターをICカード内で監視して期
待値(例えばh’3B(16進表示の3B))と比較
し、一致しない場合は発行済フラグをクリアして不揮発
性メモリへの書き込み処理を許可し、一致した場合は発
行済フラグをクリアして不揮発性メモリへの書き込み処
理を不許可とするものである。
FIG. 1 is a diagram for explaining activation of an IC card. Activation of the IC card is started by the connection device 2.
The power supply voltage and the clock signal are supplied from the connection device 2 and a reset signal is supplied. When the reset signal is released, the IC card 1 performs an initial response operation to the connection device 2. In the initial response operation, an ATR signal which is a parameter for information exchange is transmitted. The ATR signal is data consisting of several tens of bytes.
The bit TS character is monitored in the IC card and compared with an expected value (for example, h'3B (hexadecimal 3B)). If not, the issued flag is cleared and the write processing to the nonvolatile memory is performed. Permission is made, and if they match, the issued flag is cleared to prohibit write processing to the nonvolatile memory.

【0013】図2は不揮発性メモリのTSキャラクター
用エリア、カードID用エリアを説明する図で、活性化
から非活性化の間に必ずアクセスされるTSキャラクタ
ー用エリアにh’3Bが設定される。本発明では、製造
検査中の非活性化ではTSキャラクター用エリアの内容
をh’3B以外の値にして検査し、製造検査完了後にT
Sキャラクター用エリアにh’3Bを書き込み、TSキ
ャラクター用エリアの読み出し結果に応じて製造検査中
か、製造検査完了かを判定し、製造検査中は故障検出の
ために何回でも不揮発性メモリへの書き込み処理を許可
し、製造検査完了後はカードID用エリアにカードID
を書き込む1回の処理しか許可しない。
FIG. 2 is a view for explaining the TS character area and the card ID area of the nonvolatile memory. H'3B is set in the TS character area which is always accessed between activation and deactivation. . According to the present invention, in the deactivation during the manufacturing inspection, the content of the TS character area is inspected with a value other than h'3B, and after the completion of the manufacturing inspection, T
Write h'3B to the S character area and determine whether the manufacturing inspection is in progress or completed according to the read result of the TS character area. During the manufacturing inspection, write to the nonvolatile memory any number of times to detect a failure. After the completion of the manufacturing inspection, the card ID area is
Is permitted only once.

【0014】次に、図3〜図6を参照して製造検査中、
製造検査完了時、カードID書き込み時、カードID不
正書き込み時の初期応答処理、認証処理、カード発行処
理について説明する。なお、図3は初期応答処理フロー
を示す図、図4は認証処理フローを示す図、図5はカー
ド発行処理フローを示す図、図6は不揮発性メモリの内
容を示す図である。
Next, during manufacturing inspection with reference to FIGS.
Initial response processing, authentication processing, and card issuance processing upon completion of manufacturing inspection, card ID writing, and illegal card ID writing will be described. 3 is a diagram illustrating an initial response process flow, FIG. 4 is a diagram illustrating an authentication process flow, FIG. 5 is a diagram illustrating a card issuing process flow, and FIG. 6 is a diagram illustrating the contents of a nonvolatile memory.

【0015】〔製造検査中における処理〕製造検査中に
おいては、図6(a)に示すように、活性化から非活性
化の間に必ずアクセスされる不揮発性メモリのTSキャ
ラクター用エリアにh’3B以外の任意の値が書き込ま
れており、またカードID用エリアにも任意の値が書き
込まれている。TSキャラクター用エリアに書き込まれ
ている値がh’3B以外なので発行済フラグは初期応答
処理でクリアされる。
[Processing During Manufacturing Inspection] During manufacturing inspection, as shown in FIG. 6A, h 'is added to the TS character area of the nonvolatile memory which is always accessed between activation and deactivation. An arbitrary value other than 3B is written, and an arbitrary value is also written in the card ID area. Since the value written in the TS character area is other than h'3B, the issued flag is cleared in the initial response process.

【0016】図3において、ICカードからの初期応答
は接続装置からのICCの活性化により始まり(ステッ
プS1)、初期設定(認証成功フラグクリア)(ステッ
プS2)、不揮発性メモリのATRデータ読み出し(ス
テップS3)が行われる。次いで、読み出されたATR
データがh’3Bに一致しているか否か判断する(ステ
ップS4)。製造の非活性化時ではTSキャラクター用
エリアにはh’3B以外の値が書き込まれているので両
者は一致せず、発行済フラグがクリアされ(ステップS
5)、ATRデータを送信する。こうして製造検査中は
発行済フラグは必ずクリアされることになる。
In FIG. 3, an initial response from the IC card starts upon activation of the ICC from the connection device (step S1), initialization (clearing of the authentication success flag) (step S2), and reading of ATR data from the nonvolatile memory (step S2). Step S3) is performed. Next, the read ATR
It is determined whether or not the data matches h'3B (step S4). At the time of deactivation of manufacturing, since a value other than h'3B is written in the TS character area, the two do not match, and the issued flag is cleared (step S).
5) Send ATR data. Thus, the issued flag is always cleared during the manufacturing inspection.

【0017】次いで、図4の認証処理に移行する。認証
コマンドが入力され、そのコマンドが解釈されて認証失
敗カウンタにオーバーフローが発生しているか否か判断
する(ステップS11,S12,S13)。認証失敗カ
ウンタは、例えば連続3回失敗した場合には認証コマン
ドを受付ないようにするためのカウンタである。最初の
製造検査においては、オーバーフローが発生していない
ため、発行済フラグがクリアされているか否か判断する
(ステップS14)。前述したように、製造検査中は発
行済フラグがクリアされているので、不揮発性メモリの
パスワード読み出しを行う(ステップS15)。このパ
スワードはカード製造者の有するパスワードを意味して
いる。認証コマンドのパスワードと不揮発性メモリのパ
スワードとが一致しているか否か判断し(ステップS1
6)、製造検査中であればこれらは一致するので認証成
功フラグをセットし(ステップS17)、正常コードを
設定し(ステップS18)、このことをレスポンスとし
て接続装置へ送信する(ステップS21)。
Next, the process proceeds to the authentication process of FIG. An authentication command is input, the command is interpreted, and it is determined whether an overflow has occurred in the authentication failure counter (steps S11, S12, S13). The authentication failure counter is a counter for preventing an authentication command from being accepted, for example, when three consecutive failures have occurred. In the first manufacturing inspection, since no overflow has occurred, it is determined whether or not the issued flag has been cleared (step S14). As described above, since the issued flag is cleared during the manufacturing inspection, the password is read from the nonvolatile memory (step S15). This password means the password of the card manufacturer. It is determined whether the password of the authentication command matches the password of the nonvolatile memory (step S1).
6) If they are during the manufacturing inspection, they match, so an authentication success flag is set (step S17), a normal code is set (step S18), and this is transmitted to the connection device as a response (step S21).

【0018】次いで、図5のカード発行処理に移行す
る。まずカード発行のための書き込みコマンドを入力
し、そのコマンドを解釈する(ステップS31,S3
2)。次いで、認証成功フラグがセットされているか否
か判断する(ステップS33)、図4の処理で認証成功
フラグがセットされているので、不揮発性メモリにデー
タを書き込む(ステップS34)。この処理はカードI
D用エリアに検査用の値を書き込むものである。次い
で、書き込みアドレスがカードID用のエリアが否か判
断し(ステップS35)、発行済フラグをセットし(ス
テップS36)、次いで正常終了コードを設定してレス
ポンスを送信する(ステップS37,S39)。
Next, the process proceeds to the card issuing process of FIG. First, a write command for issuing a card is input, and the command is interpreted (steps S31 and S3).
2). Next, it is determined whether or not the authentication success flag is set (step S33). Since the authentication success flag is set in the processing of FIG. 4, data is written to the nonvolatile memory (step S34). This process is performed on Card I
A value for inspection is written in the D area. Next, it is determined whether or not the write address has an area for the card ID (step S35), an issued flag is set (step S36), and then a normal end code is set and a response is transmitted (steps S37 and S39).

【0019】〔製造検査完了時の処理〕製造検査完了時
における初期応答処理、認証処理は製造検査中の場合と
同じである。カード発行処理(図5)において、ステッ
プ34で不揮発性メモリに書き込むデータをh’3Bと
する。このとき書き込みアドレスはTSキャラクター用
エリアにあるので、ステップ35の判断では書き込みア
ドレスがカードIDと一致せず、正常終了コードが設定
され、レスポンスが送信される。従って、この状態では
書き込みアドレスがカードIDではなかったため発行済
フラグはセットされていない。したがって、図6(b)
に示すように、EEPROMのTSキャラクター用エリ
アはh’3Bであり、一方、カードID用エリアは任意
の値のままである。
[Processing upon Completion of Manufacturing Inspection] Initial response processing and authentication processing upon completion of manufacturing inspection are the same as those during manufacturing inspection. In the card issuance processing (FIG. 5), the data to be written to the nonvolatile memory in step 34 is h'3B. At this time, since the write address is in the TS character area, the write address does not match the card ID in the determination in step 35, a normal end code is set, and a response is transmitted. Therefore, in this state, since the write address is not the card ID, the issued flag is not set. Therefore, FIG.
As shown in the figure, the TS character area of the EEPROM is h'3B, while the card ID area remains at an arbitrary value.

【0020】〔カードID書き込み時の処理〕図3の初
期応答処理フローにおいて、不揮発性メモリのTSキャ
ラクター用エリアがh’3Bになっているため、ステッ
プS4におけるATRデータがh’3Bと一致し、発行
済フラグはクリアされずにATRデータが送信される
(ステップS6)。次いで、認証処理(図4)に移行す
るが、認証処理は製造検査完了時と同じである。次い
で、カード発行処理(図5)に移行し、ステップ34に
おける不揮発性メモリにデータを書き込む際の書き込み
データがカードIDであり、ステップ35における書き
込みアドレスがカードID用エリアになるので、ステッ
プ36において、発行済フラグがセットされる。従っ
て、図6(c)に示すように、TSキャラクター用エリ
アはh’3B、カードID用エリアはカードID、発行
済フラグは1となる。
[Process at the time of writing card ID] In the initial response process flow of FIG. 3, since the TS character area of the nonvolatile memory is h'3B, the ATR data in step S4 matches h'3B. The ATR data is transmitted without clearing the issued flag (step S6). Next, the processing shifts to the authentication processing (FIG. 4). Next, the process proceeds to a card issuing process (FIG. 5). Since the write data when writing data to the nonvolatile memory in step 34 is the card ID and the write address in step 35 is the card ID area, the process proceeds to step 36. , The issued flag is set. Accordingly, as shown in FIG. 6C, the TS character area is h'3B, the card ID area is a card ID, and the issued flag is 1.

【0021】〔カード使用中のカードID不正書き換え
時〕次に、カードの使用中に発行コマンドで不正にカー
ドIDを書き換えようと試みた場合について説明する。
図3の初期応答処理において、ステップS4のATRデ
ータがh’3Bに一致しているため、発行済フラグはク
リアされず、ATRデータが送信される。次に認証処理
(図4)に移行したとき、ステップ14で発行済フラグ
がクリアされているか判断したとき、発行済フラグはク
リアされていないため、ステップ20のエラーコード設
定に移行し、それがレスポンスとして送信される。
[At the time of illegally rewriting the card ID while using the card] Next, a case where an attempt is made to illegally rewrite the card ID with an issue command while the card is being used will be described.
In the initial response process of FIG. 3, since the ATR data in step S4 matches h'3B, the issued flag is not cleared, and the ATR data is transmitted. Next, when the process proceeds to the authentication process (FIG. 4), when it is determined in step 14 whether the issued flag has been cleared, since the issued flag has not been cleared, the process proceeds to the error code setting in step 20, and Sent as a response.

【0022】次いで、発行処理(図5)に移った時、書
き換えコマンドを入力すると、ステップ33における認
証成功フラグがセットされているか否かの判断におい
て、認証成功フラグはセットされていないため、エラー
コード設定ステップS38に移行し、それがレスポンス
として送信される。その結果、カードIDの書き換えは
不可能であり、図6(d)に示すように、カードIDは
更新されない。
Next, when the rewriting command is input when the process proceeds to the issuance process (FIG. 5), when the authentication success flag is set in step 33, an error occurs because the authentication success flag is not set. The process proceeds to the code setting step S38, which is transmitted as a response. As a result, rewriting of the card ID is impossible, and the card ID is not updated as shown in FIG.

【0023】このように製造検査段階ではTSキャラク
ターの対応するアドレスにh’3B以外の値を書き込ん
で検査するので、カードIDに任意の値を書き込み、発
行済フラグがセットされても初期応答動作でこのフラグ
はクリアされて、繰り返し検査が可能となる。また、製
造検査完了後のカードIDには書き込みを実行せずに、
TSキャラクターの対応するアドレスにh’3Bを書き
込み、このICチップをカードに実装し、この状態のI
Cカードを端末装置で活性化した場合、認証コマンド、
カードIDに対する発行コマンドの順に実行すると、発
行済フラグがセットされる。そして、実際の利用環境で
の初期応答動作では、TSキャラクターがh’3Bなの
で、発行済フラグはセットされたままであり、認証コマ
ンドが実行できない。これにより、ATRやカードID
の書き換えの前提となる発行コマンドも実行することが
できない。
As described above, in the manufacturing inspection stage, a value other than h'3B is written to the corresponding address of the TS character for inspection. Therefore, an arbitrary value is written to the card ID, and the initial response operation is performed even if the issued flag is set. This flag is cleared, and the inspection can be repeated. Also, without writing to the card ID after the completion of the manufacturing inspection,
Write h'3B to the corresponding address of the TS character, mount this IC chip on the card,
When the C card is activated by the terminal device, an authentication command,
When the command is issued in the order of the card ID, the issued flag is set. Then, in the initial response operation in the actual use environment, since the TS character is h'3B, the issued flag is still set and the authentication command cannot be executed. With this, ATR and card ID
Also, the issue command which is a prerequisite for rewriting the data cannot be executed.

【0024】[0024]

【発明の効果】以上のように本発明によれば、活性化の
応答してテストデータを出力する場合は書き込み禁止条
件を解除し、正しい初期応答データを出力する場合、書
き込み禁止条件を保持するようにしたので、製造検査中
は故障検出のために何回でも不揮発性メモリの書き込み
処理が可能であり、製造検査完了後はカードIDの書き
込み処理のみ実行でき、運用中での書き換えを防止する
ことができる。また、製造検査中か製造検査完了かを検
知するデータを複数ビットにコード化したため、最初の
製造検査で偶発的に間違って製造完了と判定される可能
性を軽減することができる。
As described above, according to the present invention, when test data is output in response to activation, the write inhibit condition is released, and when correct initial response data is output, the write inhibit condition is maintained. Thus, during the manufacturing inspection, the writing process of the non-volatile memory can be performed any number of times for failure detection, and after the completion of the manufacturing inspection, only the writing process of the card ID can be executed, thereby preventing rewriting during operation. be able to. In addition, since the data for detecting whether the manufacturing inspection is being performed or the manufacturing inspection is completed is coded into a plurality of bits, it is possible to reduce a possibility that the first manufacturing inspection may accidentally determine that the manufacturing is completed by mistake.

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

【図1】 ICカードの活性化を説明する図である。FIG. 1 is a diagram illustrating activation of an IC card.

【図2】 不揮発性メモリのTSキャラクター用エリ
ア、カードID用エリアを説明する図である。
FIG. 2 is a diagram illustrating a TS character area and a card ID area of a nonvolatile memory.

【図3】 初期応答処理を説明する図である。FIG. 3 is a diagram illustrating an initial response process.

【図4】 認証処理を説明する図である。FIG. 4 is a diagram illustrating an authentication process.

【図5】 カード発行処理を説明する図である。FIG. 5 is a diagram illustrating a card issuing process.

【図6】 不揮発性メモリの内容を示す図である。FIG. 6 is a diagram showing contents of a nonvolatile memory.

【図7】 従来のICCを説明する概略図である。FIG. 7 is a schematic diagram illustrating a conventional ICC.

【図8】 キャラクタを説明する図である。FIG. 8 is a diagram illustrating a character.

【図9】 ブロックを説明する図である。FIG. 9 is a diagram illustrating blocks.

【図10】 コマンドを説明する図である。FIG. 10 is a diagram illustrating a command.

【図11】 レスポンスを説明する図である。FIG. 11 is a diagram illustrating a response.

【図12】 レスポンスを説明する図である。FIG. 12 is a diagram illustrating a response.

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

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 接続装置からの命令を解釈し、処理を実
行して処理結果をレスポンスとして接続装置に返す不揮
発性メモリを有するICカードにおいて、活性化から非
活性化の間に必ずアクセスされる不揮発性メモリの特定
領域に製造検査中か製造検査完了かを示すデータを記録
し、前記特定領域へのアクセス時の解析結果に応じて不
揮発性メモリへの書き込み処理の許可、不許可を切り換
えるようにしたことを特徴とするICカード。
1. An IC card having a nonvolatile memory that interprets a command from a connection device, executes a process, and returns a processing result to the connection device as a response, is always accessed between activation and deactivation. Data indicating whether the manufacturing inspection is being performed or the manufacturing inspection is completed is recorded in a specific area of the nonvolatile memory, and permission / prohibition of a write process to the nonvolatile memory is switched according to an analysis result at the time of accessing the specific area. An IC card characterized in that:
JP10085642A 1998-03-31 1998-03-31 Ic card Pending JPH11282992A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10085642A JPH11282992A (en) 1998-03-31 1998-03-31 Ic card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10085642A JPH11282992A (en) 1998-03-31 1998-03-31 Ic card

Publications (1)

Publication Number Publication Date
JPH11282992A true JPH11282992A (en) 1999-10-15

Family

ID=13864489

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10085642A Pending JPH11282992A (en) 1998-03-31 1998-03-31 Ic card

Country Status (1)

Country Link
JP (1) JPH11282992A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007206765A (en) * 2006-01-31 2007-08-16 Dainippon Printing Co Ltd Method of issuing ic card, ic card issuing system, and ic card
JP2010287005A (en) * 2009-06-11 2010-12-24 Sony Corp Card management device and card management system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007206765A (en) * 2006-01-31 2007-08-16 Dainippon Printing Co Ltd Method of issuing ic card, ic card issuing system, and ic card
JP2010287005A (en) * 2009-06-11 2010-12-24 Sony Corp Card management device and card management system

Similar Documents

Publication Publication Date Title
KR100575509B1 (en) Memory card
JP3396043B2 (en) Micro circuit
JP2682700B2 (en) IC card
US5826007A (en) Memory data protection circuit
JPH0719231B2 (en) Integrated circuit with improved access security device
JP2001524723A (en) Protected memory with eavesdropping elimination
KR20030043691A (en) Detecting partially erased units in flash devices
PL173398B1 (en) Method of writing data in non-volatile memory
US5039850A (en) IC card
US5442165A (en) Secure IC card system with reusable prototype IC card
JP2002108714A (en) Memory device and access limiting method
US5812446A (en) Method and apparatus for the protection of non-volatile memory zones
JP3125070B2 (en) IC card
KR20020025793A (en) Memory device and memory access control method
US20040186947A1 (en) Access control system for nonvolatile memory
EP1079340A2 (en) Integrated circuit card protected from unauthorized access
JP2008027070A (en) Portable electronic apparatus and control method of portable electronic apparatus
JPH11282992A (en) Ic card
JP3512252B2 (en) Information recording medium with built-in CPU
JPH11282991A (en) Ic card
JP2005234957A (en) Method and program for controlling data access for flash memory
JPH048838B2 (en)
KR100453781B1 (en) Microcomputer
JPH08287207A (en) Ic card
JPS62200441A (en) Ic card