JP2022081456A - Communication device, communication method, and program - Google Patents

Communication device, communication method, and program Download PDF

Info

Publication number
JP2022081456A
JP2022081456A JP2021187829A JP2021187829A JP2022081456A JP 2022081456 A JP2022081456 A JP 2022081456A JP 2021187829 A JP2021187829 A JP 2021187829A JP 2021187829 A JP2021187829 A JP 2021187829A JP 2022081456 A JP2022081456 A JP 2022081456A
Authority
JP
Japan
Prior art keywords
key
authentication procedure
host
public key
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2021187829A
Other languages
Japanese (ja)
Inventor
正剛 福永
Masatake Fukunaga
晋健 平野
Tanitake Hirano
悠太 嘉瀬
Yuta Kase
靖夫 木下
Yasuo Kinoshita
憲一 高田
Kenichi Takada
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Publication of JP2022081456A publication Critical patent/JP2022081456A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a communication device, a communication method, and a program that can perform key generation processing with higher speed without actually using DH (Diffie-Hellman key exchange) even if a command that means the use of DH for key generation is received.SOLUTION: A host H generates a random number, and molds the generated random number into a public key format by ECDH protocol to generate a pseudo public key. When confidential information is not stored, the host H selects an advanced authentication procedure and generates a session key using DH, whereas when confidential information is stored, the host H selects a simple authentication procedure and generates a session key using the confidential information and the pseudo public key.SELECTED DRAWING: Figure 2

Description

本発明は、通信相手との間で多くの計算量を要する高度認証手順と、通信相手との間でより少ない計算量で済む簡易認証手順との何れかを選択可能な通信装置等の技術分野に関する。 The present invention is a technical field such as a communication device that can select either an advanced authentication procedure that requires a large amount of calculation with a communication partner or a simple authentication procedure that requires a smaller amount of calculation with a communication partner. Regarding.

年々増え続けているスマートフォンの役割の中でも、ドアを施錠および解錠する鍵としての役割が注目されている。住宅の玄関扉や宅配ロッカーの開閉扉をスマートフォンなどのデバイスで解錠する認証システムでは、錠前(通信装置)とデバイス(通信相手)との間の認証手順において相互認証が行われることで解錠などの処理が実行される。スマートフォンがドアの鍵として利用できるようになる前に、ドアに設置される錠前とスマートフォンとで組み合わせを確定する必要があり、これはネットワーク上の不特定多数のコンピュータ同士が認証しあうことと同じ状況である。つまり、ドアの錠前とスマートフォンは、互いに組み合わせられることを事前に知らされない状態から認証しあうことになる。 Among the roles of smartphones, which are increasing year by year, the role as a key to lock and unlock doors is drawing attention. In an authentication system that unlocks the entrance door of a house or the opening / closing door of a delivery locker with a device such as a smartphone, the lock is unlocked by performing mutual authentication in the authentication procedure between the lock (communication device) and the device (communication partner). Processing such as is executed. Before a smartphone can be used as a door key, it is necessary to determine the combination of the lock installed on the door and the smartphone, which is the same as authenticating between an unspecified number of computers on the network. The situation. In other words, the door lock and the smartphone authenticate each other without being informed in advance that they will be combined with each other.

この状況で利用される認証手順は公開鍵暗号を利用した証明書検証であり、該認証では秘密裏に情報を共有する技術(Diffie-Hellmanなど)も併用され、該技術によって共有された秘密情報は、認証後の秘匿通信を実現する共通鍵暗号の鍵または鍵を生成する入力情報として利用される。よって、公開鍵暗号を利用して証明書を検証する認証手順は、検証結果を得るまでの計算量が多く、計算機資源も要する高度認証手順と言える。かかる認証では、例えば楕円曲線を利用した署名検証及び鍵交換などが実行されるが、暗号演算処理が錠前とデバイスの両者で鍵生成が行われるため、処理に時間がかかってしまうという問題があった。特許文献1には、鍵を生成する際に行う素数判定処理を最小限にすることができ、楕円曲線暗号で用いる鍵を高速に生成することが可能な楕円曲線暗号の鍵生成方法が開示されている。 The authentication procedure used in this situation is certificate verification using public key cryptography, and in the authentication, a technology for secretly sharing information (Diffie-Hellman, etc.) is also used, and the confidential information shared by the technology is also used. Is used as a key for common key cryptography that realizes confidential communication after authentication or as input information for generating a key. Therefore, it can be said that the authentication procedure for verifying a certificate using public key cryptography is an advanced authentication procedure that requires a large amount of calculation to obtain a verification result and requires computer resources. In such authentication, for example, signature verification and key exchange using an elliptic curve are executed, but there is a problem that the processing takes time because the key generation is performed by both the lock and the device in the cryptographic operation processing. rice field. Patent Document 1 discloses a key generation method for elliptic curve cryptography, which can minimize the prime number determination process performed when generating a key and can generate a key used in elliptic curve cryptography at high speed. ing.

特開2000-181351号公報Japanese Unexamined Patent Publication No. 2000-181351

ところで、特許文献1に開示された鍵生成方法では、鍵生成を高速化することができるが、鍵生成そのものの工程を省略できるわけではなく、また、専用の装置が必要となる。そのため、不特定多数のコンピュータ同士の通信では、毎回の通信開始時に高度認証手順を利用するわけではなく、一度認証に成功した際に生成した秘密情報を記憶しておき、次の通信開始時には該秘密情報を再利用する簡易認証手順も利用できる。該簡易認証手順は、公開鍵暗号よりも計算量、計算機資源が少なくすむ共通鍵暗号にて構成されるが、該秘密情報と該秘密情報を生成した際の認証手順を識別する情報を対にして保持する必要があり、全ての通信相手の秘密情報を個別に記憶することは難しく、一定期間しか保持されていない。ただし、ドアの錠前とスマートフォンの組み合わせにおいては、認証する相手が限定的であるため、ドアの錠前は秘密情報と該秘密情報を生成した際の認証手順を識別する情報を対にして記憶しておくことが可能である。そのため、通信相手との間で多くの計算量を要する高度認証手順と、通信相手との間でより少ない計算量で済む簡易認証手順とを使い分けて実施することが想定される。 By the way, in the key generation method disclosed in Patent Document 1, the key generation can be speeded up, but the process of the key generation itself cannot be omitted, and a dedicated device is required. Therefore, in communication between an unspecified number of computers, the advanced authentication procedure is not used at the start of each communication, but the confidential information generated when the authentication is successful once is stored, and the secret information is stored at the start of the next communication. A simple authentication procedure for reusing confidential information is also available. The simple authentication procedure is composed of a common key cryptosystem that requires less calculation amount and computer resources than public key cryptography, but the secret information and the information that identifies the authentication procedure when the secret information is generated are paired. It is difficult to store the confidential information of all communication partners individually, and it is held only for a certain period of time. However, in the combination of the door lock and the smartphone, the person to be authenticated is limited, so the door lock stores the confidential information and the information that identifies the authentication procedure when the confidential information is generated as a pair. It is possible to keep it. Therefore, it is assumed that the advanced authentication procedure that requires a large amount of calculation with the communication partner and the simple authentication procedure that requires a smaller amount of calculation with the communication partner are used properly.

しかしながら、認証後に暗号化通信を継続する場合、簡易認証手順にもDH(Diffie-Hellman key exchange)にて秘密情報を共有する必要があり、鍵生成に時間がかかるという問題があった。 However, when encrypted communication is continued after authentication, it is necessary to share confidential information by DH (Diffie-Hellman key exchange) even in the simple authentication procedure, and there is a problem that it takes time to generate a key.

そこで、本発明は、以上の点等に鑑みてなされたものであり、鍵生成にDHによる秘密共有命令を利用する場合であっても、より高速な処理を実現することが可能な通信装置、通信方法、及びプログラムを提供することを目的とする。 Therefore, the present invention has been made in view of the above points and the like, and is a communication device capable of realizing higher-speed processing even when a secret sharing instruction by DH is used for key generation. The purpose is to provide communication methods and programs.

上記課題を解決するために、請求項1に記載の発明は、通信相手のとの間で多くの計算量を要する高度認証手順と、前記通信相手との間でより少ない計算量で済む簡易認証手順との何れかを選択可能な通信装置であって、前記高度認証手順において生成された秘密情報を記憶するための記憶手段と、乱数を生成する第1生成手段と、前記乱数をECDH(Elliptic curve Diffie-Hellman key exchange)のプロトコルによる公開鍵のフォーマットに成型して疑似公開鍵を生成する第2生成手段と、前記通信相手との間で通信が行われるときに前記秘密情報が前記記憶手段に記憶されていない場合、前記高度認証手順を選択して前記ECDHによる鍵交換、及びセッション鍵を生成する一方、前記秘密情報が前記記憶手段に記憶されている場合、前記簡易認証手順を選択して当該秘密情報と前記疑似公開鍵とを用いてセッション鍵を生成する第3生成手段と、を備えることを特徴とする。 In order to solve the above problems, the invention according to claim 1 comprises an advanced authentication procedure that requires a large amount of calculation with the communication partner and a simple authentication that requires a smaller amount of calculation with the communication partner. A communication device capable of selecting any of the procedures, which is a storage means for storing the secret information generated in the advanced authentication procedure, a first generation means for generating a random number, and ECDH (Elliptic) for the random number. The secret information is stored in the storage means when communication is performed between the second generation means for generating a pseudo public key by molding into a public key format according to the protocol of curve Diffie-Hellman key exchange) and the communication partner. If it is not stored in, select the advanced authentication procedure to generate the key exchange and session key by the ECDH, while if the secret information is stored in the storage means, select the simple authentication procedure. It is characterized by comprising a third generation means for generating a session key using the secret information and the pseudo public key.

請求項2に記載の発明は、請求項1に記載の通信装置の通信相手となるデバイスに含まれるコンピュータに、前記高度認証手順において生成された秘密情報を記憶するステップと、前記通信装置からの前記疑似公開鍵を含むコマンドを受信するステップと、前記受信されたコマンドに応じて、前記秘密情報と前記疑似公開鍵とを用いて生成した鍵値の妥当性を確認するための暗号化データを生成するステップと、前記暗号化データを含むレスポンスを前記通信装置へ送信するステップと、を実行させることを特徴とする。 The invention according to claim 2 comprises a step of storing confidential information generated in the advanced authentication procedure in a computer included in the device to be a communication partner of the communication device according to claim 1, and a step from the communication device. The step of receiving the command including the pseudo public key, and the encrypted data for confirming the validity of the key value generated by the secret information and the pseudo public key according to the received command. It is characterized in that a step of generating and a step of transmitting a response including the encrypted data to the communication device are executed.

請求項3に記載の発明は、通信相手のとの間で多くの計算量を要する高度認証手順と、前記通信相手との間でより少ない計算量で済む簡易認証手順との何れかを選択可能な通信装置であって、前記高度認証手順において生成された秘密情報を記憶するための記憶手段を備える前記通信装置により実行される通信方法において、乱数を生成するステップと、前記乱数をECDH(Elliptic curve Diffie-Hellman key exchange)のプロトコルによる公開鍵のフォーマットに成型して疑似公開鍵を生成するステップと、前記通信相手との間で通信が行われるときに前記秘密情報が前記記憶手段に記憶されていない場合、前記高度認証手順を選択して前記ECDHによる鍵交換、及びセッション鍵を生成する一方、前記秘密情報が前記記憶手段に記憶されている場合、前記簡易認証手順を選択して当該秘密情報と前記疑似公開鍵とを用いてセッション鍵を生成するステップと、を含むことを特徴とする。 The invention according to claim 3 can select either an advanced authentication procedure that requires a large amount of calculation with the communication partner or a simple authentication procedure that requires a smaller amount of calculation with the communication partner. In a communication method executed by the communication device, which is a communication device and includes a storage means for storing the secret information generated in the advanced authentication procedure, a step of generating a random number and the random number are used as ECDH (Elliptic). The secret information is stored in the storage means when a step of generating a pseudo-public key by molding into a public key format according to the protocol of curve Diffie-Hellman key exchange) and communication with the communication partner is performed. If not, the advanced authentication procedure is selected to generate the key exchange and session key by the ECDH, while the secret information is stored in the storage means, the simple authentication procedure is selected to generate the secret. It is characterized by including a step of generating a session key using the information and the pseudo-public key.

請求項4に記載の発明は、通信相手のとの間で多くの計算量を要する高度認証手順と、前記通信相手との間でより少ない計算量で済む簡易認証手順との何れかを選択可能な通信装置に含まれるコンピュータを、前記高度認証手順において生成された秘密情報を記憶するための記憶手段と、乱数を生成する第1生成手段と、前記乱数をECDH(Elliptic curve Diffie-Hellman key exchange)のプロトコルによる公開鍵のフォーマットに成型して疑似公開鍵を生成する第2生成手段と、前記通信相手との間で通信が行われるときに前記秘密情報が前記記憶手段に記憶されていない場合、前記高度認証手順を選択して前記ECDHによる鍵交換、及びセッション鍵を生成する一方、前記秘密情報が前記記憶手段に記憶されている場合、前記簡易認証手順を選択して当該秘密情報と前記疑似公開鍵とを用いてセッション鍵を生成する第3生成手段として機能させることを特徴とする。 The invention according to claim 4 can select either an advanced authentication procedure that requires a large amount of calculation with the communication partner or a simple authentication procedure that requires a smaller amount of calculation with the communication partner. A storage means for storing secret information generated in the advanced authentication procedure, a first generation means for generating a random number, and an ECDH (Elliptic curve Diffie-Hellman key exchange) for the computer included in the communication device. ), The secret information is not stored in the storage means when communication is performed between the second generation means for generating a pseudo public key by molding into a public key format according to the protocol of) and the communication partner. , The advanced authentication procedure is selected to exchange the key by the ECDH and the session key is generated, while the secret information is stored in the storage means, the simple authentication procedure is selected and the secret information and the secret information are generated. It is characterized in that it functions as a third generation means for generating a session key using a pseudo public key.

本発明によれば、鍵生成にDHの利用を意味する命令を受けた場合であっても、実際にはDHを利用しないより高速な鍵生成処理を実現することができる。 According to the present invention, even when a command indicating the use of DH is received for key generation, it is possible to realize a faster key generation process that does not actually use DH.

本実施形態に係る認証システムSの概要構成例を示す図である。It is a figure which shows the outline structure example of the authentication system S which concerns on this embodiment. ホストHにおける制御部13の認証手順選択処理の一例を示すフローチャートである。It is a flowchart which shows an example of the authentication procedure selection process of the control unit 13 in a host H. ホストHとデバイスDとの間で実施される高度認証手順の一例を示すシーケンス図である。It is a sequence diagram which shows an example of the advanced authentication procedure performed between a host H and a device D. ホストHとデバイスDとの間で実施される簡易認証手順1の一例を示すシーケンス図である。It is a sequence diagram which shows an example of the simple authentication procedure 1 performed between a host H and a device D. ECDHによる公開鍵フォーマット(A)、ホストHにより生成される疑似公開鍵Hのデータ構造(B)、及びデバイスDにより生成される疑似公開鍵Dのデータ構造(C)の一例を示す図である。It is a figure which shows an example of the public key format (A) by ECDH, the data structure (B) of a pseudo public key H generated by a host H, and the data structure (C) of a pseudo public key D generated by a device D. .. ホストHとデバイスDとの間で実施される簡易認証手順2の一例を示すシーケンス図である。It is a sequence diagram which shows an example of the simple authentication procedure 2 performed between a host H and a device D.

以下、図面を参照して本発明の実施形態について詳細に説明する。以下に説明する実施形態は、例えば、車のドアの解錠、車のエンジンの始動、住宅の玄関扉の解錠、または宅配ロッカーの開閉扉の解錠などに利用される認証システムに対して本発明を適用した場合の実施の形態である。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The embodiments described below relate to an authentication system used, for example, for unlocking a car door, starting a car engine, unlocking a house entrance door, or unlocking an opening / closing door of a delivery locker. It is an embodiment when the present invention is applied.

[1.認証システムSの概要構成]
先ず、図1を参照して、本実施形態に係る認証システムSの概要構成について説明する。図1は、本実施形態に係る認証システムSの概要構成例を示す図である。図1に示すように、認証システムSは、デバイスD、ホスト(ホストコンピュータ)Hを含んで構成される。ここで、ホストHは、本発明の通信装置の一例であり、ホストHの通信相手がデバイスDである。ホストHとデバイスDとは、例えばNFC(Near field communication)技術を用いた非接触通信を行うことが可能になっている。また、ホストHとデバイスDとの通信には、Bluetooth(登録商標)、ZigBee、LoRa、UWB(Ultra Wide Band)を用いてもよい。
[1. Overview of authentication system S]
First, with reference to FIG. 1, the outline configuration of the authentication system S according to the present embodiment will be described. FIG. 1 is a diagram showing a schematic configuration example of the authentication system S according to the present embodiment. As shown in FIG. 1, the authentication system S includes a device D and a host (host computer) H. Here, the host H is an example of the communication device of the present invention, and the communication partner of the host H is the device D. The host H and the device D can perform non-contact communication using, for example, NFC (Near field communication) technology. Further, Bluetooth (registered trademark), ZigBee, LoRa, and UWB (Ultra Wide Band) may be used for communication between the host H and the device D.

ホストHとデバイスDとは、多くの計算量を要する高度認証手順(以下、「高度認証手順」という)と、より少ない計算量で済む簡易認証手順(以下、「簡易認証手順」という)とが選択可能に実施されるようになっている。高度認証手順では、署名生成と署名検証による認証、及び公開鍵暗号方式による鍵共有が実行される。本実施形態では、一例として、高度認証手順では、ECDSA(Elliptic Curve Digital Signature Algorithm)における署名生成と署名検証による認証、及びECDH(Elliptic curve Diffie-Hellman key exchange)による鍵交換が実行されるものとする。 Host H and device D have an advanced authentication procedure that requires a large amount of calculation (hereinafter referred to as "advanced authentication procedure") and a simple authentication procedure that requires a smaller amount of calculation (hereinafter referred to as "simple authentication procedure"). It is designed to be selectively implemented. In the advanced authentication procedure, signature generation, authentication by signature verification, and key sharing by public key cryptosystem are performed. In the present embodiment, as an example, in the advanced authentication procedure, authentication by signature generation and signature verification in ECDSA (Elliptic Curve Digital Signature Algorithm) and key exchange by ECDH (Elliptic curve Diffie-Hellman key exchange) are executed. do.

一方、簡易認証手順では、高度認証手順において生成され、ホストH及びデバイスDに記憶された秘密情報と乱数を用いて(換言すると、秘密情報に基づいて)共通鍵暗号方式での相互認証が実行される。ここで、ホストHがデバイスDを認証する片側認証であってもよい。また、秘密情報とは、例えば、ホストHとデバイスDとが高度認証手順を実施した場合に、ホストHとデバイスDのみが共有することになった情報である。ECDHでは、秘密情報(Shared-secret)と呼ばれている。 On the other hand, in the simple authentication procedure, mutual authentication by the common key cryptosystem is executed using the secret information and random numbers generated in the advanced authentication procedure and stored in the host H and the device D (in other words, based on the secret information). Will be done. Here, the host H may perform one-sided authentication for authenticating the device D. Further, the confidential information is information that is shared only by the host H and the device D, for example, when the host H and the device D perform the advanced authentication procedure. In ECDH, it is called shared-secret.

なお、認証システムSが住宅の玄関扉や宅配ロッカーの開閉扉の解錠に利用される場合、ホストHは扉制御装置に適用される。或いは、認証システムSが車のドアの解錠やエンジンの始動に利用される場合、ホストHは車載コンピュータに適用される。一方、認証システムSが住宅の玄関扉、宅配ロッカーの開閉扉や車のドアの解錠に利用される場合、デバイスDは利用者により携帯される携帯端末(例えば、スマートフォン)、ICカード、またはキーホルダーなどに適用される。 When the authentication system S is used to unlock the entrance door of a house or the opening / closing door of a delivery locker, the host H is applied to the door control device. Alternatively, when the authentication system S is used to unlock the car door or start the engine, the host H is applied to the in-vehicle computer. On the other hand, when the authentication system S is used for unlocking the entrance door of a house, the opening / closing door of a delivery locker, or the door of a car, the device D is a mobile terminal (for example, a smartphone), an IC card, or an IC card carried by the user. Applies to key holders, etc.

デバイスDは、図1に示すように、通信モジュール1、制御モジュール2、及びIC(Integrated Circuit)モジュール3等を備えて構成される。なお、制御モジュール2とICモジュール3とが一体化されてもよい。通信モジュール1は、例えばNFC技術を用いた非接触通信を行う非接触ICチップ(例えば、CLF(ContactLess Front-end))であり、非接触のフィールド内で、ホストHに備えられる非接触リーダ/ライダとの間で通信を行う。 As shown in FIG. 1, the device D includes a communication module 1, a control module 2, an IC (Integrated Circuit) module 3, and the like. The control module 2 and the IC module 3 may be integrated. The communication module 1 is, for example, a non-contact IC chip (for example, CLF (ContactLess Front-end)) that performs non-contact communication using NFC technology, and is provided in the host H in a non-contact field. Communicate with the rider.

制御モジュール2は、図示しないが、CPU(Central Processing Unit)、RAM(Random Access Memory)、ROM(Read Only Memory)、及びNVM(Nonvolatile Memory)等を備えて構成され、ROMまたはNVMに記憶されたプログラム(本発明のプログラムを含む)にしたがって各種処理を実行する。例えば、制御モジュール2は、ホストHとの間の簡易認証手順と高度認証手順とのそれぞれにおいて、ホストHからのコマンドに応じて鍵生成などの演算処理を実行し、その処理結果を示すレスポンスをホストHへ送信する。 Although not shown, the control module 2 includes a CPU (Central Processing Unit), a RAM (Random Access Memory), a ROM (Read Only Memory), an NVM (Nonvolatile Memory), and the like, and is stored in the ROM or the NVM. Various processes are executed according to a program (including the program of the present invention). For example, the control module 2 executes arithmetic processing such as key generation in response to a command from the host H in each of the simple authentication procedure and the advanced authentication procedure with the host H, and outputs a response indicating the processing result. Send to host H.

ICモジュール3は、例えば高い耐タンパ性を有するセキュアエレメントである。ICモジュール3は、着脱可能な小型のICカードとしてデバイスDに搭載されてもよいし、eSIM(Subscriber Identity Module)としてデバイスDから容易に取り外しや取り換えができないように組み込み基板上に搭載されてもよい。ICモジュール3内のセキュアメモリには、デバイスDに固有の公開鍵と秘密鍵の鍵ペア、及び高度認証手順において生成された秘密情報などが記憶される。さらに、当該セキュアメモリには、デバイスDに固有のデバイスIDが記憶される。ここで、鍵ペアに含まれる公開鍵、及び当該公開鍵を特定するための鍵IDは、ホストHとの間で事前に共有される。デバイスDに固有のデバイスIDは、サーバ等により振分けられた固有値であってもよいし、デバイスDの公開鍵や秘密鍵がハッシュ化されて得られたハッシュ値であってもよい。 The IC module 3 is, for example, a secure element having high tamper resistance. The IC module 3 may be mounted on the device D as a detachable small IC card, or may be mounted on the embedded board as an eSIM (Subscriber Identity Module) so that it cannot be easily removed or replaced from the device D. good. The secure memory in the IC module 3 stores a key pair of a public key and a private key unique to the device D, secret information generated in the advanced authentication procedure, and the like. Further, a device ID unique to the device D is stored in the secure memory. Here, the public key included in the key pair and the key ID for identifying the public key are shared in advance with the host H. The device ID unique to the device D may be a unique value distributed by a server or the like, or may be a hash value obtained by hashing the public key or private key of the device D.

ホストHは、図1に示すように、通信部11、記憶部12(記憶手段の一例)、及び制御部13等を備えて構成される。通信部11は、例えばNFC技術を用いた非接触通信を行う非接触リーダ/ライダであり、非接触のフィールド内で、デバイスDに備えられる非接触ICチップとの間で通信を行う。デバイスDが通信部11の非接触のフィールドに入ると、ホストHとデバイスDとの間で初期応答シーケンスが実施される。初期応答シーケンスにおいて、通信部11により、ホストHからリクエストコマンドがデバイスDへ送信され、デバイスDからレスポンスが受信されることで、当該デバイスDが識別され、活性状態に遷移される。その後、ホストHとデバイスDとの間で高度認証手順または簡易認証手順が実施される。なお、活性状態に遷移される前に、必要に応じて、ホストHとデバイスDとの間でパラメータが交換され通信速度などの通信条件が相互に確認されてもよい。 As shown in FIG. 1, the host H includes a communication unit 11, a storage unit 12 (an example of storage means), a control unit 13, and the like. The communication unit 11 is, for example, a non-contact reader / rider that performs non-contact communication using NFC technology, and communicates with a non-contact IC chip provided in the device D in a non-contact field. When the device D enters the non-contact field of the communication unit 11, an initial response sequence is performed between the host H and the device D. In the initial response sequence, the communication unit 11 sends a request command from the host H to the device D, and receives a response from the device D, so that the device D is identified and transitioned to the active state. After that, a high-level authentication procedure or a simple authentication procedure is performed between the host H and the device D. If necessary, parameters may be exchanged between the host H and the device D and communication conditions such as the communication speed may be mutually confirmed before the transition to the active state.

ところで、通信部11の非接触のフィールドに複数のデバイスDが入ると、リクエストコマンドに対して複数のデバイスDが同時にレスポンスを送信するので、通信部11は通信相手となるデバイスDを正しく認識できない状態(コリジョン)が発生する。これを防止する対策としてアンチコリジョンが実施されるが、例えばタイムスロット方式のアンチコリジョンでは、それぞれのデバイスDが乱数に応じたレスポンス時間帯に、アンチコリジョン用のIDを含むレスポンスを送信する。これにより、通信部11は、それぞれのデバイスDを認識することが可能となる。なお、ビットコリジョン方式のアンチコリジョンでもアンチコリジョン用のID(以下、「アンチコリジョン用ID」という)がデバイスDからホストHへ送信される。 By the way, when a plurality of devices D are entered in the non-contact field of the communication unit 11, the communication unit 11 cannot correctly recognize the device D as the communication partner because the plurality of devices D simultaneously transmit a response to the request command. A state (collision) occurs. Anti-collision is implemented as a measure to prevent this. For example, in a time slot type anti-collision, each device D transmits a response including an ID for anti-collision in a response time zone corresponding to a random number. As a result, the communication unit 11 can recognize each device D. Even in the bit collision type anti-collision, the anti-collision ID (hereinafter referred to as “anti-collision ID”) is transmitted from the device D to the host H.

記憶部12は、例えば不揮発性メモリ、HDD(Hard Disk Drive)、またはSSD(Solid State Drive)などにより構成され、オペレーティングシステム及びアプリケーション等の各種プログラム(本発明のプログラムを含む)が記憶される。また、記憶部12には、ホストHに固有の公開鍵と秘密鍵の鍵ペアなどが記憶される。ここで、鍵ペアに含まれる公開鍵、及び当該公開鍵を特定するための鍵IDは、デバイスDとの間で事前に共有される。さらに、記憶部12には、ホストHとの間で通信を行ったデバイスDに固有の識別情報と、高度認証手順において生成された秘密情報とが対応付けられて記憶される。ここで、デバイスDに固有の識別情報とは、アンチコリジョン用IDであってもよいし、デバイスDに固有のデバイスIDであってもよい。なお、デバイスDの公開鍵及び鍵IDは、デバイスDに固有の識別情報に対応付けられて管理されるとよい。 The storage unit 12 is composed of, for example, a non-volatile memory, an HDD (Hard Disk Drive), an SSD (Solid State Drive), or the like, and stores various programs (including the program of the present invention) such as an operating system and an application. Further, the storage unit 12 stores a key pair of a public key and a private key unique to the host H. Here, the public key included in the key pair and the key ID for identifying the public key are shared in advance with the device D. Further, the storage unit 12 stores the identification information unique to the device D that has communicated with the host H in association with the secret information generated in the advanced authentication procedure. Here, the identification information unique to the device D may be an anti-collision ID or a device ID unique to the device D. The public key and key ID of the device D may be managed in association with the identification information unique to the device D.

制御部13(コンピュータの一例)は、CPU、RAM、及びROM等により構成され、例えば記憶部12に記憶されたプログラムにしたがって、本発明における第1生成手段、第2生成手段、及び第3生成手段として機能する。具体的には、制御部13は、例えば乱数生成アルゴリズムにより乱数を生成し、当該生成した乱数をECDHのプロトコルによる公開鍵のフォーマットに成型(成形)して疑似公開鍵を生成する。ここで、ECDHのプロトコルによる一時公開鍵のフォーマットは、ECDHに従った楕円曲線(Elliptic Curve)上のX座標の値とY座標の値とから構成され、例えば(x,y)というようなフォーマットで表される。制御部13は、例えば、X座標の値とY座標の値とのそれぞれに、乱数を設定することで疑似公開鍵を生成する。このため、X座標の値とY座標の値は、ECDHに従った楕円曲線上の座標である必要はない。 The control unit 13 (an example of a computer) is composed of a CPU, RAM, ROM, and the like, and according to, for example, a program stored in the storage unit 12, the first generation means, the second generation means, and the third generation in the present invention. Functions as a means. Specifically, the control unit 13 generates a random number by, for example, a random number generation algorithm, and molds (forms) the generated random number into a public key format according to the ECDH protocol to generate a pseudo public key. Here, the format of the temporary public key by the ECDH protocol is composed of the X-coordinate value and the Y-coordinate value on the elliptic curve according to ECDH, for example, a format such as (x, y). It is represented by. The control unit 13 generates a pseudo public key by setting a random number for each of the X coordinate value and the Y coordinate value, for example. Therefore, the X-coordinate value and the Y-coordinate value do not have to be the coordinates on the elliptic curve according to ECDH.

制御部13は、デバイスDとの間で非接触通信が行われるときに当該デバイスDに固有の識別情報を、当該デバイスDにより送信されたレスポンスから取得する。続いて、制御部13は、当該デバイスDとの間で認証手順が開始される前に、当該デバイスDから取得された識別情報に対応付けられて秘密情報が記憶部12に記憶されているか否かを判定する。そして、制御部13は、当該取得された識別情報に対応付けられて秘密情報が記憶されていないと判定した場合、高度認証手順を選択してECDHによる鍵交換、及びセッション鍵を生成する。 The control unit 13 acquires the identification information unique to the device D from the response transmitted by the device D when the non-contact communication with the device D is performed. Subsequently, the control unit 13 determines whether or not the secret information is stored in the storage unit 12 in association with the identification information acquired from the device D before the authentication procedure is started with the device D. Is determined. Then, when the control unit 13 determines that the secret information is not stored in association with the acquired identification information, the control unit 13 selects an advanced authentication procedure to exchange the key by ECDH and generate a session key.

一方、制御部13は、当該取得された識別情報に対応付けられて秘密情報が記憶されていると判定した場合、簡易認証手順を選択して当該秘密情報と前記疑似公開鍵とを用いてセッション鍵を生成する簡易認証手順を選択して当該識別情報に対応付けられた秘密情報と上記生成された疑似公開鍵とを用いてセッション鍵を生成する。例えば、制御部13は、デバイスDとの間で1回目の通信が行われる場合に高度認証手順を選択して認証を実行し、当該高度認証手順において生成された秘密情報を当該デバイスDに固有の識別情報に対応付けて記憶しておき、当該デバイスDとの間で2回目以降の通信が行われる場合に簡易認証手順を選択し当該デバイスDに固有の識別情報に対応付けられた秘密情報及び疑似公開鍵を用いて認証(相互認証または片側認証)を実行する。 On the other hand, when the control unit 13 determines that the secret information is stored in association with the acquired identification information, the control unit 13 selects a simple authentication procedure and uses the secret information and the pseudo public key for a session. A simple authentication procedure for generating a key is selected, and a session key is generated using the secret information associated with the identification information and the pseudo-public key generated above. For example, when the first communication with the device D is performed, the control unit 13 selects an advanced authentication procedure and executes authentication, and the secret information generated in the advanced authentication procedure is unique to the device D. The secret information associated with the identification information unique to the device D is stored by associating it with the identification information of the device D, and when the second and subsequent communications are performed with the device D, the simple authentication procedure is selected. And perform authentication (mutual authentication or one-sided authentication) using the pseudo public key.

[2.認証システムSの動作]
次に、図2~図6を参照して、認証システムSの動作について説明する。図2は、ホストHにおける制御部13の認証手順選択処理の一例を示すフローチャートである。図3は、ホストHとデバイスDとの間で実施される高度認証手順の一例を示すシーケンス図である。図4は、ホストHとデバイスDとの間で実施される簡易認証手順1の一例を示すシーケンス図である。図5は、ECDHによる公開鍵フォーマット(A)、ホストHにより生成される疑似公開鍵Hのデータ構造(B)、及びデバイスDにより生成される疑似公開鍵Dのデータ構造(C)の一例を示す図である。図6は、ホストHとデバイスDとの間で実施される簡易認証手順2の一例を示すシーケンス図である。
[2. Operation of authentication system S]
Next, the operation of the authentication system S will be described with reference to FIGS. 2 to 6. FIG. 2 is a flowchart showing an example of the authentication procedure selection process of the control unit 13 in the host H. FIG. 3 is a sequence diagram showing an example of an advanced authentication procedure performed between the host H and the device D. FIG. 4 is a sequence diagram showing an example of the simple authentication procedure 1 performed between the host H and the device D. FIG. 5 shows an example of the public key format (A) by ECDH, the data structure (B) of the pseudo public key H generated by the host H, and the data structure (C) of the pseudo public key D generated by the device D. It is a figure which shows. FIG. 6 is a sequence diagram showing an example of the simple authentication procedure 2 performed between the host H and the device D.

図2に示す処理は、例えば利用者によりデバイスDが通信部11(非接触リーダ/ライダ)に翳されることで、デバイスDがホストHの通信部11の非接触のフィールドに入ることにより開始される。図3に示す処理が開始されると、ホストHの制御部13は、リクエストコマンドを、通信部11を介してデバイスDへ送信する(ステップS1)。 The process shown in FIG. 2 is started by, for example, the device D being held by the communication unit 11 (non-contact reader / rider) by the user, and the device D entering the non-contact field of the communication unit 11 of the host H. Will be done. When the process shown in FIG. 3 is started, the control unit 13 of the host H transmits a request command to the device D via the communication unit 11 (step S1).

なお、複数のデバイスDが同時にアンチコリジョン用IDを応答する場合がある。この場合、ステップS1の処理では、1つだけのアンチコリジョン用IDが読み取れられるまで繰り返される。デバイスDの制御モジュール2は、ホストHからのリクエストコマンドを、通信モジュール1を介して受信すると、当該リクエストコマンドに応じて、アンチコリジョン用IDを含むレスポンスを、通信モジュール1を介してホストHへ送信する(ステップS2)。 In addition, a plurality of devices D may respond to the anti-collision ID at the same time. In this case, the process of step S1 is repeated until only one anti-collision ID is read. When the control module 2 of the device D receives the request command from the host H via the communication module 1, the control module 2 sends a response including the anti-collision ID to the host H via the communication module 1 in response to the request command. Transmit (step S2).

次いで、ホストHの制御部13は、デバイスDからのレスポンスを、通信部11を介して受信すると、通信部11を介して、アンチコリジョン用IDが含まれるデバイス選択(コマンド)をデバイスDへ送信する(ステップS3)。なお、ホストHの制御部13は、ステップS2で複数のデバイスDから送信されたレスポンスを受信すると、コリジョンによりアンチコリジョン用IDの0/1のビットを読み取れないタイミングが発生する場合がある。この場合、ステップS3において、ホストHの制御部13は、読み取れたビット列からなる識別子が含まれるデバイス選択を全てのデバイスDに送信する。そして、それぞれのデバイスDの制御モジュール2は、自身のアンチコリジョン用IDがデバイス選択に含まれる識別子と一致している場合、改めて、アンチコリジョン用IDを含むレスポンスをホストHへ送信する(一致しなければ応答しない)。これが繰り返されることで、デバイス選択に含まれる識別子が自身のアンチコリジョン用IDと一致するデバイスDだけが応答し続けることになる。これにより、複数のデバイスDから1つのデバイスDが選択される。 Next, when the control unit 13 of the host H receives the response from the device D via the communication unit 11, the control unit 13 transmits the device selection (command) including the anti-collision ID to the device D via the communication unit 11. (Step S3). When the control unit 13 of the host H receives the responses transmitted from the plurality of devices D in step S2, a timing may occur in which the 0/1 bit of the anti-collision ID cannot be read due to collision. In this case, in step S3, the control unit 13 of the host H transmits the device selection including the identifier consisting of the read bit string to all the devices D. Then, when the control module 2 of each device D matches its own anti-collision ID with the identifier included in the device selection, the control module 2 again sends a response including the anti-collision ID to the host H (matches). If not, it will not respond). By repeating this, only the device D whose identifier included in the device selection matches its own anti-collision ID will continue to respond. As a result, one device D is selected from the plurality of devices D.

次いで、デバイスDの制御モジュール2は、ホストHからのデバイス選択を、通信モジュール1を介して受信すると、当該デバイス選択に応じて、通信条件を含むレスポンスを、通信モジュール1を介してホストHへ送信する(ステップS4)。次いで、ホストHの制御部13は、デバイスDからのレスポンスを、通信部11を介して受信すると、通信部11を介してSELECTコマンド(Application IDを含む)を、通信部11を介してデバイスDへ送信する(ステップS5)。 Next, when the control module 2 of the device D receives the device selection from the host H via the communication module 1, a response including communication conditions is sent to the host H via the communication module 1 according to the device selection. Transmit (step S4). Next, when the control unit 13 of the host H receives the response from the device D via the communication unit 11, the control unit 13 issues a SELECT command (including the Application ID) via the communication unit 11 and the device D via the communication unit 11. (Step S5).

次いで、デバイスDの制御モジュール2は、ホストHからのSELECTコマンドを、通信モジュール1を介して受信すると、当該SELECTコマンドに応じてアプリケーションを選択し、当該SELECTコマンドに対するレスポンスを、通信モジュール1を介してホストHへ送信する(ステップS6)。かかるレスポンスには、例えば、SW(Status Word)“9000”及びTLV形式のFCI(File Control Information)が含まれている。 Next, when the control module 2 of the device D receives the SELECT command from the host H via the communication module 1, the control module 2 selects an application according to the SELECT command, and sends a response to the SELECT command via the communication module 1. Is transmitted to the host H (step S6). Such a response includes, for example, SW (Status Word) “9000” and FCI (File Control Information) in TLV format.

次いで、ホストHの制御部13は、デバイスDからのレスポンスを、通信部11を介して受信すると、通信部11を介して読み出しコマンドをデバイスDへ送信する(ステップS7)。次いで、デバイスDの制御モジュール2は、ホストHからの読み出しコマンドを、通信モジュール1を介して受信すると、当該読み出しコマンドに応じて、ICモジュール3からデバイスID(デバイスDに固有の識別情報の一例)を読み出し、当該デバイスIDを含むレスポンスを、通信モジュール1を介してホストHへ送信する(ステップS8)。 Next, when the control unit 13 of the host H receives the response from the device D via the communication unit 11, the control unit 13 transmits a read command to the device D via the communication unit 11 (step S7). Next, when the control module 2 of the device D receives the read command from the host H via the communication module 1, the device ID (an example of the identification information unique to the device D) is received from the IC module 3 in response to the read command. ), And the response including the device ID is transmitted to the host H via the communication module 1 (step S8).

なお、デバイスDの制御モジュール2は、ステップS5でホストHから送信されたSELECTコマンドに応じてICモジュール3からデバイスIDを読み出し、ステップS6で当該デバイスIDを含むレスポンスをホストHへ送信してもよい。この場合、ステップS7及びステップS8の処理は不要になる。また、デバイスDに固有の識別情報としてアンチコリジョン用IDが用いられる場合もステップS7及びステップS8の処理は不要になる。 Even if the control module 2 of the device D reads the device ID from the IC module 3 in response to the SELECT command transmitted from the host H in step S5 and transmits a response including the device ID to the host H in step S6. good. In this case, the processing of steps S7 and S8 becomes unnecessary. Further, even when the anti-collision ID is used as the identification information unique to the device D, the processes of steps S7 and S8 become unnecessary.

次いで、ホストHの制御部13は、デバイスDからのレスポンスを、通信部11を介して受信すると、デバイスIDまたはアンチコリジョン用IDを、デバイスDに固有の識別情報として取得する(ステップS9)。 Next, when the control unit 13 of the host H receives the response from the device D via the communication unit 11, the device ID or the anti-collision ID is acquired as the identification information unique to the device D (step S9).

次いで、ホストHの制御部13は、ステップS9で取得された識別情報に対応付けられて秘密情報が記憶部12に記憶されているか否かを判定する(ステップS10)。そして、ホストHの制御部13は、ステップS9で取得された識別情報が秘密情報に対応付けられて記憶されていないと判定した場合(ステップS10:NO)、高度認証手順を選択し、当該高度認証手順を開始する(ステップS11)。 Next, the control unit 13 of the host H determines whether or not the secret information is stored in the storage unit 12 in association with the identification information acquired in step S9 (step S10). Then, when the control unit 13 of the host H determines that the identification information acquired in step S9 is associated with the secret information and is not stored (step S10: NO), the control unit 13 selects the advanced authentication procedure and selects the advanced level. The authentication procedure is started (step S11).

一方、ホストHの制御部13は、ステップS9で取得された識別情報が秘密情報に対応付けられて記憶されていると判定した場合(ステップS10:YES)、当該識別情報に対応付けられた秘密情報を記憶部12から取得する(ステップS12)。次いで、ホストHの制御部13は、簡易認証手順を選択し、ステップS12で取得された秘密情報が用いられる当該簡易認証手順を開始する(ステップS13)。 On the other hand, when the control unit 13 of the host H determines that the identification information acquired in step S9 is associated with the secret information and stored (step S10: YES), the secret associated with the identification information is determined. Information is acquired from the storage unit 12 (step S12). Next, the control unit 13 of the host H selects a simple authentication procedure, and starts the simple authentication procedure using the confidential information acquired in step S12 (step S13).

(2.1 高度認証手順)
高度認証手順では、図3に示すように、ホストHの制御部13は、乱数Hを生成する(ステップS21)。次いで、ホストHの制御部13は、通信部11を介して認証開始コマンドをデバイスDへ送信する(ステップS22)。かかる認証開始コマンドには、ホストHに固有のホストID、ステップS21で生成された乱数H、及び高度認証手順用であることを示す情報が含まれる。
(2.1 Advanced certification procedure)
In the advanced authentication procedure, as shown in FIG. 3, the control unit 13 of the host H generates a random number H (step S21). Next, the control unit 13 of the host H transmits an authentication start command to the device D via the communication unit 11 (step S22). Such an authentication start command includes a host ID unique to the host H, a random number H generated in step S21, and information indicating that the command is for an advanced authentication procedure.

次いで、デバイスDの制御モジュール2は、ホストHからの認証開始コマンドを、通信モジュール1を介して受信し、高度認証手順用の認証開始コマンドであると判断すると、当該認証開始コマンドからホストID及び乱数Hを取得し、さらに、乱数Dを生成する(ステップS23)。次いで、デバイスDの制御モジュール2は、乱数Hと乱数DとにデバイスDの秘密鍵にて署名する(ステップS24)。つまり、ECDSAにより署名Dが生成(署名生成)される。次いで、デバイスDの制御モジュール2は、認証開始コマンドに対するレスポンスを、通信モジュール1を介してホストHへ送信する(ステップS25)。かかるレスポンスには、署名D及び乱数Dが含まれる。 Next, when the control module 2 of the device D receives the authentication start command from the host H via the communication module 1 and determines that it is the authentication start command for the advanced authentication procedure, the host ID and the host ID and the authentication start command are determined from the authentication start command. A random number H is acquired, and a random number D is further generated (step S23). Next, the control module 2 of the device D signs the random number H and the random number D with the private key of the device D (step S24). That is, the signature D is generated (signature generation) by ECDSA. Next, the control module 2 of the device D transmits a response to the authentication start command to the host H via the communication module 1 (step S25). Such a response includes a signature D and a random number D.

次いで、ホストHの制御部13は、デバイスDからのレスポンスを、通信部11を介して受信すると、当該レスポンスから署名D及び乱数Dを取得し、デバイスDの公開鍵にて署名Dを検証する(ステップS26)。つまり、ECDSAにより署名Dが検証(署名検証)される。そして、署名Dの検証が成功(認証成功)すると、ホストHの制御部13は、乱数Dと乱数HとにホストHの秘密鍵にて署名する(ステップS27)。つまり、ECDSAにより署名Hが生成される。次いで、ホストHの制御部13は、通信部11を介して認証完了コマンドをデバイスDへ送信する(ステップS28)。かかる認証完了コマンドには、署名Hが含まれる。 Next, when the control unit 13 of the host H receives the response from the device D via the communication unit 11, the signature D and the random number D are acquired from the response, and the signature D is verified by the public key of the device D. (Step S26). That is, the signature D is verified (signature verification) by ECDSA. Then, when the verification of the signature D is successful (authentication successful), the control unit 13 of the host H signs the random number D and the random number H with the private key of the host H (step S27). That is, the signature H is generated by ECDSA. Next, the control unit 13 of the host H transmits an authentication completion command to the device D via the communication unit 11 (step S28). Such an authentication completion command includes signature H.

次いで、デバイスDの制御モジュール2は、ホストHからの認証完了コマンドを、通信モジュール1を介して受信すると、当該認証完了コマンドから署名Hを取得し、ホストHの公開鍵にて署名Hを検証する(ステップS29)。つまり、ECDSAにより署名Hが検証される。そして、署名Hの検証が成功(認証成功)すると、相互認証が完了し、デバイスDの制御モジュール2は、認証完了コマンドに対するレスポンスを、通信モジュール1を介してホストHへ送信する(ステップS30)。 Next, when the control module 2 of the device D receives the authentication completion command from the host H via the communication module 1, the signature H is acquired from the authentication completion command, and the signature H is verified with the public key of the host H. (Step S29). That is, the signature H is verified by ECDSA. Then, when the verification of the signature H is successful (authentication successful), the mutual authentication is completed, and the control module 2 of the device D sends a response to the authentication completion command to the host H via the communication module 1 (step S30). ..

次いで、ホストHの制御部13は、デバイスDからのレスポンスを、通信部11を介して受信すると、ホストHに固有の一時公開鍵Hと一時秘密鍵Hの一時鍵ペアを生成する(ステップS31)。ここで、一時公開鍵Hは、一時的な公開鍵であり、事前に共有されて管理されている公開鍵と区別される。同様に、一時秘密鍵Hは、一時的な秘密鍵であり、事前に共有されて管理されている秘密鍵と区別される。一時公開鍵Hは、先に生成された一時秘密鍵H(例えばランダムな数値)とECDHのプロトコルに従った楕円曲線上の点に基づくECDH演算により生成される。ECDH演算では、例えば、楕円曲線上の点pのk倍点kpを計算するスカラー倍算を行うことで一時秘密鍵Hから一時公開鍵Hが生成される。楕円曲線のパラメータは、ホストHとデバイスDとの間で既知である。次いで、ホストHの制御部13は、通信部11を介して鍵共有コマンドをデバイスDへ送信する(ステップS32)。かかる鍵共有コマンドには、一時公開鍵Hが含まれる。 Next, when the control unit 13 of the host H receives the response from the device D via the communication unit 11, the control unit 13 generates a temporary key pair of the temporary public key H and the temporary private key H unique to the host H (step S31). ). Here, the temporary public key H is a temporary public key and is distinguished from a public key that is shared and managed in advance. Similarly, the temporary private key H is a temporary private key and is distinguished from a private key that is shared and managed in advance. The temporary public key H is generated by an ECDH operation based on a previously generated temporary secret key H (for example, a random numerical value) and a point on an elliptic curve according to the ECDH protocol. In the ECDH operation, for example, the temporary public key H is generated from the temporary secret key H by performing scalar multiplication to calculate the k times point kp of the point p on the elliptic curve. The parameters of the elliptic curve are known between host H and device D. Next, the control unit 13 of the host H transmits a key sharing command to the device D via the communication unit 11 (step S32). Such a key sharing command includes a temporary public key H.

次いで、デバイスDの制御モジュール2は、ホストHからの鍵共有コマンドを、通信モジュール1を介して受信すると、当該鍵共有コマンドから一時公開鍵Hを取得し、さらに、ホストHと同様、ECDH演算により、デバイスDに固有の一時公開鍵Dと一時秘密鍵Dの一時鍵ペアを生成する(ステップS33)。一時公開鍵Dは、先に生成された一時秘密鍵D(例えばランダムな数値)とECDHのプロトコルに従った楕円曲線上の点に基づくECDH演算により生成される。次いで、デバイスDの制御モジュール2は、ECDH演算により、一時公開鍵Hと一時公開鍵Dから共有秘密(秘密情報の一例)を生成する(ステップS34)。 Next, when the control module 2 of the device D receives the key sharing command from the host H via the communication module 1, the temporary public key H is acquired from the key sharing command, and further, the ECDH calculation is performed as in the host H. Generates a temporary key pair of a temporary public key D and a temporary private key D unique to the device D (step S33). The temporary public key D is generated by an ECDH operation based on a previously generated temporary secret key D (for example, a random numerical value) and a point on an elliptic curve according to the ECDH protocol. Next, the control module 2 of the device D generates a shared secret (an example of secret information) from the temporary public key H and the temporary public key D by ECDH calculation (step S34).

次いで、デバイスDの制御モジュール2は、ホストIDと、ステップS34で生成された共有秘密を不揮発性メモリに記録する(ステップS35)。次いで、デバイスDの制御モジュール2は、乱数H、乱数D、及びステップS34で生成された共有秘密から、ホストHとデバイスDと間のセキュアセッションに用いられるセッション鍵を生成する(ステップS36)。次いで、デバイスDの制御モジュール2は、鍵交換コマンドに対するレスポンスを、通信モジュール1を介してホストHへ送信する(ステップS37)。かかるレスポンスには、一時公開鍵Dが含まれる。 Next, the control module 2 of the device D records the host ID and the shared secret generated in step S34 in the non-volatile memory (step S35). Next, the control module 2 of the device D generates a session key used for a secure session between the host H and the device D from the random number H, the random number D, and the shared secret generated in step S34 (step S36). Next, the control module 2 of the device D transmits a response to the key exchange command to the host H via the communication module 1 (step S37). Such a response includes the temporary public key D.

次いで、ホストHの制御部13は、デバイスDからのレスポンスを、通信部11を介して受信すると、当該レスポンスから一時公開鍵Dを取得し、ECDH演算により、一時公開鍵Hと一時公開鍵Dから共有秘密を生成する(ステップS38)。ここで生成される共有秘密は、ステップS34で生成された共有秘密と同じ生成方法で生成されるため、両者は一致する。次いで、ホストHの制御部13は、デバイスIDと、ステップS38で生成された共有秘密とを対応付けてメモリ(例えば、RAM、または不揮発性メモリ)に記録する(ステップS39)。例えば、デバイスID(識別情報の一例)と共有秘密(秘密情報の一例)とが対応付けられてテーブルに登録される。次いで、ホストHの制御部13は、乱数H、乱数D、及びステップS38で生成された共有秘密からセッション鍵を生成する(ステップS40)。ここで生成されるセッション鍵は、ステップS36で生成されたセッション鍵と同じ生成方法で生成されるため、両者は一致する。 Next, when the control unit 13 of the host H receives the response from the device D via the communication unit 11, the temporary public key D is acquired from the response, and the temporary public key H and the temporary public key D are obtained by ECDH calculation. Generate a shared secret from (step S38). Since the shared secret generated here is generated by the same generation method as the shared secret generated in step S34, they match. Next, the control unit 13 of the host H associates the device ID with the shared secret generated in step S38 and records it in a memory (for example, RAM or non-volatile memory) (step S39). For example, a device ID (an example of identification information) and a shared secret (an example of secret information) are associated and registered in a table. Next, the control unit 13 of the host H generates a session key from the random number H, the random number D, and the shared secret generated in step S38 (step S40). Since the session key generated here is generated by the same generation method as the session key generated in step S36, they match.

次いで、ホストHの制御部13は、ステップS40で生成されたセッション鍵を用いてデバイスDとの間でセキュアセッションを開始する。こうして、セキュアセッションが開始されると、例えば、当該セッション鍵が利用された暗号路を通じて、ホストHとデバイスDとの間で読み出しコマンド及びそのレスポンスの送受信が行われる。これにより、データ交換などが実施される。 Next, the control unit 13 of the host H starts a secure session with the device D using the session key generated in step S40. When the secure session is started in this way, for example, a read command and its response are transmitted and received between the host H and the device D through the encryption path in which the session key is used. As a result, data exchange and the like are carried out.

(2.2 簡易認証手順1)
簡易認証手順1では、図4に示すように、ホストHの制御部13は、乱数Hを生成する(ステップS51)。次いで、ホストHの制御部13は、通信部11を介して認証開始コマンドをデバイスDへ送信する(ステップS52)。かかる認証開始コマンドには、ホストHに固有のホストID、ステップS51で生成された乱数H、及び簡易認証手順1用であることを示す情報が含まれる。
(2.2 Simple authentication procedure 1)
In the simple authentication procedure 1, as shown in FIG. 4, the control unit 13 of the host H generates a random number H (step S51). Next, the control unit 13 of the host H transmits an authentication start command to the device D via the communication unit 11 (step S52). The authentication start command includes a host ID unique to the host H, a random number H generated in step S51, and information indicating that the command is for the simple authentication procedure 1.

次いで、デバイスDの制御モジュール2は、ホストHからの認証開始コマンドを、通信モジュール1を介して受信し、簡易認証手順1用の認証開始コマンドであると判断すると、当該認証開始コマンドからホストID及び乱数Hを取得し、さらに、乱数Dを生成する(ステップS53)。次いで、デバイスDの制御モジュール2は、ホストHのホストIDに対応付けられて記録された共有秘密を取得し、AES(Advanced Encryption Standard)演算により、乱数H、乱数D、及び当該共有秘密から認証鍵を生成する(ステップS54)。次いで、デバイスDの制御モジュール2は、AES演算により、当該認証鍵にて、乱数H、乱数D、及び予め申し合わせておいた特定の値を暗号化することにより認証コードDを生成する(ステップS55)。次いで、デバイスDの制御モジュール2は、認証開始コマンドに対するレスポンスを、通信モジュール1を介してホストHへ送信する(ステップS56)。かかるレスポンスには、認証コードD及び乱数Dが含まれる。 Next, when the control module 2 of the device D receives the authentication start command from the host H via the communication module 1 and determines that it is the authentication start command for the simple authentication procedure 1, the host ID is determined from the authentication start command. And the random number H is acquired, and the random number D is further generated (step S53). Next, the control module 2 of the device D acquires the shared secret associated with the host ID of the host H and is authenticated from the random number H, the random number D, and the shared secret by the AES (Advanced Encryption Standard) operation. Generate a key (step S54). Next, the control module 2 of the device D generates the authentication code D by encrypting the random number H, the random number D, and the specific value agreed in advance with the authentication key by the AES operation (step S55). ). Next, the control module 2 of the device D transmits a response to the authentication start command to the host H via the communication module 1 (step S56). Such a response includes an authentication code D and a random number D.

次いで、ホストHの制御部13は、デバイスDからのレスポンスを、通信部11を介して受信すると、当該レスポンスから認証コードD及び乱数Dを取得し、さらに、デバイスDのデバイスIDに対応付けられて記録された共有秘密を取得し、AES演算により、乱数H、乱数D、及び当該共有秘密から認証鍵を生成する(ステップS57)。次いで、ホストHの制御部13は、当該認証鍵にて認証コードDを検証する(ステップS58)。かかる検証では、制御部13は、AES演算により、当該認証鍵にて認証コードDを復号し、復号された認証コードDと、「乱数D(つまり、上記レスポンスから取得された乱数D)、乱数H、及び予め申し合わせておいた特定の値」とが一致するか否かが判断される。そして、認証コードDの検証が成功(認証成功)すると、ホストHの制御部13は、AES演算により、当該認証鍵にて、乱数D、乱数H、及び予め申し合わせておいた特定の値を暗号化することにより認証コードHを生成する(ステップS59)。次いで、ホストHの制御部13は、通信部11を介して認証完了コマンドをデバイスDへ送信する(ステップS60)。かかる認証完了コマンドには、認証コードHが含まれる。 Next, when the control unit 13 of the host H receives the response from the device D via the communication unit 11, the control unit 13 acquires the authentication code D and the random number D from the response, and is further associated with the device ID of the device D. The shared secret recorded in the above is acquired, and an authentication key is generated from the random number H, the random number D, and the shared secret by the AES operation (step S57). Next, the control unit 13 of the host H verifies the authentication code D with the authentication key (step S58). In such verification, the control unit 13 decodes the authentication code D with the authentication key by AES calculation, and the decoded authentication code D, "random number D (that is, random number D obtained from the above response), and random number". It is determined whether or not H and the specific value previously agreed upon match. Then, when the verification of the authentication code D is successful (authentication success), the control unit 13 of the host H encrypts the random number D, the random number H, and the specific value previously agreed with the authentication key by the AES calculation. The authentication code H is generated by the above (step S59). Next, the control unit 13 of the host H transmits an authentication completion command to the device D via the communication unit 11 (step S60). The authentication completion command includes the authentication code H.

次いで、デバイスDの制御モジュール2は、ホストHからの認証完了コマンドを、通信モジュール1を介して受信すると、当該認証完了コマンドから認証コードHを取得し、ステップS54で生成された認証鍵にて認証コードHを検証する(ステップS61)。かかる検証では、制御部13は、AES演算により、当該認証鍵にて認証コードHを復号し、復号された認証コードHと、「乱数D、乱数H、及び予め申し合わせておいた特定の値」とが一致するか否かが判断される。そして、認証コードHの検証が成功(認証成功)すると、ホストHの制御部13は、認証完了コマンドに対するレスポンスを、通信モジュール1を介してホストHへ送信する(ステップS62)。 Next, when the control module 2 of the device D receives the authentication completion command from the host H via the communication module 1, the control module 2 acquires the authentication code H from the authentication completion command and uses the authentication key generated in step S54. The authentication code H is verified (step S61). In such verification, the control unit 13 decodes the authentication code H with the authentication key by AES calculation, and the decoded authentication code H and "random number D, random number H, and a specific value previously agreed upon". It is determined whether or not matches with. Then, when the verification of the authentication code H is successful (authentication success), the control unit 13 of the host H transmits a response to the authentication completion command to the host H via the communication module 1 (step S62).

次いで、ホストHの制御部13は、デバイスDからのレスポンスを、通信部11を介して受信すると、乱数Rhを生成する(ステップS63)。次いで、ホストHの制御部13は、図5(A)に示すようなECDHによる公開鍵フォーマットにしたがって、当該乱数Rhを、図5(B)に示すような疑似公開鍵Hに成型(つまり、疑似公開鍵Hを生成)する(ステップS64)。ここで、図5(A)に示す公開鍵フォーマットにおける“xx”及び“yy”は、それぞれ、全て同じ値ではなく、1バイトの何らかの数値(16進数)である。また、X座標を“x”とし、Y座標を“y”とした場合、下記(1)式を満たす必要がある。 Next, when the control unit 13 of the host H receives the response from the device D via the communication unit 11, it generates a random number Rh (step S63). Next, the control unit 13 of the host H molds the random number Rh into a pseudo public key H as shown in FIG. 5 (B) according to the public key format by ECDH as shown in FIG. 5 (A) (that is,). Pseudo public key H is generated) (step S64). Here, "xx" and "yy" in the public key format shown in FIG. 5A are not all the same value, but some numerical value (hexadecimal number) of 1 byte. Further, when the X coordinate is "x" and the Y coordinate is "y", it is necessary to satisfy the following equation (1).

y^2 ≡ x^3 + ax + b(mod p)・・・(1) y ^ 2 ≡ x ^ 3 + ax + b (mod p) ・ ・ ・ (1)

ここで、“a”及び“b”は、それぞれ、曲線パラメータとして事前に定めた定数であり、“p”は、曲線パラメータとして事前に定めた任意の素数である。また、図5(B)に示す疑似公開鍵Hにおける“rh”は、全て同じ値ではなく、1バイトの何らかの数値(16進数)であってもよいし、'00' '00' .. '00'であってもよい。なお、疑似公開鍵Hでは、X座標を表す数値とY座標を表す数値とで、上記(1)の関係を満たす必要がない。次いで、ホストHの制御部13は、通信部11を介して鍵共有コマンドをデバイスDへ送信する(ステップS65)。かかる鍵共有コマンドには、ステップS64で生成された疑似公開鍵Hが含まれる。 Here, "a" and "b" are constants predetermined as curve parameters, respectively, and "p" is an arbitrary prime number predetermined as curve parameters. Further, "rh" in the pseudo public key H shown in FIG. 5 (B) is not all the same value, but may be some numerical value (hexadecimal number) of 1 byte, or '00' '00' ..'. It may be 00'. In the pseudo public key H, it is not necessary to satisfy the relationship (1) above with the numerical value representing the X coordinate and the numerical value representing the Y coordinate. Next, the control unit 13 of the host H transmits a key sharing command to the device D via the communication unit 11 (step S65). Such a key sharing command includes the pseudo public key H generated in step S64.

次いで、デバイスDの制御モジュール2は、ホストHからの鍵共有コマンドを、通信モジュール1を介して受信すると、当該鍵共有コマンドから疑似公開鍵Hを取得し、さらに、乱数Rdを生成する(ステップS66)。次いで、デバイスDの制御モジュール2は、ホストHのホストIDに対応付けられて記録された共有秘密を取得し、AES演算により、疑似公開鍵H、乱数Rd、及び当該共有秘密からセッション鍵(秘密情報と疑似公開鍵とを用いて生成した鍵値の一例)を生成する(ステップS67)。次いで、デバイスDの制御モジュール2は、AES演算により、当該セッション鍵及び固定値からセッション鍵(鍵値)の妥当性を確認するための暗号化データDを生成する(ステップS68)。次いで、デバイスDの制御モジュール2は、図5(A)に示すようなECDHによる公開鍵フォーマットにしたがって、乱数Rd及び暗号化データDを、図5(C)に示すような疑似公開鍵Dに成型(つまり、疑似公開鍵Dを生成)する(ステップS69)。なお、図5(B)に示す疑似公開鍵Dにおける“rd”及び“ct”は、それぞれ、全て同じ値ではなく、1バイトの何らかの数値(16進数)であってもよい。次いで、デバイスDの制御モジュール2は、鍵共有コマンドに対するレスポンスを、通信モジュール1を介してホストHへ送信する(ステップS70)。かかるレスポンスには、疑似公開鍵Dが含まれる。 Next, when the control module 2 of the device D receives the key sharing command from the host H via the communication module 1, the control module 2 acquires the pseudo public key H from the key sharing command and further generates a random number Rd (step). S66). Next, the control module 2 of the device D acquires the shared secret recorded in association with the host ID of the host H, and performs the pseudo public key H, the random number Rd, and the session key (secret) from the shared secret by AES operation. An example of a key value generated using the information and the pseudo public key) is generated (step S67). Next, the control module 2 of the device D generates encrypted data D for confirming the validity of the session key (key value) from the session key and the fixed value by AES calculation (step S68). Next, the control module 2 of the device D converts the random number Rd and the encrypted data D into the pseudo public key D as shown in FIG. 5 (C) according to the public key format by ECDH as shown in FIG. 5 (A). Molding (that is, generating a pseudo public key D) is performed (step S69). The "rd" and "ct" in the pseudo public key D shown in FIG. 5B are not all the same value, but may be some numerical value (hexadecimal number) of 1 byte. Next, the control module 2 of the device D transmits a response to the key sharing command to the host H via the communication module 1 (step S70). Such a response includes a pseudo public key D.

次いで、ホストHの制御部13は、デバイスDからのレスポンスを、通信部11を介して受信すると、当該レスポンスから疑似公開鍵Dを取得し、さらに、デバイスDのデバイスIDに対応付けられて記録された共有秘密を取得し、AES演算により、乱数Rh、疑似公開鍵D、及び当該共有秘密からセッション鍵を生成する(ステップS71)。次いで、ホストHの制御部13は、AES演算により、当該セッション鍵及び固定値から暗号化データHを生成する(ステップS72)。次いで、ホストHの制御部13は、暗号化データHにて疑似公開鍵Dを検証(換言すると、暗号化データDを検証)し、暗号通信の実施可否を判定する(ステップS73)。この検証では、暗号化データHと、疑似公開鍵Dに含まれる暗号化データDとが一致するか否かが確認される。そして、疑似公開鍵Dの検証が成功すると、ホストHの制御部13は、実施可であると判定し、ステップS71で生成されたセッション鍵を用いてデバイスDとの間でセキュアセッションを開始する。一方、疑似公開鍵Dの検証が失敗すると、ホストHの制御部13は、実施否であると判定し、エラー処理を実行する。 Next, when the control unit 13 of the host H receives the response from the device D via the communication unit 11, the pseudo public key D is acquired from the response and further recorded in association with the device ID of the device D. The shared secret is acquired, and a session key is generated from the random number Rh, the pseudo public key D, and the shared secret by AES operation (step S71). Next, the control unit 13 of the host H generates the encrypted data H from the session key and the fixed value by the AES operation (step S72). Next, the control unit 13 of the host H verifies the pseudo public key D with the encrypted data H (in other words, verifies the encrypted data D), and determines whether or not the encrypted communication can be performed (step S73). In this verification, it is confirmed whether or not the encrypted data H and the encrypted data D included in the pseudo public key D match. Then, when the verification of the pseudo public key D is successful, the control unit 13 of the host H determines that the implementation is feasible, and starts a secure session with the device D using the session key generated in step S71. .. On the other hand, if the verification of the pseudo public key D fails, the control unit 13 of the host H determines that the implementation is unsuccessful and executes error processing.

(2.3 簡易認証手順2)
簡易認証手順2では、図6に示すように、ホストHの制御部13は、乱数Hを生成する(ステップS81)。次いで、ホストHの制御部13は、通信部11を介して認証開始コマンドをデバイスDへ送信する(ステップS82)。かかる認証開始コマンドには、ホストHに固有のホストID、ステップS81で生成された乱数H、及び簡易認証手順2用であることを示す情報が含まれる。
(2.3 Simple authentication procedure 2)
In the simple authentication procedure 2, as shown in FIG. 6, the control unit 13 of the host H generates a random number H (step S81). Next, the control unit 13 of the host H transmits an authentication start command to the device D via the communication unit 11 (step S82). The authentication start command includes a host ID unique to the host H, a random number H generated in step S81, and information indicating that the command is for the simple authentication procedure 2.

次いで、デバイスDの制御モジュール2は、ホストHからの認証開始コマンドを、通信モジュール1を介して受信し、簡易認証手順2用の認証開始コマンドであると判断すると、当該認証開始コマンドからホストID及び乱数Hを取得し、さらに、乱数Dを生成する(ステップS83)。次いで、デバイスDの制御モジュール2は、ホストHのホストIDに対応付けられて記録された共有秘密を取得し、AES演算により、乱数H、乱数D、及び当該共有秘密から認証鍵を生成する(ステップS84)。次いで、デバイスDの制御モジュール2は、AES演算により、当該認証鍵にて、乱数H、乱数D、及び予め申し合わせておいた特定の値を暗号化することにより認証コードDを生成する(ステップS85)。次いで、デバイスDの制御モジュール2は、認証開始コマンドに対するレスポンスを、通信モジュール1を介してホストHへ送信する(ステップS86)。かかるレスポンスには、認証コードD及び乱数Dが含まれる。 Next, when the control module 2 of the device D receives the authentication start command from the host H via the communication module 1 and determines that it is the authentication start command for the simple authentication procedure 2, the host ID is determined from the authentication start command. And the random number H is acquired, and the random number D is further generated (step S83). Next, the control module 2 of the device D acquires the shared secret recorded in association with the host ID of the host H, and generates an authentication key from the random number H, the random number D, and the shared secret by AES operation ( Step S84). Next, the control module 2 of the device D generates the authentication code D by encrypting the random number H, the random number D, and the specific value agreed in advance with the authentication key by the AES operation (step S85). ). Next, the control module 2 of the device D transmits a response to the authentication start command to the host H via the communication module 1 (step S86). Such a response includes an authentication code D and a random number D.

次いで、ホストHの制御部13は、デバイスDからのレスポンスを、通信部11を介して受信すると、当該レスポンスから認証コードD及び乱数Dを取得し、さらに、デバイスDのデバイスIDに対応付けられて記録された共有秘密を取得し、AES演算により、乱数H、乱数D、及び当該共有秘密から認証鍵を生成する(ステップS87)。次いで、ホストHの制御部13は、上述したステップS58と同様、AES演算により、当該認証鍵にて認証コードDを検証する(ステップS88)。そして、認証コードDの検証が成功(認証成功)すると、ホストHの制御部13は、乱数Rhを生成する(ステップS89)。次いで、ホストHの制御部13は、ECDHによる公開鍵フォーマットにしたがって、当該乱数Rhを、疑似公開鍵Hに成型する(ステップS90)。次いで、ホストHの制御部13は、通信部11を介して鍵共有コマンドをデバイスDへ送信する(ステップS91)。かかる鍵共有コマンドには、ステップS90で生成された疑似公開鍵Hが含まれる。 Next, when the control unit 13 of the host H receives the response from the device D via the communication unit 11, the control unit 13 acquires the authentication code D and the random number D from the response, and is further associated with the device ID of the device D. The shared secret recorded in the above is acquired, and an authentication key is generated from the random number H, the random number D, and the shared secret by the AES operation (step S87). Next, the control unit 13 of the host H verifies the authentication code D with the authentication key by the AES operation in the same manner as in step S58 described above (step S88). Then, when the verification of the authentication code D is successful (authentication success), the control unit 13 of the host H generates a random number Rh (step S89). Next, the control unit 13 of the host H molds the random number Rh into a pseudo public key H according to the public key format by ECDH (step S90). Next, the control unit 13 of the host H transmits a key sharing command to the device D via the communication unit 11 (step S91). Such a key sharing command includes the pseudo public key H generated in step S90.

次いで、デバイスDの制御モジュール2は、ホストHからの鍵共有コマンドを、通信モジュール1を介して受信すると、当該鍵共有コマンドから疑似公開鍵Hを取得し、さらに、乱数Rdを生成する(ステップS92)。次いで、デバイスDの制御モジュール2は、ホストHのホストIDに対応付けられて記録された共有秘密を取得し、AES演算により、疑似公開鍵H、乱数Rd、及び当該共有秘密からセッション鍵を生成する(ステップS93)。次いで、デバイスDの制御モジュール2は、AES演算により、当該セッション鍵及び固定値からセッション鍵(鍵値)の妥当性を確認するための暗号化データDを生成する(ステップS94)。次いで、デバイスDの制御モジュール2は、ECDHによる公開鍵フォーマットにしたがって、乱数Rd及び暗号化データDを、疑似公開鍵Dに成型する(ステップS95)。次いで、デバイスDの制御モジュール2は、鍵共有コマンドに対するレスポンスを、通信モジュール1を介してホストHへ送信する(ステップS96)。かかるレスポンスには、疑似公開鍵Dが含まれる。 Next, when the control module 2 of the device D receives the key sharing command from the host H via the communication module 1, the control module 2 acquires the pseudo public key H from the key sharing command and further generates a random number Rd (step). S92). Next, the control module 2 of the device D acquires the shared secret recorded in association with the host ID of the host H, and generates a session key from the pseudo public key H, the random number Rd, and the shared secret by AES operation. (Step S93). Next, the control module 2 of the device D generates encrypted data D for confirming the validity of the session key (key value) from the session key and the fixed value by AES calculation (step S94). Next, the control module 2 of the device D molds the random number Rd and the encrypted data D into the pseudo public key D according to the public key format by ECDH (step S95). Next, the control module 2 of the device D transmits a response to the key sharing command to the host H via the communication module 1 (step S96). Such a response includes a pseudo public key D.

次いで、ホストHの制御部13は、デバイスDからのレスポンスを、通信部11を介して受信すると、当該レスポンスから疑似公開鍵Dを取得し、さらに、デバイスDのデバイスIDに対応付けられて記録された共有秘密を取得し、AES演算により、乱数Rh、疑似公開鍵D、及び当該共有秘密からセッション鍵を生成する(ステップS97)。次いで、ホストHの制御部13は、AES演算により、当該セッション鍵及び固定値から暗号化データHを生成する(ステップS98)。次いで、ホストHの制御部13は、暗号化データHにて疑似公開鍵Dを検証(換言すると、暗号化データDを検証)し、暗号通信の実施可否を判定する(ステップS99)。この検証では、暗号化データHと、疑似公開鍵Dに含まれる暗号化データDとが一致するか否かが確認される。そして、疑似公開鍵Dの検証が成功すると、ホストHの制御部13は、実施可であると判定し、ステップS97で生成されたセッション鍵を用いてデバイスDとの間でセキュアセッションを開始する。一方、疑似公開鍵Dの検証が失敗すると、ホストHの制御部13は、実施否であると判定し、エラー処理を実行する。 Next, when the control unit 13 of the host H receives the response from the device D via the communication unit 11, the pseudo public key D is acquired from the response and further recorded in association with the device ID of the device D. The shared secret is acquired, and a session key is generated from the random number Rh, the pseudo public key D, and the shared secret by AES operation (step S97). Next, the control unit 13 of the host H generates the encrypted data H from the session key and the fixed value by the AES operation (step S98). Next, the control unit 13 of the host H verifies the pseudo public key D with the encrypted data H (in other words, verifies the encrypted data D), and determines whether or not the encrypted communication can be performed (step S99). In this verification, it is confirmed whether or not the encrypted data H and the encrypted data D included in the pseudo public key D match. Then, when the verification of the pseudo public key D is successful, the control unit 13 of the host H determines that the implementation is feasible, and starts a secure session with the device D using the session key generated in step S97. .. On the other hand, if the verification of the pseudo public key D fails, the control unit 13 of the host H determines that the implementation is unsuccessful and executes error processing.

以上説明したように、上記実施形態によれば、ホストHは、乱数を生成し、当該生成した乱数をECDHのプロトコルによる公開鍵のフォーマットに成型して疑似公開鍵を生成し、高度認証手順にて共有した秘密情報及び当該疑似公開鍵を用いてセッション鍵を生成するように構成したので、鍵生成にDHの利用を意味する命令を受けた場合であっても、実際にはDHを利用しないより高速な鍵生成処理を実現することができる。 As described above, according to the above embodiment, the host H generates a random number, molds the generated random key into a public key format according to the ECDH protocol, generates a pseudo public key, and performs an advanced authentication procedure. Since the session key is generated using the shared secret information and the pseudo public key, DH is not actually used even if an instruction indicating the use of DH is received for key generation. It is possible to realize a faster key generation process.

なお、上記実施掲載形態では、高度認証手順と、簡易認証手順との2種類の認証処理が存在する認証方式を例にとって説明したが、本発明は、3種類以上の認証処理が存在する認証方式に対しても適用することができる。また、上記実施形態においては、ホストHとデバイスDとの間で非接触通信が行われる場合を例にとって説明したが、本発明は、ホストHとデバイスDとの間で接触通信が行われる場合においても適用可能である。また、上記実施形態において、図2~図6は、ホストHの制御部13及びデバイスDの制御モジュール2の処理について示したが、デバイスDの制御モジュール2の処理はICモジュール3により実行されてもよい。 In the above-described embodiment, an authentication method having two types of authentication processes, an advanced authentication procedure and a simple authentication procedure, has been described as an example, but the present invention has an authentication method in which three or more types of authentication processes exist. It can also be applied to. Further, in the above embodiment, the case where the non-contact communication is performed between the host H and the device D has been described as an example, but the present invention is the case where the contact communication is performed between the host H and the device D. It is also applicable in. Further, in the above embodiment, FIGS. 2 to 6 show the processing of the control unit 13 of the host H and the control module 2 of the device D, but the processing of the control module 2 of the device D is executed by the IC module 3. May be good.

1 通信モジュール
2 制御モジュール
3 ICモジュール
11 通信部
12 記憶部
13 制御部
D デバイス
H ホスト
S 認証システム
1 Communication module 2 Control module 3 IC module 11 Communication unit 12 Storage unit 13 Control unit D Device H Host S Authentication system

Claims (4)

通信相手のとの間で多くの計算量を要する高度認証手順と、前記通信相手との間でより少ない計算量で済む簡易認証手順との何れかを選択可能な通信装置であって、
前記高度認証手順において生成された秘密情報を記憶するための記憶手段と、
乱数を生成する第1生成手段と、
前記乱数をECDH(Elliptic curve Diffie-Hellman key exchange)のプロトコルによる公開鍵のフォーマットに成型して疑似公開鍵を生成する第2生成手段と、
前記通信相手との間で通信が行われるときに前記秘密情報が前記記憶手段に記憶されていない場合、前記高度認証手順を選択して前記ECDHによる鍵交換、及びセッション鍵を生成する一方、前記秘密情報が前記記憶手段に記憶されている場合、前記簡易認証手順を選択して当該秘密情報と前記疑似公開鍵とを用いてセッション鍵を生成する第3生成手段と、
を備えることを特徴とする通信装置。
A communication device capable of selecting either an advanced authentication procedure that requires a large amount of calculation with a communication partner or a simple authentication procedure that requires a smaller amount of calculation with the communication partner.
A storage means for storing confidential information generated in the advanced authentication procedure, and
The first means of generating random numbers and
A second generation means for generating a pseudo-public key by molding the random number into a public key format according to the ECDH (Elliptic curve Diffie-Hellman key exchange) protocol.
If the secret information is not stored in the storage means when communication is performed with the communication partner, the advanced authentication procedure is selected to generate the key exchange by the ECDH and the session key, while the said. When the secret information is stored in the storage means, a third generation means that selects the simple authentication procedure and generates a session key using the secret information and the pseudo public key, and a third generation means.
A communication device characterized by being provided with.
請求項1に記載の通信装置の通信相手となるデバイスに含まれるコンピュータに、
前記高度認証手順において生成された秘密情報を記憶するステップと、
前記通信装置からの前記疑似公開鍵を含むコマンドを受信するステップと、
前記受信されたコマンドに応じて、前記秘密情報と前記疑似公開鍵とを用いて生成した鍵値の妥当性を確認するための暗号化データを生成するステップと、
前記暗号化データを含むレスポンスを前記通信装置へ送信するステップと、
を実行させることを特徴とするプログラム。
The computer included in the device to be the communication partner of the communication device according to claim 1.
The step of storing the confidential information generated in the advanced authentication procedure and
A step of receiving a command including the pseudo public key from the communication device, and
In response to the received command, a step of generating encrypted data for confirming the validity of the key value generated by using the secret information and the pseudo public key, and
A step of transmitting a response including the encrypted data to the communication device,
A program characterized by executing.
通信相手のとの間で多くの計算量を要する高度認証手順と、前記通信相手との間でより少ない計算量で済む簡易認証手順との何れかを選択可能な通信装置であって、前記高度認証手順において生成された秘密情報を記憶するための記憶手段を備える前記通信装置により実行される通信方法において、
乱数を生成するステップと、
前記乱数をECDH(Elliptic curve Diffie-Hellman key exchange)のプロトコルによる公開鍵のフォーマットに成型して疑似公開鍵を生成するステップと、
前記通信相手との間で通信が行われるときに前記秘密情報が前記記憶手段に記憶されていない場合、前記高度認証手順を選択して前記ECDHによる鍵交換、及びセッション鍵を生成する一方、前記秘密情報が前記記憶手段に記憶されている場合、前記簡易認証手順を選択して当該秘密情報と前記疑似公開鍵とを用いてセッション鍵を生成するステップと、
を含むことを特徴とする通信方法。
A communication device capable of selecting either an advanced authentication procedure that requires a large amount of calculation with a communication partner or a simple authentication procedure that requires a smaller amount of calculation with the communication partner. In a communication method performed by the communication device comprising a storage means for storing confidential information generated in an authentication procedure.
Steps to generate random numbers and
A step of molding the random number into a public key format according to the ECDH (Elliptic curve Diffie-Hellman key exchange) protocol to generate a pseudo public key, and
If the secret information is not stored in the storage means when communication is performed with the communication partner, the advanced authentication procedure is selected to generate the key exchange by the ECDH and the session key, while the said. When the secret information is stored in the storage means, the step of selecting the simple authentication procedure and generating the session key using the secret information and the pseudo public key, and
A communication method characterized by including.
通信相手のとの間で多くの計算量を要する高度認証手順と、前記通信相手との間でより少ない計算量で済む簡易認証手順との何れかを選択可能な通信装置に含まれるコンピュータを、
前記高度認証手順において生成された秘密情報を記憶するための記憶手段と、
乱数を生成する第1生成手段と、
前記乱数をECDH(Elliptic curve Diffie-Hellman key exchange)のプロトコルによる公開鍵のフォーマットに成型して疑似公開鍵を生成する第2生成手段と、
前記通信相手との間で通信が行われるときに前記秘密情報が前記記憶手段に記憶されていない場合、前記高度認証手順を選択して前記ECDHによる鍵交換、及びセッション鍵を生成する一方、前記秘密情報が前記記憶手段に記憶されている場合、前記簡易認証手順を選択して当該秘密情報と前記疑似公開鍵とを用いてセッション鍵を生成する第3生成手段として機能させることを特徴とするプログラム。
A computer included in a communication device that can select either an advanced authentication procedure that requires a large amount of calculation with a communication partner or a simple authentication procedure that requires a smaller amount of calculation with the communication partner.
A storage means for storing confidential information generated in the advanced authentication procedure, and
The first means of generating random numbers and
A second generation means for generating a pseudo-public key by molding the random number into a public key format according to the ECDH (Elliptic curve Diffie-Hellman key exchange) protocol.
If the secret information is not stored in the storage means when communication is performed with the communication partner, the advanced authentication procedure is selected to generate the key exchange by the ECDH and the session key, while the said. When the secret information is stored in the storage means, the simple authentication procedure is selected to function as a third generation means for generating a session key using the secret information and the pseudo public key. program.
JP2021187829A 2020-11-19 2021-11-18 Communication device, communication method, and program Pending JP2022081456A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020192420 2020-11-19
JP2020192420 2020-11-19

Publications (1)

Publication Number Publication Date
JP2022081456A true JP2022081456A (en) 2022-05-31

Family

ID=81796511

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021187829A Pending JP2022081456A (en) 2020-11-19 2021-11-18 Communication device, communication method, and program

Country Status (1)

Country Link
JP (1) JP2022081456A (en)

Similar Documents

Publication Publication Date Title
US11888594B2 (en) System access using a mobile device
US11184343B2 (en) Method for carrying out an authentication
US10708062B2 (en) In-vehicle information communication system and authentication method
CN110334503B (en) Method for unlocking one device by using the other device
US8694778B2 (en) Enrollment of physically unclonable functions
US7552322B2 (en) Using a portable security token to facilitate public key certification for devices in a network
US20190165947A1 (en) Signatures for near field communications
CN111034120B (en) Encryption key management based on identity information
CN108768963B (en) Communication method and system of trusted application and secure element
CN107948183B (en) Key distribution method and system suitable for Internet of things
WO2005008502A1 (en) Access method
JP2015515168A (en) Method for confirming identification information of user of communication terminal and related system
EP4024311A1 (en) Method and apparatus for authenticating biometric payment device, computer device and storage medium
TWI471804B (en) Blank smart card device issuance system
CN108768941B (en) Method and device for remotely unlocking safety equipment
US20160277182A1 (en) Communication system and master apparatus
JP2008124847A (en) Cipher communication system, communication terminal device, cipher communication program, and cipher communication method
KR102415628B1 (en) Method and apparatus for authenticating drone using dim
JP2022081456A (en) Communication device, communication method, and program
JP2022077529A (en) Communication device, communication method, and program
US20160241557A1 (en) Method for secured communication between an operating system of a terminal and a device distinct from the terminal
JP2022081443A (en) Communication device, communication method, and program
US20230188340A1 (en) Key recovery based on contactless card authentication
KR20140007628A (en) Method for mobile banking of account transfer using security confirmation processing
KR102021956B1 (en) Smart card based authentication system, device and method