JP2013211633A - Communication device, encryption communication system, encryption communication program, and encryption communication method - Google Patents

Communication device, encryption communication system, encryption communication program, and encryption communication method Download PDF

Info

Publication number
JP2013211633A
JP2013211633A JP2012079221A JP2012079221A JP2013211633A JP 2013211633 A JP2013211633 A JP 2013211633A JP 2012079221 A JP2012079221 A JP 2012079221A JP 2012079221 A JP2012079221 A JP 2012079221A JP 2013211633 A JP2013211633 A JP 2013211633A
Authority
JP
Japan
Prior art keywords
communication
router
encrypted
vpn
data
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
JP2012079221A
Other languages
Japanese (ja)
Inventor
Shinya Tagawa
新也 田川
Mayo Wakasugi
真与 若杉
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.)
Brother Industries Ltd
Original Assignee
Brother Industries 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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2012079221A priority Critical patent/JP2013211633A/en
Publication of JP2013211633A publication Critical patent/JP2013211633A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a communication device, encryption communication system, program, and encryption communication method for reducing delay in data communication to a communication device of a communication partner.SOLUTION: A communication device which is connected to a relay device and can communicate with a communication device of a communication partner through the relay device determines whether or not communication speed required for encryption communication is equal to or higher than a threshold through a VPN configured with the communication device of the communication partner; executes encryption communication of data according to a predetermined protocol through a VPN configured with the relay device when it is determined that the communication speed is lower than the threshold; and executes encryption communication of data according to other than the predetermined protocol through the VPN configured with the communication device of the communication partner.

Description

本発明は、通信相手の通信装置と暗号化通信を行う際に、中継装置の処理負荷に応じて、中継装置を中継するVPNと中継しないVPNとを使い分ける通信装置、暗号化通信システム、プログラム、および暗号化通信方法に関するものである。   The present invention provides a communication device, an encrypted communication system, a program, and a communication device that selectively use a VPN that relays a relay device and a VPN that does not relay according to the processing load of the relay device when performing encrypted communication with a communication device of a communication partner. And an encrypted communication method.

従来、インターネットまたは専用/公衆回線を介して、複数のノードの間において暗号化通信を行う技術が知られている。例えば、特許文献1に開示されている技術では、IPsec(Internet Protocol security)等のプロトコルに準拠して送信側のノードにおいてパケットが暗号化され、受信側のノードで復号される。特許文献1に開示された技術では、ハブ&スポーク型と呼ばれる形式で、VPN(Virtual Private Network)が構築され、暗号化通信が行われる。ハブ&スポーク型でVPNが構築された場合、送信側のノードがパケットを暗号化する。送信側のノードは、暗号化されたパケットを中継ノードへ送信する。中継ノードは暗号化されたパケットを復号し、送信すべき受信側のノードを選択し、再びパケットを暗号化する。次に、中継ノードは、再び暗号化されたパケットを選択された受信側のノードに送信する。   Conventionally, a technique for performing encrypted communication between a plurality of nodes via the Internet or a dedicated / public line is known. For example, in the technique disclosed in Patent Document 1, a packet is encrypted at a transmitting node in accordance with a protocol such as IPsec (Internet Protocol security), and is decrypted at a receiving node. In the technique disclosed in Patent Document 1, a VPN (Virtual Private Network) is constructed in a format called a hub and spoke type, and encrypted communication is performed. When the VPN is constructed in the hub-and-spoke type, the node on the transmission side encrypts the packet. The transmitting node transmits the encrypted packet to the relay node. The relay node decrypts the encrypted packet, selects a receiving node to be transmitted, and encrypts the packet again. Next, the relay node transmits the encrypted packet again to the selected receiving node.

特許文献1に開示された技術では、送信側のノードが、送信側のノードと中継ノードとの間のトラフィック量が閾値を越えたことを検出すると、送信側のノードと受信側のノードとの間に直接VPNを構築する。   In the technique disclosed in Patent Document 1, when the transmission side node detects that the amount of traffic between the transmission side node and the relay node exceeds a threshold, the transmission side node and the reception side node Build a VPN directly between them.

特開2004−140482号公報JP 2004-140482 A

上述した特許文献1に記載された暗号化通信において、送信側のノードが、送信側のノードと中継ノードとの間のトラフィック量を検出する。中継ノードの処理負荷は、送信側ノードとの間のトラフィック量に起因するものの他に、他の受信側ノードとの間のトラフィック量に起因するものが含まれる。従って、中継ノードが接続された複数の送信側ノードとの間のトラフィック量を検出し、送信側のノードと受信側のノードとの間に直接VPNを構築する指示を送信することが望ましい。この構成では、VPNの構築指示を受信した送信側ノード、および受信側ノードは、送信側ノードと受信側ノードとの間でVPNを構築し、暗号化通信を実行する。この送信側ノードと受信側ノードとの間の暗号化通信の通信速度は、送信側ノードと受信側ノードとの間の通信環境により、低下する可能性が考えられる。通信速度が低下すると、送信側ノードと受信側ノードとの間の暗号化されたデータの送受信が遅延したり、暗号化されたパケットが送受信できない恐れがある。   In the encrypted communication described in Patent Document 1 described above, a transmission-side node detects the amount of traffic between the transmission-side node and a relay node. The processing load of the relay node includes not only what is caused by the traffic amount with the transmitting side node but also what is caused by the traffic amount with other receiving side nodes. Therefore, it is desirable to detect the amount of traffic between a plurality of transmission side nodes to which the relay node is connected, and to transmit an instruction to directly construct a VPN between the transmission side node and the reception side node. In this configuration, the transmission-side node and the reception-side node that have received the VPN construction instruction construct a VPN between the transmission-side node and the reception-side node, and execute encrypted communication. There is a possibility that the communication speed of the encrypted communication between the transmission side node and the reception side node may be lowered depending on the communication environment between the transmission side node and the reception side node. When the communication speed decreases, there is a possibility that transmission / reception of encrypted data between the transmission side node and the reception side node is delayed, or encrypted packets cannot be transmitted / received.

本発明は、上述した問題点を解決するためになされたものであり、通信相手の通信装置への暗号化データの通信遅延が低減される通信装置、暗号化通信システム、暗号化通信プログラム、および暗号化通信方法を提供することを目的とする。   The present invention has been made to solve the above-described problems, and a communication device, an encrypted communication system, an encrypted communication program, and a communication device that reduce communication delay of encrypted data to a communication device of a communication partner, and An object is to provide an encrypted communication method.

上記目的を達成するために、請求項1記載の本発明は、暗号化通信を中継する中継装置に接続され、通信相手の通信装置と前記中継装置を介して通信可能な通信装置であって、前記中継装置とVPNを構築する第1構築手段と、前記第1構築手段により構築されたVPN、および前記中継装置を介して前記通信相手の通信装置と暗号化通信する第1暗号化通信手段と、前記中継装置の処理負荷が閾値よりも大きくなった場合、前記通信相手の通信装置と前記中継装置を中継せずに暗号化通信させる要求である第1要求通知と、前記通信相手の通信装置とVPNを構築するための構築情報とを前記中継装置から受信する受信手段と、前記受信手段により前記第1要求通知を受信した場合、前記構築情報に基づき、前記通信相手の通信装置とVPNを構築する第2構築手段と、前記第2構築手段により構築されたVPNを介してデータが暗号化通信されるのに必要な通信速度が閾値以上か否かを判断する判断手段と、前記判断手段により必要な通信速度が閾値未満と判断された場合、前記第2構築手段により構築されたVPNを介して所定のプロトコル以外のデータを前記通信相手の通信装置と暗号化通信する第2暗号化通信手段と、を備え、前記判断手段により必要な通信速度が閾値未満と判断された場合、前記第1暗号化通信手段は、前記所定のプロトコルのデータを暗号化通信することを特徴とするものである。   In order to achieve the above object, the present invention according to claim 1 is a communication device connected to a relay device that relays encrypted communication and capable of communicating with a communication device of a communication partner via the relay device, A first construction means for constructing a VPN with the relay apparatus; a VPN constructed by the first construction means; and a first encrypted communication means for performing encrypted communication with the communication apparatus of the communication partner via the relay apparatus. When the processing load of the relay device becomes larger than a threshold, a first request notification that is a request for encrypted communication without relaying the communication device with the communication partner and the relay device; and the communication device of the communication partner And a receiving unit that receives the construction information for constructing the VPN from the relay device, and when the first request notification is received by the receiving unit, based on the construction information, the communication device and the VP of the communication partner A second constructing means for constructing the data, a judging means for judging whether or not a communication speed necessary for data to be encrypted and communicated via the VPN constructed by the second constructing means is equal to or higher than a threshold value, and the judgment Second encryption for performing encrypted communication of data other than a predetermined protocol with the communication apparatus of the communication partner via the VPN constructed by the second construction means when the necessary communication speed is determined to be less than the threshold by the means Communication means, and when the required communication speed is determined to be less than a threshold value by the determination means, the first encrypted communication means performs encrypted communication of the data of the predetermined protocol. It is.

請求項1記載の通信装置によれば、必要な通信速度が閾値未満と判断された場合、第1暗号化通信手段は、所定のプロトコルのデータの暗号化通信を実行し、第2暗号化通信手段は、所定のプロトコル以外のデータの暗号化通信を実行する。これにより、所定のプロトコル以外のデータが、第2暗号化通信手段により暗号化通信されるので、そのデータの処理速度の低下が低減される。また、第1暗号化通信手段が、所定のプロトコルの暗号化データの暗号化通信を実行するので、中継装置の処理負荷が低減される。従って、通信相手の通信装置への暗号化データの通信遅延を低減することができる。   According to the communication device of the first aspect, when it is determined that the necessary communication speed is less than the threshold, the first encrypted communication means executes the encrypted communication of the data of the predetermined protocol, and the second encrypted communication. The means executes encrypted communication of data other than a predetermined protocol. Thereby, since data other than the predetermined protocol is encrypted and communicated by the second encrypted communication means, a decrease in the processing speed of the data is reduced. Further, since the first encrypted communication means performs encrypted communication of encrypted data of a predetermined protocol, the processing load on the relay device is reduced. Accordingly, it is possible to reduce the communication delay of the encrypted data to the communication device of the communication partner.

上記目的を達成するために、請求項2記載の本発明は、請求項1記載の通信装置であって、前記判断手段は、前記第2構築手段により構築されたVPNを介して暗号化通信されるデータを暗号化、または復号する処理の処理速度を含む前記必要な通信速度が前記閾値以上か否かを判断することを特徴とするものである。   In order to achieve the above object, the present invention according to claim 2 is the communication apparatus according to claim 1, wherein the determination means is encrypted and communicated via the VPN constructed by the second construction means. It is determined whether or not the necessary communication speed including the processing speed of the process of encrypting or decrypting the data is equal to or higher than the threshold value.

請求項2記載の通信装置によれば、第2構築手段により構築されたVPNを介して暗号化通信されるデータを暗号化、または復号する処理の処理速度を含む通信速度が閾値以上か判断される。この結果、より正確に必要な通信速度が閾値以上か否かが判断される。従って、中継装置の処理負荷が低減される可能性、および通信相手の通信装置へのデータの通信遅延が低減される可能性を高くすることができる。   According to the communication device of the second aspect, it is determined whether or not the communication speed including the processing speed of the process of encrypting or decrypting the data encrypted and transmitted via the VPN constructed by the second construction unit is equal to or higher than the threshold value. The As a result, it is determined whether or not the required communication speed is more than the threshold value. Therefore, it is possible to increase the possibility that the processing load of the relay device is reduced and the possibility that the communication delay of data to the communication device of the communication partner is reduced.

上記目的を達成するために、請求項3記載の本発明は、請求項2記載の通信装置であって、前記判断手段は、前記第2構築手段により構築されたVPNを介して前記通信相手の通信装置に送信されたデータが前記通信相手の通信装置において受信された時間情報を前記通信相手の通信装置から受信し、前記時間情報に基づき、前記必要な通信速度が前記閾値以上か否かを判断することを特徴とするものである。   In order to achieve the above object, the present invention according to claim 3 is the communication apparatus according to claim 2, wherein the determination unit is configured to communicate with the communication partner via the VPN constructed by the second construction unit. The time information received by the communication device of the communication partner is received from the communication device of the communication partner, and the data transmitted to the communication device is received from the communication device of the communication partner, and based on the time information, whether the required communication speed is equal to or higher than the threshold value. It is characterized by judging.

請求項3記載の通信装置によれば、時間情報に基づき、必要な通信速度が前記閾値を超えたか否かが判断される。この結果、より正確に必要な通信速度が閾値以上か否かが判断される。従って、中継装置の処理負荷が低減される可能性、および通信相手の通信装置へのデータの通信遅延が低減される可能性を高くすることができる。   According to the communication device of the third aspect, it is determined based on the time information whether the necessary communication speed exceeds the threshold value. As a result, it is determined whether or not the required communication speed is more than the threshold value. Therefore, it is possible to increase the possibility that the processing load of the relay device is reduced and the possibility that the communication delay of data to the communication device of the communication partner is reduced.

上記目的を達成するために、請求項4記載の本発明は、請求項3記載の通信装置であって、前記受信手段が、全プロトコルのデータを前記第2構築手段により構築されるVPNを介して暗号化通信させる指示である強制切替指示を含む前記第1要求通知を受信し、前記判断手段により、前記必要な通信速度が閾値未満と判断された場合、前記第2構築手段により構築されたVPNの暗号化強度よりも暗号化強度が低下するVPNを前記第2構築手段は、前記通信相手の通信装置と再度構築し、前記第2暗号化通信手段は、全プロトコルのデータを前記第2構築手段により再度構築されたVPNを介して暗号化通信することを特徴とするものである。   In order to achieve the above object, the present invention according to claim 4 is the communication apparatus according to claim 3, wherein the reception unit is configured to transmit data of all protocols via the VPN constructed by the second construction unit. If the first request notification including a forced switching instruction that is an instruction to perform encrypted communication is received, and the determination unit determines that the necessary communication speed is less than a threshold value, the second configuration unit is configured. The second constructing unit reconstructs a VPN whose encryption strength is lower than the encryption strength of the VPN with the communication device of the communication partner, and the second encrypted communication unit stores all protocol data in the second The encrypted communication is performed via the VPN reconstructed by the construction means.

請求項4記載の通信装置によれば、強制切替指示が第1要求通知に含められている場合、第2構築手段により構築されたVPNの暗号化強度よりも暗号化強度が低下するVPNが構築される。これにより、暗号化強度が低下する分だけ、第2暗号化通信手段により暗号化通信されるデータの処理速度の低下が低減される。従って、第2暗号化通信手段が全プロトコルのデータを暗号化通信した場合においても、通信相手の通信装置への暗号化データの通信遅延を低減することができる。   According to the communication device of the fourth aspect, when the forcible switching instruction is included in the first request notification, a VPN whose encryption strength is lower than the encryption strength of the VPN constructed by the second construction means is constructed. Is done. As a result, the decrease in the processing speed of the data encrypted and communicated by the second encrypted communication means is reduced by the amount that the encryption strength is reduced. Therefore, even when the second encrypted communication means performs encrypted communication of all protocol data, the communication delay of the encrypted data to the communication device of the communication partner can be reduced.

上記目的を達成するために、請求項5記載の本発明は、請求項1〜4のいずれか記載の通信装置であって、前記判断手段により前記必要な通信速度が閾値未満と判断された場合、前記第1暗号化通信手段は前記所定のプロトコルとしてリアルタイムプロトコルのデータを暗号化通信し、前記第2暗号化通信手段は、前記所定のプロトコル以外のデータとしてリアルタイムプロトコル以外のデータを暗号化通信することを特徴とするものである。   To achieve the above object, the present invention according to claim 5 is the communication apparatus according to any one of claims 1 to 4, wherein the determining means determines that the required communication speed is less than a threshold value. The first encrypted communication means encrypts and communicates data of a real-time protocol as the predetermined protocol, and the second encrypted communication means encrypts and communicates data other than the real-time protocol as data other than the predetermined protocol. It is characterized by doing.

請求項5記載の通信装置によれば、通信速度が閾値未満と判断された場合、第1暗号化通信手段は、リアルタイムプロトコルのデータの暗号化通信を実行し、第2暗号化通信手段は、リアルタイムプロトコル以外のデータの暗号化通信を実行する。これにより、リアルタイムプロトコル以外のデータの暗号化通信が第2暗号化通信手段により実行される分だけ中継装置の処理負荷が低減する。この中継装置の処理負荷が低減された状態で、リアルタイム性が要求されるリアルタイムプロトコルのデータが、第1暗号化通信手段により暗号化通信されるので、リアルタイム性が要求されるデータの通信遅延を低減することができる。   According to the communication device of the fifth aspect, when it is determined that the communication speed is less than the threshold, the first encrypted communication unit executes the encrypted communication of the data of the real-time protocol, and the second encrypted communication unit includes: Performs encrypted communication of data other than real-time protocols. As a result, the processing load of the relay apparatus is reduced by the amount that the encrypted communication of data other than the real-time protocol is executed by the second encrypted communication means. Since the data of the real-time protocol requiring real-time property is encrypted and communicated by the first encrypted communication means with the processing load of the relay device reduced, the communication delay of data requiring real-time property is reduced. Can be reduced.

上記目的を達成するために、請求項6記載の本発明は、請求項1〜5いずれか記載の通信装置であって、前記第2暗号化通信手段により暗号化通信されるデータのデータ量を検出する検出手段を備え、前記第1要求通知が受信された後に、前記受信手段が、全プロトコルの暗号化データを前記第1暗号化通信手段により暗号化通信させる要求である第2要求通知を前記中継装置から受信した場合、前記検出手段は、前記第2要求通知が受信される前の受信前データ量と、前記第2要求通知が受信された後の受信後データ量とを検出し、前記検出手段により検出された前記受信後データ量が前記受信前データ量よりも小さくなった場合に、前記第1暗号化通信手段は全プロトコルの暗号化データを暗号化通信することを特徴とするものである。   In order to achieve the above object, the present invention according to claim 6 is the communication apparatus according to any one of claims 1 to 5, wherein the amount of data encrypted by the second encrypted communication means is reduced. Detecting means for detecting, and after receiving the first request notice, the receiving means sends a second request notice which is a request for encrypted communication of encrypted data of all protocols by the first encrypted communication means. When received from the relay device, the detection means detects a pre-reception data amount before the second request notification is received and a post-reception data amount after the second request notification is received, The first encrypted communication means performs encrypted communication of encrypted data of all protocols when the amount of data after reception detected by the detection means is smaller than the amount of data before reception. Is.

請求項6記載の通信装置によれば、第2検出手段により検出された受信後データ量が受信前データ量よりも小さくなった場合に、第1暗号化通信手段は全プロトコルのデータを暗号化通信する。これにより、第1暗号化通信手段が全プロトコルのデータを暗号化通信した場合の中継装置の処理負荷が、第1切替指示を受信した状態における中継装置の処理負荷よりも小さくなる。従って、第1暗号化通信手段が全プロトコルのデータの暗号化通信を実行した場合においても、通信相手の通信装置へのデータの通信遅延を低減することができる。   According to the communication device of claim 6, when the data amount after reception detected by the second detection means becomes smaller than the data amount before reception, the first encryption communication means encrypts data of all protocols. connect. As a result, the processing load on the relay device when the first encrypted communication means encrypts and communicates data for all protocols is smaller than the processing load on the relay device in a state where the first switching instruction is received. Therefore, even when the first encrypted communication means executes encrypted communication of data of all protocols, it is possible to reduce the communication delay of data to the communication partner communication apparatus.

上記目的を達成するために、請求項7記載の本発明は、暗号化通信を中継する中継装置に接続され、通信相手の通信装置と前記中継装置を介して通信可能な通信装置のコンピュータに、前記中継装置とVPNを構築する第1構築ステップと、前記第1構築ステップにより構築されたVPN、および前記中継装置を介して前記通信相手の通信装置と暗号化通信する第1暗号化通信ステップと、前記中継装置の処理負荷が閾値よりも大きくなった場合、前記通信相手の通信装置と前記中継装置を中継せずに暗号化通信させる要求である第1要求通知と、前記通信相手の通信装置とVPNを構築するための構築情報とを前記中継装置から受信する受信ステップと、前記受信ステップにより前記第1要求通知を受信した場合、前記構築情報に基づき、前記通信相手の通信装置とVPNを構築する第2構築ステップと、前記第2構築ステップにより構築されたVPNを介してデータが暗号化通信されるのに必要な通信速度が閾値以上か否かを判断する判断ステップと、前記判断ステップにより必要な通信速度が閾値未満と判断された場合、前記第2構築手段により構築されたVPNを介して所定のプロトコル以外のデータを前記通信相手の通信装置と暗号化通信する第2暗号化通信ステップと、を実行させ、前記判断ステップにより必要な通信速度が閾値未満と判断された場合、前記第1暗号化通信ステップは、前記所定のプロトコルのデータを暗号化通信することを特徴とするプログラムである。   In order to achieve the above object, the present invention according to claim 7 is connected to a relay device that relays encrypted communication, and communicates with a communication device of a communication partner via the relay device. A first construction step of constructing a VPN with the relay device, a VPN constructed by the first construction step, and a first encrypted communication step of performing encrypted communication with the communication device of the communication partner via the relay device; When the processing load of the relay device becomes larger than a threshold, a first request notification that is a request for encrypted communication without relaying the communication device with the communication partner and the relay device; and the communication device of the communication partner When receiving the first request notification by the receiving step, the receiving step for receiving the configuration information for constructing the VPN and the VPN, based on the construction information, A second construction step for constructing a VPN with the communication device of the communication partner, and whether or not the communication speed required for data to be encrypted and communicated via the VPN constructed by the second construction step is equal to or higher than a threshold value. A determination step for determining, and if the required communication speed is determined to be less than a threshold value by the determination step, data other than a predetermined protocol is transmitted to the communication apparatus of the communication partner via the VPN established by the second construction means A second encrypted communication step for performing encrypted communication, and when the determination step determines that the required communication speed is less than a threshold, the first encrypted communication step encrypts the data of the predetermined protocol. This is a program characterized by computerized communication.

上記目的を達成するために、請求項8記載の本発明は、暗号化通信を中継する中継装置に接続され、通信相手の通信装置と前記中継装置を介して通信可能な通信装置の方法であって、前記中継装置とVPNを構築する第1構築ステップと、前記第1構築ステップにより構築されたVPN、および前記中継装置を介して前記通信相手の通信装置と暗号化通信する第1暗号化通信ステップと、前記中継装置の処理負荷が閾値よりも大きくなった場合、前記通信相手の通信装置と前記中継装置を中継せずに暗号化通信させる要求である第1要求通知と、前記通信相手の通信装置とVPNを構築するための構築情報とを前記中継装置から受信する受信ステップと、前記受信ステップにより前記第1要求通知を受信した場合、前記構築情報に基づき、前記通信相手の通信装置とVPNを構築する第2構築ステップと、前記第2構築ステップにより構築されたVPNを介してデータが暗号化通信されるのに必要な通信速度が閾値以上か否かを判断する判断ステップと、前記判断ステップにより必要な通信速度が閾値未満と判断された場合、前記第2構築手段により構築されたVPNを介して所定のプロトコル以外のデータを前記通信相手の通信装置と暗号化通信する第2暗号化通信ステップと、を備え、前記判断ステップにより必要な通信速度が閾値未満と判断された場合、前記第1暗号化通信ステップは、前記所定のプロトコルのデータを暗号化通信することを特徴とする方法である。   To achieve the above object, the present invention according to claim 8 is a method of a communication device connected to a relay device that relays encrypted communication and capable of communicating with a communication device of a communication partner via the relay device. A first construction step for constructing a VPN with the relay device, a VPN constructed by the first construction step, and a first encrypted communication for performing encrypted communication with the communication device of the communication partner via the relay device A first request notification that is a request for encrypted communication without relaying between the communication device of the communication partner and the relay device when the processing load of the relay device is greater than a threshold; A receiving step of receiving from the relay device building information for building a communication device and a VPN, and when receiving the first request notification by the receiving step, based on the building information, A second construction step for constructing a VPN with a communication apparatus of a communication partner, and determining whether or not a communication speed required for encrypted data communication via the VPN constructed by the second construction step is equal to or higher than a threshold value And when the required communication speed is determined to be less than the threshold by the determining step, data other than a predetermined protocol is encrypted with the communication apparatus of the communication partner via the VPN established by the second constructing means. A second encrypted communication step for performing encrypted communication, and when the required communication speed is determined to be less than a threshold value by the determining step, the first encrypted communication step encrypts the data of the predetermined protocol. It is the method characterized by doing.

上記目的を達成するために、請求項9記載の本発明は、通信装置と、その通信装置および通信相手の通信装置の間の暗号化通信を中継する中継装置とを備える暗号化通信システムであって、前記通信装置は、前記中継装置とVPNを構築する第1構築手段と、前記第1構築手段により構築されたVPN、および前記中継装置を介して前記通信相手の通信装置と暗号化通信する第1暗号化通信手段と、前記中継装置の処理負荷が閾値よりも大きくなった場合、前記通信相手の通信装置と前記中継装置を中継せずに暗号化通信させる要求である第1要求通知と、前記通信相手の通信装置とVPNを構築するための構築情報とを前記中継装置から受信する受信手段と、前記受信手段により前記第1要求通知を受信した場合、前記構築情報に基づき、前記通信相手の通信装置とVPNを構築する第2構築手段と、前記第2構築手段により構築されたVPNを介してデータが暗号化通信されるのに必要な通信速度が閾値以上か否かを判断する判断手段と、前記判断手段により必要な通信速度が閾値未満と判断された場合、前記第2構築手段により構築されたVPNを介して所定のプロトコル以外のデータを前記通信相手の通信装置と暗号化通信する第2暗号化通信手段と、前記中継装置は、暗号化データを復号する処理、およびデータを暗号化する処理の変換処理負荷を含む処理負荷を検出する中継装置検出手段と、前記中継装置検出手段により検出された処理負荷が閾値以上か否かを判断する中継装置判断手段と、前記中継装置判断手段により処理負荷が閾値以上と判断された場合、前記通信装置に前記第1要求通知と前記第1構築情報とを送信する中継装置送信手段と、を備え、前記判断手段により必要な通信速度が閾値未満と判断された場合、前記第1暗号化通信手段は、前記所定のプロトコルのデータを暗号化通信し、前記中継装置送信手段により前記第1要求通知を前記通信装置に送信した後に、前記中継装置判断手段は、前記処理負荷が閾値以上か否かを再度判断し、前記中継装置判断手段により、前記処理負荷が閾値以上と再度判断された場合、前記中継装置送信手段は、前記通信装置と前記通信相手の通信装置との間の暗号化通信以外の暗号化通信を実行する第1対の別の通信装置のうちの少なくともいずれか一方の別の通信装置に、通信相手の別の通信装置と前記中継装置を中継せずに暗号化通信させる要求である第3要求通知と、前記通信相手の別の通信装置とVPNを構築するための第2構築情報とを送信すること
を特徴とするものである。
To achieve the above object, the present invention according to claim 9 is an encrypted communication system comprising a communication device and a relay device that relays encrypted communication between the communication device and a communication device of a communication partner. The communication device performs encrypted communication with the communication device of the communication partner via the first construction means for constructing a VPN with the relay device, the VPN constructed by the first construction means, and the relay device. A first request notification that is a request for encrypted communication without relaying between the communication device of the communication partner and the relay device when the processing load of the relay device becomes greater than a threshold value; , When receiving the first request notification by the receiving means, the receiving means for receiving the communication apparatus and the construction information for constructing the VPN from the relay apparatus, based on the construction information, A second construction means for constructing a VPN with a communication device of the communication partner, and whether or not a communication speed required for encrypted data communication via the VPN constructed by the second construction means is equal to or higher than a threshold value. A determination means for determining, and if the required communication speed is determined to be less than a threshold by the determination means, data other than a predetermined protocol is exchanged with the communication apparatus of the communication partner via the VPN established by the second construction means A second encrypted communication means for performing encrypted communication; and the relay apparatus detects a processing load including a conversion processing load of a process of decrypting encrypted data and a process of encrypting data; and A relay device determining unit that determines whether or not the processing load detected by the relay device detecting unit is equal to or greater than a threshold; and A relay device transmitting unit configured to transmit the first request notification and the first construction information to a device, and when the determination unit determines that a necessary communication speed is less than a threshold, the first encrypted communication unit Performs encrypted communication of the data of the predetermined protocol, and after the first request notification is transmitted to the communication device by the relay device transmission unit, the relay device determination unit determines whether the processing load is equal to or greater than a threshold value. And when the relay device determination means determines again that the processing load is equal to or greater than a threshold value, the relay device transmission means is not encrypted communication between the communication device and the communication device of the communication partner. Request that at least one of the other communication devices of the first pair of other communication devices executing the encrypted communication of the first communication device perform encrypted communication without relaying the communication device with another communication device. Is A third request notification and second construction information for constructing a VPN with another communication device of the communication partner are transmitted.

請求項9記載の暗号化通信システムによれば、中継装置判断手段により再度検出された処理負荷が閾値以上と判断された場合、中継装置送信手段は、前記第1対の別の通信装置のうちの少なくともいずれか一方の別の通信装置に、第3切替指示と第2構築情報とを送信する。これにより、第3切替指示を受信した通信装置と通信相手の通信装置との暗号化通信処理において、通信相手の通信装置へのデータの通信遅延を低減することができる。この通信遅延の低減と共に、切替完了通知を受信した中継装置において処理負荷をさらに低減できる。   According to the encrypted communication system of claim 9, when it is determined that the processing load detected again by the relay device determination unit is equal to or greater than the threshold value, the relay device transmission unit includes the first pair of other communication devices. The third switching instruction and the second construction information are transmitted to at least one of the other communication devices. Thereby, in the encrypted communication processing between the communication device that has received the third switching instruction and the communication device of the communication partner, it is possible to reduce the communication delay of data to the communication device of the communication partner. Along with the reduction of the communication delay, the processing load can be further reduced in the relay apparatus that has received the switching completion notification.

上記目的を達成するために、請求項10記載の本発明は、請求項9記載の暗号化通信システムであって、前記中継装置検出手段は、データを復号する処理、およびデータを暗号化する処理の変換処理負荷のうち、前記通信装置、および前記通信相手の通信装置の暗号化通信に起因する処理負荷の次に割合が大きい処理負荷の原因となる暗号化通信を実行する第2対の別の通信装置を特定する特定手段を備え、前記中継装置送信手段は、前記特定手段により特定された第2対の別の通信装置を前記第1対の別の通信装置として、前記第3要求通知と、前記第2構築情報とを前記第2対の別の通信装置の少なくとも何れか一方の別の通信装置に送信することを特徴とするものである。   In order to achieve the above object, the present invention according to claim 10 is the encryption communication system according to claim 9, wherein the relay device detecting means performs a process of decrypting data and a process of encrypting data. Of the second pair that executes the encrypted communication that causes the processing load having the second largest ratio of the processing load caused by the encrypted communication of the communication device and the communication device of the communication partner. Specifying means for specifying the second communication device, wherein the relay device transmitting means uses the second pair of other communication devices specified by the specification means as the first pair of other communication devices, and sends the third request notification. And the second construction information are transmitted to at least one other communication device of the second pair of other communication devices.

請求項10記載の暗号化通信システムによれば、中継装置判断手段により再度検出された処理負荷が大きいと判断された場合、中継装置送信手段は、中継装置の処理負荷に占める割合の大きい2つの通信装置から、中継装置を介さずに暗号化通信を実行させる。これにより、中継装置の処理負荷をさらに低減できる。   According to the encrypted communication system of the tenth aspect, when it is determined that the processing load detected again by the relay device determination unit is large, the relay device transmission unit has two ratios that are large in the processing load of the relay device. Encrypted communication is executed from the communication device without going through the relay device. Thereby, the processing load of the relay device can be further reduced.

本実施形態に係る暗号化通信システム1の概要構成を示す図である。It is a figure which shows schematic structure of the encryption communication system 1 which concerns on this embodiment. 暗号化通信システム1におけるルータ2のハードウェア図である。2 is a hardware diagram of a router 2 in the encrypted communication system 1. FIG. SPDの内容を表す模式図である。It is a schematic diagram showing the content of SPD. SADの内容を表す模式図である。It is a schematic diagram showing the content of SAD. ルータ6の処理負荷が大きい場合の、暗号化パケットがIP電話機21からIP電話機31へ送信される処理を表すシーケンス図である。FIG. 11 is a sequence diagram showing processing for transmitting an encrypted packet from IP telephone 21 to IP telephone 31 when the processing load on router 6 is heavy. VPNがメインモードで構築される際の処理を表すシーケンス図である。It is a sequence diagram showing the process at the time of VPN being constructed | assembled in main mode. VPNがアグレッシブモードで構築される際の処理を表すシーケンス図であるIt is a sequence diagram showing the process at the time of VPN being constructed | assembled by aggressive mode 暗号化パケットの内容を表す模式図である。It is a schematic diagram showing the content of an encryption packet. ルータ2のメイン処理を示すフローチャートである。4 is a flowchart showing main processing of a router 2. ルータ2、およびルータ3が、ダミーパケットを暗号化、および復号する処理と、ダミーパケットを送受信する時刻とを表す図である。It is a figure showing the process which the router 2 and the router 3 encrypt and decode a dummy packet, and the time which transmits / receives a dummy packet. ルータ6のメイン処理を示すフローチャートである。4 is a flowchart showing main processing of a router 6.

図1を参照して本発明の一実施形態に係る暗号化通信システム1について説明する。図1は、暗号化通信システム1の概要構成を示す図である。   An encrypted communication system 1 according to an embodiment of the present invention will be described with reference to FIG. FIG. 1 is a diagram showing a schematic configuration of the encrypted communication system 1.

暗号化通信システム1は、ルータ2〜6と、IP電話機21、31、41、51と、パーソナルコンピュータ(PC)22、32、42、52とを備える。IP電話機21、31、41、51、およびPC22、32、42、52は、ルータ2〜5とLANを介して接続する。ルータ2〜5は、ルータ6とVPNを構築する。VPNは、IP網に構成される仮想的な私設網である。すなわち、ルータ2〜6はVPNゲートウェイである。ルータ2〜5が、本発明の通信装置の一例である。ルータ6が本発明の中継装置の一例である。   The encrypted communication system 1 includes routers 2 to 6, IP telephones 21, 31, 41, 51 and personal computers (PCs) 22, 32, 42, 52. The IP telephones 21, 31, 41, 51 and the PCs 22, 32, 42, 52 are connected to the routers 2-5 via the LAN. The routers 2 to 5 construct a VPN with the router 6. The VPN is a virtual private network configured in an IP network. That is, the routers 2 to 6 are VPN gateways. Routers 2 to 5 are examples of the communication device of the present invention. The router 6 is an example of the relay device of the present invention.

ルータ2〜5は、それぞれIP電話機21、31、41、51、およびPC22、32、42、52から送信されたパケットを暗号化する。次に、ルータ2〜5は、暗号化されたパケットをルータ6に送信する。ルータ6は、暗号化されたパケットを受信すると、この暗号化されたパケットを復号する。次に、ルータ6は、復号されたパケットを暗号化し、受信元のルータとは異なるルータ2〜5に送信する。ルータ2〜5は、暗号化されたパケットを復号する。ルータ2〜5は、復号したパケットを、IP電話機21、31、41、51、およびPC22、32、42、52に送信する。すなわち、IP電話機21、31、41、51、およびPC22、32、42、52から送信されたパケットはルータ6を介してIP電話機21、31、41、51、およびPC22、32、42、52に送信される。この暗号化通信の形態はハブ&スポーク型と呼ばれ、ルータ2〜5がスポーク、ルータ6がハブに相当する。   The routers 2 to 5 encrypt the packets transmitted from the IP telephones 21, 31, 41, 51 and the PCs 22, 32, 42, 52, respectively. Next, the routers 2 to 5 transmit the encrypted packet to the router 6. When the router 6 receives the encrypted packet, the router 6 decrypts the encrypted packet. Next, the router 6 encrypts the decrypted packet and transmits it to the routers 2 to 5 different from the receiving router. The routers 2 to 5 decrypt the encrypted packet. The routers 2 to 5 transmit the decrypted packets to the IP telephones 21, 31, 41, 51 and the PCs 22, 32, 42, 52. That is, packets transmitted from the IP telephones 21, 31, 41, 51 and the PCs 22, 32, 42, 52 are sent to the IP telephones 21, 31, 41, 51 and the PCs 22, 32, 42, 52 via the router 6. Sent. This form of encrypted communication is called a hub-and-spoke type, in which routers 2 to 5 correspond to spokes and router 6 corresponds to a hub.

インターネットに構築されるVPNを介して暗号化通信される際に、本実施形態では、例えば、IPsec(Security Architecture for Internet Protocol)が採用される。IPsecは、ネットワーク層においてデータを暗号化するプロトコルである。IPsecはAH(Authentication Header)、ESP(Encapsulated Security Payload)、IKE(Internet Key Exchange)などの複数のプロトコルから構成される。これらのプロトコルは公知であるので簡単に説明する。   In this embodiment, for example, IPsec (Security Architecture for Internet Protocol) is adopted when encrypted communication is performed via a VPN constructed on the Internet. IPsec is a protocol for encrypting data in a network layer. IPsec is composed of a plurality of protocols such as AH (Authentication Header), ESP (Encapsulated Security Payload), and IKE (Internet Key Exchange). Since these protocols are known, they will be briefly described.

AHは認証機能を有するセキュリティプロトコルである。ESPは、ペイロード部に対して暗号化するセキュリティプロトコルである。IKEは鍵交換を行うプロトコルである。   AH is a security protocol having an authentication function. ESP is a security protocol that encrypts the payload portion. IKE is a protocol for exchanging keys.

[ルータのハードウェア構成]
図2を参照して、ルータ2のハードウェア構成を説明する。ルータ3〜6のハードウェア構成は、ルータ2のハードウェア構成と同等であるので、説明を省略する。ルータ2は、CPU11、フラッシュメモリ12、RAM13、WAN側の通信インタフェース14、およびLAN側の通信インタフェース15を備える。CPU11、フラッシュメモリ12、RAM13、WAN側の通信インタフェース14、およびLAN側の通信インタフェース15はバスを介して接続される。フラッシュメモリ12は、CPU11により処理される後述のメイン処理などの制御プログラムを記憶する。フラッシュメモリ12は後述するSAD(Security Association Database)として、SA(Security Association)を記憶する。フラッシュメモリ12は、SPD(Security Policy Database)として、SP(Security Policy)を記憶する。RAM12は、CPU11が制御プログラムを実行する際の一時的なデータを記憶する。WAN側の通信インタフェース14は、LANケーブルが接続されるポートを含み、ルータ6との間でIP網に構築されたVPNを介して暗号化されたパケットの送受信を行う。LAN側の通信インタフェース15は、LANケーブルが接続されるポートを含み、LANケーブルを介してPC7との間で暗号化されていないパケットの送受信を行う。ルータ6のLAN側の通信インタフェースは、LANケーブルを介してプライベートネットワークに接続される。図示しないSIPサーバがプライベートネットワークに接続されており、ルータ6とSIPサーバとは、プライベートネットワークを介して接続される。CPU11が本発明のコンピュータの一例である。
[Hardware configuration of router]
The hardware configuration of the router 2 will be described with reference to FIG. Since the hardware configurations of the routers 3 to 6 are the same as the hardware configuration of the router 2, description thereof is omitted. The router 2 includes a CPU 11, a flash memory 12, a RAM 13, a WAN side communication interface 14, and a LAN side communication interface 15. The CPU 11, the flash memory 12, the RAM 13, the WAN-side communication interface 14, and the LAN-side communication interface 15 are connected via a bus. The flash memory 12 stores a control program such as a main process described later that is processed by the CPU 11. The flash memory 12 stores SA (Security Association) as SAD (Security Association Database) described later. The flash memory 12 stores SP (Security Policy) as an SPD (Security Policy Database). The RAM 12 stores temporary data when the CPU 11 executes the control program. The communication interface 14 on the WAN side includes a port to which a LAN cable is connected, and transmits / receives encrypted packets to / from the router 6 via the VPN constructed in the IP network. The communication interface 15 on the LAN side includes a port to which a LAN cable is connected, and transmits / receives an unencrypted packet to / from the PC 7 via the LAN cable. The communication interface on the LAN side of the router 6 is connected to a private network via a LAN cable. A SIP server (not shown) is connected to the private network, and the router 6 and the SIP server are connected via the private network. The CPU 11 is an example of a computer according to the present invention.

図3を参照して、SPDを説明する。SPDはSPを記憶するデータベースである。SPは、暗号化通信が可能な2つのルータとの間で暗号化通信するか否かを示す情報である。SPは、送信元アドレス、宛先アドレス、上位層プロトコル、および動作などを1レコードに関連付けて記憶している。送信元アドレスは、パケットの送信元のIP電話機、またはPCのIPアドレスである。宛先アドレスは、パケットの宛先のIP電話機、またはPCのIPアドレスである。上位層プロトコルは、ペイロード部に含まれるパケットのプロトコルである。動作は、暗号化通信するか否かの情報である。図3では、暗号化通信せずに通信させる場合、動作の欄にAcceptが記憶され、IPsecにより暗号化通信する場合、動作の欄にIPsecが記憶される。   The SPD will be described with reference to FIG. The SPD is a database that stores SP. SP is information indicating whether or not encrypted communication is performed between two routers capable of encrypted communication. The SP stores a source address, a destination address, an upper layer protocol, an operation, and the like in association with one record. The source address is the IP telephone of the packet source or the IP address of the PC. The destination address is an IP telephone of the destination of the packet or the IP address of the PC. The upper layer protocol is a protocol of a packet included in the payload portion. The operation is information on whether or not to perform encrypted communication. In FIG. 3, “Accept” is stored in the operation column when communication is performed without encrypted communication, and “IPsec” is stored in the operation column when encrypted communication is performed using IPsec.

図4を参照して、SADを説明する。SADはSAを記憶するデータベースである。SAは、暗号化通信する2つのルータとの間で確立されるコネクションである。SAは、送信元アドレス、宛先アドレス、始点アドレス、終点アドレス、セキュリティプロトコル、上位層プロトコル、SPI(Security Parameter Index)、暗号鍵、および暗号化アルゴリズムなどを1レコードに関連付けて記憶する。始点アドレスは、暗号化されたパケットを送信するルータのIPアドレスである。終点アドレスは、暗号化されたパケットを受信するルータのIPアドレスである。セキュリティプロトコルとしては、AH、またはESPが指定される。SPIはSAを識別する情報である。暗号鍵は、2つのルータが暗号化通信する際に、パケットの暗号化に使用される鍵である。暗号化アルゴリズムは、3DES−CBC、DES−CBCなどのアルゴリズムである。   The SAD will be described with reference to FIG. SAD is a database that stores SA. The SA is a connection established between two routers that perform encrypted communication. The SA stores a source address, a destination address, a start point address, an end point address, a security protocol, an upper layer protocol, an SPI (Security Parameter Index), an encryption key, an encryption algorithm, and the like in association with one record. The start point address is the IP address of the router that transmits the encrypted packet. The end point address is the IP address of the router that receives the encrypted packet. AH or ESP is designated as the security protocol. SPI is information for identifying the SA. The encryption key is a key used for packet encryption when two routers perform encrypted communication. The encryption algorithm is an algorithm such as 3DES-CBC or DES-CBC.

図5を参照して、IP電話機21からIP電話機31にパケットが送信される際のシーケンスを説明する。   With reference to FIG. 5, a sequence when a packet is transmitted from IP telephone 21 to IP telephone 31 will be described.

[ルータ6の処理負荷が小さい場合の動作]
S1において、ルータ2とルータ6とがVPNを構築する。次に、S2においてルータ6とルータ3とがVPNを構築する。S1の処理を実行するルータ2のCPU11が本発明の第1構築手段の一例である。S1の処理が本発明の第1構築ステップの一例である。
[Operation when the processing load of the router 6 is small]
In S1, the router 2 and the router 6 construct a VPN. Next, in S2, the router 6 and the router 3 construct a VPN. The CPU 11 of the router 2 that executes the process of S1 is an example of the first construction means of the present invention. The process of S1 is an example of the first construction step of the present invention.

S1、およびS2におけるVPNの構築について、図6、および図7を参照して説明する。図6、および図7は、ルータ2とルータ6との間にVPNが構築されるS1の処理の一例を示す。VPNが構築されるには、暗号化通信する2つのルータの間において、SAが生成されなければならない。SAはIKE(Internet Key Exchange)により、動的に生成される。このSAの生成過程において、ルータ2、およびルータ6はフェーズ1とフェーズ2と呼ばれる公知の処理を実行する。フェーズ1は、メインモードとアグレッシブモードとのどちらか一方のモードにより処理される。フェーズ1、およびフェーズ2の処理の実行が完了すると、ルータ2とルータ6との間にVPNが構築される。図6はメインモードでフェーズ1の処理が実行されるシーケンス図である。図7はアグレッシブモードでフェーズ1の処理が実行されるシーケンス図である。   The construction of the VPN in S1 and S2 will be described with reference to FIG. 6 and FIG. 6 and 7 show an example of the process of S1 in which a VPN is constructed between the router 2 and the router 6. FIG. In order to construct a VPN, an SA must be generated between two routers that perform encrypted communication. SA is dynamically generated by IKE (Internet Key Exchange). In this SA generation process, the router 2 and the router 6 execute known processes called phase 1 and phase 2. Phase 1 is processed in either the main mode or the aggressive mode. When the execution of the phase 1 and phase 2 processes is completed, a VPN is established between the router 2 and the router 6. FIG. 6 is a sequence diagram in which the phase 1 process is executed in the main mode. FIG. 7 is a sequence diagram in which the phase 1 process is executed in the aggressive mode.

[メインモード]
図6に示すS101において、ルータ2は、ISAKMP SA生成要求をルータ6に送信する。このISAKMP SA生成要求は、ルータ2とルータ6との間でISAKMP SAの生成を提案するパケットである。ISAKMP SAは、IKEによりSAが自動的に生成される場合のIKEの制御用チャネルである。この提案パケットをルータ6に送信すると、S102に処理を移行する。
[Main mode]
In S101 illustrated in FIG. 6, the router 2 transmits an ISAKMP SA generation request to the router 6. This ISAKMP SA generation request is a packet that proposes generation of an ISAKMP SA between the router 2 and the router 6. ISAKMP SA is a channel for controlling IKE when SA is automatically generated by IKE. When this proposal packet is transmitted to the router 6, the process proceeds to S102.

提案パケットは、ISAKMP SAを確立するためのパラメータを含む。このパラメータは、暗号化アルゴリズム、ハッシュアルゴリズム、認証方式、およびDiffie−Hellman交換に使用されるパラメータなどである。   The proposal packet includes parameters for establishing an ISAKMP SA. This parameter includes an encryption algorithm, a hash algorithm, an authentication method, a parameter used for Diffie-Hellman exchange, and the like.

暗号化アルゴリズムは、ISAKMP SAが暗号化される際のアルゴリズムである。この暗号化アルゴリズムは、3DES−CBC、DES−CBCなどから後述するS102において1つ指定される。ハッシュアルゴリズムは、ISAKMP SAの確立過程において認証に使用されるアルゴリズムである。このハッシュアルゴリズムはSHA−1、MD5などから1つ指定される。認証方式は、通信先のルータを認証する際の方式である。認証方式は、PSK(Pre−Shared Key)認証、公開鍵認証から1つ指定される。以降の記載では、PSK認証がパラメータとして指定されたとする。Diffie−Hellman交換に使用されるパラメータは、Diffie−Hellman交換により共通鍵が生成される際に使用されるパラメータである。   The encryption algorithm is an algorithm used when ISAKMP SA is encrypted. One encryption algorithm is designated in S102, which will be described later, from 3DES-CBC, DES-CBC, and the like. The hash algorithm is an algorithm used for authentication in the establishment process of ISAKMP SA. One hash algorithm is designated from SHA-1, MD5, and the like. The authentication method is a method for authenticating a communication destination router. One authentication method is designated from PSK (Pre-Shared Key) authentication and public key authentication. In the following description, it is assumed that PSK authentication is designated as a parameter. The parameters used for the Diffie-Hellman exchange are parameters used when a common key is generated by the Diffie-Hellman exchange.

S102において、ルータ6は、受信されたISAKMP SAの生成要求に含まれるパラメータの認証を行う。パラメータの認証を行うと、ISAKMP SAの生成を受諾すると判断し、ISAKMP SAの生成の受諾を通知するパケットをルータ2に送信する。この通知パケットをルータ2に送信すると、S103、およびS104に処理を移行する。   In S102, the router 6 authenticates the parameters included in the received ISAKMP SA generation request. When the parameter is authenticated, it is determined that the generation of the ISAKMP SA is accepted, and a packet notifying the acceptance of the generation of the ISAKMP SA is transmitted to the router 2. When this notification packet is transmitted to the router 2, the process proceeds to S103 and S104.

S103、およびS104において、ルータ2、およびルータ6は乱数を生成する。乱数の生成を終了すると、S105、およびS106に処理を移行する。   In S103 and S104, the router 2 and the router 6 generate random numbers. When the generation of the random number is finished, the process proceeds to S105 and S106.

S105、およびS106において、ルータ2、およびルータ6は、生成された乱数を他方のルータ2、6に送信する。この乱数の送受信は、Diffie−Hellman交換と呼ばれる。乱数の送信が終了すると、S107、およびS108に処理を移行する。   In S105 and S106, the router 2 and the router 6 transmit the generated random numbers to the other routers 2 and 6. This transmission and reception of random numbers is called Diffie-Hellman exchange. When the transmission of the random number is completed, the process proceeds to S107 and S108.

S107において、ルータ2はS103で発生した乱数と、S106で受信した乱数とから共通鍵を生成する。S108において、ルータ6はS104で発生した乱数と、S105で受信した乱数とから共通鍵を生成する。すなわち、ルータ2とルータ6とは、同じ共通鍵を生成する。共通鍵の生成が終了すると、S109に処理を移行する。   In S107, the router 2 generates a common key from the random number generated in S103 and the random number received in S106. In S108, the router 6 generates a common key from the random number generated in S104 and the random number received in S105. That is, the router 2 and the router 6 generate the same common key. When the generation of the common key ends, the process proceeds to S109.

S109において、ルータ2は、ルータ2とルータ6との間で予め設定されるPSKからハッシュ値を生成する。このPSKは、ルータ2、およびルータ6のIPアドレスと対応付けてルータ2、およびルータ6のフラッシュメモリ12に記憶される。ルータ2は、生成されたハッシュ値をルータ6に送信する。このハッシュ値は、S107において生成された共通鍵により暗号化されてルータ6に送信される。ハッシュ値の送信が終了すると、S110に処理を移行する。   In S109, the router 2 generates a hash value from the PSK preset between the router 2 and the router 6. The PSK is stored in the flash memory 12 of the router 2 and the router 6 in association with the IP addresses of the router 2 and the router 6. The router 2 transmits the generated hash value to the router 6. This hash value is encrypted with the common key generated in S107 and transmitted to the router 6. When the transmission of the hash value is completed, the process proceeds to S110.

S110において、ルータ6は、S108において生成された共通鍵を用いて、ハッシュ値を復号する。復号されたハッシュ値と、送信元のアドレスに付与されたルータ2のIPアドレスとから、S101〜S109の処理において、通信しているルータがルータ2であることを認証する。通信しているルータがルータ2であると判断すると、S111に処理を移行する。すなわち、PSKはVPNを構築するための、通信相手の認証に用いられる。   In S110, the router 6 decrypts the hash value using the common key generated in S108. From the decrypted hash value and the IP address of the router 2 assigned to the source address, it is authenticated that the router in communication is the router 2 in the processing of S101 to S109. If it is determined that the communicating router is the router 2, the process proceeds to S111. That is, PSK is used for authentication of a communication partner for constructing a VPN.

S111において、ルータ6は、ルータ2とルータ6との間で予め設定されるPSKからハッシュ値を生成する。このハッシュ値は、S108において生成された共通鍵により暗号化されてルータ6に送信される。ハッシュ値の送信が終了すると、S112に処理を移行する。   In S <b> 111, the router 6 generates a hash value from PSK that is preset between the router 2 and the router 6. This hash value is encrypted with the common key generated in S108 and transmitted to the router 6. When the transmission of the hash value ends, the process proceeds to S112.

S112において、ルータ2は、S107において生成された共通鍵からハッシュ値を復号する。復号されたハッシュ値と送信元のアドレスに付与されたルータ6のIPアドレスとに基づき、S101〜S109の処理において、通信しているルータがルータ6であることを認証する。通信しているルータがルータ6であると判断すると、S113に処理を移行する。   In S112, the router 2 decrypts the hash value from the common key generated in S107. Based on the decrypted hash value and the IP address of the router 6 assigned to the address of the transmission source, it is authenticated in step S101 to S109 that the router that is communicating is the router 6. If it is determined that the communicating router is the router 6, the process proceeds to S113.

S101〜S112の処理は、フェーズ1と呼ばれる。S101〜S112の処理により、ISAKMP SAが確立される。以降のS113〜S116において、ルータ2とルータ6との間で送受信されるパケットはISAKMP SAの確立過程において生成された共通鍵により暗号化される。   The processing of S101 to S112 is called phase 1. The ISAKMP SA is established by the processing of S101 to S112. In subsequent steps S113 to S116, packets transmitted and received between the router 2 and the router 6 are encrypted with the common key generated in the ISAKMP SA establishment process.

S113において、ルータ2は、IPsec SA生成要求をルータ6に送信する。このIPsec SA生成要求は、ルータ2とルータ6との間でIPsec SAの生成を提案するパケットである。ルータ2は、乱数、暗号化アルゴリズム、およびセキュリティプロトコルを提案パケットに付与する。S113において、提案パケットに付与される乱数は、ルータ2、およびルータ6に接続されたPCとの間で通信が実行される際に、パケットの暗号化に使用される暗号鍵を生成するための乱数である。暗号化アルゴリズムは、3DES−CBC、DES−CBC、AESなどのアルゴリズムである。セキュリティプロトコルとしては、AH、またはESPが指定される。この提案パケットをルータ6に送信すると、S114に処理を移行する。   In S113, the router 2 transmits an IPsec SA generation request to the router 6. This IPsec SA generation request is a packet that proposes generation of an IPsec SA between the router 2 and the router 6. The router 2 adds a random number, an encryption algorithm, and a security protocol to the proposal packet. In S113, the random number assigned to the proposed packet is used to generate an encryption key used for packet encryption when communication is performed between the router 2 and the PC connected to the router 6. It is a random number. The encryption algorithm is an algorithm such as 3DES-CBC, DES-CBC, or AES. AH or ESP is designated as the security protocol. When this proposal packet is transmitted to the router 6, the process proceeds to S114.

S114において、ルータ6は、ルータ2とルータ6との間でIPsec SAの生成を受諾すると、ルータ6は、受信した提案パケットに付与された乱数から暗号鍵を生成する。鍵の生成が終了すると、S115に処理を移行する。   In S114, when the router 6 accepts the generation of the IPsec SA between the router 2 and the router 6, the router 6 generates an encryption key from the random number assigned to the received proposal packet. When the key generation is completed, the process proceeds to S115.

S113、およびS114において送受信される暗号化アルゴリズムについて説明する。ルータ2は、S113においてルータ6へ複数の暗号化アルゴリズムを送信する。ルータ6はS114において提案パケットを受信すると、提案パケットに含まれる暗号化アルゴリズムのうち、ルータ6のフラッシュメモリ12に記憶されている暗号化アルゴリズムを抽出する。抽出された暗号化アルゴリズムから暗号化強度が一番高い暗号化アルゴリズムを選択する。暗号化アルゴリズムの暗号化強度は、AES、3DES−CBC、DES−CBCの順に高くなる。暗号化強度が高いアルゴリズムを選択すると、IPsec SAの生成を受諾する。   The encryption algorithm transmitted / received in S113 and S114 will be described. The router 2 transmits a plurality of encryption algorithms to the router 6 in S113. When the router 6 receives the proposal packet in S114, the encryption algorithm stored in the flash memory 12 of the router 6 is extracted from the encryption algorithms included in the proposal packet. An encryption algorithm having the highest encryption strength is selected from the extracted encryption algorithms. The encryption strength of the encryption algorithm increases in the order of AES, 3DES-CBC, and DES-CBC. When an algorithm with high encryption strength is selected, generation of IPsec SA is accepted.

S115において、ルータ6は、IPsec SAの生成の受諾を通知するパケットをルータ2に送信する。ルータ6はこの通知パケットに乱数を付与する。この通知パケットをルータ2に送信すると、S116に処理を移行する。   In S <b> 115, the router 6 transmits a packet notifying acceptance of generation of the IPsec SA to the router 2. The router 6 gives a random number to this notification packet. When this notification packet is transmitted to the router 2, the process proceeds to S116.

S116において、ルータ2は通知パケットに付与された乱数から暗号鍵を生成する。暗号鍵の生成が終了すると、IPsec SAが確立されたこと通知する確立通知パケットをルータ6に送信する。   In S116, the router 2 generates an encryption key from the random number given to the notification packet. When the generation of the encryption key is completed, an establishment notification packet for notifying that the IPsec SA has been established is transmitted to the router 6.

S113〜S116の処理は、フェーズ2と呼ばれる。VPNは、S101〜S112の処理であるフェーズ1と、S113〜S116の処理であるフェーズ2とが実行されることにより構築される。すなわち、2つのルータ間でVPNが構築されるためには、ルータ2とルータ6との間でPSKが設定されていなければならない。VPNが構築されると、ルータ2とルータ6とのフラッシュメモリ12に記憶されたSAの始点アドレス、および終点アドレスと対応付けて、セキュリティプロトコル、暗号鍵、および暗号化アルゴリズムが記憶される。この際、SAを識別するSPIがSAに付与される。ルータ2からルータ6へ送信される暗号化パケットのSAと、ルータ6からルータ2へ送信される暗号化パケットのSAとの2つのSAが作成される。   The processing of S113 to S116 is called phase 2. The VPN is constructed by executing Phase 1 that is the processing of S101 to S112 and Phase 2 that is the processing of S113 to S116. That is, in order to construct a VPN between two routers, PSK must be set between the router 2 and the router 6. When the VPN is constructed, a security protocol, an encryption key, and an encryption algorithm are stored in association with the SA start point address and end point address stored in the flash memory 12 of the routers 2 and 6. At this time, an SPI for identifying the SA is given to the SA. Two SAs are created: the SA of the encrypted packet transmitted from the router 2 to the router 6 and the SA of the encrypted packet transmitted from the router 6 to the router 2.

[アグレッシブモード]
図7を参照して、アグレッシブモードを説明する。S201において、ルータ2は乱数を生成する。乱数の生成が終了すると、S202に処理を移行する。
[Aggressive mode]
The aggressive mode will be described with reference to FIG. In S201, the router 2 generates a random number. When the generation of random numbers is completed, the process proceeds to S202.

S202において、ルータ2は、ISAKMP SA生成要求を送信する。このISAKMP SA生成要求は、S201において生成された乱数を含む。ISAKMP SA生成要求を送信すると、S203に処理を移行する。   In S202, the router 2 transmits an ISAKMP SA generation request. This ISAKMP SA generation request includes the random number generated in S201. When the ISAKMP SA generation request is transmitted, the process proceeds to S203.

S203において、ルータ6は、乱数を生成する。乱数を生成すると、S204に処理を移行する。   In S203, the router 6 generates a random number. When the random number is generated, the process proceeds to S204.

S204において、ルータ6は、ISAKMP SAの生成要求に含まれるパラメータを認証する。このパラメータを認証すると判断すると、ISAKMP SAの生成の受諾を通知するパケットをルータ2に送信する。この通知パケットは、S203において生成された乱数と、ルータ2とルータ6との間で予め設定されるPSKから生成されるハッシュ値とを含む。通知パケットをルータ2に送信すると、S205に処理を移行する。   In S204, the router 6 authenticates the parameters included in the ISAKMP SA generation request. If it is determined to authenticate this parameter, a packet notifying acceptance of generation of ISAKMP SA is transmitted to the router 2. This notification packet includes the random number generated in S203 and the hash value generated from the PSK preset between the router 2 and the router 6. When the notification packet is transmitted to the router 2, the process proceeds to S205.

S205において、ルータ2は、受信された通知パケットに含まれるハッシュ値と、送信元のアドレスに付与されたルータ6のIPアドレスとに基づき、S201〜S204の処理において、通信しているルータがルータ6であることを認証する。通信しているルータがルータ6であると判断すると、S206に処理を移行する。   In S205, the router 2 determines that the communicating router is the router in the processing of S201 to S204 based on the hash value included in the received notification packet and the IP address of the router 6 assigned to the transmission source address. 6 is authenticated. If it is determined that the communicating router is the router 6, the process proceeds to S206.

S206において、ルータ2は、受信された通知パケットに含まれる乱数から共通鍵を生成する。共通鍵の生成が終了すると、S207に処理を移行する。   In S206, the router 2 generates a common key from a random number included in the received notification packet. When the generation of the common key ends, the process proceeds to S207.

S207において、ルータ2は、ルータ2とルータ6との間で予め設定されるPSKから生成されるハッシュ値を含む認証パケットをルータ6に送信する。認証パケットの送信が終了すると、S208に処理を移行する。このハッシュ値は、S206において生成された共通鍵により暗号化される。   In S <b> 207, the router 2 transmits to the router 6 an authentication packet including a hash value generated from PSK set in advance between the router 2 and the router 6. When the transmission of the authentication packet ends, the process proceeds to S208. This hash value is encrypted with the common key generated in S206.

S208において、ルータ6は認証パケットに含まれるハッシュ値と、送信元のアドレスに付与されたルータ2のIPアドレスとに基づき、S201〜S204の処理において、通信しているルータがルータ2であることを認証する。通信しているルータがルータ6であると判断すると、アグレッシブモードにおけるフェーズ1を終了し、フェーズ2の処理に移行する。 In S208, based on the hash value included in the authentication packet and the IP address of the router 2 assigned to the transmission source address, the router 6 determines that the router in communication is the router 2 in the processing of S201 to S204. Authenticate. If it is determined that the communicating router is the router 6, the phase 1 in the aggressive mode is terminated, and the process proceeds to the phase 2.

図5に戻り、説明を続ける。以下の記載において、パケットの内容を示す図8を参照して説明する。S3において、ルータ2は、IP電話機21から暗号化されていないパケットを受信する。このパケットは、図8(a)に示す暗号化されていないパケットの内容に示されるように、IP電話機31のIPアドレスが宛先のIPアドレスに指定され、IP電話機21のIPアドレスが送信元のIPアドレスに指定されているパケットである。このパケットのペイロード部にリアルタイムプロトコル(Real−time Transport Protocol)に従うデータが含まれているとして説明する。以降の記載において、リアルタイムプロトコルをRTPと記載する。   Returning to FIG. 5, the description will be continued. In the following description, description will be given with reference to FIG. In S <b> 3, the router 2 receives an unencrypted packet from the IP telephone 21. In this packet, as shown in the content of the unencrypted packet shown in FIG. 8A, the IP address of the IP telephone 31 is designated as the destination IP address, and the IP address of the IP telephone 21 is the source. It is a packet specified by an IP address. A description will be given assuming that data according to a real-time protocol (Real-time Transport Protocol) is included in the payload portion of this packet. In the following description, the real-time protocol is described as RTP.

ルータ2は、IP電話機21から送信されたパケットを受信すると、ルータ2のフラッシュメモリ12に記憶されたSPDを参照する。IP電話機21から送信されたパケットの宛先IPアドレス、送信元のIPアドレス、およびペイロード部に含まれるデータのプロトコルに一致するSPがあるか否かを判断する。ルータ2は、SPがあると判断すると、そのSPの動作に示される通信方法で宛先のIP電話機31にパケットを送信すると判断する。SPが無い場合、ルータ2は、宛先のIP電話機31にパケットを送信しないと判断する。以降の記載では、SPの動作にIPSecが記憶されているとして、暗号化通信でパケットが送信される場合を説明する。ルータ2は、暗号化通信でパケットを送信すると判断すると、SADを参照する。次に、ルータ2は、パケットに付与された宛先IPアドレス、送信元のIPアドレス、およびペイロード部のデータプロトコルと一致し、始点アドレスが、ルータ2のIPアドレスであるSAから、暗号鍵、および暗号化アルゴリズムを抽出する。ルータ2は、この暗号鍵、および暗号化アルゴリズムによりIP電話機21から送信されたパケットを暗号化する。ルータ2は、暗号化されたパケットに、宛先のルータのIPアドレス、送信元のルータのIPアドレス、およびSAに指定されたSPIを付与する。宛先のルータのアドレスには、終点アドレスであるルータ6のIPアドレスが付与される。送信元のルータのアドレスには、始点アドレスであるルータ2のIPアドレスが付与される。図8(b)に示す暗号化されたパケットの内容に示されるように、終点アドレス、始点アドレス、およびSPIが、この暗号化されたパケットに付与される。以降の記載において、ルータ2とルータ6との間で使用される暗号鍵、暗号化方式をそれぞれ第1暗号鍵、第1暗号化アルゴリズムとする。宛先のルータのアドレスは、予めSAの終点アドレスとしてフラッシュメモリ12に記憶されている。すなわち、宛先のルータのIPアドレスがフラッシュメモリ12に記憶されていないと、そのルータと暗号化通信が行われない。   When the router 2 receives the packet transmitted from the IP telephone 21, the router 2 refers to the SPD stored in the flash memory 12 of the router 2. It is determined whether there is an SP that matches the destination IP address of the packet transmitted from the IP telephone 21, the IP address of the transmission source, and the protocol of the data included in the payload portion. When it is determined that there is an SP, the router 2 determines to transmit a packet to the destination IP telephone 31 by the communication method indicated in the operation of the SP. If there is no SP, the router 2 determines not to send a packet to the destination IP telephone 31. In the following description, it is assumed that IPSec is stored in the SP operation and a packet is transmitted by encrypted communication. When the router 2 determines to transmit a packet by encrypted communication, the router 2 refers to the SAD. Next, the router 2 matches the destination IP address assigned to the packet, the IP address of the transmission source, and the data protocol of the payload part, and the start point address is from the SA that is the IP address of the router 2, the encryption key, and Extract the encryption algorithm. The router 2 encrypts the packet transmitted from the IP telephone 21 using this encryption key and encryption algorithm. The router 2 adds the IP address of the destination router, the IP address of the transmission source router, and the SPI specified by the SA to the encrypted packet. The IP address of the router 6 which is the end point address is given to the address of the destination router. The IP address of the router 2 that is the start point address is given to the address of the transmission source router. As shown in the content of the encrypted packet shown in FIG. 8B, the end point address, the start point address, and the SPI are given to the encrypted packet. In the following description, an encryption key and an encryption method used between the router 2 and the router 6 are a first encryption key and a first encryption algorithm, respectively. The address of the destination router is stored in advance in the flash memory 12 as the SA end point address. That is, if the IP address of the destination router is not stored in the flash memory 12, encrypted communication with that router is not performed.

次に、ルータ2は、暗号化されたパケットをルータ6に送信する。この暗号化されたパケットは、S1において構築されたVPNを介して、ルータ6に送信される。以降の記載において、暗号化されたパケットを暗号化パケットと記載する。ルータ6は、ルータ2から送信された暗号化パケットを受信する。ルータ6は、暗号化パケットを受信すると、暗号化パケットに付与されたSPIを参照し、第1暗号鍵、および第1暗号化アルゴリズムをルータ6のフラッシュメモリ12に記憶されたSADから抽出する。この第1暗号鍵、および第1暗号化アルゴリズムにより、ルータ6は、暗号化パケットを復号する。復号されたパケットの内容は、図8(a)に示すIP電話機21から送信される暗号化されていないパケットの内容と同じである。S3の処理を実行するルータ2のCPU11が本発明の第1暗号化通信手段の一例である。ルータ2のS3の処理が本発明の第1暗号化通信ステップの一例である。   Next, the router 2 transmits the encrypted packet to the router 6. This encrypted packet is transmitted to the router 6 via the VPN constructed in S1. In the following description, the encrypted packet is referred to as an encrypted packet. The router 6 receives the encrypted packet transmitted from the router 2. When the router 6 receives the encrypted packet, the router 6 refers to the SPI attached to the encrypted packet, and extracts the first encryption key and the first encryption algorithm from the SAD stored in the flash memory 12 of the router 6. The router 6 decrypts the encrypted packet by using the first encryption key and the first encryption algorithm. The content of the decrypted packet is the same as the content of the unencrypted packet transmitted from the IP telephone 21 shown in FIG. The CPU 11 of the router 2 that executes the process of S3 is an example of the first encrypted communication means of the present invention. The process of S3 of the router 2 is an example of the first encrypted communication step of the present invention.

次に、ルータ6は、復号されたパケットに含まれる送信元アドレス、宛先アドレス、プロトコル、およびパケットサイズをルータ6のフラッシュメモリ12に記憶する。後述するが、IP電話機21のIPアドレスが送信元アドレス、IP電話機31のIPアドレスが宛先アドレス、ペイロード部に含まれるデータのプロトコルであるRTPがプロトコル、およびペイロード部に含まれるデータのサイズがパケットサイズである。フラッシュメモリ12への記憶が終了すると、ルータ6は、ルータ6のフラッシュメモリ12に記憶されたSPDを参照する。ルータ6は、IP電話機21から送信されたパケットの宛先IPアドレス、送信元のIPアドレス、およびペイロード部に含まれるデータのプロトコルに一致するSPがあるか否かを判断する。SPがあると判断すると、ルータ6は、そのSPの動作に示される通信方法で宛先のIP電話機31にパケットを送信すると判断する。SPが無いと、ルータ6は、宛先のIP電話機31にパケットを送信しないと判断する。暗号化通信でパケットを送信すると判断すると、SADを参照する。次に、ルータ6は、パケットに付与された宛先IPアドレス、送信元のIPアドレス、およびペイロード部のプロトコルと一致し、始点アドレスが、ルータ6のIPアドレスであるSAから、暗号鍵、および暗号化アルゴリズムを抽出する。この暗号鍵、および暗号化アルゴリズムにより、ルータ6は、IP電話機21から送信されたパケットを暗号化する。ルータ6は、復号されたパケットに付与された宛先IPアドレス、送信元のIPアドレス、およびペイロード部のプロトコルと一致し、始点アドレスが、ルータ6のIPアドレスであるSAから、終点アドレスに記憶されたルータのIPアドレスを抽出する。ルータ6は、暗号化されたパケットに、宛先のルータのIPアドレス、送信元のルータのIPアドレス、およびSAに指定されたSPIを付与する。宛先のルータのアドレスは、抽出された終点アドレスであるルータ3のIPアドレスであり、送信元のルータのアドレスは、始点アドレスであるルータ6のIPアドレスである。暗号化が終了すると、ルータ6は、暗号化パケットをルータ3に送信する。以降の記載において、ルータ6とルータ3との間で使用される暗号鍵、暗号化アルゴリズムをそれぞれ第2暗号鍵、第2暗号化アルゴリズムとする。   Next, the router 6 stores the source address, destination address, protocol, and packet size included in the decoded packet in the flash memory 12 of the router 6. As will be described later, the IP address of the IP telephone 21 is the transmission source address, the IP address of the IP telephone 31 is the destination address, the protocol of the data included in the payload portion is RTP, and the size of the data included in the payload portion is the packet. Size. When the storage in the flash memory 12 is completed, the router 6 refers to the SPD stored in the flash memory 12 of the router 6. The router 6 determines whether there is an SP that matches the destination IP address of the packet transmitted from the IP telephone 21, the IP address of the transmission source, and the data protocol included in the payload portion. If it is determined that there is an SP, the router 6 determines to transmit a packet to the destination IP telephone 31 by the communication method indicated by the operation of the SP. If there is no SP, the router 6 determines not to transmit a packet to the destination IP telephone 31. If it is determined that the packet is transmitted by encrypted communication, the SAD is referred to. Next, the router 6 matches the destination IP address assigned to the packet, the IP address of the transmission source, and the protocol of the payload portion, and the start point address is from the SA that is the IP address of the router 6, the encryption key, and the encryption Extraction algorithm. With this encryption key and encryption algorithm, the router 6 encrypts the packet transmitted from the IP telephone 21. The router 6 matches the destination IP address given to the decrypted packet, the source IP address, and the protocol of the payload portion, and the start point address is stored in the end point address from the SA that is the IP address of the router 6. Extract the IP address of the router. The router 6 assigns the IP address of the destination router, the IP address of the transmission source router, and the SPI specified by the SA to the encrypted packet. The address of the destination router is the IP address of the router 3 that is the extracted end point address, and the address of the source router is the IP address of the router 6 that is the start point address. When the encryption is completed, the router 6 transmits the encrypted packet to the router 3. In the following description, an encryption key and an encryption algorithm used between the router 6 and the router 3 are referred to as a second encryption key and a second encryption algorithm, respectively.

次に、ルータ6から送信された暗号化パケットを受信したルータ3は、暗号化パケットに付与されたSPIを参照し、第2暗号鍵、および第2暗号化アルゴリズムをルータ3のフラッシュメモリ12に記憶されたSADから抽出する。この第2暗号鍵、および第2暗号化アルゴリズムにより、ルータ3は、暗号化パケットを復号する。復号が終了すると、ルータ3は、復号されたパケットのヘッダーに含まれる宛先アドレスを参照して、IP電話機31にパケットを送信する。   Next, the router 3 that has received the encrypted packet transmitted from the router 6 refers to the SPI assigned to the encrypted packet, and stores the second encryption key and the second encryption algorithm in the flash memory 12 of the router 3. Extract from stored SAD. The router 3 decrypts the encrypted packet by using the second encryption key and the second encryption algorithm. When the decoding is completed, the router 3 refers to the destination address included in the header of the decoded packet and transmits the packet to the IP telephone 31.

[ルータ6の処理負荷が大きい場合の動作]
上述したS1〜S3の処理において暗号化パケットを中継するルータ6は、定期的に処理負荷の検出を行う。ルータ6は、フラッシュメモリ12に記憶されているパケットサイズに基づき、現在の処理負荷を検出する。S4において、ルータ6は、処理負荷が閾値よりも大きいか否かを判断する。この閾値は、予め設定されて、ルータ6のフラッシュメモリ12に記憶される。以降の説明において、処理負荷が大きいと判断された場合の処理を説明する。
[Operation when the processing load of the router 6 is large]
The router 6 that relays the encrypted packet in the processing of S1 to S3 described above periodically detects the processing load. The router 6 detects the current processing load based on the packet size stored in the flash memory 12. In S4, the router 6 determines whether or not the processing load is larger than a threshold value. This threshold value is preset and stored in the flash memory 12 of the router 6. In the following description, processing when it is determined that the processing load is large will be described.

S5において、ルータ6は、ルータ6を介さずに暗号化通信させる切替対象のルータを選択する。ルータ6は、高負荷状態になると、暗号化通信している2つのルータ毎に暗号化パケットのパケットサイズを算出する。ルータ6は、この2つのルータ毎のパケットサイズが一番大きいデータに対応する2つのルータを切替対象として選択する。具体的に、始点アドレス、および終点アドレスを切替対象の情報として抽出する。以降の記載において、この一番大きいパケットサイズの暗号化通信している2つのルータをルータ2とルータ3として説明する。切替対象を選択すると、S6に処理を移行する。   In S <b> 5, the router 6 selects a router to be switched for encrypted communication without using the router 6. When the router 6 enters a high load state, the packet size of the encrypted packet is calculated for each of the two routers performing encrypted communication. The router 6 selects two routers corresponding to data having the largest packet size for each of the two routers as a switching target. Specifically, the start point address and the end point address are extracted as information to be switched. In the following description, the two routers performing encrypted communication with the largest packet size will be described as router 2 and router 3. When the switching target is selected, the process proceeds to S6.

S6において、ルータ6はPSKを生成する。このPSKは、ルータ2とルータ3との間でVPNを構築するために使用される。具体的には、S109、およびS207において使用される。このPSKは、S1、およびS2におけるVPN構築処理のPSKと異なる。PSKの生成が終了すると、S7に処理を移行する。   In S6, the router 6 generates PSK. This PSK is used to construct a VPN between the router 2 and the router 3. Specifically, it is used in S109 and S207. This PSK is different from the PSK of the VPN construction process in S1 and S2. When the generation of PSK ends, the process proceeds to S7.

S7において、ルータ6は、2つの構築情報パケットを生成する。構築情報パケットは、作成されたPSKと、ルータ2、およびルータ3のIPアドレスとをペイロード部に含む。構築情報パケットの生成が終了すると、S8に処理を移行する。構築情報パケットが本発明の第1要求通知の一例である。構築情報パケットに含まれるPSKと、ルータ2、およびルータ3のIPアドレスとが本発明の構築情報の一例である。   In S7, the router 6 generates two construction information packets. The construction information packet includes the created PSK and the IP addresses of the router 2 and the router 3 in the payload portion. When the generation of the construction information packet is completed, the process proceeds to S8. The construction information packet is an example of the first request notification of the present invention. The PSK included in the construction information packet and the IP addresses of the router 2 and the router 3 are examples of the construction information of the present invention.

S8において、ルータ6は、フラッシュメモリ12に記憶されたSAを参照し、構築情報パケットを暗号化する。一方の構築情報パケットは、第1暗号鍵、および第1暗号化アルゴリズムで暗号化される。他方の構築情報パケットは、第2暗号鍵、および第2暗号化アルゴリズムで暗号化される。構築情報パケットの暗号化が終了すると、ルータ6は、第1暗号鍵、および第1暗号化アルゴリズムで暗号化された構築情報パケットに、ルータ2のIPアドレス、およびSPIを付与する。ルータ6は、ルータ2のIPアドレス、およびSPIが付与された構築情報パケットをルータ2との間に構築されたVPNを介して、ルータ2に送信する。ルータ6は、第2暗号鍵、および第2暗号化方式で暗号化された構築情報パケットにルータ3のIPアドレス、およびSPIを付与する。ルータ6は、ルータ3のIPアドレス、およびSPIが付与された構築情報パケットをルータ3との間に構築されたVPNを介して、ルータ3に送信する。構築情報パケットの送信が終了すると、S9に処理を移行する。S8において、構築情報を受信するルータ2のCPU11が本発明の受信手段の一例である。S8において、構築情報を受信するルータ2の処理が本発明の受信ステップの一例である。S8において、構築情報を送信するルータ6のCPU11が本発明の中継装置送信手段の一例である。ルータ2、およびルータ3に送信される構築情報パケットが、VPN構築通知である。   In S8, the router 6 refers to the SA stored in the flash memory 12 and encrypts the construction information packet. One construction information packet is encrypted with the first encryption key and the first encryption algorithm. The other construction information packet is encrypted with the second encryption key and the second encryption algorithm. When the encryption of the construction information packet is completed, the router 6 gives the IP address of the router 2 and the SPI to the construction information packet encrypted with the first encryption key and the first encryption algorithm. The router 6 transmits the construction information packet provided with the IP address of the router 2 and the SPI to the router 2 via the VPN constructed with the router 2. The router 6 gives the IP address and SPI of the router 3 to the second encryption key and the construction information packet encrypted by the second encryption method. The router 6 transmits the construction information packet provided with the IP address of the router 3 and the SPI to the router 3 via the VPN constructed with the router 3. When the transmission of the construction information packet is completed, the process proceeds to S9. In S8, the CPU 11 of the router 2 that receives the construction information is an example of the receiving means of the present invention. In S8, the process of the router 2 that receives the construction information is an example of the reception step of the present invention. In S8, the CPU 11 of the router 6 that transmits the construction information is an example of the relay device transmission means of the present invention. The construction information packet transmitted to the router 2 and the router 3 is a VPN construction notification.

S9において、暗号化された構築情報パケットを受信したルータ2、およびルータ3は、ルータ2とルータ3との間でVPNを構築する。このVPNの構築処理は、後述する。VPNの構築処理が終了すると、S10に処理を移行する。   In S <b> 9, the router 2 and the router 3 that have received the encrypted construction information packet construct a VPN between the router 2 and the router 3. This VPN construction process will be described later. When the VPN construction process ends, the process proceeds to S10.

S10において、ルータ2は、構築完了通知をルータ6、およびにルータ3にIP網を介して送信する。この構築完了通知は、ルータ2とルータ3との間でVPNが構築されたことを示す通知である。構築完了通知は、詳細な説明は後述する。構築完了通知を送信するとS11に処理を移行する。   In S10, the router 2 transmits a construction completion notification to the router 6 and the router 3 via the IP network. This construction completion notification is a notification indicating that a VPN has been constructed between the router 2 and the router 3. The construction completion notification will be described later in detail. When the construction completion notification is transmitted, the process proceeds to S11.

S11において、ルータ6は、構築完了通知を受信すると、切替対象をフラッシュメモリ12に記憶し、SADを更新する。すなわち、ルータ6は、構築情報パケットを送信したルータを示す情報をフラッシュメモリ12に記憶する。具体的には、ルータ6は、始点アドレス、または終点アドレスにルータ2、およびルータ3のIPアドレスが付与されているSAに切替済みフラグを付与する。切替済みフラグは、暗号化通信の経路が切り替えられたことを示す。具体的なSADの更新処理については、後述する。切替済みフラグを付与すると、S12に処理を移行する。   In S11, when receiving the construction completion notification, the router 6 stores the switching target in the flash memory 12 and updates the SAD. That is, the router 6 stores information indicating the router that transmitted the construction information packet in the flash memory 12. Specifically, the router 6 assigns a switched flag to the SA to which the IP addresses of the router 2 and the router 3 are assigned to the start address or the end address. The switched flag indicates that the encrypted communication path has been switched. Specific SAD update processing will be described later. When the switched flag is assigned, the process proceeds to S12.

S12において、ルータ2は、IP電話機21から暗号化されていないパケットを受信する。ルータ2は、この受信された暗号化されてないパケットのペイロード部に含まれるデータのプロトコルにより、S1において構築されたVPN、または、S9において構築されたVPNを介して、ルータ3と暗号化通信する。詳細は後述する。   In S 12, the router 2 receives an unencrypted packet from the IP telephone 21. The router 2 performs encrypted communication with the router 3 via the VPN constructed in S1 or the VPN constructed in S9 according to the protocol of the data included in the payload portion of the received unencrypted packet. To do. Details will be described later.

S13において、ルータ2は、ルータ3との間で構築されたVPNを介して暗号化通信されるデータ量を測定する。通信データ量の測定処理は、後述する。通信データ量の測定が終了すると、S14に処理を移行する。   In S <b> 13, the router 2 measures the amount of data that is encrypted and communicated via the VPN established with the router 3. The communication data amount measurement process will be described later. When the measurement of the communication data amount is completed, the process proceeds to S14.

S14において、ルータ6は、フラッシュメモリ12に記憶されているパケットサイズに基づき、現在の処理負荷を検出する。この処理はS4と同様である。ルータ6は、処理負荷が閾値よりも大きいか否かを判断する。以降の説明において、処理負荷が閾値よりも小さいと判断された場合の処理を説明する。処理負荷が閾値よりも小さいと判断されると、ルータ6は、切替対象を取得する。具体的には、切替済みフラグが付与されたSAを抽出する。この抽出されたSAの始点アドレス、および終点アドレスの2つのルータが切替対象である。以降の説明では、ルータ2、およびルータ3が切替対象として説明する。切替対象の取得が終了すると、S15に処理を移行する。   In S <b> 14, the router 6 detects the current processing load based on the packet size stored in the flash memory 12. This process is the same as S4. The router 6 determines whether or not the processing load is larger than a threshold value. In the following description, processing when it is determined that the processing load is smaller than the threshold will be described. When it is determined that the processing load is smaller than the threshold, the router 6 acquires a switching target. Specifically, the SA with the switched flag is extracted. The two routers of the extracted SA start point address and end point address are to be switched. In the following description, the router 2 and the router 3 are described as switching targets. When the acquisition of the switching target is completed, the process proceeds to S15.

S15において、ルータ6は、切替通知をルータ2とルータ3とに送信する。切替通知は、全プロトコルの暗号化データを、ルータ6を介して実行させる通知である。切替通知の送信が終了すると、S16に処理を移行する。切替通知が本発明の第2要求通知の一例である。   In S <b> 15, the router 6 transmits a switch notification to the router 2 and the router 3. The switching notification is a notification for executing encrypted data of all protocols via the router 6. When the transmission of the switching notification is completed, the process proceeds to S16. The switching notification is an example of a second request notification according to the present invention.

S16において、切替通知を受信したルータ2は、通信データ量を測定する。この通信データ量の測定処理は、S13の処理と同様である。すなわち、切替通知を受信した直後に、ルータ6との間に構築されたVPNにより暗号化パケットをルータ3に送信しない。通信データ量の測定が終了すると、S17に処理を移行する。   In S16, the router 2 that has received the switching notification measures the communication data amount. This communication data amount measurement process is the same as the process of S13. That is, immediately after receiving the switching notification, the encrypted packet is not transmitted to the router 3 by the VPN established with the router 6. When the measurement of the communication data amount is completed, the process proceeds to S17.

S17において、ルータ2は、切替判定処理を実行する。具体的には、ルータ2は、S16において測定された通信データ量が、S13において測定された通信データ量よりも減少したか否かを判断する。以下、減少したと判断した場合について説明する。減少したと判断した場合、S18に処理を移行する。   In S17, the router 2 executes a switching determination process. Specifically, the router 2 determines whether or not the communication data amount measured in S16 is smaller than the communication data amount measured in S13. Hereinafter, a case where it is determined that the number has decreased will be described. If it is determined that the number has decreased, the process proceeds to S18.

S18において、ルータ2は、始点アドレスまたは終点アドレスが、ルータ3のIPアドレスであるSAに切替済みフラグを付与する。次に、ルータ2は、切替済みフラグが付与されたSAから切替済みフラグを削除する。切替済みフラグを削除し、SADの更新が終了すると、S19に処理を移行する。   In S <b> 18, the router 2 gives a switched flag to the SA whose start point address or end point address is the IP address of the router 3. Next, the router 2 deletes the switched flag from the SA to which the switched flag is assigned. When the switched flag is deleted and the SAD update is completed, the process proceeds to S19.

S19において、ルータ2は、切替完了通知をルータ6、およびルータ3に送信する。切替完了通知を受信したルータ6は、S20において、始点アドレス、および終点アドレスが、ルータ2、およびルータ3のIPアドレスであり、切替済みフラグが付与されたSAから切替済みフラグを削除する。切替済みフラグを削除し、SADの更新が終了すると、S21に処理を移行する。S21の処理は、S3と同様なので、説明を省略する。   In S <b> 19, the router 2 transmits a switch completion notification to the router 6 and the router 3. In S20, the router 6 that has received the switch completion notification deletes the switched flag from the SAs to which the start point address and the end point address are the IP addresses of the router 2 and the router 3 and the switched flag is assigned. When the switched flag is deleted and the SAD update is completed, the process proceeds to S21. Since the process of S21 is the same as S3, description is abbreviate | omitted.

図9を参照して、ルータ2のメイン処理を説明する。このルータ2のメイン処理は、ルータ2のCPU11により実行される。このメイン処理のプログラムは、フラッシュメモリ12に記憶される。このメイン処理のプログラムは、図示しないサーバに記憶され、ルータ2のダウンロード要求に応じて、ルータ2に送信される。   The main process of the router 2 will be described with reference to FIG. The main process of the router 2 is executed by the CPU 11 of the router 2. The main processing program is stored in the flash memory 12. The main processing program is stored in a server (not shown) and transmitted to the router 2 in response to a download request from the router 2.

S31において、VPN構築通知を受信したか否かを判断する。このVPN構築通知は、図5のS8においてルータ2に送信される構築情報パケットである。VPN構築通知を受信したと判断すると、S32に処理を移行する。VPN構築通知を受信していないと判断すると、S44に処理を移行する。   In S31, it is determined whether a VPN construction notification is received. This VPN construction notification is a construction information packet transmitted to the router 2 in S8 of FIG. If it is determined that the VPN construction notification has been received, the process proceeds to S32. If it is determined that the VPN construction notification has not been received, the process proceeds to S44.

S32において、ルータ3とVPNを構築する。具体的には、S31において受信された暗号化された構築情報パケットに付与されたSPIを参照し、第1暗号鍵、および第1暗号化アルゴリズムを、フラッシュメモリ12に記憶されたSAから抽出する。この第1暗号鍵、および第1暗号化アルゴリズムにより、暗号化された構築情報パケットを復号する。構築情報パケットの復号が終了すると、終点アドレスが、ルータ6のIPアドレスであるSAを抽出する。抽出されたSAの終点アドレスを、復号された構築情報パケットに含まれるルータ3のIPアドレスに書き換えたSAを新たに作成する。次に、ルータ2は、抽出されたSAに切替済みフラグを付与する。一方、ルータ3は、終点アドレスが、ルータ6のIPアドレスであるSAを抽出する。抽出されたSAの終点アドレスを、復号された構築情報パケットに含まれるルータ2のIPアドレスに書き換えたSAを新たに作成する。次に、ルータ3は、抽出されたSAに切替済みフラグを付与する。新たなSAの作成、および切替済みフラグの付与が終了すると、ルータ2は、構築情報パケットに含まれるPSKを使用して、ルータ2とルータ3との間でVPNを構築する。PSKは構築情報パケットに含まれ、ルータ2、およびルータ3のIPアドレスと対応付けてフラッシュメモリ12に記憶される。このVPN構築処理は、S1の処理と同様である。VPNの構築が終了すると、S33に処理を移行する。S32において、ルータ3とVPNを構築するルータ2のCPU11が本発明の第2構築手段の一例である。S32において、ルータ3とVPNを構築するルータ2の処理が本発明の第2構築ステップの一例である。   In S32, the router 3 and the VPN are constructed. Specifically, referring to the SPI assigned to the encrypted construction information packet received in S31, the first encryption key and the first encryption algorithm are extracted from the SA stored in the flash memory 12. . The encrypted construction information packet is decrypted with the first encryption key and the first encryption algorithm. When the decryption of the construction information packet is finished, the SA whose end address is the IP address of the router 6 is extracted. A new SA is created by rewriting the end point address of the extracted SA with the IP address of the router 3 included in the decrypted construction information packet. Next, the router 2 gives a switched flag to the extracted SA. On the other hand, the router 3 extracts the SA whose end address is the IP address of the router 6. A new SA is created by rewriting the end point address of the extracted SA with the IP address of the router 2 included in the decrypted construction information packet. Next, the router 3 gives a switched flag to the extracted SA. When the creation of a new SA and the assignment of the switched flag are completed, the router 2 constructs a VPN between the router 2 and the router 3 using the PSK included in the construction information packet. The PSK is included in the construction information packet and stored in the flash memory 12 in association with the IP addresses of the router 2 and the router 3. This VPN construction process is the same as the process of S1. When the construction of the VPN ends, the process proceeds to S33. In S32, the CPU 11 of the router 2 that constructs the VPN with the router 3 is an example of the second construction means of the present invention. In S32, the processing of the router 3 that constructs the VPN with the router 3 is an example of the second construction step of the present invention.

S33において、ルータ3との間のVPNの構築過程において作成された暗号鍵、暗号化アルゴリズム、およびSPIを、S32において新たに作成されたSAに付与し、SADを更新する。暗号鍵、暗号化アルゴリズム、およびSPIの付与が終了すると、S34に処理を移行する。以降の記載において、S33においてSAに付与された暗号鍵、および暗号化アルゴリズムを第3暗号鍵、および第3暗号化アルゴリズムとする。   In S33, the encryption key, the encryption algorithm, and the SPI created in the VPN construction process with the router 3 are assigned to the newly created SA in S32, and the SAD is updated. When the assignment of the encryption key, encryption algorithm, and SPI ends, the process proceeds to S34. In the following description, the encryption key and encryption algorithm assigned to SA in S33 are referred to as a third encryption key and a third encryption algorithm.

S34において、ダミーパケットをルータ3との間に構築されたVPNを介して、ルータ3に送信する。図10を参照してS34の処理を具体的に説明する。暗号化が開始された時刻T0である現在の時刻において、ペイロード部に含まれるダミーパケットを第3暗号鍵、および第3暗号化アルゴリズムにより暗号化する動作を開始する。この暗号化が開始された時刻T0がペイロード部に含まれる。暗号化されたダミーパケットに、ルータ3のIPアドレスと、ルータ2のIPアドレスと、第3暗号鍵、および第3暗号化アルゴリズムに関連付けられるSPIと、ルータ2がダミーパケットをルータ3に送信する時刻T1である現在の時刻と、ダミーパケットを示す識別データとを付与する。付与が完了した暗号化されたダミーパケットをルータ3に送信する。この暗号化されたダミーパケットを受信したルータ3は、ダミーパケットを示す識別データを検出し、受信されたパケットがダミーパケットであると判断する。ルータ3は、ダミーパケットであると判断すると、ダミーパケットを受信した時刻T2をRAM13に記憶する。時刻T2の記憶が終了すると、ルータ3は、暗号化されたダミーパケットに付与されたSPIに基づき、第3暗号鍵、および第3暗号化アルゴリズムをSADから抽出する。抽出された第3暗号鍵、および第3暗号化アルゴリズムに基づき、ルータ3は、暗号化されたダミーパケットを復号する。復号が完了すると、時刻T0、時刻T1、および時刻T2をペイロード部に含むダミーパケットを第3暗号鍵、および第3暗号化アルゴリズムにより暗号化する。暗号化されたダミーパケットに、ルータ2のIPアドレスと、ルータ3のIPアドレスと、第3暗号鍵、および第3暗号化アルゴリズムに関連付けられるSPIと、ルータ3がダミーパケットをルータ2に送信する時刻T3である現在の時刻と、ダミーパケットを示す識別データとを付与する。付与が完了した暗号化されたダミーパケットをルータ2に送信する。この暗号化されたダミーパケットを受信したルータ2は、ダミーパケットを示す識別データを検出し、受信されたパケットがダミーパケットであると判断する。ルータ2は、ダミーパケットであると判断すると、ダミーパケットを受信した時刻T4をRAM13に記憶する。時刻T4の記憶が終了すると、ルータ2は、暗号化されたダミーパケットに付与されたSPIに基づき、第3暗号鍵、および第3暗号化アルゴリズムをSADから抽出する。抽出された第3暗号鍵、および第3暗号化アルゴリズムに基づき、ルータ3は、暗号化されたダミーパケットを復号する。復号が完了すると、ルータ2は復号が完了した時刻T5、および時刻T0〜T4をRAM13に記憶する。時刻T0〜T5を記憶すると、S35に処理を移行する。ルータ3から受信した時刻T2、および時刻T3のうち少なくとも時刻T2が本発明の時間情報の一例である。   In S <b> 34, the dummy packet is transmitted to the router 3 via the VPN established with the router 3. The process of S34 will be specifically described with reference to FIG. At the current time, which is the time T0 when the encryption is started, an operation of encrypting the dummy packet included in the payload portion with the third encryption key and the third encryption algorithm is started. The time T0 when the encryption is started is included in the payload portion. In the encrypted dummy packet, the IP address of the router 3, the IP address of the router 2, the third encryption key, the SPI associated with the third encryption algorithm, and the router 2 transmit the dummy packet to the router 3. The current time, which is time T1, and identification data indicating a dummy packet are given. The encrypted dummy packet that has been assigned is transmitted to the router 3. The router 3 that has received the encrypted dummy packet detects identification data indicating the dummy packet, and determines that the received packet is a dummy packet. When determining that the router 3 is a dummy packet, the router 3 stores the time T2 at which the dummy packet is received in the RAM 13. When the storage at time T2 ends, the router 3 extracts the third encryption key and the third encryption algorithm from the SAD based on the SPI assigned to the encrypted dummy packet. Based on the extracted third encryption key and the third encryption algorithm, the router 3 decrypts the encrypted dummy packet. When the decryption is completed, the dummy packet including the time T0, the time T1, and the time T2 in the payload portion is encrypted with the third encryption key and the third encryption algorithm. In the encrypted dummy packet, the IP address of the router 2, the IP address of the router 3, the SPI associated with the third encryption key and the third encryption algorithm, and the router 3 transmit the dummy packet to the router 2. A current time as time T3 and identification data indicating a dummy packet are given. The encrypted dummy packet that has been assigned is transmitted to the router 2. The router 2 that has received the encrypted dummy packet detects identification data indicating the dummy packet, and determines that the received packet is a dummy packet. When determining that the router 2 is a dummy packet, the router 2 stores the time T4 at which the dummy packet is received in the RAM 13. When the storage at time T4 ends, the router 2 extracts the third encryption key and the third encryption algorithm from the SAD based on the SPI assigned to the encrypted dummy packet. Based on the extracted third encryption key and the third encryption algorithm, the router 3 decrypts the encrypted dummy packet. When the decoding is completed, the router 2 stores the time T5 when the decoding is completed and the times T0 to T4 in the RAM 13. When the times T0 to T5 are stored, the process proceeds to S35. Of the time T2 received from the router 3 and the time T3, at least the time T2 is an example of the time information of the present invention.

図9を参照して説明を続ける。S35において、ルータ2は、RAM13に記憶された時刻T0〜T5から通信速度と処理速度とを検出する。通信速度は、時刻T2から時刻T1を引いた時間で定義される。処理速度は、時刻T5から時刻T4を引いた時間と時刻T3から時刻T2を引いた時間と時刻T1から時刻T0を引いた時間との和で定義される。通信速度、および処理速度の検出が終了すると、S36に処理を移行する。   The description will be continued with reference to FIG. In S <b> 35, the router 2 detects the communication speed and the processing speed from the times T <b> 0 to T <b> 5 stored in the RAM 13. The communication speed is defined by a time obtained by subtracting time T1 from time T2. The processing speed is defined as the sum of a time obtained by subtracting time T4 from time T5, a time obtained by subtracting time T2 from time T3, and a time obtained by subtracting time T0 from time T1. When the detection of the communication speed and the processing speed is completed, the process proceeds to S36.

S36において、通信速度が、閾値以上か否かを判断する。閾値は、予めルータ2のフラッシュメモリ12に記憶される。通信速度が閾値以上であると判断すると、S37に処理を移行する。通信速度が閾値未満であると、S40に処理に移行する。通信速度が閾値未満である場合、ルータ2からVPNを介して送信されたデータがルータ3に受信されるまでの時間が遅いことになる。この結果、ルータ3との間で構築されたVPNを介して暗号化通信されるデータの通信遅延が発生する確率が高くなる。S36において、通信速度が閾値以上か否かを判断するルータ2のCPU11が本発明の判断手段の一例である。S36において、通信速度が閾値以上か否かを判断するルータ2の処理が本発明の判断ステップの一例である。   In S36, it is determined whether or not the communication speed is equal to or higher than a threshold value. The threshold value is stored in advance in the flash memory 12 of the router 2. If it is determined that the communication speed is equal to or higher than the threshold, the process proceeds to S37. If the communication speed is less than the threshold, the process proceeds to S40. When the communication speed is less than the threshold value, the time until the data transmitted from the router 2 via the VPN is received by the router 3 is slow. As a result, there is a high probability that a communication delay of data that is encrypted and communicated with the router 3 via the VPN is generated. In S36, the CPU 11 of the router 2 that determines whether or not the communication speed is equal to or higher than the threshold value is an example of a determination unit of the present invention. The processing of the router 2 that determines whether or not the communication speed is equal to or higher than the threshold in S36 is an example of the determination step of the present invention.

S37において、処理速度が、閾値以上か否かを判断する。閾値は、予めルータ2のフラッシュメモリ12に記憶される。処理速度が閾値以上であると判断すると、全プロトコルのパケットをルータ3との間で構築されたVPNを介して暗号化通信すると判断し、S38に処理を移行する。処理速度が閾値未満であると、S40に処理に移行する。処理速度が閾値未満である場合、ルータ2、およびルータ3のデータを暗号化、および復号する処理の処理速度が遅いといえる。処理速度が閾値未満である場合、ルータ3との間で構築されたVPNを介して暗号化通信されるデータの通信遅延が発生する確率が高くなる。処理速度が閾値以上であると判断すると、SADを更新しない。この結果、処理速度が閾値以上である状態で、図5のS12において、ルータ2は、IP電話機21から送信されたパケットをIP電話機31へ送信する場合、S32において構築されたVPNを介してこのパケットを暗号化してルータ3へ送信する。   In S37, it is determined whether or not the processing speed is equal to or higher than a threshold value. The threshold value is stored in advance in the flash memory 12 of the router 2. If it is determined that the processing speed is equal to or higher than the threshold, it is determined that all protocol packets are encrypted and communicated with the router 3 via the VPN, and the process proceeds to S38. If the processing speed is less than the threshold, the process proceeds to S40. When the processing speed is less than the threshold, it can be said that the processing speed of the process of encrypting and decrypting the data of the router 2 and the router 3 is low. When the processing speed is less than the threshold, there is a high probability that a communication delay of data that is encrypted and communicated with the router 3 via the VPN is generated. If it is determined that the processing speed is equal to or higher than the threshold, the SAD is not updated. As a result, when the processing speed is equal to or higher than the threshold value and the router 2 transmits the packet transmitted from the IP telephone 21 to the IP telephone 31 in S12 of FIG. 5, the router 2 performs this via the VPN constructed in S32. The packet is encrypted and transmitted to the router 3.

一方、S36において、通信速度が閾値未満と判断された、またはS37において処理速度が閾値未満と判断された場合、S40において、強制切替通知がVPN構築通知に含まれるか否かを判断する。強制切替通知については、後述する。強制切替通知が含まれると判断すると、S41に処理を移行する。強制切替通知が含まれないと判断すると、S43に処理を移行する。   On the other hand, if it is determined in S36 that the communication speed is less than the threshold value, or if it is determined in S37 that the processing speed is less than the threshold value, it is determined in S40 whether the forced switching notification is included in the VPN construction notification. The forced switching notification will be described later. If it is determined that the forced switching notification is included, the process proceeds to S41. If it is determined that the forced switching notification is not included, the process proceeds to S43.

S41において、ルータ3との間で再度VPNを構築する。この再度構築されるVPNの暗号化強度は、S32においてルータ3との間に構築されたVPNの暗号化強度より低い。具体的には、ルータ3との間で再度VPNを構築する際、図6のS113において、ルータ2は、S32においてルータ3との間にVPNを構築した時の暗号化アルゴリズム以外の暗号化アルゴリズムを含むIPsec SA生成要求をルータ6に送信する。すなわち第3暗号化アルゴリズム以外の暗号化アルゴリズムを含むIPsec SA生成要求をルータ6に送信する。例えば、S32において構築されたVPNの暗号化アルゴリズムが、AESである場合、再度構築されるVPNの暗号化アルゴリズムは、3DES−CBC、DES−CBCが考えられる。再度VPNを構築すると、S42に処理を移行する。   In S41, a VPN is established again with the router 3. The encryption strength of the VPN constructed again is lower than the encryption strength of the VPN constructed with the router 3 in S32. Specifically, when constructing the VPN again with the router 3, in S113 of FIG. 6, the router 2 performs an encryption algorithm other than the encryption algorithm when constructing the VPN with the router 3 in S32. Is sent to the router 6. That is, an IPsec SA generation request including an encryption algorithm other than the third encryption algorithm is transmitted to the router 6. For example, when the VPN encryption algorithm constructed in S32 is AES, 3DES-CBC and DES-CBC can be considered as the VPN encryption algorithm constructed again. When the VPN is constructed again, the process proceeds to S42.

S42において、SADを更新する。全プロトコルのパケットが再度構築されたVPNを介して暗号化通信される。S33において、終点アドレスがルータ2、またはルータ3のIPアドレスに書き換えられたSAを抽出する。抽出されたSAの暗号鍵、暗号化アルゴリズム、およびSPIを、S41においてルータ3との間で再度VPNが構築された時の暗号鍵、暗号化アルゴリズム、およびSPIに書き換え、SADを更新する。この結果、図5のS12において、ルータ2は、IP電話機21から送信されたパケットをIP電話機31へ送信する場合、S41において再度構築されたVPNを介してこのパケットを暗号化してルータ3へ送信する。SADの更新が終了すると、S38に処理を移行する。   In S42, the SAD is updated. All protocol packets are encrypted and communicated via the reconstructed VPN. In S33, the SA whose end address is rewritten to the IP address of router 2 or router 3 is extracted. The extracted SA encryption key, encryption algorithm, and SPI are rewritten to the encryption key, encryption algorithm, and SPI when the VPN is constructed again with the router 3 in S41, and the SAD is updated. As a result, in S12 of FIG. 5, when the router 2 transmits the packet transmitted from the IP telephone 21 to the IP telephone 31, the packet is encrypted and transmitted to the router 3 via the VPN reconstructed in S41. To do. When the update of SAD is completed, the process proceeds to S38.

S40において、強制切替通知がVPN構築通知に含まれないと判断された場合、S43において、S1において構築されたVPNを介してリアルタイムパケットの暗号化通信を行い、S32において構築されたVPNを介してリアルタイムパケット以外の暗号化通信を行うと判断する。すなわち、S33において、終点アドレスがルータ2、またはルータ3のIPアドレスに書き換えられ、上位層プロトコルがRTP、RTSP(Real Time Streaming Protocol)、RTCP(Real−time Transport Control Protocol)であるSAを抽出する。抽出されたSAを削除する。次に、切替済みフラグが付与されたSAのうち、上位層プロトコルがRTP、RTSP、RTCPであるSAを抽出する。抽出されたSAに付与された切替済みフラグを削除し、SADを更新する。この結果、図5のS12において、ルータ2は、IP電話機21から送信されたパケットをIP電話機31へ送信する場合、このパケットのプロトコルがRTP、RTSP、RTCPのいずれかであると判断すると、このパケットをS1において構築されたVPNを介してルータ6に送信する。IP電話機21から送信されたパケットのプロトコルがRTP、RTSP、RTCPでないと判断すると、このパケットをS32において構築されたVPNを介してルータ3に送信する。SADの更新が終了すると、S38に処理を移行する。ペイロード部に含まれるデータのプロトコルが、RTP、RTSP、RTCPのいずれかである場合、パケットをリアルタイムパケットと記載する。S43の処理により、リアルタイムプロトコルの暗号化通信は、ルータ6を介して実行される。ルータ2とルータ3との暗号化通信のうち、リアルタイムプロトコル以外のプロトコルについては、ルータ6を介さずに通信されるので、ルータ6の処理負荷は減少する。ルータ2とルータ3との暗号化通信の通信速度が低下している、または暗号化、復号の処理速度が低下しているので、リアルタイムプロトコルのデータが、ルータ2とルータ3との間に構築されたVPNを介して暗号化通信されると、このデータが遅延してルータ2、またはルータ3に受信される。これに対し、リアルタイムプロトコルのデータが、ルータ6を介して暗号化通信されるので、このリアルタイムプロトコルのデータの遅延が低減される。   When it is determined in S40 that the forced switching notification is not included in the VPN construction notification, in S43, the encrypted communication of the real-time packet is performed via the VPN constructed in S1, and the VPN constructed in S32 is performed. It is determined that encrypted communication other than real-time packets is performed. That is, in S33, the end point address is rewritten to the IP address of router 2 or router 3, and the upper layer protocol is RTP, RTSP (Real Time Streaming Protocol), and RTCP (Real-time Transport Control Protocol) SA is extracted. . Delete the extracted SA. Next, among the SAs to which the switched flag is assigned, SAs whose upper layer protocols are RTP, RTSP, and RTCP are extracted. The switched flag given to the extracted SA is deleted, and the SAD is updated. As a result, when the router 2 determines in S12 of FIG. 5 that the packet transmitted from the IP telephone 21 is transmitted to the IP telephone 31, the protocol of the packet is any one of RTP, RTSP, and RTCP. The packet is transmitted to the router 6 via the VPN constructed in S1. If it is determined that the protocol of the packet transmitted from the IP telephone 21 is not RTP, RTSP, or RTCP, this packet is transmitted to the router 3 via the VPN constructed in S32. When the update of SAD is completed, the process proceeds to S38. When the protocol of data included in the payload portion is any one of RTP, RTSP, and RTCP, the packet is described as a real-time packet. The encrypted communication of the real time protocol is executed via the router 6 by the process of S43. Of the encrypted communications between the router 2 and the router 3, protocols other than the real-time protocol are communicated without going through the router 6, so the processing load on the router 6 is reduced. Since the communication speed of the encrypted communication between the router 2 and the router 3 is low, or the processing speed of encryption and decryption is low, the real-time protocol data is constructed between the router 2 and the router 3. When encrypted communication is performed via the VPN, the data is received by the router 2 or the router 3 with a delay. On the other hand, since the real-time protocol data is encrypted and communicated via the router 6, the delay of the real-time protocol data is reduced.

S37において、通信速度が閾値以上と判断される、またはS42、およびS43において、SADの更新が終了すると、S38において、構築完了通知をルータ6、およびルータ3に送信する。S37において通信速度が閾値以上と判断された場合、S32において構築されたVPNを介して、全プロトコルの暗号化通信を行う通知をルータ6、およびルータ3に送信する。S42においてSADが更新された場合、S41において再度構築されたVPNを介して、全プロトコルの暗号化通信を行う通知をルータ6、およびルータ3に送信する。S43においてSADが更新された場合、S1において構築されたVPNを介してリアルタイムパケットの暗号化通信を行い、S32において構築されたVPNを介してリアルタイムパケット以外の暗号化通信を行う通知をルータ6、およびルータ3に送信する。ルータ6、およびルータ3はこの構築完了通知を受信すると、SADを更新する。ルータ2のCPU11は、構築完了通知の送信が終了すると、S39に処理を移行する。   In S37, when it is determined that the communication speed is equal to or higher than the threshold value, or in S42 and S43, when the update of SAD is completed, a construction completion notification is transmitted to router 6 and router 3 in S38. When it is determined in S37 that the communication speed is equal to or higher than the threshold, a notification for performing encrypted communication of all protocols is transmitted to the router 6 and the router 3 via the VPN constructed in S32. When the SAD is updated in S42, a notification for performing encrypted communication of all protocols is transmitted to the router 6 and the router 3 via the VPN reconstructed in S41. When the SAD is updated in S43, the router 6 performs a notification of performing encrypted communication of the real-time packet via the VPN constructed in S1, and performing encrypted communication other than the real-time packet via the VPN constructed in S32. And to the router 3. Upon receiving this construction completion notification, the router 6 and the router 3 update the SAD. When the CPU 11 of the router 2 finishes sending the construction completion notification, the process proceeds to S39.

S39において、ルータ3との間に構築されたVPNを介して暗号化通信されるデータ量を検出する。この処理は、図5に示すS13の処理である。具体的には、一定期間においてルータ3との間に構築されたVPNを介して暗号化通信されるデータを抽出する。抽出された暗号化通信される各々のデータのペイロード部に含まれるデータのパケットサイズを集計する。集計されたパケットサイズを通信データ量としてフラッシュメモリ12に記憶する。通信データ量の記憶が終了すると、S31に処理を移行する。S39において、ルータ3との間に構築されたVPNを介して暗号化通信されるデータ量を検出するルータ2のCPU11が本発明の検出手段の一例である。S39において、ルータ3との間に構築されたVPNを介して暗号化通信されるデータ量を検出するルータ2の処理が本発明の検出ステップの一例である。S39において記憶される通信データ量が、本発明の受信前データ量の一例である。   In S39, the amount of data that is encrypted and communicated with the router 3 via the VPN is detected. This process is the process of S13 shown in FIG. Specifically, data that is encrypted and communicated with the router 3 through a VPN established during a certain period is extracted. The packet size of the data included in the payload portion of each extracted data to be encrypted and communicated is totaled. The aggregated packet size is stored in the flash memory 12 as a communication data amount. When the storage of the communication data amount ends, the process proceeds to S31. In S39, the CPU 11 of the router 2 that detects the amount of data that is encrypted and communicated with the router 3 via the VPN is an example of the detection means of the present invention. In S39, the processing of the router 2 that detects the amount of data that is encrypted and communicated with the router 3 via the VPN is an example of the detection step of the present invention. The communication data amount stored in S39 is an example of the pre-reception data amount of the present invention.

S31において、VPN構築通知を受信していないと判断された場合、S44において、VPN切替通知を受信したか否かを判断する。VPN切替通知は、図5のS15において、ルータ6から送信される通知である。VPN切替通知を受信したと判断するとS45に処理を移行する。VPN切替通知を受信していないと判断すると、S31に処理を移行する。   If it is determined in S31 that a VPN construction notification has not been received, it is determined in S44 whether a VPN switching notification has been received. The VPN switching notification is a notification transmitted from the router 6 in S15 of FIG. If it is determined that a VPN switching notification has been received, the process proceeds to S45. If it is determined that the VPN switching notification has not been received, the process proceeds to S31.

S45において、ルータ3との間に構築されたVPNを介して暗号化通信されるデータ量を検出する。この検出処理は、図5に示すS16の処理である。また、この検出処理は、S39と同様の処理である。測定されたデータ量を通信データ量としてフラッシュメモリ12に記憶すると、S46に処理を移行する。S45において、ルータ3との間に構築されたVPNを介して暗号化通信されるデータ量を検出するルータ2のCPU11が本発明の検出手段の一例である。S45において、ルータ3との間に構築されたVPNを介して暗号化通信されるデータ量を検出するルータ2の処理が本発明の検出ステップの一例である。S45において記憶される通信データ量が、本発明の受信後データ量の一例である。   In S45, the amount of data encrypted and communicated with the router 3 via the VPN is detected. This detection process is the process of S16 shown in FIG. Moreover, this detection process is the same process as S39. When the measured data amount is stored in the flash memory 12 as the communication data amount, the process proceeds to S46. In S45, the CPU 11 of the router 2 that detects the amount of data that is encrypted and communicated with the router 3 via the VPN is an example of the detection means of the present invention. In S45, the processing of the router 2 that detects the amount of data that is encrypted and communicated with the router 3 via the VPN is an example of the detection step of the present invention. The communication data amount stored in S45 is an example of the post-reception data amount of the present invention.

S46において、ルータ3との間に構築されたVPNを介して暗号化通信されるデータ量が減少したか否かを判断する。この判断は、S45において測定された通信データ量がS39において測定された通信データ量よりも減少したか否かで判断される。減少したと判断すると、S47に処理を移行する。減少していないと判断すると、S45に処理を移行する。   In S46, it is determined whether or not the amount of data to be encrypted and communicated via the VPN established with the router 3 has decreased. This determination is made based on whether or not the communication data amount measured in S45 is smaller than the communication data amount measured in S39. If it is determined that the number has decreased, the process proceeds to S47. If it is determined that it has not decreased, the process proceeds to S45.

S47において、SADを更新する。始点アドレスまたは終点アドレスが、ルータ3のIPアドレスであるSAに切替済みフラグを付与する。次に、切替済みフラグが付与されたSAから切替済みフラグを削除する。この結果、ルータ2からルータ3への暗号化データは、図5のS1、およびS2において構築されたVPNを介して暗号化通信される。切替済みフラグを削除し、SADの更新が終了すると、S48に処理を移行する。   In S47, the SAD is updated. The start point address or the end point address gives a switched flag to the SA that is the IP address of the router 3. Next, the switched flag is deleted from the SA to which the switched flag is assigned. As a result, the encrypted data from the router 2 to the router 3 is encrypted and communicated via the VPN constructed in S1 and S2 of FIG. When the switched flag is deleted and the update of SAD is completed, the process proceeds to S48.

S48において、切替完了通知をルータ6、およびルータ3に送信する。この切替完了通知の送信処理は、図5のS19と同様の処理である。切替完了通知を送信すると、S31に処理を移行する。   In S <b> 48, a switch completion notification is transmitted to the router 6 and the router 3. The switching completion notification transmission process is the same as S19 in FIG. When the switch completion notification is transmitted, the process proceeds to S31.

図11を参照して、ルータ6のメイン処理を説明する。このメイン処理は、ルータ6のCPU11により実行される。このメイン処理のプログラムは、フラッシュメモリ12に記憶される。このメイン処理のプログラムは、図示しないサーバに記憶され、ルータ6のダウンロード要求に応じて、ルータ6に送信される。   The main process of the router 6 will be described with reference to FIG. This main process is executed by the CPU 11 of the router 6. The main processing program is stored in the flash memory 12. The main processing program is stored in a server (not shown) and transmitted to the router 6 in response to a download request from the router 6.

S51において、処理負荷を検出する。図5のS3においてルータ6に受信された暗号化パケットは、ルータ6のCPU11により、復号される。次に、復号されたパケットは、CPU11により、暗号化される。この復号、および暗号化の変換処理の負荷を検出する。処理負荷の検出が終了すると、S52に処理を移行する。ルータ6のCPU11が、受信された暗号化パケットを復号、暗号化する変換処理が、本発明のデータを復号する処理、およびデータを暗号化する変換処理である。この変換処理によりルータ6のCPU11にかかる負担が、本発明の変換処理負荷の一例である。S51において、処理負荷を検出するルータ6のCPU11が本発明の中継装置検出手段の一例である。   In S51, the processing load is detected. The encrypted packet received by the router 6 in S3 of FIG. 5 is decrypted by the CPU 11 of the router 6. Next, the decrypted packet is encrypted by the CPU 11. This decryption and encryption conversion processing load is detected. When the detection of the processing load ends, the process proceeds to S52. The conversion process in which the CPU 11 of the router 6 decrypts and encrypts the received encrypted packet is the process of decrypting the data of the present invention and the conversion process of encrypting the data. The load imposed on the CPU 11 of the router 6 by this conversion processing is an example of the conversion processing load of the present invention. In S51, the CPU 11 of the router 6 that detects the processing load is an example of the relay device detection means of the present invention.

S52において、処理負荷が閾値以上か否かを判断する。処理負荷が閾値以上と判断すると、S53に処理を移行する。処理負荷が閾値未満と判断すると、S62に処理を移行する。S52において、処理負荷が閾値以上か否かを判断するルータ6のCPU11が本発明の中継装置判断手段の一例である。   In S52, it is determined whether or not the processing load is equal to or greater than a threshold value. If it is determined that the processing load is equal to or greater than the threshold, the process proceeds to S53. If it is determined that the processing load is less than the threshold, the process proceeds to S62. In S52, the CPU 11 of the router 6 that determines whether or not the processing load is equal to or greater than the threshold is an example of the relay device determination unit of the present invention.

S53〜S55は、図5のS5〜S7と同様なので、簡単に説明する。S53において、切替対象を取得するが、この切替対象は、切替済みフラグが付与されていないSAから抽出される。すなわち、構築情報パケットを既にルータ2、およびルータ3に送信している場合は、これら2つのルータ間の暗号化通信以外の暗号化通信が実行されている2つのルータのIPアドレスが抽出される。従って、抽出された2つのルータのIPアドレスの一方は、ルータ2またはルータ3のIPアドレスでも良い。抽出されたアドレスを有する2つのルータが、本発明の第1対の別の通信装置の一例である。2つのルータ毎のパケットサイズが一番大きいデータに対応する2つのルータが切替対象として選択される。この結果、切替済みフラグが付与されていないSAから抽出された始点アドレス、および終点アドレスを有する2つのルータは、切替済みフラグが付与されたSAの始点アドレス、および終点アドレスを有するルータにより暗号化通信されたデータによる処理負荷の次に割合が大きい処理負荷の原因となる暗号化通信を実行するルータである。すなわち、抽出されたアドレスを有する2つのルータが、本発明の第2対の別の通信装置の一例である。S53において、切替対象を取得するルータ6のCPU11が本発明の特定手段の一例である。以降の説明において抽出された2つのルータをルータ4、およびルータ5として説明する。   S53 to S55 are the same as S5 to S7 in FIG. In S53, the switching target is acquired, and this switching target is extracted from the SA to which the switched flag is not assigned. That is, when the construction information packet has already been transmitted to the router 2 and the router 3, the IP addresses of the two routers that are performing encrypted communication other than the encrypted communication between the two routers are extracted. . Therefore, one of the extracted IP addresses of the two routers may be the IP address of the router 2 or the router 3. Two routers having the extracted address are an example of another communication device of the first pair of the present invention. Two routers corresponding to data having the largest packet size for each of the two routers are selected as switching targets. As a result, the two routers having the start point address and the end point address extracted from the SA not assigned with the switched flag are encrypted by the router having the start point address and the end point address of the SA with the switched flag. It is a router that executes encrypted communication that causes a processing load having the second largest ratio of processing load due to communicated data. That is, the two routers having the extracted address are an example of another communication device of the second pair of the present invention. In S53, the CPU 11 of the router 6 that acquires the switching target is an example of the specifying unit of the present invention. The two routers extracted in the following description will be described as router 4 and router 5.

S54において、PSKが生成される。このPSKは、切替済みフラグが付与されたSAの始点アドレス、及び終点アドレスを有するルータに送信したPSKと異なる。抽出された2つのルータが、ルータ4とルータ5とである場合、S55において、ルータ6は、この異なるPSK、ルータ4のアドレス、ルータ5のアドレスをペイロード部に含む構築情報パケットを生成する。構築情報パケットの生成が終了すると、S56に処理を移行する。異なるPSK、ルータ4のアドレス、ルータ5のアドレスをペイロード部に含む構築情報パケットが本発明の第3要求通知の一例である。構築情報パケットに含まれる異なるPSKと、ルータ4、およびルータ5のIPアドレスとが本発明の第2構築情報の一例である。   In S54, PSK is generated. This PSK is different from the PSK transmitted to the router having the SA start point address and end point address to which the switched flag is assigned. If the two extracted routers are the router 4 and the router 5, in S55, the router 6 generates a construction information packet including the different PSK, the address of the router 4, and the address of the router 5 in the payload portion. When the generation of the construction information packet is completed, the process proceeds to S56. A construction information packet including a different PSK, an address of the router 4 and an address of the router 5 in the payload portion is an example of the third request notification of the present invention. Different PSK included in the construction information packet and the IP addresses of the router 4 and the router 5 are examples of the second construction information of the present invention.

構築情報パケットの生成が終了すると、S56において、処理負荷の大幅な増加の原因となる暗号化通信があるか否かを判断する。具体的には、S51において検出された処理負荷のうち、切替対象となる2つのルータの暗号化通信のパケットサイズが、S51において検出された処理負荷の50%以上か否かを判断する。50%以上であると判断した場合、処理負荷の大幅な増加の原因となる暗号化通信があると判断し、S58に処理を移行する。50%未満であると判断した場合、処理負荷の大幅な増加の原因となる暗号化通信がないと判断し、S57に処理を移行する。   When the generation of the construction information packet ends, it is determined in S56 whether or not there is an encrypted communication that causes a significant increase in processing load. Specifically, it is determined whether or not the packet size of the encrypted communication of the two routers to be switched among the processing loads detected in S51 is 50% or more of the processing load detected in S51. If it is determined that it is 50% or more, it is determined that there is encrypted communication that causes a significant increase in processing load, and the process proceeds to S58. If it is determined that it is less than 50%, it is determined that there is no encrypted communication that causes a significant increase in processing load, and the process proceeds to S57.

S57において、切替対象の2つのルータにより暗号化通信されるパケットは、リアルタイムパケットのみか否かを判断する。リアルタイムパケットのみと判断すると、S58に処理を移行する。リアルタイムパケットのみでないと判断すると、S59に処理を移行する。また、リアルタイムパケットのみでないと判断された場合、ルータ6との間に構築されたVPNを介して暗号化通信するルータが切替対象のルータ以外のルータが存在するか否かを判断してもよい。この場合、切替対象のルータ以外のルータが存在すると判断した場合、S59に処理を移行する。切替対象のルータ以外のルータが存在しないと判断した場合、S58に処理を移行する。   In S57, it is determined whether or not the packets that are encrypted and communicated by the two routers to be switched are only real-time packets. If it is determined that only the real-time packet is present, the process proceeds to S58. If it is determined that the packet is not only a real-time packet, the process proceeds to S59. When it is determined that the packet is not only a real-time packet, the router that performs encrypted communication with the router 6 through the VPN may determine whether there is a router other than the router to be switched. . In this case, if it is determined that there is a router other than the router to be switched, the process proceeds to S59. If it is determined that there is no router other than the router to be switched, the process proceeds to S58.

S58において、強制切替通知をS55において作成された構築情報パケットに付与する。強制切替通知は、構築情報パケットを受信したルータに、全プロトコルのデータを、ルータ6を介さずに暗号化通信させる通知である。切替対象のルータの暗号化通信をルータ6を介さずに実行させないと、ルータ6の処理負荷が低減されないので、強制切替通知が構築情報パケットに付与される。強制切替通知の付与が終了すると、S59に処理を移行する。   In S58, a forced switching notification is given to the construction information packet created in S55. The forced switching notification is a notification that causes the router that has received the construction information packet to perform encrypted communication of all protocol data without using the router 6. If the encrypted communication of the router to be switched is not executed without going through the router 6, the processing load on the router 6 is not reduced, so a forced switching notification is given to the construction information packet. When the provision of the forced switching notification is finished, the process proceeds to S59.

S59において、構築情報パケットを、S53において抽出された2つのルータにVPNを介して送信する。抽出された2つのルータがルータ2、およびルータ3の場合、S1、およびS2において構築されたVPNを介してルータ2、およびルータ3に構築情報パケットを送信する。抽出された2つのルータがルータ4、およびルータ5の場合、ルータ4との間で構築されたVPN、およびルータ5との間で構築されたVPNを介して構築情報パケットを送信する。構築情報パケットの送信が終了すると、S60に処理を移行する。S59において、構築情報パケットをルータ2に送信するルータ6のCPU11が本発明の中継装置送信手段の一例である。   In S59, the construction information packet is transmitted to the two routers extracted in S53 via the VPN. When the two extracted routers are the router 2 and the router 3, the construction information packet is transmitted to the router 2 and the router 3 via the VPN constructed in S1 and S2. When the two extracted routers are the router 4 and the router 5, the construction information packet is transmitted via the VPN constructed with the router 4 and the VPN constructed with the router 5. When the transmission of the construction information packet is completed, the process proceeds to S60. In S59, the CPU 11 of the router 6 that transmits the construction information packet to the router 2 is an example of the relay device transmission means of the present invention.

S60において、構築完了通知を受信したか否かを判断する。構築完了通知を受信したと判断すると、S61に処理を移行する。構築完了通知を受信していないと判断すると、S60に移行する。   In S60, it is determined whether a construction completion notification has been received. If it is determined that the construction completion notification has been received, the process proceeds to S61. If it is determined that the construction completion notification has not been received, the process proceeds to S60.

S61において、SADを更新する。この処理は、図5に示すS11と同様なので、説明を省略する。SADの更新が終了すると、S51に処理を移行する。   In S61, the SAD is updated. Since this process is the same as S11 shown in FIG. When the update of SAD is completed, the process proceeds to S51.

S52において、処理負荷が閾値未満と判断すると、S62において、切替済みフラグがSAに付与されているか否かを判断する。切替済みフラグがあると判断すると、S63に処理を移行する。切替済みフラグが付与されていないと判断すると、S51に処理を移行する。   If it is determined in S52 that the processing load is less than the threshold value, it is determined in S62 whether or not a switched flag is assigned to the SA. If it is determined that there is a switched flag, the process proceeds to S63. If it is determined that the switched flag is not given, the process proceeds to S51.

S63において、切替通知を送信する。切替通知の送信処理は、図5のS15の処理と同様である。切替通知の送信が終了すると、S64に処理を移行する。S64において、切替完了通知を受信したか否かを判断する。切替完了通知を受信したと判断すると、S65に処理を移行する。切替済み通知を受信していないと判断すると、S64に処理を移行する。   In S63, a switching notification is transmitted. The switching notification transmission process is the same as the process of S15 of FIG. When the transmission of the switching notification is completed, the process proceeds to S64. In S64, it is determined whether a switching completion notification is received. If it is determined that the switching completion notification has been received, the process proceeds to S65. If it is determined that the notification of switching has not been received, the process proceeds to S64.

S65において、SADを更新する。この更新処理は図5のS20と同様である。SADの更新が終了すると、S51に処理を移行する。   In S65, the SAD is updated. This update process is the same as S20 in FIG. When the update of SAD is completed, the process proceeds to S51.

[実施形態の効果]
本実施形態のルータ2によれば、S36において検出された処理速度が閾値未満と判断された場合、S43において、ルータ2のCPU11は、S1において構築されたVPNを介してリアルタイムパケットの暗号化通信を行い、S32において構築されたVPNを介してリアルタイムパケット以外の暗号化通信を行うと判断する。これにより、リアルタイムパケット以外の暗号化データが、S32において構築されたVPNを介して暗号化通信されるので、リアルタイムパケット以外の暗号化データの処理速度の低下が低減される。また、ルータ2のCPU11は、S1において構築されたVPNを介してリアルタイムパケットの暗号化通信を実行するので、ルータ6の処理負荷が低減される。従って、ルータ3への、リアルタイムパケットの暗号化通信、リアルタイムパケット以外の暗号化通信の通信遅延を低減することができる。特に、リアルタイムプロトコル以外の暗号化データの暗号化通信がS32において構築されたVPNを介して実行される分だけルータ6の処理負荷が低減する。このルータ6の処理負荷が低減された状態で、リアルタイム性が要求されるリアルタイムプロトコルの暗号化データが、S1において構築されたVPNを介して暗号化通信されるので、リアルタイム性が要求される暗号化データの通信遅延を低減することができる。
[Effect of the embodiment]
According to the router 2 of the present embodiment, when it is determined that the processing speed detected in S36 is less than the threshold, in S43, the CPU 11 of the router 2 performs encrypted communication of real-time packets via the VPN constructed in S1. It is determined that encrypted communication other than the real-time packet is performed via the VPN constructed in S32. Thereby, since the encrypted data other than the real-time packet is encrypted and communicated via the VPN constructed in S32, a decrease in the processing speed of the encrypted data other than the real-time packet is reduced. Further, since the CPU 11 of the router 2 performs encrypted communication of real-time packets via the VPN constructed in S1, the processing load on the router 6 is reduced. Accordingly, it is possible to reduce the communication delay of the encrypted communication of the real-time packet to the router 3 and the encrypted communication other than the real-time packet. In particular, the processing load of the router 6 is reduced by the amount that encrypted communication of encrypted data other than the real-time protocol is executed via the VPN established in S32. In a state where the processing load of the router 6 is reduced, the encrypted data of the real-time protocol that requires real-time property is encrypted and communicated through the VPN constructed in S1, so that encryption that requires real-time property is required. The communication delay of the digitized data can be reduced.

本実施形態のルータ2によれば、S32において構築されたVPNを介してダミーパケットを暗号化、または復号する処理の処理速度が閾値以上かS37において判断される。すなわち、S36において通信速度が閾値以上か否かが判断され、S37において処理速度が閾値以上か否かを判断することは、VPNを介して暗号化通信されるデータを暗号化、または復号する処理の処理速度を含む通信速度が閾値以上であるか否かが判断されたことになる。この結果、より正確にVPNを介する暗号化通信に必要な通信速度が閾値以上か否かが判断される。従って、ルータ6の処理負荷が低減される可能性、およびルータ3への暗号化データの通信遅延が低減される可能性を高くすることができる。   According to the router 2 of the present embodiment, it is determined in S37 whether the processing speed of the process of encrypting or decrypting the dummy packet via the VPN constructed in S32 is equal to or higher than a threshold value. That is, it is determined whether or not the communication speed is equal to or higher than the threshold value in S36, and determining whether or not the processing speed is equal to or higher than the threshold value in S37 is a process of encrypting or decrypting data that is encrypted and communicated via the VPN. It is determined whether or not the communication speed including the processing speed is equal to or higher than the threshold value. As a result, it is determined whether or not the communication speed required for the encrypted communication via the VPN is equal to or higher than the threshold value. Therefore, the possibility that the processing load of the router 6 is reduced and the possibility that the communication delay of the encrypted data to the router 3 is reduced can be increased.

本実施形態のルータ2によれば、ルータ3から受信した時刻T2に基づき、通信速度が閾値を超えたか否かが判断される。この結果、より正確にVPNを介して暗号化通信するのに必要な通信速度が閾値以上か否かが判断される。従って、ルータ6の処理負荷が低減される可能性、およびルータ3への暗号化データの通信遅延が低減される可能性を高くすることができる。   According to the router 2 of the present embodiment, based on the time T2 received from the router 3, it is determined whether or not the communication speed exceeds the threshold value. As a result, it is determined whether or not the communication speed required for encrypted communication via the VPN is more than a threshold value. Therefore, the possibility that the processing load of the router 6 is reduced and the possibility that the communication delay of the encrypted data to the router 3 is reduced can be increased.

本実施形態のルータ2によれば、S45において検出された受信前データ量が、S39において検出された通信データ量よりも小さくなった場合に、ルータ2のCPU11は、ルータ2からルータ3への全プロトコルの暗号化データを、S1において構築されたVPNを介して暗号化通信する。これにより、S21において全プロトコルの暗号化データが暗号化通信された場合のルータ6の処理負荷が、S8においてVPN構築通知を受信した状態におけるルータ6の処理負荷よりも小さくなる。従って、S21において全プロトコルの暗号化データが暗号化通信されても、ルータ3への暗号化データの通信遅延を低減することができる。   According to the router 2 of the present embodiment, when the pre-reception data amount detected in S45 is smaller than the communication data amount detected in S39, the CPU 11 of the router 2 transfers from the router 2 to the router 3. The encrypted data of all protocols is encrypted and communicated via the VPN constructed in S1. Thereby, the processing load of the router 6 when encrypted data of all protocols is encrypted and communicated in S21 is smaller than the processing load of the router 6 in the state where the VPN construction notification is received in S8. Therefore, even if encrypted data of all protocols is encrypted and communicated in S21, the communication delay of the encrypted data to the router 3 can be reduced.

本実施形態のルータ2によれば、S56において、処理負荷に大幅に寄与する暗号化通信があると判断された場合、またはS57においてルータ2とルータ3との間で暗号化通信される暗号化パケットがRTPのみと判断された場合に、強制切替指示がVPN構築通知に含められる。S40において、この強制切替通知がVPN構築通知に含められていると判断された場合、ルータ2は、S41において、再度、ルータ3との間でVPNを構築する。この再度構築されたVPNは、S32において構築されたVPNを介して、暗号化データが暗号化通信される時の暗号化アルゴリズムよりも暗号化強度が低下する暗号化アルゴリズムが使用される。これにより、暗号化強度が低下する分だけ、S41において構築されたVPNを介して暗号化通信される暗号化データの処理速度の低下が低減される。従って、S41において構築されたVPNを介して、全プロトコルの暗号化データを暗号化通信される場合においても、ルータ3への暗号化データの通信遅延を低減することができる。   According to the router 2 of the present embodiment, when it is determined in S56 that there is an encrypted communication that greatly contributes to the processing load, or in S57, the encrypted communication is performed between the router 2 and the router 3. When it is determined that the packet is only RTP, a forced switching instruction is included in the VPN construction notification. When it is determined in S40 that this forced switching notification is included in the VPN construction notification, the router 2 constructs a VPN with the router 3 again in S41. The reconstructed VPN uses an encryption algorithm whose encryption strength is lower than that when the encrypted data is encrypted and communicated via the VPN constructed in S32. As a result, a decrease in the processing speed of the encrypted data that is encrypted and communicated via the VPN constructed in S41 is reduced by an amount corresponding to a decrease in the encryption strength. Accordingly, even when encrypted data of all protocols is encrypted and communicated via the VPN constructed in S41, the communication delay of the encrypted data to the router 3 can be reduced.

本実施形態の暗号化通信システム1によれば、S60においてルータ6が構築完了通知を受信したと判断し、S52において、再度検出された処理負荷が閾値以上と判断された場合、ルータ2、およびルータ3とは別のルータ4、およびルータ5とに、PSK、ルータ4のアドレス、およびルータ5のアドレスをペイロード部に含む構築情報パケットが送信される。これにより、構築情報パケットを受信したルータ4とルータ5との暗号化通信処理において、ルータ5への暗号化データの通信遅延を低減することができる。この通信遅延の低減と共に、切替完了通知を受信したルータ6の処理負荷がさらに低減される。特に、ルータ6の処理負荷に占める割合のうち、ルータ4とルータ5との暗号化通信による処理負荷は、ルータ2とルータ3との暗号化通信による処理負荷の次に大きい。この次に大きい処理負荷の原因となるルータ4とルータ5との暗号化通信がルータ6を介さずに実行されるので、ルータ6の処理負荷がさらに低減される。   According to the encrypted communication system 1 of the present embodiment, if it is determined in S60 that the router 6 has received the construction completion notification, and it is determined in S52 that the processing load detected again is greater than or equal to the threshold, The construction information packet including the PSK, the address of the router 4, and the address of the router 5 in the payload portion is transmitted to the router 4 and the router 5 different from the router 3. Thereby, the communication delay of the encrypted data to the router 5 can be reduced in the encrypted communication process between the router 4 and the router 5 that have received the construction information packet. Along with the reduction of the communication delay, the processing load of the router 6 that has received the switch completion notification is further reduced. In particular, of the ratio of the processing load of the router 6, the processing load due to the encrypted communication between the router 4 and the router 5 is the second largest after the processing load due to the encrypted communication between the router 2 and the router 3. Since the encrypted communication between the router 4 and the router 5 that causes the next largest processing load is executed without the router 6, the processing load on the router 6 is further reduced.

[変形例1]
IP電話機21、31、41、51は、スマートフォン、携帯電話、タブレット、アナログ電話機などでもよい。アナログ電話機の場合、ルータ2〜5は、アナログ電話機からの信号をデジタルデータに変換してもよい。このデジタルデータがパケットを構成する。
[Modification 1]
The IP telephones 21, 31, 41, 51 may be smartphones, mobile phones, tablets, analog telephones, or the like. In the case of an analog telephone, the routers 2 to 5 may convert a signal from the analog telephone into digital data. This digital data constitutes a packet.

[変形例2]
本実施形態では、S6の処理においてPSKが生成されたが、新たにPSKを生成しなくても良い。S6において、ルータ6は、ルータ2、およびルータ3のIPアドレス、およびS2の処理において、ルータ3とルータ6との認証に使用されたPSKを含む構築情報パケットを生成しても良い。ルータ6は、S7において、この構築情報パケットを暗号化し、ルータ2に送信する。ルータ2は、ルータ3のIPアドレスに基づいて、ISAKMP SA生成要求をルータ3に送信し、ルータ3とルータ6との間でVPNが構築された時のPSKに基づきVPNを構築する。これにより、ルータ6が構築情報パケットをルータ3に送信しなくても、ルータ2とルータ3との間でVPNが構築される。また、S1において認証に使用されたPSK、およびルータ2のIPアドレスを含む構築情報パケットをルータ3にのみ送信してもよい。
[Modification 2]
In the present embodiment, PSK is generated in the process of S6, but it is not necessary to newly generate PSK. In S6, the router 6 may generate a construction information packet including the IP addresses of the router 2 and the router 3, and the PSK used for authentication between the router 3 and the router 6 in the processing of S2. The router 6 encrypts this construction information packet and transmits it to the router 2 in S7. The router 2 transmits an ISAKMP SA generation request to the router 3 based on the IP address of the router 3 and constructs a VPN based on the PSK when the VPN is constructed between the router 3 and the router 6. Thereby, even if the router 6 does not transmit the construction information packet to the router 3, a VPN is constructed between the router 2 and the router 3. Further, the construction information packet including the PSK used for authentication in S1 and the IP address of the router 2 may be transmitted only to the router 3.

[変形例3]
本実施形態では、PSKはルータのIPアドレスと関連付けられて、各ルータに記憶されたが、FQDN(Fully Qualified Domain Name)など、ルータを特定する情報であればよい。メインモードでフェーズ1の処理が行われる場合は、PSKから生成されたハッシュ値は暗号化される。従って、ルータを特定する情報は、IPアドレスでしかない。よって、このIPアドレスが動的IPアドレスである場合は、認証を行うことが出来ない。すなわち、ルータのIPアドレスが動的IPアドレスである場合は、IPアドレス以外のルータを特定する情報が用いられる。IPアドレス以外のルータを特定する情報として、FQDNなどの特定情報が用いられれば良い。よって、FQDNなどの特定情報が構築情報パケットに含められる。アグレッシブモードで認証が実行される場合は、IPアドレスが動的IPでもよい。アグレッシブモードで認証が実行され、ルータを特定する情報がIPアドレスであれば、FQDNなどの特定情報は構築情報パケットに含められなくてよい。
[Modification 3]
In the present embodiment, the PSK is associated with the IP address of the router and stored in each router. However, any information that identifies the router, such as FQDN (Fully Qualified Domain Name), may be used. When the phase 1 process is performed in the main mode, the hash value generated from the PSK is encrypted. Therefore, the information specifying the router is only the IP address. Therefore, when this IP address is a dynamic IP address, authentication cannot be performed. That is, when the IP address of the router is a dynamic IP address, information for specifying a router other than the IP address is used. Specific information such as FQDN may be used as information for specifying a router other than the IP address. Therefore, specific information such as FQDN is included in the construction information packet. When authentication is performed in the aggressive mode, the IP address may be a dynamic IP. If authentication is performed in the aggressive mode and the information for specifying the router is an IP address, the specific information such as FQDN may not be included in the construction information packet.

[変形例4]
本実施形態のルータ2によれば、S36において通信速度が閾値未満であると判断された場合、またはS37において処理速度が、閾値未満であると判断された場合に、S1において構築されたVPNを介してリアルタイムパケットの暗号化通信を行い、S32、またはS41において構築されたVPNを介してリアルタイムパケット以外の暗号化通信を行うと判断したが、これに限られない。すなわち、S36において通信速度が閾値未満であると判断された場合、またはS37において処理速度が、閾値未満であると判断された場合に、S1において構築されたVPNを介してTCPに従うデータの暗号化通信を行い、S32、またはS41において構築されたVPNを介してTCP以外のプロトコルに従うデータの暗号化通信を行うと判断してもよい。この場合、TCPが、本発明の所定のプロトコルの一例である。同様に、S1において構築されたVPNを介してリアルタイムパケット以外のプロトコルに従うデータの暗号化通信を行い、S32、またはS41において構築されたVPNを介してリアルタイムパケットのプロトコルに従うデータの暗号化通信を行うと判断してもよい。S1において構築されたVPNを介して所定のプロトコルの暗号化通信を行い、S32、またはS41において構築されたVPNを介して所定のプロトコル以外の暗号化通信を行うと判断してもよい。
[Modification 4]
According to the router 2 of the present embodiment, when the communication speed is determined to be less than the threshold value in S36, or when the processing speed is determined to be less than the threshold value in S37, the VPN constructed in S1 is determined. It is determined that the encrypted communication of the real-time packet is performed via the VPN and the encrypted communication other than the real-time packet is performed via the VPN constructed in S32 or S41. That is, if it is determined in S36 that the communication speed is less than the threshold value, or if it is determined in S37 that the processing speed is less than the threshold value, data encryption according to TCP is performed via the VPN constructed in S1. Communication may be performed, and it may be determined that encrypted communication of data according to a protocol other than TCP is performed via the VPN constructed in S32 or S41. In this case, TCP is an example of a predetermined protocol of the present invention. Similarly, encrypted communication according to a protocol other than the real-time packet is performed via the VPN constructed in S1, and encrypted communication according to the protocol of the real-time packet is performed via the VPN constructed in S32 or S41. You may judge. It may be determined that encrypted communication of a predetermined protocol is performed via the VPN constructed in S1, and encrypted communication other than the predetermined protocol is performed via the VPN constructed in S32 or S41.

[変形例5]
本実施形態では、ルータ6の処理負荷に占める割合のうち、ルータ2とルータ3との暗号化通信による処理負荷の次に大きい処理負荷の原因となる暗号化通信を実行するルータ4とルータ5とが切替対象とされたが、これに限られず、ルータ6を介して暗号化通信する2つのルータが切替対象とされてもよい。
[Modification 5]
In the present embodiment, of the ratio of the processing load of the router 6 to the router 6, the router 4 and the router 5 that execute the encrypted communication that causes the processing load next to the processing load due to the encrypted communication between the router 2 and the router 3. However, the present invention is not limited to this, and two routers that perform encrypted communication via the router 6 may be the switching target.

[変形例6]
S36の処理において時刻T5から時刻T0を引いた時間で定義される通信速度が閾値以上か否かが判定してもよい。時刻T5から時刻T0を引いた時間は、ルータ3との間でVPNを介した暗号化通信するのに必要な通信速度を定義する。この通信速度が閾値以上であれば、S38に処理を移行する。通信速度が閾値未満と判断するとS40に処理を移行する。
[Modification 6]
It may be determined whether or not the communication speed defined by the time obtained by subtracting the time T0 from the time T5 in the process of S36 is equal to or higher than a threshold value. The time obtained by subtracting the time T0 from the time T5 defines a communication speed necessary for encrypted communication with the router 3 via the VPN. If this communication speed is equal to or higher than the threshold, the process proceeds to S38. If it is determined that the communication speed is less than the threshold, the process proceeds to S40.

1 暗号化通信システム
2〜6 ルータ
11 CPU
12 フラッシュメモリ
21、31、41、51 IP電話機
22、32、42、52 PC
1 Encrypted Communication System 2-6 Router 11 CPU
12 Flash memory 21, 31, 41, 51 IP phone 22, 32, 42, 52 PC

Claims (10)

暗号化通信を中継する中継装置に接続され、通信相手の通信装置と前記中継装置を介して通信可能な通信装置であって、
前記中継装置とVPNを構築する第1構築手段と、
前記第1構築手段により構築されたVPN、および前記中継装置を介して前記通信相手の通信装置と暗号化通信する第1暗号化通信手段と、
前記中継装置の処理負荷が閾値よりも大きくなった場合、前記通信相手の通信装置と前記中継装置を中継せずに暗号化通信させる要求である第1要求通知と、前記通信相手の通信装置とVPNを構築するための構築情報とを前記中継装置から受信する受信手段と、
前記受信手段により前記第1要求通知を受信した場合、前記構築情報に基づき、前記通信相手の通信装置とVPNを構築する第2構築手段と、
前記第2構築手段により構築されたVPNを介してデータが暗号化通信されるのに必要な通信速度が閾値以上か否かを判断する判断手段と、
前記判断手段により必要な通信速度が閾値未満と判断された場合、前記第2構築手段により構築されたVPNを介して所定のプロトコル以外のデータを前記通信相手の通信装置と暗号化通信する第2暗号化通信手段と、を備え、
前記判断手段により必要な通信速度が閾値未満と判断された場合、前記第1暗号化通信手段は、前記所定のプロトコルのデータを暗号化通信すること
を特徴とする通信装置。
A communication device connected to a relay device that relays encrypted communication and capable of communicating with the communication device of a communication partner via the relay device,
First construction means for constructing a VPN with the relay device;
VPN constructed by the first construction means, and first encrypted communication means for performing encrypted communication with the communication apparatus of the communication partner via the relay device;
When the processing load of the relay device becomes greater than a threshold, a first request notification that is a request for encrypted communication without relaying the communication device with the communication partner and the communication device with the communication partner; Receiving means for receiving construction information for constructing a VPN from the relay device;
When receiving the first request notification by the receiving means, based on the construction information, a second construction means for constructing a VPN with the communication partner communication device;
Determining means for determining whether or not a communication speed required for data to be encrypted and communicated via the VPN constructed by the second construction means is equal to or higher than a threshold;
When the determination unit determines that the required communication speed is less than the threshold, the second communication unit performs encrypted communication with data other than the predetermined protocol via the VPN constructed by the second construction unit. An encrypted communication means,
The communication apparatus, wherein the first encryption communication unit performs encrypted communication of the data of the predetermined protocol when the determination unit determines that a necessary communication speed is less than a threshold value.
前記判断手段は、前記第2構築手段により構築されたVPNを介して暗号化通信されるデータを暗号化、または復号する処理の処理速度を含む前記必要な通信速度が前記閾値以上か否かを判断すること
を特徴とする請求項1記載の中継装置。
The determination means determines whether or not the required communication speed including a processing speed of a process of encrypting or decrypting data encrypted and transmitted via the VPN constructed by the second construction means is equal to or higher than the threshold value. The relay apparatus according to claim 1, wherein the determination is made.
前記判断手段は、前記第2構築手段により構築されたVPNを介して前記通信相手の通信装置に送信されたデータが前記通信相手の通信装置において受信された時間情報を前記通信相手の通信装置から受信し、前記時間情報に基づき、前記必要な通信速度が前記閾値以上か否かを判断すること
を特徴とする請求項2記載の中継装置
The determination means obtains time information from the communication partner communication apparatus when the data transmitted to the communication partner communication apparatus via the VPN constructed by the second construction means is received by the communication partner communication apparatus. The relay apparatus according to claim 2, wherein the relay apparatus determines whether the necessary communication speed is equal to or higher than the threshold based on the received time information.
前記受信手段が、全プロトコルの暗号化データを前記第2構築手段により構築されるVPNを介して暗号化通信させる指示である強制切替指示を含む前記第1要求通知を受信し、前記判断手段により、前記必要な通信速度が閾値未満と判断された場合、
前記第2構築手段により構築されたVPNの暗号化強度よりも暗号化強度が低下するVPNを前記第2構築手段は前記通信相手の通信装置と再度構築し、
前記第2暗号化通信手段は、全プロトコルのデータを前記第2構築手段により再度構築されたVPNを介して暗号化通信すること
を特徴とする請求項3記載の通信装置。
The receiving means receives the first request notification including a forced switching instruction that is an instruction to perform encrypted communication of encrypted data of all protocols via the VPN constructed by the second construction means, and the judgment means When it is determined that the required communication speed is less than the threshold value,
The second construction unit reconstructs a VPN whose encryption strength is lower than the encryption strength of the VPN constructed by the second construction unit, with the communication device of the communication partner,
4. The communication apparatus according to claim 3, wherein the second encrypted communication means performs encrypted communication of data of all protocols via the VPN reconstructed by the second construction means.
前記判断手段により前記必要な通信速度が閾値未満と判断された場合、前記第1暗号化通信手段は前記所定のプロトコルとしてリアルタイムプロトコルのデータを暗号化通信し、前記第2暗号化通信手段は、前記所定のプロトコル以外のデータとしてリアルタイムプロトコル以外のデータを暗号化通信すること
を特徴とする請求項1〜4のいずれか記載の通信装置。
When the determination means determines that the required communication speed is less than a threshold value, the first encrypted communication means performs encrypted communication of real-time protocol data as the predetermined protocol, and the second encrypted communication means includes: The communication apparatus according to claim 1, wherein data other than the real-time protocol is encrypted and communicated as data other than the predetermined protocol.
前記第2暗号化通信手段により暗号化通信されるデータのデータ量を検出する検出手段を備え、
前記第1要求通知が受信された後に、前記受信手段が、全プロトコルのデータを前記第1暗号化通信手段により暗号化通信させる要求である第2要求通知を前記中継装置から受信した場合、前記検出手段は、前記第2要求通知が受信される前の受信前データ量と、前記第2要求通知が受信された後の受信後データ量とを検出し、
前記検出手段により検出された前記受信後データ量が前記受信前データ量よりも小さくなった場合に、前記第1暗号化通信手段は全プロトコルのデータを暗号化通信することを特徴とする請求項1〜5のいずれか記載の通信装置。
Detecting means for detecting a data amount of data encrypted by the second encrypted communication means;
After the first request notification is received, when the receiving unit receives a second request notification from the relay device that is a request for encrypted communication of data of all protocols by the first encrypted communication unit, The detection means detects a data amount before reception before the second request notification is received and a data amount after reception after the second request notification is received,
The first encrypted communication unit performs encrypted communication of data of all protocols when the amount of data after reception detected by the detection unit becomes smaller than the amount of data before reception. The communication device according to any one of 1 to 5.
暗号化通信を中継する中継装置に接続され、通信相手の通信装置と前記中継装置を介して通信可能な通信装置のコンピュータに、
前記中継装置とVPNを構築する第1構築ステップと、
前記第1構築ステップにより構築されたVPN、および前記中継装置を介して前記通信相手の通信装置と暗号化通信する第1暗号化通信ステップと、
前記中継装置の処理負荷が閾値よりも大きくなった場合、前記通信相手の通信装置と前記中継装置を中継せずに暗号化通信させる要求である第1要求通知と、前記通信相手の通信装置とVPNを構築するための構築情報とを前記中継装置から受信する受信ステップと、
前記受信ステップにより前記第1要求通知を受信した場合、前記構築情報に基づき、前記通信相手の通信装置とVPNを構築する第2構築ステップと、
前記第2構築ステップにより構築されたVPNを介してデータが暗号化通信されるのに必要な通信速度が閾値以上か否かを判断する判断ステップと、
前記判断ステップにより必要な通信速度が閾値未満と判断された場合、前記第2構築手段により構築されたVPNを介して所定のプロトコル以外のデータを前記通信相手の通信装置と暗号化通信する第2暗号化通信ステップと、を実行させ、
前記判断ステップにより必要な通信速度が閾値未満と判断された場合、前記第1暗号化通信ステップは、前記所定のプロトコルのデータを暗号化通信すること
を特徴とするプログラム。
A computer connected to a relay device that relays encrypted communication and capable of communicating with the communication device of the communication partner via the relay device,
A first construction step of constructing a VPN with the relay device;
A VPN constructed in the first construction step, and a first encrypted communication step for performing encrypted communication with the communication device of the communication partner via the relay device;
When the processing load of the relay device becomes greater than a threshold, a first request notification that is a request for encrypted communication without relaying the communication device with the communication partner and the communication device with the communication partner; A receiving step of receiving construction information for constructing a VPN from the relay device;
A second construction step of constructing a VPN with the communication apparatus of the communication partner based on the construction information when the first request notification is received in the reception step;
A determination step of determining whether or not a communication speed required for data to be encrypted and communicated via the VPN constructed in the second construction step is equal to or higher than a threshold;
When it is determined in the determination step that the necessary communication speed is less than the threshold value, the second communication unit performs encrypted communication of data other than a predetermined protocol with the communication apparatus of the communication partner via the VPN established by the second construction unit. An encrypted communication step, and
The program according to claim 1, wherein when the necessary communication speed is determined to be less than the threshold value, the first encrypted communication step performs encrypted communication of the data of the predetermined protocol.
暗号化通信を中継する中継装置に接続され、通信相手の通信装置と前記中継装置を介して通信可能な通信装置の方法であって、
前記中継装置とVPNを構築する第1構築ステップと、
前記第1構築ステップにより構築されたVPN、および前記中継装置を介して前記通信相手の通信装置と暗号化通信する第1暗号化通信ステップと、
前記中継装置の処理負荷が閾値よりも大きくなった場合、前記通信相手の通信装置と前記中継装置を中継せずに暗号化通信させる要求である第1要求通知と、前記通信相手の通信装置とVPNを構築するための構築情報とを前記中継装置から受信する受信ステップと、
前記受信ステップにより前記第1要求通知を受信した場合、前記構築情報に基づき、前記通信相手の通信装置とVPNを構築する第2構築ステップと、
前記第2構築ステップにより構築されたVPNを介してデータが暗号化通信されるのに必要な通信速度が閾値以上か否かを判断する判断ステップと、
前記判断ステップにより必要な通信速度が閾値未満と判断された場合、前記第2構築手段により構築されたVPNを介して所定のプロトコル以外のデータを前記通信相手の通信装置と暗号化通信する第2暗号化通信ステップと、を備え、
前記判断ステップにより必要な通信速度が閾値未満と判断された場合、前記第1暗号化通信ステップは、前記所定のプロトコルのデータを暗号化通信すること
を特徴とする暗号化通信方法。
A method of a communication device connected to a relay device that relays encrypted communication and capable of communicating with the communication device of a communication partner via the relay device,
A first construction step of constructing a VPN with the relay device;
A VPN constructed in the first construction step, and a first encrypted communication step for performing encrypted communication with the communication device of the communication partner via the relay device;
When the processing load of the relay device becomes greater than a threshold, a first request notification that is a request for encrypted communication without relaying the communication device with the communication partner and the communication device with the communication partner; A receiving step of receiving construction information for constructing a VPN from the relay device;
A second construction step of constructing a VPN with the communication apparatus of the communication partner based on the construction information when the first request notification is received in the reception step;
A determination step of determining whether or not a communication speed required for data to be encrypted and communicated via the VPN constructed in the second construction step is equal to or higher than a threshold;
When it is determined in the determination step that the necessary communication speed is less than the threshold value, the second communication unit performs encrypted communication of data other than a predetermined protocol with the communication apparatus of the communication partner via the VPN established by the second construction unit. An encrypted communication step,
An encryption communication method characterized in that, when it is determined in the determination step that a necessary communication speed is less than a threshold value, the first encryption communication step performs encrypted communication of data of the predetermined protocol.
通信装置と、その通信装置および通信相手の通信装置の間の暗号化通信を中継する中継装置とを備える暗号化通信システムであって、
前記通信装置は、
前記中継装置とVPNを構築する第1構築手段と、
前記第1構築手段により構築されたVPN、および前記中継装置を介して前記通信相手の通信装置と暗号化通信する第1暗号化通信手段と、
前記中継装置の処理負荷が閾値よりも大きくなった場合、前記通信相手の通信装置と前記中継装置を中継せずに暗号化通信させる要求である第1要求通知と、前記通信相手の通信装置とVPNを構築するための構築情報とを前記中継装置から受信する受信手段と、
前記受信手段により前記第1要求通知を受信した場合、前記構築情報に基づき、前記通信相手の通信装置とVPNを構築する第2構築手段と、
前記第2構築手段により構築されたVPNを介してデータが暗号化通信されるのに必要な通信速度が閾値以上か否かを判断する判断手段と、
前記判断手段により必要な通信速度が閾値未満と判断された場合、前記第2構築手段により構築されたVPNを介して所定のプロトコル以外のデータを前記通信相手の通信装置と暗号化通信する第2暗号化通信手段と、
前記中継装置は、
暗号化データを復号する処理、およびデータを暗号化する処理の変換処理負荷を含む処理負荷を検出する中継装置検出手段と、
前記中継装置検出手段により検出された処理負荷が閾値以上か否かを判断する中継装置判断手段と、
前記中継装置判断手段により処理負荷が閾値以上と判断された場合、前記通信装置に前記第1要求通知と前記第1構築情報とを送信する中継装置送信手段と、
を備え、
前記判断手段により必要な通信速度が閾値未満と判断された場合、前記第1暗号化通信手段は、前記所定のプロトコルのデータを暗号化通信し、
前記中継装置送信手段により前記第1要求通知を前記通信装置に送信した後に、前記中継装置判断手段は、前記処理負荷が閾値以上か否かを再度判断し、
前記中継装置判断手段により、前記処理負荷が閾値以上と再度判断された場合、前記中継装置送信手段は、前記通信装置と前記通信相手の通信装置との間の暗号化通信以外の暗号化通信を実行する第1対の別の通信装置のうちの少なくともいずれか一方の別の通信装置に、通信相手の別の通信装置と前記中継装置を中継せずに暗号化通信させる要求である第3要求通知と、前記通信相手の別の通信装置とVPNを構築するための第2構築情報とを送信すること
を特徴とする暗号化通信システム。
An encryption communication system comprising a communication device and a relay device that relays encrypted communication between the communication device and a communication device of a communication partner,
The communication device
First construction means for constructing a VPN with the relay device;
VPN constructed by the first construction means, and first encrypted communication means for performing encrypted communication with the communication apparatus of the communication partner via the relay device;
When the processing load of the relay device becomes greater than a threshold, a first request notification that is a request for encrypted communication without relaying the communication device with the communication partner and the communication device with the communication partner; Receiving means for receiving construction information for constructing a VPN from the relay device;
When receiving the first request notification by the receiving means, based on the construction information, a second construction means for constructing a VPN with the communication partner communication device;
Determining means for determining whether or not a communication speed required for data to be encrypted and communicated via the VPN constructed by the second construction means is equal to or higher than a threshold;
When the determination unit determines that the required communication speed is less than the threshold, the second communication unit performs encrypted communication with data other than the predetermined protocol via the VPN constructed by the second construction unit. Encrypted communication means;
The relay device is
A relay device detecting means for detecting a processing load including a conversion processing load of a process of decrypting encrypted data and a process of encrypting data;
Relay device determining means for determining whether the processing load detected by the relay device detecting means is equal to or greater than a threshold;
A relay device transmitting means for transmitting the first request notification and the first construction information to the communication device when the processing load is determined by the relay device determining means to be equal to or greater than a threshold;
With
When the determination means determines that the required communication speed is less than the threshold, the first encrypted communication means performs encrypted communication of the data of the predetermined protocol,
After the first request notification is transmitted to the communication device by the relay device transmission unit, the relay device determination unit determines again whether the processing load is equal to or greater than a threshold value,
When the relay device determining means determines again that the processing load is equal to or greater than the threshold value, the relay device transmitting means performs encrypted communication other than encrypted communication between the communication device and the communication device of the communication partner. A third request which is a request for causing at least one other communication device of the first pair of other communication devices to execute encrypted communication without relaying another communication device of the communication partner and the relay device. An encrypted communication system, characterized by transmitting a notification and second construction information for constructing a VPN with another communication device of the communication partner.
前記中継装置検出手段は、データを復号する処理、およびデータを暗号化する処理の変換処理負荷のうち、前記通信装置、および前記通信相手の通信装置の暗号化通信に起因する処理負荷の次に割合が大きい処理負荷の原因となる暗号化通信を実行する第2対の別の通信装置を特定する特定手段を備え、
前記中継装置送信手段は、前記特定手段により特定された第2対の別の通信装置を前記第1対の別の通信装置として、前記第3要求通知と、前記第2構築情報とを前記第2対の別の通信装置の少なくとも何れか一方の別の通信装置に送信すること
を特徴とする請求項9記載の暗号化通信システム。
The relay device detection means includes a processing load resulting from encrypted communication of the communication device and the communication device of the communication partner, out of a conversion processing load of a process of decrypting data and a process of encrypting data. A specifying unit that specifies another communication device of the second pair that executes encrypted communication that causes a large processing load;
The relay device transmitting means uses the second pair of other communication devices specified by the specifying means as the first pair of other communication devices, and sends the third request notification and the second construction information to the first pair. The encrypted communication system according to claim 9, wherein the communication is transmitted to at least one of the two pairs of other communication devices.
JP2012079221A 2012-03-30 2012-03-30 Communication device, encryption communication system, encryption communication program, and encryption communication method Pending JP2013211633A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012079221A JP2013211633A (en) 2012-03-30 2012-03-30 Communication device, encryption communication system, encryption communication program, and encryption communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012079221A JP2013211633A (en) 2012-03-30 2012-03-30 Communication device, encryption communication system, encryption communication program, and encryption communication method

Publications (1)

Publication Number Publication Date
JP2013211633A true JP2013211633A (en) 2013-10-10

Family

ID=49529126

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012079221A Pending JP2013211633A (en) 2012-03-30 2012-03-30 Communication device, encryption communication system, encryption communication program, and encryption communication method

Country Status (1)

Country Link
JP (1) JP2013211633A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001060966A (en) * 1999-08-23 2001-03-06 Nippon Telegr & Teleph Corp <Ntt> Data transferring device, network using it and data communication method
JP2004140482A (en) * 2002-10-16 2004-05-13 Fujitsu Ltd Node apparatus performing encryption communication, and encryption communication system and method
JP2010220038A (en) * 2009-03-18 2010-09-30 Oki Networks Co Ltd Gateway apparatus
JP2011176395A (en) * 2010-02-23 2011-09-08 Nippon Telegr & Teleph Corp <Ntt> IPsec COMMUNICATION METHOD AND IPsec COMMUNICATION SYSTEM
US20130003536A1 (en) * 2007-10-31 2013-01-03 Ghani Abbas Networks having multiple paths between nodes and nodes for such a network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001060966A (en) * 1999-08-23 2001-03-06 Nippon Telegr & Teleph Corp <Ntt> Data transferring device, network using it and data communication method
JP2004140482A (en) * 2002-10-16 2004-05-13 Fujitsu Ltd Node apparatus performing encryption communication, and encryption communication system and method
US20130003536A1 (en) * 2007-10-31 2013-01-03 Ghani Abbas Networks having multiple paths between nodes and nodes for such a network
JP2010220038A (en) * 2009-03-18 2010-09-30 Oki Networks Co Ltd Gateway apparatus
JP2011176395A (en) * 2010-02-23 2011-09-08 Nippon Telegr & Teleph Corp <Ntt> IPsec COMMUNICATION METHOD AND IPsec COMMUNICATION SYSTEM

Similar Documents

Publication Publication Date Title
US10601594B2 (en) End-to-end service layer authentication
US20230070104A1 (en) Secure connections establishment
TWI672933B (en) User-plane security for next generation cellular networks
US20200015087A1 (en) Reduced bandwidth handshake communication
US11736304B2 (en) Secure authentication of remote equipment
US20170201382A1 (en) Secure Endpoint Devices
CN111726366A (en) Device communication method, device, system, medium and electronic device
WO2019129201A1 (en) Session management for communications between a device and a dtls server
US11388145B2 (en) Tunneling data traffic and signaling over secure etls over wireless local area networks
JP2016526844A (en) Key establishment for constrained resource devices
US20220263811A1 (en) Methods and Systems for Internet Key Exchange Re-Authentication Optimization
CN109040059B (en) Protected TCP communication method, communication device and storage medium
WO2021063304A1 (en) Communication authentication method and related device
WO2019076000A1 (en) Method and device for identifying encrypted data stream, storage medium, and system
US20180176230A1 (en) Data packet transmission method, apparatus, and system, and node device
JP2013077957A (en) Relay device, encryption communication system, encryption communication program, and encryption communication method
CN108259157B (en) Identity authentication method and network equipment in IKE negotiation
WO2018098630A1 (en) X2 service transmission method, and network apparatus
KR101329968B1 (en) Method and system for determining security policy among ipsec vpn devices
JP2013211633A (en) Communication device, encryption communication system, encryption communication program, and encryption communication method
CN111556084B (en) Communication method, device, system, medium and electronic equipment among VPN (virtual private network) devices
WO2014100967A1 (en) Method, apparatus, device and system for ipsec negotiation
JP2013197907A (en) Communication apparatus, encryption communication program, and encryption communication method
CN114760093A (en) Communication method and device
KR20190074912A (en) End-to-end security communication method based on mac protocol using software defined-networking, and communication controller and computer program for the same

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140314

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150119

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150128

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150602