JP2006279938A - Decryption apparatus for use in encrypted communication - Google Patents

Decryption apparatus for use in encrypted communication Download PDF

Info

Publication number
JP2006279938A
JP2006279938A JP2006044398A JP2006044398A JP2006279938A JP 2006279938 A JP2006279938 A JP 2006279938A JP 2006044398 A JP2006044398 A JP 2006044398A JP 2006044398 A JP2006044398 A JP 2006044398A JP 2006279938 A JP2006279938 A JP 2006279938A
Authority
JP
Japan
Prior art keywords
packet
key
communication
encryption
unit
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
JP2006044398A
Other languages
Japanese (ja)
Inventor
Masao Akimoto
正夫 秋元
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP2006044398A priority Critical patent/JP2006279938A/en
Publication of JP2006279938A publication Critical patent/JP2006279938A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To maintain a security level of existent encrypted communication by monitoring encrypted communication data using an existent monitoring device. <P>SOLUTION: A decryption apparatus 3 for use in encrypted communication stores first key information for decrypting a packet transmitted from a terminal 1 and encrypting a packet destined to the terminal 1, second key information for decrypting a packet transmitted from a terminal 2 and encrypting a packet destined to the terminal 2, and an encryption algorithm. When a packet is received from the terminal 1, it is decrypted using the first key information according to the encryption algorithm, and the decrypted packet is encrypted using the second key information and transmitted to the terminal 2. When a packet is received from the terminal 2, the packet is decrypted using the second key information according to the encryption algorithm, and the decrypted packet is encrypted using the first key information and transmitted to the terminal 1. When relaying a packet, a decrypted packet is shaped to be processible by a monitoring device 4 and outputted to the monitoring device 4. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、例えばIP(Internet Protocol)を利用した通信システムにおいて、通信データの盗聴や改ざんを防ぐために、パケットを暗号化すると共に認証データによって送受信間で認証処理を行う暗号通信復号装置に関し、特に、通信データのセキュリティを高めた通信において、ウィルスやワーム等の不正プログラムや、不正侵入、情報漏洩等を検知又は防止するために、通信内容を監視する暗号通信復号装置に関する。   The present invention relates to an encryption communication decryption apparatus that encrypts a packet and performs authentication processing between transmission and reception using authentication data in order to prevent tapping and tampering of communication data in a communication system using, for example, IP (Internet Protocol). The present invention relates to an encryption communication decryption apparatus that monitors communication contents in order to detect or prevent unauthorized programs such as viruses and worms, unauthorized intrusion, information leakage, and the like in communications with enhanced security of communication data.

従来より、ウィルス、ワームなどの不正プログラムや、不正侵入、情報漏洩等を検知又は防止するために、通信データの監視及び制御を行う通信監視システムとして、不正侵入検出システム(IDS:Intrusion Detection System)、不正侵入防御システム(IPS:Intrusion Protection System)、ウィルスウォール、コンテンツフイルタ等を採用したものが知られている。   Conventionally, an intrusion detection system (IDS) has been used as a communication monitoring system for monitoring and controlling communication data in order to detect or prevent unauthorized programs such as viruses and worms, unauthorized intrusion, and information leakage. Those employing an intrusion protection system (IPS), a virus wall, a content filter, and the like are known.

これらのセキュリティ技術のうち、暗号通信プロトコルの1つであるSSL(Secure Sockets Layer)に対応した製品として、例えばWebwasher SSL Scannerや下記の特許文献1に記載された技術が知られている。この製品で採用している技術は、SSL通信の経路上に接続し、SSL通信を内部的に終端することによってアプリケーションデータを復号し、検証した上で中継する装置である。
特開平10−93557号公報
Among these security technologies, as a product corresponding to SSL (Secure Sockets Layer) which is one of encryption communication protocols, for example, Webwasher SSL Scanner and the technology described in Patent Document 1 below are known. The technology used in this product is a device that connects on the SSL communication path, internally terminates the SSL communication, decrypts the application data, and relays it after verifying it.
JP-A-10-93557

しかしながら、前記従来の技術では、暗号化された通信データであっても復号して監視し、通信データの異常を判定することができるが、通信データの監視装置と復号装置とが一体化して構成されているために、既存の不正侵入監視システムを再利用することができないという問題点がある。したがって、上述した技術では、既存のIPSやIDSが存在し、暗号化された通信データを追加して監視させようとする場合に、既存のIPSやIDSに代えて、新たな復号装置と監視装置とを導入する必要があった。   However, in the conventional technique, even encrypted communication data can be decrypted and monitored to determine whether the communication data is abnormal. However, the communication data monitoring device and the decryption device are integrated. Therefore, there is a problem that the existing intrusion monitoring system cannot be reused. Therefore, in the above-described technique, when there is an existing IPS or IDS and it is intended to add and monitor encrypted communication data, a new decryption device and a monitoring device are used instead of the existing IPS and IDS. And had to be introduced.

また、特許文献1に記載された通信監査装置では、復号してパケットの内容を監視させるものの、監視するために復号したパケットを再暗号化して中継しておらず、既存の暗号通信におけるセキュリティ・レベルが保持されているとは言えないものであった。   The communication inspection device described in Patent Document 1 decrypts and monitors the content of the packet, but does not re-encrypt and relay the decrypted packet for monitoring. It could not be said that the level was maintained.

そこで、本発明は、上述した実情に鑑みて提案されたものであり、既存の通信データの監視装置を使用して、暗号化された通信データの監視を可能とさせ、既存の暗号通信のセキュリティ・レベルを保持することができる暗号通信復号装置等を提供することを目的とする。   Therefore, the present invention has been proposed in view of the above-described circumstances, and enables encrypted communication data to be monitored by using an existing communication data monitoring device, thereby protecting the existing encrypted communication security. An object of the present invention is to provide an encryption / decryption device that can maintain a level.

本発明に係る暗号通信復号装置は、第1の通信装置と第2の通信装置との間に設けられ、第1の通信装置と第2の通信装置との間で暗号化したパケットを送受信し、当該送受信されるパケットの通信内容を監視装置に監視させるものである。   An encryption communication decryption device according to the present invention is provided between a first communication device and a second communication device, and transmits and receives encrypted packets between the first communication device and the second communication device. The monitoring device monitors the communication contents of the transmitted and received packets.

この暗号通信復号装置は、第1の通信装置から送信されたパケットを復号すると共に第1の通信装置宛のパケットを暗号化する第1の鍵情報と、第2の通信装置から送信されたパケットを復号すると共に第2の通信装置宛のパケットを暗号化する第2の鍵情報と、当該第1の鍵情報又は第2の鍵情報を用いた暗号化アルゴリズムとを記憶手段に記憶させておく。そして、第1の通信装置からパケットを受信した場合には、中継手段によって、暗号化アルゴリズムに従って、当該パケットを第1の鍵情報を用いて復号し、当該復号したパケットを第2の鍵情報を用いて暗号化して第2の通信装置に送信する。また、第2の通信装置からパケットを受信した場合には、中継手段によって、暗号化アルゴリズムに従って、当該パケットを第2の鍵情報を用いて復号し、当該復号したパケットを第1の鍵情報を用いて暗号化して第1の通信装置に送信する。   The encryption communication decryption device decrypts a packet transmitted from the first communication device and encrypts a packet addressed to the first communication device, and a packet transmitted from the second communication device. And the second key information for encrypting the packet addressed to the second communication device and the first key information or the encryption algorithm using the second key information are stored in the storage means. . When the packet is received from the first communication device, the relay unit decrypts the packet using the first key information according to the encryption algorithm, and the decrypted packet is converted into the second key information. And encrypted and transmitted to the second communication device. In addition, when a packet is received from the second communication device, the relay unit decrypts the packet using the second key information according to the encryption algorithm, and the decrypted packet is converted into the first key information. And encrypted and transmitted to the first communication device.

このような暗号通信復号装置は、中継手段によってパケットの中継を行うときに、出力手段により、中継手段によって復号されたパケットを、監視装置で処理可能な形態に整形して監視装置に出力させ、監視装置に通信内容を監視させることにより、上述の課題を解決する。   Such a cryptographic communication decryption device, when relaying a packet by the relay means, causes the output means to shape the packet decrypted by the relay means into a form that can be processed by the monitoring device, and output the packet to the monitoring device. By causing the monitoring device to monitor the communication contents, the above-described problems are solved.

また、本発明に係る他の暗号通信復号装置は、第1の通信装置と第2の通信装置との間で暗号化されて送受信されているパケットを、第1の通信装置と第2の通信装置との通信経路上に設けられている中継装置を介して傍受し、当該パケットの通信内容を監視装置に監視させるものである。   In addition, another encryption communication decryption device according to the present invention transmits a packet transmitted and received encrypted between the first communication device and the second communication device to the first communication device and the second communication. Interception is performed via a relay device provided on the communication path with the device, and the communication content of the packet is monitored by the monitoring device.

この暗号通信復号装置は、第1の通信装置から第2の通信装置に送信されるパケットを復号する第1の鍵情報と、第2の通信装置から第1の通信装置に送信されるパケットを復号する第2の鍵情報と、当該第1の鍵情報又は第2の鍵情報を用いた暗号化アルゴリズムとを記憶手段に記憶させておく。そして、第1の通信装置からパケットを受信した場合には、復号手段によって、暗号化アルゴリズムに従って、当該パケットを第1の鍵情報を用いて復号する。また、第2の通信装置からパケットを受信した場合には、復号手段によって、暗号化アルゴリズムに従って、当該パケットを第2の鍵情報を用いて復号する。   The encrypted communication decryption device includes first key information for decrypting a packet transmitted from the first communication device to the second communication device, and a packet transmitted from the second communication device to the first communication device. The second key information to be decrypted and the encryption algorithm using the first key information or the second key information are stored in the storage means. When a packet is received from the first communication device, the packet is decrypted by the decrypting means using the first key information according to the encryption algorithm. Further, when a packet is received from the second communication device, the packet is decrypted by the decrypting means using the second key information according to the encryption algorithm.

このような暗号通信復号装置は、出力手段により、復号手段によって復号したパケットを、監視装置で処理可能な形態に整形して監視装置に出力させ、監視装置に通信内容を監視させることにより、上述の課題を解決する。   In such an encryption communication decryption device, the output unit shapes the packet decrypted by the decryption unit into a form that can be processed by the monitoring device, outputs the packet to the monitoring device, and causes the monitoring device to monitor the communication content. Solve the problem.

本発明に係る暗号通信復号装置によれば、暗号通信を復号させるために必要な情報として、鍵情報と暗号化アルゴリズムとを記憶させておき、復号したパケットを、監視装置で処理可能な形態に整形して監視装置で通信内容を監視させることができる。したがって、この暗号通信復号装置によれば、通信内容が暗号化されている場合であっても、通信内容を監視させることができ、既存の平文のみを解析可能な監視装置を使用することができる。また、この暗号通信復号装置によれば、復号したパケットを第1の通信装置又は第2の通信装置に送信させることなく通信内容の監視を行わせるので、既存の暗号通信のセキュリティ・レベルを保持することができる。   According to the encryption communication decryption apparatus of the present invention, key information and an encryption algorithm are stored as information necessary for decrypting encryption communication, and the decrypted packet is processed into a form that can be processed by the monitoring apparatus. The communication content can be monitored by the monitoring device after shaping. Therefore, according to this encrypted communication decryption device, even if the communication content is encrypted, the communication content can be monitored, and a monitoring device that can analyze only the existing plaintext can be used. . Also, according to this encryption communication decryption apparatus, the communication contents are monitored without transmitting the decrypted packet to the first communication apparatus or the second communication apparatus, so that the security level of the existing encryption communication is maintained. can do.

以下、本発明を適用した第1実施形態〜第3実施形態について図面を参照して説明する。   Hereinafter, first to third embodiments to which the present invention is applied will be described with reference to the drawings.

[第1実施形態]
本発明を適用した第1実施形態に係る通信システムは、暗号通信の経路上に暗号通信復号装置を接続し、当該暗号通信経路上に流れる通信データを取得して中継するものである。この通信システムは、暗号通信復号装置によって通信データを中継するに際して、暗号化された通信データを復号し、当該復号した通信データを監視側で処理可能なデータ形態に整形した上で、正当な通信データか否かを監視させる。そして、通信データの監視によって、正当な通信データであると判定された場合には、暗号通信復号装置により、復号した通信データを再暗号化してデータ送信先に送信する。これによって、暗号化通信を行う通信装置間の暗号通信経路上において、ウィルス、ワームなどの不正プログラムや、不正侵入、情報漏洩が発生していないかの監視を行う。
[First Embodiment]
The communication system according to the first embodiment to which the present invention is applied connects a cryptographic communication decryption apparatus on a cryptographic communication path, and acquires and relays communication data flowing on the cryptographic communication path. This communication system decrypts encrypted communication data when relaying the communication data by the encryption communication decryption device, shapes the decrypted communication data into a data form that can be processed on the monitoring side, and then performs legitimate communication. Monitor data. If the communication data is determined to be valid communication data, the encrypted communication decryption device re-encrypts the decrypted communication data and transmits it to the data transmission destination. Thus, it is monitored whether an illegal program such as a virus or a worm, an illegal intrusion, or an information leak has occurred on an encrypted communication path between communication apparatuses performing encrypted communication.

また、この通信システムでは、暗号化された通信データを復号する暗号通信復号装置によって通信データの整形を行うので、当該暗号通信復号装置と、復号した通信データの監視装置とを別個にして構成することができ、任意の監視装置であって、既存の監視装置を使用することができる。   Further, in this communication system, since the communication data is shaped by the encryption communication decryption device that decrypts the encrypted communication data, the encryption communication decryption device and the decrypted communication data monitoring device are configured separately. Any monitoring device can be used, and an existing monitoring device can be used.

更に、この通信システムは、暗号化された通信データの監視をするために復号した通信データを、暗号通信復号装置によって再度暗号化して中継することにより、暗号通信の主体となる通信装置間の暗号通信を透過的に提供する。これにより、暗号通信経路上で通信を行う通信装置にとっては既存の通信処理から設定変更を行う必要がなく、且つ既存の暗号通信のセキュリティ・レベルを維持する。   Furthermore, this communication system encrypts the communication data decrypted to monitor the encrypted communication data again by the encryption communication decryption device and relays it, thereby encrypting the encryption between the communication devices that are the subjects of the encrypted communication. Provide communication transparently. As a result, it is not necessary for the communication apparatus that performs communication on the encrypted communication path to change the setting from the existing communication process, and the security level of the existing encrypted communication is maintained.

[通信システムの構成]
この通信システムは、例えば図1に示すように、VPN(Virtual Private Network)端末1(第1の通信装置)とVPN端末2(第2の通信装置)との間で、暗号通信復号装置3を介してVPNセッションが構築される通信システムに適用される。この通信システムは、VPN端末1からネットワークNを経由してVPN端末2への通信をする際、ネットワークN上でのデータの盗聴や送信元の成りすまし等を防ぐために、VPN端末1とVPN端末2の間でIPsec(IP(Internet Protocol) security protocol)によるVPNセッションを構築することによって通信データの安全性を確保する。また、この通信システムでは、暗号通信復号装置3によって通信内容を復号してネットワーク監視装置4に出力し、ネットワーク監視装置4で通信内容の監視及び暗号通信復号装置3による中継の制御等を行うものである。
[Configuration of communication system]
In this communication system, for example, as shown in FIG. 1, an encryption communication decryption device 3 is provided between a VPN (Virtual Private Network) terminal 1 (first communication device) and a VPN terminal 2 (second communication device). The present invention is applied to a communication system in which a VPN session is established. In this communication system, when communicating from the VPN terminal 1 to the VPN terminal 2 via the network N, the VPN terminal 1 and the VPN terminal 2 are used to prevent wiretapping of data on the network N and spoofing of the transmission source. The security of communication data is ensured by establishing a VPN session by IPsec (IP (Internet Protocol) security protocol). In this communication system, the encrypted communication decryption device 3 decrypts the communication content and outputs it to the network monitoring device 4. The network monitoring device 4 monitors the communication content and controls the relay by the encrypted communication decryption device 3. It is.

この通信システムにおいて、VPN端末2、暗号通信復号装置3及びネットワーク監視装置4はIP(Internet Protocol)ベースのLAN(Local Area Network)で接続されている。また、この通信システムにおいて、ネットワークNは、例えば公衆で利用可能なIPネットワークである。   In this communication system, the VPN terminal 2, the encryption / decryption device 3 and the network monitoring device 4 are connected by an IP (Internet Protocol) based LAN (Local Area Network). In this communication system, the network N is, for example, an IP network that can be used by the public.

VPN端末1及びVPN端末2は、暗号化処理をしてパケットを送信する必要がある場合、相互間でVPNセッションを構築するため、IKE(Internet Key Exchange)に従って処理(IKE処理)を行って、通信データを暗号化及び復号するための情報である共通鍵(以下、セッション鍵と呼ぶ。)を保持する。また、VPN端末1及びVPN端末2は、ネットワーク層におけるセキュリティプロトコルであるIPsecに準拠した処理を行って、パケットを生成する。具体的には、VPN端末1及びVPN端末2は、IPsecに含まれるプロトコルのうち、セキュリティプロトコル、例えば暗号ペイロード(ESP:IP Encapsulating security Payload)を作成するESPプロトコルに従った処理(ESP処理)を行う。   The VPN terminal 1 and the VPN terminal 2 perform processing (IKE processing) according to IKE (Internet Key Exchange) in order to construct a VPN session between the VPN terminal 1 and the VPN terminal 2 when it is necessary to transmit packets after performing encryption processing. A common key (hereinafter referred to as a session key), which is information for encrypting and decrypting communication data, is held. In addition, the VPN terminal 1 and the VPN terminal 2 generate a packet by performing processing conforming to IPsec, which is a security protocol in the network layer. Specifically, the VPN terminal 1 and the VPN terminal 2 perform a process (ESP process) according to an ESP protocol that creates a security protocol, for example, an encryption payload (ESP: IP Encapsulating security Payload), among protocols included in IPsec. Do.

暗号通信復号装置3は、VPN端末1及びVPN端末2でIKE処理及びESP処理が行われているときに、VPN端末1又はVPN端末2から送信されたデータを受信する。そして、暗号通信復号装置3は、後述する所定の処理を行うことにより、VPN端末1及びVPN端末2で送受信されるパケットを中継する。更に、暗号通信復号装置3は、ESPで暗号化された通信データ(ESPパケットのペイロード部)を復号し、当該復号した通信データをネットワーク監視装置4で受信可能なデータ構造のIPパケットに整形して、ネットワーク監視装置4に出力する。   The encryption communication decryption device 3 receives data transmitted from the VPN terminal 1 or the VPN terminal 2 when the VPN terminal 1 and the VPN terminal 2 are performing the IKE process and the ESP process. And the encryption communication decoding apparatus 3 relays the packet transmitted / received by the VPN terminal 1 and the VPN terminal 2 by performing the predetermined process mentioned later. Furthermore, the encryption communication decryption device 3 decrypts the communication data (the payload portion of the ESP packet) encrypted by ESP, and shapes the decrypted communication data into an IP packet having a data structure that can be received by the network monitoring device 4. Output to the network monitoring device 4.

ネットワーク監視装置4は、暗号通信復号装置3によってESPパケットが復号されて整形されたIPパケットを受信すると、当該IPパケットの内容を解析する。ここで、ネットワーク監視装置4は、例えばウィルス又はワームを含むか否かの解析処理等を行うことによって、VPN端末1とVPN端末2との間で伝送されている通信データが正当なものであるか、不当なものであるかの解析を行う。そして、ネットワーク監視装置4は、不適当な通信データであると判定した場合には、ネットワーク管理者などに通知する。   When receiving the IP packet in which the ESP packet is decrypted and shaped by the encryption communication decryption device 3, the network monitoring device 4 analyzes the content of the IP packet. Here, the network monitoring device 4 performs legitimate communication data transmitted between the VPN terminal 1 and the VPN terminal 2 by performing, for example, an analysis process on whether or not a virus or worm is included. Or whether it is illegal. If the network monitoring device 4 determines that the communication data is inappropriate, the network monitoring device 4 notifies the network administrator or the like.

このような通信システムは、VPN端末1とVPN端末2との間のパケット通信に対して、暗号通信復号装置3により、ESPパケットの復号、読取、内容の保存、変更、暗号化、転送といった処理を行う。これにより、通信システムは、VPN端末1とVPN端末2との間の通信をインターセプトして、VPN端末1及びVPN端末2にとっては既存の処理を行うのみで、暗号通信の内容をネットワーク監視装置4により監視させることが可能となる。   In such a communication system, for the packet communication between the VPN terminal 1 and the VPN terminal 2, the encryption communication decryption device 3 performs processing such as decryption, reading, storage, modification, encryption, and transfer of the ESP packet. I do. As a result, the communication system intercepts communication between the VPN terminal 1 and the VPN terminal 2 and performs only the existing processing for the VPN terminal 1 and the VPN terminal 2, and the contents of the encrypted communication are transmitted to the network monitoring device 4. Can be monitored.

なお、以下の説明では、説明の簡単のため、RFC(Request For Comments)2409で定義されている各種手順のうち、事前共有鍵を使用した相互認証をメインモードで行い、且つ一部を省略した場合を述べる。また、秘密鍵、公開鍵とは、RFC2631で定義されているDiffie−Hellman鍵共有法における秘密鍵、公開鍵を指し、更には、予期しないデータが入力された場合等のエラー処理に関する記述は省略する。   In the following description, for simplicity of explanation, among the various procedures defined in RFC (Request For Comments) 2409, mutual authentication using a pre-shared key is performed in the main mode, and a part thereof is omitted. State the case. The secret key and the public key refer to the secret key and the public key in the Diffie-Hellman key sharing method defined in RFC2631, and further, description about error processing such as when unexpected data is input is omitted. To do.

[暗号通信復号装置3の構成]
つぎに、上述した通信システムにおける暗号通信復号装置3の機能的な構成を図2を参照して説明する。なお、以下の説明では、VPNセッションを構築する始動側のVPN端末1又はVPN端末2をイニシエータ(始動側の通信装置)と呼び、当該イニシエータの始動に反応する応答側のVPN端末1又はVPN端末2をレスポンダ(応答側の通信装置)と呼ぶ。また、以下に説明する暗号通信復号装置3の各部は、例えばIKEやESP等に準拠した通信制御プログラムをROM等に記憶しておき、当該通信制御プログラムをCPUにより実行することにより得られる各機能部、インターフェース回路、ハードディスク装置により実現される各部に相当するものである。
[Configuration of Encryption Communication Decryption Device 3]
Next, a functional configuration of the encryption / decryption device 3 in the communication system described above will be described with reference to FIG. In the following description, the initiating side VPN terminal 1 or VPN terminal 2 that establishes the VPN session is called an initiator (initiating side communication device), and the responding side VPN terminal 1 or VPN terminal that reacts to the initiation of the initiator. 2 is called a responder (response side communication device). Each unit of the encryption communication decryption apparatus 3 described below stores a communication control program compliant with, for example, IKE or ESP in a ROM or the like, and each function obtained by executing the communication control program by the CPU. This corresponds to each unit realized by a unit, an interface circuit, and a hard disk device.

暗号通信復号装置3は、上述したように、ネットワークN及びネットワーク監視装置4と接続され、ネットワークNに対してIPパケットを送受信すると共に、ネットワーク監視装置4に対して、当該ネットワーク監視装置4で受信可能なIPパケットやLANフレームを送信するものである。この暗号通信復号装置3は、ネットワークNを介してVPN端末1とVPN端末2との間で伝送されるIPパケットをインターセプトし、ネットワーク監視装置4で解析可能なデータ形態に整形するものである。   As described above, the encryption communication decryption device 3 is connected to the network N and the network monitoring device 4, and transmits / receives IP packets to / from the network N and receives the network monitoring device 4 by the network monitoring device 4. Possible IP packets and LAN frames are transmitted. The encryption communication decryption device 3 intercepts an IP packet transmitted between the VPN terminal 1 and the VPN terminal 2 via the network N, and shapes it into a data form that can be analyzed by the network monitoring device 4.

暗号通信復号装置3は、VPN端末1及びVPN端末2に対する受信用の通信インターフェース11、送信用の通信インターフェース12、ネットワーク監視装置4に対するインターフェースである通信インターフェース13を備える。   The encryption communication decryption device 3 includes a communication interface 11 for reception with respect to the VPN terminal 1 and the VPN terminal 2, a communication interface 12 for transmission, and a communication interface 13 that is an interface with respect to the network monitoring device 4.

これら通信インターフェース11,通信インターフェース12は、簡単のため受信用、送信用としているが、実際には2つのインターフェースの一方がVPN端末2、もう一方がネットワークNに固定的に接続されている。すなわち、VPN端末2からパケットを受信した場合は、VPN端末2側のインターフェースとして一方の通信インターフェース11を使用し、ネットワークN側のインターフェースとして他方の通信インターフェース12を使用する。また、ネットワークNからパケットを受信した場合は、ネットワークN側のインターフェースとして一方の通信インターフェース11を使用し、VPN端末2側のインターフェースとして他方の通信インターフェース12を使用することになる。   The communication interface 11 and the communication interface 12 are for reception and transmission for simplicity, but actually one of the two interfaces is fixedly connected to the VPN terminal 2 and the other is fixedly connected to the network N. That is, when a packet is received from the VPN terminal 2, one communication interface 11 is used as an interface on the VPN terminal 2 side, and the other communication interface 12 is used as an interface on the network N side. When a packet is received from the network N, one communication interface 11 is used as an interface on the network N side, and the other communication interface 12 is used as an interface on the VPN terminal 2 side.

また、この暗号通信復号装置3は、VPNセッションを構成するVPN端末1とVPN端末2との間で予め同意した事前共有鍵を記憶する事前共有鍵保持部14を備える。この事前共有鍵保持部14に記憶される事前共有鍵は、例えばネットワーク管理者のキーボード操作によって入力される。また、この暗号通信復号装置3は、事前共有鍵保のみならず、VPNセッションを構築するために必要な情報を設定しておく。   In addition, the encryption / decryption device 3 includes a pre-shared key holding unit 14 that stores a pre-shared key agreed in advance between the VPN terminal 1 and the VPN terminal 2 constituting the VPN session. The pre-shared key stored in the pre-shared key holding unit 14 is input by, for example, a network administrator's keyboard operation. The encryption communication decryption apparatus 3 sets not only pre-shared key protection but also information necessary for establishing a VPN session.

更に、この暗号通信復号装置3は、パケット復号部15で復号したVPN端末1とVPN端末2との間での通信内容を、パケット整形部28でIPパケットのデータ形態に整形して生成し、通信インターフェース13によって出力する。これにより、暗号通信復号装置3は、ネットワーク監視装置4に、通信内容を評価させることができる。   Further, the encrypted communication decryption device 3 generates the communication contents between the VPN terminal 1 and the VPN terminal 2 decrypted by the packet decryption unit 15 by shaping them into the data format of the IP packet by the packet shaping unit 28, Output by the communication interface 13. Thereby, the encryption communication decoding device 3 can make the network monitoring device 4 evaluate the communication content.

このような暗号通信復号装置3は、通信インターフェース11で暗号化されたデータを含むパケットを受信すると、当該パケットをパケット復号部15で復号し、復号済のデータをパケット読取部16に送る。また、通信インターフェース11で受信したパケットが暗号化されたデータを含まない場合は、当該パケットのデータをそのままパケット読取部16に送る。そして、パケット読取部16は、平文のデータの内容を判定して、当該データのうち必要なデータをパケット生成部17、セッション情報保持部18、公開鍵保持部19又は鍵共有データ保持部20に送る。   When the encrypted communication decryption apparatus 3 receives a packet containing data encrypted by the communication interface 11, the encrypted communication decryption apparatus 3 decrypts the packet by the packet decryption unit 15 and sends the decrypted data to the packet reading unit 16. If the packet received by the communication interface 11 does not include encrypted data, the packet data is sent to the packet reading unit 16 as it is. Then, the packet reading unit 16 determines the content of the plaintext data and sends necessary data to the packet generation unit 17, the session information holding unit 18, the public key holding unit 19, or the key shared data holding unit 20. send.

セッション情報保持部18は、VPN端末1とVPN端末2との間でIKE処理を行うに際して送受信される各種情報をセッション情報として記憶する。このセッション情報保持部18に記憶されたイニシエータのセッション情報、レスポンダのセッション情報は、セッション鍵生成部21でセッション鍵を生成するに際して読み込まれる。   The session information holding unit 18 stores, as session information, various information transmitted and received when performing IKE processing between the VPN terminal 1 and the VPN terminal 2. The session information of the initiator and the session information of the responder stored in the session information holding unit 18 are read when the session key generating unit 21 generates a session key.

公開鍵保持部19は、パケット読取部16から送られたイニシエータの公開鍵(始動側の通信装置から受信した当該通信装置の公開鍵)、レスポンダの公開鍵(応答側の通信装置から受信した当該通信装置の公開鍵)、及び公開鍵生成部22で生成されたイニシエータ側の公開鍵、レスポンダ側の公開鍵を記憶する。この公開鍵保持部19に記憶されたイニシエータの公開鍵、レスポンダの公開鍵は、共通秘密鍵生成部24で共通秘密鍵を生成するに際して読み込まれ、イニシエータ側の公開鍵はイニシエータに、レスポンダ側の公開鍵はレスポンダに公開鍵を送信するに際してパケット生成部17に読み込まれる。   The public key holding unit 19 sends the initiator public key sent from the packet reading unit 16 (the public key of the communication device received from the initiating communication device) and the responder public key (the received key received from the responding communication device). The communication device public key), the initiator-side public key generated by the public key generation unit 22, and the responder-side public key are stored. The public key of the initiator stored in the public key holding unit 19 and the public key of the responder are read when the common secret key generation unit 24 generates the common secret key, and the public key on the initiator side is read by the initiator and the responder side The public key is read into the packet generation unit 17 when the public key is transmitted to the responder.

なお、イニシエータ側の公開鍵は、レスポンダに代わって暗号通信復号装置が生成するものであり、レスポンダの公開鍵に相当する。また、レスポンダ側の公開鍵は、イニシエータに代わって暗号通信復号装置が生成するものであり、イニシエータの公開鍵に相当する。   The public key on the initiator side is generated by the encryption / decryption device in place of the responder, and corresponds to the public key of the responder. The public key on the responder side is generated by the encryption / decryption device in place of the initiator, and corresponds to the public key of the initiator.

鍵共有データ保持部20は、イニシエータにより複数のIKESAが提案され、レスポンダに選択された何れかのIKESA(有効IKESA)に含まれるプロポーザルペイロード内のトランスフォームペイロードのグループディスクリプション(Group Description)属性の値を記憶する。この鍵共有データ保持部20に記憶された情報は、秘密鍵生成部23で秘密鍵を生成するに際して読み込まれると共に、共通秘密鍵生成部24で共通秘密鍵を生成するに際して読み込まれる。   The key sharing data holding unit 20 proposes a plurality of IKESAs by the initiator, and the group description (Group Description) attribute of the transform payload in the proposal payload included in any of the IKESAs (valid IKESAs) selected by the responder. Store the value. The information stored in the key sharing data holding unit 20 is read when the secret key generation unit 23 generates a secret key, and is read when the common secret key generation unit 24 generates the common secret key.

秘密鍵生成部23は、イニシエータ側の秘密鍵及びレスポンダ側の秘密鍵を生成して、秘密鍵保持部25に記憶させる。このとき、秘密鍵生成部23は、鍵共有データ保持部20に保持されたグループディスクリプション属性の値を参照して、秘密鍵の種類を決定する。なお、イニシエータ側の秘密鍵は、レスポンダに代わって暗号通信復号装置が生成するものであり、レスポンダの秘密鍵に相当する。また、レスポンダ側の秘密鍵は、イニシエータに代わって暗号通信復号装置が生成するものであり、イニシエータの秘密鍵に相当する。   The secret key generation unit 23 generates a secret key on the initiator side and a secret key on the responder side, and stores them in the secret key holding unit 25. At this time, the secret key generation unit 23 refers to the value of the group description attribute held in the key sharing data holding unit 20 and determines the type of the secret key. The secret key on the initiator side is generated by the encryption / decryption device in place of the responder, and corresponds to the secret key of the responder. The secret key on the responder side is generated by the encryption / decryption device in place of the initiator, and corresponds to the secret key of the initiator.

公開鍵生成部22は、秘密鍵保持部25に記憶されているレスポンダ側の秘密鍵と、鍵共有データ保持部20に記憶されているグループディスクリプション属性の値に関連付けられたオークレーグループの値を用いてレスポンダ側の公開鍵を生成すると共に、秘密鍵保持部25に記憶されているイニシエータ側の秘密鍵と、鍵共有データ保持部20に記憶されているグループディスクリプション属性の値に関連付けられたオークレーグループの値を用いてイニシエータ側の公開鍵を生成し、それぞれの公開鍵を公開鍵保持部19に記憶させる。これにより、パケット生成部17は、イニシエータ、レスポンダに公開鍵を送信するに際して、公開鍵保持部19に記憶されているそれぞれの公開鍵を読み出すことが可能となる。   The public key generation unit 22 uses the responder-side secret key stored in the secret key holding unit 25 and the value of the oakley group associated with the value of the group description attribute stored in the key sharing data holding unit 20. To generate a public key on the responder side and to associate the secret key on the initiator side stored in the secret key holding unit 25 and the value of the group description attribute stored in the key sharing data holding unit 20 The public key on the initiator side is generated using the value of the Oakley group, and each public key is stored in the public key holding unit 19. Thereby, the packet generation unit 17 can read out each public key stored in the public key holding unit 19 when transmitting the public key to the initiator and the responder.

共通秘密鍵生成部24は、公開鍵保持部19に保存しているイニシエータの公開鍵、秘密鍵保持部25に保存しているイニシエータ側の秘密鍵と、鍵共有データ保持部20に記憶されているグループディスクリプション属性の値に関連付けられたオークレーグループの値から、イニシエータの共通秘密鍵(始動側の共通秘密鍵)を生成する。また、共通秘密鍵生成部24は、レスポンダ側についても同様に、レスポンダの公開鍵、レスポンダ側の秘密鍵、オークレーグループの値から、レスポンダの共通秘密鍵(応答側の共通秘密鍵)を生成する。そして、共通秘密鍵生成部24は、イニシエータの共通秘密鍵及びレスポンダの共通秘密鍵をセッション鍵生成部21に出力する。   The common secret key generation unit 24 stores the initiator public key stored in the public key holding unit 19, the initiator-side secret key stored in the secret key holding unit 25, and the key shared data holding unit 20. A common secret key (initiator side common secret key) of the initiator is generated from the value of the oakley group associated with the value of the group description attribute. Similarly, on the responder side, the common secret key generation unit 24 generates the responder's common secret key (responder's common secret key) from the responder's public key, the responder's secret key, and the value of the Oakley group. . Then, the common secret key generation unit 24 outputs the common secret key of the initiator and the common secret key of the responder to the session key generation unit 21.

セッション鍵生成部21は、共通秘密鍵生成部24からイニシエータ、レスポンダそれぞれの共通秘密鍵を入力すると、事前共有鍵保持部14に記憶されている事前共通鍵を使用し、セッション情報保持部18に記憶されているセッション情報を参照して、SKEYIDを生成する。そして、セッション鍵生成部21は、生成したSKEYID、共通秘密鍵生成部24に記憶されているイニシエータ、レスポンダのそれぞれの共通秘密鍵を使用し、セッション情報保持部18に記憶されているセッション情報を参照して、セッション鍵をそれぞれ生成し、セッション鍵保持部26に記憶させる。   When the session key generation unit 21 inputs the common secret key of each of the initiator and the responder from the common secret key generation unit 24, the session key generation unit 21 uses the pre-shared key stored in the pre-shared key storage unit 14 to the session information storage unit 18. A SKEYID is generated with reference to the stored session information. Then, the session key generation unit 21 uses the generated secret key, the common secret key of the initiator and responder stored in the common secret key generation unit 24, and the session information stored in the session information holding unit 18 Referring to each, session keys are generated and stored in session key holding unit 26.

このような暗号通信復号装置3において、レスポンダ又はイニシエータにパケットを送信する場合には、パケット読取部16からの情報に従って、パケット生成部17により、パケットに格納する情報を認識してパケットを生成する。そして、暗号通信復号装置3は、パケット生成部17により生成したパケットを暗号化する必要がある場合には、パケット暗号化部27によりセッション鍵保持部26に記憶されているセッション鍵を読み出して暗号化して、通信インターフェース12から送信させる。   In such an encryption communication decryption apparatus 3, when transmitting a packet to the responder or initiator, the packet generation unit 17 recognizes information stored in the packet and generates a packet according to the information from the packet reading unit 16. . When the packet generated by the packet generator 17 needs to be encrypted, the encryption / decryption device 3 reads the session key stored in the session key holding unit 26 by the packet encryption unit 27 and encrypts it. And transmitted from the communication interface 12.

また、暗号通信復号装置3は、セッション鍵や暗号化アルゴリズムを折衝して決定する後述のIKE処理を完了すると、当該IKE処理で決定されたセッション鍵を使用して、VPN端末1とVPN端末2との間で伝送される暗号通信の内容をネットワーク監視装置4で監視させる。このとき、パケット整形部28は、パケット復号部15によってセッション鍵で復号済のパケットを、ネットワーク監視装置4で受信及び解析可能かデータ形態に整形して、通信インターフェース13から出力させる。これにより、暗号通信復号装置3は、ネットワーク監視装置4にVPN端末1とVPN端末2との間で伝送される暗号通信の通信内容を監視させる。   In addition, when the encryption communication decryption apparatus 3 completes an IKE process, which will be described later, by negotiating and determining a session key and an encryption algorithm, the VPN terminal 1 and the VPN terminal 2 use the session key determined by the IKE process. The network monitoring device 4 monitors the contents of the encrypted communication transmitted between the two. At this time, the packet shaping unit 28 shapes the packet that has been decrypted with the session key by the packet decrypting unit 15 into a data form that can be received and analyzed by the network monitoring device 4 and outputs the packet from the communication interface 13. Thereby, the encryption communication decryption device 3 causes the network monitoring device 4 to monitor the communication content of the encryption communication transmitted between the VPN terminal 1 and the VPN terminal 2.

なお、この暗号通信復号装置3の詳細な処理内容については、後述するものとする。   The detailed processing contents of the encryption / decryption device 3 will be described later.

[暗号通信復号装置3の動作]
つぎに、上述したように構成された暗号通信復号装置3の動作について図3〜図6を参照して説明する。
[Operation of Encryption Communication Decryption Device 3]
Next, the operation of the encryption / decryption device 3 configured as described above will be described with reference to FIGS.

「全体動作」
先ず、暗号通信復号装置3の全体動作としては、図3に示すように、VPN端末1又はVPN端末2からパケットを受信すると(ステップST1)、当該パケットがIKE処理におけるパケット(IKEパケット)か否かを判定する(ステップST2)。このとき、暗号通信復号装置3は、パケット読取部16により、パケットに含まれるIP等の下位プロトコルのヘッダを参照して、パケットの種類を判定し、IKEパケットであると判定した場合にはステップST3に処理を進め、IKEパケットではないと判定した場合にはステップST4に処理を進める。
"Overall operation"
First, as an overall operation of the encryption communication decryption apparatus 3, as shown in FIG. 3, when a packet is received from the VPN terminal 1 or the VPN terminal 2 (step ST1), whether or not the packet is a packet in the IKE process (IKE packet). Is determined (step ST2). At this time, the encryption communication decryption apparatus 3 refers to the header of the lower protocol such as IP included in the packet by the packet reading unit 16, determines the type of the packet, and if it is determined that the packet is an IKE packet, The process proceeds to ST3, and if it is determined that the packet is not an IKE packet, the process proceeds to step ST4.

ステップST3においては、暗号通信復号装置3により、VPN端末1及びVPN端末2との間でデータを通信する前に、鍵交換をしてVPNセッションを構築するためのIKE処理を行う。このIKE処理は、RFC2409で定義されている処理を行うことによって、VPN端末1のIKE用セッション鍵及びESP用セッション鍵と、VPN端末2のIKE用セッション鍵及びESP用セッション鍵とを生成する。ここで、IKE処理においては、RFC2408で定義されているISAKMP(internet security association key management)にしたがって鍵交換を行う。   In step ST3, before the data is communicated between the VPN terminal 1 and the VPN terminal 2, the encryption communication decryption apparatus 3 performs IKE processing for exchanging keys and establishing a VPN session. This IKE process generates the IKE session key and ESP session key of the VPN terminal 1, and the IKE session key and ESP session key of the VPN terminal 2 by performing the process defined in RFC2409. Here, in the IKE process, key exchange is performed according to ISAKMP (Internet security association key management) defined in RFC2408.

なお、このステップST3において、暗号通信復号装置3は、ステップST1でパケットを受信する毎に、図4に示すようなIKE処理を1回行う。そして、暗号通信復号装置3は、ステップST3のIKE処理を行った後にステップST6に処理を進め、IKE処理によって生成したパケットをVPN端末1又はVPN端末2に送信して、処理を終了する。なお、この図4に示す処理内容については後述する。   In step ST3, every time the encrypted communication decryption apparatus 3 receives a packet in step ST1, it performs the IKE process once as shown in FIG. Then, after performing the IKE process of step ST3, the cryptographic communication decryption apparatus 3 advances the process to step ST6, transmits the packet generated by the IKE process to the VPN terminal 1 or the VPN terminal 2, and ends the process. The processing content shown in FIG. 4 will be described later.

一方、ステップST4においては、暗号通信復号装置3により、ステップST1で受信したパケットがESPパケットか否かを判定する。このとき、暗号通信復号装置3は、パケット読取部16により、パケットに含まれるヘッダ情報等を参照してパケットの種類を判定し、ESPパケットであると判定した場合にはステップST5に処理を進め、ESPパケットではないと判定した場合にはステップST6に処理を進める。   On the other hand, in step ST4, the encryption communication decryption apparatus 3 determines whether or not the packet received in step ST1 is an ESP packet. At this time, the encryption / decryption device 3 determines the type of the packet by referring to the header information included in the packet by the packet reading unit 16, and proceeds to step ST5 when determining that the packet is an ESP packet. If it is determined that the packet is not an ESP packet, the process proceeds to step ST6.

ステップST5においては、暗号通信復号装置3により、図5に示すようなESP処理を行い、ステップST6においてはESP処理にて生成したパケットをVPN端末1又はVPN端末2に送信する。なお、この図5に示す処理内容については後述する。また、ステップST6において、送信するパケットにチェックサムフィールドがあれば、これを再計算した値に更新する。   In step ST5, the encryption communication decryption apparatus 3 performs ESP processing as shown in FIG. 5, and in step ST6, the packet generated by the ESP processing is transmitted to the VPN terminal 1 or the VPN terminal 2. The processing contents shown in FIG. 5 will be described later. In step ST6, if the packet to be transmitted has a checksum field, it is updated to a recalculated value.

「IKE処理」
つぎに、上述したステップST3におけるIKE処理の詳細な内容について図4及び図6を参照して説明する。なお、このIKE処理は、図6に示すような番号「1」で示した第1処理から番号「9」で示した第9処理を行うものである。
"IKE processing"
Next, detailed contents of the IKE process in step ST3 described above will be described with reference to FIGS. This IKE process is performed from the first process indicated by the number “1” to the ninth process indicated by the number “9” as shown in FIG.

このIKE処理には、第1フェーズと第2フェーズの2つフェーズがある。第1フェーズは、VPN端末1とVPN端末2との間の相手認証、すなわち通信相手の認証と、IKE処理内で使用するセッション鍵(以下、IKE用セッション鍵と呼ぶ。)の交換を行う。   This IKE process has two phases, a first phase and a second phase. In the first phase, partner authentication between the VPN terminal 1 and the VPN terminal 2, that is, authentication of the communication partner, and exchange of a session key used in the IKE process (hereinafter referred to as IKE session key) are performed.

また、第1フェーズには、イニシエータ、レスポンダそれぞれのIDを暗号化するメインモードと、IDを暗号化しないためメインモードと比較して手順が簡略化されたアグレッシブモードとの2つのモードがあり、何れか一方を実行する。以下に説明する本例では、VPN端末1をイニシエータ、VPN端末2をレスポンダとして、第1フェーズとしてメインモードを行う場合について説明する。   In the first phase, there are two modes: a main mode that encrypts the ID of each initiator and responder, and an aggressive mode that has a simplified procedure compared to the main mode because the ID is not encrypted. Either one is executed. In this example described below, a case will be described in which the main mode is performed as the first phase with the VPN terminal 1 as an initiator and the VPN terminal 2 as a responder.

「第1処理」
この第1フェーズにおいては、図6に示すように、先ずイニシエータは、宛先をレスポンダに設定したSA(security Association)ペイロードを含むパケットをIKEパケットS1として送信する。このSAペイロードは、IKE処理においてデータを暗号化するための暗号アルゴリズム、メッセージ認証コード等を生成するためのハッシュアルゴリズム、相互認証の方法、鍵の生成に必要な素数(オークレーグループ)、セッション鍵の有効期限等のデータ(以下、IKESAと呼ぶ。)を1つ以上含む。
"First process"
In this first phase, as shown in FIG. 6, the initiator first transmits a packet including an SA (security association) payload whose destination is set as a responder as an IKE packet S1. The SA payload includes an encryption algorithm for encrypting data in the IKE process, a hash algorithm for generating a message authentication code, a mutual authentication method, a prime number necessary for key generation (an Oakley group), a session key One or more pieces of data such as expiration dates (hereinafter referred to as IKESA) are included.

次に、暗号通信復号装置3は、イニシエータから送信されたSAペイロードを含むIKEパケットS1を通信インターフェース11により受信し(ステップST1)、IKEパケットと判定して(ステップST2)、図4に示すIKE処理に移行する(ステップST3)。   Next, the encryption communication decryption apparatus 3 receives the IKE packet S1 including the SA payload transmitted from the initiator by the communication interface 11 (step ST1), determines that it is an IKE packet (step ST2), and performs the IKE shown in FIG. The process proceeds to step ST3.

このIKE処理では、先ずステップST11において、通信インターフェース11で受信したIKEパケットS1をパケット復号部15に入力し、パケット復号部15によって、IKEパケットS1のISAKMPヘッダのフラグフィールドに格納されている値を参照して、当該フラグフィールドに暗号化ビット(E)が格納されているか否かを参照して、IKEパケットS1に含まれるデータが暗号化されているかを判定する。この場合、SAペイロードを含むIKEパケットS1に含まれるデータが暗号化されていないので、パケット復号部15からパケット読取部16にIKEパケットS1に含まれるデータを復号化処理をせずに出力してステップST13に処理を進める。   In this IKE process, first, in step ST11, the IKE packet S1 received by the communication interface 11 is input to the packet decoding unit 15, and the value stored in the flag field of the ISAKMP header of the IKE packet S1 by the packet decoding unit 15 is input. With reference to whether or not the encryption bit (E) is stored in the flag field, it is determined whether or not the data included in the IKE packet S1 is encrypted. In this case, since the data included in the IKE packet S1 including the SA payload is not encrypted, the data included in the IKE packet S1 is output from the packet decoding unit 15 to the packet reading unit 16 without being decrypted. The process proceeds to step ST13.

ステップST13においては、パケット読取部16により、IKEパケットS1から、ISAKMPヘッダのイニシエータクッキー(Initiator Cookie)及びSAペイロードの値を取り出して、セッション情報保持部18に記憶させる。   In step ST13, the packet reading unit 16 extracts the ISAKMP header initiator cookie (Initiator Cookie) and SA payload values from the IKE packet S1, and stores them in the session information holding unit 18.

次に、パケット読取部16により、IKEパケットS1のISAKMPヘッダより後に、鍵交換(KE:Key Exchange)ペイロードが含まれているか否か(ステップST14)、乱数ペイロードNrが含まれているか否か(ステップST18)、ハッシュペイロードが含まれているか否かを判定する(ステップST20)。そして、パケット読取部16は、IKEパケットS1に鍵交換ペイロード、乱数ペイロード、ハッシュペイロードの何れも含まれていないので、ステップST15〜ステップST17,ステップST19及びステップST21の処理を行わずに、ステップST22に処理を進める。   Next, the packet reading unit 16 determines whether a key exchange (KE) payload is included after the ISAKMP header of the IKE packet S1 (step ST14), and whether a random number payload Nr is included (step ST14). Step ST18), it is determined whether or not a hash payload is included (step ST20). Since the IKE packet S1 does not include any of the key exchange payload, the random number payload, and the hash payload, the packet reading unit 16 does not perform the processes of Step ST15 to Step ST17, Step ST19, and Step ST21, and does not perform Step ST22 Proceed with the process.

次に、パケット読取部16は、ステップST22において、IKEパケットS1がステップST12の処理が施されて復号されたか否かを判定し、復号されていないので処理を終了する。そして、暗号通信復号装置3は、ステップST1で受信したIKEパケットS1をパケット読取部16からパケット生成部17に出力し、パケット暗号化部27で暗号化せずに、通信インターフェース12からレスポンダに送信させる。   Next, in step ST22, the packet reading unit 16 determines whether or not the IKE packet S1 has been subjected to the processing in step ST12 and has been decoded. Then, the encryption communication decryption apparatus 3 outputs the IKE packet S1 received in step ST1 from the packet reading unit 16 to the packet generation unit 17 and transmits it from the communication interface 12 to the responder without being encrypted by the packet encryption unit 27. Let

これにより、レスポンダは、IKEパケットS1を受信する。レスポンダは、IKEパケットS1を受信すると、当該IKEパケットS1のSAペイロードに含まれているIKESAから、何れか1つのIKESA(以下、有効IKESAと呼ぶ。)を選択し、当該有効IKESAを含むSAペイロードを含むIKEパケットS2を作成し、宛先をイニシエータとして送信する。   As a result, the responder receives the IKE packet S1. When the responder receives the IKE packet S1, the responder selects one IKESA (hereinafter referred to as a valid IKESA) from the IKESA included in the SA payload of the IKE packet S1, and the SA payload including the valid IKESA. IKE packet S2 is generated, and the destination is transmitted as the initiator.

「第2処理」
次に、暗号通信復号装置3は、レスポンダから送信されたIKEパケットS2を暗号通信復号装置3の通信インターフェース11により受信し(ステップST1)、IKEパケットと判定して(ステップST2)、図4に示すIKE処理に移行する(ステップST3)。
"Second process"
Next, the encryption communication decryption apparatus 3 receives the IKE packet S2 transmitted from the responder by the communication interface 11 of the encryption communication decryption apparatus 3 (step ST1), determines that it is an IKE packet (step ST2), and FIG. The process proceeds to the IKE process shown (step ST3).

このIKE処理は、先ずステップST11において、通信インターフェース11で受信したIKEパケットS2をパケット復号部15に入力し、パケット復号部15によって、IKEパケットS2のISAKMPヘッダのフラグフィールドに格納されている値を参照して、当該フラグフィールドに暗号化ビット(E)が格納されているかを参照して、IKEパケットS2に含まれるデータが暗号化されているかを判定する。この場合、有効IKESAを含むIKEパケットS2が暗号化されていないので、パケット復号部15からパケット読取部16にIKEパケットS2を復号化処理をせずに出力してステップST13に処理を進める。   In this IKE process, first, in step ST11, the IKE packet S2 received by the communication interface 11 is input to the packet decoding unit 15, and the value stored in the flag field of the ISAKMP header of the IKE packet S2 by the packet decoding unit 15 is input. With reference to whether or not the encryption bit (E) is stored in the flag field, it is determined whether or not the data included in the IKE packet S2 is encrypted. In this case, since the IKE packet S2 including the valid IKESA is not encrypted, the IKE packet S2 is output from the packet decrypting unit 15 to the packet reading unit 16 without being decrypted, and the process proceeds to step ST13.

ステップST13においては、パケット読取部16により、IKEパケットS2から、ISAKMPヘッダのレスポンダクッキー(Responder Cookie)及びSAペイロードに含まれる有効IKESAを取り出して、セッション情報保持部18に記憶させる。また、パケット読取部16は、鍵共有データ保持部20に、有効IKESAに含まれるプロポーザルペイロード内のトランスフォームペイロードのグループディスクリプション属性の値を保存する。   In step ST13, the packet reading unit 16 extracts the responder cookie (Responder Cookie) of the ISAKMP header and the valid IKESA included in the SA payload from the IKE packet S2, and stores them in the session information holding unit 18. Further, the packet reading unit 16 stores the value of the group description attribute of the transform payload in the proposal payload included in the valid IKESA in the key sharing data holding unit 20.

次に、パケット読取部16により、IKEパケットS2のISAKMPヘッダより後に、鍵交換ペイロードが含まれているか否か(ステップST14)、乱数ペイロードNrが含まれているか否か(ステップST18)、ハッシュペイロードが含まれているか否かを判定する(ステップST20)。そして、パケット読取部16は、IKEパケットS2に鍵交換ペイロード、乱数ペイロード、ハッシュペイロードの何れも含まれていないので、ステップST15〜ステップST17,ステップST19及びステップST21の処理を行わずに、ステップST22に処理を進める。   Next, the packet reading unit 16 determines whether the key exchange payload is included after the ISAKMP header of the IKE packet S2 (step ST14), whether the random number payload Nr is included (step ST18), the hash payload Is included (step ST20). Since the IKE packet S2 does not include any of the key exchange payload, the random number payload, and the hash payload, the packet reading unit 16 does not perform steps ST15 to ST17, step ST19, and step ST21, but performs step ST22. Proceed with the process.

次に、パケット読取部16は、IKEパケットS2がステップST12の処理が施されて復号されたか否かを判定し、復号されていないので処理を終了する。そして、暗号通信復号装置3は、ステップST1で受信したIKEパケットS2をパケット読取部16からパケット生成部17に出力し、パケット暗号化部27で暗号化せずに、通信インターフェース12からイニシエータに送信させる。   Next, the packet reading unit 16 determines whether or not the IKE packet S2 has been subjected to the process of step ST12 and has been decoded, and ends the process because it has not been decoded. Then, the encryption communication decryption apparatus 3 outputs the IKE packet S2 received in step ST1 from the packet reading unit 16 to the packet generation unit 17, and transmits it from the communication interface 12 to the initiator without being encrypted by the packet encryption unit 27. Let

これにより、イニシエータは、IKEパケットS2を受信する。イニシエータは、IKEパケットS2を受信すると、当該IKEパケットS2のSAペイロードに含まれているIKESAを有効IKESAであると認識する。   As a result, the initiator receives the IKE packet S2. When the initiator receives the IKE packet S2, the initiator recognizes the IKESA included in the SA payload of the IKE packet S2 as a valid IKESA.

これにより、イニシエータとレスポンダ及び暗号通信復号装置3は、有効IKESAが保存された状態となり、IKE処理における暗号アルゴリズムやハッシュアルゴリズム等を示すIKESAの内容の折衝を完了する。そして、通信システムは、鍵交換に移行する。   As a result, the initiator, the responder, and the encryption communication decryption apparatus 3 are in a state where the valid IKESA is stored, and the negotiation of the contents of the IKESA indicating the encryption algorithm, the hash algorithm, and the like in the IKE process is completed. Then, the communication system shifts to key exchange.

すなわち、イニシエータは、乱数を発生させることにより秘密鍵xを生成し、当該秘密鍵xと有効IKESAに含まれるプロポーザルペイロード内のトランスフォームペイロードのグループディスクリプション属性の値が示す素数p及び原始元gとを用いて、公開鍵g mod pを生成し、その公開鍵g mod pを含む鍵交換ペイロードKEを生成する。また、イニシエータは、別途生成した乱数Ni_bを含む乱数ペイロードNiを生成する。そして、イニシエータは、生成した鍵交換ペイロードKE及び乱数ペイロードNiを含むIKEパケットS3を作成して、宛先をレスポンダとして送信する。なお、IKEにおいて原始元gは定数2である。また、以下の説明では、簡単のため、イニシエータの公開鍵g mod pのmod pを省略して、イニシエータの公開鍵gのように表記する。なお、レスポンダの公開鍵、共通秘密鍵についても、以下では、mod pを省略して説明する。 That is, the initiator generates a secret key x by generating a random number, and the prime number p and the primitive element g indicated by the value of the group description attribute of the transform payload in the proposal payload included in the secret key x and the valid IKESA by using the door, to generate a public key g x mod p, to generate a key exchange payload KE containing the public key g x mod p. Further, the initiator generates a random number payload Ni including a separately generated random number Ni_b. Then, the initiator creates an IKE packet S3 including the generated key exchange payload KE and random number payload Ni, and transmits the destination as a responder. Note that the primitive element g is a constant 2 in IKE. Further, in the following description, for simplicity, mod p of the initiator public key g x mod p is omitted and expressed as an initiator public key g x . In the following description, mod p is omitted for the responder's public key and common secret key.

「第3処理」
次に、暗号通信復号装置3は、イニシエータから送信されたIKEパケットS3を通信インターフェース11により受信し(ステップST1)、IKEパケットと判定して(ステップST2)、図4に示すIKE処理に移行する(ステップST3)。
"Third process"
Next, the encryption communication decryption apparatus 3 receives the IKE packet S3 transmitted from the initiator by the communication interface 11 (step ST1), determines that it is an IKE packet (step ST2), and shifts to the IKE process shown in FIG. (Step ST3).

このIKE処理は、先ずステップST11において、通信インターフェース11で受信したIKEパケットS3に含まれるデータが暗号化されているかをパケット復号部15で判定する。この場合、IKEパケットS3が暗号化されていないので、パケット復号部15からパケット読取部16にIKEパケットS3を復号化処理をせずに出力してステップST13に処理を進める。   In this IKE process, first, in step ST11, the packet decrypting unit 15 determines whether the data included in the IKE packet S3 received by the communication interface 11 is encrypted. In this case, since the IKE packet S3 is not encrypted, the IKE packet S3 is output from the packet decrypting unit 15 to the packet reading unit 16 without being decrypted, and the process proceeds to step ST13.

ステップST13においては、パケット読取部16により、IKEパケットS3の鍵交換ペイロードKEからイニシエータの公開鍵gを取り出して公開鍵保持部19に記憶させると共に、IKEパケットS3の乱数ペイロードNiから、乱数Ni_bを取り出してセッション情報保持部18に記憶させる。 In step ST13, the packet analysis unit 16, together with the stores the public key storage unit 19 from the key exchange payload KE takes out the public key g x of the initiator of the IKE packet S3, the random number payload Ni of the IKE packet S3, the random number Ni_b And is stored in the session information holding unit 18.

次に、パケット読取部16により、IKEパケットS3のISAKMPヘッダより後に、鍵交換ペイロードKEが含まれているか否かを判定して(ステップST14)、鍵交換ペイロードKEが含まれているのでステップST15〜ステップST17の処理に移行する。   Next, the packet reading unit 16 determines whether or not the key exchange payload KE is included after the ISAKMP header of the IKE packet S3 (step ST14). Since the key exchange payload KE is included, step ST15 ~ The process proceeds to step ST17.

ステップST15では、秘密鍵生成部23によってレスポンダ側の秘密鍵x’を生成して秘密鍵保持部25に保存し、次のステップST16では、公開鍵生成部22によって、秘密鍵保持部25に保存しているレスポンダ側の秘密鍵x’からレスポンダ側の公開鍵gx’を生成して公開鍵保持部19に保存し、次のステップST17では、パケット生成部17によって、ステップST1で受信したIKEパケットS3に含まれるイニシエータの公開鍵gを、公開鍵保持部19に記憶されているレスポンダ側の公開鍵gx’に書き換えたIKEパケットS3’を作成する。 In step ST15, a secret key x ′ on the responder side is generated by the secret key generation unit 23 and stored in the secret key holding unit 25, and in the next step ST16, stored in the secret key holding unit 25 by the public key generation unit 22. The responder side public key g x ′ is generated from the responder side secret key x ′ and stored in the public key holding unit 19, and in the next step ST17, the packet generation unit 17 receives the IKE received in step ST1. An IKE packet S3 ′ is generated by rewriting the public key g x of the initiator included in the packet S3 with the public key g x ′ on the responder side stored in the public key holding unit 19.

次に、パケット読取部16により、IKEパケットS3に、乱数ペイロードNrが含まれているか否か(ステップST18)、ハッシュペイロードが含まれているか否かを判定する(ステップST20)。そして、パケット読取部16は、乱数ペイロードNr、ハッシュペイロードの何れも含まれていないので、ステップST19及びステップST21の処理を行わずに、ステップST22に処理を進める。   Next, the packet reading unit 16 determines whether or not the random number payload Nr is included in the IKE packet S3 (step ST18) and whether or not the hash payload is included (step ST20). Since the packet reading unit 16 does not include either the random number payload Nr or the hash payload, the process proceeds to step ST22 without performing steps ST19 and ST21.

次に、パケット読取部16は、IKEパケットS3がステップST12の処理が施されて復号されたか否かを判定し、復号されていないので処理を終了する。   Next, the packet reading unit 16 determines whether or not the IKE packet S3 has been subjected to the process of step ST12 and has been decoded, and ends the process because it has not been decoded.

そして、暗号通信復号装置3は、ステップST17で作成したIKEパケットS3’を、パケット暗号化部27で暗号化せずに、通信インターフェース12からレスポンダに送信させる(ステップST6)。   Then, the encryption / decryption device 3 transmits the IKE packet S3 'created in step ST17 from the communication interface 12 to the responder without being encrypted by the packet encryption unit 27 (step ST6).

これにより、レスポンダは、IKEパケットS3’を受信すると、イニシエータと同様に乱数を発生させて秘密鍵yを生成し、当該秘密鍵yを用いて公開鍵g mod pを生成し、当該公開鍵gを含む鍵交換ペイロード及び別途生成した乱数Nr_bを含む乱数ペイロードNrを含むIKEパケットS4を生成して、宛先をイニシエータとして送信する。 Accordingly, when the responder receives the IKE packet S3 ′, it generates a secret key y by generating a random number in the same manner as the initiator, generates a public key gy mod p using the secret key y, and generates the public key and it generates an IKE packet S4, containing a random number payload Nr including the key exchange payload and separately generated random number Nr_b including g y, and transmits the destination as an initiator.

また、レスポンダは、事前共有鍵、受信したIKEパケットS3’の乱数ペイロードNiに含まれるイニシエータの乱数Ni_b及び自身の乱数Nr_bからSKEYIDを生成し、秘密鍵y、レスポンダ側の公開鍵gx’から共通秘密鍵gx’y=(gx’なる演算を行う。そして、レスポンダは、SKEYID、共通秘密鍵gx’y、イニシエータクッキー、レスポンダクッキーから、SKEYID_d、SKEYID_a、SKEYID_eを生成する。 Further, the responder generates SKEYID from the pre-shared key, the random number Ni_b of the initiator included in the random number payload Ni of the received IKE packet S3 ′, and its own random number Nr_b, and from the secret key y and the public key g x ′ on the responder side The common secret key g x′y = (g x ′ ) y is calculated. Then, the responder generates SKEYID_d, SKEYID_a, and SKEYID_e from the SKEYID, the common secret key g x′y , the initiator cookie, and the responder cookie.

「第4処理」
次に、暗号通信復号装置3は、レスポンダから送信されたIKEパケットS4を通信インターフェース11により受信し(ステップST1)、IKEパケットと判定して(ステップST2)、図4に示すIKEに移行する(ステップST3)。
"4th process"
Next, the encryption communication decryption apparatus 3 receives the IKE packet S4 transmitted from the responder by the communication interface 11 (step ST1), determines that it is an IKE packet (step ST2), and shifts to the IKE shown in FIG. 4 ( Step ST3).

このIKE処理は、先ずステップST11において、通信インターフェース11で受信したIKEパケットS4に含まれるデータが暗号化されているかをパケット復号部15で判定する。この場合、IKEパケットS4が暗号化されていないので、パケット復号部15からパケット読取部16にIKEパケットS4を復号化処理をせずに出力してステップST13に処理を進める。   In this IKE process, first, in step ST11, the packet decrypting unit 15 determines whether the data included in the IKE packet S4 received by the communication interface 11 is encrypted. In this case, since the IKE packet S4 is not encrypted, the IKE packet S4 is output from the packet decrypting unit 15 to the packet reading unit 16 without being decrypted, and the process proceeds to step ST13.

ステップST13においては、パケット読取部16により、IKEパケットS4の鍵交換ペイロードからレスポンダの公開鍵gを取り出して公開鍵保持部19に記憶させると共に、IKEパケットS4の乱数ペイロードから、乱数Nr_bを取り出してセッション情報保持部18に記憶させる。 In step ST13, the packet analysis unit 16, together with the stores the public key storage unit 19 from the key exchange payload removed public key g y of the responder of the IKE packet S4, from the random number payload of the IKE packet S4, taken out random Nr_b And stored in the session information holding unit 18.

次に、パケット読取部16により、IKEパケットS4のISAKMPヘッダより後に、鍵交換ペイロードKEが含まれているか否かを判定して(ステップST14)、鍵交換ペイロードKEが含まれているのでステップST15〜ステップST17の処理に移行する。   Next, the packet reading unit 16 determines whether or not the key exchange payload KE is included after the ISAKMP header of the IKE packet S4 (step ST14). Since the key exchange payload KE is included, step ST15 ~ The process proceeds to step ST17.

ステップST15では、秘密鍵生成部23によってイニシエータ側の秘密鍵y’を生成して秘密鍵保持部25に保存し、次のステップST16では、公開鍵生成部22によって、秘密鍵保持部25に保存しているイニシエータ側の秘密鍵y’からイニシエータ側の公開鍵gy’を生成して公開鍵保持部19に保存し、次のステップST17では、パケット生成部17によってパケット読取部16に保持するIKEパケットS4に含まれるレスポンダの公開鍵gを、公開鍵保持部19に記憶されているイニシエータ側の公開鍵gy’に書き換えたIKEパケットS4’を作成する。 In step ST15, the secret key generation unit 23 generates the initiator-side secret key y ′ and stores it in the secret key holding unit 25. In the next step ST16, the public key generation unit 22 stores it in the secret key holding unit 25. and save it 'from the public key g y of the initiator' private key y of the initiator side has the public key holder 19 generates a next step ST17, holding the packet analysis unit 16 by the packet generating unit 17 the public key g y of the responder included in the IKE packet S4, creating a 'IKE packet S4, rewritten to' public keys g y of the initiator, which is stored in the public key storage unit 19.

次に、パケット読取部16により、IKEパケットS4に、乱数ペイロードNrが含まれているか否かを判定し(ステップST18)、含まれているのでステップST19に処理を進める。   Next, the packet reading unit 16 determines whether or not the random number payload Nr is included in the IKE packet S4 (step ST18), and since it is included, the process proceeds to step ST19.

ステップST19においては、セッション鍵生成部21により、RFC2409に従って、IKE用セッション鍵を生成する。このとき、暗号通信復号装置3は、先ず共通秘密鍵生成部24により、公開鍵保持部19に保存しているイニシエータの公開鍵gと、秘密鍵保持部25に保存しているイニシエータ側の秘密鍵y’と、鍵共有データ保持部20のグループディスクリプション属性の値に関連付けられているオークレーグループpから、イニシエータの共通秘密鍵gxy’を計算する。 In step ST19, the session key generation unit 21 generates an IKE session key in accordance with RFC2409. At this time, the encryption / decryption device 3 first uses the common secret key generation unit 24 to execute the initiator public key g x stored in the public key holding unit 19 and the initiator side stored in the secret key holding unit 25. The initiator's common secret key g xy ′ is calculated from the secret key y ′ and the Oakley group p associated with the value of the group description attribute of the key sharing data holding unit 20.

同様に、共通秘密鍵生成部24によって、公開鍵保持部19に保存しているレスポンダの公開鍵gと、秘密鍵保持部25に保存しているレスポンダ側の秘密鍵x’と、鍵共有データ保持部20のグループディスクリプション属性の値に関連付けられているオークレーグループpから、レスポンダの共通秘密鍵gx’yを計算する。 Similarly, the common secret key generation unit 24, and a public key g y of the responder that stores the public key storage unit 19, a secret key x 'of the responder side that stores the secret key storage unit 25, a key sharing The responder's common secret key g x′y is calculated from the oakley group p associated with the group description attribute value of the data holding unit 20.

次に、セッション鍵生成部21によって、事前共有鍵保持部14に保持している事前共通鍵、セッション情報保持部18に保存している乱数Ni_b、乱数Nr_bから、有効IKESAのハッシュアルゴリズムを使用してSKEYIDを生成する。   Next, the session key generator 21 uses the effective common key hash algorithm from the pre-shared key held in the pre-shared key holding unit 14, the random number Ni_b stored in the session information holding unit 18, and the random number Nr_b. To generate SKEYID.

そして、セッション鍵生成部21は、生成したSKEYID、イニシエータの共通秘密鍵gxy’、セッション情報保持部18に保存しているイニシエータクッキー、レスポンダクッキーから、有効IKESAのハッシュアルゴリズムを使用して、イニシエータのIKE用セッション鍵であるSKEYID_d、SKEYID_a、SKEYID_eをそれぞれ生成し、セッション鍵保持部26に保存する。 Then, the session key generation unit 21 uses the effective IKESA hash algorithm from the generated SKEYID, the initiator's common secret key g xy ′ , the initiator cookie stored in the session information holding unit 18, and the responder cookie. KEYID_d, SKEYID_a, and SKEYID_e, which are IKE session keys, are generated and stored in the session key holding unit 26, respectively.

同様に、セッション鍵生成部21は、生成したSKEYID、レスポンダの共通秘密鍵gx’yと、セッション情報保持部18に保存しているイニシエータクッキー、レスポンダクッキーから、有効IKESAのハッシュアルゴリズムを使用して、レスポンダのIKE用セッション鍵であるSKEYID_d、SKEYID_a、SKEYID_eをそれぞれ生成し、セッション情報保持部18に保存する。このようなセッション鍵生成部21で生成したレスポンダのIKE用セッション鍵は、IKEパケットS4の送信時にレスポンダで生成するセッション鍵と同じ値となる。 Similarly, the session key generation unit 21 the generated SKEYID, a common secret key g x'y of the responder, the initiator cookie is stored in the session information storage unit 18, from the responder cookie, using a hash algorithm of the valid IKESA Thus, SKEYID_d, SKEYID_a, and SKEYID_e, which are responder's IKE session keys, are generated and stored in the session information holding unit 18, respectively. The responder's IKE session key generated by the session key generation unit 21 has the same value as the session key generated by the responder when the IKE packet S4 is transmitted.

このように暗号通信復号装置3は、イニシエータの共通秘密鍵gxy’と、レスポンダの共通秘密鍵gx’yとのように異なる共通秘密鍵から、イニシエータ、レスポンダそれぞれのIKE用セッション鍵を生成する。 In this way, the encryption / decryption device 3 generates IKE session keys for the initiator and the responder from different common secret keys such as the common secret key g xy ′ of the initiator and the common secret key g x′y of the responder. To do.

次に、パケット読取部16は、IKEパケットS4にハッシュペイロードが含まれているか否かを判定し(ステップST20)、ハッシュペイロードが含まれていないので、ステップST21の処理を行わずにステップST22に処理を進める。   Next, the packet reading unit 16 determines whether or not the hash payload is included in the IKE packet S4 (step ST20). Since the hash payload is not included, the process proceeds to step ST22 without performing the process of step ST21. Proceed with the process.

次に、パケット読取部16は、IKEパケットS4がステップST12の処理が施されて復号されたか否かを判定し、復号されていないので処理を終了する。   Next, the packet reading unit 16 determines whether or not the IKE packet S4 has been subjected to the process of step ST12 and has been decoded, and ends the process because it has not been decoded.

そして、暗号通信復号装置3は、ステップST17で作成したIKEパケットS4’をパケット暗号化部27で暗号化せずに、通信インターフェース12からイニシエータに送信させる(ステップST6)。   The encryption communication decryption apparatus 3 transmits the IKE packet S4 'created in step ST17 from the communication interface 12 to the initiator without being encrypted by the packet encryption unit 27 (step ST6).

これにより、イニシエータは、IKEパケットS4’を受信すると、事前共有鍵、受信した乱数ペイロードに含まれる乱数Nr_b、自身が生成した乱数Ni_bからSKEYIDを生成し、イニシエータが生成した秘密鍵x、IKEパケットS4’に含まれるイニシエータ側の公開鍵gy’から、共通秘密鍵gxy’ を計算する。そして、イニシエータは、生成したSKIYID、共通秘密鍵gxy’と、イニシエータクッキー、レスポンダクッキーからIKE用セッション鍵であるSKEYID_b、SKEYID_a、SKEYID_eを生成する。このようにイニシエータで作成したIKE用セッション鍵は、暗号通信復号装置3がIKEパケットS4’を送信するに際して生成したイニシエータのIKE用セッション鍵と同じ値となる。 Thus, when the initiator receives the IKE packet S4 ′, the initiator generates a SKEYID from the pre-shared key, the random number Nr_b included in the received random number payload, and the random number Ni_b generated by itself, and the secret key x and the IKE packet generated by the initiator. S4 from the 'public key g y of the initiator side that is included in', to compute a common secret key g xy '. Then, the initiator generates SKEYID_b, SKEYID_a, and SKEYID_e, which are session keys for IKE, from the generated SKIYID and common secret key g xy ′ and the initiator cookie and responder cookie. Thus, the IKE session key created by the initiator has the same value as the IKE session key of the initiator generated when the encryption / decryption device 3 transmits the IKE packet S4 ′.

これにより、イニシエータ、レスポンダでIKE用セッション鍵を保持する処理が完了すると共に、暗号通信復号装置3にイニシエータのIKE用セッション鍵及びレスポンダのIKE用セッション鍵が保持された状態となる。更に具体的には、イニシエータ、レスポンダ及び暗号通信復号装置3は、以降の処理において、IKEパケットのISAKMPヘッダより後のデータを、SKEYID_eを暗号化鍵とし、有効IKESAで設定された暗号アルゴリズムで暗号化する。   As a result, the process of holding the IKE session key by the initiator and the responder is completed, and the IKE session key of the initiator and the IKE session key of the responder are held in the encryption communication decryption apparatus 3. More specifically, the initiator, responder, and encryption / decryption device 3 encrypt the data after the ISAKMP header of the IKE packet with the encryption algorithm set by the effective IKESA using SKEYID_e as the encryption key in the subsequent processing. Turn into.

次に、イニシエータは、自身のIDであるIDiiを含むIDペイロード及びハッシュ値を含むハッシュペイロードを作成する。このとき、イニシエータは、RFC2409に従ったSKEYID、イニシエータの公開鍵g、イニシエータクッキー、レスポンダクッキー、SAペイロード、イニシエータのIDペイロードから、有効IKESAで設定されたハッシュアルゴリズムで計算を行うことにより、ハッシュ値HASH_Iを含むハッシュペイロードを作成する。そして、イニシエータは、ハッシュペイロード及びIDペイロードをIKE用セッション鍵で暗号化したIKEパケットS5を送信する。 Next, the initiator creates an ID payload including IDii that is its own ID and a hash payload including a hash value. At this time, the initiator calculates the hash from the SKEYID according to RFC 2409, the initiator public key g x , the initiator cookie, the responder cookie, the SA payload, and the ID payload of the initiator using the hash algorithm set by the valid IKESA. Create a hash payload containing the value HASH_I. Then, the initiator transmits an IKE packet S5 obtained by encrypting the hash payload and the ID payload with the IKE session key.

「第5処理」
次に、暗号通信復号装置3は、イニシエータから送信されたIKEパケットS5を通信インターフェース11により受信し(ステップST1)、IKEパケットと判定して(ステップST2)、図4に示すIKE処理に移行する(ステップST3)。
"Fifth process"
Next, the encryption communication decryption apparatus 3 receives the IKE packet S5 transmitted from the initiator by the communication interface 11 (step ST1), determines that it is an IKE packet (step ST2), and shifts to the IKE process shown in FIG. (Step ST3).

このIKE処理は、先ずステップST11において、通信インターフェース11で受信したIKEパケットS5に含まれるデータが暗号化されているかをパケット復号部15で判定する。この場合、IKEパケットS5が暗号化されているので、ステップST12に処理を進め、パケット復号部15により、有効IKESAの暗号アルゴリズムを使用して、セッション鍵保持部26に記憶しておいたイニシエータのIKE用セッション鍵を使用して復号して、パケット読取部16に出力して、ステップST13に処理を進める。   In this IKE process, first, in step ST11, the packet decrypting unit 15 determines whether the data included in the IKE packet S5 received by the communication interface 11 is encrypted. In this case, since the IKE packet S5 is encrypted, the process proceeds to step ST12, and the packet decrypting unit 15 uses the valid IKESA encryption algorithm to store the initiator stored in the session key holding unit 26. Decryption is performed using the IKE session key, and it is output to the packet reading unit 16, and the process proceeds to step ST13.

ステップST13においては、パケット読取部16により、IKEパケットS5のIDペイロードからイニシエータのIDiiを取り出して、セッション情報保持部18に記憶させる。   In step ST13, the packet reading unit 16 extracts the IDii of the initiator from the ID payload of the IKE packet S5 and stores it in the session information holding unit 18.

次に、パケット読取部16により、IKEパケットS5のISAKMPヘッダより後に、鍵交換ペイロードが含まれているか否か(ステップST14)、乱数ペイロードNrが含まれているか否か(ステップST18)、ハッシュペイロードが含まれているか否かを判定する(ステップST20)。そして、パケット読取部16は、鍵交換ペイロード、乱数ペイロードNrの何れも含まれておらず、ハッシュペイロードが含まれているので、ステップST15〜ステップST17、及びステップST19の処理を行わずに、ステップST21に処理を進める。   Next, the packet reading unit 16 determines whether a key exchange payload is included after the ISAKMP header of the IKE packet S5 (step ST14), whether a random number payload Nr is included (step ST18), a hash payload Is included (step ST20). The packet reading unit 16 does not include either the key exchange payload or the random number payload Nr, but includes the hash payload. Therefore, the packet reading unit 16 does not perform the processing of Step ST15 to Step ST17 and Step ST19. The process proceeds to ST21.

ステップST21においては、パケット生成部17によって、パケット読取部16に保持するIKEパケットS5のハッシュペイロードが含むハッシュ値HASH_Iを、レスポンダ側のセッション情報によって再計算したハッシュ値に変更したIKEパケットS5’を作成する。このとき、ハッシュ値は、パケット生成部17により、SKEYIDと、公開鍵保持部19で保持するレスポンダに送信したレスポンダ側の公開鍵gx’、レスポンダの公開鍵g、セッション情報保持部18に保存しているイニシエータクッキー、レスポンダクッキー、IKEパケットS1のSAペイロードの値、イニシエータのIDiiを用いて、有効IKESAのハッシュアルゴリズムを使用して生成する。 In step ST21, the IKE packet S5 ′ obtained by changing the hash value HASH_I included in the hash payload of the IKE packet S5 held in the packet reading unit 16 to the hash value recalculated by the session information on the responder by the packet generation unit 17 is obtained. create. At this time, the hash value is stored by the packet generation unit 17 in the SKEYID, the responder-side public key g x ′ transmitted to the responder held in the public key holding unit 19, the responder public key g y , and the session information holding unit 18. Using the stored initiator cookie, responder cookie, SA payload value of the IKE packet S1, and the IDii of the initiator, it is generated using a valid IKESA hash algorithm.

次のステップST22においては、先のステップST12でパケット復号部15による復号を行っているので、ステップST23に処理を進める。このステップST23においては、パケット暗号化部27により、有効IKESAの暗号アルゴリズムを使用して、レスポンダのIKE用セッション鍵をセッション鍵保持部26から読み出し、当該IKE用セッション鍵を用いてステップST21で作成したIKEパケットS5’を暗号化する。   In the next step ST22, since the packet decoding unit 15 performs decoding in the previous step ST12, the process proceeds to step ST23. In this step ST23, the packet encryption unit 27 reads the responder's IKE session key from the session key holding unit 26 using the effective IKESA encryption algorithm, and creates it in step ST21 using the IKE session key. The IKE packet S5 ′ is encrypted.

そして、暗号通信復号装置3は、暗号化したIKEパケットS5’を通信インターフェース12からレスポンダに送信させる(ステップST6)。   Then, the encrypted communication decryption apparatus 3 transmits the encrypted IKE packet S5 'from the communication interface 12 to the responder (step ST6).

レスポンダは、IKEパケットS5’を受信すると、IKEパケットS5’をIKE用セッション鍵で復号し、イニシエータがIKEパケットS5を作成する場合と同じ処理を行ってハッシュ値を計算し、IKEパケットS5’のハッシュペイロードに含まれるハッシュ値HASH_Iと比較する。これらの値は同一であるため、レスポンダは、イニシエータとのIKE処理において成りすましや改ざんが無かったものと判断する。   When the responder receives the IKE packet S5 ′, the responder decrypts the IKE packet S5 ′ with the IKE session key, performs the same processing as when the initiator creates the IKE packet S5, calculates the hash value, and The hash value HASH_I included in the hash payload is compared. Since these values are the same, the responder determines that there has been no impersonation or tampering in the IKE process with the initiator.

次に、レスポンダは、自身のIDであるIDirを含むIDペイロード及びハッシュ値を含むハッシュペイロードを作成する。このとき、レスポンダは、RFC2409に従ったSKEYID、レスポンダの公開鍵g、イニシエータクッキー、レスポンダクッキー、SAペイロード、イニシエータのIDペイロードを用いて、有効IKESAで設定されたハッシュアルゴリズムで計算を行うことにより、ハッシュ値HASH_Rを含むハッシュペイロードを作成する。そして、レスポンダは、ハッシュペイロード及びIDペイロードをIKE用セッション鍵で暗号化したIKEパケットS6を送信する。 Next, the responder creates an ID payload including IDir, which is its own ID, and a hash payload including a hash value. In this case, responder, SKEYID according to RFC2409, public key g y of the responder, the initiator cookie, responder cookie, SA payload, using the ID payload of the initiator, by performing the calculation with the set hash algorithms enable IKESA , A hash payload including the hash value HASH_R is created. Then, the responder transmits an IKE packet S6 in which the hash payload and the ID payload are encrypted with the IKE session key.

「第6処理」
次に、暗号通信復号装置3は、レスポンダから送信されたIKEパケットS6を通信インターフェース11により受信し(ステップST1)、IKEパケットと判定して(ステップST2)、図4に示すIKE処理に移行する(ステップST3)。
"Sixth process"
Next, the encryption communication decryption apparatus 3 receives the IKE packet S6 transmitted from the responder via the communication interface 11 (step ST1), determines that it is an IKE packet (step ST2), and shifts to the IKE process shown in FIG. (Step ST3).

このIKE処理は、先ずステップST11において、通信インターフェース11で受信したIKEパケットS6に含まれるデータが暗号化されているかをパケット復号部15で判定する。この場合、IKEパケットS6が暗号化されているので、セッション鍵保持部26に記憶されているレスポンダのセッション鍵を用いて、有効IKESAの暗号アルゴリズムを使用して、IKEパケットS6をパケット復号部15により復号して(ステップST12)、ステップST13に処理を進める。   In this IKE process, first, in step ST11, the packet decrypting unit 15 determines whether the data included in the IKE packet S6 received by the communication interface 11 is encrypted. In this case, since the IKE packet S6 is encrypted, the IKE packet S6 is converted into the packet decryption unit 15 using the valid IKESA encryption algorithm using the responder session key stored in the session key holding unit 26. (Step ST12), and the process proceeds to step ST13.

ステップST13においては、パケット読取部16により、IKEパケットS6のIDペイロードからレスポンダのIDirを取り出してセッション情報保持部18に記憶させる。   In step ST13, the packet reading unit 16 extracts the responder IDir from the ID payload of the IKE packet S6 and stores it in the session information holding unit 18.

次に、パケット読取部16により、IKEパケットS6のISAKMPヘッダより後に、鍵交換ペイロードが含まれているか否か(ステップST14)、乱数ペイロードNrが含まれているか否か(ステップST18)、ハッシュペイロードが含まれているか否かを判定する(ステップST20)。この場合、IKEパケットS6には、鍵交換ペイロード、乱数ペイロードNrの何れも含まれておらず、ハッシュペイロードが含まれているので、ステップST15〜ステップST17、及びステップST19の処理を行わずに、ステップST21に処理を進める。   Next, the packet reading unit 16 determines whether the key exchange payload is included after the ISAKMP header of the IKE packet S6 (step ST14), whether the random number payload Nr is included (step ST18), the hash payload Is included (step ST20). In this case, the IKE packet S6 does not include either the key exchange payload or the random number payload Nr, and includes the hash payload. Therefore, without performing the processing of step ST15 to step ST17 and step ST19, The process proceeds to step ST21.

ステップST21においては、パケット生成部17によって、パケット読取部16に保持するIKEパケットS6のハッシュペイロードが含むハッシュ値HASH_Rを、イニシエータ側のセッション情報によって再計算したハッシュ値に変更したIKEパケットS6’を作成する。このとき、ハッシュ値は、パケット生成部17により、SKEYIDと、公開鍵保持部19に記憶されているイニシエータ側の公開鍵gy’、イニシエータの公開鍵g、セッション情報保持部18に保存しているイニシエータクッキー、レスポンダクッキー、IKEパケットS1のSAペイロードの値、先のステップST13で記憶したレスポンダのIDirから、有効IKESAのハッシュアルゴリズムを使用して生成する。 In step ST21, the packet generation unit 17 changes the hash value HASH_R included in the hash payload of the IKE packet S6 held in the packet reading unit 16 to the hash value recalculated by the session information on the initiator side. create. At this time, the hash value is saved by the packet generation unit 17 in the SKEYID, the initiator-side public key g y ′ stored in the public key holding unit 19, the initiator public key g x , and the session information holding unit 18. From the initiator cookie, the responder cookie, the SA payload value of the IKE packet S1, and the IDir of the responder stored in the previous step ST13, the valid IKESA hash algorithm is used.

次のステップST22においては、先のステップST12でパケット復号部15による復号を行っているので、ステップST23に処理を進める。このステップST23においては、パケット暗号化部27により、有効IKESAの暗号アルゴリズムを使用して、イニシエータのIKE用セッション鍵をセッション鍵保持部26から読み出し、当該IKE用セッション鍵を用いてステップST21で作成したIKEパケットS6’を暗号化する。   In the next step ST22, since the packet decoding unit 15 performs decoding in the previous step ST12, the process proceeds to step ST23. In this step ST23, the packet encryption unit 27 reads the initiator IKE session key from the session key holding unit 26 using the effective IKESA encryption algorithm, and creates it in step ST21 using the IKE session key. The encrypted IKE packet S6 ′ is encrypted.

そして、暗号通信復号装置3は、暗号化したIKEパケットS6’を通信インターフェース12からイニシエータに送信させる(ステップST6)。   Then, the encrypted communication decryption apparatus 3 transmits the encrypted IKE packet S6 'from the communication interface 12 to the initiator (step ST6).

イニシエータは、IKEパケットS6’を受信すると、IKEパケットS6’をIKE用セッション鍵で復号し、レスポンダがIKEパケットS6を作成する場合と同じ処理を行ってハッシュ値を計算し、IKEパケットS6’のハッシュペイロードに含まれるHASH_Rと比較する。これらの値は同一であるため、イニシエータは、レスポンダとのIKE処理において成りすましや改ざんが無かったものと判断する。   When the initiator receives the IKE packet S6 ′, the initiator decrypts the IKE packet S6 ′ with the IKE session key, calculates the hash value by performing the same process as when the responder creates the IKE packet S6, and the IKE packet S6 ′ Compare with HASH_R included in the hash payload. Since these values are the same, the initiator determines that there has been no impersonation or tampering in the IKE process with the responder.

これにより、イニシエータとレスポンダとの間で通信相手を認証が完了したことになり、第1フェーズを終了する。   As a result, the communication partner has been authenticated between the initiator and the responder, and the first phase ends.

次に、第1フェーズに続いて、ESP処理のSAの折衝及びESP処理内で使用するESP用セッション鍵の交換を行う第2フェーズに移行する。なお、以下に説明する第2フェーズは、第1フェーズで確立されたIKE処理のSAに従って、クイックモードと呼ばれる処理を行う場合について説明する。   Next, following the first phase, the process proceeds to the second phase in which the negotiation of the SA for the ESP process and the exchange of the ESP session key used in the ESP process are performed. In the second phase described below, a case where a process called a quick mode is performed according to the SA of the IKE process established in the first phase will be described.

このクイックモードの第2フェーズは、先ず、イニシエータが、ハッシュペイロード、SAペイロード、乱数ペイロードNiを含むIKEパケットS7を送信する。   In the second phase of the quick mode, first, the initiator transmits an IKE packet S7 including a hash payload, an SA payload, and a random number payload Ni.

このハッシュペイロードは、第1フェーズで求めたSKEYID_a、ISAKMPヘッダのメッセージID、SAペイロード、乱数ペイロードNiから、第1フェーズの有効IKESAのハッシュアルゴリズムで計算したハッシュ値HASH(1)を含む。また、SAペイロードは、ESPペイロードを暗号化するための暗号アルゴリズム、認証データを生成するためのハッシュアルゴリズム、ESP用セッション鍵の有効期限等のIPsecにおける折衝データの組(以下、IPsecSA)を1つ以上と、後述のESPパケットの受信時にESP用セッション鍵を選択するためのインデックス値(セキュリティパラメータインデックス:SPI)を含む。また、乱数ペイロードNiは、新たに生成したイニシエータの乱数Ni_bを含む。そして、イニシエータは、有効IKESAの暗号アルゴリズムによって、IKE用セッション鍵SKEYID_eを用いて、ISAKMPヘッダより後の部分を暗号化して、IKEパケットS7を作成する。   The hash payload includes a hash value HASH (1) calculated by the first-phase valid IKESA hash algorithm from SKEYID_a obtained in the first phase, the message ID of the ISAKMP header, the SA payload, and the random number payload Ni. The SA payload is one set of negotiated data (hereinafter referred to as IPsec SA) in IPsec, such as an encryption algorithm for encrypting the ESP payload, a hash algorithm for generating authentication data, and an expiration date of the ESP session key. The above includes an index value (security parameter index: SPI) for selecting an ESP session key when an ESP packet described later is received. The random number payload Ni includes a newly generated random number Ni_b of the initiator. Then, the initiator encrypts the portion after the ISAKMP header using the IKE session key SKEYID_e by the effective IKESA encryption algorithm, and creates the IKE packet S7.

「第7処理」
次に、暗号通信復号装置3は、IKEパケットS7を通信インターフェース11で受信すると、当該IKEパケットS7をパケット復号部15に送り、IKEパケットS7が暗号化されているか否かを判定する(ステップST11)。この場合、IKEパケットS7が暗号化されているので、パケット復号部15により復号を行う(ステップST12)。このとき、パケット復号部15は、第1フェーズの有効IKESAで設定された暗号アルゴリズムに従って、セッション鍵保持部26に記憶されているイニシエータのIKE用セッション鍵SKEYID_eを使用してIKEパケットS7を復号して、パケット読取部16に出力する。
"Seventh process"
Next, when the IKE packet S7 is received by the communication interface 11, the encryption communication decryption apparatus 3 sends the IKE packet S7 to the packet decryption unit 15 and determines whether or not the IKE packet S7 is encrypted (step ST11). ). In this case, since the IKE packet S7 is encrypted, the packet decrypting unit 15 performs decryption (step ST12). At this time, the packet decryption unit 15 decrypts the IKE packet S7 using the IKE session key SKEYID_e of the initiator stored in the session key holding unit 26 in accordance with the encryption algorithm set in the valid IKESA of the first phase. To the packet reading unit 16.

次のステップST13においては、パケット読取部16により、IKEパケットS7に含まれるSAペイロード、乱数Ni_bを含む乱数ペイロードを取り出して、セッション情報保持部18に記憶させる。   In the next step ST13, the packet reading unit 16 extracts the SA payload included in the IKE packet S7 and the random number payload including the random number Ni_b, and stores them in the session information holding unit 18.

次に、パケット読取部16により、IKEパケットS7のISAKMPヘッダより後に、鍵交換ペイロードが含まれているか否か(ステップST14)、乱数ペイロードが含まれているか否か(ステップST18)、ハッシュペイロードが含まれているか否かを判定する(ステップST20)。この場合、IKEパケットS7には、鍵交換ペイロード及び乱数ペイロードNrが含まれておらず、ハッシュペイロードが含まれているので、ステップST15〜ステップST17、ステップST19の処理を行わずに、ステップST21に移行する。   Next, the packet reading unit 16 determines whether a key exchange payload is included after the ISAKMP header of the IKE packet S7 (step ST14), whether a random number payload is included (step ST18), and whether the hash payload is It is determined whether it is included (step ST20). In this case, the IKE packet S7 does not include the key exchange payload and the random number payload Nr, but includes the hash payload. Therefore, the processing in step ST15 to step ST17 and step ST19 is not performed, and the process returns to step ST21. Transition.

ステップST21においては、パケット生成部17により、パケット読取部16に保持するIKEパケットS7のハッシュペイロードのハッシュ値HASH(1)を、レスポンダ側の情報によって再計算したハッシュ値に変更したIKEパケットS7’を生成して、パケット暗号化部27に出力する。このとき、パケット生成部17は、セッション鍵保持部26に記憶しているレスポンダのIKE用セッション鍵SKEYID_a、ISAKMPヘッダのメッセージID、先のステップST13で記憶したIKEパケットS7のSAペイロード及び乱数Ni_bを用いて、有効IKESAのハッシュアルゴリズムを使用して再計算を行って、新たなハッシュ値HASH(1)を生成する。   In step ST21, the packet generation unit 17 changes the hash value HASH (1) of the hash payload of the IKE packet S7 held in the packet reading unit 16 to the hash value recalculated by the information on the responder side. Is output to the packet encryption unit 27. At this time, the packet generation unit 17 receives the IKE session key SKEYID_a of the responder stored in the session key holding unit 26, the message ID of the ISAKMP header, the SA payload of the IKE packet S7 stored in the previous step ST13, and the random number Ni_b. And recalculate using a valid IKESA hash algorithm to generate a new hash value HASH (1).

次のステップST22においては、パケット読取部16により、先のステップST12にてIKEパケットS7を復号しているので、ステップST23に処理を進める。このステップST23においては、セッション鍵保持部26に記憶されているレスポンダのIKE用セッション鍵を用いてIKEパケットS7’を暗号化して、通信インターフェース12に出力する。   In the next step ST22, since the packet reading unit 16 has decoded the IKE packet S7 in the previous step ST12, the process proceeds to step ST23. In step ST 23, the IKE packet S 7 ′ is encrypted using the responder's IKE session key stored in the session key holding unit 26, and is output to the communication interface 12.

そして、暗号通信復号装置3は、暗号化したIKEパケットS7’を通信インターフェース12からレスポンダに送信させる(ステップST6)。   Then, the encryption / decryption device 3 transmits the encrypted IKE packet S7 'from the communication interface 12 to the responder (step ST6).

レスポンダは、IKEパケットS7’を受信すると、イニシエータがIKEパケットS7を作成する場合と同じ処理を行ってハッシュ値を計算し、IKEパケットS7’のハッシュペイロードに含まれるハッシュ値HASH(1)と比較する。これらの値は同一であるため、レスポンダは、イニシエータとのIKE処理において成りすましや改ざんが無かったものと判断する。   When the responder receives the IKE packet S7 ′, the responder calculates the hash value by performing the same process as when the initiator creates the IKE packet S7, and compares it with the hash value HASH (1) included in the hash payload of the IKE packet S7 ′. To do. Since these values are the same, the responder determines that there has been no impersonation or tampering in the IKE process with the initiator.

次に、レスポンダは、IKEパケットS7’のSAペイロードに含まれているIPsecSAの組の中から1つのIPsecSAを選択して、当該選択したIPsecSA(有効IPsecSA)及びSPI値を含んだSAペイロードを作成すると共に、新たに生成した乱数Nr_bを含む乱数ペイロードを作成する。そして、レスポンダは、IKE用セッション鍵SKEYID_aと、IKEパケットS7’のISAKMPヘッダに含まれるメッセージID及び乱数ペイロードに含まれる乱数Ni_bと、作成したSAペイロード及び乱数ペイロードから、ハッシュ値HASH(2)を計算して、当該HASH(2)を含むハッシュペイロードを作成する。   Next, the responder selects one IPsec SA from the set of IPsec SAs included in the SA payload of the IKE packet S7 ′, and creates an SA payload including the selected IPsec SA (valid IPsec SA) and SPI value. In addition, a random number payload including a newly generated random number Nr_b is created. Then, the responder obtains the hash value HASH (2) from the IKE session key SKEYID_a, the message ID included in the ISAKMP header of the IKE packet S7 ′, the random number Ni_b included in the random number payload, and the created SA payload and random number payload. Calculate to create a hash payload containing the HASH (2).

そして、レスポンダは、ISAKMPヘッダより後の部分を、有効IKESAの暗号アルゴリズムによって、IKE用セッション鍵で暗号化して、ハッシュペイロード、SAペイロード、乱数ペイロードNrを含むIKEパケットS8を送信する。   Then, the responder encrypts the part after the ISAKMP header with the IKE session key using the effective IKESA encryption algorithm, and transmits the IKE packet S8 including the hash payload, the SA payload, and the random number payload Nr.

また、レスポンダは、SKEYID_d、IKEパケットS7’に含まれる有効IPsecSAのプロトコルフィールド、イニシエータ及びレスポンダのSPIフィールドの値、及び乱数Ni_b、乱数Nr_bを用いて、有効IKESAのハッシュアルゴリズムでESP用セッション鍵であるKEYMATを生成する。   The responder uses the EKEY session key with the effective IKESA hash algorithm using the SKEYID_d, the valid IPsecSA protocol field included in the IKE packet S7 ', the initiator and responder SPI field values, and the random numbers Ni_b and Nr_b. A certain KEYMAT is generated.

「第8処理」
次に、暗号通信復号装置3は、IKEパケットS8を通信インターフェース11で受信すると、当該IKEパケットS8をパケット復号部15に送り、IKEパケットS8が暗号化されているか否かを判定する(ステップST11)。この場合、IKEパケットS8が暗号化されているので、パケット復号部15により復号を行う(ステップST12)。このとき、パケット復号部15は、第1フェーズの有効IKESAで設定された暗号アルゴリズムに従って、セッション鍵保持部26に記憶されているレスポンダのIKE用セッション鍵SKEYID_eを使用してIKEパケットS8を復号して、パケット読取部16に出力する。
"Eighth process"
Next, when the communication interface 11 receives the IKE packet S8, the encryption communication decryption apparatus 3 sends the IKE packet S8 to the packet decryption unit 15 and determines whether or not the IKE packet S8 is encrypted (step ST11). ). In this case, since the IKE packet S8 is encrypted, the packet decrypting unit 15 performs decryption (step ST12). At this time, the packet decryption unit 15 decrypts the IKE packet S8 using the responder IKE session key SKEYID_e stored in the session key holding unit 26 in accordance with the encryption algorithm set in the first phase valid IKESA. To the packet reading unit 16.

次のステップST13においては、パケット読取部16により、IKEパケットS8のSAペイロードに含まれる有効IPsecSA及び乱数ペイロードに含まれる乱数Nr_bを取り出して、セッション情報保持部18に記憶させる。   In the next step ST13, the packet reading unit 16 extracts the valid IPsec SA included in the SA payload of the IKE packet S8 and the random number Nr_b included in the random number payload, and stores them in the session information holding unit 18.

次に、パケット読取部16により、IKEパケットS8のISAKMPヘッダより後に、鍵交換ペイロードが含まれているか否か(ステップST14)、乱数ペイロードNrが含まれているか否か(ステップST18)、ハッシュペイロードが含まれているか否かを判定する(ステップST20)。この場合、IKEパケットS8には、鍵交換ペイロードが含まれておらず、乱数ペイロードNr及びハッシュペイロードが含まれているので、ステップST15〜ステップST17の処理を行わずに、ステップST19及びステップST21に移行する。   Next, the packet reading unit 16 determines whether or not the key exchange payload is included after the ISAKMP header of the IKE packet S8 (step ST14), whether or not the random number payload Nr is included (step ST18), and the hash payload. Is included (step ST20). In this case, the IKE packet S8 does not include the key exchange payload, but includes the random number payload Nr and the hash payload. Therefore, the processing in steps ST15 to ST17 is not performed, and steps ST19 and ST21 are performed. Transition.

ステップST19においては、セッション鍵生成部21により、RFC2409に従って、ESP用セッション鍵を生成する。このとき、セッション鍵生成部21は、先ずセッション鍵保持部26に記憶しているイニシエータのIKE用セッション鍵SKEYID_d、セッション情報保持部18に記憶している有効IPsecSAのプロトコルフィールド、SPIフィールドの値、乱数Ni_b及び乱数Nr_bを読み出し、有効IKESAのハッシュアルゴリズムを使用して、イニシエータのESP用セッション鍵KEYMATを生成して、セッション鍵保持部26に保存する。   In step ST19, the session key generation unit 21 generates an ESP session key in accordance with RFC2409. At this time, the session key generation unit 21 firstly stores the IKE session key SKEYID_d of the initiator stored in the session key storage unit 26, the valid IPsec SA protocol field stored in the session information storage unit 18, the value of the SPI field, The random number Ni_b and the random number Nr_b are read out, and an ESP session key KEYMAT for the initiator is generated using a valid IKESA hash algorithm and stored in the session key holding unit 26.

同様に、セッション鍵生成部21は、セッション鍵保持部26に保持しているレスポンダのIKE用セッション鍵SKEYID_d、セッション情報保持部18に記憶している有効IPsecSAのプロトコルフィールド、SPIフィールドの値、乱数Ni_b、乱数Nr_bを読み出し、有効IKESAのハッシュアルゴリズムを使用して、レスポンダのESP用セッション鍵KEYMATを生成して、セッション鍵保持部26に保存する。   Similarly, the session key generation unit 21 includes a responder IKE session key SKEYID_d held in the session key holding unit 26, a valid IPsec SA protocol field stored in the session information holding unit 18, a value of the SPI field, and a random number. The Ni_b and the random number Nr_b are read, and the responder's ESP session key KEYMAT is generated using a valid IKESA hash algorithm and stored in the session key holding unit 26.

続くステップST21においては、パケット生成部17により、パケット読取部16に保持するIKEパケットS8のハッシュペイロードが含むハッシュ値HASH(2)を、イニシエータ側の情報によって再計算したハッシュ値に変更したIKEパケットS8’を生成して、パケット暗号化部27に出力する。このとき、パケット生成部17は、セッション鍵保持部26に記憶しているイニシエータのIKE用セッション鍵SKEYID_aと、ISAKMPヘッダのメッセージID、セッション情報保持部18に保存したイニシエータの乱数Ni_b、SAペイロード、レスポンダの乱数Nr_bを読み出し、有効IKESAのハッシュアルゴリズムを使用してハッシュ値を再計算する。   In subsequent step ST21, the packet generation unit 17 changes the hash value HASH (2) included in the hash payload of the IKE packet S8 held in the packet reading unit 16 to the hash value recalculated by the information on the initiator side. S8 ′ is generated and output to the packet encryption unit 27. At this time, the packet generation unit 17 stores the IKE session key SKEYID_a of the initiator stored in the session key holding unit 26, the message ID of the ISAKMP header, the random number Ni_b of the initiator stored in the session information holding unit 18, the SA payload, The responder random number Nr_b is read, and the hash value is recalculated using the hash algorithm of the effective IKESA.

次のステップST22においては、パケット読取部16により、先のステップST12にてIKEパケットS8を復号しているので、ステップST23に処理を進める。このステップST23においては、セッション鍵保持部26に記憶されているイニシエータのIKE用セッション鍵を用いてIKEパケットS8’を暗号化して、通信インターフェース12に出力する。   In the next step ST22, since the packet reading unit 16 has decoded the IKE packet S8 in the previous step ST12, the process proceeds to step ST23. In this step ST 23, the IKE packet S 8 ′ is encrypted using the IKE session key of the initiator stored in the session key holding unit 26 and output to the communication interface 12.

そして、暗号通信復号装置3は、暗号化したIKEパケットS8’を通信インターフェース12からイニシエータに送信させる(ステップST6)。   Then, the encrypted communication decryption apparatus 3 transmits the encrypted IKE packet S8 'from the communication interface 12 to the initiator (step ST6).

イニシエータは、IKEパケットS8’を受信すると、レスポンダがIKEパケットS8を作成する場合と同じ処理を行ってハッシュ値を計算し、IKEパケットS8’のハッシュペイロードに含まれるハッシュ値HASH(2)と比較する。これらの値は同一であるため、イニシエータは、レスポンダとのIKE処理において成りすましや改ざんが無かったものと判断する。   When the initiator receives the IKE packet S8 ′, the initiator performs the same process as when the responder creates the IKE packet S8, calculates the hash value, and compares it with the hash value HASH (2) included in the hash payload of the IKE packet S8 ′. To do. Since these values are the same, the initiator determines that there has been no impersonation or tampering in the IKE process with the responder.

次に、イニシエータは、SKEYID_aと、受信したIKEパケットS8’のISAKMPヘッダのメッセージID、自身で生成した乱数Ni_b、及び受信したIKEパケットS8’の乱数ペイロードに含まれる乱数Nr_bから、有効IKESAのハッシュアルゴリズムでハッシュ値HASH(3)を計算し、当該HASH(3)を含むハッシュペイロードを作成する。そして、イニシエータは、作成したハッシュペイロードを含むIKEパケットを作成し、当該ハッシュペイロード部分をIKE用セッション鍵で暗号化したIKEパケットS9を送信する。   Next, the initiator uses the effective IKESA hash from SKEYID_a, the message ID of the ISAKMP header of the received IKE packet S8 ′, the random number Ni_b generated by itself, and the random number Nr_b included in the random number payload of the received IKE packet S8 ′. A hash value HASH (3) is calculated by an algorithm, and a hash payload including the HASH (3) is created. Then, the initiator creates an IKE packet including the created hash payload, and transmits an IKE packet S9 obtained by encrypting the hash payload portion with the IKE session key.

また、イニシエータは、SKEYID_d、IKEパケットS8’に含まれる有効IPsecSAのプロトコルフィールド、イニシエータ及びレスポンダのSPIフィールドの値、及び乱数Ni_b、乱数Nr_bを用いて、有効IKESAのハッシュアルゴリズムを使用して、ESP用セッション鍵であるKEYMATを生成する。   In addition, the initiator uses the effective IKESA hash algorithm using SKEYID_d, the valid IPsecSA protocol field included in the IKE packet S8 ′, the initiator and responder SPI field values, the random number Ni_b, and the random number Nr_b, KEYMAT, which is a session key for use, is generated.

「第9処理」
次に、暗号通信復号装置3は、IKEパケットS9を通信インターフェース11で受信すると、当該IKEパケットS9をパケット復号部15に送り、IKEパケットS9が暗号化されているか否かを判定する(ステップST11)。この場合、IKEパケットS9が暗号化されているので、ステップST12において、パケット復号部15により、有効IKESAの暗号アルゴリズムを使用して、セッション鍵保持部26に記憶されているイニシエータのIKE用セッション鍵で復号する。次のステップST13においては、パケット読取部16により、IKEパケットS9にセッション情報保持部18に記憶するデータが含まれていないと判断して、次のステップST14に処理を進める。
"9th process"
Next, when the IKE packet S9 is received by the communication interface 11, the encryption communication decryption apparatus 3 sends the IKE packet S9 to the packet decryption unit 15 and determines whether or not the IKE packet S9 is encrypted (step ST11). ). In this case, since the IKE packet S9 is encrypted, in step ST12, the packet decrypting unit 15 uses the effective IKESA encryption algorithm to store the IKE session key of the initiator stored in the session key holding unit 26. Decrypt with. In the next step ST13, the packet reading unit 16 determines that the IKE packet S9 does not contain data to be stored in the session information holding unit 18, and proceeds to the next step ST14.

次に、パケット読取部16により、IKEパケットS9のISAKMPヘッダより後に、鍵交換ペイロードが含まれているか否か(ステップST14)、レスポンダが送信した乱数ペイロードNrが含まれているか否か(ステップST18)、ハッシュペイロードが含まれているか否かを判定する(ステップST20)。この場合、IKEパケットS9には、鍵交換ペイロード及びレスポンダが送信した乱数ペイロードNrが含まれておらず、ハッシュペイロードが含まれているので、ステップST15〜ステップST17、ステップST19の処理を行わずに、ステップST21に移行する。   Next, the packet reading unit 16 determines whether the key exchange payload is included after the ISAKMP header of the IKE packet S9 (step ST14), and whether the random number payload Nr transmitted by the responder is included (step ST18). ), It is determined whether or not a hash payload is included (step ST20). In this case, the IKE packet S9 does not include the key exchange payload and the random number payload Nr transmitted by the responder, and does not include the hash payload. Therefore, the processing in steps ST15 to ST17 and ST19 is not performed. The process proceeds to step ST21.

ステップST21においては、パケット生成部17により、IKEパケットS9のハッシュペイロードに含まれるハッシュ値を、レスポンダのセッション情報によって再計算したハッシュ値に変更したIKEパケットS9’を生成して、パケット暗号化部27に出力する。このとき、パケット生成部17は、セッション鍵保持部26に記憶しているレスポンダのIKE用セッション鍵SKEYID_a、ISAKMPヘッダのメッセージID、セッション情報保持部18で保持している乱数Ni_b、乱数Nr_bを用いて、有効IKESAのハッシュアルゴリズムを使用して再計算を行って、新たなハッシュ値HASH(3)を生成する。   In step ST21, the packet generation unit 17 generates an IKE packet S9 ′ in which the hash value included in the hash payload of the IKE packet S9 is changed to a hash value recalculated by the responder session information, and the packet encryption unit 27. At this time, the packet generation unit 17 uses the IKE session key SKEYID_a of the responder stored in the session key holding unit 26, the message ID of the ISAKMP header, the random number Ni_b and the random number Nr_b held in the session information holding unit 18. Then, recalculation is performed using the effective IKESA hash algorithm to generate a new hash value HASH (3).

次のステップST22においては、パケット暗号化部27により、先のステップST12で復号を行っているのでステップST23に処理を進め、セッション鍵保持部26からレスポンダのIKE用セッション鍵を読み出して、IKEパケットS9’を暗号化して、レスポンダに送信する。   In the next step ST22, since the packet encryption unit 27 performs the decryption in the previous step ST12, the process proceeds to step ST23, the IKE session key of the responder is read from the session key holding unit 26, and the IKE packet is read. S9 ′ is encrypted and transmitted to the responder.

レスポンダは、IKEパケットS9’を受信すると、イニシエータがIKEパケットS9を作成する場合と同じ処理を行ってハッシュ値を計算し、IKEパケットS9’のハッシュペイロードに含まれるハッシュ値HASH(3)と比較する。これらの値は同一であるため、レスポンダは、イニシエータとのIKE処理において成りすましや改ざんが無かったものと判断する。   When the responder receives the IKE packet S9 ′, the responder calculates the hash value by performing the same processing as when the initiator creates the IKE packet S9, and compares it with the hash value HASH (3) included in the hash payload of the IKE packet S9 ′. To do. Since these values are the same, the responder determines that there has been no impersonation or tampering in the IKE process with the initiator.

これにより、イニシエータとレスポンダとの間でESP用セッション鍵の交換が完了すると共に、暗号通信復号装置3にイニシエータのESP用セッション鍵及びレスポンダのESP用セッション鍵が記憶された状態となり、第2フェーズを終了する。   As a result, the exchange of the ESP session key between the initiator and the responder is completed, and the encryption communication decryption apparatus 3 stores the initiator ESP session key and the responder ESP session key in the second phase. Exit.

なお、ESP用セッション鍵には、IPsecSAで設定されたセッション鍵の有効期限が存在し、当該有効期限前に、再度第2フェーズを実行することで、新しいESP用セッション鍵を生成することになる。また、IKE用セッション鍵には、IKESAで設定されたセッション鍵の有効期限が存在し、当該有効期限前に、再度第1フェーズを実行することで、新しいIKE用セッション鍵を生成することになる。   The session key for ESP has an expiration date for the session key set by IPsec SA, and a new ESP session key is generated by executing the second phase again before the expiration date. . In addition, the IKE session key has an expiration date for the session key set by IKESA, and a new IKE session key is generated by executing the first phase again before the expiration date. .

「ESP処理」
通信システムは、上述したIKE処理の後、ESP用セッション鍵を用いてデータを暗号化してVPN端末1とVPN端末2との間で通信を行うESP処理が可能となる。なお、このESP処理は、図6に示すような番号「10」で示した処理から番号「11」で示した処理を行うものである。
"ESP processing"
The communication system can perform ESP processing in which data is encrypted using the ESP session key and communication is performed between the VPN terminal 1 and the VPN terminal 2 after the IKE processing described above. In this ESP process, the process indicated by the number “11” is performed from the process indicated by the number “10” as shown in FIG.

具体的には、VPN端末1がVPN端末2にデータを送信する場合、VPN端末1は、VPN端末2に送信するデータを、TCP(Transmission Control Protocol)等の任意のプロトコルによってカプセル化したデータを作成する。   Specifically, when the VPN terminal 1 transmits data to the VPN terminal 2, the VPN terminal 1 encapsulates the data to be transmitted to the VPN terminal 2 using any protocol such as TCP (Transmission Control Protocol). create.

続いて、VPN端末1は、RFC2406で定義されている手順に従って、IPパケットの末尾にESPトレイラを追加し、第2フェーズで選択されたIPsecSAの暗号アルゴリズムのブロック長の整数倍とし、当該暗号アルゴリズムに従って、ESP用セッション鍵で暗号化する。そして、暗号化したデータの先頭にESPヘッダを追加し、当該ESPヘッダの先頭に、宛先をVPN端末2のIPアドレス、送信元をVPN端末1のIPアドレスとしたIPヘッダを追加することにより、ESPパケットS10を作成して送信する。なお、ESPヘッダのSPIフィールドには、VPN端末2がIKEの第2フェーズで送信したSAペイロードのSPIフィールドの値をコピーして格納する。   Subsequently, the VPN terminal 1 adds an ESP trailer to the end of the IP packet in accordance with the procedure defined in RFC 2406, and sets the integral multiple of the block length of the IPsec SA encryption algorithm selected in the second phase. To encrypt with the session key for ESP. Then, an ESP header is added to the head of the encrypted data, and an IP header having the destination as the IP address of the VPN terminal 2 and the source as the IP address of the VPN terminal 1 is added to the head of the ESP header. An ESP packet S10 is created and transmitted. In the SPI field of the ESP header, the value of the SPI field of the SA payload transmitted by the VPN terminal 2 in the second phase of IKE is copied and stored.

次に、暗号通信復号装置3は、VPN端末1からESPパケットS10を受信すると(ステップST1)、当該ESPパケットS10のIPヘッダを参照して、IKEパケットではないと判定し(ステップST2)、ESPパケットであると判定して(ステップST4)、ステップST5のESP処理を開始する。   Next, when receiving the ESP packet S10 from the VPN terminal 1 (step ST1), the encryption communication decryption apparatus 3 refers to the IP header of the ESP packet S10 and determines that it is not an IKE packet (step ST2). The packet is determined to be a packet (step ST4), and the ESP process in step ST5 is started.

このESP処理において、暗号通信復号装置3は、図5に示すように、先ずステップST31において、パケット復号部15により、セッション鍵保持部26に記憶しておいたイニシエータのESP用セッション鍵を用い、IPsecSAで設定された暗号化アルゴリズムに従って、ESPパケットS10の暗号化部分を復号する。そして、パケット復号部15は、当該復号したESPパケットS10を、パケット暗号化部27に出力すると同時にパケット整形部28に出力する。   In this ESP process, as shown in FIG. 5, the encryption communication decryption apparatus 3 first uses the ESP session key of the initiator stored in the session key holding unit 26 by the packet decryption unit 15 in step ST31. The encrypted part of the ESP packet S10 is decrypted according to the encryption algorithm set by IPsec SA. Then, the packet decryption unit 15 outputs the decrypted ESP packet S10 to the packet encryption unit 27 and simultaneously outputs it to the packet shaping unit 28.

次のステップST32においては、パケット整形部28により、パケット復号部15から出力されたESPパケットS10の暗号化部分を復号したものからESPトレイラを取り出し、ネットワーク監視装置4が処理できるようなデータ形態にパケットを整形して、平文パケットとして通信インターフェース13からネットワーク監視装置4に送信させる。 具体的には、パケット整形部28は、ESPプロトコルにおけるトランスポートモードのESPパケットS10を受信した場合、図7(a)に示すように、先ずESPパケットS10のESPトレイラに含まれるプロトコルフィールド(次ヘッダ番号)の値を、当該ESPの下位層であるIPヘッダのプロトコルフィールドにコピーすると共に、ESPヘッダ及びESPトレイラを削除する。ESPトレイラの長さは、ESPトレイラのパディング長フィールドに2バイトを加算した値とする。更に、パケット整形部28は、ESPヘッダ及びESPトレイラを削除したことによるデータ長の変化を、IP等の下位層のヘッダに反映させる。具体的には、IPヘッダの長さフィールドと、チェックサムフィールドを再計算する。そして、暗号通信復号装置3は、通信インターフェース13とネットワーク監視装置4とがLANで接続されている場合には、IPヘッダの先頭に、宛先アドレスをネットワーク監視装置4のMACアドレスとしたイーサヘッダを付加する。これにより、ネットワーク監視装置4は、当該パケットを確実に受信することができ、復号された平文パケットのデータを参照して正当性などの監視を行わせることができる。   In the next step ST32, the packet shaping unit 28 takes out the ESP trailer from the decrypted encrypted part of the ESP packet S10 output from the packet decrypting unit 15 and converts it into a data format that can be processed by the network monitoring device 4. The packet is shaped and transmitted from the communication interface 13 to the network monitoring device 4 as a plain text packet. Specifically, when the packet shaping unit 28 receives the ESP packet S10 in the transport mode in the ESP protocol, as shown in FIG. 7A, first, the protocol field (next) is included in the ESP trailer of the ESP packet S10. The value of (header number) is copied to the protocol field of the IP header which is a lower layer of the ESP, and the ESP header and ESP trailer are deleted. The length of the ESP trailer is a value obtained by adding 2 bytes to the padding length field of the ESP trailer. Further, the packet shaping unit 28 reflects the change in the data length due to the deletion of the ESP header and ESP trailer in the lower layer header such as IP. Specifically, the IP header length field and checksum field are recalculated. Then, when the communication interface 13 and the network monitoring device 4 are connected via a LAN, the encryption / decryption device 3 has an Ethernet header with the destination address as the MAC address of the network monitoring device 4 at the head of the IP header. Append. Thereby, the network monitoring device 4 can reliably receive the packet, and can monitor the validity and the like by referring to the data of the decrypted plaintext packet.

なお、ネットワーク監視装置4は、通常、自己のアドレスが宛先となっていないパケットでも、通信インターフェースに到達したパケットすべてを監視するが、パケット整形部28でネットワーク監視装置4のMACアドレスを宛先に設定することにより、暗号通信復号装置3とネットワーク監視装置4の間にスイッチングハブがある場合などに、スイッチングハブが、ネットワーク監視装置4が接続されているポートにパケットを転送しないことを防ぐことができる。   The network monitoring device 4 normally monitors all packets that have reached the communication interface even if the packet is not destined for its own address, but the packet shaping unit 28 sets the MAC address of the network monitoring device 4 as the destination. By doing so, when there is a switching hub between the encryption / decryption device 3 and the network monitoring device 4, it is possible to prevent the switching hub from transferring a packet to the port to which the network monitoring device 4 is connected. .

また、パケット整形部28は、ESPプロトコルにおけるトンネルモードのESPパケットS10を受信した場合には、図7(b)に示すように、ESPトレーラの次ヘッダ番号(IP:4)をコピーし、復号したデータの先頭に現れるIPヘッダ(2)の先頭に付加するIPヘッダ(1)の次ヘッダ番号を変更することになる。   Further, when receiving the tunnel mode ESP packet S10 in the ESP protocol, the packet shaping unit 28 copies and decodes the next header number (IP: 4) of the ESP trailer as shown in FIG. 7B. The next header number of the IP header (1) added to the head of the IP header (2) appearing at the head of the data is changed.

次のステップST33においては、パケット暗号化部27により、レスポンダのESP用セッション鍵を用い、IPsecSAで設定された暗号化アルゴリズムに従って、ESPパケットS10の復号された部分を暗号化して、ESPパケットS10’を生成し、通信インターフェース12から送信させる。   In the next step ST33, the packet encryption unit 27 uses the responder's ESP session key to encrypt the decrypted portion of the ESP packet S10 in accordance with the encryption algorithm set in IPsec SA, and the ESP packet S10 ′. Is generated and transmitted from the communication interface 12.

次に、VPN端末2でESPパケットS10’を受信すると、VPN端末2は、ESPヘッダより後のデータ部分を、IPsecSAで設定された暗号アルゴリズムによって、ESPヘッダのSPIフィールドの値によって選択したESPセッション鍵で復号する。そして、VPN端末2は、復号した結果得たデータからESPトレイラを除外することで、VPN端末1でカプセル化されたIPパケットを復元し、当該データを処理する。   Next, when the VPN terminal 2 receives the ESP packet S10 ′, the VPN terminal 2 selects the data part after the ESP header according to the value of the SPI field of the ESP header by the encryption algorithm set by IPsec SA. Decrypt with key. Then, the VPN terminal 2 excludes the ESP trailer from the data obtained as a result of decoding, thereby restoring the IP packet encapsulated by the VPN terminal 1 and processing the data.

逆に、VPN端末2がVPN端末1にデータを送信する場合も、上記と同様の処理をする。ただし、ステップST31においては、レスポンダのESP用セッション鍵を用いてESPパケットS11を復号し、ステップST33においては、イニシエータのESP用セッション鍵を用いて暗号化してESPパケットS11’を生成して、通信インターフェース12から送信させる。   Conversely, when the VPN terminal 2 transmits data to the VPN terminal 1, the same processing as described above is performed. However, in step ST31, the ESP packet S11 is decrypted using the responder's ESP session key. In step ST33, the ESP packet S11 'is encrypted using the initiator's ESP session key to generate the communication. It is transmitted from the interface 12.

また、上述のステップST33において、暗号通信復号装置3は、任意の監視装置から出力された通信内容を入力する入力手段としての通信インターフェースを更に備え、復号した通信内容を暗号化して転送する前に、任意の装置から入力された処理情報に基づいて通信内容を整形して、暗号化後に転送しても良い。具体的には、パケット整形部28は、平文のIPパケットをESPパケットに変換するときに、VPN端末1又はVPN端末2から受信したESPパケットの内容と、転送するESPパケットの内容とを異なるものにする。例えば、任意の装置からのパケットのフィルタリング条件を示す情報を入力した場合、パケット整形部28は、当該フィルタリング条件に従って、ESPパケットの中継又は非中継を判定しても良い。   In step ST33 described above, the encrypted communication decryption apparatus 3 further includes a communication interface as input means for inputting communication contents output from an arbitrary monitoring apparatus, and before the encrypted communication contents are encrypted and transferred. The communication content may be shaped based on the processing information input from an arbitrary device and transferred after encryption. Specifically, when converting a plaintext IP packet into an ESP packet, the packet shaping unit 28 differs between the content of the ESP packet received from the VPN terminal 1 or the VPN terminal 2 and the content of the ESP packet to be transferred. To. For example, when information indicating a filtering condition of a packet from an arbitrary device is input, the packet shaping unit 28 may determine whether the ESP packet is relayed or not relayed according to the filtering condition.

[第1実施形態の効果]
以上詳細に説明したように、本発明を適用した通信システムによれば、暗号通信を復号させるために必要な情報として、VPN端末1及びVPN端末2のESP用セッション鍵と暗号化アルゴリズムとを記憶させておき、復号した平文パケットを、ネットワーク監視装置4で処理可能な形態に整形してネットワーク監視装置4で監視させることができる。したがって、この暗号通信復号装置3によれば、通信内容が暗号化されている場合であっても、通信内容を監視でき、既存の平文のみを解析可能なネットワーク監視装置4を使用することができる。また、この通信監視システムによれば、暗号通信経路上で透過的に暗号文を復号し、ネットワーク監視装置4で監視させる場合であっても、再度暗号化してVPN端末1又はVPN端末2に送信することができ、暗号通信のセキュリティ・レベルを維持することができる。
[Effect of the first embodiment]
As described above in detail, according to the communication system to which the present invention is applied, the ESP session key and the encryption algorithm of the VPN terminal 1 and the VPN terminal 2 are stored as information necessary for decrypting the encrypted communication. In addition, the decrypted plaintext packet can be shaped into a form that can be processed by the network monitoring device 4 and monitored by the network monitoring device 4. Therefore, according to this encrypted communication decryption apparatus 3, even if the communication contents are encrypted, the network monitoring apparatus 4 that can monitor the communication contents and can analyze only the existing plaintext can be used. . Further, according to this communication monitoring system, even when the encrypted text is transparently decrypted on the encrypted communication path and monitored by the network monitoring device 4, it is encrypted again and transmitted to the VPN terminal 1 or VPN terminal 2. And the security level of encryption communication can be maintained.

また、この通信システムによれば、任意の装置と暗号通信復号装置3とを接続し、当該任意の装置から暗号通信復号装置3が追加して行う処理内容を示す情報を入力して、再暗号化を行ってVPN端末1又はVPN端末2に中継する前に、追加した処理を行うことができる。   Further, according to this communication system, an arbitrary device is connected to the encryption / decryption device 3, and information indicating processing contents additionally performed by the encryption / decryption device 3 is input from the arbitrary device, and re-encryption is performed. It is possible to perform the added processing before relaying to the VPN terminal 1 or the VPN terminal 2 by performing the conversion.

[第2実施形態]
つぎに、本発明を適用した第2実施形態に係る通信システムについて説明する。なお、上述した実施形態と同一部分については、同一符号及び同一ステップ番号を付することによって、その詳細な説明を省略する。
[Second Embodiment]
Next, a communication system according to a second embodiment to which the present invention is applied will be described. In addition, about the same part as embodiment mentioned above, the detailed description is abbreviate | omitted by attaching | subjecting the same code | symbol and the same step number.

この第2実施形態に係る通信システムは、図8に示すように、暗号通信復号装置3’とネットワーク監視装置4’とが双方向通信を行うように構成される。この第2実施形態に係る通信システムは、暗号通信復号装置3’からネットワーク監視装置4’に出力した平文パケットをネットワーク監視装置4’で監視している結果、ネットワーク監視装置4’によって中継することが適当と判断され、暗号通信復号装置3’に戻されたパケットのみ暗号化して中継することで、不適当なパケットを破棄させる機能を追加したことを特徴とするものである。   As shown in FIG. 8, the communication system according to the second embodiment is configured such that the encryption / decryption device 3 'and the network monitoring device 4' perform two-way communication. In the communication system according to the second embodiment, the plaintext packet output from the encryption / decryption device 3 ′ to the network monitoring device 4 ′ is monitored by the network monitoring device 4 ′, and as a result, relayed by the network monitoring device 4 ′. This is characterized in that a function for discarding inappropriate packets is added by encrypting and relaying only the packets returned to the encrypted communication decryption apparatus 3 ′.

このような第2実施形態における暗号通信復号装置3’は、図9に示すように、ネットワーク監視装置4’から戻されたパケットを受信する通信インターフェース31を追加して備え、当該通信インターフェース31によって受信したパケットをパケット整形部28で整形前の状態に戻し、パケット暗号部27で暗号化して通信インターフェース12から出力する。これにより、暗号通信復号装置3’は、ESPパケットを中継するに際して、ネットワーク監視装置4’の監視結果が適当である場合には、ESPパケットを中継する。一方、暗号通信復号装置3’は、ネットワーク監視装置4’の監視結果が不適当である場合には、ネットワーク監視装置4’はパケットを戻さないため、結果的に当該ESPパケットを中継しない。   As shown in FIG. 9, the encryption communication decryption device 3 ′ in the second embodiment additionally includes a communication interface 31 that receives a packet returned from the network monitoring device 4 ′. The received packet is returned to the state before shaping by the packet shaping unit 28, encrypted by the packet encryption unit 27, and output from the communication interface 12. Thereby, the encryption communication decryption device 3 ′ relays the ESP packet when the monitoring result of the network monitoring device 4 ′ is appropriate when relaying the ESP packet. On the other hand, if the monitoring result of the network monitoring device 4 ′ is inappropriate, the encryption communication decryption device 3 ′ does not return the packet and consequently does not relay the ESP packet.

また、ネットワーク監視装置4’は、暗号通信復号装置3’との間で、ネットワークN側に対応する平文パケットを送受信する通信インターフェースと、VPN端末2側に対応する平文パケットを送受信する通信インターフェースと2つの通信インターフェースを使用したゲートウェイ型の通信装置となる。ネットワーク監視装置4’は、上述した第1実施形態と同様に、暗号通信復号装置3’がESPパケットを復号した平文のIPパケットを受信すると、その内容を解析する。そして、パケットの内容が不適当と判定した場合には、当該パケットを破棄することで、不適当なESPパケットの中継を遮断させる。一方、パケットの内容が適当と判定した場合には、受信した通信インターフェースとは別の通信インターフェースから暗号通信復号装置3’にパケットを転送して、当該パケットをESPパケットとして中継させる。   Further, the network monitoring device 4 ′ communicates with the encrypted communication decryption device 3 ′ through a communication interface that transmits and receives plaintext packets corresponding to the network N side, and a communication interface that transmits and receives plaintext packets corresponding to the VPN terminal 2 side. It becomes a gateway type communication device using two communication interfaces. When the encrypted communication decrypting device 3 ′ receives the plain text IP packet obtained by decrypting the ESP packet, the network monitoring device 4 ′ analyzes the content as in the first embodiment. If it is determined that the content of the packet is inappropriate, the relay of the inappropriate ESP packet is blocked by discarding the packet. On the other hand, when it is determined that the content of the packet is appropriate, the packet is transferred from a communication interface different from the received communication interface to the encryption / decryption device 3 ', and the packet is relayed as an ESP packet.

ここで、通信インターフェース13及び通信インターフェース31は、第1実施形態における通信インターフェース11及び通信インターフェース12と同様に、簡単のため受信用、送信用としているが、実際には2つの通信インターフェース13,31がネットワーク監視装置4’の2つの通信インターフェースに固定的に接続されている。   Here, like the communication interface 11 and the communication interface 12 in the first embodiment, the communication interface 13 and the communication interface 31 are used for reception and transmission for the sake of simplicity, but actually, the two communication interfaces 13 and 31 are used. Are fixedly connected to the two communication interfaces of the network monitoring device 4 ′.

そして、VPN端末2からパケットを受信した場合は、VPN端末2側の通信インターフェースが受信用の通信インターフェース11、ネットワークN側の通信インターフェースが送信用の通信インターフェース12となり、ネットワーク監視装置4’のVPN端末2側のインターフェースが通信インターフェース13に接続されたインターフェース、ネットワーク監視装置4’のネットワークN側のインターフェースが通信インターフェース31に接続されたインターフェースとなる。逆に、ネットワークNからパケットを受信した場合は、ネットワークN側の通信インターフェースが受信用の通信インターフェース11、VPN端末2側の通信インターフェースが送信用の通信インターフェース12となり、ネットワーク監視装置4’のネットワークN側のインターフェースが通信インターフェース13に接続されたインターフェース、ネットワーク監視装置4’のVPN端末2側のインターフェースが通信インターフェース31に接続されたインターフェースとなる。   When a packet is received from the VPN terminal 2, the communication interface on the VPN terminal 2 side becomes the communication interface 11 for reception, the communication interface on the network N side becomes the communication interface 12 for transmission, and the VPN of the network monitoring device 4 ′. The interface on the terminal 2 side is an interface connected to the communication interface 13, and the interface on the network N side of the network monitoring device 4 ′ is an interface connected to the communication interface 31. On the other hand, when a packet is received from the network N, the communication interface on the network N side becomes the communication interface 11 for reception, the communication interface on the VPN terminal 2 side becomes the communication interface 12 for transmission, and the network of the network monitoring device 4 ′ The interface on the N side is an interface connected to the communication interface 13, and the interface on the VPN terminal 2 side of the network monitoring device 4 ′ is an interface connected to the communication interface 31.

通信インターフェース31は、ネットワーク監視装置4’からIPパケットを受信すると、当該パケットをパケット整形部28に出力し、パケット整形部28によって、ESPヘッダ及びESPトレイラを追加させ、パケット暗号化部27に出力して暗号化させて通信インターフェース12から送信させる。   Upon receiving an IP packet from the network monitoring device 4 ′, the communication interface 31 outputs the packet to the packet shaping unit 28, adds an ESP header and ESP trailer by the packet shaping unit 28, and outputs the packet to the packet encryption unit 27. The data is encrypted and transmitted from the communication interface 12.

このような暗号通信復号装置3’の全体動作は、図10に示すように、ステップST1でパケットを受信した後のステップST41において、受信した通信インターフェースが平文パケットを受信する通信インターフェース、すなわちパケットを受信したのが通信インターフェース13又は通信インターフェース31であるか否か判定する。そして、平文パケットを送受信する通信インターフェースであればステップST42に処理を進め、平文パケットを送受信する通信インターフェースでなければ、ステップST2以降に処理を進める。   As shown in FIG. 10, the overall operation of the encryption / decryption device 3 ′ is as follows. In step ST41 after receiving the packet in step ST1, the received communication interface receives the plaintext packet, that is, the packet is transmitted. It is determined whether the communication interface 13 or the communication interface 31 has been received. If it is a communication interface that transmits and receives plaintext packets, the process proceeds to step ST42. If it is not a communication interface that transmits and receives plaintext packets, the process proceeds to step ST2 and subsequent steps.

また、この第2実施形態における暗号通信復号装置3’は、VPN端末1又はVPN端末2からESPパケットを受信すると(ステップST1)、通信インターフェース11で受信したものなので平文パケットではないと判定し(ステップST41)、また、IKEパケットではないと判定し(ステップST2)、ステップST4においてESPパケットであると判定されて、ESP処理を開始する。   Further, when receiving the ESP packet from the VPN terminal 1 or the VPN terminal 2 (step ST1), the encryption communication decryption apparatus 3 ′ in the second embodiment determines that it is not a plaintext packet because it is received by the communication interface 11 ( In step ST41), it is determined that the packet is not an IKE packet (step ST2). In step ST4, the packet is determined to be an ESP packet, and ESP processing is started.

このESP処理は、図11に示すように、先ずステップST31において、パケット復号部15により、セッション鍵保持部26に記憶しておいたイニシエータとレスポンダのうち、対応するESP用セッション鍵を用い、IPsecSAで設定された暗号アルゴリズムにしたがって、ESPパケットの暗号化部分を復号して、パケット整形部28に出力する。   As shown in FIG. 11, the ESP process is performed by using the corresponding ESP session key among the initiator and responder stored in the session key holding unit 26 by the packet decrypting unit 15 in step ST31, and using the IPsec SA. The encrypted part of the ESP packet is decrypted in accordance with the encryption algorithm set in step, and is output to the packet shaping unit 28.

次のステップST51においては、パケット整形部28により、ESPパケットを整形して、ネットワーク監視装置4’で受信及び解析が可能なIPパケットに変換する。このとき、パケット整形部28は、図7(a)又は図7(b)で説明したように、パケット復号部15から入力されたESPパケットの暗号化部分を復号したパケットから、ESPトレイラを取り出し、ネットワーク監視装置4’が処理できるようにパケットを整形して、ステップST6において、ネットワーク監視装置4’に送信して処理を終了する。   In the next step ST51, the packet shaping unit 28 shapes the ESP packet and converts it into an IP packet that can be received and analyzed by the network monitoring device 4 '. At this time, the packet shaping unit 28 extracts the ESP trailer from the packet obtained by decrypting the encrypted portion of the ESP packet input from the packet decryption unit 15 as described in FIG. 7A or 7B. Then, the packet is shaped so that the network monitoring device 4 ′ can process it, and in step ST6, it is transmitted to the network monitoring device 4 ′, and the processing is terminated.

ここで、ステップST51におけるパケット整形部28のパケットの整形処理は、例えば、先ずESPパケットのESPトレイラに含まれるプロトコルフィールドの値を、当該ESPの下位層であるIPヘッダのプロトコルフィールドにコピーすると共に、ESPヘッダ及びESPトレイラを削除する。ESPトレイラの長さは、ESPトレイラのパディング長フィールドの値に2バイトを加算した値とする。更に、パケット整形部28は、ESPヘッダ及びESPトレイラを削除したことによるデータ長の変化を、IP等の下位層のヘッダに反映させる。具体的には、IPヘッダの長さフィールドと、チェックサムフィールドを再計算する。   Here, in the packet shaping process of the packet shaping unit 28 in step ST51, for example, first, the value of the protocol field included in the ESP trailer of the ESP packet is copied to the protocol field of the IP header which is the lower layer of the ESP. , ESP header and ESP trailer are deleted. The length of the ESP trailer is a value obtained by adding 2 bytes to the value of the padding length field of the ESP trailer. Further, the packet shaping unit 28 reflects the change in the data length due to the deletion of the ESP header and ESP trailer in the lower layer header such as IP. Specifically, the IP header length field and checksum field are recalculated.

なお、暗号通信復号装置3’は、通信インターフェース13とネットワーク監視装置4’とがLANで接続されている場合には、IPヘッダの先頭に、宛先アドレスをネットワーク監視装置4’のMACアドレスとしたイーサヘッダを付加する。これにより、ネットワーク監視装置4’は、当該パケットを確実に受信することができ、復号された平文パケットのデータを参照して正当性などの監視を行わせることができる。   When the communication interface 13 and the network monitoring device 4 ′ are connected via a LAN, the encrypted communication decrypting device 3 ′ uses the destination address as the MAC address of the network monitoring device 4 ′ at the beginning of the IP header. Add an ether header. As a result, the network monitoring device 4 ′ can reliably receive the packet, and can monitor the validity and the like by referring to the data of the decrypted plaintext packet.

これに対し、ネットワーク監視装置4’は、暗号通信復号装置3’から受信したIPパケットの内容を解析し、不適当と判定した場合は当該IPパケットを破棄する。一方、ネットワーク監視装置4’によってIPパケットの内容を適当と判定した場合には、当該IPパケットを受信した通信インターフェースとは別の通信インターフェースから、暗号通信復号装置3’にIPパケットを送信する。   On the other hand, the network monitoring device 4 'analyzes the contents of the IP packet received from the encrypted communication decryption device 3', and discards the IP packet if determined to be inappropriate. On the other hand, when the content of the IP packet is determined to be appropriate by the network monitoring device 4 ', the IP packet is transmitted to the encrypted communication decryption device 3' from a communication interface different from the communication interface that has received the IP packet.

これに対し、暗号通信復号装置3’は、通信インターフェース31によってネットワーク監視装置4’から送信されたIPパケットを受信すると(ステップST1)、当該IPパケットが平文のパケットであるので、ステップST41からステップST42に処理を進める。   On the other hand, when the encryption communication decryption apparatus 3 ′ receives the IP packet transmitted from the network monitoring apparatus 4 ′ by the communication interface 31 (step ST1), the IP packet is a plaintext packet. The process proceeds to ST42.

この平文処理は、図12に示すように、先ずステップST61において、通信インターフェース31により受信したIPパケットを、パケット整形部28によってESPパケットに整形して、パケット暗号化部27に出力する。このとき、パケット整形部28は、ステップST51とは逆の変換を行う。すなわち、IPヘッダの長さフィールド及びヘッダ長フィールドを参照して、ヘッダ長からIPヘッダの長さを減算して、データ部の長さを取得し、データの長さに2バイトを加算する。次に、当該加算したデータに追加するパディングを求めるために、IPsecSAで設定された暗号アルゴリズムのブロック長の整数倍になるnバイトを計算する。そして、当該IPパケットのIPヘッダの後にESPヘッダを追加し、当該IPパケットの末尾にnバイトのパディングを含むESPトレイラを追加する。このとき、ESPトレイラのパディング長フィールドに、nバイトのパディングをコピーし、ESPトレイラの次ヘッダフィールドには、IPヘッダのプロトコルフィールドをコピーする。また、IPヘッダのプロトコルフィールドには、ESPを示す値(50)をコピーする。更に、ESPヘッダ及びESPトレイラを追加したことによるデータ長の変化をIP等の下位層のヘッダに反映させる。具体的には、IPヘッダの長さフィールドと、チェックサムフィールドを再計算する。   In this plaintext processing, as shown in FIG. 12, first, in step ST 61, the IP packet received by the communication interface 31 is shaped into an ESP packet by the packet shaping unit 28 and output to the packet encryption unit 27. At this time, the packet shaping unit 28 performs a conversion opposite to that in step ST51. That is, referring to the length field and header length field of the IP header, the length of the IP header is subtracted from the header length to obtain the length of the data portion, and 2 bytes are added to the length of the data. Next, in order to obtain padding to be added to the added data, n bytes that are an integral multiple of the block length of the encryption algorithm set in IPsec SA are calculated. Then, an ESP header is added after the IP header of the IP packet, and an ESP trailer including n-byte padding is added to the end of the IP packet. At this time, n bytes of padding are copied to the padding length field of the ESP trailer, and the protocol field of the IP header is copied to the next header field of the ESP trailer. A value (50) indicating ESP is copied into the protocol field of the IP header. Further, the change in the data length due to the addition of the ESP header and ESP trailer is reflected in the lower layer header such as IP. Specifically, the IP header length field and checksum field are recalculated.

次のステップST62においては、パケット暗号化部27により、ESP用セッション鍵を用い、IPsecSAで設定された暗号アルゴリズムに従って、復号されたESPパケットを暗号化して、通信インターフェース12から送信させる。   In the next step ST62, the packet encryption unit 27 encrypts the decrypted ESP packet according to the encryption algorithm set in IPsec SA using the ESP session key, and transmits it from the communication interface 12.

これに対し、ESPパケットを受信したVPN端末1又はVPN端末2は、ESPヘッダより後のデータ部分を、IPsecSAで設定された暗号アルゴリズムによって、ESPヘッダのSPIフィールドの値によって選択したESP用セッション鍵で復号する。そして、VPN端末1又はVPN端末2は、復号した結果得たデータからESPトレイラを除外することで、カプセル化されたIPパケットを復元し、当該IPパケットを処理することができる。   On the other hand, the VPN terminal 1 or the VPN terminal 2 that has received the ESP packet selects the data portion after the ESP header according to the value of the SPI field of the ESP header using the encryption algorithm set by IPsec SA. Decrypt with. Then, the VPN terminal 1 or the VPN terminal 2 can restore the encapsulated IP packet and process the IP packet by excluding the ESP trailer from the data obtained as a result of decoding.

[第2実施形態の効果]
以上詳細に説明したように、本発明を適用した第2実施形態に係る通信システムによれば、暗号通信復号装置3’から平文のパケットをネットワーク監視装置4’に送信し、ネットワーク監視装置4’の監視結果によってパケットの中継を停止させることができる。また、この通信システムによれば、既存の不正なパケットを検知して破棄するネットワーク監視装置4’を使用することができる。
[Effects of Second Embodiment]
As described above in detail, according to the communication system according to the second embodiment to which the present invention is applied, the plaintext packet is transmitted from the encrypted communication decryption device 3 ′ to the network monitoring device 4 ′, and the network monitoring device 4 ′. The packet relay can be stopped according to the monitoring result. Further, according to this communication system, it is possible to use the network monitoring device 4 ′ that detects and discards existing illegal packets.

[第3実施形態]
つぎに、本発明を適用した第3実施形態に係る通信システムについて説明する。なお、上述した実施形態と同一部分については、同一符号及び同一ステップ番号を付することによって、その詳細な説明を省略する。
[Third Embodiment]
Next, a communication system according to a third embodiment to which the present invention is applied will be described. In addition, about the same part as embodiment mentioned above, the detailed description is abbreviate | omitted by attaching | subjecting the same code | symbol and the same step number.

この第3実施形態に係る通信システムは、サーバ−クライアント間でSSL(Secure Socket Layer)に準拠した暗号通信を行う場合に、上述した実施形態と同様に、暗号化されたパケットを暗号通信復号装置で傍受して、当該傍受したパケットをネットワーク監視装置で監視させることを特徴とするものである。このSSLによる暗号通信は、上述のIPsecとは異なり、Diffie−Hellman鍵共有法を使用しないため、暗号通信復号装置をサーバ−クライアント間の通信経路上に直接接続する必要はなく、図13に示すように構成される。   In the communication system according to the third embodiment, when performing encrypted communication in conformity with SSL (Secure Socket Layer) between a server and a client, an encrypted communication decryption device is used to transmit an encrypted packet as in the above-described embodiment. And intercepting the received packet with a network monitoring device. Unlike the above-described IPsec, the encryption communication by SSL does not use the Diffie-Hellman key sharing method, so it is not necessary to directly connect the encryption / decryption device on the communication path between the server and the client, as shown in FIG. Configured as follows.

この通信システムにおいて、SSLクライアント41とSSLサーバ42とを接続する通信経路にはハブ43が設けられ、当該ハブ43から分岐して暗号通信復号装置44及びネットワーク監視装置4’’が接続されている。   In this communication system, a hub 43 is provided in a communication path connecting the SSL client 41 and the SSL server 42, and the encryption communication decryption device 44 and the network monitoring device 4 '' are connected to branch from the hub 43. .

SSLクライアント41は、SSLサーバ42との間で暗号通信を行うに際して、ネットワークN及びハブ43を介して、SSLサーバ42との間でSSLプロトコルのハンドシェイクプロトコル(SSLHP:SSL Handshake Protocol)従った処理を行うことでSSLプロトコルのコネクションを確立する。このとき、先ず、SSLクライアント41は、SSLサーバ42から受信した証明書を評価することで、SSLサーバ42の正当性を確認する。これにより、SSLクライアント41は、相手認証を行う。その後、SSLクライアント41とSSLサーバ42との間で、ハンドシェイクプロトコルによる折衝によって鍵ブロック(共通鍵)、暗号アルゴリズムを決定し、当該鍵ブロックでデータ部(レコード単位)を暗号化したSSLパケットを使用した暗号通信を行う。   The SSL client 41 performs processing according to the SSL Handshake Protocol (SSLHP) with the SSL server 42 via the network N and the hub 43 when performing cryptographic communication with the SSL server 42. To establish a SSL protocol connection. At this time, the SSL client 41 first confirms the validity of the SSL server 42 by evaluating the certificate received from the SSL server 42. Thereby, the SSL client 41 performs partner authentication. Thereafter, a key block (common key) and an encryption algorithm are determined between the SSL client 41 and the SSL server 42 by negotiation using a handshake protocol, and an SSL packet obtained by encrypting the data portion (record unit) with the key block is determined. Perform the encrypted communication used.

なお、SSLプロトコルにおけるコネクションとは、SSLクライアント41とSSLサーバ42との間でのTCPのコネクション、即ち送信元及び宛先ポートの組によって識別される情報を指す。また、SSLプロトコルにおけるセッションとは、SSLクライアント41とSSLサーバ42との間でのセッションIDによって識別される情報である。コネクションは、ハンドシェイクプロトコルで送受信されるセッションIDによってセッションに関連付けられる。   Note that the connection in the SSL protocol refers to a TCP connection between the SSL client 41 and the SSL server 42, that is, information identified by a pair of a transmission source and a destination port. A session in the SSL protocol is information identified by a session ID between the SSL client 41 and the SSL server 42. The connection is associated with the session by a session ID transmitted / received by the handshake protocol.

また、SSLプロトコルでは、SSLハンドシェイクプロトコルの下位層に相当するSSLレコード層(SSLRL:SSL Record Layer)に従った処理を行うことで、レコードという単位でデータを送受信する。レコードは、TCP/IP層によってパケットに分割又は結合されることによって調整されて送受信される。   In the SSL protocol, data is transmitted and received in units of records by performing processing according to an SSL record layer (SSLRL) corresponding to a lower layer of the SSL handshake protocol. The records are transmitted and received after being adjusted by being divided or combined into packets by the TCP / IP layer.

ハブ43は、SSLクライアント41とSSLサーバ42との間で通信されるSSLパケットを中継する中継装置として機能すると共に、当該SSLパケットを暗号通信復号装置44にも送信する。これにより、ハブ43は、中継するSSLパケットを暗号通信復号装置44で傍受させる。   The hub 43 functions as a relay device that relays an SSL packet communicated between the SSL client 41 and the SSL server 42, and also transmits the SSL packet to the encryption communication decryption device 44. As a result, the hub 43 causes the encryption communication decryption device 44 to intercept the SSL packet to be relayed.

暗号通信復号装置44は、ハブ43から受信したSSLパケットを、予め記憶しておいたSSLサーバ42のサーバ用秘密鍵を利用して復号し、復号したパケットをネットワーク監視装置4’’で処理できるデータ形態に整形して、ネットワーク監視装置4’’に出力する。具体的には、暗号通信復号装置44は、SSLパケットを復号したパケットの、イーサヘッダの宛先をネットワーク監視装置4’’とし、TCPヘッダの宛先ポート又は送信元ポートをHTTP(HyperText Transfer Protocol)を示す番号「80」に設定したTCP/IPパケットに整形する。   The encryption communication decryption device 44 can decrypt the SSL packet received from the hub 43 using the server private key stored in the SSL server 42 and process the decrypted packet with the network monitoring device 4 ″. The data is formatted and output to the network monitoring device 4 ″. Specifically, the encryption communication decryption device 44 sets the destination of the Ethernet header of the packet obtained by decrypting the SSL packet as the network monitoring device 4 ″, and sets the destination port or transmission source port of the TCP header as HTTP (HyperText Transfer Protocol). It is shaped into a TCP / IP packet set to the number “80” shown.

ネットワーク監視装置4’’は、暗号通信復号装置44が送信したTCP/IPパケットを受信すると、当該TCP/IPパケットの内容を解析して、当該TCP/IPパケットの内容が適当なものか、不適当なものかを判定する。ネットワーク監視装置4’’は、例えば、TCP/IPパケットにインターネットワームを含んでいることを検出した場合には、当該TCP/IPパケットの内容が不適当であると判定して、管理者などに通知する。   When the network monitoring device 4 ″ receives the TCP / IP packet transmitted from the encryption / decryption device 44, the network monitoring device 4 ″ analyzes the content of the TCP / IP packet and determines whether the content of the TCP / IP packet is appropriate. Determine if it is appropriate. For example, when the network monitoring device 4 ″ detects that the TCP / IP packet includes an Internet worm, the network monitoring device 4 ″ determines that the content of the TCP / IP packet is inappropriate and notifies the administrator or the like. Notice.

[暗号通信復号装置の構成]
上述した通信システムにおいて、暗号通信復号装置44は、図14に示すように構成される。
[Configuration of encryption / decryption device]
In the communication system described above, the encryption / decryption device 44 is configured as shown in FIG.

受信用の通信インターフェース51は、ハブ43に接続され、SSLクライアント41とSSLサーバ42との間のSSLパケットをハブ43を介して受信する。そして、通信インターフェース51は、SSLパケットを、フィルタ部52に出力する。   The communication interface 51 for reception is connected to the hub 43 and receives an SSL packet between the SSL client 41 and the SSL server 42 via the hub 43. Then, the communication interface 51 outputs the SSL packet to the filter unit 52.

フィルタ部52は、通信インターフェース51から入力されたSSLパケットを入力すると共に、フィルタ設定部53によってSSLパケットのフィルタリング条件が供給される。フィルタ設定部53は、暗号通信復号装置44がSSLパケットとして処理するためのフィルタリング条件を設定するユーザインターフェースである。具体的には、フィルタリング条件として、SSLサーバ42のIPアドレス、SSLサーバ42のSSLのポート番号を設定する。フィルタ部52は、SSLパケットを入力すると、フィルタ設定部53によって設定されたフィルタリング条件に従ってフィルタリングを行い、フィルタリング条件に適合したパケットをSSLパケットとしてレコード再構成部54に出力する。具体的には、通信インターフェース51から入力したパケットのIPアドレスとフィルタリング条件として設定されたSSLサーバ42のIPアドレスとを比較し、更に、通信インターフェース51から入力したパケットのポート番号とフィルタリング条件として設定されたSSLサーバ42のポート番号とを比較する。そして、フィルタ部52は、何れかが異なると判定した場合には、当該パケットを破棄し、双方が同じと判定した場合には、SSLパケットであると判定してレコード再構成部54に出力する。   The filter unit 52 receives the SSL packet input from the communication interface 51, and the filtering condition of the SSL packet is supplied by the filter setting unit 53. The filter setting unit 53 is a user interface that sets filtering conditions for the encryption communication decryption device 44 to process as an SSL packet. Specifically, the IP address of the SSL server 42 and the SSL port number of the SSL server 42 are set as filtering conditions. When receiving the SSL packet, the filter unit 52 performs filtering in accordance with the filtering condition set by the filter setting unit 53, and outputs a packet that matches the filtering condition to the record reconstruction unit 54 as an SSL packet. Specifically, the IP address of the packet input from the communication interface 51 is compared with the IP address of the SSL server 42 set as the filtering condition, and further set as the port number of the packet input from the communication interface 51 and the filtering condition. The port number of the SSL server 42 is compared. If the filter unit 52 determines that either is different, the filter unit 52 discards the packet. If the filter unit 52 determines that both are the same, the filter unit 52 determines that the packet is an SSL packet and outputs the SSL packet to the record reconstruction unit 54. .

レコード再構成部54は、SSLパケットのデータ部をレコード単位のレコードデータに再構成して、レコード復号部56に出力する。また、レコード情報保持部55は、レコード再構成部54がレコードを再構成する際に使用するバッファである。   The record reconstruction unit 54 reconstructs the data part of the SSL packet into record data in units of records and outputs the record data to the record decoding unit 56. The record information holding unit 55 is a buffer used when the record reconstruction unit 54 reconstructs a record.

ここで、SSLクライアント41及びSSLサーバ42は、データをSSLプロトコルに従って送信する際に、SSLレコード層において、データをレコードという構造体(レコードデータ)に分割してTCP/IP層処理に渡す。そして、TCP/IP層処理では、IPデータグラムの最大サイズを表すMTU値に従って、入力されたレコードを更にパケット単位に分割して、データ長を調整して送信することになる。   Here, when the data is transmitted according to the SSL protocol, the SSL client 41 and the SSL server 42 divide the data into a structure (record data) called a record in the SSL record layer and pass it to the TCP / IP layer processing. In the TCP / IP layer processing, the input record is further divided into packets in accordance with the MTU value representing the maximum size of the IP datagram, and the data length is adjusted and transmitted.

レコード復号部56は、コネクション情報保持部60に保持されている暗号化状態が有効であった場合、レコード再構成部54から入力されたレコードデータを、コネクション情報保持部60に保持する暗号スイートの暗号アルゴリズムに従って、鍵ブロックの暗号化鍵を用いた復号処理を行い、復号済のレコードデータをレコード解析部57に出力し、コネクション情報保持部60に保持されている暗号化状態が無効であった場合、レコード再構成部54から入力されたレコードデータを、そのままレコード解析部57に出力する。   When the encryption state held in the connection information holding unit 60 is valid, the record decryption unit 56 stores the record data input from the record reconstruction unit 54 in the cipher suite held in the connection information holding unit 60. The decryption process using the encryption key of the key block is performed according to the encryption algorithm, the decrypted record data is output to the record analysis unit 57, and the encryption state held in the connection information holding unit 60 is invalid In this case, the record data input from the record reconstruction unit 54 is output to the record analysis unit 57 as it is.

レコード解析部57は、レコード復号部56から出力されたレコードデータを解析して、レコードのメッセージタイプが、ハンドシェイク(handshake)プロトコルによって生成されたハンドシェイクメッセージを含むことを示すメッセージタイプ、又は、暗号パラメータ切換(change_cipher_spec)プロトコルによって生成された暗号パラメータ切換(change_cipher_spec)メッセージを含むことを示すメッセージタイプであるかを解析する。そして、ハンドシェイクプロトコル又は暗号パラメータ切換プロトコルで生成されたメッセージタイプであるレコードデータである場合には、当該レコードデータをハンドシェイク解析部58に出力する。一方、ハンドシェイクプロトコルや暗号パラメータ切換プロトコルによるメッセージではなく、レコードのタイプがアプリケーションデータ(application_data)である場合には、当該レコードデータをパケット整形部63に出力する。   The record analysis unit 57 analyzes the record data output from the record decoding unit 56, and indicates that the message type of the record includes a handshake message generated by a handshake protocol, or It is analyzed whether the message type indicates that the encryption parameter switching (change_cipher_spec) message generated by the encryption parameter switching (change_cipher_spec) protocol is included. When the record data is a message type generated by the handshake protocol or the encryption parameter switching protocol, the record data is output to the handshake analysis unit 58. On the other hand, if the record type is application data (application_data) instead of a message based on the handshake protocol or the encryption parameter switching protocol, the record data is output to the packet shaping unit 63.

ハンドシェイク解析部58は、レコード解析部57から出力されたレコードデータを解析して、当該解析結果をセッション情報保持部59及びコネクション情報保持部60に出力する。このとき、ハンドシェイク解析部58は、レコードデータのメッセージタイプがhandshakeであり、且つハンドシェイクのメッセージタイプがclient_key_exchangeであれば、当該レコードデータを公開鍵暗号処理部61によって復号させる。   The handshake analysis unit 58 analyzes the record data output from the record analysis unit 57 and outputs the analysis result to the session information holding unit 59 and the connection information holding unit 60. At this time, if the message type of the record data is handshake and the message type of the handshake is client_key_exchange, the handshake analysis unit 58 causes the public key encryption processing unit 61 to decrypt the record data.

公開鍵暗号処理部61は、秘密鍵設定部62で設定された秘密鍵を使用してハンドシェイク解析部58から入力されたデータを復号して、ハンドシェイク解析部58に出力する。また、秘密鍵設定部62は、SSLサーバ42の秘密鍵を設定するユーザインターフェースである。   The public key encryption processing unit 61 decrypts the data input from the handshake analysis unit 58 using the secret key set by the secret key setting unit 62 and outputs the decrypted data to the handshake analysis unit 58. The secret key setting unit 62 is a user interface for setting the secret key of the SSL server 42.

セッション情報保持部59は、SSLのセッションを識別するための情報と、暗号化鍵(master secret key)とを保持している。このセッション情報保持部59は、セッションを識別するための情報として、具体的に、SSLクライアント41及びSSLサーバ42のIPアドレスと、SSLのセッションIDを保持している。   The session information holding unit 59 holds information for identifying an SSL session and an encryption key (master secret key). The session information holding unit 59 specifically holds the IP addresses of the SSL client 41 and the SSL server 42 and the SSL session ID as information for identifying a session.

コネクション情報保持部60は、SSLプロトコルのコネクションを識別するための情報と、暗号スイート、暗号化状態及び鍵ブロックを保持する。コネクション情報保持部60は、SSLのコネクションを識別するための情報として、具体的に、SSLクライアント41及びSSLサーバ42のIPアドレスとポート番号とを保持している。また、コネクション情報保持部60は、暗号化状態として、SSLクライアント41からSSLサーバ42、及び、SSLサーバ42からSSLクライアント41の各方向についての暗号化状態を保持する。更に、コネクション情報保持部60は、鍵ブロックとして、SSLクライアント41からSSLサーバ42、及びSSLサーバ42からSSLクライアント41の各方向について、メッセージ認証鍵、暗号化鍵、初期ベクタを保持している。   The connection information holding unit 60 holds information for identifying a connection of the SSL protocol, a cipher suite, an encryption state, and a key block. The connection information holding unit 60 specifically holds the IP addresses and port numbers of the SSL client 41 and the SSL server 42 as information for identifying an SSL connection. Further, the connection information holding unit 60 holds the encryption state in each direction from the SSL client 41 to the SSL server 42 and from the SSL server 42 to the SSL client 41 as the encryption state. Further, the connection information holding unit 60 holds a message authentication key, an encryption key, and an initial vector for each direction from the SSL client 41 to the SSL server 42 and from the SSL server 42 to the SSL client 41 as key blocks.

パケット整形部63は、レコード復号部56で復号され、レコード解析部57から出力されたアプリケーションデータを、ネットワーク監視装置4’’で解析できるようなデータ形態に整形して、通信インターフェース64に出力する。具体的には、パケット整形部63は、図15に示すように、SSLデータを復号した結果のアプリケーションデータが得られると、当該レコード単位のアプリケーションデータをパケット単位に分割してデータ長を調整する。そして、当該パケット単位のデータに、TCPの宛先又は送信元ポートをHTTPを示す番号の「80」に設定したヘッダ、IPヘッダ、イーサヘッダ等を付加して、イーサネット(登録商標)ヘッダの宛先をネットワーク監視装置4’’としたTCP/IPパケットに整形する。   The packet shaping unit 63 shapes the application data decoded by the record decoding unit 56 and output from the record analysis unit 57 into a data format that can be analyzed by the network monitoring device 4 ″, and outputs the data to the communication interface 64. . Specifically, as shown in FIG. 15, when the application data as a result of decrypting the SSL data is obtained, the packet shaping unit 63 adjusts the data length by dividing the application data of the record unit into the packet unit. . Then, a header in which the TCP destination or transmission source port is set to “80”, an IP header, an Ethernet header, etc. is added to the packet unit data, and the destination of the Ethernet (registered trademark) header is set. It is shaped into a TCP / IP packet with the network monitoring device 4 ″.

通信インターフェース64は、パケット整形部63にから入力されたTCP/IPパケットを、ネットワーク監視装置4’’に出力する。   The communication interface 64 outputs the TCP / IP packet input from the packet shaping unit 63 to the network monitoring device 4 ''.

[暗号通信復号装置の動作]
つぎに、上述したように構成された暗号通信復号装置44の動作について図16及び図17を参照して説明する。
[Operation of encryption / decryption device]
Next, the operation of the encryption / decryption device 44 configured as described above will be described with reference to FIGS.

このネットワーク監視装置4’’は、図16に示すような処理を行うことで、主にSSLクライアント41とSSLサーバ42との間で送受信されるIPパケットから、レコードを再構成する。このレコードを再構成する処理は、SSLクライアント41とSSLサーバ42との間で送受信されるTCP/IPパケットをネットワーク監視装置4’’で受信することによって開始される。   This network monitoring device 4 ″ performs processing as shown in FIG. 16 to reconstruct a record mainly from IP packets transmitted and received between the SSL client 41 and the SSL server 42. The process of reconstructing this record is started by receiving a TCP / IP packet transmitted / received between the SSL client 41 and the SSL server 42 by the network monitoring device 4 ″.

暗号通信復号装置44は、先ず、通信インターフェース51によってSSLクライアント41とSSLサーバ42との間で送受信されるTCP/IPパケットを受信すると(ステップST71)、フィルタ部52によって、当該TCP/IPパケットが、SSLプロトコルに従って暗号化されたSSLパケットであるか否かを判定する(ステップST72)。   First, when the encryption / decryption device 44 receives a TCP / IP packet transmitted / received between the SSL client 41 and the SSL server 42 via the communication interface 51 (step ST71), the filter unit 52 causes the TCP / IP packet to be transmitted. Then, it is determined whether or not the SSL packet is encrypted according to the SSL protocol (step ST72).

そして、フィルタ部52により、受信したTCP/IPパケットがSSLパケットであると判定した場合にはステップST73に処理を進め、SSLパケットではないと判定した場合は処理を終了する。このとき、フィルタ部52は、IPヘッダの上位層のヘッダとしてTCPヘッダが付加され、且つ、宛先又は送信元のIPアドレスとポート番号が、フィルタ設定部53で設定したものと同一である場合にはSSLパケットと判定し、同一はない場合にはSSLパケットではないと判定する。   If the filter unit 52 determines that the received TCP / IP packet is an SSL packet, the process proceeds to step ST73. If it is determined that the received packet is not an SSL packet, the process ends. At this time, the filter unit 52 adds a TCP header as an upper layer header of the IP header, and the destination or source IP address and port number are the same as those set by the filter setting unit 53 Are determined to be SSL packets, and if they are not identical, it is determined that they are not SSL packets.

ステップST73において、レコード再構成部54は、IPヘッダのヘッダ長フィールド、パケット長フィールド及びTCPヘッダのデータオフセットフィールドを参照して、パケット長、IPヘッダ長、TCPヘッダ長を取得し、パケット長から、IPヘッダ長及びTCPヘッダ長を減算した値から、当該TCP/IPパケットがデータを含んでいるか否かを判定する。そして、レコード再構成部54は、データを含んでいると判定した場合はステップST74に処理を進め、含んでいないと判定した場合はステップST78に処理を進める。   In step ST73, the record reconstruction unit 54 refers to the header length field of the IP header, the packet length field, and the data offset field of the TCP header to obtain the packet length, the IP header length, and the TCP header length, and from the packet length From the value obtained by subtracting the IP header length and the TCP header length, it is determined whether or not the TCP / IP packet includes data. If the record reconstruction unit 54 determines that the data is included, the process proceeds to step ST74. If the record reconstruction unit 54 determines that the data is not included, the process proceeds to step ST78.

ステップST74において、レコード再構成部54は、ステップST73で含まれていると判定されたデータが、以前の処理においてレコード情報保持部55に蓄積しておいたコネクションにおけるデータと逆方向のデータか否かを判定する。すなわち、前回に行った図16の処理で蓄積していたデータが、SSLクライアント41からSSLサーバ42に送信されたデータである場合には、ステップST73で含まれていると判定されたデータがSSLサーバ42からSSLクライアント41に送信されるデータであるか否かを判定する。逆に、前回に行った図16の処理で蓄積していたデータが、SSLサーバ42からSSLクライアント41に送信されたデータである場合には、ステップST73で含まれていると判定されたデータがSSLクライアント41からSSLサーバ42に送信されるデータであるか否かを判定する。そして、レコード再構成部54は、前回に蓄積したデータの送受信方向と、今回受信したデータの送受信方向とが逆方向であると判定した場合には、ステップST75に処理を進め、逆方向ではないと判定した場合には、ステップST77に処理を進める。なお、レコード情報保持部55にコネクションのデータが蓄積されていない場合には、レコード再構成部54は、逆方向ではないと判定して、ステップST77に処理を進める。   In step ST74, the record reconstruction unit 54 determines whether the data determined to be included in step ST73 is data in the reverse direction to the data in the connection accumulated in the record information holding unit 55 in the previous process. Determine whether. That is, when the data accumulated in the process of FIG. 16 performed last time is data transmitted from the SSL client 41 to the SSL server 42, the data determined to be included in step ST73 is SSL. It is determined whether the data is transmitted from the server 42 to the SSL client 41. On the other hand, if the data accumulated in the previous processing of FIG. 16 is data transmitted from the SSL server 42 to the SSL client 41, the data determined to be included in step ST73 It is determined whether the data is transmitted from the SSL client 41 to the SSL server 42. If the record reconstruction unit 54 determines that the transmission / reception direction of the previously accumulated data is opposite to the transmission / reception direction of the data received this time, the process proceeds to step ST75 and the reverse direction is not established. If it is determined, the process proceeds to step ST77. If connection data is not stored in the record information holding unit 55, the record reconstructing unit 54 determines that the direction is not the reverse direction, and proceeds to step ST77.

ステップST77において、レコード再構成部54は、次回以降の処理においてデータを使用できるように、レコード情報保持部55にデータを保存する。このとき、レコード再構成部54は、データそのものと、送受信したデータの位置を表すTCPヘッダのシーケンス番号フィールドとを対応付けて、適当な場所にコピーしてレコード情報保持部55に記憶させる。   In step ST77, the record reconstruction unit 54 stores the data in the record information holding unit 55 so that the data can be used in the subsequent processing. At this time, the record reconstruction unit 54 associates the data itself with the sequence number field of the TCP header indicating the position of the transmitted / received data, copies the data to an appropriate location, and stores it in the record information holding unit 55.

次のステップST78において、レコード再構成部54は、TCPヘッダのFINフラグを参照して、今回のデータ送信によってコネクションが終了するか否かを判定する。そして、レコード再構成部54によって終了すると判定した場合は、ステップST79に処理を進め、終了していないと判定した場合は処理を終了する。   In the next step ST78, the record reconstruction unit 54 refers to the FIN flag in the TCP header and determines whether or not the connection is terminated by the current data transmission. If the record reconstruction unit 54 determines that the process is to be terminated, the process proceeds to step ST79. If it is determined that the record reconstruction unit 54 has not terminated, the process is terminated.

ステップST79において、レコード再構成部54は、レコード情報保持部55に当該コネクションのデータが蓄積されているかどうかを判定する。蓄積されていると判定した場合はステップST80に処理を進め、蓄積されていないと判定した場合は処理を終了する。   In step ST79, the record reconstruction unit 54 determines whether or not the data of the connection is stored in the record information holding unit 55. If it is determined that it has been accumulated, the process proceeds to step ST80, and if it is determined that it has not been accumulated, the process ends.

ステップST80において、レコード再構成部54は、レコード情報保持部55に蓄積されているコネクションのデータを、レコードのヘッダを参照してレコード単位で分割してレコードデータとする。そして、レコード再構成部54は、各レコードデータをレコード復号部56に出力し、レコード処理を行わせて、処理を終了する。なお、このレコード処理の詳細については図17を参照して後述する。   In step ST80, the record reconstruction unit 54 divides the connection data stored in the record information holding unit 55 into record data by referring to the record header. Then, the record reconstruction unit 54 outputs each record data to the record decoding unit 56, performs the record process, and ends the process. Details of this record processing will be described later with reference to FIG.

一方、ステップST74において、ステップST71で受信されたSSLパケットに含まれるデータが、前回とは逆方向のデータであると判定された後のステップST75においても、ステップST80と同様の処理を行い、次のステップST76において、ステップST77と同様にレコード情報保持部55へのデータ蓄積を行う。   On the other hand, in step ST74, the same process as step ST80 is performed in step ST75 after it is determined that the data included in the SSL packet received in step ST71 is data in the opposite direction to the previous time. In step ST76, data is stored in the record information holding unit 55 as in step ST77.

以上の手順によって、SSLクライアント41とSSLサーバ42との間で送受信されるTCP/IPパケットから、レコードを再構成する。なお、簡単のため、これ以降レコードを再構成する手順の説明は省略する。   The record is reconstructed from the TCP / IP packet transmitted / received between the SSL client 41 and the SSL server 42 by the above procedure. For the sake of simplicity, the description of the procedure for reconstructing the records is omitted.

つぎに、上述のステップST80又はステップST75で行うレコード処理について、図17を参照して説明する。   Next, the record processing performed in the above-described step ST80 or step ST75 will be described with reference to FIG.

このレコード処理は、レコード再構成部54によるレコードの再構成後に開始される。このレコード処理は、図18に示すようなSSLクライアント41とSSLサーバ42との間のSSLパケットの送受信時において実行される。この図18に示す処理は、SSLクライアント41とSSLサーバ42との間で、先ずハンドシェイクプロトコルによって暗号アルゴリズム等の折衝や鍵ブロックの生成を行い、その結果決定した暗号アルゴリズムに従い、生成した鍵ブロックによって上位層のデータの暗号を行って暗号通信を行うものである。なお、この図18に示すハンドシェイク処理は、以下に示す第1処理、第2処理、第3処理、第4処理を行い、その後、アプリケーションデータ処理を行えるようにするものである。   This record processing is started after the record reconstruction unit 54 reconstructs the record. This record processing is executed when an SSL packet is transmitted and received between the SSL client 41 and the SSL server 42 as shown in FIG. In the processing shown in FIG. 18, the SSL client 41 and the SSL server 42 first negotiate the encryption algorithm and generate a key block by the handshake protocol, and generate the key block according to the determined encryption algorithm. Thus, encryption communication is performed by encrypting upper layer data. Note that the handshake process shown in FIG. 18 performs the following first process, second process, third process, and fourth process, and thereafter enables application data processing.

「第1処理」
先ず、ハンドシェイク処理の第1処理において、SSLクライアント41は、SSLサーバ42に対して、ハンドシェイクプロトコルに従って、最初にSSLサーバ42に向けて送信されるメッセージであるClient HelloメッセージS21を送信する。このClient HelloメッセージS21は、クライアント乱数、セッションID、暗号スイートのリスト等を含む。この暗号スイートとは、SSLクライアント41とSSLサーバ42との間の鍵交換に使用する公開鍵暗号アルゴリズム及びアプリケーションデータの暗号通信に使用する暗号アルゴリズム、当該暗号アルゴリズムで使用する鍵の長さ、メッセージ認証コードを生成するハッシュアルゴリズムの組み合わせを表す値である。
"First process"
First, in the first process of the handshake process, the SSL client 41 transmits a Client Hello message S21 that is a message first transmitted to the SSL server 42 to the SSL server 42 in accordance with the handshake protocol. The Client Hello message S21 includes a client random number, a session ID, a cipher suite list, and the like. The cipher suite is a public key encryption algorithm used for key exchange between the SSL client 41 and the SSL server 42, an encryption algorithm used for encryption communication of application data, a key length used for the encryption algorithm, a message A value representing a combination of hash algorithms for generating an authentication code.

これに対し、Client HelloメッセージS21がハブ43を介して暗号通信復号装置44で傍受されると、当該Client HelloメッセージS21を含むレコードは、暗号通信復号装置44のレコード復号部56に入力されて、レコード処理を開始させる。   On the other hand, when the Client Hello message S21 is intercepted by the encryption communication decryption device 44 via the hub 43, the record including the Client Hello message S21 is input to the record decryption unit 56 of the encryption communication decryption device 44, Start record processing.

このレコード処理は、図17に示すステップST91において、レコード復号部56によって、コネクション情報保持部60に保持するSSLクライアント41からSSLサーバ42への暗号化状態を参照し、未だ有効ではないので、ステップST93に処理を進める。   In step ST91 shown in FIG. 17, this record processing refers to the encryption state from the SSL client 41 to the SSL server 42 held in the connection information holding unit 60 by the record decrypting unit 56, and is not yet effective. The process proceeds to ST93.

ステップST93において、レコード解析部57によって、受信したレコードデータのメッセージタイプがハンドシェイクプロトコルを示すものか否かを判定し、ハンドシェイクプロトコルによって生成されたClient HelloメッセージS21であるので、当該レコードデータをハンドシェイク解析部58に出力して、ステップST94に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the message type of the received record data indicates a handshake protocol, and is the Client Hello message S21 generated by the handshake protocol. It outputs to the handshake analysis part 58, and advances a process to step ST94.

ステップST94において、ハンドシェイク解析部58によって、ステップST93において入力されたレコードデータのメッセージタイプが、Client Key Exchangeメッセージを示すものであるか否かを判定し、受信したメッセージがClient Key ExchangeメッセージではないのでステップST95に処理を進める。   In step ST94, the handshake analysis unit 58 determines whether or not the message type of the record data input in step ST93 indicates a Client Key Exchange message, and the received message is not a Client Key Exchange message. Therefore, the process proceeds to step ST95.

ステップST95においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Server Helloメッセージを示すものであるか否かを判定し、受信したメッセージがServer HelloメッセージではないのでステップST96に処理を進める。   In step ST95, the handshake analysis unit 58 determines whether or not the message type of the received record data indicates a Server Hello message. Since the received message is not a Server Hello message, the process proceeds to step ST96. To proceed.

ステップST96においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Client Helloメッセージを示すものであるか否かを判定し、Client HelloメッセージS21を受信しているのでステップST97に処理を進める。   In step ST96, the handshake analysis unit 58 determines whether or not the message type of the received record data indicates a Client Hello message. Since the Client Hello message S21 is received, the process proceeds to step ST97. To proceed.

ステップST97においては、ハンドシェイク解析部58によって、受信したClient HelloメッセージS21と共に受信したレコードから、SSLクライアント41で生成されたクライアント乱数を取得し、コネクション情報保持部60に保存する。その後、暗号通信復号装置44は、ステップST107において、今回のステップST74の判定で使用したレコード情報保持部55に記憶された蓄積データを削除して、処理を終了する。   In step ST97, the client random number generated by the SSL client 41 is acquired from the record received together with the received Client Hello message S21 by the handshake analysis unit 58 and stored in the connection information holding unit 60. Thereafter, in step ST107, the encryption / decryption device 44 deletes the accumulated data stored in the record information holding unit 55 used in the determination in step ST74, and ends the process.

「第2処理」
次の第2処理において、SSLサーバ42は、SSLクライアント41からClient HelloメッセージS21を受信すると、SSLクライアント41に、ハンドシェイクプロトコルのServer HelloメッセージS22に続いてCertificateメッセージS23を送信する。このServer HelloメッセージS22は、Client HelloメッセージS21に対する応答メッセージであって、SSLサーバ42で生成したサーバ乱数、セッションID、以後の処理で使用する暗号スイートを含む。また、CertificateメッセージS23は、自身が所有する証明書をSSLクライアント41に引き渡すメッセージであって、SSLサーバ42の証明書を含む。
"Second process"
In the next second process, when the SSL server 42 receives the Client Hello message S21 from the SSL client 41, the SSL server 42 transmits a Certificate message S23 to the SSL client 41 following the Server Hello message S22 of the handshake protocol. This Server Hello message S22 is a response message to the Client Hello message S21, and includes a server random number generated by the SSL server 42, a session ID, and a cipher suite used in subsequent processing. The Certificate message S23 is a message for handing over a certificate owned by itself to the SSL client 41, and includes the certificate of the SSL server 42.

これに対し、暗号通信復号装置44は、レコード復号部56にServer HelloメッセージS22を含むレコードが入力されると、レコード処理を開始する。   On the other hand, when a record including the Server Hello message S22 is input to the record decrypting unit 56, the encryption / decryption device 44 starts record processing.

このレコード処理は、先ずステップST91において、レコード復号部56によって、コネクション情報保持部60に保持するSSLサーバ42からSSLクライアント41への暗号化状態を参照し、未だに有効ではないので、ステップST93に処理を進める。   First, in step ST91, this record processing refers to the encryption state from the SSL server 42 to the SSL client 41 held in the connection information holding unit 60 by the record decrypting unit 56, and is not yet effective. To proceed.

ステップST93においては、レコード解析部57によって、当該レコードがハンドシェイクプロトコルか否かを判定し、ハンドシェイクプロトコルなので、ハンドシェイク解析部58にレコードを出力し、ステップST94に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the record is a handshake protocol. Since the record is a handshake protocol, the record is output to the handshake analysis unit 58, and the process proceeds to step ST94.

ステップST94においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Client Key Exchangeメッセージを示すものであるか否かを判定し、受信したメッセージがClient Key ExchangeメッセージではないのでステップST95に処理を進める。   In step ST94, the handshake analysis unit 58 determines whether or not the message type of the received record data indicates a Client Key Exchange message. Since the received message is not a Client Key Exchange message, step ST95 Proceed with the process.

ステップST95においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Server Helloメッセージであるか否かを判定し、受信したメッセージがServer HelloメッセージS22であるのでステップST98に処理を進める。   In step ST95, the handshake analysis unit 58 determines whether or not the message type of the received record data is a Server Hello message. Since the received message is the Server Hello message S22, the process proceeds to step ST98. .

ステップST98においては、ハンドシェイク解析部58によって、Server HelloメッセージS22と共に受信したレコードデータから、サーバ乱数、セッションID、暗号スイートを取得し、サーバ乱数及び暗号スイートをコネクション情報保持部60に記憶させ、セッションIDをセッション情報保持部59に記憶させる。このとき、ハンドシェイク解析部58は、同じServer HelloメッセージS22に付加されていたものとして、コネクション情報保持部60に記憶させたサーバ乱数及び暗号スイートと、セッション情報保持部59に記憶させたセッションIDとを対応付けるために、記憶したコネクション情報とセッション情報とをリンクさせて記憶させる。   In step ST98, the handshake analysis unit 58 acquires the server random number, session ID, and cipher suite from the record data received together with the Server Hello message S22, and stores the server random number and cipher suite in the connection information holding unit 60. The session ID is stored in the session information holding unit 59. At this time, the handshake analysis unit 58 assumes that the server random number and cipher suite stored in the connection information holding unit 60 and the session ID stored in the session information holding unit 59 are assumed to have been added to the same Server Hello message S22. In order to associate them with each other, the stored connection information and session information are linked and stored.

ステップST99においては、セッション情報保持部59に共通秘密鍵であるマスターシークレットが存在するか否かを判定し、存在しないので処理をステップST107に進める。その後、暗号通信復号装置44は、ステップST107において、今回のステップST74の判定で使用したレコード情報保持部55に記憶された蓄積データを削除して、処理を終了する。   In step ST99, it is determined whether or not a master secret that is a common secret key exists in session information holding unit 59. Since there is no master secret, the process proceeds to step ST107. Thereafter, in step ST107, the encryption / decryption device 44 deletes the accumulated data stored in the record information holding unit 55 used in the determination in step ST74, and ends the process.

また、暗号通信復号装置44は、Server HelloメッセージS22に続いて、レコード復号部56にCertificateメッセージS23を含むレコードデータが入力されると、再度レコード処理を開始することになる。   Further, when the record data including the Certificate message S23 is input to the record decryption unit 56 following the Server Hello message S22, the encryption communication decryption apparatus 44 starts the record processing again.

このレコード処理は、先ずステップST91においては、レコード復号部56によって、コネクション情報保持部60に保持するSSLサーバ42からSSLクライアント41への暗号化状態を参照し、未だ有効でないので、ステップST93に処理を進める。   First, in step ST91, this record processing refers to the encryption state from the SSL server 42 to the SSL client 41 held in the connection information holding unit 60 by the record decrypting unit 56, and is not yet valid. To proceed.

ステップST93においては、レコード解析部57によって、受信したレコードデータがハンドシェイクプロトコルか否かを判定し、ハンドシェイクプロトコルなので、ハンドシェイク解析部58にレコードデータを出力し、ステップST94に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the received record data is a handshake protocol. Since the record data is a handshake protocol, the record data is output to the handshake analysis unit 58, and the process proceeds to step ST94.

ステップST94においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Client Key Exchangeメッセージを示すものか否かを判定し、受信したメッセージがClient Key ExchangeメッセージではないのでステップST95に処理を進める。   In step ST94, the handshake analysis unit 58 determines whether or not the message type of the received record data indicates a Client Key Exchange message. Since the received message is not a Client Key Exchange message, the process proceeds to step ST95. To proceed.

ステップST95においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Server Helloメッセージを示すものであるか否かを判定し、受信したメッセージがServer HelloメッセージではないのでステップST96に処理を進める。   In step ST95, the handshake analysis unit 58 determines whether or not the message type of the received record data indicates a Server Hello message. Since the received message is not a Server Hello message, the process proceeds to step ST96. To proceed.

ステップST96においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Client Helloメッセージであるか否かを判定し、受信したメッセージがClient Helloメッセージではないので処理をステップST107に進める。その後、暗号通信復号装置44は、ステップST107において、今回のステップST74の判定で使用したレコード情報保持部55に記憶された蓄積データを削除して、処理を終了する。   In step ST96, the handshake analyzer 58 determines whether the message type of the received record data is a Client Hello message. Since the received message is not a Client Hello message, the process proceeds to step ST107. Thereafter, in step ST107, the encryption / decryption device 44 deletes the accumulated data stored in the record information holding unit 55 used in the determination in step ST74, and ends the process.

これに対し、SSLクライアント41は、SSLサーバ42からServer HelloメッセージS22とCertificateメッセージS23を受信すると、Certificateメッセージに含まれる証明書を評価し、それが有効なものであれば、乱数pre-master secretを生成し、当該乱数pre−master secretと、クライアント乱数、及びServer HelloメッセージS22から取得したサーバ乱数とから、共通秘密鍵であるマスターシークレットを生成する。次に、SSLクライアント41は、マスターシークレットと、クライアント乱数、及びサーバ乱数とから、鍵ブロックを生成する。   On the other hand, when the SSL client 41 receives the Server Hello message S22 and the Certificate message S23 from the SSL server 42, the SSL client 41 evaluates the certificate included in the Certificate message, and if it is valid, the random number pre-master secret And a master secret that is a common secret key is generated from the random number pre-master secret, the client random number, and the server random number acquired from the Server Hello message S22. Next, the SSL client 41 generates a key block from the master secret, the client random number, and the server random number.

「第3処理」
次に、SSLクライアント41は、SSLサーバ42に、ハンドシェイクプロトコルのClient Key ExchangeメッセージS24、暗号パラメータ切換(Change Cipher Spec)プロトコルのChange Cipher SpecメッセージS25、及びハンドシェイクプロトコルのFinishedメッセージS26を送信する。
"Third process"
Next, the SSL client 41 transmits to the SSL server 42 a client key exchange message S24 of a handshake protocol, a change cipher spec message S25 of a cipher parameter change (Change Cipher Spec) protocol, and a finished message S26 of a handshake protocol. .

Client Key ExchangeメッセージS24は、SSLクライアント41が生成した乱数をSSLサーバ42の公開鍵で暗号化してSSLサーバ42に送信すること示すメッセージであり、乱数pre-master secretを、SSLサーバ42から受信したCertificateメッセージに含まれるSSLサーバ42の証明書に含まれるSSLサーバ42の公開鍵で暗号化したデータを含む。このデータにより、SSLサーバ42では、マスターシークレットの生成が可能となる。また、Change Cipher SpecメッセージS25は、ハンドシェイクプロトコルで決定した暗号化仕様を利用開始することを通知するメッセージであり、データを含まない。ハンドシェイクプロトコルのFinishedメッセージS26は、ハンドシェイクプロトコルの終了を通知するメッセージであり、ハンドシェイクメッセージやマスターシークレット等をハッシュ関数で演算した値を含む。   The Client Key Exchange message S24 is a message indicating that the random number generated by the SSL client 41 is encrypted with the public key of the SSL server 42 and transmitted to the SSL server 42. The random number pre-master secret is received from the SSL server 42. It includes data encrypted with the public key of the SSL server 42 included in the certificate of the SSL server 42 included in the Certificate message. With this data, the SSL server 42 can generate a master secret. The Change Cipher Spec message S25 is a message notifying that the use of the encryption specification determined by the handshake protocol is started and does not include data. The Finished message S26 of the handshake protocol is a message that notifies the end of the handshake protocol, and includes a value obtained by calculating a handshake message, a master secret, or the like with a hash function.

なお、SSLクライアント41は、FinishedメッセージS26を含むChange Cipher SpecメッセージS25より後に送信するコネクションのレコードを、暗号スイートの暗号アルゴリズムによって、鍵ブロックのSSLクライアント41からSSLサーバ42への暗号化鍵で暗号化して、メッセージを送信することになる。   The SSL client 41 encrypts a connection record to be transmitted after the Change Cipher Spec message S25 including the Finished message S26 with an encryption key from the SSL client 41 to the SSL server 42 in the key block using an encryption algorithm of the cipher suite. To send a message.

暗号通信復号装置44は、レコード復号部56にClient Key ExchangeメッセージS24を含むレコードが入力されると、レコード処理を開始する。   When the record including the Client Key Exchange message S24 is input to the record decryption unit 56, the encryption communication decryption device 44 starts record processing.

ステップST91においては、レコード復号部56によって、コネクション情報保持部60に保持するSSLクライアント41からSSLサーバ42への暗号化状態を参照し、未だ有効ではないので、ステップST93に処理を進める。   In step ST91, the encryption state from the SSL client 41 to the SSL server 42 held in the connection information holding unit 60 is referred to by the record decrypting unit 56, and since it is not yet valid, the process proceeds to step ST93.

ステップST93においては、レコード解析部57によって、受信したレコードデータが、ハンドシェイクプロトコルか否かを判定し、ハンドシェイクプロトコルによって生成されたメッセージを受信しているので、ハンドシェイク解析部58にレコードデータを出力し、ステップST94に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the received record data is a handshake protocol, and since the message generated by the handshake protocol is received, the record data is sent to the handshake analysis unit 58. Is output, and the process proceeds to step ST94.

ステップST94においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Client Key ExchangeメッセージS24であるか否かを判定し、Client Key ExchangeメッセージS24なのでステップST100に処理を進める。   In step ST94, the handshake analysis unit 58 determines whether or not the message type of the received record data is the Client Key Exchange message S24. Since the message type is the Client Key Exchange message S24, the process proceeds to step ST100.

ステップST100においては、ハンドシェイク解析部58によって、当該セッションのマスターシークレットを計算し、セッション情報保持部59に保存する。具体的には、公開鍵暗号処理部61によって、秘密鍵設定部62によって事前に設定されたサーバ秘密鍵で、Client Key ExchangeメッセージS24のデータを復号して乱数pre−master secretを取得し、ハンドシェイク解析部58によって、乱数pre−master secretと、コネクション情報保持部60に保持するクライアント乱数、及びサーバ乱数とから、マスターシークレットを生成する。   In step ST100, the handshake analysis unit 58 calculates the master secret of the session and stores it in the session information holding unit 59. Specifically, the public key encryption processing unit 61 decrypts the data of the Client Key Exchange message S24 with the server secret key set in advance by the secret key setting unit 62, acquires the random number pre-master secret, The shake analysis unit 58 generates a master secret from the random number pre-master secret, the client random number held in the connection information holding unit 60, and the server random number.

ステップST101においては、ハンドシェイク解析部58によって、コネクションの鍵ブロックを生成する。具体的には、セッション情報保持部59に保持しているマスターシークレットと、コネクション情報保持部60に保持しているクライアント乱数、サーバ乱数とから鍵ブロックを生成する。その後、暗号通信復号装置44は、ステップST107において、今回のステップST74の判定で使用したレコード情報保持部55に記憶された蓄積データを削除して、処理を終了する。   In step ST101, the handshake analysis unit 58 generates a connection key block. Specifically, a key block is generated from the master secret held in the session information holding unit 59 and the client random number and server random number held in the connection information holding unit 60. Thereafter, in step ST107, the encryption / decryption device 44 deletes the accumulated data stored in the record information holding unit 55 used in the determination in step ST74, and ends the process.

また、暗号通信復号装置44は、レコード復号部56に、暗号パラメータ切換プロトコルによって生成されたChange Cipher SpecメッセージS25を含むレコードが入力されると、再度レコード処理を開始する。   Further, when a record including the Change Cipher Spec message S25 generated by the encryption parameter switching protocol is input to the record decryption unit 56, the encryption communication decryption apparatus 44 starts record processing again.

先ずステップST91においては、レコード復号部56によって、コネクション情報保持部60に保持するSSLクライアント41からSSLサーバ42への暗号化状態を参照し、未だ有効ではないので、ステップST93に処理を進める。   First, in step ST91, the encryption state from the SSL client 41 to the SSL server 42 held in the connection information holding unit 60 is referred to by the record decrypting unit 56, and since it is not yet valid, the process proceeds to step ST93.

ステップST93においては、レコード解析部57によって、受信したレコードデータが、ハンドシェイクプロトコルか否かを判定し、ハンドシェイクプロトコルにより生成されたメッセージを受信していないので、ステップST102に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the received record data is a handshake protocol. Since a message generated by the handshake protocol has not been received, the process proceeds to step ST102.

ステップST102においては、レコード解析部57によって、受信したレコードデータのメッセージタイプがChange Cipher Specプロトコルであるか否かを判定し、Change Cipher SpecメッセージS25を受信しているのでステップST103に処理を進める。   In step ST102, the record analysis unit 57 determines whether or not the message type of the received record data is the Change Cipher Spec protocol. Since the Change Cipher Spec message S25 is received, the process proceeds to step ST103.

ステップST103においては、ハンドシェイク解析部58によって、コネクション情報保持部60のSSLクライアント41からSSLサーバ42への暗号化状態を有効に変更する。その後、暗号通信復号装置44は、ステップST107において、今回のステップST74の判定で使用したレコード情報保持部55に記憶された蓄積データを削除して、処理を終了する。   In step ST103, the handshake analysis unit 58 effectively changes the encryption state from the SSL client 41 to the SSL server 42 of the connection information holding unit 60. Thereafter, in step ST107, the encryption / decryption device 44 deletes the accumulated data stored in the record information holding unit 55 used in the determination in step ST74, and ends the process.

次に、暗号通信復号装置44は、レコード復号部56にFinishedメッセージS26を含むレコードデータが入力されると、再度レコード処理を開始する。   Next, when the record data including the Finished message S26 is input to the record decryption unit 56, the encryption communication decryption device 44 starts record processing again.

先ずステップST91においては、レコード復号部56によって、コネクション情報保持部60に保持するSSLクライアント41からSSLサーバ42への暗号化状態を参照し、前のChange Cipher SpecメッセージS25の受信時に行ったレコード処理で暗号化状態が有効とされているので、ステップST92に処理を進める。   First, in step ST91, the record decryption unit 56 refers to the encryption state from the SSL client 41 held in the connection information holding unit 60 to the SSL server 42, and the record processing performed when the previous Change Cipher Spec message S25 is received. In step ST92, the process proceeds to step ST92.

ステップST92においては、レコード復号部56によって、コネクション情報保持部60に保持する暗号スイートの暗号アルゴリズムと、鍵ブロックのSSLクライアント41からSSLサーバ42への暗号化鍵でレコードデータを復号して、レコード解析部57に出力する。   In step ST92, the record decryption unit 56 decrypts the record data with the encryption algorithm of the cipher suite held in the connection information holding unit 60 and the encryption key from the SSL client 41 to the SSL server 42 of the key block, The data is output to the analysis unit 57.

ステップST93においては、レコード解析部57によって、受信したレコードデータがハンドシェイクプロトコルにより生成されたメッセージか否かを判定し、ハンドシェイクプロトコルで生成されたFinishedメッセージS26を受信しているので、ハンドシェイク解析部58にレコードデータを出力し、ステップST94に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the received record data is a message generated by the handshake protocol, and receives the Finished message S26 generated by the handshake protocol. The record data is output to the analysis unit 58, and the process proceeds to step ST94.

ステップST94においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Client Key Exchangeメッセージであるか否かを判定し、受信したメッセージがClient Key ExchangeメッセージではないのでステップST95に処理を進める。   In step ST94, the handshake analysis unit 58 determines whether or not the message type of the received record data is a Client Key Exchange message. Since the received message is not a Client Key Exchange message, the process proceeds to step ST95. Proceed.

ステップST95においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Server Helloメッセージであるか否かを判定し、受信したメッセージがServer HelloメッセージではないのでステップST96に処理を進める。   In step ST95, the handshake analyzer 58 determines whether the message type of the received record data is a Server Hello message. Since the received message is not a Server Hello message, the process proceeds to step ST96.

ステップST96においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Client Helloメッセージであるか否かを判定し、受信したメッセージがClient Helloメッセージではないので処理を終了する。その後、暗号通信復号装置44は、ステップST107において、今回のステップST74の判定で使用したレコード情報保持部55に記憶された蓄積データを削除して、処理を終了する。   In step ST96, the handshake analysis unit 58 determines whether the message type of the received record data is a Client Hello message. Since the received message is not a Client Hello message, the process ends. Thereafter, in step ST107, the encryption / decryption device 44 deletes the accumulated data stored in the record information holding unit 55 used in the determination in step ST74, and ends the process.

一方、SSLサーバ42は、SSLクライアント41から送信されたClient Key ExchangeメッセージS24を受信すると、当該Client Key ExchangeメッセージS24を含むデータを、サーバ秘密鍵で復号して乱数pre−master secretを取得し、乱数pre−master secretと、クライアント乱数と、送信したサーバ乱数とから、マスターシークレットを計算する。次に、SSLサーバ42は、計算したマスターシークレットと、クライアント乱数、及びサーバ乱数とから、鍵ブロックを生成する。   On the other hand, when receiving the Client Key Exchange message S24 transmitted from the SSL client 41, the SSL server 42 decrypts the data including the Client Key Exchange message S24 with the server secret key to obtain a random number pre-master secret, The master secret is calculated from the random number pre-master secret, the client random number, and the transmitted server random number. Next, the SSL server 42 generates a key block from the calculated master secret, the client random number, and the server random number.

次に、SSLサーバ42は、Change Cipher SpecメッセージS25を受信すると、それより後に受信するコネクションのレコードデータを、暗号スイートの暗号アルゴリズムによって、鍵ブロックのSSLクライアント41からSSLサーバ42への暗号化鍵で復号することを認識する。   Next, when the SSL server 42 receives the Change Cipher Spec message S25, the encryption key of the key block from the SSL client 41 to the SSL server 42 is converted into the record data of the connection received after that by the encryption algorithm of the cipher suite. It recognizes that it decrypts with.

次に、SSLサーバ42は、FinishedメッセージS26を受信すると、当該FinishedメッセージS26を含むレコードを復号し、データをSSLクライアント41と同様の方法で生成した値と比較して、改ざんやなりすましがないことを確認する。   Next, when the SSL server 42 receives the Finished message S26, the SSL server 42 decrypts the record including the Finished message S26, compares the data with a value generated in the same manner as the SSL client 41, and has no falsification or impersonation. Confirm.

「第4処理」
次に、SSLサーバ42は、SSLクライアント41に、Change Cipher SpecプロトコルのChange Cipher SpecメッセージS27、及びハンドシェイクプロトコルのFinishedメッセージS28を送信する。このSSLサーバ42からSSLクライアント41に送信されるChange Cipher SpecメッセージS27は、SSLクライアント41から送信されたChange Cipher SpecメッセージS25に対する応答であって、データを含まない。また、ハンドシェイクプロトコルのFinishedメッセージS28は、ハンドシェイクメッセージやマスターシークレット等をハッシュ関数で演算した値を含む。なお、Change Cipher SpecメッセージS27より後のメッセージは、暗号スイートの暗号アルゴリズムによって、鍵ブロックのSSLサーバ42からSSLクライアント41への暗号化鍵で暗号化される。
"4th process"
Next, the SSL server 42 transmits a Change Cipher Spec message S27 of the Change Cipher Spec protocol and a Finished message S28 of the handshake protocol to the SSL client 41. The Change Cipher Spec message S27 transmitted from the SSL server 42 to the SSL client 41 is a response to the Change Cipher Spec message S25 transmitted from the SSL client 41 and does not include data. The Finished message S28 of the handshake protocol includes a value obtained by calculating a handshake message, a master secret, or the like with a hash function. The message after the Change Cipher Spec message S27 is encrypted with the encryption key from the SSL server 42 to the SSL client 41 of the key block by the encryption algorithm of the cipher suite.

これに対し、暗号通信復号装置44は、Change Cipher SpecメッセージS27を受信すると、レコード復号部56にChange Cipher SpecメッセージS27を含むレコードデータを入力させ、レコード処理を開始する。   On the other hand, when receiving the Change Cipher Spec message S27, the cryptographic communication decryption apparatus 44 causes the record decryption unit 56 to input record data including the Change Cipher Spec message S27 and starts record processing.

先ず、ステップST91においては、レコード復号部56によって、コネクション情報保持部60に保持されているSSLサーバ42からSSLクライアント41への暗号化状態を参照し、未だ有効ではないので、ステップST93に処理を進める。   First, in step ST91, the record decrypting unit 56 refers to the encryption state from the SSL server 42 to the SSL client 41 held in the connection information holding unit 60, and is not yet valid. Proceed.

ステップST93においては、レコード解析部57によって、受信したレコードデータがハンドシェイクプロトコルか否かを判定し、ハンドシェイクプロトコルによって生成されたメッセージではないので、ステップST102に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the received record data is a handshake protocol. Since the message is not a message generated by the handshake protocol, the process proceeds to step ST102.

ステップST102においては、レコード解析部57によって、受信したレコードデータのメッセージタイプが、Change Cipher Specプロトコルであるか否かを判定し、Change Cipher SpecS27を受信しているのでステップST103に処理を進める。   In step ST102, the record analysis unit 57 determines whether or not the message type of the received record data is the Change Cipher Spec protocol, and since the Change Cipher Spec S27 is received, the process proceeds to step ST103.

ステップST103においては、ハンドシェイク解析部58によって、コネクション情報保持部60のSSLサーバ42からSSLクライアント41への暗号化状態を有効にさせる。その後、暗号通信復号装置44は、ステップST107において、ステップST74の判定で使用したレコード情報保持部55に記憶された蓄積データを削除して、処理を終了する。   In step ST103, the handshake analysis unit 58 enables the encryption state from the SSL server 42 to the SSL client 41 of the connection information holding unit 60. Thereafter, in step ST107, the cryptographic communication decryption apparatus 44 deletes the accumulated data stored in the record information holding unit 55 used in the determination in step ST74, and ends the process.

また、暗号通信復号装置44は、レコード復号部56にFinishedメッセージS28を含むレコードが入力されると、再度レコード処理を開始する。   Further, when a record including the Finished message S28 is input to the record decryption unit 56, the encryption communication decryption device 44 starts record processing again.

先ずステップST91においては、レコード復号部56によって、コネクション情報保持部60に保持するSSLサーバ42からSSLクライアント41への暗号化状態を参照し、前のレコード処理において有効と設定されているので、ステップST92に処理を進める。   First, in step ST91, the record decrypting unit 56 refers to the encryption state from the SSL server 42 to the SSL client 41 held in the connection information holding unit 60, and is set to be valid in the previous record processing. The process proceeds to ST92.

ステップST92においては、レコード復号部56によって、コネクション情報保持部60に保持する暗号スイートの暗号アルゴリズムと、鍵ブロックのSSLサーバ42からSSLクライアント41への暗号化鍵でレコードデータを復号して、レコード解析部57に出力する。   In step ST92, the record decryption unit 56 decrypts the record data with the encryption algorithm of the cipher suite held in the connection information holding unit 60 and the encryption key from the SSL server 42 to the SSL client 41 of the key block, The data is output to the analysis unit 57.

ステップST93においては、レコード解析部57によって、受信したレコードデータがハンドシェイクプロトコルか否かを判定し、FinishedメッセージS28がハンドシェイクプロトコルによって生成されたメッセージであるので、ハンドシェイク解析部58にレコードデータを出力し、ステップST94に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the received record data is a handshake protocol. Since the Finished message S28 is a message generated by the handshake protocol, the record data is sent to the handshake analysis unit 58. Is output, and the process proceeds to step ST94.

ステップST94においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Client Key Exchangeメッセージであるか否かを判定し、受信したメッセージがClient Key ExchangeメッセージではないのでステップST95に処理を進める。   In step ST94, the handshake analysis unit 58 determines whether or not the message type of the received record data is a Client Key Exchange message. Since the received message is not a Client Key Exchange message, the process proceeds to step ST95. Proceed.

ステップST95においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Server Helloメッセージであるか否かを判定し、受信したメッセージがServer HelloメッセージではないのでステップST96に処理を進める。   In step ST95, the handshake analyzer 58 determines whether the message type of the received record data is a Server Hello message. Since the received message is not a Server Hello message, the process proceeds to step ST96.

ステップST96においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプがClient Helloメッセージであるか否かを判定し、受信したメッセージがClient Helloメッセージではないので処理を終了する。その後、暗号通信復号装置44は、ステップST107において、今回のステップST74の判定で使用したレコード情報保持部55に記憶された蓄積データを削除して、処理を終了する。   In step ST96, the handshake analysis unit 58 determines whether or not the message type of the received record data is a Client Hello message. Since the received message is not a Client Hello message, the process ends. Thereafter, in step ST107, the encryption / decryption device 44 deletes the accumulated data stored in the record information holding unit 55 used in the determination in step ST74, and ends the process.

一方、SSLクライアント41は、Change Cipher SpecメッセージS27を受信すると、それより後に受信する当該コネクションのレコードを、暗号スイートの暗号アルゴリズムによって、鍵ブロックのSSLサーバ42からSSLクライアント41への暗号化鍵で復号する。   On the other hand, when the SSL client 41 receives the Change Cipher Spec message S27, the SSL client 41 uses the encryption key from the SSL server 42 to the SSL client 41 of the key block to transmit the record of the connection received after that to the encryption block encryption algorithm. Decrypt.

次に、SSLクライアント41は、FinishedメッセージS28を受信すると、レコードを復号し、データをSSLサーバ42と同様の方法で生成した値と比較して改ざんやなりすましがないことを確認する。   Next, when receiving the Finished message S28, the SSL client 41 decrypts the record and compares the data with a value generated in the same manner as the SSL server 42 to confirm that there is no falsification or impersonation.

これにより、SSLクライアント41とSSLサーバ42との間のハンドシェイクプロトコルが完了することになる。この時点では、SSLクライアント41、SSLサーバ42、暗号通信復号装置44とも同一の暗号化鍵の状態、すなわち同一の暗号化鍵を生成し、同一のデータ長の暗号処理をした状態となっている。   Thereby, the handshake protocol between the SSL client 41 and the SSL server 42 is completed. At this time, the SSL client 41, the SSL server 42, and the encryption communication decryption device 44 are in the same encryption key state, that is, the same encryption key is generated and the encryption process is performed with the same data length. .

「アプリケーションデータ処理」
上述したようにハンドシェイク処理が完了すると、SSLクライアント41とSSLサーバ42との間でアプリケーションデータの送受信が可能となる。すなわち、SSLクライアント41は、SSLサーバ42宛にアプリケーションデータを送信する場合は、アプリケーションデータをレコードに分割し、鍵ブロックのうちSSLクライアント41からSSLサーバ42への暗号化鍵によって暗号化してアプリケーションデータ(Application Data)プロトコルで送信する。
Application data processing
When the handshake process is completed as described above, application data can be transmitted and received between the SSL client 41 and the SSL server 42. That is, when the application data is transmitted to the SSL server 42, the SSL client 41 divides the application data into records, and encrypts the application data by using the encryption key from the SSL client 41 to the SSL server 42 in the key block. (Application Data) Send with protocol.

これに対し、暗号通信復号装置44は、SSLにおけるアプリケーションデータプロトコルで生成されたレコードが入力されると、レコード処理を開始する。   On the other hand, when the record generated by the application data protocol in SSL is input, the encryption communication decryption device 44 starts the record processing.

このレコード処理のステップST91においては、レコード復号部56によって、コネクション情報保持部60に保持するSSLクライアント41からSSLサーバ42への暗号化状態を参照し、上述のハンドシェイク処理で有効に設定されているので、ステップST92に処理を進める。   In step ST91 of this record processing, the record decrypting unit 56 refers to the encryption state from the SSL client 41 to the SSL server 42 held in the connection information holding unit 60, and is set to be valid in the above-described handshake processing. Therefore, the process proceeds to step ST92.

ステップST92においては、レコード復号部56によって、コネクション情報保持部60に保持する暗号スイートの暗号アルゴリズムと、鍵ブロックのSSLクライアント41からSSLサーバ42への暗号化鍵でレコードを復号して、レコード解析部57に出力する。   In step ST92, the record decryption unit 56 decrypts the record with the encryption algorithm of the cipher suite held in the connection information holding unit 60 and the encryption key from the SSL client 41 to the SSL server 42 of the key block, and the record analysis To the unit 57.

ステップST93においては、レコード解析部57によって、受信したレコードデータがハンドシェイクプロトコルか否かを判定し、ハンドシェイクプロトコルによって生成されたレコードではないので、ステップST102に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the received record data is a handshake protocol. Since the record data is not a record generated by the handshake protocol, the process proceeds to step ST102.

ステップST102においては、レコード解析部57によって、受信したレコードデータのメッセージタイプが、Change Cipher Specメッセージであるか否かを判定し、受信したレコードがChange Cipher SpecメッセージではないのでステップST104に処理を進める。   In step ST102, the record analysis unit 57 determines whether the message type of the received record data is a Change Cipher Spec message. Since the received record is not a Change Cipher Spec message, the process proceeds to step ST104. .

ステップST104においては、レコード解析部57によって、受信したレコードデータのメッセージタイプが、Application Dataプロトコルであるか否かを判定し、Application Dataプロトコルによって生成されたレコードを受信しているので、受信したレコードデータをパケット整形部63に出力して、ステップST105に処理を進める。   In step ST104, the record analysis unit 57 determines whether the message type of the received record data is the Application Data protocol, and since the record generated by the Application Data protocol is received, the received record Data is output to the packet shaping unit 63, and the process proceeds to step ST105.

ステップST105においては、パケット整形部63によって、受信したレコードデータの復号した部分を、HTTPパケットに整形して、通信インターフェース64からネットワーク監視装置4’’に出力させる。このとき、パケット整形部63は、図15に示すように、受信したレコードデータの復号した部分の先頭に、ステップST71で受信したIPパケットのIPヘッダ及びTCPヘッダを追加し、TCPヘッダの宛先ポートをHTTPを示すポート番号に設定し、TCPヘッダのシーケンス番号フィールド、ACK番号フィールド、チェックサムフィールド、及びIPヘッダの長さフィールド、チェックサムフィールドを再計算する。これにより、レコードを、HTTPパケットに整形する。また、パケット整形部63は、ネットワーク監視装置4’’がLANに対応している場合には、イーサヘッダの宛先をネットワーク監視装置4’’のアドレスにすることになる。   In step ST105, the packet shaping unit 63 shapes the decrypted portion of the received record data into an HTTP packet, which is output from the communication interface 64 to the network monitoring device 4 ''. At this time, as shown in FIG. 15, the packet shaping unit 63 adds the IP header and TCP header of the IP packet received in step ST71 to the beginning of the decoded part of the received record data, and the destination port of the TCP header Is set to the port number indicating HTTP, and the sequence number field, ACK number field, checksum field, IP header length field, and checksum field of the TCP header are recalculated. Thereby, the record is shaped into an HTTP packet. In addition, when the network monitoring device 4 ″ is compatible with the LAN, the packet shaping unit 63 sets the destination of the Ethernet header to the address of the network monitoring device 4 ″.

次のステップST106においては、通信インターフェース64によって、パケット整形部63で整形されたHTTPパケットを、ネットワーク監視装置4’’に送信する。その後、暗号通信復号装置44は、ステップST107において、今回のステップST74の判定で使用したレコード情報保持部55に記憶された蓄積データを削除して、処理を終了する。   In the next step ST106, the HTTP packet shaped by the packet shaping unit 63 is transmitted to the network monitoring apparatus 4 '' by the communication interface 64. Thereafter, in step ST107, the encryption / decryption device 44 deletes the accumulated data stored in the record information holding unit 55 used in the determination in step ST74, and ends the process.

これにより、ネットワーク監視装置4’’は、HTTPパケットを解析し、当該HTTPパケットの内容が不適当である場合には管理者に通知することが可能となる。   As a result, the network monitoring device 4 ″ analyzes the HTTP packet, and can notify the administrator if the content of the HTTP packet is inappropriate.

また、SSLサーバ42が、SSLクライアント41に、アプリケーションデータを送信した場合、暗号通信復号装置44は、レコード復号部56にアプリケーションデータプロトコルによって生成されたレコードが入力されると、レコード処理を開始する。   When the SSL server 42 transmits application data to the SSL client 41, the encryption communication decryption device 44 starts record processing when a record generated by the application data protocol is input to the record decryption unit 56. .

先ずステップST91においては、レコード復号部56によって、コネクション情報保持部60に保持するSSLサーバ42からSSLクライアント41への暗号化状態を参照し、有効と設定されているので、ステップST92に処理を進める。   First, in step ST91, the record decrypting unit 56 refers to the encryption state from the SSL server 42 to the SSL client 41 held in the connection information holding unit 60, and since it is set to be valid, the process proceeds to step ST92. .

ステップST92においては、レコード復号部56によって、コネクション情報保持部60に保持する暗号スイートの暗号アルゴリズムと、鍵ブロックのSSLサーバ42からSSLクライアント41への暗号化鍵でレコードを復号して、レコード解析部57に出力する。   In step ST92, the record decryption unit 56 decrypts the record with the encryption algorithm of the cipher suite held in the connection information holding unit 60 and the encryption key from the SSL server 42 to the SSL client 41 of the key block, and the record analysis To the unit 57.

ステップST93においては、レコード解析部57によって、受信したレコードデータがハンドシェイクプロトコルか否かを判定し、ハンドシェイクプロトコルで生成されたメッセージではないので、ステップST102に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the received record data is a handshake protocol. Since the message is not a message generated by the handshake protocol, the process proceeds to step ST102.

ステップST102においては、レコード解析部57によって、受信したレコードデータのメッセージタイプがChange Cipher Specプロトコルであるか否かを判定し、受信したメッセージがChange Cipher Specプロトコルで生成されたメッセージではないのでステップST104に処理を進める。   In step ST102, the record analysis unit 57 determines whether or not the message type of the received record data is the Change Cipher Spec protocol. Since the received message is not a message generated by the Change Cipher Spec protocol, the step ST104 Proceed with the process.

ステップST104においては、レコード解析部57によって、受信したレコードデータのメッセージタイプが、アプリケーションデータであるか否かを判定し、アプリケーションデータプロトコルによって作成されたアプリケーションデータを受信しているので、受信したレコードデータをパケット整形部63に出力して、ステップST105に処理を進める。   In step ST104, the record analysis unit 57 determines whether the message type of the received record data is application data, and has received application data created by the application data protocol. Data is output to the packet shaping unit 63, and the process proceeds to step ST105.

ステップST105においては、パケット整形部63によって、上述したステップST105の処理と同様の処理を行うことにより、受信したレコードデータのデータを、HTTPパケットとして整形する。そして、ステップST106においては、通信インターフェース64からHTTPパケットをネットワーク監視装置4’’に送信させる。その後、暗号通信復号装置44は、ステップST107において、今回のステップST74の判定で使用したレコード情報保持部55に記憶された蓄積データを削除して、処理を終了する。   In step ST105, the packet shaping unit 63 performs the same process as the process in step ST105 described above, thereby shaping the received record data as an HTTP packet. In step ST106, the HTTP packet is transmitted from the communication interface 64 to the network monitoring device 4 ''. Thereafter, in step ST107, the encryption / decryption device 44 deletes the accumulated data stored in the record information holding unit 55 used in the determination in step ST74, and ends the process.

これにより、ネットワーク監視装置4’’は、HTTPパケットを解析し、当該HTTPパケットの内容が不適当である場合には管理者に通知することが可能となる。   As a result, the network monitoring device 4 ″ analyzes the HTTP packet, and can notify the administrator if the content of the HTTP packet is inappropriate.

以上のように、暗号通信復号装置44は、SSLクライアント41とSSLサーバ42との間で送受信される暗号化されたSSLパケットを復号して整形することで、SSLパケットをHTTPパケットとしてネットワーク監視装置4’’に出力し、ネットワーク監視装置4’’による監視を可能にする。   As described above, the encryption communication decryption device 44 decrypts the encrypted SSL packet transmitted / received between the SSL client 41 and the SSL server 42 and shapes the SSL packet as an HTTP packet. 4 ″, enabling monitoring by the network monitoring device 4 ″.

「セッションの再起動」
また、SSLプロトコルにおいては、コネクション構築時に既存のセッションを使用することができ、それ以前のコネクション構築時に生成したマスターシークレットを再利用して、セッションの再起動を行うことができる。つぎに、このようなSSLにおけるセッションの再起動を図19を参照して説明し、当該セッションの再起動時における暗号通信復号装置44の動作を説明する。
"Restarting a Session"
In the SSL protocol, an existing session can be used at the time of establishing a connection, and the session can be restarted by reusing a master secret generated at the time of establishing a previous connection. Next, the restart of the session in the SSL will be described with reference to FIG. 19, and the operation of the encryption / decryption device 44 when the session is restarted will be described.

先ず、セッションの再起動処理では、上述のSSLプロトコルにおける第1処理と同様に、SSLクライアント41からSSLサーバ42にClient HelloメッセージS21が送信され、暗号通信復号装置44によって第1処理と同様の処理が実行される。その後、セッションの再起動処理は、SSLサーバ42からSSLクライアント41に、Server HelloメッセージS22、Change Cipher SpecメッセージS31、FinishedメッセージS32が送信され、暗号通信復号装置44による第2処理が開始される。   First, in the session restart process, the Client Hello message S21 is transmitted from the SSL client 41 to the SSL server 42 as in the first process in the SSL protocol described above, and the encryption communication decryption apparatus 44 performs the same process as the first process. Is executed. Thereafter, in the session restart process, the Server Hello message S22, the Change Cipher Spec message S31, and the Finished message S32 are transmitted from the SSL server 42 to the SSL client 41, and the second process by the encryption communication decryption apparatus 44 is started.

「第2処理」
SSLサーバ42は、SSLクライアント41からClient HelloメッセージS21を受信すると、SSLクライアント41に、ハンドシェイクプロトコルのServer HelloメッセージS22、Change Cipher SpecプロトコルのChange Cipher SpecメッセージS31、及びハンドシェイクプロトコルのFinishedメッセージS32を送信する。
"Second process"
When the SSL server 42 receives the Client Hello message S21 from the SSL client 41, the SSL client 41 sends a handshake protocol Server Hello message S22, a Change Cipher Spec protocol Change Cipher Spec message S31, and a handshake protocol Finished message S32 to the SSL client 41. Send.

また、SSLサーバ42は、以前のコネクション構築時に生成したマスターシークレットと、SSLクライアント41から受信したクライアント乱数、及びSSLクライアント41に送信したサーバ乱数とから、鍵ブロックを生成する。   Further, the SSL server 42 generates a key block from the master secret generated at the time of establishing the previous connection, the client random number received from the SSL client 41, and the server random number transmitted to the SSL client 41.

これに対し、暗号通信復号装置44は、レコード復号部56にServer HelloメッセージS22を含むレコードが入力されると、レコード処理を開始する。   On the other hand, when a record including the Server Hello message S22 is input to the record decrypting unit 56, the encryption / decryption device 44 starts record processing.

このレコード処理は、先ずステップST91において、レコード復号部56によって、コネクション情報保持部60に保持するSSLサーバ42からSSLクライアント41への暗号化状態を参照し、未だに有効ではないので、ステップST93に処理を進める。   First, in step ST91, this record processing refers to the encryption state from the SSL server 42 to the SSL client 41 held in the connection information holding unit 60 by the record decrypting unit 56, and is not yet effective. To proceed.

ステップST93においては、レコード解析部57によって、受信したレコードがハンドシェイクプロトコルか否かを判定し、ハンドシェイクプロトコルなので、ハンドシェイク解析部58にレコードを出力し、ステップST94に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the received record is a handshake protocol. Since the record is a handshake protocol, the record is output to the handshake analysis unit 58, and the process proceeds to step ST94.

ステップST94においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Client Key Exchangeメッセージを示すものであるか否かを判定し、受信したメッセージがClient Key ExchangeメッセージではないのでステップST95に処理を進める。   In step ST94, the handshake analysis unit 58 determines whether or not the message type of the received record data indicates a Client Key Exchange message. Since the received message is not a Client Key Exchange message, step ST95 Proceed with the process.

ステップST95においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Server Helloメッセージであるか否かを判定し、受信したメッセージがServer HelloメッセージS22であるのでステップST98に処理を進める。   In step ST95, the handshake analysis unit 58 determines whether or not the message type of the received record data is a Server Hello message. Since the received message is the Server Hello message S22, the process proceeds to step ST98. .

ステップST98においては、ハンドシェイク解析部58によって、受信したレコードデータからサーバ乱数、セッションID、暗号スイートを取得し、サーバ乱数及び暗号スイートをコネクション情報保持部60に記憶させ、セッションIDをセッション情報保持部59に記憶させる。このとき、ハンドシェイク解析部58は、同じメッセージに付加されていたものとして対応付けるために、記憶したコネクション情報とセッション情報とをリンクさせて記憶させる。   In step ST98, the handshake analysis unit 58 acquires the server random number, session ID, and cipher suite from the received record data, stores the server random number and cipher suite in the connection information holding unit 60, and holds the session ID as session information. This is stored in the unit 59. At this time, the handshake analysis unit 58 links and stores the stored connection information and session information in order to associate them with those added to the same message.

ステップST99においては、セッション情報保持部59に共通秘密鍵であるマスターシークレットが存在するか否かを判定し、存在するので、ステップST101に処理を進める。   In step ST99, it is determined whether or not a master secret that is a common secret key exists in session information holding unit 59, and since it exists, the process proceeds to step ST101.

ステップST101においては、ハンドシェイク解析部58によって、コネクションにおける鍵ブロックを生成する。具体的には、セッション情報保持部59に保持しているマスターシークレットと、コネクション情報保持部60に保持しているクライアント乱数、サーバ乱数とから鍵ブロックを生成する。   In step ST101, the handshake analysis unit 58 generates a key block in the connection. Specifically, a key block is generated from the master secret held in the session information holding unit 59 and the client random number and server random number held in the connection information holding unit 60.

そして、暗号通信復号装置44は、Change Cipher SpecメッセージS31、FinishedメッセージS32を受信すると、上述した第4処理において、Change Cipher SpecメッセージS27、Server HelloメッセージS28を受信した場合と同様の処理を行う。   Then, when receiving the Change Cipher Spec message S31 and the Finished message S32, the cryptographic communication decryption apparatus 44 performs the same process as when the Change Cipher Spec message S27 and the Server Hello message S28 are received in the fourth process described above.

これに対して、SSLクライアント41は、SSLサーバ42からServer HelloメッセージS22を受信すると、以前のコネクション構築時に生成したマスターシークレットと、クライアント乱数、及びサーバ乱数とから、鍵ブロックを生成する。   On the other hand, when the SSL client 41 receives the Server Hello message S22 from the SSL server 42, the SSL client 41 generates a key block from the master secret generated during the previous connection establishment, the client random number, and the server random number.

また、SSLクライアント41は、Change Cipher SpecメッセージS31を受信すると、それより後に受信するコネクション処理のレコードを、暗号スイートの暗号アルゴリズムによって、鍵ブロックのSSLサーバ42からSSLクライアント41への暗号化鍵で復号する。   Further, when the SSL client 41 receives the Change Cipher Spec message S31, the connection processing record received after that is sent with the encryption key from the SSL server 42 to the SSL client 41 of the key block by the encryption algorithm of the cipher suite. Decrypt.

更に、SSLクライアント41は、FinishedメッセージS32を受信すると、レコードを復号し、データをSSLサーバ42と同様の方法で生成した値と比較して、改ざんやなりすましがないことを確認する。   Furthermore, when the SSL client 41 receives the Finished message S32, the SSL client 41 decrypts the record and compares the data with a value generated in the same manner as the SSL server 42 to confirm that there is no falsification or impersonation.

「第3処理」
次に、SSLクライアント41は、SSLサーバ42に、Change Cipher SpecプロトコルのChange Cipher SpecメッセージS33、及びハンドシェイクプロトコルのFinishedメッセージS34を送信する。
"Third process"
Next, the SSL client 41 transmits, to the SSL server 42, a Change Cipher Spec message S33 of the Change Cipher Spec protocol and a Finished message S34 of the handshake protocol.

これに対し、暗号通信復号装置44は、レコード復号部56にChange Cipher SpecメッセージS33を含むレコードが入力されると、再度レコード処理を開始する。   On the other hand, when a record including the Change Cipher Spec message S33 is input to the record decrypting unit 56, the encryption / decryption device 44 starts record processing again.

このレコード処理は、先ずステップST91において、レコード復号部56によって、コネクション情報保持部60に保持するSSLクライアント41からSSLサーバ42への暗号化状態を参照し、未だ有効ではないので、ステップST93に処理を進める。   First, in step ST91, this record processing refers to the encryption state from the SSL client 41 to the SSL server 42 held in the connection information holding unit 60 by the record decrypting unit 56, and is not yet valid. To proceed.

ステップST93においては、レコード解析部57によって、受信したレコードデータがハンドシェイクプロトコルか否かを判定し、ハンドシェイクプロトコルではないので、ステップST102に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the received record data is a handshake protocol. Since the record data is not a handshake protocol, the process proceeds to step ST102.

ステップST102においては、レコード解析部57によって、受信したレコードデータのメッセージタイプがChange Cipher Specプロトコルであるか否かを判定し、Change Cipher SpecメッセージS33を受信しているのでステップST103に処理を進める。   In step ST102, the record analysis unit 57 determines whether or not the message type of the received record data is the Change Cipher Spec protocol, and since the Change Cipher Spec message S33 is received, the process proceeds to step ST103.

ステップST103においては、ハンドシェイク解析部58によって、コネクション情報保持部60のSSLクライアント41からSSLサーバ42への暗号化状態を有効にする。   In step ST103, the handshake analysis unit 58 validates the encryption state from the SSL client 41 to the SSL server 42 of the connection information holding unit 60.

また、暗号通信復号装置44は、レコード復号部56にFinishedメッセージS34を含むレコードが入力されると、再度レコード処理を開始する。   In addition, when a record including the Finished message S34 is input to the record decryption unit 56, the encrypted communication decryption device 44 starts record processing again.

ステップST91においては、レコード復号部56によって、コネクション情報保持部60に保持するSSLクライアント41からSSLサーバ42への暗号化状態を参照し、有効となっているので、ステップST92に処理を進める。   In step ST91, the record decrypting unit 56 refers to the encryption state from the SSL client 41 to the SSL server 42 held in the connection information holding unit 60, and since it is valid, the process proceeds to step ST92.

ステップST92においては、レコード復号部56によって、コネクション情報保持部60に保持する暗号スイートの暗号アルゴリズムと、鍵ブロックのSSLクライアント41からSSLサーバ42への暗号化鍵でレコードを復号して、レコード解析部57に出力する。   In step ST92, the record decryption unit 56 decrypts the record with the encryption algorithm of the cipher suite held in the connection information holding unit 60 and the encryption key from the SSL client 41 to the SSL server 42 of the key block, and the record analysis To the unit 57.

ステップST93においては、レコード解析部57によって、受信したレコードデータがハンドシェイクプロトコルか否かを判定し、ハンドシェイクプロトコルにより生成されたメッセージであるので、ハンドシェイク解析部58にレコードを出力し、ステップST94に処理を進める。   In step ST93, the record analysis unit 57 determines whether or not the received record data is a handshake protocol, and since this is a message generated by the handshake protocol, the record is output to the handshake analysis unit 58. The process proceeds to ST94.

ステップST94においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Client Key Exchangeメッセージであるか否かを判定し、受信したメッセージがClient Key Exchangeメッセージではないので、ステップST95に処理を進める。   In step ST94, the handshake analysis unit 58 determines whether the message type of the received record data is a Client Key Exchange message. Since the received message is not a Client Key Exchange message, the process proceeds to step ST95. To proceed.

ステップST95においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Server Helloメッセージであるか否かを判定し、受信したメッセージがServer HelloメッセージではないのでステップST96に処理を進める。   In step ST95, the handshake analyzer 58 determines whether the message type of the received record data is a Server Hello message. Since the received message is not a Server Hello message, the process proceeds to step ST96.

ステップST96においては、ハンドシェイク解析部58によって、受信したレコードデータのメッセージタイプが、Client Helloメッセージであるか否かを判定し、受信したメッセージがClient Helloメッセージではないので処理を終了する。   In step ST96, the handshake analysis unit 58 determines whether the message type of the received record data is a Client Hello message. Since the received message is not a Client Hello message, the process ends.

これに対し、SSLサーバ42は、Change Cipher SpecメッセージS33を受信すると、それより後に受信するコネクション処理についてのレコードを、暗号スイートの暗号アルゴリズムによって、鍵ブロックのSSLクライアント41からSSLサーバ42への暗号化鍵で復号する。   On the other hand, when the SSL server 42 receives the Change Cipher Spec message S33, the SSL server 42 encrypts a record of connection processing received after that by the encryption algorithm of the cipher suite from the SSL client 41 to the SSL server 42. Decrypt with the encryption key.

次に、SSLサーバ42は、FinishedメッセージS34を受信すると、レコードを復号し、データをSSLクライアント41と同様の方法で生成した値と比較して、改ざんやなりすましがないことを確認する。これにより、セッションの再起動処理が終了し、アプリケーション処理を行うことが可能な状態になり、暗号通信復号装置44及びネットワーク監視装置4’’によってSSLパケットによる通信内容の監視も開始されることになる。   Next, when receiving the Finished message S34, the SSL server 42 decrypts the record, compares the data with a value generated in the same manner as the SSL client 41, and confirms that there is no falsification or impersonation. As a result, the session restart process ends, and the application process can be performed. Monitoring of the communication content by the SSL packet is also started by the encryption communication decryption device 44 and the network monitoring device 4 ″. Become.

[第3実施形態の効果]
以上詳細に説明したように、本発明を適用した通信システムによれば、SSLクライアント41とSSLサーバ42との間のハンドシェイク処理によって送受信されるメッセージを、ハブ43を介して暗号通信復号装置44で傍受して、暗号通信復号装置44に、SSLクライアント41からSSLサーバ42に送信されるSSLパケットの暗号化鍵及びSSLサーバ42からSSLクライアント41に送信されるSSLパケットの暗号化鍵を記憶させることができる。そして、暗号通信復号装置44では、当該双方の暗号化鍵を用いて、SSLクライアント41とSSLサーバ42との間で行われるアプリケーション処理で送受信されるSSLパケットの復号及び整形が可能となる。したがって、この通信システムによれば、既存のネットワーク監視装置4’’によってSSLパケットによる通信内容の監視及び制御を可能とすることができる。
[Effect of the third embodiment]
As described above in detail, according to the communication system to which the present invention is applied, the message transmitted and received by the handshake process between the SSL client 41 and the SSL server 42 is transmitted via the hub 43 to the encryption communication decryption device 44. The encryption communication decryption device 44 stores the encryption key of the SSL packet transmitted from the SSL client 41 to the SSL server 42 and the encryption key of the SSL packet transmitted from the SSL server 42 to the SSL client 41. be able to. Then, the encryption communication decryption device 44 can decrypt and format the SSL packet transmitted / received by the application process performed between the SSL client 41 and the SSL server 42 using both of the encryption keys. Therefore, according to this communication system, it is possible to monitor and control the communication content by the SSL packet by the existing network monitoring device 4 ″.

なお、上述の実施の形態は本発明の一例である。このため、本発明は、上述の実施形態に限定されることはなく、この実施の形態以外であっても、本発明に係る技術的思想を逸脱しない範囲であれば、設計等に応じて種々の変更が可能であることは勿論である。   The above-described embodiment is an example of the present invention. For this reason, the present invention is not limited to the above-described embodiment, and various modifications can be made depending on the design and the like as long as the technical idea according to the present invention is not deviated from this embodiment. Of course, it is possible to change.

本発明を適用した第1実施形態における通信システムの構成を示すブロック図である。It is a block diagram which shows the structure of the communication system in 1st Embodiment to which this invention is applied. 本発明を適用した第1実施形態における暗号通信復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the encryption communication decoding apparatus in 1st Embodiment to which this invention is applied. 本発明を適用した第1実施形態における全体処理を示すフローチャートである。It is a flowchart which shows the whole process in 1st Embodiment to which this invention is applied. 本発明を適用した第1実施形態に係る通信システムの暗号通信復号装置で行うIKE処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the IKE process performed with the encryption communication decoding apparatus of the communication system which concerns on 1st Embodiment to which this invention is applied. 本発明を適用した第1実施形態に係る通信システムの暗号通信復号装置で行うESP処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the ESP process performed with the encryption communication decoding apparatus of the communication system which concerns on 1st Embodiment to which this invention is applied. 本発明を適用した第1実施形態に係る通信システムにおけるIKE処理でイニシエータ、暗号通信復号装置、レスポンダの間で送受信されるメッセージの流れ図である。It is a flowchart of the message transmitted / received between an initiator, an encryption communication decoding apparatus, and a responder by the IKE process in the communication system which concerns on 1st Embodiment to which this invention is applied. 本発明を適用した第1実施形態において、暗号通信復号装置によってパケットを整形する処理を説明するための概要図であり、(a)は受信したパケットがESPにおけるトランスポートモードで作成されている時の処理を説明する図であり、(b)は受信したパケットがESPにおけるトンネルモードで作成されている時の処理を説明する図である。In the first embodiment to which the present invention is applied, it is a schematic diagram for explaining the process of shaping a packet by the encryption communication decryption device, (a) when the received packet is created in the transport mode in ESP (B) is a diagram for explaining the processing when a received packet is created in the tunnel mode in ESP. 本発明を適用した第2実施形態における通信システムの構成を示すブロック図である。It is a block diagram which shows the structure of the communication system in 2nd Embodiment to which this invention is applied. 本発明を適用した第2実施形態における暗号通信復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the encryption communication decoding apparatus in 2nd Embodiment to which this invention is applied. 本発明を適用した第2実施形態における全体処理を示すフローチャートである。It is a flowchart which shows the whole process in 2nd Embodiment to which this invention is applied. 本発明を適用した第2実施形態に係る通信システムの暗号通信復号装置で行うESP処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the ESP process performed with the encryption communication decoding apparatus of the communication system which concerns on 2nd Embodiment to which this invention is applied. 本発明を適用した第2実施形態に係る通信システムの暗号通信復号装置で行う平文処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the plaintext process performed with the encryption communication decoding apparatus of the communication system which concerns on 2nd Embodiment to which this invention is applied. 本発明を適用した第3実施形態における通信システムの構成を示すブロック図である。It is a block diagram which shows the structure of the communication system in 3rd Embodiment to which this invention is applied. 本発明を適用した第3実施形態における暗号通信復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the encryption communication decoding apparatus in 3rd Embodiment to which this invention is applied. 本発明を適用した第3実施形態において、暗号通信復号装置によってパケットを整形する処理を説明するための概要図である。In 3rd Embodiment to which this invention is applied, it is a schematic diagram for demonstrating the process which shapes a packet with an encryption communication decoding apparatus. 本発明を適用した第3実施形態における全体処理を示すフローチャートである。It is a flowchart which shows the whole process in 3rd Embodiment to which this invention is applied. 本発明を適用した第3実施形態に係る通信システムにおける暗号通信復号装置で行うレコード処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the record process performed with the encryption communication decoding apparatus in the communication system which concerns on 3rd Embodiment to which this invention is applied. 本発明を適用した第3実施形態に係る通信システムにおけるハンドシェイク処理でSSLクライアントとSSLサーバとの間で送受信されるメッセージの流れ図である。It is a flowchart of the message transmitted / received between a SSL client and a SSL server by the handshake process in the communication system which concerns on 3rd Embodiment to which this invention is applied. 本発明を適用した第3実施形態に係る通信システムにおけるセッションの再起動処理でSSLクライアントとSSLサーバとの間で送受信されるメッセージの流れ図である。It is a flowchart of the message transmitted / received between a SSL client and a SSL server by the restart process of the session in the communication system which concerns on 3rd Embodiment to which this invention is applied.

符号の説明Explanation of symbols

1,2 VPN端末
3,3’,44 暗号通信復号装置
4,4’,4’’ ネットワーク監視装置
11,12,13,31,51,64 通信インターフェース
13 セッション鍵出力部
14 事前共有鍵保持部
15 パケット復号部
16 パケット読取部
17 パケット生成部
18 セッション情報保持部
19 公開鍵保持部
20 鍵共有データ保持部
21 セッション鍵生成部
22 公開鍵生成部
23 秘密鍵生成部
24 共通秘密鍵生成部
25 秘密鍵保持部
26 セッション鍵保持部(記憶手段)
27 パケット暗号化部
41 SSLクライアント
42 SSLサーバ
43 ハブ
52 フィルタ部
53 フィルタ設定部
54 レコード再構成部
55 レコード情報保持部
56 レコード復号部(復号手段)
57 レコード解析部
58 ハンドシェイク解析部
59 セッション情報保持部
60 コネクション情報保持部
61 公開鍵暗号処理部
62 秘密鍵設定部
63 パケット整形部
1, 2 VPN terminal 3, 3 ′, 44 Encryption communication decryption device 4, 4 ′, 4 ″ Network monitoring device 11, 12, 13, 31, 51, 64 Communication interface 13 Session key output unit 14 Pre-shared key holding unit DESCRIPTION OF SYMBOLS 15 Packet decoding part 16 Packet reading part 17 Packet generation part 18 Session information holding part 19 Public key holding part 20 Key shared data holding part 21 Session key generation part 22 Public key generation part 23 Secret key generation part 24 Common secret key generation part 25 Secret key holding unit 26 Session key holding unit (storage means)
27 Packet encryption unit 41 SSL client 42 SSL server 43 Hub 52 Filter unit 53 Filter setting unit 54 Record reconstruction unit 55 Record information holding unit 56 Record decryption unit (decryption means)
57 record analysis unit 58 handshake analysis unit 59 session information holding unit 60 connection information holding unit 61 public key encryption processing unit 62 secret key setting unit 63 packet shaping unit

Claims (9)

第1の通信装置と第2の通信装置との間に設けられ、前記第1の通信装置と前記第2の通信装置との間で暗号化したパケットを送受信し、当該送受信されるパケットの通信内容を監視装置に監視させる通信システムの暗号通信復号装置であって、
前記第1の通信装置から送信されたパケットを復号すると共に前記第1の通信装置宛のパケットを暗号化する第1の鍵情報と、前記第2の通信装置から送信されたパケットを復号すると共に前記第2の通信装置宛のパケットを暗号化する第2の鍵情報と、当該第1の鍵情報又は第2の鍵情報を用いた暗号化アルゴリズムとを記憶する記憶手段と、
前記第1の通信装置からパケットを受信した場合に、前記暗号化アルゴリズムに従って、当該パケットを第1の鍵情報を用いて復号し、当該復号したパケットを第2の鍵情報を用いて暗号化して前記第2の通信装置に送信し、前記第2の通信装置からパケットを受信した場合に、前記暗号化アルゴリズムに従って、当該パケットを第2の鍵情報を用いて復号し、当該復号したパケットを第1の鍵情報を用いて暗号化して前記第1の通信装置に送信する中継手段と、
前記中継手段によって復号されたパケットを、前記監視装置で処理可能な形態に整形して前記監視装置に出力して、前記監視装置に通信内容を監視させる出力手段と
を備えることを特徴とする暗号通信復号装置。
Provided between the first communication device and the second communication device, send and receive encrypted packets between the first communication device and the second communication device, and communicate the packets transmitted and received An encryption communication decryption device for a communication system that causes a monitoring device to monitor the contents,
While decrypting the packet transmitted from the first communication device, the first key information for encrypting the packet addressed to the first communication device, and decrypting the packet transmitted from the second communication device Storage means for storing second key information for encrypting a packet addressed to the second communication device, and an encryption algorithm using the first key information or the second key information;
When a packet is received from the first communication device, the packet is decrypted using the first key information according to the encryption algorithm, and the decrypted packet is encrypted using the second key information. When the packet is transmitted to the second communication device and the packet is received from the second communication device, the packet is decrypted using the second key information according to the encryption algorithm, and the decrypted packet is Relay means for encrypting using the key information of 1 and transmitting to the first communication device;
An encryption unit comprising: an output unit configured to shape the packet decrypted by the relay unit into a form that can be processed by the monitoring device, output the packet to the monitoring device, and cause the monitoring device to monitor communication contents; Communication decoding device.
前記出力手段は、前記中継手段で復号されたパケットの宛先を前記監視装置のアドレスに設定し、前記中継手段で復号されたパケットに付加されているヘッダ及びトレーラのうち暗号化及び復号に必要なヘッダ及びトレーラを取り外し、当該取り外したヘッダ又はトレーラに含まれていた次ヘッダプロトコル情報を、前記中継手段で復号されたパケットの先頭に付加されるヘッダの次ヘッダプロトコル情報に変更することにより、前記中継手段で復号されたパケットを、前記監視装置で処理可能な形態に整形することを特徴とする請求項1に記載の暗号通信復号装置。   The output means sets the destination of the packet decrypted by the relay means to the address of the monitoring device, and is necessary for encryption and decryption of the header and trailer added to the packet decrypted by the relay means By removing the header and trailer and changing the next header protocol information contained in the removed header or trailer to the next header protocol information of the header added to the head of the packet decoded by the relay means, The encrypted communication decryption apparatus according to claim 1, wherein the packet decrypted by the relay unit is shaped into a form that can be processed by the monitoring apparatus. 前記中継手段により復号したパケットを、暗号化する前に行う処理の処理情報を入力する入力手段を更に備え、
前記中継手段は、前記中継手段で復号したパケットを前記第1の鍵情報又は前記第2の鍵情報を用いて暗号化する前に、前記入力手段で入力した処理情報に基づいた処理を行い、当該処理が施されたパケットを暗号化して、前記第1の通信装置又は前記第2の通信装置に送信すること
を特徴とする請求項1に記載の暗号通信復号装置。
An input means for inputting processing information of processing performed before encrypting the packet decrypted by the relay means;
The relay unit performs processing based on the processing information input by the input unit before encrypting the packet decrypted by the relay unit using the first key information or the second key information, The encrypted communication decryption apparatus according to claim 1, wherein the packet subjected to the processing is encrypted and transmitted to the first communication apparatus or the second communication apparatus.
前記第1の通信装置と前記第2の通信装置とのうち、一方の通信装置が始動側の通信装置となり、他方の通信装置が応答側の通信装置となり、前記記憶手段に記憶させる第1の鍵情報及び第2の鍵情報を生成する鍵生成手段を更に備え、
前記鍵生成手段は、
前記始動側の通信装置及び前記応答側の通信装置で事前に合意した任意の値を記憶する鍵共有データ保持手段と、乱数を発生させて秘密鍵を生成する秘密鍵生成手段と、前記秘密鍵生成手段により生成された秘密鍵と、前記鍵共有データ保持手段に記憶された値とを用いて、公開鍵を生成する公開鍵生成手段と、前記始動側の通信装置又は応答側の通信装置から受信した公開鍵、前記秘密鍵生成手段により生成された秘密鍵並びに前記鍵共有データ保持手段に記憶された値を用いて、共通秘密鍵を生成する共通秘密鍵生成手段とを備え、
前記始動側の通信装置と応答側の通信装置との間で鍵交換がなされる際に、
前記秘密鍵生成手段により、前記応答側の通信装置の代わりに始動側秘密鍵を生成すると共に、前記始動側の通信装置の代わりに応答側秘密鍵を生成し、
前記公開鍵生成手段により、前記応答側の通信装置の代わりに前記始動側秘密鍵から始動側公開鍵を生成すると共に、前記始動側の通信装置の代わりに前記応答側秘密鍵から応答側公開鍵を生成し、
前記応答側の通信装置の公開鍵に等しい前記始動側公開鍵を当該始動側の通信装置に送信すると共に、前記始動側の通信装置の公開鍵に等しい前記応答側公開鍵を当該応答側の通信装置に送信し、
前記秘密鍵生成手段により生成した始動側秘密鍵及び前記応答側の通信装置から受信した当該通信装置の公開鍵を用いて、応答側の共通秘密鍵を生成すると共に、前記秘密鍵生成手段により生成した応答側秘密鍵及び前記始動側の通信装置から受信した当該通信装置の公開鍵を用いて始動側の共通秘密鍵を生成し、
前記応答側の共通秘密鍵を前記第1の鍵情報及び前記第2の鍵情報の一方として前記記憶手段に記憶させ、前記始動側の共通秘密鍵を前記第1の鍵情報及び前記第2の鍵情報の他方として前記記憶手段に記憶させること
を特徴とする請求項1に記載の暗号通信復号装置。
Of the first communication device and the second communication device, one communication device is a communication device on the start side, and the other communication device is a communication device on the response side, and is stored in the storage means. A key generation means for generating key information and second key information;
The key generation means includes
Key sharing data holding means for storing arbitrary values agreed in advance by the initiating communication apparatus and the responding communication apparatus, a secret key generating means for generating a secret key by generating a random number, and the secret key From the secret key generated by the generating means and the value stored in the key sharing data holding means, the public key generating means for generating a public key, and the communication apparatus on the start side or the communication apparatus on the response side Using the received public key, the secret key generated by the secret key generating means, and the value stored in the key shared data holding means, a common secret key generating means for generating a common secret key,
When a key is exchanged between the start side communication device and the response side communication device,
The secret key generation means generates a starter secret key instead of the responding communication device, and generates a responder secret key instead of the starter communication device,
The public key generation means generates a starter public key from the starter private key instead of the responder communication device, and generates a response side public key from the responder private key instead of the starter communication device. Produces
The initiator public key equal to the public key of the responding communication device is transmitted to the initiator communication device, and the response public key equal to the public key of the initiator communication device is transmitted to the responder communication. To the device,
The response side common secret key is generated using the start side secret key generated by the secret key generation means and the public key of the communication apparatus received from the response side communication apparatus, and generated by the secret key generation means. Generating a common secret key on the initiating side using the response side secret key and the public key of the communication device received from the initiating side communication device,
The response side common secret key is stored in the storage means as one of the first key information and the second key information, and the start side common secret key is stored in the first key information and the second key information. The encryption communication decryption apparatus according to claim 1, wherein the encryption means is stored in the storage unit as the other of the key information.
前記中継手段は、前記出力手段から出力され前記監視装置によって適当なパケットであるとの監視結果を受信した場合には、前記出力手段から前記監視装置に出力させるために復号したパケットを暗号化して中継し、前記出力手段から出力され前記監視装置によって不適当なパケットであるとの監視結果を受信した場合には、前記出力手段から前記監視装置に出力させるために復号したパケットの中継を停止することを特徴とする請求項1に記載の暗号通信復号装置。   The relay means encrypts the decrypted packet for output from the output means to the monitoring apparatus when the monitoring means receives a monitoring result that is output from the output means and is an appropriate packet by the monitoring apparatus. When relaying and receiving a monitoring result output from the output means and indicating that the packet is inappropriate, the relay of the decoded packet is stopped for output from the output means to the monitoring apparatus. The encryption communication decryption apparatus according to claim 1. 前記中継手段は、前記出力手段から出力され前記監視装置によって任意の処理を加えられたパケットを受信した場合には、そのパケットを暗号化して中継することを特徴とする請求項1に記載の暗号通信復号装置。   2. The encryption according to claim 1, wherein when the relay unit receives a packet output from the output unit and subjected to arbitrary processing by the monitoring device, the packet is encrypted and relayed. Communication decoding device. 第1の通信装置と第2の通信装置との間で暗号化されて送受信されているパケットを、前記第1の通信装置と前記第2の通信装置との通信経路上に設けられている中継装置を介して傍受し、当該パケットの通信内容を監視装置に監視させる通信システムの暗号通信復号装置であって、
前記第1の通信装置から前記第2の通信装置に送信されるパケットを復号する第1の鍵情報と、前記第2の通信装置から前記第1の通信装置に送信されるパケットを復号する第2の鍵情報と、当該第1の鍵情報又は第2の鍵情報を用いた暗号化アルゴリズムとを記憶する記憶手段と、
前記第1の通信装置からパケットを受信した場合に、前記暗号化アルゴリズムに従って、当該パケットを第1の鍵情報を用いて復号し、前記第2の通信装置からパケットを受信した場合に、前記暗号化アルゴリズムに従って、当該パケットを第2の鍵情報を用いて復号する復号手段と、
前記復号手段によって復号されたパケットを、前記監視装置で処理可能な形態に整形して前記監視装置に出力して、前記監視装置に通信内容を監視させる出力手段と
を備えることを特徴とする暗号通信復号装置。
A packet that is encrypted and transmitted between the first communication device and the second communication device, and that is provided on a communication path between the first communication device and the second communication device An encryption communication decryption device of a communication system that intercepts through the device and causes the monitoring device to monitor the communication content of the packet,
First key information for decrypting a packet transmitted from the first communication device to the second communication device, and a first key information for decrypting a packet transmitted from the second communication device to the first communication device. Storage means for storing the key information of 2 and the encryption algorithm using the first key information or the second key information;
When a packet is received from the first communication device, the packet is decrypted using the first key information according to the encryption algorithm, and when the packet is received from the second communication device, the encryption is performed. Decrypting means for decrypting the packet using the second key information in accordance with the encryption algorithm;
An encryption unit comprising: an output unit configured to shape the packet decrypted by the decryption unit into a form that can be processed by the monitoring device, output the packet to the monitoring device, and cause the monitoring device to monitor communication contents; Communication decoding device.
前記出力手段は、前記復号手段で復号されたパケットのデータを、前記監視装置が処理可能なデータ長に調整し、当該調整した各データに、当該データのプロトコル情報とパケットの宛先である前記監視装置のアドレスとを含むヘッダを付加したパケットを作成することにより、前記復号手段で復号されたパケットを、前記監視装置で処理可能な形態に整形することを特徴とする請求項7に記載の暗号通信復号装置。   The output means adjusts the data of the packet decoded by the decoding means to a data length that can be processed by the monitoring device, and adds the protocol information of the data and the monitoring destination of the packet to the adjusted data. 8. The encryption according to claim 7, wherein a packet added with a header including an address of a device is created to shape the packet decrypted by the decrypting means into a form that can be processed by the monitoring device. Communication decoding device. 前記第1の鍵情報又は前記第2の鍵情報を生成するための前記第1の通信装置又は前記第2の通信装置の秘密鍵を設定する秘密鍵設定手段と、
前記第1の通信装置と前記第2の通信装置との間で行われている前記第1の鍵情報及び前記第2の鍵情報と前記暗号化アルゴリズムとを折衝して決定するためのパケットを傍受し、当該傍受したパケットと前記秘密鍵とに基づいて、前記記憶手段に記憶される第1の鍵情報及び第2の鍵情報と暗号化アルゴリズムとを生成する鍵生成手段を更に備えることを特徴とする請求項7に記載の暗号通信復号装置。
A secret key setting means for setting a secret key of the first communication device or the second communication device for generating the first key information or the second key information;
A packet for negotiating and determining the first key information, the second key information, and the encryption algorithm being performed between the first communication device and the second communication device; Further comprising key generation means for intercepting and generating first key information and second key information stored in the storage means and an encryption algorithm based on the intercepted packet and the secret key. The encryption communication decryption apparatus according to claim 7, wherein:
JP2006044398A 2005-03-01 2006-02-21 Decryption apparatus for use in encrypted communication Pending JP2006279938A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006044398A JP2006279938A (en) 2005-03-01 2006-02-21 Decryption apparatus for use in encrypted communication

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005055984 2005-03-01
JP2006044398A JP2006279938A (en) 2005-03-01 2006-02-21 Decryption apparatus for use in encrypted communication

Publications (1)

Publication Number Publication Date
JP2006279938A true JP2006279938A (en) 2006-10-12

Family

ID=37214121

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006044398A Pending JP2006279938A (en) 2005-03-01 2006-02-21 Decryption apparatus for use in encrypted communication

Country Status (1)

Country Link
JP (1) JP2006279938A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008178097A (en) * 2007-01-19 2008-07-31 Samsung Electronics Co Ltd Content providing apparatus and method for determining integrity of content, content using apparatus and method, and content providing apparatus and method for revoking content using apparatus
JP2009016961A (en) * 2007-06-29 2009-01-22 Fujitsu Ltd Communication device, communication log transmission method suitable for communication device, and communication system
JP2009278419A (en) * 2008-05-15 2009-11-26 Canon Inc Information processing apparatus, control method therefor and program
JP2010514248A (en) * 2006-12-19 2010-04-30 ケイ ティー コーポレイション Intrusion prevention apparatus and method for point-to-point tunneling communication
EP2469752A1 (en) * 2010-12-21 2012-06-27 Tektronix, Inc. Evolved packet system non access stratum deciphering using real-time LTE monitoring
JP2016149633A (en) * 2015-02-12 2016-08-18 日本電信電話株式会社 Refining method of controlling object flow and apparatus
JP2017532916A (en) * 2014-10-31 2017-11-02 中国科学院声学研究所Institute Of Acoustics, Chinese Academy Of Sciences RDP data collection apparatus and method
JP2018533054A (en) * 2015-09-22 2018-11-08 グーグル エルエルシー System and method for preventing data loss while maintaining confidentiality
US10536261B2 (en) 2014-09-25 2020-01-14 Nec Corporation Analysis system, analysis method, and storage medium
US10554383B2 (en) 2014-09-25 2020-02-04 Nec Corporation Analysis system, analysis method, and storage medium
US10931468B2 (en) 2014-09-25 2021-02-23 Nec Corporation Analysis system, analysis method, and storage medium
JP7130173B1 (en) * 2022-01-06 2022-09-02 三菱電機株式会社 Communication system and communication method

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010514248A (en) * 2006-12-19 2010-04-30 ケイ ティー コーポレイション Intrusion prevention apparatus and method for point-to-point tunneling communication
JP2008178097A (en) * 2007-01-19 2008-07-31 Samsung Electronics Co Ltd Content providing apparatus and method for determining integrity of content, content using apparatus and method, and content providing apparatus and method for revoking content using apparatus
JP2009016961A (en) * 2007-06-29 2009-01-22 Fujitsu Ltd Communication device, communication log transmission method suitable for communication device, and communication system
JP2009278419A (en) * 2008-05-15 2009-11-26 Canon Inc Information processing apparatus, control method therefor and program
US9071962B2 (en) 2010-12-21 2015-06-30 Tektronix, Inc. Evolved packet system non access stratum deciphering using real-time LTE monitoring
CN102769848A (en) * 2010-12-21 2012-11-07 特克特朗尼克公司 Evolved packet system non access stratum deciphering using real-time LTE monitoring
EP2469752A1 (en) * 2010-12-21 2012-06-27 Tektronix, Inc. Evolved packet system non access stratum deciphering using real-time LTE monitoring
US10536261B2 (en) 2014-09-25 2020-01-14 Nec Corporation Analysis system, analysis method, and storage medium
US10554383B2 (en) 2014-09-25 2020-02-04 Nec Corporation Analysis system, analysis method, and storage medium
US10931468B2 (en) 2014-09-25 2021-02-23 Nec Corporation Analysis system, analysis method, and storage medium
JP2017532916A (en) * 2014-10-31 2017-11-02 中国科学院声学研究所Institute Of Acoustics, Chinese Academy Of Sciences RDP data collection apparatus and method
JP2016149633A (en) * 2015-02-12 2016-08-18 日本電信電話株式会社 Refining method of controlling object flow and apparatus
JP2018533054A (en) * 2015-09-22 2018-11-08 グーグル エルエルシー System and method for preventing data loss while maintaining confidentiality
JP7130173B1 (en) * 2022-01-06 2022-09-02 三菱電機株式会社 Communication system and communication method

Similar Documents

Publication Publication Date Title
JP2006279938A (en) Decryption apparatus for use in encrypted communication
EP1699204A1 (en) Decryption apparatus for use in encrypted communications
US8984268B2 (en) Encrypted record transmission
US7584505B2 (en) Inspected secure communication protocol
KR100480225B1 (en) Data-securing communication apparatus and method therefor
US9154468B2 (en) Efficient forwarding of encrypted TCP retransmissions
US7900042B2 (en) Encrypted packet inspection
US20170093796A1 (en) Inline inspection of security protocols
JP4346094B2 (en) Packet encryption processing proxy device
WO2009076811A1 (en) A method, a system, a client and a server for key negotiating
JP2008166894A (en) Client terminal, relay server, communication system, and communication method
JP2005210193A (en) Common secret key generating device
KR100948604B1 (en) Security method of mobile internet protocol based server
CN115567206A (en) Method and system for realizing encryption and decryption of network data message by quantum distribution key
CN113572766A (en) Power data transmission method and system
Mosko et al. Mobile sessions in content-centric networks
JP2002344443A (en) Communication system and security association disconnection/continuing method
Berbecaru et al. On the robustness of applications based on the SSL and TLS security protocols
CN113746861B (en) Data transmission encryption and decryption method and encryption and decryption system based on national encryption technology
JP2008259148A (en) High-strength cipher communication system which minimizes load of repeater
JP2003244194A (en) Data encrypting apparatus, encryption communication processing method, and data relaying apparatus
JP2010081108A (en) Communication relay device, information processor, program and communication system
Risterucci et al. A new secure virtual connector approach for communication within large distributed systems
Rao et al. Pseudo-System Protocol for Information Transfer
CN115766172A (en) Message forwarding method, device, equipment and medium based on DPU and national password