JP2020190868A - Semiconductor device, ic card, and data processing method - Google Patents

Semiconductor device, ic card, and data processing method Download PDF

Info

Publication number
JP2020190868A
JP2020190868A JP2019095216A JP2019095216A JP2020190868A JP 2020190868 A JP2020190868 A JP 2020190868A JP 2019095216 A JP2019095216 A JP 2019095216A JP 2019095216 A JP2019095216 A JP 2019095216A JP 2020190868 A JP2020190868 A JP 2020190868A
Authority
JP
Japan
Prior art keywords
file
stored
card
data
encryption key
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
JP2019095216A
Other languages
Japanese (ja)
Inventor
美廉 陳
Meilian Chen
美廉 陳
大石 浩
Hiroshi Oishi
浩 大石
和重 荒井
Kazue Arai
和重 荒井
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.)
Toppan Inc
Original Assignee
Toppan 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 Toppan Printing Co Ltd filed Critical Toppan Printing Co Ltd
Priority to JP2019095216A priority Critical patent/JP2020190868A/en
Publication of JP2020190868A publication Critical patent/JP2020190868A/en
Pending legal-status Critical Current

Links

Images

Abstract

To efficiently improve security in an IC card which manages accesses to files using a password, an encryption key for encrypting the file to be stored, and a decryption key for decrypting the file.SOLUTION: In a nonvolatile memory region, a number of times for permission to detect an attack or erroneous input is set according to classification of files which are encrypted using encryption keys and stored. A semiconductor device comprises a function which disables encryption and decryption of a file by deleting the encryption key data used to encrypt the file or the decryption key data used to decrypt the file from the nonvolatile memory region when the number of times of detected attacks or erroneous inputs exceeds the number of times for permission.SELECTED DRAWING: Figure 1

Description

本発明は、ICチップなどから構成されるモジュールを埋め込んだICカードに代表される半導体装置と上記半導体装置からのデータに基づいて所定の処理を行なうデータ処理方法に関する。 The present invention relates to a semiconductor device typified by an IC card in which a module composed of an IC chip or the like is embedded, and a data processing method that performs predetermined processing based on data from the semiconductor device.

ICカードは、ICカードに内蔵されている記憶手段に格納されているデータへの読み書きを、各ファイル毎に複数のパスワードを組み合わせたアクセス権を用いて管理し、データのセキュリティを保っている。 The IC card manages reading and writing of data stored in the storage means built in the IC card by using access rights that combine a plurality of passwords for each file, and maintains data security.

前述のアクセス権とは、ファイル毎に設定されているものであり、通常、データの読み出しに関するアクセス権、データの書き換えに関するアクセス権等、ファイルに対する命令の種類毎に複数種類設定できるものである。ICカード内には、そのアクセス権の種類に対応する数のパスワードデータが格納されており、アクセス権の許可は、各ファイル毎に規定されたアクセス権に対応したパスワードを照合することで行なっている。 The above-mentioned access right is set for each file, and usually, a plurality of types can be set for each type of instruction to the file, such as an access right for reading data and an access right for rewriting data. A number of password data corresponding to the type of access right is stored in the IC card, and the access right is granted by collating the password corresponding to the access right specified for each file. There is.

ICカードの不正利用被害への対策の一例として、特許文献1では、セキュリティ性を持つユーザーデータの保護のため、パスワードの検証回数に制限をかけて強制的にファイル消却を行なうことで、アクセス権限を有しない第3者にファイルが漏洩することを防止する手法が提示されている。 As an example of countermeasures against unauthorized use of IC cards, in Patent Document 1, in order to protect user data with security, access authority is obtained by limiting the number of password verifications and forcibly deleting files. A method for preventing a file from being leaked to a third party who does not have the above is presented.

パスワード検証における誤入力回数(連続間違い)が設定した許容回数を超えた場合、正当な権限を有するユーザーによるアクセスでなく、悪意を持つ第3者による不正利用とみなし、「強制的なファイル消却する」以外に、「ファイルを閉鎖状態とする」,「リード・ライトプロテクトビットをイネーブルにする」などの対処が行なわれている。 If the number of erroneous entries (continuous erroneous) in password verification exceeds the set allowable number, it is considered as unauthorized use by a malicious third party, not access by a user with legitimate authority, and "forced file deletion" In addition to "," measures such as "close the file" and "enable the read / write protect bit" have been taken.

特開2005−11151号公報Japanese Unexamined Patent Publication No. 2005-11151

正当な権限を有するユーザーがうろ覚え,勘違い,操作ミスなどによるパスワード誤入力、または正当な権限のないユーザーからの悪意を持った不正アクセスによる攻撃(これらを「アタック」と総称する)が許容回数を超えてしまった場合、ICカードはICチップにブロックがかかり、または格納されているデータが消却されることにより使用不可となってしまうため、ICカードの再発行手続を要している。 A user with legitimate authority can wander around, misunderstand, mistype a password due to an operation error, or an attack by malicious unauthorized access from a user without legitimate authority (these are collectively called "attack"). If the amount is exceeded, the IC card cannot be used because the IC chip is blocked or the stored data is erased, so that the IC card must be reissued.

また、格納するファイルの容量が大きい場合、消却に要する時間的な制限により、ファイルを構成する一部のデータがICカード内部のメモリに残存してしまい、セキュリティ情報漏洩の可能性が残る実態となっている。不完全なファイル消却では、セキュリティ性を持つ一部データの残存は、情報漏洩事故の発生が否定されない。 In addition, when the capacity of the file to be stored is large, some data constituting the file remains in the memory inside the IC card due to the time limit required for deletion, and there is a possibility that security information may be leaked. It has become. With incomplete file deletion, the occurrence of information leakage accidents cannot be denied for the remaining security of some data.

本発明では、正当な権限を有するユーザーによるパスワード誤入力に対して、煩雑な再発行手続を要さず、格納されたファイルの秘匿性は維持されたまま、セキュリティ性を持つ情報漏洩事故の発生可能性を低減して、通常状態に復帰させる上で有効なICカードに代表される半導体装置およびそのデータ処理方法を改良することを目的とする。 In the present invention, a complicated reissue procedure is not required for a password erroneous input by a user having a legitimate authority, and a security information leakage accident occurs while maintaining the confidentiality of the stored file. An object of the present invention is to reduce the possibility and improve a semiconductor device typified by an IC card effective for returning to a normal state and a data processing method thereof.

本発明による半導体装置は、
不揮発性メモリ領域に格納しているファイルに対する不正アクセス行為を検知するプログラムを前記メモリ内に搭載するモジュールを備えており、
前記プログラムは、暗号鍵を用いて暗号化された上で格納される前記ファイルに対して検知されたアタック回数が許容回数を超えた場合、前記ファイルの暗号化のために使用した暗号鍵データまたは復号鍵データを前記不揮発性メモリ領域から削除することによって、前記ファイルの暗号化または復号化を不可能とする機能を有するモジュールを具備することを特徴とする。
The semiconductor device according to the present invention
It is equipped with a module that mounts a program in the memory that detects unauthorized access to files stored in the non-volatile memory area.
When the number of attacks detected on the file stored after being encrypted using the encryption key exceeds the permissible number, the program uses the encryption key data or the encryption key data for encrypting the file. It is characterized by including a module having a function of making it impossible to encrypt or decrypt the file by deleting the decryption key data from the non-volatile memory area.

前記メモリ内に格納される暗号鍵によりファイルが暗号化され、前記メモリ内に格納される復号鍵により暗号化されたファイルが平文化されて、前記メモリ内のファイルが読み書き処理されるタイプでも良い。 The file may be encrypted by the encryption key stored in the memory, the file encrypted by the decryption key stored in the memory may be plain-cultivated, and the file in the memory may be read / written. ..

ファイルの区分に応じて、暗号鍵およびアタック検知の許容回数が設定された状態でテーブル化されて、前記ファイルが不揮発性メモリ領域に格納されているタイプでも良い。 A type may be used in which the file is stored in the non-volatile memory area as a table in a state where the encryption key and the allowable number of times of attack detection are set according to the file classification.

本発明によるICカードは、
セキュリティデータを構成するファイルを格納し、前記ファイルへのパスワードによるアクセス管理を行なうICカードにおいて、
不揮発性メモリ領域に格納している前記ファイルに対する不正アクセス行為を検知するプログラムを前記メモリ内に搭載するモジュールを備えており、
前記プログラムは、暗号鍵を用いて暗号化された上で格納される前記ファイルに対する検知されたアタック回数が許容回数を超えた場合、前記ファイルの暗号化のために使用した暗号鍵データまたは復号鍵データを前記不揮発性メモリ領域から削除することによって、前記ファイルの復号を不可能とする機能を有するモジュールを具備することを特徴とする。
The IC card according to the present invention
In an IC card that stores files that make up security data and manages access to the files with a password.
It is equipped with a module in which a program for detecting an unauthorized access to the file stored in the non-volatile memory area is mounted in the memory.
When the number of detected attacks on the file stored after being encrypted using the encryption key exceeds the permissible number, the program uses the encryption key data or decryption key for encrypting the file. It is characterized by including a module having a function of making it impossible to decrypt the file by deleting the data from the non-volatile memory area.

本発明によるICカードに代表される半導体装置のデータ処理方法は、
半導体装置が有する不揮発性メモリ領域に格納されているファイルの読み書き処理を行なうデータ処理方法であって、
メモリに格納された認証情報であるPIN(Personal Identification Number)に対する照合を試みる回数を照合試行カウンタによりアタック検知回数として記憶しておき、
前記認証情報に対する照合の連続間違えを許容する回数を、予め設定したアタック許容回数としてメモリに記憶しておき、
不揮発性メモリ領域に格納しているファイルに対するアクセス制限の解除を目的とする前記認証情報との照合を要求する照合コマンドを外部のデータ処理装置から受信した場合、前記アタック検知回数が前記アタック許容回数に達しているか否かを判断し、
この判断により前記アタック検知回数が前記アタック許容回数に達していると判断した場合、前記ファイルが暗号化された上で格納するために用いられた暗号鍵または前記ファイルを平文化して読み出すために用いられる復号鍵をメモリから削除する、
ことを特徴とする。
The data processing method of a semiconductor device represented by an IC card according to the present invention is
A data processing method that reads and writes files stored in the non-volatile memory area of a semiconductor device.
The number of attempts to collate the PIN (Personal Identification Number), which is the authentication information stored in the memory, is stored as the number of attack detections by the collation attempt counter.
The number of times that the continuous error of collation with respect to the authentication information is allowed is stored in the memory as a preset allowable number of attacks.
When a collation command requesting collation with the authentication information for the purpose of releasing access restrictions to files stored in the non-volatile memory area is received from an external data processing device, the number of attack detections is the number of permissible attacks. Judging whether or not it has reached
When it is determined by this determination that the number of times the attack is detected has reached the permissible number of attacks, the encryption key used to store the file after being encrypted or the file is read in a plain culture. Delete the decryption key used from memory,
It is characterized by that.

悪意ある攻撃などに対して、消去に時間を要し、ファイルを構成するデータの一部が残ってしまう可能性がある不揮発性メモリ内の「強制的なファイル消却」でなく、「暗号鍵データのみを消却」することにより、暗号化されたファイルの復号が不可能となり、万一ファイルが流出しても情報漏洩が防止される。また、「暗号鍵を消却」することにより、ファイルに対しデータ改竄を防止することが可能であり、セキュリティ性は維持される。
さらに、一度攻撃を受けたICカードの再利用にあたっても、暗号化されたファイルはそのままに、暗号鍵データだけを再度書き込むことにより可能であるため、煩雑なICカードの再発行作業は不要となり、手続き上および資源上のロス解消にも有効である。
"Cryptographic key data" instead of "forced file deletion" in non-volatile memory, which takes time to erase and may leave some of the data that makes up the file against malicious attacks. By "erasing only", it becomes impossible to decrypt the encrypted file, and even if the file leaks, information leakage is prevented. In addition, by "erasing the encryption key", it is possible to prevent data tampering with the file, and security is maintained.
Furthermore, even when the IC card that has been attacked once is reused, it is possible to rewrite only the encryption key data while leaving the encrypted file as it is, so complicated reissuing work of the IC card becomes unnecessary. It is also effective in eliminating procedural and resource losses.

ICカード処理装置の構成例を概略的に示すブロック図。The block diagram which shows the structural example of the IC card processing apparatus schematicly. ICカードの内部構成例を概略的に示すブロック図。A block diagram schematically showing an example of an internal configuration of an IC card. 認証データテーブルの構成例を示す図。The figure which shows the configuration example of the authentication data table. 本発明の実施形態におけるICカードシステムの動作について、アタック検知処理の詳細を示すフローチャート。The flowchart which shows the detail of the attack detection processing about the operation of the IC card system in embodiment of this invention. ファイルの読み出し以降についてのICカードシステムの動作(アタック検知処理を割愛)を説明するフローチャート。A flowchart illustrating the operation of the IC card system (attack detection processing is omitted) after reading the file.

以下、図面を参照して、実施形態を説明する。 Hereinafter, embodiments will be described with reference to the drawings.

図1は、本発明の実施の形態に係るICカード2との通信機能を有する外部装置としてのICカード処理装置1の構成例を概略的に示すブロック図である。 FIG. 1 is a block diagram schematically showing a configuration example of an IC card processing device 1 as an external device having a communication function with the IC card 2 according to the embodiment of the present invention.

図1に示すように、ICカード処理装置1は、端末装置11,表示装置12,キーボード13,および、カードリーダライタ14などを有している。 As shown in FIG. 1, the IC card processing device 1 includes a terminal device 11, a display device 12, a keyboard 13, a card reader / writer 14, and the like.

端末装置11は、CPU,種々のメモリおよび各種インターフェースなどを有する装置により構成され、ICカード処理装置1全体の動作を制御する。端末装置11は、カードリーダライタ14によりICカード2へ送信するコマンドを制御する機能、ICカード2から受信したデータを基に種々の処理を行う機能などを有している。 The terminal device 11 is composed of a device having a CPU, various memories, various interfaces, and the like, and controls the operation of the entire IC card processing device 1. The terminal device 11 has a function of controlling a command transmitted to the IC card 2 by the card reader / writer 14, a function of performing various processes based on the data received from the IC card 2, and the like.

端末装置11は、カードリーダライタ14を介してICカード2にデータの書き込みコマンドを送信することによりICカード2内のメモリにデータを書き込んだり、ICカード2に読取コマンドを送信することによりICカード2からデータを読み出したりする。 The terminal device 11 writes data to the memory in the IC card 2 by transmitting a data write command to the IC card 2 via the card reader / writer 14, or transmits a read command to the IC card 2 to transmit the IC card. Read data from 2.

表示装置12は、端末装置11の制御により種々の情報を表示するディスプレイ装置である。キーボード13は、ICカード処理装置1の操作員が操作する操作部として機能し、操作員により種々の操作指示やデータなどが入力される。カードリーダライタ14は、ICカード2との通信を行うためのインターフェース装置である。カードリーダライタ14では、ICカード2に対する電源供給,クロック供給,リセット制御,データの送受信を行なうようになっている。このような機能によってカードリーダライタ14は、端末装置11による制御に基づいてICカード2を活性化(起動)させ、活性化させたICカード2へ種々のコマンドを送信したり、送信したコマンドに対する応答を受信したりするようになっている。 The display device 12 is a display device that displays various information under the control of the terminal device 11. The keyboard 13 functions as an operation unit operated by an operator of the IC card processing device 1, and various operation instructions and data are input by the operator. The card reader / writer 14 is an interface device for communicating with the IC card 2. The card reader / writer 14 supplies power to the IC card 2, clocks, resets, and sends / receives data. With such a function, the card reader / writer 14 activates (activates) the IC card 2 based on the control by the terminal device 11, transmits various commands to the activated IC card 2, and responds to the transmitted commands. It is designed to receive responses.

ICカード2は、ICカード処理装置1などの機器から電力などの供給を受けた際、活性化される(動作可能な状態になる)ようになっている。ICカード2が接触式通信によりICカード処理装置1と接続される場合、つまり、ICカード2が接触式のICカードで構成される場合、ICカード2は、通信インターフェースとしてのコンタクト部21を介してICカード処理装置1からの動作電源および動作クロックの供給を受けて活性化される。 The IC card 2 is activated (becomes operable) when it receives power or the like from a device such as the IC card processing device 1. When the IC card 2 is connected to the IC card processing device 1 by contact communication, that is, when the IC card 2 is composed of a contact IC card, the IC card 2 passes through the contact portion 21 as a communication interface. It is activated by receiving the supply of the operating power supply and the operating clock from the IC card processing device 1.

ICカード2が非接触式の通信方式によりICカード処理装置1と接続される場合、つまり、ICカード2が非接触式のICカードで構成される場合、ICカード2のコンタク
ト部21は、通信インターフェースとしてのアンテナおよび通信制御部等により構成される。この場合、ICカード2は、通信インターフェースとしてのコンタクト部21のアンテナおよび通信制御部等を介してICカード処理装置1からの電波を受信し、その電波から図示しない電源部により動作電源および動作クロックを生成して活性化するようになっている。
When the IC card 2 is connected to the IC card processing device 1 by a non-contact communication method, that is, when the IC card 2 is composed of a non-contact IC card, the contact portion 21 of the IC card 2 communicates. It is composed of an antenna as an interface, a communication control unit, and the like. In this case, the IC card 2 receives radio waves from the IC card processing device 1 via the antenna of the contact unit 21 as a communication interface, a communication control unit, and the like, and from the radio waves, an operating power supply and an operating clock are operated by a power supply unit (not shown). Is designed to be generated and activated.

次に、ICカード2の構成例について説明する。 Next, a configuration example of the IC card 2 will be described.

図2は、ICカード2の内部構成例を概略的に示すブロック図である。図2に示すように、ICカード2は、外部端子21,制御部22,RAM23,ROM24,不揮発性メモリ25などを有してしている。制御部22,RAM23,ROM24,不揮発性メモリ25は、例えば、ICチップ(図示せず)により構成され、ICカード2の筐体内に埋設されている。 FIG. 2 is a block diagram schematically showing an example of the internal configuration of the IC card 2. As shown in FIG. 2, the IC card 2 has an external terminal 21, a control unit 22, a RAM 23, a ROM 24, a non-volatile memory 25, and the like. The control unit 22, the RAM 23, the ROM 24, and the non-volatile memory 25 are composed of, for example, an IC chip (not shown) and are embedded in the housing of the IC card 2.

外部端子21は、ICカード処理装置1のカードリーダライタ14との通信用のインターフェースとして機能する。ICカード2が接触式のICカードとして実現される場合、外部端子21は、ICカード処理装置1のカードリーダライタ14と接触して信号の送受信を行うインターフェースとして構成される。また、ICカード2が非接触式のICカードとして実現される場合、外部端子21は、ICカード処理装置1のカードリーダライタ14との電波の送受信を行うインターフェースとして構成される。 The external terminal 21 functions as an interface for communication with the card reader / writer 14 of the IC card processing device 1. When the IC card 2 is realized as a contact-type IC card, the external terminal 21 is configured as an interface that contacts the card reader / writer 14 of the IC card processing device 1 to transmit and receive signals. When the IC card 2 is realized as a non-contact type IC card, the external terminal 21 is configured as an interface for transmitting and receiving radio waves to and from the card reader / writer 14 of the IC card processing device 1.

制御部22は、ICカード2全体の制御を司る。制御部22は、ROM24あるいは不揮発性メモリ25に記憶された制御プログラムに基づいて動作することにより判断手段や種々の処理手段として機能する。RAM23は、ワーキングメモリとして機能する揮発性のメモリである。RAM23は、制御部22が処理中のデータなどを一時保管するバッファとして機能し、例えば、外部端子21を介してICカード処理装置1から受信したデータを一時保管するようになっている。 The control unit 22 controls the entire IC card 2. The control unit 22 functions as a determination means and various processing means by operating based on the control program stored in the ROM 24 or the non-volatile memory 25. The RAM 23 is a volatile memory that functions as a working memory. The RAM 23 functions as a buffer for temporarily storing data being processed by the control unit 22, and for example, temporarily stores data received from the IC card processing device 1 via the external terminal 21.

ROM24は、予め制御用のプログラムや制御データなどが記憶されている不揮発性のメモリである。ROM24は、製造段階でICカード2内に組み込まれるものであり、ROM24に記憶されている制御プログラムは、予めICカード2の仕様に応じて組み込まれる。 The ROM 24 is a non-volatile memory in which control programs, control data, and the like are stored in advance. The ROM 24 is incorporated in the IC card 2 at the manufacturing stage, and the control program stored in the ROM 24 is incorporated in advance according to the specifications of the IC card 2.

ROM24には、不揮発性メモリ領域に格納しているファイルに対する不正アクセス行為を検知するためのアタック検知処理プログラム24gを備えており、前記プログラム24gは、暗号鍵を用いて暗号化された上で格納される前記ファイルに対して検知されたアタック回数が許容回数を超えた場合、前記ファイルの暗号化のために使用した暗号鍵データまたは復号鍵データを前記不揮発性メモリ領域から削除することによって、前記ファイルの復号を不可能とする機能を発揮する。(手順は後述する)
不揮発性メモリ25は、例えば、EEPROMあるいはフラッシュROMなどのデータの書込み及び書き換えが可能な不揮発性のメモリにより構成される。不揮発性メモリ25には、ICカード2の運用用途に応じてプログラムファイルやデータファイルなどが定義され、それらのファイルにデータが書き込まれる。また、不揮発性メモリ25内には、認証情報やその認証情報に対する照合処理に関する情報などを記憶する認証データテーブル25aが設けられている。また、複数の認証情報を設定する場合、不揮発性メモリ25は、各認証情報毎に認証データテーブル25aが設けられ、各認証情報及び各認証情報による照合処理に関する情報が記憶される。
The ROM 24 includes an attack detection processing program 24g for detecting an unauthorized access act to a file stored in the non-volatile memory area, and the program 24g is stored after being encrypted using an encryption key. When the number of attacks detected for the file exceeds the permissible number, the encryption key data or decryption key data used for encrypting the file is deleted from the non-volatile memory area. Demonstrates a function that makes it impossible to decrypt files. (The procedure will be described later)
The non-volatile memory 25 is composed of, for example, a non-volatile memory such as an EEPROM or a flash ROM capable of writing and rewriting data. A program file, a data file, or the like is defined in the non-volatile memory 25 according to the operational use of the IC card 2, and data is written in these files. Further, in the non-volatile memory 25, an authentication data table 25a for storing authentication information and information related to collation processing for the authentication information is provided. Further, when a plurality of authentication information is set, the non-volatile memory 25 is provided with an authentication data table 25a for each authentication information, and stores each authentication information and information related to the collation processing by each authentication information.

次に、不揮発性メモリ25内に設けられる認証データテーブル25aについて説明する。
図3(a)は、認証データテーブル25aの構成例を示す図である。図3(a)に示す構成例では、認証データテーブル25aは、認証情報(PINデータ)の記憶領域251,照合回数の記憶領域252,許容照合回数の記憶領域253を有している。
Next, the authentication data table 25a provided in the non-volatile memory 25 will be described.
FIG. 3A is a diagram showing a configuration example of the authentication data table 25a. In the configuration example shown in FIG. 3A, the authentication data table 25a has a storage area 251 for authentication information (PIN data), a storage area 252 for the number of collations, and a storage area 253 for the permissible number of collations.

記憶領域251は、第1の記憶手段として機能する。記憶領域251には、認証情報(PINデータ)が記憶される。記憶領域251に記憶される認証情報は、正当なユーザーのみが知りうる情報であり、予め記憶される情報である。ICカードを利用する際、記憶領域251に記憶されている認証情報とユーザーが指定する情報とを照合することによりユーザーがICカードの正当な所有者であるか否かが認証される。 The storage area 251 functions as a first storage means. Authentication information (PIN data) is stored in the storage area 251. The authentication information stored in the storage area 251 is information that only a legitimate user can know, and is information that is stored in advance. When using an IC card, whether or not the user is a legitimate owner of the IC card is authenticated by collating the authentication information stored in the storage area 251 with the information specified by the user.

例えば、ATMでキャッシュカードやクレジットカードを使う場合、カードに内蔵されたICチップの中にあるPINデータとの照合が、ATM端末を通じて行なわれる。ユーザーが入力するPIN(Personal Identification Number)の照合の結果、合致すればICカード内のデジタルな認証情報が取り出され、その情報だけがネットワークを通じてサーバに伝達され、サーバ上で再度認証が行なわれる。 For example, when a cash card or a credit card is used at an ATM, the matching with the PIN data in the IC chip built in the card is performed through the ATM terminal. As a result of collation of the PIN (Personal Identification Number) input by the user, if they match, the digital authentication information in the IC card is taken out, only that information is transmitted to the server through the network, and the authentication is performed again on the server.

照合回数の記憶領域252は、第2の記憶手段として機能し、照合処理を行った積算回数が記憶されるカウンタとして機能する。照合試行カウンタ252は、初期状態(リセットされた状態)において記憶領域253に記憶されている許容照合回数(この値を初期値とする)が格納されており、照合処理を実行する直前、あるいは、照合処理による照合が失敗した際、照合処理を試行した積算回数を示す値としてのカウンタ値がカウントされる。また、照合試行カウンタ252は、照合処理が成功した際に初期値(許容照合回数)に書き換えられる(リセットされる)。 The collation count storage area 252 functions as a second storage means, and functions as a counter for storing the cumulative number of collation processes. The collation trial counter 252 stores the allowable number of collations (with this value as the initial value) stored in the storage area 253 in the initial state (reset state), and is immediately before executing the collation process or or When the collation by the collation process fails, the counter value is counted as a value indicating the number of times the collation process is tried. Further, the collation trial counter 252 is rewritten (reset) to an initial value (allowable number of collations) when the collation process is successful.

許容照合回数の記憶領域253は、第3の記憶手段として機能し、連続して実行される照合処理の回数に対する許容回数を示す値が記憶される。記憶領域253に記憶される値は、照合の失敗に伴って再試行される回数として連続的に実行される照合処理の回数の許容値(以下、許容照合回数と称する)を示すものであり、照合試行カウンタ252によりカウントされる値に対する許容値を示す。また、記憶領域253に記憶される許容照合回数は、予め設定される情報である。 The storage area 253 for the number of allowable collations functions as a third storage means, and stores a value indicating the number of permissible times with respect to the number of collation processes executed continuously. The value stored in the storage area 253 indicates an allowable value (hereinafter, referred to as an allowable collation number) of the number of collation processes continuously executed as the number of retries due to a collation failure. An allowable value for the value counted by the collation trial counter 252 is shown. Further, the allowable number of collations stored in the storage area 253 is preset information.

ICカード2内の不揮発性メモリ25には、データ(ICカードでは、「ファイル」という概念が適用される。以降は、データの集合を意図してファイルと称する。)を暗号化するための鍵(以下、暗号鍵と称する)を用いて暗号化された状態で各ファイルが格納されている。暗号化されて格納されたファイル内のデータの読み出しにあたっては、ファイルを復号化するための鍵(以下、復号鍵と称する)を用いて平文化して読み出す。また、不揮発性メモリ25には、ファイルへのアクセス権の種類に対応する数のパスワードデータが格納されており、アクセス権の許可は、ファイル毎に規定されたアクセス権に対応したパスワードを照合することで行なっている。表1に示すように、ファイル別にアタック(パスワード誤入力)を検知する許容回数が設定され、アクセス制限が規定されている。 A key for encrypting data (in the IC card, the concept of "file" is applied. Hereinafter, a set of data is intentionally referred to as a file) to the non-volatile memory 25 in the IC card 2. Each file is stored in a state of being encrypted using (hereinafter referred to as an encryption key). When reading the data in the encrypted and stored file, the key for decrypting the file (hereinafter referred to as the decryption key) is used to read the data in a plain culture. Further, the non-volatile memory 25 stores a number of password data corresponding to the type of access right to the file, and the permission of the access right collates the password corresponding to the access right specified for each file. I am doing it. As shown in Table 1, the permissible number of times to detect an attack (wrong password input) is set for each file, and access restrictions are stipulated.

Figure 2020190868
Figure 2020190868

次に、上記構成からなるICカードシステムの動作を説明する。図3(b)は、ROM24内に設けられるアタック検知プログラム24gの構成例を示す図であり、図4は、本実施形態におけるICカードシステムの動作について、アタック検知処理の詳細を示すフローチャートである。図4では、アタック検知方法の一例として、PINデータとの照合手順を説明する。
当該ファイルに設定されている読み出し命令に対応するアクセス制限を解除するためのPIN入力に応じたPIN照合コマンドがICカードに送信される。(S101)。そし
て、ICカードは受信したPINデータがICカード内に格納されているものと同一か否かを比較照合する(S102)。
Next, the operation of the IC card system having the above configuration will be described. FIG. 3B is a diagram showing a configuration example of an attack detection program 24g provided in the ROM 24, and FIG. 4 is a flowchart showing details of an attack detection process regarding the operation of the IC card system in the present embodiment. .. In FIG. 4, a collation procedure with PIN data will be described as an example of the attack detection method.
A PIN verification command corresponding to the PIN input for releasing the access restriction corresponding to the read instruction set in the file is transmitted to the IC card. (S101). Then, the IC card compares and collates whether or not the received PIN data is the same as that stored in the IC card (S102).

ここで、受信したPINデータがICカード内に格納されているものと同一であれば(S103でYES)、アクセス権を当該読み出し命令に与えるべく、アタック検知回数をリセット(S109)した上で、当該PINの照合状態を照合成功状態に設定し(S110)、照合が成功した旨のステータスワードを端末側に返信する(S111)。 Here, if the received PIN data is the same as that stored in the IC card (YES in S103), the number of attack detections is reset (S109) in order to give the access right to the read instruction, and then The matching state of the PIN is set to the matching successful state (S110), and a status word indicating that the matching is successful is returned to the terminal side (S111).

一方、S103において、受信したPINデータがICカード内に格納されているものと同一でない場合は、当該PINの照合不成功と認識し、アタック検知回数カウンタにおける変数である連続間違え回数に1を加算する(S104)。 On the other hand, in S103, if the received PIN data is not the same as the one stored in the IC card, it is recognized that the PIN is collated unsuccessfully, and 1 is added to the number of consecutive mistakes, which is a variable in the attack detection count counter. (S104).

そして、その加算した連続間違え回数(フローチャートでは、「アタック検知回数」と記載する)と事前に規定している連続間違え許容回数(フローチャートでは、「アタック許容回数」または「許容回数」と記載する)とを照らし合わせ(S105)、当該連続間違え回数が連続間違え許容回数よりも大きくなった場合(S106でYES)は、不揮発性メモリに格納されている当該ファイルを暗号化するために用いられた暗号鍵データ、または暗号化されたファイルを復号化するために用いられる復号鍵データが消却される。(S107)鍵データの消却は、ファイルの取り扱いに応じて、暗号化/復号化で用いられる鍵が同じ暗号方式の場合は「共通鍵」が消却されることになり、暗号化/復号化で用いられる鍵が別々の暗号方式の場合は「公開鍵」が消却されることになる。 Then, the added number of consecutive mistakes (described as "attack detection number" in the flowchart) and the number of consecutive mistakes allowed in advance (described as "attack allowable number" or "allowable number" in the flowchart). When the number of consecutive mistakes exceeds the permissible number of consecutive mistakes (YES in S106), the encryption used to encrypt the file stored in the non-volatile memory is used. The key data, or the decryption key data used to decrypt the encrypted file, is erased. (S107) When deleting the key data, the "common key" is deleted when the key used for encryption / decryption is the same encryption method according to the handling of the file, and the encryption / decryption is performed. If the keys used are different encryption methods, the "public key" will be canceled.

そして、照合が失敗した旨を端末側にステータスワードとして送信する(S108)。 Then, the fact that the collation has failed is transmitted to the terminal side as a status word (S108).

暗号鍵の強制削除が実行された場合、ICカードへの不正アクセスが行なわれたものとみなされ、「異常終了」と判定される。 When the forcible deletion of the encryption key is executed, it is considered that the IC card has been illegally accessed, and it is determined as "abnormal termination".

図5は、PINデータの比較照合(S102)の結果に応じたファイルの読み出し以降についてのICカードシステムの動作(アタック検知処理を割愛)を説明するフローである。PIN照合が不成功である場合(S203でNO)、ファイルアクセス権限がない旨のステータスワードがデータ処理装置に送信される(S207)。PIN照合が成功である場合(S203でYES)、暗号化された上で格納されるファイルの読み出し処理を行なうか(S204でYES)、あるいはファイルに対してデータ書き込みを行なうか(S204でNO)の処理が選択される。ここで、次ステップの認証処理が行なわれる。 FIG. 5 is a flow for explaining the operation of the IC card system (attack detection processing is omitted) after reading the file according to the result of the comparison and collation of PIN data (S102). If the PIN collation is unsuccessful (NO in S203), a status word indicating that you do not have file access authority is transmitted to the data processing device (S207). If the PIN verification is successful (YES in S203), read the encrypted file (YES in S204) or write data to the file (NO in S204). Processing is selected. Here, the authentication process of the next step is performed.

ファイル読み出しでは、復号鍵で暗号化されたファイルの復号が試みられ(S205)、成功した場合には、操作者に平文化されたデータがデータ処理装置を通じて送信される。 データ書き込みでは、暗号鍵を用いてデータの暗号化が試みられ(S208)、成功した場合には、ファイル内に暗号化されたデータが追記された旨が、処理装置を通じて送信される。 In file reading, decryption of the file encrypted with the decryption key is attempted (S205), and if successful, the plain-cultivated data is transmitted to the operator through the data processing device. In data writing, encryption of data is attempted using an encryption key (S208), and if successful, the fact that the encrypted data has been added to the file is transmitted through the processing device.

ファイル読み出し,データ書き込みの何れの処理においても、認証処理での不適合が確認され、許容回数以上のアタックとみなされた場合(S212)は不正アクセスが行なわれたものとみなされ、暗号鍵または復号鍵は削除され、「異常終了」と判定される。暗号鍵または復号鍵の削除により、格納されてあるファイルを消去することなく、不正な読み出し,書き込みからのファイルが保護され、情報漏洩や改竄防止が実現される。 In both the file read and data write processes, if nonconformity in the authentication process is confirmed and the attack is considered to be more than the allowable number of attacks (S212), it is considered that unauthorized access has been performed, and the encryption key or decryption is performed. The key is deleted and it is determined to be "abnormal termination". By deleting the encryption key or decryption key, the file is protected from unauthorized reading and writing without erasing the stored file, and information leakage and falsification can be prevented.

本実施形態によれば、パスワード照合の検証回数に制限がかけられるので、パスワードの再送攻撃を行うと、上限値を超えた場合にユーザーの意図に関わらずに強制的に暗号鍵が消去されるため、不揮発性メモリ内には暗号化されたファイルが残され、復号は不可能
な状態のファイルが格納されたICカードのみが残ることになり、ファイル漏洩を防ぐことができる。
According to this embodiment, the number of times the password verification is verified is limited. Therefore, when the password is retransmitted, the encryption key is forcibly erased regardless of the user's intention when the upper limit is exceeded. Therefore, the encrypted file is left in the non-volatile memory, and only the IC card in which the file in the undecryptable state is stored remains, so that the file leakage can be prevented.

1 ICカード処理装置
2 ICカード
21 外部端子
22 制御部
23 RAM
24 ROM
24g,241 アタック検知処理プログラム
25 不揮発性メモリ
25a 認証データテーブル
251 認証情報(PINデータ)の記憶領域
252 照合回数の記憶領域
253 許容照合回数の記憶領域
254 照合中断回数の記憶領域
255 許容中断回数の記憶領域
11 端末装置
12 表示装置
13 キーボード
14 カードリーダライタ
1 IC card processing device 2 IC card 21 External terminal 22 Control unit 23 RAM
24 ROM
24g, 241 Attack detection processing program 25 Non-volatile memory 25a Authentication data table 251 Storage area for authentication information (PIN data) 252 Storage area for collation count 253 Storage area for permissible collation count 254 Storage area for collation interruption count 255 Permissible interruption count Storage area 11 Terminal device 12 Display device 13 Keyboard 14 Card reader / writer

Claims (5)

不揮発性メモリ領域に格納しているファイルに対する不正アクセス行為を検知するプログラムを前記メモリ内に搭載するモジュールを備えており、
前記プログラムは、暗号鍵を用いて暗号化された上で格納される前記ファイルに対して検知されたアタック回数が許容回数を超えた場合、前記ファイルの暗号化のために使用した暗号鍵データまたは復号鍵データを前記不揮発性メモリ領域から削除することによって、前記ファイルの暗号化または復号化を不可能とする機能を有するモジュールを具備することを特徴とする半導体装置。
It is equipped with a module that mounts a program in the memory that detects unauthorized access to files stored in the non-volatile memory area.
When the number of attacks detected on the file stored after being encrypted using the encryption key exceeds the permissible number, the program uses the encryption key data or the encryption key data for encrypting the file. A semiconductor device comprising a module having a function of making it impossible to encrypt or decrypt the file by deleting the decryption key data from the non-volatile memory area.
前記メモリ内に格納される暗号鍵によりファイルが暗号化され、前記メモリ内に格納される復号鍵により暗号化されたファイルが平文化されて、前記メモリ内のファイルが読み書き処理されることを特徴とする請求項1記載の半導体装置。 The file is encrypted by the encryption key stored in the memory, the file encrypted by the decryption key stored in the memory is flattened, and the file in the memory is read / written. The semiconductor device according to claim 1. ファイルの区分に応じて、暗号鍵およびアタック検知の許容回数が設定された状態でテーブル化されて、前記ファイルが不揮発性メモリ領域に格納されていることを特徴とする請求項1記載の半導体装置。 The semiconductor device according to claim 1, wherein the file is stored in a non-volatile memory area as a table in a state where an encryption key and an allowable number of attack detections are set according to the file classification. .. セキュリティデータを構成するファイルを格納し、前記ファイルへのパスワードによるアクセス管理を行なうICカードにおいて、
不揮発性メモリ領域に格納している前記ファイルに対する不正アクセス行為を検知するプログラムを前記メモリ内に搭載するモジュールを備えており、
前記プログラムは、暗号鍵を用いて暗号化された上で格納される前記ファイルに対する検知されたアタック回数が許容回数を超えた場合、前記ファイルの暗号化のために使用した暗号鍵データまたは復号鍵データを前記不揮発性メモリ領域から削除することによって、前記ファイルの復号を不可能とする機能を有するモジュールを具備することを特徴とするICカード。
In an IC card that stores files that make up security data and manages access to the files with a password.
It is equipped with a module in which a program for detecting an unauthorized access to the file stored in the non-volatile memory area is mounted in the memory.
When the number of detected attacks on the file stored after being encrypted using the encryption key exceeds the permissible number, the program uses the encryption key data or decryption key for encrypting the file. An IC card comprising a module having a function of making it impossible to decrypt the file by deleting data from the non-volatile memory area.
半導体装置が有する不揮発性メモリ領域に格納されているファイルの読み書き処理を行なうデータ処理方法であって、
メモリに格納された認証情報であるPIN(Personal Identification Number)に対する照合を試みる回数を照合試行カウンタによりアタック検知回数として記憶しておき、
前記認証情報に対する照合の連続間違えを許容する回数を、予め設定したアタック許容回数としてメモリに記憶しておき、
不揮発性メモリ領域に格納しているファイルに対するアクセス制限の解除を目的とする前記認証情報との照合を要求する照合コマンドを外部のデータ処理装置から受信した場合、前記アタック検知回数が前記アタック許容回数に達しているか否かを判断し、
この判断により前記アタック検知回数が前記アタック許容回数に達していると判断した場合、前記ファイルが暗号化された上で格納するために用いられた暗号鍵または前記ファイルを平文化して読み出すために用いられる復号鍵をメモリから削除する、
ことを特徴とするデータ処理方法。
A data processing method that reads and writes files stored in the non-volatile memory area of a semiconductor device.
The number of attempts to collate the PIN (Personal Identification Number), which is the authentication information stored in the memory, is stored as the number of attack detections by the collation attempt counter.
The number of times that the continuous error of collation with respect to the authentication information is allowed is stored in the memory as a preset allowable number of attacks.
When a collation command requesting collation with the authentication information for the purpose of releasing access restrictions to files stored in the non-volatile memory area is received from an external data processing device, the number of attack detections is the number of permissible attacks. Judging whether or not it has reached
When it is determined by this determination that the number of times the attack is detected has reached the permissible number of attacks, the encryption key used to store the file after being encrypted or the file is read in a plain culture. Delete the decryption key used from memory,
A data processing method characterized by that.
JP2019095216A 2019-05-21 2019-05-21 Semiconductor device, ic card, and data processing method Pending JP2020190868A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019095216A JP2020190868A (en) 2019-05-21 2019-05-21 Semiconductor device, ic card, and data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019095216A JP2020190868A (en) 2019-05-21 2019-05-21 Semiconductor device, ic card, and data processing method

Publications (1)

Publication Number Publication Date
JP2020190868A true JP2020190868A (en) 2020-11-26

Family

ID=73455121

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019095216A Pending JP2020190868A (en) 2019-05-21 2019-05-21 Semiconductor device, ic card, and data processing method

Country Status (1)

Country Link
JP (1) JP2020190868A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113569237A (en) * 2021-07-29 2021-10-29 武汉天喻信息产业股份有限公司 Attack protection method, device, equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11306088A (en) * 1998-04-27 1999-11-05 Toppan Printing Co Ltd Ic card and ic card system
JP2005011151A (en) * 2003-06-20 2005-01-13 Renesas Technology Corp Memory card
JP2005190348A (en) * 2003-12-26 2005-07-14 Fuji Xerox Co Ltd Information processor
JP2009253783A (en) * 2008-04-09 2009-10-29 Nec Saitama Ltd Mobile terminal, data protection method and program for data protection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11306088A (en) * 1998-04-27 1999-11-05 Toppan Printing Co Ltd Ic card and ic card system
JP2005011151A (en) * 2003-06-20 2005-01-13 Renesas Technology Corp Memory card
JP2005190348A (en) * 2003-12-26 2005-07-14 Fuji Xerox Co Ltd Information processor
JP2009253783A (en) * 2008-04-09 2009-10-29 Nec Saitama Ltd Mobile terminal, data protection method and program for data protection

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113569237A (en) * 2021-07-29 2021-10-29 武汉天喻信息产业股份有限公司 Attack protection method, device, equipment and readable storage medium
CN113569237B (en) * 2021-07-29 2024-04-02 武汉天喻信息产业股份有限公司 Attack protection method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US7418602B2 (en) Memory card
US9979540B2 (en) System and method for updating read-only memory in smart card memory modules
US8930711B2 (en) Critical security parameter generation and exchange system and method for smart-card memory modules
TWI384366B (en) Intelligent controller system and method for smart card memory modules
KR100214817B1 (en) Method and apparatus for loading a protected memory zone in data processing equipment
US6957338B1 (en) Individual authentication system performing authentication in multiple steps
TWI524275B (en) Storage device and method of operating a storage device
US9047727B2 (en) Portable electronic device and method for securing such device
US20080120726A1 (en) External storage device
US8339240B2 (en) Semiconductor element, biometric authentication method, biometric authentication system and mobile terminal
US20090184799A1 (en) Information storage medium and information storage medium processing apparatus
JP2020190868A (en) Semiconductor device, ic card, and data processing method
JP2006155159A (en) Tamper-proof device
WO2006093238A1 (en) Authentication assisting device, authentication main device, integrated circuit, and authenticating method
JP2009032003A (en) Portable electronic device, terminal device, authentication system, and authentication method
JP4832926B2 (en) Portable data storage device and data read control method
JP2007141113A (en) Ic card having biometrics authentication function and ic card program
US8430323B2 (en) Electronic device and associated method
JP2006293875A (en) Settlement system cooperating with biological authentication, and settlement terminal for ic card and ic card for use in the same
US20180183597A1 (en) Method for the security of an electronic operation with a chip card
JP7380603B2 (en) Secure device, command execution management method, and IC chip
JP2008033549A (en) Portable electronic device, ic card, and important data concealment method for portable electronic device
JPH07200756A (en) Portable data carrier processing system
JP4899499B2 (en) IC card issuing method, IC card issuing system, and IC card
KR200334484Y1 (en) Security apparatus of input device for atm

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220420

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230201

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230207

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230410

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20230711