JP7435263B2 - Communication system, communication method, and program - Google Patents

Communication system, communication method, and program Download PDF

Info

Publication number
JP7435263B2
JP7435263B2 JP2020093117A JP2020093117A JP7435263B2 JP 7435263 B2 JP7435263 B2 JP 7435263B2 JP 2020093117 A JP2020093117 A JP 2020093117A JP 2020093117 A JP2020093117 A JP 2020093117A JP 7435263 B2 JP7435263 B2 JP 7435263B2
Authority
JP
Japan
Prior art keywords
key
unit
encryption key
communication
encryption
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
JP2020093117A
Other languages
Japanese (ja)
Other versions
JP2021190791A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to JP2020093117A priority Critical patent/JP7435263B2/en
Publication of JP2021190791A publication Critical patent/JP2021190791A/en
Application granted granted Critical
Publication of JP7435263B2 publication Critical patent/JP7435263B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、通信システム、通信方法、及びプログラムに関する。 The present invention relates to a communication system, a communication method, and a program.

従来、HSM(Hardware Security Module)やセキュアエレメントを用いて暗号鍵を管理する技術が各種提案されている。 Conventionally, various techniques have been proposed for managing cryptographic keys using HSMs (Hardware Security Modules) and secure elements.

例えば、下記特許文献1には、HSMを用いて暗号鍵等の生成及び管理を行う技術が開示されている。また、下記特許文献2には、セキュアエレメントを用いて暗号鍵等の生成及び管理を行う技術が開示されている。 For example, Patent Document 1 listed below discloses a technique for generating and managing encryption keys and the like using HSM. Further, Patent Document 2 listed below discloses a technique for generating and managing encryption keys and the like using a secure element.

特開2015-61267号公報JP2015-61267A 特開2016-111440号公報Japanese Patent Application Publication No. 2016-111440

しかしながら、特許文献1で用いられているHSMは高価であるため、IoT(Internet of Things)機器等への導入は好ましくない。一方、特許文献2で用いられているセキュアエレメントは、HSMと比較して安価である。しかしながら、セキュアエレメントは、保存容量が少なく、1つのセキュアエレメントで多数の暗号鍵を管理するには限界がある。多数の暗号鍵を管理するために複数のセキュアエレメントを使用することが考えられるが、デバイスに複数のセキュアエレメントを設ける領域が必要となり、デバイスが大型化してしまうという問題があった。 However, since the HSM used in Patent Document 1 is expensive, it is not preferable to introduce it into IoT (Internet of Things) devices or the like. On the other hand, the secure element used in Patent Document 2 is cheaper than HSM. However, the secure element has a small storage capacity, and there is a limit to managing a large number of encryption keys with one secure element. It is conceivable to use multiple secure elements to manage a large number of encryption keys, but this requires an area in the device to accommodate the multiple secure elements, which poses a problem of increasing the size of the device.

上述の課題を鑑み、本発明の目的は、安価なデバイスで複数の暗号鍵をセキュアに管理することが可能な通信システム、通信方法、及びプログラムを提供することにある。 In view of the above-mentioned problems, an object of the present invention is to provide a communication system, a communication method, and a program that can securely manage a plurality of encryption keys with an inexpensive device.

上述の課題を解決するために、本発明の一態様に係る通信システムは、耐タンパー性を有し、第1の暗号鍵を記憶するセキュアエレメントと、前記第1の暗号鍵で暗号化された第2の暗号鍵と、前記第2の暗号鍵で暗号化された複数のデータキーとを記憶する第1の記憶装置と、複数の通信対象と通信を行う通信部と、前記複数の通信対象ごとに異なる対象情報に基づき、前記第2の暗号鍵と、前記複数の通信対象ごとに対応するデータキーとを、前記第1の記憶装置から取得する鍵取得部と、前記鍵取得部によって取得された前記第2の暗号鍵を、前記第1の暗号鍵で復号する第1の復号部と、前記鍵取得部によって取得された前記データキーを、前記第1の復号部によって復号された前記第2の暗号鍵で復号する第2の復号部と、前記第2の復号部によって復号された前記データキーに基づき、前記複数の通信対象ごとに異なる暗号鍵を生成する第1の鍵生成部と、を有する。 In order to solve the above problems, a communication system according to one aspect of the present invention includes a secure element that is tamper-resistant and stores a first encryption key, and a secure element that is tamper-resistant and stores a first encryption key. a first storage device that stores a second encryption key and a plurality of data keys encrypted with the second encryption key; a communication unit that communicates with a plurality of communication targets; and a communication unit that communicates with a plurality of communication targets; a key acquisition unit that acquires the second encryption key and a data key corresponding to each of the plurality of communication targets from the first storage device, and the key acquisition unit, based on target information that differs for each communication target; a first decryption unit that decrypts the second encryption key obtained by using the first encryption key; and a first decryption unit that decrypts the second encryption key obtained by the first encryption key; a second decryption unit that decrypts with a second encryption key; and a first key generation unit that generates a different encryption key for each of the plurality of communication targets based on the data key decrypted by the second decryption unit. and has.

本発明の一態様に係る通信方法は、セキュアエレメントが、耐タンパー性を有し、第1の暗号鍵を記憶することと、第1の記憶装置が、前記第1の暗号鍵で暗号化された第2の暗号鍵と、前記第2の暗号鍵で暗号化された複数のデータキーとを記憶することと、通信部が、複数の通信対象と通信を行うことと、鍵取得部が、前記複数の通信対象ごとに異なる対象情報に基づき、前記第2の暗号鍵と、前記複数の通信対象ごとに対応するデータキーとを、前記第1の記憶装置から取得することと、第1の復号部が、前記鍵取得部によって取得された前記第2の暗号鍵を、前記第1の暗号鍵で復号することと、第2の復号部が、前記鍵取得部によって取得された前記データキーを、前記第1の復号部によって復号された前記第2の暗号鍵で復号することと、第1の鍵生成部が、前記第2の復号部によって復号された前記データキーに基づき、前記複数の通信対象ごとに異なる暗号鍵を生成することと、を含む。 In the communication method according to one aspect of the present invention, the secure element has tamper resistance and stores a first encryption key, and the first storage device is encrypted with the first encryption key. storing a second encryption key encrypted with the second encryption key and a plurality of data keys encrypted with the second encryption key; a communication unit communicating with a plurality of communication targets; and a key acquisition unit: acquiring the second encryption key and a data key corresponding to each of the plurality of communication targets from the first storage device based on target information different for each of the plurality of communication targets; A decryption unit decrypts the second encryption key obtained by the key acquisition unit using the first encryption key; and a second decryption unit decrypts the second encryption key obtained by the key acquisition unit. , using the second encryption key decrypted by the first decryption unit; and a first key generation unit decrypts the plurality of data keys based on the data key decrypted by the second decryption unit. generating a different encryption key for each communication target.

本発明の一態様に係るプログラムは、コンピュータを、耐タンパー性を有し、第1の暗号鍵を記憶するセキュアエレメントと、前記第1の暗号鍵で暗号化された第2の暗号鍵と、前記第2の暗号鍵で暗号化された複数のデータキーとを記憶する第1の記憶装置と、複数の通信対象と通信を行う通信部と、前記複数の通信対象ごとに異なる対象情報に基づき、前記第2の暗号鍵と、前記複数の通信対象ごとに対応するデータキーとを、前記第1の記憶装置から取得する鍵取得部と、前記鍵取得部によって取得された前記第2の暗号鍵を、前記第1の暗号鍵で復号する第1の復号部と、前記鍵取得部によって取得された前記データキーを、前記第1の復号部によって復号された前記第2の暗号鍵で復号する第2の復号部と、前記第2の復号部によって復号された前記データキーに基づき、前記複数の通信対象ごとに異なる暗号鍵を生成する第1の鍵生成部と、として機能させる。 A program according to one aspect of the present invention includes: a secure element having tamper resistance and storing a first encryption key; and a second encryption key encrypted with the first encryption key; a first storage device that stores a plurality of data keys encrypted with the second encryption key; a communication unit that communicates with a plurality of communication targets; and a communication unit that stores a plurality of data keys encrypted with the second encryption key; , a key acquisition unit that acquires the second encryption key and a data key corresponding to each of the plurality of communication targets from the first storage device; and the second encryption key acquired by the key acquisition unit. a first decryption unit that decrypts a key with the first encryption key; and a first decryption unit that decrypts the data key obtained by the key acquisition unit with the second encryption key that was decrypted by the first decryption unit. and a first key generation unit that generates a different encryption key for each of the plurality of communication targets based on the data key decrypted by the second decryption unit.

本発明によれば、安価なデバイスで複数の暗号鍵をセキュアに管理することができる。 According to the present invention, a plurality of encryption keys can be managed securely with an inexpensive device.

第1の実施形態に係る通信システムの構成の一例を示すブロック図である。FIG. 1 is a block diagram showing an example of the configuration of a communication system according to a first embodiment. 第1の実施形態に係るサーバの構成の一例を示すブロック図である。FIG. 2 is a block diagram showing an example of the configuration of a server according to the first embodiment. 第1の実施形態に係るデバイスの構成の一例を示すブロック図である。FIG. 1 is a block diagram showing an example of the configuration of a device according to a first embodiment. 第1の実施形態に係るサーバとデバイスとの相互認証におけるサーバによるデバイスの認証の流れの一例を示すシーケンス図である。FIG. 2 is a sequence diagram illustrating an example of the flow of device authentication by the server in mutual authentication between the server and the device according to the first embodiment. 第1の実施形態に係るサーバとデバイスとの相互認証におけるデバイスによるサーバの認証の流れの一例を示すシーケンス図である。FIG. 2 is a sequence diagram illustrating an example of the flow of server authentication by a device in mutual authentication between a server and a device according to the first embodiment. 第2の実施形態に係る通信システムの構成の一例を示すブロック図である。FIG. 2 is a block diagram illustrating an example of the configuration of a communication system according to a second embodiment. 第3の実施形態に係る通信システムの構成の一例を示すブロック図である。FIG. 2 is a block diagram illustrating an example of the configuration of a communication system according to a third embodiment. 第3の実施形態に係るIoT機器の構成の一例を示すブロック図である。FIG. 3 is a block diagram illustrating an example of the configuration of an IoT device according to a third embodiment. 第4の実施形態に係る通信システムの構成の一例を示すブロック図である。FIG. 3 is a block diagram illustrating an example of the configuration of a communication system according to a fourth embodiment. 各実施形態に係るアプリケーション起動時におけるmskに関する処理の流れを示すシーケンス図である。FIG. 3 is a sequence diagram showing the flow of processing related to msk at the time of starting an application according to each embodiment. 各実施形態に係るサーバとデバイスとの相互認証におけるサーバによるデバイスの認証の流れの変形例を示すシーケンス図である。FIG. 7 is a sequence diagram showing a modified example of the flow of device authentication by the server in mutual authentication between the server and the device according to each embodiment.

以下、図面を参照しながら本発明の実施形態について詳しく説明する。 Embodiments of the present invention will be described in detail below with reference to the drawings.

<<1.第1の実施形態>>
図1~図5を参照して、本発明の第1の実施形態について説明する。第1の実施形態では、デバイスと複数のサーバとの間で相互認証が行われる例について説明する。
<<1. First embodiment >>
A first embodiment of the present invention will be described with reference to FIGS. 1 to 5. In the first embodiment, an example will be described in which mutual authentication is performed between a device and a plurality of servers.

<1-1.通信システムの構成>
図1を参照して、第1の実施形態に係る通信システムの構成について説明する。図1は、第1の実施形態に係る通信システムの構成の一例を示すブロック図である。
図1に示すように、通信システム1は、サーバ10(10-1~10-N)及びデバイス20を有する。
<1-1. Communication system configuration>
With reference to FIG. 1, the configuration of a communication system according to a first embodiment will be described. FIG. 1 is a block diagram showing an example of the configuration of a communication system according to the first embodiment.
As shown in FIG. 1, the communication system 1 includes servers 10 (10-1 to 10-N) and devices 20.

サーバ10及びデバイス20は、ネットワークNWを介して、互いに通信可能に接続されている。例えば、サーバ10及びデバイス20は、ワイドエリアネットワーク(Wide Area Network:WAN)によって接続されている。WANは、例えば、インターネット接続により実現される。 The server 10 and the device 20 are communicably connected to each other via the network NW. For example, the server 10 and the device 20 are connected via a wide area network (WAN). WAN is realized by, for example, an Internet connection.

サーバ10は、複数のサーバ10-1~10-N(Nは自然数)を含む。複数のサーバ10-1~10-Nは、デバイス20の通信対象である。サーバ10は、ネットワークNWを介してデバイス20と通信を行い、デバイス20の認証を行う。例えば、サーバ10は、チャレンジ&レスポンス方式の認証を行う。 The server 10 includes a plurality of servers 10-1 to 10-N (N is a natural number). The plurality of servers 10-1 to 10-N are communication targets of the device 20. The server 10 communicates with the device 20 via the network NW and authenticates the device 20. For example, the server 10 performs challenge-and-response authentication.

ここで、チャレンジ&レスポンス方式の認証について説明する。チャレンジ側(例えば、サーバ10)は、レスポンス側(例えば、デバイス20)にチャレンジコード(後述するcc)を送信する。レスポンス側は、暗号鍵(後述するddk)を用いてチャレンジコードを暗号化し、暗号化したチャレンジコードをチャレンジ側に通知する。チャレンジ側は、暗号化されたチャレンジコードを暗号鍵で復号し、復号したチャレンジコードと、送信したチャレンジコードとが一致した場合に、レスポンス側が通信先として正当な装置であると認証する。 Here, challenge-and-response authentication will be explained. The challenge side (eg, server 10) transmits a challenge code (cc, which will be described later) to the response side (eg, device 20). The response side encrypts the challenge code using an encryption key (DDK described later) and notifies the challenge code of the encrypted challenge code. The challenge side decrypts the encrypted challenge code using an encryption key, and if the decrypted challenge code matches the transmitted challenge code, the response side authenticates the device as a valid communication destination.

具体的に、サーバ10は、デバイス20に対して、チャレンジコード(ChallengeCode)を送信する。以下、チャレンジコードは、「cc」とも称される。ccは、例えば、乱数に基づき生成された文字列であり、認証の度に異なる文字列が生成される。 Specifically, the server 10 transmits a challenge code (ChallengeCode) to the device 20. Hereinafter, the challenge code will also be referred to as "cc". cc is, for example, a character string generated based on random numbers, and a different character string is generated each time authentication is performed.

サーバ10は、ccに基づきデバイス20で生成されたレスポンスを受信する。レスポンスは、例えば、ccを暗号鍵(第3の暗号鍵)で暗号化した情報である。 The server 10 receives the response generated by the device 20 based on the cc. The response is, for example, information obtained by encrypting cc with an encryption key (third encryption key).

本実施形態において、当該暗号鍵は、データキー(DataKey)がSeed(対象情報)で暗号化された情報(DerivedDataKey)である。以下、暗号鍵は、「ddk」とも称される。ddkの一例として、認証鍵、トークン、API(Application Programming Interface)キー、ワンタイムパスワード等が挙げられる。 In this embodiment, the encryption key is information (DerivedDataKey) obtained by encrypting a data key (DataKey) using Seed (target information). Hereinafter, the encryption key is also referred to as "ddk". Examples of ddk include authentication keys, tokens, API (Application Programming Interface) keys, one-time passwords, and the like.

データキーは、ddkを生成するための秘密情報である。データキーの一例として、暗号鍵が挙げられる。以下、データキーは、「dk」とも称される。 The data key is secret information for generating the ddk. An example of a data key is an encryption key. Hereinafter, the data key will also be referred to as "dk".

Seedは、サーバ10ごとに異なる情報である。Seedの一例として、デバイス製造番号、乱数、タイムスタンプ等のユニークな情報が挙げられる。 Seed is information that differs for each server 10. Examples of Seed include unique information such as device serial number, random number, and time stamp.

以下、ddkは、dk1~NとSeedの組み合わせに応じて示される。例えば、SeedAがdk1で暗号化された場合、ddkは、ddk1-Aと示される。また、ccをddkで暗号化した情報は、「enc[cc]ddk」と示される。例えば、ccAをddk1-Aで暗号化した情報は、enc[ccA]ddk1-Aと示される。 Hereinafter, ddk will be indicated according to the combination of dk1 to N and Seed. For example, if SeedA is encrypted with dk1, ddk is indicated as ddk1-A. Further, information obtained by encrypting cc with ddk is indicated as "enc[cc]ddk". For example, information obtained by encrypting ccA with ddk1-A is indicated as enc[ccA]ddk1-A.

なお、ddkの生成方法は、Seedでdkを暗号化する方法に限定されない。例えば、ddkは、Hash関数に基づき生成されてもよい。一例として、ddkは、Seedとdkとの連結文字にHash関数をかけることで生成される値であってもよい。 Note that the method for generating ddk is not limited to the method of encrypting dk using Seed. For example, ddk may be generated based on a Hash function. As an example, ddk may be a value generated by applying a Hash function to a concatenated character of Seed and dk.

サーバ10は、レスポンスとして受信したenc[cc]ddkに基づき、デバイス20の認証を行う。例えば、サーバ10は、受信したenc[cc]ddkを予め保持しているddkで復号して得られるccと、デバイス20へ送信したccとを比較する。比較の結果、各ccが一致する場合、サーバ10によるデバイス20の認証は成功である。デバイス20の認証が成功することで、サーバ10は、デバイス20と安全(セキュア)に情報の送受信を行うことができる。 The server 10 authenticates the device 20 based on enc[cc]ddk received as a response. For example, the server 10 compares the cc obtained by decoding the received enc[cc]ddk with a previously stored ddk and the cc transmitted to the device 20. As a result of the comparison, if the respective CCs match, the authentication of the device 20 by the server 10 is successful. By successfully authenticating the device 20, the server 10 can securely transmit and receive information to and from the device 20.

デバイス20は、各種鍵の生成及び管理を行う装置である。デバイス20の一例として、PC(Personal Computer)、スマートフォン、サーバ等が挙げられる。デバイス20は、ネットワークNWを介して複数のサーバ10と通信を行い、各々のサーバ10の認証を行う。例えば、デバイス20は、サーバ10と同様にチャレンジ&レスポンス方式の認証を行う。 The device 20 is an apparatus that generates and manages various keys. Examples of the device 20 include a PC (Personal Computer), a smartphone, a server, and the like. The device 20 communicates with a plurality of servers 10 via the network NW and authenticates each server 10. For example, the device 20 performs challenge-and-response authentication similarly to the server 10.

具体的に、デバイス20は、サーバ10に対して、ccを送信する。また、デバイス20は、サーバ10との通信に基づき、Seedを生成する。さらに、デバイス20は、サーバ10と対応するdkを取得し、Seedをdkで暗号化してddkを生成する。 Specifically, the device 20 transmits cc to the server 10. Further, the device 20 generates a Seed based on communication with the server 10. Further, the device 20 obtains the dk corresponding to the server 10, encrypts the Seed with the dk, and generates a ddk.

デバイス20は、ccに基づきサーバ10で生成されたレスポンスを受信する。レスポンスは、例えば、サーバ10が予め保持しているddkでccが暗号化されたenc[cc]ddkである。 The device 20 receives the response generated by the server 10 based on the cc. The response is, for example, enc[cc]ddk in which cc is encrypted using a ddk that the server 10 holds in advance.

デバイス20は、レスポンスとして受信したenc[cc]ddkに基づき、サーバ10の認証を行う。例えば、デバイス20は、受信したenc[cc]ddkを生成したddkで復号して得られるccと、サーバ10へ送信したccとを比較する。比較の結果、各ccが一致する場合、デバイス20によるサーバ10の認証は成功である。サーバ10の認証が成功することで、デバイス20は、サーバ10と安全に情報の送受信を行うことができる。 The device 20 authenticates the server 10 based on enc[cc]ddk received as a response. For example, the device 20 compares the cc obtained by decoding the received enc[cc]ddk with the generated ddk and the cc transmitted to the server 10. As a result of the comparison, if the respective CCs match, the authentication of the server 10 by the device 20 is successful. By successfully authenticating the server 10, the device 20 can safely transmit and receive information to and from the server 10.

<1-2.サーバの構成>
図2を参照して、第1の実施形態に係るサーバ10の構成について説明する。図2は、第1の実施形態に係るサーバ10の構成の一例を示すブロック図である。
図2に示すように、サーバ10は、通信部100、制御部110、及び記憶部120を備える。
<1-2. Server configuration>
With reference to FIG. 2, the configuration of the server 10 according to the first embodiment will be described. FIG. 2 is a block diagram showing an example of the configuration of the server 10 according to the first embodiment.
As shown in FIG. 2, the server 10 includes a communication section 100, a control section 110, and a storage section 120.

(1)通信部100
通信部100は、ネットワークNWを介して、デバイス20と通信を行う。通信部100は、当該通信により各種情報の送受信を行う。例えば、サーバ10がデバイス20の認証を行う場合、通信部100は、ccをデバイス20へ送信し、レスポンスとしてenc[cc]ddkをデバイス20から受信する。一方、デバイス20がサーバ10の認証を行う場合、通信部100は、デバイス20からccを受信し、レスポンスとしてenc[cc]ddkをデバイス20へ送信する。
(1) Communication department 100
The communication unit 100 communicates with the device 20 via the network NW. The communication unit 100 transmits and receives various information through the communication. For example, when the server 10 authenticates the device 20, the communication unit 100 transmits cc to the device 20, and receives enc[cc]ddk from the device 20 as a response. On the other hand, when the device 20 authenticates the server 10, the communication unit 100 receives cc from the device 20 and transmits enc[cc]ddk to the device 20 as a response.

(2)制御部110
制御部110は、サーバ10の動作全体を制御する機能を有する。制御部110は、サーバ10がハードウェアとして備えるCPU(Central Processing Unit)にプログラムを実行させることによって実現される。
図2に示すように、制御部110は、認証部112、復号部114、及び暗号化部116を備える。
(2) Control unit 110
The control unit 110 has a function of controlling the entire operation of the server 10. The control unit 110 is realized by causing a CPU (Central Processing Unit) included in the server 10 as hardware to execute a program.
As shown in FIG. 2, the control unit 110 includes an authentication unit 112, a decryption unit 114, and an encryption unit 116.

(2-1)認証部112
認証部112は、認証に関する処理を行う。例えば、サーバ10がデバイス20を認証する場合、認証部112は、ccを生成し、通信部100にデバイス20へ送信させる。認証部112は、デバイス20からレスポンスとして受信したenc[cc]ddkに基づき、デバイス20の認証を行う。具体的に、認証部112は、通信部100が受信したenc[cc]ddkを予め保持しているddkで復号して得られるccと、デバイス20へ送信したccとを比較する。比較の結果、各ccが一致する場合、認証部112は、サーバ10によるデバイス20の認証が成功したと判定する。
(2-1) Authentication section 112
The authentication unit 112 performs processing related to authentication. For example, when the server 10 authenticates the device 20, the authentication unit 112 generates a cc and causes the communication unit 100 to transmit it to the device 20. The authentication unit 112 authenticates the device 20 based on enc[cc]ddk received as a response from the device 20. Specifically, the authentication unit 112 compares the cc obtained by decoding the enc[cc]ddk received by the communication unit 100 with the ddk held in advance and the cc transmitted to the device 20. As a result of the comparison, if the ccs match, the authentication unit 112 determines that the authentication of the device 20 by the server 10 has been successful.

(2-2)復号部114
復号部114は、暗号化された各種情報を復号する。例えば、復号部114は、通信部100がデバイス20から受信したenc[cc]ddkを、予め保持しているddkで復号する。復号部114は、復号して得られたccを認証部112へ入力する。
(2-2) Decoding unit 114
The decryption unit 114 decrypts various types of encrypted information. For example, the decoding unit 114 decodes enc[cc]ddk that the communication unit 100 receives from the device 20 using a ddk held in advance. The decryption unit 114 inputs the decrypted cc to the authentication unit 112.

(2-3)暗号化部116
暗号化部116は、各種情報を暗号化する。例えば、暗号化部116は、通信部100がデバイス20から受信したccを、予め保持しているddkで暗号化する。暗号化部116は、暗号化により得られたenc[cc]ddkをレスポンスとして、通信部100にデバイス20へ送信させる。
(2-3) Encryption unit 116
The encryption unit 116 encrypts various information. For example, the encryption unit 116 encrypts the cc that the communication unit 100 receives from the device 20 using the ddk held in advance. The encryption unit 116 causes the communication unit 100 to transmit enc[cc]ddk obtained by encryption to the device 20 as a response.

(3)記憶部120
記憶部120は、各種情報を記憶する機能を有する。記憶部120は、記憶媒体、例えば、HDD(Hard Disk Drive)、フラッシュメモリ、EEPROM(Electrically Erasable Programmable Read Only Memory)、RAM(Random Access read/write Memory)、ROM(Read Only Memory)、又はこれらの記憶媒体の任意の組み合わせによって構成される。記憶部120は、例えば、不揮発性メモリを用いることができる。
記憶部120は、例えば、復号部114によるenc[cc]ddkの復号と暗号化部116によるccの暗号化に用いられるddkを保持する。
(3) Storage unit 120
The storage unit 120 has a function of storing various information. The storage unit 120 includes a storage medium such as a HDD (Hard Disk Drive), a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), and a RAM (Random Access read/write). e Memory), ROM (Read Only Memory), or these Constructed by any combination of storage media. For example, a nonvolatile memory can be used for the storage unit 120.
The storage unit 120 holds, for example, ddk used for decryption of enc[cc]ddk by the decryption unit 114 and encryption of cc by the encryption unit 116.

<1-3.デバイスの構成>
図3を参照して、第1の実施形態に係るデバイス20の構成について説明する。図3は、第1の実施形態に係るデバイス20の構成の一例を示すブロック図である。
図3に示すように、デバイス20は、通信部200、制御部210、ストレージ220、SE(セキュアエレメント)230、及びRAM240を備える。なお、ストレージ220は、第1の記憶装置である。また、RAM240は、第2の記憶装置である。
<1-3. Device configuration>
The configuration of the device 20 according to the first embodiment will be described with reference to FIG. 3. FIG. 3 is a block diagram showing an example of the configuration of the device 20 according to the first embodiment.
As shown in FIG. 3, the device 20 includes a communication section 200, a control section 210, a storage 220, an SE (secure element) 230, and a RAM 240. Note that the storage 220 is a first storage device. Further, the RAM 240 is a second storage device.

(1)通信部200
通信部200は、ネットワークNWを介して、複数のサーバ10と通信を行う。通信部200は、当該通信により各種情報を送受信する。例えば、サーバ10がデバイス20の認証を行う場合、通信部200は、サーバ10からccを受信し、レスポンスとしてenc[cc]ddkをサーバ10へ送信する。一方、デバイス20がサーバ10の認証を行う場合、通信部200は、サーバ10へccを送信し、レスポンスとしてenc[cc]ddkをサーバ10から受信する。
(1) Communication department 200
The communication unit 200 communicates with a plurality of servers 10 via the network NW. The communication unit 200 transmits and receives various information through the communication. For example, when the server 10 authenticates the device 20, the communication unit 200 receives cc from the server 10 and transmits enc[cc]ddk to the server 10 as a response. On the other hand, when the device 20 authenticates the server 10, the communication unit 200 transmits cc to the server 10 and receives enc[cc]ddk from the server 10 as a response.

(2)制御部210
制御部210は、デバイス20の動作全体を制御する機能を有する。制御部210は、デバイス20がハードウェアとして備えるCPUにプログラムを実行させることによって実現される。
図3に示すように、制御部210は、鍵利用部212、及び鍵管理部214を備える。
(2) Control unit 210
The control unit 210 has a function of controlling the entire operation of the device 20. The control unit 210 is realized by causing a CPU included in the device 20 as hardware to execute a program.
As shown in FIG. 3, the control unit 210 includes a key usage unit 212 and a key management unit 214.

(2-1)鍵利用部212
鍵利用部212は、各種鍵の利用に関する処理を行う。
図3に示すように、鍵利用部212は、対象情報生成部2120、鍵取得部2122、復号部2124、暗号化部2126、及び認証部2128を備える。
(2-1) Key usage unit 212
The key usage unit 212 performs processing related to the usage of various keys.
As shown in FIG. 3, the key utilization section 212 includes a target information generation section 2120, a key acquisition section 2122, a decryption section 2124, an encryption section 2126, and an authentication section 2128.

(2-1-1)対象情報生成部2120
対象情報生成部2120は、対象情報を生成する。例えば、対象情報生成部2120は、サーバ10との通信に基づき、通信部200と通信を行ったサーバ10に対応するdkを示すKeySelectParameterを生成する。また、対象情報生成部2120は、ddkを生成するためにSeedを生成する。対象情報生成部2120は、生成したKeySelectParameterを鍵取得部2122へ入力する。
(2-1-1) Target information generation unit 2120
The target information generation unit 2120 generates target information. For example, the target information generation unit 2120 generates a KeySelectParameter indicating the dk corresponding to the server 10 that communicated with the communication unit 200 based on the communication with the server 10. Further, the target information generation unit 2120 generates Seed in order to generate ddk. The target information generation unit 2120 inputs the generated KeySelectParameter to the key acquisition unit 2122.

(2-1-2)鍵取得部2122
鍵取得部2122は、dkあるいはddkを取得する。例えば、鍵取得部2122は、対象情報生成部2120から入力されるKeySelectParameterに基づき、取得するdkを判定する。dkを取得する場合、鍵取得部2122は、取得するdkを指定するKeySelectParameter(対象情報)をパラメータとして含む要求を鍵管理部214へ入力し、dkを取得する。以下、KeySelectParameterは、「ksp」とも称される。ddkを取得する場合、鍵取得部2122は、Seedとkspとをパラメータとして含む要求を、鍵管理部214へ入力し、ddkを取得する。
(2-1-2) Key acquisition unit 2122
The key acquisition unit 2122 acquires dk or ddk. For example, the key acquisition unit 2122 determines the dk to acquire based on the KeySelectParameter input from the target information generation unit 2120. When acquiring a dk, the key acquisition unit 2122 inputs a request including a KeySelectParameter (target information) that specifies the dk to be acquired as a parameter to the key management unit 214, and acquires the dk. Hereinafter, KeySelectParameter is also referred to as "ksp". When acquiring the ddk, the key acquisition unit 2122 inputs a request including Seed and ksp as parameters to the key management unit 214, and acquires the ddk.

(2-1-3)復号部2124
復号部2124は、暗号化された各種情報を復号する。例えば、復号部2124は、通信部200がサーバ10から受信したenc[cc]ddkを、予め保持しているddkで復号する。復号部2124は、復号して得られたccを認証部2128へ入力する。
(2-1-3) Decoding unit 2124
The decryption unit 2124 decrypts various types of encrypted information. For example, the decoding unit 2124 decodes enc[cc]ddk that the communication unit 200 receives from the server 10 using a ddk held in advance. The decryption unit 2124 inputs the decrypted cc to the authentication unit 2128.

(2-1-4)暗号化部2126
暗号化部2126は、各種情報を暗号化する。例えば、暗号化部2126は、サーバ10から受信したccを、後述する暗号化部2146から入力されるddkで暗号化する。暗号化部2126は、暗号化により得られたenc[cc]ddkをレスポンスとして、通信部200にサーバ10へ送信させる。
(2-1-4) Encryption section 2126
The encryption unit 2126 encrypts various information. For example, the encryption unit 2126 encrypts the cc received from the server 10 using ddk input from the encryption unit 2146, which will be described later. The encryption unit 2126 causes the communication unit 200 to transmit enc[cc]ddk obtained by encryption to the server 10 as a response.

(2-1-5)認証部2128
認証部2128は、認証に関する処理を行う。例えば、デバイス20がサーバ10を認証する場合、認証部2128は、ccを生成し、通信部200にサーバ10へ送信させる。認証部2128は、デバイス20からレスポンスとして受信したenc[cc]ddkに基づき、サーバ10の認証を行う。具体的に、認証部2128は、通信部200が受信したenc[cc]ddkを予め保持しているddkで復号して得られるccと、サーバ10へ送信したccとを比較する。比較の結果、各ccが一致する場合、認証部2128は、デバイス20によるサーバ10の認証が成功したと判定する。
(2-1-5) Authentication section 2128
The authentication unit 2128 performs processing related to authentication. For example, when the device 20 authenticates the server 10, the authentication unit 2128 generates a cc and causes the communication unit 200 to transmit it to the server 10. The authentication unit 2128 authenticates the server 10 based on enc[cc]ddk received as a response from the device 20. Specifically, the authentication unit 2128 compares the cc obtained by decoding the enc[cc]ddk received by the communication unit 200 with the ddk held in advance and the cc transmitted to the server 10. As a result of the comparison, if the ccs match, the authentication unit 2128 determines that the authentication of the server 10 by the device 20 has been successful.

(2-2)鍵管理部214
鍵管理部214は、各種鍵の管理に関する処理を行う。
図3に示すように、鍵管理部214は、鍵取得部2140、第1の鍵生成部2142、第2の鍵生成部2143、復号部2144、及び暗号化部2146を備える。なお、復号部2144は、第2の復号部である。
(2-2) Key management unit 214
The key management unit 214 performs processing related to management of various keys.
As shown in FIG. 3, the key management section 214 includes a key acquisition section 2140, a first key generation section 2142, a second key generation section 2143, a decryption section 2144, and an encryption section 2146. Note that the decoding unit 2144 is a second decoding unit.

(2-2-1)鍵取得部2140
鍵取得部2140は、複数のサーバ10ごとに異なる対象情報に基づき、各種鍵を取得する。鍵取得部2140は、dkを暗号化する暗号鍵(第2の暗号鍵)と、鍵取得部2122から入力されるkspが示すdkとを、ストレージ220から取得する。dkを暗号化する暗号鍵(KeyEncriptionKey)は、以下、「kek」とも称される。以下、dkをkekで暗号化した情報は、「enc[dk]kek」と示される。例えば、dk1をkekで暗号化した情報は、enc[dk1]kekと示される。なお、鍵取得部2140がストレージ220から取得するdkは、kekによって暗号化されたenc[dk1]kekである。また、鍵取得部2140がストレージ220から取得するkekは、暗号鍵(第1の暗号鍵)で暗号化されている。kekを暗号化する暗号鍵はマスターキー(MasterKey)であり、以下、「mk」とも称される。以下、kekをmkで暗号化した情報は、「enc[kek]mk」と示される。
(2-2-1) Key acquisition unit 2140
The key acquisition unit 2140 acquires various keys based on target information that differs for each of the plurality of servers 10. The key acquisition unit 2140 acquires the encryption key (second encryption key) for encrypting dk and the dk indicated by the ksp input from the key acquisition unit 2122 from the storage 220. The encryption key (KeyEncryptionKey) for encrypting dk is hereinafter also referred to as "kek". Hereinafter, information obtained by encrypting dk with kek will be indicated as "enc[dk]kek". For example, information obtained by encrypting dk1 with kek is indicated as enc[dk1]kek. Note that the dk that the key acquisition unit 2140 acquires from the storage 220 is enc[dk1]kek encrypted by kek. Further, the kek that the key acquisition unit 2140 acquires from the storage 220 is encrypted with an encryption key (first encryption key). The encryption key for encrypting the kek is a master key, hereinafter also referred to as "mk". Hereinafter, information obtained by encrypting kek with mk will be indicated as "enc[kek]mk."

(2-2-2)第1の鍵生成部2142
第1の鍵生成部2142は、鍵導出関数によって、ddkを生成する。例えば、第1の鍵生成部2142は、dkとSeedに対して鍵導出関数を適用することで、ddkを生成する。具体的に、第1の鍵生成部2142は、復号部2144によって復号されたdkでSeedを暗号化する鍵導出関数によって、ddkを生成する。なお、暗号化によりddkを生成する場合、第1の鍵生成部2142が暗号化を行ってもよいし、暗号化部2146が暗号化を行ってもよい。
(2-2-2) First key generation unit 2142
The first key generation unit 2142 generates ddk using a key derivation function. For example, the first key generation unit 2142 generates ddk by applying a key derivation function to dk and Seed. Specifically, the first key generation unit 2142 generates ddk using a key derivation function that encrypts Seed with dk decrypted by the decryption unit 2144. Note that when generating the ddk by encryption, the first key generation unit 2142 may perform the encryption, or the encryption unit 2146 may perform the encryption.

また、第1の鍵生成部2142は、Seedとdkの連結値にハッシュ関数を適用する鍵導出関数によって、ddkを生成してもよい。具体的に、第1の鍵生成部2142は、当該連結値をハッシュ関数に入力することで出力されるハッシュ値をddkとして扱う。ハッシュ関数の一例として、SHA(Secure Hash Algorithm)-2、SHA-256、及びMD(Message Digest Algorithm)5等が挙げられる。 Further, the first key generation unit 2142 may generate ddk using a key derivation function that applies a hash function to the concatenated value of Seed and dk. Specifically, the first key generation unit 2142 treats the hash value output by inputting the concatenated value to a hash function as ddk. Examples of hash functions include SHA (Secure Hash Algorithm)-2, SHA-256, and MD (Message Digest Algorithm) 5.

また、第1の鍵生成部2142は、PBKDF(Password-Based Key Derivation Function)1、PBKDF2、PBES(Password-Based Encryption Scheme)1、及びPBES2等のアルゴリズムを鍵導出関数として用いてddkを生成してよい。第1の鍵生成部2142は、当該アルゴリズムを用いることで、推測されにくくよりセキュアなddkを生成することができる。 Further, the first key generation unit 2142 uses algorithms such as PBKDF (Password-Based Key Derivation Function) 1, PBKDF2, PBES (Password-Based Encryption Scheme) 1, and PBES2 as a key derivation function. and generate ddk It's fine. By using the algorithm, the first key generation unit 2142 can generate a more secure ddk that is less likely to be guessed.

なお、ddkの生成に用いられるSeedは、複数のサーバ10ごとに異なる。よって、第1の鍵生成部2142は、複数のサーバ10ごとに異なるddkを生成することができる。 Note that the Seed used to generate the ddk differs for each of the multiple servers 10. Therefore, the first key generation unit 2142 can generate a different ddk for each of the plurality of servers 10.

(2-2-3)第2の鍵生成部2143
第2の鍵生成部2143は、後述するSE230の復号部232によって復号されたkekを暗号化する暗号鍵(第4の暗号鍵)を生成する。kekを暗号化する暗号鍵(MaskKey)は、以下、「msk」とも称される。以下、kekをmskで暗号化した情報は、「enc[kek]msk」と示される。第2の鍵生成部2143は、生成したmskをRAM240に保存させる。
(2-2-3) Second key generation unit 2143
The second key generation unit 2143 generates an encryption key (fourth encryption key) that encrypts kek decrypted by the decryption unit 232 of the SE 230, which will be described later. The encryption key (MaskKey) for encrypting kek is hereinafter also referred to as "msk". Hereinafter, information obtained by encrypting kek with msk will be indicated as "enc[kek]msk". The second key generation unit 2143 stores the generated msk in the RAM 240.

第2の鍵生成部2143がmskを生成する方法は、特に限定されない。例えば、第2の鍵生成部2143は、暗号アルゴリズムによって異なる鍵生成関数を用いて、mskを生成する。暗号アルゴリズムがAES(Advanced Encryption Standard)である場合、第2の鍵生成部2143は、乱数を生成し、当該乱数をmskとする。暗号アルゴリズムがRSA(Rivest-Shamir-Adleman)である場合、第2の鍵生成部2143は、素数を生成し、当該素数をmskとする。
また、第2の鍵生成部2143は、タイムスタンプのハッシュを計算し、計算結果を示す値をmskとしてもよい。
The method by which the second key generation unit 2143 generates msk is not particularly limited. For example, the second key generation unit 2143 generates msk using a key generation function that differs depending on the cryptographic algorithm. When the encryption algorithm is AES (Advanced Encryption Standard), the second key generation unit 2143 generates a random number and sets the random number as msk. When the encryption algorithm is RSA (Rivest-Shamir-Adleman), the second key generation unit 2143 generates a prime number and sets the prime number as msk.
Further, the second key generation unit 2143 may calculate a hash of the timestamp and set a value indicating the calculation result as msk.

(2-2-4)復号部2144
復号部2144は、暗号化された各種情報を復号する。例えば、復号部2144は、鍵取得部2140がストレージ220から取得したenc[dk]kekを、後述するSE230の復号部232によって復号されたkekで復号する。復号部2144は、復号して得られたdkを暗号化部2146へ入力する。なお、dkの取得が目的の場合、復号部2144は、復号して得られたdkを鍵取得部2122へ入力する。
(2-2-4) Decoding unit 2144
The decryption unit 2144 decrypts various types of encrypted information. For example, the decryption unit 2144 decrypts enc[dk]kek obtained by the key acquisition unit 2140 from the storage 220 using kek decrypted by the decryption unit 232 of the SE 230, which will be described later. The decryption unit 2144 inputs the decrypted dk to the encryption unit 2146. Note that if the purpose is to obtain dk, the decryption unit 2144 inputs the decrypted dk to the key acquisition unit 2122.

また、復号部2144は、mskで暗号化されたkekであるenc[kek]mskを、mskで復号する。 Furthermore, the decryption unit 2144 decrypts enc[kek]msk, which is kek encrypted with msk, using msk.

(2-2-5)暗号化部2146
暗号化部2146は、各種情報を暗号化する。例えば、暗号化部2146は、鍵取得部2122から入力されるSeedを、復号部2144による複合で得られたdkで暗号化し、ddkを生成する。暗号化部2146は、生成したddkを暗号化部2126へ入力する。
(2-2-5) Encryption section 2146
The encryption unit 2146 encrypts various information. For example, the encryption unit 2146 encrypts the Seed input from the key acquisition unit 2122 with dk obtained by decoding by the decryption unit 2144, and generates ddk. The encryption unit 2146 inputs the generated ddk to the encryption unit 2126.

暗号化部2146は、後述するSE230の復号部232によって復号されたkekを、mskで暗号化する。暗号化部2146は、暗号化により得られたenc[kek]mskをRAM240に保存させる。enc[kek]mskをRAM240に保存させることで、kekの使用時、後述するSE230へ都度アクセスする必要がなくなる。これにより、デバイス20における処理速度を早くすることができる。また、RAM240に保存させるkekをmskで暗号化することで、kekの管理におけるセキュリティを向上することができる。 The encryption unit 2146 encrypts kek decrypted by the decryption unit 232 of the SE 230, which will be described later, using msk. The encryption unit 2146 stores enc[kek]msk obtained by encryption in the RAM 240. By storing enc[kek]msk in the RAM 240, there is no need to access the SE 230, which will be described later, each time kek is used. Thereby, the processing speed in the device 20 can be increased. Furthermore, by encrypting the kek stored in the RAM 240 using msk, security in kek management can be improved.

(3)ストレージ220
ストレージ220は、各種情報を記憶する機能を有する。ストレージ220は、記憶媒体、例えば、HDD、SSD(Solid State Drive)、フラッシュメモリ、又はこれらの記憶媒体の任意の組み合わせによって構成される。
(3) Storage 220
Storage 220 has a function of storing various information. The storage 220 is configured by a storage medium, such as an HDD, an SSD (Solid State Drive), a flash memory, or any combination of these storage media.

ストレージ220は、mkで暗号化されたkekと、kekで暗号化された複数のdkとを記憶する。なお、ストレージ220は、kekとdkを異なる領域に記憶する。これにより、kekとdkの管理におけるセキュリティを向上することができる。
図3に示すように、ストレージ220は、データキー記憶部222及びデータキー暗号鍵記憶部224を備える。
The storage 220 stores kek encrypted with mk and a plurality of dk encrypted with kek. Note that the storage 220 stores kek and dk in different areas. Thereby, security in managing kek and dk can be improved.
As shown in FIG. 3, the storage 220 includes a data key storage section 222 and a data key encryption key storage section 224.

(3-1)データキー記憶部222
データキー記憶部222は、kekで暗号化された複数のdkを記憶する。例えば、図3に示すようにデータキー記憶部222は、enc[dk1]kek2220-1、enc[dk2]kek2220-2、・・・、enc[dkN]kek2220-Nを記憶する。
(3-1) Data key storage unit 222
The data key storage unit 222 stores a plurality of dk's encrypted with kek. For example, as shown in FIG. 3, the data key storage unit 222 stores enc[dk1]kek2220-1, enc[dk2]kek2220-2, ..., enc[dkN]kek2220-N.

(3-2)データキー暗号鍵記憶部224
データキー暗号鍵記憶部224は、mkで暗号化されたkekを記憶する。例えば、図3に示すようにデータキー暗号鍵記憶部224は、1つのenc[kek]mk2240を記憶する。
(3-2) Data key encryption key storage unit 224
The data key encryption key storage unit 224 stores kek encrypted with mk. For example, as shown in FIG. 3, the data key encryption key storage unit 224 stores one enc[kek]mk 2240.

(4)SE230
SE230は、耐タンパー性を有するセキュアエレメントである。SE230は、例えば、プラスチック等のカード機材にSE230の機能が実装されたIC(Integrated Circuit)カード、又はSIM(Subscriber Identity Module Card)カード等である。この場合、SE230は、デバイス20に設けられたICカード又はSIMカードのコンタクト部(不図示)を介して着脱可能に装着される。
(4) SE230
SE230 is a secure element with tamper resistance. The SE 230 is, for example, an IC (Integrated Circuit) card, a SIM (Subscriber Identity Module Card) card, etc., in which the functions of the SE 230 are mounted on a card material such as plastic. In this case, the SE 230 is removably attached to the device 20 via a contact portion (not shown) of an IC card or SIM card.

SE230は、mkに関する処理を行う。図3に示すように、SE230は、復号部232及びマスターキー記憶部234を備える。なお、復号部232は、第1の復号部である。 SE230 performs processing related to mk. As shown in FIG. 3, SE 230 includes a decryption unit 232 and a master key storage unit 234. Note that the decoding unit 232 is a first decoding unit.

(4-1)復号部232
復号部232は、暗号化された各種情報を復号する。例えば、復号部232は、鍵取得部2140によって取得されたenc[kek]mkを、mkで復号する。復号部232は、復号して得られたkekを復号部2144へ入力する。
(4-1) Decoding unit 232
The decryption unit 232 decrypts various types of encrypted information. For example, the decryption unit 232 decrypts enc[kek]mk acquired by the key acquisition unit 2140 using mk. The decoding unit 232 inputs the kek obtained by decoding to the decoding unit 2144.

(4-2)マスターキー記憶部234
マスターキー記憶部234は、mkを記憶する。例えば、図3に示すようにマスターキー記憶部234は、1つのmk2340を記憶する。
(4-2) Master key storage section 234
Master key storage unit 234 stores mk. For example, as shown in FIG. 3, the master key storage unit 234 stores one mk2340.

(5)RAM240
RAM240は、復号部232によって復号されたkekを記憶する。
図3に示すように、RAM240は、データキー暗号鍵記憶部242を備える。
(5) RAM240
RAM 240 stores kek decoded by decoding section 232.
As shown in FIG. 3, the RAM 240 includes a data key encryption key storage section 242.

(5-1)データキー暗号鍵記憶部242
データキー暗号鍵記憶部242は、例えば、復号部232によって復号されたkekが暗号化部2146によってmskで暗号化されたものを一時的に記憶する。例えば、図3に示すように、データキー暗号鍵記憶部242は、enc[kek]msk2420を記憶する。このように、データキー暗号鍵記憶部242は、mskで暗号化されたkekを記憶するため、kekの管理におけるセキュリティを向上することができる。
(5-1) Data key encryption key storage unit 242
The data key encryption key storage unit 242 temporarily stores, for example, kek decrypted by the decryption unit 232 and encrypted by the encryption unit 2146 using msk. For example, as shown in FIG. 3, the data key encryption key storage unit 242 stores enc[kek]msk 2420. In this way, the data key encryption key storage unit 242 stores the kek encrypted with the msk, so that the security in managing the kek can be improved.

<1-4.相互認証の流れ>
図4及び図5を参照して、第1の実施形態に係るサーバ10とデバイス20との相互認証の流れについて説明する。なお、以下では、複数のサーバ10のうち、サーバ10-1がデバイス20と相互認証を行う例について説明する。
<1-4. Flow of mutual authentication>
The flow of mutual authentication between the server 10 and the device 20 according to the first embodiment will be described with reference to FIGS. 4 and 5. Note that an example in which the server 10-1 among the plurality of servers 10 performs mutual authentication with the device 20 will be described below.

(1)サーバによるデバイスの認証の流れ
図4を参照して、サーバ10によるデバイス20の認証の流れについて説明する。図4は、第1の実施形態に係るサーバ10-1とデバイス20との相互認証におけるサーバ10-1によるデバイス20の認証の流れの一例を示すシーケンス図である。
(1) Flow of device authentication by server The flow of authentication of device 20 by server 10 will be described with reference to FIG. FIG. 4 is a sequence diagram showing an example of the flow of authentication of the device 20 by the server 10-1 in mutual authentication between the server 10-1 and the device 20 according to the first embodiment.

図4に示すように、サーバ10-1は、ccAをパラメータPとするチャレンジをデバイス20へ送信させる(S100)。 As shown in FIG. 4, the server 10-1 causes the device 20 to transmit a challenge with ccA as the parameter P (S100).

チャレンジを受信したデバイス20の鍵利用部212は、鍵管理部214に対して、SeedAをパラメータP1、ksp1をパラメータP2とするddkの要求を行う(S102)。 The key usage unit 212 of the device 20 that has received the challenge requests the key management unit 214 for ddk with SeedA as parameter P1 and ksp1 as parameter P2 (S102).

ddkの要求を受けた鍵管理部214は、データキー暗号鍵記憶部242に対して、kekの要求を行う(S104)。kekの要求を受けたデータキー暗号鍵記憶部242は、enc[kek]mkを鍵管理部214へ入力する(S106)。 Upon receiving the request for ddk, the key management unit 214 makes a request for kek to the data key encryption key storage unit 242 (S104). Upon receiving the request for kek, the data key encryption key storage unit 242 inputs enc[kek]mk to the key management unit 214 (S106).

enc[kek]mkを入力された鍵管理部214は、マスターキー記憶部234に対して、enc[kek]mkをパラメータPとするkekの復号要求を行う(S108)。kekの復号要求を受けたマスターキー記憶部234は、enc[kek]mkをmkで復号する(S110)。マスターキー記憶部234は、復号により得たkekを鍵管理部214へ入力する(S112)。 The key management unit 214, which has received enc[kek]mk, requests the master key storage unit 234 to decrypt kek with enc[kek]mk as parameter P (S108). Upon receiving the kek decryption request, the master key storage unit 234 decrypts enc[kek]mk using mk (S110). The master key storage unit 234 inputs the kek obtained by decryption to the key management unit 214 (S112).

鍵管理部214は、データキー記憶部222に対して、ksp1をパラメータPとするdk1の要求を行う(S114)。dk1の要求を受けたデータキー記憶部222は、enc[dk1]kekを鍵管理部214へ入力する(S116)。 The key management unit 214 requests the data key storage unit 222 for dk1 with ksp1 as the parameter P (S114). Upon receiving the request for dk1, the data key storage unit 222 inputs enc[dk1]kek to the key management unit 214 (S116).

鍵管理部214は、enc[dk1]kekをkekで復号し、dk1を取得する(S118)。鍵管理部214は、SeedAをdk1で暗号化し、ddk1-Aを生成する(S120)。鍵管理部214は、生成したddk1-Aを鍵利用部212へ入力する(S122)。 The key management unit 214 decrypts enc[dk1]kek with kek and obtains dk1 (S118). The key management unit 214 encrypts SeedA with dk1 and generates ddk1-A (S120). The key management unit 214 inputs the generated ddk1-A to the key usage unit 212 (S122).

鍵管理部214は、mskを生成する(S124)。鍵管理部214は、生成したmskをデータキー暗号鍵記憶部242へ入力する(S126)。データキー暗号鍵記憶部242は、入力されたmskを保存する(S128)。鍵管理部214は、kekをmskで暗号化し、enc[kek]mskを生成する(S130)。鍵管理部214は、生成したenc[kek]mskをデータキー暗号鍵記憶部242へ入力する(S132)。データキー暗号鍵記憶部242は、入力されたenc[kek]mskを保存する(S134)。 The key management unit 214 generates msk (S124). The key management unit 214 inputs the generated msk to the data key encryption key storage unit 242 (S126). The data key encryption key storage unit 242 stores the input msk (S128). The key management unit 214 encrypts kek with msk and generates enc[kek]msk (S130). The key management unit 214 inputs the generated enc[kek]msk to the data key encryption key storage unit 242 (S132). The data key encryption key storage unit 242 stores the input enc[kek]msk (S134).

鍵利用部212は、サーバ10-1から受信したccAを鍵管理部214から入力されたddk1-Aで暗号化し、enc[ccA]ddk1-Aを生成する(S136)。鍵利用部212は、enc[ccA]ddk1-AをパラメータPとするレスポンスをサーバ10-1へ送信させる(S138)。 The key utilization unit 212 encrypts ccA received from the server 10-1 using ddk1-A input from the key management unit 214, and generates enc[ccA]ddk1-A (S136). The key usage unit 212 causes the server 10-1 to transmit a response with enc[ccA]ddk1-A as the parameter P (S138).

サーバ10-1は、デバイス20から受信したenc[ccA]ddk1-Aを予め保持しているddk1-Aで復号し、ccAを取得する(S140)。サーバ10-1は、S100にてデバイス20へ送信させたccAと、S140にて取得したccAとを比較し、一致すれば認証が成功したと判定する(S142)。 The server 10-1 decrypts enc[ccA]ddk1-A received from the device 20 using ddk1-A stored in advance, and obtains ccA (S140). The server 10-1 compares the ccA sent to the device 20 in S100 and the ccA acquired in S140, and if they match, determines that the authentication has been successful (S142).

(2)デバイスによるサーバの認証の流れ
図5を参照して、デバイス20によるサーバ10の認証の流れについて説明する。図5は、第1の実施形態に係るサーバ10-1とデバイス20との相互認証におけるデバイス20によるサーバ10-1の認証の流れの一例を示すシーケンス図である。
(2) Flow of server authentication by device The flow of authentication of server 10 by device 20 will be described with reference to FIG. FIG. 5 is a sequence diagram showing an example of the flow of authentication of the server 10-1 by the device 20 in mutual authentication between the server 10-1 and the device 20 according to the first embodiment.

図5に示すように、デバイス20の鍵利用部212は、ccBを生成する(S200)。鍵利用部212は、生成したccBをパラメータPとするチャレンジをサーバ10-1へ送信させる(S202)。 As shown in FIG. 5, the key usage unit 212 of the device 20 generates ccB (S200). The key usage unit 212 causes the server 10-1 to transmit a challenge with the generated ccB as the parameter P (S202).

鍵利用部212は、鍵管理部214に対して、SeedBをパラメータP1、ksp1をパラメータP2とするddkの要求を行う(S204)。 The key usage unit 212 requests the key management unit 214 for ddk with SeedB as the parameter P1 and ksp1 as the parameter P2 (S204).

ddkの要求を受けた鍵管理部214は、データキー暗号鍵記憶部242に対して、kekの要求を行う(S206)。kekの要求を受けたデータキー暗号鍵記憶部242は、enc[kek]mskとmskを鍵管理部214へ入力する(S208)。 Upon receiving the request for ddk, the key management unit 214 makes a request for kek to the data key encryption key storage unit 242 (S206). Upon receiving the request for kek, the data key encryption key storage unit 242 inputs enc[kek]msk and msk to the key management unit 214 (S208).

enc[kek]mskとmskを入力された鍵管理部214は、enc[kek]mskをmskで復号する(S210)。 The key management unit 214 that receives enc[kek]msk and msk decrypts enc[kek]msk using msk (S210).

鍵管理部214は、データキー記憶部222に対して、ksp1をパラメータPとするdk1の要求を行う(S212)。dk1の要求を受けたデータキー記憶部222は、enc[dk1]kekを鍵管理部214へ入力する(S214)。 The key management unit 214 requests the data key storage unit 222 for dk1 with ksp1 as the parameter P (S212). Upon receiving the request for dk1, the data key storage unit 222 inputs enc[dk1]kek to the key management unit 214 (S214).

鍵管理部214は、enc[dk1]kekをkekで復号し、dk1を取得する(S216)。鍵管理部214は、データキー暗号鍵記憶部242に対して、kekの削除要求を行う(S218)。kekの削除要求を受けたデータキー暗号鍵記憶部242は、enc[kek]mskを削除する(S220)。 The key management unit 214 decrypts enc[dk1]kek with kek and obtains dk1 (S216). The key management unit 214 requests the data key encryption key storage unit 242 to delete kek (S218). Upon receiving the request to delete kek, the data key encryption key storage unit 242 deletes enc[kek]msk (S220).

鍵管理部214は、SeedBをdk1で暗号化し、ddk1-Bを生成する(S222)。鍵管理部214は、生成したddk1-Bを鍵利用部212へ入力する(S224)。 The key management unit 214 encrypts SeedB with dk1 and generates ddk1-B (S222). The key management unit 214 inputs the generated ddk1-B to the key usage unit 212 (S224).

S202にてチャレンジを受信したサーバ10-1は、デバイス20から受信したccBを予め保持しているddk1-Bで暗号化し、enc[ccB]ddk1-Bを生成する(S226)。サーバ10-1は、生成したenc[ccB]ddk1-BをパラメータPとするレスポンスをデバイス20へ送信する(S228)。 The server 10-1, which received the challenge in S202, encrypts the ccB received from the device 20 using ddk1-B held in advance, and generates enc[ccB]ddk1-B (S226). The server 10-1 transmits a response with the generated enc[ccB]ddk1-B as the parameter P to the device 20 (S228).

鍵利用部212は、サーバ10-1から受信したenc[ccB]ddk1-Bを、鍵管理部214から入力されたddk1-Bで復号し、ccBを取得する(S230)。鍵利用部212は、S200にて生成したccBと、S230にて取得したccBとを比較し、一致すれば認証が成功したと判定する(S232)。 The key utilization unit 212 decrypts enc[ccB]ddk1-B received from the server 10-1 using ddk1-B input from the key management unit 214, and obtains ccB (S230). The key usage unit 212 compares the ccB generated in S200 and the ccB acquired in S230, and if they match, determines that the authentication has been successful (S232).

<<2.第2の実施形態>>
図6を参照して、本発明の第2の実施形態について説明する。第2の実施形態では、第1の実施形態におけるデバイス20がIoTゲートウェイであり、当該IoTゲートウェイと複数のサーバとの間で相互認証が行われる例について説明する。なお、以下では、上述した第1の実施形態と重複する説明を省略する。
<<2. Second embodiment >>
A second embodiment of the present invention will be described with reference to FIG. In the second embodiment, an example will be described in which the device 20 in the first embodiment is an IoT gateway, and mutual authentication is performed between the IoT gateway and a plurality of servers. Note that, in the following, explanations that overlap with those of the first embodiment described above will be omitted.

<2-1.通信システムの構成>
図6を参照して、第2の実施形態に係る通信システムの構成について説明する。図6は、第2の実施形態に係る通信システムの構成の一例を示すブロック図である。
図6に示すように、通信システム2は、サーバ10(10-1~10-N)、IoTゲートウェイ20A、及びIoT機器30を有する。
<2-1. Communication system configuration>
With reference to FIG. 6, the configuration of a communication system according to the second embodiment will be described. FIG. 6 is a block diagram showing an example of the configuration of a communication system according to the second embodiment.
As shown in FIG. 6, the communication system 2 includes a server 10 (10-1 to 10-N), an IoT gateway 20A, and an IoT device 30.

サーバ10及びIoTゲートウェイ20Aは、ネットワークNWを介して、互いに通信可能に接続されている。サーバ10及びIoTゲートウェイ20Aは、例えば、WANによって接続されている。WANは、例えば、インターネット接続により実現される。
IoTゲートウェイ20AとIoT機器30は、例えば、ローカルエリアネットワーク(Local Area Network:LAN)によって接続されている。LANは、有線接続によって実現されてもよいし、Bluetooth(登録商標)、Wi-Fi(登録商標)、Zigbee(登録商標)、MQTT等の無線接続によって接続されてもよい。
The server 10 and the IoT gateway 20A are communicably connected to each other via the network NW. The server 10 and the IoT gateway 20A are connected by, for example, a WAN. WAN is realized by, for example, an Internet connection.
The IoT gateway 20A and the IoT device 30 are connected, for example, by a local area network (LAN). The LAN may be realized by a wired connection, or may be connected by a wireless connection such as Bluetooth (registered trademark), Wi-Fi (registered trademark), Zigbee (registered trademark), MQTT, or the like.

第2の実施形態に係るサーバ10は、IoT機器30が取得した情報を、IoTゲートウェイ20Aを介して受信する。サーバ10は、IoT機器30から情報を受信する前に、IoTゲートウェイ20Aの認証を行う。当該認証が成功することにより、サーバ10は、IoT機器30から安全に情報を受信することができる。 The server 10 according to the second embodiment receives the information acquired by the IoT device 30 via the IoT gateway 20A. The server 10 authenticates the IoT gateway 20A before receiving information from the IoT device 30. If the authentication is successful, the server 10 can safely receive information from the IoT device 30.

IoTゲートウェイ20Aは、上述した第1の実施形態に係るデバイス20の具体例の一例である。IoTゲートウェイ20Aは、複数のサーバ10とIoT機器30との間の通信を仲介する、いわゆる中継機能を有する。IoTゲートウェイ20Aは、IoT機器30の情報をサーバ10へ送信する前に、サーバ10の認証を行う。当該認証が成功することにより、IoTゲートウェイ20Aは、IoT機器30の情報をサーバ10へ安全に送信することができる。 The IoT gateway 20A is a specific example of the device 20 according to the first embodiment described above. The IoT gateway 20A has a so-called relay function that mediates communication between the plurality of servers 10 and the IoT devices 30. The IoT gateway 20A authenticates the server 10 before transmitting the information about the IoT device 30 to the server 10. If the authentication is successful, the IoT gateway 20A can safely transmit information about the IoT device 30 to the server 10.

IoT機器30は、IoTゲートウェイ20Aを介して、各種情報をサーバ10へ送信する。当該各種情報は、例えば、IoT機器30が備えるセンサ装置が取得した情報や、IoT機器30における処理で生成される情報等である。 The IoT device 30 transmits various information to the server 10 via the IoT gateway 20A. The various types of information include, for example, information acquired by a sensor device included in the IoT device 30, information generated by processing in the IoT device 30, and the like.

<2-2.サーバの構成>
第2の実施形態に係るサーバ10の構成は、上述した第1の実施形態に係るサーバ10の構成と同様であるため、詳細な説明を省略する。
<2-2. Server configuration>
The configuration of the server 10 according to the second embodiment is the same as the configuration of the server 10 according to the first embodiment described above, so detailed explanation will be omitted.

<2-3.IoTゲートウェイの構成>
第2の実施形態に係るIoTゲートウェイ20Aは、通信部がIoT機器30と通信可能な構成を有する。当該構成以外の構成は、上述した第1の実施形態に係るデバイス20の構成と同様であるため、詳細な説明を省略する。
<2-3. IoT gateway configuration>
The IoT gateway 20A according to the second embodiment has a configuration in which a communication unit can communicate with the IoT device 30. The configuration other than this configuration is the same as the configuration of the device 20 according to the first embodiment described above, so detailed explanation will be omitted.

<2-4.相互認証の流れ>
第2の実施形態に係るサーバ10とIoTゲートウェイ20Aとの相互認証の流れは、上述した第1の実施形態に係るサーバ10とデバイス20との相互認証の流れと同様であるため、詳細な説明を省略する。なお、図4及び図5におけるデバイス20をIoTゲートウェイ20Aに置き換えればよい。
<2-4. Flow of mutual authentication>
The flow of mutual authentication between the server 10 and the IoT gateway 20A according to the second embodiment is similar to the flow of mutual authentication between the server 10 and the device 20 according to the first embodiment described above, so a detailed explanation will be provided. omitted. Note that the device 20 in FIGS. 4 and 5 may be replaced with the IoT gateway 20A.

<<3.第3の実施形態>>
図7及び図8を参照して、本発明の第3の実施形態について説明する。第3の実施形態では、IoTゲートウェイ20Aと複数のIoT機器30との間で相互認証が行われる例について説明する。なお、以下では、上述した第1の実施形態及び第2の実施形態と重複する説明を省略する。
<<3. Third embodiment >>
A third embodiment of the present invention will be described with reference to FIGS. 7 and 8. In the third embodiment, an example will be described in which mutual authentication is performed between an IoT gateway 20A and a plurality of IoT devices 30. Note that, in the following, explanations that overlap with those of the first embodiment and the second embodiment described above will be omitted.

<3-1.通信システムの構成>
図7を参照して、第3の実施形態に係る通信システムの構成について説明する。図7は、第3の実施形態に係る通信システムの構成の一例を示すブロック図である。
図7に示すように、通信システム3は、サーバ10、IoTゲートウェイ20A、及びIoT機器30(30-1~30-N)を有する。
<3-1. Communication system configuration>
With reference to FIG. 7, the configuration of a communication system according to a third embodiment will be described. FIG. 7 is a block diagram showing an example of the configuration of a communication system according to the third embodiment.
As shown in FIG. 7, the communication system 3 includes a server 10, an IoT gateway 20A, and IoT devices 30 (30-1 to 30-N).

サーバ10及びIoTゲートウェイ20Aは、ネットワークNWを介して、互いに通信可能に接続されている。サーバ10及びIoTゲートウェイ20Aは、例えば、WANによって接続されている。WANは、例えば、インターネット接続により実現される。
IoTゲートウェイ20AとIoT機器30は、例えば、LANによって接続されている。LANは、有線接続によって実現されてもよいし、Bluetooth、Wi-Fi、Zigbee、MQTT等の無線接続によって接続されてもよい。
The server 10 and the IoT gateway 20A are communicably connected to each other via the network NW. The server 10 and the IoT gateway 20A are connected by, for example, a WAN. WAN is realized by, for example, an Internet connection.
The IoT gateway 20A and the IoT device 30 are connected, for example, by a LAN. The LAN may be realized by a wired connection, or may be connected by a wireless connection such as Bluetooth, Wi-Fi, Zigbee, or MQTT.

第3の実施形態に係るサーバ10は、IoT機器30が取得した情報を、IoTゲートウェイ20Aを介して受信する。第3の実施形態に係るサーバ10は、IoTゲートウェイ20Aと認証を行ってもよいし、行わなくてもよい。IoTゲートウェイ20Aとの認証を行わない場合、サーバ10の構成は特に限定されない。一方、IoTゲートウェイ20Aとの認証を行う場合、サーバ10の構成は、上述した第1の実施形態及び第2の実施形態に係るサーバ10の構成と同様であるとする。なお、サーバ10がIoTゲートウェイ20Aと認証を行う場合、サーバ10は、IoT機器30から情報を受信する前に、IoTゲートウェイ20Aの認証を行う。当該認証が成功することにより、サーバ10は、IoT機器30から安全に情報を受信することができる。 The server 10 according to the third embodiment receives the information acquired by the IoT device 30 via the IoT gateway 20A. The server 10 according to the third embodiment may or may not perform authentication with the IoT gateway 20A. If authentication with the IoT gateway 20A is not performed, the configuration of the server 10 is not particularly limited. On the other hand, when performing authentication with the IoT gateway 20A, the configuration of the server 10 is assumed to be similar to the configuration of the server 10 according to the first embodiment and the second embodiment described above. Note that when the server 10 authenticates with the IoT gateway 20A, the server 10 authenticates the IoT gateway 20A before receiving information from the IoT device 30. If the authentication is successful, the server 10 can safely receive information from the IoT device 30.

第3の実施形態に係るIoTゲートウェイ20Aは、サーバ10と複数のIoT機器30との間の通信を仲介する、いわゆる中継機能を有する。IoTゲートウェイ20Aは、IoT機器30の情報をサーバ10へ送信する前に、IoT機器30の認証を行う。当該認証が成功することにより、IoTゲートウェイ20Aは、IoT機器30の情報をサーバ10へ安全に送信することができる。 The IoT gateway 20A according to the third embodiment has a so-called relay function that mediates communication between the server 10 and the plurality of IoT devices 30. The IoT gateway 20A authenticates the IoT device 30 before transmitting the information about the IoT device 30 to the server 10. If the authentication is successful, the IoT gateway 20A can safely transmit the information of the IoT device 30 to the server 10.

第3の実施形態に係るIoT機器30は、複数のIoT機器30-1~30-N(Nは自然数)を含む。第3の実施形態に係るIoT機器30は、IoT機器30の情報をサーバ10へ送信する前に、IoTゲートウェイ20Aの認証を行う。当該認証が成功することにより、IoT機器30は、IoT機器30の情報をサーバ10へ安全に送信することができる。 The IoT device 30 according to the third embodiment includes a plurality of IoT devices 30-1 to 30-N (N is a natural number). The IoT device 30 according to the third embodiment authenticates the IoT gateway 20A before transmitting the information about the IoT device 30 to the server 10. If the authentication is successful, the IoT device 30 can safely transmit information about the IoT device 30 to the server 10.

<3-2.サーバの構成>
第3の実施形態に係るサーバ10の構成は、上述した第1の実施形態及び第2の実施形態に係るサーバ10の構成と同様であるため、詳細な説明を省略する。
<3-2. Server configuration>
The configuration of the server 10 according to the third embodiment is the same as the configuration of the server 10 according to the first and second embodiments described above, so detailed description thereof will be omitted.

<3-3.IoTゲートウェイの構成>
第3の実施形態に係るIoTゲートウェイ20Aは、上述した第2の実施形態に係るIoTゲートウェイ20Aの構成と同様であるため、詳細な説明を省略する。
<3-3. IoT gateway configuration>
The IoT gateway 20A according to the third embodiment has the same configuration as the IoT gateway 20A according to the second embodiment described above, so a detailed explanation will be omitted.

<3-4.IoT機器の構成>
図8を参照して、第3の実施形態に係るIoT機器30の構成について説明する。図8は、第3の実施形態に係るIoT機器30の構成の一例を示すブロック図である。
図8に示すように、IoT機器30は、通信部300、制御部310、及び記憶部320を備える。
<3-4. Configuration of IoT devices>
With reference to FIG. 8, the configuration of the IoT device 30 according to the third embodiment will be described. FIG. 8 is a block diagram showing an example of the configuration of the IoT device 30 according to the third embodiment.
As shown in FIG. 8, the IoT device 30 includes a communication section 300, a control section 310, and a storage section 320.

(1)通信部300
通信部300は、IoTゲートウェイ20Aと通信を行う。通信部300は、当該通信により各種情報の送受信を行う。例えば、IoT機器30がIoTゲートウェイ20Aの認証を行う場合、通信部300は、ccをIoTゲートウェイ20Aへ送信し、レスポンスとしてenc[cc]ddkをIoTゲートウェイ20Aから受信する。一方、IoTゲートウェイ20AがIoT機器30の認証を行う場合、通信部300は、IoTゲートウェイ20Aからccを受信し、レスポンスとしてenc[cc]ddkをIoTゲートウェイ20Aへ送信する。
(1) Communication department 300
The communication unit 300 communicates with the IoT gateway 20A. The communication unit 300 transmits and receives various information through the communication. For example, when the IoT device 30 authenticates the IoT gateway 20A, the communication unit 300 transmits cc to the IoT gateway 20A, and receives enc[cc]ddk from the IoT gateway 20A as a response. On the other hand, when the IoT gateway 20A authenticates the IoT device 30, the communication unit 300 receives cc from the IoT gateway 20A and transmits enc[cc]ddk to the IoT gateway 20A as a response.

(2)制御部310
制御部310は、IoT機器30の動作全体を制御する機能を有する。制御部310は、IoT機器30がハードウェアとして備えるCPU(Central Processing Unit)にプログラムを実行させることによって実現される。
図8に示すように、制御部310は、認証部312、復号部314、及び暗号化部316を備える。
(2) Control unit 310
The control unit 310 has a function of controlling the entire operation of the IoT device 30. The control unit 310 is realized by causing a CPU (Central Processing Unit) included in the IoT device 30 as hardware to execute a program.
As shown in FIG. 8, the control section 310 includes an authentication section 312, a decryption section 314, and an encryption section 316.

(2-1)認証部312
認証部312は、認証に関する処理を行う。例えば、IoT機器30がIoTゲートウェイ20Aを認証する場合、認証部312は、ccを生成し、通信部300にIoTゲートウェイ20Aへ送信させる。認証部312は、IoTゲートウェイ20Aからレスポンスとして受信したenc[cc]ddkに基づき、IoTゲートウェイ20Aの認証を行う。具体的に、認証部312は、通信部300が受信したenc[cc]ddkを予め保持しているddkで復号して得られるccと、IoTゲートウェイ20Aへ送信したccとを比較する。比較の結果、各ccが一致する場合、認証部312は、IoT機器30によるIoTゲートウェイ20Aの認証が成功したと判定する。
(2-1) Authentication section 312
The authentication unit 312 performs processing related to authentication. For example, when the IoT device 30 authenticates the IoT gateway 20A, the authentication unit 312 generates a cc and causes the communication unit 300 to transmit it to the IoT gateway 20A. The authentication unit 312 authenticates the IoT gateway 20A based on enc[cc]ddk received as a response from the IoT gateway 20A. Specifically, the authentication unit 312 compares the cc obtained by decoding the enc[cc]ddk received by the communication unit 300 with the ddk held in advance and the cc transmitted to the IoT gateway 20A. As a result of the comparison, if the ccs match, the authentication unit 312 determines that the IoT device 30 has successfully authenticated the IoT gateway 20A.

(2-2)復号部314
復号部314は、暗号化された各種情報を復号する。例えば、復号部314は、通信部300がIoTゲートウェイ20Aから受信したenc[cc]ddkを、予め保持しているddkで復号する。復号部314は、復号して得られたccを認証部312へ入力する。
(2-2) Decoding unit 314
The decryption unit 314 decrypts various types of encrypted information. For example, the decoding unit 314 decodes enc[cc]ddk that the communication unit 300 receives from the IoT gateway 20A using a ddk held in advance. The decryption unit 314 inputs the decrypted cc to the authentication unit 312.

(2-3)暗号化部316
暗号化部316は、各種情報を暗号化する。例えば、暗号化部316は、通信部300がIoTゲートウェイ20Aから受信したccを、予め保持しているddkで暗号化する。暗号化部316は、暗号化により得られたenc[cc]ddkをレスポンスとして、通信部300にIoTゲートウェイ20Aへ送信させる。
(2-3) Encryption unit 316
The encryption unit 316 encrypts various information. For example, the encryption unit 316 encrypts the cc that the communication unit 300 receives from the IoT gateway 20A using the ddk held in advance. The encryption unit 316 causes the communication unit 300 to transmit enc[cc]ddk obtained by encryption as a response to the IoT gateway 20A.

(3)記憶部320
記憶部320は、各種情報を記憶する機能を有する。記憶部320は、記憶媒体、例えば、HDD(Hard Disk Drive)、フラッシュメモリ、EEPROM(Electrically Erasable Programmable Read Only Memory)、RAM(Random Access read/write Memory)、ROM(Read Only Memory)、又はこれらの記憶媒体の任意の組み合わせによって構成される。記憶部320は、例えば、不揮発性メモリを用いることができる。
記憶部320は、例えば、復号部314によるenc[cc]ddkの復号と暗号化部316によるccの暗号化に用いられるddkを保持する。
(3) Storage unit 320
The storage unit 320 has a function of storing various information. The storage unit 320 includes a storage medium such as a hard disk drive (HDD), a flash memory, an electrically erasable programmable read only memory (EEPROM), or a random access read/write memory (RAM). e Memory), ROM (Read Only Memory), or these Constructed by any combination of storage media. For example, a nonvolatile memory can be used as the storage unit 320.
The storage unit 320 holds, for example, ddk used for decryption of enc[cc]ddk by the decryption unit 314 and encryption of cc by the encryption unit 316.

<3-5.相互認証の流れ>
第3の実施形態に係るIoT機器30とIoTゲートウェイ20Aとの相互認証の流れは、上述した第2の実施形態に係るサーバ10とIoTゲートウェイ20Aとの相互認証の流れと同様であるため、詳細な説明を省略する。なお、図4及び図5におけるサーバ10-1をIoT機器30-1に置き換え、デバイス20をIoTゲートウェイ20Aに置き換えればよい。
<3-5. Flow of mutual authentication>
The flow of mutual authentication between the IoT device 30 and the IoT gateway 20A according to the third embodiment is similar to the flow of mutual authentication between the server 10 and the IoT gateway 20A according to the second embodiment described above, so the details will be explained below. Further explanations will be omitted. Note that the server 10-1 in FIGS. 4 and 5 may be replaced with the IoT device 30-1, and the device 20 may be replaced with the IoT gateway 20A.

<<4.第4の実施形態>>
図9を参照して、本発明の第4の実施形態について説明する。第4の実施形態では、本発明が適用された具体例を示す。具体例の一例として、本発明が自動車に適用された例を示す。以下、自動車の車内に設けられた車内ゲートウェイと車内に設けられた複数の機器との間、又は当該車内ゲートウェイと車外の複数の機器との間で相互認証が行われる例について説明する。なお、以下では、上述した第1の実施形態~第3の実施形態と重複する説明を省略する。
<<4. Fourth embodiment >>
A fourth embodiment of the present invention will be described with reference to FIG. The fourth embodiment shows a specific example to which the present invention is applied. As a specific example, an example in which the present invention is applied to an automobile will be shown. An example in which mutual authentication is performed between an in-vehicle gateway provided inside an automobile and a plurality of devices provided inside the vehicle, or between the in-vehicle gateway and a plurality of devices outside the vehicle will be described below. Note that, in the following, explanations that overlap with those of the first to third embodiments described above will be omitted.

<4-1.通信システムの構成>
図9を参照して、第4の実施形態に係る通信システムの構成について説明する。図9は、第4の実施形態に係る通信システムの構成の一例を示すブロック図である。
図9に示すように、通信システム4は、自動車40の車内に設けられた車内ゲートウェイ20B、車内機器50(50-1~50-N)、及び車外機器60を有する。車外機器60は、クラウド61、サーバ62、信号機の機器63、橋の機器64、及び駐車場の機器65を含む。
<4-1. Communication system configuration>
With reference to FIG. 9, the configuration of a communication system according to the fourth embodiment will be described. FIG. 9 is a block diagram showing an example of the configuration of a communication system according to the fourth embodiment.
As shown in FIG. 9, the communication system 4 includes an in-vehicle gateway 20B provided inside an automobile 40, in-vehicle devices 50 (50-1 to 50-N), and external devices 60. The external devices 60 include a cloud 61, a server 62, a traffic light device 63, a bridge device 64, and a parking lot device 65.

車内ゲートウェイ20B及び車外機器60は、ネットワークNWを介して、互いに通信可能に接続されている。車内ゲートウェイ20B及び車外機器60は、例えば、WANによって接続されている。WANは、例えば、インターネット接続により実現される。
車内ゲートウェイ20Bと車内機器50は、例えば、LANによって接続されている。LANは、有線接続によって実現されてもよいし、Bluetooth、Wi-Fi、Zigbee、MQTT等の無線接続によって接続されてもよい。
The in-vehicle gateway 20B and the external device 60 are communicably connected to each other via the network NW. The in-vehicle gateway 20B and the external device 60 are connected by, for example, a WAN. WAN is realized by, for example, an Internet connection.
The in-vehicle gateway 20B and the in-vehicle device 50 are connected, for example, by a LAN. The LAN may be realized by a wired connection, or may be connected by a wireless connection such as Bluetooth, Wi-Fi, Zigbee, or MQTT.

車内ゲートウェイ20Bは、第2の実施形態及び第3の実施形態に係るIoTゲートウェイ20Aに相当する。車内ゲートウェイ20Bは、複数の車内機器50と複数の車外機器60との間の通信を仲介する、いわゆる中継機能を有する。車内ゲートウェイ20Bは、車内機器50の情報を車外機器60へ送信する前に、車内機器50の認証を行う。また、車内ゲートウェイ20Bは、車外機器60の情報を車内機器50へ送信する前に、車外機器60の認証を行う。それぞれの認証が成功することにより、車内ゲートウェイ20Bは、車内機器50と車外機器60との間の情報の送受信を安全に行うことができる。 The in-vehicle gateway 20B corresponds to the IoT gateway 20A according to the second embodiment and the third embodiment. The in-vehicle gateway 20B has a so-called relay function that mediates communication between the plurality of in-vehicle devices 50 and the plurality of external devices 60. The in-vehicle gateway 20B authenticates the in-vehicle device 50 before transmitting the information of the in-vehicle device 50 to the external device 60. Further, the in-vehicle gateway 20B authenticates the external device 60 before transmitting the information of the external device 60 to the in-vehicle device 50. When each authentication is successful, the in-vehicle gateway 20B can safely transmit and receive information between the in-vehicle device 50 and the external device 60.

車内機器50は、第3の実施形態に係るIoT機器30に相当する。車内機器50は、複数の車内機器50-1~50-N(Nは自然数)を含む。車内機器50の一例として、カーナビゲーションシステム、加速度センサ、ジャイロセンサ、測距センサ、GPS(Global Positioning System)センサ、撮像装置等が挙げられる。車内機器50は、例えば、自動車40に関する情報を取得し、車内ゲートウェイ20Bを介して、車外機器60へ送信する。 The in-vehicle device 50 corresponds to the IoT device 30 according to the third embodiment. The in-vehicle device 50 includes a plurality of in-vehicle devices 50-1 to 50-N (N is a natural number). Examples of the in-vehicle equipment 50 include a car navigation system, an acceleration sensor, a gyro sensor, a distance sensor, a GPS (Global Positioning System) sensor, an imaging device, and the like. For example, the in-vehicle device 50 acquires information regarding the automobile 40 and transmits it to the out-of-vehicle device 60 via the in-vehicle gateway 20B.

車外機器60は、第1の実施形態及び第2の実施形態に係るサーバ10に相当する。車外機器60の一例として、クラウド61、サーバ62、信号機の機器63、橋の機器64、及び駐車場の機器65等が挙げられる。車外機器60は、例えば、交通情報等の車外に関する情報を取得し、車内ゲートウェイ20Bを介して、車内機器50へ送信する。 The external device 60 corresponds to the server 10 according to the first embodiment and the second embodiment. Examples of the external device 60 include a cloud 61, a server 62, a traffic light device 63, a bridge device 64, a parking lot device 65, and the like. The external device 60 acquires information related to the outside of the vehicle, such as traffic information, for example, and transmits it to the in-vehicle device 50 via the in-vehicle gateway 20B.

<4-2.車内ゲートウェイの構成>
第4の実施形態に係る車内ゲートウェイ20Bの構成は、上述した第2の実施形態及び第3の実施形態に係るIoTゲートウェイ20Aの構成と同様であるため、詳細な説明を省略する。
<4-2. In-vehicle gateway configuration>
The configuration of the in-vehicle gateway 20B according to the fourth embodiment is similar to the configuration of the IoT gateway 20A according to the second and third embodiments described above, and therefore detailed explanation will be omitted.

<4-3.車内機器の構成>
第4の実施形態に係る車内機器50の構成は、上述した第3の実施形態に係るIoT機器30の構成と同様であるため、詳細な説明を省略する。
<4-3. Configuration of in-vehicle equipment>
The configuration of the in-vehicle device 50 according to the fourth embodiment is the same as the configuration of the IoT device 30 according to the third embodiment described above, so detailed explanation will be omitted.

<4-4.車外機器の構成>
第4の実施形態に係る車外機器60の構成は、上述した第1の実施形態及び第2の実施形態に係るサーバ10の構成と同様であるため、詳細な説明を省略する。
<4-4. Configuration of external equipment>
The configuration of the external device 60 according to the fourth embodiment is the same as the configuration of the server 10 according to the first and second embodiments described above, so a detailed explanation will be omitted.

<4-5.相互認証の流れ>
第4の実施形態に係る車内機器50と車内ゲートウェイ20Bとの相互認証の流れは、上述した第3の実施形態に係るIoT機器30とIoTゲートウェイ20Aとの相互認証の流れと同様であるため、詳細な説明を省略する。また、第4の実施形態に係る車外機器60と車内ゲートウェイ20Bとの相互認証の流れは、上述した第2の実施形態に係るサーバ10とIoTゲートウェイ20Aとの相互認証の流れと同様であるため、詳細な説明を省略する。
<4-5. Flow of mutual authentication>
The flow of mutual authentication between the in-vehicle device 50 and the in-vehicle gateway 20B according to the fourth embodiment is similar to the flow of mutual authentication between the IoT device 30 and the IoT gateway 20A according to the third embodiment described above. Detailed explanation will be omitted. Furthermore, the flow of mutual authentication between the external device 60 and the in-vehicle gateway 20B according to the fourth embodiment is the same as the flow of mutual authentication between the server 10 and the IoT gateway 20A according to the second embodiment described above. , detailed explanation will be omitted.

<<5.変形例>>
以上、本発明の各実施形態について説明した。続いて、図10及び図11を参照して、本発明の各実施形態に係る変形例について説明する。なお、以下に説明する変形例は、本発明の各実施形態で説明した構成に代えて適用されてもよいし、本発明の各実施形態で説明した構成に対して追加的に適用されてもよい。
<<5. Modified example >>
Each embodiment of the present invention has been described above. Next, modifications of each embodiment of the present invention will be described with reference to FIGS. 10 and 11. Note that the modified examples described below may be applied instead of the configurations described in each embodiment of the present invention, or may be applied in addition to the configurations described in each embodiment of the present invention. good.

上述した実施形態では、mskの作成、kekの暗号化、及びmskとenc[kek]mskのRAM240への保存等を含むmskに関する処理をddk1-Aの生成後に行う例について説明したが、かかる例に限定されない。mskに関する処理は、アプリケーションの起動時に行われてもよい。 In the embodiment described above, an example has been described in which processing related to msk, including creation of msk, encryption of kek, and storage of msk and enc[kek]msk in the RAM 240, is performed after generation of ddk1-A. but not limited to. Processing regarding msk may be performed when the application is started.

(1)アプリケーション起動時におけるmskに関する処理の流れ
図10を参照して、アプリケーション起動時におけるmskに関する処理の流れについて説明する。図10は、各実施形態に係るアプリケーション起動時におけるmskに関する処理の流れを示すシーケンス図である。
(1) Flow of processing related to msk when starting an application The flow of processing related to msk when starting an application will be described with reference to FIG. FIG. 10 is a sequence diagram showing the flow of processing related to msk when starting an application according to each embodiment.

図10に示すように、デバイス20の鍵利用部212は、鍵管理部214に対して、アプリケーション(アプリ)の起動時にアプリが起動したこと通知する(S300)。 As shown in FIG. 10, the key usage unit 212 of the device 20 notifies the key management unit 214 that the application has been started when the application (app) is started (S300).

通知を受けた鍵管理部214は、mskを生成する(S302)。鍵管理部214は、生成したmskをデータキー暗号鍵記憶部242へ入力する(S304)。データキー暗号鍵記憶部242は、入力されたmskを保存する(S306)。 The key management unit 214 that has received the notification generates msk (S302). The key management unit 214 inputs the generated msk to the data key encryption key storage unit 242 (S304). The data key encryption key storage unit 242 stores the input msk (S306).

鍵管理部214は、データキー暗号鍵記憶部224に対して、kekの要求を行う(S308)。kekの要求を受けたデータキー暗号鍵記憶部224は、enc[kek]mkを鍵管理部214へ入力する(S310)。 The key management unit 214 requests kek from the data key encryption key storage unit 224 (S308). Upon receiving the request for kek, the data key encryption key storage unit 224 inputs enc[kek]mk to the key management unit 214 (S310).

enc[kek]mkを入力された鍵管理部214は、マスターキー記憶部234に対して、enc[kek]mkをパラメータPとするkekの復号要求を行う(S312)。kekの復号要求を受けたマスターキー記憶部234は、enc[kek]mkをmkで復号する(S314)。マスターキー記憶部234は、復号により得たkekを鍵管理部214へ入力する(S316)。 The key management unit 214, which has received enc[kek]mk, requests the master key storage unit 234 to decrypt kek with enc[kek]mk as parameter P (S312). Upon receiving the kek decryption request, the master key storage unit 234 decrypts enc[kek]mk using mk (S314). The master key storage unit 234 inputs the kek obtained by decryption to the key management unit 214 (S316).

鍵管理部214は、kekをmskで暗号化し、enc[kek]mskを生成する(S318)。鍵管理部214は、生成したenc[kek]mskをデータキー暗号鍵記憶部242へ入力する(S320)。データキー暗号鍵記憶部242は、入力されたenc[kek]mskを保存する(S322)。 The key management unit 214 encrypts kek with msk and generates enc[kek]msk (S318). The key management unit 214 inputs the generated enc[kek]msk to the data key encryption key storage unit 242 (S320). The data key encryption key storage unit 242 stores the input enc[kek]msk (S322).

(2)サーバによるデバイスの認証の流れ
図11を参照して、アプリケーション起動時にmskに関する処理が行われた場合のサーバ10によるデバイス20の認証の流れについて説明する。図11は、各実施形態に係るサーバ10とデバイス20との相互認証におけるサーバ10によるデバイス20の認証の流れの変形例を示すシーケンス図である。
(2) Flow of device authentication by server Referring to FIG. 11, the flow of authentication of device 20 by server 10 when msk-related processing is performed at application startup will be described. FIG. 11 is a sequence diagram showing a modified example of the flow of authentication of the device 20 by the server 10 in mutual authentication between the server 10 and the device 20 according to each embodiment.

図11に示すように、サーバ10-1は、ccAをパラメータPとするチャレンジをデバイス20へ送信させる(S400)。 As shown in FIG. 11, the server 10-1 causes the device 20 to transmit a challenge with ccA as the parameter P (S400).

チャレンジを受信したデバイス20の鍵利用部212は、鍵管理部214に対して、SeedAをパラメータP1、ksp1をパラメータP2とするddkの要求を行う(S402)。 The key usage unit 212 of the device 20 that has received the challenge requests the key management unit 214 for ddk with SeedA as parameter P1 and ksp1 as parameter P2 (S402).

ddkの要求を受けた鍵管理部214は、データキー暗号鍵記憶部242に対して、kekの要求を行う(S404)。kekの要求を受けたデータキー暗号鍵記憶部242は、enc[kek]mskとmskを鍵管理部214へ入力する(S406)。 Upon receiving the request for ddk, the key management unit 214 makes a request for kek to the data key encryption key storage unit 242 (S404). Upon receiving the request for kek, the data key encryption key storage unit 242 inputs enc[kek]msk and msk to the key management unit 214 (S406).

enc[kek]mskとmskを入力された鍵管理部214は、enc[kek]mskをmskで復号する(S408)。 The key management unit 214 that receives enc[kek]msk and msk decrypts enc[kek]msk using msk (S408).

鍵管理部214は、データキー記憶部222に対して、ksp1をパラメータPとするdk1の要求を行う(S410)。dk1の要求を受けたデータキー記憶部222は、enc[dk1]kekを鍵管理部214へ入力する(S412)。 The key management unit 214 requests the data key storage unit 222 for dk1 with ksp1 as the parameter P (S410). Upon receiving the request for dk1, the data key storage unit 222 inputs enc[dk1]kek to the key management unit 214 (S412).

鍵管理部214は、enc[dk1]kekをkekで復号し、dk1を取得する(S414)。鍵管理部214は、SeedAをdk1で暗号化し、ddk1-Aを生成する(S416)。鍵管理部214は、生成したddk1-Aを鍵利用部212へ入力する(S418)。 The key management unit 214 decrypts enc[dk1]kek with kek and obtains dk1 (S414). The key management unit 214 encrypts SeedA with dk1 and generates ddk1-A (S416). The key management unit 214 inputs the generated ddk1-A to the key usage unit 212 (S418).

鍵利用部212は、サーバ10-1から受信したccAを鍵管理部214から入力されたddk1-Aで暗号化し、enc[ccA]ddk1-Aを生成する(S420)。鍵利用部212は、enc[ccA]ddk1-AをパラメータPとするレスポンスをサーバ10-1へ送信させる(S422)。 The key utilization unit 212 encrypts ccA received from the server 10-1 using ddk1-A input from the key management unit 214, and generates enc[ccA]ddk1-A (S420). The key usage unit 212 causes the server 10-1 to transmit a response with enc[ccA]ddk1-A as the parameter P (S422).

サーバ10-1は、デバイス20から受信したenc[ccA]ddk1-Aを予め保持しているddk1-Aで復号し、ccAを取得する(S424)。サーバ10-1は、S400にてデバイス20へ送信させたccAと、S424にて取得したccAとを比較し、一致すれば認証が成功したと判定する(S426)。 The server 10-1 decrypts enc[ccA]ddk1-A received from the device 20 using ddk1-A stored in advance, and obtains ccA (S424). The server 10-1 compares the ccA sent to the device 20 in S400 and the ccA acquired in S424, and if they match, determines that the authentication has been successful (S426).

(3)デバイスによるサーバの認証の流れ
アプリケーション起動時にmskに関する処理が行われた場合のデバイス20によるサーバ10の認証の流れは、図5に示す認証の流れと同様であるため、詳細な説明を省略する。
(3) Flow of server authentication by device The flow of authentication of server 10 by device 20 when msk-related processing is performed at the time of application startup is similar to the authentication flow shown in FIG. 5, so a detailed explanation will be given below. Omitted.

以上、本発明の各実施形態の変形例について説明した。
以上説明したように、各実施形態に係る通信システムにおいて、SE230は、耐タンパー性を有し、mskを記憶する。ストレージ220は、mskで暗号化されたkekと、kekで暗号化された複数のデータキーとを記憶する。
通信部200は、複数の通信対象と通信を行う。鍵取得部2140は、複数の通信対象ごとに異なる対象情報に基づき、kekと、通信部200と通信を行った通信対象に対応するデータキーとを、ストレージ220から取得する。
SE230の復号部232は、鍵取得部2140によって取得されたkekを、mskで復号する。鍵管理部214の復号部2144は、鍵取得部2140によって取得されたデータキーを、復号部232によって復号されたkekで復号する。
第1の鍵生成部2142は、復号部2144によって復号されたデータキーに基づき、複数の通信対象ごとに異なるddkを生成する。
Modifications of each embodiment of the present invention have been described above.
As explained above, in the communication system according to each embodiment, the SE 230 has tamper resistance and stores msk. The storage 220 stores kek encrypted with msk and a plurality of data keys encrypted with kek.
The communication unit 200 communicates with a plurality of communication targets. The key acquisition unit 2140 acquires the kek and the data key corresponding to the communication target that communicated with the communication unit 200 from the storage 220 based on target information that differs for each of the plurality of communication targets.
The decryption unit 232 of the SE 230 decrypts the kek acquired by the key acquisition unit 2140 using msk. The decryption unit 2144 of the key management unit 214 decrypts the data key acquired by the key acquisition unit 2140 using the kek decrypted by the decryption unit 232.
The first key generation unit 2142 generates a different ddk for each of the plurality of communication targets based on the data key decrypted by the decryption unit 2144.

かかる構成により、各実施形態に係る通信システムは、HSMと比較して安価なSE230を用いることで、高額な設備投資をすることなく暗号鍵をセキュアに管理することができる。また、通信システムは、SE230に1つのmskを保存し、msk以外の情報をストレージ220に暗号化して保存することで、ストレージ220のリソースが許す限り多数の鍵をセキュアに管理することができる。また、通信システムは、mskを保存できる1つのSE230と、msk以外の情報を保存できるストレージ220を備えることで、デバイスに複数のSEを設けることなく鍵の管理を行うことができる。 With this configuration, the communication system according to each embodiment can securely manage encryption keys without making a large investment in equipment by using the SE 230, which is cheaper than the HSM. Further, the communication system can securely manage as many keys as the resources of the storage 220 allow by storing one msk in the SE 230 and encrypting and storing information other than the msk in the storage 220. Furthermore, by including one SE 230 that can store msk and storage 220 that can store information other than msk, the communication system can manage keys without providing multiple SEs in the device.

よって、本発明の通信システムは、安価なデバイスで複数の暗号鍵をセキュアに管理することができる。 Therefore, the communication system of the present invention can securely manage multiple encryption keys with an inexpensive device.

なお、上述した各実施形態における通信システムをコンピュータで実現するようにしてもよい。その場合、この機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した機能の一部を実現するためのものであってもよく、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよく、FPGA(Field Programmable Gate Array)等のプログラマブルロジックデバイスを用いて実現されるものであってもよい。 Note that the communication system in each of the embodiments described above may be implemented by a computer. In that case, a program for realizing this function may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read into a computer system and executed. Note that the "computer system" herein includes hardware such as an OS and peripheral devices. Furthermore, the term "computer-readable recording medium" refers to portable media such as flexible disks, magneto-optical disks, ROMs, and CD-ROMs, and storage devices such as hard disks built into computer systems. Furthermore, a "computer-readable recording medium" refers to a storage medium that dynamically stores a program for a short period of time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. It may also include a device that retains a program for a certain period of time, such as a volatile memory inside a computer system that is a server or client in that case. Further, the above-mentioned program may be one for realizing a part of the above-mentioned functions, or may be one that can realize the above-mentioned functions in combination with a program already recorded in the computer system. It may be realized using a programmable logic device such as an FPGA (Field Programmable Gate Array).

以上、図面を参照してこの発明の実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。 Although the embodiments of this invention have been described above in detail with reference to the drawings, the specific configuration is not limited to that described above, and various design changes may be made without departing from the gist of this invention. It is possible to do so.

1…通信システム、10…サーバ、20…デバイス、20A…IoTゲートウェイ、20B…車内ゲートウェイ、30…IoT機器、40…自動車、50…車内機器、60…車外機器、61…クラウド、62…サーバ、63…信号機の機器、64…橋の機器、65…駐車場の機器、100…通信部、110…制御部、112…認証部、114…復号部、116…暗号化部、120…記憶部、200…通信部、210…制御部、212…鍵利用部、214…鍵管理部、220…ストレージ、222…データキー記憶部、224…データキー暗号鍵記憶部、230…SE、232…復号部、234…マスターキー記憶部、240…RAM、242…データキー暗号鍵記憶部、300…通信部、310…制御部、312…認証部、314…復号部、316…暗号化部、320…記憶部、2120…対象情報生成部、2122…鍵取得部、2124…復号部、2126…暗号化部、2128…認証部、2140…鍵取得部、2142…第1の鍵生成部、2143…第2の鍵生成部、2144…復号部、2146…暗号化部、NW…ネットワーク 1... Communication system, 10... Server, 20... Device, 20A... IoT gateway, 20B... In-vehicle gateway, 30... IoT device, 40... Car, 50... In-vehicle device, 60... External device, 61... Cloud, 62... Server, 63...Traffic light equipment, 64...Bridge equipment, 65...Parking lot equipment, 100...Communication unit, 110...Control unit, 112...Authentication unit, 114...Decryption unit, 116...Encryption unit, 120...Storage unit, 200...Communication unit, 210...Control unit, 212...Key usage unit, 214...Key management unit, 220...Storage, 222...Data key storage unit, 224...Data key encryption key storage unit, 230...SE, 232...Decryption unit , 234... Master key storage section, 240... RAM, 242... Data key encryption key storage section, 300... Communication section, 310... Control section, 312... Authentication section, 314... Decryption section, 316... Encryption section, 320... Storage section, 2120...Target information generation section, 2122...Key acquisition section, 2124...Decryption section, 2126...Encryption section, 2128...Authentication section, 2140...Key acquisition section, 2142...First key generation section, 2143...Second key generation unit, 2144...decryption unit, 2146...encryption unit, NW...network

Claims (9)

耐タンパー性を有し、第1の暗号鍵を記憶するセキュアエレメントと、
前記第1の暗号鍵で暗号化された第2の暗号鍵と、前記第2の暗号鍵で暗号化された複数のデータキーとを記憶する第1の記憶装置と、
複数の通信対象と通信を行う通信部と、
前記複数の通信対象ごとに異なる対象情報に基づき、前記第2の暗号鍵と、前記複数の通信対象ごとに対応するデータキーとを、前記第1の記憶装置から取得する鍵取得部と、
前記鍵取得部によって取得された前記第2の暗号鍵を、前記第1の暗号鍵で復号する第1の復号部と、
前記鍵取得部によって取得された前記データキーを、前記第1の復号部によって復号された前記第2の暗号鍵で復号する第2の復号部と、
前記第2の復号部によって復号された前記データキーに基づき、前記複数の通信対象ごとに異なる第3の暗号鍵を生成する第1の鍵生成部と、
を有する、通信システム。
a secure element having tamper resistance and storing a first encryption key;
a first storage device that stores a second encryption key encrypted with the first encryption key and a plurality of data keys encrypted with the second encryption key;
a communication unit that communicates with multiple communication targets;
a key acquisition unit that acquires the second encryption key and a data key corresponding to each of the plurality of communication targets from the first storage device based on target information different for each of the plurality of communication targets;
a first decryption unit that decrypts the second encryption key acquired by the key acquisition unit with the first encryption key;
a second decryption unit that decrypts the data key acquired by the key acquisition unit using the second encryption key decrypted by the first decryption unit;
a first key generation unit that generates a third encryption key that is different for each of the plurality of communication targets based on the data key decrypted by the second decryption unit;
A communication system with
前記第1の鍵生成部は、鍵導出関数によって前記第3の暗号鍵を生成する、
請求項1に記載の通信システム。
the first key generation unit generates the third encryption key using a key derivation function;
The communication system according to claim 1.
前記第1の鍵生成部は、前記第2の復号部によって復号された前記データキーで前記対象情報を暗号化する前記鍵導出関数によって、前記第3の暗号鍵を生成する、
請求項2に記載の通信システム。
The first key generation unit generates the third encryption key using the key derivation function that encrypts the target information with the data key decrypted by the second decryption unit.
The communication system according to claim 2.
前記第1の鍵生成部は、前記対象情報と前記データキーの連結値にハッシュ関数を適用する前記鍵導出関数によって、前記第3の暗号鍵を生成する、
請求項2に記載の通信システム。
The first key generation unit generates the third encryption key using the key derivation function that applies a hash function to a concatenated value of the target information and the data key.
The communication system according to claim 2.
前記第1の復号部によって復号された前記第2の暗号鍵を記憶する第2の記憶装置、
をさらに有する、
請求項1から請求項4のいずれか1項に記載の通信システム。
a second storage device that stores the second encryption key decrypted by the first decryption unit;
further having,
The communication system according to any one of claims 1 to 4.
前記第1の復号部によって復号された前記第2の暗号鍵を、第4の暗号鍵で暗号化する暗号化部と、
前記第4の暗号鍵を生成する第2の鍵生成部と、
をさらに有し、
前記第2の記憶装置は、前記暗号化部によって前記第4の暗号鍵で暗号化された前記第2の暗号鍵を一時的に記憶する、
請求項5に記載の通信システム。
an encryption unit that encrypts the second encryption key decrypted by the first decryption unit with a fourth encryption key;
a second key generation unit that generates the fourth encryption key;
It further has
the second storage device temporarily stores the second encryption key encrypted with the fourth encryption key by the encryption unit;
The communication system according to claim 5.
前記通信対象との通信に基づき、前記通信部と通信を行った前記通信対象に対応する前記データキーを示す前記対象情報を生成する対象情報生成部、
をさらに有する、請求項1から請求項6のいずれか1項に記載の通信システム。
a target information generation unit that generates the target information indicating the data key corresponding to the communication target that communicated with the communication unit based on the communication with the communication target;
The communication system according to any one of claims 1 to 6, further comprising:
セキュアエレメントが、耐タンパー性を有し、第1の暗号鍵を記憶することと、
第1の記憶装置が、前記第1の暗号鍵で暗号化された第2の暗号鍵と、前記第2の暗号鍵で暗号化された複数のデータキーとを記憶することと、
通信部が、複数の通信対象と通信を行うことと、
鍵取得部が、前記複数の通信対象ごとに異なる対象情報に基づき、前記第2の暗号鍵と、前記複数の通信対象ごとに対応するデータキーとを、前記第1の記憶装置から取得することと、
第1の復号部が、前記鍵取得部によって取得された前記第2の暗号鍵を、前記第1の暗号鍵で復号することと、
第2の復号部が、前記鍵取得部によって取得された前記データキーを、前記第1の復号部によって復号された前記第2の暗号鍵で復号することと、
第1の鍵生成部が、前記第2の復号部によって復号された前記データキーに基づき、前記複数の通信対象ごとに異なる暗号鍵を生成することと、
を含む、通信方法。
the secure element has tamper resistance and stores the first encryption key;
a first storage device stores a second encryption key encrypted with the first encryption key and a plurality of data keys encrypted with the second encryption key;
The communication department communicates with multiple communication targets,
A key acquisition unit acquires the second encryption key and a data key corresponding to each of the plurality of communication targets from the first storage device based on target information different for each of the plurality of communication targets. and,
a first decryption unit decrypts the second encryption key acquired by the key acquisition unit with the first encryption key;
a second decryption unit decrypts the data key acquired by the key acquisition unit with the second encryption key decrypted by the first decryption unit;
a first key generation unit generates a different encryption key for each of the plurality of communication targets based on the data key decrypted by the second decryption unit;
methods of communication, including;
コンピュータを、
耐タンパー性を有し、第1の暗号鍵を記憶するセキュアエレメントと、
前記第1の暗号鍵で暗号化された第2の暗号鍵と、前記第2の暗号鍵で暗号化された複数のデータキーとを記憶する第1の記憶装置と、
複数の通信対象と通信を行う通信部と、
前記複数の通信対象ごとに異なる対象情報に基づき、前記第2の暗号鍵と、前記複数の通信対象ごとに対応するデータキーとを、前記第1の記憶装置から取得する鍵取得部と、
前記鍵取得部によって取得された前記第2の暗号鍵を、前記第1の暗号鍵で復号する第1の復号部と、
前記鍵取得部によって取得された前記データキーを、前記第1の復号部によって復号された前記第2の暗号鍵で復号する第2の復号部と、
前記第2の復号部によって復号された前記データキーに基づき、前記複数の通信対象ごとに異なる暗号鍵を生成する第1の鍵生成部と、
として機能させる、プログラム。
computer,
a secure element having tamper resistance and storing a first encryption key;
a first storage device that stores a second encryption key encrypted with the first encryption key and a plurality of data keys encrypted with the second encryption key;
a communication unit that communicates with multiple communication targets;
a key acquisition unit that acquires the second encryption key and a data key corresponding to each of the plurality of communication targets from the first storage device based on target information different for each of the plurality of communication targets;
a first decryption unit that decrypts the second encryption key acquired by the key acquisition unit with the first encryption key;
a second decryption unit that decrypts the data key acquired by the key acquisition unit using the second encryption key decrypted by the first decryption unit;
a first key generation unit that generates a different encryption key for each of the plurality of communication targets based on the data key decrypted by the second decryption unit;
A program that functions as
JP2020093117A 2020-05-28 2020-05-28 Communication system, communication method, and program Active JP7435263B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020093117A JP7435263B2 (en) 2020-05-28 2020-05-28 Communication system, communication method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020093117A JP7435263B2 (en) 2020-05-28 2020-05-28 Communication system, communication method, and program

Publications (2)

Publication Number Publication Date
JP2021190791A JP2021190791A (en) 2021-12-13
JP7435263B2 true JP7435263B2 (en) 2024-02-21

Family

ID=78847555

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020093117A Active JP7435263B2 (en) 2020-05-28 2020-05-28 Communication system, communication method, and program

Country Status (1)

Country Link
JP (1) JP7435263B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013106162A (en) 2011-11-11 2013-05-30 Toshiba Corp Storage media, host device, memory device, and system
JP2013145998A (en) 2012-01-16 2013-07-25 Toshiba Corp Storage medium, host device, memory device and system
JP2019220871A (en) 2018-06-21 2019-12-26 株式会社LIFULL Senior Information processing apparatus, information processing program, and information processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013106162A (en) 2011-11-11 2013-05-30 Toshiba Corp Storage media, host device, memory device, and system
JP2013145998A (en) 2012-01-16 2013-07-25 Toshiba Corp Storage medium, host device, memory device and system
JP2019220871A (en) 2018-06-21 2019-12-26 株式会社LIFULL Senior Information processing apparatus, information processing program, and information processing method

Also Published As

Publication number Publication date
JP2021190791A (en) 2021-12-13

Similar Documents

Publication Publication Date Title
US11032278B2 (en) System, method and apparatus for generating device identifier
JP6573627B2 (en) Service authorization using auxiliary devices
TWI740409B (en) Verification of identity using a secret key
US11943350B2 (en) Systems and methods for re-using cold storage keys
US7787661B2 (en) Method, system, personal security device and computer program product for cryptographically secured biometric authentication
KR102024339B1 (en) Memory system and binding method between the same and host
SE514105C2 (en) Secure distribution and protection of encryption key information
JP2004266360A (en) Authentication processor and security processing method
US11128455B2 (en) Data encryption method and system using device authentication key
US20240146525A1 (en) Batch Transfer of Control of Memory Devices over Computer Networks
US11423182B2 (en) Storage device providing function of securely discarding data and operating method thereof
JP7435263B2 (en) Communication system, communication method, and program
CN117041956A (en) Communication authentication method, device, computer equipment and storage medium
CN114208109A (en) Method for establishing secure data communication for a processing device, trust module for generating a cryptographic key, and field device
CN110912685A (en) Establishing a protected communication channel
JP2017108237A (en) System, terminal device, control method and program
US20160359620A1 (en) Method and system for remotely keyed encrypting/decrypting data with prior checking a token
US20220231858A1 (en) Control of Memory Devices over Computer Networks
US11005651B2 (en) Method and terminal for establishing security infrastructure and device
JP2022061275A (en) Licence managing method, license managing device and program
US11968296B2 (en) Utilization of a memory device for per-user encryption
US11677560B2 (en) Utilization of a memory device as security token
JP2023082434A (en) Electronic device, control method, and program
CN116527263A (en) System and method for post quantum trust provisioning and updating with incumbent cryptography

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230417

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20231227

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240122

R150 Certificate of patent or registration of utility model

Ref document number: 7435263

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150