JP2022079237A - Output device, management system, and method - Google Patents

Output device, management system, and method Download PDF

Info

Publication number
JP2022079237A
JP2022079237A JP2020190311A JP2020190311A JP2022079237A JP 2022079237 A JP2022079237 A JP 2022079237A JP 2020190311 A JP2020190311 A JP 2020190311A JP 2020190311 A JP2020190311 A JP 2020190311A JP 2022079237 A JP2022079237 A JP 2022079237A
Authority
JP
Japan
Prior art keywords
message
state information
hash value
private key
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2020190311A
Other languages
Japanese (ja)
Inventor
奏宙 末神
Sora Suegami
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.)
Fields Lab Co Ltd
Original Assignee
Fields Lab Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fields Lab Co Ltd filed Critical Fields Lab Co Ltd
Priority to JP2020190311A priority Critical patent/JP2022079237A/en
Publication of JP2022079237A publication Critical patent/JP2022079237A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

To detect leakage of private keys.SOLUTION: A device that outputs a program for making a device execute any one of the following steps of: acquiring any one of first state information and second state information; outputting any one of the first state information and the second state information; acquiring any one of third state information and fourth state information; outputting any one of the third state information and the fourth state information; acquiring any one of the first state information and the second state information and any one of the third state information and the fourth state information; and detecting unauthorized use of a first private key on the basis of the fourth state information, detecting unauthorized use of a second private key on the basis of the first state information, and detecting unauthorized use of a third private key on the basis of any one of the second state information and the third state information. Whether or not the third private key is illegally used is determined by interpreting that information indicated by the second state information is the same as information indicated by the third state information.SELECTED DRAWING: Figure 1

Description

本発明は、出力装置、管理システム及び方法に関する。 The present invention relates to output devices, management systems and methods.

期待するプログラムがデバイスの中で実行されていることを、遠隔の検証者に検証する方法として、リモートアテステーションがある。例えば、非特許文献1には、最小限のハードウェアと認証用ソフトウェア、デバイス埋め込みの秘密鍵で認証できるハイブリッドリモートアテステーションについて記載されている。 A remote attestation is a way to verify to a remote verifier that the expected program is running in the device. For example, Non-Patent Document 1 describes a hybrid remote attestation that can be authenticated with a minimum of hardware, authentication software, and a private key embedded in a device.

SMART: Secure and Minimal Architecture for (Establishing a Dynamic) Root of Trust, NDSS Symposium 2012.SMART: Secure and Minimal Architecture for (Establishing a Dynamic) Root of Trust, NDSS Symposium 2012.

しかしながら、従来のリモートアテステーションにおいては、秘密鍵を攻撃者に盗まれ、または装置の電源を遮断するといった攻撃を受けた場合、セキュリティを担保することが困難になる可能性がある。 However, in a conventional remote attestation station, if an attacker steals a private key or is attacked by shutting off the power of a device, it may be difficult to ensure security.

本発明は、上記した事情に鑑みてなされたもので、秘密鍵の不正利用ないし盗難又は装置の電源を遮断するといった攻撃を容易に検出し、セキュリティの担保を可能にする出力装置、管理システム及び方法を提供することを目的の一つとする。 The present invention has been made in view of the above circumstances, and is an output device, a management system, and an output device, a management system, and a management system that can easily detect an attack such as unauthorized use or theft of a private key or shut off the power of the device to ensure security. One of the purposes is to provide a method.

(1)本発明は上記の課題を解決するためになされたものであり、本発明の一態様に係る出力装置は、第2の装置 の状態を示す第1の状態情報及び第3の装置の状態を示す第2の状態情報の少なくともいずれかを取得するステップと、前記第1の状態情報及び前記第2の状態情報の少なくともいずれかを出力する第1出力ステップと、前記第3の装置 の状態を示す第3の状態情報及び第1の装置の状態を示す第4の状態情報の少なくともいずれかを取得するステップと、前記第3の状態情報及び前記第4の状態情報の少なくともいずれかを出力する第2出力ステップと、前記第1の装置 の状態を示す第5の状態情報及び前記第2の装置の状態を示す第6の状態情報の少なくともいずれかを取得するステップと、前記第5の状態情報及び前記第6の状態情報の少なくともいずれかを出力するステップと、前記第1出力ステップにおいて出力された前記第1の状態情報及び前記第2の状態情報の少なくともいずれか並びに前記第2出力ステップにおいて出力された前記第3の状態情報及び前記第4の状態情報の少なくともいずれかを取得するステップと、前記第4の状態情報に基づいて、前記第1の装置が発行する秘密鍵が不正利用されたかを判定し、前記第1の状態情報に基づいて、前記第2の装置が発行する秘密鍵が不正利用されたかを判定し、前記第2の状態情報及び前記第3の状態情報の少なくともいずれかに基づいて、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する第1判定ステップと、のいずれかを、ブロックチェーンを構成するコンピュータに実行させるためのプログラムを出力する装置 であって、前記第1判定ステップにおいて、前記第2の状態情報が示す情報は前記第3の状態情報が示す情報と同一であると解釈することにより、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する。 (1) The present invention has been made to solve the above-mentioned problems, and the output device according to one aspect of the present invention includes the first state information indicating the state of the second device and the third device. A step of acquiring at least one of the second state information indicating a state, a first output step of outputting at least one of the first state information and the second state information, and the third device. A step of acquiring at least one of a third state information indicating a state and a fourth state information indicating the state of the first device, and at least one of the third state information and the fourth state information. A second output step for output, a step for acquiring at least one of a fifth state information indicating the state of the first device and a sixth state information indicating the state of the second device, and the fifth state. At least one of the first state information and the second state information output in the first output step, and at least one of the second state information and the second. The secret key issued by the first device based on the step of acquiring at least one of the third state information and the fourth state information output in the output step and the fourth state information is It is determined whether or not the private key issued by the second device has been illegally used based on the first state information, and the second state information and the third state information are determined. To make the computer constituting the blockchain execute one of the first determination step of determining whether or not the private key issued by the third device has been illegally used based on at least one of the above. A device that outputs a program, and by interpreting that the information indicated by the second state information is the same as the information indicated by the third state information in the first determination step, the third device. Determines whether the private key issued by is used illegally.

(2)上記(1)の態様において、前記第1の状態情報、前記第2の状態情報、前記第3の状態情報及び前記第4の状態情報の各々は、第1の値又は第2の値を含み、前記第1の値 は、前記第1の装置、前記第2の装置又は前記第3の装置の電源が所定の期間において遮断されていないかつネットワークとの接続を維持していると判断されていることを示し、前記第2の値 は、前記第1の装置、前記第2の装置又は前記第3の装置が前記所定の期間において遮断されているまたはネットワークから切断されていると判断されていることを示し、前記第1判定ステップにおいて、前記第2の状態情報に含まれる第1の値又は第2の値と、前記第3の状態情報に含まれる第1の値又は第2の値と、を用いた演算を行うことにより、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する。 (2) In the embodiment of (1) above, each of the first state information, the second state information, the third state information, and the fourth state information is a first value or a second. Including the value, the first value indicates that the power supply of the first device, the second device, or the third device has not been cut off for a predetermined period and the connection with the network is maintained. The second value indicates that the first device, the second device, or the third device has been shut down or disconnected from the network during the predetermined period. It indicates that the determination has been made, and in the first determination step, the first value or the second value included in the second state information and the first value or the second value included in the third state information. By performing an operation using the value of 2 and, it is determined whether or not the private key issued by the third device has been illegally used.

(3)上記(2)の態様において、時刻に関する第1の時刻情報又は所定の検証プロセスの周期を示す第1のインデックスと、第1の秘密鍵に対応する第1の公開鍵又は前記第1の公開鍵の生成に用いられる値 と、を含む第1のメッセージと、前記第1のメッセージについての第1のハッシュ値に対して第2の秘密鍵 を用いることにより生成された第1の電子署名と、を取得するステップと、前記第1のメッセージ及び前記第1の電子署名を出力するステップと、前記第1のメッセージ、前記第1の電子署名、第2のメッセージ及び第2の電子署名を取得するステップと、前記第1の時刻情報又は前記第1のインデックスと、前記第1のメッセージ又は前記第2のメッセージを取得する際に、前記第1のメッセージ及び前記第1の電子署名と、前記第2のメッセージ および前記第2の電子署名 と、のいずれかを取得済みであることと、の少なくともいずれかに基づいて、前記第2の秘密鍵が不正利用されたことを判定するステップと、前記第2のメッセージは、前記第1の公開鍵又は前記第1の公開鍵の生成に用いられる値を少なくとも含み、前記第2の電子署名は、前記第2のメッセージ及び前記第2の秘密鍵に基づいて生成され、前記第1の秘密鍵は前記第2の秘密鍵と異なる。 (3) In the embodiment of (2) above, the first index indicating the first time information regarding the time or the period of the predetermined verification process, and the first public key corresponding to the first private key or the first one. A first message containing a value used to generate the public key of, and a first electron generated by using a second private key for the first hash value for the first message. The step of acquiring the signature, the step of outputting the first message and the first electronic signature, and the first message, the first electronic signature, the second message, and the second electronic signature. And the first time information or the first index, and the first message and the first electronic signature when acquiring the first message or the second message. , The step of determining that the second private key has been misused based on at least one of the second message and the second electronic signature that has been obtained. And the second message includes at least the value used to generate the first public key or the first public key, and the second digital signature is the second message and the second. Generated based on the private key, the first private key is different from the second private key.

(4)上記(3)の態様において、周期n-1において、前記第1のメッセージと、前記第1の電子署名とを取得するステップと、周期nにおいて、時刻に関する第2の時刻情報又は周期nに対応する第2のインデックスと、第3の秘密鍵に対応する第3の公開鍵又は前記第3の公開鍵の生成に用いられる値と、を含む第3のメッセージと、前記第3のメッセージについてのハッシュ値に対して前記第1の秘密鍵を用いることにより生成された第3の電子署名と、を取得するステップと、を有し、nは整数であり、前記第3の秘密鍵は前記第1の秘密鍵及び前記第2の秘密鍵と異なる。 (4) In the embodiment of the above (3), in the cycle n-1, the step of acquiring the first message and the first electronic signature, and in the cycle n, the second time information or cycle relating to the time. A third message containing a second index corresponding to n, a third public key corresponding to the third private key, or a value used to generate the third public key, and the third. It has a third digital signature generated by using the first private key for the hash value of the message, and has a step of acquiring, where n is an integer and the third private key. Is different from the first private key and the second private key.

(5)上記(4)の態様において、前記第1のメッセージは、周期n-2におけるメッセージのハッシュ値をさらに含み、前記第3のメッセージは、前記第1のメッセージのハッシュ値をさらに含む。 (5) In the aspect of (4) above, the first message further includes the hash value of the message in the period n-2, and the third message further includes the hash value of the first message.

(6)上記(3)から(5)のいずれかの態様において、時刻に関する第4の時刻情報と、第4の秘密鍵に対応する第4の公開鍵又は前記第4の公開鍵の生成に用いられる値 と、を含む第4のメッセージと、前記第4のメッセージについての第4のハッシュ値に対して第5の秘密鍵を用いることにより生成された第4の電子署名 と、を出力するステップと、 前記第4のメッセージ及び前記第4の電子署名を取得するステップと、 前記第3の装置の電源が遮断されていない場合、前記第4の公開鍵、前記第4のハッシュ値及び前記第4の電子署名を取得するステップと、前記第4の電子署名が前記第5の秘密鍵によって前記第4のハッシュ値に対して署名されていると判定した場合、前記第4のハッシュ値を第5のハッシュ値として前記第1のメッセージに含め、前記第1のメッセージを出力するステップと、前記第1のメッセージに前記第5のハッシュ値が含まれない場合又は前記第4のメッセージに含まれる第4のハッシュ値が前記第5のハッシュ値と異なる場合、前記第3の装置の電源が遮断されていると判定するステップと、を有し、前記第1のメッセージは前記第3の状態情報を含み、前記第4の秘密鍵は前記第5の秘密鍵と異なる。 (6) In any of the above (3) to (5) aspects, for generating the fourth time information regarding the time and the fourth public key corresponding to the fourth private key or the fourth public key. Outputs a fourth message containing the values used, and a fourth digital signature generated by using the fifth private key for the fourth hash value for the fourth message. The step, the step of acquiring the fourth message and the fourth digital signature, and the fourth public key, the fourth hash value, and the fourth hash value when the power of the third device is not cut off. If it is determined that the step of acquiring the fourth digital signature and the fourth digital signature are signed with respect to the fourth hash value by the fifth private key, the fourth hash value is used. The step of including the first message as the fifth hash value and outputting the first message, and the case where the first message does not include the fifth hash value or is included in the fourth message. When the fourth hash value is different from the fifth hash value, it has a step of determining that the power of the third device is cut off, and the first message is the third state. The fourth private key contains information and is different from the fifth private key.

(7)上記(3)から(5)のいずれかの態様において、第3の装置のモニタの開始を示すことを示す情報及び前記第2の公開鍵を前記第3の装置に出力するステップと、時刻に関する第6の時刻情報又は所定の検証プロセスの周期を示す第6のインデックスと、第7のメッセージに含まれる第7の公開鍵又は前記第7の公開鍵の生成に用いられる値と、前記第7のメッセージのハッシュ値とを含む第6のメッセージを生成するステップと、前記第7の公開鍵に対応する第7の秘密鍵を用いて前記第6のメッセージに対する第6の電子署名を生成するステップと、前記第7の秘密鍵及び前記第2の公開鍵を用いて前記第2の装置及び前記第3の装置の共通鍵である第1の共通鍵を生成し、前記第6のメッセージに対する第6のハッシュ値及び第1の共通鍵を用いて第1のメッセージ認証符号を生成するステップと、前記第6のメッセージ及び前記第6の電子署名を前記第1の装置、前記第2の装置及び前記第3の装置のいずれかに出力するステップと、第6のハッシュ値及び第1のメッセージ認証符号のいずれかを前記第3の装置から取得しなかった場合、前記第3の装置をモニタした装置であることを示す第1の情報を生成するステップと、前記第6のハッシュ値及び第1のメッセージ認証符号前記第3の装置からを取得し、前記第7の公開鍵を取得するステップと、前記第2の秘密鍵及び前記第7の公開鍵を用いて第2の共通鍵を生成するステップと、前記第6のハッシュ値及び前記第2の共通鍵を用いて第2のメッセージ認証符号を生成するステップと、前記第1のメッセージ認証符号が前記第2のメッセージ認証符号と等しい場合、前記第6のハッシュ値が前記第3の装置から送信されたことを示す第2の情報を生成するステップと、前記第1のメッセージ認証符号が前記第2のメッセージ認証符号と等しくない場合、前記第3の装置をモニタした装置であることを示す第1の情報を生成するステップと、前記第1の情報又は前記第2の情報を出力するするステップと、前記第6のメッセージ及び前記第6の電子署名を所定数以上の前記第1の装置、前記第2の装置、前記第3の装置及び前記出力装置以外の他の装置から取得しなかった場合、前記第1の情報を生成するするステップと、所定数以上の他の装置から取得した前記第6のメッセージを基に生成したハッシュ値と、前記第3の装置から取得した第6のハッシュ値とが等しいことと、前記第6の電子署名が、前記第6のハッシュ値に対して前記第7の秘密鍵を用いて生成されていたこととがいずれも満たされた場合、前記第6のハッシュ値に対して前記第1の秘密鍵を用いてモニタに関する第1の電子署名を生成し、前記モニタに関する第1の電子署名を前記他の装置に出力するステップと、所定数以上の他の装置から取得した前記第6のメッセージを基に生成したハッシュ値と、前記第3の装置から取得した第6のハッシュ値とが等しいことと、前記第6の電子署名が、前記第6のハッシュ値に対して前記第7の秘密鍵を用いて生成されていたこととのいずれかが満たされなかった場合、前記第1の情報を生成するステップと、前記第1の情報を出力するするステップと、前記モニタに関する第1の電子署名を取得するステップと、前記モニタに関する第1の電子署名が、前記第1の秘密鍵を用いて前記第6のハッシュ値に対して作成された署名であることを確認した場合、前記第1の値を生成するステップと、前記モニタに関する第1の電子署名が、前記第1の秘密鍵を用いて前記第6のハッシュ値に対して作成された署名であることを確認できなかった場合、前記第2の値を生成するステップと、前記第1の値又は前記第2の値を出力するするステップと、を含む。 (7) In any of the above (3) to (5) embodiments, the step of outputting the information indicating the start of monitoring of the third device and the second public key to the third device. , A sixth index indicating the sixth time information about the time or the period of the predetermined verification process, and the value used to generate the seventh public key or the seventh public key contained in the seventh message. A step of generating a sixth message including the hash value of the seventh message, and a sixth electronic signature for the sixth message using the seventh private key corresponding to the seventh public key. Using the generated step and the seventh private key and the second public key, the first common key, which is the common key of the second device and the third device, is generated, and the sixth device is generated. A step of generating a first message authentication code using a sixth hash value for a message and a first common key, and the sixth message and the sixth electronic signature being applied to the first device, the second device. If one of the sixth hash value and the first message authentication code is not obtained from the third device, the step of outputting to the device and any of the third device, the third device. The step of generating the first information indicating that the device is a monitored device, the sixth hash value and the first message authentication code are acquired from the third device, and the seventh public key is acquired. Steps to generate a second common key using the second private key and the seventh public key, and a second using the sixth hash value and the second common key. A second step of generating a message authentication code and a second indicating that the sixth hash value has been transmitted from the third device if the first message authentication code is equal to the second message authentication code. A step of generating information and a step of generating first information indicating that the device monitors the third device when the first message authentication code is not equal to the second message authentication code. , The first device, the second device, the second device, the step of outputting the first information or the second information, and a predetermined number or more of the sixth message and the sixth electronic signature. When not acquired from the device 3 and other devices other than the output device, it is generated based on the step of generating the first information and the sixth message acquired from a predetermined number or more of other devices. Hash value and the sixth c obtained from the third device. If both the equality of the hash value and the fact that the sixth digital signature was generated using the seventh private key for the sixth hash value are satisfied, the third. A step of generating a first digital signature for a monitor using the first private key for a hash value of 6 and outputting the first digital signature for the monitor to the other device, and a predetermined number or more. The hash value generated based on the sixth message obtained from another device is equal to the sixth hash value obtained from the third device, and the sixth electronic signature is the sixth. If any of the hash values generated using the seventh private key is not satisfied, the step of generating the first information and the first information are output. A step, a step of acquiring a first digital signature relating to the monitor, and a signature created by the first digital signature relating to the monitor for the sixth hash value using the first private key. If so, the step of generating the first value and the first digital signature for the monitor were created for the sixth hash value using the first private key. If the signature cannot be confirmed, the step of generating the second value and the step of outputting the first value or the second value are included.

(8)本発明の一態様に係る管理システムは、少なくとも第1の装置、第2の装置、第3の装置 及び第4の装置 を備える管理システムであって、前記第1の装置は、前記第2の装置の状態を示す第1の状態情報及び前記第3の装置の状態を示す第2の状態情報の少なくともいずれかを取得する第1取得部と、前記第1の状態情報及び前記第2の状態情報の少なくともいずれかを出力する第1通信部と、を備え、前記第2の装置は、前記第3の装置の状態を示す第3の状態情報及び前記第1の装置の状態を示す第4の状態情報の少なくともいずれかを取得する第2取得部と、第2処理部と、前記第3の状態情報及び前記第4の状態情報の少なくともいずれかを出力する第2通信部と、を備え、前記第3の装置は、前記第1の装置の状態を示す第5の状態情報及び前記第2の装置の状態を示す第6の状態情報の少なくともいずれかを取得する第3取得部と、第3処理部と、前記第5の状態情報及び前記第6の状態情報の少なくともいずれかを出力する第3通信部と、を備え、前記第4の装置は、前記第1通信部が出力した前記第1の状態情報及び前記第2の状態情報の少なくともいずれか並びに前記第2通信部が出力した前記第3の状態情報及び前記第4の状態情報の少なくともいずれかを取得する第4取得部と、第4処理部と、前記第4の状態情報に基づいて、前記第1の装置が発行する秘密鍵が不正利用されたかを判定し、前記第1の状態情報に基づいて、前記第2の装置が発行する秘密鍵が不正利用されたかを判定し、前記第2の状態情報及び前記第3の状態情報の少なくともいずれかに基づいて、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する第4判定部と、第4通信部と、を備え、前記第4判定部は、前記第2の状態情報が示す情報は前記第3の状態情報が示す情報と同一であると解釈することにより、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する。 (8) The management system according to one aspect of the present invention is a management system including at least a first device, a second device, a third device, and a fourth device, and the first device is the above-mentioned first device. A first acquisition unit that acquires at least one of a first state information indicating the state of the second device and a second state information indicating the state of the third device, the first state information, and the first state information. A first communication unit that outputs at least one of the two state information is provided, and the second device displays a third state information indicating the state of the third device and the state of the first device. A second acquisition unit that acquires at least one of the fourth state information shown, a second processing unit, and a second communication unit that outputs at least one of the third state information and the fourth state information. , And the third device acquires at least one of a fifth state information indicating the state of the first device and a sixth state information indicating the state of the second device. A unit, a third processing unit, and a third communication unit that outputs at least one of the fifth state information and the sixth state information are provided, and the fourth device is the first communication unit. Acquires at least one of the first state information and the second state information output by the second communication unit, and at least one of the third state information and the fourth state information output by the second communication unit. 4 Based on the acquisition unit, the fourth processing unit, and the fourth state information, it is determined whether the private key issued by the first device has been illegally used, and based on the first state information, it is determined. It is determined whether the private key issued by the second device has been illegally used, and the private key issued by the third device is based on at least one of the second state information and the third state information. The fourth determination unit includes a fourth determination unit and a fourth communication unit for determining whether or not the information has been abused, and the information indicated by the second status information is indicated by the third status information. By interpreting it as the same as the information, it is determined whether or not the private key issued by the third device has been illegally used.

(9)上記(8)の態様において、前記第1の状態情報、前記第2の状態情報、前記第3の状態情報及び前記第4の状態情報の各々は、第1の値又は第2の値を含み、前記第1の値 は、前記第1の装置、前記第2の装置又は前記第3の装置の電源が所定の期間において遮断されていないかつネットワークとの接続を維持していると判断されていることを示し、前記第2の値 は、前記第1の装置、前記第2の装置又は前記第3の装置が前記所定の期間において遮断されているまたはネットワークから切断されていると判断されていることを示し、前記第4判定部は、前記第2の状態情報に含まれる前記第1の値又は前記第2の値と、前記第3の状態情報に含まれる前記第1の値又は前記第2の値と、を用いた演算を行うことにより、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する。 (9) In the embodiment of (8) above, each of the first state information, the second state information, the third state information, and the fourth state information is the first value or the second. Including the value, the first value indicates that the power supply of the first device, the second device, or the third device has not been cut off for a predetermined period and the connection with the network is maintained. The second value indicates that the first device, the second device, or the third device has been shut down or disconnected from the network during the predetermined period. The fourth determination unit indicates that the determination is made, the first value or the second value included in the second state information, and the first value included in the third state information. By performing an operation using the value or the second value, it is determined whether or not the private key issued by the third device has been illegally used.

(10)上記(8)又は(9)の態様において、前記第1取得部、前記第2取得部又は前記第3取得部は、時刻に関する第1の時刻情報又は所定の検証プロセスの周期を示す第1のインデックスと、第1の秘密鍵に対応する第1の公開鍵又は前記第1の公開鍵の生成に用いられる値 と、を含む第1のメッセージと、前記第1のメッセージについての第1のハッシュ値に対して第2のしめきr用いることにより生成された第1の電子署名と、を取得し、前記第1通信部、前記第2通信部又は前記第3通信部は、前記第1のメッセージ、前記第1の電子署名を出力し、前記第4取得部は、前記第1のメッセージ、前記第1の電子署名、第2のメッセージ及び第2の電子署名を取得し、前記第1の時刻情報又は前記第1のインデックスと、前記第1取得部が前記第1のメッセージ又は前記第2のメッセージを取得する際に、前記第1のメッセージ及び前記第1の電子署名と、前記第2のメッセージ及び前記第2の電子署名と、のいずれかを前記第2取得部が取得済みであることと、の少なくともいずれかに基づいて、前記第2の秘密鍵が不正利用されたことを前記第4判定部は判定し、前記第2の電子署名は、前記第2のメッセージ及び前記第2の秘密鍵に基づいて生成され、前記第2のメッセージは、前記第1の公開鍵又は前記第1の公開鍵の生成に用いられる値を少なくとも含み、前記第1の秘密鍵は前記第2の秘密鍵と異なる。 (10) In the embodiment (8) or (9), the first acquisition unit, the second acquisition unit, or the third acquisition unit indicates the first time information regarding the time or the cycle of a predetermined verification process. A first message containing a first index and a value used to generate the first public key corresponding to the first private key or the first public key, and a first about the first message. The first electronic signature generated by using the second squeeze r for the hash value of 1 is acquired, and the first communication unit, the second communication unit, or the third communication unit is the first communication unit. The message 1 and the first electronic signature are output, and the fourth acquisition unit acquires the first message, the first electronic signature, the second message and the second electronic signature, and the first electronic signature is obtained. 1 time information or the 1st index, and when the 1st acquisition unit acquires the 1st message or the 2nd message, the 1st message and the 1st electronic signature and the said The second private key has been misused based on at least one of the second message and the second electronic signature that the second acquisition unit has already acquired. The fourth determination unit determines, the second electronic signature is generated based on the second message and the second private key, and the second message is the first public key or the first public key. The first private key is different from the second private key, including at least the value used to generate the first public key.

(11)上記(10)の態様において、前記第1取得部、前記第2取得部又は前記第3取得部は、周期n-1において、前記第1のメッセージと、前記第1の電子署名とを取得し、周期nにおいて、時刻に関する第2の時刻情報又は周期nに対応する第2のインデックスと、第3の秘密鍵に対応する第3の公開鍵又は前記第3の公開鍵の生成に用いられる値と、を含む第3のメッセージと、前記第3のメッセージについてのハッシュ値に対して前記第1の秘密鍵を用いることにより生成された第3の電子署名と、を取得し、nは整数であり、前記第3の秘密鍵は前記第1の秘密鍵及び前記第2の秘密鍵と異なる。 (11) In the embodiment (10), the first acquisition unit, the second acquisition unit, or the third acquisition unit has the first message and the first electronic signature in the cycle n-1. To generate the second time information about the time or the second index corresponding to the cycle n and the third public key corresponding to the third private key or the third public key in the cycle n. A third message containing the value used, and a third digital signature generated by using the first private key for the hash value for the third message are obtained and n Is an integer, and the third secret key is different from the first secret key and the second secret key.

(12)上記(11)の態様において、前記第1のメッセージは、周期n-2におけるメッセージのハッシュ値をさらに含み、前記第3のメッセージは、前記第1のメッセージのハッシュ値をさらに含む。 (12) In the aspect of (11) above, the first message further includes the hash value of the message in the period n-2, and the third message further includes the hash value of the first message.

(13)上記(10)から(12)のいずれかの態様において、前記第3通信部は、時刻に関する第4の時刻情報と、第4の秘密鍵に対応する第4の公開鍵又は前記第4の公開鍵の生成に用いられる値と、を含む第4のメッセージと、前記第4のメッセージについての第4のハッシュ値に対して第5の秘密鍵を用いることにより生成された第4の電子署名と、を出力し、前記第4取得部は、前記第4のメッセージ及び前記第4の電子署名を取得し、前記第3の装置の電源が遮断されていない場合、前記第2取得部は、前記第4の公開鍵、前記第4のハッシュ値及び前記第4の電子署名を取得し、前記第4の電子署名が前記第5の秘密鍵によって前記第4のハッシュ値に対して署名されている場合、前記第2通信部は、前記第4のハッシュ値を第5のハッシュ値として前記第1のメッセージに含め、前記第1のメッセージを出力し、前記第1のメッセージに前記第5のハッシュ値が含まれない場合又は前記第4のメッセージに含まれる第4のハッシュ値が前記第5のハッシュ値と異なる場合、前記第4判定部は、前記第3の装置の電源が遮断されていると判定し、前記第1のメッセージは前記第3の状態情報を含み、前記第4の秘密鍵は前記第5の秘密鍵と異なる。 (13) In any of the above (10) to (12) aspects, the third communication unit has the fourth time information regarding the time and the fourth public key corresponding to the fourth private key, or the first. A fourth message containing the value used to generate the public key of 4, and a fourth message generated by using the fifth private key for the fourth hash value for the fourth message. The electronic signature is output, and the fourth acquisition unit acquires the fourth message and the fourth electronic signature, and when the power of the third device is not cut off, the second acquisition unit. Acquires the fourth public key, the fourth hash value, and the fourth electronic signature, and the fourth electronic signature signs the fourth hash value with the fifth private key. If so, the second communication unit includes the fourth hash value as the fifth hash value in the first message, outputs the first message, and includes the first message in the first message. If the hash value of 5 is not included, or if the fourth hash value included in the fourth message is different from the fifth hash value, the power of the third device is cut off in the fourth determination unit. The first message includes the third state information, and the fourth secret key is different from the fifth secret key.

(14)上記(10)から(12)のいずれかの態様において、前記第2通信部は、第3の装置のモニタの開始を示すことを示す情報及び前記第2の公開鍵を前記第3の装置に出力し、前記第3処理部は、時刻に関する第6の時刻情報又は所定の検証プロセスの周期を示す第6のインデックスと、第7のメッセージに含まれる第7の公開鍵又は前記第7の公開鍵の生成に用いられる値と、前記第7のメッセージのハッシュ値とを含む第6のメッセージを生成し、前記第7の公開鍵に対応する第7の秘密鍵を用いて前記第6のメッセージに対する第6の電子署名を生成し、前記第7の秘密鍵及び前記第2の公開鍵を用いて前記第2の装置及び前記第3の装置の共通鍵である第1の共通鍵を生成し、前記第6のメッセージに対する第6のハッシュ値及び第1の共通鍵を用いて第1のメッセージ認証符号を生成し、前記第3通信部は、前記第6のメッセージ及び前記第6の電子署名を前記第1の装置、前記第2の装置、前記第3の装置及び前記第4の装置以外の他の装置と、前記第4の装置とのいずれかに出力し、前記第2取得部が第6のハッシュ値及び第1のメッセージ認証符号のいずれかを前記第3の装置から取得しなかった場合、前記第2処理部は、前記第3の装置をモニタした装置であることを示す第1の情報を生成し、前記第2通信部は、前記第1の情報を出力する。 (14) In any one of the above (10) to (12), the second communication unit obtains the information indicating the start of monitoring of the third device and the second public key. The third processing unit outputs to the device of the above, and the third processing unit has a sixth index indicating the sixth time information about the time or the cycle of a predetermined verification process, and the seventh public key included in the seventh message or the third. A sixth message containing the value used to generate the public key of 7 and the hash value of the seventh message is generated, and the seventh private key corresponding to the seventh public key is used to generate the seventh message. A first common key that is a common key of the second device and the third device by generating a sixth electronic signature for the message of 6 and using the seventh private key and the second public key. Is generated, the first message authentication code is generated using the sixth hash value for the sixth message and the first common key, and the third communication unit generates the sixth message and the sixth. Electronic signature is output to any of the first device, the second device, the third device, a device other than the fourth device, and the fourth device, and the second device. If the acquisition unit does not acquire either the sixth hash value or the first message authentication code from the third device, the second processing unit shall be the device that monitors the third device. The first information indicating the above is generated, and the second communication unit outputs the first information.

(15)上記(14)の態様において、前記第2取得部は、前記第6のハッシュ値及び第1のメッセージ認証符号を前記第3の装置から取得し、前記第7の公開鍵、を取得し、前記第2処理部は、前記第2の秘密鍵及び前記第7の公開鍵を用いて第2の共通鍵を生成し、前記第6のハッシュ値及び前記第2の共通鍵を用いて第2のメッセージ認証符号を生成し、前記第1のメッセージ認証符号が前記第2のメッセージ認証符号と等しい場合、前記第6のハッシュ値が前記第3の装置から送信されたことを示す第2の情報を生成し、前記第1のメッセージ認証符号が前記第2のメッセージ認証符号と等しくない場合、前記第3の装置をモニタした装置であることを示す第1の情報を生成し、第2通信部は、前記第1の情報又は前記第2の情報を出力する。 (15) In the embodiment (14), the second acquisition unit acquires the sixth hash value and the first message authentication code from the third device, and acquires the seventh public key. Then, the second processing unit generates a second common key using the second private key and the seventh public key, and uses the sixth hash value and the second common key. A second message authentication code is generated, and when the first message authentication code is equal to the second message authentication code, a second indicating that the sixth hash value has been transmitted from the third device. If the first message authentication code is not equal to the second message authentication code, the first information indicating that the device is a monitored device of the third device is generated, and the second information is generated. The communication unit outputs the first information or the second information.

(16)上記(14)の態様において、前記第2取得部が前記第6のメッセージ及び前記第6の電子署名を所定数以上の前記他の装置と、前記第4の装置とのいずれかから取得しなかった場合、前記第2処理部は前記第1の情報を生成する。 (16) In the embodiment of the above (14), the second acquisition unit receives the sixth message and the sixth electronic signature from any of the other devices having a predetermined number or more and the fourth device. If not acquired, the second processing unit generates the first information.

(17)上記(16)の態様において、第2取得部が所定数以上の他の装置と、前記第4の装置とのいずれかから取得した前記第6のメッセージを基に生成したハッシュ値と、前記第3の装置から取得した第6のハッシュ値とが等しいことと、前記第6の電子署名が、前記第6のハッシュ値に対して前記第7の秘密鍵を用いて生成されていたこととがいずれも満たされた場合、前記第2処理部は、前記第6のハッシュ値に対して前記第1の秘密鍵を用いてモニタに関する第1の電子署名を生成し、前記第2通信部は前記モニタに関する第1の電子署名を前記他の装置又は前記第4の装置に出力し、第2取得部が所定数以上の他の装置と、前記第4の装置とのいずれかから取得した前記第6のメッセージを基に生成したハッシュ値と、前記第3の装置から取得した第6のハッシュ値とが等しいことと、前記第6の電子署名が、前記第6のハッシュ値に対して前記第7の秘密鍵を用いて生成されていたこととのいずれかが満たされなかった場合、前記第2処理部は、前記第1の情報を生成し、前記第2通信部は前記第1の情報を出力する。 (17) In the embodiment of (16) above, the hash value generated by the second acquisition unit based on the sixth message acquired from any of the predetermined number or more of other devices and the fourth device. , The sixth hash value obtained from the third device is equal, and the sixth digital signature is generated with respect to the sixth hash value using the seventh private key. When all of the above are satisfied, the second processing unit generates a first electronic signature regarding the monitor using the first private key for the sixth hash value, and the second communication. The unit outputs the first electronic signature relating to the monitor to the other device or the fourth device, and the second acquisition unit acquires from either a predetermined number or more of other devices and the fourth device. The hash value generated based on the sixth message is equal to the sixth hash value obtained from the third device, and the sixth digital signature is attached to the sixth hash value. If any of the items generated using the seventh private key is not satisfied, the second processing unit generates the first information, and the second communication unit generates the first information. Output the information of 1.

(18)上記(17)の態様において、前記第4取得部は、前記モニタに関する第1の電子署名を取得し、前記モニタに関する第1の電子署名が、前記第1の秘密鍵を用いて前記第6のハッシュ値に対して作成された署名であることを前記第4判定部が確認した場合、前記第4処理部は、前記第1の値を生成し、前記モニタに関する第1の電子署名が、前記第1の秘密鍵を用いて前記第6のハッシュ値に対して作成された署名であることを前記第4判定部が確認できなかった場合、前記第4処理部は、前記第2の値を生成し、前記第4通信部は、前記第1の値又は前記第2の値を出力する。 (18) In the aspect of (17) above, the fourth acquisition unit acquires the first electronic signature relating to the monitor, and the first electronic signature relating to the monitor uses the first private key to obtain the first electronic signature. When the fourth determination unit confirms that the signature is created for the sixth hash value, the fourth processing unit generates the first value and the first electronic signature relating to the monitor. However, when the fourth determination unit cannot confirm that the signature is created for the sixth hash value using the first secret key, the fourth processing unit may use the second processing unit. The fourth communication unit outputs the first value or the second value.

(19)上記(14)から(18)のいずれかの態様において、前記第2通信部は、第8の公開鍵を求める公開鍵要求リクエストを第5の装置に出力し、前記第8の公開鍵又は前記第8の公開鍵の生成に用いられる値を含む第8のメッセージと、モニタに関する第2の電子署名とを前記第5の装置から受信し、前記モニタに関する第2の電子署名は、前記第8のメッセージのハッシュ値に対して第6の秘密鍵によって生成され、前記第6の秘密鍵に対応する第6の公開鍵又は前記第6の公開鍵の生成に用いられる値は前記第6のメッセージに含まれ、前記第8のメッセージと、前記モニタに関する第2の電子署名とのいずれかを前記第2通信部が受信しなかった場合、前記第2処理部は、前記第3の装置の電源が遮断されている遮断され又はネットワークから切断されていると判断し、前記第8のメッセージと、前記モニタに関する第2の電子署名とを前記第2通信部が受信し、前記モニタに関する第2の電子署名が、前記第6の公開鍵に対応する第6の秘密鍵を用いて前記第8のメッセージのハッシュ値に対して生成されたものである場合、前記第2処理部は、前記第8の公開鍵が真正であると判断する。 (19) In any of the above (14) to (18) embodiments, the second communication unit outputs a public key request request for the eighth public key to the fifth device, and the eighth public key is disclosed. An eighth message containing a key or a value used to generate the eighth public key and a second digital signature relating to the monitor are received from the fifth device, the second digital signature relating to the monitor. The value generated by the sixth private key with respect to the hash value of the eighth message and used to generate the sixth public key corresponding to the sixth private key or the sixth public key is the sixth. If the second communication unit does not receive either the eighth message and the second electronic signature relating to the monitor included in the message 6, the second processing unit may use the third processing unit. It is determined that the power of the device is cut off or disconnected from the network, and the second communication unit receives the eighth message and the second electronic signature relating to the monitor, and the monitor relates to the second electronic signature. When the second digital signature is generated for the hash value of the eighth message by using the sixth private key corresponding to the sixth public key, the second processing unit shall: It is determined that the eighth public key is genuine.

(20)本発明の一態様に係る方法は、少なくとも第1の装置、第2の装置、第3の装置及び第4の装置を備える管理システムにおいて用いられる方法であって、前記第1の装置が、前記第2の装置の状態を示す第1の状態情報及び第3の装置の状態を示す第2の状態情報の少なくともいずれかを取得する第1取得ステップと、前記第1の状態情報及び前記第2の状態情報の少なくともいずれかを出力する第1出力ステップと、前記第2の装置が、前記第3の装置の状態を示す第3の状態情報及び第1の装置の状態を示す第4の状態情報の少なくともいずれかを取得する第2取得ステップと、前記第3の状態情報及び前記第4の状態情報の少なくともいずれかを出力する第2出力ステップと、前記第3の装置が、前記第1の装置の状態を示す第5の状態情報及び前記第2の装置の状態を示す第6の状態情報の少なくともいずれかを取得する第3取得ステップと、前記第5の状態情報及び前記第6の状態情報の少なくともいずれかを出力する第3出力ステップと、前記第4の装置が、前記第1出力ステップにおいて出力された前記第1の状態情報及び前記第2の状態情報の少なくともいずれか並びに前記第2出力ステップにおいて出力された前記第3の状態情報及び前記第4の状態情報の少なくともいずれかを取得する第4取得ステップと、前記第4の状態情報に基づいて、前記第1の装置が発行する秘密鍵が不正利用されたかを判定し、前記第1の状態情報に基づいて、前記第2の装置が発行する秘密鍵が不正利用されたかを判定し、前記第2の状態情報及び前記第3の状態情報の少なくともいずれかに基づいて、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する第1判定ステップと、を有し、前記第1判定ステップにおいて、前記第2の状態情報が示す情報は前記第3の状態情報が示す情報と同一であると解釈することにより、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する。 (20) The method according to one aspect of the present invention is a method used in a management system including at least a first device, a second device, a third device, and a fourth device, and the first device. Is the first acquisition step of acquiring at least one of the first state information indicating the state of the second device and the second state information indicating the state of the third device, and the first state information and A first output step that outputs at least one of the second state information, a third state information indicating the state of the third device, and a second device indicating the state of the first device. The second acquisition step for acquiring at least one of the state information of 4, the second output step for outputting at least one of the third state information and the fourth state information, and the third device are A third acquisition step for acquiring at least one of a fifth state information indicating the state of the first device and a sixth state information indicating the state of the second device, the fifth state information, and the above. A third output step that outputs at least one of the sixth state information, and at least one of the first state information and the second state information output by the fourth device in the first output step. Based on the fourth acquisition step for acquiring at least one of the third state information and the fourth state information output in the second output step, and the fourth state information, the first It is determined whether or not the private key issued by the second device has been illegally used, and based on the first state information, it is determined whether or not the private key issued by the second device has been illegally used. It has a first determination step of determining whether or not the private key issued by the third device has been illegally used based on at least one of the information and the third state information, and the first determination. In the step, by interpreting that the information indicated by the second state information is the same as the information indicated by the third state information, it can be determined whether or not the private key issued by the third device has been illegally used. judge.

本発明の上記態様によれば、秘密鍵の不正利用ないし装置に対する攻撃を容易に検出し、セキュリティの担保を可能にすることができる。 According to the above aspect of the present invention, unauthorized use of the private key or an attack on the device can be easily detected, and security can be ensured.

本発明の第1実施形態における管理システム1の構成の一例を示す図である。It is a figure which shows an example of the structure of the management system 1 in the 1st Embodiment of this invention. 本発明の第1実施形態におけるIoT装置10-1の構成図である。It is a block diagram of the IoT apparatus 10-1 in 1st Embodiment of this invention. 本発明の第1実施形態における出力装置30の構成図である。It is a block diagram of the output device 30 in 1st Embodiment of this invention. 本発明の第1実施形態における秘密鍵の不正利用検出を示す概略図である。It is a schematic diagram which shows the unauthorized use detection of a secret key in 1st Embodiment of this invention. 本発明の第1実施形態におけるIoT装置10及びスマートコントラクトの動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 and the smart contract in 1st Embodiment of this invention. 本発明の第2実施形態における管理システム1の構成の一例を示す図である。It is a figure which shows an example of the structure of the management system 1 in the 2nd Embodiment of this invention. 本発明の第2実施形態におけるサーバ装置40の構成図である。It is a block diagram of the server apparatus 40 in the 2nd Embodiment of this invention. 本発明の第2実施形態におけるIoT装置10及びサーバ装置40の動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 and the server apparatus 40 in the 2nd Embodiment of this invention. 本発明の第3実施形態における管理システム1の構成の一例を示す図である。It is a figure which shows an example of the structure of the management system 1 in the 3rd Embodiment of this invention. 本発明の第3実施形態における状態情報の集計方法の一例を示す図である。It is a figure which shows an example of the aggregation method of the state information in 3rd Embodiment of this invention. 本発明の第3実施形態における管理システム1の構成の一例を示す図である。It is a figure which shows an example of the structure of the management system 1 in the 3rd Embodiment of this invention. 本発明の第3実施形態における状態情報の集計方法の一例を示す図である。It is a figure which shows an example of the aggregation method of the state information in 3rd Embodiment of this invention. 本発明の第4実施形態における秘密鍵の不正利用検出を示す概略図である。It is a schematic diagram which shows the unauthorized use detection of a secret key in 4th Embodiment of this invention. 本発明の第4実施形態における管理システム1の構成の一例を示す図である。It is a figure which shows an example of the structure of the management system 1 in the 4th Embodiment of this invention. 本発明の第4実施形態におけるIoT装置10及びスマートコントラクトの動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 and the smart contract in 4th Embodiment of this invention. 本発明の第4実施形態におけるIoT装置10及びスマートコントラクトの動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 and the smart contract in 4th Embodiment of this invention. 本発明の第4実施形態におけるIoT装置10及びスマートコントラクトの動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 and the smart contract in 4th Embodiment of this invention. 本発明の第5実施形態における管理システム1の構成の一例を示す図である。It is a figure which shows an example of the structure of the management system 1 in the 5th Embodiment of this invention. 本発明の第5実施形態におけるIoT装置10及びサーバ装置40の動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 and the server apparatus 40 in 5th Embodiment of this invention. 本発明の第5実施形態におけるIoT装置10及びサーバ装置40の動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 and the server apparatus 40 in 5th Embodiment of this invention. 本発明の第5実施形態におけるIoT装置10及びサーバ装置40の動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 and the server apparatus 40 in 5th Embodiment of this invention. 本発明の第6実施形態におけるIoT装置10の動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 in the 6th Embodiment of this invention. 本発明の第6実施形態におけるIoT装置10の動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 in the 6th Embodiment of this invention. 本発明の第6実施形態におけるIoT装置10の動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 in the 6th Embodiment of this invention. 本発明の第6実施形態におけるスマートコントラクトの動作を示すフローチャートである。It is a flowchart which shows the operation of the smart contract in the 6th Embodiment of this invention. 本発明の第6実施形態におけるスマートコントラクトの動作を示すフローチャートである。It is a flowchart which shows the operation of the smart contract in the 6th Embodiment of this invention. 本発明の第7実施形態におけるIoT装置10の動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 in 7th Embodiment of this invention. 本発明の第7実施形態におけるIoT装置10の動作を示すフローチャートである。It is a flowchart which shows the operation of the IoT apparatus 10 in 7th Embodiment of this invention.

以下、図面を参照し、本発明の管理システム、装置及び方法の実施形態について説明する。まず、本発明の第1の実施形態について説明する。 Hereinafter, embodiments of the management system, apparatus, and method of the present invention will be described with reference to the drawings. First, the first embodiment of the present invention will be described.

以下、図面を参照し、本発明の管理システム、装置及び方法の実施形態について説明する。まず、本発明の第1の実施形態について説明する。 Hereinafter, embodiments of the management system, apparatus, and method of the present invention will be described with reference to the drawings. First, the first embodiment of the present invention will be described.

<第1の実施形態>
図1は、本発明の第1の実施形態における管理システム1の構成の一例を示す図である。管理システム1は、IoT装置10-1、IoT装置10-2、IoT装置10-3、ブロックチェーンノード20-1、ブロックチェーンノード20-2、ブロックチェーンノード20-3、ネットワークNW及び出力装置30を備える。IoT装置10-1~IoT装置10-3、ブロックチェーンノード20-1~ブロックチェーンノード20-3及び出力装置30はネットワークNWに接続される。
<First Embodiment>
FIG. 1 is a diagram showing an example of the configuration of the management system 1 according to the first embodiment of the present invention. The management system 1 includes an IoT device 10-1, an IoT device 10-2, an IoT device 10-3, a blockchain node 20-1, a blockchain node 20-2, a blockchain node 20-3, a network NW, and an output device 30. Equipped with. The IoT device 10-1 to the IoT device 10-3, the blockchain node 20-1 to the blockchain node 20-3, and the output device 30 are connected to the network NW.

IoT装置10-1、IoT装置10-2及びIoT装置10-3はIoT(Internet of things)における装置であり、例えばスマートメータである。スマートメータは、電力計であり、測定した電力に関する情報等を他の装置に送信する機能を備える。 The IoT device 10-1, the IoT device 10-2, and the IoT device 10-3 are devices in the IoT (Internet of things), and are, for example, smart meters. The smart meter is a wattmeter and has a function of transmitting information about the measured electric power to another device.

ブロックチェーンノード20-1はIoT装置10-1内部の記憶装置にあってもよいし、ネットワークNW内に含まれるいずれかの装置ないしノード内に記憶装置にあってもよい。ブロックチェーンノード20-2及びブロックチェーンノード20-3についても同様である。 The blockchain node 20-1 may be stored in a storage device inside the IoT device 10-1, or may be stored in a storage device in any device or node included in the network NW. The same applies to the blockchain node 20-2 and the blockchain node 20-3.

ネットワークNWは、光ファイバ網やメタル線による有線のネットワークでもよいし、LTE(Long term evolution、登録商標)、第5世代移動体通信網又はIEEE802.11規格に準拠した無線LANといった無線ネットワークでもよいし、それらの組み合わせによって構成されていてもよい。ネットワークNWは複数の装置ないしノードによって構成される。ネットワークNWは、ピア・トゥ・ピア(P2P)構成によってブロックチェーンノード20-1、ブロックチェーンノード20-2及びブロックチェーンノード20-3を接続してもよい。 The network NW may be an optical fiber network or a wired network using a metal wire, or may be a wireless network such as LTE (Long term evolution, registered trademark), a 5th generation mobile communication network, or a wireless LAN compliant with the IEEE802.11 standard. However, it may be composed of a combination thereof. The network NW is composed of a plurality of devices or nodes. The network NW may connect the blockchain node 20-1, the blockchain node 20-2, and the blockchain node 20-3 by a peer-to-peer (P2P) configuration.

出力装置30は、ネットワークNW内部又は外部に存在する装置ないしノードに実行させるプログラムを送信する装置である。出力装置30は、例えばプログラム配信サーバ装置であってもよい。 The output device 30 is a device that transmits a program to be executed by a device or node existing inside or outside the network NW. The output device 30 may be, for example, a program distribution server device.

図2は、本発明の第1実施形態におけるIoT装置10-1の構成図である。IoT装置10-1は、機能ブロックとして第1取得部11-1、第1処理部12-1、第1表示部13-1、第1通信部14-1及び第1記憶部15-1を備える。IoT装置10-2及びIoT装置10-3の構成も同様である。 FIG. 2 is a block diagram of the IoT device 10-1 according to the first embodiment of the present invention. The IoT device 10-1 includes a first acquisition unit 11-1, a first processing unit 12-1, a first display unit 13-1, a first communication unit 14-1, and a first storage unit 15-1 as functional blocks. Be prepared. The same applies to the configurations of the IoT device 10-2 and the IoT device 10-3.

第1取得部11-1は、時刻を示す情報及びIoT装置10-1の状態を示す状態情報を取得する。第1取得部11-1は、秘密鍵の生成に用いられる乱数を外部から取得してもよい。 The first acquisition unit 11-1 acquires the information indicating the time and the state information indicating the state of the IoT device 10-1. The first acquisition unit 11-1 may acquire a random number used for generating the secret key from the outside.

第1処理部12-1は、メッセージを生成する。また、第1処理部12-1は、乱数または前のいかなるメッセージからも算出困難な数値を入力として秘密鍵を生成する。もしくは、第1処理部12-1は、装置を起動した者が予め埋め込んだ秘密鍵をメモリなどから読み取る。第1処理部12-1は、メッセージに対する電子署名を、秘密鍵を用いて生成する。 The first processing unit 12-1 generates a message. In addition, the first processing unit 12-1 generates a secret key by inputting a random number or a numerical value that is difficult to calculate from any previous message. Alternatively, the first processing unit 12-1 reads the private key embedded in advance by the person who started the device from the memory or the like. The first processing unit 12-1 generates an electronic signature for the message using the private key.

メッセージは、ブロックチェーンに書き込まれてもよいし、何らかの装置に対して送信されてもよい。時刻を示す情報は、例えばタイムスタンプである。「ブロックチェーンに書き込む」とは、データをブロックチェーンのトランザクションプールに登録することをいう。具体的には、「ブロックチェーンに書き込む」とは、複数のブロックチェーンにおけるノードに対してデータを送信し、それら複数のノードがブロックチェーンに書き込むことを指してもよい。ここで、複数のノードとは、ブロックチェーンノード20-1、ブロックチェーンノード20-2及びブロックチェーンノード20-3のいずれでもよい。なお、本実施形態において中継ノードが存在する場合、その中継ノードがブロックチェーンのノードに送信し、そのノードがブロックチェーンにデータを書き込んでもよい。 The message may be written to the blockchain or sent to some device. The information indicating the time is, for example, a time stamp. "Writing to the blockchain" means registering data in the transaction pool of the blockchain. Specifically, "writing to the blockchain" may mean transmitting data to nodes in a plurality of blockchains, and the plurality of nodes writing to the blockchain. Here, the plurality of nodes may be any of blockchain node 20-1, blockchain node 20-2, and blockchain node 20-3. If a relay node exists in the present embodiment, the relay node may transmit data to a node of the blockchain, and the node may write data to the blockchain.

ブロックチェーンノードは、ブロック生成処理(マイニング処理など)により、トランザクションプールに登録されたデータを保証するブロックを生成する。生成されたブロックはブロックチェーンに取り込まれる。
ここで、メッセージは、IoT装置10-1の状態を示す状態情報、時刻を示す情報、任意の秘密鍵に対応する公開鍵又はその公開鍵の生成に用いられる値、そのメッセージが何個目のものであるかを表すインデックス、前のメッセージのハッシュ値を少なくとも含む。前のメッセージとは、時間的な観点で過去に生成されたメッセージである。
The blockchain node generates a block that guarantees the data registered in the transaction pool by the block generation process (mining process, etc.). The generated block is incorporated into the blockchain.
Here, the message is a state information indicating the state of the IoT device 10-1, information indicating a time, a public key corresponding to an arbitrary private key or a value used for generating the public key, and the number of the message. Includes at least an index that indicates whether it is a thing, and the hash value of the previous message. The previous message is a message generated in the past in terms of time.

第1表示部13-1は、情報を表示する。第1表示部13-1が表示する情報は、例えばスマートメータが設置される住宅における使用電力量であってもよい。第1通信部14-1は、無線または有線によるネットワークNWを介して他の機器と通信可能に接続し、各種のデータの送信および受信を行う。第1通信部14-1は有線通信インターフェイス又は無線通信インターフェイスである。 The first display unit 13-1 displays information. The information displayed by the first display unit 13-1 may be, for example, the amount of power used in a house in which a smart meter is installed. The first communication unit 14-1 is communicably connected to other devices via a wireless or wired network NW, and transmits and receives various data. The first communication unit 14-1 is a wired communication interface or a wireless communication interface.

有線通信インターフェイスは、電気通信や光通信などが可能なインターフェイスである。有線通信インターフェイスは、例えばイーサネット(登録商標)やUSB(Universal Serial Bus)(登録商標)に準拠していてもよい。 The wired communication interface is an interface capable of telecommunications and optical communication. The wired communication interface may be compliant with, for example, Ethernet (registered trademark) or USB (Universal Serial Bus) (registered trademark).

無線通信インターフェイスは、無線通信が可能なインターフェイスである。無線通信インターフェイスは、例えばLTEでもよいし、第5世代移動体通信網でもよいし、IEEE802.11規格に準拠する無線LANインターフェイスでもよいし、Bluetooth(登録商標)に準拠する無線通信インターフェイスでもよい。IoT装置10-2及びIoT装置10-3を構成する各機能ブロックの動作についてもIoT装置10-1と同様である。本発明において、複数のIoT装置10は、ネットワークNW1を介することなく互いに直接通信することが可能である。それぞれのIoT装置10は、例えば上記のいずれかの無線通信インターフェイスを用いて互いに直接通信してもよい。 The wireless communication interface is an interface capable of wireless communication. The wireless communication interface may be, for example, LTE, a 5th generation mobile communication network, a wireless LAN interface compliant with the 802.11 standard, or a wireless communication interface compliant with Bluetooth®. The operation of each functional block constituting the IoT device 10-2 and the IoT device 10-3 is the same as that of the IoT device 10-1. In the present invention, the plurality of IoT devices 10 can directly communicate with each other without going through the network NW1. The IoT devices 10 may communicate directly with each other, for example, using any of the above wireless communication interfaces.

図3は、本発明の第1実施形態における出力装置30の構成図である。出力装置30は、入力部31、処理部32、記憶部33及び通信部34を備える。入力部31は外部から情報の入力を受け付ける。例えば、入力部31はマウス、キーボードでもよいし、文字の入力を画面上で受け付けるタッチパネルでもよい。処理部32は各種処理を実行する。例えば、処理部32は、記憶部33に記憶されたプログラムを実行する。又、処理部32は、通信部34を介して受信した情報ないしデータを記憶部33に記憶させる。 FIG. 3 is a block diagram of the output device 30 according to the first embodiment of the present invention. The output device 30 includes an input unit 31, a processing unit 32, a storage unit 33, and a communication unit 34. The input unit 31 accepts information input from the outside. For example, the input unit 31 may be a mouse or a keyboard, or may be a touch panel that accepts character input on the screen. The processing unit 32 executes various processes. For example, the processing unit 32 executes the program stored in the storage unit 33. Further, the processing unit 32 stores the information or data received via the communication unit 34 in the storage unit 33.

記憶部33は、HDD(Hard Disk Drive)、セキュアNVRAM(Non-Volatile RAM)、ROM(Read Only Memory)などの記憶媒体を含んで構成される。HDDは、OS、デバイスドライバ、アプリケーションなどの各種のプログラム、その他、プログラムの動作により取得した各種のデータを記憶する。 The storage unit 33 includes a storage medium such as an HDD (Hard Disk Drive), a secure NVRAM (Non-Volatile RAM), and a ROM (Read Only Memory). The HDD stores various programs such as an OS, a device driver, and an application, and various other data acquired by the operation of the programs.

通信部34は第1通信部14-1と同様、有線通信インターフェイス又は無線通信インターフェイスである。通信部34は、ネットワークNWに含まれる装置ないしノードに対して、スマートコントラクトによって実行されるプログラムを指定するIDおよびプログラムに入力させるデータを送信する。スマートコントラクトとは、ネットワークNWに含まれる装置ないしノードに対して、プログラム等を自動的に実行させる機能である。スマートコントラクトに係るプログラムは、予めプログラム毎にユニークなIDと共に各ブロックチェーンノードに配布されており、ブロックチェーンノードは、IDの指定を受けることで実行すべきプログラムを一意に特定することができる。 The communication unit 34 is a wired communication interface or a wireless communication interface, like the first communication unit 14-1. The communication unit 34 transmits to the device or node included in the network NW an ID that specifies a program to be executed by the smart contract and data to be input to the program. The smart contract is a function for automatically executing a program or the like to a device or node included in the network NW. The program related to the smart contract is distributed to each blockchain node together with a unique ID for each program in advance, and the blockchain node can uniquely specify the program to be executed by receiving the designation of the ID.

図4は、本発明の第1実施形態における秘密鍵の不正利用検出を示す概略図である。図4における複数の四角形はブロックチェーンを示している。ブロックチェーンは複数のブロックを備える。本発明の第1実施形態において、IoT装置10-1は所定の周期ごとに秘密鍵を更新する。IoT装置10-1は、その秘密鍵に対応する公開鍵又はその公開鍵の生成に用いられる値をメッセージupdateMsg_(x,y)に格納し、当該メッセージupdateMsg_(x,y)を出力する。なお、xはupdateMsg_(x,y) を出力する主体を表し、yはその周期を表す。図4において、デバイスiが周期nにおいて、秘密鍵sk_(i,n) を発行し、メッセージupdateMsg_(i,n)を出力することが示されている。デバイスiは、周期nにおいて、前の秘密鍵sk_(i,n-1) によってメッセージupdateMsg_(i,n) に対する電子署名を作成し、通信部14を用いてネットワークNW経由でブロックチェーンに書き込む。 FIG. 4 is a schematic diagram showing unauthorized use detection of a private key according to the first embodiment of the present invention. The plurality of rectangles in FIG. 4 indicate a block chain. The blockchain comprises multiple blocks. In the first embodiment of the present invention, the IoT device 10-1 updates the private key at predetermined intervals. The IoT device 10-1 stores the public key corresponding to the private key or the value used for generating the public key in the message updateMsg_ (x, y), and outputs the message updateMsg_ (x, y). Note that x represents the subject that outputs updateMsg_ (x, y), and y represents the period. In FIG. 4, it is shown that the device i issues the private key sk_ (i, n) and outputs the message updateMsg_ (i, n) in the period n. In the cycle n, the device i creates an electronic signature for the message updateMsg_ (i, n) by the previous secret key sk_ (i, n-1), and writes it to the blockchain via the network NW using the communication unit 14.

図4において、Adversary(攻撃者)はデバイスiから秘密鍵sk_(i,n) を盗み出している。Adversaryは、周期n終了後に盗み出した秘密鍵sk_(i,n-1) を用いてメッセージupdateMsg'_(i,n) を通信部14を用いてネットワークNW経由でブロックチェーンに書き込んでいる。上記のように、メッセージupdateMsg’の書き込みが周期nの後になるように、公開鍵の更新周期は、物理攻撃によって秘密鍵skを盗み出すのに要する時間より短い時間となるように設計される。この場合、秘密鍵は各周期において1回しか用いられないはずである。つまり、秘密鍵sk_(i,n-1) によって生成された電子署名は1回しかブロックチェーンに書き込まれないのが原則である。しかしながら図4において、秘密鍵sk_(i,n-1) による電子署名は2回ブロックチェーンに書き込まれている。そこで、原則に反するそのような書き込みを検出することにより、秘密鍵sk_(i,n-1)が盗み出されたことを検出することができる。 In FIG. 4, the Adversary (attacker) steals the private key sk_ (i, n) from the device i. The Adversary writes the message updateMsg'_ (i, n) to the blockchain via the network NW using the communication unit 14 using the secret key sk_ (i, n-1) stolen after the end of the cycle n. As described above, the update cycle of the public key is designed to be shorter than the time required to steal the private key sk by a physical attack so that the message updateMsg'is written after the cycle n. In this case, the private key should only be used once in each cycle. In other words, in principle, the digital signature generated by the private key sk_ (i, n-1) is written to the blockchain only once. However, in FIG. 4, the electronic signature by the private key sk_ (i, n-1) is written twice in the blockchain. Therefore, by detecting such a write that violates the principle, it is possible to detect that the private key sk_ (i, n-1) has been stolen.

図5は、本発明の第1実施形態におけるIoT装置10及びスマートコントラクトの動作を示すフローチャートである。初期状態において、nは1である。nは周期を示す整数である。ステップS100において、IoT装置10-1の管理者はコンピュータを用いて乱数を生成する。本実施形態において、乱数の生成方法は特定の方法に限定されるものではない。乱数の生成方法は、その時のある地点での温度の揺らぎなど、物理的な真正乱数を観測するものを含んでいてもよい。第1取得部11-1は生成された乱数に基づいて秘密鍵の初期値sk_(i,0) 及び対応する公開鍵の初期値pk_(i,0)を、所定のアルゴリズムを用いることにより作成する。ここで所定のアルゴリズムは楕円曲線を利用した暗号方式でもよいし、RSA暗号方式でもよい。第1処理部12-1は、処理をステップS101に進める。 FIG. 5 is a flowchart showing the operation of the IoT device 10 and the smart contract according to the first embodiment of the present invention. In the initial state, n is 1. n is an integer indicating the period. In step S100, the administrator of the IoT device 10-1 uses a computer to generate a random number. In the present embodiment, the random number generation method is not limited to a specific method. The method of generating a random number may include a method of observing a physical true random number such as a temperature fluctuation at a certain point at that time. The first acquisition unit 11-1 creates the initial value sk_ (i, 0) of the private key and the initial value pk_ (i, 0) of the corresponding public key based on the generated random number by using a predetermined algorithm. do. Here, the predetermined algorithm may be an encryption method using an elliptic curve or an RSA encryption method. The first processing unit 12-1 advances the processing to step S101.

ステップS101において、第1取得部11-1は、タイムスタンプの初期値timestamp_(i,0) IoT装置10-1の状態を示す状態情報の初期値state_(i,0) を取得する。初期状態において前のメッセージupdateMsgは存在しないため、前のupdateMsgのハッシュ値としては予め定めた任意の値を用いる。タイムスタンプは、時刻を示す情報である。状態情報は、プログラムのハッシュ値でもよいし、第1取得部11-1が取得した特定のセンサのデータでもよい。この場合、特定のセンサのデータは、特定期間における電力使用量を示す値でもよい。その後、第1取得部11-1は処理をステップS102に進める。 In step S101, the first acquisition unit 11-1 acquires the initial value timestamp_ (i, 0) of the time stamp and the initial value state_ (i, 0) of the state information indicating the state of the IoT device 10-1. Since the previous message updateMsg does not exist in the initial state, a predetermined arbitrary value is used as the hash value of the previous updateMsg. The time stamp is information indicating the time. The state information may be a hash value of a program or may be data of a specific sensor acquired by the first acquisition unit 11-1. In this case, the data of the specific sensor may be a value indicating the amount of power used in the specific period. After that, the first acquisition unit 11-1 advances the process to step S102.

ステップS102において、第1処理部12-1は、内部に備えるタイマの値をT_attesにセットする。タイマの値が0になったら、第1処理部12-1は処理をステップS103に進める。T_attesは、攻撃の有無を周期的に検出する際の各周期の時間である。本実施形態において、攻撃者が秘密鍵を盗むといった攻撃を行う際、2 x T_attes以上の時間を要するものとする。 In step S102, the first processing unit 12-1 sets the value of the timer provided internally in T_attes. When the value of the timer becomes 0, the first processing unit 12-1 advances the processing to step S103. T_attes is the time of each cycle when the presence or absence of an attack is periodically detected. In this embodiment, when an attacker makes an attack such as stealing a private key, it takes 2 x T_attes or more.

ステップS103において、第1処理部12-1はnの値を1つインクリメントする。第1処理部12-1は、処理をステップS104に進める。 In step S103, the first processing unit 12-1 increments the value of n by one. The first processing unit 12-1 advances the processing to step S104.

ステップS104において、第1処理部12-1は乱数rを生成する。第1処理部12-1は、生成した乱数rに基づいて周期nにおける秘密鍵sk_(i,n) を生成する。ただし、予めsk_(i,n)が生成されておりsk_(i,n)がメモリなどに書き込まれている場合、sk_(i,n)をメモリから読み取る処理に置き換えても良い。第1処理部12-1は、秘密鍵sk_(i,n) に対応する公開鍵pk_(i,n) を生成する。第1処理部12-1は、処理をステップS105に進める。 In step S104, the first processing unit 12-1 generates a random number r. The first processing unit 12-1 generates a secret key sk_ (i, n) in the period n based on the generated random number r. However, if sk_ (i, n) is generated in advance and sk_ (i, n) is written in a memory or the like, sk_ (i, n) may be replaced with a process of reading from the memory. The first processing unit 12-1 generates the public key pk_ (i, n) corresponding to the private key sk_ (i, n). The first processing unit 12-1 advances the processing to step S105.

ステップS105において、第1取得部11-1はタイムスタンプ timestamp_(i,n)、 状態情報 state_(i,n)及び前の周期で生成されたupdateMsg_(i,n-1)のハッシュ値updateHash_(i,n-1) を取得する。第1取得部11-1は、処理をステップS106に進める。 In step S105, the first acquisition unit 11-1 has a time stamp timestamp_ (i, n), a state information state_ (i, n), and a hash value updateHash_ (of updateMsg_ (i, n-1) generated in the previous cycle. Get i, n-1). The first acquisition unit 11-1 advances the process to step S106.

ステップS106において、第1処理部12-1は、メッセージ updateMsg_(i,n) 及び電子署名updateSignature_(i,n) を生成する。updateMsg_(i,n) は、IoT装置10-1を識別する識別情報、周期nにおける公開鍵pk_(i,n)、周期nにおける状態情報state_(i,n)、周期nにおけるタイムスタンプtimestamp_(i,n)、updateMsgのインデックスを表すn、前の周期で生成されたupdateMsg_(i,n-1)のハッシュ値updateHash_(i,n-1) を含む。updateMsg_(i,n) は、公開鍵pk_(i,n)の代わりに、公開鍵を特定可能なデータを含んでいてもよいし、公開鍵pk_(i,n) に加えて、公開鍵pk_(i,n)の生成に用いられる乱数値を含んでいてもよい。電子署名updateSignature_(i,n) は、前の周期で生成された秘密鍵sk_(i,n-1) を用いてupdateMsg_(i,n) に対して生成された電子署名である。 In step S106, the first processing unit 12-1 generates the message updateMsg_ (i, n) and the digital signature updateSignature_ (i, n). updateMsg_ (i, n) is the identification information for identifying the IoT device 10-1, the public key pk_ (i, n) in the period n, the state information state_ (i, n) in the period n, and the time stamp timestamp_ (in the period n). It contains i, n), n representing the index of updateMsg, and the hash value updateHash_ (i, n-1) of updateMsg_ (i, n-1) generated in the previous cycle. updateMsg_ (i, n) may contain data that can identify the public key instead of the public key pk_ (i, n), and in addition to the public key pk_ (i, n), the public key pk_ It may contain a random value used to generate (i, n). The digital signature updateSignature_ (i, n) is the digital signature generated for updateMsg_ (i, n) using the private key sk_ (i, n-1) generated in the previous cycle.

なお、電子署名updateSignature_(i,n) は、updateMsg_(i,n) に対して所定のハッシュ関数を用いて得られるハッシュ値に対して、前の周期で生成された秘密鍵sk_(i,n-1) を用いて生成されていてもよい。また、第1取得部11-1を識別する識別情報は、メッセージupdateMsg_(i,n) に必ずしも含まれていなくてもよい。第1処理部12-1は、処理をステップS107に進める。 The digital signature updateSignature_ (i, n) is a secret key sk_ (i, n) generated in the previous cycle with respect to the hash value obtained by using a predetermined hash function for updateMsg_ (i, n). It may be generated using -1). Further, the identification information for identifying the first acquisition unit 11-1 does not necessarily have to be included in the message updateMsg_ (i, n). The first processing unit 12-1 advances the processing to step S107.

ステップS107において、第1処理部12-1はupdateMsg_(i,n) 及びupdateSignature_(i,n) を通信部14を用いてネットワークNW経由でブロックチェーンに書き込む。第1処理部12-1は、処理をステップS102に進める。 In step S107, the first processing unit 12-1 writes updateMsg_ (i, n) and updateSignature_ (i, n) to the blockchain via the network NW using the communication unit 14. The first processing unit 12-1 advances the processing to step S102.

次に、スマートコントラクトの動作を説明する。スマートコントラクトは、ネットワークNW上の装置ないしノードに実装されている。そのような装置ないしノードは、取得部21、処理部22、記憶部23、判定部24及び通信部25を備える。処理部22は、記憶部23に保存されるスマートコントラクトのプログラムを読み出して実行する。 Next, the operation of the smart contract will be described. Smart contracts are implemented in devices or nodes on the network NW. Such a device or node includes an acquisition unit 21, a processing unit 22, a storage unit 23, a determination unit 24, and a communication unit 25. The processing unit 22 reads and executes the smart contract program stored in the storage unit 23.

ステップS200において、処理部22はタイマの値をT_attesにセットする。処理部22は、T_attes経過しているか検証し、もしそうであれば処理をステップS201に進める。T_attes経過していない場合、処理部22は以降の処理をキャンセルする。処理部22はなお、以降の処理ステップにおいて、処理部22は、プログラムを読み出した時点での所定の時刻に基づいて、各ステップの処理を行ってもよいし、あるいは行わなくてもよい。 In step S200, the processing unit 22 sets the value of the timer in T_attes. The processing unit 22 verifies whether T_attes has elapsed, and if so, advances the processing to step S201. If T_attes has not elapsed, the processing unit 22 cancels the subsequent processing. In the subsequent processing steps, the processing unit 22 may or may not perform the processing of each step based on a predetermined time at the time when the program is read.

ステップS201において、処理部22はnの値を1インクリメントする。その後、処理部22は処理をステップS202に進める。 In step S201, the processing unit 22 increments the value of n by 1. After that, the processing unit 22 advances the processing to step S202.

ステップS202において、取得部21は、updateMsg_(i,n-1)、updateSignature_(i,n-1)、updateMsg_(i,n) 及びupdateSignature_(i,n) を、通信部14を用いてネットワークNW経由でブロックチェーンから取得する。updateMsg_(i,n-1) には、第1取得部11-1を識別する識別情報、周期nにおける公開鍵pk_(i,n-1)、周期n-1における状態情報state_(i,n-1)、周期n-1におけるタイムスタンプtimestamp_(i,n-1) updateMsgのインデックスを表すn-1及び前の周期で生成されたupdateMsg_(i,n-2)のハッシュ値updateHash_(i,n-2)が含まれている。updateMsg_(i,n-1) は、公開鍵pk_(i,n-1)の代わりに、公開鍵を特定可能なデータを含んでいてもよいし、公開鍵pk_(i,n-1) に加えて、公開鍵pk_(i,n-1)の生成に用いられる乱数値を含んでいてもよい。なお、この段階でブロックチェーンから取得したupdatetMsg_(i,n) 及びsignature_(i,n) は真正なものかはわからない。取得部21は、処理をステップS203に進める。なお、有効な秘密鍵を所定の周期において取得できなかった場合、取得部21はその周期における処理を終了し、ステップS200に処理を進める。 In step S202, the acquisition unit 21 uses the communication unit 14 to connect updateMsg_ (i, n-1), updateSignature_ (i, n-1), updateMsg_ (i, n) and updateSignature_ (i, n) to the network NW. Get from the blockchain via. updateMsg_ (i, n-1) contains identification information for identifying the first acquisition unit 11-1, public key pk_ (i, n-1) in period n, and state information state_ (i, n) in period n-1. -1), timestamp in period n-1, timestamp_ (i, n-1) hash value updateHash_ (i, n-1) of n-1 representing the index of updateMsg and updateMsg_ (i, n-2) generated in the previous period n-2) is included. updateMsg_ (i, n-1) may contain data that can identify the public key instead of the public key pk_ (i, n-1), or the public key pk_ (i, n-1) In addition, it may include a random value used to generate the public key pk_ (i, n-1). At this stage, it is unknown whether updatedMsg_ (i, n) and signature_ (i, n) obtained from the blockchain are genuine. The acquisition unit 21 advances the process to step S203. If a valid private key cannot be acquired in a predetermined cycle, the acquisition unit 21 ends the process in that cycle and proceeds to step S200.

ステップS203において、判定部24は、演算VerifySignature(pk_(i,n-1), updateMsg_(i,n), updateSignature_(i,n)) を行う。VerifySignature(pk_(i,n-1), updateMsg_(i,n), updateSignature_(i,n)) の値がtrueである場合、判定部24は処理をステップS204に進める。VerifySignatureは、updateMsg_(i,n)に対する電子署名updateSignature_(i,n) が、公開鍵pk_(i,n-1)に対応する秘密鍵sk_(i,n-1)によって作成されたものか否かを判定する演算である。VerifySignature(pk_(i,n-1), updateMsg_(i,n), updateSignature_(i,n)) の値がfalseである場合、判定部は処理をステップS205に進める。 In step S203, the determination unit 24 performs the operation VerifySignature (pk_ (i, n-1), updateMsg_ (i, n), updateSignature_ (i, n)). If the value of VerifySignature (pk_ (i, n-1), updateMsg_ (i, n), updateSignature_ (i, n)) is true, the determination unit 24 advances the process to step S204. VerifySignature is whether the digital signature updateSignature_ (i, n) for updateMsg_ (i, n) was created by the private key sk_ (i, n-1) corresponding to the public key pk_ (i, n-1). It is an operation to determine whether or not. If the value of VerifySignature (pk_ (i, n-1), updateMsg_ (i, n), updateSignature_ (i, n)) is false, the determination unit proceeds to step S205.

ステップS204において、判定部24は、updateMsg_(i,n)に含まれるインデックスから1を減算した値がupdateMsg_(i,n-1) に含まれるインデックスと等しいか否かを判定する。updateMsg_(i,n)に含まれるインデックスから1を減算した値がupdateMsg_(i,n-1) に含まれるインデックスと等しい場合、判定部24は処理をステップS206に進め、等しくない場合、判定部24は処理をステップS210に進める。 In step S204, the determination unit 24 determines whether or not the value obtained by subtracting 1 from the index included in updateMsg_ (i, n) is equal to the index included in updateMsg_ (i, n-1). If the value obtained by subtracting 1 from the index included in updateMsg_ (i, n) is equal to the index included in updateMsg_ (i, n-1), the determination unit 24 advances the process to step S206, and if they are not equal, the determination unit 24 advances the process to step S210.

ステップS205において、判定部24はメッセージupdateMsg_(i,n)及びupdateSignature_(i,n) を無視し、一切の状態を変更しない。判定部24は、処理をステップS200に進める。 In step S205, the determination unit 24 ignores the messages updateMsg_ (i, n) and updateSignature_ (i, n) and does not change any state. The determination unit 24 advances the process to step S200.

ステップS206において、処理部22は、updateMsg_(i,n-1) のハッシュ値を計算する。判定部24は、処理部22が計算したupdateMsg_(i,n-1) のハッシュ値と、updateMsg_(i,n)に含まれるupdateHash_(i,n-1) とが等しいか否かを判定する。その判定結果が等しい場合、判定部24は処理をステップS207に進める。その判定結果が等しくない場合、判定部24は処理をステップS210に進める。 In step S206, the processing unit 22 calculates the hash value of updateMsg_ (i, n-1). The determination unit 24 determines whether or not the hash value of updateMsg_ (i, n-1) calculated by the processing unit 22 is equal to updateHash_ (i, n-1) included in updateMsg_ (i, n). .. If the determination results are equal, the determination unit 24 advances the process to step S207. If the determination results are not equal, the determination unit 24 advances the process to step S210.

ステップS207において、判定部24はtimestamp_(i,n) がtimestamp_(i,n-1) より大きいか否かを判定する。timestamp_(i,n) がtimestamp_(i,n-1) より大きい場合、判定部24は処理をステップS208に進める。timestamp_(i,n) がtimestamp_(i,n-1) と同じかtimestamp_(i,n-1) より小さい場合、判定部24は処理をステップS210に進める。 In step S207, the determination unit 24 determines whether or not the timestamp_ (i, n) is larger than the timestamp_ (i, n-1). If timestamp_ (i, n) is larger than timestamp_ (i, n-1), the determination unit 24 advances the process to step S208. If timestamp_ (i, n) is the same as timestamp_ (i, n-1) or smaller than timestamp_ (i, n-1), the determination unit 24 advances the process to step S210.

ステップS208において、判定部24は、pk_(i,n-1)を用いた任意のupdateMsg_(i,n) が既にブロックチェーンに書き込まれていないかどうかを判定する。公開鍵pk_(i,n-1)を用いた任意のメッセージupdateMsg_(i,n) がまだブロックチェーンに書き込まれていない場合、判定部24は処理をステップS209に進める。公開鍵pk_(i,n-1)を用いた任意のメッセージupdateMsg_(i,n) が既にブロックチェーンに書き込まれていた場合、判定部24は処理をステップS210に進める。 In step S208, the determination unit 24 determines whether or not any updateMsg_ (i, n) using pk_ (i, n-1) has already been written to the blockchain. If any message updateMsg_ (i, n) using the public key pk_ (i, n-1) has not yet been written to the blockchain, the determination unit 24 advances the process to step S209. If any message updateMsg_ (i, n) using the public key pk_ (i, n-1) has already been written to the blockchain, the determination unit 24 advances the process to step S210.

ステップS209において、秘密鍵sk_(i,n-1) が盗まれていないと判定し、判定部24は変数flag_iに値healthy を代入する。flag_iは、デバイスiの秘密鍵が盗まれる等不正利用されているか否かを表す変数である。healthyは、デバイスの秘密鍵が不正利用されていないことを表す値である。判定部24は、その後処理をステップS200に進める。 In step S209, it is determined that the private key sk_ (i, n-1) has not been stolen, and the determination unit 24 assigns the value healthy to the variable flag_i. flag_i is a variable indicating whether or not the private key of the device i has been stolen or otherwise abused. healthy is a value indicating that the private key of the device has not been illegally used. The determination unit 24 then proceeds to step S200.

ステップS210において、判定部24は、秘密鍵sk_(i,n-1) が盗まれていると判定し、flag_iに値compromised を代入する。compromisedは、デバイスの秘密鍵が不正利用されている可能性があることを表す値である。判定部24は、その後処理をステップS200に進める。 In step S210, the determination unit 24 determines that the private key sk_ (i, n-1) has been stolen, and assigns the value compromised to flag_i. compromised is a value that indicates that the private key of the device may have been abused. The determination unit 24 then proceeds to step S200.

なお、ステップS204からステップS208の処理は、その順序が変わってもよい。 The order of the processes from step S204 to step S208 may be changed.

以上説明した第1実施形態に係る管理システム1は、少なくともIoT装置10-1と、スマートコントラクトが実装される装置ないしノードと、IoT装置10-1及びスマートコントラクトが実装される装置ないしノードとを接続するネットワークNWを備える。 The management system 1 according to the first embodiment described above includes at least the IoT device 10-1 and the device or node on which the smart contract is mounted, and the device or node on which the IoT device 10-1 and the smart contract are mounted. It has a network NW to connect to.

IoT装置10-1は、時刻に関する情報であるtimestamp_(i,n) 又は検証プロセスの周期を示す第1のインデックスと、第1の秘密鍵sk_(i,n) に対応する第1の公開鍵pk_(i,n)と、を含むメッセージupdateMsg_(i,n) (第1のメッセージの一例)と、メッセージupdateMsg_(i,n)についてのハッシュ値に対して第2の秘密鍵sk_(i,n-1) を用いることにより生成された第1の電子署名updateSignature_(i,n) とを取得する第1処理部と、メッセージupdateMsg_(i,n) と、第1の電子署名updateSignature_(i,n) とを、ネットワークNWを介して通信を行うことにより出力する通信部と、を備える。updateMsg_(i,n) は、第1の公開鍵pk_(i,n)の代わりに、第1の公開鍵を特定可能なデータを含んでいてもよいし、第1の公開鍵pk_(i,n) に加えて、第1の公開鍵pk_(i,n)の生成に用いられる乱数値を含んでいてもよい。 The IoT device 10-1 has a timestamp_ (i, n), which is information about the time, or a first index indicating the cycle of the verification process, and a first public key corresponding to the first private key sk_ (i, n). The second secret key sk_ (i, n) for the hash value for the message updateMsg_ (i, n) (an example of the first message) containing pk_ (i, n) and the message updateMsg_ (i, n). The first processing unit that acquires the first digital signature updateSignature_ (i, n) generated by using n-1), the message updateMsg_ (i, n), and the first digital signature updateSignature_ (i, n). n) is provided with a communication unit that outputs n) by communicating via the network NW. updateMsg_ (i, n) may contain data that can identify the first public key instead of the first public key pk_ (i, n), or the first public key pk_ (i, n). In addition to n), it may contain a random value used to generate the first public key pk_ (i, n).

ネットワークNWにおいてスマートコントラクトが実装された装置は、メッセージupdateMsg_(i,n)、電子署名updateSignature_(i,n)、第2のメッセージ及び第2の電子署名を取得する取得部と、時刻に関する情報timestamp_(i,n) と、前記第2の取得部がupdateMsg_(i,n)又は第2のメッセージを取得する際に、updateMsg_(i,n)及びupdateSignature_(i,n)と、第2のメッセージおよび第2の電子署名と、のいずれかを第2の取得部が取得済みであることと、の少なくともいずれかに基づいて、前記第2の秘密鍵が不正利用されたことを判定する判定部と、を備え、第2のメッセージは、第1の公開鍵pk_(i,n) 又は前記第1の公開鍵pk_(i,n)の生成に用いられる値を少なくとも含み、第2の電子署名は、第2のメッセージ及び第2の秘密鍵sk_(i,n-1)に基づいて生成され、第1の秘密鍵sk_(i,n)は第2の秘密鍵sk_(i,n-1)と異なる。
これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。
The device in which the smart contract is implemented in the network NW has a message updateMsg_ (i, n), a digital signature updateSignature_ (i, n), an acquisition unit for acquiring a second message and a second digital signature, and time stamp_. (i, n) and when the second acquisition unit acquires updateMsg_ (i, n) or the second message, updateMsg_ (i, n) and updateSignature_ (i, n) and the second message. And a second electronic signature, and a determination unit that determines that the second private key has been illegally used based on at least one of the fact that the second acquisition unit has already acquired one of them. The second message comprises at least the value used to generate the first public key pk_ (i, n) or the first public key pk_ (i, n) and is a second digital signature. Is generated based on the second message and the second secret key sk_ (i, n-1), and the first secret key sk_ (i, n) is the second secret key sk_ (i, n-1). ) Is different.
This makes it possible to detect the theft or unauthorized use of the private key.

また、第1取得部11-1は、周期nにおいて、第1のメッセージupdateMsg_(i,n)と、第1の電子署名updateSignature_(i,n) とを取得し、周期n+1において、timestamp_(i,n+1) (時刻に関する第2の時刻情報)又は周期n+1に対応する第2のインデックスと、第3の秘密鍵に対応する第3の公開鍵pk_(i,n+1) とを含む第3のメッセージupdateMsg_(i,n+1)と、updateMsg_(i,n+1)についてのハッシュ値に対して第1の秘密鍵sk_(i,n) を用いることにより生成された第3の電子署名updateSignature_(i,n+1) とを取得し、nは整数であり、第3の秘密鍵sk_(i,n+1) は第1の秘密鍵sk_(i,n)及び前記第2の秘密鍵sk_(i,n-1)と異なる。updateMsg_(i,n+1) は、公開鍵pk_(i,n+1)の代わりに、公開鍵pk_(i,n+1)を特定可能なデータを含んでいてもよいし、公開鍵pk_(i,n+1) に加えて、公開鍵pk_(i,n+1)の生成に用いられる乱数値を含んでいてもよい。
これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。
Further, the first acquisition unit 11-1 acquires the first message updateMsg_ (i, n) and the first electronic signature updateSignature_ (i, n) in the cycle n, and the timestamp_ in the cycle n + 1. (i, n + 1) (second time information about time) or second index corresponding to period n + 1 and third public key pk_ (i, n + 1) corresponding to third private key ) And the first secret key sk_ (i, n) for the hash value for the third message updateMsg_ (i, n + 1) and updateMsg_ (i, n + 1). The third digital signature updateSignature_ (i, n + 1) is acquired, n is an integer, and the third private key sk_ (i, n + 1) is the first private key sk_ (i, n). And different from the second private key sk_ (i, n-1). updateMsg_ (i, n + 1) may contain data that can identify the public key pk_ (i, n + 1) instead of the public key pk_ (i, n + 1), or the public key pk_ In addition to (i, n + 1), it may contain a random value used to generate the public key pk_ (i, n + 1).
This makes it possible to detect the theft or unauthorized use of the private key.

また、前記第1のメッセージupdateMsg_(i,n)は、周期n-1におけるメッセージのハッシュ値をさらに含んでもよく、前記第3のメッセージupdateMsg_(i,n+1)は、前記第1のメッセージupdateMsg_(i,n)のハッシュ値をさらに含んでもよい。
これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。
Further, the first message updateMsg_ (i, n) may further include the hash value of the message in the period n-1, and the third message updateMsg_ (i, n + 1) may further include the first message. It may further include the hash value of updateMsg_ (i, n).
This makes it possible to detect the theft or unauthorized use of the private key.

また、timestamp_(i,n)が示す時刻が、timestamp_(i,n-1)が示す時刻と同じもしくはtimestamp_(i,n) が示す時刻が、timestamp_(i,n-1)が示す時刻より早い場合、又はメッセージupdateMsg_(i,n-1)に周期n-1に対応するインデックスが含まれる場合において前記第3のメッセージに含まれるインデックスから周期n-1に対応するインデックスを減算した値が1でない場合、判定部24は、秘密鍵sk_(i,n-1)が盗難ないし不正利用されたと判定する。
これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。
Also, the time indicated by timestamp_ (i, n) is the same as the time indicated by timestamp_ (i, n-1), or the time indicated by timestamp_ (i, n) is greater than the time indicated by timestamp_ (i, n-1). If it is early, or if the message updateMsg_ (i, n-1) contains the index corresponding to the period n-1, the value obtained by subtracting the index corresponding to the period n-1 from the index included in the third message is the value. If it is not 1, the determination unit 24 determines that the private key sk_ (i, n-1) has been stolen or misused.
This makes it possible to detect the theft or unauthorized use of the private key.

<第2の実施形態>
本発明の第2の実施形態について説明する。
図6は、本発明の第2実施形態における管理システム1の構成の一例を示す図である。管理システム1は、IoT装置10A-1、IoT装置10A-2、IoT装置10A-3、ネットワークNW及びサーバ装置40を備える。第1の実施形態と異なり、管理システム1は、サーバ装置40を備える。
<Second embodiment>
A second embodiment of the present invention will be described.
FIG. 6 is a diagram showing an example of the configuration of the management system 1 according to the second embodiment of the present invention. The management system 1 includes an IoT device 10A-1, an IoT device 10A-2, an IoT device 10A-3, a network NW, and a server device 40. Unlike the first embodiment, the management system 1 includes a server device 40.

図7は、本発明の第2実施形態におけるサーバ装置40の構成図である。サーバ装置40は、取得部41、処理部42、判定部43、表示部44及び通信部45を備える。取得部41は、IoT装置10A-1、IoT装置10A-2及びIoT装置10A-3から出力されるメッセージを取得する。処理部42は、秘密鍵、公開鍵、及びメッセージに対する秘密鍵を用いた電子署名の作成処理を実行する。 FIG. 7 is a block diagram of the server device 40 according to the second embodiment of the present invention. The server device 40 includes an acquisition unit 41, a processing unit 42, a determination unit 43, a display unit 44, and a communication unit 45. The acquisition unit 41 acquires the messages output from the IoT device 10A-1, the IoT device 10A-2, and the IoT device 10A-3. The processing unit 42 executes a process of creating an electronic signature using the private key, the public key, and the private key for the message.

判定部43は、IoT装置10A-1、IoT装置10A-2及びIoT装置10A-3の少なくともいずれかが発行する秘密鍵が盗難ないし不正利用されていないかどうかを秘密鍵、公開鍵、電子署名に基づいて判定する。表示部44は情報を表示する。表示部44は例えば液晶ディスプレイでもよいし、有機ELディスプレイでもよい。通信部45は、無線または有線によるネットワークNWを介して他の機器と通信可能に接続し、各種のデータの送信および受信を行う。通信部45のハードウェア構成は第1通信部14-1及び通信部34と同様である。通信部45は、IoT装置10A-1、IoT装置10A-2及びIoT装置10A-3からメッセージ及び公開鍵を受信する。 The determination unit 43 determines whether or not the private key issued by at least one of the IoT device 10A-1, the IoT device 10A-2, and the IoT device 10A-3 has been stolen or misused, the private key, the public key, and the electronic signature. Judgment is based on. The display unit 44 displays information. The display unit 44 may be, for example, a liquid crystal display or an organic EL display. The communication unit 45 connects to other devices in a communicable manner via a wireless or wired network NW, and transmits and receives various data. The hardware configuration of the communication unit 45 is the same as that of the first communication unit 14-1 and the communication unit 34. The communication unit 45 receives a message and a public key from the IoT device 10A-1, the IoT device 10A-2, and the IoT device 10A-3.

図8は、本発明の第2実施形態におけるIoT装置10A-1及びサーバ装置40の動作を示すフローチャートである。IoT装置10A-1によるステップS2100からステップS2106までの動作は、図5におけるステップS100からステップS106までの動作と同様である。第2の実施形態において、IoT装置10A-1、IoT装置10A-2及びIoT装置10A-3はブロックチェーンを用いない。S2107において、第1通信部14-1はupdateMsg_(i,n) 及びupdateSignature_(i,n) を、ネットワークNW1を介してサーバ装置40に対して出力する。 FIG. 8 is a flowchart showing the operation of the IoT device 10A-1 and the server device 40 according to the second embodiment of the present invention. The operation from step S2100 to step S2106 by the IoT device 10A-1 is the same as the operation from step S100 to step S106 in FIG. In the second embodiment, the IoT device 10A-1, the IoT device 10A-2 and the IoT device 10A-3 do not use a blockchain. In S2107, the first communication unit 14-1 outputs updateMsg_ (i, n) and updateSignature_ (i, n) to the server device 40 via the network NW1.

サーバ装置40による動作は、第1の実施形態におけるスマートコントラクトによる動作と概ね類似する。本実施形態の処理主体について、特に断りのない限り第1実施形態における取得部21を取得部41に、処理部22を処理部42に、判定部24を判定部43に読み替えるものとする。 The operation by the server device 40 is substantially similar to the operation by the smart contract in the first embodiment. Unless otherwise specified, the processing unit of the present embodiment shall be read as the acquisition unit 21 in the first embodiment, the processing unit 22 as the processing unit 42, and the determination unit 24 as the determination unit 43.

ステップS2400及びステップS2401の動作は、スマートコントラクトによるステップS200及びステップS201の動作と同様である。ステップS2402において、通信部45はupdatetMsg_(i,n) 及びupdateSignature_(i,n) をIoT装置10A-1から取得する。通信部45は、処理をステップS2403に進める。 The operation of step S2400 and step S2401 is the same as the operation of step S200 and step S201 by the smart contract. In step S2402, the communication unit 45 acquires updatetMsg_ (i, n) and updateSignature_ (i, n) from the IoT device 10A-1. The communication unit 45 advances the process to step S2403.

ステップS2403からステップS2410の動作は、スマートコントラクトによるステップS203及びステップS210の動作とそれぞれ同様である。なお、本実施形態において、ステップS2406の処理は省いてもよい。 The operation from step S2403 to step S2410 is the same as the operation of step S203 and step S210 by the smart contract, respectively. In this embodiment, the process of step S2406 may be omitted.

以上説明した第2の実施形態に係るサーバ装置40は、ネットワークNWを介してIoT装置10A-1と通信する。サーバ装置40は、時刻に関する情報であるtimestamp_(i,n) 又は所定の検証プロセスの周期を示す第1のインデックスと、第1の秘密鍵sk_(i,n) に対応する第1の公開鍵pk_(i,n)と、を含むメッセージupdateMsg_(i,n) と、メッセージupdateMsg_(i,n)についてのハッシュ値に対して第2の秘密鍵sk_(i,n-1) を用いることにより生成された第1の電子署名updateSignature_(i,n) とを取得する取得部41を備える。updateMsg_(i,n) は、公開鍵pk_(i,n)の代わりに、公開鍵pk_(i,n)を特定可能なデータを含んでいてもよいし、公開鍵pk_(i,n) に加えて、公開鍵pk_(i,n)の生成に用いられる乱数値を含んでいてもよい。 The server device 40 according to the second embodiment described above communicates with the IoT device 10A-1 via the network NW. The server device 40 has a timestamp_ (i, n), which is information about the time, or a first index indicating the cycle of a predetermined verification process, and a first public key corresponding to the first private key sk_ (i, n). By using the second secret key sk_ (i, n-1) for the hash value for the message updateMsg_ (i, n) containing pk_ (i, n) and the message updateMsg_ (i, n). The acquisition unit 41 for acquiring the generated first electronic signature updateSignature_ (i, n) is provided. updateMsg_ (i, n) may contain data that can identify the public key pk_ (i, n) instead of the public key pk_ (i, n), or the public key pk_ (i, n). In addition, it may include a random value used to generate the public key pk_ (i, n).

サーバ装置40は、時刻に関する情報timestamp_(i,n) と、取得部41がupdateMsg_(i,n)又は第2のメッセージを取得する際に、updateMsg_(i,n)及びupdateSignature_(i,n)と、第2のメッセージおよび第2の電子署名と、のいずれかを第2の取得部が取得済みであることと、の少なくともいずれかに基づいて、前記第2の秘密鍵が不正利用されたことを判定する判定部43と、を備える。第2のメッセージは、第1の公開鍵pk_(i,n)または又は前記第1の公開鍵pk_(i,n)の生成に用いられる値を少なくとも含み、第2の電子署名は、第2のメッセージ及び第2の秘密鍵sk_(i,n-1)に基づいて生成され、第1の秘密鍵sk_(i,n)は前記第2の秘密鍵sk_(i,n-1)と異なる。
これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。
The server device 40 acquires the time information timestamp_ (i, n) and the updateMsg_ (i, n) or updateSignature_ (i, n) when the acquisition unit 41 acquires the updateMsg_ (i, n) or the second message. The second private key has been misused based on at least one of the second message and the second electronic signature that the second acquisition unit has already acquired. A determination unit 43 for determining that is provided. The second message contains at least the value used to generate the first public key pk_ (i, n) or the first public key pk_ (i, n), and the second digital signature is the second. Is generated based on the message of and the second private key sk_ (i, n-1), and the first private key sk_ (i, n) is different from the second private key sk_ (i, n-1). ..
This makes it possible to detect the theft or unauthorized use of the private key.

また、取得部41は、周期nにおいて、メッセージupdateMsg_(i,n)と、updateSignature_(i,n) とを取得し、周期n+1において、timestamp_(i,n+1) と、公開鍵pk_(i,n+1) とを含むupdateMsg_(i,n+1)と、updateMsg_(i,n+1)についてのハッシュ値に対して秘密鍵sk_(i,n) を用いることにより生成された第3の電子署名updateSignature_(i,n+1) とを取得し、nは整数であり、秘密鍵sk_(i,n+1) は前記第1の秘密鍵及び前記第2の秘密鍵と異なる。updateMsg_(i,n+1) は、公開鍵pk_(i,n+1)の代わりに、公開鍵pk_(i,n+1)を特定可能なデータを含んでいてもよいし、公開鍵pk_(i,n+1) に加えて、公開鍵pk_(i,n+1)の生成に用いられる乱数値を含んでいてもよい。
これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。
Further, the acquisition unit 41 acquires the message updateMsg_ (i, n) and updateSignature_ (i, n) in the cycle n, and the timestamp_ (i, n + 1) and the public key pk_ in the cycle n + 1. Generated by using the secret key sk_ (i, n) for the hash values for updateMsg_ (i, n + 1) including (i, n + 1) and updateMsg_ (i, n + 1). The third digital signature updateSignature_ (i, n + 1) is acquired, n is an integer, and the private key sk_ (i, n + 1) is different from the first secret key and the second secret key. .. updateMsg_ (i, n + 1) may contain data that can identify the public key pk_ (i, n + 1) instead of the public key pk_ (i, n + 1), or the public key pk_ In addition to (i, n + 1), it may contain a random value used to generate the public key pk_ (i, n + 1).
This makes it possible to detect the theft or unauthorized use of the private key.

また、timestamp_(i,n) が示す時刻がtimestamp_(i,n-1) が示す時刻と同じもしくはtimestamp_(i,n) が示す時刻がtimestamp_(i,n-1)が示す時刻より早い場合、又は前記第1のメッセージに前記インデックスが含まれる場合において前記第3のメッセージに含まれるインデックスから前記インデックスを減算した値が1でない場合、判定部24は秘密鍵sk_(i,n-1)が盗難ないし不正利用されたと判定する。
これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。
Also, when the time indicated by timestamp_ (i, n) is the same as the time indicated by timestamp_ (i, n-1) or the time indicated by timestamp_ (i, n) is earlier than the time indicated by timestamp_ (i, n-1). Or, when the index is included in the first message and the value obtained by subtracting the index from the index included in the third message is not 1, the determination unit 24 uses the secret key sk_ (i, n-1). Is determined to have been stolen or misused.
This makes it possible to detect the theft or unauthorized use of the private key.

<第3の実施形態>
本発明の第3の実施形態について、図面を参照して説明する。
図9は、本発明の第3実施形態における管理システム1の構成の一例を示す図である。管理システム1は、IoT装置10B-1、IoT装置10B-2、IoT装置10B-3、IoT装置10B-4、IoT装置10B-5、IoT装置10B-6、ネットワークNW及び出力装置30Bを備える。IoT装置10B-1、IoT装置10B-2、IoT装置10B-3、IoT装置10B-4、IoT装置10B-5及びIoT装置10B-6はそれぞれ、ネットワークNWを介して出力装置30Bに接続される。また、IoT装置10B-1~IoT装置10B-6はリング状の網構成を取っている。各IoT装置はNW経由でブロックチェーンに接続される。出力装置30の構成及び機能は第1の実施形態と同様である。なお、IoT装置10B-1~IoT装置10B-6の網構成はリング状に限られず、バス型でもよいし、いずれかの装置を起点とするスター型でもよいし、一部又はフルメッシュ構成でもよい。
<Third embodiment>
A third embodiment of the present invention will be described with reference to the drawings.
FIG. 9 is a diagram showing an example of the configuration of the management system 1 according to the third embodiment of the present invention. The management system 1 includes an IoT device 10B-1, an IoT device 10B-2, an IoT device 10B-3, an IoT device 10B-4, an IoT device 10B-5, an IoT device 10B-6, a network NW, and an output device 30B. The IoT device 10B-1, the IoT device 10B-2, the IoT device 10B-3, the IoT device 10B-4, the IoT device 10B-5, and the IoT device 10B-6 are each connected to the output device 30B via the network NW. .. Further, the IoT devices 10B-1 to the IoT devices 10B-6 have a ring-shaped network configuration. Each IoT device is connected to the blockchain via the NW. The configuration and function of the output device 30 are the same as those in the first embodiment. The network configuration of the IoT devices 10B-1 to IoT devices 10B-6 is not limited to the ring shape, and may be a bus type, a star type starting from any device, or a partial or full mesh configuration. good.

第3の実施形態において、各IoT装置は取得部11によって他のIoT装置を観測することにより、そのIoT装置の状態を示す状態情報を取得する。これにより、他のIoT装置がオンラインかオフラインかを確認することを、モニタと称してもよい。なお、IoT装置の電源が所定の期間において遮断されていない、かつネットワークとの接続を維持している状態をオンラインと称し、また、IoT装置の電源が所定の期間において遮断されている、またはネットワークから切断されている状態をオフラインと称する。図9において、各IoT装置は、反時計回り方向に接続されているIoT装置を観測する。例えば、IoT装置10B-2はIoT装置10B-1を観測し、取得部11によってIoT装置10B-1の状態情報を取得する。IoT装置10B-2は、通信部14を用いてIoT装置10B-1の状態情報を、通信部14を用いてネットワークNW経由でブロックチェーンに書き込む。 In the third embodiment, each IoT device acquires state information indicating the state of the IoT device by observing another IoT device by the acquisition unit 11. Checking whether another IoT device is online or offline by this may be referred to as a monitor. The state in which the power supply of the IoT device is not cut off for a predetermined period and the connection with the network is maintained is referred to as online, and the power supply of the IoT device is cut off for a predetermined period or the network. The state of being disconnected from is called offline. In FIG. 9, each IoT device observes an IoT device connected in the counterclockwise direction. For example, the IoT device 10B-2 observes the IoT device 10B-1 and acquires the state information of the IoT device 10B-1 by the acquisition unit 11. The IoT device 10B-2 uses the communication unit 14 to write the state information of the IoT device 10B-1 to the blockchain via the network NW using the communication unit 14.

同様に、IoT装置10B-3はIoT装置10B-2を観測し、取得部11によってIoT装置10B-2の状態情報を取得する。IoT装置10B-2は、IoT装置10B-1の状態情報を、通信部14を用いてブロックチェーンに書き込む。なお、各IoT装置は、隣接する両隣のIoT装置を観測してもよい。IoT装置10B-1は、IoT装置10B-2及びIoT装置10B-6の状態を観測し、取得部11によってそれぞれの状態情報を取得し、通信部14を用いてブロックチェーンに書き込んでもよい。他のIoT装置についても同様である。 Similarly, the IoT device 10B-3 observes the IoT device 10B-2, and the acquisition unit 11 acquires the state information of the IoT device 10B-2. The IoT device 10B-2 writes the state information of the IoT device 10B-1 into the blockchain using the communication unit 14. In addition, each IoT device may observe adjacent IoT devices on both sides. The IoT device 10B-1 may observe the states of the IoT device 10B-2 and the IoT device 10B-6, acquire the respective state information by the acquisition unit 11, and write the state information to the blockchain by using the communication unit 14. The same applies to other IoT devices.

スマートコントラクトが実装された装置ないしノードの取得部21は、出力装置30Bの通信部34から出力されるプログラムを取得し、記憶部23に記憶させる。処理部22は、記憶部23からプログラムを読み出し、これから述べる各種処理を実行し、また、取得部21及び判定部24に実行させる。なお、処理部22は、IDの指定を伴うコールによってプログラムを実行してもよい。 The acquisition unit 21 of the device or node on which the smart contract is mounted acquires the program output from the communication unit 34 of the output device 30B and stores it in the storage unit 23. The processing unit 22 reads a program from the storage unit 23, executes various processes described below, and causes the acquisition unit 21 and the determination unit 24 to execute the program. The processing unit 22 may execute the program by a call accompanied by the designation of the ID.

取得部21は、ブロックチェーンに書き込まれた各IoT装置の状態情報を取得する。処理部22は、各IoT装置自身が観測した状態情報に基づいて、その観測されたIoT装置の状態に応じた投票値である第1の値又は第2の値を生成する。第1の値は、IoT装置の電源が所定の期間内において遮断されていなかった又はIoT装置の秘密鍵が盗まれる等の不正利用されていなかったと判断されたときの投票値である。第1の値は例えばkでもよい。kは自然数でもよい。kは1でもよい。第2の値は、IoT装置の電源が所定の期間内において遮断されていた又はIoT装置の秘密鍵が盗まれる等の不正利用がされていたと判断されたときの投票値である。第2の値は例えば-kでもよいし、0でもよい。 The acquisition unit 21 acquires the state information of each IoT device written in the blockchain. The processing unit 22 generates a first value or a second value, which is a voting value according to the observed state of the IoT device, based on the state information observed by each IoT device itself. The first value is a voting value when it is determined that the power supply of the IoT device has not been shut off within a predetermined period or that the private key of the IoT device has not been illegally used such as being stolen. The first value may be, for example, k. k may be a natural number. k may be 1. The second value is a voting value when it is determined that the power supply of the IoT device has been cut off within a predetermined period or the private key of the IoT device has been stolen. The second value may be, for example, -k or 0.

図10は、本発明の第3実施形態における状態情報の集計方法の一例を示す図である。図10において、最も左に記載されているIoT装置は、観測される対象のIoT装置を示す。最も左に記載されているIoT装置の上に記載されている数字は、そのIoT装置についての投票値の合算値を示している。例えば、図10の1行目におけるIoT装置10B-1については投票値の合算値が5であることが示されている。 FIG. 10 is a diagram showing an example of a method for aggregating state information according to the third embodiment of the present invention. In FIG. 10, the IoT device described on the far left indicates the IoT device to be observed. The numbers above the IoT device on the far left indicate the sum of the voting values for that IoT device. For example, for the IoT device 10B-1 in the first row of FIG. 10, it is shown that the total value of the voting values is 5.

ここで、IoT装置10B-1~IoT装置10B-6はリング状の網構成を取っているので、各IoT装置は、隣接するIoT装置の状態情報を取得する。例えばIoT装置10B-1の状態を観測するのは、直接接続されるIoT装置10B-1である。IoT装置10B-2がIoT装置10B-1を観測した結果、IoT装置10B-1の状態情報(第1の状態情報)を取得し、スマートコントラクトが実装された装置ないしノードの取得部21はその状態情報を取得する。 Here, since the IoT devices 10B-1 to the IoT devices 10B-6 have a ring-shaped network configuration, each IoT device acquires the state information of the adjacent IoT devices. For example, it is the directly connected IoT device 10B-1 that observes the state of the IoT device 10B-1. As a result of the IoT device 10B-2 observing the IoT device 10B-1, the state information (first state information) of the IoT device 10B-1 is acquired, and the device or node acquisition unit 21 on which the smart contract is mounted acquires the state information (first state information). Get status information.

処理部22は、IoT装置10B-1の状態情報に基づいて、投票値として第1の値又は第2の値を生成する。図10において、処理部22は、IoT装置10B-1の状態情報に基づいてIoT装置10B-1の電源が所定の期間内において遮断されていなかったと判断し、第1の値として+1を生成する。 The processing unit 22 generates a first value or a second value as a voting value based on the state information of the IoT device 10B-1. In FIG. 10, the processing unit 22 determines that the power supply of the IoT device 10B-1 has not been cut off within a predetermined period based on the state information of the IoT device 10B-1, and generates +1 as the first value. ..

同様にIoT装置10B-3は、IoT装置10B-2を観測した結果、IoT装置10B-2の状態情報(第2の状態情報)を取得し、通信部14を用いてネットワークNW経由でブロックチェーンに書き込む。スマートコントラクトが実装された装置ないしノードの取得部21はその状態情報を取得する。 Similarly, the IoT device 10B-3 acquires the state information (second state information) of the IoT device 10B-2 as a result of observing the IoT device 10B-2, and uses the communication unit 14 to blockchain via the network NW. Write to. The acquisition unit 21 of the device or node on which the smart contract is mounted acquires the status information.

処理部22は、IoT装置10B-2の状態情報に基づいて、投票値として第1の値又は第2の値を生成する。図10において、処理部22は、IoT装置10B-2の状態情報に基づいてIoT装置10B-2の電源が所定の期間内において遮断されていなかったと判断し、第1の値として+1を生成する。 The processing unit 22 generates a first value or a second value as a voting value based on the state information of the IoT device 10B-2. In FIG. 10, the processing unit 22 determines that the power supply of the IoT device 10B-2 has not been cut off within a predetermined period based on the state information of the IoT device 10B-2, and generates +1 as the first value. ..

ここで、IoT装置10B-3がIoT装置10B-1の状態を観測する結果、IoT装置10B-1の状態情報として第3の状態情報を取得するものと仮定する。しかしながら、IoT装置10B-3はIoT装置10B-1に直接接続されていないため、IoT装置10B-3はIoT装置10B-1を直接観測できない。一方、IoT装置10B-2の電源は、所定の期間内において遮断されていなかったと判断されている。 Here, it is assumed that the IoT device 10B-3 observes the state of the IoT device 10B-1 and as a result, acquires the third state information as the state information of the IoT device 10B-1. However, since the IoT device 10B-3 is not directly connected to the IoT device 10B-1, the IoT device 10B-3 cannot directly observe the IoT device 10B-1. On the other hand, it is determined that the power supply of the IoT device 10B-2 has not been cut off within a predetermined period.

そこで、IoT装置10B-3がIoT装置10B-1を観測して取得すると想定していた第3の状態情報は、IoT装置10B-2がIoT装置10B-1を観測して取得した状態情報(第1の状態情報)が示す情報と同一であると、処理部22は解釈する。つまり、処理部22は、IoT装置10B-1の状態について、IoT装置10B-2が観測した結果を隣接IoT装置10B-3は引き継ぐと解釈する。その結果、IoT装置10B-3はIoT装置10B-1を観測した結果、IoT装置10B-1の電源は所定の期間内において遮断されていなかったと判断し、処理部22は第1の値として+1を生成する。 Therefore, the third state information assumed to be acquired by the IoT device 10B-3 by observing the IoT device 10B-1 is the state information acquired by the IoT device 10B-2 by observing the IoT device 10B-1. The processing unit 22 interprets that the information is the same as the information indicated by the first state information). That is, the processing unit 22 interprets that the adjacent IoT device 10B-3 takes over the result observed by the IoT device 10B-2 with respect to the state of the IoT device 10B-1. As a result, as a result of observing the IoT device 10B-1 by the IoT device 10B-3, it was determined that the power supply of the IoT device 10B-1 was not cut off within a predetermined period, and the processing unit 22 determined that the first value was +1. To generate.

IoT装置10B-1の状態に関する観測結果について、他の装置の観測によって得られる状態情報についても同様に、IoT装置10B-1の状態をIoT装置10B-2以外の他のIoT装置が観測したものとみなす。処理部22はIoT装置10B-2以外の他のIoT装置による観測結果についても、第1の値として+1を生成する。 Regarding the observation results regarding the state of the IoT device 10B-1, the state information obtained by the observation of other devices is also the same as that of the state of the IoT device 10B-1 observed by other IoT devices other than the IoT device 10B-2. Consider it as. The processing unit 22 also generates +1 as the first value for the observation results by the IoT device other than the IoT device 10B-2.

処理部22は、IoT装置10B-1の状態について、他のIoT装置からの観測結果に基づいて得られた投票値を全て加算した結果、値として+5を得る。 The processing unit 22 obtains +5 as a value as a result of adding all the voting values obtained based on the observation results from the other IoT devices with respect to the state of the IoT device 10B-1.

IoT装置10B-2も、同様に、IoT装置10B-3から直接観測される。IoT装置10B-2の状態について、IoT装置10B-3以外の他のIoT装置も、自装置が直接観測したIoT装置が取得した状態情報を引き継いだものとして、処理部22は投票値を生成する。処理部22は、生成した投票値を合算し、値として+5を得る。IoT装置10B-3~IoT装置10B-6が観測される場合も同様である。 Similarly, the IoT device 10B-2 is also observed directly from the IoT device 10B-3. Regarding the state of the IoT device 10B-2, the processing unit 22 generates a voting value assuming that the IoT devices other than the IoT device 10B-3 also inherit the state information acquired by the IoT device directly observed by the own device. .. The processing unit 22 adds up the generated voting values and obtains +5 as a value. The same applies when the IoT device 10B-3 to the IoT device 10B-6 are observed.

このように、電源が遮断されていないIoT装置が、隣接する他のIoT装置であって電源が遮断されていないIoT装置による観測結果を引き継ぐもの解釈することにより、処理部22は、各IoT装置が、他のIoT装置の状態を直接観測した場合と同一の観測結果を得ることが出来る。したがって、管理システム1におけるIoT装置の数が膨大になった場合であっても、少ない情報量と状態情報の取得手順とによって効率よく各IoT装置の状態を判断することが出来る。 In this way, by interpreting that the IoT device whose power supply is not cut off inherits the observation result of the IoT device which is another adjacent IoT device and whose power supply is not cut off, the processing unit 22 causes each IoT device. However, the same observation results as when directly observing the state of other IoT devices can be obtained. Therefore, even when the number of IoT devices in the management system 1 becomes enormous, the state of each IoT device can be efficiently determined by a small amount of information and a procedure for acquiring state information.

なお、各IoT装置は、観測した状態情報を所定期間内にスマートコントラクトが実装された装置ないしノードに出力する。この所定期間を仮に第1の期間とする。処理部22は、取得部21により取得された各IoT装置の状態情報に基づいて、所定期間内に第1の値又は第2の値の合算値を算出する。処理部22が第1の値又は第2の値の合算値を算出する期間を仮に第2の期間とする。第1の期間は第2の期間よりも短い。例えば、第1の期間は3分又は5分といった長さでもよい。第1の期間は、悪意を持った者がIoT装置を乗っ取るのに必要な時間が第1の期間の2倍以上の時間となるように設計される。一方、第2の期間は、数時間ないし1日といった長さでもよい。 Each IoT device outputs the observed state information to the device or node on which the smart contract is mounted within a predetermined period. This predetermined period is tentatively set as the first period. The processing unit 22 calculates the total value of the first value or the second value within a predetermined period based on the state information of each IoT device acquired by the acquisition unit 21. The period in which the processing unit 22 calculates the first value or the total value of the second values is tentatively set as the second period. The first period is shorter than the second period. For example, the first period may be as long as 3 or 5 minutes. The first period is designed so that the time required for a malicious person to hijack the IoT device is more than twice as long as the first period. On the other hand, the second period may be as long as several hours or one day.

処理部22は、この加算値の合計が大きいほど、各IoT装置の電源が遮断されていなかった可能性が高いと判定する。電源が遮断されていないと判断されるIoT装置のことを、仮にhealthyな装置であると表現する。電源が遮断されていた判断されるIoT装置のことを、compromisedな装置であると表現する。ここで、compromisedな装置は、何らかの悪意を持った者に攻撃を受けた結果、電源が遮断されていることがある。 The processing unit 22 determines that the larger the total of the added values, the higher the possibility that the power supply of each IoT device has not been cut off. An IoT device that is determined not to be powered off is tentatively referred to as a healthy device. The IoT device that is determined to have been cut off is referred to as a compromised device. Here, the powered device may be turned off as a result of being attacked by some malicious person.

healthyな装置は、healthyな装置を観測する際は、その観測される装置がhealthyな装置と判断されるような状態情報を取得する。また、healthyな装置は、compromisedな装置を観測する際は、その観測される装置がcompromisedな装置と判断されるような状態情報を取得する。 When observing a healthy device, a healthy device acquires state information such that the observed device is judged to be a healthy device. Further, when observing a compromised device, the healthy device acquires state information such that the observed device is determined to be a compromised device.

一方、compromisedな装置は、healthyな装置を観測する際は、その観測される装置がcompromisedな装置と判断されるような状態情報を取得及び生成する。また、compromisedな装置は、compromisedな装置を観測する際は、投票の信頼性の低下させるためにその観測される装置がhealthyな装置と判断されるような状態情報を取得及び生成する。 On the other hand, when observing a healthy device, the compromised device acquires and generates state information such that the observed device is judged to be a compromised device. Further, when observing a compromised device, the compromised device acquires and generates state information such that the observed device is judged to be a healthy device in order to reduce the reliability of voting.

ここで、管理システム1におけるIoT装置の総数がN、compromisedなデバイスの最大数がaの時、healthyなデバイスについての投票値の合算値の最小値は+1*(N-a-1)+0*a = N-a-1、compromisedなデバイスについての投票値の合算値の最大値は+1*(a-1)+0*(N-a) = a-1である。さらに、N-a-1 > a-1すなわちN>2aの時、sum_v1v2_hea>= N-a-1 > a-1 >= sum_v1v2_comという関係が成り立つ。ここで、sum_v1v2_heaは、healthyな装置についての投票値の合算値である。sum_v1v2_compは、compromisedな装置についての投票値の合算値である。 Here, when the total number of IoT devices in the management system 1 is N and the maximum number of compromised devices is a, the minimum value of the total voting values for healthy devices is + 1 * (N-a-1) + 0 *. a = N-a-1, the maximum sum of voting values for compromised devices is + 1 * (a-1) + 0 * (N-a) = a-1. Furthermore, when N-a-1> a-1 that is, N> 2a, the relationship sum_v1v2_hea> = N-a-1> a-1> = sum_v1v2_com holds. Here, sum_v1v2_hea is the sum of the voting values for healthy devices. sum_v1v2_comp is the sum of the voting values for the compromised device.

以上のことから、過半数のデバイスがhealthyという仮定が成り立つ時、投票値の合算値がN-a-1以上かa-1以下かを判定することにより、処理部22は、各IoT装置が、何らかの悪意を持った者に攻撃を受けた結果、装置の電源が遮断されていたか否かを検証することができる。上記のようなN-a-1及び a-1に基づいて装置がhealthyかcompromisedかを判断する手法は、以下の各実施形態においても同様に用いられてもよい。 From the above, when the assumption that the majority of devices are healthy is established, the processing unit 22 determines whether the total value of the voting values is N-a-1 or more or a-1 or less, and the processing unit 22 causes each IoT device to have some malicious intent. It is possible to verify whether or not the power of the device has been cut off as a result of being attacked by the person who holds the device. The method for determining whether the device is healthy or compromised based on N-a-1 and a-1 as described above may be similarly used in each of the following embodiments.

図11は、本発明の第3実施形態における管理システム1の構成の一例を示す図である。図11のシステム構成と図9のシステム構成との差異は、IoT装置10B-3及びIoT装置10B-4は悪意を持った者に攻撃を受けた結果、装置の電源が遮断されていたという点である。電源が遮断されていないIoT装置が他のIoT装置を観測し、状態情報を取得し、取得した状態情報をスマートコントラクトが実装された装置ないしノードに出力する動作について、図9の場合と差異は無い。 FIG. 11 is a diagram showing an example of the configuration of the management system 1 according to the third embodiment of the present invention. The difference between the system configuration of FIG. 11 and the system configuration of FIG. 9 is that the power of the IoT device 10B-3 and the IoT device 10B-4 was cut off as a result of being attacked by a malicious person. Is. The difference from the case of FIG. 9 is that the IoT device whose power is not cut off observes other IoT devices, acquires the state information, and outputs the acquired state information to the device or node on which the smart contract is mounted. There is no.

所定期間内において、IoT装置10B-4の電源が遮断されていた場合、IoT装置10B-5はIoT装置10B-4の状態情報を取得することが出来ない。そこで、IoT装置10B-5は電源が遮断されていない他のIoT装置を見つけるまで、他のIoT装置を観測し続ける。その結果、電源が遮断されていないIoT装置が取得する状態情報を引き継ぐ。例えば、IoT装置10B-3及びIoT装置10B-4の電源は遮断されている。そこでIoT装置10B-1の観測結果については、IoT装置10B-5はIoT装置10B-2がIoT装置10B-1を観測した結果取得した状態情報を取得部11によって取得することにより引き継ぐ。 If the power of the IoT device 10B-4 is cut off within a predetermined period, the IoT device 10B-5 cannot acquire the state information of the IoT device 10B-4. Therefore, the IoT device 10B-5 keeps observing the other IoT devices until it finds another IoT device whose power is not cut off. As a result, the state information acquired by the IoT device whose power supply is not cut off is inherited. For example, the power of the IoT device 10B-3 and the IoT device 10B-4 is cut off. Therefore, regarding the observation result of the IoT device 10B-1, the IoT device 10B-5 takes over by acquiring the state information acquired as a result of the observation of the IoT device 10B-1 by the IoT device 10B-2 by the acquisition unit 11.

ここで、IoT装置10B-3及びIoT装置10B-4は、悪意を持った者に乗っ取られている可能性がある。例えば、IoT装置10B-3は、IoT装置10B-2を観測する場合、IoT装置10B-2の電源が遮断されていると判断されるような状態情報を生成し、通信部14によって、スマートコントラクトが実装された装置ないしノードに出力する。IoT装置10B-4は、IoT装置10B-3を観測する際、IoT装置10B-3の電源が遮断されていないと判断されるような状態情報を生成し、スマートコントラクトが実装された装置ないしノードに出力する。 Here, the IoT device 10B-3 and the IoT device 10B-4 may be hijacked by a malicious person. For example, the IoT device 10B-3 generates state information such that when observing the IoT device 10B-2, it is determined that the power supply of the IoT device 10B-2 is cut off, and the communication unit 14 generates smart contracts. Is output to the device or node on which. When observing the IoT device 10B-3, the IoT device 10B-4 generates state information such that it is determined that the power supply of the IoT device 10B-3 is not cut off, and the device or node on which the smart contract is mounted. Output to.

図12は、本発明の第3実施形態における状態情報の集計方法の一例を示す図である。図12において、1行目は、IoT装置10B-1が観測対象である。IoT装置10B-2がIoT装置10B-1を観測した結果取得する状態情報に基づいて、処理部22は、IoT装置10B-2の観測によるIoT装置10B-1について、第1の値として+1を生成している。 FIG. 12 is a diagram showing an example of a method for aggregating state information according to the third embodiment of the present invention. In FIG. 12, the IoT device 10B-1 is the observation target in the first line. Based on the state information acquired as a result of the IoT device 10B-2 observing the IoT device 10B-1, the processing unit 22 sets +1 as the first value for the IoT device 10B-1 observed by the IoT device 10B-2. It is generating.

電源が所定期間において遮断されているIoT装置10B-3は、IoT装置10B-2によるIoT装置10B-1の観測結果を引き継がない。IoT装置10B-3は、IoT装置10B-1の電源が所定期間において遮断されていたということを示す状態情報を生成及び出力する。電源が所定期間において遮断されているIoT装置10B-3も同様に、IoT装置10B-1の電源が所定期間において遮断されていたということを示す状態情報を生成し、通信部14を用いることによって出力する。処理部22は、IoT装置10B-3及びIoT装置10B-4の観測によるIoT装置10B-1について、第2の値として0を生成している。 The IoT device 10B-3 whose power supply is cut off for a predetermined period does not inherit the observation result of the IoT device 10B-1 by the IoT device 10B-2. The IoT device 10B-3 generates and outputs state information indicating that the power supply of the IoT device 10B-1 has been cut off in a predetermined period. Similarly, the IoT device 10B-3 whose power supply is cut off in a predetermined period also generates state information indicating that the power supply of the IoT device 10B-1 has been cut off in a predetermined period, and by using the communication unit 14. Output. The processing unit 22 generates 0 as the second value for the IoT device 10B-1 observed by the IoT device 10B-3 and the IoT device 10B-4.

IoT装置10B-5は、IoT装置10B-2に接続されている。IoT装置10B-6は、IoT装置10B-5に接続されている。IoT装置10B-2、IoT装置10B-5及びIoT装置10B-6は、いずれもその電源が遮断されていない。そこで、IoT装置10B-5がIoT装置10B-1を観測して取得すると想定していた状態情報は、IoT装置10B-2がIoT装置10B-1を観測して取得した状態情報が示す情報と同一であると、処理部22は解釈する。IoT装置10B-6によるIoT装置10B-1の観測結果についても同様である。 The IoT device 10B-5 is connected to the IoT device 10B-2. The IoT device 10B-6 is connected to the IoT device 10B-5. The power of the IoT device 10B-2, the IoT device 10B-5, and the IoT device 10B-6 is not cut off. Therefore, the state information assumed that the IoT device 10B-5 observes and acquires the IoT device 10B-1 is the information indicated by the state information acquired by the IoT device 10B-2 observing the IoT device 10B-1. The processing unit 22 interprets that they are the same. The same applies to the observation results of the IoT device 10B-1 by the IoT device 10B-6.

以上より、IoT装置10B-1の状態について、処理部22は、各投票値を合算することにより、+1を取得する。IoT装置10B-1以外の他のIoT装置を観測する場合についても、処理部22は同様に投票値を合算する。その結果、処理部22は、IoT装置10B-2、IoT装置10B-5及びIoT装置10B-6については+3、IoT装置10B-3及びIoT装置10B-4については+1を生成する。この結果、処理部22は、IoT装置10B-3及びIoT装置10B-4はその電源が遮断されており、悪意を持った者に攻撃を受けたことを判断することが出来る。 From the above, regarding the state of the IoT device 10B-1, the processing unit 22 acquires +1 by adding up the voting values. When observing an IoT device other than the IoT device 10B-1, the processing unit 22 similarly adds up the voting values. As a result, the processing unit 22 generates +3 for the IoT device 10B-2, the IoT device 10B-5 and the IoT device 10B-6, and +1 for the IoT device 10B-3 and the IoT device 10B-4. As a result, the processing unit 22 can determine that the power of the IoT device 10B-3 and the IoT device 10B-4 is cut off and that the IoT device 10B-4 has been attacked by a malicious person.

以上説明してきたように、本実施形態に係る出力装置は、IoT装置10B-2(第2の装置の一例)の状態を示す状態情報(第1の状態情報の一例)及びIoT装置10B-1(第3の装置の一例)の状態を示す状態情報(第2の状態情報の一例)の少なくともいずれかを、IoT装置10B-3の通信部14(第1の通信部の一例)から取得する第1取得ステップと、第1の状態情報及び第2の状態情報の少なくともいずれかを出力する第1出力ステップと、前記IoT装置10B-1の状態を示す状態情報(第3の状態情報の一例)及びIoT装置10B-3(第1の装置の一例)の状態を示す状態情報(第4の状態情報の一例)の少なくともいずれかを、IoT装置10B-2の通信部14(第2の通信部の一例)から取得する第2取得ステップと、第3の状態情報及び第4の状態情報の少なくともいずれかを出力する第2出力ステップと、第1の装置の状態を示す状態情報(第5の状態情報の一例)及び第2の装置の状態を示す状態情報(第6の状態情報の一例)の少なくともいずれかを、IoT装置10B-1の通信部14(第3の通信部の一例)から取得する第3取得ステップと、第5の状態情報及び第6の状態情報の少なくともいずれかを出力する第3出力ステップと、第1出力ステップにおいて出力された第1の状態情報及び第2の状態情報の少なくともいずれか並びに第2出力ステップにおいて出力された第3の状態情報及び第4の状態情報の少なくともいずれかを取得する第4取得ステップと、第4の状態情報に基づいて、第1の装置が発行する秘密鍵が不正利用されたかを判定し、前記第1の状態情報に基づいて、前記第2の装置が発行する秘密鍵が不正利用されたかを判定し、前記第2の状態情報及び前記第3の状態情報の少なくともいずれかに基づいて、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する第1判定ステップと、のいずれかを、ブロックチェーンを構成するコンピュータに実行させるためのプログラムを出力する装置であって、
前記第1判定ステップにおいて、前記第2の状態情報が示す情報は前記第3の状態情報が示す情報と同一であると解釈することにより、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する。
As described above, the output device according to the present embodiment includes the state information (an example of the first state information) indicating the state of the IoT device 10B-2 (an example of the second device) and the IoT device 10B-1. At least one of the state information (an example of the second state information) indicating the state of (an example of the third device) is acquired from the communication unit 14 (an example of the first communication unit) of the IoT device 10B-3. A first acquisition step, a first output step that outputs at least one of a first state information and a second state information, and a state information indicating the state of the IoT device 10B-1 (an example of a third state information). ) And at least one of the state information (an example of the fourth state information) indicating the state of the IoT device 10B-3 (an example of the first device), the communication unit 14 (the second communication) of the IoT device 10B-2. The second acquisition step acquired from (an example of the part), the second output step for outputting at least one of the third state information and the fourth state information, and the state information (fifth) indicating the state of the first device. At least one of the state information indicating the state of the second device (an example of the sixth state information) and the communication unit 14 of the IoT device 10B-1 (an example of the third communication unit). A third acquisition step acquired from, a third output step that outputs at least one of the fifth state information and the sixth state information, and the first state information and the second output step in the first output step. The first is based on the fourth acquisition step of acquiring at least one of the state information and at least one of the third state information and the fourth state information output in the second output step, and the fourth state information. It is determined whether or not the private key issued by the second device has been illegally used, and based on the first state information, it is determined whether or not the private key issued by the second device has been illegally used. A blockchain is subjected to one of a first determination step of determining whether or not the private key issued by the third device has been illegally used based on at least one of the information and the third state information. A device that outputs a program to be executed by the constituent computers.
In the first determination step, by interpreting that the information indicated by the second state information is the same as the information indicated by the third state information, the private key issued by the third device is illegally used. Determine if it is.

このように、電源が遮断されていないIoT装置が、隣接する他のIoT装置であって電源が遮断されていないIoT装置による観測結果を引き継ぐもの解釈することにより、処理部22は、各IoT装置が、他のIoT装置の状態を直接観測した場合と同一の観測結果を得ることが出来る。したがって、管理システム1におけるIoT装置の数が膨大になった場合であっても、少ない情報量と状態情報の取得手順とによって効率よく各IoT装置の状態を判断することが出来る。 In this way, by interpreting that the IoT device whose power supply is not cut off inherits the observation result of the IoT device which is another adjacent IoT device and whose power supply is not cut off, the processing unit 22 causes each IoT device. However, the same observation results as when directly observing the state of other IoT devices can be obtained. Therefore, even when the number of IoT devices in the management system 1 becomes enormous, the state of each IoT device can be efficiently determined by a small amount of information and a procedure for acquiring state information.

また、スマートコントラクトが実装された装置ないしノードによって実行されるプログラムは、IoT装置10B-2(第2の装置の一例)の状態を示す状態情報(第1の状態情報の一例)、IoT装置10B-1(第3の装置の一例)の状態を示す状態情報(第2の状態情報の一例)、IoT装置10B-1の状態を示す状態情報(第3の状態情報の一例)及びIoT装置10B-3(第1の装置の一例)の状態を示す状態情報(第4の状態情報の一例)の少なくともいずれかに基づいては、第1の値又は第2の値を生成する第1生成ステップと、
前記第2の状態情報に基づく第1の値又は第2の値と、前記第3の状態情報に基づく第1の値又は第2の値と、を用いた演算を行うことにより、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する判定ステップと、をさらに備え、
前記第1の値は、前記第1の装置、前記第2の装置又は前記第3の装置の電源が所定の期間において遮断されていないと判断されていることを示し、
前記第2の値は、前記第1の装置、前記第2の装置又は前記第3の装置が前記所定の期間において遮断されていると判断されていることを示す。
Further, the programs executed by the device or node on which the smart contract is implemented are the state information (an example of the first state information) indicating the state of the IoT device 10B-2 (an example of the second device) and the IoT device 10B. -1 (an example of a third device) state information (an example of a second state information), a state information indicating the state of the IoT device 10B-1 (an example of a third state information), and an IoT device 10B. A first generation step of generating a first value or a second value based on at least one of the state information (an example of the fourth state information) indicating the state of -3 (an example of the first device). When,
The third value is calculated by performing an operation using the first value or the second value based on the second state information and the first value or the second value based on the third state information. Further provided with a determination step for determining whether or not the private key issued by the device of the device has been illegally used.
The first value indicates that it is determined that the power of the first device, the second device or the third device has not been cut off in a predetermined period.
The second value indicates that the first device, the second device or the third device has been determined to be shut down during the predetermined period.

このように、電源が遮断されていないIoT装置が、隣接する他のIoT装置であって電源が遮断されていないIoT装置による観測結果を引き継ぐもの解釈することにより、処理部22は、各IoT装置が、他のIoT装置の状態を直接観測した場合と同一の観測結果を得ることが出来る。したがって、管理システム1におけるIoT装置の数が膨大になった場合であっても、少ない情報量と状態情報の取得手順とによって効率よく各IoT装置の状態を判断することが出来る。 In this way, by interpreting that the IoT device whose power supply is not cut off inherits the observation result of the IoT device which is another adjacent IoT device and whose power supply is not cut off, the processing unit 22 causes each IoT device. However, the same observation results as when directly observing the state of other IoT devices can be obtained. Therefore, even when the number of IoT devices in the management system 1 becomes enormous, the state of each IoT device can be efficiently determined by a small amount of information and a procedure for acquiring state information.

また、本実施形態において、図9及び図11の出力装置30Bをサーバ装置40B(第4の装置の一例)に置き換えてもよい。この場合、管理システム1においてブロックチェーン、スマートコントラクト及びスマートコントラクトが実装された装置ないしノードは必ずしもなくてもよい。この場合、IoT装置10B-1~IoT装置10B-6の各々が観測する他のIoT装置に関する状態情報を、各IoT装置の通信部14がネットワークNWを介してサーバ装置40Bに対して出力する。 Further, in the present embodiment, the output device 30B of FIGS. 9 and 11 may be replaced with the server device 40B (an example of the fourth device). In this case, the management system 1 does not necessarily have to have a blockchain, a smart contract, and a device or node on which the smart contract is implemented. In this case, the communication unit 14 of each IoT device outputs the state information regarding the other IoT devices observed by each of the IoT devices 10B-1 to the IoT devices 10B-6 to the server device 40B via the network NW.

この場合、サーバ装置40Dの通信部45は、それらの状態情報を各IoT装置からネットワークNW経由で受信、取得部41はそれらの状態情報を取得する。本実施形態において記載した処理部22及び判定部24の動作を、サーバ装置40Dの処理部42及び判定部43がそれぞれ実行する。 In this case, the communication unit 45 of the server device 40D receives the status information from each IoT device via the network NW, and the acquisition unit 41 acquires the status information. The processing unit 42 and the determination unit 43 of the server device 40D execute the operations of the processing unit 22 and the determination unit 24 described in the present embodiment, respectively.

このように、電源が遮断されていないIoT装置が、隣接する他のIoT装置であって電源が遮断されていないIoT装置による観測結果を引き継ぐもの解釈することにより、処理部22は、各IoT装置が、他のIoT装置の状態を直接観測した場合と同一の観測結果を得ることが出来る。したがって、管理システム1におけるIoT装置の数が膨大になった場合であっても、少ない情報量と状態情報の取得手順とによって効率よく各IoT装置の状態を判断することが出来る。 In this way, by interpreting that the IoT device whose power supply is not cut off inherits the observation result of the IoT device which is another adjacent IoT device and whose power supply is not cut off, the processing unit 22 causes each IoT device. However, the same observation results as when directly observing the state of other IoT devices can be obtained. Therefore, even when the number of IoT devices in the management system 1 becomes enormous, the state of each IoT device can be efficiently determined by a small amount of information and a procedure for acquiring state information.

<第4の実施形態>
本発明の第4の実施形態について、図面を参照して説明する。
図13は、本発明の第4実施形態における秘密鍵の不正利用検出を示す概略図である。第4の実施形態において、デバイスi及びjの2つの装置が互いのデバイスを観測してもよいし、隣接するいずれかの装置のみを観測してもよい。例えば、デバイスjの隣にデバイスkが接続されている場合、デバイスiはデバイスjを観測し、デバイスjはデバイスkを観測してもよい。以下、デバイスiがデバイスjを観測し、デバイスjがデバイスkを観測する関係にある場合、デバイスiをデバイスjの観測デバイスであるといい、デバイスkをデバイスjの被観測デバイスであるという。デバイスiは、デバイスjを観測した結果、デバイスjの状態を含むメッセージと、そのメッセージ又はメッセージのハッシュ値を秘密鍵により作成した電子署名と、をブロックチェーンに書き込む。処理部22は、ブロックチェーンを参照することにより、デバイスが悪意を持った者に攻撃を受け、秘密鍵が盗まれ又は不正利用されたことを判断する。
<Fourth Embodiment>
A fourth embodiment of the present invention will be described with reference to the drawings.
FIG. 13 is a schematic diagram showing unauthorized use detection of a private key according to a fourth embodiment of the present invention. In the fourth embodiment, the two devices i and j may observe each other's devices, or only one of the adjacent devices may be observed. For example, when the device k is connected next to the device j, the device i may observe the device j and the device j may observe the device k. Hereinafter, when the device i observes the device j and the device j observes the device k, the device i is referred to as an observation device of the device j, and the device k is referred to as an observed device of the device j. As a result of observing the device j, the device i writes the message including the state of the device j and the electronic signature created by the secret key for the message or the hash value of the message in the blockchain. By referring to the blockchain, the processing unit 22 determines that the device has been attacked by a malicious person and the private key has been stolen or misused.

図14は、本発明の第4実施形態における管理システム1の構成の一例を示す図である。各IoT装置は、時計回り方向に隣接する他のIoT装置の状態を観測する点が図9及び図11と異なる。すなわち、図14においては、あるIoT機器に対して時計回り方向に隣接するIoT機器が被観測デバイスであり、反時計回り方向に隣接するIoT機器が観測デバイスである。なお、各IoT装置は、隣接する両隣のIoT装置を観測してもよい。IoT装置10B-1は、IoT装置10B-2及びIoT装置10B-6の状態を観測し、それぞれの状態情報を取得し、ブロックチェーンに書き込んでもよい。 FIG. 14 is a diagram showing an example of the configuration of the management system 1 according to the fourth embodiment of the present invention. Each IoT device differs from FIGS. 9 and 11 in that it observes the state of other IoT devices adjacent to each other in the clockwise direction. That is, in FIG. 14, the IoT device adjacent to a certain IoT device in the clockwise direction is the observed device, and the IoT device adjacent to the counterclockwise direction is the observation device. In addition, each IoT device may observe adjacent IoT devices on both sides. The IoT device 10B-1 may observe the states of the IoT device 10B-2 and the IoT device 10B-6, acquire the state information of each, and write the state information to the blockchain.

同様に、IoT装置10B-2は、IoT装置10B-3及びIoT装置10B-1の状態を観測し、それぞれの状態情報を取得してもよい。IoT装置10B-3は、IoT装置10B-2及びIoT装置10B-4の状態を観測し、それぞれの状態情報を取得し、ブロックチェーンに書き込んでもよい。他のIoT装置についても同様である。 Similarly, the IoT device 10B-2 may observe the states of the IoT device 10B-3 and the IoT device 10B-1 and acquire the respective state information. The IoT device 10B-3 may observe the states of the IoT device 10B-2 and the IoT device 10B-4, acquire the state information of each, and write the state information to the blockchain. The same applies to other IoT devices.

本実施形態において、IoT装置10B-2がIoT装置10B-3を観測するものとする。図13におけるデバイスi及びjは、それぞれIoT装置10B-2及びIoT装置10B-3に対応するものとする。IoT装置10B-2及びIoT装置10B-3の構成は第1実施形態と同様である。 In this embodiment, it is assumed that the IoT device 10B-2 observes the IoT device 10B-3. The devices i and j in FIG. 13 correspond to the IoT device 10B-2 and the IoT device 10B-3, respectively. The configuration of the IoT device 10B-2 and the IoT device 10B-3 is the same as that of the first embodiment.

図15、図16及び図17は、本発明の第4実施形態におけるIoT装置10及びスマートコントラクトの動作を示すフローチャートである。 15, 16 and 17 are flowcharts showing the operation of the IoT device 10 and the smart contract according to the fourth embodiment of the present invention.

ステップS4100~ステップS4104の動作は、第1実施形態におけるステップS100~ステップS104における動作と同様である。 The operation of steps S4100 to S4104 is the same as the operation of steps S100 to S104 in the first embodiment.

ステップS4105において、IoT装置10B-2の第2取得部11-2は、アップデートメッセージupdateMsg_(i,n)、アップデートメッセージupdateMsg_(i,n) のハッシュ値updateHash(i,n) に対する電子署名updateSignature_(i,n)を取得する。また、第2取得部11-2は、IoT装置10B-3から、updateHash_(j,n)、pk_(j,n) 及びupdateSignature_(j,n) を取得する。updateMsg_(i,n) は、IoT装置10B-2を識別する識別情報、周期nにおける公開鍵pk_(i,n)、周期nにおける状態情報state_(i,n)、周期nにおけるタイムスタンプtimestamp_(i,n)、updateMsgのインデックスを表すn及び前の周期で生成されたupdateMsg_(i,n-1)のハッシュ値updateHash_(i,n-1) を含む。updateMsg_(i,n) は、公開鍵pk_(i,n)の代わりに、公開鍵pk_(i,n)を特定可能なデータを含んでいてもよいし、公開鍵pk_(i,n) に加えて、公開鍵pk_(i,n)の生成に用いられる乱数値を含んでいてもよい。第2取得部11-2は、処理をステップS4106に進める。 In step S4105, the second acquisition unit 11-2 of the IoT device 10B-2 digitally signs the update message updateMsg_ (i, n) and the hash value updateHash (i, n) of the update message updateMsg_ (i, n). Get i, n). Further, the second acquisition unit 11-2 acquires updateHash_ (j, n), pk_ (j, n) and updateSignature_ (j, n) from the IoT device 10B-3. updateMsg_ (i, n) is the identification information that identifies the IoT device 10B-2, the public key pk_ (i, n) in the period n, the state information state_ (i, n) in the period n, and the time stamp timestamp_ (in the period n). It contains i, n), n representing the index of updateMsg, and the hash value updateHash_ (i, n-1) of updateMsg_ (i, n-1) generated in the previous cycle. updateMsg_ (i, n) may contain data that can identify the public key pk_ (i, n) instead of the public key pk_ (i, n), or the public key pk_ (i, n). In addition, it may include a random value used to generate the public key pk_ (i, n). The second acquisition unit 11-2 advances the process to step S4106.

ステップS4106において、第2処理部12-2は、演算VerifySignature(pk_(j,n-1), updateHash(j,n), updateSignature_(j,n)) を行う。 VerifySignatureの結果がtrueの場合、第2処理部12-2は処理をステップS4107に進める。VerifySignatureの結果がfalseの場合、第2処理部12-2は処理をステップS4108に進める。 In step S4106, the second processing unit 12-2 performs the operation VerifySignature (pk_ (j, n-1), updateHash (j, n), updateSignature_ (j, n)). If the result of VerifySignature is true, the second processing unit 12-2 advances the processing to step S4107. If the result of VerifySignature is false, the second processing unit 12-2 advances the processing to step S4108.

ステップS4107において、第2取得部11-2は、updateHash(j,n) を含む reportMsg_(i,n) を取得する。第2取得部11-2は、処理をステップS4108に進める。なお、reportMsgというメッセージは、所定の周期におけるデータ又はメッセージのハッシュ値と、そのハッシュ値に対して所定の周期における秘密鍵を用いて生成された電子署名とを含むものである。 In step S4107, the second acquisition unit 11-2 acquires reportMsg_ (i, n) including updateHash (j, n). The second acquisition unit 11-2 advances the process to step S4108. The message "reportMsg" includes a hash value of data or a message in a predetermined cycle and an electronic signature generated by using a secret key in a predetermined cycle for the hash value.

ステップS4108において、第2取得部11-2は、timestamp_(i,n) 及び状態情報 state_(i,n) を取得する。第2取得部11-2は処理をステップS4109に進める。 In step S4108, the second acquisition unit 11-2 acquires the timestamp_ (i, n) and the state information state_ (i, n). The second acquisition unit 11-2 advances the process to step S4109.

ステップS4109において、第2取得部11-2は、updateMsg_(i,n) 及び reportMsg_(i,n) を含むメッセージmsg_(i,n) を取得し、msg_(i,n)について秘密鍵sk_(i,n-1) による電子署名signature_(i,n) を取得する。第2取得部11-2は、updateMsg_(i,n) について、秘密鍵sk_(i,n-1) を用いて生成された電子署名updateSignature_(i,n) を取得してもよい。第2取得部11-2は処理をステップS4110に進める。 In step S4109, the second acquisition unit 11-2 acquires the message msg_ (i, n) including updateMsg_ (i, n) and reportMsg_ (i, n), and secret key sk_ (for msg_ (i, n). Obtain the digital signature signature_ (i, n) by i, n-1). The second acquisition unit 11-2 may acquire the digital signature updateSignature_ (i, n) generated by using the private key sk_ (i, n-1) for updateMsg_ (i, n). The second acquisition unit 11-2 advances the process to step S4110.

図16のステップS4110において、第2処理部12-2は、メッセージ (msg_(i,n)) 及び電子署名 (signature_ (i,n)) をブロックチェーンに書き込む。第2処理部12-2は、updateMsg_(i,n)及びupdateSignature_(i,n) だけをブロックチェーンに書き込んでもよい。なお、このタイミングで装置j(IoT装置10B-3)の第3処理部12-3も同様に、メッセージ (msg_(j,n))及び電子署名 (signature_(j,n)) をブロックチェーンに書き込む。メッセージmsg_(j,n) は、updateMsg_(j,n) 及び reportMsg_(j,n) を含む。updateMsg_(j,n) は、IoT装置10B-3を識別する識別情報と、周期nにおける公開鍵pk_(j,n) と、周期nにおける状態情報state_(j,n) と、周期nにおけるタイムスタンプtimestamp_(j,n)又はupdateMsgのインデックスを表すnとと、前の周期で生成されたupdateMsg_(j,n-1)のハッシュ値updateHash_(j,n-1) とを含む。updateMsg_(j,n) は、公開鍵pk_(j,n)の代わりに、公開鍵pk_(j,n)を特定可能なデータを含んでいてもよいし、公開鍵pk_(j,n) に加えて、公開鍵pk_(j,n)の生成に用いられる乱数値を含んでいてもよい。なお、signature_(j,n) は、第3処理部12-3がmsg_(j,n)について秘密鍵sk_(j,n-1) によって作成する電子署名である。第3処理部12-3は、updateMsg_(j,n) 及びupdateSignature_(j,n) のみをブロックチェーンに書き込んでもよい。第2処理部12-2は、処理をステップS4111に進める。 In step S4110 of FIG. 16, the second processing unit 12-2 writes a message (msg_ (i, n)) and a digital signature (signature_ (i, n)) to the blockchain. The second processing unit 12-2 may write only updateMsg_ (i, n) and updateSignature_ (i, n) to the blockchain. At this timing, the third processing unit 12-3 of the device j (IoT device 10B-3) also puts the message (msg_ (j, n)) and the electronic signature (signature_ (j, n)) into the blockchain. Write. The message msg_ (j, n) contains updateMsg_ (j, n) and reportMsg_ (j, n). updateMsg_ (j, n) contains the identification information that identifies the IoT device 10B-3, the public key pk_ (j, n) in the period n, the state information state_ (j, n) in the period n, and the time in the period n. It contains n representing the index of the stamp timestamp_ (j, n) or updateMsg and the hash value updateHash_ (j, n-1) of updateMsg_ (j, n-1) generated in the previous cycle. updateMsg_ (j, n) may contain data that can identify the public key pk_ (j, n) instead of the public key pk_ (j, n), or the public key pk_ (j, n). In addition, it may include a random value used to generate the public key pk_ (j, n). Note that signature_ (j, n) is an electronic signature created by the third processing unit 12-3 for msg_ (j, n) using the private key sk_ (j, n-1). The third processing unit 12-3 may write only updateMsg_ (j, n) and updateSignature_ (j, n) to the blockchain. The second processing unit 12-2 advances the processing to step S4111.

ステップS4111において、第2処理部12-2は処理をステップS4102に進める。 In step S4111, the second processing unit 12-2 advances the processing to step S4102.

次に、スマートコントラクトの動作を説明する。スマートコントラクトの概要は第1実施形態と同様である。nの初期値は1である。 Next, the operation of the smart contract will be described. The outline of the smart contract is the same as that of the first embodiment. The initial value of n is 1.

ステップS4200~ステップS4201の動作は、第1実施形態におけるステップS200~ステップS201の動作と同様である。一方、第1実施形態と比較して、IoT装置10B-2がブロックチェーンから読み込み、又はブロックチェーンに書き込むメッセージに含まれる情報が一部異なる。具体的には、第1実施形態の処理部22はupdateMsg_(i,n)をブロックチェーンに書き込むが、本実施形態の処理部22は、updateMsg_(i,n) とreportMsg_(i,n) を含むmsg_(i,n) をブロックチェーンに書き込んでもよい。 The operation of steps S4200 to S4201 is the same as the operation of steps S200 to S201 in the first embodiment. On the other hand, as compared with the first embodiment, the information contained in the message read from the blockchain or written to the blockchain by the IoT device 10B-2 is partially different. Specifically, the processing unit 22 of the first embodiment writes updateMsg_ (i, n) to the blockchain, but the processing unit 22 of the present embodiment writes updateMsg_ (i, n) and reportMsg_ (i, n). The including msg_ (i, n) may be written to the blockchain.

ステップS4202において、取得部21はmsg_(i,n-1)、signature_(i,n-1)、msg_(i,n)及びsignature_(i,n)を取得する。取得部21は、updateMsg_(i,n-1)、updateSignature_(i,n-1)、updateMsg_(i,n)及びupdateSignature_(i,n)のみを取得してもよい。 In step S4202, the acquisition unit 21 acquires msg_ (i, n-1), signature_ (i, n-1), msg_ (i, n) and signature_ (i, n). The acquisition unit 21 may acquire only updateMsg_ (i, n-1), updateSignature_ (i, n-1), updateMsg_ (i, n) and updateSignature_ (i, n).

ステップS4203からステップS4210までの動作は、第1実施形態におけるステップS203からステップS210までの動作と同様である。 The operation from step S4203 to step S4210 is the same as the operation from step S203 to step S210 in the first embodiment.

図17のステップS4211において、判定部24は、msg_(i,n) に含まれるreportMsg_(i,n)にupdateHash_(j,n-1)が含まれているかどうかを判定する。reportMsg_(i,n)にupdateHash_(j,n)が含まれている場合、判定部24は処理をステップS4212に進める。reportMsg_(i,n)にupdateHash_(j,n)が含まれていない場合、判定部24は処理をステップS4214に進める。 In step S4211 of FIG. 17, the determination unit 24 determines whether or not updateHash_ (j, n-1) is included in reportMsg_ (i, n) included in msg_ (i, n). If updateHash_ (j, n) is included in reportMsg_ (i, n), the determination unit 24 advances the process to step S4212. If updateHash_ (j, n) is not included in reportMsg_ (i, n), the determination unit 24 advances the process to step S4214.

ステップS4212において、判定部24は、updateHash_(j,n) と updateMsg_(j,n)のハッシュ値とが同じかどうかを判定する。updateHash_(j,n) と updateMsg_(j,n)のハッシュ値とが同じ場合、判定部24は処理をステップS4213に進める。updateHash_(j,n) と updateMsg_(j,n)のハッシュ値とが異なる場合、判定部24は処理をステップS4214に進める。 In step S4212, the determination unit 24 determines whether the hash values of updateHash_ (j, n) and updateMsg_ (j, n) are the same. If the hash values of updateHash_ (j, n) and updateMsg_ (j, n) are the same, the determination unit 24 advances the process to step S4213. If the hash values of updateHash_ (j, n) and updateMsg_ (j, n) are different, the determination unit 24 advances the process to step S4214.

ステップS4213において、IoT装置10B-2(デバイスi)がIoT装置10B-3(デバイスj)に対して賛成票を投票したと判定部24は判定し、判定結果の合算値を表す変数result_(i) に1を代入する。つまり、IoT装置10B-2の観測結果からは、IoT装置10B-3の電源は遮断されていないかつネットワークとの接続を維持していると判定部24は判定する。判定部24は、処理をステップS4215に進める。 In step S4213, the determination unit 24 determines that the IoT device 10B-2 (device i) has voted in favor of the IoT device 10B-3 (device j), and the determination unit 24 determines that the variable result_ (i) representing the total value of the determination results. ) Is assigned to 1. That is, from the observation result of the IoT device 10B-2, the determination unit 24 determines that the power supply of the IoT device 10B-3 is not cut off and the connection with the network is maintained. The determination unit 24 advances the process to step S4215.

ステップS4214において、IoT装置10B-2(デバイスi)がIoT装置10B-3(デバイスj)に対して反対票を投票したと判定部24は判定し、結果を表す変数result_(i) に0を合算する。iは観測を行う主体の装置を指す。つまり、IoT装置10B-2の観測結果からは、IoT装置10B-3の電源は遮断されているまたはネットワークから切断されていると判定部24は判定する。判定部24は、処理をステップS4215に進める。 In step S4214, the determination unit 24 determines that the IoT device 10B-2 (device i) has voted against the IoT device 10B-3 (device j), and sets 0 to the variable result_ (i) representing the result. Add up. i refers to the main device that makes the observation. That is, from the observation result of the IoT device 10B-2, the determination unit 24 determines that the power supply of the IoT device 10B-3 is cut off or disconnected from the network. The determination unit 24 advances the process to step S4215.

ステップS4215において、判定部24は、装置iに隣接する装置hであって、装置jではない方の装置(すなわち装置iの観測デバイス)の観測による判定結果result_(h)にresult_(i)を代入する。このことは、図14の例では、IoT装置10B-1によるIoT装置10B-3の観測結果が、IoT装置10B-2によるIoT装置10B-3の観測結果を引き継ぐことと等価である。判定部24は処理をステップS4216に進める。 In step S4215, the determination unit 24 sets the result_ (i) in the determination result result_ (h) by the observation of the device h adjacent to the device i and not the device j (that is, the observation device of the device i). substitute. This is equivalent to the observation result of the IoT device 10B-3 by the IoT device 10B-1 taking over the observation result of the IoT device 10B-3 by the IoT device 10B-2 in the example of FIG. The determination unit 24 advances the process to step S4216.

ステップS4216において、判定部24は、装置hの観測デバイスである装置gが装置j(装置iの被観測デバイス)ではないことを判断する。装置hの観測デバイスが装置jではない場合、処理をステップS4217に進める。装置hの観測デバイスgが装置jの場合、全ての集計が終了したことと判定部24は判断し、処理をステップS4218に進める。 In step S4216, the determination unit 24 determines that the device g, which is the observation device of the device h, is not the device j (the observed device of the device i). If the observation device of the device h is not the device j, the process proceeds to step S4217. When the observation device g of the device h is the device j, the determination unit 24 determines that all the aggregation has been completed, and proceeds to the process in step S4218.

ステップS4217において、判定部24は、装置hから離れる方向の隣接装置について、装置jに到達するまでステップS4213及びステップS4214と同様の処理を実行する。言い換えると、判定部24は、装置iの被観測デバイスに到達するまで、装置iから観測デバイスを再帰的にたどりながらステップS4213及びステップS4214と同様の処理を実行する。すなわち、IoT装置10B-3の状態について、IoT装置10B-4がIoT装置10B-5による観測結果を引き継ぎまで、ステップS4215及びステップS4216の処理を実行する。 In step S4217, the determination unit 24 executes the same processing as in steps S4213 and S4214 for the adjacent device in the direction away from the device h until it reaches the device j. In other words, the determination unit 24 performs the same processing as in steps S4213 and S4214 while recursively tracing the observation device from the device i until the device i reaches the observed device. That is, with respect to the state of the IoT device 10B-3, the processes of steps S4215 and S4216 are executed until the IoT device 10B-4 takes over the observation result by the IoT device 10B-5.

ステップS4218において、判定部24は、装置j以外の全ての装置による判定結果を取得する。言い換えると、IoT装置10B-3の状態について、IoT装置10B-1、IoT装置10B-2、及びIoT装置10B-4~IoT装置10B-6による判定結果を合算する。判定部24は処理をステップS4219に進める。 In step S4218, the determination unit 24 acquires the determination results of all the devices other than the device j. In other words, regarding the state of the IoT device 10B-3, the determination results by the IoT device 10B-1, the IoT device 10B-2, and the IoT device 10B-4 to the IoT device 10B-6 are added up. The determination unit 24 advances the process to step S4219.

ステップS4219において、判定部24は処理をステップS4200に進める。 In step S4219, the determination unit 24 advances the process to step S4200.

以上説明してきたように、本実施形態に係る出力装置において、スマートコントラクトが実装された装置ないしノードによって実行されるプログラムは、時刻に関する情報であるtimestamp_(i,n) (第1の時刻情報の一例)と、第1の秘密鍵sk_(i,n) に対応する第1の公開鍵pk_(i,n)又は前記第1の公開鍵pk_(i,n)の生成に用いられる値と、を含むメッセージmsg_(i,n) (第1のメッセージの一例)と、メッセージmsg_(i,n)についてのハッシュ値に対して第2の秘密鍵sk_(i,n-1) を用いることにより生成された第1の電子署名signature_(i,n) とを取得するステップと、メッセージmsg_(i,n) 及び第1の電子署名signature_(i,n) と、を出力するステップと、メッセージmsg_(i,n)、電子署名signature_(i,n)、第2のメッセージ及び第2の電子署名を取得するステップと、時刻に関する情報timestamp_(i,n)(第1の時刻情報の一例)と、msg_(i,n)又は第2のメッセージを取得する際に、msg_(i,n)及びsignature_(i,n)と、第2のメッセージおよび第2の電子署名と、のいずれかを取得済みであることと、の少なくともいずれかに基づいて、前記第2の秘密鍵が不正利用されたことを判定するステップと、を備え、第2のメッセージは、第1の公開鍵pk_(i,n) 又は前記第1の公開鍵pk_(i,n)の生成に用いられる値を少なくとも含み、第2の電子署名は、第2のメッセージ及び第2の秘密鍵sk_(i,n-1)に基づいて生成され、第1の秘密鍵sk_(i,n)は前記第2の秘密鍵sk_(i,n-1)と異なる。
これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。
As described above, in the output device according to the present embodiment, the program executed by the device or node on which the smart contract is implemented is time stamp_ (i, n) (first time information). (Example) and the value used to generate the first public key pk_ (i, n) corresponding to the first private key sk_ (i, n) or the first public key pk_ (i, n). By using the message msg_ (i, n) containing (an example of the first message) and the second secret key sk_ (i, n-1) for the hash value for the message msg_ (i, n). A step to acquire the generated first electronic signature signature_ (i, n), a step to output the message msg_ (i, n) and the first electronic signature signature_ (i, n), and a message msg_ (i, n), electronic signature signature_ (i, n), step to acquire the second message and the second electronic signature, and time stamp_ (i, n) (an example of the first time information). , Msg_ (i, n) or when retrieving the second message, either msg_ (i, n) and signature_ (i, n) and the second message and the second electronic signature. The second message comprises the first public key pk_ (i, n) or at least the value used to generate the first public key pk_ (i, n), the second electronic signature is the second message and the second private key sk_ (i, n-1). The first secret key sk_ (i, n) is different from the second secret key sk_ (i, n-1).
This makes it possible to detect the theft or unauthorized use of the private key.

また、本実施形態に係る出力装置において、スマートコントラクトが実装された装置ないしノードによって実行されるプログラムは、周期nにおいて、メッセージmsg_(i,n)(第1のメッセージの一例)と、signature_(i,n) (第1の電子署名の一例) とを取得し、周期n+1において、timestamp_(i,n+1) (時刻に関する第2の時刻情報の一例)と、公開鍵pk_(i,n+1) (第3の秘密鍵に対応する第3の公開鍵の一例)又は前記第3の公開鍵の生成に用いられる値とを含むmsg_(i,n+1)(第3のメッセージの一例)と、msg_(i,n+1)についてのハッシュ値に対して秘密鍵sk_(i,n) を用いることにより生成されたsignature_(i,n+1) とを取得し、nは整数であり、秘密鍵sk_(i,n+1)(第3の秘密鍵の一例) は前記第1の秘密鍵sk_(i,n)及び前記第2の秘密鍵sk_(i,n-1)と異なる。
これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。
Further, in the output device according to the present embodiment, the program executed by the device or node on which the smart contract is implemented is the message msg_ (i, n) (an example of the first message) and signature_ (in the cycle n). i, n) (an example of the first digital signature) is acquired, and in the cycle n + 1, timestamp_ (i, n + 1) (an example of the second time information regarding the time) and the public key pk_ (i). , n + 1) (an example of a third public key corresponding to a third private key) or msg_ (i, n + 1) (third) including a value used to generate the third public key. Get an example of a message) and the signature_ (i, n + 1) generated by using the private key sk_ (i, n) for the hash value for msg_ (i, n + 1), n Is an integer, and the secret key sk_ (i, n + 1) (an example of the third secret key) is the first secret key sk_ (i, n) and the second secret key sk_ (i, n-). Different from 1).
This makes it possible to detect the theft or unauthorized use of the private key.

また、本実施形態に係る出力装置において、第1のメッセージ(msg_(i,n)又はupdateMsg_(i,n))は、周期n-1におけるメッセージのハッシュ値(msg_(i,n-1)のハッシュ値又はupdateMsg_(i,n-1)のハッシュ値)をさらに含み、第3のメッセージ(msg_(i,n+1)又はupdateMsg_(i,n+1))は、前記第1のメッセージのハッシュ値をさらに含む。これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。 Further, in the output device according to the present embodiment, the first message (msg_ (i, n) or updateMsg_ (i, n)) is the hash value (msg_ (i, n-1)) of the message in the period n-1. The hash value of or the hash value of updateMsg_ (i, n-1)) is further included, and the third message (msg_ (i, n + 1) or updateMsg_ (i, n + 1)) is the first message. Further includes the hash value of. This makes it possible to detect the theft or unauthorized use of the private key.

また、本実施形態に係る出力装置において、スマートコントラクトが実装された装置ないしノードによって実行されるプログラムは、メッセージmsg_(j,n) (時刻に関する第4の時刻情報と、第4の秘密鍵に対応する第4の公開鍵pk_(j,n) 又は前記第4の公開鍵pk_(j,n)の生成に用いられる値と、を含む第4のメッセージの一例)と、電子署名signature_(j,n)(前記第4のメッセージについての第4のハッシュ値に対して第5の秘密鍵を用いることにより生成された第4の電子署名の一例)と、を出力する第5出力ステップと、メッセージmsg_(j,n)及び電子署名signature_(j,n)を取得する第9取得ステップと、IoT装置10B-3(第3の装置の一例)の電源が遮断されていない場合、前記第4の公開鍵pk_(j,n)、前記第4のハッシュ値(第4のメッセージのハッシュ値の一例)及び前記第4の電子署名を取得する第10取得ステップと、前記第4の電子署名が秘密鍵sk_(j,n-1)(前記第5の秘密鍵の一例)によって第4のハッシュ値に対して署名されていると判定した場合、第4のハッシュ値を第5のハッシュ値として第1のメッセージに含め、前記第1のメッセージを出力する第6出力ステップと、前記第1のメッセージに前記第5のハッシュ値が含まれない場合又は前記第4のメッセージに含まれる第4のハッシュ値が前記第5のハッシュ値と異なる場合、前記第3の装置の電源が遮断されていると判定する第3判定ステップと、を有し、前記第1のメッセージは少なくとも第4のハッシュ値(第3の状態情報の一例)を含み、前記第4の秘密鍵は前記第5の秘密鍵と異なる。
これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。
Further, in the output device according to the present embodiment, the program executed by the device or node on which the smart contract is implemented is the message msg_ (j, n) (the fourth time information regarding the time and the fourth secret key. An example of a fourth message containing the corresponding fourth public key pk_ (j, n) or the value used to generate the fourth public key pk_ (j, n)) and the electronic signature signature_ (j). , n) (an example of a fourth electronic signature generated by using the fifth secret key for the fourth hash value for the fourth message), and a fifth output step to output. When the ninth acquisition step for acquiring the message msg_ (j, n) and the electronic signature signature_ (j, n) and the power supply of the IoT device 10B-3 (an example of the third device) are not cut off, the fourth item is described above. The public key pk_ (j, n), the fourth hash value (an example of the hash value of the fourth message), the tenth acquisition step for acquiring the fourth electronic signature, and the fourth electronic signature are When it is determined that the fourth hash value is signed by the private key sk_ (j, n-1) (an example of the fifth secret key), the fourth hash value is used as the fifth hash value. A sixth output step to include in the first message and output the first message, and a fourth when the first message does not include the fifth hash value or is included in the fourth message. When the hash value is different from the fifth hash value, it has a third determination step of determining that the power of the third device is cut off, and the first message is at least a fourth hash value. The fourth secret key is different from the fifth secret key, including (an example of a third state information).
This makes it possible to detect the theft or unauthorized use of the private key.

<第5の実施形態>
本発明の第5の実施形態について、図面を参照して説明する。
図18は、本発明の第5実施形態における管理システム1の構成の一例を示す図である。本実施形態においては第4の実施形態の代わりにサーバ装置40Cを備える。サーバ装置40Cは、通信部45を用いることによりネットワークNWを介してIoT装置10C-1~IoT装置10C-6と通信する。サーバ装置40Cの構成は第2の実施形態と同様である。本実施形態において、第4の実施形態と異なり、秘密鍵の盗難等の不正利用及びIoT装置の電源遮断等をサーバ装置40Cが検出する。
<Fifth Embodiment>
A fifth embodiment of the present invention will be described with reference to the drawings.
FIG. 18 is a diagram showing an example of the configuration of the management system 1 according to the fifth embodiment of the present invention. In the present embodiment, the server device 40C is provided instead of the fourth embodiment. The server device 40C communicates with the IoT device 10C-1 to the IoT device 10C-6 via the network NW by using the communication unit 45. The configuration of the server device 40C is the same as that of the second embodiment. In the present embodiment, unlike the fourth embodiment, the server device 40C detects unauthorized use such as theft of the private key and power cutoff of the IoT device.

図19、図20及び図21は、本発明の第5実施形態におけるIoT装置10及びサーバ装置40Cの動作を示すフローチャートである。図19において、ステップS5100~ステップS5109の動作は第4の実施形態におけるステップS4100~ステップS4109の動作と同様である。 19, 20 and 21 are flowcharts showing the operation of the IoT device 10 and the server device 40C according to the fifth embodiment of the present invention. In FIG. 19, the operation of steps S5100 to S5109 is the same as the operation of steps S4100 to S4109 in the fourth embodiment.

図20のステップS5110において、IoT装置10C-2の通信部14は、メッセージ (msg_(i,n)) 及び電子署名 (signature_(i,n)) を出力する。通信部14は、updateMsg_(i,n)及びupdateSignature_(i,n) だけを出力してもよい。なお、このタイミングで装置j(IoT装置10B-3)の第3処理部12-3も同様に、メッセージ (msg_(j,n))及び電子署名 (signature_(j,n)) を出力する。メッセージmsg_(j,n) は、updateMsg_(j,n) 及び reportMsg_(j,n) を含む。updateMsg_(j,n) は、IoT装置10B-3を識別する識別情報と、周期nにおける公開鍵pk_(j,n) と、周期nにおける状態情報state_(j,n) と、周期nにおけるタイムスタンプtimestamp_(j,n)又はupdateMsgのインデックスを表すnと、前の周期で生成されたupdateMsg_(j,n-1)のハッシュ値updateHash_(j,n-1) とを含む。updateMsg_(j,n) は、公開鍵pk_(j,n)の代わりに、公開鍵pk_(j,n)を特定可能なデータを含んでいてもよいし、公開鍵pk_(j,n) に加えて、公開鍵pk_(j,n)の生成に用いられる乱数値を含んでいてもよい。通信部14は、処理をステップS5111に進める。 In step S5110 of FIG. 20, the communication unit 14 of the IoT device 10C-2 outputs a message (msg_ (i, n)) and an electronic signature (signature_ (i, n)). The communication unit 14 may output only updateMsg_ (i, n) and updateSignature_ (i, n). At this timing, the third processing unit 12-3 of the device j (IoT device 10B-3) also outputs a message (msg_ (j, n)) and an electronic signature (signature_ (j, n)). The message msg_ (j, n) contains updateMsg_ (j, n) and reportMsg_ (j, n). updateMsg_ (j, n) contains the identification information that identifies the IoT device 10B-3, the public key pk_ (j, n) in the period n, the state information state_ (j, n) in the period n, and the time in the period n. It contains n representing the index of the stamp timestamp_ (j, n) or updateMsg and the hash value updateHash_ (j, n-1) of updateMsg_ (j, n-1) generated in the previous cycle. updateMsg_ (j, n) may contain data that can identify the public key pk_ (j, n) instead of the public key pk_ (j, n), or the public key pk_ (j, n). In addition, it may include a random value used to generate the public key pk_ (j, n). The communication unit 14 advances the process to step S5111.

ステップS5111において、通信部14は処理をステップS5102に進める。次に、サーバ装置40Cの動作について説明する。 In step S5111, the communication unit 14 advances the process to step S5102. Next, the operation of the server device 40C will be described.

ステップS5400~ステップS54010の動作は、第2の実施形態におけるステップS2400~ステップS2410の動作と概ね同様である。一方、第2実施形態と比較して、IoT装置10C-2が出力し、サーバ装置40の取得部41が取得するするメッセージは、第2実施形態におけるupdateMsg_(i,n) にreportMsg_(i,n) を加えたmsg_(i,n) を含む。なお、取得部41は、updateMsg_(i,n)、reportMsg_(i,n)を別々に受信してもよく、さらにupdateMsg_(i,n)について秘密鍵sk_(i,n-1) によって作成した電子署名updateSignature_(i,n) を取得してもよい。 The operation of steps S5400 to S54010 is substantially the same as the operation of steps S2400 to S2410 in the second embodiment. On the other hand, as compared with the second embodiment, the message output by the IoT device 10C-2 and acquired by the acquisition unit 41 of the server device 40 is reportedMsg_ (i, n) in updateMsg_ (i, n) in the second embodiment. Includes msg_ (i, n) with n) added. The acquisition unit 41 may receive updateMsg_ (i, n) and reportMsg_ (i, n) separately, and further, updateMsg_ (i, n) is created by the private key sk_ (i, n-1). The digital signature updateSignature_ (i, n) may be obtained.

図21のステップS5411~ステップS5419における動作は、第4の実施形態におけるスマートコントラクトが実装されたノードないし装置によるステップS4211~ステップS4219における動作と同様であるが、本実施形態においては判定処理を実行する主体が判定部43である点が第4の実施形態と異なる。 The operation in steps S5411 to S5419 of FIG. 21 is the same as the operation in steps S4211 to S4219 by the node or device on which the smart contract is implemented in the fourth embodiment, but in the present embodiment, the determination process is executed. It is different from the fourth embodiment in that the subject to perform is the determination unit 43.

以上説明した第5の実施形態に係るサーバ装置40Cは、ネットワークNWを介してIoT装置10C-1~IoT装置10C-6と通信する。IoT装置10C-1~IoT装置10C-6の取得部11は、時刻に関する第1の時刻情報又は所定の検証プロセスの周期を示す第1のインデックスと、第1の秘密鍵に対応する第1の公開鍵又は前記第1の公開鍵の生成に用いられる値と、を含む第1のメッセージと、前記第1のメッセージについての第1のハッシュ値に対して第2の秘密鍵を用いることにより生成された第1の電子署名とを取得する。IoT装置10C-1~IoT装置10C-6の通信部14は、前記第1のメッセージ、前記第1の電子署名を出力する。 The server device 40C according to the fifth embodiment described above communicates with the IoT devices 10C-1 to the IoT devices 10C-6 via the network NW. The acquisition unit 11 of the IoT device 10C-1 to the IoT device 10C-6 has a first index indicating the first time information regarding the time or a predetermined verification process cycle, and a first index corresponding to the first private key. Generated by using a first message containing the public key or the value used to generate the first public key, and a second private key for the first hash value for the first message. Obtain the first electronic signature that has been made. The communication unit 14 of the IoT device 10C-1 to the IoT device 10C-6 outputs the first message and the first electronic signature.

サーバ装置40は、時刻に関する情報であるtimestamp_(i,n) と、第1の秘密鍵sk_(i,n) に対応する第1の公開鍵pk_(i,n) 又は前記第1の公開鍵pk_(i,n)の生成に用いられる値と、を含むメッセージmsg_(i,n) と、メッセージmsg_(i,n)についてのハッシュ値(第1のハッシュ値の一例)に対して第2の秘密鍵sk_(i,n-1) を用いることにより生成された第1の電子署名signature_(i,n) とを取得する取得部41(第4取得部の一例)を備える。 The server device 40 has a timestamp_ (i, n) which is information about the time, a first public key pk_ (i, n) corresponding to the first private key sk_ (i, n), or the first public key. A second for the message msg_ (i, n) containing the value used to generate pk_ (i, n) and the hash value for the message msg_ (i, n) (an example of the first hash value). It is provided with an acquisition unit 41 (an example of a fourth acquisition unit) for acquiring a first electronic signature signature_ (i, n) generated by using the private key sk_ (i, n-1) of.

サーバ装置40は、時刻に関する情報timestamp_(i,n) と、取得部41がmsg_(i,n)又は第2のメッセージを取得する際に、msg_(i,n)及びsignature_(i,n)と、第2のメッセージおよび第2の電子署名と、のいずれかを第2の取得部が取得済みであることと、の少なくともいずれかに基づいて、第2の秘密鍵が不正利用されたことを判定する判定部43(第4判定部の一例)と、を備える。つまり、判定部43は、以下の何れかの処理によって、第2の秘密鍵の不正利用の判定を行う。
・判定部43は、timestamp_(i,n)に基づいて第2の秘密鍵が不正利用されたことを判定する。
・判定部43は、取得部がmsg(i,n)を取得する際に、第2の取得部がmsg(i,n)及びsignature(i,n)を取得済みであることに基づいて第2の秘密鍵が不正利用されたことを判定する。
・判定部43は、取得部が第2のメッセージを取得する際に、第2の取得部が第2のメッセージ及び第2の電子署名を取得済みであることに基づいて第2の秘密鍵が不正利用されたことを判定する。
The server device 40 acquires the time information timestamp_ (i, n) and the msg_ (i, n) or signature_ (i, n) when the acquisition unit 41 acquires the msg_ (i, n) or the second message. The second private key has been misused based on at least one of the fact that the second acquisition unit has already acquired one of the second message and the second electronic signature. A determination unit 43 (an example of a fourth determination unit) for determining the above is provided. That is, the determination unit 43 determines the unauthorized use of the second private key by any of the following processes.
-The determination unit 43 determines that the second private key has been illegally used based on the timestamp_ (i, n).
The determination unit 43 is based on the fact that when the acquisition unit acquires msg (i, n), the second acquisition unit has already acquired msg (i, n) and signature (i, n). Determine that the private key of 2 has been illegally used.
-When the acquisition unit acquires the second message, the determination unit 43 obtains the second secret key based on the fact that the second acquisition unit has acquired the second message and the second electronic signature. Determine that it has been abused.

第2のメッセージは、第1の公開鍵pk_(i,n) 又は前記第1の公開鍵pk_(i,n)の生成に用いられる値を少なくとも含み、第2の電子署名は、第2のメッセージ及び第2の秘密鍵sk_(i,n-1)に基づいて生成され、第1の秘密鍵sk_(i,n)は前記第2の秘密鍵sk_(i,n-1)と異なる。
これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。
The second message contains at least the value used to generate the first public key pk_ (i, n) or the first public key pk_ (i, n), and the second digital signature is the second. It is generated based on the message and the second private key sk_ (i, n-1), and the first private key sk_ (i, n) is different from the second private key sk_ (i, n-1).
This makes it possible to detect the theft or unauthorized use of the private key.

また、取得部41は、周期nにおいて、メッセージmsg_(i,n)と、signature_(i,n) とを取得し、周期n+1において、timestamp_(i,n+1) と、公開鍵pk_(i,n+1) 又はその公開鍵pk_(i,n+1)の生成に用いられる値 とを含むmsg_(i,n+1)と、msg_(i,n+1)についてのハッシュ値に対して秘密鍵sk_(i,n) を用いることにより生成されたsignature_(i,n+1) とを取得する。nは整数であり、秘密鍵sk_(i,n+1) は第1の秘密鍵sk_(i,n)及び第2の秘密鍵sk_(i,n-1)と異なる。
これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。
Further, the acquisition unit 41 acquires the message msg_ (i, n) and signature_ (i, n) in the cycle n, and the timestamp_ (i, n + 1) and the public key pk_ in the cycle n + 1. Hash values for msg_ (i, n + 1), including (i, n + 1) or the value used to generate its public key pk_ (i, n + 1), and msg_ (i, n + 1) To get the signature_ (i, n + 1) generated by using the private key sk_ (i, n). n is an integer and the private key sk_ (i, n + 1) is different from the first secret key sk_ (i, n) and the second secret key sk_ (i, n-1).
This makes it possible to detect the theft or unauthorized use of the private key.

また、本実施形態において、第1のメッセージは、周期n-1におけるメッセージのハッシュ値をさらに含んでもよく、第3のメッセージは、前記第1のメッセージのハッシュ値をさらに含んでもよい。これにより、秘密鍵の盗難ないし不正利用を検出することが可能になる。 Further, in the present embodiment, the first message may further include the hash value of the message in the period n-1, and the third message may further include the hash value of the first message. This makes it possible to detect the theft or unauthorized use of the private key.

また、本実施形態に係る管理システム1において、IoT装置10C-3の通信部14(第3通信部の一例)は、メッセージmsg_(j,n) (時刻に関する第4の時刻情報と、第4の秘密鍵に対応する第4の公開鍵pk_(j,n) 又は前記第4の公開鍵pk_(j,n)の生成に用いられる値と、を含む第4のメッセージの一例)と、電子署名signature_(j,n)(前記第4のメッセージについての第4のハッシュ値に対して第5の秘密鍵を用いることにより生成された第4の電子署名の一例)と、を出力する。取得部41(第4取得部の一例)は、メッセージmsg_(j,n)及び電子署名signature_(j,n)を取得する。IoT装置10C-3(第3の装置の一例)の電源が遮断されていない場合、IoT装置10C-2の取得部11は、第4の公開鍵pk_(j,n) 又は前記第4の公開鍵pk_(j,n)の生成に用いられる値、第4のハッシュ値(第4のメッセージのハッシュ値の一例)及び第4の電子署名を取得する。第4の電子署名が秘密鍵sk_(j,n-1)(第5の秘密鍵の一例)によって第4のハッシュ値に対して署名されている場合、IoT装置10C-2の通信部14(第2通信部の一例)は、第4のハッシュ値を第5のハッシュ値として第1のメッセージに含め、第1のメッセージを出力する。第1のメッセージに第5のハッシュ値が含まれない場合又は第4のメッセージに含まれる第4のハッシュ値が第5のハッシュ値と異なる場合、判定部43(第4判定部の一例)は、第3の装置の電源が遮断されていると判定する。第1のメッセージは少なくとも第4のハッシュ値(第3の状態情報の一例)を含み、第4の秘密鍵は第5の秘密鍵と異なる。
これにより、秘密鍵の盗難ないし不正利用、IoT装置の電源が遮断されていたこと又はIoT装置が乗っ取られたことを検出することが可能になる。
Further, in the management system 1 according to the present embodiment, the communication unit 14 (an example of the third communication unit) of the IoT device 10C-3 has a message msg_ (j, n) (fourth time information regarding time and a fourth time information). An example of a fourth message (an example of a fourth message) including a fourth public key pk_ (j, n) corresponding to the private key of the above or a value used to generate the fourth public key pk_ (j, n), and an electronic. The signature signature_ (j, n) (an example of the fourth electronic signature generated by using the fifth private key for the fourth hash value for the fourth message) is output. The acquisition unit 41 (an example of the fourth acquisition unit) acquires the message msg_ (j, n) and the electronic signature signature_ (j, n). When the power of the IoT device 10C-3 (an example of the third device) is not cut off, the acquisition unit 11 of the IoT device 10C-2 uses the fourth public key pk_ (j, n) or the fourth public key. Obtain the value used to generate the key pk_ (j, n), the fourth hash value (an example of the hash value of the fourth message), and the fourth digital signature. When the fourth digital signature is signed for the fourth hash value by the private key sk_ (j, n-1) (an example of the fifth secret key), the communication unit 14 of the IoT device 10C-2 ( The second communication unit) includes the fourth hash value as the fifth hash value in the first message, and outputs the first message. If the first message does not include the fifth hash value, or if the fourth hash value contained in the fourth message is different from the fifth hash value, the determination unit 43 (an example of the fourth determination unit) , It is determined that the power supply of the third device is cut off. The first message contains at least a fourth hash value (an example of a third state information), and the fourth secret key is different from the fifth secret key.
This makes it possible to detect the theft or unauthorized use of the private key, that the power of the IoT device has been cut off, or that the IoT device has been hijacked.

<第6の実施形態>
本発明の第6の実施形態について、図面を参照して説明する。
図22、23及び24は、本発明の第6実施形態におけるIoT装置10の動作を示すフローチャートである。図25及び26は、本発明の第6実施形態におけるサーバ装置40の動作を示すフローチャートである。本実施形態において、IoT装置10C-1~IoT装置10C-6は、図18のように論理的に接続されているものとする。
<Sixth Embodiment>
A sixth embodiment of the present invention will be described with reference to the drawings.
22, 23 and 24 are flowcharts showing the operation of the IoT device 10 according to the sixth embodiment of the present invention. 25 and 26 are flowcharts showing the operation of the server device 40 according to the sixth embodiment of the present invention. In the present embodiment, it is assumed that the IoT device 10C-1 to the IoT device 10C-6 are logically connected as shown in FIG.

本実施形態において、IoT装置10C-1~IoT装置10C-6には、装置各々を識別するための固有の識別子が付与されている。この識別子をデバイスIDと称してもよい。デバイスIDは、装置の番号に応じて昇順に付される。例えば、IoT装置10C-1の装置IDは1、IoT装置10C-2の装置IDは2で、IoT装置10C-6の装置IDは6であるとする。なお、装置IDの付与方法はこれに限られず、IoT装置10C-1の装置IDは101、IoT装置10C-2の装置IDは102で、IoT装置10C-6の装置IDは106でもよい。 In the present embodiment, the IoT device 10C-1 to the IoT device 10C-6 are given a unique identifier for identifying each device. This identifier may be referred to as a device ID. Device IDs are assigned in ascending order according to the device number. For example, it is assumed that the device ID of the IoT device 10C-1 is 1, the device ID of the IoT device 10C-2 is 2, and the device ID of the IoT device 10C-6 is 6. The method of assigning the device ID is not limited to this, and the device ID of the IoT device 10C-1 may be 101, the device ID of the IoT device 10C-2 may be 102, and the device ID of the IoT device 10C-6 may be 106.

各IoT装置は、自身の装置IDより1つ大きい装置IDのIoT装置を最初にモニタする。例えば、IoT装置10C-1はIoT装置10C-2を最初にモニタし、IoT装置10C-2はIoT装置10C-3を最初にモニタし、IoT装置10C-5はIoT装置10C-6を最初にモニタする。なお、自身の装置IDよりも大きい装置IDが付与されたIoT装置が無い場合、最小の装置IDが付されたIoT装置をモニタしてもよい。例えば、IoT装置10C-6は、IoT装置10C-1をモニタしてもよい。 Each IoT device first monitors an IoT device with a device ID that is one greater than its own device ID. For example, the IoT device 10C-1 monitors the IoT device 10C-2 first, the IoT device 10C-2 monitors the IoT device 10C-3 first, and the IoT device 10C-5 monitors the IoT device 10C-6 first. Monitor. If there is no IoT device with a device ID larger than its own device ID, the IoT device with the smallest device ID may be monitored. For example, the IoT device 10C-6 may monitor the IoT device 10C-1.

例えば、装置IDが2のIoT装置10C-2がオフラインであったり通信が検閲されたりした場合、第1処理部12-1は、その装置を今周期にすでにモニタしたもののオンラインと認められなかった装置であることを示す情報をIoT装置10C-1の第1記憶部15-1に保存する。ここで、検閲とは、装置に対する攻撃者(攻撃主体)が、攻撃対象の装置の通信内容(客体)を傍受し、攻撃対象の装置がブロックチェーンのノードにメッセージを書き込むこと、又はサーバ装置40にメッセージを送信することを妨害することを意味するものとする。その結果、ノード又はサーバ装置は、攻撃対象の装置からのメッセージを受信することが出来なくなる。 For example, if the IoT device 10C-2 with device ID 2 is offline or the communication is censored, the first processing unit 12-1 has already monitored the device in this cycle but is not recognized as online. Information indicating that the device is a device is stored in the first storage unit 15-1 of the IoT device 10C-1. Here, censorship means that an attacker (attacker) against a device intercepts the communication content (object) of the device to be attacked, and the device to be attacked writes a message to a node of the blockchain, or the server device 40. It shall mean that it interferes with sending a message to. As a result, the node or server device cannot receive the message from the device targeted for attack.

ステップS6100~ステップS6104の動作はステップS100~ステップS104の動作と同様である。なお、ステップS6100の処理を開始する段階で、IoT装置10C-2はIoT装置10C-4の公開鍵を取得しているものとする。 The operation of steps S6100 to S6104 is the same as the operation of steps S100 to S104. It is assumed that the IoT device 10C-2 has acquired the public key of the IoT device 10C-4 at the stage of starting the process of step S6100.

ステップS6105において、第2取得部11-2はupdateMsg_(i,n) と、updateMsg_(i,n) のハッシュ値であるupdateHash_(i,n) と、updateSignature_(i,n) とを取得する。updateSignature_(i,n) は、updateHash_(i,n) について秘密鍵sk_(i,n-1) を用いて第2処理部12-2が作成した電子署名である。 In step S6105, the second acquisition unit 11-2 acquires updateMsg_ (i, n), updateHash_ (i, n), which is a hash value of updateMsg_ (i, n), and updateSignature_ (i, n). updateSignature_ (i, n) is an electronic signature created by the second processing unit 12-2 for updateHash_ (i, n) using the private key sk_ (i, n-1).

ステップS6106において、周期nにおいてIoT装置10C-2がまだ直接モニタしていない他のIoT装置のうち、自身の装置IDより大きく、かつ自身の装置IDとの差の絶対値が最も小さい装置IDが付与されている他のIoT装置の装置IDを取得する。ただし、そのようなIDが存在しない場合、周期nにおいてIoT装置10C-2がまだ直接モニタしていない他のIoT装置のうち、自身の装置IDより小さく、かつ自身の装置IDとの差の絶対値が最も小さい装置IDが付与されている他のIoT装置の装置IDを取得する。この場合、IoT装置10C-3がこの条件を満たせば、IoT装置10C-3の装置IDを第2取得部11-2は取得する。なお、IoT装置10C-3の装置IDは3である。第2取得部11-2は、処理をステップS6107に進める。 In step S6106, among the other IoT devices that the IoT device 10C-2 has not yet directly monitored in the cycle n, the device ID that is larger than its own device ID and has the smallest absolute value of the difference from its own device ID is Acquire the device ID of another assigned IoT device. However, if such an ID does not exist, it is smaller than its own device ID among other IoT devices that the IoT device 10C-2 has not yet directly monitored in period n, and the absolute difference from its own device ID is absolute. Acquires the device ID of another IoT device to which the device ID with the smallest value is assigned. In this case, if the IoT device 10C-3 satisfies this condition, the second acquisition unit 11-2 acquires the device ID of the IoT device 10C-3. The device ID of the IoT device 10C-3 is 3. The second acquisition unit 11-2 advances the process to step S6107.

ステップS6107において、モニタ周期nで、装置IDが3の装置j(IoT装置10C-3)の公開鍵pk_(j,n-1) が第2記憶部15-2に記録されているか否かを第2処理部12-2は判定する。公開鍵pk_(j,n-1) が第2記憶部15-2に記録されている場合、第2処理部12-2は処理をステップS6108に進める。公開鍵pk_(j,n-1) が第2記憶部15-2に記録されていない場合、第2処理部12-2は処理をステップS6109に進める。 In step S6107, it is determined whether or not the public key pk_ (j, n-1) of the device j (IoT device 10C-3) having the device ID of 3 is recorded in the second storage unit 15-2 in the monitor cycle n. The second processing unit 12-2 determines. When the public key pk_ (j, n-1) is recorded in the second storage unit 15-2, the second processing unit 12-2 advances the processing to step S6108. If the public key pk_ (j, n-1) is not recorded in the second storage unit 15-2, the second processing unit 12-2 advances the processing to step S6109.

ステップS6108において、装置i(IoT装置10C-2)の第2通信部14-2は、装置j(IoT装置10C-3)に対して、モニタ開始フラグ及びIoT装置10C-2装置自身の今周期の公開鍵pk_(i,n-1) を送信する。なお、モニタ開始フラグは、相手の装置のモニタを開始することを示すことを示すフラグである。この場合、デバイスi(IoT装置10C-2)がデバイスj(IoT装置10C-3)をモニタする。第2通信部14-2は処理をステップS6112に進める。 In step S6108, the second communication unit 14-2 of the device i (IoT device 10C-2) sets the monitor start flag and the current cycle of the IoT device 10C-2 device itself with respect to the device j (IoT device 10C-3). Send the public key pk_ (i, n-1) of. The monitor start flag is a flag indicating that the monitor of the other device is started. In this case, the device i (IoT device 10C-2) monitors the device j (IoT device 10C-3). The second communication unit 14-2 advances the process to step S6112.

ステップS6109において、デバイスi(IoT装置10C-2)の第2通信部14-2は、デバイスj(IoT装置10C-3)に対して公開鍵要求リクエストを送付する。公開鍵要求リクエストは、IoT装置10C-3の公開鍵をIoT装置10C-2に送信することを求めるものである。第2通信部14-2は、処理をステップS6110に進める。 In step S6109, the second communication unit 14-2 of the device i (IoT device 10C-2) sends a public key request request to the device j (IoT device 10C-3). The public key request request requests that the public key of the IoT device 10C-3 be transmitted to the IoT device 10C-2. The second communication unit 14-2 advances the process to step S6110.

ステップS6110において、第2処理部12-2は、デバイスj(IoT装置10C-3)の公開鍵pk_(j,n-1) の取得に成功したか否かを判定する。pk_(j,n-1) の取得に成功した場合、第2処理部12-2は処理をステップS6108に進める。pk_(j,n-1) の取得に成功しなかった場合、第2処理部12-2は処理をステップS6111に進める。 In step S6110, the second processing unit 12-2 determines whether or not the acquisition of the public key pk_ (j, n-1) of the device j (IoT device 10C-3) is successful. If the acquisition of pk_ (j, n-1) is successful, the second processing unit 12-2 advances the processing to step S6108. If the acquisition of pk_ (j, n-1) is not successful, the second processing unit 12-2 advances the processing to step S6111.

ステップS6111において、第2処理部12-2は、装置j(IoT装置10C-3)を、「今周期にモニタした装置」として登録する。そして第2処理部12-2は、オンライン未確認情報を第2記憶部15-2に保存してもよい。オンライン未確認情報は、モニタされた装置が、今周期にモニタしたがオンラインではなかった、または検閲されていた装置であることを示す情報である。第2処理部12-2は、処理をステップS6106に進める。 In step S6111, the second processing unit 12-2 registers the device j (IoT device 10C-3) as the “device monitored in this cycle”. Then, the second processing unit 12-2 may store the online unconfirmed information in the second storage unit 15-2. Online unconfirmed information is information indicating that the monitored device is a device that was monitored this cycle but was not online or was censored. The second processing unit 12-2 advances the processing to step S6106.

ステップS6112において、第2処理部12-2は、自身の今周期の秘密鍵sk_(i,n-1)と、装置_j(IoT装置10C-3)の今周期の公開鍵pk_(j,n-1) とから、装置i(IoT装置10C-2)と装置j(IoT装置10C-3)との共通鍵sharedKey_(i,j,n-1) を計算する。第2処理部12-2は、処理をステップS6113に進める。共通鍵の計算にあたっては、例えばディフィー・ヘルマン鍵共有等を用いてもよい。 In step S6112, the second processing unit 12-2 has its own secret key sk_ (i, n-1) in the current cycle and the public key pk_ (j, of the current cycle) of the device _j (IoT device 10C-3). From n-1), the common key sharedKey_ (i, j, n-1) between the device i (IoT device 10C-2) and the device j (IoT device 10C-3) is calculated. The second processing unit 12-2 advances the processing to step S6113. For example, Diffie-Hellman key sharing may be used in the calculation of the common key.

ステップS6113において、updateHash_(j,n) 及びmac_(j,i,n) を所定時間以内に装置j(IoT装置10-3)から直接受信したか否かを第2処理部12-2は判断する。updateHash_(j,n) は、周期nにおけるupdateMsg_(j,n) のハッシュ値である。mac_(j,i,n) は、updateHash_(j,n) 及びsharedKey_(j,i,n-1) から計算されるメッセージ認証符号である。sharedKey_(j,i,n-1)は、装置j(IoT装置10C-3)自身の今周期の秘密鍵sk_(j,n-1)と、装置_i(IoT装置10C-2)の今周期の公開鍵pk_(i,n-1)とから計算される共通鍵である。 In step S6113, the second processing unit 12-2 determines whether or not updateHash_ (j, n) and mac_ (j, i, n) are directly received from the device j (IoT device 10-3) within a predetermined time. do. updateHash_ (j, n) is the hash value of updateMsg_ (j, n) in period n. mac_ (j, i, n) is a message authentication code calculated from updateHash_ (j, n) and sharedKey_ (j, i, n-1). The sharedKey_ (j, i, n-1) is the secret key sk_ (j, n-1) of the device j (IoT device 10C-3) itself in this cycle and the device_i (IoT device 10C-2) now. It is a common key calculated from the public key pk_ (i, n-1) of the period.

updateHash_(j,n) 及びmac_(j,i,n) を所定時間以内に装置j(IoT装置10-3)から直接受信していた場合、第2処理部12-2は処理をステップS6114に進める。updateHash_(j,n) 及びmac_(j,i,n) を所定時間以内に装置j(IoT装置10-3)から直接受信しなかった場合、第2処理部12-2は処理をステップS6115に進める。 When updateHash_ (j, n) and mac_ (j, i, n) are directly received from the device j (IoT device 10-3) within a predetermined time, the second processing unit 12-2 processes the process in step S6114. Proceed. If updateHash_ (j, n) and mac_ (j, i, n) are not directly received from the device j (IoT device 10-3) within a predetermined time, the second processing unit 12-2 processes the process in step S6115. Proceed.

ステップS6114において、第2処理部12-2は、updateHash_(j,n) 及びsharedKey_(i,j,n-1) からmac'_(i,j,n)を計算する。第2処理部12-2は処理をステップS6116に進める。 In step S6114, the second processing unit 12-2 calculates mac'_ (i, j, n) from updateHash_ (j, n) and sharedKey_ (i, j, n-1). The second processing unit 12-2 advances the processing to step S6116.

ステップS6115の処理はステップS6111の処理と同様である。 The process of step S6115 is the same as the process of step S6111.

ステップS6116において、第2処理部12-2はmac_(j,i,n) が mac'_(i,j,n) と等しいか否かを判定する。mac_(j,i,n) が mac'_(i,j,n) と等しい場合、第2処理部12-2はは処理をステップS6117に進める。mac_(j,i,n) が mac'_(i,j,n) と等しくない場合、第2処理部12-2は処理をステップS6118に進める。 In step S6116, the second processing unit 12-2 determines whether or not mac_ (j, i, n) is equal to mac'_ (i, j, n). If mac_ (j, i, n) is equal to mac'_ (i, j, n), the second processing unit 12-2 advances the processing to step S6117. If mac_ (j, i, n) is not equal to mac'_ (i, j, n), the second processing unit 12-2 advances the processing to step S6118.

ステップS6117において、第2通信部14-2はupdateMsg_(j,n) 及びupdateSignature_(j,n) をサーバ装置40からダウンロードする。第2通信部14-2は処理をステップS6119に進める。 In step S6117, the second communication unit 14-2 downloads updateMsg_ (j, n) and updateSignature_ (j, n) from the server device 40. The second communication unit 14-2 advances the process to step S6119.

ステップS6118における処理はステップS6111の処理と同様である。 The process in step S6118 is the same as the process in step S6111.

ステップS6119において、第2処理部12-2は、updateMsg_(j,n) 及びupdateSignature_(j,n) をサーバ装置40からダウンロードすることに成功したか否かを判定する。updateMsg_(j,n) 及びupdateSignature_(j,n) をサーバ装置40からダウンロードすることに成功した場合、第2処理部12-2は処理をステップS6120に進める。updateMsg_(j,n) 及びupdateSignature_(j,n) のいずれか又は双方をサーバ装置40からダウンロードすることに成功しなかった場合、第2処理部12-2は処理をステップS6121に進める。 In step S6119, the second processing unit 12-2 determines whether or not the updateMsg_ (j, n) and the updateSignature_ (j, n) have been successfully downloaded from the server device 40. If the updateMsg_ (j, n) and updateSignature_ (j, n) are successfully downloaded from the server device 40, the second processing unit 12-2 advances the processing to step S6120. If either or both of updateMsg_ (j, n) and updateSignature_ (j, n) are not successfully downloaded from the server device 40, the second processing unit 12-2 advances the processing to step S6121.

ステップS6120において、updateHash_(j,n) が updateMsg(j,n) のハッシュ値と等しく、かつVerifySignature (pk_(j,n-1),updateHash_(j,n),updateSignature_(j,n)) がtrueか否かを第2処理部12-2は判定する。updateHash_(j,n) が updateMsg(j,n)のハッシュ値 と等しく、かつVerifySignature (pk_(j,n-1),updateHash_(j,n),updateSignature_(j,n)) がtrueであることの双方が満たされた場合、第2処理部12-2は処理をステップS6122に進める。updateHash_(j,n) が updateMsg(j,n)のハッシュ値 と等しく、かつVerifySignature (pk_(j,n-1),updateHash_(j,n),updateSignature_(j,n)) がtrueであることとのいずれか又は双方が満たされなかった場合、第2処理部12-2は処理をステップS6123に進める。 In step S6120, updateHash_ (j, n) is equal to the hash value of updateMsg (j, n), and VerifySignature (pk_ (j, n-1), updateHash_ (j, n), updateSignature_ (j, n)) The second processing unit 12-2 determines whether or not it is true. updateHash_ (j, n) is equal to the hash value of updateMsg (j, n), and VerifySignature (pk_ (j, n-1), updateHash_ (j, n), updateSignature_ (j, n)) is true. When both of the above are satisfied, the second processing unit 12-2 advances the processing to step S6122. updateHash_ (j, n) is equal to the hash value of updateMsg (j, n), and VerifySignature (pk_ (j, n-1), updateHash_ (j, n), updateSignature_ (j, n)) is true. If either or both are not satisfied, the second processing unit 12-2 advances the processing to step S6123.

ステップS6122において、第2処理部12-2はmonitoredSignature_(i,j,n) を計算する。monitoredSignature_(i,j,n) は、updateHash_(j,n) に対して秘密鍵sk_(i,n) を用いて第2処理部12-2が生成する電子署名である。第2処理部12-2は処理をステップS6124に進める。 In step S6122, the second processing unit 12-2 calculates monitoredSignature_ (i, j, n). monitoredSignature_ (i, j, n) is a digital signature generated by the second processing unit 12-2 for updateHash_ (j, n) using the private key sk_ (i, n). The second processing unit 12-2 advances the processing to step S6124.

ステップS6123における処理はステップS6111の処理と同様である。 The process in step S6123 is the same as the process in step S6111.

ステップS6124において、第2処理部12-2はモニタ開始フラグを他のデバイスから受信していたかどうかを判定する。モニタ開始フラグを他のデバイスから受信していた場合、第2処理部12-2は処理をステップS6125に進める。モニタ開始フラグを他のデバイスから受信していなかった場合、第2処理部12-2は処理をステップS6126に進める。 In step S6124, the second processing unit 12-2 determines whether or not the monitor start flag has been received from another device. If the monitor start flag has been received from another device, the second processing unit 12-2 advances the processing to step S6125. If the monitor start flag has not been received from another device, the second processing unit 12-2 advances the processing to step S6126.

ステップS6125において、第2通信部15-2は、updateMsg_(i,n) 及びupdateSignature_(i,n) をブロードキャストする。なお、ブロードキャストとは、ブロックチェーンノード又はサーバ装置40に対してIoT装置が生成する様々な情報を送信することであるとする。ブロードキャストされる情報は、メッセージ、メッセージのハッシュ値、ハッシュ値の電子署名等であり、例えばupdateMsg_(i,n)、updateHash_(i,n) 及びupdateSignature_(i,n) を含む。なお、updateMsg_(i,n) 及びupdateSignature_(i,n) のブロードキャストは、ステップS6105より後であって、ステップS6128においてステップS6102に遷移する前であればどのタイミングでもよい。 In step S6125, the second communication unit 15-2 broadcasts updateMsg_ (i, n) and updateSignature_ (i, n). It is assumed that the broadcast is to transmit various information generated by the IoT device to the blockchain node or the server device 40. The information to be broadcast is a message, a hash value of the message, a digital signature of the hash value, and the like, and includes, for example, updateMsg_ (i, n), updateHash_ (i, n), and updateSignature_ (i, n). The broadcast of updateMsg_ (i, n) and updateSignature_ (i, n) may be performed at any timing as long as it is after step S6105 and before the transition to step S6102 in step S6128.

ステップS6126において、第2通信部15-2はmonitoredSignature_(i,j,n) をブロードキャストする。第2通信部15-2は処理をステップS6127に進める。 In step S6126, the second communication unit 15-2 broadcasts the monitoredSignature_ (i, j, n). The second communication unit 15-2 advances the process to step S6127.

ステップS6127において、第2処理部12-2は、装置j(IoT装置10C-3)を、「今周期にモニタした装置」として登録する。第2処理部12-2は、オンライン確認情報を第2記憶部15-2に保存してもよい。オンライン確認情報は、モニタされた装置が、今周期にモニタし、オンラインだった装置であることを示す情報である。第2処理部12-2は処理をステップS6128に進める。 In step S6127, the second processing unit 12-2 registers the device j (IoT device 10C-3) as the “device monitored in this cycle”. The second processing unit 12-2 may store the online confirmation information in the second storage unit 15-2. The online confirmation information is information indicating that the monitored device is a device that has been monitored and online in this cycle. The second processing unit 12-2 advances the processing to step S6128.

ステップS6128において、第2処理部12-2は処理をステップS6102に進める。 In step S6128, the second processing unit 12-2 advances the processing to step S6102.

なお、本実施形態において、IoT装置10C-2がモニタ主体である装置iで、IoT装置10C-3がモニタされる装置jの場合を主に説明したが、他のIoT装置も同様にモニタ主体として他の装置をモニタし、同様の処理を実行する。 In the present embodiment, the case where the IoT device 10C-2 is a monitor-based device i and the IoT device 10C-3 is monitored is mainly described, but other IoT devices are also monitor-based. Monitor other devices as and perform similar processing.

続いて、図25及び26を用いて、サーバ装置40の動作について説明する。 Subsequently, the operation of the server device 40 will be described with reference to FIGS. 25 and 26.

ステップS6200からステップS6203及びs6205の動作は、ステップS200からステップS203及びステップS205の動作と同様である。 The operations of steps S6200 to S6203 and s6205 are the same as the operations of steps S200 to S203 and steps S205.

ステップS6204において、判定部43はtimestamp_(i,n) がtimestamp_(i,n-1) より大きいか否かを判定する。timestamp_(i,n) がtimestamp_(i,n-1) より大きい場合、判定部43は処理をステップS6406に進める。timestamp_(i,n) がtimestamp_(i,n-1) と同じかtimestamp_(i,n-1) より小さい場合、判定部43は処理をステップS6207に進める。 In step S6204, the determination unit 43 determines whether or not the timestamp_ (i, n) is larger than the timestamp_ (i, n-1). If the timestamp_ (i, n) is larger than the timestamp_ (i, n-1), the determination unit 43 advances the process to step S6406. If timestamp_ (i, n) is the same as timestamp_ (i, n-1) or smaller than timestamp_ (i, n-1), the determination unit 43 advances the process to step S6207.

ステップS6206において、判定部43は、pk_(i,n-1)を用いた任意のupdateMsg_(i,n) が生成されていないかどうかを判定する。pk_(i,n-1)を用いた任意のupdateMsg_(i,n) が生成されていた場合、判定部43は処理をステップS6207に進める。
pk_(i,n-1)を用いた任意のupdateMsg_(i,n) が生成されていない場合、判定部43は処理をステップS6208に進める。
In step S6206, the determination unit 43 determines whether or not any updateMsg_ (i, n) using pk_ (i, n-1) has been generated. If an arbitrary updateMsg_ (i, n) using pk_ (i, n-1) has been generated, the determination unit 43 advances the process to step S6207.
If any updateMsg_ (i, n) using pk_ (i, n-1) has not been generated, the determination unit 43 advances the process to step S6208.

ステップS6207において、判定部43は、秘密鍵sk_(i,n-1) が盗まれたと判定し、flag_i に値 compromisedを入力する。判定部43は、処理をステップS6208に進める。 In step S6207, the determination unit 43 determines that the private key sk_ (i, n-1) has been stolen, and inputs the value compromised to flag_i. The determination unit 43 advances the process to step S6208.

ステップS6208において、取得部41はmonitoredSignature(i,j,n) を取得する。取得部41は、処理をステップS6209に進める。 In step S6208, the acquisition unit 41 acquires the monitored Signature (i, j, n). The acquisition unit 41 advances the process to step S6209.

ステップS6209において、判定部43は、VerifySignature(pk_(i,n), updateHash_(j,n), monitoredSignature_(i,j,n)) が trueか否かを判定する。判定結果がtrueの場合、判定部43は処理をステップS6210に進める。判定結果がfalseの場合、判定部43は処理をステップS6211に進める。 In step S6209, the determination unit 43 determines whether or not VerifySignature (pk_ (i, n), updateHash_ (j, n), monitoredSignature_ (i, j, n)) is true. If the determination result is true, the determination unit 43 advances the process to step S6210. If the determination result is false, the determination unit 43 advances the process to step S6211.

ステップS6210において、装置i(IoT装置10C-2)がモニタ対象の装置j(例えばIoT装置10C-3)に賛成票を投票したと判定部43は判定し、result (i,j) に+1を入力する。判定部43は処理をステップS6212に進める。なお、賛成票を投票したとは、モニタ対象の装置がオンラインであったことを示す。 In step S6210, the determination unit 43 determines that the device i (IoT device 10C-2) has voted for the device j to be monitored (for example, the IoT device 10C-3), and the result (i, j) is +1. Enter. The determination unit 43 advances the process to step S6212. By voting in favor, it means that the device to be monitored was online.

ステップS6211において、装置i(IoT装置10C-2)がモニタ対象の装置j(例えばIoT装置10C-3)に反対票を投票したと判定部43は判定し、result (i,j) に0を入力する。判定部43は処理をステップS6212に進める。なお、反対票を投票したとは、モニタ対象の装置がオフライン又は検閲されていたことを示す。判定部43は処理をステップS6212に進める。 In step S6211, the determination unit 43 determines that the device i (IoT device 10C-2) has voted against the device j to be monitored (for example, the IoT device 10C-3), and sets 0 to result (i, j). input. The determination unit 43 advances the process to step S6212. Voting a negative vote indicates that the device to be monitored was offline or censored. The determination unit 43 advances the process to step S6212.

なお、ステップS6208からステップS6211までの処理は、モニタ主体の装置i(例えばIoT装置10C-2)が、装置j(例えばIoT装置10C-3)をモニタした際の結果に関する動作だが、IoT装置10C-3以外の他の装置がモニタ対象の装置jである場合についても同様の処理をIoT装置10C-2は行い、result (i,j) を計算する。 The processing from step S6208 to step S6211 is an operation related to the result when the monitor-based device i (for example, IoT device 10C-2) monitors the device j (for example, IoT device 10C-3), but the IoT device 10C When the device other than -3 is the device j to be monitored, the IoT device 10C-2 performs the same processing and calculates the result (i, j).

また、ステップS6200からステップS6211までの処理は、モニタ主体の装置i(例えばIoT装置10C-2)が他の装置をモニタした際の結果に関する動作だが、サーバ装置40は、装置i以外の他の全ての装置がモニタ主体であった場合についてもステップS6200からステップS6211までの処理を実行する。 Further, the processes from step S6200 to step S6211 are operations related to the result when the monitor-based device i (for example, IoT device 10C-2) monitors another device, but the server device 40 is an operation other than the device i. Even when all the devices are mainly monitors, the processes from step S6200 to step S6211 are executed.

ステップS6100からステップS6128及びステップS6200からステップS6211までの処理の結果、モニタ主体としての各装置(例えば、装置i)が他の装置(例えば装置j)をモニタする際、少なくとも直接モニタすることが出来た装置については ステップS6209の結果がtrueならばresult (i,j) として1が得られる。他の装置のうち、直接モニタされなかった装置又は直接モニタしたとしてもステップS6209の結果がfalseの装置については、result (i,j) として0が得られる。モニタ主体の装置iについて、全てのIoT装置の各々がモニタ主体として、他ののIoT装置をモニタした場合についても同様に、result (i,j) として1又は0が得られる。 As a result of the processing from step S6100 to step S6128 and from step S6200 to step S6211, each device (for example, device i) as a monitor main body can monitor at least directly when monitoring another device (for example, device j). If the result of step S6209 is true, 1 is obtained as result (i, j). Among other devices, a device that is not directly monitored or a device whose result in step S6209 is false even if it is directly monitored, 0 is obtained as result (i, j). For the monitor-based device i, 1 or 0 is obtained as the result (i, j) in the case where each of all IoT devices monitors other IoT devices as the monitor-based device.

ステップS6212において、処理部42は、result (i,j)=1の時、装置kについてresult(i,k) = result(i,k) or result(j,k) という論理演算により論理和を求める。装置kは、装置i(例えばIoT装置10C-2)及び装置j(IoT装置10C-3)以外の他のIoT装置(例えば、IoT装置10C-4~IoT装置10C-6のいずれか)である。例えば、装置iが装置jを直接モニタした結果得られたresult (i,j) が1で、装置jが装置kを直接モニタした結果得られたresult (j,k) が1の場合、result (i,k) = result(i,k) or result(j,k) の結果は1となる。つまり、装置iは装置kを直接モニタしていないものの、装置jが装置kを直接モニタした結果を、装置iは引き継ぐことが出来る。 In step S6212, when result (i, j) = 1, the processing unit 42 performs a logical sum by the logical operation of result (i, k) = result (i, k) or result (j, k) for the device k. Ask. The device k is an IoT device (for example, any one of the IoT device 10C-4 to the IoT device 10C-6) other than the device i (for example, the IoT device 10C-2) and the device j (IoT device 10C-3). .. For example, if the result (i, j) obtained as a result of the device i directly monitoring the device j is 1, and the result (j, k) obtained as a result of the device j directly monitoring the device k is 1. The result of (i, k) = result (i, k) or result (j, k) is 1. That is, although the device i does not directly monitor the device k, the device i can take over the result of the device j directly monitoring the device k.

ステップS6210及びステップS6211の結果に基づき、ステップS6212において、処理部42は装置i及びj以外の他のIoT装置kについて、result(i,k) = result(i,k) or result(j,k)の演算により論理和を求める。また、同様に、全装置の各々がモニタ主体であった場合についても同様に、処理部42はresult (i,k) = result(i,k) or result(j,k) の演算により論理和を求める。処理部42は、処理をステップS6213に進める。 Based on the results of steps S6210 and S6211, in step S6212, the processing unit 42 refers to result (i, k) = result (i, k) or result (j, k) for the IoT devices k other than the devices i and j. ) To find the logical sum. Similarly, in the case where each of all the devices is mainly a monitor, the processing unit 42 is also ORed by the operation of result (i, k) = result (i, k) or result (j, k). Ask for. The processing unit 42 advances the processing to step S6213.

ステップS6213において、処理部42は、sum(i) = result(0,i) + result(1,i) +… + result(X,i) の演算を行う。ここで、Xは、全装置のうち最大の装置IDである。この場合、各装置に対して付与される装置IDは0、1から始まり、Xで終わる。ステップS6213における演算は、モニタ対象としての装置iがhealthyかcompromisedか否かを判定するためのものである。処理部42は、処理をステップS6214に進める。 In step S6213, the processing unit 42 performs an operation of sum (i) = result (0, i) + result (1, i) + ... + result (X, i). Here, X is the largest device ID among all the devices. In this case, the device ID assigned to each device starts from 0, 1 and ends with X. The calculation in step S6213 is for determining whether or not the device i to be monitored is healthy or compromised. The processing unit 42 advances the processing to step S6214.

ステップS6214において、処理部42はsum(i)>=N-a-1>a-1がtrueか否かを判定する。判定結果がtrueの場合かつflag_iがhealthyの場合、処理部42は処理をステップS6215に進める。判定結果がfalseまたはflag_iがcompromisedの場合、処理部42は処理をステップS6216に進める。 In step S6214, the processing unit 42 determines whether sum (i)> = N-a-1> a-1 is true or not. If the determination result is true and flag_i is healthy, the processing unit 42 advances the processing to step S6215. If the determination result is false or flag_i is compromised, the processing unit 42 advances the processing to step S6216.

ステップS6215において、秘密鍵sk_(i,n-1) が盗まれていないと処理部42は判断し、flag_i に値 healthyを入力する。 In step S6215, the processing unit 42 determines that the private key sk_ (i, n-1) has not been stolen, and inputs the value healthy to flag_i.

ステップS6216において、sk_(i,n-1)が盗まれたと処理部42は判断し、flag_i に値 compromisedを入力する。 In step S6216, the processing unit 42 determines that sk_ (i, n-1) has been stolen, and inputs the value compromised to flag_i.

ステップS6212からステップS6215までの処理により、処理部42は、モニタ対象としての装置iがhealthyかcompromisedかを推定することができる。 By the processing from step S6212 to step S6215, the processing unit 42 can estimate whether the device i as a monitor target is healthy or compromised.

ステップS6212からステップS6215までの処理は、モニタ対象が装置i以外の他の全てのIoT装置に対しても同様に行われる。 The processing from step S6212 to step S6215 is similarly performed for all IoT devices whose monitoring target is other than the device i.

これにより、管理システム1を構成する各IoT装置がhealthyかcompromisedか、すなわち各IoT装置の電源が遮断されていないかどうかを確定的に判断することが出来る。 Thereby, it is possible to deterministically determine whether each IoT device constituting the management system 1 is healthy or compromised, that is, whether or not the power supply of each IoT device is cut off.

以上説明した本発明の第6の実施形態に係る管理システム1において、前記第2通信部は、第3の装置のモニタの開始を示すことを示す情報及び前記第2の公開鍵(pk_(i,n-1)を前記第3の装置に出力する。前記第3処理部は、時刻に関する第6の時刻情報又は所定の検証プロセスの周期を示す第6のインデックスと、第7のメッセージ(updateMsg_(j,n-1))に含まれる第7の公開鍵(pk_(j,n-1))又は第7の公開鍵(pk_(j,n-1)の生成に用いられる値と、前記第7のメッセージのハッシュ値(updateHash_(j,n-1))とを含む第6のメッセージ(updateMsg_(j,n))を生成する。また、前記第3処理部は、前記第7の公開鍵(pk_(j,n-1))に対応する第7の秘密鍵(sk_(j,n-1))を用いて前記第6のメッセージ(updateMsg_(j,n))に対する第6の電子署名(updateSignature_(j,n))を生成する。さらに、前記第3処理部は、前記第7の秘密鍵sk_(j,n-1)及び第2の公開鍵pk_(i,n-1)を用いて前記第2の装置及び前記第3の装置の共通鍵である第1の共通鍵sharedKey_(j,i,n-1)を生成し、前記第6のメッセージ(updateMsg_(j,n))に対する第6のハッシュ値(updateHash_(j,n))及び第1の共通鍵sharedKey_(j,i,n-1) を用いて第1のメッセージ認証符号(mac_(j,i,n))を生成する。前記第3通信部は、前記第6のメッセージ(updateMsg_(j,n))及び前記第6の電子署名(updateSignature_(j,n))を前記第1の装置、前記第2の装置、前記第3の装置及び前記第4の装置以外の他の装置と、前記第4の装置とのいずれかに出力する。前記第2取得部が第6のハッシュ値(updateHash_(j,n))及び第1のメッセージ認証符号(mac_(j,i,n))のいずれかを前記第3の装置から取得しなかった場合、前記第2処理部は、前記第3の装置をモニタした装置であることを示す第1の情報を生成し、前記第2通信部は、前記第1の情報を出力する。
これにより、モニタされた装置が今周期にモニタされたもののオンラインではなかった否かを効率よく判定することができ、モニタされた装置の電源が遮断されていたか否かを精度よく推定することが出来る。
In the management system 1 according to the sixth embodiment of the present invention described above, the second communication unit includes information indicating that the monitor of the third device is started and the second public key (pk_ (i). , N-1) is output to the third device. The third processing unit has a sixth time information regarding time or a sixth index indicating a predetermined verification process cycle, and a seventh message (updateMsg_). The value used to generate the seventh public key (pk_ (j, n-1)) or the seventh public key (pk_ (j, n-1)) included in (j, n-1)) and the above. A sixth message (updateMsg_ (j, n)) including a hash value of the seventh message (updateHash_ (j, n-1)) is generated. Further, the third processing unit generates the seventh publication. The sixth electron for the sixth message (updateMsg_ (j, n)) using the seventh private key (sk_ (j, n-1)) corresponding to the key (pk_ (j, n-1)). A signature (updateSignature_ (j, n)) is generated. Further, the third processing unit generates the seventh private key sk_ (j, n-1) and the second public key pk_ (i, n-1). Is used to generate the first common key sharedKey_ (j, i, n-1), which is the common key of the second device and the third device, and the sixth message (updateMsg_ (j, n)). ) And the first message authentication code (mac_ (j, i, n)) using the sixth hash value (updateHash_ (j, n)) and the first common key sharedKey_ (j, i, n-1). The third communication unit outputs the sixth message (updateMsg_ (j, n)) and the sixth electronic signature (updateSignature_ (j, n)) to the first device and the second device. Output to any of the device, the device other than the third device and the fourth device, and the fourth device. The second acquisition unit outputs a sixth hash value (updateHash_ (j, n). )) And the first message authentication code (mac_ (j, i, n)) were not obtained from the third device, the second processing unit monitored the third device. The first information indicating that it is a device is generated, and the second communication unit outputs the first information.
This makes it possible to efficiently determine whether the monitored device was monitored this cycle but not online, and to accurately estimate whether the monitored device was powered off. You can.

また、本発明の第6の実施形態に係る管理システム1において、前記第2取得部は、前記第6のハッシュ値(updateHash_(j,n))及び第1のメッセージ認証符号(mac_(j,i,n))前記第3の装置からを取得し、前記第7の公開鍵(pk_(j,n-1))、を取得する。前記第2処理部は、前記第2の秘密鍵(sk_(i,n-1))及び前記第7の公開鍵(pk_(j,n-1))を用いて第2の共通鍵(sharedKey_(i,j,n-1))を生成する。また、前記第2処理部は、前記第6のハッシュ値(updateHash_(j,n))及び前記第2の共通鍵(sharedKey_(i,j,n-1))を用いて第2のメッセージ認証符号(mac’_(i,j,n))を生成する。さらに前記第2処理部は、前記第1のメッセージ認証符号(mac_(j,i,n))が前記第2のメッセージ認証符号(mac’_(i,j,n))と等しい場合、前記第6のハッシュ値(updateHash_(j,n))が前記第3の装置から送信されたことを示す第2の情報を生成する。前記第2処理部は、前記第1のメッセージ認証符号(mac_(j,i,n))が前記第2のメッセージ認証符号(mac’_(i,j,n))と等しくない場合、前記第3の装置をモニタした装置であることを示す第1の情報を生成する。第2通信部は、前記第1の情報又は前記第2の情報を出力する。
これにより、モニタされた装置が今周期にモニタされたもののオンラインではなかった否かを効率よく判定することができ、モニタされた装置の電源が遮断されていたか否かを精度よく推定することが出来る。
Further, in the management system 1 according to the sixth embodiment of the present invention, the second acquisition unit includes the sixth hash value (updateHash_ (j, n)) and the first message authentication code (mac_ (j,). i, n)) Acquire from the third device and acquire the seventh public key (pk_ (j, n-1)). The second processing unit uses the second private key (sk_ (i, n-1)) and the seventh public key (pk_ (j, n-1)) to obtain a second common key (sharedKey_). Generate (i, j, n-1)). Further, the second processing unit uses the sixth hash value (updateHash_ (j, n)) and the second common key (sharedKey_ (i, j, n-1)) to authenticate the second message. Generate a code (mac'_ (i, j, n)). Further, when the first message authentication code (mac_ (j, i, n)) is equal to the second message authentication code (mac'_ (i, j, n)), the second processing unit may use the second processing unit. Generates a second piece of information indicating that the sixth hash value (updateHash_ (j, n)) has been sent from the third device. When the first message authentication code (mac_ (j, i, n)) is not equal to the second message authentication code (mac'_ (i, j, n)), the second processing unit may use the second processing unit. Generates first information indicating that the third device is a monitored device. The second communication unit outputs the first information or the second information.
This makes it possible to efficiently determine whether the monitored device was monitored this cycle but not online, and to accurately estimate whether the monitored device was powered off. You can.

また、本発明の第6の実施形態に係る管理システム1において、前記第2取得部が前記第6のメッセージ(updateMsg_(j,n))及び前記第6の電子署名(updateSignature_(j,n))を所定数以上の前記他の装置と、前記第4の装置とのいずれかから取得しなかった場合、前記第2処理部は前記第1の情報を生成する。
これにより、モニタされた装置が今周期にモニタされたもののオンラインではなかった否かを効率よく判定することができ、モニタされた装置の電源が遮断されていたか否かを精度よく推定することが出来る。
Further, in the management system 1 according to the sixth embodiment of the present invention, the second acquisition unit performs the sixth message (updateMsg_ (j, n)) and the sixth electronic signature (updateSignature_ (j, n)). ) Is not acquired from any of the predetermined number or more of the other devices and the fourth device, the second processing unit generates the first information.
This makes it possible to efficiently determine whether the monitored device was monitored this cycle but not online, and to accurately estimate whether the monitored device was powered off. You can.

また、本発明の第6の実施形態に係る管理システム1において、第2取得部が所定数以上の他の装置と、前記第4の装置とのいずれかから取得した前記第6のメッセージ(updateMsg_(j,n))を基に生成したハッシュ値と、前記第3の装置から取得した第6のハッシュ値(updateHash_(j,n))とが等しいことと、前記第6の電子署名(updateSignature_(j,n))が、前記第6のハッシュ値(updateHash_(j,n))に対して前記第7の秘密鍵(sk_(j,n-1))を用いて生成されていたこととがいずれも満たされた場合、前記第2処理部は、前記第6のハッシュ値(updateHash_(j,n))に対して前記第1の秘密鍵(sk_i,n))を用いてモニタに関する第1の電子署名(monitoredSignature_(i,j,n))を生成し、前記第2通信部は前記モニタに関する第1の電子署名(monitoredSignature_(i,j,n))を前記他の装置又は前記第4の装置に出力する。第2取得部が所定数以上の他の装置と、前記第4の装置とのいずれかから取得した前記第6のメッセージ(updateMsg_(j,n))を基に生成したハッシュ値と、前記第3の装置から取得した第6のハッシュ値(updateHash_(j,n))とが等しいことと、前記第6の電子署名(updateSignature_(j,n))が、前記第6のハッシュ値(updateHash_(j,n))に対して前記第7の秘密鍵(sk_(j,n-1))を用いて生成されていたこととのいずれかが満たされなかった場合、前記第2処理部は、前記第1の情報を生成し、前記第2通信部は前記第1の情報を出力する。
これにより、モニタされた装置が今周期にモニタされたもののオンラインではなかった否かを効率よく判定することができ、モニタされた装置の電源が遮断されていたか否かを精度よく推定することが出来る。
Further, in the management system 1 according to the sixth embodiment of the present invention, the sixth message (updateMsg_) acquired by the second acquisition unit from any of the predetermined number or more of other devices and the fourth device. The hash value generated based on (j, n)) is equal to the sixth hash value (updateHash_ (j, n)) obtained from the third device, and the sixth digital signature (updateSignature_) is equal to each other. (j, n)) was generated using the seventh private key (sk_ (j, n-1)) for the sixth hash value (updateHash_ (j, n)). When all of the above are satisfied, the second processing unit uses the first secret key (sk_i, n) for the sixth hash value (updateHash_ (j, n)) to monitor the second. 1 electronic signature (monitoredSignature_ (i, j, n)) is generated, and the second communication unit uses the first electronic signature (monitoredSignature_ (i, j, n)) related to the monitor to the other device or the first. Output to 4 devices. The hash value generated by the second acquisition unit based on the sixth message (updateMsg_ (j, n)) acquired from any of the predetermined number of other devices and the fourth device, and the third device. The sixth hash value (updateHash_ (j, n)) obtained from the device of 3 is equal to the sixth hash value (updateHash_ (j, n)), and the sixth digital signature (updateSignature_ (j, n)) is the sixth hash value (updateHash_ (updateHash_ (). If any of j, n)) that was generated using the seventh private key (sk_ (j, n-1)) is not satisfied, the second processing unit will perform the second processing unit. The first information is generated, and the second communication unit outputs the first information.
This makes it possible to efficiently determine whether the monitored device was monitored this cycle but not online, and to accurately estimate whether the monitored device was powered off. You can.

また、本発明の第6の実施形態に係る管理システム1において、前記第4取得部は、前記モニタに関する第1の電子署名(monitoredSignature_(i,j,n))を取得し、前記モニタに関する第1の電子署名(monitoredSignature_(i,j,n))が、前記第1の秘密鍵(sk_(i,n))を用いて前記第6のハッシュ値(updateHash_(j,n))に対して作成された署名であることを前記第4判定部が確認した場合、前記第4処理部は、前記第1の値を生成する。前記モニタに関する第1の電子署名(monitoredSignature_(i,j,n))が、前記第1の秘密鍵(sk_(i,n))を用いて前記第6のハッシュ値(updateHash_(j,n))に対して作成された署名であることを前記第4判定部が確認できなかった場合、前記第4処理部は、前記第2の値を生成し、前記第4通信部は、前記第1の値又は前記第2の値を出力する。
これにより、モニタされた装置の電源が遮断されていたか否かを精度よく推定することが出来る。
Further, in the management system 1 according to the sixth embodiment of the present invention, the fourth acquisition unit acquires the first electronic signature (monitoredSignature_ (i, j, n)) relating to the monitor, and the fourth acquisition unit relates to the monitor. The digital signature of 1 (monitoredSignature_ (i, j, n)) is for the sixth hash value (updateHash_ (j, n)) using the first private key (sk_ (i, n)). When the fourth determination unit confirms that the signature is created, the fourth processing unit generates the first value. The first electronic signature (monitoredSignature_ (i, j, n)) relating to the monitor uses the first private key (sk_ (i, n)) to create the sixth hash value (updateHash_ (j, n)). If the fourth determination unit cannot confirm that the signature is created for), the fourth processing unit generates the second value, and the fourth communication unit generates the first value. Or the second value is output.
This makes it possible to accurately estimate whether or not the power of the monitored device has been cut off.

また、本発明の第6実施形態において、サーバ装置の代わりにブロックチェーンに基づくスマートコントラクトが用いられてもよい。すなわち、管理システム1の構成は図14であってもよい。 Further, in the sixth embodiment of the present invention, a smart contract based on a blockchain may be used instead of the server device. That is, the configuration of the management system 1 may be shown in FIG.

この場合、IoT装置側の動作はステップS6100からステップS6128と同様である。スマートコントラクト側の動作は、原則としてステップS6200からステップS6216の動作と同様である。この場合、各処理の動作主体を、取得部21から取得部41に、処理部22から処理部42に、判定部24から判定部43にそれぞれ置き換える。
これにより、モニタされた装置の電源が遮断されていたか否かを精度よく推定することが出来る。
In this case, the operation on the IoT device side is the same as in steps S6100 to S6128. The operation on the smart contract side is, in principle, the same as the operation from step S6200 to step S6216. In this case, the operation subject of each process is replaced from the acquisition unit 21 to the acquisition unit 41, from the processing unit 22 to the processing unit 42, and from the determination unit 24 to the determination unit 43.
This makes it possible to accurately estimate whether or not the power of the monitored device has been cut off.

<第7の実施形態>
本発明の第7の実施形態について、図面を参照して説明する。
図27及び28は、本発明の第7実施形態において管理システム1を構成するIoT装置10の動作を示すフローチャートである。本実施形態において、管理システム1の構成は第6の実施形態と同様とする。また、本実施形態においてIoT装置によって実行される処理はステップS7100からステップS7112を有する。なお、ステップS7100の処理を開始する段階で、装置i(例えばIoT装置10C-2)は、装置j(例えばIoT装置10C-4)の公開鍵を取得していないものとする。
<7th Embodiment>
A seventh embodiment of the present invention will be described with reference to the drawings.
27 and 28 are flowcharts showing the operation of the IoT device 10 constituting the management system 1 in the seventh embodiment of the present invention. In the present embodiment, the configuration of the management system 1 is the same as that of the sixth embodiment. Further, the process executed by the IoT device in the present embodiment includes steps S7100 to S7112. At the stage of starting the process of step S7100, it is assumed that the device i (for example, IoT device 10C-2) has not acquired the public key of the device j (for example, IoT device 10C-4).

ステップS7100からステップS7104までの処理はステップS6100からステップS6104迄の動作と同様である。 The processing from step S7100 to step S7104 is the same as the operation from step S6100 to step S6104.

ステップS7105において、装置i(例えばIoT装置10C-2)の第2通信部14-2は、装置k(例えばIoT装置10C-4)に対して公開鍵要求を送信する。この公開鍵要求は、装置kの周期nにおける公開鍵pk_(k,n) を装置iに対して求めるものである。第2通信部14-2は処理をステップS7106に進める。 In step S7105, the second communication unit 14-2 of the device i (for example, IoT device 10C-2) transmits a public key request to the device k (for example, IoT device 10C-4). This public key request asks the device i for the public key pk_ (k, n) in the period n of the device k. The second communication unit 14-2 advances the process to step S7106.

ステップS7106において、第2取得部11-2は、第2通信部14-2を用いてupdateMsg_(k,n) 及びmonitoredSignature_(j,k,n) をデバイスkから取得する。第2取得部11-2は処理をステップS7107に進める。 In step S7106, the second acquisition unit 11-2 acquires updateMsg_ (k, n) and monitoredSignature_ (j, k, n) from the device k using the second communication unit 14-2. The second acquisition unit 11-2 advances the process to step S7107.

ステップS7107において、第2処理部12-2は、updateMsg_(k,n) 及びmonitoredSignature_(j,k,n) をデバイスjから取得したか否かを判定する。updateMsg_(k,n) 及びmonitoredSignature_(j,k,n) をデバイスjから取得した場合、第2処理部12-2は処理をステップS7108に進める。updateMsg_(k,n) 及びmonitoredSignature_(j,k,n) をデバイスjから取得していない場合、第2処理部12-2は処理をステップS7109に進める。 In step S7107, the second processing unit 12-2 determines whether or not updateMsg_ (k, n) and monitoredSignature_ (j, k, n) have been acquired from the device j. When updateMsg_ (k, n) and monitoredSignature_ (j, k, n) are acquired from the device j, the second processing unit 12-2 advances the processing to step S7108. If updateMsg_ (k, n) and monitoredSignature_ (j, k, n) have not been acquired from the device j, the second processing unit 12-2 advances the processing to step S7109.

ステップS7108において、第2処理部12-2はupdateMsg_(k,n)からupdateHash_(k,n) を計算する。第2処理部12-2は処理をステップS7110に進める。 In step S7108, the second processing unit 12-2 calculates updateHash_ (k, n) from updateMsg_ (k, n). The second processing unit 12-2 advances the processing to step S7110.

ステップS7109において、第2処理部12-2はデバイスj(例えばIoT装置10C-3)がオフラインであると判定する。 In step S7109, the second processing unit 12-2 determines that the device j (for example, the IoT device 10C-3) is offline.

ステップS7110において、第2処理部12-2は、VerifySignature(pk_(j,n), updateHash_(k,n), monitoredSignature_(j,k,n)) = trueか否かを判定する。判定結果がtrueの場合、第2処理部12-2は処理をステップS7111に進める。判定結果がfalseの場合、第2処理部12-2は処理をステップS7112に進める。 In step S7110, the second processing unit 12-2 determines whether or not VerifySignature (pk_ (j, n), updateHash_ (k, n), monitoredSignature_ (j, k, n)) = true. If the determination result is true, the second processing unit 12-2 advances the processing to step S7111. If the determination result is false, the second processing unit 12-2 advances the processing to step S7112.

ステップS7111において、updateMsg_(k,n)に含まれるpk_(k,n) がn+1回目の装置認証プロセスにおいて、装置kが用いる公開鍵であると第2処理部12-2は判定する。 In step S7111, the second processing unit 12-2 determines that pk_ (k, n) included in updateMsg_ (k, n) is the public key used by the device k in the n + 1th device authentication process.

ステップS7112において、第2処理部12-2は処理をステップS7105に進める。 In step S7112, the second processing unit 12-2 advances the processing to step S7105.

なお、第7実施形態における管理システム1の構成は、図14に示す構成でもよい。すなわち、サーバ装置40の代わりにブロックチェーンが用いられ、管理システム1は出力装置30を備えていてもよい。 The configuration of the management system 1 in the seventh embodiment may be the configuration shown in FIG. That is, a blockchain may be used instead of the server device 40, and the management system 1 may include an output device 30.

以上説明した本発明の第7の実施形態に係る管理システム1において、前記第2通信部は、第8の公開鍵 (pk_(k,n)) を求める公開鍵要求リクエストを第5の装置に出力する。また、前記第2通信部は、前記第8の公開鍵 (pk_(k,n)) 又は前記第8の公開鍵(pk_(k,n))の生成に用いられる値 を含む第8のメッセージ (updateMsg_(k,n)) と、モニタに関する第2の電子署名 (monitoredSignature_(j,k,n)) とを前記第5の装置から受信する。前記モニタに関する第2の電子署名 (monitoredSignature_(j,k,n)) は、前記第8のメッセージのハッシュ値 (updateHash_(k,n)) に対して第6の秘密鍵 (sk_(j,n)) によって生成され、前記第6の秘密鍵 (sk_(j,n)) に対応する第6の公開鍵 (pk_(j,n)) 又は前記第6の公開鍵pk_(j,n)の生成に用いられる値 は前記第6のメッセージ (updateMsg_(j,n)) に含まれる。前記第8のメッセージ (updateMsg_(k,n)) と、前記モニタに関する第2の電子署名 (monitoredSignature_(j,k,n)) とのいずれかを前記第2通信部が受信しなかった場合、前記第2処理部は、前記第3の装置の電源が遮断されている遮断され又はネットワークから切断されていると判断し、前記第8のメッセージ (updateMsg_(k,n)) と、前記モニタに関する第2の電子署名 (monitoredSignature_(j,k,n)) とを前記第2通信部が受信し、前記モニタに関する第2の電子署名 (monitoredSignature_(j,k,n)) が、前記第6の公開鍵 (pk_(j,n)) に対応する第6の秘密鍵 (sk_(j,n)) を用いて前記第8のメッセージのハッシュ値 (updateHash_(k,n)) に対して生成されたものである場合、前記第2の処理部は、前記第8の公開鍵 (pk_(k,n)) が真正であると判断する。
これにより、モニタされた装置の電源が遮断されていたか否かを精度よく推定することに加えて、公開鍵の盗難ないし漏洩があったことを精度よく推定することが出来る。
In the management system 1 according to the seventh embodiment of the present invention described above, the second communication unit sends a public key request request for the eighth public key (pk_ (k, n)) to the fifth device. Output. Further, the second communication unit includes an eighth message including a value used for generating the eighth public key (pk_ (k, n)) or the eighth public key (pk_ (k, n)). It receives (updateMsg_ (k, n)) and a second electronic signature (monitoredSignature_ (j, k, n)) for the monitor from the fifth device. The second digital signature (monitoredSignature_ (j, k, n)) for the monitor is the sixth private key (sk_ (j, n)) for the hash value (updateHash_ (k, n)) of the eighth message. )) And the sixth public key (pk_ (j, n)) corresponding to the sixth private key (sk_ (j, n)) or the sixth public key pk_ (j, n). The value used for generation is included in the sixth message (updateMsg_ (j, n)). If either the eighth message (updateMsg_ (k, n)) or the second electronic signature (monitoredSignature_ (j, k, n)) for the monitor is not received by the second communication unit. The second processing unit determines that the power of the third device is cut off or disconnected from the network, and relates to the eighth message (updateMsg_ (k, n)) and the monitor. The second communication unit receives the second electronic signature (monitoredSignature_ (j, k, n)), and the second electronic signature (monitoredSignature_ (j, k, n)) relating to the monitor is the sixth. Generated for the hash value (updateHash_ (k, n)) of the eighth message using the sixth private key (sk_ (j, n)) corresponding to the public key (pk_ (j, n)) If so, the second processing unit determines that the eighth public key (pk_ (k, n)) is genuine.
As a result, in addition to accurately estimating whether or not the monitored device has been turned off, it is possible to accurately estimate whether or not the public key has been stolen or leaked.

以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成は上述の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。上述の実施形態において説明した各構成は、任意に組み合わせることができる。 Although the embodiments of the present invention have been described in detail with reference to the drawings, the specific configuration is not limited to the above-described embodiments, and includes designs and the like within a range that does not deviate from the gist of the present invention. The configurations described in the above embodiments can be arbitrarily combined.

なお、上述したIoT装置10は、内部にコンピュータシステムを有していてもよい。そして、上述したIoT装置10が備える各構成の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより上述したIoT装置10が備える各構成における処理を行ってもよい。ここで、「記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行する」とは、コンピュータシステムにプログラムをインストールすることを含む。ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータシステム」は、インターネットやWAN、LAN、専用回線等の通信回線を含むネットワークを介して接続された複数のコンピュータ装置を含んでもよい。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。このように、プログラムを記憶した記録媒体は、CD-ROM等の非一過性の記録媒体であってもよい。 The above-mentioned IoT device 10 may have a computer system inside. Then, a program for realizing the functions of each configuration included in the above-mentioned IoT device 10 is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed. The processing in each configuration provided in the above-mentioned IoT device 10 may be performed. Here, "loading and executing a program recorded on a recording medium into a computer system" includes installing the program in the computer system. The term "computer system" as used herein includes hardware such as an OS and peripheral devices. Further, the "computer system" may include a plurality of computer devices connected via a network including a communication line such as the Internet, WAN, LAN, and a dedicated line. Further, the "computer-readable recording medium" refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, or a CD-ROM, and a storage device such as a hard disk built in a computer system. As described above, the recording medium in which the program is stored may be a non-transient recording medium such as a CD-ROM.

また、記録媒体には、当該プログラムを配信するために配信サーバからアクセス可能な内部又は外部に設けられた記録媒体も含まれる。なお、プログラムを複数に分割し、それぞれ異なるタイミングでダウンロードした後に電子機器1が備える各構成で合体される構成や、分割されたプログラムのそれぞれを配信する配信サーバが異なっていてもよい。さらに「コンピュータ読み取り可能な記録媒体」とは、ネットワークを介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。また、上記プログラムは、上述した機能の一部を実現するためのものであってもよい。さらに、上述した機能をコンピュータシステムに既に記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。 The recording medium also includes an internal or external recording medium accessible from the distribution server for distributing the program. It should be noted that the program may be divided into a plurality of parts, downloaded at different timings, and then combined with each configuration provided in the electronic device 1, or the distribution server for distributing each of the divided programs may be different. Furthermore, a "computer-readable recording medium" is a volatile memory (RAM) inside a computer system that serves as a server or client when a program is transmitted via a network, and holds the program for a certain period of time. It shall include things. Further, the above program may be for realizing a part of the above-mentioned functions. Further, a so-called difference file (difference program) may be used, which can realize the above-mentioned function in combination with a program already recorded in the computer system.

また、上述した実施形態におけるIoT装置10が備える各機能の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現してもよい。各機能は個別にプロセッサ化してもよいし、一部、又は全部を集積してプロセッサ化してもよい。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現してもよい。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いてもよい。 Further, a part or all of each function of the IoT device 10 in the above-described embodiment may be realized as an integrated circuit such as an LSI (Large Scale Integration). Each function may be made into a processor individually, or a part or all of them may be integrated into a processor. Further, the method of making an integrated circuit is not limited to the LSI, and may be realized by a dedicated circuit or a general-purpose processor. Further, when an integrated circuit technology that replaces an LSI appears due to advances in semiconductor technology, an integrated circuit based on this technology may be used.

また、上記実施形態のIoT装置は、スマートメータに限られるものではなく、ネットワークで他の装置と互いに通信可能な組み込み型装置であってもよいし、家庭用電気製品や業務用電気製品にも適用できる。組み込み型装置としては、Micro control unit(MCU)等の小型の演算装置とセンサーなどを搭載したものでもよい。家庭用電気製品としては、テレビや、表示部が備えられた冷蔵庫、電子レンジ等を含むIoT装置に適用できる。また、上記実施形態のIoT装置は、任意のコンピュータであってもよく、例えば、携帯電話、スマートフォン、パーソナルコンピュータ、サーバ又はワークステーションでもよい。 Further, the IoT device of the above embodiment is not limited to the smart meter, but may be an embedded device capable of communicating with other devices via a network, and may also be used for household electric appliances and commercial electric products. Applicable. The embedded device may be equipped with a small arithmetic unit such as a Micro control unit (MCU) and a sensor. As household electric appliances, it can be applied to IoT devices including televisions, refrigerators equipped with display units, microwave ovens, and the like. Further, the IoT device of the above embodiment may be any computer, for example, a mobile phone, a smartphone, a personal computer, a server or a workstation.

NW ネットワーク、1 管理システム、10 IoT装置、20 スマートコントラクトが実装された装置ないしノード、30 出力装置、40 サーバ装置、11 取得部、12 処理部、13 表示部、14 通信部、31 入力部、32 処理部、33 記憶部、34 通信部、41 取得部、42 処理部、43 判定部、44 表示部、45 通信部 NW network, 1 management system, 10 IoT devices, 20 devices or nodes equipped with smart contracts, 30 output devices, 40 server devices, 11 acquisition units, 12 processing units, 13 display units, 14 communication units, 31 input units, 32 Processing unit, 33 Storage unit, 34 Communication unit, 41 Acquisition unit, 42 Processing unit, 43 Judgment unit, 44 Display unit, 45 Communication unit

Claims (20)

第2の装置の状態を示す第1の状態情報及び第3の装置の状態を示す第2の状態情報の少なくともいずれかを取得するステップと、前記第1の状態情報及び前記第2の状態情報の少なくともいずれかを出力する第1出力ステップと、
前記第3の装置の状態を示す第3の状態情報及び第1の装置の状態を示す第4の状態情報の少なくともいずれかを取得するステップと、前記第3の状態情報及び前記第4の状態情報の少なくともいずれかを出力する第2出力ステップと、
前記第1の装置の状態を示す第5の状態情報及び前記第2の装置の状態を示す第6の状態情報の少なくともいずれかを取得するステップと、前記第5の状態情報及び前記第6の状態情報の少なくともいずれかを出力するステップと、
前記第1出力ステップにおいて出力された前記第1の状態情報及び前記第2の状態情報の少なくともいずれか並びに前記第2出力ステップにおいて出力された前記第3の状態情報及び前記第4の状態情報の少なくともいずれかを取得するステップと、前記第4の状態情報に基づいて、前記第1の装置が発行する秘密鍵が不正利用されたかを判定し、前記第1の状態情報に基づいて、前記第2の装置が発行する秘密鍵が不正利用されたかを判定し、前記第2の状態情報及び前記第3の状態情報の少なくともいずれかに基づいて、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する第1判定ステップと、のいずれかを、ブロックチェーンを構成するコンピュータに実行させるためのプログラムを出力する装置であって、
前記第1判定ステップにおいて、前記第2の状態情報が示す情報は前記第3の状態情報が示す情報と同一であると解釈することにより、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する
出力装置。
A step of acquiring at least one of a first state information indicating the state of the second device and a second state information indicating the state of the third device, the first state information, and the second state information. The first output step to output at least one of
A step of acquiring at least one of a third state information indicating the state of the third device and a fourth state information indicating the state of the first device, the third state information, and the fourth state. A second output step that outputs at least one of the information,
The step of acquiring at least one of the fifth state information indicating the state of the first device and the sixth state information indicating the state of the second device, the fifth state information, and the sixth state. A step to output at least one of the status information,
Of the first state information and at least one of the second state information output in the first output step, and the third state information and the fourth state information output in the second output step. Based on the step of acquiring at least one and the fourth state information, it is determined whether the private key issued by the first device has been illegally used, and based on the first state information, the first It is determined whether the private key issued by the second device has been illegally used, and the private key issued by the third device is illegal based on at least one of the second state information and the third state information. A device that outputs a program for causing a computer constituting a blockchain to execute one of the first determination step for determining whether or not it has been used.
In the first determination step, by interpreting that the information indicated by the second state information is the same as the information indicated by the third state information, the private key issued by the third device is illegally used. An output device that determines whether or not it is.
前記第1の状態情報、前記第2の状態情報、前記第3の状態情報及び前記第4の状態情報の各々は、第1の値又は第2の値を含み、
前記第1の値は、前記第1の装置、前記第2の装置又は前記第3の装置の電源が所定の期間において遮断されていないかつネットワークとの接続を維持していると判断されていることを示し、
前記第2の値は、前記第1の装置、前記第2の装置又は前記第3の装置が前記所定の期間において遮断されているまたはネットワークから切断されていると判断されていることを示し、
前記第1判定ステップにおいて、前記第2の状態情報に含まれる第1の値又は第2の値と、前記第3の状態情報に含まれる第1の値又は第2の値と、を用いた演算を行うことにより、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する
請求項1に記載の出力装置。
Each of the first state information, the second state information, the third state information and the fourth state information includes a first value or a second value.
The first value is determined that the power of the first device, the second device or the third device has not been cut off for a predetermined period of time and the connection with the network is maintained. Show that
The second value indicates that the first device, the second device or the third device has been determined to be disconnected or disconnected from the network during the predetermined period.
In the first determination step, the first value or the second value included in the second state information and the first value or the second value included in the third state information are used. The output device according to claim 1, wherein it is determined whether or not the private key issued by the third device has been illegally used by performing an operation.
時刻に関する第1の時刻情報又は所定の検証プロセスの周期を示す第1のインデックスと、第1の秘密鍵に対応する第1の公開鍵又は前記第1の公開鍵の生成に用いられる値と、を含む第1のメッセージと、前記第1のメッセージについての第1のハッシュ値に対して第2の秘密鍵を用いることにより生成された第1の電子署名と、を取得するステップと、
前記第1のメッセージ及び前記第1の電子署名を出力するステップと、
前記第1のメッセージ、前記第1の電子署名、第2のメッセージ及び第2の電子署名を取得するステップと、
前記第1の時刻情報又は前記第1のインデックスと、前記第1のメッセージ又は前記第2のメッセージを取得する際に、前記第1のメッセージ及び前記第1の電子署名と、前記第2のメッセージおよび前記第2の電子署名と、のいずれかを取得済みであることと、の少なくともいずれかに基づいて、前記第2の秘密鍵が不正利用されたことを判定するステップと、
前記第2のメッセージは、前記第1の公開鍵又は前記第1の公開鍵の生成に用いられる値を少なくとも含み、
前記第2の電子署名は、前記第2のメッセージ及び前記第2の秘密鍵に基づいて生成され、
前記第1の秘密鍵は前記第2の秘密鍵と異なる
請求項2に記載の出力装置。
A first index indicating the first time information about the time or the period of a predetermined verification process, a first public key corresponding to the first private key, or a value used to generate the first public key. A step of obtaining a first message including, and a first digital signature generated by using a second private key for the first hash value for the first message.
The step of outputting the first message and the first electronic signature, and
The step of acquiring the first message, the first electronic signature, the second message and the second electronic signature, and
When acquiring the first time information or the first index, the first message or the second message, the first message, the first electronic signature, and the second message. And the step of determining that the second private key has been misused based on at least one of the second electronic signature and the fact that one of them has been obtained.
The second message contains at least the value used to generate the first public key or the first public key.
The second digital signature is generated based on the second message and the second private key.
The output device according to claim 2, wherein the first secret key is different from the second secret key.
周期nにおいて、前記第1のメッセージと、前記第1の電子署名とを取得するステップと、
周期n+1において、時刻に関する第2の時刻情報又は周期nに対応する第2のインデックスと、第3の秘密鍵に対応する第3の公開鍵又は前記第3の公開鍵の生成に用いられる値と、を含む第3のメッセージと、前記第3のメッセージについてのハッシュ値に対して前記第1の秘密鍵を用いることにより生成された第3の電子署名と、を取得するステップと、を有し、
nは整数であり、前記第3の秘密鍵は前記第1の秘密鍵及び前記第2の秘密鍵と異なる
請求項3に記載の出力装置。
In the cycle n, the step of acquiring the first message and the first electronic signature, and
In cycle n + 1, it is used to generate the second time information about time or the second index corresponding to cycle n and the third public key corresponding to the third private key or the third public key. A step of obtaining a third message, including a value, and a third digital signature generated by using the first private key for the hash value for the third message. Have and
The output device according to claim 3, wherein n is an integer, and the third secret key is different from the first secret key and the second secret key.
前記第1のメッセージは、周期n-1におけるメッセージのハッシュ値をさらに含み、前記第3のメッセージは、前記第1のメッセージのハッシュ値をさらに含む
請求項4に記載の出力装置。
The output device according to claim 4, wherein the first message further includes a hash value of the message in period n-1, and the third message further includes a hash value of the first message.
時刻に関する第4の時刻情報と、第4の秘密鍵に対応する第4の公開鍵又は前記第4の公開鍵の生成に用いられる値と、を含む第4のメッセージと、前記第4のメッセージについての第4のハッシュ値に対して第5の秘密鍵を用いることにより生成された第4の電子署名と、を出力するステップと、
前記第4のメッセージ及び前記第4の電子署名を取得するステップと、
前記第3の装置の電源が遮断されていない場合、前記第4の公開鍵、前記第4のハッシュ値及び前記第4の電子署名を取得するステップと、
前記第4の電子署名が前記第5の秘密鍵によって前記第4のハッシュ値に対して署名されていると判定した場合、前記第4のハッシュ値を第5のハッシュ値として前記第1のメッセージに含め、前記第1のメッセージを出力するステップと、
前記第1のメッセージに前記第5のハッシュ値が含まれない場合又は前記第4のメッセージに含まれる第4のハッシュ値が前記第5のハッシュ値と異なる場合、前記第3の装置の電源が遮断されていると判定するステップと、を有し、
前記第1のメッセージは前記第3の状態情報を含み、前記第4の秘密鍵は前記第5の秘密鍵と異なる
請求項3から5のいずれか一項に記載の出力装置。
A fourth message containing a fourth time information about the time and a value used to generate the fourth public key corresponding to the fourth private key or the fourth public key, and the fourth message. A step to output the fourth digital signature, generated by using the fifth private key for the fourth hash value for.
The step of acquiring the fourth message and the fourth electronic signature, and
When the power of the third device is not cut off, the step of acquiring the fourth public key, the fourth hash value, and the fourth electronic signature, and
When it is determined that the fourth electronic signature is signed with respect to the fourth hash value by the fifth private key, the first message with the fourth hash value as the fifth hash value. And the step to output the first message,
If the first message does not include the fifth hash value, or if the fourth hash value contained in the fourth message is different from the fifth hash value, the power supply of the third device is turned on. It has a step of determining that it is blocked, and
The output device according to any one of claims 3 to 5, wherein the first message includes the third state information, and the fourth secret key is different from the fifth secret key.
第3の装置のモニタの開始を示すことを示す情報及び第2の公開鍵を前記第3の装置に出力するステップと、
時刻に関する第6の時刻情報又は所定の検証プロセスの周期を示す第6のインデックスと、第7のメッセージに含まれる第7の公開鍵と、前記第7のメッセージのハッシュ値とを含む第6のメッセージを生成するステップと、
前記第7の公開鍵に対応する第7の秘密鍵を用いて前記第6のメッセージに対する第6の電子署名を生成するステップと、
前記第7の秘密鍵及び前記第2の公開鍵を用いて前記第2の装置及び前記第3の装置の共通鍵である第1の共通鍵を生成し、前記第6のメッセージに対する第6のハッシュ値及び第1の共通鍵を用いて第1のメッセージ認証符号を生成するステップと、
前記第6のメッセージ及び前記第6の電子署名を前記第1の装置、前記第2の装置及び前記第3の装置のいずれかに出力するステップと、
第6のハッシュ値及び第1のメッセージ認証符号のいずれかを前記第3の装置から取得しなかった場合、前記第3の装置をモニタした装置であることを示す第1の情報を生成するステップと、
前記第6のハッシュ値及び第1のメッセージ認証符号前記第3の装置からを取得し、前記第7の公開鍵を取得するステップと、
前記第2の秘密鍵及び前記第7の公開鍵を用いて第2の共通鍵を生成するステップと、
前記第6のハッシュ値及び前記第2の共通鍵を用いて第2のメッセージ認証符号を生成するステップと、
前記第1のメッセージ認証符号が前記第2のメッセージ認証符号と等しい場合、前記第6のハッシュ値が前記第3の装置から送信されたことを示す第2の情報を生成するステップと、
前記第1のメッセージ認証符号が前記第2のメッセージ認証符号と等しくない場合、前記第3の装置をモニタした装置であることを示す第1の情報を生成するステップと、
前記第1の情報又は前記第2の情報を出力するするステップと、
前記第6のメッセージ及び前記第6の電子署名を所定数以上の前記第1の装置、前記第2の装置、前記第3の装置及び前記出力装置以外の他の装置から取得しなかった場合、前記第1の情報を生成するするステップと、
所定数以上の他の装置から取得した前記第6のメッセージを基に生成したハッシュ値と、前記第3の装置から取得した第6のハッシュ値とが等しいことと、前記第6の電子署名が、前記第6のハッシュ値に対して前記第7の秘密鍵を用いて生成されていたこととがいずれも満たされた場合、前記第6のハッシュ値に対して前記第1の秘密鍵を用いてモニタに関する第1の電子署名を生成し、前記モニタに関する第1の電子署名を前記他の装置に出力するステップと、
所定数以上の他の装置から取得した前記第6のメッセージを基に生成したハッシュ値と、前記第3の装置から取得した第6のハッシュ値とが等しいことと、前記第6の電子署名が、前記第6のハッシュ値に対して前記第7の秘密鍵を用いて生成されていたこととのいずれかが満たされなかった場合、前記第1の情報を生成するステップと、前記第1の情報を出力するするステップと、
前記モニタに関する第1の電子署名を取得するステップと、
前記モニタに関する第1の電子署名が、前記第1の秘密鍵を用いて前記第6のハッシュ値に対して作成された署名であることを確認した場合、前記第1の値を生成するステップと、
前記モニタに関する第1の電子署名が、前記第1の秘密鍵を用いて前記第6のハッシュ値に対して作成された署名であることを確認できなかった場合、前記第2の値を生成するステップと、
前記第1の値又は前記第2の値を出力するするステップと、を含む
請求項3から5のいずれか一項に記載の出力装置。
A step of outputting information indicating the start of monitoring of the third device and a second public key to the third device, and a step of outputting the second public key to the third device.
A sixth index containing a sixth time information about the time or a sixth index indicating the period of a predetermined verification process, a seventh public key contained in the seventh message, and a hash value of the seventh message. Steps to generate a message and
A step of generating a sixth digital signature for the sixth message using the seventh private key corresponding to the seventh public key, and
Using the 7th private key and the 2nd public key, a 1st common key which is a common key of the 2nd device and the 3rd device is generated, and a 6th message to the 6th message is generated. The step of generating the first message authentication code using the hash value and the first common key, and
A step of outputting the sixth message and the sixth electronic signature to any of the first device, the second device, and the third device.
If either the sixth hash value or the first message authentication code is not obtained from the third device, the step of generating the first information indicating that the device monitors the third device. When,
The step of acquiring the sixth hash value and the first message authentication code from the third device and acquiring the seventh public key, and
A step of generating a second common key using the second private key and the seventh public key, and
A step of generating a second message authentication code using the sixth hash value and the second common key, and
When the first message authentication code is equal to the second message authentication code, a step of generating a second information indicating that the sixth hash value is transmitted from the third device, and
When the first message authentication code is not equal to the second message authentication code, the step of generating the first information indicating that the device monitors the third device, and
The step of outputting the first information or the second information, and
When the sixth message and the sixth electronic signature are not obtained from a predetermined number or more of the first device, the second device, the third device, and other devices other than the output device. The step of generating the first information and
The hash value generated based on the sixth message acquired from a predetermined number or more of other devices is equal to the sixth hash value acquired from the third device, and the sixth electronic signature is , If the fact that the sixth hash value was generated using the seventh secret key is satisfied, the first secret key is used for the sixth hash value. And the step of generating the first electronic signature regarding the monitor and outputting the first electronic signature regarding the monitor to the other device.
The hash value generated based on the sixth message acquired from a predetermined number or more of other devices is equal to the sixth hash value acquired from the third device, and the sixth electronic signature is If any of the sixth hash value that was generated using the seventh private key is not satisfied, the step of generating the first information and the first step. Steps to output information and
The step of obtaining the first digital signature for the monitor,
When it is confirmed that the first electronic signature relating to the monitor is a signature created for the sixth hash value using the first private key, the step of generating the first value and the step. ,
If it cannot be confirmed that the first digital signature for the monitor is a signature created for the sixth hash value using the first private key, the second value is generated. Steps and
The output device according to any one of claims 3 to 5, comprising the step of outputting the first value or the second value.
少なくとも第1の装置、第2の装置、第3の装置及び第4の装置を備える管理システムであって、
前記第1の装置は、前記第2の装置の状態を示す第1の状態情報及び前記第3の装置の状態を示す第2の状態情報の少なくともいずれかを取得する第1取得部と、前記第1の状態情報及び前記第2の状態情報の少なくともいずれかを出力する第1通信部と、を備え、
前記第2の装置は、前記第3の装置の状態を示す第3の状態情報及び前記第1の装置の状態を示す第4の状態情報の少なくともいずれかを取得する第2取得部と、第2処理部と、前記第3の状態情報及び前記第4の状態情報の少なくともいずれかを出力する第2通信部と、を備え、
前記第3の装置は、前記第1の装置の状態を示す第5の状態情報及び前記第2の装置の状態を示す第6の状態情報の少なくともいずれかを取得する第3取得部と、第3処理部と、前記第5の状態情報及び前記第6の状態情報の少なくともいずれかを出力する第3通信部と、を備え、
前記第4の装置は、前記第1通信部が出力した前記第1の状態情報及び前記第2の状態情報の少なくともいずれか並びに前記第2通信部が出力した前記第3の状態情報及び前記第4の状態情報の少なくともいずれかを取得する第4取得部と、第4処理部と、前記第4の状態情報に基づいて、前記第1の装置が発行する秘密鍵が不正利用されたかを判定し、前記第1の状態情報に基づいて、前記第2の装置が発行する秘密鍵が不正利用されたかを判定し、前記第2の状態情報及び前記第3の状態情報の少なくともいずれかに基づいて、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する第4判定部と、第4通信部と、を備え、
前記第4判定部は、前記第2の状態情報が示す情報は前記第3の状態情報が示す情報と同一であると解釈することにより、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する
管理システム。
A management system including at least a first device, a second device, a third device, and a fourth device.
The first device includes a first acquisition unit that acquires at least one of a first state information indicating the state of the second device and a second state information indicating the state of the third device, and the above-mentioned first device. A first communication unit that outputs at least one of the first state information and the second state information is provided.
The second device includes a second acquisition unit that acquires at least one of a third state information indicating the state of the third device and a fourth state information indicating the state of the first device. A second processing unit and a second communication unit that outputs at least one of the third state information and the fourth state information are provided.
The third device has a third acquisition unit that acquires at least one of a fifth state information indicating the state of the first device and a sixth state information indicating the state of the second device, and a third device. A third processing unit and a third communication unit that outputs at least one of the fifth state information and the sixth state information are provided.
The fourth device includes at least one of the first state information and the second state information output by the first communication unit, and the third state information and the third state information output by the second communication unit. Based on the 4th acquisition unit, the 4th processing unit, and the 4th state information for acquiring at least one of the 4 state information, it is determined whether the private key issued by the 1st device has been illegally used. Then, based on the first state information, it is determined whether the private key issued by the second device has been illegally used, and based on at least one of the second state information and the third state information. A fourth determination unit for determining whether or not the private key issued by the third device has been illegally used, and a fourth communication unit are provided.
The fourth determination unit interprets that the information indicated by the second state information is the same as the information indicated by the third state information, so that the private key issued by the third device is illegally used. A management system that determines whether or not it is.
前記第1の状態情報、前記第2の状態情報、前記第3の状態情報及び前記第4の状態情報の各々は、第1の値又は第2の値を含み、
前記第1の値は、前記第1の装置、前記第2の装置又は前記第3の装置の電源が所定の期間において遮断されていないかつネットワークとの接続を維持していると判断されていることを示し、
前記第2の値は、前記第1の装置、前記第2の装置又は前記第3の装置が前記所定の期間において遮断されているまたはネットワークから切断されていると判断されていることを示し、
前記第4判定部は、前記第2の状態情報に含まれる前記第1の値又は前記第2の値と、前記第3の状態情報に含まれる前記第1の値又は前記第2の値と、を用いた演算を行うことにより、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する
請求項8に記載の管理システム。
Each of the first state information, the second state information, the third state information and the fourth state information includes a first value or a second value.
The first value is determined that the power of the first device, the second device or the third device has not been cut off for a predetermined period of time and the connection with the network is maintained. Show that
The second value indicates that the first device, the second device or the third device has been determined to be disconnected or disconnected from the network during the predetermined period.
The fourth determination unit includes the first value or the second value included in the second state information, and the first value or the second value included in the third state information. The management system according to claim 8, wherein it is determined whether or not the private key issued by the third device has been illegally used by performing an operation using.
前記第1取得部、前記第2取得部又は前記第3取得部は、時刻に関する第1の時刻情報又は所定の検証プロセスの周期を示す第1のインデックスと、第1の秘密鍵に対応する第1の公開鍵又は前記第1の公開鍵の生成に用いられる値と、を含む第1のメッセージと、前記第1のメッセージについての第1のハッシュ値に対して第2の秘密鍵を用いることにより生成された第1の電子署名と、を取得し、
前記第1通信部、前記第2通信部又は前記第3通信部は、前記第1のメッセージ、前記第1の電子署名を出力し、
前記第4取得部は、前記第1のメッセージ、前記第1の電子署名、第2のメッセージ及び第2の電子署名を取得し、
前記第1の時刻情報又は前記第1のインデックスと、前記第1取得部が前記第1のメッセージ又は前記第2のメッセージを取得する際に、前記第1のメッセージ及び前記第1の電子署名と、前記第2のメッセージ及び前記第2の電子署名と、のいずれかを前記第2取得部が取得済みであることと、の少なくともいずれかに基づいて、前記第2の秘密鍵が不正利用されたことを前記第4判定部は判定し、
前記第2の電子署名は、前記第2のメッセージ及び前記第2の秘密鍵に基づいて生成され、
前記第2のメッセージは、前記第1の公開鍵又は前記第1の公開鍵の生成に用いられる値を少なくとも含み、
前記第1の秘密鍵は前記第2の秘密鍵と異なる
請求項8又は請求項9に記載の管理システム。
The first acquisition unit, the second acquisition unit, or the third acquisition unit corresponds to the first time information regarding the time or the first index indicating the cycle of a predetermined verification process, and the first private key. Use a second private key for a first message containing 1 public key or a value used to generate the 1st public key, and a 1st hash value for the 1st message. With the first digital signature generated by,
The first communication unit, the second communication unit, or the third communication unit outputs the first message and the first electronic signature.
The fourth acquisition unit acquires the first message, the first electronic signature, the second message, and the second electronic signature.
The first time information or the first index, and the first message and the first electronic signature when the first acquisition unit acquires the first message or the second message. , The second private key is misused based on at least one of the second message and the second electronic signature that the second acquisition unit has already acquired. The fourth judgment unit judges that, and
The second digital signature is generated based on the second message and the second private key.
The second message contains at least the value used to generate the first public key or the first public key.
The management system according to claim 8 or 9, wherein the first private key is different from the second private key.
前記第1取得部、前記第2取得部又は前記第3取得部は、
周期nにおいて、前記第1のメッセージと、前記第1の電子署名とを取得し、
周期n+1において、時刻に関する第2の時刻情報又は周期nに対応する第2のインデックスと、第3の秘密鍵に対応する第3の公開鍵又は前記第3の公開鍵の生成に用いられる値と、を含む第3のメッセージと、前記第3のメッセージについてのハッシュ値に対して前記第1の秘密鍵を用いることにより生成された第3の電子署名と、を取得し、
nは整数であり、前記第3の秘密鍵は前記第1の秘密鍵及び前記第2の秘密鍵と異なる
請求項10に記載の管理システム。
The first acquisition unit, the second acquisition unit, or the third acquisition unit
In the period n, the first message and the first electronic signature are acquired, and the first message is acquired.
In cycle n + 1, it is used to generate the second time information about time or the second index corresponding to cycle n and the third public key corresponding to the third private key or the third public key. Obtains a third message, including a value, and a third digital signature generated by using the first private key for the hash value for the third message.
The management system according to claim 10, wherein n is an integer and the third secret key is different from the first secret key and the second secret key.
前記第1のメッセージは、周期n-1におけるメッセージのハッシュ値をさらに含み、前記第3のメッセージは、前記第1のメッセージのハッシュ値をさらに含む
請求項11に記載の管理システム。
The management system according to claim 11, wherein the first message further includes a hash value of the message in period n-1, and the third message further includes a hash value of the first message.
前記第3通信部は、時刻に関する第4の時刻情報と、第4の秘密鍵に対応する第4の公開鍵又は前記第4の公開鍵の生成に用いられる値と、を含む第4のメッセージと、前記第4のメッセージについての第4のハッシュ値に対して第5の秘密鍵を用いることにより生成された第4の電子署名と、を出力し、
前記第4取得部は、前記第4のメッセージ及び前記第4の電子署名を取得し、
前記第3の装置の電源が遮断されていない場合、前記第2取得部は、前記第4の公開鍵、前記第4のハッシュ値及び前記第4の電子署名を取得し、
前記第4の電子署名が前記第5の秘密鍵によって前記第4のハッシュ値に対して署名されている場合、前記第2通信部は、前記第4のハッシュ値を第5のハッシュ値として前記第1のメッセージに含め、前記第1のメッセージを出力し、
前記第1のメッセージに前記第5のハッシュ値が含まれない場合又は前記第4のメッセージに含まれる第4のハッシュ値が前記第5のハッシュ値と異なる場合、前記第4判定部は、前記第3の装置の電源が遮断されていると判定し、
前記第1のメッセージは前記第3の状態情報を含み、前記第4の秘密鍵は前記第5の秘密鍵と異なる
請求項10から請求項12のいずれか一項に記載の管理システム。
The third communication unit includes a fourth time information regarding the time, a fourth public key corresponding to the fourth private key, or a value used to generate the fourth public key, and a fourth message. And the fourth digital signature generated by using the fifth private key for the fourth hash value for the fourth message.
The fourth acquisition unit acquires the fourth message and the fourth electronic signature, and obtains the fourth electronic signature.
When the power of the third device is not cut off, the second acquisition unit acquires the fourth public key, the fourth hash value, and the fourth electronic signature.
When the fourth electronic signature is signed with respect to the fourth hash value by the fifth private key, the second communication unit uses the fourth hash value as the fifth hash value. Included in the first message, output the first message,
If the first message does not include the fifth hash value, or if the fourth hash value contained in the fourth message is different from the fifth hash value, the fourth determination unit may use the fourth determination unit. Judging that the power of the third device is cut off,
The management system according to any one of claims 10 to 12, wherein the first message includes the third state information, and the fourth secret key is different from the fifth secret key.
前記第2通信部は、第3の装置のモニタの開始を示すことを示す情報及び第2の公開鍵を前記第3の装置に出力し、
前記第3処理部は、
時刻に関する第6の時刻情報又は所定の検証プロセスの周期を示す第6のインデックスと、第7のメッセージに含まれる第7の公開鍵又は前記第7の公開鍵の生成に用いられる値と、前記第7のメッセージのハッシュ値とを含む第6のメッセージを生成し、
前記第7の公開鍵に対応する第7の秘密鍵を用いて前記第6のメッセージに対する第6の電子署名を生成し、
前記第7の秘密鍵及び前記第2の公開鍵を用いて前記第2の装置及び前記第3の装置の共通鍵である第1の共通鍵を生成し、前記第6のメッセージに対する第6のハッシュ値及び第1の共通鍵を用いて第1のメッセージ認証符号を生成し、
前記第3通信部は、前記第6のメッセージ及び前記第6の電子署名を前記第1の装置、前記第2の装置、前記第3の装置及び前記第4の装置以外の他の装置と、前記第4の装置とのいずれかに出力し、
前記第2取得部が第6のハッシュ値及び第1のメッセージ認証符号のいずれかを前記第3の装置から取得しなかった場合、前記第2処理部は、前記第3の装置をモニタした装置であることを示す第1の情報を生成し、前記第2通信部は、前記第1の情報を出力する
請求項10から請求項12のいずれか一項に記載の管理システム。
The second communication unit outputs information indicating the start of monitoring of the third device and the second public key to the third device.
The third processing unit is
A sixth index indicating the sixth time information about the time or the period of a predetermined verification process, a value used to generate the seventh public key or the seventh public key contained in the seventh message, and the above. Generates a sixth message, including the hash value of the seventh message,
A sixth digital signature for the sixth message is generated using the seventh private key corresponding to the seventh public key.
Using the 7th private key and the 2nd public key, a 1st common key which is a common key of the 2nd device and the 3rd device is generated, and a 6th message to the 6th message is generated. Generate the first message authentication code using the hash value and the first common key,
The third communication unit transmits the sixth message and the sixth electronic signature to the first device, the second device, the third device, and other devices other than the fourth device. Output to any of the 4th devices,
If the second acquisition unit does not acquire either the sixth hash value or the first message authentication code from the third device, the second processing unit monitors the third device. The management system according to any one of claims 10 to 12, wherein the first information indicating that the system is used is generated, and the second communication unit outputs the first information.
前記第2取得部は、
前記第6のハッシュ値及び第1のメッセージ認証符号を前記第3の装置から取得し、前記第7の公開鍵、を取得し、
前記第2処理部は、前記第2の秘密鍵及び前記第7の公開鍵を用いて第2の共通鍵を生成し、
前記第6のハッシュ値及び前記第2の共通鍵を用いて第2のメッセージ認証符号を生成し、
前記第1のメッセージ認証符号が前記第2のメッセージ認証符号と等しい場合、前記第6のハッシュ値が前記第3の装置から送信されたことを示す第2の情報を生成し、
前記第1のメッセージ認証符号が前記第2のメッセージ認証符号と等しくない場合、前記第3の装置をモニタした装置であることを示す第1の情報を生成し、
第2通信部は、前記第1の情報又は前記第2の情報を出力する
請求項14に記載の管理システム。
The second acquisition unit is
The sixth hash value and the first message authentication code are acquired from the third device, and the seventh public key is acquired.
The second processing unit generates a second common key using the second private key and the seventh public key.
Using the sixth hash value and the second common key, a second message authentication code is generated.
When the first message authentication code is equal to the second message authentication code, the second information indicating that the sixth hash value is transmitted from the third device is generated.
When the first message authentication code is not equal to the second message authentication code, the first information indicating that the device is a monitor of the third device is generated.
The management system according to claim 14, wherein the second communication unit outputs the first information or the second information.
前記第2取得部が前記第6のメッセージ及び前記第6の電子署名を所定数以上の前記他の装置と、前記第4の装置とのいずれかから取得しなかった場合、前記第2処理部は前記第1の情報を生成する
請求項14に記載の管理システム。
When the second acquisition unit does not acquire the sixth message and the sixth electronic signature from any of the predetermined number or more of the other devices and the fourth device, the second processing unit. Is the management system according to claim 14, which generates the first information.
第2取得部が所定数以上の他の装置と、前記第4の装置とのいずれかから取得した前記第6のメッセージを基に生成したハッシュ値と、前記第3の装置から取得した第6のハッシュ値とが等しいことと、前記第6の電子署名が、前記第6のハッシュ値に対して前記第7の秘密鍵を用いて生成されていたこととがいずれも満たされた場合、前記第2処理部は、前記第6のハッシュ値に対して前記第1の秘密鍵を用いてモニタに関する第1の電子署名を生成し、前記第2通信部は前記モニタに関する第1の電子署名を前記他の装置又は前記第4の装置に出力し、
第2取得部が所定数以上の他の装置と、前記第4の装置とのいずれかから取得した前記第6のメッセージを基に生成したハッシュ値と、前記第3の装置から取得した第6のハッシュ値とが等しいことと、前記第6の電子署名が、前記第6のハッシュ値に対して前記第7の秘密鍵を用いて生成されていたこととのいずれかが満たされなかった場合、前記第2処理部は、前記第1の情報を生成し、前記第2通信部は前記第1の情報を出力する
請求項16に記載の管理システム。
The hash value generated based on the sixth message acquired by the second acquisition unit from any of the predetermined number of other devices and the fourth device, and the sixth device acquired from the third device. When both the hash value equal to and that the sixth digital signature was generated with respect to the sixth hash value using the seventh private key are satisfied, the above. The second processing unit generates the first electronic signature regarding the monitor using the first private key for the sixth hash value, and the second communication unit generates the first electronic signature regarding the monitor. Output to the other device or the fourth device,
The hash value generated based on the sixth message acquired by the second acquisition unit from any of the predetermined number or more of other devices and the fourth device, and the sixth acquired from the third device. If either the hash value of is equal to or that the sixth digital signature was generated using the seventh private key for the sixth hash value is not satisfied. The management system according to claim 16, wherein the second processing unit generates the first information, and the second communication unit outputs the first information.
前記第4取得部は、前記モニタに関する第1の電子署名を取得し、
前記モニタに関する第1の電子署名が、前記第1の秘密鍵を用いて前記第6のハッシュ値に対して作成された署名であることを前記第4判定部が確認した場合、前記第4処理部は、第1の値を生成し、
前記モニタに関する第1の電子署名が、前記第1の秘密鍵を用いて前記第6のハッシュ値に対して作成された署名であることを前記第4判定部が確認できなかった場合、前記第4処理部は、第2の値を生成し、
前記第4通信部は、前記第1の値又は前記第2の値を出力する
請求項17に記載の管理システム。
The fourth acquisition unit acquires the first electronic signature regarding the monitor, and obtains the first electronic signature.
When the fourth determination unit confirms that the first electronic signature relating to the monitor is a signature created for the sixth hash value using the first secret key, the fourth process is performed. The part produces the first value,
When the fourth determination unit cannot confirm that the first electronic signature relating to the monitor is a signature created for the sixth hash value using the first private key, the first electronic signature is described. 4 The processing unit generates the second value,
The management system according to claim 17, wherein the fourth communication unit outputs the first value or the second value.
前記第2通信部は、
第8の公開鍵を求める公開鍵要求リクエストを第5の装置に出力し、
前記第8の公開鍵又は前記第8の公開鍵の生成に用いられる値を含む第8のメッセージと、モニタに関する第2の電子署名とを前記第5の装置から受信し、前記モニタに関する第2の電子署名は、前記第8のメッセージのハッシュ値に対して第6の秘密鍵によって生成され、前記第6の秘密鍵に対応する第6の公開鍵又は前記第6の公開鍵の生成に用いられる値は前記第6のメッセージに含まれ、
前記第8のメッセージと、前記モニタに関する第2の電子署名とのいずれかを前記第2通信部が受信しなかった場合、前記第2処理部は、前記第3の装置の電源が遮断されている遮断され又はネットワークから切断されていると判断し、
前記第8のメッセージと、前記モニタに関する第2の電子署名とを前記第2通信部が受信し、前記モニタに関する第2の電子署名が、前記第6の公開鍵に対応する第6の秘密鍵を用いて前記第8のメッセージのハッシュ値に対して生成されたものである場合、前記第2処理部は、前記第8の公開鍵が真正であると判断する
請求項14から18のいずれか一項に記載の管理システム。
The second communication unit
Output a public key request request for the 8th public key to the 5th device,
An eighth message containing the eighth public key or a value used to generate the eighth public key and a second digital signature relating to the monitor are received from the fifth device and the second regarding the monitor. The digital signature is generated by the sixth private key for the hash value of the eighth message, and is used to generate the sixth public key corresponding to the sixth private key or the sixth public key. The value to be included in the sixth message above,
If either the eighth message or the second electronic signature relating to the monitor is not received by the second communication unit, the second processing unit is cut off from the power of the third device. Judging that it is blocked or disconnected from the network,
The second communication unit receives the eighth message and the second electronic signature relating to the monitor, and the second electronic signature relating to the monitor is the sixth private key corresponding to the sixth public key. If it is generated for the hash value of the eighth message using the above, the second processing unit determines that the eighth public key is authentic. Any one of claims 14 to 18. The management system described in paragraph 1.
少なくとも第1の装置、第2の装置、第3の装置及び第4の装置を備える管理システムにおいて用いられる方法であって、
前記第1の装置が、前記第2の装置の状態を示す第1の状態情報及び第3の装置の状態を示す第2の状態情報の少なくともいずれかを取得する第1取得ステップと、前記第1の状態情報及び前記第2の状態情報の少なくともいずれかを出力する第1出力ステップと、
前記第2の装置が、前記第3の装置の状態を示す第3の状態情報及び第1の装置の状態を示す第4の状態情報の少なくともいずれかを取得する第2取得ステップと、前記第3の状態情報及び前記第4の状態情報の少なくともいずれかを出力する第2出力ステップと、
前記第3の装置が、前記第1の装置の状態を示す第5の状態情報及び前記第2の装置の状態を示す第6の状態情報の少なくともいずれかを取得する第3取得ステップと、前記第5の状態情報及び前記第6の状態情報の少なくともいずれかを出力する第3出力ステップと、
前記第4の装置が、前記第1出力ステップにおいて出力された前記第1の状態情報及び前記第2の状態情報の少なくともいずれか並びに前記第2出力ステップにおいて出力された前記第3の状態情報及び前記第4の状態情報の少なくともいずれかを取得する第4取得ステップと、前記第4の状態情報に基づいて、前記第1の装置が発行する秘密鍵が不正利用されたかを判定し、前記第1の状態情報に基づいて、前記第2の装置が発行する秘密鍵が不正利用されたかを判定し、前記第2の状態情報及び前記第3の状態情報の少なくともいずれかに基づいて、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する第1判定ステップと、を有し、
前記第1判定ステップにおいて、前記第2の状態情報が示す情報は前記第3の状態情報が示す情報と同一であると解釈することにより、前記第3の装置が発行する秘密鍵が不正利用されたか否かを判定する
方法。
A method used in a management system comprising at least a first device, a second device, a third device, and a fourth device.
A first acquisition step in which the first device acquires at least one of a first state information indicating the state of the second device and a second state information indicating the state of the third device, and the first acquisition step. A first output step that outputs at least one of the state information of 1 and the second state information, and
A second acquisition step in which the second device acquires at least one of a third state information indicating the state of the third device and a fourth state information indicating the state of the first device, and the first step. A second output step that outputs at least one of the state information of 3 and the fourth state information, and
A third acquisition step in which the third device acquires at least one of a fifth state information indicating the state of the first device and a sixth state information indicating the state of the second device, and the above. A third output step that outputs at least one of the fifth state information and the sixth state information, and
The fourth device has at least one of the first state information and the second state information output in the first output step, and the third state information and the third state information output in the second output step. Based on the fourth acquisition step of acquiring at least one of the fourth state information and the fourth state information, it is determined whether the private key issued by the first device has been illegally used, and the first. Based on the state information of 1, it is determined whether the private key issued by the second device has been illegally used, and based on at least one of the second state information and the third state information, the first It has a first determination step of determining whether or not the private key issued by the device of 3 has been illegally used.
In the first determination step, by interpreting that the information indicated by the second state information is the same as the information indicated by the third state information, the private key issued by the third device is illegally used. How to determine if it is.
JP2020190311A 2020-11-16 2020-11-16 Output device, management system, and method Pending JP2022079237A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020190311A JP2022079237A (en) 2020-11-16 2020-11-16 Output device, management system, and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020190311A JP2022079237A (en) 2020-11-16 2020-11-16 Output device, management system, and method

Publications (1)

Publication Number Publication Date
JP2022079237A true JP2022079237A (en) 2022-05-26

Family

ID=81707388

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020190311A Pending JP2022079237A (en) 2020-11-16 2020-11-16 Output device, management system, and method

Country Status (1)

Country Link
JP (1) JP2022079237A (en)

Similar Documents

Publication Publication Date Title
US11539698B2 (en) Inter-application delegated authentication
CN110505065B (en) Trusted timestamp adding method and device and storage medium
US20190158471A1 (en) Cryptographic security functions based on anticipated changes in dynamic minutiae
JP4638912B2 (en) Method for transmitting a direct proof private key in a signed group to a device using a distribution CD
CN112887160B (en) Block chain all-in-one machine, multi-node deployment method and device thereof, and storage medium
US9071424B1 (en) Token-based key generation
KR100936920B1 (en) Method, Client and System for Reservation Connection to Management Server using One-Time Password
CN112765684B (en) Block chain node terminal management method, device, equipment and storage medium
CN110071940A (en) Software package encipher-decipher method, server, user equipment and storage medium
KR102504361B1 (en) Device self-authentication for secure transactions
CN111506327B (en) Block chain node hot upgrading method and related equipment
CN111475832B (en) Data management method and related device
KR20200075451A (en) Unique encryption key generator for device and method thereof
Lim et al. Chain veri: blockchain-based firmware verification system for IoT environment
WO2018172782A1 (en) Security credentials
JP2022079237A (en) Output device, management system, and method
JP2022079234A (en) Management system, device and method
Salas A secure framework for OTA smart device ecosystems using ECC encryption and biometrics
CN115150073A (en) Cloud service unified identity authentication method, device and equipment based on biological characteristics
EP3836482A1 (en) Authentication authorization system, information processing device, device, authentication authorization method, and program
US20210194705A1 (en) Certificate generation method
JP2018129756A (en) Apparatus list creation system, apparatus list creation method
JP2018011190A (en) Apparatus list creation system and apparatus list creation method
Ferro et al. SAFEHIVE: Secure Attestation Framework for Embedded and Heterogeneous IoT Devices in Variable Environments
CN115719228A (en) Verification method and device for block chain account, storage medium and equipment

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7426

Effective date: 20201224

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20201224

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230915