JP2007329751A - Encrypted communication system - Google Patents

Encrypted communication system Download PDF

Info

Publication number
JP2007329751A
JP2007329751A JP2006159984A JP2006159984A JP2007329751A JP 2007329751 A JP2007329751 A JP 2007329751A JP 2006159984 A JP2006159984 A JP 2006159984A JP 2006159984 A JP2006159984 A JP 2006159984A JP 2007329751 A JP2007329751 A JP 2007329751A
Authority
JP
Japan
Prior art keywords
host
communication
data
tcp
tcpsec
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
JP2006159984A
Other languages
Japanese (ja)
Inventor
Hirotsugu Ozaki
博嗣 尾崎
Keiko Ogawa
恵子 小川
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.)
TTT KK
Original Assignee
TTT KK
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 TTT KK filed Critical TTT KK
Priority to JP2006159984A priority Critical patent/JP2007329751A/en
Publication of JP2007329751A publication Critical patent/JP2007329751A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a protocol stack capable of further improving a function of preventing leakage of data, falsification and spoofing of data, invasion, and attack without modifying high-order application programs. <P>SOLUTION: The communication system includes at least a protocol encrypting means for encrypting a payload of a protocol corresponding to at least TCP or UDP out of information units, such as packets to be input/output or transmitted/received in accordance with a predetermined encryption logic, and outputting or transmitting the encrypted payload; and a protocol decrypting means for decrypting the encrypted protocol inputted or received, in accordance with a predetermined decryption logic. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、通信における暗号化通信システム、特に、インターネット上でのデータの「漏洩」及び「改竄」さらには「なりすまし」、「進入」ないし「攻撃」を防ぐための暗号化通信システムに関する。   The present invention relates to an encrypted communication system for communication, and more particularly to an encrypted communication system for preventing data “leakage” and “falsification”, “spoofing”, “entrance”, and “attack” on the Internet.

近年、インターネットを利用した通信は、Windowsパソコンさえあれば、それをネットワークに接続するだけで、誰でもネットワーク上のコンピュータにアクセスできるため、社会の中で急速に普及拡大している。一方、このインターネット通信の普及拡大に伴って、ハッカー(hacker)やクラッカー(Cracker)が他人のコンピュータシステムに侵入して、ソフトウエアやデータを盗み見たり、改竄や破壊を行ったりするという社会問題も大きくなっている。   In recent years, communication using the Internet has rapidly spread in society because anyone can access a computer on a network by connecting it to a network as long as it has a Windows personal computer. On the other hand, with the spread of Internet communication, there are social problems such as hackers and crackers intruding into other people's computer systems to steal software, data, tamper and destroy. It is getting bigger.

具体的な不正妨害のケースとしては、まず第1に、中心的なシステムが使えなくなるように、ネットワークから大量のメッセージを送りつけコンピュータシステムの運用を妨害するシステム妨害がある。この妨害によってホストが過負荷になるとシステムダウンに陥ってしまうことも起こりうる。   As a specific case of illegal interference, first of all, there is a system interference in which a large number of messages are sent from the network and the operation of the computer system is interrupted so that the central system cannot be used. If the host is overloaded due to this interference, the system may go down.

また、ホストのパスワードを入手し、機密情報を盗んだり、情報の改竄や破壊を行ったりする「不正アクセスとなりすまし」の不正妨害がある。この妨害にはコンピュータが保有する情報を勝手に書き換え、人を陥れる卑劣のものもある。また、特定のパソコンに忍び込み、メールアドレスやパスワードなど個人の機密データを搾取するスパイウエアといわれる不正行為も発生している。このようにネットワークに接続したコンピュータが持つデータベースの内容を不正に盗み見る、いわゆる盗聴行為も頻繁に行われている可能性も否定できない。   In addition, there is an illegal interception of “illegal access and impersonation” that obtains a host password, steals confidential information, or alters or destroys information. Some of these obstructions mean that the information held by the computer can be rewritten and the person can fall. In addition, fraudulent acts called spyware that sneak into specific computers and exploit personal sensitive data such as email addresses and passwords have also occurred. In this way, it is impossible to deny the possibility that so-called eavesdropping is frequently performed in which the contents of a database held by a computer connected to a network are illegally stolen.

また、サイト若しくはサーバの運営元で、意図的に個人情報を盗むといった行為や、社内に潜むスパイなどによるサイバーテロ(Cyber terrorism)といった危機も全くないとはいえない状況である。
さらに、他人のコンピュータにコンピュータ障害をもたらすプログラムである「ウイルス」を送り込むという不正妨害が最近多くなっている。この送り込まれたウイルスに、メールなどを自宅で使用したパソコンが感染し、それを社内に接続した瞬間に社内のパソコン全体が感染したり、ウイルスがコンピュータの中のファイルを破壊させたり、更には、ネットワーク全体をダウンさせたりするといった問題も生じている。
In addition, there is no risk of cyber terrorism caused by intentional stealing of personal information or cyber terrorism lurking inside the company at the site or server operator.
In addition, fraudulent disturbances such as sending "viruses" that are programs that cause computer problems to other people's computers have recently been increasing. This sent virus infects a computer that used e-mail at home, and when it is connected to the company, the entire company computer is infected, or the virus destroys files in the computer. There are also problems such as bringing down the entire network.

このため、従来のTCP/IP(Transmission Control Protocol/Internet Protocol)やUDP(User Datagram Protocol)を利用したインターネット上での通信において、データの「漏洩」「改竄」等を防ぐ機能として、IPsec(アイピーセック:Security Architecture for Internet Protocol)やSSL(Secure Socket Layer)といわれる暗号化通信が利用されている。一般に、暗号化通信には、共通鍵(秘密鍵ともいう)暗号方式と公開鍵暗号方式があるが、IPsecは共通鍵暗号方式を用いたものが多い。共通鍵暗号方式の方が公開鍵暗号方式より暗号化・復号化の速度が速いという特徴がある。このIPsecに用いられる共通鍵暗号方式は、暗号化と復号化を同じ鍵で行う方式であり、鍵の生成は送信側又は受信側のいずれで生成してもよいが、受信側と送信側とで共通鍵を使うために、鍵の交換時に内容が外部に漏れないよう細心の注意を払わなければならない。   For this reason, IPsec (IP) is a function to prevent data leakage or tampering in communication over the Internet using conventional Transmission Control Protocol / Internet Protocol (TCP / IP) or User Datagram Protocol (UDP). SEC: Encrypted communication called Security Architecture for Internet Protocol (SSL) or Secure Socket Layer (SSL) is used. In general, encrypted communication includes a common key (also referred to as a secret key) encryption method and a public key encryption method, and IPsec often uses a common key encryption method. The common key cryptosystem has a feature that the encryption / decryption speed is faster than the public key cryptosystem. The common key encryption method used for IPsec is a method in which encryption and decryption are performed with the same key, and the key may be generated on either the transmission side or the reception side. In order to use a common key, it is necessary to pay close attention not to leak the contents to the outside when exchanging keys.

共通鍵暗号方式に用いられるアルゴリズムはDES(Data Encryption Standard:米国IBM社が開発した共通鍵(秘密鍵)暗号化アルゴリズム)が代表的である。IPsecもこのDESを暗号アルゴリズムの1つに採用している。IPsecの特徴は、単に特定のアプリケーションだけを暗号化するのではなく、ホストから送信されるあらゆる通信をIPレベルで暗号化する点にある。これによりユーザはアプリケーションを意識することなく安全な通信を可能とすることができる。また、IPsecは、将来にわたって使えるように、それ自体の仕組みを変えることなく使用する暗号アルゴリズムを変更することを可能としている。   A typical algorithm used in the common key cryptosystem is DES (Data Encryption Standard: a common key (secret key) encryption algorithm developed by IBM Corporation, USA). IPsec also uses this DES as one of the encryption algorithms. A feature of IPsec is that not only a specific application is encrypted but all communications transmitted from the host are encrypted at the IP level. As a result, the user can perform secure communication without being aware of the application. In addition, IPsec can change the encryption algorithm to be used without changing its own mechanism so that it can be used in the future.

IPsecで用いられる共通暗号鍵としては、SPI(Security Pointer Index)と呼ばれる32ビット符合が用いられ、鍵交換プロトコルとしては、IKE(Internet Key Exchange)が用いられる。さらに、IPsecには、完全性認証のためのプロトコルAH(Authentication Header)が用意されている。   A 32-bit code called SPI (Security Pointer Index) is used as a common encryption key used in IPsec, and IKE (Internet Key Exchange) is used as a key exchange protocol. Furthermore, in IPsec, a protocol AH (Authentication Header) for integrity authentication is prepared.

また、SSLは、米ネットスケープ社(現在AOLに吸収合併)の開発したセキュリティ機能付HTTPプロトコルであり、これを利用することによりクライアントとサーバがネットワーク上でお互いを認証できるようになり、クレジットカード情報などの機密性の高い情報を暗号化してやり取りすることが可能となる。これにより、データの盗聴、再送攻撃(ネットワーク上に流れたデータを盗聴して何度も繰り返して送ってくる攻撃)、なりすまし(本人の振りをして通信する)、データの改竄などを防止することができる。   SSL is an HTTP protocol with security function developed by Netscape Corporation (currently merged with AOL). By using this protocol, the client and server can authenticate each other on the network, and credit card information It is possible to exchange highly confidential information such as. This prevents data eavesdropping, replay attacks (attack of eavesdropping on data flowing over the network and repeatedly sending data), spoofing (communication by pretending to be the person), data tampering, etc. be able to.

上述したIPsecは、IPのパケットを暗号化して送受信するものであり、したがって、TCPやUDPなどの上位のプロトコルを利用するアプリケーションソフトはIPsecが使われていることを意識する必要がない。
一方、SSLでは、互いの認証レベルではRSA(Rivest Shamir Adleman:公開鍵暗号方式を開発者3人の頭文字)公開鍵暗号技術を用いたデジタル証明書が用いられ、データの暗号化ではDESなどの共通鍵暗号技術が用いられている。このSSLは第5層のセッション層にあるため、特定のアプリケーションに依存することになる。
R.Atkinson, 1995年8月、「Security Architecture for the Internet Protocol」、RFC 1825
The above-described IPsec encrypts and transmits IP packets. Therefore, application software that uses a higher-level protocol such as TCP or UDP does not need to be aware that IPsec is used.
On the other hand, in SSL, digital certificates using RSA (Rivest Shamir Adleman: an acronym for three developers of public key cryptography) public key cryptography are used at the mutual authentication level, and DES is used for data encryption. Common key encryption technology is used. Since this SSL is in the session layer of the fifth layer, it depends on a specific application.
R. Atkinson, August 1995, `` Security Architecture for the Internet Protocol '', RFC 1825

しかしながら、SSLはアプリケーションに対する互換性を持たない点において問題がある。アプリケーションは、インターネット通信を行う際にソケット(第5層)をプログラムインターフェースとして使用する。このため、アプリケーションがSSL(第5層)を使用する場合には、このソケットインターフェースをSSLインターフェースに変更しなければならない。従って、SSLにアプリケーションの互換性はない。これに対し、IPsecは、ソケット(第5層)の下に位置しているため、アプリケーションは、ソケット(第5層)をプログラムインターフェースとしてそのまま使用することができるのでアプリケーションの互換性がある。   However, there is a problem in that SSL is not compatible with applications. An application uses a socket (5th layer) as a program interface when performing Internet communication. For this reason, when an application uses SSL (5th layer), this socket interface must be changed to an SSL interface. Therefore, SSL does not have application compatibility. On the other hand, since IPsec is located below the socket (5th layer), the application can use the socket (5th layer) as a program interface as it is, so that the application is compatible.

一方、IPsecは最大セグメントサイズが小さくなるという問題がある。すなわち、IPsecでは、ESPヘッダ、ESPトレーラを使用するため、ペイロードが小さくなるため、フラグメント(パケットの分割)が発生し、スループットが低下する。また、TCPパケットでは、フラグメントが禁止であるため、エンドエンドで、IPsecの通過する環境を把握し、フラグメントが発生しない最大セグメントサイズを設定する必要がある。これに対し、SSLは、通過する環境を把握する必要がないため、最大セグメントサイズを設定する必要はない。   On the other hand, IPsec has a problem that the maximum segment size becomes small. In other words, since the ESP header and ESP trailer are used in IPsec, the payload becomes small, so that fragments (packet division) occur and throughput decreases. In addition, since fragmentation is prohibited in a TCP packet, it is necessary to grasp the environment through which IPsec passes at the end end and set the maximum segment size at which no fragment occurs. On the other hand, since SSL does not need to grasp the environment through which it passes, it is not necessary to set the maximum segment size.

本発明は、上述のような問題に鑑みてなされたものであり、コンピュータ端末への不正侵入を防ぐための「暗号化の機能」をアプリケーション・プログラムそれぞれに実装する必要がなく、したがって、アプリケーション・プログラム自体を再作成する必要もなく、かつ上記暗号化機能に対応していない通信相手とも従来の平文による通信でき、さらにはIPsecが利用できない環境(あるいは利用したくない状況)でも暗号化や認証の恩恵を受けることができる通信システム、特にプロトコルスタック、並びに関連する通信装置、通信方法、及びこれらを実現するための通信プログラムを提供することを目的とする。   The present invention has been made in view of the above-described problems, and it is not necessary to implement an “encryption function” for preventing unauthorized entry into a computer terminal in each application program. There is no need to recreate the program itself, and it is possible to communicate with a communication partner that does not support the above encryption function in the conventional plaintext, and furthermore, encryption and authentication even in an environment where IPsec is not available (or in a situation where you do not want to use it) It is an object of the present invention to provide a communication system, particularly a protocol stack, a related communication device, a communication method, and a communication program for realizing the communication stack.

上記課題を解決し、本発明の目的を達成するため、本発明の暗号化通信システムは、トランスポート層に位置するTCP又はUDPプロトコルに暗号化機能を追加して複数のホスト間で通信を行う暗号化通信システムであって、通信相手が正当な権限を有する通信相手であるかどうかを判断した後に通信相手との接続を行うための接続シーケンス手段と、通信路の両端で対応する暗号化及び復号化ロジックを取り決める取決め手段と、この取決め手段により取り決めた暗号化ロジックに従って、複数のホスト間で送受信する情報のパケットを暗号化して送信するプロトコル暗号化手段と、取決め手段により取り決めた復号化ロジックに従って複数のホスト間で送受信する情報のパケットを復号化するプロトコル復号化手段と、を備え、前記接続シーケンス手段は、未知のオプションを排除するネットワーク環境にも対応できるように、第1のホストから第2のホストへの接続要求と、第2のホストから第1のホストへの接続応答を送信する際にTCP接続ヘッダにフラグを、ペイロードにTCP2固有情報又は緊急データを付加し、暗号化通信に必要な鍵と相手方ホストが前記暗号化通信を行う権限を有することを確認するための暗号化したネゴシエーションデータを交換し、取決め手段は、接続シーケンス手段が正当な権限を有すると判断して接続した通信相手とのみ前記トランスポート層の前記TCP又はUDPプロトコルを用いて前記暗号化及び復号化ロジックに基づいた通信を行い、プロトコル暗号化手段は、送受信される情報のパケットのうち前記TCP又はUDPプロトコルのペイロードを暗号化して送信し、プロトコル復号化手段は、送受信される情報のパケットのうち前記暗号化されたプロトコルのペイロードを復号化することを特徴とする暗号化通信システムである。   In order to solve the above problems and achieve the object of the present invention, the encrypted communication system of the present invention performs communication between a plurality of hosts by adding an encryption function to the TCP or UDP protocol located in the transport layer. An encrypted communication system, a connection sequence means for connecting to a communication partner after determining whether the communication partner is a communication partner having a legitimate authority, and encryption corresponding to both ends of the communication path, and An agreement means for negotiating a decryption logic, a protocol encryption means for encrypting and transmitting packets of information transmitted and received between a plurality of hosts according to the encryption logic decided by the agreement means, and a decryption logic decided by the agreement means Protocol decoding means for decoding packets of information transmitted / received between a plurality of hosts according to The sequence means transmits a connection request from the first host to the second host and a connection response from the second host to the first host so as to cope with the network environment that excludes the unknown option. At this time, a flag is added to the TCP connection header, TCP2 specific information or emergency data is added to the payload, and encryption is performed to confirm that the key necessary for encrypted communication and the partner host have authority to perform the encrypted communication. Negotiation data is exchanged, and the agreement means determines that the connection sequence means has the proper authority, and uses only the communication partner connected to the encryption and decryption logic using the TCP or UDP protocol of the transport layer. The protocol encryption unit performs communication based on the TCP or UDP protocol in the transmitted / received information packet. Encrypt and send the payload of the Col protocol decoding means is an encryption communication system, characterized by decoding the payload of the encrypted protocol of the packet of information to be transmitted and received.

以下、図1〜図24を参照しながら本発明の実施の形態の例を説明する。
図1は、本発明の暗号化通信システムの一実施の形態に用いられるプロトコルスタックを示すものである。
Examples of embodiments of the present invention will be described below with reference to FIGS.
FIG. 1 shows a protocol stack used in an embodiment of an encrypted communication system of the present invention.

本発明に用いられるプロトコルスタックは、図1に示すように、OSI7階層の物理層(第1層)とデータリンク層(第2層)に相当する階層に、NIC(Network Interface Card)のDriver11が配列される。このドライバは、既に述べたように、コンピュータなどのハードウエアをネットワークに接続するためのインターフェースカードのドライバであり、その内容はデータ送受信制御ソフトウエアである。例えばEthernetに接続するためのLANボードまたはLANカードがこれに相当するものである。   As shown in FIG. 1, the protocol stack used in the present invention has a NIC (Network Interface Card) Driver 11 in a layer corresponding to the physical layer (first layer) and the data link layer (second layer) of the OSI 7 layer. Arranged. As described above, this driver is a driver for an interface card for connecting hardware such as a computer to a network, and its contents are data transmission / reception control software. For example, a LAN board or a LAN card for connecting to Ethernet corresponds to this.

第3層のネットワーク層には、一部がトランスポート層(第4層)まで伸びたIPエミュレータ(emulator)3が存在している。上記延びた部分には、トランスポートとしての機能は実装していない。セッション層に、ネットワーク層の機能を提供しているだけある。このIPエミュレータ3は、暗号化通信を行うプロトコルである「IPsec on CP」13bと、「IP on CP」13aを用途に応じて切り換えて使う働きをするものである。ここで、「on CP」とは、クラッキング・プロテクタ(CP)による、「進入」「攻撃」の監視、破棄、切断ないし通過制限の対象となっていること、又は、設定によりなりうることを示している。   In the third network layer, there is an IP emulator 3 partially extending to the transport layer (fourth layer). A function as a transport is not mounted on the extended portion. It only provides network layer functionality to the session layer. The IP emulator 3 functions to switch between “IPsec on CP” 13b and “IP on CP” 13a, which are protocols for performing encrypted communication, depending on the application. Here, “on CP” indicates that it is subject to monitoring, destruction, disconnection or passage restriction of “entry” and “attack” by a cracking protector (CP), or that can be set. ing.

また、ネットワーク層にはARP on CP(Address Resolution Protocol on Cracking Protector)が配列されている。このARP on CPは、クラッカー(Cracker)への保護対策を具備したIPアドレスからEthernetの物理アドレスであるMAC(Media Access Control)アドレスを求めるのに使われるプロトコルである。MACは、媒体アクセス制御と呼ばれる、LANなどで利用される伝送制御技術であり、データの送受信単位であるフレームの送受信方法やフレームの形式、誤り訂正などを規定する技術として利用されている。   In addition, ARP on CP (Address Resolution Protocol on Cracking Protector) is arranged in the network layer. This ARP on CP is a protocol used to obtain a MAC (Media Access Control) address, which is a physical address of Ethernet, from an IP address provided with a protection measure against a cracker. The MAC is a transmission control technique used in a LAN or the like called medium access control, and is used as a technique for specifying a frame transmission / reception method, a frame format, error correction, and the like as a data transmission / reception unit.

ここで、IPエミュレータ13は、本発明による各種のセキュリティ機能を、従来のIP周辺のスタックに整合させるためのソフトウエア又はファームウエアである。すなわち、IPのエラーメッセージや制御メッセージを転送するプロトコルであるICMP(Internet Control Message Protocol)14a、同一のデータを複数のホストに効率よく配送するための又は配送を受けるために構成されるホストのグループを制御するためのプロトコルであるIGMP(Internet Group Management Protocol)14b、TCP15、UDP16さらにソケット(Socket)インターフェース17に整合させるためのソフトウエア、又はファームウエア、ないしはハードウエア(電子回路、電子部品)である。このIPエミュレータ13により、IPsecの暗号化・復号化及び必要な認証情報付加・認証等の前後の適合処理を行うことができる。   Here, the IP emulator 13 is software or firmware for matching various security functions according to the present invention with a conventional IP peripheral stack. That is, ICMP (Internet Control Message Protocol) 14a, which is a protocol for transferring IP error messages and control messages, and a group of hosts configured to efficiently deliver or receive the same data to a plurality of hosts Software (IGMP) that is a protocol for controlling the network, TCP15, UDP16, and software for matching with the socket interface 17, or firmware or hardware (electronic circuit, electronic component) is there. This IP emulator 13 can perform adaptation processing before and after IPsec encryption / decryption and addition / authentication of necessary authentication information.

このIPエミュレータ13の上層のトランスポート層(第4層)には、TCPエミュレータ15とUDPエミュレータ16が配置されている。TCPエミュレータ15は、暗号化通信を行うプロトコルである「TCPsec on CP」15bと、通常の通信プロトコルである「TCP on CP」15aを用途に応じて切り換えて使う働きをする。同様に、UDPエミュレータ16は、暗号化通信を行うプロトコルである「UDPsec on CP」16bと、通常の通信プロトコルである「UDP on CP」16aを用途に応じて切り換えて使う働きをする。   In the upper transport layer (fourth layer) of the IP emulator 13, a TCP emulator 15 and a UDP emulator 16 are arranged. The TCP emulator 15 functions to switch between “TCPsec on CP” 15b, which is a protocol for performing encrypted communication, and “TCP on CP” 15a, which is a normal communication protocol. Similarly, the UDP emulator 16 functions to switch between “UDPsec on CP” 16b, which is a protocol for performing encrypted communication, and “UDP on CP” 16a, which is a normal communication protocol.

本発明の最も特徴とするべき点は、このトランスポート層(第4層)に、TCPsec15bと、UDPsec16bの暗号化通信プロトコルを搭載したことである。TCPsec15bとUDPsec16bについては後述する。
このトランスポート層(第4層)の上層のセッション層(第5層)には、TCP及びUDP等のプロトコルとデータのやりとりを行うソケット(socket)インターフェース17が設けられている。このソケットの意味は、既に述べたようにコンピュータが持つネットワーク内の住所に当たるIPアドレスと、IPアドレスのサブアドレスであるポート番号を組み合わせたネットワークアドレスを意味しており、実際には、一連のヘッダの追加ないし削除をまとめて行う、単一のソフトウエアプログラムモジュール(実行プログラム等)あるいは単一のハードウエアモジュール(電子回路、電子部品等)からなっている。
The most characteristic feature of the present invention is that this transport layer (fourth layer) is equipped with encrypted communication protocols of TCPsec 15b and UDPsec 16b. TCPsec15b and UDPsec16b will be described later.
In the upper session layer (fifth layer) of the transport layer (fourth layer), a socket interface 17 for exchanging data with protocols such as TCP and UDP is provided. The meaning of this socket is a network address that combines an IP address corresponding to an address in the network of a computer and a port number that is a sub-address of the IP address as described above. It consists of a single software program module (execution program, etc.) or a single hardware module (electronic circuit, electronic component, etc.) that is added or deleted collectively.

このソケットインターフェース17は、さらに上位のアプリケーション(図2で示すECアプリケーション及び図3で示す放送アプリケーション等)からの統一的なアクセス方式を提供するものであり、引数の種類や型など従来と同様のインターフェースを保つようにしている。
TCPエミュレータ15は、トランスポート層において、データの漏洩・改竄の防止の機能、すなわち暗号化、完全性認証及び相手認証等の機能を持つTCPsec15bと、このような暗号化、完全性認証、及び相手認証等の機能を持たない通常のプロトコルTCP15aのいずれかにパケットを振り分ける働きをもっている。また、TCPsec15b及びTCP15aのいずれもクラッキング・プロテクタ(CP)を備えているため、そのいずれを選択した場合でも、クラッカーによる「進入」「攻撃」に対して防御する機能を実現することができる。TCPエミュレータ15は上位層であるソケットとのインターフェースの役割も果たしている。
The socket interface 17 provides a uniform access method from higher-level applications (such as the EC application shown in FIG. 2 and the broadcast application shown in FIG. 3). I try to keep the interface.
The TCP emulator 15 has a function of preventing data leakage / falsification in the transport layer, that is, a TCPsec 15b having functions such as encryption, integrity authentication and partner authentication, and such encryption, integrity authentication, and partner It has a function of distributing packets to any one of the normal protocols TCP15a having no function such as authentication. Further, since both the TCPsec 15b and the TCP 15a are provided with a cracking protector (CP), it is possible to realize a function of protecting against “entry” and “attack” by a cracker, regardless of which one is selected. The TCP emulator 15 also serves as an interface with a socket, which is an upper layer.

また、既に述べたようにTCPがエラー補償機能を有するのに対して、UDPはエラー補償機能を持たないが、その分転送速度が速く、かつブロードキャスト機能を備えているという特徴がある。UDPエミュレータ16は、TCPエミュレータ15と同様に、データの漏洩・改竄の防止の機能、すなわち暗号化、完全性認証及び相手認証等の機能を持つUDPsec16bと、このような暗号化、完全性認証、及び相手認証等の機能を持たない通常のプロトコルUDP16aのいずれかにパケットを振り分ける働きを持っている。   Further, as described above, TCP has an error compensation function, whereas UDP does not have an error compensation function, but has a feature that the transfer speed is correspondingly faster and a broadcast function is provided. As with the TCP emulator 15, the UDP emulator 16 has a function of preventing data leakage / falsification, that is, a UDPsec 16b having functions such as encryption, integrity authentication and counterpart authentication, and such encryption, integrity authentication, And has a function of distributing the packet to any one of the normal protocols UDP 16a having no function such as counterpart authentication.

図1に示すように、ソケット17、TCPエミュレータ15、UDPエミュレータ16、「TCPsec on CP」15b、「UDPsec on CP」16b、「TCP on CP」15a、「UDP on CP」16a、「ICMP on CP」14a、「IGMP on CP」14b、IPエミュレータ13、「IP on CP」13a、及び「ARPonCP」12からなるプロトコルスタックが本発明の暗号化処理を行うためのプロトコルスタックであり、以下、このプロトコルスタックを総称してTCP2(登録商標出願中)と呼ぶことにする。なお、TCP2には「IPsec on CP」13bは必須のものとして含まれていないが、「IPsec on CP」13bを含めてTCP2とすることもできる。   As shown in FIG. 1, socket 17, TCP emulator 15, UDP emulator 16, "TCPsec on CP" 15b, "UDPsec on CP" 16b, "TCP on CP" 15a, "UDP on CP" 16a, "ICMP on CP" ”14 a,“ IGMP on CP ”14 b, IP emulator 13,“ IP on CP ”13 a, and“ ARPonCP ”12 are protocol stacks for performing the encryption processing of the present invention. The stack is collectively referred to as TCP2 (registered trademark pending). Note that “IPsec on CP” 13b is not included as essential in TCP2, but TCP2 including “IPsec on CP” 13b may be used.

本発明のTCP2は、TCP、UDP、IP、IPsec、ICMP、IGMP、ARPの標準プロトコルにCP(クラッキング・プロテクト)を実装し、各プロトコルスタックに対する通信からの攻撃、及び、アプリケーション・プログラムからの攻撃(トロイの木馬、プログラムの改竄、正規ユーザの不正使用)を防御することができる。また、TCP2では、TCPエミュレータ15を実装し、このTCPエミュレータ15は、セッション層にあるソケット(Socket)17、及びネットワーク層にあるIPエミュレータ13から見て、互換性を保つため、外向きには標準TCPと同じに見せることができる。実際は、TCP2の機能として、TCPとTCPsecを切り替えて実行する。TCPsecは、本発明であるトランスポート層での暗号化及び認証機能である。   TCP2 of the present invention implements CP (cracking protection) in standard protocols of TCP, UDP, IP, IPsec, ICMP, IGMP, and ARP, and attacks from communication and application programs to each protocol stack. (Trojan horses, program tampering, unauthorized use by authorized users) can be prevented. Also, in TCP2, a TCP emulator 15 is mounted, and this TCP emulator 15 is outward-facing to maintain compatibility when viewed from the socket 17 in the session layer and the IP emulator 13 in the network layer. It can look the same as standard TCP. Actually, the TCP2 function is executed by switching between TCP and TCPsec. TCPsec is an encryption and authentication function in the transport layer according to the present invention.

また、同様に、TCP2では、UDPエミュレータ16を実装しており、UDPエミュレータ16は、セッション層であるソケット(Socket)17、及び、ネットワーク層であるIPエミュレータ13から見て、互換性を保つため、外部からは標準UDPとして見せることができる。実際は、TCP2の機能として、UDP、UDPsecを切り替えて実行する。UDPsecは、本発明であるトランスポート層での暗号化及び認証機能である。   Similarly, in TCP2, the UDP emulator 16 is mounted, and the UDP emulator 16 is compatible with the socket 17 that is a session layer and the IP emulator 13 that is a network layer in order to maintain compatibility. From the outside, it can be shown as standard UDP. Actually, as a function of TCP2, UDP and UDPsec are switched and executed. UDPsec is an encryption and authentication function in the transport layer according to the present invention.

次に、TCP2において、特に重要な機能である「データ漏洩」を防ぐ機能であるTCPsec15b及びUDPsec16bについて説明する。
TCPsec15b及びUDPsec16bのための暗号化・復号化の方法(アルゴリズム、ロジック(論理))としては、公知の秘密鍵(共通鍵)暗号アルゴリズムが用いられる。例えば、1960年代にIBM社によって開発された秘密鍵暗号アルゴリズムであるDES(Data Encryption Standard)や、その改良版としての3DESが用いられる。また、その他の暗号アルゴリズムとしては、1992年にスイス工科大学のJames L.Massey氏とXuejia Lai氏によって発表されたIDEA(International Data Encryption Algorithm)も用いられる。この暗号アルゴリズムは、データを64ビットのブロックに区切って暗号化するもので暗号鍵の長さは128ビットである。秘密鍵暗号を効率よく解読する線形解読法や差分解読法に対しても十分な強度を持つように設計されている。
Next, TCPsec15b and UDPsec16b, which are functions that prevent “data leakage”, which is a particularly important function in TCP2, will be described.
As an encryption / decryption method (algorithm, logic (logic)) for TCPsec15b and UDPsec16b, a known secret key (common key) encryption algorithm is used. For example, DES (Data Encryption Standard), which is a secret key encryption algorithm developed by IBM in the 1960s, and 3DES as an improved version thereof are used. As another encryption algorithm, IDEA (International Data Encryption Algorithm) announced by Mr. James L. Massey and Mr. Xuejia Lai of Swiss Institute of Technology in 1992 is also used. In this encryption algorithm, data is divided into 64-bit blocks and encrypted, and the length of the encryption key is 128 bits. It is designed to have sufficient strength for linear cryptanalysis and differential cryptanalysis that efficiently decrypt private key cryptography.

また、本発明に用いられるTCPsec15b及びUDPsec16bの暗号方式として、FEAL(Fast data Encipherment Algorithm)、MISTY、AES(Advanced Encryption Standard)といった暗号方式も利用されるほか、また、独自に作成した秘密の暗号化・復号化アルゴリズムを利用することもできる。ここで、FEALは、日本電信電話株式会社(当時)が開発した暗号方式で、暗号化と復号化に同じ鍵をもちいる秘密鍵型の暗号方式である。このFEALは、DESに比べて高速に暗号化と復号化ができるという利点がある。   In addition, as encryption methods of TCPsec15b and UDPsec16b used in the present invention, encryption methods such as FEAL (Fast Data Encipherment Algorithm), MISTY, and AES (Advanced Encryption Standard) are used, and a secret encryption created independently is also used. -Decryption algorithms can also be used. Here, FEAL is an encryption method developed by Nippon Telegraph and Telephone Corporation (at that time), and is a secret key type encryption method that uses the same key for encryption and decryption. This FEAL has an advantage that encryption and decryption can be performed at a higher speed than DES.

次に、同じく本発明に利用される暗号方式であるMISTYは、三菱電機株式会社が開発した秘密鍵型の暗号方式であり、IDEAと同様にデータを64ビットのブロックに区切って暗号化する。鍵の長さは128ビットである。暗号化と復号化には同じプログラムが使われる点はDESなどと同じである。この方式も秘密鍵暗号を効率よく解読する線形解読法や差分解読法に対しても十分な強度を持つように設計されている。   Next, MISTY, which is also an encryption method used in the present invention, is a secret key type encryption method developed by Mitsubishi Electric Corporation, and encrypts data divided into 64-bit blocks in the same manner as IDEA. The key length is 128 bits. The same program is used for encryption and decryption as in DES. This method is also designed to have sufficient strength against linear cryptanalysis and differential cryptanalysis that efficiently decrypt private key cryptography.

また、AESは、米国商務省標準技術局によって選定作業が行われている、米国政府の次世代標準暗号化方式であり、現在の標準的な暗号方式であるDESに代わる次世代の暗号標準として開発が進められたものである。世界に公募して集められて幾つかの暗号方式の中から、2000年10月に、ベルギーの暗号開発者Joan Daemen氏とVincent Rijmen氏が開発したRijndaelという方式が採用された。   AES is the next-generation standard encryption method of the US government, which is being selected by the US Department of Commerce's Standard Technology Bureau, as the next-generation encryption standard to replace DES, which is the current standard encryption method. Development has been advanced. Among a number of ciphers that were collected by public recruitment around the world, the Rijndael method developed by Belgian crypto developers Joan Daemen and Vincent Rijmen was adopted in October 2000.

このように、本発明のTCPsec15b及びUDPsec16bの暗号方式としては、既に知られているさまざまな秘密鍵の暗号アルゴリズムを採用することができるほか、ユーザが独自に開発した秘密鍵(共通鍵)暗号方式も利用することが可能である。   As described above, as the encryption methods of TCPsec15b and UDPsec16b of the present invention, various known secret key encryption algorithms can be adopted, and a secret key (common key) encryption method uniquely developed by the user is used. Can also be used.

さらに、いわゆる「なりすまし」及び「データの改竄」などを防ぐための「相手認証」及び「完全性認証」の方法として、公開鍵や事前秘密共有(Pre-shared)を利用したアルゴリズム、例えば、MD5(Message Digest 5)、SHA1(Secure Hash Algorithm 1)などの認証アルゴリズムが用いられる。また、このような公知の認証アルゴリズムに代えて独自の一方向関数を利用したアルゴリズムを採用することもできる。   Furthermore, as a method of “party authentication” and “integrity authentication” to prevent so-called “spoofing” and “data falsification”, an algorithm using a public key or pre-shared, for example, MD5 Authentication algorithms such as (Message Digest 5) and SHA1 (Secure Hash Algorithm 1) are used. An algorithm using a unique one-way function may be employed instead of such a known authentication algorithm.

このMD5は、認証やデジタル署名に用いられるハッシュ関数(一方向要約関数)の一つであり、原文を元に固定長のハッシュ値を発生し、これを通信経路の両端で比較することにより、通信途中で原文が改竄されていないかを検出することができるものである。このハッシュ値は擬似的な乱数のような値をとり、これを基にしては原文を再生できないようになっている。また、同じハッシュ値を生成する別のメッセージを作成することも困難になっている。   This MD5 is one of hash functions (one-way summarization functions) used for authentication and digital signatures, generates a fixed-length hash value based on the original text, and compares it at both ends of the communication path. It is possible to detect whether the original text has been tampered with during communication. This hash value takes a value like a pseudo random number, and based on this value, the original text cannot be reproduced. It is also difficult to create another message that generates the same hash value.

SHA1も、認証やデジタル署名などに使われるハッシュ関数の一つであり、2の64乗ビット以下の原文から160ビットのハッシュ値を生成し、通信経路の両端で比較することにより、通信途上の原文の改竄を検出するものである。この認証アルゴリズムは従来のインターネットの暗号化通信の代表的なものであるIPsecにも採用されている。   SHA1 is also one of hash functions used for authentication, digital signatures, etc., and generates a 160-bit hash value from the original text of 2 <64> bits or less and compares it at both ends of the communication path. It detects the alteration of the original text. This authentication algorithm is also employed in IPsec, which is a typical example of conventional encrypted communication on the Internet.

なお、これらの認証アルゴリズムについては、DH(Diffie-Hellman)公開鍵配送法や、IPsecと同様のIKE(Internet Key Exchange)プロトコル(UDPの500番)などにより安全な鍵交換ができるように設計され、しかも、定期的に暗号化/完全性認証アルゴリズム(論理)自体やそのための鍵の集合/定義域が変更されるように、プロトコルドライバープログラム(TCPsec15b、UDPsec16bなど)によりスケジュールされている。   These authentication algorithms are designed to enable secure key exchange using the DH (Diffie-Hellman) public key distribution method or the IKE (Internet Key Exchange) protocol (UDP 500) similar to IPsec. Moreover, it is scheduled by a protocol driver program (TCPsec15b, UDPsec16b, etc.) so that the encryption / integrity authentication algorithm (logic) itself and the key set / domain for that purpose are changed periodically.

次に、図2に基づいて、本発明の第1の実施の形態である暗号化方式TCP2(特に、TCPsec)を用いた暗号化通信について説明する。図2は、特に、EC(Electronic Commerce:電子商取引)アプリケーションに応用した通信に適用する例である。   Next, based on FIG. 2, the encrypted communication using the encryption system TCP2 (particularly, TCPsec) according to the first embodiment of the present invention will be described. FIG. 2 is an example applied to communication applied particularly to an EC (Electronic Commerce) application.

図2は、ネットワーク20に接続されたECアプリケーション用のクライアント端末3a、3b、3cが、いわゆるルータ又はゲートウエイのようなネットワーク制御機器2を介して他のネットワーク30に接続されたホストコンピュータ(いわゆるサーバとして機能する通信装置)に接続された場合の全体構成を示す図である。   FIG. 2 shows a host computer (so-called server) in which client terminals 3a, 3b and 3c for EC applications connected to the network 20 are connected to another network 30 via a network control device 2 such as a so-called router or gateway. It is a figure which shows the whole structure at the time of being connected to the communication apparatus which functions as.

ネットワーク20に接続されるクライアント端末3a、クライアント端末3b及びクライアント端末3cのうち、クライアント端末3bと3cは、本発明のTCP2を実装していない。つまりクライアント端末3bと3cには、本発明の暗号化方式のためのプロトコルであるTCPsecもUDPsecも実装されていない。TCP2をサポートしているクライアント端末は3aのみである。そして、クライアント端末3bについては、不図示のネットワークポリシー設定により通常のプロトコル処理による接続、すなわち、TCPレベルについては、「データ漏洩」を防ぐ暗号化機能、「データ改竄」を防ぐ完全性認証機能、及び「なりすまし」を防ぐ相手認証機能は伴わない接続を行うようにしている。   Of the client terminal 3a, client terminal 3b, and client terminal 3c connected to the network 20, the client terminals 3b and 3c do not implement the TCP2 of the present invention. That is, neither TCPsec nor UDPsec, which are protocols for the encryption method of the present invention, is implemented in the client terminals 3b and 3c. Only the client terminal 3a supports TCP2. For the client terminal 3b, connection by normal protocol processing by a network policy setting (not shown), that is, for the TCP level, an encryption function for preventing “data leakage”, an integrity authentication function for preventing “data tampering”, In addition, the other party authentication function for preventing “spoofing” is performed without connection.

何れのクライアント端末3a〜3cにおいても、ソケット(socket)の上層には、EC用のアプリケーションソフトウエアが実装されている。また、ネットワーク30に接続されたホストコンピュータ1は、TCP2を搭載しており、そのソケット17の上層にECアプリケーションソフトウエア18が実装されている。図2ではUDPsecなどの不使用のプロトコルを省略しているが、このホストコンピュータ1のプロトコルスタックの構造は図1のプロトコルスタックの構造であるTCP2を構成するソフトウエアは全て搭載されている。   In any of the client terminals 3a to 3c, application software for EC is mounted on the upper layer of the socket. The host computer 1 connected to the network 30 is equipped with TCP 2, and EC application software 18 is mounted on the upper layer of the socket 17. In FIG. 2, an unused protocol such as UDPsec is omitted, but the software stack constituting the protocol stack of FIG. 1 is all installed in the protocol stack structure of the host computer 1.

すなわち、まず第1層(物理層)と第2層(データリンク層)にまたがってNICドライバ(NIC Driver)11が配置され、その上層(第3層)のネットワーク層にはARP (Address Resolution Protocol)12とIPエミュレータ13が配置されている。そして、第4層のトランスポート層にTCPエミュレータ15とUDP16が配置される。図2にUDPエミュレータ(UDPsecとUDPを含む)の記載がないのは、第1の実施形態のECアプリケーションに対する暗号化通信としては速度よりも誤り補償に重点をおくTCPsecが使用されるからである。このことは、ホストコンピュータがUDPsecを搭載していないことを意味するものではない。TCP2を搭載することは、既に説明したようにUDPsecとTCPsecの両方を搭載していることを意味している。   That is, first, a NIC driver (NIC Driver) 11 is arranged across the first layer (physical layer) and the second layer (data link layer), and the ARP (Address Resolution Protocol) is provided on the upper layer (third layer). ) 12 and the IP emulator 13 are arranged. The TCP emulator 15 and the UDP 16 are arranged in the fourth transport layer. The reason why there is no description of the UDP emulator (including UDPsec and UDP) in FIG. 2 is that TCPsec, which emphasizes error compensation rather than speed, is used as encrypted communication for the EC application of the first embodiment. . This does not mean that the host computer is not equipped with UDPsec. The installation of TCP2 means that both UDPsec and TCPsec are installed as already described.

ネットワーク20に接続されたクライアント端末3a、3b、3cとネットワーク30に接続されるホストコンピュータ1を介在するネットワーク制御機器2のプロトコルスタックは、NICドライバ、ARP、IPがスタックとして積み上げられたファームウエア(不揮発メモリ付電子回路)により構成されている。
また、クライアント端末3aは、本発明のTCP2をサポートする端末であるが、ここではTCPsecにのみ対応した通信装置を備えた端末としてプロトコルスタックが示されている。クライアント端末3bと3cは本発明のTCP2をサポートしていない。
The protocol stack of the network control device 2 with the client terminals 3a, 3b, 3c connected to the network 20 and the host computer 1 connected to the network 30 is firmware (NIC driver, ARP, IP stacked as a stack ( Electronic circuit with nonvolatile memory).
The client terminal 3a is a terminal that supports the TCP2 of the present invention. Here, a protocol stack is shown as a terminal provided with a communication device that supports only TCPsec. Client terminals 3b and 3c do not support TCP2 of the present invention.

クライアント端末3aには、ネットワークを通して又はCD−ROMのような記録媒体を介して事前に配布されるプロトコルドライバソフトウエアが実装されている。また、クライアント端末3b、クライアント端末3cに対しても同様にプロトコルドライバソフトウエアが事前に配布され、実装される。   The client terminal 3a is mounted with protocol driver software distributed in advance through a network or a recording medium such as a CD-ROM. Similarly, protocol driver software is distributed and implemented in advance for the client terminals 3b and 3c.

特に、クライアント端末3cについては、従来の暗号化方式であるIPsecを実装しているが、ネットワーク制御機器(ルータ)2がTCPポート番号を参照したIPマスカレードを行っているためIPsecが有効に使えないようになっている。更にクライアント端末3cについては、不図示のネットワークポリシー設定により接続要求を破棄するようにしている。なお、このようなネットワークポリシーの設定ないしプロトコルを実装しているかどうかの確認(受信パケット解析等)自体については当業者に周知の事項であるのため、本明細書では説明を省略する。   In particular, for the client terminal 3c, IPsec, which is a conventional encryption method, is implemented. However, since the network control device (router) 2 performs IP masquerading with reference to a TCP port number, IPsec cannot be used effectively. It is like that. Further, for the client terminal 3c, the connection request is discarded by a network policy setting (not shown). Note that the confirmation of whether or not the network policy is set or the protocol is implemented (received packet analysis or the like) itself is a well-known matter to those skilled in the art, and thus description thereof is omitted in this specification.

ホストコンピュータ1がクライアント端末3aと通信するときは、本発明のTCP2、特にTCPsecに基づいた暗号化及び復号化取決めにより、通信を行うことになるが、ホストコンピュータ1がクライアント端末3b又は3cと通信するときは、本発明のTCP2(特に、TCPsec)による暗号化及び復号化の取決めがされない状態、つまり通常のTCPプロトコルによる通信が行われることになる。もちろん、ホストコンピュータ1がIPsecをサポートしているクライアント端末3cと通信する場合には、IPsecによる暗号化通信をすることができることは当然である。なお、ホストコンピュータ1が、TCP2が搭載されていないクライアント端末3b又は3cと通信しようとしてもホストコンピュータ1の有するTCP2の働きで、通信をストップさせることも可能である。   When the host computer 1 communicates with the client terminal 3a, the host computer 1 communicates with the client terminal 3b or 3c. However, the host computer 1 communicates with the client terminal 3b or 3c. When doing so, communication according to the TCP protocol (particularly TCPsec) of the present invention is not negotiated, that is, communication using the normal TCP protocol is performed. Of course, when the host computer 1 communicates with the client terminal 3c supporting IPsec, it is natural that encrypted communication by IPsec can be performed. Even if the host computer 1 tries to communicate with the client terminal 3b or 3c not equipped with TCP2, it is possible to stop the communication by the function of TCP2 that the host computer 1 has.

また、この実施の形態では、ネットワークを介してホストコンピュータ1とクライアント端末3aとが暗号化及び復号化ロジックの交換を行うようにしているが、FDやCD、UDBメモリ等のリムーバブルメディアを用いて予め通信相手同士で暗号化及び復号化のための取決めロジックを交換しておくこともできることは言うまでもない。   In this embodiment, the host computer 1 and the client terminal 3a exchange encryption and decryption logic via a network. However, using a removable medium such as an FD, CD, or UDB memory. It goes without saying that the negotiation logic for encryption and decryption can be exchanged between the communicating parties in advance.

次に、図3に基づいて、本発明の第2の実施形態であるTCP2の中のUDPsecの暗号化方式を用いた暗号化通信について説明する。図3は、ネットワーク20に接続された放送アプリケーション用のクライアント端末4a、4b、4cが、いわゆるルータ又はゲートウエイのようなネットワーク制御機器2を介して別のネットワーク30に接続されたホストコンピュータ(いわゆるサーバとして機能する通信装置)1と通信する通信システムの全体構成を示す図である。   Next, the encrypted communication using the UDPsec encryption method in TCP2, which is the second embodiment of the present invention, will be described with reference to FIG. FIG. 3 shows a host computer (so-called server) in which client terminals 4a, 4b, 4c for broadcasting applications connected to the network 20 are connected to another network 30 via a network control device 2 such as a so-called router or gateway. 1 is a diagram illustrating an overall configuration of a communication system that communicates with a communication device 1 that functions as:

図3は、クライアント端末4a、4b、4c及びホストコンピュータ1のプロトコルスタックを示しているが、TCP2をサポートしているクライアント端末は4aと4bである。つまり端末4aと4bだけがUDPsecを備えている。各クライアント端末のソケット(socket)の上層には、放送用のアプリケーションソフトウエアが実装されている。また、ネットワーク30に接続されたホストコンピュータ1もTCP2を搭載しており、そのソケット17の上層に放送アプリケーションソフトウエア19が実装されている。図3のホストコンピュータ1も図2のホストコンピュータ1と同様に、図1のプロトコルスタックの構造であるTCP2を構成するソフトウエアは全て搭載している。   FIG. 3 shows the protocol stacks of the client terminals 4a, 4b, and 4c and the host computer 1, but the client terminals that support TCP2 are 4a and 4b. That is, only the terminals 4a and 4b are provided with UDPsec. Broadcast application software is installed in the upper layer of the socket of each client terminal. Further, the host computer 1 connected to the network 30 is also equipped with TCP 2, and the broadcast application software 19 is mounted on the upper layer of the socket 17. Similarly to the host computer 1 in FIG. 2, the host computer 1 in FIG. 3 has all the software constituting the TCP 2 that is the structure of the protocol stack in FIG.

ホストコンピュータ1が保有するプロトコルスタックは、図2のホストコンピュータ1のプロトコルスタックと略同じであるが、図2のホストコンピュータ1のプロトコルスタックと異なる点は、TCPエミュレータの代わりにUDPエミュレータ16がある点である。これは放送アプリケーションソフトでは画像等の大量のデータが取り扱われるため、データ伝送のような誤り補償よりも、高速性が重視されるためである。   The protocol stack possessed by the host computer 1 is substantially the same as the protocol stack of the host computer 1 of FIG. 2, but differs from the protocol stack of the host computer 1 of FIG. 2 in that there is a UDP emulator 16 instead of the TCP emulator. Is a point. This is because the broadcast application software handles a large amount of data such as images, and therefore, high speed is more important than error compensation such as data transmission.

ネットワーク20に接続されたクライアント端末4a、4b、4cとネットワーク30に接続されるホストコンピュータ1を介在するネットワーク制御機器2のプロトコルスタックは、NICドライバ、ARP、IPがスタックとして積み上げられたファームウエア(不揮発メモリ付電子回路)により構成されている。   The protocol stack of the network control device 2 that includes the client terminals 4a, 4b, and 4c connected to the network 20 and the host computer 1 connected to the network 30 has firmware (NIC driver, ARP, and IP stacked as a stack ( Electronic circuit with nonvolatile memory).

また、クライアント端末4aは、本発明のTCP2をサポートする端末であるが、ここではUDPsecにのみ対応した通信装置を備えた端末であり、クライアント端末4bは、本発明のUDPsec及び公知のIPsecに対応した通信装置であり、クライアント端末4cは公知のIPsecにのみ対応した通信装置である。このクライアント端末4cは本発明のTCP2をサポートしていない。これらのクライアント端末4a〜4cには、図2のクライアント端末3a〜3cと同様に、ネットワークを通して又はCD−ROMのような記録媒体を介して事前に配布されるプロトコルドライバソフトウエアが実装されている。   The client terminal 4a is a terminal that supports the TCP2 of the present invention. Here, the client terminal 4a is a terminal provided with a communication device that supports only UDPsec, and the client terminal 4b corresponds to the UDPsec of the present invention and a known IPsec. The client terminal 4c is a communication device that supports only known IPsec. This client terminal 4c does not support TCP2 of the present invention. Similar to the client terminals 3a to 3c in FIG. 2, protocol driver software distributed in advance through a network or via a recording medium such as a CD-ROM is mounted on these client terminals 4a to 4c. .

また、特に「データ漏洩」防止のための暗号化・復号化ロジック及び「データ改竄」防止のための認証情報付加・認証ロジックについては、ホストコンピュータ1とクライアント端末4a、4b、4cの間で対応している必要がある。公知のいわゆるIPsecと同様のポリシーで取決めを行うこともできるが、本発明の第2の実施形態においては、事前にプロトコルドライバソフトウエア自体を配布しているので、より簡潔な独自のプロトコルにより秘密鍵等を取り決めたり、より簡易な構造のパケットを使用したりすることもできる。また、公知の暗号化・復号化及び認証アルゴリズムでなく、独自で作成した暗号化・復号化及び認証アルゴリズム(ロジック)自体をプロトコルドライバのソフトウエアモジュール等として組み込むこともできる。   In particular, encryption / decryption logic for preventing "data leakage" and authentication information addition / authentication logic for preventing "data falsification" are supported between the host computer 1 and the client terminals 4a, 4b, 4c. Need to be. Although it is possible to make an arrangement with a policy similar to the known so-called IPsec, in the second embodiment of the present invention, since protocol driver software itself is distributed in advance, a secret is obtained by a simpler original protocol. It is also possible to negotiate keys and use packets with a simpler structure. Further, instead of a known encryption / decryption and authentication algorithm, an encryption / decryption and authentication algorithm (logic) itself created independently can be incorporated as a software module of the protocol driver.

なお、クライアント端末4cは、TCP2を実装していないが、インターネットで利用される公知のIPsecを実装しているため、これによってある程度セキュアな通信をすることができる。しかし、クライアント4aと4bは、対象とする放送アプリケーションのパフォーマンスないしセキュリティポリシーの都合上、IPsecではなく本発明によるTCP2の構成要素であるUDPsecを実装して使用している。IPsecではなくUDPsecを利用する理由は、例えば、UDPポート番号部分(IPペイロードに属する)をIPsecで暗号化することによるパフォーマンスの低下など、IPsec自体に脆弱さがあるからである。   Note that the client terminal 4c does not implement TCP2, but implements well-known IPsec that is used on the Internet, and thus can perform secure communication to some extent. However, the clients 4a and 4b implement and use UDPsec, which is a constituent element of TCP2 according to the present invention, instead of IPsec, for the performance of the target broadcast application or the security policy. The reason for using UDPsec instead of IPsec is that IPsec itself is vulnerable, for example, performance degradation caused by encrypting the UDP port number portion (belonging to the IP payload) with IPsec.

また、通信相手が正しいものかどうかを判断する相手認証プロトコルを、本発明のTCP2のTCP又はUDPプロトコルスタック、つまりTCPsec又はUDPsecに埋め込むことにより、通信相手相互間で上位アプリケーションを意識することなく、通信相手認証機能を実施することができる。この場合、コスト増にならない範囲で実質的に通信パケット数やパケット長等を増やすこともできる。   In addition, by embedding the partner authentication protocol for determining whether the communication partner is correct in the TCP or UDP protocol stack of TCP2 of the present invention, that is, TCPsec or UDPsec, without being aware of the upper application between the communication partners, A communication partner authentication function can be implemented. In this case, it is possible to substantially increase the number of communication packets, the packet length, and the like as long as the cost does not increase.

また、特に、ネットワーク内で不特定多数の相手に向かってデータを送信するブロードキャスト機能を実施するに際して、本発明による暗号化方式であるUDPsecを利用する場合には、ブロードキャストを受けるクライアント端末3a、3bがネゴシエーション(取り決め)を開始し、通信相手認証や通信用秘密鍵を得る。そして、クライアント端末3aや3bは、通信相手の認証を行って通信用の秘密鍵を取得するまでは、ホストコンピュータ1からのUDPsecによる配信データを復号化することができない。   In particular, when implementing a broadcast function for transmitting data to an unspecified number of other parties in a network, when using UDPsec, which is an encryption method according to the present invention, client terminals 3a and 3b that receive the broadcast. Starts negotiation (arrangement) and obtains communication partner authentication and a secret key for communication. The client terminals 3a and 3b cannot decrypt the UDPsec distribution data from the host computer 1 until the communication partner is authenticated and the communication secret key is acquired.

次に、図4に基づいて、本発明の第1及び第2の実施形態の通信で送受信されるパケット構造と、その暗号化範囲及び完全性認証の適用範囲について説明する。
図4(a)はTCPsec/IPsecのパケット構造と各暗号化範囲と完全性認証の適応範囲を示し、図4(b)(c)はそれぞれTCPsec/IP、UDPsec/IPのパケット構造と各暗号化範囲及び完全性認証の適用範囲を示したものである。
Next, based on FIG. 4, the packet structure transmitted / received in the communication of the first and second embodiments of the present invention, its encryption range, and the application range of integrity authentication will be described.
FIG. 4A shows the TCPsec / IPsec packet structure, each encryption range, and the applicable range of integrity authentication. FIGS. 4B and 4C show the TCPsec / IP and UDPsec / IP packet structures and the respective ciphers. It shows the scope of application and the scope of integrity certification.

図4(a)に示すように、TCPsec/IPsecのパケット構造は、IPヘッダ41のすぐ後に、IPsecのESPヘッダ42が続いている。続いてTCPヘッダ43とTCPsecの付加情報44が設けられ、その後にアプリケーションデータ45が続く構造になっている。そして、アプリケーションデータ45の後には、ブロック暗号で発生するデータのブランクやそのブランクの長さ、次のヘッダの番号などの暗号データをサポートする情報であるTCPsec付加トレーラ46が配列され、その後にTCPsecの付加認証データ47が配列される。そして、さらにその後にIPのためのESPトレーラ48とESP認証データ49が配列されるパケット構造になっている。   As shown in FIG. 4A, in the TCPsec / IPsec packet structure, an IPsec ESP header 42 follows immediately after the IP header 41. Subsequently, a TCP header 43 and additional information 44 of TCPsec are provided, followed by application data 45. After the application data 45, a TCPsec additional trailer 46, which is information for supporting encrypted data such as a blank of data generated by block cipher, the length of the blank, and the number of the next header, is arranged. The additional authentication data 47 is arranged. After that, the packet structure is such that an ESP trailer 48 for IP and ESP authentication data 49 are arranged.

このうち番号41、42、48、49で示される部分はIPsec用の情報であり、番号43、44、46、47が本発明によるTCP2の中心的な役割を果たすTCPsecに関連する情報である。なお、ここではTCPsecもIPsecに準じた配列としたが、採用する暗号化や認証のアルゴリズムによっては、TCPsecの付加情報44と付加トレーラ46を省略したり、TCPsecの付加認証データ47を削減したりしても利用可能である。   Of these, the portions indicated by numbers 41, 42, 48, and 49 are information for IPsec, and the numbers 43, 44, 46, and 47 are information related to TCPsec that plays a central role in TCP2 according to the present invention. Here, TCPsec is also arranged according to IPsec. However, depending on the encryption and authentication algorithms employed, the TCPsec additional information 44 and the additional trailer 46 may be omitted, or the TCPsec additional authentication data 47 may be reduced. Even it can be used.

図4(a)に示すTCP2のパケット構造においては、TCPsecとIPsecの二つの方式で暗号化が行われる。この場合、まず送信側では、TCPsec側を最初に暗号化して、TCPsec認証データを付加する。次に、IPsecを暗号化し、IPsec認証データを付加している。そして、受信側では、まず、IPsecを復号化して、IPsec認証データにより受信パケットのデータを検証し、続いてTCPsec側を復号化して、TCPsec認証データで受信パケットのデータを検証する。   In the TCP2 packet structure shown in FIG. 4A, encryption is performed by two methods, TCPsec and IPsec. In this case, the transmission side first encrypts the TCPsec side and adds TCPsec authentication data. Next, IPsec is encrypted and IPsec authentication data is added. On the receiving side, first, the IPsec is decrypted, the data of the received packet is verified by the IPsec authentication data, and then the TCPsec side is decrypted, and the data of the received packet is verified by the TCPsec authentication data.

このように、図4(a)に示すようなパケット構造を有するデータでは、IPsecとTCPsecの二種類の暗号アルゴリズムを用いて暗号化し、さらに完全性認証を行うので、IPsecのみと比べて外部からの侵入等にたいして格段に強固な暗号化通信システムを確立することができる。TCPsecにより暗号化される範囲は、アプリケーションデータ45、TCPsec付加トレーラ46の部分であり、TCPsecによる認証範囲としては上記暗号化範囲にさらにTCPsec付加情報44が加えられる。なお、従来のIPsecで暗号化される暗号化範囲は、TCPヘッダ43からESPトレーラ48までの部分であり、その認証範囲は、ESPヘッダ42からESPトレーラ48までの範囲となる。   In this way, data having a packet structure as shown in FIG. 4A is encrypted using two types of encryption algorithms, IPsec and TCPsec, and further integrity authentication is performed. It is possible to establish an encryption communication system that is extremely robust against intrusion and the like. The range encrypted by TCPsec is the application data 45 and the TCPsec additional trailer 46, and the TCPsec additional information 44 is further added to the encryption range as the authentication range by TCPsec. Note that the encryption range encrypted by the conventional IPsec is a portion from the TCP header 43 to the ESP trailer 48, and the authentication range is a range from the ESP header 42 to the ESP trailer 48.

図4(b)は、TCPsec/IPのパケット構造を示しており、図4(a)と異なり、IPヘッダ41のすぐ後に、TCPヘッダ43及びTCPsec付加情報44が続き、更にアプリケーションデータ45が続く構造になっている。そして、アプリケーションデータ45の後には、ブロック暗号で発生するデータのブランクやそのブランクの長さ、次のヘッダの番号などの暗号データをサポートする情報であるTCPsecの付加トレーラ46とTCPsecの付加認証データ47が配列される構造となっている。   FIG. 4B shows the TCPsec / IP packet structure. Unlike FIG. 4A, the TCP header 43 and TCPsec additional information 44 follow immediately after the IP header 41, and application data 45 continues. It has a structure. The application data 45 is followed by a TCPsec additional trailer 46 and TCPsec additional authentication data, which are information supporting encrypted data such as a blank of data generated by block cipher, the length of the blank, and the number of the next header. 47 is arranged.

ここで、番号43、44、46、47がTCPsecに特徴的な情報となる。ただし、上述したようにこれらの情報は、採用する暗号化/認証アルゴリズムによっては、TCPsec/IPの使用していないヘッダフィールド部分などに分散したり、個々のパケットからは逆算・推測できない独立した事前取決め(ネゴシエーション)により省略したりできるものである。また、IP層の上層に当たるTCP及びIPを使用していないプロトコルフィールドを用いて、図4(b)に示すようなTCPsec/IPパケットを構成することにより、より下層のIPのみに着目したIPsecパケットよりもパケット長を簡単に削減することができるようになる。なお、ここで暗号化範囲は、図示の通り、アプリケーションデータ45、TCPsec付加トレーラ46であり、認証範囲は上記暗号化範囲の他に、TCPsecの付加情報44が加えられる。   Here, the numbers 43, 44, 46, and 47 are information characteristic of TCPsec. However, as described above, depending on the encryption / authentication algorithm employed, these pieces of information may be distributed in header fields that are not used by TCPsec / IP, etc., or may not be calculated or estimated from individual packets. It can be omitted by negotiation. Further, by constructing a TCPsec / IP packet as shown in FIG. 4 (b) using TCP corresponding to the upper layer of the IP layer and a protocol field not using IP, an IPsec packet focusing only on the lower layer IP Thus, the packet length can be easily reduced. Here, as shown in the figure, the encryption range is application data 45 and a TCPsec additional trailer 46, and the TCPsec additional information 44 is added to the authentication range in addition to the encryption range.

図4(c)は、本発明におけるUDPsec/IPのパケット構造を示すものであり、UDPsec付加情報44a、UDPsec付加トレーラ46a及びUDPsec付加認証データ47aがUDPsecをサポートするために必要な情報となる。この暗号化範囲は、図示の通り、アプリケーションデータ45a、UDPsec付加トレーラ46aであり、認証範囲は上記暗号化範囲の他に、UDPsec付加情報44aが加えられる。   FIG. 4C shows a UDPsec / IP packet structure according to the present invention. The UDPsec additional information 44a, the UDPsec additional trailer 46a, and the UDPsec additional authentication data 47a are information necessary for supporting UDPsec. As shown in the figure, the encryption range includes application data 45a and a UDPsec additional trailer 46a. The authentication range includes UDPsec additional information 44a in addition to the encryption range.

次に、本発明の第1の実施の形態であるTCPsecを用いた暗号化処理システムの動作を図5〜図6、図8〜図14に示す流れ図、及び図7に示すシーケンス図に基づいて説明する。   Next, the operation of the encryption processing system using TCPsec according to the first embodiment of the present invention is based on the flowcharts shown in FIGS. 5 to 6 and FIGS. 8 to 14 and the sequence diagram shown in FIG. explain.

図5は、TCP、並びに、TCPsecのパッシブオープン(図7のホストBに相当する接続待ちのオープンであり、例えば、Webサーバが、この状態でオープンする。)における処理の流れ図であり、上位アプリケーション・プログラムで、接続待ちオープンした場合に、このTCP/TCPsecパッシブオープン処理がスタートする(ステップS1)。なお、この部分は、図7でいうとホストB側の処理がこれに相当する。   FIG. 5 is a flowchart of processing in TCP and TCPsec passive open (open for waiting for connection corresponding to host B in FIG. 7, for example, the Web server opens in this state). The TCP / TCPsec passive open process starts when the program waits for connection open (step S1). This portion corresponds to the processing on the host B side in FIG.

まず、最初に、オープンするポート番号の解析が行われる(ステップS2)。この解析では、例えば、Webサーバの場合は、TCPポートの80番を使用して、その定義状態を確認する。そして次にこのポート番号80が、TCPsecのパッシブオープンが許可されているかどうかを判定する(ステップS3)。ステップS3においてTCPsecのパッシブオープンが許可されていない場合は、今度はTCPパッシブオープンが許可されているかどうかが判断される(ステップS4)。判断ステップS4でTCPパッシブオープンも許可されていない場合は、TCPsecもTCPも許可されていないことになり、TCP/TCPsecパッシブオープンは失敗となり、処理を中断する(ステップS7)。   First, the port number to be opened is analyzed (step S2). In this analysis, for example, in the case of a Web server, the TCP port number 80 is used to check the definition state. Next, it is determined whether or not this port number 80 is permitted for TCPsec passive open (step S3). If TCPsec passive open is not permitted in step S3, it is determined whether or not TCP passive open is permitted (step S4). If TCP passive open is not permitted in determination step S4, neither TCPsec nor TCP is permitted, and TCP / TCPsec passive open fails, and the process is interrupted (step S7).

判断ステップS4でTCPパッシブオープンが許可されている場合、すなわちTCPsecパッシブオープンは許可されていないがTCPパッシブオープンは許可されているときは、後述する図8に示すTCPパッシブオープン処理が実行される(ステップS5)。
判断ステップS3で、TCPsecのパッシブオープンの許可状態が確認された場合は、同じく後述する図9に示すTCPsecのパッシブオープン処理が実行される(ステップS6)。
When TCP passive open is permitted in the determination step S4, that is, when TCPsec passive open is not permitted but TCP passive open is permitted, a TCP passive open process shown in FIG. Step S5).
If the TCPsec passive open permission state is confirmed in the determination step S3, the TCPsec passive open process shown in FIG. 9 described later is executed (step S6).

ステップS5又はステップS6におけるTCPパッシブオープン処理又はTCPsecのパッシブオープン処理が終了するとTCP/TCPsecパッシブオープン処理を終了する(ステップS7)。このように、本例では、上位であるアプリケーションからは、TCPでパッシブオープンを行っているが、TCP2の判断により、TCPsecがサポートされていればTCPsecで通信を行い、TCPsecがサポートされていなければTCPで通信することとなる。   When the TCP passive open process or the TCPsec passive open process in step S5 or S6 ends, the TCP / TCPsec passive open process ends (step S7). As described above, in this example, the upper-level application performs passive open with TCP. However, if TCPsec is supported according to the determination of TCP2, communication is performed with TCPsec, and if TCPsec is not supported. Communication is performed using TCP.

次に、図6に基づいて本発明のTCP並びにTCPsecのアクティブオープン処理について説明する。TCP/TCPsecのアクティブオープンとは、接続要求のオープンであり、例えば、Webブラウザを実装するクライアント端末が、この状態でオープンすることになる。図7でいうとホストA側の処理がこれに相当する。図6は、このアクティブオープンにおける処理の流れ図であり、上位アプリケーション・プログラムにおいて接続要求オープンがなされた場合に、このTCP/TCPsecのアクティブオープン処理が開始される(ステップS8)。   Next, TCP and TCPsec active open processing according to the present invention will be described with reference to FIG. The TCP / TCPsec active open is a connection request open. For example, a client terminal mounted with a Web browser opens in this state. In FIG. 7, the processing on the host A side corresponds to this. FIG. 6 is a flowchart of processing in this active open. When a connection request is opened in the upper application program, this TCP / TCPsec active open processing is started (step S8).

まず、最初に、オープンするポート番号の解析がなされる(ステップS9)。この解析は、例えば、Webブラウザを実装するクライアント端末アプリケーションが、TCPポートの3000番を使おうとした場合は、TCPポートの3000番の定義状態を確認する。   First, the port number to be opened is analyzed (step S9). In this analysis, for example, when a client terminal application that implements a Web browser tries to use the TCP port number 3000, the definition state of the TCP port number 3000 is confirmed.

次にこのポート番号3000に対してTCPsecのアクティブオープンが許可されているかどうかが判断される(ステップS10)。ステップS10においてTCPsecのアクティブオープンが許可されていないと判定された場合は、続いてTCPアクティブオープンが許可されているかどうかが判断される(ステップS11)。判断ステップS11でTCPアクティブオープンも許可されていない場合は、TCPsec、TCPのいずれのアクティブオープンも許可されていないことになり、TCP/TCPsecアクティブは失敗となり、接続処理は中断される(ステップS14)。   Next, it is determined whether TCPsec active open is permitted for this port number 3000 (step S10). If it is determined in step S10 that TCPsec active open is not permitted, it is subsequently determined whether TCP active open is permitted (step S11). If TCP active open is not permitted in the determination step S11, neither TCPsec nor TCP active open is permitted, TCP / TCPsec active fails, and the connection process is interrupted (step S14). .

判断ステップS11でTCPアクティブオープンが許可されている場合、すなわちTCPsecアクティブオープンは許可されていないがTCPアクティブオープンは許可されているときは、後述する図10に示すTCPアクティブオープン処理が実行される(ステップS12)。   When the TCP active open is permitted in the judgment step S11, that is, when the TCPsec active open is not permitted but the TCP active open is permitted, the TCP active open process shown in FIG. Step S12).

判断ステップS10で、TCPsecのアクティブオープンの許可状態が確認された場合は、後述する図11に示すTCPsecのアクティブオープン処理が実行される(ステップS13)。ステップS12又はステップS13におけるTCPsecアクティブオープン処理又はTCPsecのアクティブオープン処理が終了するとTCP/TCPsecアクティブオープン処理が終わる(ステップS14)。TCP/TCPsecアクティブオープンの場合も、TCP/TCPsecパッシブオープン(図5)の場合と同様に、上位であるアプリケーションからは、TCPでアクティブブオープンを行っているが、TCP2の判断により、TCPsecがサポートされていればTCPsecで通信を行い、TCPsecがサポートされていなければTCPで通信することとなる。   If the TCPsec active open permission state is confirmed in the determination step S10, the TCPsec active open process shown in FIG. 11 described later is executed (step S13). When the TCPsec active open process or the TCPsec active open process in step S12 or S13 ends, the TCP / TCPsec active open process ends (step S14). In the case of TCP / TCPsec active open, as in the case of TCP / TCPsec passive open (FIG. 5), active open is performed by TCP from the upper application, but TCPsec is supported by judgment of TCP2. If so, communication is performed using TCPsec. If TCPsec is not supported, communication is performed using TCP.

次に、図7に基づいてアクティブオープン側のホストAとパッシブオープン側のホストB間のシーケンス処理について、本発明のTCPsecを使った通信の処理を説明する。   Next, communication processing using TCPsec of the present invention will be described with respect to sequence processing between the active open side host A and the passive open side host B based on FIG.

図7は、本発明の暗号処理プロトコルであるTCPsecを用いたときの接続シーケンス、データ通信シーケンス及び切断シーケンスを、標準のTCPと比較して示したものである。図7(a)は標準TCP,図7(b)は本発明のTCPsecを用いた時の通信のシーケンスを示した図である。
図7(a)に示すように、標準のTCPは、ホストBのアプリケーションがTCPパッシブオープンし、ホストAのアプリケーションがTCPアクティブオープンしている。
FIG. 7 shows a connection sequence, a data communication sequence, and a disconnection sequence in comparison with standard TCP when TCPsec, which is the cryptographic processing protocol of the present invention, is used. 7A is a diagram showing a communication sequence when standard TCP is used, and FIG. 7B is a diagram showing a communication sequence when TCPsec of the present invention is used.
As shown in FIG. 7A, in the standard TCP, the host B application is TCP passive open and the host A application is TCP active open.

ホストBのアプリケーションがTCPパッシブオープンをすると、TCPパッシブオープン処理(図5のステップ5及び図8参照)を開始し、後述する図8のステップS15に示すように受信待ちとなる。ホストAのアプリケーションがTCPアクティブオープンをすると、TCPアクティブオープン処理(図6のステップS12及び図10参照)を開始し、後述する図10のステップS52に示すようにホストAからホストBに対して接続要求(SYN)が送信される。これにより、標準TCPの接続シーケンスが開始状態となる。   When the host B application performs TCP passive open, TCP passive open processing (see step 5 and FIG. 8 in FIG. 5) is started, and reception waits as shown in step S15 in FIG. When the application of host A performs TCP active open, TCP active open processing (see step S12 in FIG. 6 and FIG. 10) is started, and connection from host A to host B is performed as shown in step S52 of FIG. A request (SYN) is transmitted. As a result, the standard TCP connection sequence is started.

ホストB側では、この接続要求(SYN)を受信するとこの接続要求の受信パケットの解析を終了し、ホストA側に接続応答(SYN・ACK)を送信する。ここでACKとは、Acknowledgementの略であり、データ転送が正常に終了したときなどに送信されるものである。ホストA側は、この接続応答(SYN・ACK)を受信すると、接続が完了した旨のACK(肯定応答)を送信し、標準TCPの接続シーケンスを終了する。   Upon receiving this connection request (SYN), the host B side ends the analysis of the received packet of this connection request and transmits a connection response (SYN / ACK) to the host A side. Here, ACK is an abbreviation for Acknowledgment, and is transmitted when data transfer is normally completed. Upon receiving this connection response (SYN / ACK), the host A side transmits an ACK (acknowledgment) indicating that the connection is completed, and ends the standard TCP connection sequence.

この標準TCPの接続シーケンスを終了すると、標準TCPによるデータ通信シーケンスが有効となり、ホストA側、又は、ホストB側の何れかがデータを送信後、データを受信した側からACK(肯定応答)を返すという基本パターンを繰り返してデータの送受信が行われる。   When this standard TCP connection sequence ends, the standard TCP data communication sequence becomes valid, and either the host A side or the host B side transmits data, and then receives an ACK (acknowledgment) from the data receiving side. Data is transmitted and received by repeating the basic pattern of returning.

この標準TCPのデータ通信シーケンスでは、ホストA又はホストBの何れかが、相手に対して切断要求をすることができる。
図7(a)では、アクティブオープン側のホストAからパッシブオープン側のホストBに対して切断要求が送信された場合を示している。ホストAのアプリケーションから切断要求があると、ホストAは、切断要求(FIN)を送信する。ホストBは、この切断要求(FIN)を受信すると、後述する図8のステップS23に示すように切断応答(FIN・ACK)を送信する。ホストAは、この切断応答(FIN・ACK)を受信すると、ACK(肯定応答)を送信し、標準TCPの切断シーケンスを終了する。
In this standard TCP data communication sequence, either the host A or the host B can make a disconnection request to the other party.
FIG. 7A shows a case where a disconnection request is transmitted from the active open side host A to the passive open side host B. When there is a disconnection request from the application of the host A, the host A transmits a disconnection request (FIN). When receiving the disconnection request (FIN), the host B transmits a disconnection response (FIN / ACK) as shown in step S23 of FIG. Upon receiving this disconnection response (FIN / ACK), the host A transmits an ACK (acknowledgment) and ends the standard TCP disconnection sequence.

次に、本発明のTCPsecによる通信のシーケンスを図7(b)に基づいて説明する。図7(b)では、ホストBのアプリケーションがTCPsecパッシブオープンし、ホストAのアプリケーションがTCPsecアクティブオープンしている。
ホストBのアプリケーションがTCPsecパッシブオープンをすると、TCPsecパッシブオープン処理(図5のステップS6及び図9を参照)を開始し、後述する図9のステップS31に示すように受信待ちとなる。ホストAのアプリケーションがTCPsecアクティブオープンをすると、TCPsecアクティブオープン処理(図6のステップS13及び図11を参照)を開始し、図11のステップS69に示すようにホストAからホストBに対して接続要求(SYN)が送信される。これにより、TCPsecの接続シーケンスが開始状態となる。なお、接続要求(SYN)には、TCPsecフラグと、データ部にTCP2固有情報又は緊急データを付加し、正しい相手であることを相手に通知するようにしている。すなわち、ホストAとホストBの間で次のTCPsecネゴシエーションデータを交換する以前に相手方端末がTCP2をサポートする端末であるか否か、言い換えると通信する正しい相手であるか否かを確認することができる。
Next, a communication sequence using TCPsec according to the present invention will be described with reference to FIG. In FIG. 7B, the host B application is TCPsec passive open, and the host A application is TCPsec active open.
When the host B application performs TCPsec passive open, TCPsec passive open processing (see step S6 and FIG. 9 in FIG. 5) is started, and reception waits as shown in step S31 in FIG. When the application of host A performs TCPsec active open, TCPsec active open processing (see step S13 in FIG. 6 and FIG. 11) is started, and a connection request is sent from host A to host B as shown in step S69 of FIG. (SYN) is transmitted. As a result, the TCPsec connection sequence is started. Note that the TCPsec flag and the TCP2-specific information or emergency data are added to the connection request (SYN) in the data part to notify the other party that it is the correct partner. That is, before exchanging the next TCPsec negotiation data between the host A and the host B, it is possible to confirm whether or not the counterpart terminal is a terminal that supports TCP2, in other words, whether or not it is a correct counterpart for communication. it can.

ホストB側では、ホストAから送信された接続要求(SYN)を受信すると、正しい相手であれば、ホストAに対して接続応答(SYN・ACK)を送信する。なお、接続応答(SYN・ACK)には、TCPsecフラグと、データ部にTCP2固有情報又は緊急データを付加し、正しい相手であることを相手に通知している。そして、ホストA側は、このホストBからの接続応答(SYN・ACK)を受信するとACK(肯定応答)を送信する。続いてホストAとホストBの間でTCPsecネゴシエーションデータを交換し、正しい相手であれば、TCPsecの接続シーケンスを終了する。   On the host B side, when the connection request (SYN) transmitted from the host A is received, if it is a correct partner, a connection response (SYN / ACK) is transmitted to the host A. Note that the TCPsec flag and the TCP2 specific information or emergency data are added to the data part in the connection response (SYN / ACK) to notify the other party of being a correct partner. When the host A side receives the connection response (SYN / ACK) from the host B, it transmits an ACK (acknowledgment). Subsequently, the TCPsec negotiation data is exchanged between the host A and the host B, and if it is a correct partner, the TCPsec connection sequence is terminated.

この接続シーケンスが終了すると、TCPsecのデータ通信シーケンスが有効となり、ホストA側又はホストB側の何れかがデータを送信後、データを受信した側からACK(肯定応答)を返す基本パターンを繰り返してデータの送受信が行われる。なお、このデータは、すべて暗号データであることは言うまでもない。   When this connection sequence is completed, the TCPsec data communication sequence becomes valid, and after repeating the basic pattern in which either the host A side or the host B side transmits data and then returns an ACK (acknowledgment) from the data receiving side. Data is sent and received. Needless to say, this data is all encrypted data.

なお、TCPsecのデータ通信シーケンスでは、ホストA又はホストBの何れかが相手方に対して切断要求をすることができる。図7(b)では、アクティブオープン側のホストAから切断を開始している。ホストAのアプリケーションから切断要求があると、ホストAは切断要求(FIN)を送信する。この切断要求(FIN)には、TCPsecフラグと、データ部にTCP2固有情報又は緊急データを付加し、正しい相手であることを相手に通知することができるものである。ホストBは、この切断要求(FIN)を受信すると、正しい相手であれば、後述する図9のステップS42に示すように切断応答(FIN・ACK)を送信する。なお、切断応答(FIN・ACK)には、TCPsecフラグと、データ部にTCP2固有情報又は緊急データを付加し、正しい相手であることを相手に通知している。ホストAは、この切断応答(FIN・ACK)を受信すると、ACK(肯定応答)を送信し、TCPsecの切断シーケンスを終了する。   In the TCPsec data communication sequence, either host A or host B can make a disconnection request to the other party. In FIG. 7B, disconnection is started from the host A on the active open side. When there is a disconnection request from the application of the host A, the host A transmits a disconnection request (FIN). In this disconnection request (FIN), a TCPsec flag and TCP2-specific information or emergency data are added to the data part, so that the other party can be notified of the correct party. When receiving the disconnection request (FIN), the host B transmits a disconnection response (FIN / ACK) as shown in step S42 in FIG. Note that the TCPsec flag and TCP2-specific information or emergency data are added to the data part in the disconnection response (FIN / ACK) to notify the other party that the party is the correct partner. Upon receiving this disconnection response (FIN / ACK), the host A transmits an ACK (acknowledgment) and ends the TCPsec disconnection sequence.

以上、図7に基づいて、標準TCPと本発明のTCP2のひとつであるTCPsecについて通信の接続から切断までのシーケンスを説明したが、以下、TCP及びTCPsecのパッシブオープン処理、及びアクティブオープン処理について流れ図に従って順に説明する。   The sequence from connection to disconnection of communication for TCPsec, which is one of the standard TCP and TCP2 of the present invention, has been described above based on FIG. 7, but a flow chart for passive open processing and active open processing for TCP and TCPsec below. Will be described in order.

まず、図5の流れ図のステップS5において、TCPパッシブオープン処理がスタートした場合の詳細について図8の流れ図に基づいて説明する。
図5のステップS5で処理するプロトコルがTCPと決定した場合に、この図8のTCPパッシブオープン処理がスタートする。最初に、受信待ちをして、受信した受信パケットの解析を行う(ステップS15)。続いてこの受信したパケットが正しいパケットであるか否か、つまりDoS攻撃におけるTCPプロトコル攻撃パターンであるかどうかを判断する(ステップS16)。そしてステップS16の判断の結果、不正パケットであると判定された場合にはその受信パケットを廃棄し(ステップS17)、次のパケットの受信を待つ。
First, the details when the TCP passive open process is started in step S5 of the flowchart of FIG. 5 will be described based on the flowchart of FIG.
When the protocol to be processed in step S5 in FIG. 5 is determined to be TCP, the TCP passive open process in FIG. 8 is started. First, it waits for reception and analyzes the received packet (step S15). Subsequently, it is determined whether or not the received packet is a correct packet, that is, whether or not it is a TCP protocol attack pattern in a DoS attack (step S16). If it is determined in step S16 that the packet is an illegal packet, the received packet is discarded (step S17), and the next packet is awaited.

判断ステップS16において、受信パケットが正しいTCPパケットであると判断された場合は、続いて接続中か否か、つまり図7のホストAとホストBの接続シーケンスが完了しているかどうかが判断される(ステップS18)。判断ステップS18において、接続中であると判定された場合は、次にパケットが切断要求(図7(a)のFIN)であるか否かが判断される(ステップS19)。切断要求でなければ、続いて切断応答(図7(a)のFIN/ACK)であるか否かが判断される(ステップS20)。切断要求でもなく、切断応答でもない場合には、TCPデータの送受信処理が行われ(ステップS21)、受信パケットが切断応答である場合は、図7のホストAからACKが送信され、TCP接続が切断される(ステップS25)。判断ステップS19でホストAからの切断要求であると判断されると、これに対する切断応答がホストBから送信される(ステップS23)。   If it is determined in the determination step S16 that the received packet is a correct TCP packet, it is subsequently determined whether or not the connection is in progress, that is, whether or not the connection sequence between the host A and the host B in FIG. (Step S18). If it is determined in the determination step S18 that the connection is being established, it is next determined whether or not the packet is a disconnection request (FIN in FIG. 7A) (step S19). If it is not a disconnection request, it is subsequently determined whether it is a disconnection response (FIN / ACK in FIG. 7A) (step S20). If it is neither a disconnection request nor a disconnection response, TCP data transmission / reception processing is performed (step S21). If the received packet is a disconnection response, an ACK is transmitted from the host A in FIG. Disconnected (step S25). If it is determined in the determination step S19 that the request is a disconnection request from the host A, a disconnection response is transmitted from the host B (step S23).

ステップS23で切断応答が送信された場合には、最終のACKを待つ(ステップS24)。そして、最終ACKを受信した後にTCPを切断状態にして(ステップS25)、TCPパッシブオープンを終了する(ステップS26)。
判断ステップS18において、受信ポートが接続中でないとされた場合には、受信したパケットがパッシブオープン許可ポートであるか否かが判定される(ステップS27)。そして受信パケットが許可されていない場合は、受信パケットを廃棄して(ステップS28)次のパケットを待つ。また、判断ステップS27において、受信パケットがパッシブオープン許可になっているとされた場合は、次にパケットが接続要求であるか否かが判断され(ステップS29)、接続要求でない場合は、パケットを廃棄して(ステップS28)次のパケットを待つ。また、判断ステップS29で接続要求であると判断された場合には、接続応答を送信し、TCPを接続状態とする(ステップS30)。
When a disconnection response is transmitted in step S23, the final ACK is waited (step S24). Then, after receiving the final ACK, the TCP is disconnected (step S25), and the TCP passive open is terminated (step S26).
If it is determined in the determination step S18 that the reception port is not connected, it is determined whether or not the received packet is a passive open permission port (step S27). If the received packet is not permitted, the received packet is discarded (step S28) and the next packet is awaited. If it is determined in the determination step S27 that the received packet is permitted to be passively opened, it is then determined whether or not the packet is a connection request (step S29). Discard (step S28) and wait for the next packet. If it is determined in the determination step S29 that the request is a connection request, a connection response is transmitted to set the TCP in a connection state (step S30).

次に、図5のTCPsecのパッシブオープンにおける処理ステップS6の詳細について、図9の流れ図に基づいて説明する。この処理は、図5のステップS6に示されるように、受信パケットの処理がTCPsecの処理であると決定された場合の処理である。最初に、受信待ちをして、受信した受信パケットの解析がなされる(ステップS31)。続いてこの受信したパケットが正しいパケットであるか否か、つまりDoS攻撃におけるTCPプロトコル攻撃パターンでないかどうかが判断される(ステップS32)。このステップS32の判断の結果、不正パケットであると判定された場合にはその受信パケットを廃棄し(ステップS33)、ステップS31に戻り、次のパケットの受信を待つ。   Next, details of the processing step S6 in the TCPsec passive open of FIG. 5 will be described based on the flowchart of FIG. This process is a process when it is determined that the process of the received packet is a TCPsec process, as shown in step S6 of FIG. First, waiting for reception, the received received packet is analyzed (step S31). Subsequently, it is determined whether or not the received packet is a correct packet, that is, whether or not it is a TCP protocol attack pattern in a DoS attack (step S32). If it is determined in step S32 that the packet is an illegal packet, the received packet is discarded (step S33), and the process returns to step S31 to wait for reception of the next packet.

判断ステップS32において、受信パケットが正しいパケットであると判断された場合は、続いてホストAとホストBの接続が完了しているかどうか(接続中かどうか)が判断される(ステップS34)。判断ステップS34において、ホストAとホストBが接続中であると判定された場合は、次に受信したパケットが切断要求(FIN)であるのか否かが判断される(ステップS35)。切断要求でなければ、今度は受信したパケットが切断応答(FIN・ACK)であるか否かが判断される(ステップS36)。そして、受信したパケットが切断要求でもなく、切断応答でもないということであれば、後述する図12に示されるTCPsecデータの送受信処理が行われ(ステップS37)、ステップS49に進む。次に、判断ステップS36で切断応答があった場合には、切断鍵が一致しているかどうかが判断される(ステップS38)。ここで、切断鍵とはホストAとホストBの間で図7の接続シーケンスにおけるネゴシエーションにおいて取り交わした共通鍵(秘密鍵)であり、この鍵が一致したときだけ両者間の通信を切断することができるものである。判断ステップS38で切断鍵が一致した場合には、ACKを送信して(ステップS39)、ホストAとホストB間のTCPsecを切断する(ステップS44)。判断ステップS38で切断鍵が一致しなかった場合には、不正パケットとしてパケットを廃棄し(ステップS41)、次の受信パケットを待つ。また、判断ステップS35において、受信パケットが切断要求(FIN)であると判断された場合も、切断鍵が一致しているか否かが判断される(ステップS40)。そして、切断鍵が一致しない場合は、受信パケットが不正なパケットとして廃棄され(ステップS41)、切断鍵が一致した場合は、切断応答(FIN・ACK)の送信が行われる(ステップS42)。ステップS42で切断応答が送信された場合には、相手方からの最終のACKを待ち(ステップS43)、この最終ACKを受信するとTCPsecを切断状態にして(ステップS44)、TCPsecパッシブオープンを終了する(ステップS45)。   If it is determined in the determination step S32 that the received packet is a correct packet, it is subsequently determined whether or not the connection between the host A and the host B has been completed (whether connection is in progress) (step S34). If it is determined in the determination step S34 that the host A and the host B are connected, it is determined whether or not the next received packet is a disconnection request (FIN) (step S35). If it is not a disconnection request, it is next determined whether or not the received packet is a disconnection response (FIN / ACK) (step S36). If the received packet is neither a disconnection request nor a disconnection response, TCPsec data transmission / reception processing shown in FIG. 12 described later is performed (step S37), and the process proceeds to step S49. Next, when there is a disconnection response in the determination step S36, it is determined whether or not the disconnection keys match (step S38). Here, the disconnect key is a common key (secret key) exchanged between the host A and the host B in the negotiation in the connection sequence of FIG. 7, and the communication between the two can be disconnected only when the keys match. It can be done. If the disconnection keys match in determination step S38, ACK is transmitted (step S39), and TCPsec between host A and host B is disconnected (step S44). If the disconnection key does not match in determination step S38, the packet is discarded as an illegal packet (step S41), and the next received packet is awaited. Further, when it is determined in the determination step S35 that the received packet is a disconnection request (FIN), it is determined whether or not the disconnection keys match (step S40). If the disconnection key does not match, the received packet is discarded as an illegal packet (step S41), and if the disconnection key matches, a disconnection response (FIN / ACK) is transmitted (step S42). If a disconnection response is transmitted in step S42, the process waits for the final ACK from the other party (step S43). When this final ACK is received, TCPsec is disconnected (step S44), and TCPsec passive open is terminated (step S44). Step S45).

判断ステップS34において、ホストAとホストBが接続中でないと判断された場合には、受信したパケットがパッシブオープンの許可ポートであるか否かが判断される(ステップS46)。そして受信パケットがパッシブオープンの許可ポートではない場合は、受信パケットを廃棄して(ステップS47)、ステップS31に戻り次のパケットを待つ。また、判断ステップS46おいて、受信パケットがパッシブオープン許可ポートになっているとされた場合は、後述する図13に示すTPCsecパッシブ接続処理が実行される(ステップS48)。   If it is determined in the determination step S34 that the host A and the host B are not connected, it is determined whether or not the received packet is a passive open permission port (step S46). If the received packet is not a passive open permission port, the received packet is discarded (step S47), and the process returns to step S31 to wait for the next packet. If it is determined in the determination step S46 that the received packet is a passive open permission port, a TPCsec passive connection process shown in FIG. 13 described later is executed (step S48).

続いて、共通鍵と認証データに基づいて通信相手が正常、つまり正当な権限を持った相手であるか否かが判断される(ステップS49)。正常な相手であると判断されれば、ステップS31に戻り、次の受信パケットを待つが、通信相手が正常の相手ではないと判断されると、TPCsecの接続を強制切断し(ステップS50)、TCPsecのパッシブオープンの処理を終了する(ステップS51)。   Subsequently, based on the common key and the authentication data, it is determined whether or not the communication partner is normal, that is, a partner having a valid authority (step S49). If it is determined that it is a normal partner, the process returns to step S31 to wait for the next received packet. If it is determined that the communication partner is not a normal partner, the TPCsec connection is forcibly disconnected (step S50). The TCPsec passive open process is terminated (step S51).

次に、図6のステップS12に示す、TCPアクティブオープンの処理について図10の流れ図に基づいて説明する。
図10は、図6における処理するプロトコルがTCPであると決定した場合の処理を示す図であり、最初に、送信側ホストAから受信側ホストBに対して接続要求(SYN)が送信される(ステップS52)。この接続要求に対して受信側ホストBから接続応答(SYN・ACK)が送信されると、次に受信待ちをし、受信したパケットの解析が行われる(ステップS53)。次に、この受信したパケットが正しいパケットであるか否か、つまりDoS攻撃におけるTCPプロトコル攻撃パターンでないかどうかを判断する(ステップS54)。このステップS54における判断の結果、不正パケットであると判定された場合にはその受信パケットを廃棄し(ステップS55)、ステップS53に戻り、次のパケットの受信を待つ。
Next, the TCP active open process shown in step S12 of FIG. 6 will be described based on the flowchart of FIG.
FIG. 10 is a diagram illustrating processing when it is determined that the protocol to be processed in FIG. 6 is TCP. First, a connection request (SYN) is transmitted from the transmission side host A to the reception side host B. (Step S52). When a connection response (SYN / ACK) is transmitted from the receiving host B in response to this connection request, it waits for reception next and analyzes the received packet (step S53). Next, it is determined whether or not the received packet is a correct packet, that is, whether or not it is a TCP protocol attack pattern in a DoS attack (step S54). If it is determined in step S54 that the packet is an illegal packet, the received packet is discarded (step S55), the process returns to step S53, and the next packet is awaited.

判断ステップS54において、受信パケットが正しいパケットであると判断された場合は、続いて送信側(アクティブ側)ホストAと受信側(パッシブ側)ホストBが、接続中かどうかが判断される(ステップS56)。この判断ステップS56において、接続中であると判定された場合は、次に受信パケットが送信側ホストAから受信側ホストBに対しての切断要求であるか否かが判断される(ステップS57)。これが切断要求でなければ、今度は受信側ホストBから送信側ホストAに対する切断応答(FIN・ACK)であるか否かが判断される(ステップS58)。切断要求でもなく切断応答でもないということになれば、TCPデータの送受信処理が行われ(ステップS59)、次の受信パケットを待つ。判断ステップS58でホストBからホストAへの切断応答であると判断されると、ホストAは切断を肯定するACKを送信し(ステップS60)、TCPを切断する(ステップS63)。   If it is determined in the determination step S54 that the received packet is a correct packet, it is subsequently determined whether or not the transmission side (active side) host A and the reception side (passive side) host B are connected (step S54). S56). If it is determined in this determination step S56 that the connection is established, it is next determined whether or not the received packet is a disconnection request from the transmission side host A to the reception side host B (step S57). . If this is not a disconnection request, it is next determined whether or not it is a disconnection response (FIN / ACK) from the receiving host B to the transmitting host A (step S58). If it is neither a disconnection request nor a disconnection response, TCP data transmission / reception processing is performed (step S59), and the next received packet is awaited. If it is determined in step S58 that the response is a disconnection response from host B to host A, host A transmits an ACK affirming disconnection (step S60), and disconnects TCP (step S63).

判断ステップS57において、受信したパケットが切断要求である場合は、ホストBからホストAに対して切断応答が送信され(ステップS61)、ホストBはホストAからの最終のACKの受信を待つ(ステップS62)。そして、ホストBがホストAから最終ACKを受信した後にTCPを切断状態にして(ステップS63)、TCPアクティブオープンを終了する(ステップS64)。
判断ステップS56において、送信側ホストAと受信側ホストBが接続中でないとされた場合には、受信したパケットがアクティブオープン許可ポートであるか否かが判定される(ステップS65)。そして受信パケットが許可されていない場合は、受信パケットを廃棄して(ステップS66)次のパケットを待つ。また、判断ステップS65において、受信パケットがアクティブオープン許可になっているとされた場合は、次に受信側ホストBからの接続応答があったか否かが判断され(ステップS67)、接続応答がなければ、パケットを廃棄して(ステップS66)次のパケットを待ち、受信側ホストBから接続応答がなされた場合には、TCPの接続状態として(ステップS68)、ステップS53に戻り、次の受信パケットを待つ。
If the received packet is a disconnection request in the determination step S57, a disconnection response is transmitted from the host B to the host A (step S61), and the host B waits for reception of the final ACK from the host A (step S61). S62). Then, after the host B receives the final ACK from the host A, the TCP is disconnected (step S63), and the TCP active open is ended (step S64).
If it is determined in the determination step S56 that the transmission side host A and the reception side host B are not connected, it is determined whether or not the received packet is an active open permission port (step S65). If the received packet is not permitted, the received packet is discarded (step S66) and the next packet is awaited. If it is determined in the determination step S65 that the received packet is permitted to be active open, it is then determined whether or not there is a connection response from the receiving host B (step S67). Then, the packet is discarded (step S66), the next packet is waited, and if the connection response is made from the receiving host B, the TCP connection state is set (step S68), the process returns to step S53, and the next received packet is wait.

次に、図6のステップS13のTCPsecアクティブオープンが開始された場合の詳細な処理について図11の流れ図に基づいて説明する。
図11の流れ図に示す処理は、図6のステップS13で処理するプロトコルがTCPsecであると決定した場合に開始されるものである。最初に、送信側ホストAから受信側ホストBに対して接続要求(SYN)が送信される(ステップS69)。これに対して、受信側ホストBから接続応答(SYN・ACK)があってパケットの受信が開始され、受信したパケットの解析が行われる(ステップS70)。
Next, detailed processing when TCPsec active open in step S13 of FIG. 6 is started will be described based on the flowchart of FIG.
The process shown in the flowchart of FIG. 11 is started when it is determined that the protocol to be processed in step S13 of FIG. 6 is TCPsec. First, a connection request (SYN) is transmitted from the transmission side host A to the reception side host B (step S69). On the other hand, the reception side host B receives a connection response (SYN / ACK), and the reception of the packet is started, and the received packet is analyzed (step S70).

次に、受信パケットの解析の結果、受信したパケットが正しいTCPのパケットであるか否か、すなわち、DoS攻撃におけるTCPプロトコル攻撃パターンでないか否かが判断される(ステップS71)。この結果、不正パケットであると判定された場合には、そのパケットを廃棄(ステップS72)し、ステップS70に戻り次のパケットを待つ。   Next, as a result of analyzing the received packet, it is determined whether or not the received packet is a correct TCP packet, that is, whether or not it is a TCP protocol attack pattern in a DoS attack (step S71). As a result, when it is determined that the packet is an illegal packet, the packet is discarded (step S72), and the process returns to step S70 to wait for the next packet.

判断ステップS71において、受信したパケットが正しいTCPパケットであると判定された場合は、次に送信側ホストAと受信側ホストBの接続が完了しているかどうか(接続中かどうか)が判断される(ステップS73)。そしてホストAとホストBが接続中であれば、今度は受信したパケットが切断要求(FIN)であるか否かが判断される(ステップS74)。受信したパケットが切断要求ではないときは、次に受信側ホストBから切断応答があるかどうかが判断される(ステップS75)。切断要求もなく切断応答もない場合は、図12に示すTCPsecデータの送受信処理が行われ(ステップ76)、その後ステップS89に進む。   If it is determined in the determination step S71 that the received packet is a correct TCP packet, it is next determined whether or not the connection between the transmission side host A and the reception side host B is completed (whether connection is in progress). (Step S73). If the host A and the host B are connected, it is determined whether or not the received packet is a disconnection request (FIN) (step S74). If the received packet is not a disconnection request, it is next determined whether there is a disconnection response from the receiving host B (step S75). If there is no disconnection request and no disconnection response, the TCPsec data transmission / reception process shown in FIG.

判断ステップS75で切断応答があった場合には、切断鍵が一致しているかどうかが判断される(ステップS77)。この切断鍵については図9において説明したとおりである。判断ステップS77で切断鍵が一致した場合には、送信側ホストAから受信側ホストBに対してACKを送信して(ステップS78)、ホストAとホストB間のTCPsecを切断する(ステップS83)。判断ステップS77で切断鍵が一致しなかった場合には、不正パケットとしてパケットを廃棄し(ステップS80)、次の受信パケットを待つ。また、判断ステップS74において、受信パケットが切断要求(FIN)であると判断された場合も、切断鍵が一致しているか否かが判断される(ステップS79)。そして、切断鍵が一致しない場合は、受信パケットが不正なパケットとして廃棄され(ステップS80)、切断鍵が一致した場合は、切断応答(FIN・ACK)の送信が行われる(ステップS81)。ステップS81で切断応答が送信された場合には、相手方からの最終のACKを待ち(ステップS82)、この最終ACKを受信するとTCPsecを切断状態にして(ステップS83)、TCPsecアクティブオープンを終了する(ステップS84)。   If there is a disconnection response in determination step S75, it is determined whether the disconnection keys match (step S77). The disconnection key is as described in FIG. If the disconnection key matches in the determination step S77, an ACK is transmitted from the transmission side host A to the reception side host B (step S78), and TCPsec between the host A and the host B is disconnected (step S83). . If the disconnection key does not match in decision step S77, the packet is discarded as an illegal packet (step S80), and the next received packet is awaited. If it is determined in the determination step S74 that the received packet is a disconnection request (FIN), it is also determined whether or not the disconnection keys match (step S79). If the disconnection key does not match, the received packet is discarded as an illegal packet (step S80). If the disconnection key matches, a disconnection response (FIN / ACK) is transmitted (step S81). When a disconnection response is transmitted in step S81, the process waits for the final ACK from the other party (step S82). When this final ACK is received, TCPsec is disconnected (step S83), and TCPsec active open ends ( Step S84).

判断ステップS73において、送信側ホストAと受信側ホストBの接続が完了していない、つまり接続中でないとされた場合には、受信したパケットがアクティブオープン許可ポートであるか否かが判定される(ステップS85)。そして受信されたパケットが許可されていない場合は、その受信パケットを廃棄して(ステップS87)ステップS70に戻り、次のパケットを待つ。また、判断ステップS85において、受信パケットがアクティブオープン許可になっているとされた場合は、受信されるパケットが受信側ホストBからの接続応答(SYN・ACK)のパケットであるか否かが判断され(ステップS86)、接続応答のパケットでない場合は、パケットを廃棄して(ステップS87)次のパケットを待ち、判断ステップS86で接続応答のパケットであると判断された場合には、図14でその詳細を示すTCPsecアクティブ接続処理が行われる(ステップS88)。   In the determination step S73, if the connection between the transmission side host A and the reception side host B is not completed, that is, it is determined that the connection is not being performed, it is determined whether or not the received packet is an active open permission port. (Step S85). If the received packet is not permitted, the received packet is discarded (step S87), and the process returns to step S70 to wait for the next packet. If it is determined in the determination step S85 that the received packet is active-open permitted, it is determined whether or not the received packet is a connection response (SYN / ACK) packet from the receiving host B. If the packet is not a connection response packet (step S86), the packet is discarded (step S87) and the next packet is waited. If it is determined in step S86 that the packet is a connection response packet, FIG. A TCPsec active connection process showing the details is performed (step S88).

ステップS88でTCPsecのアクティブ接続処理がなされると、次に受信側のホストBが正常な相手か否か、つまり接続を許可されている相手であるか否かが判断される(ステップS89)。そして、接続が許されている相手であると判断されれば、ステップS70に戻って次のパケットの受信を待ち、ステップS89で接続が許可されていない相手であると判断されると、TCPsecによる送受信を強制的に切断して(ステップS90)、TCPsecのアクティブオープンを終了する(ステップS91)。   When TCPsec active connection processing is performed in step S88, it is next determined whether or not the receiving host B is a normal partner, that is, whether or not the connection is permitted (step S89). If it is determined that the connection is permitted, the process returns to step S70 to wait for reception of the next packet. If it is determined in step S89 that the connection is not permitted, TCPsec is used. Transmission / reception is forcibly disconnected (step S90), and TCPsec active open is terminated (step S91).

次に、上述した図9ステップS37及び図11のステップS76が選択された場合のTCPsecデータの送受信処理の詳細について図12の流れ図に基づいて説明する。   Next, details of the TCPsec data transmission / reception processing when step S37 in FIG. 9 and step S76 in FIG. 11 are selected will be described based on the flowchart of FIG.

まず、図9のステップS37及び図11のステップS76でTCPsecデータの送受信処理が開始すると、最初に、ホストAの上位アプリケーションからの送信要求があるか否かが判断される(ステップS92)。そして、ホストAの上位アプリケーションから送信要求があった場合は、送信側ホストAで送信データが暗号化され(ステップS93)、それに認証データが付加されて(ステップS94)、受信側ホストBに暗号化され認証データが付加されたパケットが送信される(ステップS95)。   First, when the TCPsec data transmission / reception process is started in step S37 of FIG. 9 and step S76 of FIG. 11, it is first determined whether or not there is a transmission request from a host application of the host A (step S92). If there is a transmission request from the host A host application, the transmission data is encrypted at the transmission side host A (step S93), authentication data is added to it (step S94), and the reception side host B is encrypted. The packet to which the authentication data is added is transmitted (step S95).

次に、受信側ホストBで、受信データがあるか否かが判断され(ステップS96)、受信データがある場合には、受信データの復号化が行われる(ステップS97)。次に、この受信され復号化されたデータが正しいデータであるかどうかが判断される(ステップS98)。この判断は、復号化したデータと受信された認証データとを確認することによって行われるが、復号データを確認した結果、正しいデータでないと判定された場合には、TCP/TCPsecを強制的に切断する(ステップS99)。この強制切断は、受信したデータを廃棄するとともに、送信側に切断要求をすることによって行われる。判断ステップS98で、復号化したデータが正しいデータであると判定された場合には、受信データの取り込み、すなわち上位プロトコルスタックへのデータの配達が行われ(ステップS100)、TCPsecのデータ送受信処理が完了する(ステップS101)。   Next, the receiving host B determines whether or not there is received data (step S96). If there is received data, the received data is decrypted (step S97). Next, it is determined whether or not the received and decoded data is correct data (step S98). This determination is made by confirming the decrypted data and the received authentication data. If it is determined that the decrypted data is not correct, the TCP / TCPsec is forcibly disconnected. (Step S99). This forced disconnection is performed by discarding the received data and making a disconnection request to the transmission side. If it is determined in the determination step S98 that the decrypted data is correct data, the received data is fetched, that is, the data is delivered to the upper protocol stack (step S100), and the TCPsec data transmission / reception process is performed. Completion (step S101).

次に、図9のステップS48でTCPsecパッシブ接続処理が開始された場合の詳細の処理を図13の流れ図に基づいて説明する。
最初に、相手が正しい相手、つまり自コンピュータに接続する権限を持つコンピュータであるか否かを判断し(ステップS102)、正しい相手でない場合にはTCPsecの強制切断のための処理を実施する(ステップS103)。判断ステップS102において接続相手が正しい相手であると判断されれば、受信側ホストBから接続応答を送信する(ステップS104)。
Next, detailed processing when the TCPsec passive connection processing is started in step S48 of FIG. 9 will be described based on the flowchart of FIG.
First, it is determined whether or not the partner is a correct partner, that is, a computer having authority to connect to the own computer (step S102). If the partner is not the correct partner, a process for forcible disconnection of TCPsec is performed (step S102). S103). If it is determined in the determination step S102 that the connection partner is the correct partner, a connection response is transmitted from the receiving host B (step S104).

そして、接続応答を送信してきた相手の情報が自コンピュータ内にあるかどうかを確認する(ステップS105)。相手情報がコンピュータ内にない場合は、本システム、すなわちTCP2をインストールする際に使用した、インストールサーバから相手情報を取得する(ステップS106)。または、第三者認証のサーバから相手情報を取得してステップS107に進む。この取得する情報としては、相手側のTCP2のID、ユーザID、パスワード、バイオメトリックス情報、機器固有情報、LAN接続機器情報等の内、1つ、若しくは、複数を使用することができる。なお、サーバからの取得情報を既に自コンピュータが保有している場合であっても、有効期限若しくは有効使用回数を超えているような場合には、改めて取得動作を行う必要がある。   And it is confirmed whether the information of the other party who transmitted the connection response exists in the own computer (step S105). If the partner information is not in the computer, the partner information is acquired from the installation server used when installing this system, that is, TCP2 (step S106). Alternatively, the partner information is acquired from the third-party authentication server and the process proceeds to step S107. As the information to be acquired, one or a plurality of TCP2 IDs, user IDs, passwords, biometrics information, device specific information, LAN connection device information, etc., can be used. Even if the own computer already holds the acquisition information from the server, it is necessary to perform the acquisition operation again when the expiration date or the effective use count is exceeded.

次に、相手情報が正しい相手であるか否か、つまり、自分のコンピュータにアクセスすることを許容されている相手であるかどうかが判断される(ステップS107)。ここで、接続する相手が正しい相手であれば、TCPsecのパッシブ接続を完了する(ステップS108)が、正しい相手でない場合にはTCPsecの強制切断を行って接続を中止する(ステップS103)。   Next, it is determined whether or not the partner information is a correct partner, that is, whether or not the partner information is permitted to access his / her computer (step S107). If the partner to be connected is the correct partner, the TCPsec passive connection is completed (step S108). If the partner is not the correct partner, the TCPsec is forcibly disconnected and the connection is stopped (step S103).

次に、図11のステップS88でTCPsecのアクティブ接続処理が開始された場合の詳細の処理を図14の流れ図に基づいて説明する。
図13のパッシブ接続処理の場合と同様に、最初に、接続要求をしてきた相手が正しい相手であるどうか、つまり自コンピュータにアクセス権限を持っている相手からの通信であるかどうかを判断する(ステップS109)。正当なアクセス権限を持たない相手からの通信であれば、TCPsecのアクティブ接続を強制切断して終了する(ステップS110)。
Next, detailed processing when the TCPsec active connection processing is started in step S88 of FIG. 11 will be described based on the flowchart of FIG.
As in the case of the passive connection process in FIG. 13, first, it is determined whether or not the other party who has requested the connection is the right party, that is, whether or not the communication is from the other party having access authority to the own computer ( Step S109). If the communication is from a partner who does not have a valid access authority, the TCPsec active connection is forcibly disconnected and the process ends (step S110).

判断ステップS109で正しい相手であると判定されれば、送信側ホストから受信側ホストBに対して肯定的な接続応答(ACK)を送信する(ステップS111)。
次に、自コンピュータが相手側の情報を保有しているかどうかが判断される(ステップS112)。相手情報がコンピュータ内にない場合は、本システム、すなわちTCP2をインストールする際に使用した、インストールサーバから相手情報を取得する(ステップS113)。または、第三者認証のサーバから相手情報を取得してステップS114に進む。ここで、この取得する情報は、図13ステップS106と同様に、相手側のTCP2のID、ユーザID、パスワード、バイオメトリックス情報、機器固有情報、LAN接続機器情報等の内、1つ、若しくは、複数とすることができる。なお、サーバからの取得情報を既に自コンピュータが保有していたとしても、有効期限若しくは有効使用回数を超えている場合には、改めて取得動作を行う必要がある。
If it is determined in the determination step S109 that it is the correct partner, a positive connection response (ACK) is transmitted from the transmission side host to the reception side host B (step S111).
Next, it is determined whether or not the own computer has information on the other party (step S112). If the partner information is not in the computer, the partner information is acquired from the installation server used when installing this system, that is, TCP2 (step S113). Alternatively, the partner information is acquired from the third-party authentication server, and the process proceeds to step S114. Here, the information to be acquired is one of TCP2 ID, user ID, password, biometrics information, device specific information, LAN connection device information, etc. on the other side, as in step S106 in FIG. There can be multiple. Even if the own computer already holds the acquisition information from the server, it is necessary to perform the acquisition operation again if the expiration date or the number of effective uses has been exceeded.

次に、相手情報が正しい相手であるか否か、つまり、自分のコンピュータにアクセスすることを許容されている相手であるかどうかが判断される(ステップS114)。接続する相手が正しい相手であれば、TCPsecのアクティブ接続を完了する(ステップS115)が、正しい相手でない場合にはTCPsecの強制切断を行って接続を中止する(ステップS110)。   Next, it is determined whether or not the partner information is a correct partner, that is, whether or not the partner information is permitted to access the computer (step S114). If the partner to be connected is the correct partner, the TCPsec active connection is completed (step S115). If the partner is not the correct partner, the TCPsec is forcibly disconnected and the connection is stopped (step S110).

以上、本発明のTCP2のうち、TCP/TCPsecを用いたパッシブオープン及びアクティブオープンの通信処理について説明した。
次に、図3で示すような、本発明の第2の実施形態であるUDP/UDPsecを用いた通信システム及び通信方法について説明する。
In the foregoing, the passive open and active open communication processing using TCP / TCPsec of TCP2 of the present invention has been described.
Next, a communication system and a communication method using UDP / UDPsec which is the second embodiment of the present invention as shown in FIG. 3 will be described.

図15は、本発明の第2の実施の形態に用いられるUDP/UDPsecのパッシブオープン処理について説明するための流れ図である。
この処理は、上位アプリケーション・プログラムにより開始される(ステップ120)。最初に、オープンするポート番号の解析、すなわちポート番号の定義状態が確認される(ステップ121)。次に、このポート番号がUDPsecオープンになっているか否かが判断される(ステップS122)。UDPsecがオープンになっていない場合はUDPがオープンになっているかどうかが判断される(ステップ123)。そして、UDPsec、UDPが両方ともオープン許可になっていない場合は、UDP/UDPsecは終了する(ステップS126)。判断ステップS123で、UDPがオープン許可になっている場合、つまりUDPsecはオープン許可になっていないけれどもUDPがオープン許可になっている場合は、図18に示すUDPオープン処理が実施される(ステップS124)また、判断ステップS122においてUDPsecがオープンである場合は、UDPがオープンであるか否かにかかわらず、UDPsecのオープン処理が実施されて(ステップS125)、UDP/UDPsecオープン処理は終了する(ステップS126)。なお、上位であるアプリケーションからは、UDPでオープンを行っていたとしても、TCP2の判断により、UDPsec若しくは、UDPで通信することも可能である。
FIG. 15 is a flowchart for explaining the UDP / UDPsec passive open processing used in the second embodiment of the present invention.
This process is started by the upper application program (step 120). First, analysis of the port number to be opened, that is, the definition state of the port number is confirmed (step 121). Next, it is determined whether or not this port number is UDPsec open (step S122). If UDPsec is not open, it is determined whether UDP is open (step 123). If neither UDPsec nor UDP is permitted to be opened, UDP / UDPsec ends (step S126). If it is determined in step S123 that UDP is open-permitted, that is, UDPsec is not open-permitted but UDP is open-permitted, the UDP open process shown in FIG. 18 is performed (step S124). In addition, when UDPsec is open in the determination step S122, regardless of whether UDP is open or not, UDPsec open processing is performed (step S125), and the UDP / UDPsec open processing ends (step S125). S126). Even if the upper application is open by UDP, it is possible to communicate by UDPsec or UDP according to the determination of TCP2.

次に、本発明の第2実施の形態の1つであるUDP/UDPsecを用いたユニキャスト通信におけるシーケンス処理について図16に基づいて説明する。
図16は、標準のUDP、及び、本発明のTCP2の中のUDPsecにおけるユニキャスト通信の開始シーケンス、データ通信シーケンスのパケット(ヘッダと、ペイロードで構成する)及び、その流れを説明した図である。
Next, sequence processing in unicast communication using UDP / UDPsec, which is one of the second embodiments of the present invention, will be described with reference to FIG.
FIG. 16 is a diagram illustrating a unicast communication start sequence, a data communication sequence packet (consisting of a header and a payload), and a flow thereof in standard UDP and UDPsec in TCP2 of the present invention. .

図16(a)が標準のUDPを用いた通信シーケンスを示し、図16(b)は、UDPsecによる暗号化通信のシーケンスを示す。
図16(a)の標準のUDPは、ホストA、ホストBともにアプリケーションがUDPオープンしている例を示している。ホストBのアプリケーションがUDPオープンをすると、UDPオープン処理(図15のステップS124及び図18参照)を開始する。また、同様にホストAのアプリケーションがUDPオープンした場合も上記のUDPオープン処理を開始する。これにより、UDPのデータ通信を行うことが可能となる。ここで図16(a)に示すユニキャスト通信では、ホストA、ホストBの何れからもデータの送信が可能である。
FIG. 16A shows a communication sequence using standard UDP, and FIG. 16B shows a sequence of encrypted communication using UDPsec.
The standard UDP in FIG. 16A shows an example in which the application is UDP open for both the host A and the host B. When the host B application opens UDP, a UDP open process (see step S124 in FIG. 15 and FIG. 18) is started. Similarly, when the host A application opens UDP, the above UDP open processing is started. This makes it possible to perform UDP data communication. Here, in the unicast communication shown in FIG. 16A, data can be transmitted from either the host A or the host B.

次に、本発明のTCP2の暗号化方式の1つであるUDPsecによる通信処理のシーケンスを説明する。
図16(b)は、本発明のTCP2が持つUDPsecにより暗号化通信する場合の例であるが、この例は、ホストA、ホストBともにアプリケーションがUDPオープンし、TCP2がUDPsecでオープンと判断したケースである。
ホストBがUDPsecオープンをすると、UDPsecオープン処理(図15のステップS125及び図19を参照)が開始される。また、ホストAがUDPsecオープンした場合も同様にUDPsecオープン処理が開始される。そして、UDPsecのデータ通信が実現可能となる。
Next, a communication processing sequence by UDPsec, which is one of the TCP2 encryption methods of the present invention, will be described.
FIG. 16B shows an example in which encrypted communication is performed using UDPsec of TCP2 of the present invention. In this example, it is determined that both the host A and the host B are open for UDP and TCP2 is open for UDPsec. It is a case.
When the host B opens UDPsec, a UDPsec open process (see step S125 in FIG. 15 and FIG. 19) is started. Similarly, when the host A opens UDPsec, the UDPsec open processing is started. Then, UDPsec data communication can be realized.

この図16(b)に示したUDPsecを用いたユニキャスト通信においても、UDPのときと同様に、ホストA側又はホストB側の何れからもデータを送信することができる。図16(b)の場合、まず、ホストAのアプリケーションからUDPデータの送信要求があったとして説明する。アプリケーションからUDPデータの送信要求を受け取ると、ホストBは、UDPsecユニキャスト受信開始処理を開始し、ネゴシエーションを開始する。ネゴシエーションをして、相手が正しい相手であれば、ネゴシエーションを完了して、アプリケーションからUDPデータの送信要求をUDPsecデータ(暗号データ)として送信する。このUDPsecユニキャスト通信では、データを受信した側からACK(肯定応答)を返さない。このため、送達確認とデータの保証をする機能はないが、その分データの通信が高速になり、大容量の画像データなどの通信に適している。   In the unicast communication using UDPsec shown in FIG. 16B, data can be transmitted from either the host A side or the host B side as in the case of UDP. In the case of FIG. 16B, the description will be given first assuming that there is a UDP data transmission request from the host A application. When receiving a UDP data transmission request from the application, the host B starts a UDPsec unicast reception start process and starts negotiation. If negotiation is performed and the other party is the correct party, the negotiation is completed, and a UDP data transmission request is transmitted from the application as UDPsec data (encrypted data). In this UDPsec unicast communication, ACK (acknowledgment) is not returned from the data receiving side. For this reason, although there is no function for confirming delivery and guaranteeing data, the communication of the data is increased accordingly, which is suitable for communication of large-capacity image data.

図17は、標準UDPと本発明のTCP2の暗号化方式であるUDPsecを用いたブロードキャスト通信の開始シーケンス、データ通信シーケンスのパケット(ヘッダと、ペイロードで構成する)及び、その流れを説明した図である。
図17(a)が、標準のUDP、図17(b)が本発明のTCP2のUDPsecによる通信のシーケンス図である。
FIG. 17 is a diagram for explaining a broadcast communication start sequence, a data communication sequence packet (consisting of a header and a payload), and a flow thereof using standard UDP and UDPsec, which is the TCP2 encryption method of the present invention. is there.
17A is a sequence diagram of communication by standard UDP, and FIG. 17B is a sequence diagram of communication by UDP2 of TCP2 of the present invention.

図17(a)の標準のUDPは、ホストA、ホストBともにアプリケーションがUDPオープンしている。そして、ホストBのアプリケーションがUDPオープンをすると、UDPオープン処理(図15のステップS124及び図18参照)を開始する。また、ホストAのアプリケーションがUDPオープンした場合も、同様にUDPオープン処理を開始する。これにより、UDPのデータ通信を行うことができる状態となる。   In the standard UDP of FIG. 17A, both the host A and the host B have UDP open applications. When the host B application opens UDP, a UDP open process (see step S124 in FIG. 15 and FIG. 18) is started. Also, when the host A application opens UDP, the UDP open process is similarly started. As a result, the UDP data communication can be performed.

また、データはホストA、ホストBの何れも発生することはできるが、図17(a)では、ブロードキャスト通信ということもあって、ホストA側からホストB側に一方向的にデータが流れる図としている。データを受信したホストB側からACK(肯定応答)を返さないため、送達確認とデータの保証をする機能は持たない。なお、データをブロードキャストする場合には、IPアドレスのサブネットアドレスをオール1にすることで、データをブロードキャストすることが可能となる。   In addition, although data can be generated by either host A or host B, in FIG. 17 (a), data flows in one direction from the host A side to the host B side due to broadcast communication. It is said. Since ACK (acknowledgment) is not returned from the host B side that received the data, it does not have a function of confirming delivery and guaranteeing the data. When broadcasting data, it is possible to broadcast data by setting the subnet address of the IP address to all 1.

次に、図17(b)のUDPsecによる暗号化通信について説明する。この場合も、ホストA、ホストBともにアプリケーションがUDPオープンし、TCP2がUDPsecでオープンとしている。
ホストBがUDPsecオープンをすると、UDPsecオープン処理(図15のステップS125及び図19)を開始する。また、ホストAがUDPsecオープンしても同様に、UDPsecオープン処理を開始する。これにより、UDPsecのデータ通信を行うことができる状態となる。
Next, encrypted communication by UDPsec in FIG. 17B will be described. Also in this case, both the host A and the host B are open for UDP, and TCP2 is open for UDPsec.
When the host B opens UDPsec, the UDPsec open process (step S125 in FIG. 15 and FIG. 19) is started. Similarly, even if the host A opens UDPsec, the UDPsec open process is started. As a result, the UDPsec data communication can be performed.

図17(b)示すように、ホストAのアプリケーションからUDPのブロードキャストデータ(IPアドレスがブロードキャストを示しているデータ)の送信要求があった場合を説明する。アプリケーションからUDPのブロードキャストデータの送信要求を受け取ると、ネゴをしないで、UDPsecで暗号データとして不特定ホストに配信する。ホストBは、ブロードキャストデータを受け取ると、後述する図19のステップS141のUDPsecブロードキャスト受信開始処理を開始する。ホストAとホストB間でネゴシエーションを開始し、相手が正しい相手であれば、ネゴシエーションを完了して、ブロードキャストデータを復号化して、アプリケーションへ送る。このとき、データを受信した側からACK(肯定応答)を返さないため、送達確認とデータの保証をする機能はない。   As shown in FIG. 17B, a case will be described where there is a transmission request for UDP broadcast data (data whose IP address indicates broadcast) from the application of the host A. When a UDP broadcast data transmission request is received from an application, it is delivered to an unspecified host as encrypted data by UDPsec without being negotiated. When the host B receives the broadcast data, the host B starts a UDPsec broadcast reception start process in step S141 in FIG. Negotiation is started between the host A and the host B. If the other party is the correct party, the negotiation is completed, and the broadcast data is decoded and sent to the application. At this time, since an ACK (acknowledgment) is not returned from the data receiving side, there is no function for confirming delivery and guaranteeing data.

次に、図18に基づいて、図15のステップS124の標準UDPのオープン処理について説明する。
図18は、UDPのオープン処理の流れ図であり、この処理は図15のステップS124で、処理するプロトコルがUDPと決定した場合に開始される処理である。
Next, the standard UDP open process in step S124 of FIG. 15 will be described with reference to FIG.
FIG. 18 is a flowchart of the UDP open process. This process is started when it is determined in step S124 in FIG. 15 that the protocol to be processed is UDP.

最初に、アプリケーションからの送信要求、又は受信パケットを待ち、送信要求又はパケットを受信したときに、パケットの解析を行う(ステップS127)。ここで、受信パケットだけでなく送信要求も解析するのは、悪意を持った第三者が送信するホストA踏み台にして、ホストAを加害者として不特定多数に通信することを防ぐためである。この送受信パケットの解析を行った後に、正しいパケットであるかどうか、つまりDoS攻撃におけるUDPプロトコル攻撃パターンでないかどうかを判断する(ステップS128)。この判断ステップS128において、不正パケットであると判定された場合には、パケットを廃棄し(ステップS129)、次のパケットを待つ。   First, it waits for a transmission request or a received packet from the application, and when a transmission request or packet is received, the packet is analyzed (step S127). Here, the reason why the transmission request as well as the received packet is analyzed is to prevent the host A from being transmitted to an unspecified number of persons as the perpetrator by using the host A platform transmitted by a malicious third party. . After analyzing the transmitted / received packet, it is determined whether the packet is a correct packet, that is, whether the packet is not a UDP protocol attack pattern in a DoS attack (step S128). If it is determined in this determination step S128 that the packet is an illegal packet, the packet is discarded (step S129), and the next packet is awaited.

判断ステップS128で正しいパケットであると判定された場合は、UDPデータの送受信処理が行われ(ステップS130)、続いて上位アプリケーションからUDPのクローズ要求があったかどうかが判断される(ステップS131)。上位アプリケーションよりUDPクローズ要求があった場合には、UDPオープン処理を終了する(ステップS132)。   If it is determined in step S128 that the packet is correct, UDP data transmission / reception processing is performed (step S130), and it is then determined whether a UDP close request has been received from the higher-level application (step S131). If there is a UDP close request from the host application, the UDP open process is terminated (step S132).

次に、図19に基づいて、図15のステップS125のUDPsecのオープン処理について説明する。図19は、UDPsecのオープンにおける処理の流れ図であり、図15のステップS125に示すように、処理するプロトコルがUDPsecと決定した場合にこの処理が開始される。   Next, the UDPsec open process in step S125 of FIG. 15 will be described with reference to FIG. FIG. 19 is a flowchart of processing in opening UDPsec, and this processing is started when the protocol to be processed is determined to be UDPsec as shown in step S125 of FIG.

最初に、アプリケーションからの送信要求又は受信パケットを待ち、送信要求又は受信したパケットの解析が行われる(ステップS133)。次に、上位アプリケーションからの送信要求あるいは送受信パケットが正しいUDPパケットであるか否か、つまりDoS攻撃におけるTCPプロトコル攻撃パターンでないかどうかを判断する(ステップS134)。判断ステップS134において正しいUDPパケットではないと判断された場合は、パケットを廃棄し(ステップS135)、次のパケットを待つ。   First, the transmission request or received packet from the application is waited for, and the transmission request or received packet is analyzed (step S133). Next, it is determined whether or not the transmission request or transmission / reception packet from the upper application is a correct UDP packet, that is, whether or not it is a TCP protocol attack pattern in the DoS attack (step S134). If it is determined in step S134 that the packet is not a correct UDP packet, the packet is discarded (step S135), and the next packet is awaited.

判断ステップS134において、正しいUDPパケットであると判定された場合は、次にUDPsecネゴシエーションがなされた受信パケットであるか否かが判断される(ステップS136)。   If it is determined in the determination step S134 that the packet is a correct UDP packet, it is then determined whether or not the received packet has undergone a UDPsec negotiation (step S136).

そして、この結果、UDPsecのネゴシエーションパケットであると判断された場合は、後述する図23で示すUDPsecユニキャスト受信開始処理が行われ(ステップS137)、ステップS147へ進む。
また、判断ステップS136において、UDPsecのネゴシエーションパケットではないと判断されると、続いてブロードキャスト通信であるか否かを判断する(ステップS138)。そして、ブロードキャスト通信であると判定された場合は、通信の開始パケットであるか、つまりオープン後の最初の通信パケットであるか否かを判断し(ステップS139)、開始パケットでない場合は図22で説明するUDPsecデータ送受信処理を行う(ステップS144)。判断ステップS139において通信の開始パケットであると判定された場合は、次に送信パケットであるか否かが判断される(ステップS140)。そして、この結果、送信パケットであれば、上述したUDPsecデータ送受信処理が行われる(ステップS144)が、送信パケットではないと判定された場合は、後述する図20のUDPsecブロードキャスト受信開始処理が実施される(ステップS141)。この受信開始処理の後で、送信されたパケットが正しい相手からのものであるかどうかを判断する(ステップS142)。そして、判断ステップS142で、送信されたパケットが正しい相手からのものではないと判断されると、パケットを廃棄し(ステップS143)、次のパケットを待つ。判断ステップS142で、正しい相手であると判定された場合には、図22で示すUDPsecデータ送受信処理が行われる(ステップS144)。
As a result, if it is determined that the packet is a UDPsec negotiation packet, a UDPsec unicast reception start process shown in FIG. 23 described later is performed (step S137), and the process proceeds to step S147.
If it is determined in the determination step S136 that the packet is not a UDPsec negotiation packet, it is subsequently determined whether the communication is broadcast communication (step S138). If it is determined that the communication is broadcast communication, it is determined whether it is a communication start packet, that is, the first communication packet after opening (step S139). The UDPsec data transmission / reception process to be described is performed (step S144). If it is determined in the determination step S139 that it is a communication start packet, it is next determined whether or not it is a transmission packet (step S140). As a result, if it is a transmission packet, the above-described UDPsec data transmission / reception process is performed (step S144). If it is determined that the packet is not a transmission packet, a UDPsec broadcast reception start process of FIG. 20 described later is performed. (Step S141). After this reception start process, it is determined whether or not the transmitted packet is from the correct partner (step S142). If it is determined in decision step S142 that the transmitted packet is not from the correct partner, the packet is discarded (step S143) and the next packet is awaited. If it is determined in the determination step S142 that the partner is the correct partner, the UDPsec data transmission / reception process shown in FIG. 22 is performed (step S144).

また、判断ステップS138において、ブロードキャスト通信でない、すなわちユニキャスト通信であると判定された場合は、通信の開始パケット、すなわちオープン後の最初の通信パケットであるか否かが判断される(ステップS145)。この結果、開始パケットではないと判断された場合には、図22で詳述するUDPsecデータ送受信処理がなされる(ステップS144)。   If it is determined in the determination step S138 that the communication is not broadcast communication, that is, unicast communication, it is determined whether or not it is a communication start packet, that is, the first communication packet after opening (step S145). . As a result, when it is determined that the packet is not a start packet, the UDPsec data transmission / reception process detailed in FIG. 22 is performed (step S144).

また、判断ステップS145で、オープン後の最初の通信パケットであると判断された場合は、図21で後述するUDPsecユニキャスト送信開始処理が行われる(ステップS146)。その後、通信の相手が、正しい相手であるかを判断し(ステップS147)、正しい相手である場合には、引き続きUDPsecデータ送受信処理がなされ(ステップS144)、正しい相手ではないと判定された場合には、受信したパケットを廃棄し(ステップS148)、ステップS133に戻って次のパケットを待つ。   If it is determined in the determination step S145 that the communication packet is the first communication packet after opening, a UDPsec unicast transmission start process described later with reference to FIG. 21 is performed (step S146). Thereafter, it is determined whether the communication partner is the correct partner (step S147). If the communication partner is the correct partner, the UDPsec data transmission / reception process is continued (step S144). Discards the received packet (step S148), returns to step S133, and waits for the next packet.

次に、図19のステップS141のUDPsecブロードキャスト受信の開始における処理について、図20に示す流れ図に基づいて説明する。
最初に、ブロードキャストを配信してきた相手の情報を自コンピュータが保有しているか否かを判断する(ステップS149)。そして、情報を保有していない場合には、本システムをインストールする際に使用した、インストールサーバから相手情報を取得する(ステップS150)。または、第三者認証のサーバから情報を取得する。この取得する情報は、相手のTCP2のID、ユーザID、パスワード、バイオメトリックス情報、機器固有情報、LAN接続機器情報等の内、1つ、若しくは、複数を使用する。次に、ブロードキャストを配信してきた相手が正しい相手であるかどうかを判断する(ステップS151)。そして、正しい相手であると判断されれば、UDPsecでの受信が可能であることになり、UDPsecブロードキャストの通信開始処理を終了し(ステップS153)、受信可能であることを図19のステップS142へ指示する。判断ステップS151で正しい相手ではないとされた場合には、通信の拒否を行い(ステップS152)、データを取得しない旨を同じく図19のステップS142へ指示する。なお、ステップS149で仮に相手方に関する取得情報があったとしても有効期限、若しくは、有効使用回数を超えている場合には、改めてステップS150で相手情報の取得動作を行ったほうがよい。
Next, processing at the start of UDPsec broadcast reception in step S141 in FIG. 19 will be described based on the flowchart shown in FIG.
First, it is determined whether or not the own computer holds information on the partner to whom the broadcast has been distributed (step S149). If the information is not held, the partner information is acquired from the installation server used when installing the system (step S150). Alternatively, information is acquired from a third-party authentication server. As the information to be acquired, one or more of the other party's TCP2 ID, user ID, password, biometrics information, device specific information, LAN connection device information, and the like are used. Next, it is determined whether or not the partner to whom the broadcast has been distributed is the correct partner (step S151). If it is determined that the communication partner is correct, UDPsec reception is possible, the UDPsec broadcast communication start processing is terminated (step S153), and reception is possible (step S142 in FIG. 19). Instruct. If it is determined in the determination step S151 that the partner is not a correct partner, the communication is rejected (step S152), and an instruction is given to the step S142 in FIG. Even if there is acquisition information about the other party in step S149, if the expiration date or the number of effective uses is exceeded, it is better to perform the other party information acquisition operation in step S150.

次に、図19のステップS146のUDPsecユニキャスト送信開始処理について、図21に示す流れ図に基づいて説明する。
最初に、送信する相手の情報を自コンピュータが保有しているか否かを確認する(ステップS154)。そして、情報を保有していない場合には、図20のステップS150と同様な方法で相手情報を取得する(ステップS155)。この取得する情報も図20の場合と同じである。
Next, the UDPsec unicast transmission start process in step S146 of FIG. 19 will be described based on the flowchart shown in FIG.
First, it is confirmed whether or not the own computer holds the information of the other party to be transmitted (step S154). If the information is not held, the partner information is acquired by the same method as step S150 in FIG. 20 (step S155). This acquired information is also the same as in the case of FIG.

次に、送信する相手が正しい相手であるかどうかを判断する(ステップS156)。そして、正しい相手であると判断されれば、UDPsecでの送信が可能であることになり、UDPsecユニキャストの通信開始処理を終了し(ステップS158)、送信可能であることを図19のステップS147へ指示する。判断ステップS156で正しい相手ではないとされた場合には、通信の拒否を行い(ステップS157)、データを取得しない旨を図19のステップS147へ指示する。   Next, it is determined whether or not the transmission partner is a correct partner (step S156). If it is determined that the communication partner is correct, UDPsec transmission is possible, and the UDPsec unicast communication start process is terminated (step S158), indicating that transmission is possible, step S147 in FIG. To instruct. If it is determined in the determination step S156 that the partner is not correct, the communication is rejected (step S157), and an instruction is given to the step S147 in FIG. 19 that data is not acquired.

次に、図22に基づいて、図19のステップS144に示すUDPsecデータの送受信処理について説明する。
最初に、ホストAのアプリケーションから送信要求があったか否かを判断する(ステップS159)。送信要求があれば送信側ホストAにおいてデータを暗号化し(ステップS160)、この暗号化したデータに認証データが付加されて(ステップS161)、受信側ホストBに暗号化され認証データが付加されたパケットが送信される(ステップS162)。
Next, UDPsec data transmission / reception processing shown in step S144 of FIG. 19 will be described with reference to FIG.
First, it is determined whether or not there is a transmission request from the application of the host A (step S159). If there is a transmission request, the data is encrypted at the sending host A (step S160), the authentication data is added to the encrypted data (step S161), and the encrypted data is added to the receiving host B. A packet is transmitted (step S162).

次に、受信側ホストBで、受信データがあるか否かが判断され(ステップS163)、受信データがある場合には、受信データの復号化が行われる(ステップS164)。次に、この受信され復号化されたデータが正しいデータであるかどうかが判断される(ステップS165)。この判断は、復号化したデータと受信された認証データとを確認することによって行われるが、復号データを確認した結果、正しいデータでないと判定された場合には、UDP/UDPsecを強制的に切断する(ステップS166)。判断ステップS165で、復号化したデータが正しいデータであると判定された場合には、受信データの取り込み、すなわち上位プロトコルスタックへのデータの配達が行われ(ステップS167)、UDPsecのデータ送受信処理が完了する(ステップS168)。   Next, the receiving host B determines whether or not there is received data (step S163). If there is received data, the received data is decoded (step S164). Next, it is determined whether the received and decoded data is correct data (step S165). This determination is made by confirming the decrypted data and the received authentication data. If it is determined that the decrypted data is not correct, the UDP / UDPsec is forcibly disconnected. (Step S166). If it is determined in the determination step S165 that the decrypted data is correct data, the received data is fetched, that is, the data is delivered to the upper protocol stack (step S167), and the UDPsec data transmission / reception process is performed. Completion (step S168).

次に、図23の流れ図に基づいて、図19のステップS137に示すUDPsecユニキャスト受信の開始処理について説明する。
最初に、ユニキャストで受信したパケットの相手情報を自コンピュータが保有しているか否かを判断する(ステップS169)。相手情報を持っていない場合には、本システムをインストールする際に使用した、インストールサーバあるいは第三者認証のサーバから相手情報を取得する(ステップS170)。取得する情報としては、図20のステップS150あるいは図21のステップS155と同じであり、相手のTCP2のID、ユーザID、パスワード、バイオメトリックス情報、機器固有情報、LAN接続機器情報等の内、1つ、若しくは、複数がこれに相当する。
Next, the UDPsec unicast reception start process shown in step S137 of FIG. 19 will be described based on the flowchart of FIG.
First, it is determined whether or not the own computer holds the partner information of the packet received by unicast (step S169). If it does not have the partner information, the partner information is acquired from the installation server or third-party authentication server used when installing this system (step S170). The information to be acquired is the same as step S150 in FIG. 20 or step S155 in FIG. 21, and includes 1 of the other party's TCP2 ID, user ID, password, biometrics information, device specific information, LAN connection device information, etc. One or more correspond to this.

次に、ユニキャストを送信してきた相手が正しい相手であるか否かを判断する(ステップS171)。正しい相手であると判定されれば、UDPsecでの受信が可能であることを図19のステップS147へ伝えてUDPsecブロードキャスト通信開始処理を終了する(ステップS173)。判断ステップS171で正しい相手ではないと判断された場合には、データを取得しない旨を図19のステップS147へ伝え、通信を拒否する(ステップS172)。   Next, it is determined whether or not the partner that has transmitted the unicast is the correct partner (step S171). If it is determined that it is a correct partner, it is notified to the step S147 in FIG. 19 that reception by UDPsec is possible, and the UDPsec broadcast communication start process is ended (step S173). If it is determined in the determination step S171 that the partner is not a correct partner, the fact that data is not acquired is notified to the step S147 in FIG. 19 and communication is rejected (step S172).

以上、本発明の第1の実施形態であるTCPsecを用いた暗号化処理及び本発明の第2の実施形態であるUDPsecを用いた暗号化処理について流れ図及びシーケンス図に基づいて詳しく説明した。   The encryption processing using TCPsec according to the first embodiment of the present invention and the encryption processing using UDPsec according to the second embodiment of the present invention have been described in detail above based on the flowcharts and sequence diagrams.

次に、本発明のTCP2が、従来のIPsecあるいはSSLと比べて如何に優位であるかという点について、24に基づいて説明する。   Next, how the TCP2 of the present invention is superior to the conventional IPsec or SSL will be described based on 24. FIG.

SSLでは対応が困難であった、クライアント−クライアント間の通信、TCP/IPプロトコルへのDoS攻撃、全てのUDPポートあるいはTCPポートのセキュアな通信、ソケットプログラムを変更しなければならなかったアプリケーションでの制限などに、TCP2は完全に対応している。   It was difficult to handle with SSL, client-client communication, DoS attack on TCP / IP protocol, secure communication of all UDP ports or TCP ports, and applications that had to change socket programs TCP2 is fully compatible with restrictions and the like.

また、IPsecでは対応が困難であった、エラーが多発する劣悪な環境下での通信、異なったLAN間での通信、複数キャリア経由の接続、PPPモバイル環境、ADSL環境での通信に対しても、TCP2は完全にサポートしている。
さらに、本発明のTCP2によれば、モバイル環境下やADSL環境下でVoIP(Voice over Internet Protocol)を使ったインターネットに対しても対応可能である。
Also, it is difficult to cope with IPsec, communication in a poor environment with frequent errors, communication between different LANs, connection via multiple carriers, communication in PPP mobile environment, ADSL environment TCP2 is fully supported.
Furthermore, according to TCP2 of the present invention, it is possible to cope with the Internet using VoIP (Voice over Internet Protocol) in a mobile environment or an ADSL environment.

また、異なったLAN間や複数キャリアにまたがったLAN間でVoIPを使ったインターネット電話に対しても、IPsecとSSLでは対応不可能であったが、本発明のTCP2によれば完全に対応することができる。   Also, Internet telephones using VoIP between different LANs or between LANs spanning multiple carriers could not be handled by IPsec and SSL. However, according to TCP2 of the present invention, it can be completely supported. Can do.

図24は、TCP2の優位性を説明するための図であるが、セキュリティのないプロトコルスタック(a)に、従来のSSLを適用したケース(b)と、IPsecを適用したケース(c)と、本発明のTCP2(TCPsec/UDPsec)を適用したケース(d)を比較して示している。図24(b)のSSLは既に述べたように、セッション層(第5層)のソケットに設けられているので、上位のアプリケーションに対する互換性がないのである。このため、SSL自体、上述のような問題を抱えることになっている。また図24(c)のIPsecは、ネットワーク層(第3層)にあり、IP層での互換性がないため、ネットワークを構成する上で上述したような様々な制約を受けることになる。これに対して、図24(d)のTCP2(TCPsec/UDPsec)は、トランスポート層(第4層)に導入する暗号化技術であり、このためアプリケーションから見るとソケットをそのまま利用することができ、またネットワークから見るとIPもそのまま利用できるのでネットワークを構成する上での制約は受けない。   FIG. 24 is a diagram for explaining the superiority of TCP2, but a case (b) in which conventional SSL is applied to a protocol stack (a) without security, a case (c) in which IPsec is applied, A case (d) in which TCP2 (TCPsec / UDPsec) of the present invention is applied is shown in comparison. As described above, the SSL in FIG. 24B is provided in the socket of the session layer (fifth layer), so that it is not compatible with the upper application. For this reason, SSL itself has the above-mentioned problems. In addition, since IPsec in FIG. 24C is in the network layer (third layer) and is not compatible with the IP layer, it is subject to various restrictions as described above in configuring the network. On the other hand, TCP2 (TCPsec / UDPsec) in FIG. 24 (d) is an encryption technology introduced into the transport layer (fourth layer), and therefore, the socket can be used as it is from the viewpoint of the application. Also, when viewed from the network, the IP can be used as it is, so there are no restrictions on configuring the network.

以上のように、本発明のTCP2を用いた暗号化通信システム、暗号化通信方法は、既存の暗号化処理システムに比べても、特にデータの漏洩、改ざん、なりすまし、進入そして攻撃に対して極めて高いセキュリティ機能を有するものである。
なお、本発明は、以上説明した実施の形態に限定されるものではなく、特許請求項に記載した本発明の要旨を逸脱しない範囲において、さらに多くの実施形態を含むものであることは言うまでもない。
As described above, the encrypted communication system and the encrypted communication method using the TCP2 according to the present invention are extremely resistant to data leakage, falsification, impersonation, entry, and attack even compared to the existing encryption processing system. It has a high security function.
The present invention is not limited to the embodiments described above, and it goes without saying that the present invention includes more embodiments without departing from the gist of the present invention described in the claims.

本発明の通信システムに用いられるTCP2のプロトコルスタックを示す図である。It is a figure which shows the protocol stack of TCP2 used for the communication system of this invention. 本発明のTCP2を用いた通信システムの第1の実施形態(TCPsecによるECアプリケーション)におけるシステムの全体構成図である。1 is an overall configuration diagram of a system in a first embodiment (EC application using TCPsec) of a communication system using TCP2 of the present invention. 本発明のTCP2を用いた通信システムの第2の実施形態(UDPsecによる放送アプリケーション)におけるシステムの全体構成図である。It is a whole block diagram of the system in 2nd Embodiment (broadcast application by UDPsec) of the communication system using TCP2 of this invention. 本発明のTCP2の中の3つのプロトコルスタックのパケット構造とその暗号化範囲及び認証範囲を示す図である。(a)、(b)(c)は、それぞれTCPsec/IPsec、TCPsec/IP、UDPsec/IPのパケット構造、及び各暗号化範囲、完全性認証の適用範囲を示す図である。It is a figure which shows the packet structure of the three protocol stacks in TCP2 of this invention, its encryption range, and an authentication range. (A), (b), (c) is a figure which shows the packet structure of TCPsec / IPsec, TCPsec / IP, UDPsec / IP, each encryption range, and the application range of integrity authentication, respectively. 本発明のTCP2の実施形態であるTCP/TCPsecパッシブオープンの処理を示す流れ図である。It is a flowchart which shows the process of the TCP / TCPsec passive open which is embodiment of TCP2 of this invention. 本発明のTCP2の実施形態であるTCP/TCPsecアクティブオープンの処理を示す流れ図である。It is a flowchart which shows the process of the TCP / TCPsec active open which is embodiment of TCP2 of this invention. 標準TCPと本発明のTCPsecのホストA(アクティブオープン)とホストB(パッシブオープン)間の通信のやり取りを示すシーケンス図である。It is a sequence diagram which shows the exchange of communication between host A (active open) and host B (passive open) of standard TCP and TCPsec of the present invention. 図5のTCPパッシブオープン処理S5の詳細を示す流れ図である。6 is a flowchart showing details of TCP passive open processing S5 of FIG. 5. 図5のTCPsecパッシブオープン処理S6の詳細を示す流れ図である。It is a flowchart which shows the detail of the TCPsec passive open process S6 of FIG. 図6のTCPアクティブオープン処理S12の詳細を示す流れ図である。It is a flowchart which shows the detail of TCP active open process S12 of FIG. 図6のTCPsecアクティブオープン処理S13の詳細を示す流れ図である。It is a flowchart which shows the detail of the TCPsec active open process S13 of FIG. 図9のTCPsec送受信処理S37及び図11のTCPsec送受信処理S76の詳細を示す流れ図である。12 is a flowchart showing details of TCPsec transmission / reception processing S37 in FIG. 9 and TCPsec transmission / reception processing S76 in FIG. 図9のTCPsecパッシブ接続処理S48の詳細を示す流れ図である。10 is a flowchart showing details of the TCPsec passive connection processing S48 of FIG. 図11のTCPsecアクティブ接続処理S88の詳細を示す流れ図である。12 is a flowchart showing details of TCPsec active connection processing S88 of FIG. 本発明のTCP2の実施形態であるUDP/UDPsecオープンの処理を示す流れ図である。It is a flowchart which shows the process of UDP / UDPsec open which is embodiment of TCP2 of this invention. 本発明のTCP2を用いたUDP/UDPsecユニキャスト通信のシーケンス図である。It is a sequence diagram of UDP / UDPsec unicast communication using TCP2 of the present invention. 本発明のTCP2を用いたUDP/UDPsecブロードキャスト通信のシーケンス図である。It is a sequence diagram of UDP / UDPsec broadcast communication using TCP2 of the present invention. 図15のUDPオープン処理S124の詳細を示す流れ図である。It is a flowchart which shows the detail of UDP open process S124 of FIG. 図15のUDPsecオープン処理S125の詳細を示す流れ図である。It is a flowchart which shows the detail of UDPsec open process S125 of FIG. 図19のUDPsecブロードキャスト受信開始処理S141の詳細を示す流れ図である。It is a flowchart which shows the detail of UDPsec broadcast reception start process S141 of FIG. 図19のUDPsecユニキャスト送信開始処理S146の詳細を示す流れ図である。It is a flowchart which shows the detail of UDPsec unicast transmission start process S146 of FIG. 図19のUDPsecデータ送受信処理S144の詳細を示す流れ図である。It is a flowchart which shows the detail of UDPsec data transmission / reception process S144 of FIG. 図19のUDPsecユニキャスト受信開始処理S137の詳細を示す流れ図である。It is a flowchart which shows the detail of UDPsec unicast reception start process S137 of FIG. 本発明のTCP2を従来のIPsec又はSSLを適用した場合と比較したメリットを説明するための図である。It is a figure for demonstrating the advantage compared with the case where the conventional IPsec or SSL is applied to TCP2 of this invention.

符号の説明Explanation of symbols

1・・・ホストコンピュータ、
2・・・ネットワーク制御機器(ルータ)
3a、3b、3c・・・クライアント端末
4a、4b、4c・・・クライアント端末
11・・・NICドライバ
12・・・ARP 又は ARP on CP
13・・・IPエミュレータ
13b・・・IPsec on CP
15・・・TCPエミュレータ
15b・・・TCPsec on CP
16・・・UDPエミュレータ
16b・・・UDPsec on CP
17・・・ソケット(Socket)
41・・・IPヘッダ
42・・・ESPヘッダ
43・・・TCPヘッダ
44・・・TCPsec付加情報
45・・・データ(ペイロード)
46・・・TCPsec付加トレーラ
47・・・TCPsec付加認証データ
48・・・ESPトレーラ
49・・・ESP認証データ
1 ... Host computer
2. Network control device (router)
3a, 3b, 3c ... client terminal 4a, 4b, 4c ... client terminal 11 ... NIC driver 12 ... ARP or ARP on CP
13 ... IP emulator 13b ... IPsec on CP
15 ... TCP emulator 15b ... TCPsec on CP
16: UDP emulator 16b: UDPsec on CP
17 ... Socket
41 ... IP header 42 ... ESP header 43 ... TCP header 44 ... TCPsec additional information 45 ... data (payload)
46 ... TCPsec additional trailer 47 ... TCPsec additional authentication data 48 ... ESP trailer 49 ... ESP authentication data

Claims (1)

トランスポート層に位置するTCP又はUDPプロトコルに暗号化機能を追加して複数のホスト間で通信を行う暗号化通信システムであって、
通信相手が正当な権限を有する通信相手であるかどうかを判断した後に通信相手との接続を行うための接続シーケンス手段と、
通信路の両端で対応する暗号化及び復号化ロジックを取り決める取決め手段と、
前記取決め手段により取り決めた暗号化ロジックに従って、前記複数のホスト間で送受信する情報のパケットを暗号化して送信するプロトコル暗号化手段と、
前記取決め手段により取り決めた復号化ロジックに従って前記複数のホスト間で送受信する情報のパケットを復号化するプロトコル復号化手段と、を備え、
前記接続シーケンス手段は、未知のオプションを排除するネットワーク環境にも対応できるように、第1のホストから第2のホストへの接続要求及び第2のホストから第1のホストへの接続応答を送信する際に、TCP接続ヘッダにフラグを付加するとともに、ペイロードにTCP2固有情報又は緊急データを付加し、前記第1のホストと前記第2のホスト間で暗号化通信に必要な鍵を交換するとともに、相手方ホストが前記暗号化通信を行う権限を有することを確認するための暗号化したネゴシエーションデータを交換し、
前記取決め手段は、前記接続シーケンス手段が正当な権限を有すると判断して接続した通信相手とのみ前記トランスポート層の前記TCP又はUDPプロトコルを用いて前記暗号化及び復号化ロジックに基づいた通信を行い、
前記プロトコル暗号化手段は、前記送受信される情報のパケットのうち前記TCP又はUDPプロトコルのペイロードを暗号化して送信し、
前記プロトコル復号化手段は、前記送受信される情報のパケットのうち前記暗号化されたプロトコルのペイロードを復号化する
ことを特徴とする暗号化通信システム。
An encryption communication system for performing communication between a plurality of hosts by adding an encryption function to a TCP or UDP protocol located in a transport layer,
A connection sequence means for making a connection with the communication partner after determining whether the communication partner is a communication partner having a legitimate authority;
Arranging means for negotiating corresponding encryption and decryption logic at both ends of the communication path;
Protocol encryption means for encrypting and transmitting packets of information to be transmitted and received between the plurality of hosts according to the encryption logic decided by the agreement means;
Protocol decoding means for decoding packets of information transmitted and received between the plurality of hosts according to the decoding logic decided by the agreement means;
The connection sequence means transmits a connection request from the first host to the second host and a connection response from the second host to the first host so that it can cope with a network environment that excludes unknown options. In addition, a flag is added to the TCP connection header, TCP2-specific information or emergency data is added to the payload, and a key necessary for encrypted communication is exchanged between the first host and the second host. , Exchange encrypted negotiation data to confirm that the other host has authority to perform the encrypted communication,
The agreement means only performs communication based on the encryption and decryption logic using the TCP or UDP protocol of the transport layer only with a communication partner that is determined that the connection sequence means has a legitimate authority. Done
The protocol encryption means encrypts and transmits the payload of the TCP or UDP protocol among the packets of information to be transmitted and received,
The encryption communication system, wherein the protocol decryption means decrypts the payload of the encrypted protocol in the packet of information to be transmitted / received.
JP2006159984A 2006-06-08 2006-06-08 Encrypted communication system Pending JP2007329751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006159984A JP2007329751A (en) 2006-06-08 2006-06-08 Encrypted communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006159984A JP2007329751A (en) 2006-06-08 2006-06-08 Encrypted communication system

Publications (1)

Publication Number Publication Date
JP2007329751A true JP2007329751A (en) 2007-12-20

Family

ID=38929916

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006159984A Pending JP2007329751A (en) 2006-06-08 2006-06-08 Encrypted communication system

Country Status (1)

Country Link
JP (1) JP2007329751A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006101339A (en) * 2004-09-30 2006-04-13 Kyocera Corp Data communication apparatus

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006101339A (en) * 2004-09-30 2006-04-13 Kyocera Corp Data communication apparatus

Similar Documents

Publication Publication Date Title
JP3783142B2 (en) Communication system, communication device, communication method, and communication program for realizing the same
US7353380B2 (en) Method and apparatus for providing secure streaming data transmission facilities using unreliable protocols
WO2008007432A1 (en) Relay device
JP4855147B2 (en) Client device, mail system, program, and recording medium
JP2004295891A (en) Method for authenticating packet payload
Chen et al. Secure communication channel establishment: TLS 1.3 (over TCP fast open) versus QUIC
JP2007329750A (en) Encrypted communication system
JP4866150B2 (en) FTP communication system, FTP communication program, FTP client device, and FTP server device
JP4757088B2 (en) Relay device
JP2007329751A (en) Encrypted communication system
Aboba et al. RFC3579: RADIUS (Remote Authentication Dial In User Service) Support For Extensible Authentication Protocol (EAP)
JP4783665B2 (en) Mail server device
JP2007324726A (en) File share server apparatus, client apparatus, printer, file share system, and file share program
JP2008060817A (en) Communication system, web server device, client device, communication program for performing communication, and recording medium recording the program
JP2007019633A (en) Relay connector device and semiconductor circuit device
JP2006295401A (en) Relaying apparatus
KR20110087972A (en) Method for blocking abnormal traffic using session table
JP2007019632A (en) Communication board and communication method
KR20090032072A (en) Relay device

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20080313

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20090507

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20090515

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090608

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090624

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20101216

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110107

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111129

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120424