JP2019057867A - Encryption communication system - Google Patents

Encryption communication system Download PDF

Info

Publication number
JP2019057867A
JP2019057867A JP2017182046A JP2017182046A JP2019057867A JP 2019057867 A JP2019057867 A JP 2019057867A JP 2017182046 A JP2017182046 A JP 2017182046A JP 2017182046 A JP2017182046 A JP 2017182046A JP 2019057867 A JP2019057867 A JP 2019057867A
Authority
JP
Japan
Prior art keywords
gateway
node
encryption key
communication
information
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.)
Granted
Application number
JP2017182046A
Other languages
Japanese (ja)
Other versions
JP6804026B2 (en
Inventor
清水 弘
Hiroshi Shimizu
弘 清水
隆朗 原田
Takaaki Harada
隆朗 原田
基孝 永井
Mototaka Nagai
基孝 永井
浜田 晴夫
Haruo Hamada
晴夫 浜田
聡公 森岡
Satokimi Morioka
聡公 森岡
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.)
Mtes Neural Networks
Mtes Neural Networks Co Ltd
Original Assignee
Mtes Neural Networks
Mtes Neural Networks 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 Mtes Neural Networks, Mtes Neural Networks Co Ltd filed Critical Mtes Neural Networks
Priority to JP2017182046A priority Critical patent/JP6804026B2/en
Publication of JP2019057867A publication Critical patent/JP2019057867A/en
Application granted granted Critical
Publication of JP6804026B2 publication Critical patent/JP6804026B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

To share an encryption key without sending the encryption key to a partner, in consideration of a risk at sending a common encryption key for encryption to the partner.SOLUTION: A gateway 2 and a sensor node 1 hold the same information in common therein. The gateway 2 holds a hash value calculated by a hash function from the sharing information as an encryption key for common key encryption communication to be performed between the sensor node 1 and itself. The sensor node 1 holds a hash value calculated by the same hash function as the hash function from the sharing information as an encryption key for common key encryption communication to be performed between the gateway 2 and itself. Further, the gateway 2 and the sensor node 1 update the sharing information to the same contents as each other at a predetermined timing, and update the hash value calculated by the hash function from the updated sharing information as a new encryption key.SELECTED DRAWING: Figure 6

Description

本発明は、暗号化通信システムに関する。特に、小電力無線通信等の非IPネットワークにおける通信に適した暗号化通信システムに関する。   The present invention relates to an encrypted communication system. In particular, the present invention relates to an encrypted communication system suitable for communication in a non-IP network such as low-power wireless communication.

IP(Internet Protocol)ネットワークであるインターネットにおける通信で一般的に使用されているSSL(Secure Sockets Layer)やIPsec(IP Security Architecture)は、暗号通信用の暗号鍵を共有するために、Diffie-Hellman(DH)鍵交換、RSAなどの方法で、自分の公開鍵を互いに相手に送信する必要がある。これらの方法で安全性を確保するには、2000ビット以上の整数のべき乗の剰余計算が伴うため、処理能力が小さいIoT機器には適していない。
また、IoT機器とゲートウェイとの通信に利用されているLoRa等の低電力広域通信(以下「LPWA通信」という。)ではセキュリティ機能が備えられていないため、IoT機器をインターネットに接続した場合、サイバー攻撃の対象になりやすく、深刻な被害が発生するおそれがある。
SSL (Secure Sockets Layer) and IPsec (IP Security Architecture), which are generally used for communication on the Internet, which is an IP (Internet Protocol) network, share Diffie-Hellman ( DH) It is necessary to transmit their public keys to each other by a method such as key exchange and RSA. Ensuring safety with these methods involves calculating the remainder of a power of an integer of 2000 bits or more, and is not suitable for an IoT device with a small processing capability.
In addition, low-power wide-area communication such as LoRa (hereinafter referred to as “LPWA communication”) used for communication between the IoT device and the gateway does not have a security function. May be subject to attack and serious damage may occur.

特願2017−045814明細書Japanese Patent Application No. 2017-045814

例えば、未公開の上記特許文献1の図3において、監視カメラを備えた監視装置(子機)11が、ゲートウェイである親機10とLPWA通信により通信を行う場合、悪意の第三者が不正なゲートウェイ機器から子機11に不正な指令を送って誤作動させたり、子機11からの信号を傍受してデータを書き換えて真正な親機10に転送したりする不正が起こらないとも限らない。
そのためには、通信を行う親機10及び子機11が真正なものであるかを相互に認証し、また、その間の通信も暗号化して第三者に読み取られない(あるいは読み取られても解読不可能であること)ようにすることが求められている。
さらには、暗号化のための共通の暗号鍵を相手に送る際の危険性を考慮し、暗号鍵を相手に送ることなく暗号鍵を互いに共有することが望ましい。
For example, in FIG. 3 of Patent Document 1 that has not been disclosed, when a monitoring device (child device) 11 having a monitoring camera communicates with the parent device 10 as a gateway by LPWA communication, a malicious third party is illegal. It is not necessarily the case that an illegal command is sent from the gateway device to the slave unit 11 to cause a malfunction, or a signal from the slave unit 11 is intercepted and the data is rewritten and transferred to the authentic master unit 10. .
For this purpose, it is mutually authenticated whether the parent device 10 and the child device 11 performing communication are authentic, and the communication between them is also encrypted and cannot be read by a third party (or decrypted even if read). To be impossible).
Furthermore, in consideration of the danger of sending a common encryption key for encryption to the other party, it is desirable to share the encryption key with each other without sending the encryption key to the other party.

本発明は、上述のようなLPWA通信等の非IPネットワーク通信における問題点に鑑み為されたものであり、かかる通信を行う機器間における安全性の高い暗号化通信システムを提供することを目的とする。   The present invention has been made in view of the problems in non-IP network communication such as LPWA communication as described above, and an object thereof is to provide a highly secure encrypted communication system between devices that perform such communication. To do.

本発明は、インターネットに接続されたゲートウェイと、該ゲートウェイに無線接続されたネットワークノード(以下「ノード」という。)との間の通信を暗号化して行う暗号化通信システムにおいて、前記ゲートウェイと前記ノードとの通信は低電力広域通信(以下「LPWA通信」という。)であり、前記ゲートウェイと前記ノードは同一の情報をその内部に共有しており、前記ゲートウェイは、前記共有している情報(以下「共有情報」という。)から一方向性ハッシュ関数(以下「ハッシュ関数」という。)によって算出したハッシュ値を前記ノードとの間で行う共通鍵暗号化通信の暗号鍵として保持し、前記ノードは、前記共有情報から前記ハッシュ関数と同一のハッシュ関数によって算出したハッシュ値を前記ゲートウェイとの間で行う共通鍵暗号化通信の暗号鍵として保持し、さらに、前記ゲートウェイ及び前記ノードは、前記共有情報を予め定めた所定のタイミングで互いに同一の内容で更新し、前記更新された共有情報から前記ハッシュ関数によって算出したハッシュ値を新たな暗号鍵として更新するとともに、前記ゲートウェイ及び前記ノードは、前記暗号鍵の生成及び更新を行う制御部をそれぞれ備えていることを特徴とする。   The present invention relates to an encrypted communication system that encrypts communication between a gateway connected to the Internet and a network node (hereinafter referred to as “node”) wirelessly connected to the gateway. Is a low-power wide area communication (hereinafter referred to as “LPWA communication”), the gateway and the node share the same information therein, and the gateway includes the shared information (hereinafter referred to as “LPWA communication”). A hash value calculated by a one-way hash function (hereinafter referred to as “hash function”) from “shared information”) is held as an encryption key for common key encryption communication performed with the node, , A hash value calculated by the same hash function as the hash function from the shared information And the gateway and the node update the shared information with the same content at a predetermined timing determined in advance, and the updated shared information The hash value calculated by the hash function is updated as a new encryption key, and the gateway and the node each include a control unit that generates and updates the encryption key.

また、本発明は、インターネットに接続されたゲートウェイと、該ゲートウェイに無線接続された複数のノードとの間の通信を暗号化して行う暗号化通信システムにおいて、
前記ゲートウェイと前記ノードとの通信はLPWA通信であり、前記ゲートウェイは、前記各ノードと同一の情報をその内部に共有しており(ただし、該情報は各ノードごとに異なる)、前記ゲートウェイは、前記各ノードとの共有情報からハッシュ関数によって算出したハッシュ値を前記ノードとの間で行う共通鍵暗号化通信の個別暗号鍵として保持し、
前記ノードは、前記共有情報から前記ハッシュ関数と同一のハッシュ関数によって算出したハッシュ値を前記ゲートウェイとの間で行う共通鍵暗号化通信の個別暗号鍵として保持し、さらに、前記ゲートウェイは、前記各ノードと共有しているすべての共有情報(ノードの台数分存在する)から前記ハッシュ関数と同一あるいは別のハッシュ関数で算出した一つのハッシュ値を前記各ノードに共通する共通暗号鍵として生成するとともに、前記生成した共通暗号鍵を、前記ノードごとに生成した前記個別暗号鍵を用いて暗号化し、暗号化された前記共通暗号鍵を前記各ノードに送信し、前記各ノードは、受信した前記暗号化された共通暗号鍵を、前記個別暗号鍵を用いて復号化して共通暗号鍵として保持し、前記ゲートウェイ及び前記各ノードは、前記共有情報を予め定めた所定のタイミングで互いに同一の内容で更新し、前記更新された共有情報から前記ハッシュ関数によって算出したハッシュ値を新たな個別暗号鍵として更新するとともに、前記ゲートウェイは、前記更新されたすべての共有情報から前記ハッシュ関数と同一あるいは別のハッシュ関数で算出した一つのハッシュ値を新たな共通暗号鍵として更新するとともに、前記ゲートウェイ及び前記各ノードは、前記暗号鍵の生成及び更新を行う制御部をそれぞれ備えていることを特徴とする。
Further, the present invention relates to an encrypted communication system that encrypts communication between a gateway connected to the Internet and a plurality of nodes wirelessly connected to the gateway.
Communication between the gateway and the node is LPWA communication, and the gateway shares the same information as each node inside (however, the information is different for each node). A hash value calculated by hash function from shared information with each node is held as an individual encryption key for common key encryption communication performed with the node,
The node holds a hash value calculated by using the same hash function as the hash function from the shared information as an individual encryption key for common key encryption communication performed with the gateway. A hash value calculated by using the same or different hash function as the hash function from all shared information shared by the nodes (exists for the number of nodes) is generated as a common encryption key common to the nodes. The generated common encryption key is encrypted using the individual encryption key generated for each node, the encrypted common encryption key is transmitted to each node, and each node receives the received encryption key The encrypted common encryption key is decrypted using the individual encryption key and held as a common encryption key, and the gateway and each node Updates the shared information with the same contents at a predetermined timing, updates the hash value calculated by the hash function from the updated shared information as a new individual encryption key, and the gateway , Updating one hash value calculated by the same or different hash function as the hash function from all the updated shared information as a new common encryption key, and the gateway and each node, A control unit that performs generation and update is provided.

上記構成による暗号化通信システムによれば、相手に暗号鍵を送信することなく、共通鍵暗号化通信を行うことができる。また、所定のタイミングで暗号鍵の更新を行うので、安全性がさらに高まる。   According to the encrypted communication system having the above configuration, the common key encrypted communication can be performed without transmitting the encryption key to the other party. Further, since the encryption key is updated at a predetermined timing, the safety is further enhanced.

本発明に係る暗号化通信システムが適用されるワイヤレスセンサネットワークの一例を示すブロック図である。It is a block diagram which shows an example of the wireless sensor network to which the encryption communication system which concerns on this invention is applied. センサノードのハードウェア構成例を示すブロック図である。It is a block diagram which shows the hardware structural example of a sensor node. ゲートウェイのハードウェア構成例を示すブロック図である。It is a block diagram which shows the hardware structural example of a gateway. センサノードの機能ブロックを示すブロック図である。It is a block diagram which shows the functional block of a sensor node. ゲートウェイの機能ブロックを示すブロック図である。It is a block diagram which shows the functional block of a gateway. ゲートウェイとセンサノード間における認証及び暗号化通信のシーケンスの第一実施形態を示す図である。It is a figure which shows 1st embodiment of the sequence of the authentication and encryption communication between a gateway and a sensor node. ゲートウェイとセンサノード間における認証及び暗号化通信のシーケンスの第一実施形態の変形例を示す図である。It is a figure which shows the modification of 1st embodiment of the sequence of the authentication and encryption communication between a gateway and a sensor node. ゲートウェイとセンサノード間における認証及び暗号化通信のシーケンスの第二実施形態を示す図である。It is a figure which shows 2nd embodiment of the sequence of the authentication and encryption communication between a gateway and a sensor node. ゲートウェイとセンサノード間における認証及び暗号化通信のシーケンスの第二実施形態の変形例を示す図であるIt is a figure which shows the modification of 2nd embodiment of the sequence of the authentication and encryption communication between a gateway and a sensor node. センサノードとゲートウェイの間で送受信されるデータのフォーマットの例を示す図である。It is a figure which shows the example of the format of the data transmitted / received between a sensor node and a gateway. 暗号化の範囲とセキュリティ機能の適用範囲を示した図である(パターン1の場合)。It is the figure which showed the range of encryption and the application range of a security function (in the case of pattern 1). 暗号化の範囲とセキュリティ機能の適用範囲を示した図である(パターン2の場合)。It is the figure which showed the range of encryption and the application range of a security function (in the case of pattern 2). 図12(E)の場合におけるメッセージ改竄箇所の判定を行うフローを示す図である。It is a figure which shows the flow which performs the determination of the message falsification location in the case of FIG. 暗号化の範囲とセキュリティ機能の適用範囲を示した図である(パターン3の場合)。It is the figure which showed the range of encryption and the application range of a security function (in the case of pattern 3). 暗号化の範囲とセキュリティ機能の適用範囲を示した図である(パターン4の場合)。It is the figure which showed the range of encryption and the application range of a security function (in the case of pattern 4). 暗号化の範囲とセキュリティ機能の適用範囲を示した図である(パターン5の場合)。It is the figure which showed the range of encryption and the application range of a security function (in the case of pattern 5). 暗号化の範囲とセキュリティ機能の適用範囲を示した図である(パターン6の場合)。It is the figure which showed the range of encryption and the application range of a security function (in the case of pattern 6). N個の異なる属性の情報で構成されるメッセージを暗号化通信する場合のデータフォーマットの一例を示す図である。It is a figure which shows an example of the data format in the case of carrying out encrypted communication of the message comprised from the information of N different attributes. N個の異なる属性の情報で構成されるメッセージを暗号化通信する場合のデータフォーマットの他の例を示す図である。It is a figure which shows the other example of a data format in the case of carrying out encrypted communication of the message comprised from the information of N different attributes. 図18のフォーマットのメッセージの改竄の箇所を特定する処理のフローチャートの一例を示す図である。It is a figure which shows an example of the flowchart of a process which specifies the location of the message of the format of FIG. 非IPネットワークとIPネットワークとの安全な接続方法の一例を示すシーケンス図である。It is a sequence diagram which shows an example of the secure connection method of a non-IP network and an IP network. 非IPネットワークとIPネットワークとの安全な接続方法の他の例を示すシーケンス図である。It is a sequence diagram which shows the other example of the secure connection method of a non-IP network and an IP network.

本発明に係る暗号化通信システムの実施形態について、図面を参照しつつ詳細に説明する。
図1は、本発明に係る暗号化通信システムが適用されるワイヤレスセンサネットワーク(WSN)の一例を示すブロック図である。
ノードの一例である分散配置された複数のセンサノード(計測ノードとも言う。)1がゲートウェイ2と無線接続され、センサノード1で集録されたデータはWSNを介してゲートウェイ2に送信され、インターネット3等の広域ネットワークに接続されたゲートウェイ2を介してサーバ4にデータが集められ、サーバ4に解析結果が表示されるようになっている。また、ゲートウェイ2とインターネット3との間は無線又は有線で接続されている。
なお、この実施例においては、WSNはLPWA通信などの低電力広域通信を想定している。
また、サーバ4には、利用可能なセンサノードの属性情報(ノード名、識別情報、秘密情報、シーケンス番号、型式名、シリアルNo.他)が、例えば、データベース(表1)として予め格納されている。セットアップの段階で、接続するセンサノードが決定したら、その識別情報、秘密情報、シーケンス番号(初期値:0)をサーバ4からゲートウェイ2に転送し、後述のフラッシュメモリ14に書きこむ。
Embodiments of an encrypted communication system according to the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram showing an example of a wireless sensor network (WSN) to which an encrypted communication system according to the present invention is applied.
A plurality of sensor nodes (also referred to as measurement nodes) 1 that are distributed as an example of nodes are wirelessly connected to the gateway 2, and data acquired by the sensor node 1 is transmitted to the gateway 2 via the WSN, and the Internet 3 The data is collected in the server 4 via the gateway 2 connected to a wide area network such as, and the analysis result is displayed on the server 4. The gateway 2 and the Internet 3 are connected wirelessly or by wire.
In this embodiment, the WSN assumes low power wide area communication such as LPWA communication.
In addition, in the server 4, attribute information (node name, identification information, secret information, sequence number, model name, serial number, etc.) of available sensor nodes is stored in advance as a database (Table 1), for example. Yes. When the sensor node to be connected is determined at the setup stage, the identification information, secret information, and sequence number (initial value: 0) are transferred from the server 4 to the gateway 2 and written in the flash memory 14 described later.

図2は、センサノード1のハードウェア構成を示すブロック図である。センサノード1は、本体5とセンサ6とから構成されている。本体5は、制御部10と、制御部10に接続されたLPWA通信モジュール11とセンサインタフェース(I/F)12を備えている。
LPWA通信モジュール11は、ゲートウェイ2との通信を行うための機能を備えたモジュールである。LPWA通信モジュールとしては、例えば、LoRa用のLoRaモジュール「ES920LR」(株式会社EASEL製)が利用可能である。
LoRaは最大8kmという長い距離を低い出力の電波を使って通信ができるという特長がある。なお、距離が長くなればそれだけ電力を消費するため、電池の性能を勘案しながら、配置距離を決定する。線路監視の場合、約70mおきに設置する。使用される周波数は、日本では免許の不要な特定小電力無線局が利用できる920MHz帯である。この帯域は、Wifi(登録商標)等で使用されている2.4GHz帯よりも低い周波数であり、その分長距離を飛び、建物などを回り込むことができ、雨などの影響や電波干渉を受けにくい。
FIG. 2 is a block diagram illustrating a hardware configuration of the sensor node 1. The sensor node 1 is composed of a main body 5 and a sensor 6. The main body 5 includes a control unit 10, an LPWA communication module 11 connected to the control unit 10, and a sensor interface (I / F) 12.
The LPWA communication module 11 is a module having a function for performing communication with the gateway 2. As the LPWA communication module, for example, an LoRa module “ES920LR” (manufactured by EASEL Co., Ltd.) for LoRa can be used.
LoRa has a feature that it can communicate using a low-power radio wave over a long distance of up to 8 km. In addition, since the power is consumed as the distance becomes longer, the arrangement distance is determined in consideration of the battery performance. In the case of track monitoring, it is installed every 70m. The frequency used is the 920 MHz band that can be used by specific low-power radio stations that do not require a license in Japan. This band is a frequency lower than the 2.4 GHz band used in Wifi (registered trademark) and the like, and it can travel long distances and go around buildings, and is affected by the influence of rain and radio wave interference. Hateful.

制御部10は、CPU10a、RAM10b及びROM10cを備え、センサノード1全体を制御する制御手段である。CPU10aが、ROM10c等に記憶されている所要のプログラムを実行して、ゲートウェイ2を介して、サーバ4にセンサ6で集録されたデータを送信したりする機能を有する。
センサI/F12は、センサ6との接続のためのインタフェースである。
また、制御部10は、後述のように、ゲートウェイ2を認証したり、暗号化通信のための暗号鍵を生成/更新したり、送信データを暗号鍵を用いて暗号化/復号化したりする機能も備える。
さらに、ROM10cには、後述のように、認証や暗号鍵生成のために使用する共有情報が予め格納されている。
The control unit 10 includes a CPU 10a, a RAM 10b, and a ROM 10c, and is a control unit that controls the entire sensor node 1. The CPU 10a has a function of executing a necessary program stored in the ROM 10c or the like and transmitting data collected by the sensor 6 to the server 4 via the gateway 2.
The sensor I / F 12 is an interface for connection with the sensor 6.
Further, as will be described later, the control unit 10 authenticates the gateway 2, generates / updates an encryption key for encrypted communication, and encrypts / decrypts transmission data using the encryption key. Also equipped.
Further, as will be described later, shared information used for authentication and encryption key generation is stored in advance in the ROM 10c.

図3は、ゲートウェイ2のハードウェア構成を示すブロック図である。ゲートウェイ2は、制御部10と、制御部10に接続されたLPWA通信モジュール11と通信I/F13を備えている。LPWA通信モジュール11は、センサノード1との通信を行うための機能を備えたモジュールである。通信I/F13は、インターネット3に接続するための通信インタフェースであり、有線LANまたは無線LANが利用可能である。
さらに、ゲートウェイ2は、一括書きこみ/消去が可能なフラッシュメモリ14を備えている。
制御部10は、CPU10a、RAM10b及びROM10cを備え、ゲートウェイ2全体を制御する制御手段である。CPU10aが、ROM10c等に記憶されている所要のプログラムを実行して、後述の各種の機能を実現する。
FIG. 3 is a block diagram illustrating a hardware configuration of the gateway 2. The gateway 2 includes a control unit 10, an LPWA communication module 11 connected to the control unit 10, and a communication I / F 13. The LPWA communication module 11 is a module having a function for performing communication with the sensor node 1. The communication I / F 13 is a communication interface for connecting to the Internet 3, and a wired LAN or a wireless LAN can be used.
Further, the gateway 2 includes a flash memory 14 capable of batch writing / erasing.
The control unit 10 includes a CPU 10a, a RAM 10b, and a ROM 10c, and is a control unit that controls the entire gateway 2. The CPU 10a executes necessary programs stored in the ROM 10c and the like, and realizes various functions described later.

次に、センサノード1の機能構成について説明する。図4は、センサノード1の機能構成を示す機能ブロック図である。
図4に示すように、センサノード1は、乱数発生部21、認証部22、暗号鍵生成部23、暗号化部24、共有情報更新部25、記憶部26を備える。
記憶部26を除く各部の機能は、CPU10aが所要のプログラムを実行して図4に示した各部の動作を制御することにより実現されるものである。なお、記憶部26の機能はROM10cが実現する。
Next, the functional configuration of the sensor node 1 will be described. FIG. 4 is a functional block diagram showing a functional configuration of the sensor node 1.
As shown in FIG. 4, the sensor node 1 includes a random number generation unit 21, an authentication unit 22, an encryption key generation unit 23, an encryption unit 24, a shared information update unit 25, and a storage unit 26.
The function of each part except the memory | storage part 26 is implement | achieved when CPU10a runs a required program and controls operation | movement of each part shown in FIG. The function of the storage unit 26 is realized by the ROM 10c.

このうち、乱数発生部21は、ゲートウェイ2を認証するための乱数(α)を発生させる機能を備える。
また、認証部22は、記憶部26に格納されたセンサノード1の識別情報(ID)、秘密情報(sk)、シーケンス番号(i)と、乱数発生部21で発生させた乱数(α)及び後述のゲートウェイ2から受け取った乱数(X)とを用いてゲートウェイ2を認証する機能を備える。認証の方法(シーケンス)は後述する。
Among these, the random number generation unit 21 has a function of generating a random number (α) for authenticating the gateway 2.
Further, the authentication unit 22 includes the identification information (ID), secret information (sk), sequence number (i) of the sensor node 1 stored in the storage unit 26, the random number (α) generated by the random number generation unit 21, and A function of authenticating the gateway 2 using a random number (X) received from the gateway 2 described later is provided. The authentication method (sequence) will be described later.

暗号鍵生成部23は、記憶部26に格納されたセンサノード1の識別情報(ID)、秘密情報(sk)、シーケンス番号(i)と、乱数発生部21で発生させた乱数(α)及び後述のゲートウェイ2から受け取った乱数(X)とから、一方向性ハッシュ関数によりハッシュ値を求め、それを暗号鍵として生成する機能を備える。
一方向性ハッシュ関数とは、元のデータから固定長のデータ(ハッシュ値)を作り出す関数のことであり、簡単に計算はできるが、その逆関数の計算は非常に困難若しくは不可能である関数のことである。一方向ハッシュ関数としては、MD5、SHA−1、SHA−2等が知られており、目的に応じて適宜選択することが可能である。
The encryption key generation unit 23 includes the identification information (ID), secret information (sk), sequence number (i) of the sensor node 1 stored in the storage unit 26, the random number (α) generated by the random number generation unit 21, and A hash value is obtained from a random number (X) received from the gateway 2 described later by a one-way hash function, and the hash value is generated as an encryption key.
A one-way hash function is a function that creates fixed-length data (hash value) from the original data. It can be easily calculated, but its inverse function is extremely difficult or impossible to calculate. That is. MD5, SHA-1, SHA-2, and the like are known as one-way hash functions, and can be appropriately selected according to the purpose.

暗号化部24は、暗号鍵生成部23で生成した暗号鍵を用いて、ゲートウェイ2に送信するデータを暗号化したり、その逆に、ゲートウェイ2から受信した暗号化データを復号化したりする機能を備える。
暗号化方式は共通鍵暗号化方式を用いる。例えば、米国NSAが開発し、CRYPTRECでも紹介されている軽量暗号SPECK等が利用可能である。
The encryption unit 24 has a function of encrypting data to be transmitted to the gateway 2 using the encryption key generated by the encryption key generation unit 23, and conversely decrypting the encrypted data received from the gateway 2. Prepare.
As the encryption method, a common key encryption method is used. For example, a lightweight cipher SPECK developed by the US NSA and introduced in CRYPTREC can be used.

共有情報とは、ここでは上記の秘密情報(sk)とシーケンス番号(i)をまとめたものを指すが、共有情報更新部25は、共有情報を所定のタイミングで更新する機能を備える。所定のタイミングとは、例えば、(1)一連の暗号化通信が終了後、再度、通信を開始するとき、(2)接続されている時間が一定期間を経過した時、(3)サーバから認証をすることを指示されたときのいずれかが考えられるが、ゲートウェイ2がサーバ4に接続されていない場合には、(1)か(2)のいずれか早い方になる。
共有情報が更新されると、更新された共有情報を用いて暗号鍵も更新される。
Here, the shared information refers to a collection of the secret information (sk) and the sequence number (i). The shared information update unit 25 has a function of updating the shared information at a predetermined timing. The predetermined timing is, for example, (1) when communication is started again after a series of encrypted communication ends, (2) when a certain period of time has passed, and (3) authentication from the server However, if the gateway 2 is not connected to the server 4, it will be either (1) or (2), whichever comes first.
When the shared information is updated, the encryption key is also updated using the updated shared information.

次に、ゲートウェイ2の機能構成について説明する。図5は、ゲートウェイ2の機能構成を示す機能ブロック図である。
図5に示すように、ゲートウェイ2は、乱数発生部31、認証部32、暗号鍵生成部33、暗号化部34、共有情報更新部35、記憶部36を備える。
記憶部36を除く各部の機能は、CPU10aが所要のプログラムを実行して図5に示した各部の動作を制御することにより実現されるものである。なお、記憶部36の機能はフラッシュメモリ14が実現する。
Next, the functional configuration of the gateway 2 will be described. FIG. 5 is a functional block diagram showing a functional configuration of the gateway 2.
As illustrated in FIG. 5, the gateway 2 includes a random number generation unit 31, an authentication unit 32, an encryption key generation unit 33, an encryption unit 34, a shared information update unit 35, and a storage unit 36.
The function of each part except the memory | storage part 36 is implement | achieved when CPU10a runs a required program and controls operation | movement of each part shown in FIG. The function of the storage unit 36 is realized by the flash memory 14.

このうち、乱数発生部31は、センサノード1を認証するための乱数(X)を発生させる機能を備える。
また、認証部32は、記憶部36に格納されたセンサノード1の識別情報(ID)、秘密情報(sk)、シーケンス番号(i)と、乱数発生部31で発生させた乱数(X)及び前述のセンサノード1から受け取った乱数(α)とを用いてセンサノード1を認証する機能を備える。認証の方法(シーケンス)は後述する。
暗号鍵生成部33は、記憶部36に格納されたセンサノード1の識別情報(ID)、秘密情報(sk)、シーケンス番号(i)と、乱数発生部31で発生させた乱数(X)及びセンサノード1から受け取った乱数(α)とから、一方向性ハッシュ関数によりハッシュ値を求め、それを暗号鍵として生成する機能を備える。
暗号化部34は、暗号鍵生成部33で生成した暗号鍵を用いて、センサノード1に送信するデータを暗号化したり、その逆に、センサノード1から受信した暗号化データを復号化したりする機能を備える。
Among these, the random number generator 31 has a function of generating a random number (X) for authenticating the sensor node 1.
Further, the authentication unit 32 includes the identification information (ID), secret information (sk), sequence number (i) of the sensor node 1 stored in the storage unit 36, the random number (X) generated by the random number generation unit 31, and A function of authenticating the sensor node 1 using the random number (α) received from the sensor node 1 is provided. The authentication method (sequence) will be described later.
The encryption key generation unit 33 includes the identification information (ID), secret information (sk), sequence number (i) of the sensor node 1 stored in the storage unit 36, the random number (X) generated by the random number generation unit 31, and A function of obtaining a hash value from a random number (α) received from the sensor node 1 by a one-way hash function and generating it as an encryption key is provided.
The encryption unit 34 encrypts data to be transmitted to the sensor node 1 using the encryption key generated by the encryption key generation unit 33, and conversely decrypts the encrypted data received from the sensor node 1. It has a function.

共有情報更新部35は、共有情報を所定のタイミングで更新する機能を備える。所定のタイミングとは、上述の通りである。共有情報が更新されると、更新された共有情報を用いて暗号鍵も更新される。
なお、ゲートウェイ2はプロトコル変換機能も備えるが、本発明の暗号化通信システムとは直接関係がないので、図示は省略した。
The shared information update unit 35 has a function of updating the shared information at a predetermined timing. The predetermined timing is as described above. When the shared information is updated, the encryption key is also updated using the updated shared information.
Although the gateway 2 also has a protocol conversion function, it is not shown because it is not directly related to the encrypted communication system of the present invention.

次に、センサノード1及びゲートウェイ2との間で行われる相互認証、(共通の)暗号鍵生成及び共有情報の更新方法について説明する。
図6は、ゲートウェイ2とセンサノード1の間における認証及び暗号化通信のシーケンスの第一実施形態を示す図である。以下、図においては、ゲートウェイを「GW」、センサノードを「SN」と表記する。
前提として、ゲートウェイ2のフラッシュメモリ14にはセンサノードSN1の識別情報ID1と共有情報(sk1、i1)が格納されており、センサノードSN1のROM10cにはセンサノードSN1の識別情報ID1と共有情報(sk1、i1)が格納されているものとする。
Next, mutual authentication, (common) encryption key generation, and shared information updating methods performed between the sensor node 1 and the gateway 2 will be described.
FIG. 6 is a diagram illustrating a first embodiment of a sequence of authentication and encrypted communication between the gateway 2 and the sensor node 1. Hereinafter, in the figure, the gateway is represented as “GW” and the sensor node is represented as “SN”.
As a prerequisite, the identification information ID 1 and share information (sk 1, i 1) of the sensor node SN1 in the flash memory 14 of the gateway 2 is stored, the identification information ID 1 of the sensor node SN1 to ROM10c sensor node SN1 And shared information (sk 1 , i 1 ) are stored.

両者の情報が同じものであることが確認されたら、お互いに相手が真正なものであると判断するという考え方であるが、共有情報それ自体を相手に送って、相手が持っている共有情報と直接比較するのではなく、共有情報を含む情報から求めたハッシュ値を相手に送り、相手が持っている共有情報を含む情報から求めたハッシュ値と比較することにより、共有情報が同じものか否かを判定するものである。共有情報自体を送信しないため、通信を第三者に傍受されても問題はない。   If it is confirmed that both information is the same, the idea is that each other judges that the other party is authentic, but the shared information itself is sent to the other party, and the shared information that the other party has Whether the shared information is the same by sending the hash value obtained from the information including the shared information to the other party and comparing it with the hash value obtained from the information including the shared information possessed by the other party instead of directly comparing This is a judgment. Since the shared information itself is not transmitted, there is no problem even if communication is intercepted by a third party.

まず、GWが新規乱数(X1)を生成し(S1)、乱数X1をSN1に送信する(S2)。
SN1は、GWから乱数X1を受信すると、新規乱数(α1)生成する(S3)。
次に、SN1はID1,sk1,i1,X1,α1から、ハッシュ関数Hでハッシュ値β1を計算する(S4)。
次に、SN1からGWに対して、αとβを結合したデータY11||β1を送信する(S5)。乱数を互いに送信する目的は、認証で送信するハッシュ値を毎回異なる値にすることにある。なお、「||」は連結演算子である。
βを受信したGWは、フラッシュメモリ14に格納されているID1,sk1,i1と、自身が発生させたX1とSN1から受信したα1とから、ハッシュ関数Hでハッシュ値βを計算し(S6)、受信したβと比較する(S7)。もし、両者が一致した場合は(S7のYES)、SN1は正規と判定する(S8)。なお、一致しなかった場合は(S7のNO)、SN1は不正と判定し、以降の通信を行わない(S9)。
First, the GW generates a new random number (X 1 ) (S1), and transmits the random number X 1 to SN1 (S2).
SN1 receives the random number X 1 from the GW, the new random number (alpha 1) generating (S3).
Next, SN1 calculates a hash value β 1 from the ID 1 , sk 1 , i 1 , X 1 , α 1 with the hash function H 0 (S4).
Next, it transmitted to GW from SN1, alpha 1 and combines the beta 1 and the data Y 1 = α 1 || β 1 (S5). The purpose of transmitting random numbers to each other is to make the hash value transmitted by authentication different every time. “||” is a concatenation operator.
The GW that has received β 1 uses the hash function H 0 to generate a hash value from ID 1 , sk 1 , i 1 stored in the flash memory 14, X 1 generated by itself, and α 1 received from SN 1. β is calculated (S6) and compared with the received β 1 (S7). If the two match (YES in S7), SN1 is determined to be normal (S8). If they do not match (NO in S7), SN1 is determined to be illegal and no subsequent communication is performed (S9).

次に、上記とは逆に、SN1がGWを認証する処理を行う。ステップS8でSN1が正規であると判定されたら、GWはID1,sk1,i1,X1,α1から、ハッシュ関数Hでハッシュ値Z1を計算し(S10)、ハッシュ値Z1をSN1に送信する(S11)。
Zを受信したSN1は、ROM10cに格納されているID1,sk1,i1と、自身が発生させたα1とGWから受信したX1とから、ハッシュ関数H1でハッシュ値Zを計算し(S12)、受信したZ1と比較する(S13)。もし、両者が一致した場合は(S13のYES)、GWは正規と判定する(S14)。なお、一致しなかった場合は(S13のNO)、GWは不正と判定し、以降の通信を行わない(S15)。
Next, contrary to the above, SN1 performs processing for authenticating the GW. When SN1 in step S8 is determined to be normal, GW is ID 1, sk 1, i 1 , X 1, from alpha 1, a hash value Z 1 in the hash function H 1 calculated (S10), the hash value Z 1 is transmitted to SN1 (S11).
SN1 which receives the Z 1 is calculated to ID 1, sk 1, i 1 stored in the ROM 10c, the X 1 Metropolitan that it has received from the alpha 1 and GW that caused the hash value Z by the hash functions H1 and (S12), compares Z 1 and received (S13). If they match (YES in S13), the GW is determined to be normal (S14). If they do not match (NO in S13), the GW determines that the communication is illegal and does not perform subsequent communication (S15).

GWは、ステップS11でハッシュ値Z1をSN1に送信したら、ID1,sk1,i1,X1,α1から、ハッシュ関数Hでハッシュ値を計算し(S16)、それを共通の暗号鍵(key1)として保持する。
一方、SN1も同様にしてID1,sk1,i1,X1,α1から、ハッシュ関数Hでハッシュ値を計算し(S17)、それを共通の暗号鍵(key1)として保持する。
このようにして、SN1とGWは暗号鍵を相手に送ることなく、共通の暗号鍵を保有することができる。すなわち、この第一実施形態は、センサノードごとに共通の暗号鍵が異なる場合である。
GW, once sends the hash value Z 1 at step S11 in SN1, from ID 1, sk 1, i 1 , X 1, α 1, and calculates a hash value by the hash function H 2 (S16), it common Stored as an encryption key (key 1 ).
On the other hand, holds ID 1 in the same manner SN1, sk 1, i 1, X 1, from alpha 1, as a hash value is calculated by the hash function H 2 (S17), it common encryption key (key 1) .
In this way, SN1 and GW can hold a common encryption key without sending the encryption key to the other party. That is, the first embodiment is a case where the common encryption key is different for each sensor node.

次に、SN1は、センサ6で集録したデータ等を、生成した暗号鍵(key1)で暗号化し(S18)、暗号化情報をGWに送信する(S19)。GWは、受信した暗号化情報を暗号鍵(key1)で復号化し(S20)、サーバ4に送る。
次に、GWはID1,sk1,i1からハッシュ関数Hでハッシュ値を計算し、そのハッシュ値を新たなsk1としてフラッシュメモリ14内のsk1を書き換えて更新するとともに(S21)、シーケンス番号i1を更新(例えば、1増やす。)し、フラッシュメモリ14内のi1を書き換える(S22)。
Next, SN1 encrypts the data collected by the sensor 6 with the generated encryption key (key 1 ) (S18), and transmits the encryption information to the GW (S19). The GW decrypts the received encryption information with the encryption key (key 1 ) (S 20) and sends it to the server 4.
Next, the GW calculates a hash value from the ID 1 , sk 1 , i 1 using the hash function H 2 , rewrites and updates sk 1 in the flash memory 14 using the hash value as a new sk 1 (S 21). Then, the sequence number i 1 is updated (for example, incremented by 1), and i 1 in the flash memory 14 is rewritten (S22).

一方、SN1も同様に、ID1,sk1,i1からハッシュ関数Hでハッシュ値を計算し、そのハッシュ値を新たなsk1としてROM10c内のsk1を書き換えて更新するととに(S23)、シーケンス番号i1を更新し、ROM10c内のi1を書き換える(S24)。そして、次回の通信時まで待機する。
なお、i1の更新であるが、GWとSN1で、初期値と更新の規則を同じにする。一番簡単なのは、初期値を0、その後、1ずつ大きくする方法である。最大値もソフトに設定しておき、最大値に到達したら、初期値に戻すか、1ずつ減らして行くことが考えられる
On the other hand, SN1 similarly calculates a hash value from ID 1 , sk 1 , and i 1 using a hash function H 2 and updates the sk 1 in the ROM 10c by rewriting the hash value as a new sk 1 (S23). ), and it updates the sequence number i 1, rewrites the i 1 in ROM 10c (S24). Then, it waits until the next communication.
Although i 1 is updated, the initial value and the update rule are the same in GW and SN1. The simplest method is to increase the initial value by 0 and then by 1. The maximum value can also be set in software, and when it reaches the maximum value, it can be returned to the initial value or decreased by 1

図7は、ゲートウェイとセンサノード間における認証及び暗号化通信のシーケンスの第一実施形態の変形例を示す図である。図7に示すシーケンスは、図6におけるS10〜S15までの処理を省略したものである。
すなわち、ゲートウェイ2がセンサノード1を認証する処理だけを行い、処理の簡略化を図ったものである。すなわち、ゲートウェイ2がセンサノード1を認証した結果、センサノード1が真正なものと判定されたということは、とりもなおさず、お互いが保有している共有情報が同一のものであることを意味するから、センサノード1がゲートウェイ2を認証する処理(S10〜S15)において、S13が「YES」となる可能性が極めて高いから、S10〜S15は省略が可能であるからである。
なお、図7のステップS16’とS17’は、それぞれ、図6のS16とS17のハッシュ関数Hをハッシュ関数Hに置き換えたものであり、それ以外の部分は同一である。従って、図7の説明は省略する。
FIG. 7 is a diagram showing a modification of the first embodiment of the authentication and encrypted communication sequence between the gateway and the sensor node. The sequence shown in FIG. 7 is obtained by omitting the processes from S10 to S15 in FIG.
That is, the gateway 2 performs only the process of authenticating the sensor node 1, and simplifies the process. That is, as a result of the gateway 2 authenticating the sensor node 1, it is determined that the sensor node 1 is authentic, which means that the shared information held by each other is the same. Therefore, in the process in which the sensor node 1 authenticates the gateway 2 (S10 to S15), there is a very high possibility that S13 will be “YES”, so S10 to S15 can be omitted.
Incidentally, the steps of FIG. 7 S16 'and S17' are each obtained by replacing the hash function of H 2 S16 and S17 in FIG. 6 to the hash function H 1, other portions are the same. Therefore, the description of FIG. 7 is omitted.

次に、1台のゲートウェイ2(GW)に複数のセンサノード1(SN1,SN2)が接続された場合の相互認証、(共通の)暗号鍵生成及び共有情報の更新方法について説明する。
第一実施形態の場合は、センサノードごとに暗号鍵が異なるが、センサノードごとに暗号鍵が異なると、ゲートウェイはセンサノードごとに異なった暗号鍵で暗号化を行わなければならず、また、その逆に、センサノードから受信した暗号化情報を、そのセンサノードに対応した暗号鍵で復号化しなければならなくなるので、センサノードの数が多いとゲートウェイの処理負担が過大なものとなる。
Next, a method for mutual authentication, (common) encryption key generation, and shared information updating when a plurality of sensor nodes 1 (SN1, SN2) are connected to one gateway 2 (GW) will be described.
In the case of the first embodiment, the encryption key is different for each sensor node, but if the encryption key is different for each sensor node, the gateway must perform encryption with a different encryption key for each sensor node. Conversely, the encrypted information received from the sensor node must be decrypted with the encryption key corresponding to the sensor node, so that the processing load on the gateway becomes excessive if the number of sensor nodes is large.

図8は、ゲートウェイとセンサノード間における認証及び暗号化通信のシーケンスの第二実施形態を示す図である。
この第二実施形態は、上述のような問題を解決するものであり、複数のセンサノードがあった場合でも、一つの共通した暗号鍵ですべてのセンサノードとの暗号化通信を可能にするものである。
以下、図8に基づいて第二実施形態について説明する。
前提として、ゲートウェイ2のフラッシュメモリ14にはセンサノードSN1及びSN2の識別情報ID1,ID2と共有情報(sk1,sk2,i1,i2)が格納されているものとする。また、センサノードSN1のROM10cにはセンサノードSN1の識別情報ID1と共有情報(sk1、i1)が格納されており、センサノードSN2のROM10cにはセンサノードSN2の識別情報ID2と共有情報(sk2,i2)が格納されているものとする。
FIG. 8 is a diagram showing a second embodiment of the authentication and encryption communication sequence between the gateway and the sensor node.
This second embodiment solves the above-described problem and enables encrypted communication with all sensor nodes with one common encryption key even when there are a plurality of sensor nodes. It is.
Hereinafter, a second embodiment will be described with reference to FIG.
As a premise, it is assumed that identification information ID 1 and ID 2 and shared information (sk 1 , sk 2 , i 1 , i 2 ) of the sensor nodes SN1 and SN2 are stored in the flash memory 14 of the gateway 2. Further, the ROM10c sensor node SN1 and the identification information ID 1 of the sensor node SN1 shared information (sk 1, i 1) is stored, the ROM10c sensor node SN2 and the identification information ID 2 of the sensor node SN2 shared Information (sk 2 , i 2 ) is stored.

まず、GWが新規乱数(X1)を生成し(S31)、乱数X1をSN1に送信する(S32)。
SN1は、GWから乱数X1を受信すると、新規乱数(α1)生成する(S33)。次のステップS34のGWとSN1間の相互認証のシーケンスについては、図6のステップS4〜S15と同じであるので、図示及び説明を省略する。
GWとSN2間の相互認証のシーケンスも、GWとSN1間の場合と同様に、まず、GWが新規乱数(X2)を生成し(S35)、乱数X2をSN2に送信する(S36)。
SN2は、GWから乱数X2を受信すると、新規乱数(α2)生成する(S37)。次のステップS38のGWとSN2間の相互認証のシーケンスについては、図6のステップS4〜S15と同じであるので、図示及び説明を省略する。
First, the GW generates a new random number (X 1 ) (S31), and transmits the random number X 1 to SN1 (S32).
SN1 receives the random number X 1 from the GW, the new random number (alpha 1) generating (S33). The sequence of mutual authentication between the GW and SN1 in the next step S34 is the same as steps S4 to S15 in FIG.
In the mutual authentication sequence between the GW and SN2, as in the case between the GW and SN1, first, the GW generates a new random number (X 2 ) (S35), and transmits the random number X 2 to the SN 2 (S36).
SN2 receives the random number X 2 from GW, the new random number (alpha 2) generating (S37). The sequence of mutual authentication between the GW and SN 2 in the next step S38 is the same as steps S4 to S15 in FIG.

GWは、ステップS38までにおいてすべてのセンサノードとの間で相互認証を終えたら、ID1,sk1,i1,X1,α1から、ハッシュ関数Hでハッシュ値(key1)を計算し、さらに、ID2,sk2,i2,X2,α2から、ハッシュ関数Hでハッシュ値(key2)を計算し保持する(S39)。
一方、SN1も同様にしてID1,sk1,i1,X1,α1から、ハッシュ関数Hでハッシュ値(key1)を計算し保持する(S40)。また、SN2も同様にしてID2,sk2,i2,X2,α2から、ハッシュ関数Hでハッシュ値(key2)を計算し保持する(S41)。
なお、ここでハッシュ値key1及びkey2を計算したのは、後述の共通鍵(keyc)をGWからSN1及びSN2に安全に送るためであり、ハッシュ値(key1)及びハッシュ値(key2)が個別暗号鍵に相当する。
After completing the mutual authentication with all the sensor nodes up to step S38, the GW calculates a hash value (key 1 ) from the ID 1 , sk 1 , i 1 , X 1 , α 1 with the hash function H 2. Further, a hash value (key 2 ) is calculated from the ID 2 , sk 2 , i 2 , X 2 , α 2 by the hash function H 2 and held (S39).
On the other hand, SN1 similarly calculates and holds a hash value (key 1 ) from the ID 1 , sk 1 , i 1 , X 1 , α 1 using the hash function H 2 (S40). Similarly, SN2 calculates and holds a hash value (key 2 ) from ID 2 , sk 2 , i 2 , X 2 , and α 2 using hash function H 2 (S41).
Note that the hash values key 1 and key 2 are calculated here in order to securely send a common key (key c ), which will be described later, from the GW to the SN1 and SN2, and the hash value (key 1 ) and the hash value (key 2 ) corresponds to an individual encryption key.

次に、GWは、ID1,ID2,key1,key2,i1,i2から、ハッシュ関数Hでハッシュ値(keyc)を計算し、これを共通の暗号鍵(keyc)として保持する(S42)。そして、GWはすべてのセンサノードに共通の暗号鍵keycをハッシュ値key1で暗号化してSN1に送る(S43)。
SN1は受信した情報をハッシュ値(key1)で復号化し、共通暗号鍵keycとして使用する(S44)。
同様に、GWは共通暗号鍵keycをハッシュ値key2で暗号化してSN2に送る(S45)。
SN2は受信した情報をハッシュ値(key2)で復号化し、共通暗号鍵keycとして使用する(S46)。
Next, the GW calculates a hash value (key c ) by using the hash function H 2 from ID 1 , ID 2 , key 1 , key 2 , i 1 , i 2 , and uses this as a common encryption key (key c ). (S42). Then, the GW encrypts the encryption key key c common to all the sensor nodes with the hash value key 1 and sends it to SN1 (S43).
SN1 decrypts the received information with the hash value (key 1 ) and uses it as a common encryption key key c (S44).
Similarly, the GW encrypts the common encryption key key c with the hash value key 2 and sends it to the SN 2 (S45).
SN2 decrypts the received information with the hash value (key 2 ) and uses it as a common encryption key key c (S46).

このようにして、GWとすべてのセンサノードは共通の暗号鍵を共有することができる。
これ以降、GWとSN1又はSN2の間の通信は、共通暗号鍵keycを用いた暗号化通信を行うことができる(S47,S48)。
GWとSN1及びSN2の間の暗号化通信が行われたら、GWは、ID1,sk1,i1からハッシュ関数H2でハッシュ値を計算し、そのハッシュ値でsk1を更新し、さらにID2,sk2,i2からハッシュ関数H2でハッシュ値を計算し、そのハッシュ値でsk2を更新する(S49)。そして、シーケンス番号i1,i2を更新し(S50)、次回の通信時まで待機する。
In this way, the GW and all sensor nodes can share a common encryption key.
Thereafter, the communication between the GW and SN1 or SN2 can be encrypted communication using the common encryption key key c (S47, S48).
When encrypted communication between the GW and SN1 and SN2 is performed, the GW calculates a hash value from the ID 1 , sk 1 , i 1 using the hash function H 2 , updates sk 1 with the hash value, and A hash value is calculated from the ID 2 , sk 2 , i 2 using the hash function H 2 , and sk 2 is updated with the hash value (S 49). Then, the sequence numbers i 1 and i 2 are updated (S50), and the system waits until the next communication.

同様に、SN1もID1,sk1,i1からハッシュ関数Hでハッシュ値を計算し、そのハッシュ値を新たなsk1としてROM10c内のsk1を書き換えて更新するととに(S51)、シーケンス番号i1を更新し、ROM10c内のi1を書き換える(S52)。そして、次回の通信時まで待機する。
また、SN2もID2,sk2,i2からハッシュ関数Hでハッシュ値を計算し、そのハッシュ値を新たなsk2としてROM10c内のsk2を書き換えて更新するととに(S53)、シーケンス番号i2を更新し、ROM10c内のi2を書き換える(S54)。そして、次回の通信時まで待機する。
Similarly, SN1 also calculates a hash value from ID 1 , sk 1 , i 1 using hash function H 2 , and rewrites and updates sk 1 in ROM 10 c using the hash value as new sk 1 (S 51). update the sequence number i 1, rewrites the i 1 in ROM 10c (S52). Then, it waits until the next communication.
Furthermore, the bets if SN2 also ID 2, a hash value calculated from the sk 2, i 2 by the hash function H 2, and updates rewrites sk 2 in ROM10c the hash value as the new sk 2 (S53), the sequence update the number i 2, rewritten i 2 in ROM 10c (S54). Then, it waits until the next communication.

図9は、ゲートウェイとセンサノード間における認証及び暗号化通信のシーケンスの第二実施形態の変形例を示す図である。図9に示すシーケンスと図8のシーケンスとの違いは、図8のステップS34(及びS38)がGWとSN1(及びSN2)の間における相互認証であるのに対して、図9では一方向認証である点のみである。一方向認証については、図7ですでに説明しているので、ここでは説明を省略する。
それ以外の箇所については、図8での説明と同一であるので、説明は省略する。
以上でセンサノード1及びゲートウェイ2との間で行われる認証、共通暗号鍵生成及び共有情報の更新方法についての説明を終了する。
FIG. 9 is a diagram illustrating a modification of the second embodiment of the authentication and encryption communication sequence between the gateway and the sensor node. The sequence shown in FIG. 9 is different from the sequence shown in FIG. 8 in that step S34 (and S38) in FIG. 8 is mutual authentication between GW and SN1 (and SN2), whereas in FIG. It is only the point which is. Since one-way authentication has already been described with reference to FIG. 7, the description thereof is omitted here.
Other portions are the same as those described with reference to FIG.
This is the end of the description of the authentication, common encryption key generation, and shared information update method performed between the sensor node 1 and the gateway 2.

次に、生成された共通の暗号鍵を用いて行われる暗号化通信の実施例について説明する。
図10は、センサノードとゲートウェイの間で送受信されるデータのフォーマットの例を示す図である。
図において、Dst IDは送信先(宛先)の装置のID、Src IDは送信元の装置のIDである。Dataは送受信されるデータであり、暗号化されるものである。また、Control Codeであるが、例えば次のようなものが考えられる。
(1)ゲートウェイからセンサノードに対するデータ送信要求と、センサノードからゲートウェイに送信されるデータ送信通知
(2)センサノードがゲートウェイに送信するデータのサイズ
(3)認証情報の更新時期
(4)暗号鍵の更新時期
Next, an embodiment of encrypted communication performed using the generated common encryption key will be described.
FIG. 10 is a diagram illustrating an example of a format of data transmitted and received between the sensor node and the gateway.
In the figure, Dst ID is the ID of the transmission destination (destination) apparatus, and Src ID is the ID of the transmission source apparatus. Data is data to be transmitted and received and is encrypted. In addition, as for the control code, for example, the following can be considered.
(1) Data transmission request from the gateway to the sensor node and data transmission notification transmitted from the sensor node to the gateway (2) Size of data transmitted from the sensor node to the gateway (3) Authentication information update time (4) Encryption key Update time

図10に示すデータに対して適用するセキュリティ機能は、暗号化、メッセージ認証及び送信元確認である。暗号化はデータを第三者が理解できないデータに変換する機能であり、メッセージ認証は第三者によってデータが不正に変更(改竄)されていないことを確認する機能である。また、送信元確認は、所謂「なりすまし」を防止するためのものである。送信データに対して、どこまでを暗号化するのか、また、暗号化、メッセージ認証及び送信元確認をどのように組み合わせるのかによって、次の表2に示す6つのパターンが考えられる。それぞれのパターンのときのフォーマットを図11〜図17(図13を除く)に示す。メッセージ認証にはハッシュ値を使用する。
The security functions applied to the data shown in FIG. 10 are encryption, message authentication, and sender confirmation. Encryption is a function for converting data into data that cannot be understood by a third party, and message authentication is a function for confirming that data has not been altered (tampered) by a third party. The transmission source confirmation is for preventing so-called “spoofing”. Depending on how much the transmission data is encrypted and how the encryption, message authentication and transmission source confirmation are combined, the following six patterns shown in Table 2 can be considered. The format for each pattern is shown in FIGS. 11 to 17 (excluding FIG. 13). A hash value is used for message authentication.

図11は、送信するメッセージに対する暗号化の範囲とセキュリティ機能の適用範囲を示した図であり、表2のパターン1の場合を示すものである。Dataのみが暗号化され、メッセージ認証及び送信元確認は行われない。グレーで色を付けた部分が暗号化された部分である(以下、同様)。
図12は、送信するメッセージに対する暗号化の範囲とセキュリティ機能の適用範囲を示した図であり、表2のパターン2の場合を示すものである。Dataの暗号化とメッセージ認証を組み合わせたものであり、送信元確認は行わない。ハッシュ値の計算対象の違いにより、5つのバリエーション(A〜E)がある。ハッシュ値はドットでハッチングした部分である。ハッシュ値も暗号化される。
FIG. 11 is a diagram showing an encryption range and a security function application range for a message to be transmitted, and shows the case of Pattern 1 in Table 2. Only Data is encrypted, message authentication and sender verification are not performed. The gray colored part is the encrypted part (the same applies hereinafter).
FIG. 12 is a diagram showing an encryption range and a security function application range for a message to be transmitted, and shows the case of Pattern 2 in Table 2. This is a combination of Data encryption and message authentication, and does not check the sender. There are five variations (A to E) depending on the calculation target of the hash value. The hash value is a portion hatched with dots. The hash value is also encrypted.

図12(A)は、ハッシュ値の計算対象はDataであり、暗号化の対象範囲はDataとハッシュ値である。また、ハッシュ値は図12(B)に示すように、Dataの前においてもよい。
図12(C)は、Control CodeとDataがハッシュ値の計算対象であり、メッセージを受信後に計算したハッシュ値と、メッセージの中に記載されているハッシュ値とを比較することで、改竄が行われていないことを確認できる。ハッシュ値は暗号化されているので、第三者は見ることができない。
また、第三者は暗号鍵を知らないため、暗号化された正しいハッシュ値に置き換えることができない。
図12(D)は、ハッシュ値の計算対象がメッセージ全体の場合である。
図12(E)は、ハッシュ値の計算対象を複数個設定することで、不正な改竄が行われた箇所が分かるようにする場合である。これは、ハッシュ値の計算対象を3つ設定するケースの例である。
・ハッシュ値1(Hash1):ハッシュ値の計算対象はData
・ハッシュ値2(Hash2):ハッシュ値の計算対象はDataとControl Code
・ハッシュ値3(Hash3):ハッシュ値の計算対象はData、Control Code及びSrc ID
In FIG. 12A, the hash value calculation target is Data, and the encryption target range is Data and the hash value. The hash value may be before Data as shown in FIG.
In FIG. 12C, Control Code and Data are hash value calculation targets, and the hash value calculated after receiving the message is compared with the hash value described in the message, so that falsification is performed. It can be confirmed that it is not broken. Since the hash value is encrypted, it cannot be viewed by a third party.
In addition, since the third party does not know the encryption key, it cannot be replaced with an encrypted correct hash value.
FIG. 12D shows a case where the hash value calculation target is the entire message.
FIG. 12E shows a case where a plurality of hash value calculation targets are set so that an illegally tampered portion can be identified. This is an example of a case in which three hash value calculation targets are set.
-Hash value 1 (Hash1): Hash value calculation target is Data
-Hash value 2 (Hash2): The calculation target of the hash value is Data and Control Code
-Hash value 3 (Hash3): Hash value calculation target is Data, Control Code and Src ID

次に、図12(E)の場合におけるメッセージの改竄の検出と改竄箇所の特定の方法を説明する。図13は、図12(E)の場合におけるメッセージ改竄箇所の判定を行うフローを示す図である。以下、図13に基づいて説明する。この処理は、受信した装置(センサノード又はゲートウェイ)のCPU10aが所定のプログラムに基づいて行うものである。
まず、メッセージを受信したら、共通の暗号鍵で復号化し、Data及びHash1,Hash2,Hash3の平文を取得する(S61)。
Next, a description will be given of a method for detecting message tampering and specifying a tampered location in the case of FIG. FIG. 13 is a diagram showing a flow for determining a message falsification location in the case of FIG. Hereinafter, a description will be given based on FIG. This process is performed by the CPU 10a of the received device (sensor node or gateway) based on a predetermined program.
First, when a message is received, it is decrypted with a common encryption key, and plaintexts of Data and Hash1, Hash2, and Hash3 are acquired (S61).

その後、Src ID、Control Code、Dataで構成される情報に対してハッシュ値を計算して、Hash3と比較する(S62)。一致すれば(S63のYES)、メッセージは改竄されていないと判定する(S64)。
一方、一致しなかった場合は(S63のNO)、Control CodeとDataで構成される情報に対してハッシュ値を計算してHash2と比較する(S65)。
一致する場合には(S66のYES)、Src IDが改竄されたと判定する(S67)。すなわち、「なりすまし」が分かる。
一方、一致しなかった場合は(S66のNO)、Dataに対してハッシュ値を計算してHash1と比較する(S68)。計算結果がHash1と一致する場合には(S69のYES)、Control Codeが改竄されていると判定し(S70)、一致しない場合には(S69のNO)、Dataが改竄されたと判定する(S71)。
なお、Dst IDは、メッセージを受信した装置が内部に記憶しているIDと照合できるため、ハッシュ値の計算対象から除外している。
Thereafter, a hash value is calculated for the information composed of Src ID, Control Code, and Data, and compared with Hash3 (S62). If they match (YES in S63), it is determined that the message has not been tampered with (S64).
On the other hand, if they do not match (NO in S63), a hash value is calculated for the information composed of Control Code and Data and compared with Hash2 (S65).
If they match (YES in S66), it is determined that the Src ID has been tampered with (S67). That is, “spoofing” is understood.
On the other hand, if they do not match (NO in S66), a hash value is calculated for Data and compared with Hash1 (S68). If the calculation result matches Hash1 (YES in S69), it is determined that the Control Code has been tampered (S70), and if it does not match (NO in S69), it is determined that Data has been tampered (S71). ).
The Dst ID is excluded from the hash value calculation target because it can be collated with the ID stored in the device that has received the message.

図14は、送信するメッセージに対する暗号化の範囲とセキュリティ機能の適用範囲を示した図であり、表2のパターン3の場合を示すものである。DataとControl Codeが暗号化の対象範囲であり、メッセージ認証及び送信元確認は行わない。
図15は、送信するメッセージに対する暗号化の範囲とセキュリティ機能の適用範囲をメッセージ認証を行う範囲を示した図であり、表2のパターン4の場合を示すものである。Control Code,Dataの暗号化とメッセージ認証を組み合わせたものである。メッセージ認証の対象がData及びControl Codeであり、暗号化の対象範囲は、Data、Control Code及びハッシュ値である。
FIG. 14 is a diagram showing an encryption range and a security function application range for a message to be transmitted, and shows the case of Pattern 3 in Table 2. Data and Control Code are subject to encryption, and message authentication and sender verification are not performed.
FIG. 15 is a diagram showing a range in which message authentication is performed with respect to an encryption range and a security function application range for a message to be transmitted, and illustrates a case of pattern 4 in Table 2. This is a combination of control code and data encryption and message authentication. The target of message authentication is Data and Control Code, and the target range of encryption is Data, Control Code, and hash value.

また、図16は、送信するメッセージに対する暗号化の範囲とセキュリティ機能の適用範囲を示した図であり、表2のパターン5の場合を示すものである。Src ID,Control Code,Dataが暗号化の対象範囲であり、メッセージ認証は行わない。復号化したSrc IDと、送られた平文のSrc IDを比較すれば、送信元であるSrc IDが途中で不正に書き換えられたときに、書き換えられたことがわかり、また、真の送信元を特定できる。
図17は、送信するメッセージに対する暗号化の範囲とセキュリティ機能の適用範囲を示した図であり、表2のパターン6の場合を示すものである。Src ID,Control Code,Dataの暗号化、メッセージ認証及び送信元確認を組み合わせたものである。メッセージ認証の対象がSrc ID,Control Code及びDataであり、暗号化の対象範囲は、Src ID,Control Code,Data及びハッシュ値である。Src ID、Control Code、Dataのいずれかが途中で改竄されたときに、書き換えれられたことがわかる。
FIG. 16 is a diagram showing an encryption range and a security function application range for a message to be transmitted, and shows the case of pattern 5 in Table 2. Src ID, Control Code, and Data are subject to encryption, and message authentication is not performed. Comparing the decrypted Src ID with the sent plaintext Src ID, it can be seen that the Src ID that was the sender was rewritten illegally during the process, and the true sender Can be identified.
FIG. 17 is a diagram showing an encryption range and a security function application range for a message to be transmitted, and shows the case of Pattern 6 in Table 2. This is a combination of Src ID, Control Code, Data encryption, message authentication and sender confirmation. The message authentication target is Src ID, Control Code, and Data, and the encryption target range is Src ID, Control Code, Data, and a hash value. When one of the Src ID, Control Code, or Data is tampered with, it can be seen that it has been rewritten.

以上の例は、メッセージがDst ID,Src ID,Control Code,Dataで構成される場合であるが、これに限定されることはない。
図18は、N個の異なる属性の情報で構成されるメッセージを暗号化通信する場合のデータフォーマットの一例を示す図である。
図18において、Info1〜InfoNで示すのがN個の属性の異なる情報であり、Hash1〜HashNはInfo1〜InfoNの情報から算出されたハッシュ値である。ここで、属性とは、アドレス、Control Codeなどの情報の種類を指す。
The above example is a case where the message is composed of Dst ID, Src ID, Control Code, and Data, but is not limited to this.
FIG. 18 is a diagram illustrating an example of a data format in the case of performing encrypted communication of a message composed of information of N different attributes.
In FIG. 18, Info1 to InfoN indicate information having different N attributes, and Hash1 to HashN are hash values calculated from the information of Info1 to InfoN. Here, the attribute indicates the type of information such as an address and a control code.

TCP(Transmission Control Protocol)で通信する場合、送受信される情報は、イーサネット(登録商標)ヘッダ、IPヘッダ、TCPヘッダ、ユーザデータという4つの異なる属性の情報で構成される。図18は、ハッシュ値のみを暗号化した例であるが、情報(Info1〜InfoN))も暗号化してもよい。
図19は、N個の異なる属性の情報で構成されるメッセージを暗号化通信する場合のデータフォーマットの他の例を示す図であり、ハッシュ値全部(Hash1〜HashN)とInfo(N-1)及びInfoNを暗号化するときのメッセージ構成である。
When communication is performed using TCP (Transmission Control Protocol), information transmitted and received includes information of four different attributes such as an Ethernet (registered trademark) header, an IP header, a TCP header, and user data. FIG. 18 shows an example in which only the hash value is encrypted, but information (Info1 to InfoN) may also be encrypted.
FIG. 19 is a diagram showing another example of a data format when a message composed of information of N different attributes is encrypted and communicated, and all hash values (Hash1 to HashN) and Info (N-1) are shown. And the message structure when encrypting InfoN.

次に、図18のメッセージを受信する装置が、メッセージの改竄の有無の判定と、改竄された箇所を特定する方法を説明する。
図20は、図18のフォーマットのメッセージの改竄の箇所を特定する処理のフローチャートの一例を示す図である。以下、図20に基づいて説明する。
まず、メッセージを受信した装置は、受信したメッセージを共通の暗号鍵で復号化し、Hash1〜HashNの平文を取得する(S81)。
次に、Info1〜InfoNのN個の情報で構成される情報のハッシュ値を計算し、取得したHash1と比較する(S82)。
算出したハッシュ値と取得したHash1が一致した場合は(S83のYES)、受信したメッセージに改竄はないと判定する(S84)。
Next, a description will be given of a method in which the device that receives the message in FIG. 18 determines whether the message has been tampered with and identifies the tampered portion.
FIG. 20 is a diagram illustrating an example of a flowchart of processing for specifying a falsified portion of a message in the format of FIG. Hereinafter, a description will be given with reference to FIG.
First, the device that has received the message decrypts the received message with a common encryption key, and acquires plaintexts Hash1 to HashN (S81).
Next, a hash value of information composed of N pieces of information from Info1 to InfoN is calculated and compared with the acquired Hash1 (S82).
If the calculated hash value matches the acquired Hash1 (YES in S83), it is determined that the received message is not falsified (S84).

これに対して、算出したハッシュ値と取得したHash1が一致しなかった場合は(S83のNO)、Info2〜InfoNの(N-1)個の情報で構成される情報のハッシュ値を計算し、取得したHash2と比較する(S85)。
算出したハッシュ値と取得したHash2が一致した場合は(S86のYES)、Info1が改竄されていると判定する(S87)。
これに対して、算出したハッシュ値と取得したHash2が一致しなかった場合は(S86のNO)、Info3〜InfoNの(N-2)個の情報で構成される情報のハッシュ値を計算し、取得したHash3と比較する(S88)。
On the other hand, when the calculated hash value and the acquired Hash1 do not match (NO in S83), the hash value of information composed of (N-1) pieces of information from Info2 to InfoN is calculated, The acquired Hash2 is compared (S85).
If the calculated hash value matches the acquired Hash2 (YES in S86), it is determined that Info1 has been tampered with (S87).
On the other hand, when the calculated hash value and the acquired Hash2 do not match (NO in S86), the hash value of information composed of (N-2) pieces of information from Info3 to InfoN is calculated, Compare with the acquired Hash3 (S88).

算出したハッシュ値と取得したHash3が一致した場合は(S89のYES)、Info2が改竄されていると判定する(S90)。
これに対して、算出したハッシュ値と取得したHash3が一致しなかった場合は(S89のNO)、Info4〜InfoNの(N-3)個の情報で構成される情報のハッシュ値を計算し、取得したHash4と比較する(S91)。以下、同様の処理を繰り返す。
If the calculated hash value matches the acquired Hash3 (YES in S89), it is determined that Info2 has been tampered with (S90).
On the other hand, if the calculated hash value and the acquired Hash3 do not match (NO in S89), the hash value of information composed of (N-3) pieces of information from Info4 to InfoN is calculated, Compare with the acquired Hash4 (S91). Thereafter, the same processing is repeated.

Info(N-2)〜InfoNの3個の情報で構成される情報のハッシュ値を計算し、取得したHash(N-2)と比較して一致しなかった場合は、Info(N-1)〜InfoNの2個の情報で構成される情報のハッシュ値を計算し、取得したHash(N-1)と比較する(S92)。
算出したハッシュ値と取得したHash(N-1)が一致した場合は(S93のYES)、Info(N-2)が改竄されていると判定する(S94)。
これに対して、算出したハッシュ値と取得したHash(N-1)が一致しなかった場合は(S93のNO)、InfoNのハッシュ値を計算し、取得したHashNと比較する(S95)。
算出したハッシュ値と取得したHashNが一致した場合は(S96のYES)、Info(N-1)が改竄されていると判定する(S97)。
これに対して、算出したハッシュ値と取得したHashNが一致しなかった場合は(S96のNO)、InfoNが改竄されていると判定し(S98)、処理を終了する。
If the hash value of the information consisting of the three pieces of information from Info (N-2) to InfoN is calculated and compared with the acquired Hash (N-2), Info (N-1) A hash value of information composed of two pieces of information of InfoN is calculated and compared with the acquired Hash (N-1) (S92).
If the calculated hash value matches the acquired Hash (N-1) (YES in S93), it is determined that Info (N-2) has been tampered with (S94).
On the other hand, when the calculated hash value and the acquired Hash (N-1) do not match (NO in S93), the hash value of InfoN is calculated and compared with the acquired HashN (S95).
If the calculated hash value matches the acquired HashN (YES in S96), it is determined that Info (N-1) has been tampered with (S97).
On the other hand, if the calculated hash value does not match the acquired HashN (NO in S96), it is determined that InfoN has been tampered with (S98), and the process ends.

次に、WSNのような小電力無線(LoRaなど)を使った非IPネットワークとIPネットワークとの安全な接続方法について説明する。
図21は、非IPネットワークとIPネットワークとの安全な接続方法の一例を示すシーケンス図である。IPネットワークで使用される主なデータ通信方式は、UDP,TCP、TCP/SSLの3つであるが、ここでは、IPネットワークが、TCP/SSLを使用している場合の非IPネットワークとIPネットワークとの接続について説明する。
Next, a secure connection method between a non-IP network and an IP network using a low-power radio (such as LoRa) such as WSN will be described.
FIG. 21 is a sequence diagram illustrating an example of a secure connection method between a non-IP network and an IP network. There are three main data communication methods used in an IP network: UDP, TCP, and TCP / SSL. Here, a non-IP network and an IP network when the IP network uses TCP / SSL. The connection with will be described.

まず、センサノード1(SN)とゲートウェイ2(GW)との間で、認証及び暗号鍵共有を行う(S101)。認証及び暗号鍵共有のシーケンスは、図6又は図7に示す通りである。
次に、GWとサーバ4との間でSSLセッションの確立を行う(S102)。TCP/SSLでは通信の開始時、Handshake Protocolによって、暗号化通信を開始するために必要な各種パラメータの交換及び設定(ネゴシエーション)が行われる。TCP/SSLとはSSLによる安全なTCP/IP接続を意味する。
First, authentication and encryption key sharing are performed between the sensor node 1 (SN) and the gateway 2 (GW) (S101). The authentication and encryption key sharing sequence is as shown in FIG.
Next, an SSL session is established between the GW and the server 4 (S102). In TCP / SSL, at the start of communication, various parameters necessary for starting encrypted communication are exchanged and set (negotiation) by the Handshake Protocol. TCP / SSL means secure TCP / IP connection by SSL.

SNにおいて、GWに送る情報を共有鍵で暗号化する(S103)。そして、暗号化した情報をGWに送信する(S104)。GWは受信した情報を共有鍵で復号化する(S105)。
GWは、さらに、復号化した情報をSSLで暗号化し(S106)、暗号化した情報をサーバ4に送信する(S107)。
サーバ4は受信した情報をSSLで復号化し(S108)、必要な処理を行う。
In the SN, the information sent to the GW is encrypted with the shared key (S103). Then, the encrypted information is transmitted to the GW (S104). The GW decrypts the received information with the shared key (S105).
The GW further encrypts the decrypted information with SSL (S106), and transmits the encrypted information to the server 4 (S107).
The server 4 decrypts the received information with SSL (S108) and performs necessary processing.

一方、サーバ4からSNに対して情報を送る場合は、送信したい情報をSSLで暗号化する(S109)。そしてSSLで暗号化した情報をGWに送信する(S110)。
GWは、受信した情報をSSLで復号化し(S111)、さらにそれを共有鍵で暗号化する(S112)。そして、暗号化した情報をSNに送信する(S113)。
SNは、受信した情報を共有鍵で復号化し、情報の平文を取得する(S114)。
On the other hand, when information is sent from the server 4 to the SN, the information to be transmitted is encrypted by SSL (S109). Then, the information encrypted with SSL is transmitted to the GW (S110).
The GW decrypts the received information with SSL (S111), and further encrypts it with the shared key (S112). Then, the encrypted information is transmitted to the SN (S113).
The SN decrypts the received information with the shared key and obtains plaintext of the information (S114).

図22は、非IPネットワークとIPネットワークとの安全な接続方法の他の例を示すシーケンス図である。
まず、センサノード1(SN)とゲートウェイ2(GW)との間で、認証及び暗号鍵共有を行う(S121)。認証及び暗号鍵共有のシーケンスは、図6又は図7に示す通りである。次に、GWとサーバ4との間でSSLセッションの確立を行う(S122)。
FIG. 22 is a sequence diagram illustrating another example of a secure connection method between a non-IP network and an IP network.
First, authentication and encryption key sharing are performed between the sensor node 1 (SN) and the gateway 2 (GW) (S121). The authentication and encryption key sharing sequence is as shown in FIG. Next, an SSL session is established between the GW and the server 4 (S122).

SNにおいて、GWに送る情報を共有鍵で暗号化する(S123)。そして、暗号化した情報をGWに送信する(S124)。GWは受信した情報と共有鍵をSSLで暗号化し(S125)、暗号化した情報をサーバ4に送信する(S126)。
サーバ4は受信した情報をSSLで復号化し(S127)、さらに、送られた共有鍵で情報をさらに復号化する(S128)。サーバ4は復号化した情報を用いて必要な処理を行う。
In the SN, the information sent to the GW is encrypted with the shared key (S123). Then, the encrypted information is transmitted to the GW (S124). The GW encrypts the received information and the shared key with SSL (S125), and transmits the encrypted information to the server 4 (S126).
The server 4 decrypts the received information with SSL (S127), and further decrypts the information with the shared key sent (S128). The server 4 performs necessary processing using the decrypted information.

一方、サーバ4からSNに対して情報を送る場合は、送信したい情報をまず共有鍵で暗号化し(S129)、さらに、暗号化情報と共有鍵をSSLで暗号化する(S130)。そしてSSLで暗号化した情報をGWに送信する(S131)。
GWは、受信した情報をSSLで復号化し(S132)、SSLで復号化した共有鍵と、サーバが現在保有している共有鍵(最新の共有鍵)が同一か否かをチェックする(S133)。
On the other hand, when transmitting information from the server 4 to the SN, the information to be transmitted is first encrypted with a shared key (S129), and the encrypted information and the shared key are encrypted with SSL (S130). Then, the information encrypted with SSL is transmitted to the GW (S131).
The GW decrypts the received information with SSL (S132), and checks whether the shared key decrypted with SSL is the same as the shared key currently held by the server (latest shared key) (S133). .

同一である場合は(S134のYES)、SSLで復号化した情報をそのままSNに送信する(S135)。情報は共有鍵で暗号化されているので安全である。
一方、同一でなかった場合は(S134のNO)、SSLで復号化した情報を送られた元の共有鍵で一旦復号化した後、最新の共有鍵でその情報を暗号化する(S136)。そして、最新の共有鍵で暗号化した情報をSNに送信する(S137)。SNは、受信した情報を最新の共有鍵で復号化し、情報の平文を取得する(S138)。
いずれの場合も、その暗号化通信に直接使用した暗号鍵が移動しないのが特徴である。
If they are the same (YES in S134), the information decrypted by SSL is transmitted to the SN as it is (S135). Information is secure because it is encrypted with a shared key.
On the other hand, if they are not identical (NO in S134), the information decrypted with SSL is once decrypted with the original shared key sent, and then the information is encrypted with the latest shared key (S136). Then, the information encrypted with the latest shared key is transmitted to the SN (S137). The SN decrypts the received information with the latest shared key, and acquires plaintext of information (S138).
In either case, the encryption key directly used for the encrypted communication is not moved.

以上で実施形態の説明を終了するが、この発明において、各装置の具体的な構成、処理の内容、データの構成、使用する装置の台数等は、実施形態で説明したものに限るものではない。
例えば、上記説明ではWSNにおける適用について説明したが、これに限られないことは言うまでもない。ノードはセンサノードではなく、ゲートウェイに接続される一般のIoT機器であってもよい。
Although the description of the embodiment is finished as described above, in the present invention, the specific configuration of each device, the contents of processing, the configuration of data, the number of devices used, and the like are not limited to those described in the embodiment. .
For example, in the above description, the application in the WSN has been described, but it goes without saying that the present invention is not limited to this. The node may be a general IoT device connected to the gateway instead of the sensor node.

1:センサノード、2:ゲートウェイ、3:インターネット、4:サーバ、10:制御部、11:LPWA通信モジュール、21:乱数発生部、22:認証部、23:暗号鍵生成部、24:暗号化部、25:共有情報更新部、26:記憶部、31:乱数発生部、32:認証部、33:暗号鍵生成部、34:暗号化部、35:共有情報更新部、36:記憶部

1: sensor node, 2: gateway, 3: internet, 4: server, 10: control unit, 11: LPWA communication module, 21: random number generation unit, 22: authentication unit, 23: encryption key generation unit, 24: encryption Unit: 25: shared information update unit, 26: storage unit, 31: random number generation unit, 32: authentication unit, 33: encryption key generation unit, 34: encryption unit, 35: shared information update unit, 36: storage unit

Claims (3)

インターネットに接続されたゲートウェイと、該ゲートウェイに無線接続されたネットワークノード(以下「ノード」という。)との間の通信を暗号化して行う暗号化通信システムにおいて、
前記ゲートウェイと前記ノードとの通信は低電力広域通信(以下「LPWA通信」という。)であり、
前記ゲートウェイと前記ノードは同一の情報をその内部に共有しており、
前記ゲートウェイは、前記共有している情報(以下「共有情報」という。)から一方向性ハッシュ関数(以下「ハッシュ関数」という。)によって算出したハッシュ値を前記ノードとの間で行う共通鍵暗号化通信の暗号鍵として保持し、
前記ノードは、前記共有情報から前記ハッシュ関数と同一のハッシュ関数によって算出したハッシュ値を前記ゲートウェイとの間で行う共通鍵暗号化通信の暗号鍵として保持し、さらに、
前記ゲートウェイ及び前記ノードは、前記共有情報を予め定めた所定のタイミングで互いに同一の内容で更新し、前記更新された共有情報から前記ハッシュ関数によって算出したハッシュ値を新たな暗号鍵として更新するとともに、
前記ゲートウェイ及び前記ノードは、前記暗号鍵の生成及び更新を行う制御部をそれぞれ備えていることを特徴とする暗号化通信システム。
In an encrypted communication system that encrypts communication between a gateway connected to the Internet and a network node (hereinafter referred to as “node”) wirelessly connected to the gateway,
Communication between the gateway and the node is low power wide area communication (hereinafter referred to as “LPWA communication”),
The gateway and the node share the same information inside it,
The gateway performs a hash value calculated with the one-way hash function (hereinafter referred to as “hash function”) from the shared information (hereinafter referred to as “shared information”) with the node. As an encryption key for encrypted communication,
The node holds a hash value calculated from the shared information by the same hash function as the hash function as an encryption key for common key encryption communication performed with the gateway, and
The gateway and the node update the shared information with the same content at a predetermined timing, and update a hash value calculated by the hash function from the updated shared information as a new encryption key. ,
The encryption communication system, wherein the gateway and the node each include a control unit that generates and updates the encryption key.
インターネットに接続されたゲートウェイと、該ゲートウェイに無線接続された複数のノードとの間の通信を暗号化して行う暗号化通信システムにおいて、
前記ゲートウェイと前記ノードとの通信は低電力広域通信(以下「LPWA通信」という。)であり、
前記ゲートウェイは、前記各ノードと同一の情報をその内部に共有しており(ただし、該情報は各ノードごとに異なる)、
前記ゲートウェイは、前記各ノードと共有している情報(以下「共有情報」という。)から一方向性ハッシュ関数(以下「ハッシュ関数」という。)によって算出したハッシュ値を前記ノードとの間で行う共通鍵暗号化通信の個別暗号鍵として保持し、
前記ノードは、前記共有情報から前記ハッシュ関数と同一のハッシュ関数によって算出したハッシュ値を前記ゲートウェイとの間で行う共通鍵暗号化通信の個別暗号鍵として保持し、さらに、
前記ゲートウェイは、前記各ノードと共有しているすべての共有情報(ノードの台数分存在する)から前記ハッシュ関数と同一あるいは別のハッシュ関数で算出した一つのハッシュ値を前記各ノードに共通する共通暗号鍵として生成するとともに、前記生成した共通暗号鍵を、前記ノードごとに生成した前記個別暗号鍵を用いて暗号化し、暗号化された前記共通暗号鍵を前記各ノードに送信し、
前記各ノードは、受信した前記暗号化された共通暗号鍵を、前記個別暗号鍵を用いて復号化して共通暗号鍵として保持し、
前記ゲートウェイ及び前記各ノードは、前記共有情報を予め定めた所定のタイミングで互いに同一の内容で更新し、前記更新された共有情報から前記ハッシュ関数によって算出したハッシュ値を新たな個別暗号鍵として更新するとともに、
前記ゲートウェイは、前記更新されたすべての共有情報から前記ハッシュ関数と同一あるいは別のハッシュ関数で算出した一つのハッシュ値を新たな共通暗号鍵として更新するとともに、
前記ゲートウェイ及び前記各ノードは、前記暗号鍵の生成及び更新を行う制御部をそれぞれ備えていることを特徴とする暗号化通信システム。
In an encrypted communication system that encrypts communication between a gateway connected to the Internet and a plurality of nodes wirelessly connected to the gateway,
Communication between the gateway and the node is low power wide area communication (hereinafter referred to as “LPWA communication”),
The gateway shares the same information as each of the nodes inside (however, the information is different for each node),
The gateway performs a hash value calculated with a one-way hash function (hereinafter referred to as “hash function”) from the information shared with each node (hereinafter referred to as “shared information”) with the node. It is stored as an individual encryption key for common key encrypted communication,
The node holds a hash value calculated by the same hash function as the hash function from the shared information as an individual encryption key for common key encryption communication performed with the gateway, and
The gateway uses a common hash value that is common to each node, calculated from all shared information shared by each node (exists for the number of nodes) using the same or different hash function. And generating the generated common encryption key using the individual encryption key generated for each node, and transmitting the encrypted common encryption key to each node,
Each of the nodes decrypts the received encrypted common encryption key using the individual encryption key and holds it as a common encryption key,
The gateway and each node update the shared information with the same content at a predetermined timing, and update a hash value calculated by the hash function from the updated shared information as a new individual encryption key And
The gateway updates one hash value calculated with the same or different hash function from the updated shared information as a new common encryption key,
The encryption communication system, wherein each of the gateway and each node includes a control unit that generates and updates the encryption key.
前記所定のタイミングが、一連の暗号化通信が終了後、再度、通信を開始するとき、又は、接続されている時間が一定期間を経過した時であることを特徴とする請求項1又は2に記載の暗号化通信システム。

3. The predetermined timing is when communication is started again after a series of encrypted communication ends, or when a certain period of time has elapsed for connection. The encryption communication system described.

JP2017182046A 2017-09-22 2017-09-22 Encrypted communication system Expired - Fee Related JP6804026B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017182046A JP6804026B2 (en) 2017-09-22 2017-09-22 Encrypted communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017182046A JP6804026B2 (en) 2017-09-22 2017-09-22 Encrypted communication system

Publications (2)

Publication Number Publication Date
JP2019057867A true JP2019057867A (en) 2019-04-11
JP6804026B2 JP6804026B2 (en) 2020-12-23

Family

ID=66106570

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017182046A Expired - Fee Related JP6804026B2 (en) 2017-09-22 2017-09-22 Encrypted communication system

Country Status (1)

Country Link
JP (1) JP6804026B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110139273A (en) * 2019-05-31 2019-08-16 无锡东源工业自动化有限公司 A kind of safety encryption and system for Internet of Things wireless transmission
CN112769789A (en) * 2020-12-29 2021-05-07 北京天融信网络安全技术有限公司 Encryption communication method and system
CN114710290A (en) * 2022-06-06 2022-07-05 科大天工智能装备技术(天津)有限公司 Safety certification method for intelligent greenhouse sensor equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001292135A (en) * 2000-04-07 2001-10-19 Matsushita Electric Ind Co Ltd Key exchange system
JP2003318992A (en) * 2002-04-26 2003-11-07 Fujitsu Ltd Gateway, communication terminal device, and communication control program
JP2005260788A (en) * 2004-03-15 2005-09-22 Fuji Electric Holdings Co Ltd Common key updating method, communication method, and communication device
JP2008104040A (en) * 2006-10-20 2008-05-01 Fujitsu Ltd Common key producing device, and common key producing method
JP2008172728A (en) * 2007-01-15 2008-07-24 Megachips System Solutions Inc Security system
JP2009044575A (en) * 2007-08-10 2009-02-26 Canon Inc Communication device, communication method of communication device, program, and storage medium
JP2017038143A (en) * 2015-08-07 2017-02-16 株式会社デンソー Communication system, transmission node, and reception node

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001292135A (en) * 2000-04-07 2001-10-19 Matsushita Electric Ind Co Ltd Key exchange system
JP2003318992A (en) * 2002-04-26 2003-11-07 Fujitsu Ltd Gateway, communication terminal device, and communication control program
JP2005260788A (en) * 2004-03-15 2005-09-22 Fuji Electric Holdings Co Ltd Common key updating method, communication method, and communication device
JP2008104040A (en) * 2006-10-20 2008-05-01 Fujitsu Ltd Common key producing device, and common key producing method
JP2008172728A (en) * 2007-01-15 2008-07-24 Megachips System Solutions Inc Security system
JP2009044575A (en) * 2007-08-10 2009-02-26 Canon Inc Communication device, communication method of communication device, program, and storage medium
JP2017038143A (en) * 2015-08-07 2017-02-16 株式会社デンソー Communication system, transmission node, and reception node

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
森 拓生, スマートマスター 2017年版 インテリジェント化する家と家電のスペシャリスト, JPN6020035213, 25 April 2017 (2017-04-25), pages 361 - 362, ISSN: 0004350371 *
辛 星漢 ほか: "グループ間でのファイル共有を柔軟かつ安全に行うための新方式検討", コンピュータセキュリティシンポジウム2011論文集, vol. 第2011巻, 第3号, JPN6020035215, 12 October 2011 (2011-10-12), JP, pages 803 - 808, ISSN: 0004350372 *
進藤 智則: "最大270km離れたロボットの位置を直接把握脅威のソニーのLPWA無線通信", NIKKEI ROBOTICS, vol. 第24号, JPN6020035212, 10 June 2017 (2017-06-10), JP, pages 12 - 15, ISSN: 0004350370 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110139273A (en) * 2019-05-31 2019-08-16 无锡东源工业自动化有限公司 A kind of safety encryption and system for Internet of Things wireless transmission
CN112769789A (en) * 2020-12-29 2021-05-07 北京天融信网络安全技术有限公司 Encryption communication method and system
CN112769789B (en) * 2020-12-29 2022-06-24 北京天融信网络安全技术有限公司 Encryption communication method and system
CN114710290A (en) * 2022-06-06 2022-07-05 科大天工智能装备技术(天津)有限公司 Safety certification method for intelligent greenhouse sensor equipment

Also Published As

Publication number Publication date
JP6804026B2 (en) 2020-12-23

Similar Documents

Publication Publication Date Title
CN111771390B (en) Self-organizing network
US11229023B2 (en) Secure communication in network access points
CN106506440B (en) Method for verifying data integrity
JP4545197B2 (en) Wireless network system and communication method using the same
US12022010B2 (en) Reduced bandwidth handshake communication
US9867042B2 (en) Radio frequency identification technology incorporating cryptographics
WO2019153701A1 (en) Method and apparatus for obtaining device identification
US11736304B2 (en) Secure authentication of remote equipment
CN109075968A (en) Method and apparatus for safety equipment certification
US10158636B2 (en) Method for setting up a secure end-to-end communication between a user terminal and a connected object
WO2016098303A1 (en) Signature verification device, signature generation device, signature processing system, signature verification method, and signature generation method
KR20180119201A (en) Electronic device for authentication system
JP6804026B2 (en) Encrypted communication system
US20230045486A1 (en) Apparatus and Methods for Encrypted Communication
KR20190034048A (en) Server registration method of client using encryption security protocol-based communication and integrity verification method between client and server using the same
US20180124053A1 (en) Authenticated access to cacheable sensor information in information centric data network
CN110691358B (en) Access control system based on attribute cryptosystem in wireless sensor network
US20100183152A1 (en) Network and method for initializing a trust center link key
KR102322605B1 (en) Method for setting secret key and authenticating mutual device of internet of things environment
KR101683286B1 (en) System and method for authenticating sink using mobile network
CN115868189A (en) Method, vehicle, terminal and system for establishing vehicle safety communication
KR20200043855A (en) Method and apparatus for authenticating drone using dim
JP7132150B2 (en) Communication control system
CN107295015B (en) Traffic signal machine communication method
JP2017135599A (en) Radio base station device, radio communication system, and control method of radio base device

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171124

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200616

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20200617

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20200806

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200923

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201027

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20201109

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201109

R150 Certificate of patent or registration of utility model

Ref document number: 6804026

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees