Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7206869B2 - Encrypted communication system and encrypted communication method - Google Patents
[go: Go Back, main page]

JP7206869B2 - Encrypted communication system and encrypted communication method - Google Patents

Encrypted communication system and encrypted communication method Download PDF

Info

Publication number
JP7206869B2
JP7206869B2 JP2018228074A JP2018228074A JP7206869B2 JP 7206869 B2 JP7206869 B2 JP 7206869B2 JP 2018228074 A JP2018228074 A JP 2018228074A JP 2018228074 A JP2018228074 A JP 2018228074A JP 7206869 B2 JP7206869 B2 JP 7206869B2
Authority
JP
Japan
Prior art keywords
session key
card
command
secure messaging
access device
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.)
Active
Application number
JP2018228074A
Other languages
Japanese (ja)
Other versions
JP2020092323A (en
Inventor
和重 荒井
祐樹 岩井
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 Inc
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 Inc filed Critical Toppan Inc
Priority to JP2018228074A priority Critical patent/JP7206869B2/en
Publication of JP2020092323A publication Critical patent/JP2020092323A/en
Application granted granted Critical
Publication of JP7206869B2 publication Critical patent/JP7206869B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、通信データのセキュアメッセージングで、よりセキュアな通信を実現する暗号化通信システム及び暗号化通信方法に関する。 The present invention relates to an encrypted communication system and an encrypted communication method for realizing more secure communication in secure messaging of communication data.

従来から、ICカード等のICチップとICカードアクセス装置等との間でデータを送受信する際には、特許文献1の様に、第三者によるデータの傍受等によるデータの受信及び読み取りを回避するために、セッション鍵を用いたセキュアセッションを確立して行う暗号化通信が行われている。 Conventionally, when data is transmitted and received between an IC chip such as an IC card and an IC card access device or the like, as in Patent Document 1, data reception and reading due to data interception by a third party is avoided. For this purpose, encrypted communication is performed by establishing a secure session using a session key.

特開2002-344438号公報JP-A-2002-344438

特許文献1に記載された暗号化通信では、ICカード側とICカードアクセス装置側とが、共有する乱数をもとに、互いに同じセッション鍵を生成し、そのセッション鍵を用いたセキュアセッションを確立して暗号化通信を行う。しかし、第三者に通信が傍受され解析されセッション鍵を知られてしまうと、次の暗号化された通信の内容が知られてしまい、秘匿すべき通信内容が第三者に知られてしまう恐れがあった。 In the encrypted communication described in Patent Document 1, the IC card side and the IC card access device side generate the same session key based on a shared random number, and establish a secure session using that session key. encrypted communication. However, if the communication is intercepted and analyzed by a third party and the session key is known, the content of the next encrypted communication will be known, and the communication content that should be kept confidential will be known to the third party. I was afraid.

そこで、本発明の課題は、かかる従来の問題を解決し、セキュアメッセージングで利用するセッション鍵の秘匿性を高くし、通信の秘匿性を高めた暗号化通信システム及び暗号化通信方法を提供することを目的とする。 Accordingly, an object of the present invention is to provide an encrypted communication system and an encrypted communication method that solve the above-described conventional problems, increase the confidentiality of session keys used in secure messaging, and increase the confidentiality of communications. With the goal.

上記課題を解決するため、本発明は、第1の通信装置と第2の通信装置間でセキュアメッセージングコマンドを通信する通信システムの暗号化通信システムであって、
第1の通信装置と第2の通信装置が、それぞれ、暗号化手段と、復号手段と、セッション鍵変更演算手段を備え、
前記第1の通信装置と第2の通信装置が第1の初期化セッション鍵と第2の初期化セッション鍵を共有し、第2の初期化セッション鍵を前記セキュアメッセージングコマンドによる最初のコマンド処理に用いる現用のセッション鍵とし、第1の初期化セッション鍵を旧セッション鍵とし、
前記セキュアメッセージングコマンドによるコマンド処理を行う都度、現用のセッション鍵と旧セッション鍵を演算することで新セッション鍵を作成し、現用のセッション鍵を旧セッション鍵にし、
新セッション鍵を、次のセキュアメッセージングコマンドによるコマンド処理を行う際に用いる現用のセッション鍵にして用いて暗号化通信を行う
事を特徴とする暗号化通信システムである。
To solve the above problems, the present invention provides an encrypted communication system for communication of secure messaging commands between a first communication device and a second communication device, comprising:
each of the first communication device and the second communication device comprises encryption means, decryption means, and session key change calculation means;
The first communication device and the second communication device share a first initialization session key and a second initialization session key, and pass the second initialization session key to initial command processing with the secure messaging command. Let the current session key to be used, let the first initialization session key be the old session key,
generating a new session key by calculating the current session key and the old session key each time the command processing by the secure messaging command is performed, and making the current session key the old session key;
An encrypted communication system characterized in that encrypted communication is performed by using a new session key as a current session key to be used when performing command processing according to the next secure messaging command .

本発明は、上記の構成により、1つのセキュアメッセージングコマンドによるコマンド処理を行う都度にセッション鍵を動的に更新することで、第三者に通信を傍受され解析されセッション鍵が知られたとしても、そのセッション鍵は次の通信では利用されないので、それでは通信内容が読み取れず、通信の秘匿性を高くしたセキュアメッセージングが行える暗号化通信システムが得られる効果がある。 With the above configuration, the present invention dynamically updates the session key each time a command is processed using one secure messaging command. Since the session key is not used in the next communication, the content of the communication cannot be read, and an encrypted communication system capable of performing secure messaging with high communication confidentiality can be obtained.

また、本発明は、上記の暗号化通信システムであって、
前記第1の通信装置と第2の通信装置が、前記セッション鍵を変更する複数の演算アルゴリズムを共有し、前記セッション鍵変更演算手段が前記複数の演算アルゴリズムを同期して切り替えて用いて前記セッション鍵を変更する
事を特徴とする暗号化通信システムである。
Further, the present invention provides the encrypted communication system described above,
The first communication device and the second communication device share a plurality of arithmetic algorithms for changing the session key, and the session key change arithmetic means synchronizes and switches among the plurality of arithmetic algorithms to use the session key. It is an encryption communication system characterized by changing the key.

また、本発明は、上記の暗号化通信システムであって、前記第1の通信装置がICカードアクセス装置であり、前記第2の通信装置がICカードである事を特徴とする暗号化通信システムである。 Further, the present invention is the encrypted communication system described above, wherein the first communication device is an IC card access device, and the second communication device is an IC card. is.

また、本発明は、第1の通信装置と第2の通信装置間でセキュアメッセージングコマンドを通信する通信システムの暗号化通信方法であって、
第1の通信装置と第2の通信装置が、それぞれ、暗号化手段と、復号手段と、セッション鍵変更演算手段を備え、
前記第1の通信装置と第2の通信装置が第1の初期化セッション鍵と第2の初期化セッション鍵を共有し、第2の初期化セッション鍵を前記セキュアメッセージングコマンドによる最初のコマンド処理に用いる現用のセッション鍵とし、第1の初期化セッション鍵を旧セッション鍵とし、
前記セキュアメッセージングコマンドによるコマンド処理を行う都度、現用のセッション鍵と旧セッション鍵を演算することで新セッション鍵を作成し、現用のセッション鍵を旧セッション鍵にし、
新セッション鍵を、次のセキュアメッセージングコマンドによるコマンド処理を行う際に用いる現用のセッション鍵にして用いて暗号化通信を行う
事を特徴とする暗号化通信方法である。
The present invention also provides an encrypted communication method for a communication system for communicating a secure messaging command between a first communication device and a second communication device, comprising:
each of the first communication device and the second communication device comprises encryption means, decryption means, and session key change calculation means;
The first communication device and the second communication device share a first initialization session key and a second initialization session key, and pass the second initialization session key to initial command processing with the secure messaging command. Let the current session key to be used, let the first initialization session key be the old session key,
generating a new session key by calculating the current session key and the old session key each time the command processing by the secure messaging command is performed, and making the current session key the old session key;
This encrypted communication method is characterized by performing encrypted communication using a new session key as a current session key to be used when performing command processing according to the next secure messaging command .

また、本発明は、上記の暗号化通信方法であって、
前記第1の通信装置と第2の通信装置が、前記セッション鍵を変更する複数の演算アルゴリズムを共有し、前記セッション鍵変更演算手段が前記複数の演算アルゴリズムを同期して切り替えて用いて前記セッション鍵を変更する
事を特徴とする暗号化通信方法である。
Further, the present invention provides the encrypted communication method described above,
The first communication device and the second communication device share a plurality of arithmetic algorithms for changing the session key, and the session key change arithmetic means synchronizes and switches among the plurality of arithmetic algorithms to use the session key. It is an encrypted communication method characterized by changing the key.

また、本発明は、上記の暗号化通信方法であって、前記第1の通信装置がICカードアクセス装置であり、前記第2の通信装置がICカードである事を特徴とする暗号化通信方法である。 Further, the present invention is the encrypted communication method described above, wherein the first communication device is an IC card access device, and the second communication device is an IC card. is.

本発明によれば、1つのセキュアメッセージングコマンドによるコマンド処理を行う都度にセッション鍵を動的に更新する。すなわち、セッション毎ではなく、コマンドを送信する度にセッション鍵を変更することで、第三者に通信を傍受され解析されセッション鍵が知られたとしても、そのセッション鍵は次の通信では利用されない。そのため、セッション鍵が第三者に知られてしまった場合でも、データ漏洩をなくすことができ、秘匿性を高くしたセキュアメッセージングが行える暗号化通信システムが得られる効果がある。 According to the present invention, the session key is dynamically updated each time a command processing by one secure messaging command is performed. In other words, by changing the session key each time a command is sent instead of each session, even if a third party intercepts and analyzes the communication and the session key is known, the session key will not be used in the next communication. . Therefore, even if the session key is known to a third party, it is possible to eliminate data leakage and obtain an encrypted communication system capable of performing secure messaging with high confidentiality.

本発明の第1の実施形態の暗号化通信システムの機能構成を示すブロック図である。1 is a block diagram showing the functional configuration of an encryption communication system according to a first embodiment of the present invention; FIG. 本発明の第1の実施形態の暗号化通信システムで用いるセキュアメッセージングコマンドのデータフォーマットを示す図である。FIG. 4 is a diagram showing a data format of a secure messaging command used in the encrypted communication system of the first embodiment of the present invention; FIG. 本発明の第1の実施形態の暗号化通信システムの動作を示すフローチャート(その1)である。4 is a flowchart (part 1) showing the operation of the encrypted communication system according to the first embodiment of the present invention; 本発明の第1の実施形態の暗号化通信システムの動作を示すフローチャート(その2)である。2 is a flowchart (part 2) showing the operation of the encrypted communication system according to the first embodiment of the present invention; 本発明の第1の実施形態の暗号化通信システムの動作を示すフローチャート(その3)である。3 is a flowchart (part 3) showing the operation of the encrypted communication system according to the first embodiment of the present invention; 本発明の第1の実施形態の暗号化通信システムの動作を示すフローチャート(その4)である。4 is a flowchart (part 4) showing the operation of the encrypted communication system according to the first embodiment of the present invention; 本発明の第2の実施形態の暗号化通信システムの機能構成を示すブロック図である。FIG. 12 is a block diagram showing the functional configuration of the encrypted communication system according to the second embodiment of the present invention; 本発明の第2の実施形態の暗号化通信システムで用いるセッション鍵群リストのデータ構造を示す図である。FIG. 10 is a diagram showing the data structure of a session key group list used in the encrypted communication system according to the second embodiment of the present invention; 本発明の第2の実施形態の暗号化通信システムの動作を示すフローチャート(その1)である。FIG. 10 is a flowchart (part 1) showing the operation of the encrypted communication system according to the second embodiment of the present invention; FIG. 本発明の第2の実施形態の暗号化通信システムの動作を示すフローチャート(その2)である。FIG. 9 is a flowchart (part 2) showing the operation of the encrypted communication system according to the second embodiment of the present invention; FIG. 本発明の第2の実施形態の暗号化通信システムの動作を示すフローチャート(その3)である。3 is a flowchart (3) showing the operation of the encrypted communication system according to the second embodiment of the present invention; 本発明の第2の実施形態の暗号化通信システムの動作を示すフローチャート(その4)である。FIG. 10 is a flowchart (part 4) showing the operation of the encrypted communication system according to the second embodiment of the present invention; FIG. 本発明の第3の実施形態の暗号化通信システムの機能構成を示すブロック図である。FIG. 11 is a block diagram showing the functional configuration of an encryption communication system according to a third embodiment of the present invention; 本発明の第3の実施形態の暗号化通信システムで用いる演算鍵群リストのデータ構造を示す図である。FIG. 10 is a diagram showing the data structure of an operation key group list used in the encrypted communication system of the third embodiment of the present invention; 本発明の第3の実施形態の暗号化通信システムの動作を示すフローチャート(その1)である。FIG. 11 is a flowchart (Part 1) showing the operation of the encryption communication system according to the third embodiment of the present invention; FIG. 本発明の第3の実施形態の暗号化通信システムの動作を示すフローチャート(その2)である。FIG. 11 is a flowchart (part 2) showing the operation of the encryption communication system according to the third embodiment of the present invention; FIG. 本発明の第3の実施形態の暗号化通信システムの動作を示すフローチャート(その3)である。FIG. 13 is a flowchart (part 3) showing the operation of the encryption communication system according to the third embodiment of the present invention; FIG. 本発明の第3の実施形態の暗号化通信システムの動作を示すフローチャート(その4)である。FIG. 14 is a flowchart (part 4) showing the operation of the encryption communication system according to the third embodiment of the present invention; FIG.

<第1の実施形態>
以下、本発明の第1の実施形態に係る暗号化通信システム及び暗号化通信方法について図1から図6を参照して説明する。
<First Embodiment>
An encrypted communication system and an encrypted communication method according to a first embodiment of the present invention will be described below with reference to FIGS. 1 to 6. FIG.

図1に示すように、本実施形態の暗号化通信システムは、ICカード100とICカードアクセス装置200を備えている。ICカードアクセス装置200とICカード100とが、暗号化通信によりデータを交換するセキュアメッセージング処理を行う暗号化通信システムである。 As shown in FIG. 1, the encrypted communication system of this embodiment includes an IC card 100 and an IC card access device 200. FIG. The IC card access device 200 and the IC card 100 are an encrypted communication system that performs secure messaging processing for exchanging data by encrypted communication.

セキュアメッセージングを行うために、ICカード100は、暗号化手段110と復号手段120と、セッション鍵変更演算手段130を備え、ICカードアクセス装置200は、暗号化手段210と復号手段220とセッション鍵変更演算手段230と、初期化セッション鍵生成手段240を備える。 In order to perform secure messaging, the IC card 100 comprises an encryption means 110, a decryption means 120, and a session key change calculation means 130, and the IC card access device 200 comprises an encryption means 210, a decryption means 220 and a session key change. It comprises computing means 230 and initialization session key generating means 240 .

(ICカードアクセス装置200)
ICカードアクセス装置200は、ICカード100にセキュアメッセージングの暗号化通信を行うことで、ICカード100からデータを読み出し、又は、ICカード100に対してデータを書き込む。
(IC card access device 200)
The IC card access device 200 reads data from the IC card 100 or writes data to the IC card 100 by performing secure messaging encrypted communication with the IC card 100 .

(初期化セッション鍵生成手段240)
ICカードアクセス装置200の初期化セッション鍵生成手段240は、初期化セッション鍵K0とK1とを生成する。初期化セッション鍵K0とK1は、ICカードアクセス装置200とICカード100の間でのセキュアメッセージングにおいて、1つのコマンドの処理を行う都度に切り替えるセッション鍵を生成するための最初の種である。
(Initialization session key generating means 240)
Initialization session key generation means 240 of IC card access device 200 generates initialization session keys K0 and K1. Initialization session keys K0 and K1 are the initial seeds for generating session keys that are switched each time one command is processed in secure messaging between IC card access device 200 and IC card 100 .

本実施形態において、初期化セッション鍵K0とK1の生成の仕方については特に限定されない。例えば、初期化セッション鍵生成手段240は、乱数を発生させ、発生された乱数に基づいて初期化セッション鍵K0とK1を生成してもよい。 In this embodiment, the method of generating the initialization session keys K0 and K1 is not particularly limited. For example, the initialization session key generation means 240 may generate random numbers and generate initialization session keys K0 and K1 based on the generated random numbers.

(暗号化手段210)
ICカードアクセス装置200とICカード100がセッション鍵を共有する以前の初期段階では、ICカードアクセス装置200の暗号化手段210が、初期化セッション鍵K0とK1を、ICカード100と共有するマスタ鍵MKEYを用いて暗号化してICカード100に送信する。
(Encryption means 210)
In the initial stage before IC card access device 200 and IC card 100 share a session key, encryption means 210 of IC card access device 200 converts initialization session keys K0 and K1 to master keys shared with IC card 100. The data is encrypted using the MKEY and transmitted to the IC card 100 .

ICカードアクセス装置200とICカード100がセッション鍵を共有した後では、ICカードアクセス装置200の暗号化手段210は、平文データをセッション鍵を用いて暗号化してコマンドの暗号化データ320を作成する。そして、ICカードアクセス装置200が、ヘッダ310とコマンドの暗号化データ320とメッセージ認証コードMA
Cから成るセキュアメッセージングコマンド300を作成してICカード100に送信する。
After the IC card access device 200 and the IC card 100 share the session key, the encryption means 210 of the IC card access device 200 encrypts the plaintext data using the session key to create command encrypted data 320. . Then, the IC card access device 200 receives the header 310, the command encrypted data 320, and the message authentication code MA.
A secure messaging command 300 consisting of C is created and transmitted to the IC card 100 .

(セキュアメッセージングコマンド300)
次に、ICカードアクセス装置200とICカード100との間で、セキュアメッセージング処理で通信するセキュアメッセージングコマンド300の構成を説明する。
(Secure messaging command 300)
Next, the structure of secure messaging command 300 for communication between IC card access device 200 and IC card 100 by means of secure messaging processing will be described.

図2は、ICカードアクセス装置200からICカード100に送信するセキュアメッセージングコマンド300の構成を説明する図である。図2の様に、セキュアメッセージングコマンド300は、ヘッダ310と、コマンドの暗号化データ320と、メッセージ認証コードMACから成る。ヘッダ310は、そのセキュアメッセージングコマンド300の機能を識別する情報を含むコードであり、また、ヘッダ310の特定のビットを使用して、そのコマンドがセキュアメッセージングコマンド300であることを示す。 FIG. 2 is a diagram illustrating the configuration of a secure messaging command 300 transmitted from IC card access device 200 to IC card 100. As shown in FIG. As in FIG. 2, a secure messaging command 300 consists of a header 310, command encrypted data 320, and a message authentication code MAC. Header 310 is a code containing information that identifies the function of secure messaging command 300 , and specific bits in header 310 are used to indicate that the command is secure messaging command 300 .

メッセージ認証コードMACは、ヘッダ310とコマンドの暗号化データ320をセッション鍵で暗号化し、セキュアメッセージングコマンド300のヘッダ310やコマンドの暗号化データ320がICカードアクセス装置200とICカード100が通信する通信経路の中間で改ざんを検知する機能を持つ。 The message authentication code MAC encrypts the header 310 and the encrypted data 320 of the command with the session key, and the header 310 of the secure messaging command 300 and the encrypted data 320 of the command are used for communication between the IC card access device 200 and the IC card 100 . It has a function to detect tampering in the middle of the route.

(復号手段220)
ICカードアクセス装置200の復号手段220は、ICカード100から受信したセキュアメッセージングコマンド300のコマンドの暗号化データ320を、セッション鍵を用いて復号してICカード100のレスポンスデータの平文データを得る。
(Decryption means 220)
The decryption means 220 of the IC card access device 200 decrypts the encrypted data 320 of the secure messaging command 300 received from the IC card 100 using the session key to obtain the plaintext data of the response data of the IC card 100 .

(セッション鍵変更演算手段230)
ICカードアクセス装置200は、ICカード100からセキュアメッセージングでレスポンスデータを受信した場合に、次に、セッション鍵変更演算手段230を用いて新しいセッション鍵を算出する。そして、次にICカード100に送信するセキュアメッセージングコマンドには、その新しいセッション鍵でデータを暗号化したセキュアメッセージングコマンド300を作成して用いる。
(Session key change computing means 230)
When the IC card access device 200 receives the response data from the IC card 100 by secure messaging, next, the session key change calculation means 230 is used to calculate a new session key. Then, for the next secure messaging command to be sent to the IC card 100, the secure messaging command 300 is created and used by encrypting the data with the new session key.

詳しくは、セッション鍵変更演算手段230が、旧セッション鍵K0と現在のセッション鍵K1のXOR(排他的論理和)を演算し、その結果を新たなセッション鍵K2とする。そして、ICカードアクセス装置200は、ICカード100とのセキュアメッセージングで使用するセッション鍵をセッション鍵K2に変更する。こうして、セキュアメッセージングで1つのコマンドを処理する都度、セッション鍵をK1からK2、K3、K4へと更新してセキュアメッセージング処理を実施する。 Specifically, the session key change computing means 230 computes an XOR (exclusive OR) of the old session key K0 and the current session key K1, and sets the result as a new session key K2. IC card access device 200 then changes the session key used in secure messaging with IC card 100 to session key K2. In this way, each time one command is processed in secure messaging, the session key is updated from K1 to K2, K3, and K4 to implement secure messaging processing.

(ICカード100の構成)
ICカード100は、集積回路が実装されたカードである。図1にICカード100の構成のブロック図を示す。ICカード100は、ICカード100全体の制御を行うマイクロプロセッサ等の制御手段11と、暗号化処理に必要なべき乗剰余演算処理を行うことが可能なコプロセッサ12と、通信手段13と、記憶手段14で構成されている。
(Configuration of IC card 100)
The IC card 100 is a card on which an integrated circuit is mounted. FIG. 1 shows a block diagram of the configuration of the IC card 100. As shown in FIG. The IC card 100 includes control means 11 such as a microprocessor for controlling the entire IC card 100, coprocessor 12 capable of performing modular exponentiation processing required for encryption processing, communication means 13, and storage means. 14.

(ICカード100の記憶手段14)
図1のブロック図の様に、ICカード100の記憶手段14は、ブートプログラムや各種固定データが記憶された固定記憶手段ROMと、各種データを一時的に記憶する一時記憶手段RAMと、電気的にデータの書換が可能で、プログラムデータ等を更新可能に記憶する不揮発性記憶手段のEEPROM(Electrically Erasable and Programmable ROM)、フラッシュメモリ等を備えて構成する。
(Storage means 14 of IC card 100)
As shown in the block diagram of FIG. 1, the storage means 14 of the IC card 100 includes a fixed storage means ROM in which a boot program and various fixed data are stored, a temporary storage means RAM in which various data are temporarily stored, an electrical An electrically erasable and programmable ROM (EEPROM), a flash memory, etc., which is a non-volatile storage means for storing program data and the like in a rewritable manner.

記憶手段14の記憶領域は、図1の様に、ファイル管理領域AR1、システム領域AR2及びユーザデータ領域AR3を備える。なお、記憶手段14の記憶領域は、ファイル管理領域AR1、システム領域AR2及びユーザデータ領域AR3以外の領域が含まれていてもよい。 The storage area of the storage means 14 comprises a file management area AR1, a system area AR2 and a user data area AR3, as shown in FIG. The storage area of the storage means 14 may include areas other than the file management area AR1, the system area AR2 and the user data area AR3.

(ファイル管理領域AR1)
ファイル管理領域AR1は、システム領域AR2、ユーザデータ領域AR3に記憶されるデータをファイル単位で管理するファイル管理情報が記憶される領域である。
(File management area AR1)
The file management area AR1 is an area for storing file management information for managing data stored in the system area AR2 and the user data area AR3 on a file-by-file basis.

(システム領域AR2)
システム領域AR2は、OS(Operating System)と、セキュアメッセージングの暗号化手段110と、復号手段120と、セッション鍵変更演算手段130のプログラムが記憶され、また、各種設定情報などをはじめとするシステム情報が記憶される領域である。
(System area AR2)
The system area AR2 stores the programs of the OS (Operating System), the secure messaging encryption means 110, the decryption means 120, and the session key change calculation means 130, and also contains system information such as various setting information. is stored.

(ユーザデータ領域AR3)
ユーザデータ領域AR3は、アプリケーションが使用するユーザデータが記憶される領域である。
(User data area AR3)
The user data area AR3 is an area for storing user data used by the application.

(専用ファイルDFの階層構造)
図1のように、ユーザデータ領域AR3には、主ファイルMF(Master File)の下に階層構造で接続する専用ファイルDF(Dedicated File)を記憶する。専用ファイルDFは、下位のファイルをグループ化するためのファイルであり、専用ファイルDFの配下に基礎ファイルEF(Elementary File)や他の専用ファイルDFを記憶する。
(Hierarchical structure of dedicated file DF)
As shown in FIG. 1, the user data area AR3 stores a dedicated file DF (Dedicated File) connected in a hierarchical structure under a main file MF (Master File). The dedicated file DF is a file for grouping lower files, and stores an elementary file EF (Elementary File) and other dedicated files DF under the dedicated file DF.

(基礎ファイルEF)
専用ファイルDFの配下に構成される基礎ファイルEFはデータを格納するファイルであり、IEF(Internal Elementary File:内部基礎ファイル)とWEF(作業基礎ファイル)との2つの種別に分けられる。
(basic file EF)
A basic file EF configured under the dedicated file DF is a file that stores data, and is divided into two types: an IEF (Internal Elementary File) and a WEF (work basic file).

(作業基礎ファイルWEF)
作業基礎ファイルWEFは、ICカード100から外部への出力が可能なファイルである。作業基礎ファイルWEFには、ICカード100の個別ファイルを記憶する。
(work basic file WEF)
The basic work file WEF is a file that can be output from the IC card 100 to the outside. Individual files of the IC card 100 are stored in the basic work file WEF.

(内部基礎ファイルIEF)
ICカード100の内部基礎ファイルIEFは、セキュリティ上、ICカードアクセス装置200から読出しができないファイルであり、ICカード100内においてのみ使用される。
(internal basic file IEF)
The internal basic file IEF of IC card 100 is a file that cannot be read from IC card access device 200 for security reasons and is used only within IC card 100 .

内部基礎ファイルIEFは、ICカードアクセス装置200がICカード100の作業基礎ファイルWEF内の個別ファイルを読み出すアクセス権を認証するためのセキュア通信用鍵情報や認証用鍵情報等の鍵情報を記憶し、その鍵情報を割り付けるキー区分を記憶する。ICカードアクセス装置200と共有するマスタ鍵MKEYを内部基礎ファイルIEFに記憶する。 The internal basic file IEF stores key information such as secure communication key information and authentication key information for authenticating access rights for the IC card access device 200 to read individual files in the working basic file WEF of the IC card 100. , stores the key classification to which the key information is assigned. A master key MKEY shared with the IC card access device 200 is stored in the internal basic file IEF.

(セキュアメッセージング処理)
次に、ICカード100とICカードアクセス装置200とがセキュアメッセージングコマンド300を送受信して行うセキュアメッセージング処理を行うためにICカード100が有する手段について説明する。
(secure messaging processing)
Next, means of the IC card 100 for performing secure messaging processing by transmitting and receiving the secure messaging command 300 between the IC card 100 and the IC card access device 200 will be described.

ここで、ICカードアクセス装置200とICカード100は、1つのセキュアメッセージングコマンド300によるコマンド処理を行う都度、同じアルゴリズムでセッション鍵を更新する。それにより、ICカードアクセス装置200とICカード100は互いに、セッション鍵を同じセッション鍵に更新して暗号化通信を行う。 Here, the IC card access device 200 and the IC card 100 update the session key using the same algorithm each time a single secure messaging command 300 executes command processing. As a result, the IC card access device 200 and the IC card 100 mutually update the session key to the same session key and perform encrypted communication.

(ICカード100のセキュアメッセージングの手段)
先ず、ICカード100の、セキュアメッセージング処理に用いる鍵とプログラム手段について説明する。先ず、ICカード100の内部基礎ファイルIEFに、ICカードアクセス装置200と共有するマスタ鍵MKEYを記憶する。また、ICカード100は、ICカードアクセス装置200との間でセキュアメッセージング処理を行うための、復号手段120と暗号化手段110とセッション鍵変更演算手段130を有する。
(Secure messaging means of IC card 100)
First, the keys and program means of the IC card 100 used for secure messaging processing will be described. First, the master key MKEY shared with the IC card access device 200 is stored in the internal basic file IEF of the IC card 100 . The IC card 100 also has decryption means 120 , encryption means 110 and session key change calculation means 130 for performing secure messaging processing with the IC card access device 200 .

(復号手段120)
ICカードアクセス装置200とICカード100がセッション鍵を共有する以前の初期段階において、ICカード100は、ICカードアクセス装置200から初期化セッション鍵K0とK1の暗号化データを受信する。そして、ICカード100の復号手段120が、ICカードアクセス装置200と共有するマスタ鍵MKEYを用いて暗号化データを復号して初期化セッション鍵K0とK1を得る。
(Decoding means 120)
At an initial stage before IC card access device 200 and IC card 100 share a session key, IC card 100 receives encrypted data of initialization session keys K0 and K1 from IC card access device 200 . Decryption means 120 of IC card 100 decrypts the encrypted data using master key MKEY shared with IC card access device 200 to obtain initialization session keys K0 and K1.

ICカードアクセス装置200とICカード100がセッション鍵を共有した後では、ICカード100の復号手段120は、ICカードアクセス装置200から受信したセキュアメッセージングコマンド300が含むコマンドの暗号化データ320を、セッション鍵を用いて復号してコマンドの平文データを得る。そして、ICカード100は、そのコマンドに従った処理を実行する。 After the IC card access device 200 and the IC card 100 share the session key, the decryption means 120 of the IC card 100 converts the command encrypted data 320 included in the secure messaging command 300 received from the IC card access device 200 into the session key. Decrypt using the key to obtain the plaintext data of the command. Then, the IC card 100 executes processing according to the command.

(暗号化手段110)
ICカード100の暗号化手段110はセキュアメッセージング用の暗号化処理を行う。すなわち、ICカード100がICカードアクセス装置200からセキュアメッセージングコマンド300を受信し、そのコマンドに従った処理を実行すると、ICカード100は先ず、その結果を報告するレスポンスの平文データを作成する。
(Encryption means 110)
The encryption means 110 of the IC card 100 performs encryption processing for secure messaging. That is, when the IC card 100 receives the secure messaging command 300 from the IC card access device 200 and executes processing according to the command, the IC card 100 first creates plaintext data of a response reporting the result.

そして、ICカード100の暗号化手段110が、セッション鍵を用いて、レスポンスデータの平文データを暗号化したレスポンスの暗号化データ320を作成する。また、暗号化手段110は、セキュアメッセージングコマンド300のヘッダ310とレスポンスの暗号化データ320をセッション鍵で暗号化してメッセージ認証コードMACを作成する。そして、ICカード100が、そのレスポンスの暗号化データ320とメッセージ認証コードMACを含むセキュアメッセージングコマンド300をICカードアクセス装置200に送信する。 Then, the encryption means 110 of the IC card 100 creates encrypted response data 320 by encrypting the plaintext data of the response data using the session key. The encryption means 110 also encrypts the header 310 of the secure messaging command 300 and the encrypted data 320 of the response with the session key to create a message authentication code MAC. Then, the IC card 100 transmits to the IC card access device 200 the secure messaging command 300 including the encrypted data 320 of the response and the message authentication code MAC.

(セッション鍵変更演算手段130)
ICカード100は、セキュアメッセージング処理において、ICカードアクセス装置200に向けてレスポンスデータのセキュアメッセージングコマンド300を送信した後に、セッション鍵変更演算手段130を用いて以下の演算処理を行う。
(Session key change computing means 130)
In the secure messaging process, the IC card 100 transmits the response data of the secure messaging command 300 to the IC card access device 200, and then uses the session key change calculation means 130 to perform the following calculation process.

すなわち、セッション鍵変更演算手段130が、次にICカードアクセス装置200から受信するコマンドの暗号化データを復号する際に用いる新しいセッション鍵を算出して、以前に用いたセッション鍵をその新しいセッション鍵に更新する。 That is, session key change calculation means 130 calculates a new session key to be used when decrypting the encrypted data of the next command received from IC card access device 200, and replaces the previously used session key with the new session key. update to

(初期化セッション鍵の共有処理)
以下で、図3から図6を参照して、ICカード100とICカードアクセス装置200
とが行うセキュアメッセージング処理の手順を説明する。先ず、初期化セッション鍵をICカード100とICカードアクセス装置200間で共有する処理を行う。
(Initialization session key sharing process)
3 to 6, IC card 100 and IC card access device 200 will be described below.
describes the secure messaging process performed by First, processing for sharing the initialization session key between the IC card 100 and the IC card access device 200 is performed.

初期化セッション鍵の共有方法には様々な手段があるが、ここではICカードアクセス装置200が生成した初期化セッション鍵をICカード100に送信して、ICカードアクセス装置200とICカード100がセッション鍵を共有する場合について図3を参照して説明する。 There are various methods for sharing the initialization session key. Here, the initialization session key generated by the IC card access device 200 is transmitted to the IC card 100, and the IC card access device 200 and the IC card 100 are in session. A case of sharing a key will be described with reference to FIG.

(ステップS1)
ICカードアクセス装置200は、乱数生成手段等の初期化セッション鍵生成手段240を用いて初期化セッション鍵K0と初期化セッション鍵K1を生成し、マスタ鍵MKEYを用いて暗号化し、この2つの初期化セッション鍵K0とK1をセッション鍵復号コマンドに乗せてICカード100に送信する。
(Step S1)
The IC card access device 200 generates an initialization session key K0 and an initialization session key K1 using an initialization session key generation means 240 such as a random number generation means, encrypts them using a master key MKEY, and converts these two initial session keys K0 and K1 are sent to the IC card 100 in a session key decryption command.

(ステップS2)
ICカード100は、このセッション鍵復号コマンドを受信すると、そのコマンドコードからセッション鍵復号コマンドであることを認識し、セッション鍵復号コマンドの受信のレスポンスデータをICカードアクセス装置200に返信する。
(Step S2)
When the IC card 100 receives this session key decryption command, it recognizes that it is a session key decryption command from the command code, and returns response data for receiving the session key decryption command to the IC card access device 200 .

(ステップS3)
次に、ICカード100の復号手段120が、記憶手段14に記憶されているマスタ鍵MKEYを読み出し、このマスタ鍵MKEYを用いて、セッション鍵復号コマンドの暗号化データから初期化セッション鍵K0とK1を復号して一時記憶手段RAMで記憶する。ここで用いられるマスタ鍵MKEYは予めICカードアクセス装置200とICカード100間で共有しているものであり、ICカードアクセス装置200が暗号化に使用したマスタ鍵MKEYと同じものである。
(Step S3)
Next, the decryption means 120 of the IC card 100 reads out the master key MKEY stored in the storage means 14, and uses this master key MKEY to decrypt the initialization session keys K0 and K1 from the encrypted data of the session key decryption command. is decoded and stored in temporary storage means RAM. The master key MKEY used here is shared in advance between the IC card access device 200 and the IC card 100, and is the same as the master key MKEY used by the IC card access device 200 for encryption.

(セキュアメッセージングコマンドの通信手順)
次に、図4から図6を参照して、セキュアメッセージング処理によるセキュアメッセージングコマンド300の通信手順を説明する。
(Secure messaging command communication procedure)
Next, a communication procedure of the secure messaging command 300 by the secure messaging process will be described with reference to FIGS. 4 to 6. FIG.

(ステップS11)
先ず、ICカードアクセス装置200の暗号化手段210が、ICカード100に送信するコマンドの平文データを、初期化セッション鍵K1を利用して暗号化しコマンドの暗号化データ320を作成する。例えば、ICカード100のファイルAを選択するSELECT FILEコマンドの平文データを初期化セッション鍵K1を用いて暗号化したコマンドの暗号化データ320を作成する。
(Step S11)
First, the encryption means 210 of the IC card access device 200 encrypts the plaintext data of the command to be sent to the IC card 100 using the initialization session key K1 to create the encrypted data 320 of the command. For example, encrypted command data 320 is created by encrypting plaintext data of a SELECT FILE command for selecting file A of IC card 100 using initialization session key K1.

(ステップS12)
次に、暗号化手段210が、ヘッダ310とコマンドの暗号化データ320をセッション鍵K1で暗号化してメッセージ認証コードMACを作成する。そして、ICカードアクセス装置200が、ヘッダ310とコマンドの暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300をICカード100に送信する。
(Step S12)
Next, the encryption means 210 encrypts the header 310 and the encrypted data 320 of the command with the session key K1 to create a message authentication code MAC. Then, the IC card access device 200 transmits to the IC card 100 a secure messaging command 300 consisting of a header 310, command encrypted data 320, and a message authentication code MAC.

(ステップS13)
ICカード100の制御手段11は、通信手段13を用いてICカードアクセス装置200からコマンドデータを受信する受信処理を行う。
(Step S13)
The control means 11 of the IC card 100 performs reception processing for receiving command data from the IC card access device 200 using the communication means 13 .

ICカード100は、コマンドデータが、セキュアメッセージングコマンド300であ
る事を認識し復号手段120に制御を移す。
IC card 100 recognizes that the command data is secure messaging command 300 and transfers control to decryption means 120 .

(ステップS14)
復号手段120は、一時記憶手段RAMに記憶されているセッション鍵K1を用いて、コマンドの暗号化データ320を復号して、例えば、ICカード100のファイルAを選択するSELECT FILEコマンドの平文データを得る。
(Step S14)
The decryption means 120 decrypts the command encrypted data 320 using the session key K1 stored in the temporary storage means RAM, and converts, for example, the plain text data of the SELECT FILE command for selecting the file A of the IC card 100. obtain.

(ステップS15)
ICカード100は、復号したSELECT FILEコマンドに従ってICカード100のファイルAを選択する処理を行う。
(Step S15)
The IC card 100 selects the file A of the IC card 100 according to the decrypted SELECT FILE command.

(ステップS16)
次に、ICカード100の暗号化手段110が、レスポンスデータの平文データを初期化セッション鍵K1を用いて暗号化したレスポンスの暗号化データ320を作成する。
(Step S16)
Next, the encryption means 110 of the IC card 100 creates encrypted response data 320 by encrypting the plaintext data of the response data using the initialization session key K1.

(ステップS17)
次に、暗号化手段110が、ヘッダ310とレスポンスの暗号化データ320をセッション鍵K1で暗号化してメッセージ認証コードMACを作成する。そして、ICカード100は、ヘッダ310とレスポンスの暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300をICカードアクセス装置200に返信する。
(Step S17)
Next, the encryption means 110 encrypts the header 310 and the encrypted data 320 of the response with the session key K1 to create a message authentication code MAC. The IC card 100 then returns to the IC card access device 200 a secure messaging command 300 consisting of a header 310, encrypted response data 320, and a message authentication code MAC.

(ステップS18)
ICカード100は、次に、以下の演算処理でセッション鍵K2を導出する。すなわち、ICカード100は、一時記憶手段RAMで記憶しているセッション鍵K0とセッション鍵K1のXOR(排他的論理和)を演算し、その結果を新たなセッション鍵K2とする。そして、ICカード100は、一時記憶手段RAMで記憶するセッション鍵をセッション鍵K1とセッション鍵K2に置き換え、ICカードアクセス装置200とのセキュアメッセージンで使用するセッション鍵をセッション鍵K2に変更する。
(Step S18)
IC card 100 then derives session key K2 by the following arithmetic processing. That is, the IC card 100 XORs (exclusive OR) the session key K0 and the session key K1 stored in the temporary storage means RAM, and uses the result as a new session key K2. IC card 100 then replaces the session keys stored in temporary storage means RAM with session key K1 and session key K2, and changes the session key used in secure messaging with IC card access device 200 to session key K2.

(ステップS19)
ICカードアクセス装置200は、ICカード100から受信したレスポンスがセキュアメッセージングコマンド300である場合は、復号手段220に制御を移す。
(Step S19)
If the response received from the IC card 100 is the secure messaging command 300 , the IC card access device 200 transfers control to the decoding means 220 .

復号手段220はICカードアクセス装置200が記憶しているセッション鍵K1を用いて、レスポンスの暗号化データ320を復号して、レスポンスデータの平文データを得る。 The decryption means 220 decrypts the encrypted response data 320 using the session key K1 stored in the IC card access device 200 to obtain the plaintext data of the response data.

(ステップS20)
ICカードアクセス装置200は、ICカード100から、セキュアメッセージングコマンド300のレスポンスデータを受信した場合は、セッション鍵K0とセッション鍵K1のXOR(排他的論理和)を演算し、その結果を新たなセッション鍵K2とする。そして、ICカードアクセス装置200は、ICカード100とのセキュアメッセージングで使用するセッション鍵をセッション鍵K2に変更する。
(Step S20)
When the IC card access device 200 receives the response data of the secure messaging command 300 from the IC card 100, it XORs (exclusive OR) the session key K0 and the session key K1, and stores the result in a new session. Let the key be K2. IC card access device 200 then changes the session key used in secure messaging with IC card 100 to session key K2.

(ステップS21)
ICカードアクセス装置200は、暗号化手段210を用いて、次にICカード100に送信するコマンドの平文データを、セッション鍵K2を利用して暗号化しコマンドの暗号化データ320を作成する。例えば、選択したファイルAに対して値を書き込むWRITE BINARYコマンドの平文データをセッション鍵K2を用いて暗号化したコマン
ドの暗号化データ320を作成する。
(Step S21)
The IC card access device 200 uses the encryption means 210 to encrypt the plaintext data of the command to be transmitted to the IC card 100 next using the session key K2 to create the encrypted data 320 of the command. For example, the encrypted data 320 of the command is created by encrypting the plaintext data of the WRITE BINARY command for writing a value to the selected file A using the session key K2.

(ステップS22)
次に、暗号化手段210が、ヘッダ310とコマンドの暗号化データ320をセッション鍵K2で暗号化してメッセージ認証コードMACを作成する。そして、ICカードアクセス装置200が、ヘッダ310とコマンドの暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300をICカード100に送信する。
(Step S22)
Next, the encryption means 210 encrypts the header 310 and the encrypted data 320 of the command with the session key K2 to create a message authentication code MAC. Then, the IC card access device 200 transmits to the IC card 100 a secure messaging command 300 consisting of a header 310, command encrypted data 320, and a message authentication code MAC.

(ステップS23)
ICカード100は、ICカードアクセス装置200からコマンドデータを受信し、コマンドデータが、セキュアメッセージングコマンド300であるか否かを判定する。
(Step S23)
IC card 100 receives command data from IC card access device 200 and determines whether the command data is secure messaging command 300 .

(ステップS24)
ICカード100は、受信したコマンドがセキュアメッセージングコマンド300である場合は、復号手段120に制御を移す。
(Step S24)
If the received command is the secure messaging command 300 , the IC card 100 transfers control to the decryption means 120 .

復号手段120は、先に演算して作成したセッション鍵K2を用いて、コマンドの暗号化データ320を復号して、例えば、選択したファイルAに対して値を書き込むWRITE BINARYコマンドの平文データを得る。 The decryption means 120 decrypts the encrypted data 320 of the command using the session key K2 calculated and created in advance, and obtains the plaintext data of the WRITE BINARY command for writing a value to the selected file A, for example. .

(ステップS25)
ICカード100は、復号したWRITE BINARYコマンドに従ってファイル書き込み処理を実行する。
(Step S25)
The IC card 100 executes file write processing according to the decrypted WRITE BINARY command.

(ステップS26)
次に、ICカード100は、レスポンスデータの平文データをセッション鍵K2を用いて暗号化したレスポンスの暗号化データ320を作成する。
(Step S26)
Next, the IC card 100 creates encrypted response data 320 by encrypting the plaintext data of the response data using the session key K2.

(ステップS27)
次に、暗号化手段110が、ヘッダ310とレスポンスの暗号化データ320をセッション鍵K2で暗号化してメッセージ認証コードMACを作成する。そして、ICカード100は、ヘッダ310とレスポンスの暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300をICカードアクセス装置200に返信する。
(Step S27)
Next, the encryption means 110 encrypts the header 310 and the encrypted data 320 of the response with the session key K2 to create a message authentication code MAC. The IC card 100 then returns to the IC card access device 200 a secure messaging command 300 consisting of a header 310, encrypted response data 320, and a message authentication code MAC.

(ステップS28)
ICカード100は、次に、以下の演算処理でセッション鍵K3を導出する。すなわち、ICカード100は、セッション鍵K1とセッション鍵K2のXOR(排他的論理和)を演算し、その結果を新たなセッション鍵K3とする。そして、ICカード100は、一時記憶手段RAMで記憶するセッション鍵をセッション鍵K2とセッション鍵K3に置き換え、ICカードアクセス装置200とのセキュアメッセージンで使用するセッション鍵をセッション鍵K3に変更する。
(Step S28)
IC card 100 then derives session key K3 by the following arithmetic processing. That is, the IC card 100 XORs (exclusive OR) the session key K1 and the session key K2, and uses the result as a new session key K3. Then, IC card 100 replaces the session keys stored in temporary storage means RAM with session key K2 and session key K3, and changes the session key used for secure messaging with IC card access device 200 to session key K3.

(ステップS29)
ICカードアクセス装置200は、ICカード100から受信したコマンドがセキュアメッセージングコマンド300である場合は、復号手段220に制御を移す。
(Step S29)
If the command received from IC card 100 is secure messaging command 300 , IC card access device 200 transfers control to decryption means 220 .

復号手段220はICカードアクセス装置200が記憶しているセッション鍵K2を用いて、コマンドの暗号化データ320を復号して、レスポンスデータの平文データを得る
The decoding means 220 uses the session key K2 stored in the IC card access device 200 to decode the encrypted data 320 of the command to obtain plaintext data of the response data.

(ステップS30)
ICカードアクセス装置200は、ICカード100から受信したセキュアメッセージングコマンド300がレスポンスデータであった場合は、セッション鍵K1とセッション鍵K2のXOR(排他的論理和)を演算し、その結果を新たなセッション鍵K3とする。そして、ICカードアクセス装置200は、ICカード100とのセキュアメッセージングで使用するセッション鍵をセッション鍵K3に変更する。
(Step S30)
If the secure messaging command 300 received from the IC card 100 is response data, the IC card access device 200 XORs (exclusive OR) the session key K1 and the session key K2, and stores the result as a new value. Assume that the session key is K3. IC card access device 200 then changes the session key used in secure messaging with IC card 100 to session key K3.

(ステップS31)
ICカードアクセス装置200は、暗号化手段210を用いて、次にICカード100に送信するコマンドの平文データを、セッション鍵K3を利用して暗号化しコマンドの暗号化データ320を作成する。例えば、選択したファイルAより値を読み出すREAD BINARYコマンドの平文データをセッション鍵K3を用いて暗号化したコマンドの暗号化データ320を作成する。
(Step S31)
The IC card access device 200 uses the encryption means 210 to encrypt the plaintext data of the command to be transmitted to the IC card 100 next using the session key K3 to create the encrypted data 320 of the command. For example, encrypted command data 320 is generated by encrypting plaintext data of a READ BINARY command for reading a value from the selected file A using the session key K3.

(ステップS32)
次に、暗号化手段210が、ヘッダ310とコマンドの暗号化データ320をセッション鍵K3で暗号化してメッセージ認証コードMACを作成する。そして、ICカードアクセス装置200が、ヘッダ310とコマンドの暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300をICカード100に送信する。
(Step S32)
Next, the encryption means 210 encrypts the header 310 and the encrypted data 320 of the command with the session key K3 to create a message authentication code MAC. Then, the IC card access device 200 transmits to the IC card 100 a secure messaging command 300 consisting of a header 310, command encrypted data 320, and a message authentication code MAC.

(ステップS33)
ICカード100は、ICカードアクセス装置200からコマンドデータを受信し、コマンドデータが、セキュアメッセージングコマンド300であるか否かを判定する。
(Step S33)
IC card 100 receives command data from IC card access device 200 and determines whether the command data is secure messaging command 300 .

(ステップS34)
ICカード100は、受信したコマンドがセキュアメッセージングコマンド300である場合は、復号手段120に制御を移す。
(Step S34)
If the received command is the secure messaging command 300 , the IC card 100 transfers control to the decryption means 120 .

復号手段120は、先に演算して作成したセッション鍵K2を用いて、コマンドの暗号化データ320を復号して、例えば、選択したファイルAより値を読み出すREAD BINARYコマンドの平文データを得る。 The decryption means 120 decrypts the encrypted data 320 of the command using the session key K2 calculated and created in advance, and obtains the plaintext data of the READ BINARY command for reading the value from the selected file A, for example.

(ステップS35)
ICカード100は、復号したREAD BINARYコマンドに従ってファイルAより値を読み出す処理を実行する。
(Step S35)
The IC card 100 executes processing for reading values from file A according to the decrypted READ BINARY command.

(ステップS36)
次に、ICカード100は、ファイルAより読み出した値を返信するレスポンスデータの平文データをセッション鍵K3を用いて暗号化したレスポンスの暗号化データ320を作成する。
(Step S36)
Next, the IC card 100 creates encrypted response data 320 by encrypting the plaintext data of the response data that returns the value read from the file A using the session key K3.

(ステップS37)
次に、暗号化手段110が、ヘッダ310とレスポンスの暗号化データ320をセッション鍵K3で暗号化してメッセージ認証コードMACを作成する。そして、ICカード100は、ヘッダ310とレスポンスの暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300をICカードアクセス装置200に返信する。
(Step S37)
Next, the encryption means 110 encrypts the header 310 and the encrypted response data 320 with the session key K3 to create a message authentication code MAC. The IC card 100 then returns to the IC card access device 200 a secure messaging command 300 consisting of a header 310, encrypted response data 320, and a message authentication code MAC.

(ステップS38)
ICカード100は、次に、以下の演算処理でセッション鍵K4を導出する。すなわち、ICカード100は、セッション鍵K2とセッション鍵K3のXOR(排他的論理和)を演算し、その結果を新たなセッション鍵K4とする。そして、ICカード100は、一時記憶手段RAMで記憶するセッション鍵をセッション鍵K3とセッション鍵K4に置き換え、ICカードアクセス装置200とのセキュアメッセージンで使用するセッション鍵をセッション鍵K4に変更する。
(Step S38)
The IC card 100 then derives the session key K4 through the following arithmetic processing. That is, the IC card 100 XORs (exclusive OR) the session key K2 and the session key K3, and uses the result as a new session key K4. Then, IC card 100 replaces the session keys stored in temporary storage means RAM with session key K3 and session key K4, and changes the session key used for secure messaging with IC card access device 200 to session key K4.

(ステップS39)
ICカードアクセス装置200は、ICカード100から受信したコマンドがセキュアメッセージングコマンド300である場合は、復号手段220に制御を移す。
(Step S39)
If the command received from IC card 100 is secure messaging command 300 , IC card access device 200 transfers control to decryption means 220 .

復号手段220はICカードアクセス装置200が記憶しているセッション鍵K3を用いて、レスポンスの暗号化データ320を復号して、レスポンスデータの平文データを得る。 The decryption means 220 decrypts the encrypted response data 320 using the session key K3 stored in the IC card access device 200 to obtain plaintext data of the response data.

(ステップS40)
ICカードアクセス装置200は、ICカード100から受信したコマンドがレスポンスデータであった場合は、セッション鍵K2とセッション鍵K3のXOR(排他的論理和)を演算し、その結果を新たなセッション鍵K4とする。そして、ICカードアクセス装置200は、ICカード100とのセキュアメッセージングで使用するセッション鍵をセッション鍵K4に変更する。
(Step S40)
When the command received from the IC card 100 is response data, the IC card access device 200 XORs (exclusive OR) the session key K2 and the session key K3, and uses the result as a new session key K4. and IC card access device 200 then changes the session key used in secure messaging with IC card 100 to session key K4.

こうして、本実施形態は、1つのセキュアメッセージングコマンド300によるコマンド処理を行う都度にセッション鍵を動的に更新する。 In this manner, the present embodiment dynamically updates the session key each time command processing by one secure messaging command 300 is performed.

ICカードアクセス装置200がICカード100のファイルのデータを読み書きする通信を行う際に、複数の通信を行いデータを読み書きする。その通信のセッション鍵が解析されて第三者に知られた場合でも、次のコマンドを送信する際のセッション鍵は、解析されたセッション鍵とは異なるセッション鍵に変更されているので、通信内容が第三者に知られる事が無い効果がある。それにより、セッション鍵が第三者に知られてしまった場合でも、データ漏洩をなくすことができ、秘匿性を高くしたセキュアメッセージングが行える効果がある。 When the IC card access device 200 performs communication for reading and writing data of a file in the IC card 100, a plurality of communications are performed to read and write data. Even if the session key for that communication is analyzed and known to a third party, the session key for sending the next command has been changed to a session key that is different from the analyzed session key, so the communication content has the effect of not being known to a third party. As a result, even if the session key is known to a third party, it is possible to prevent data leakage and to perform secure messaging with high confidentiality.

<第2の実施形態>
本発明の第2の実施形態は、図7の様に構成する。第2の実施形態が第1の実施形態と相違する点は、ICカードアクセス装置200がセッション鍵群作成手段250を有し、セッション鍵群作成手段250が、図8の様なセッション鍵群リストを作成し、ICカード100に送信することで、ICカードアクセス装置200とICカード100がセッション鍵群を共有する点である。
<Second embodiment>
A second embodiment of the present invention is configured as shown in FIG. The second embodiment differs from the first embodiment in that the IC card access device 200 has a session key group creation means 250, and the session key group creation means 250 has a session key group list as shown in FIG. is created and transmitted to the IC card 100, the IC card access device 200 and the IC card 100 share the session key group.

そして、ICカードアクセス装置200とICカード100がセキュアメッセージングで1つのコマンドを処理する毎に、次のセキュアメッセージングで利用するセッション鍵を指定する情報をコマンドデータに加えて通信し、次のセキュアメッセージングは、更新したセッション鍵を用いて通信する。 Each time the IC card access device 200 and the IC card 100 process one command in secure messaging, information designating a session key to be used in the next secure messaging is added to the command data and communicated. communicate using the updated session key.

例えば、セキュアメッセージングコマンド300のコマンドデータに次のセキュアメッセージングで利用するセッション鍵を指定する、図8のセッション鍵群リストの番号を加えて、そのコマンドデータをセッション鍵で暗号化して暗号化データ320を作成する。
そして、ヘッダ310と暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300を通信する。
For example, the command data of the secure messaging command 300 is added with the number of the session key group list in FIG. to create
It then communicates a secure messaging command 300 consisting of a header 310, encrypted data 320 and a message authentication code MAC.

(セッション鍵群の共有処理)
以下で、図9を参照して、ICカード100とICカードアクセス装置200がセッション鍵群を共有する処理の手順を説明する。
(Sharing process of session key group)
Below, referring to FIG. 9, the procedure of processing for sharing the session key group between the IC card 100 and the IC card access device 200 will be described.

(ステップS41)
ICカードアクセス装置200は、乱数生成手段等のセッション鍵群作成手段250を用いてセッション鍵K1~K18のセッション鍵群を作成し、マスタ鍵MKEYを用いて暗号化し、この18個のセッション鍵群K1~K18をセッション鍵群復号コマンドに乗せてICカード100に送信する。
(Step S41)
IC card access device 200 uses session key group creating means 250 such as random number generating means to create session key groups of session keys K1 to K18, encrypts them using master key MKEY, and converts these 18 session key groups. K1 to K18 are put on a session key group decryption command and transmitted to the IC card 100. FIG.

(ステップS42)
ICカード100は、このセッション鍵群復号コマンドを受信すると、そのコマンドコードからセッション鍵群復号コマンドであることを認識し、セッション鍵群復号コマンドの受信のレスポンスデータをICカードアクセス装置200に返信する。
(Step S42)
When the IC card 100 receives this session key group decryption command, it recognizes from the command code that it is a session key group decryption command, and returns response data for receiving the session key group decryption command to the IC card access device 200. .

(ステップS43)
次に、ICカード100の復号手段120が、記憶手段14に記憶されているマスタ鍵MKEYを読み出し、このマスタ鍵MKEYを用いて、セッション鍵群復号コマンドの暗号化データからセッション鍵K1~K18を復号して一時記憶手段RAMで記憶する。
(Step S43)
Next, the decryption means 120 of the IC card 100 reads the master key MKEY stored in the storage means 14, and uses this master key MKEY to extract the session keys K1 to K18 from the encrypted data of the session key group decryption command. It is decrypted and stored in the temporary storage means RAM.

(セキュアメッセージングコマンドの通信手順)
次に、図10から図12を参照して、セキュアメッセージング処理によるセキュアメッセージングコマンド300の通信手順を説明する。
(Secure messaging command communication procedure)
Next, a communication procedure of the secure messaging command 300 by the secure messaging process will be described with reference to FIGS. 10 to 12. FIG.

(ステップS51)
先ず、ICカードアクセス装置200が、次に用いるセッション鍵の、例えば、図8のセッション鍵群リストのセッション鍵K12を指定するリスト番号を選定する。
(Step S51)
First, the IC card access device 200 selects a list number specifying the session key to be used next, for example, the session key K12 in the session key group list of FIG.

次に、暗号化手段210が、ICカード100のファイルAを選択するSELECT FILEコマンドの平文データに、次に用いるセッション鍵K12のリスト番号を加え、そのデータを、第1のセッション鍵K1を利用して暗号化しコマンドの暗号化データ320を作成する。 Next, the encryption means 210 adds the list number of the session key K12 to be used next to the plaintext data of the SELECT FILE command for selecting the file A of the IC card 100, and uses the first session key K1 for the data. to create encrypted data 320 of the command.

(ステップS52)
次に、暗号化手段210が、ヘッダ310とコマンドの暗号化データ320をセッション鍵K1で暗号化してメッセージ認証コードMACを作成する。そして、ICカードアクセス装置200が、ヘッダ310とコマンドの暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300をICカード100に送信する。
(Step S52)
Next, the encryption means 210 encrypts the header 310 and the encrypted data 320 of the command with the session key K1 to create a message authentication code MAC. Then, the IC card access device 200 transmits to the IC card 100 a secure messaging command 300 consisting of a header 310, command encrypted data 320, and a message authentication code MAC.

(ステップS53~S54)
ICカード100は、第1の実施形態のステップS13からS14と同様な処理により、コマンドデータをセキュアメッセージングコマンド300であると認識し復号手段120で復号し、SELECT FILEコマンドの平文データと、次に用いるセッション鍵のリスト番号を得る。
(Steps S53-S54)
The IC card 100 recognizes the command data as the secure messaging command 300 by the same processing as steps S13 to S14 of the first embodiment, decrypts the command data by the decryption means 120, and converts the plaintext data of the SELECT FILE command and then Get the list number of session keys to use.

ICカード100は、次に用いるセッション鍵のリスト番号と、図8のセッション鍵群
リストから、次に用いるセッション鍵がセッション鍵K12であると判定し、次に用いるセッション鍵K12を用意する。
The IC card 100 determines that the session key to be used next is the session key K12 from the list number of the session key to be used next and the session key group list in FIG. 8, and prepares the session key K12 to be used next.

(ステップS55~S57)
ICカード100は、復号したSELECT FILEコマンドに従ってICカード100のファイルAを選択する処理を行い、レスポンスデータのセキュアメッセージングコマンド300をICカードアクセス装置200に返信する。
(Steps S55-S57)
The IC card 100 selects the file A of the IC card 100 according to the decrypted SELECT FILE command, and returns a secure messaging command 300 as response data to the IC card access device 200 .

(ステップS58)
ICカード100は、ICカードアクセス装置200とのセキュアメッセージンで使用するセッション鍵を、次のセッション鍵K12に変更する。
(Step S58)
The IC card 100 changes the session key used in secure messaging with the IC card access device 200 to the next session key K12.

(ステップS59)
ICカードアクセス装置200の復号手段220が、ICカードアクセス装置200が記憶しているセッション鍵K1を用いて、コマンドの暗号化データ320を復号して、レスポンスデータの平文データを得る。
(Step S59)
The decryption means 220 of the IC card access device 200 decrypts the command encrypted data 320 using the session key K1 stored in the IC card access device 200 to obtain the plaintext data of the response data.

(ステップS60)
ICカードアクセス装置200は、ICカード100から受信したコマンドがレスポンスデータであった場合は、ICカード100とのセキュアメッセージンで使用するセッション鍵を、次のセッション鍵K12に変更する。
(Step S60)
When the command received from the IC card 100 is response data, the IC card access device 200 changes the session key used in secure messaging with the IC card 100 to the next session key K12.

(ステップS61)
ICカードアクセス装置200が、次に用いるセッション鍵の、例えば、図8のセッション鍵群リストのセッション鍵K5を指定するリスト番号を選定する。
(Step S61)
The IC card access device 200 selects a list number designating the session key to be used next, for example, the session key K5 in the session key group list of FIG.

次に、暗号化手段210が、例えば、選択したファイルAに対して値を書き込むWRITE BINARYコマンドの平文データに、次に用いるセッション鍵K5のリスト番号を加え、そのデータを、セッション鍵K12を利用して暗号化しコマンドの暗号化データ320を作成する。 Next, the encryption means 210 adds the list number of the session key K5 to be used next to the plaintext data of the WRITE BINARY command for writing a value to the selected file A, for example, and uses the session key K12 for the data. to create encrypted data 320 of the command.

(ステップS62)
次に、暗号化手段210が、ヘッダ310とコマンドの暗号化データ320をセッション鍵K12で暗号化してメッセージ認証コードMACを作成する。そして、ICカードアクセス装置200が、ヘッダ310とコマンドの暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300をICカード100に送信する。
(Step S62)
Next, the encryption means 210 encrypts the header 310 and the encrypted data 320 of the command with the session key K12 to create a message authentication code MAC. Then, the IC card access device 200 transmits to the IC card 100 a secure messaging command 300 consisting of a header 310, command encrypted data 320, and a message authentication code MAC.

(ステップS63~S64)
ICカード100は、第1の実施形態のステップS23からS24と同様な処理により、コマンドデータをセキュアメッセージングコマンド300であると認識し復号手段120で復号し、WRITE BINARYコマンドの平文データと、次に用いるセッション鍵のリスト番号を得る。
(Steps S63-S64)
The IC card 100 recognizes the command data as the secure messaging command 300 by the same processing as steps S23 to S24 of the first embodiment, decrypts the command data by the decryption means 120, converts the plaintext data of the WRITE BINARY command, and then Get the list number of session keys to use.

ICカード100は、次に用いるセッション鍵のリスト番号と、図8のセッション鍵群リストから、次に用いるセッション鍵がセッション鍵K5であると判定し、次に用いるセッション鍵K5を用意する。 The IC card 100 determines that the session key to be used next is the session key K5 from the list number of the session key to be used next and the session key group list in FIG. 8, and prepares the session key K5 to be used next.

(ステップS65~S67)
ICカード100は、復号したWRITE BINARYコマンドに従ってファイル書
き込み処理を実行し、レスポンスデータのセキュアメッセージングコマンド300をICカードアクセス装置200に返信する。
(Steps S65-S67)
The IC card 100 executes file write processing according to the decrypted WRITE BINARY command, and returns a secure messaging command 300 as response data to the IC card access device 200 .

(ステップS68)
ICカード100は、ICカードアクセス装置200とのセキュアメッセージンで使用するセッション鍵を、次のセッション鍵K5に変更する。
(Step S68)
The IC card 100 changes the session key used in secure messaging with the IC card access device 200 to the next session key K5.

(ステップS69)
ICカードアクセス装置200の復号手段220が、ICカードアクセス装置200が記憶しているセッション鍵K12を用いて、レスポンスの暗号化データ320を復号して、レスポンスデータの平文データを得る。
(Step S69)
The decryption means 220 of the IC card access device 200 decrypts the encrypted response data 320 using the session key K12 stored in the IC card access device 200 to obtain the plaintext data of the response data.

(ステップS70)
ICカードアクセス装置200は、ICカード100から受信したコマンドがレスポンスデータであった場合は、ICカード100とのセキュアメッセージンで使用するセッション鍵を、次のセッション鍵K5に変更する。
(Step S70)
When the command received from the IC card 100 is response data, the IC card access device 200 changes the session key used in secure messaging with the IC card 100 to the next session key K5.

(ステップS71)
ICカードアクセス装置200が、次に用いるセッション鍵の、例えば、図8のセッション鍵群リストのセッション鍵K17を指定するリスト番号を選定する。
(Step S71)
The IC card access device 200 selects a list number specifying the session key to be used next, for example, the session key K17 in the session key group list of FIG.

次に、暗号化手段210が、例えば、選択したファイルAより値を読み出すREAD BINARYコマンドの平文データに、次に用いるセッション鍵K17のリスト番号を加え、そのデータを、セッション鍵K5を利用して暗号化しコマンドの暗号化データ320を作成する。 Next, the encryption means 210 adds the list number of the session key K17 to be used next to the plaintext data of the READ BINARY command for reading the value from the selected file A, for example, and encrypts the data using the session key K5. It is encrypted to create encrypted data 320 of the command.

(ステップS72)
次に、暗号化手段210が、ヘッダ310とコマンドの暗号化データ320をセッション鍵K5で暗号化してメッセージ認証コードMACを作成する。そして、ICカードアクセス装置200が、ヘッダ310とコマンドの暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300をICカード100に送信する。
(Step S72)
Next, the encryption means 210 encrypts the header 310 and the encrypted data 320 of the command with the session key K5 to create a message authentication code MAC. Then, the IC card access device 200 transmits to the IC card 100 a secure messaging command 300 consisting of a header 310, command encrypted data 320, and a message authentication code MAC.

(ステップS73~S74)
ICカード100は、第1の実施形態のステップS33からS34と同様な処理により、コマンドデータをセキュアメッセージングコマンド300であると認識し復号手段120で復号し、READ BINARYコマンドの平文データと、次に用いるセッション鍵のリスト番号を得る。
(Steps S73-S74)
The IC card 100 recognizes the command data as the secure messaging command 300 by the same processing as steps S33 to S34 of the first embodiment, decrypts the command data by the decryption means 120, and converts the plaintext data of the READ BINARY command into Get the list number of session keys to use.

ICカード100は、次に用いるセッション鍵のリスト番号と、図8のセッション鍵群リストから、次に用いるセッション鍵がセッション鍵K17であると判定し、次に用いるセッション鍵K17を用意する。 Based on the list number of the session key to be used next and the session key group list in FIG. 8, the IC card 100 determines that the session key to be used next is the session key K17, and prepares the session key K17 to be used next.

(ステップS75~S77)
ICカード100は、復号したREAD BINARYコマンドに従ってファイルAより値を読み出す処理を実行し、レスポンスデータのセキュアメッセージングコマンド300をICカードアクセス装置200に返信する。
(Steps S75-S77)
The IC card 100 executes processing for reading values from the file A according to the decoded READ BINARY command, and returns a secure messaging command 300 as response data to the IC card access device 200 .

(ステップS78)
ICカード100は、ICカードアクセス装置200とのセキュアメッセージンで使用
するセッション鍵を、次のセッション鍵K17に変更する。
(Step S78)
The IC card 100 changes the session key used in secure messaging with the IC card access device 200 to the next session key K17.

(ステップS79)
ICカードアクセス装置200の復号手段220が、ICカードアクセス装置200が記憶しているセッション鍵K5を用いて、レスポンスの暗号化データ320を復号して、レスポンスデータの平文データを得る。
(Step S79)
The decryption means 220 of the IC card access device 200 decrypts the encrypted response data 320 using the session key K5 stored in the IC card access device 200 to obtain plaintext data of the response data.

(ステップS80)
ICカードアクセス装置200は、ICカード100から受信したコマンドがレスポンスデータであった場合は、ICカード100とのセキュアメッセージンで使用するセッション鍵を、次のセッション鍵K17に変更する。
(Step S80)
When the command received from the IC card 100 is response data, the IC card access device 200 changes the session key used in secure messaging with the IC card 100 to the next session key K17.

<第3の実施形態>
本発明の第3の実施形態は、図13の様に構成する。第3の実施形態が第1及び第2の実施形態と相違する点は、ICカードアクセス装置200とICカード100がセッション鍵を変更する複数の演算アルゴリズムを共有して、その演算アルゴリズムを同期して切り替えてセッション鍵を変更する演算に用いることである。
<Third Embodiment>
A third embodiment of the present invention is constructed as shown in FIG. The difference of the third embodiment from the first and second embodiments is that the IC card access device 200 and the IC card 100 share a plurality of arithmetic algorithms for changing the session key and synchronize the arithmetic algorithms. It is to use it for the operation to change the session key by switching the session key.

例えば、ICカードアクセス装置200とICカード100が、セッション鍵変更の演算1と演算2と演算3を共有し、演算1は、先に用いたセッション鍵と次に用いる演算鍵の排他的論理和(XOR)を演算することで、次に用いるセッション鍵を演算する。 For example, the IC card access device 200 and the IC card 100 share operation 1, operation 2, and operation 3 of changing the session key, and operation 1 is the exclusive OR of the previously used session key and the operation key to be used next. By calculating (XOR), the session key to be used next is calculated.

演算2は、先に用いたセッション鍵と次に用いる演算鍵の論理積(AND)を演算することで、次に用いるセッション鍵を演算する。 Calculation 2 calculates the session key to be used next by calculating the logical product (AND) of the session key used previously and the calculation key to be used next.

例えば、演算3は、先に用いた演算鍵と次に用いる演算鍵の排他的論理和(XOR)を演算することで、次に用いるセッション鍵を演算する。 For example, the operation 3 calculates the session key to be used next by calculating the exclusive OR (XOR) of the operation key used previously and the operation key to be used next.

そして、ICカードアクセス装置200とICカード100が、その演算アルゴリズムを選択して用いるセッション鍵変更演算切替手段231とセッション鍵変更演算切替手段131を有する。セッション鍵変更演算切替手段231とセッション鍵変更演算切替手段131は、同期してセッション鍵変更の複数の演算アルゴリズムを切り替えて用いて同じセッション鍵を算出する。 The IC card access device 200 and the IC card 100 have session key change calculation switching means 231 and session key change calculation switching means 131 which select and use the calculation algorithm. The session key change calculation switching means 231 and the session key change calculation switching means 131 synchronize and switch between a plurality of session key change calculation algorithms to calculate the same session key.

ICカードアクセス装置200とICカード100がセキュアメッセージングで1つのコマンドを処理する毎に、次のセキュアメッセージングで利用するセッション鍵変更の演算を互いに同期して切り替えて、次に用いるセッション鍵を算出し、次のセキュアメッセージングは、更新したセッション鍵を用いて通信する。 Each time the IC card access device 200 and the IC card 100 process one command in secure messaging, they synchronously switch the operation of changing the session key to be used in the next secure messaging, and calculate the session key to be used next. , subsequent secure messaging communicates using the updated session key.

また、ICカードアクセス装置200が演算鍵群作成手段251を有し、演算鍵群作成手段251が、図14の様な演算鍵群リストを作成し、ICカード100に送信して、ICカードアクセス装置200とICカード100が演算鍵群を共有する。セッション鍵変更演算切替手段231とセッション鍵変更演算切替手段131は、互いに同期して切り替える同じ演算鍵を用いて次に用いるセッション鍵を算出する。 Further, the IC card access device 200 has an operation key group creation means 251, and the operation key group creation means 251 creates an operation key group list as shown in FIG. The device 200 and the IC card 100 share the operation key group. The session key change calculation switching means 231 and the session key change calculation switching means 131 calculate the session key to be used next using the same calculation key that is switched in synchronization with each other.

(演算鍵群の共有処理)
以下で、図15を参照して、ICカード100とICカードアクセス装置200が演算鍵群を共有する処理の手順を説明する。
(Sharing processing of operation key group)
A procedure of processing for sharing the operation key group between the IC card 100 and the IC card access device 200 will be described below with reference to FIG.

(ステップS81)
ICカードアクセス装置200は、乱数生成手段等の演算鍵群作成手段251を用いて演算鍵EK1~EK18の演算鍵群を作成し、マスタ鍵MKEYを用いて暗号化し、この18個の演算鍵群EK1~EK18を演算鍵群復号コマンドに乗せてICカード100に送信する。
(Step S81)
The IC card access device 200 creates the operation key group of operation keys EK1 to EK18 using the operation key group creation means 251 such as the random number generation means, encrypts them using the master key MKEY, and encrypts the 18 operation key groups. EK1 to EK18 are put on the operation key group decryption command and transmitted to the IC card 100 .

(ステップS82)
ICカード100は、この演算鍵群復号コマンドを受信すると、そのコマンドコードから演算鍵群復号コマンドであることを認識し、演算鍵群復号コマンドの受信のレスポンスデータをICカードアクセス装置200に返信する。
(Step S82)
When the IC card 100 receives this operation key group decryption command, it recognizes that it is an operation key group decryption command from the command code, and returns response data for reception of the operation key group decryption command to the IC card access device 200. .

(ステップS83)
次に、ICカード100の復号手段120が、記憶手段14に記憶されているマスタ鍵MKEYを読み出し、このマスタ鍵MKEYを用いて、演算鍵群復号コマンドの暗号化データから演算鍵EK1~EK18を復号して一時記憶手段RAMで記憶する。
(Step S83)
Next, the decryption means 120 of the IC card 100 reads out the master key MKEY stored in the storage means 14, and uses this master key MKEY to extract the operation keys EK1 to EK18 from the encrypted data of the operation key group decryption command. It is decrypted and stored in the temporary storage means RAM.

(ステップS84)
次に、ICカード100が、次に用いるセッション鍵K1を演算鍵EK1に設定する。
(Step S84)
Next, the IC card 100 sets the session key K1 to be used next as the operation key EK1.

(ステップS85)
次に、ICカードアクセス装置200が、次に用いるセッション鍵K1を演算鍵EK1に設定する。
(Step S85)
Next, the IC card access device 200 sets the session key K1 to be used next as the operation key EK1.

(セキュアメッセージングコマンドの通信手順)
次に、図16から図18を参照して、セキュアメッセージング処理によるセキュアメッセージングコマンド300の通信手順を説明する。
(Secure messaging command communication procedure)
Next, a communication procedure of the secure messaging command 300 by the secure messaging process will be described with reference to FIGS. 16 to 18. FIG.

(ステップS91)
先ず、ICカードアクセス装置200が、例えば、図14の演算群リストの演算鍵EK12を指定するリスト番号を選定する。
(Step S91)
First, the IC card access device 200 selects, for example, a list number designating the operation key EK12 in the operation group list of FIG.

次に、暗号化手段210が、ICカード100のファイルAを選択するSELECT FILEコマンドの平文データに、次に用いる演算鍵EK12のリスト番号を加え、そのデータを、第1のセッション鍵K1を利用して暗号化しコマンドの暗号化データ320を作成する。 Next, the encryption means 210 adds the list number of the operation key EK12 to be used next to the plaintext data of the SELECT FILE command for selecting the file A of the IC card 100, and uses the first session key K1 for the data. to create encrypted data 320 of the command.

(ステップS92)
次に、暗号化手段210が、ヘッダ310とコマンドの暗号化データ320をセッション鍵K1で暗号化してメッセージ認証コードMACを作成する。そして、ICカードアクセス装置200が、ヘッダ310とコマンドの暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300をICカード100に送信する。
(Step S92)
Next, the encryption means 210 encrypts the header 310 and the encrypted data 320 of the command with the session key K1 to create a message authentication code MAC. Then, the IC card access device 200 transmits to the IC card 100 a secure messaging command 300 consisting of a header 310, command encrypted data 320, and a message authentication code MAC.

(ステップS93~S94)
ICカード100は、第1の実施形態のステップS13からS14と同様な処理により、コマンドデータをセキュアメッセージングコマンド300であると認識し復号手段120で復号し、SELECT FILEコマンドの平文データと、次に用いる演算鍵のリスト番号を得る。
(Steps S93-S94)
The IC card 100 recognizes the command data as the secure messaging command 300 by the same processing as steps S13 to S14 of the first embodiment, decrypts the command data by the decryption means 120, and converts the plaintext data of the SELECT FILE command and then Get the list number of the operation key to use.

ICカード100は、次に用いる演算鍵のリスト番号と、図14の演算鍵群リストから、次に用いる演算鍵が演算鍵EK12であると判定し、次に用いる演算鍵EK12を用意する。 The IC card 100 determines that the operation key to be used next is the operation key EK12 from the list number of the operation key to be used next and the operation key group list in FIG. 14, and prepares the operation key EK12 to be used next.

(ステップS95~S97)
ICカード100は、復号したSELECT FILEコマンドに従ってICカード100のファイルAを選択する処理を行い、レスポンスデータのセキュアメッセージングコマンド300をICカードアクセス装置200に返信する。
(Steps S95-S97)
The IC card 100 selects the file A of the IC card 100 according to the decrypted SELECT FILE command, and returns a secure messaging command 300 as response data to the IC card access device 200 .

(ステップS98)
ICカード100のセッション鍵変更演算切替手段131が、次に、以下の演算処理で次のセッション鍵K2を導出する。すなわち、セッション鍵変更演算切替手段131は、排他的論理和を行う演算1を選んで、セッション鍵K1と演算鍵EK12のXOR(排他的論理和)を演算し、その結果を新たなセッション鍵K2とする。そして、ICカード100は、ICカードアクセス装置200とのセキュアメッセージンで使用するセッション鍵をセッション鍵K2に変更する。
(Step S98)
The session key change calculation switching means 131 of the IC card 100 then derives the next session key K2 by the following calculation processing. That is, the session key change operation switching means 131 selects operation 1 that performs an exclusive OR, XORs (exclusive OR) the session key K1 and operation key EK12, and converts the result into a new session key K2. and Then, IC card 100 changes the session key used in secure messaging with IC card access device 200 to session key K2.

(ステップS99)
ICカードアクセス装置200の復号手段220が、ICカードアクセス装置200が記憶しているセッション鍵K1を用いて、コマンドの暗号化データ320を復号して、レスポンスデータの平文データを得る。
(Step S99)
The decryption means 220 of the IC card access device 200 decrypts the command encrypted data 320 using the session key K1 stored in the IC card access device 200 to obtain the plaintext data of the response data.

(ステップS100)
ICカードアクセス装置200は、ICカード100から受信したコマンドがレスポンスデータであった場合は、セッション鍵変更演算切替手段231が、次にICカード100とのセキュアメッセージンで使用するセッション鍵K2を、以下の演算処理で導出する。
(Step S100)
In the IC card access device 200, when the command received from the IC card 100 is response data, the session key change calculation switching means 231 next uses the session key K2 for secure messaging with the IC card 100 as It is derived by the following arithmetic processing.

すなわち、セッション鍵変更演算切替手段231は、ICカード100に同期してICカード100が使用したのと同じ演算1を選んで、セッション鍵K1と演算鍵EK12のXOR(排他的論理和)を演算し、その結果を新たなセッション鍵K2とする。そして、ICカードアクセス装置200は、ICカード100とのセキュアメッセージンで使用するセッション鍵をセッション鍵K2に変更する。 That is, the session key change operation switching means 231 synchronizes with the IC card 100, selects the same operation 1 used by the IC card 100, and XORs (exclusive OR) the session key K1 and the operation key EK12. and the result is set as a new session key K2. Then, IC card access device 200 changes the session key used in secure messaging with IC card 100 to session key K2.

(ステップS101)
ICカードアクセス装置200が、次に用いる演算鍵の、例えば、図14の演算鍵群リストの演算鍵EK5を指定するリスト番号を選定する。
(Step S101)
The IC card access device 200 selects a list number designating the operation key to be used next, for example, the operation key EK5 in the operation key group list of FIG.

次に、暗号化手段210が、例えば、選択したファイルAに対して値を書き込むWRITE BINARYコマンドの平文データに、次に用いる演算鍵EK5のリスト番号を加え、そのデータを、セッション鍵K2を用いて暗号化しコマンドの暗号化データ320を作成する。 Next, the encryption means 210 adds the list number of the operation key EK5 to be used next to the plaintext data of the WRITE BINARY command that writes the value to the selected file A, and converts the data using the session key K2. to create encrypted data 320 of the command.

(ステップS102)
次に、暗号化手段210が、ヘッダ310とコマンドの暗号化データ320をセッション鍵K2で暗号化してメッセージ認証コードMACを作成する。そして、ICカードアクセス装置200が、ヘッダ310とコマンドの暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300をICカード100に送信する。
(Step S102)
Next, the encryption means 210 encrypts the header 310 and the encrypted data 320 of the command with the session key K2 to create a message authentication code MAC. Then, the IC card access device 200 transmits to the IC card 100 a secure messaging command 300 consisting of a header 310, command encrypted data 320, and a message authentication code MAC.

(ステップS103~S104)
ICカード100は、第1の実施形態のステップS23からS24と同様な処理により
、コマンドデータをセキュアメッセージングコマンド300であると認識し復号手段120で復号し、WRITE BINARYコマンドの平文データと、次に用いる演算鍵のリスト番号を得る。
(Steps S103-S104)
The IC card 100 recognizes the command data as the secure messaging command 300 by the same processing as steps S23 to S24 of the first embodiment, decrypts the command data by the decryption means 120, converts the plaintext data of the WRITE BINARY command, and then Get the list number of the operation key to use.

ICカード100は、次に用いる演算鍵のリスト番号と、図14の演算鍵群リストから、次に用いる演算鍵が演算鍵EK5であると判定し、次に用いる演算鍵EK5を用意する。 The IC card 100 determines that the operation key to be used next is the operation key EK5 from the list number of the operation key to be used next and the operation key group list in FIG. 14, and prepares the operation key EK5 to be used next.

(ステップS105~S107)
ICカード100は、復号したWRITE BINARYコマンドに従ってファイル書き込み処理を実行し、レスポンスデータのセキュアメッセージングコマンド300をICカードアクセス装置200に返信する。
(Steps S105-S107)
The IC card 100 executes file write processing according to the decrypted WRITE BINARY command, and returns a secure messaging command 300 as response data to the IC card access device 200 .

(ステップS108)
ICカード100のセッション鍵変更演算切替手段131が、次に、以下の演算処理で次のセッション鍵K3を導出する。すなわち、セッション鍵変更演算切替手段131は、論理積を行う演算2を選んで、セッション鍵K2と演算鍵EK5のAND(論理積)を演算し、その結果を新たなセッション鍵K3とする。そして、ICカード100は、ICカードアクセス装置200とのセキュアメッセージンで使用するセッション鍵をセッション鍵K3に変更する。
(Step S108)
The session key change calculation switching means 131 of the IC card 100 then derives the next session key K3 by the following calculation processing. That is, the session key change calculation switching means 131 selects the calculation 2 for logical AND, calculates the AND (logical product) of the session key K2 and the calculation key EK5, and sets the result as a new session key K3. Then, IC card 100 changes the session key used in secure messaging with IC card access device 200 to session key K3.

(ステップS109)
ICカードアクセス装置200の復号手段220が、ICカードアクセス装置200が記憶しているセッション鍵K2を用いて、レスポンスの暗号化データ320を復号して、レスポンスデータの平文データを得る。
(Step S109)
The decryption means 220 of the IC card access device 200 decrypts the encrypted response data 320 using the session key K2 stored in the IC card access device 200 to obtain plaintext data of the response data.

(ステップS110)
ICカードアクセス装置200は、ICカード100から受信したコマンドがレスポンスデータであった場合は、セッション鍵変更演算切替手段231が、次にICカード100とのセキュアメッセージンで使用するセッション鍵K3を、以下の演算処理で導出する。
(Step S110)
In the IC card access device 200, when the command received from the IC card 100 is response data, the session key change calculation switching means 231 next uses the session key K3 for secure messaging with the IC card 100 as It is derived by the following arithmetic processing.

すなわち、セッション鍵変更演算切替手段231は、ICカード100に同期してICカード100が使用したのと同じ演算2を選んで、セッション鍵K2と演算鍵EK5のAND(論理積)を演算し、その結果を新たなセッション鍵K3とする。そして、ICカードアクセス装置200は、ICカード100とのセキュアメッセージンで使用するセッション鍵をセッション鍵K3に変更する。 That is, the session key change operation switching means 231 synchronizes with the IC card 100 and selects the same operation 2 used by the IC card 100, calculates the AND (logical product) of the session key K2 and the operation key EK5, The result is set as a new session key K3. Then, IC card access device 200 changes the session key used in secure messaging with IC card 100 to session key K3.

(ステップS111)
ICカードアクセス装置200が、次に用いる演算鍵の、例えば、図14の演算鍵群リストの演算鍵EK17を指定するリスト番号を選定する。
(Step S111)
The IC card access device 200 selects a list number designating the operation key to be used next, for example, the operation key EK17 in the operation key group list of FIG.

次に、暗号化手段210が、例えば、選択したファイルAより値を読み出すREAD BINARYコマンドの平文データに、次に用いる演算鍵EK17のリスト番号を加え、そのデータを、セッション鍵K3を用いて暗号化しコマンドの暗号化データ320を作成する。 Next, the encryption means 210 adds the list number of the operation key EK17 to be used next to the plaintext data of the READ BINARY command for reading the value from the selected file A, for example, and encrypts the data using the session key K3. and create encrypted data 320 of the command.

(ステップS112)
次に、暗号化手段210が、ヘッダ310とコマンドの暗号化データ320をセッション鍵K3で暗号化してメッセージ認証コードMACを作成する。そして、ICカードアク
セス装置200が、ヘッダ310とコマンドの暗号化データ320とメッセージ認証コードMACから成るセキュアメッセージングコマンド300をICカード100に送信する。
(Step S112)
Next, the encryption means 210 encrypts the header 310 and the encrypted data 320 of the command with the session key K3 to create a message authentication code MAC. Then, the IC card access device 200 transmits to the IC card 100 a secure messaging command 300 consisting of a header 310, command encrypted data 320, and a message authentication code MAC.

(ステップS113~S114)
ICカード100は、第1の実施形態のステップS33からS34と同様な処理により、コマンドデータをセキュアメッセージングコマンド300であると認識し復号手段120で復号し、READ BINARYコマンドの平文データと、次に用いる演算鍵のリスト番号を得る。
(Steps S113-S114)
The IC card 100 recognizes the command data as the secure messaging command 300 by the same processing as steps S33 to S34 of the first embodiment, decrypts the command data by the decryption means 120, and converts the plaintext data of the READ BINARY command into Get the list number of the operation key to use.

ICカード100は、次に用いる演算鍵のリスト番号と、図14のセッション鍵群リストから、次に用いる演算鍵が演算鍵EK17であると判定し、次に用いる演算鍵EK17を用意する。 The IC card 100 determines that the operation key to be used next is the operation key EK17 from the list number of the operation key to be used next and the session key group list in FIG. 14, and prepares the operation key EK17 to be used next.

(ステップS115~S117)
ICカード100は、復号したREAD BINARYコマンドに従ってファイルAより値を読み出す処理を実行し、レスポンスデータのセキュアメッセージングコマンド300をICカードアクセス装置200に返信する。
(Steps S115-S117)
The IC card 100 executes processing for reading values from the file A according to the decoded READ BINARY command, and returns a secure messaging command 300 as response data to the IC card access device 200 .

(ステップS118)
ICカード100のセッション鍵変更演算切替手段131が、次に、以下の演算処理で次のセッション鍵K4を導出する。すなわち、セッション鍵変更演算切替手段131は、以前の演算鍵と排他的論理和を行う演算3を選んで、演算鍵EK5と演算鍵EK17のXOR(排他的論理和)を演算し、その結果を新たなセッション鍵K4とする。そして、ICカード100は、ICカードアクセス装置200とのセキュアメッセージンで使用するセッション鍵をセッション鍵K4に変更する。
(Step S118)
The session key change calculation switching means 131 of the IC card 100 then derives the next session key K4 by the following calculation processing. That is, the session key change operation switching means 131 selects the operation 3 that performs an exclusive OR with the previous operation key, XORs (exclusive OR) the operation key EK5 and the operation key EK17, and converts the result to A new session key K4 is assumed. Then, IC card 100 changes the session key used in secure messaging with IC card access device 200 to session key K4.

(ステップS119)
ICカードアクセス装置200の復号手段220が、ICカードアクセス装置200が記憶しているセッション鍵K3を用いて、レスポンスの暗号化データ320を復号して、レスポンスデータの平文データを得る。
(Step S119)
The decryption means 220 of the IC card access device 200 decrypts the encrypted response data 320 using the session key K3 stored in the IC card access device 200 to obtain the plaintext data of the response data.

(ステップS120)
ICカードアクセス装置200は、ICカード100から受信したコマンドがレスポンスデータであった場合は、セッション鍵変更演算切替手段231が、次にICカード100とのセキュアメッセージンで使用するセッション鍵K4を、以下の演算処理で導出する。
(Step S120)
In the IC card access device 200, when the command received from the IC card 100 is response data, the session key change calculation switching means 231 next uses the session key K4 for secure messaging with the IC card 100 as It is derived by the following arithmetic processing.

すなわち、セッション鍵変更演算切替手段231は、ICカード100に同期してICカード100が使用したのと同じ演算3を選んで、演算鍵EK5と演算鍵EK17のXOR(排他的論理和)を演算し、その結果を新たなセッション鍵K4とする。そして、ICカードアクセス装置200は、ICカード100とのセキュアメッセージンで使用するセッション鍵をセッション鍵K4に変更する。 That is, the session key change operation switching means 231 synchronizes with the IC card 100, selects the same operation 3 used by the IC card 100, and calculates the XOR (exclusive OR) of the operation key EK5 and the operation key EK17. and the result is used as a new session key K4. Then, IC card access device 200 changes the session key used in secure messaging with IC card 100 to session key K4.

以上、本発明の好適な実施形態について説明したが、本発明は以上の実施形態に限定されず、ICカードアクセス装置200が送信するコマンドに使用するセッション鍵とICカード100が送信するレスポンスに使用するセッション鍵を異なるものにすることもできる。すなわち、ICカードアクセス装置200とICカード100が、コマンド送信時のセッション鍵とレスポンス送信時のセッション鍵を互いに同期させて切り替えて用いて通信する暗号化通信システムにも適用できる。 Although the preferred embodiments of the present invention have been described above, the present invention is not limited to the above embodiments. It is also possible to use different session keys. That is, the present invention can also be applied to an encrypted communication system in which the IC card access device 200 and the IC card 100 communicate by synchronizing the session key for command transmission and the session key for response transmission and switching between them.

また、本発明は、ICカードアクセス装置200とICカード100の間の暗号化通信システムに限定されず、携帯端末装置とICカードアクセス装置200との間で通信する暗号化通信システムにも適用でき、更に、携帯端末装置同士の暗号化通信システムにも適用できる。すなわち、本発明は2つの通信装置間でセキュアメッセージングコマンド300を通信する通信システムの暗号化通信システムに適用することができる。 Moreover, the present invention is not limited to the encrypted communication system between the IC card access device 200 and the IC card 100, but can also be applied to an encrypted communication system for communication between the mobile terminal device and the IC card access device 200. Furthermore, it can also be applied to an encrypted communication system between portable terminal devices. That is, the present invention is applicable to encrypted communication systems for communication systems that communicate secure messaging commands 300 between two communication devices.

1・・・暗号化通信システム
11・・・制御手段
12・・・コプロセッサ
13・・・通信手段
14・・・記憶手段
100・・・ICカード
110・・・暗号化手段
120・・・復号手段
130・・・セッション鍵変更演算手段
131・・・セッション鍵変更演算切替手段
200・・・ICカードアクセス装置
210・・・暗号化手段
220・・・復号手段
230・・・セッション鍵変更演算手段
231・・・セッション鍵変更演算切替手段
240・・・初期化セッション鍵生成手段
250・・・セッション鍵群作成手段
251・・・演算鍵群作成手段
300・・・セキュアメッセージングコマンド
310・・・ヘッダ
320・・・コマンド/レスポンスの暗号化データ
AR1・・・ファイル管理領域
AR2・・・システム領域
AR3・・・ユーザデータ領域
DF・・・専用ファイル
EF・・・基礎ファイル
EK1、EK2、EK3~EK18・・・演算鍵
IEF・・・内部基礎ファイル
K0、K1・・・初期化セッション鍵
K2、K3、K4~K18・・・セッション鍵
MAC・・メッセージ認証コード
MKEY・・・マスタ鍵
RAM・・・一時記憶手段
ROM・・・固定記憶手段
WEF・・・作業基礎ファイル
Reference Signs List 1 Encrypted communication system 11 Control means 12 Coprocessor 13 Communication means 14 Storage means 100 IC card 110 Encryption means 120 Decryption Means 130 Session key change calculation means 131 Session key change calculation switching means 200 IC card access device 210 Encryption means 220 Decryption means 230 Session key change calculation means 231 Session key change operation switching means 240 Initialization session key generation means 250 Session key group creation means 251 Operation key group creation means 300 Secure messaging command 310 Header 320 Encrypted data of command/response AR1 File management area AR2 System area AR3 User data area DF Dedicated file EF Basic files EK1, EK2, EK3 to EK18 Operation key IEF Internal basic files K0, K1 Initialization session keys K2, K3, K4 to K18 Session key MAC Message authentication code MKEY Master key RAM Temporary storage means ROM --- fixed storage means WEF --- working basic files

Claims (6)

第1の通信装置と第2の通信装置間でセキュアメッセージングコマンドを通信する通信システムの暗号化通信システムであって、
第1の通信装置と第2の通信装置が、それぞれ、暗号化手段と、復号手段と、セッション鍵変更演算手段を備え、
前記第1の通信装置と第2の通信装置が第1の初期化セッション鍵と第2の初期化セッション鍵を共有し、第2の初期化セッション鍵を前記セキュアメッセージングコマンドによる最初のコマンド処理に用いる現用のセッション鍵とし、第1の初期化セッション鍵を旧セッション鍵とし、
前記セキュアメッセージングコマンドによるコマンド処理を行う都度、現用のセッション鍵と旧セッション鍵を演算することで新セッション鍵を作成し、現用のセッション鍵を旧セッション鍵にし、
新セッション鍵を、次のセキュアメッセージングコマンドによるコマンド処理を行う際に用いる現用のセッション鍵にして用いて暗号化通信を行う
事を特徴とする暗号化通信システム。
A cryptographic communication system for communicating secure messaging commands between a first communication device and a second communication device, comprising:
each of the first communication device and the second communication device comprises encryption means, decryption means, and session key change calculation means;
The first communication device and the second communication device share a first initialization session key and a second initialization session key, and pass the second initialization session key to initial command processing with the secure messaging command. Let the current session key to be used, let the first initialization session key be the old session key,
generating a new session key by calculating the current session key and the old session key each time the command processing by the secure messaging command is performed, and making the current session key the old session key;
An encrypted communication system characterized by using a new session key as a current session key to be used when performing command processing according to the next secure messaging command to perform encrypted communication.
請求項1記載の暗号化通信システムであって、
前記第1の通信装置と第2の通信装置が、前記セッション鍵を変更する複数の演算アルゴリズムを共有し、前記セッション鍵変更演算手段が前記複数の演算アルゴリズムを同期して切り替えて用いて前記セッション鍵を変更する
事を特徴とする暗号化通信システム。
The encrypted communication system of claim 1, wherein
The first communication device and the second communication device share a plurality of arithmetic algorithms for changing the session key, and the session key change arithmetic means synchronizes and switches among the plurality of arithmetic algorithms to use the session key. change the key
An encrypted communication system characterized by:
請求項1または請求項2に記載の暗号化通信システムであって、
前記第1の通信装置がICカードアクセス装置であり、前記第2の通信装置がICカードである
事を特徴とする暗号化通信システム。
The encrypted communication system according to claim 1 or claim 2 ,
The first communication device is an IC card access device, and the second communication device is an IC card.
An encrypted communication system characterized by:
第1の通信装置と第2の通信装置間でセキュアメッセージングコマンドを通信する通信システムの暗号化通信方法であって、
第1の通信装置と第2の通信装置が、それぞれ、暗号化手段と、復号手段と、セッション鍵変更演算手段を備え、
前記第1の通信装置と第2の通信装置が第1の初期化セッション鍵と第2の初期化セッション鍵を共有し、第2の初期化セッション鍵を前記セキュアメッセージングコマンドによる最初のコマンド処理に用いる現用のセッション鍵とし、第1の初期化セッション鍵を旧セッション鍵とし、
前記セキュアメッセージングコマンドによるコマンド処理を行う都度、現用のセッション鍵と旧セッション鍵を演算することで新セッション鍵を作成し、現用のセッション鍵を旧セッション鍵にし、
新セッション鍵を、次のセキュアメッセージングコマンドによるコマンド処理を行う際に用いる現用のセッション鍵にして用いて暗号化通信を行う
事を特徴とする暗号化通信方法
An encrypted communication method for a communication system for communicating secure messaging commands between a first communication device and a second communication device, comprising:
each of the first communication device and the second communication device comprises encryption means, decryption means, and session key change calculation means;
The first communication device and the second communication device share a first initialization session key and a second initialization session key, and pass the second initialization session key to initial command processing with the secure messaging command. Let the current session key to be used, let the first initialization session key be the old session key,
generating a new session key by calculating the current session key and the old session key each time the command processing by the secure messaging command is performed, and making the current session key the old session key;
An encrypted communication method , characterized in that encrypted communication is performed by using a new session key as a current session key to be used when performing command processing according to a next secure messaging command .
請求項記載の暗号化通信方法であって、
前記第1の通信装置と第2の通信装置が、前記セッション鍵を変更する複数の演算アルゴリズムを共有し、前記セッション鍵変更演算手段が前記複数の演算アルゴリズムを同期して切り替えて用いて前記セッション鍵を変更する
事を特徴とする暗号化通信方法
The encrypted communication method according to claim 4 ,
The first communication device and the second communication device share a plurality of arithmetic algorithms for changing the session key, and the session key change arithmetic means synchronizes and switches among the plurality of arithmetic algorithms to use the session key. change the key
An encrypted communication method characterized by:
請求項4または請求項5に記載の暗号化通信方法であって、
前記第1の通信装置がICカードアクセス装置であり、前記第2の通信装置がICカードである
事を特徴とする暗号化通信方法。
The encrypted communication method according to claim 4 or claim 5 ,
The first communication device is an IC card access device, and the second communication device is an IC card.
An encrypted communication method characterized by:
JP2018228074A 2018-12-05 2018-12-05 Encrypted communication system and encrypted communication method Active JP7206869B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018228074A JP7206869B2 (en) 2018-12-05 2018-12-05 Encrypted communication system and encrypted communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018228074A JP7206869B2 (en) 2018-12-05 2018-12-05 Encrypted communication system and encrypted communication method

Publications (2)

Publication Number Publication Date
JP2020092323A JP2020092323A (en) 2020-06-11
JP7206869B2 true JP7206869B2 (en) 2023-01-18

Family

ID=71013159

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018228074A Active JP7206869B2 (en) 2018-12-05 2018-12-05 Encrypted communication system and encrypted communication method

Country Status (1)

Country Link
JP (1) JP7206869B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117375816A (en) * 2023-10-16 2024-01-09 中电信量子科技有限公司 Methods and systems for encrypted interoperability of communication systems with different encodings

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005050320A (en) 2003-07-16 2005-02-24 Matsushita Electric Ind Co Ltd how to access
JP2006059227A (en) 2004-08-23 2006-03-02 Matsushita Electric Ind Co Ltd IC card
WO2011114373A1 (en) 2010-03-17 2011-09-22 富士通株式会社 Communication device, program, and method
JP2015026892A (en) 2013-07-24 2015-02-05 株式会社メガチップス Information processing system
JP2015095841A (en) 2013-11-13 2015-05-18 株式会社メガチップス Information processing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005050320A (en) 2003-07-16 2005-02-24 Matsushita Electric Ind Co Ltd how to access
JP2006059227A (en) 2004-08-23 2006-03-02 Matsushita Electric Ind Co Ltd IC card
WO2011114373A1 (en) 2010-03-17 2011-09-22 富士通株式会社 Communication device, program, and method
JP2015026892A (en) 2013-07-24 2015-02-05 株式会社メガチップス Information processing system
JP2015095841A (en) 2013-11-13 2015-05-18 株式会社メガチップス Information processing system

Also Published As

Publication number Publication date
JP2020092323A (en) 2020-06-11

Similar Documents

Publication Publication Date Title
KR102614209B1 (en) Method and device for safe communication between devices
WO2004002054A1 (en) Secure data transfer in mobile terminals and methods therefor
US10389523B2 (en) Apparatus and method for encrypting and decrypting
JPH09270785A (en) Information processor
KR20080020621A (en) Executing Integrity Protected Secure Stores
CN113824553B (en) Key management method, device and system
WO2019010421A1 (en) Systems and methods for generating symmetric cryptographic keys
CN111614621B (en) Internet of things communication method and system
CN112883388B (en) File encryption method and device, storage medium and electronic device
CN112311536B (en) Key hierarchical management method and system
CN115065472A (en) Multi-key encryption and decryption-based security chip encryption and decryption method and device
CN112822177A (en) Data transmission method, device, equipment and storage medium
JP7206869B2 (en) Encrypted communication system and encrypted communication method
CN116455572A (en) Data encryption method, device and equipment
US20160149702A1 (en) Communication arrangement and method for generating a cryptographic key
KR100522591B1 (en) Method to securely manage information in database
GB2541975A (en) Data protection device and data protection method thereof
CN101882991A (en) Communication data stream encryption method based on block cipher
KR20000072516A (en) end-to-end data encryption/decryption method and device for mobile data communication
EP3193487B1 (en) Encryption/decryption device and encryption/decryption method
KR101829423B1 (en) Apparatus for encrypting or decrypting and method for encrypting or decrypting using the same
CN115208569B (en) Encryption and decryption method and device for dynamic key distribution
US6802001B1 (en) Method of incrementally establishing an encryption key
CN109688584A (en) Date safety storing system and method suitable for energy-constrained network node
KR101758232B1 (en) method of encryption or decryption a data block, apparatus for encryption or decryption a data block, and storage medium for storing a program for encryption or decryption a data block

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211124

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220830

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220920

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221121

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: 20221206

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221219

R150 Certificate of patent or registration of utility model

Ref document number: 7206869

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250