JP2005100455A - Ic card - Google Patents

Ic card Download PDF

Info

Publication number
JP2005100455A
JP2005100455A JP2004336239A JP2004336239A JP2005100455A JP 2005100455 A JP2005100455 A JP 2005100455A JP 2004336239 A JP2004336239 A JP 2004336239A JP 2004336239 A JP2004336239 A JP 2004336239A JP 2005100455 A JP2005100455 A JP 2005100455A
Authority
JP
Japan
Prior art keywords
password
read
command
write
area
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.)
Granted
Application number
JP2004336239A
Other languages
Japanese (ja)
Other versions
JP3908246B2 (en
Inventor
Sozo Fujioka
宗三 藤岡
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.)
Renesas Technology Corp
Renesas Design Corp
Original Assignee
Renesas Technology Corp
Renesas Design Corp
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 Renesas Technology Corp, Renesas Design Corp filed Critical Renesas Technology Corp
Priority to JP2004336239A priority Critical patent/JP3908246B2/en
Publication of JP2005100455A publication Critical patent/JP2005100455A/en
Application granted granted Critical
Publication of JP3908246B2 publication Critical patent/JP3908246B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Credit Cards Or The Like (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To supply an IC card improved in use efficiency of a memory. <P>SOLUTION: A first region for validating a write password and a second region for validating a read password are set in a user area of the IC card. When a write command to the first region is transmitted from a read/write device along with a password, it is checked against the write password; and when a read command to the second region is transmitted, it is checked against the read password. As a result of the checking, when the passwords coincides with each other, the respective commands are executed. A read password limit address and a write password limit address showing upper limit addresses for validating the read password and the write password are set; and the read password limit address and the write password limit address are made changeable. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

この発明はデータの送受信を電波等の搬送波を用いて行う非接触式のICカードに関するものである。   The present invention relates to a non-contact type IC card that transmits and receives data using a carrier wave such as a radio wave.

例えば、列車の定期券に非接触式ICカードを用いて、改札口に備えられたリードライト装置との間でデータの転送をする事によって、その定期券が有効であるか否かをチェックするシステムが開発されつつある。   For example, by using a contactless IC card for a train commuter pass and transferring data to and from a read / write device at the ticket gate, it is checked whether the commuter pass is valid. A system is being developed.

図13はこのような従来の非接触式ICカードシステムにおけるICカードとリードライト装置との間の通信の様子を示すシーケンスチャートである。まず、リードライト装置はリードIDコマンドをICカードに送出する。ICカードはこのリードIDコマンドを受信するとICカード固有のIDコードをリードライト装置に送出する。リードライト装置は、カードに実行させるコマンドと送信対象のICカードのIDコードとパスワードとを実行コマンドとともに送出する。ICカードはリードライト装置から送られてきたIDコードとパスワードの照合を行い、これらがICカードに格納されているIDコードとパスワードと一致した場合にのみ、リードライト装置から指示されたコマンドを実行し、実行結果をリードライト装置に送出する。リードライト装置がさらにICカードにコマンドを実行させる場合には、対応の実行コマンドにICカードのIDコードとパスワードとを付加して送出し、ICカード側では再びIDコードとパスワードの照合を行い、一致した場合にこのコマンドが実行され実行結果がリードライト装置に送出される。以下、同様にして、リードライト装置からICカードに実行コマンドを送出する度に、IDコード、パスワードを送出しICカード側でこれらを照合してコマンドの実行が行われている。このため、例えば、1バイトのデータをICカードに書き込むためにも、IDコードとパスワードの送出のために十数バイト付加しなければならず、伝送の効率が悪い。特に、このようなICカードの場合には、リードライト装置からの電波を整流して電源を得ていることが多いため、特に効率の良いデータの伝送が望まれている。   FIG. 13 is a sequence chart showing a state of communication between the IC card and the read / write device in such a conventional non-contact type IC card system. First, the read / write device sends a read ID command to the IC card. When receiving the read ID command, the IC card sends an ID code unique to the IC card to the read / write device. The read / write device sends the command to be executed by the card, the ID code of the IC card to be transmitted, and the password together with the execution command. The IC card verifies the ID code and password sent from the read / write device, and executes the command instructed by the read / write device only when these match the ID code and password stored in the IC card. The execution result is sent to the read / write device. When the read / write device further causes the IC card to execute a command, it sends the corresponding execution command with the ID code and password of the IC card added, and the IC card again verifies the ID code and password, If they match, this command is executed and the execution result is sent to the read / write device. In the same manner, each time an execution command is sent from the read / write device to the IC card, an ID code and a password are sent out, and these are collated on the IC card side to execute the command. For this reason, for example, in order to write 1-byte data to the IC card, more than a dozen bytes must be added for sending the ID code and password, and the transmission efficiency is poor. In particular, in the case of such an IC card, a power source is often obtained by rectifying radio waves from the read / write device, so that particularly efficient data transmission is desired.

図14は従来のICカードのメモリマップを示す図である。同図に示すようにユーザエリアを各ブロックに分割し、ICカードのシステムエリアをアクセスするためのシステムエリアアクセスパスワードとは別にブロックごとのパスワードを持つものもある。さらに、パスワードやIDコードの照合結果を格納するフラグはコマンドを実行するたびにセットあるいはリセットされる。   FIG. 14 is a diagram showing a memory map of a conventional IC card. As shown in the figure, the user area is divided into blocks, and there is also a type having a password for each block separately from the system area access password for accessing the system area of the IC card. Further, the flag for storing the password and ID code verification result is set or reset each time the command is executed.

従来の非接触式ICカードは以上のように構成されているので、ICカードにコマンドを送出するたびにIDコード、パスワード等を送出しており、セキュリティを確保するとともにより伝送効率の高いデータ伝送を可能にする非接触式ICカードが望まれている。   Since the conventional non-contact type IC card is configured as described above, an ID code, a password, etc. are sent each time a command is sent to the IC card, ensuring data security and data transmission with higher transmission efficiency. There is a demand for a non-contact type IC card that enables the above.

この発明は上記のような問題点を解消するためになされたもので、セキュリティを確保するとともにより伝送効率の高いデータ伝送を可能にする非接触式ICカードを提供することを目的とする。   The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a non-contact type IC card that ensures security and enables data transmission with higher transmission efficiency.

この発明に係るICカードは、システムエリアにユーザエリア内の第1の領域にデータを書き込む場合に照合されるライトパスワード、ユーザエリア内の第2の領域にデータを読み出す場合に照合されるリードパスワード、前記システムエリアに対して書き込み、又は読み出しが行われる場合に照合されるシステムパスワードが格納されているメモリと、リードライト装置から第1の領域に対する書き込みコマンドがパスワードとともに送られてきた場合に、このパスワードとメモリに格納されているライトパスワードと照合を行い、これらのパスワードが一致したか否かを判断するライトパスワード照合手段と、リードライト装置から第2の領域に対する読み出しコマンドがパスワードとともに送られてきた場合に、このパスワードと前記メモリに格納されているリードパスワードとの照合を行い、これらのパスワードが一致したか否かを判断するリードパスワード照合手段と、リードライト装置からシステムエリアに対する読み出し又は書き込みコマンドがパスワードとともに送られてきた場合に、このパスワードと前記メモリに格納されているシステムパスワードとの照合を行い、これらのパスワードが一致したか否かを判断するシステムパスワード照合手段とライトパスワード照合手段、リードパスワード照合手段、システムパスワード照合手段の照合結果に基づいて、それぞれのパスワードが一致した場合にリードライト装置から送られてきたコマンドを実行するコマンド実行手段と、リードパスワードが有効となる上限のアドレスを示すリードパスワードリミットアドレスと、ライトパスワードが有効となる上限のアドレスを示すライトパスワードリミットアドレスとを具備し、リードパスワードリミットアドレス及びライトパスワードリミットアドレスを変更可能にしたものである。   The IC card according to the present invention includes a write password that is collated when data is written to the first area in the user area in the system area, and a read password that is collated when data is read to the second area in the user area. When a write command for the first area is sent from the read / write device together with a password, and a memory storing a system password to be verified when writing to or reading from the system area is performed, This password is compared with the write password stored in the memory, and a write password verification means for determining whether or not these passwords match, and a read command for the second area is sent together with the password from the read / write device. This password and the above The read password stored in the memory is compared with the read password verification means for determining whether these passwords match, and the read / write command for the system area is sent from the read / write device together with the password. In this case, the password is compared with the system password stored in the memory, and the system password verification means, the write password verification means, the read password verification means, and the system password for determining whether or not these passwords match. Based on the verification result of the verification unit, a command execution unit that executes a command sent from the read / write device when each password matches, and a read password limit address that indicates an upper limit address for which the read password is valid. Graphics and, provided with a write password limit address indicating the address of the upper limit write password is valid, but you can change the read password limit address and write password limit address.

この発明に係るICカードは、第1の領域にも含まれ、かつ第2の領域にも含まれる第3の領域をメモリに存在させたものである。   The IC card according to the present invention is such that a third area included in the first area and also included in the second area is present in the memory.

この発明に係るICカードは、ライトパスワード照合手段によるパスワードの照合結果を保持するライトパスワード照合結果保持手段と、リードパスワード照合手段によるパスワードの照合結果を保持するリードパスワード照合結果保持手段と、システムパスワード照合手段によるパスワードの照合結果を保持するシステムパスワード照合結果保持手段とを具備し、コマンド実行手段は、リードライト装置からパスワードとともにコマンドが送られてきた場合にはライトパスワード照合手段、リードパスワード照合手段、システムパスワード照合手段の照合結果に基づいて、それぞれのパスワードが一致した場合にリードライト装置から送られてきたコマンドを実行し、リードライト装置からパスワードなしにコマンドが送られてきた場合にはライトパスワード照合結果保持手段、リードパスワード照合結果保持手段、又はシステムパスワード照合結果保持手段に保持されている照合結果に基づいてコマンドを実行する構成としたものである。   An IC card according to the present invention includes a write password verification result holding unit that holds a password verification result by a write password verification unit, a read password verification result holding unit that holds a password verification result by a read password verification unit, and a system password System password verification result holding means for holding a password verification result by the verification means, and the command execution means, when a command is sent together with the password from the read / write device, write password verification means, read password verification means Based on the verification result of the system password verification unit, when the passwords match, the command sent from the read / write device is executed, and when the command is sent from the read / write device without the password Light password collation result holding means, in which a structure for performing a read password collation result holding means, or on the basis of the system password collation result holding means collation result held in the command.

この発明に係るICカードは、システムエリアはIDコードが格納されている領域を有し、ICカードはさらにリードライト装置からIDコードがコマンドとともに送られてきた場合に、このIDコードとメモリに格納されているIDコードとの照合を行い、これらのIDコードが一致したか否かを判断するIDコード照合手段と、IDコード照合手段の照合結果を保持するIDコード照合結果保持手段とを具備し、コマンド実行手段はリードライト装置からIDコードとともにコマンドが送られてきた場合にはIDコード照合手段の照合結果に基づいてコマンドを実行し、リードライト装置からIDコードなしにコマンドが送られてきた場合にはIDコード照合結果保持手段に保持されているIDコードの照合結果に基づいてコマンドを実行する構成としたものである。   In the IC card according to the present invention, the system area has an area in which an ID code is stored, and the IC card is further stored in the memory when the ID code is sent from the read / write device together with a command. ID code matching means for checking whether or not these ID codes match, and an ID code matching result holding means for holding the matching result of the ID code matching means. The command execution means executes the command based on the collation result of the ID code collating means when the command is sent together with the ID code from the read / write device, and the command is sent from the read / write device without the ID code. In this case, the command is executed based on the ID code matching result held in the ID code matching result holding means. It is obtained by a configuration in which.

この発明に係るICカードは、パスワード照合結果保持手段はリードライト装置からコマンド送られてきた際の通信に伝送エラーがなかった場合にのみパスワードの照合結果を保持する構成としたものである。   In the IC card according to the present invention, the password verification result holding means holds the password verification result only when there is no transmission error in communication when a command is sent from the read / write device.

この発明に係るICカードは、IDコード照合結果保持手段はリードライト装置からコマンド送られてきた際の通信に伝送エラーがなかった場合にのみIDコードの照合結果を保持する構成としたものである。   In the IC card according to the present invention, the ID code verification result holding means holds the ID code verification result only when there is no transmission error in communication when a command is sent from the read / write device. .

この発明によれば、メモリには、ライトパスワード、リードパスワード、システムパスワードが格納され、コマンド実行手段はライトパスワード照合手段、リードパスワード照合手段、システムパスワード照合手段の照合結果に基づいて、それぞれのパスワードが一致した場合に前記リードライト装置から送られてきたコマンドを実行するように構成したので、少ないパスワードでメモリを効率よく使用することができ、また、リミットアドレスを変更することにより、それぞれの領域の大きさを変更することができ、従来のようにブロックごとにパスワードを設ける場合に比べてメモリを効率よく使用することができる効果がある。   According to the present invention, the memory stores the write password, the read password, and the system password, and the command execution unit determines the password based on the verification results of the write password verification unit, the read password verification unit, and the system password verification unit. Is configured to execute the command sent from the read / write device when they match, the memory can be used efficiently with a small password, and each area can be changed by changing the limit address. As compared with the conventional case where a password is provided for each block, the memory can be used more efficiently.

この発明によれば、ライトパスワードの有効な領域にもリードパスワードが有効な領域にも含まれる領域がメモリに存在するように構成したので、ユーザエリアを、2つのパスワードで、セキュリティレベルの異なる3つの領域に分けて管理することができ、メモリをより有効に使用できる効果がある。   According to the present invention, since the memory includes an area that includes both the valid area of the write password and the valid area of the read password, the user area can be divided into two passwords with different security levels. It can be managed by dividing into two areas, and there is an effect that the memory can be used more effectively.

この発明によれば、リードライト装置からパスワードなしにコマンドが送られてきた場合にはライトパスワード照合結果保持、リードパスワード照合結果保持手段、又はシステムパスワード照合結果保持手段に保持されている照合結果に基づいてコマンドを実行するように構成したので、データの伝送効率を高くするとともによりセキュリティを高くできる効果がある。   According to this invention, when a command is sent without a password from the read / write device, the verification result held in the write password verification result holding, the read password verification result holding means, or the system password verification result holding means is displayed. Since the command is executed based on this, there is an effect that the data transmission efficiency can be increased and the security can be further increased.

この発明によれば、リードライト装置からIDコードなしにコマンドが送られてきた場合にはIDコード照合結果保持手段に保持されているIDコードの照合結果に基づいてコマンドを実行するように構成したので、さらにデータの伝送効率を高くできる効果がある。   According to this invention, when a command is sent without an ID code from the read / write device, the command is executed based on the ID code verification result held in the ID code verification result holding means. Therefore, there is an effect that the data transmission efficiency can be further increased.

この発明によれば、リードライト装置からコマンド送られてきた際の通信に伝送エラーがなかった場合にのみパスワード照合結果保持手段がパスワードの照合結果を保持するように構成したので、より正確なパスワードのエラーチェックを行うことができる効果がある。   According to the present invention, since the password verification result holding means holds the password verification result only when there is no transmission error in communication when a command is sent from the read / write device, a more accurate password There is an effect that error checking can be performed.

この発明によれば、リードライト装置からコマンド送られてきた際の通信に伝送エラーがなかった場合にのみIDコード照合結果保持手段がIDコードの照合結果を保持するように構成したので、より正確なIDコードのエラーチェックを行うことができる効果がある。   According to the present invention, the ID code collation result holding means holds the ID code collation result only when there is no transmission error in communication when a command is sent from the read / write device. There is an effect that an error check of an ID code can be performed.

次に、この発明の実施の形態を図に基づいて説明する。
実施の形態1.
図1はこの発明の実施の形態1による非接触式ICカードの基本的構成をリードライト装置とともに示すブロック図である。図において、100は非接触式ICカード、200は非接触式ICカード100と通信を行うリードライト装置、110はリードライト装置との間で電波の授受を行うために電気信号を電波に変換し、さらに電波を高周波信号に変換する送受信アンテナ、120は送受信アンテナ110によって変換された高周波信号をディジタル信号に変換し、ディジタル信号を送受信アンテナ110に供給するための高周波信号に変換する送受信回路、140はデータを格納するためのプログラム可能なメモリ、150は非接触式ICカード100の各部に電力を供給するための電源回路、300は非接触式ICカード100の各部の制御を行うとともに非接触式ICカード100に書き込まれるデータあるいは読み出されるデータに対する情報処理を行う制御回路である。なお、電源回路150は、小型の電池を用いても、受信電波を整流して直流電源を得るように構成してもよい。
Next, an embodiment of the present invention will be described with reference to the drawings.
Embodiment 1 FIG.
FIG. 1 is a block diagram showing a basic configuration of a non-contact type IC card according to Embodiment 1 of the present invention together with a read / write device. In the figure, 100 is a non-contact type IC card, 200 is a read / write device that communicates with the non-contact type IC card 100, and 110 is an electric signal that is converted into radio waves in order to exchange radio waves with the read / write device. Furthermore, a transmission / reception antenna 120 that converts radio waves into high-frequency signals, a transmission / reception circuit 120 that converts the high-frequency signals converted by the transmission / reception antenna 110 into digital signals, and converts the digital signals into high-frequency signals to be supplied to the transmission / reception antenna 110, 140 Is a programmable memory for storing data, 150 is a power supply circuit for supplying power to each part of the non-contact IC card 100, and 300 is a non-contact type for controlling each part of the non-contact IC card 100 Performs information processing for data written to or read from the IC card 100 It is a control circuit. Note that the power supply circuit 150 may be configured to use a small battery or rectify the received radio wave to obtain a DC power supply.

図2はこの実施の形態のメモリ140のメモリマップを示す図である。図に示すように、メモリ140はユーザエリアUAとシステムエリアSAとに分けられている。ユーザエリアUAは非接触式ICカード100を使用する人の個人情報や金額データなどアプリケーション用のデータとして使用するエリアである。システムエリアSAはカードの制御のために使用するエリアである。システムエリアSAには、システムID、カードID、システムパスワード、リードパスワード、リードパスワードリミットアドレス、ライトパスワード、ライトパスワードリミットアドレスが格納される。システムIDはカードがどのシステムで利用されるかを識別するためのものである。また、カードIDは非接触式ICカード100を識別するためのものである。システムパスワードはシステムエリアのリードライトを行う際に照合されるパスワードである。リードパスワード、ライトパスワードは、それぞれユーザエリアUAをリード、ライトする際に照合されるパスワードである。また、リードパスワードリミットアドレスはリードパスワードが有効となる上限のアドレスを示すものであり、ライトパスワードリミットアドレスはライトパスワードが有効となる上限のアドレスを示すものである。   FIG. 2 is a diagram showing a memory map of the memory 140 according to this embodiment. As shown in the figure, the memory 140 is divided into a user area UA and a system area SA. The user area UA is an area used as application data such as personal information and money amount data of a person who uses the contactless IC card 100. The system area SA is an area used for card control. The system area SA stores a system ID, a card ID, a system password, a read password, a read password limit address, a write password, and a write password limit address. The system ID is for identifying in which system the card is used. The card ID is for identifying the non-contact type IC card 100. The system password is a password that is verified when the system area is read / written. The read password and the write password are passwords that are collated when reading and writing the user area UA, respectively. The read password limit address indicates the upper limit address at which the read password is valid, and the write password limit address indicates the upper limit address at which the write password is valid.

なお、361はリードライト装置200からユーザエリアUAに対するライトコマンドがパスワードとともに送られてきた場合に、このパスワードとメモリ140に格納されているライトパスワードと照合を行い、これらパスワードが一致したか否かを判断するライトパスワード照合手段、362はリードライト装置200からユーザエリアUAに対するリードコマンドがパスワードとともに送られてきた場合に、このパスワードとメモリ140に格納されているリードパスワードとの照合を行い、これらパスワードが一致したか否かを判断するリードパスワード照合手段、363はリードライト装置200からシステムエリアSAに対するリード又はライトコマンドがパスワードとともに送られてきた場合に、このパスワードとメモリ140に格納されているシステムパスワードとの照合を行い、これらのパスワードが一致したか否かを判断するシステムパスワード照合手段、350はライトパスワード照合手段361、リードパスワード照合手段362、システムパスワード照合手段363の照合結果に基づいて、それぞれのパスワードが一致した場合にリードライト装置200から送られてきたコマンドを実行するコマンド実行手段である。また、ライトパスワード照合手段361、リードパスワード照合手段362、システムパスワード照合手段363はパスワード照合手段360を構成する。さらに、370はIDコードがリードライト装置200からコマンドとともに送られてきた場合に、これをメモリ140内に格納されているIDコードと照合するIDコード照合手段である。   When a write command for the user area UA is sent from the read / write device 200 together with a password, 361 checks the password against the write password stored in the memory 140 to determine whether these passwords match. Write password verification means 362 for determining the password when the read command for the user area UA is sent from the read / write device 200 together with the password, and compares the password with the read password stored in the memory 140. Read password verification means 363 for determining whether or not the passwords match, when a read or write command for the system area SA is sent from the read / write device 200 together with the password, this password and the memory 14 The system password collating unit 350 collates with the system password stored in the memory and determines whether or not these passwords match. 350 is a write password collating unit 361, a read password collating unit 362, and a system password collating unit 363. This is a command execution means for executing a command sent from the read / write device 200 when the passwords match based on the collation result. The write password verification unit 361, the read password verification unit 362, and the system password verification unit 363 constitute a password verification unit 360. Further, reference numeral 370 denotes ID code checking means for checking the ID code stored in the memory 140 when the ID code is sent from the read / write device 200 together with the command.

次にこの実施の形態の非接触式ICカードの動作について説明する。まず、リードライト装置200と非接触式ICカード100の間の概略的な通信動作について説明する。まず、リードライト装置200からIDコードを読み出す命令であるIDリードのコマンドを非接触式ICカード100に送る。非接触式ICカード100はシステムエリアSA内のシステムIDとカードID(またはどちらか一方)を送り返す。リードライト装置200は非接触式ICカード100からのシステムIDを識別することにより、その非接触式ICカード100がそのシステムに対して発行されたものかどうかを判断する。また、カードIDに基づいてサービスを変更する場合にはカードIDも識別する。次に、ユーザエリアUAをリードするときは、リードパスワードリミットアドレスより下位のアドレスのデータをリードする場合には、リードライト装置200から非接触式ICカード100に「リードコマンド+システムID+カードID+リードアドレス+リードパスワード」を送出する。リードパスワードリミットアドレスよりも上位のアドレスのデータをリードする場合には、パスワードは付加しない。   Next, the operation of the non-contact type IC card of this embodiment will be described. First, a schematic communication operation between the read / write device 200 and the non-contact type IC card 100 will be described. First, an ID read command that is an instruction for reading an ID code from the read / write device 200 is sent to the non-contact type IC card 100. The non-contact IC card 100 sends back the system ID and / or card ID in the system area SA. The read / write device 200 determines whether or not the non-contact type IC card 100 has been issued to the system by identifying the system ID from the non-contact type IC card 100. Further, when the service is changed based on the card ID, the card ID is also identified. Next, when reading the user area UA, when reading data at an address lower than the read password limit address, the read / write device 200 reads “read command + system ID + card ID + read”. Send address + read password. When reading data at an address higher than the read password limit address, no password is added.

次に、非接触式ICカード100内の処理動作について説明する。図3は非接触式ICカード100内のライトコマンドの処理動作を示すフローチャートである。まず、リードライト装置200から送られてきたコマンドを受信してデコードする(ステップS301)。入力されたコマンドが非接触式ICカード100が受け付け可能なコマンドでない場合には(ステップS302)、コマンドエラーとして処理され、エラーステータスがセットされる(ステップS305)。コマンドエラーがない場合には、システムID、カードIDを受信して非接触式ICカード100に格納されているシステムID、カードIDとの照合が行われる(ステップS303)。これらのIDの照合の結果、不一致の場合には(ステップS304)、エラーステイタスをセットする(ステップS305)。IDの照合の結果、一致した場合には書き込みアドレスを受信する(ステップS306)。アドレスの入力がエラーの場合には(ステップS307)、エラーステイタスをセットする(ステップS305)。入力アドレスがエラーでない場合には(ステップS307)、送られてきたアドレスがライトリミットアドレスよりも下位であるか否かが調べられる(ステップS308)。入力アドレスがライトリミットアドレスよりも上位である場合には、ステップS312に行く。入力アドレスがライトリミットアドレスよりも下位である場合には、入力アドレスがシステムエリアSA内であるか否かが調べられ(ステップS309)、入力アドレスがシステムエリアSA外である場合には入力されたライトパスワードを受信して非接触式ICカード100に格納されているライトパスワードと照合する(ステップS310)。照合の結果、ライトパスワードが不一致であった場合には(ステップS311)、エラーステータスをセットする(ステップS305)。ステップS311でパスワードが一致の場合には、書き込むべきデータを受信する(ステップS312)。一方、ステップS306で入力されたアドレスがシステムエリアSA内のアドレスであった場合には(ステップS309)、入力されてくるシステムパスワードと非接触式ICカード100に格納されているシステムパスワードとが照合される(ステップS313)。照合の結果、システムパスワードが不一致であった場合には(ステップS314)、エラーステータスをセットする(ステップS305)。ステップS314でパスワードが一致した場合には、書き込むべきデータを受信する(ステップS312)。ステップS312でデータの受信が完了すると(ステップS315、S316)、伝送エラーがあったか否かが調べられ(ステップS317)、伝送エラーがあった場合にはエラーステータスがセットされる(ステップS318)。次に、エラーステータスが確認され(ステップS319)、エラーがあった場合(ステップS320)にはステップS322に行く。ステップS319においてエラーステータスを確認した際にエラーがなかった場合には(ステップS320)、ライトコマンドを実行する(ステップS321)。そして次に受信するコマンドがある場合にはステップS301に戻り、ない場合には、処理を終了する(ステップS322)。   Next, the processing operation in the non-contact type IC card 100 will be described. FIG. 3 is a flowchart showing a write command processing operation in the non-contact type IC card 100. First, the command sent from the read / write device 200 is received and decoded (step S301). If the input command is not a command that can be received by the non-contact type IC card 100 (step S302), it is processed as a command error and an error status is set (step S305). If there is no command error, the system ID and the card ID are received and collated with the system ID and the card ID stored in the non-contact type IC card 100 (step S303). If these IDs do not match (step S304), an error status is set (step S305). If the IDs match as a result of the ID collation, the write address is received (step S306). If the address input is an error (step S307), an error status is set (step S305). If the input address is not an error (step S307), it is checked whether the sent address is lower than the write limit address (step S308). If the input address is higher than the write limit address, the process goes to step S312. If the input address is lower than the write limit address, it is checked whether or not the input address is in the system area SA (step S309). If the input address is outside the system area SA, it is input. The write password is received and collated with the write password stored in the non-contact type IC card 100 (step S310). As a result of the collation, if the write password does not match (step S311), an error status is set (step S305). If the passwords match in step S311, the data to be written is received (step S312). On the other hand, if the address input in step S306 is an address in the system area SA (step S309), the input system password and the system password stored in the contactless IC card 100 are collated. (Step S313). As a result of verification, if the system passwords do not match (step S314), an error status is set (step S305). If the passwords match in step S314, the data to be written is received (step S312). When reception of data is completed in step S312 (steps S315 and S316), it is checked whether or not there is a transmission error (step S317). If there is a transmission error, an error status is set (step S318). Next, the error status is confirmed (step S319). If there is an error (step S320), the process goes to step S322. If there is no error when the error status is confirmed in step S319 (step S320), a write command is executed (step S321). If there is a command to be received next, the process returns to step S301, and if not, the process ends (step S322).

次に、リードコマンドを実行する場合について説明する。図4はリードコマンドを実行する動作を示すフローチャートである。リードコマンドの実行については図3に示すライトコマンドの動作とほぼ同様のフローになる。ただし、図3のステップS312に相当するデータ受信のステップはない。また、ステップS406においてはリードアドレスを受信し、ステップS408においては入力アドレスがリードリミットアドレス以下か否かが判定される。さらにステップ410においては、リードパスワードの照合がなされる。また、ステップS421においてはリードアドレスのデータがリードライト装置200に送信される。   Next, a case where a read command is executed will be described. FIG. 4 is a flowchart showing an operation for executing a read command. The execution of the read command has almost the same flow as the operation of the write command shown in FIG. However, there is no data reception step corresponding to step S312 of FIG. In step S406, the read address is received. In step S408, it is determined whether the input address is equal to or less than the read limit address. In step 410, the read password is verified. In step S421, the read address data is transmitted to the read / write device 200.

図5はこの実施の形態の非接触式ICカード100があるシステムで用いられている場合のメモリ140のメモリマップを示す図である。同図に示すように、システムエリアSAにはライトパスワードとライトパスワードリミットアドレス「12H」とリードパスワードとリードパスワードリミットアドレス「1DH」が格納されている。この場合、ユーザエリアUAはアドレス「10H」から「1FH」までであるので、ライトパスワードの有効エリア(第1の領域)は「10H」から「12H」、リードパスワードの有効エリア(第2の領域)は「10H」から「1DH]になる。すなわち、アドレス「10H」から「12H」までのエリア(第3の領域)はリード、ライトともにパスワードが必要になる。従って、このエリアには金額等の機密性の高いデータで発行後もリードライトする事が必要なデータを格納するのに適する。また、アドレス「13H」から「1DH」まではリードについてのみパスワードが必要になる。このため、住所、氏名、電話番号など発行後は読み出しだけですむデータを格納するのに適する。さらに「1EH」から「1FH」まではパスワードなしでアクセスすることが可能である。このため、セキュリティ不要のデータを格納するのに適する。   FIG. 5 is a diagram showing a memory map of the memory 140 when the non-contact type IC card 100 of this embodiment is used in a system. As shown in the figure, the system area SA stores a write password, a write password limit address “12H”, a read password, and a read password limit address “1DH”. In this case, since the user area UA is from addresses “10H” to “1FH”, the effective area of the write password (first area) is “10H” to “12H”, and the effective area of the read password (second area). ) Is changed from “10H” to “1DH.” That is, in the area (third area) from the address “10H” to “12H”, a password is required for both reading and writing. Therefore, this area is suitable for storing highly confidential data such as a monetary amount that needs to be read / written even after issuance. In addition, a password is required only for reading from addresses “13H” to “1DH”. For this reason, it is suitable for storing data that only needs to be read after issuance, such as address, name, and telephone number. Furthermore, it is possible to access from “1EH” to “1FH” without a password. Therefore, it is suitable for storing data that does not require security.

このように、ライトパスワード、リードパスワードの2つのパスワードを設けることで、セキュリティのレベルの異なる3種類の領域に分割して管理する事ができる。また、リミットアドレスを変更することにより、それぞれの領域の大きさを変更することができ、従来のようにブロックごとにパスワードを設ける場合に比べてメモリを効率よく使用することが可能である。   In this way, by providing two passwords, a write password and a read password, it is possible to divide and manage into three types of areas with different security levels. Also, by changing the limit address, the size of each area can be changed, and the memory can be used more efficiently than in the case where a password is provided for each block as in the prior art.

実施の形態2.
図6はこの実施の形態2の非接触式ICカードの制御回路の一部、送受信回路、及びメモリを示す図である。なお、この実施の形態では、基本的構成は実施の形態1の図1の非接触式ICカード100と制御回路の動作を除いて同じである。なお、送受信回路120は、パラレルデータからシリアルデータへ、シリアルデータからパラレルデータへ変換するシリアルI/O121、シリアルI/O121からのデータを変調して送受信アンテナ110に供給する変調回路122、送受信アンテナ110からの高周波信号を復調してシリアルI/O121に供給する復調回路123とを有している。
Embodiment 2. FIG.
FIG. 6 is a diagram showing a part of a control circuit, a transmission / reception circuit, and a memory of the contactless IC card according to the second embodiment. In this embodiment, the basic configuration is the same except for the operation of the control circuit and the non-contact type IC card 100 of FIG. The transmission / reception circuit 120 includes a serial I / O 121 that converts parallel data to serial data, a serial data to parallel data, a modulation circuit 122 that modulates data from the serial I / O 121 and supplies the data to the transmission / reception antenna 110, and a transmission / reception antenna And a demodulation circuit 123 that demodulates a high-frequency signal from 110 and supplies it to the serial I / O 121.

図において、300aは制御回路300内のID及びパスワードエラー処理回路である。301はメモリ140と送受信回路120のシリアルI/O121から送られてくるパラレルデータを比較して不一致の場合に「H」信号を出力するコンパレータ、302〜305はリセットフリップフロップ、306〜311はアンドゲートである。   In the figure, reference numeral 300a denotes an ID and password error processing circuit in the control circuit 300. A comparator 301 compares the parallel data sent from the memory 140 and the serial I / O 121 of the transmission / reception circuit 120 and outputs an “H” signal when they do not match. 302 to 305 are reset flip-flops, and 306 to 311 are AND. It is a gate.

次に動作について説明する。図7はID及びパスワードのエラー処理回路の各部に入力される信号のタイミングを示すタイミングチャートである。信号IDstatはID照合中に「H」になる。信号PASSstatはパスワード照合中に「H」になる。信号CMDwaitは、コマンド待ち(受信待ち)の間「H」になる。信号RESETはカードが停止状態から動作状態になるときに出力される。リセットコマンド信号はリセットコマンドをリードライト装置200から受信し、実行したときに出力される。ID照合有りコマンド信号はIDコード付きのコマンドを実行したときに出力され、パスワード照合有りコマンド信号はパスワード付きのコマンドを実行したときに出力される。リードライトコマンド信号はパスワードが必要な領域へのリードライトを実行するとき、厳密には、エラーステータスの確認を行う直前からコマンド実行完了まで出力される。なお、ID照合有りコマンド信号及びパスワード照合有りコマンド信号はリードライトコマンドと同じタイミングで出力される。リードIDコマンド信号はリードIDコマンド実行時に出力される。IDコード照合結果フラグは、フリップフロップ304(IDコード照合結果保持手段)の出力Qであり、IDコード照合の結果一致した場合にリセットされる。パスワード照合結果フラグはパスワード照合の結果一致した場合にリセットされる。両フラグとも信号RESET又はリセットコマンド信号の入力まで内容は保持される。なお、RESET信号又はリセットコマンドの入力によってフリップフロップ304、フリップフロップ305(パスワード照合結果保持手段)はセットされる。   Next, the operation will be described. FIG. 7 is a timing chart showing timings of signals input to each part of the ID and password error processing circuit. The signal IDstat becomes “H” during the ID verification. The signal PASSstat becomes “H” during password verification. The signal CMDwait becomes “H” while waiting for a command (waiting for reception). The signal RESET is output when the card changes from the stopped state to the operating state. The reset command signal is output when a reset command is received from the read / write device 200 and executed. The command signal with ID verification is output when a command with an ID code is executed, and the command signal with password verification is output when a command with a password verification is executed. Strictly speaking, the read / write command signal is output from immediately before checking the error status to the completion of command execution when executing read / write to an area requiring a password. Note that the command signal with ID verification and the command signal with password verification are output at the same timing as the read / write command. The read ID command signal is output when the read ID command is executed. The ID code collation result flag is the output Q of the flip-flop 304 (ID code collation result holding means), and is reset when the ID code collation results in a match. The password verification result flag is reset when the password verification results in a match. The contents of both flags are held until the signal RESET or the reset command signal is input. Note that the flip-flop 304 and the flip-flop 305 (password verification result holding means) are set by the input of the RESET signal or the reset command.

図8はリードライト装置と非接触式ICカードの通信のシーケンス例を示すシーケンスチャートである。リードライト装置200からパスワードが必要なエリアのリードコマンドを受信する場合について説明する。まず、リードライト装置200からリードIDコマンドを受信し、リードIDコマンド信号は「H」になる。するとIDエラーは「L」になり、エラーステータスはエラーがないことになるのでリードIDコマンドは実行される。そして、実行結果であるIDコードをリードライト装置200に返送する(ステップA)。次に、リードライト装置200から非接触式ICカード100に実行コマンド(リードコマンド)+IDコード+リードアドレス+パスワードを送る。非接触式ICカード100側においては実行コマンド受信により信号CMDwaitが「L」になり、次に、信号IDstatが「H」になる。次に受信したIDコードとメモリ140内のIDコードとがコンパレータ301によって比較される。照合結果が一致した場合にはフリップフロップ302の出力Qバーは「H」になる。   FIG. 8 is a sequence chart showing a sequence example of communication between the read / write device and the non-contact type IC card. A case where a read command for an area requiring a password is received from the read / write device 200 will be described. First, a read ID command is received from the read / write device 200, and the read ID command signal becomes “H”. Then, since the ID error becomes “L” and the error status indicates that there is no error, the read ID command is executed. Then, the ID code as the execution result is returned to the read / write device 200 (step A). Next, an execution command (read command) + ID code + read address + password is sent from the read / write device 200 to the non-contact type IC card 100. On the non-contact type IC card 100 side, the signal CMDwait becomes “L” by the reception of the execution command, and then the signal IDstat becomes “H”. Next, the received ID code and the ID code in the memory 140 are compared by the comparator 301. When the collation results match, the output Q bar of the flip-flop 302 becomes “H”.

次に、リードアドレスを受信し、パスワードが必要なエリアかどうか判断される。なお、このとき信号IDstatは「L」になる。次に信号PASSstatが「H」になり、受信したパスワードとメモリ140内に格納されているパスワードとが照合される。照合結果が一致した場合にフリップフロップ303の出力Qバーが「H」になる。そして、リードライトコマンド信号、ID照合有りコマンド信号、パスワード照合有りコマンド信号のタイミングでフリップフロップ302、303の内容が、それぞれ、ID照合結果フラグ、パスワード照合結果フラグとしてフリップフロップ304、305に格納されることになる。   Next, the read address is received, and it is determined whether the area requires a password. At this time, the signal IDstat becomes “L”. Next, the signal PASSstat becomes “H”, and the received password is compared with the password stored in the memory 140. When the collation results match, the output Q bar of the flip-flop 303 becomes “H”. The contents of the flip-flops 302 and 303 are stored in the flip-flops 304 and 305 as an ID verification result flag and a password verification result flag, respectively, at the timing of the read / write command signal, the ID verification command signal, and the password verification command signal. Will be.

なお、シリアルI/O121から送られてきたIDコードとメモリ140に格納されているIDコードとが異なる場合にはコンパレータ301は「H」の信号を出力し、この結果、フリップフロップ302はセットされるので出力Qバーからは「L」信号が出力されてフリップフロップ304はリセットされない。フリップフロップ304は初期状態で信号RESET又はリセットコマンド信号によってセットされているのでID照合結果フラグは「H」になってIDエラーが出力される。なお、パスワードが異なる場合も同様の動作によってパスワードエラーが出力される。   When the ID code sent from the serial I / O 121 and the ID code stored in the memory 140 are different, the comparator 301 outputs a signal “H”, and as a result, the flip-flop 302 is set. Therefore, an “L” signal is output from the output Q bar, and the flip-flop 304 is not reset. Since the flip-flop 304 is initially set by the signal RESET or the reset command signal, the ID collation result flag becomes “H” and an ID error is output. Even when the passwords are different, a password error is output by the same operation.

コマンド実行の際は、上述したIDエラー又はパスワードエラーを確認し、エラーがないときだけコマンドが実行される。そして実行結果をリードライト装置200に返送する(ステップB)。さらに、引き続いて、パスワードが必要な別のアドレスのデータを読む場合には、リードライト装置から実行コマンドとアドレスのみを送れば、ICカード側でこれらのコマンドが実行できる(ステップC)。すなわち、ステップBでIDコードとパスワードは照合済みなので、ステップC以降はIDコードとパスワードを送らなくても実行する事ができるので伝送データを大幅に減少させることが可能になる。また、照合済みのICカードとリードライト装置が交信中に別の未照合のICカードが通信エリアに入ってきても、各ICカードにおいては、リセット後、フリップフロップ304、305はセットされてID照合結果フラグ、パスワード照合結果フラグともに不一致をしめすように設定されているので別のカードがコマンドを誤って実行する事はない。   When executing the command, the ID error or password error described above is confirmed, and the command is executed only when there is no error. Then, the execution result is returned to the read / write device 200 (step B). Further, when reading data at another address that requires a password, these commands can be executed on the IC card side by sending only the execution command and address from the read / write device (step C). That is, since the ID code and the password have been collated in step B, it can be executed without sending the ID code and password after step C, so that the transmission data can be greatly reduced. In addition, even if another unverified IC card enters the communication area while the verified IC card and the read / write device are communicating with each other, the flip-flops 304 and 305 are set and the ID is set after reset in each IC card. Since both the verification result flag and the password verification result flag are set so as not to match, another card does not execute the command by mistake.

実施の形態3.
図9はこの発明の実施の形態3の非接触式ICカードの制御回路のエラー処理回路の構成を示す図である。図において図6に示すものと同一の部分には同一の符号を付し、重複する説明は省略する。
Embodiment 3 FIG.
FIG. 9 is a diagram showing the configuration of the error processing circuit of the control circuit of the contactless IC card according to the third embodiment of the present invention. In the figure, the same parts as those shown in FIG. 6 are denoted by the same reference numerals, and redundant description will be omitted.

300bは非接触式ICカード100の制御回路のエラー処理回路、309a、309b、309c、311a、312b、311cはアンドゲート、305a(システムパスワード照合結果保持手段)、305b(リードパスワード照合結果保持手段)、305c(ライトパスワード照合結果保持手段)は、それぞれシステムパスワード照合結果フラグ、リードパスワード照合結果フラグ、ライトパスワード照合結果フラグを格納するためのフリップフロップ、312はアンドゲート311a、311b、311cから出力されるエラー信号のオアを取るオアゲートである。システムエリアリードライト信号はシステムエリアのリードライトコマンド実行時に出力される。リードコマンド信号はユーザエリアのパスワードが必要なエリアのリードコマンド実行時に出力される。ライトコマンド信号はユーザエリアのパスワードが必要なエリアのライトコマンド実行時に出力される。これらの信号の出力タイミングは実施の形態2で説明したリードライトコマンド信号のタイミングと同じである。   300b is an error processing circuit of the control circuit of the non-contact type IC card 100, 309a, 309b, 309c, 311a, 312b, 311c are AND gates, 305a (system password verification result holding means), 305b (read password verification result holding means) 305c (write password verification result holding means) are flip-flops for storing a system password verification result flag, a read password verification result flag, and a write password verification result flag, and 312 is output from AND gates 311a, 311b, 311c. This is an OR gate that takes the OR of the error signal. The system area read / write signal is output when the system area read / write command is executed. The read command signal is output when a read command is executed in an area requiring a user area password. The write command signal is output when a write command is executed in an area that requires a user area password. The output timing of these signals is the same as the timing of the read / write command signal described in the second embodiment.

次に動作について説明する。この実施の形態では、IDエラー信号の出力に関しては図6にその構成を示した実施の形態2と同じであるので、その説明は省略し、パスワードエラー信号の出力に関して実施の形態2とは異なる点について説明をする。実施の形態2の構成ではパスワードの照合結果を格納するフリップフロップが1つであったが、この実施の形態ではシステムパスワード、リードパスワード、ライトパスワードごとにそれぞれフリップフロップ305a、305b、305cを設けている。すなわち、システムエリアのリードライトコマンド、ユーザエリアのリードコマンド、ユーザエリアのライトコマンドのそれぞれの場合についてパスワードの照合が行われた結果がフリップフロップ303から、フリップフロップ305a、305b、305cに格納される。それぞれのパスワードについて、パスワードの照合が行われたコマンドの次のコマンドからは同じパスワードの照合は行われずに、フリップフロップ305a、305b、305cに格納されているパスワード照合結果フラグが参照され、オアゲート312からパスワードのエラーの有無を示すパスワードエラー信号が出力される。   Next, the operation will be described. In this embodiment, since the output of the ID error signal is the same as that of the second embodiment whose configuration is shown in FIG. 6, the description thereof is omitted, and the output of the password error signal is different from that of the second embodiment. The point will be explained. In the configuration of the second embodiment, there is one flip-flop that stores the password verification result. In this embodiment, however, flip-flops 305a, 305b, and 305c are provided for each system password, read password, and write password. Yes. That is, the results of password verification for each of the system area read / write command, user area read command, and user area write command are stored from the flip-flop 303 to the flip-flops 305a, 305b, and 305c. . For each password, the password verification result flag stored in the flip-flops 305a, 305b, and 305c is referred to without referring to the same password from the command next to the command for which the password has been verified, and the OR gate 312 is referred to. Outputs a password error signal indicating the presence or absence of a password error.

従って、3つのパスワードを独立して照合結果を格納することができるので実施の形態1で説明したようにシステムパスワード、ライトパスワード、リードパスワードを設けた場合に独立したパスワードエラーのチェックを行うことができる。例えば、実施の形態2ではパスワードの必要なエリアのリードコマンドを実行後にパスワードの必要なエリアのパスワード照合なしのライトコマンドが送られてきた場合にはライトコマンドが実行されてしまうが、この実施の形態ではそれぞれのパスワードが独立にチェックされているので、このような場合に無条件に実行されることはない。従って、よりセキュリティの高いパスワードのエラーチェックを行うことができる。   Therefore, since the verification result can be stored independently for the three passwords, the password error can be checked independently when the system password, the write password, and the read password are provided as described in the first embodiment. it can. For example, in the second embodiment, when a write command without password verification in an area requiring a password is sent after executing a read command for an area requiring a password, the write command is executed. In the form, each password is checked independently, so it is not unconditionally executed in such a case. Therefore, it is possible to perform a password error check with higher security.

実施の形態4.
図10はこの発明の実施の形態4の非接触式ICカードの制御回路のエラー処理回路の構成を示す図である。図において図9に示すものと同一の部分には同一の符号を付し、重複する説明は省略する。
Embodiment 4 FIG.
FIG. 10 is a diagram showing the configuration of the error processing circuit of the control circuit of the non-contact type IC card according to Embodiment 4 of the present invention. In the figure, the same parts as those shown in FIG. 9 are denoted by the same reference numerals, and redundant description will be omitted.

300cは非接触式ICカード100の制御回路のエラー処理回路、313、315はアンドゲート、314、316はインバータである。インバータには伝送エラー信号が入力される。図11はこの実施の形態のエラー処理回路の各部の信号をタイミングを示すタイミングチャートである。図に示すように伝送エラー信号は、伝送エラーがあった場合にはパスワードを受信した直後に「H」になる。   300c is an error processing circuit of the control circuit of the non-contact type IC card 100, 313 and 315 are AND gates, 314 and 316 are inverters. A transmission error signal is input to the inverter. FIG. 11 is a timing chart showing the timing of the signals of each part of the error processing circuit of this embodiment. As shown in the figure, if there is a transmission error, the transmission error signal becomes “H” immediately after receiving the password.

次に動作について説明する。この実施の形態4のエラー処理回路では、IDコードやパスワードの照合結果をすぐにフリップフロップ304、305a、305b、305cにフラグとして設定せずに、受信完了を待って、アンドゲート313、315で伝送エラーがないことをチェックしてからフラグとしてフリップフロップに設定するようにする。従って、この実施の形態によれば伝送エラーが起こりうる環境においても非接触式ICカードの動作の信頼性を向上させることができる。   Next, the operation will be described. In the error processing circuit according to the fourth embodiment, the ID code and the password verification result are not immediately set as flags in the flip-flops 304, 305a, 305b, and 305c. After checking that there is no transmission error, the flag is set in the flip-flop. Therefore, according to this embodiment, it is possible to improve the reliability of the operation of the non-contact type IC card even in an environment where a transmission error may occur.

実施の形態5.
図12はこの発明の実施の形態5の非接触式ICカードの制御回路のエラー処理回路の構成を示す図である。図において図11に示すものと同一の部分には同一の符号を付し、重複する説明は省略する。
Embodiment 5 FIG.
FIG. 12 is a diagram showing the configuration of the error processing circuit of the control circuit of the non-contact type IC card according to Embodiment 5 of the present invention. In the figure, the same parts as those shown in FIG. 11 are denoted by the same reference numerals, and redundant description will be omitted.

300dは非接触式ICカード100の制御回路のエラー処理回路、316〜319はアンドゲート、320〜323はオアゲートである。   300d is an error processing circuit of the control circuit of the non-contact type IC card 100, 316 to 319 are AND gates, and 320 to 323 are OR gates.

次に動作について説明する。実施の形態2から実施の形態4の構成では、IDコード、パスワードの照合が一旦行われると、それ以降、IDコード、パスワードの照合有りのコマンドが入力されないことを前提としていた。この実施の形態では、IDコード、パスワードの照合有りのコマンドが入力されるごとにIDコード、パスワードの照合が正しく行われ、IDコード、パスワード照合なしのコマンドが入力された場合にはフリップフロップ304、305a、305b、305cに格納しているフラグを参照してIDエラー、パスワードエラー信号を出力する。   Next, the operation will be described. In the configuration of the second to fourth embodiments, it is assumed that once the ID code and password are verified, no command with ID code and password verification is input thereafter. In this embodiment, each time an ID code / password verification command is input, the ID code / password verification is performed correctly. When a command without ID code / password verification is input, the flip-flop 304 is used. , 305a, 305b, and 305c are referred to, and an ID error and password error signal is output.

まず、IDコードの照合について実際の回路の動作を説明する。実施の形態2から実施の形態4では、フリップフロップ304がセットされるのは信号RESET又はリセットコマンド信号が入力された場合のみであったが、この実施の形態ではアンドゲート316にフリップフロップ302の出力Qから「H」の信号が出力され、かつ、アンドゲート313が「H」信号を出力した場合にもオアゲート320によりさらにフリップフロップ304はセットされる。すなわち、IDコードがコンパレータ301によって比較されて、不一致だった場合にはアンドゲート306から「H」信号が出力されてフリップフロップ302の出力Qは「H」になる。また、アンドゲート313からは伝送エラーがなく、IDコード照合有りのコマンドが入力されたときには「H」信号を出力する。このため、アンドゲート316はオアゲート320に「H」信号を出力し、オアゲート320の出力は「H」になりフリップフロップ304はセットされて出力Qに「H」信号がID照合フラグがエラーを表すものとしてセットされる。従って、複数のID照合有りのコマンドが入力されても、毎回、正しくIDコードの照合が行われる。なお、以上の動作は各パスワードの照合についても同様であるのでそれらの説明は省略する。このように、IDコード、パスワードの照合有りのコマンドが入力される度に正確にIDコード、パスワードの照合が行われるので、データ伝送の効率を高くできるとともに、より高いセキュリティを確保することができる。   First, the actual circuit operation for ID code verification will be described. In the second to fourth embodiments, the flip-flop 304 is set only when the signal RESET or the reset command signal is input. However, in this embodiment, the flip-flop 302 is connected to the AND gate 316. The flip-flop 304 is further set by the OR gate 320 even when an “H” signal is output from the output Q and the AND gate 313 outputs an “H” signal. That is, if the ID codes are compared by the comparator 301 and they do not match, an “H” signal is output from the AND gate 306 and the output Q of the flip-flop 302 becomes “H”. Further, when there is no transmission error from the AND gate 313 and a command with ID code verification is input, an “H” signal is output. Therefore, the AND gate 316 outputs the “H” signal to the OR gate 320, the output of the OR gate 320 becomes “H”, the flip-flop 304 is set, and the “H” signal is output to the output Q and the ID collation flag indicates an error. Set as a thing. Therefore, even if a plurality of commands with ID verification are input, ID code verification is performed correctly each time. Since the above operation is the same for the verification of each password, the description thereof will be omitted. As described above, since the ID code and password are correctly verified each time a command with ID code and password verification is input, the efficiency of data transmission can be increased and higher security can be ensured. .

この発明の実施の形態1の非接触式ICカードの基本的構成をリードライト装置とともに示すブロック図である。It is a block diagram which shows the basic composition of the non-contact-type IC card of Embodiment 1 of this invention with a read / write apparatus. 実施の形態1のメモリのメモリマップを示す図である。FIG. 3 is a diagram showing a memory map of the memory according to the first embodiment. 実施の形態1の非接触式ICカードのライトコマンドの処理動作を示すフローチャートである。4 is a flowchart illustrating a write command processing operation of the non-contact IC card according to the first embodiment. 実施の形態1の非接触式ICカードのリードコマンドの処理動作を示すフローチャートである。4 is a flowchart showing a read command processing operation of the non-contact IC card according to the first embodiment. 実施の形態1の非接触式ICカードがあるシステムで用いられている場合のメモリのメモリマップを示す図である。It is a figure which shows the memory map of the memory at the time of being used with the system with the non-contact-type IC card of Embodiment 1. FIG. 実施の形態2の非接触式ICカードの制御回路のエラー処理回路、送受信回路及びメモリを示す図である。It is a figure which shows the error processing circuit, transmission / reception circuit, and memory of the control circuit of the non-contact-type IC card of Embodiment 2. 実施の形態2のエラー処理回路の各部に入力される信号のタイミングを示すタイミングチャートである。6 is a timing chart illustrating timings of signals input to each part of the error processing circuit according to the second embodiment. 実施の形態2において、リードライト装置と非接触式ICカードの通信のシーケンス例を示すシーケンスチャートである。9 is a sequence chart illustrating a communication sequence example between a read / write device and a non-contact type IC card in the second embodiment. 実施の形態3の非接触式ICカードの制御回路のエラー処理回路の構成を示す図である。FIG. 10 is a diagram illustrating a configuration of an error processing circuit of a control circuit of a non-contact IC card according to a third embodiment. 実施の形態4の非接触式ICカードの制御回路のエラー処理回路の構成を示す図である。FIG. 10 is a diagram illustrating a configuration of an error processing circuit of a control circuit of a non-contact IC card according to a fourth embodiment. 実施の形態4のエラー処理回路の各部の信号をタイミングを示すタイミングチャートである。10 is a timing chart illustrating timings of signals of respective units of the error processing circuit according to the fourth embodiment. 実施の形態5の非接触式ICカードの制御回路のエラー処理回路の構成を示す図である。FIG. 10 is a diagram illustrating a configuration of an error processing circuit of a control circuit of a contactless IC card according to a fifth embodiment. 従来の非接触式ICカードシステムにおけるICカードとリードライト装置との間の通信の様子を示すシーケンスチャートである。It is a sequence chart which shows the mode of communication between the IC card and the read / write device in the conventional non-contact type IC card system. 従来のICカードのメモリマップを示す図である。It is a figure which shows the memory map of the conventional IC card.

符号の説明Explanation of symbols

140 メモリ、304 フリップフロップ(IDコード照合結果保持手段)、305 フリップフロップ(パスワード照合結果保持手段)、305a フリップフロップ(システムパスワード照合結果保持手段)、305b フリップフロップ(リードパスワード照合結果保持手段)、305c フリップフロップ(ライトパスワード照合結果保持手段)、350 コマンド実行手段、360 パスワード照合手段、361 ライトパスワード照合手段、362 リードパスワード照合手段、363 システムパスワード照合手段、370 IDコード照合手段、UA ユーザエリア、SA システムエリア。   140 memory, 304 flip-flop (ID code verification result holding means), 305 flip-flop (password verification result holding means), 305a flip-flop (system password verification result holding means), 305b flip-flop (read password verification result holding means), 305c flip-flop (write password verification result holding unit), 350 command execution unit, 360 password verification unit, 361 write password verification unit, 362 read password verification unit, 363 system password verification unit, 370 ID code verification unit, UA user area, SA System area.

Claims (6)

リードライト装置との間で通信を行うICカードにおいて、システムエリアとユーザエリアとに分割されたデータ格納のためのメモリであって、前記システムエリアには、前記ユーザエリア内の第1の領域にデータを書き込む場合に照合されるライトパスワードが格納されている領域と、前記ユーザエリア内の第2の領域にデータを読み出す場合に照合されるリードパスワードが格納されている領域と、前記システムエリアに対して書き込み、又は読み出しが行われる場合に照合されるシステムパスワードが格納されている領域とを有するメモリと、前記リードライト装置から前記第1の領域に対する書き込みコマンドがパスワードとともに送られてきた場合に、このパスワードと前記メモリに格納されているライトパスワードと照合を行い、これらのパスワードが一致したか否かを判断するライトパスワード照合手段と、前記リードライト装置から前記第2の領域に対する読み出しコマンドがパスワードとともに送られてきた場合に、このパスワードと前記メモリに格納されているリードパスワードとの照合を行い、これらのパスワードが一致したか否かを判断するリードパスワード照合手段と、前記リードライト装置から前記システムエリアに対する読み出し又は書き込みコマンドがパスワードとともに送られてきた場合に、このパスワードと前記メモリに格納されているシステムパスワードとの照合を行い、これらのパスワードが一致したか否かを判断するシステムパスワード照合手段と、前記ライトパスワード照合手段、前記リードパスワード照合手段、前記システムパスワード照合手段の照合結果に基づいて、それぞれのパスワードが一致した場合に前記リードライト装置から送られてきたコマンドを実行するコマンド実行手段と、リードパスワードが有効となる上限のアドレスを示すリードパスワードリミットアドレスと、ライトパスワードが有効となる上限のアドレスを示すライトパスワードリミットアドレスとを具備し、リードパスワードリミットアドレス及びライトパスワードリミットアドレスを変更可能にしたことを特徴とするICカード。   In an IC card that communicates with a read / write device, a memory for storing data divided into a system area and a user area, the system area having a first area in the user area An area storing a write password to be collated when writing data, an area storing a read password to be collated when reading data to the second area in the user area, and the system area When a write command for the first area is sent from the read / write device together with a password, and a memory having an area storing a system password to be collated when writing or reading is performed. This password is compared with the write password stored in the memory. Write password verification means for determining whether or not these passwords match, and when a read command for the second area is sent from the read / write device together with the password, the password and the memory are stored in the memory. Read password verification means for determining whether or not these passwords match, and when a read or write command for the system area is sent together with the password from the read / write device, A system password verification unit that verifies the password and a system password stored in the memory and determines whether or not the passwords match, the write password verification unit, the read password verification unit, and the system path A command execution unit that executes a command sent from the read / write device when the passwords match based on a verification result of the code verification unit, and a read password that indicates an upper limit address for which the read password is valid An IC card comprising a limit address and a write password limit address indicating an upper limit address at which the write password is valid, wherein the read password limit address and the write password limit address can be changed. 前記第1の領域にも含まれ、かつ前記第2の領域にも含まれる第3の領域を前記メモリに存在させたことを特徴とする請求項1記載のICカード。   2. The IC card according to claim 1, wherein a third area included in the first area and also included in the second area is present in the memory. 前記ライトパスワード照合手段によるパスワードの照合結果を保持するライトパスワード照合結果保持手段と、前記リードパスワード照合手段によるパスワードの照合結果を保持するリードパスワード照合結果保持手段と、前記システムパスワード照合手段によるパスワードの照合結果を保持するシステムパスワード照合結果保持手段とを具備し、前記コマンド実行手段は、前記リードライト装置からパスワードとともにコマンドが送られてきた場合には前記ライトパスワード照合手段、前記リードパスワード照合手段、前記システムパスワード照合手段の照合結果に基づいて、それぞれのパスワードが一致した場合に前記リードライト装置から送られてきたコマンドを実行し、前記リードライト装置からパスワードなしにコマンドが送られてきた場合には前記ライトパスワード照合結果保持手段、前記リードパスワード照合結果保持手段、又は前記システムパスワード照合結果保持手段に保持されている照合結果に基づいて前記コマンドを実行することを特徴とする請求項1記載のICカード。   Write password verification result holding means for holding the password verification result by the write password verification means, Read password verification result holding means for holding the password verification result by the read password verification means, and password verification by the system password verification means System password verification result holding means for holding a verification result, and the command execution means, when a command is sent together with a password from the read / write device, the write password verification means, the read password verification means, Based on the verification result of the system password verification means, the command sent from the read / write device is executed when the passwords match, and the command is sent from the read / write device without the password. The command is executed based on a verification result held in the write password verification result holding unit, the read password verification result holding unit, or the system password verification result holding unit. 1. The IC card according to 1. 前記システムエリアはIDコードが格納されている領域を有し、前記リードライト装置からIDコードがコマンドとともに送られてきた場合に、このIDコードと前記メモリに格納されているIDコードとの照合を行い、これらのIDコードが一致したか否かを判断するIDコード照合手段と、前記IDコード照合手段の照合結果を保持するIDコード照合結果保持手段とをさらに具備し、前記コマンド実行手段は前記リードライト装置からIDコードとともにコマンドが送られてきた場合には前記IDコード照合手段の照合結果に基づいてコマンドを実行し、前記リードライト装置からIDコードなしにコマンドが送られてきた場合には前記IDコード照合結果保持手段に保持されているIDコードの照合結果に基づいてコマンドを実行することを特徴とする請求項3記載のICカード。   The system area has an area where an ID code is stored, and when the ID code is sent together with a command from the read / write device, the ID code is compared with the ID code stored in the memory. And an ID code collating unit that determines whether or not these ID codes match, and an ID code collation result holding unit that holds a collation result of the ID code collating unit, and the command executing unit includes the command execution unit When a command is sent together with an ID code from the read / write device, the command is executed based on the collation result of the ID code collating means, and when a command is sent from the read / write device without an ID code A command is executed based on the ID code verification result held in the ID code verification result holding means. IC card according to claim 3, wherein a. 前記パスワード照合結果保持手段は前記リードライト装置からコマンドが送られてきた際の通信に伝送エラーがなかった場合にのみパスワードの照合結果を保持することを特徴とする請求項3記載のICカード。   4. The IC card according to claim 3, wherein the password verification result holding means holds the password verification result only when there is no transmission error in communication when a command is sent from the read / write device. 前記IDコード照合結果保持手段は前記リードライト装置からコマンドが送られてきた際の通信に伝送エラーがなかった場合にのみIDコードの照合結果を保持することを特徴とする請求項4記載のICカード。   5. The IC according to claim 4, wherein said ID code collation result holding means holds the ID code collation result only when there is no transmission error in communication when a command is sent from said read / write device. card.
JP2004336239A 2004-11-19 2004-11-19 IC card Expired - Lifetime JP3908246B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004336239A JP3908246B2 (en) 2004-11-19 2004-11-19 IC card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004336239A JP3908246B2 (en) 2004-11-19 2004-11-19 IC card

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP7071777A Division JPH08272924A (en) 1995-03-29 1995-03-29 Ic card

Publications (2)

Publication Number Publication Date
JP2005100455A true JP2005100455A (en) 2005-04-14
JP3908246B2 JP3908246B2 (en) 2007-04-25

Family

ID=34464377

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004336239A Expired - Lifetime JP3908246B2 (en) 2004-11-19 2004-11-19 IC card

Country Status (1)

Country Link
JP (1) JP3908246B2 (en)

Also Published As

Publication number Publication date
JP3908246B2 (en) 2007-04-25

Similar Documents

Publication Publication Date Title
JPH08272924A (en) Ic card
KR100887083B1 (en) Ic module and cellular phone
CN102946484B (en) A kind of method and system utilizing near-field communication to unlock mobile terminal
US8804959B2 (en) Communication device, communication method, and communication system
US8410908B2 (en) Method and device for emulating multiple RFID tags within a single mobile electronic device
JPH0378815B2 (en)
US7500605B2 (en) Tamper resistant device and file generation method
US20080283617A1 (en) Contactless card and a control method thereof
TW293223B (en) The communication apparatus
CN104410968A (en) Portable universal integrated circuit card (UICC) subscriber terminal equipment and identity authentication system thereof
US20090184799A1 (en) Information storage medium and information storage medium processing apparatus
KR101783526B1 (en) Ic card, electronic device and portable electronic device
JP4334538B2 (en) IC card
CN101136079A (en) CPU and logical encrypt double-purpose smart card and key data processing method thereof
JP3908246B2 (en) IC card
EP1026640A2 (en) Portable electronic device
Kose et al. A SECURE DESIGN ON MIFARE CLASSIC CARDS FOR ENSURING CONTACTLESS PAYMENT AND CONTROL SERVICES
JPH10312445A (en) Proximity and remote type non contacting ic card
JP2003162740A (en) Non-contact ic card system
JP2001506793A (en) Dynamic interpretation of data for chip cards
JPH10187543A (en) Memory access method, information processor, and card processor
JP2007004624A (en) Information management device, information management method and computer program
CN105741104A (en) Offline transaction apparatus and method based on offline transaction apparatus
Kose et al. ADVANCES IN CYBER-PHYSICAL SYSTEMS Vol. 7, Num. 1, 2022 A SECURE DESIGN ON MIFARE CLASSIC CARDS FOR ENSURING CONTACTLESS PAYMENT AND CONTROL SERVICES
KR20150074820A (en) Security payment device including finance micro secure digital card and method of performing thereof

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060314

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060410

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060712

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060725

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060925

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070109

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070117

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110126

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110126

Year of fee payment: 4

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313115

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110126

Year of fee payment: 4

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110126

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120126

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130126

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130126

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140126

Year of fee payment: 7

EXPY Cancellation because of completion of term