JP5423228B2 - Communication apparatus and communication system - Google Patents

Communication apparatus and communication system Download PDF

Info

Publication number
JP5423228B2
JP5423228B2 JP2009186710A JP2009186710A JP5423228B2 JP 5423228 B2 JP5423228 B2 JP 5423228B2 JP 2009186710 A JP2009186710 A JP 2009186710A JP 2009186710 A JP2009186710 A JP 2009186710A JP 5423228 B2 JP5423228 B2 JP 5423228B2
Authority
JP
Japan
Prior art keywords
packet
terminal
sequence information
transmission
message
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.)
Expired - Fee Related
Application number
JP2009186710A
Other languages
Japanese (ja)
Other versions
JP2011041008A (en
Inventor
隆史 磯部
聡 堤
康一郎 瀬戸
健次 青島
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.)
Hitachi Metals Ltd
Original Assignee
Hitachi Metals Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Metals Ltd filed Critical Hitachi Metals Ltd
Priority to JP2009186710A priority Critical patent/JP5423228B2/en
Publication of JP2011041008A publication Critical patent/JP2011041008A/en
Application granted granted Critical
Publication of JP5423228B2 publication Critical patent/JP5423228B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、通信装置及び通信システムに係り、特に、メッセージ処理を高速化する通信装置及び通信システムに関する。
本発明は、例えば、サーバとクライアントの間に設置され、サーバから受信した平文データを暗号化してクライアントに送信し、クライアントから受信した暗号データを復号化してサーバに送信する通信装置を用いて、サーバの暗号化通信のための演算処理を肩代わりすると共に、サーバとクライアントとの間の暗号化通信を高速化するための技術に関する。
The present invention relates to a communication device and a communication system, and more particularly, to a communication device and a communication system that speed up message processing.
The present invention is, for example, installed between a server and a client, using a communication device that encrypts plain text data received from the server and transmits the encrypted data to the client, and decrypts encrypted data received from the client and transmits the encrypted data to the server. The present invention relates to a technique for taking over computation processing for encrypted communication of a server and speeding up encrypted communication between a server and a client.

インターネットを通じた商取引拡大を背景に,TLS(Transport Layer Security)/SSL(Secure Socket Layer)を利用した暗号化通信のニーズが高まっている。
暗号化通信は,サーバと多数のクライアントの間で実施される。サーバに接続するクライアントの数が多くなり,送受信するデータ量が増加すると,サーバへの演算負荷が高まり,処理速度が低下するという課題があった。
そこで、サーバに代わって暗号化通信を終端し,高速にデータを暗号・復号化する機能から成るTLS/SSLオフローダ機能を,サーバ前段に配置する通信装置に追加して,サーバの処理速度を向上させる必要がでてきた。
TLSオフローダ機能付き通信装置として、例えば、特許文献1のようなプロトコル処理装置が用いられる。
本プロトコル処理装置では、全パケットが受信バッファに蓄積される。
With the expansion of commercial transactions through the Internet, there is an increasing need for encrypted communication using TLS (Transport Layer Security) / SSL (Secure Socket Layer).
Encrypted communication is performed between the server and a number of clients. As the number of clients connected to the server increases and the amount of data to be transmitted and received increases, the computation load on the server increases and the processing speed decreases.
Therefore, the TLS / SSL offloader function, which consists of a function for terminating encrypted communication on behalf of the server and encrypting / decrypting data at high speed, is added to the communication device placed in the front stage of the server to improve server processing speed. It was necessary to let them.
As a communication device with a TLS offloader function, for example, a protocol processing device as in Patent Document 1 is used.
In this protocol processing apparatus, all packets are stored in the reception buffer.

特開2007−215013号公報JP 2007-215031 A

図1に、TLS/SSLオフローダ機能付き通信装置の概要を示す。
TLS/SSLオフローダ機能付き通信装置(以下、オフローダ)100は、サーバ101とクライアント102の間に配置される。
サーバ101とオフローダ100の間には、通常のTCPコネクションが作成される。クライアント102とオフローダ100の間には、SSLセッション104が作成され、その中に複数のTCPコネクションおよびTLS/SSLコネクションが作成される。
オフローダ100は、クライアント102とサーバ101との間で、TCPのハンドシェーク処理を仲介する。クライアントからのSYNパケット(接続要求パケット)をサーバ101に送信してから、サーバからのSYN−ACKパケット(接続要求受取り確認応答パケット)をクライアント102に送信し、更に、クライアントからのACKパケットをサーバ101に送信する。
TCPコネクション確立のシーケンスが完了すると、クライアントとの間でTLS/SSLコネクション確立のシーケンス処理を、オフローダ100がサーバに代わって実行する。
TLS/SSLコネクション確立のシーケンス処理では、まず初めに、クライアント102からClient Helloメッセージ(利用可能な暗号方式の候補を複数指定)を含むパケットが、サーバに向けて送信される。
オフローダは、Client Helloパケットを受け取ると、Server Helloメッセージ(利用する暗号方式を1つ指定)と、公開鍵を含むCertificateメッセージと、Server Hello Doneメッセージを含むパケットをクライアント102に送信する。
FIG. 1 shows an outline of a communication apparatus with a TLS / SSL offloader function.
A communication device with a TLS / SSL offloader function (hereinafter, “offloader”) 100 is disposed between a server 101 and a client 102.
A normal TCP connection is created between the server 101 and the offloader 100. An SSL session 104 is created between the client 102 and the offloader 100, and a plurality of TCP connections and TLS / SSL connections are created therein.
The offloader 100 mediates TCP handshake processing between the client 102 and the server 101. After a SYN packet (connection request packet) from the client is transmitted to the server 101, a SYN-ACK packet (connection request receipt confirmation response packet) from the server is transmitted to the client 102, and an ACK packet from the client is further transmitted to the server. 101.
When the TCP connection establishment sequence is completed, the offloader 100 executes TLS / SSL connection establishment sequence processing with the client instead of the server.
In the sequence processing for establishing a TLS / SSL connection, first, a packet including a Client Hello message (a plurality of usable encryption method candidates are specified) is transmitted from the client 102 to the server.
When the offloader receives the Client Hello packet, the offloader transmits to the client 102 a packet including a Server Hello message (designating one encryption method to be used), a Certificate message including a public key, and a Server Hello Done message.

クライアントは、上記パケットを受信すると、秘密鍵となるプリマスターシークレットを生成し、公開鍵を用いて暗号化する。更に、暗号化したマスターシークレットを含むKeyExchangeメッセージと、暗号化通信の開始を通知するChangeCipherSpecメッセージと、これまでのメッセージをベリファイするためのFinishedメッセージを含むパケットをサーバ101に向けて送信する。なお、KeyExchangeメッセージと、ChangeCipherSpecメッセージと、Finishedメッセージは、同一のパケットに含まれる場合と、別々のパケットに含まれる場合がある。
オフローダ100は、上記パケットを受け取ると、暗号化通信の開始を通知するChangeCipherSpecメッセージと、これまでのメッセージをベリファイするためのFinishedメッセージを含むパケットをクライアント102に向けて送信する。
以上記載したTLS/SSLコネクション確立のシーケンスが完了すると、TLS/SSLによる暗号化通信が開始される。
なお、クライアントが、もう一つ別のTLS/SSLコネクションを作成する際には、TCPのハンドシェークを行った上で、すでに合意した暗号方式と、すでにやり取りしたマスターシークレットを再利用する旨(以降、セッションの再利用と呼ぶ)を指定したClient Helloメッセージを、サーバ101に向けて送信する。
オフローダ100は、セッションの再利用を指定するClient Helloメッセージ付パケットを受信すると、Server Helloメッセージ(利用する暗号方式を1つ指定)と、暗号化通信の開始を通知するChangeCipherSpecメッセージと、これまでのメッセージをベリファイするためのFinishedメッセージを含むパケットをクライアントに向けて送信する。公開鍵を含むCertificateメッセージは送信されない。
上記パケットを受け取ったクライアントは、暗号化通信の開始を通知するChangeCipherSpecメッセージと、これまでのメッセージをベリファイするためのFinishedメッセージを含むパケットをサーバ101に向けて送信する。なお、ChangeCipherSpecメッセージと、Finishedメッセージは、同一のパケットに含まれる場合と、別々のパケットに含まれる場合がある。
When the client receives the packet, it generates a premaster secret that is a secret key and encrypts it using the public key. Furthermore, a key exchange message including the encrypted master secret, a change cipher spec message for notifying start of encrypted communication, and a packet including a finished message for verifying the previous message are transmitted to the server 101. Note that the KeyExchange message, the ChangeCipherSpec message, and the Finished message may be included in the same packet or in different packets.
When the offloader 100 receives the packet, the offloader 100 transmits, to the client 102, a packet including a ChangeCipherSpec message that notifies the start of encrypted communication and a Finished message for verifying the previous message.
When the TLS / SSL connection establishment sequence described above is completed, encrypted communication by TLS / SSL is started.
When the client creates another TLS / SSL connection, it performs TCP handshake and reuses the already agreed encryption method and the master secret that has already been exchanged (hereinafter, A Client Hello message designating "Reuse session" is sent to the server 101.
When the offloader 100 receives a packet with a client hello message that specifies session reuse, the server hello message (specifies one encryption method to be used), a change cipher spec message that notifies the start of encrypted communication, A packet including a Finished message for verifying the message is transmitted to the client. A Certificate message containing the public key is not sent.
The client that has received the packet transmits to the server 101 a packet including a ChangeCipherSpec message that notifies the start of encrypted communication and a Finished message for verifying the previous message. Note that the ChangeCipherSpec message and the Finished message may be included in the same packet or in different packets.

オフローダ100が上記Finishedメッセージを含むパケットを受け取ると、TLS/SSLコネクションが確立し、暗号化通信が開始される。
TLS/SSLによる暗号化通信では、クライアントからの暗号化パケットが、オフローダ100によって復号化され、平文パケットがサーバ101に向けて送信される。また、サーバからの平文パケットが、オフローダによって復号化され、暗号化パケットがクライアント102に向けて送信される。
暗号化通信が完了すると、オフローダ100は、TCPコネクションのクローズシーケンスを仲介する。クライアント102からのFIN−ACKパケット(接続切断要求)をサーバ101に送信してから、サーバ101からのFIN−ACKパケット(接続切断要求への応答)をクライアント102に送信し、更に、クライアント102からのACKパケットをサーバ101に送信する。
When the offloader 100 receives a packet including the Finished message, a TLS / SSL connection is established and encrypted communication is started.
In encrypted communication using TLS / SSL, an encrypted packet from a client is decrypted by the offloader 100 and a plaintext packet is transmitted to the server 101. Further, the plaintext packet from the server is decrypted by the offloader, and the encrypted packet is transmitted to the client 102.
When the encrypted communication is completed, the offloader 100 mediates a TCP connection closing sequence. After the FIN-ACK packet (connection disconnection request) from the client 102 is transmitted to the server 101, the FIN-ACK packet (response to the connection disconnection request) from the server 101 is transmitted to the client 102. ACK packet is transmitted to the server 101.

以下に、上記TLS/SSLのシーケンスを、従来型の汎用CPUを用いた装置において処理する場合の課題について述べる。
上記装置では、汎用CPU上で、TCP/IPレイヤの処理を行うTCP/IPレイヤ処理プロセスと、TLS/SSLレイヤの処理を行うTLS/SSLメッセージ処理プロセスが実行されている。
TCP/IPレイヤ処理プロセスは、TCP/IPコネクションが生成される毎に、対となるTLS/SSLメッセージ処理プロセスと送信バッファと受信バッファを生成し、受信パケットが含むメッセージをすべて、TLS/SSLメッセージ処理プロセス毎に用意された受信バッファに蓄積する。
TLS/SSLメッセージ処理プロセスは、受信バッファのメッセージを1つずつ読みだして、シーケンシャルに処理を行う。
また、TLS/SSLメッセージ処理プロセスが生成した返信メッセージは全て、プロセス毎に確保された送信バッファに蓄積される。TCP/IPレイヤ処理プロセスは、送信バッファのメッセージをTCP/IPヘッダでカプセル化して、パケットを送信する。
なお、汎用CPU上のTLS/SSLメッセージ処理プロセスが行う処理の一部を、外部に接続した暗号アクセラレータが肩代わりするケースもある。この場合は、TLS/SSLメッセージ中の一部の暗号化された鍵データや、暗号化データや、平文データや、改竄チェック用のMAC値が、暗号アクセラレータとの間でやりとりされる。
In the following, problems in processing the TLS / SSL sequence in an apparatus using a conventional general-purpose CPU will be described.
In the above apparatus, a TCP / IP layer processing process for performing TCP / IP layer processing and a TLS / SSL message processing process for performing TLS / SSL layer processing are executed on the general-purpose CPU.
Each time a TCP / IP connection is generated, the TCP / IP layer processing process generates a paired TLS / SSL message processing process, a transmission buffer, and a reception buffer, and all the messages included in the reception packet are included in the TLS / SSL message. It accumulates in a reception buffer prepared for each processing process.
The TLS / SSL message processing process reads the messages in the reception buffer one by one and processes them sequentially.
Further, all reply messages generated by the TLS / SSL message processing process are accumulated in a transmission buffer secured for each process. The TCP / IP layer processing process encapsulates the message in the transmission buffer with a TCP / IP header and transmits the packet.
In some cases, an encryption accelerator connected to the outside takes over part of the processing performed by the TLS / SSL message processing process on the general-purpose CPU. In this case, some encrypted key data, encrypted data, plain text data, and a MAC value for tampering check in the TLS / SSL message are exchanged with the cryptographic accelerator.

なお、改竄チェック用のMAC(Message Authentification Code:メッセージ認証コード)値とは、例えば、暗号化前のメッセージによるハッシュ値を使って計算する値であり、メッセージを受け取った端末が、通信経路上でメッセージが改竄されていないかを判定するために用いられる。
以上述べてきた従来型の汎用CPUを用いた装置では、全てのメッセージデータが、受信バッファと送信バッファを必ず往復する。オフローダ100の性能を向上させるために、送受信するパケット量を増加させると、必要なメモリ容量が増加し高コストとなるだけでなく、メモリ帯域の消費量が増加し、性能が劣化するという課題があった。
Note that the MAC (Message Authentication Code) value for tampering check is a value calculated using, for example, a hash value based on a message before encryption, and the terminal that receives the message on the communication path Used to determine if a message has been tampered with.
In the apparatus using the conventional general-purpose CPU described above, all message data always goes back and forth between the reception buffer and the transmission buffer. Increasing the amount of packets to be transmitted / received to improve the performance of the offloader 100 not only increases the required memory capacity and costs, but also increases the memory bandwidth consumption and degrades the performance. there were.

本発明は、以上の点に鑑み、到着順に誤りのある一部のパケットのみを受信バッファに読み書きすることで、端末が送信した順番にパケットのメッセージ処理を行うことを実現することを目的とする。
また、本発明は、メッセージ単位ではなくパケット単位での処理を実現することを他の目的とする。
また、本発明は、クライアント送信バッファ及び/又はサーバ送信バッファからのパケット読出し回数の抑制を実現することを他の目的とする。
SUMMARY OF THE INVENTION In view of the above, an object of the present invention is to realize message processing of packets in the order of transmission by a terminal by reading / writing only a part of packets having errors in arrival order into / from a reception buffer. .
Another object of the present invention is to realize processing not in units of messages but in units of packets.
Another object of the present invention is to reduce the number of packet reads from the client transmission buffer and / or the server transmission buffer.

本発明は、これらの課題を解決するため、例えば、
TCPコネクション毎に、どこまで受信したかを記録しておくTCP/IPコネクションテーブルと、
TCP/IPコネクションテーブルから、受信パケットに対応するTCP状態を読出し、受信パケットが、受信済みデータの最後尾直後から後続しているか否かを判定するTCP状態遷移判定部と、を備える通信装置において、
端末が、パケットAの後にパケットBを送信し、
パケットAの蓄積はせず、パケットBの到着順がパケットAよりも先になった場合のみ、パケットBを蓄積する受信バッファと、
前記TCP状態遷移判定部が、パケットBがパケットAよりも先に到着したことを検出した場合のみ、パケットBを受信バッファに蓄積するACK不一致パケット処理部と、
メッセージ処理するメッセージ処理部と、
前記メッセージ処理部におけるパケットAの処理終了時に、パケットBが受信バッファに蓄積されている場合に、パケットBを読み出してメッセージ処理部に出力する後続パケット再入力部と、を備え、
到着順に誤りのある一部のパケットのみを受信バッファに読み書きすることで、端末が送信した順番にパケットがメッセージ処理部に到着することを実現する通信装置が提供される。
In order to solve these problems, the present invention provides, for example,
TCP / IP connection table that records how far each TCP connection has received,
In a communication apparatus comprising: a TCP state transition determination unit that reads a TCP state corresponding to a received packet from a TCP / IP connection table and determines whether or not the received packet follows immediately after the end of received data ,
The terminal sends packet B after packet A,
The packet buffer A is not accumulated, and the reception buffer that accumulates the packet B only when the arrival order of the packet B precedes the packet A;
An ACK mismatch packet processing unit that stores the packet B in the reception buffer only when the TCP state transition determination unit detects that the packet B has arrived before the packet A;
A message processing unit for processing messages;
A subsequent packet re-input unit that reads out the packet B and outputs it to the message processing unit when the packet B is accumulated in the reception buffer at the end of processing of the packet A in the message processing unit,
A communication device is provided that realizes that packets arrive at the message processing unit in the order of transmission by the terminal by reading / writing only some of the packets having errors in the arrival order into / from the reception buffer.

また、前記通信装置において、
メッセージ処理部がTLS/SSLメッセージを処理する場合に、
メッセージ処理部に、1つまたは複数または分割されたTLS/SSLメッセージを含むパケットが入力され、どのようなメッセージが含まれるかを判定するための、パケットタイプ判定部を備え、
パケットタイプ判定部の判定結果に基づいて、
入力パケットが、クライアントが送信するハンドシェークメッセージを1つまたは複数含む場合は、受信した1つまたは複数のハンドシェークメッセージに対応するハンドシェークメッセージを含むパケットを作成し、
入力パケットが、サーバが送信する平文データを含むパケットだった場合は、平文データを暗号化したクライアント宛パケットを作成し、
入力パケットが、クライアントが送信する暗号データを含み改竄チェック用のMAC値を含まないパケットだった場合は、暗号データを複号化したサーバ宛パケットと改竄チェック用のMAC値の途中結果を作成し、
入力パケットが、クライアントが送信する暗号データを含み改竄チェック用のMAC値を含むパケットだった場合は、暗号データを複号化したサーバ宛パケットと改竄チェック用のMAC値を作成し、改竄チェック用のMAC値の整合性をチェックすることで、
メッセージ単位ではなくパケット単位での処理を実現する。
In the communication device,
When the message processor processes TLS / SSL messages,
A packet type determining unit for determining what kind of message is included when a packet including one or a plurality of divided TLS / SSL messages is input to the message processing unit;
Based on the determination result of the packet type determination unit,
If the input packet contains one or more handshake messages sent by the client, create a packet containing a handshake message corresponding to the received one or more handshake messages;
If the input packet is a packet containing plain text data sent by the server, create a packet for the client that encrypts the plain text data,
If the input packet is a packet that includes encrypted data sent by the client and does not include a MAC value for falsification check, it creates an intermediate result of the packet addressed to the server that decrypted the encrypted data and the MAC value for falsification check. ,
If the input packet is a packet that includes encrypted data sent by the client and includes a MAC value for falsification check, create a packet addressed to the server that decrypts the encrypted data and a MAC value for falsification check. By checking the consistency of the MAC value of
Implement processing in units of packets rather than in units of messages.

更に、前記通信装置において、
メッセージ処理部が作成したクライアント宛パケットをACK未受信の情報と共に蓄積するクライアント向け送信バッファと、
クライアントから応答ACKを受信したときに、前記クライアント向け送信バッファの対応するパケットのACK未受信の情報をACK応答済みの情報に変更し、
重複ACKを受信したときに、前記クライアント向け送信バッファの対応するパケットを読み出して再送するクライアント送信ACK処理部を備えることで、
クライアント送信バッファからのパケット読出し回数の抑制を実現する。
Furthermore, in the communication device,
A transmission buffer for the client that accumulates packets addressed to the client created by the message processing unit together with ACK unreceived information;
When a response ACK is received from the client, the ACK unreceived information of the corresponding packet in the transmission buffer for the client is changed to ACK responded information,
By including a client transmission ACK processing unit that reads and retransmits a corresponding packet in the transmission buffer for the client when a duplicate ACK is received,
Realizes suppression of the number of packet reads from the client transmission buffer.

更に、前記通信装置において、
サーバ宛パケットをACK未受信およびベリファイ未完了の情報と共に蓄積するサーバ向け送信バッファと、
TLS/SSLメッセージ処理部から、改竄チェック用のMAC値を含まない復号化済みパケットを受け取ったときに、ACK未受信およびベリファイ未完了の情報と共に前記送信バッファに蓄積し、
TLS/SSLメッセージ処理部から、正しい改竄チェック用のMAC値を含む復号化済みパケットを受け取ったときに、前記送信バッファに蓄積したベリファイ未完了のパケットをベリファイ完了とした上で読み出して送信してから、正しい改竄チェック用のMAC値を含む復号化済みパケットを送信し、
TLS/SSLメッセージ処理部から、誤った改竄チェック用のMAC値を含む復号化済みパケットを受け取ったときに、前記送信バッファに蓄積したベリファイ未完了のパケットを消去するサーバ向け平文パケット作成部と、
サーバから、応答ACKを受信したときに、前記サーバ向け送信バッファの対応するパケットのACK未受信の情報をACK受信済みに変更し、
サーバから、重複ACKを受信したときに、前記サーバ向け送信バッファの対応するパケットを読み出して再送するサーバACK処理部と、を備えることで、
サーバ送信バッファからのパケット読出し回数の抑制を実現する。
Furthermore, in the communication device,
A transmission buffer for the server that accumulates packets addressed to the server together with ACK unreceived and unverified information;
When a decrypted packet that does not include a MAC value for tampering check is received from the TLS / SSL message processing unit, it is stored in the transmission buffer together with information indicating that ACK has not been received and verification has not been completed,
When a decrypted packet including a correct falsification check MAC value is received from the TLS / SSL message processing unit, an unverified packet accumulated in the transmission buffer is read out and transmitted after being verified. To send a decrypted packet containing the correct tamper check MAC value,
A plaintext packet creation unit for a server for erasing unverified packets accumulated in the transmission buffer when a decrypted packet including an erroneous MAC value for tampering check is received from a TLS / SSL message processing unit;
When a response ACK is received from the server, the ACK unreceived information of the corresponding packet in the server transmission buffer is changed to ACK received,
A server ACK processing unit that, when receiving a duplicate ACK from the server, reads and retransmits the corresponding packet in the transmission buffer for the server,
Realizes the suppression of the packet read count from the server transmission buffer.

本発明の第1の解決手段によると、
クライアント端末とサーバ端末との間に設置され、前記サーバ端末から受信した平文データを暗号化して前記クライアント端末に送信し、前記クライアント端末から受信した暗号データを復号化して前記サーバ端末に送信するために、暗号化通信のコネクション確立シーケンスを前記サーバ端末に代わって実行するための通信装置において、
端末識別情報に対応して、端末が通信装置に送信してきたデータ量を表すための値である第1端末シーケンス情報と、端末が送信してきたデータのうち、実際に通信装置が受信して確認応答を端末に返信したデータ量を表す第1確認シーケンス情報と、通信装置が端末に送信したデータ量を表すための値である第2端末シーケンス情報と、通信装置が実際に端末からの確認応答を受信済みのデータ量である第2確認シーケンス情報と、を含むコネクション状態データを記憶し、コネクション毎にどこまで受信したかを記録するためのコネクション状態テーブルと、
パケットの到着順が逆転した場合に、後に到着すべきパケットをパケットヘッダと共に蓄積するための受信バッファと、
前記コネクション状態テーブルから、受信パケットに対応するコネクション状態を読出し、受信パケットが、受信済みデータの最後尾直後から後続しているか否かを判定し、パケットの到着順が逆転した場合に、後に到着すべきパケットをパケットヘッダと共に前記受信バッファに蓄積するためのパケット処理部と
を備え、

前記パケット処理部は、
端末から、送信元識別情報、送信シーケンス情報、宛先シーケンス情報、ペイロード長を含む、暗号化通信のコネクション確立のための第1の受信パケットを受信し、
前記コネクション状態テーブルを参照し、前記第1の受信パケットの送信元識別情報が一致するコネクション状態データを求め、
該コネクション状態データについて、前記端末からの前記第1の受信パケットの送信シーケンス情報Aと、第1確認シーケンス情報Aが一致する場合、第1端末シーケンス情報Aにペイロード長Lを加算して A+L に更新し、第1確認シーケンス情報Aにペイロード長Lを加算して A+L に更新し、シーケンス情報 A+L を宛先シーケンス情報としたペイロード長0の第1の送信パケットを、前記端末に向けて送信し、
一方、前記端末から、送信シーケンス情報 A+L 及びペイロード長Lの第2の受信パケットが送られたが、該第2の受信パケットを受信する前に、続けて前記端末から送信された、送信シーケンス情報 A+2L 及びペイロード長Lの第3の受信パケットを受信したとき、
前記コネクション状態テーブルを参照し、前記第3の受信パケットに含まれる送信シーケンス情報 A+2L と、第1確認シーケンス情報のシーケンス情報 A+L が異なる場合、該第3のパケットのペイロード長が0より大きければ該第3の受信パケットを前記受信バッファに蓄積し、該第3の受信パケットに含まれる送信シーケンス情報 A+2L を、第1端末シーケンス情報として前記コネクション状態テーブルを更新し、第1確認シーケンス情報のシーケンス情報 A+L を宛先シーケンス情報としたペイロード長0の第2の送信パケットを作成し、該第2の送信パケットを前記端末に向けて送信し、
前記端末は、前記第2の送信パケットを受け取ると、宛先シーケンス情報 A+L により、前記第2の受信パケットが前記通信装置で受信されていないことを判定することにより、前記端末から、送信シーケンス情報を A+L 及びペイロード長Lの前記第2の受信パケット又は前記第2の受信パケットと同じ内容の第4の受信パケットを受信し、
前記コネクション状態テーブルを参照し、前記第2又は第4の受信パケットの送信シーケンス情報 A+L と、第1確認シーケンス情報のシーケンス情報 A+L が一致することを確認すると、第1確認シーケンス情報 A+L に、前記第4の受信パケットのペイロード長Lを加算して A+2L に更新し、シーケンス情報 A+2L を宛先シーケンス情報としたペイロード長0の第3の送信パケットを作成し、該第3の送信パケットを前記端末に向けて送信する
前記通信装置が提供される。
According to the first solution of the present invention,
Installed between a client terminal and a server terminal, for encrypting plain text data received from the server terminal and transmitting it to the client terminal, and for decrypting encrypted data received from the client terminal and transmitting to the server terminal In a communication device for executing a connection establishment sequence for encrypted communication on behalf of the server terminal,
Corresponding to the terminal identification information, the communication device actually receives and confirms the first terminal sequence information, which is a value for representing the amount of data transmitted from the terminal to the communication device, and the data transmitted from the terminal. First confirmation sequence information indicating the amount of data sent back to the terminal as a response, second terminal sequence information that is a value representing the amount of data transmitted from the communication device to the terminal, and the confirmation response from the terminal that the communication device actually transmits A connection status table for storing the connection status data including the second confirmation sequence information, which is the amount of data that has been received, and recording how far each connection has been received,
A reception buffer for accumulating packets that should arrive later together with the packet header when the arrival order of the packets is reversed;
Reads the connection status corresponding to the received packet from the connection status table, determines whether the received packet follows immediately after the end of the received data, and arrives later when the packet arrival order is reversed. A packet processing unit for accumulating packets to be received in the reception buffer together with a packet header ,

The packet processing unit
Receiving from the terminal a first received packet for establishing a connection for encrypted communication, including source identification information, transmission sequence information, destination sequence information, and payload length;
Referring to the connection state table, obtain connection state data that matches the source identification information of the first received packet,
For the connection status data, when the transmission sequence information A of the first received packet from the terminal and the first confirmation sequence information A match, the payload length L is added to the first terminal sequence information A to A + L Update, add the payload length L to the first confirmation sequence information A to update to A + L, and send the first transmission packet with the payload length 0 with the sequence information A + L as the destination sequence information to the terminal,
On the other hand, the transmission sequence information A + L and the second reception packet having the payload length L are transmitted from the terminal, but the transmission sequence information is transmitted from the terminal in succession before receiving the second reception packet. When a third received packet with A + 2L and payload length L is received,
Referring to the connection state table, when the transmission sequence information A + 2L included in the third received packet is different from the sequence information A + L of the first confirmation sequence information, if the payload length of the third packet is greater than 0, The third reception packet is accumulated in the reception buffer, the connection state table is updated using transmission sequence information A + 2L included in the third reception packet as first terminal sequence information, and sequence information of the first confirmation sequence information Creating a second transmission packet having a payload length of 0 with A + L as destination sequence information, and transmitting the second transmission packet to the terminal;
When the terminal receives the second transmission packet, the terminal determines transmission sequence information from the terminal by determining that the second reception packet is not received by the communication device based on destination sequence information A + L. Receiving the second received packet of A + L and payload length L or the fourth received packet having the same content as the second received packet;
Referring to the connection state table and confirming that the transmission sequence information A + L of the second or fourth received packet matches the sequence information A + L of the first confirmation sequence information, the first confirmation sequence information A + L The payload length L of the fourth received packet is added and updated to A + 2L, a third transmission packet with a payload length of 0 is generated with the sequence information A + 2L as the destination sequence information, and the third transmission packet is sent to the terminal There is provided the communication device for transmitting to.

本発明の第2の解決手段によると、
クライアント端末とサーバ端末との間に設置され、前記サーバ端末から受信した平文データを暗号化して前記クライアント端末に送信し、前記クライアント端末から受信した暗号データを復号化して前記サーバ端末に送信するために、暗号化通信のコネクション確立シーケンスを前記サーバ端末に代わって実行するための通信装置において、
端末識別情報に対応して、端末が通信装置に送信してきたデータ量を表すための値である第1端末シーケンス情報と、端末が送信してきたデータのうち、実際に通信装置が受信して確認応答を端末に返信したデータ量を表す第1確認シーケンス情報と、通信装置が端末に送信したデータ量を表すための値である第2端末シーケンス情報と、通信装置が実際に端末からの確認応答を受信済みのデータ量である第2確認シーケンス情報と、を含むコネクション状態データを記憶し、コネクション毎にどこまで受信したかを記録するためのコネクション状態テーブルと、
パケットの到着順が逆転した場合に、後に到着すべきパケットをパケットヘッダと共に蓄積するための受信バッファと、
前記コネクション状態テーブルから、受信パケットに対応するコネクション状態を読出し、受信パケットが、受信済みデータの最後尾直後から後続しているか否かを判定し、パケットの到着順が逆転した場合に、後に到着すべきパケットをパケットヘッダと共に前記受信バッファに蓄積するためのパケット処理部と
を備え、

前記パケット処理部は、
端末へ、送信元識別情報、送信シーケンス情報、宛先シーケンス情報、ペイロード長を含む、暗号化通信のコネクション確立のための第1の送信パケットを送信し、
前記コネクション状態テーブルを参照し、前記第1のパケットの送信元識別情報が一致するコネクション状態データを求め、
該コネクション状態データについて、ペイロード長Lの前記第1の送信パケットの送信シーケンス情報Bと、第2端末シーケンス情報Bが一致する場合、第2端末シーケンス情報Bにペイロード長Lを加算して B+L に更新し、
前記第1の送信パケットに応答して、前記端末から、宛先シーケンス情報を B+L としたペイロード長0の第1の受信パケットを受け取ると、前記コネクション状態テーブルの第2確認シーケンス情報に、前記第1の受信パケットに含まれる宛先シーケンス情報 B+L を記憶し、

一方、前記端末に向けて、前記コネクション状態テーブルを参照し、第2端末シーケンス情報と同じ送信シーケンス情報 B+L 及びペイロード長Lの第2の送信パケットを送り、第2端末シーケンス情報 B+L に、第2の送信パケットのペイロード長Lを加算して、B+2L に更新し、
続けて、第2端末シーケンス情報と同じ送信シーケンス情報 B+2L を持つペイロード長Lの第3の送信パケットを送り、第2端末シーケンス情報 B+2L に、該第3の送信パケットのペイロード長Lを加算し、B+3L に更新し、
前記端末は、前記第2の送信パケットを受け取る前に前記第3の送信パケットを受け取った場合、送信シーケンス情報 B+2L より、その前の前記第2の送信パケットが受信できなかったことを判定することにより、前記端末から送信された、前記第2の送信パケットの再送を促すため、宛先シーケンス情報を B+L としたペイロード長0の第2の受信パケットを受信し、
前記コネクション状態テーブルを参照し、前記第2の受信パケット又は該第2の受信パケットと同じ内容のパケットを、所定回数連続して受信した場合、前記第2の送信パケットが途中で廃棄されてしまったことを判定し、送信シーケンス情報 B+L 及びペイロード長Lの前記第2の送信パケットを再送又は前記第2の送信パケットと同じ内容の第4の送信パケットを送信し、
前記第2又は第4の送信パケットに応答して、前記端末から、宛先シーケンス情報を B+3L としたペイロード長0の第3の受信パケットを受信する
前記通信装置が提供される。
According to the second solution of the present invention,
Installed between a client terminal and a server terminal, for encrypting plain text data received from the server terminal and transmitting it to the client terminal, and for decrypting encrypted data received from the client terminal and transmitting to the server terminal In a communication device for executing a connection establishment sequence for encrypted communication on behalf of the server terminal,
Corresponding to the terminal identification information, the communication device actually receives and confirms the first terminal sequence information, which is a value for representing the amount of data transmitted from the terminal to the communication device, and the data transmitted from the terminal. First confirmation sequence information indicating the amount of data sent back to the terminal as a response, second terminal sequence information that is a value representing the amount of data transmitted from the communication device to the terminal, and the confirmation response from the terminal that the communication device actually transmits A connection status table for storing the connection status data including the second confirmation sequence information, which is the amount of data that has been received, and recording how far each connection has been received,
A reception buffer for accumulating packets that should arrive later together with the packet header when the arrival order of the packets is reversed;
Reads the connection status corresponding to the received packet from the connection status table, determines whether the received packet follows immediately after the end of the received data, and arrives later when the packet arrival order is reversed. A packet processing unit for accumulating packets to be received in the reception buffer together with a packet header ,

The packet processing unit
Transmitting a first transmission packet for establishing a connection for encrypted communication, including transmission source identification information, transmission sequence information, destination sequence information, and payload length, to the terminal;
Referring to the connection state table, obtain connection state data that matches the source identification information of the first packet;
For the connection status data, when the transmission sequence information B of the first transmission packet having the payload length L matches the second terminal sequence information B, the payload length L is added to the second terminal sequence information B to B + L Updated,
In response to the first transmission packet, when receiving a first reception packet with a payload length of 0 having destination sequence information B + L from the terminal, the first confirmation sequence information in the connection state table includes the first confirmation sequence information. Destination sequence information B + L included in the received packet of

On the other hand, referring to the connection state table, the second transmission packet having the same transmission sequence information B + L and payload length L as the second terminal sequence information is sent to the terminal, and the second terminal sequence information B + L includes the second transmission packet. Is added to the payload length L of the transmission packet and updated to B + 2L,
Subsequently, a third transmission packet having a payload length L having the same transmission sequence information B + 2L as the second terminal sequence information is sent, and the payload length L of the third transmission packet is added to the second terminal sequence information B + 2L. Update to B + 3L,
When the terminal receives the third transmission packet before receiving the second transmission packet, the terminal determines from the transmission sequence information B + 2L that the previous second transmission packet has not been received. In order to prompt retransmission of the second transmission packet transmitted from the terminal, a second received packet having a payload length of 0 with destination sequence information B + L is received,
If the second reception packet or a packet having the same content as the second reception packet is continuously received a predetermined number of times with reference to the connection state table, the second transmission packet is discarded in the middle. Retransmit the second transmission packet with transmission sequence information B + L and payload length L or transmit a fourth transmission packet with the same content as the second transmission packet,
In response to the second or fourth transmission packet, the communication apparatus is provided that receives a third reception packet having a payload length of 0 with destination sequence information B + 3L from the terminal.

本発明の第3の解決手段によると、
クライアント端末とサーバ端末との間に設置され、前記サーバ端末から受信した平文データを暗号化して前記クライアント端末に送信し、前記クライアント端末から受信した暗号データを復号化して前記サーバ端末に送信するために、暗号化通信のコネクション確立シーケンスを前記サーバ端末に代わって実行するための通信装置を備えた通信システムにおいて、
前記通信装置は、
端末識別情報に対応して、端末が通信装置に送信してきたデータ量を表すための値である第1端末シーケンス情報と、端末が送信してきたデータのうち、実際に通信装置が受信して確認応答を端末に返信したデータ量を表す第1確認シーケンス情報と、通信装置が端末に送信したデータ量を表すための値である第2端末シーケンス情報と、通信装置が実際に端末からの確認応答を受信済みのデータ量である第2確認シーケンス情報と、を含むコネクション状態データを記憶し、コネクション毎にどこまで受信したかを記録するためのコネクション状態テーブルと、
パケットの到着順が逆転した場合に、後に到着すべきパケットをパケットヘッダと共に蓄積するための受信バッファと、
前記コネクション状態テーブルから、受信パケットに対応するコネクション状態を読出し、受信パケットが、受信済みデータの最後尾直後から後続しているか否かを判定し、パケットの到着順が逆転した場合に、後に到着すべきパケットをパケットヘッダと共に前記受信バッファに蓄積するためのパケット処理部と
を備え、

前記パケット処理部は、
端末から、送信元識別情報、送信シーケンス情報、宛先シーケンス情報、ペイロード長を含む、暗号化通信のコネクション確立のための第1の受信パケットを受信し、
前記コネクション状態テーブルを参照し、前記第1の受信パケットの送信元識別情報が一致するコネクション状態データを求め、
該コネクション状態データについて、前記端末からの前記第1の受信パケットの送信シーケンス情報Aと、第1確認シーケンス情報Aが一致する場合、第1端末シーケンス情報Aにペイロード長Lを加算して A+L に更新し、第1確認シーケンス情報Aにペイロード長Lを加算して A+L に更新し、シーケンス情報 A+L を宛先シーケンス情報としたペイロード長0の第1の送信パケットを、前記端末に向けて送信し、
一方、前記端末から、送信シーケンス情報 A+L 及びペイロード長Lの第2の受信パケットが送られたが、該第2の受信パケットを受信する前に、続けて前記端末から送信された、送信シーケンス情報 A+2L 及びペイロード長Lの第3の受信パケットを受信したとき、
前記コネクション状態テーブルを参照し、前記第3の受信パケットに含まれる送信シーケンス情報 A+2L と、第1確認シーケンス情報のシーケンス情報 A+L が異なる場合、該第3のパケットのペイロード長が0より大きければ該第3の受信パケットを前記受信バッファに蓄積し、該第3の受信パケットに含まれる送信シーケンス情報 A+2L を、第1端末シーケンス情報として前記コネクション状態テーブルを更新し、第1確認シーケンス情報のシーケンス情報 A+L を宛先シーケンス情報としたペイロード長0の第2の送信パケットを作成し、該第2の送信パケットを前記端末に向けて送信し、
前記端末は、前記第2の送信パケットを受け取ると、宛先シーケンス情報 A+L により、前記第2の受信パケットが前記通信装置で受信されていないことを判定することにより、前記端末から、送信シーケンス情報を A+L 及びペイロード長Lの前記第2の受信パケット又は前記第2の受信パケットと同じ内容の第4の受信パケットを受信し、
前記コネクション状態テーブルを参照し、前記第2又は第4の受信パケットの送信シーケンス情報 A+L と、第1確認シーケンス情報のシーケンス情報 A+L が一致することを確認すると、第1確認シーケンス情報 A+L に、前記第4の受信パケットのペイロード長Lを加算して A+2L に更新し、シーケンス情報 A+2L を宛先シーケンス情報としたペイロード長0の第3の送信パケットを作成し、該第3の送信パケットを前記端末に向けて送信する
前記通信システムが提供される。
According to the third solution of the present invention,
Installed between a client terminal and a server terminal, for encrypting plain text data received from the server terminal and transmitting it to the client terminal, and for decrypting encrypted data received from the client terminal and transmitting to the server terminal In addition, in a communication system including a communication device for executing a connection establishment sequence for encrypted communication on behalf of the server terminal,
The communication device
Corresponding to the terminal identification information, the communication device actually receives and confirms the first terminal sequence information, which is a value for representing the amount of data transmitted from the terminal to the communication device, and the data transmitted from the terminal. First confirmation sequence information indicating the amount of data sent back to the terminal as a response, second terminal sequence information that is a value representing the amount of data transmitted from the communication device to the terminal, and the confirmation response from the terminal that the communication device actually transmits A connection status table for storing the connection status data including the second confirmation sequence information, which is the amount of data that has been received, and recording how far each connection has been received,
A reception buffer for accumulating packets that should arrive later together with the packet header when the arrival order of the packets is reversed;
Reads the connection status corresponding to the received packet from the connection status table, determines whether the received packet follows immediately after the end of the received data, and arrives later when the packet arrival order is reversed. A packet processing unit for accumulating packets to be received in the reception buffer together with a packet header ,

The packet processing unit
Receiving from the terminal a first received packet for establishing a connection for encrypted communication, including source identification information, transmission sequence information, destination sequence information, and payload length;
Referring to the connection state table, obtain connection state data that matches the source identification information of the first received packet,
For the connection status data, when the transmission sequence information A of the first received packet from the terminal and the first confirmation sequence information A match, the payload length L is added to the first terminal sequence information A to A + L Update, add the payload length L to the first confirmation sequence information A to update to A + L, and send the first transmission packet with the payload length 0 with the sequence information A + L as the destination sequence information to the terminal,
On the other hand, the transmission sequence information A + L and the second reception packet having the payload length L are transmitted from the terminal, but the transmission sequence information is transmitted from the terminal in succession before receiving the second reception packet. When a third received packet with A + 2L and payload length L is received,
Referring to the connection state table, when the transmission sequence information A + 2L included in the third received packet is different from the sequence information A + L of the first confirmation sequence information, if the payload length of the third packet is greater than 0, The third reception packet is accumulated in the reception buffer, the connection state table is updated using transmission sequence information A + 2L included in the third reception packet as first terminal sequence information, and sequence information of the first confirmation sequence information Creating a second transmission packet having a payload length of 0 with A + L as destination sequence information, and transmitting the second transmission packet to the terminal;
When the terminal receives the second transmission packet, the terminal determines transmission sequence information from the terminal by determining that the second reception packet is not received by the communication device based on destination sequence information A + L. Receiving the second received packet of A + L and payload length L or the fourth received packet having the same content as the second received packet;
Referring to the connection state table and confirming that the transmission sequence information A + L of the second or fourth received packet matches the sequence information A + L of the first confirmation sequence information, the first confirmation sequence information A + L The payload length L of the fourth received packet is added and updated to A + 2L, a third transmission packet with a payload length of 0 is generated with the sequence information A + 2L as the destination sequence information, and the third transmission packet is sent to the terminal There is provided the communication system for transmitting to.

TLS/SSLオフローダの説明図。Explanatory drawing of a TLS / SSL offloader. 本実施の形態の通信装置が、サーバおよびクライアントとやりとりするパケットのシーケンス図(SSLの基本シーケンス)(1)。FIG. 2 is a sequence diagram (SSL basic sequence) of packets exchanged between the communication apparatus of the present embodiment and a server and a client (1). 本実施の形態の通信装置が、サーバおよびクライアントとやりとりするパケットのシーケンス図(SSLの基本シーケンス)(2)。The sequence diagram (SSL basic sequence) of the packet which the communication apparatus of this Embodiment communicates with a server and a client (2). 本実施の形態の通信装置が、サーバおよびクライアントとやりとりするパケットのシーケンス図(SSLコネクション確立の変則シーケンス)(1)。FIG. 3 is a sequence diagram of packets exchanged with a server and a client by the communication apparatus according to the present embodiment (an irregular sequence for establishing an SSL connection) (1). 本実施の形態の通信装置が、サーバおよびクライアントとやりとりするパケットのシーケンス図(SSLコネクション確立の変則シーケンス)(2)。FIG. 6 is a sequence diagram of packets exchanged with a server and a client by the communication apparatus according to the present embodiment (an irregular sequence for establishing an SSL connection) (2). 本実施の形態の通信装置が、サーバおよびクライアントとやりとりするパケットのシーケンス図。The sequence diagram of the packet which the communication apparatus of this Embodiment communicates with a server and a client. 本実施の形態の通信装置が、サーバおよびクライアントとやりとりするパケットのシーケンス図。The sequence diagram of the packet which the communication apparatus of this Embodiment communicates with a server and a client. 本実施の形態の通信装置のアーキテクチャの一例のブロック図。1 is a block diagram of an example of an architecture of a communication device according to an embodiment. 本実施の形態の通信装置の一部のブロック図。FIG. 3 is a block diagram of part of the communication apparatus according to the present embodiment. 本実施の形態の通信装置の一部のブロック図。FIG. 3 is a block diagram of part of the communication apparatus according to the present embodiment. 本実施の形態における通信装置とクライアントとサーバの間でやりとりされるパケットフォーマットの説明図。Explanatory drawing of the packet format exchanged between the communication apparatus in this Embodiment, a client, and a server. 本実施の形態におけるTCPコネクションの状態を格納するテーブルのフォーマットの一例の説明図。Explanatory drawing of an example of the format of the table which stores the state of the TCP connection in this Embodiment. 本実施の形態の通信装置の一部のブロックにおいて行われる処理のフローチャート図。The flowchart figure of the process performed in the one part block of the communication apparatus of this Embodiment. 本実施の形態の通信装置の一部のブロックにおいて行われる処理のフローチャート図。The flowchart figure of the process performed in the one part block of the communication apparatus of this Embodiment. 本実施の形態の通信装置の一部のブロックにおいて行われる処理のフローチャート図。The flowchart figure of the process performed in the one part block of the communication apparatus of this Embodiment. 本実施の形態の通信装置の一部のブロックにおいて行われる処理のフローチャート図。The flowchart figure of the process performed in the one part block of the communication apparatus of this Embodiment. 本実施の形態における通信装置とクライアントとサーバの間でやりとりされるパケットが含むペイロードフォーマットの説明図。Explanatory drawing of the payload format which the packet exchanged between the communication apparatus in this Embodiment, a client, and a server contains. 本実施の形態の通信装置の一部のブロックにおいて行われる処理のフローチャート図。The flowchart figure of the process performed in the one part block of the communication apparatus of this Embodiment. 本実施の形態におけるTLS/SSLコネクションの状態を格納するテーブルのフォーマットの一例の説明図。Explanatory drawing of an example of the format of the table which stores the state of the TLS / SSL connection in this Embodiment. クライアントがペイロード長Lのパケットを送信するときの説明図。Explanatory drawing when a client transmits the packet of the payload length L. FIG. オフローダがクライアントに向けてペイロード長Lのパケットを送信するときの説明図。An explanatory view when an offloader transmits a packet of payload length L toward a client. サーバがペイロード長Lのパケットを送信するときの説明図。Explanatory drawing when a server transmits the packet of the payload length L. FIG. オフローダがサーバに向けてペイロード長Lのパケットを送信するときの説明図。An explanatory view when an offloader transmits a packet of payload length L toward a server. Client Seqと、Acked Client Seqの関係を表す説明図。Explanatory drawing showing the relationship between Client Seq and Acked Client Seq. Seq for Clientと、Acked Seq for Clientの関係を表す説明図。Explanatory drawing showing the relationship between Seq for Client and Acked Seq for Client. Server Seqと、Acked Server Seqの関係を表す説明図。Explanatory drawing showing the relationship between Server Seq and Acked Server Seq. Seq for Serverと、Acked Seq for Serverの関係を表す説明図。Explanatory drawing showing the relationship between Seq for Server and Acked Seq for Server. メッセージ処理部のブロック図。The block diagram of a message processing part.

以下、本発明の実施の形態を、図面を用いて説明する。
1.TLS/SSLコネクション確立シーケンス

まず初めに、図2及び図3に、TLS/SSLコネクション確立までのシーケンス処理(SSLの基本シーケンス)を示す。また、図4及び図5に、TLS/SSLコネクション確立の変則シーケンスを示す。
オフローダ100は、クライアント102とサーバ101との間で、TCPのハンドシェーク処理を仲介する。クライアントからのSYNパケット200をサーバ101に送信してから(201)、サーバからのSYN−ACKパケット202をクライアント102に送信し(203)、更に、クライアントからのACK204パケットをサーバ101に送信(205)する。
TCPコネクション確立のシーケンスが完了すると、クライアントとの間でTLS/SSLコネクション確立のシーケンス処理を、サーバに代わって実行する。
TLS/SSLコネクション確立のシーケンス処理では、まず初めに、クライアント102からClient Helloメッセージ206(利用可能な暗号方式の候補を複数指定)を含むパケットが、サーバに向けて送信される。
オフローダは、Client Helloパケット206を受け取ると、Server Helloメッセージ(利用する暗号方式を1つ指定)と、公開鍵を含むCertificateメッセージと、Server Hello Doneメッセージを含むパケット207をクライアント102に送信する。
クライアントは、上記パケットを受信すると、秘密鍵となるマスターシークレットを生成し、公開鍵を用いて暗号化する。更に、暗号化したマスターシークレットを含むKeyExchangeメッセージと、暗号化通信の開始を通知するChangeCipherSpecメッセージと、これまでのメッセージをベリファイするためのFinishedメッセージを含むパケット208をサーバ101に向けて送信する。なお、図4及び図5の303〜305、309、310、314、315に示すように、KeyExchangeメッセージと、ChangeCipherSpecメッセージと、Finishedメッセージは、同一のパケットに含まれる場合と、別々のパケットに含まれる場合がある。
オフローダ100は、上記パケット208を受け取ると、暗号化通信の開始を通知するChangeCipherSpecメッセージと、これまでのメッセージをベリファイするためのFinishedメッセージを含むパケット209をクライアント102に向けて送信する。
以上記載したTLS/SSLコネクション確立のシーケンスが完了すると、TLS/SSLによる暗号化通信が開始される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
1. TLS / SSL connection establishment sequence

First, FIG. 2 and FIG. 3 show sequence processing (SSL basic sequence) until TLS / SSL connection is established. 4 and 5 show an irregular sequence for establishing a TLS / SSL connection.
The offloader 100 mediates TCP handshake processing between the client 102 and the server 101. After the SYN packet 200 from the client is transmitted to the server 101 (201), the SYN-ACK packet 202 from the server is transmitted to the client 102 (203), and further, the ACK 204 packet from the client is transmitted to the server 101 (205). )
When the TCP connection establishment sequence is completed, the TLS / SSL connection establishment sequence processing with the client is executed on behalf of the server.
In the sequence processing for establishing a TLS / SSL connection, first, a packet including a Client Hello message 206 (a plurality of usable encryption method candidates are specified) is transmitted from the client 102 to the server.
Upon receiving the Client Hello packet 206, the offloader transmits to the client 102 a packet 207 including a Server Hello message (designating one encryption method to be used), a Certificate message including a public key, and a Server Hello Done message.
When the client receives the packet, it generates a master secret that is a secret key and encrypts it using the public key. Further, a packet 208 including a KeyExchange message including the encrypted master secret, a Change CipherSpec message for notifying the start of encrypted communication, and a Finished message for verifying the previous message is transmitted to the server 101. As shown in 303 to 305, 309, 310, 314, and 315 in FIG. 4 and FIG. 5, the KeyExchange message, the ChangeCipherSpec message, and the Finished message are included in the same packet and in separate packets. May be.
When the offloader 100 receives the packet 208, the offloader 100 transmits, to the client 102, a packet 209 including a Change CipherSpec message for notifying the start of encrypted communication and a Finished message for verifying the previous message.
When the TLS / SSL connection establishment sequence described above is completed, encrypted communication by TLS / SSL is started.

TLS/SSLによる暗号化通信では、クライアントからの暗号化パケット213が、オフローダ100によって復号化され、平文パケット214がサーバ101に向けて送信される。また、サーバからの平文パケット216が、オフローダによって復号化され、暗号化パケット215がクライアント102に向けて送信される。
暗号化通信が完了すると、オフローダ100は、TCPコネクションのクローズシーケンスを仲介する。クライアント102からのFIN−ACKパケット217をサーバ101に送信してから(218)、サーバ101からのFIN−ACKパケット220をクライアント102に送信し(219)、更に、クライアント102からのACKパケット221をサーバ101に送信(222)する。
In the encrypted communication by TLS / SSL, the encrypted packet 213 from the client is decrypted by the offloader 100, and the plaintext packet 214 is transmitted to the server 101. Also, the plaintext packet 216 from the server is decrypted by the offloader, and the encrypted packet 215 is transmitted to the client 102.
When the encrypted communication is completed, the offloader 100 mediates a TCP connection closing sequence. A FIN-ACK packet 217 from the client 102 is transmitted to the server 101 (218), a FIN-ACK packet 220 from the server 101 is transmitted to the client 102 (219), and an ACK packet 221 from the client 102 is further transmitted. Transmit (222) to the server 101.

なお、図3に示されるように、クライアントが、もう一つ別のTLS/SSLコネクションを作成する際には、TCPのハンドシェークを行った上で、すでに合意した暗号方式と、すでにやり取りしたマスターシークレットを再利用する旨(以降、セッションの再利用と呼ぶ)を指定したClient Helloメッセージ210を、サーバ101に向けて送信する。
オフローダ100は、セッションの再利用を指定するClient Helloメッセージ付パケット210を受信すると、Server Helloメッセージ(利用する暗号方式を1つ指定)と、暗号化通信の開始を通知するChangeCipherSpecメッセージと、これまでのメッセージをベリファイするためのFinishedメッセージを含むパケット211をクライアントに向けて送信する。公開鍵を含むCertificateメッセージは送信されない。
上記パケットを受け取ったクライアントは、暗号化通信の開始を通知するChangeCipherSpecメッセージと、これまでのメッセージをベリファイするためのFinishedメッセージを含むパケット212をサーバ101に向けて送信する。なお、図5の319、320等に示すように、ChangeCipherSpecメッセージと、Finishedメッセージは、同一のパケットに含まれる場合と、別々のパケットに含まれる場合がある。
オフローダ100が上記パケット212を受け取ると、TLS/SSLコネクションが確立し、暗号化通信が開始される。
As shown in FIG. 3, when another TLS / SSL connection is created by the client, after performing a TCP handshake, the already agreed encryption method and the master secret that has already been exchanged. Is transmitted to the server 101. The client hello message 210 designating that the message is to be reused (hereinafter referred to as session reuse).
When the offloader 100 receives the Client Hello message-added packet 210 that specifies session reuse, the Server Hello message (specifies one encryption method to be used), the ChangeCipherSpec message that notifies the start of encrypted communication, and so far A packet 211 including a Finished message for verifying the message is transmitted to the client. A Certificate message containing the public key is not sent.
The client that has received the packet transmits, to the server 101, a packet 212 including a Change CipherSpec message for notifying the start of encrypted communication and a Finished message for verifying the previous message. As shown in 319, 320, etc. in FIG. 5, the Change CipherSpec message and the Finished message may be included in the same packet or in different packets.
When the offloader 100 receives the packet 212, a TLS / SSL connection is established and encrypted communication is started.

2.オフローダの概要

図8には、本実施の形態のオフローダ800のアーキテクチャを示す。
オフローダ800は、クライアントやサーバ等の装置外部とパケットをやり取りするネットワークインターフェース802と、パケット処理部803と、メモリ805と、を備える。
パケット処理部803は、TCP/IPレイヤ処理部807と、TLS/SSLメッセージ処理部812と、テーブルサイズ/アドレス範囲指定レジスタ806と、暗号アクセラレータ814とを備える。
メモリ805は、TCPの状態を管理するTCPコネクションテーブル808と、ACK不一致の受信パケットのみを蓄積する受信バッファ809と、ACK未受信のクライアント宛パケットを蓄積するクライアント宛送信バッファ810と、MACベリファイが未済みでACK未受信のサーバ向けパケットを蓄積するサーバ宛送信バッファ811と、TLS/SSLの状態を管理するTLS/SSL状態テーブル813を、内部に備える。
TCP/IPレイヤ処理部807と、TLS/SSLメッセージ処理部812は、テーブルサイズ/アドレス範囲指定レジスタ806記載の値に従って、メモリ805のアドレス空間に、TCPコネクションテーブル808と、受信バッファ809と、クライアント宛送信バッファ810と、サーバ宛送信バッファ811と、TLS/SSL状態テーブル813と、の領域を確保する。
図11には、ネットワークインターフェース802が送受信するパケットデータのフォーマットの一例を示す。
パケットデータは、Len1100と、Proto1101と、SIP1102と、DIP1103と、Sport1104と、Dport1105と、SSeq1106と、DSeq1107と、Flag1108と、Others1109と、Payload1110と、DMAC1111と、SMAC1112と、Type1113とを含む。
Len1100は、IP層のパケット長を格納する。Proto1101は、トランスポート層のプロトコルを識別するための識別番号を格納する。SIP1102は、送信元アドレス、すなわち、送信側の端末のアドレスである送信元IPアドレスを格納する。DIP1103は、宛先アドレス、すなわち、受信側の端末のアドレスである宛先IPアドレスを格納する。Sport1104は、TCPの送信元ポートを格納する。Dport1105は、TCPの宛先ポートを格納する。SSeq1106は、送信元シーケンス番号を格納する。DSeq1107は、宛先シーケンス番号を格納する。Flag1108はTCPフラグ番号を格納する。Others1109は、その他のIP/TCPヘッダデータを格納する。Payload1110は、パケットヘッダ以外のデータを格納する。DMAC1111は、物理層の宛先MACアドレスを格納する。SMAC1112は、物理層の送信元MACアドレスを格納する。Type1113は、パケットデータのタイプを表す。なお、MACとは、Media Access Control Frameのことをあらわし、物理層を流れるパケットのことをMACフレームと呼ぶ。SSLのMAC(Message Authentification Code:メッセージ認証コード)とは異なるものである。
2. Offloader overview

FIG. 8 shows the architecture of the offloader 800 of the present embodiment.
The offloader 800 includes a network interface 802 that exchanges packets with the outside of a device such as a client or a server, a packet processing unit 803, and a memory 805.
The packet processing unit 803 includes a TCP / IP layer processing unit 807, a TLS / SSL message processing unit 812, a table size / address range designation register 806, and a cryptographic accelerator 814.
The memory 805 includes a TCP connection table 808 that manages the TCP state, a reception buffer 809 that stores only received packets that do not match ACK, a client transmission buffer 810 that stores packets addressed to clients that have not received ACK, and MAC verification. A server-destined transmission buffer 811 for accumulating packets for servers that have not been received and that have not received ACKs, and a TLS / SSL state table 813 that manages the state of TLS / SSL are provided internally.
The TCP / IP layer processing unit 807 and the TLS / SSL message processing unit 812 are arranged in the address space of the memory 805 according to the values described in the table size / address range designation register 806, the TCP connection table 808, the reception buffer 809, and the client Areas for the destination transmission buffer 810, the server transmission buffer 811, and the TLS / SSL state table 813 are secured.
FIG. 11 shows an exemplary format of packet data transmitted and received by the network interface 802.
The packet data includes Len 1100, Proto 1101, SIP 1102, DIP 1103, Sport 1104, Dport 1105, SSeq 1106, DSeq 1107, Flag 1108, Others 1109, Payload 1110, DMAC 1111, SMAC 1112, and Type 11.
The Len 1100 stores the IP layer packet length. The Proto 1101 stores an identification number for identifying the transport layer protocol. The SIP 1102 stores a transmission source address, that is, a transmission source IP address that is an address of a terminal on the transmission side. The DIP 1103 stores a destination address, that is, a destination IP address that is an address of a receiving terminal. The Sport 1104 stores a TCP transmission source port. The Dport 1105 stores a TCP destination port. The SSeq 1106 stores a transmission source sequence number. The DSeq 1107 stores the destination sequence number. Flag 1108 stores a TCP flag number. Others 1109 stores other IP / TCP header data. Payload 1110 stores data other than the packet header. The DMAC 1111 stores the destination MAC address of the physical layer. The SMAC 1112 stores the transmission source MAC address of the physical layer. Type 1113 represents the type of packet data. Note that the MAC represents a media access control frame, and a packet flowing through the physical layer is referred to as a MAC frame. It is different from the SSL MAC (Message Authentication Code).

また、Payload1110が、最大で3つのTLS/SSLのメッセージを含むことがある。メッセージ長を格納するSSL Len1114/1118/1122と、メッセージタイプを格納するMsg Type1115/1119/1123と、その他のSSLヘッダデータを格納するSSL Others1116/1120/1124と、TLS/SSLメッセージ本体を格納するSSL Message1117/1121/1125とを含む。これらをすべて含む場合もあれば、部分的に含む場合もある。
図12には、オフローダ100がクライアント102およびサーバ101との間で作成するTCPコネクションの状態(以下、TCP状態と呼ぶ)を記録するTCPコネクション状態格納テーブル808の1エントリに記載されるTCP状態のフォーマットの一例を示す。
TCP状態は、クライアントのIPアドレスを格納するClient IP1201と、オフローダがクライアント側に対して公開しているIPアドレスを格納するOffloader IP for Client1202と、クライアント102のTCPのポート番号を格納するClient Port1203と、オフローダ100のクライアント側のTCPのポート番号を格納するPort for Client1204と、クライアントが送信してきたデータのシーケンス番号を格納するClient Seq1205(第1端末シーケンス情報)と、オフローダ100がクライアント側に向けて送信済みのデータのシーケンス番号を格納するSeq for Client1206(第2端末シーケンス情報)と、クライアントの送信済みデータに対してオフローダ100がACKを返信済みのシーケンス番号を格納するAcked Client Seq1207(第1確認シーケンス情報)と、オフローダ100がクライアント側に向けて送信済みのデータに対してクライアントがACKを返信済みのシーケンス番号を格納するAcked Seq for Client1208(第2確認シーケンス情報)と、クライアント102とのTCPコネクションの状態を格納するClient State1209と、サーバのIPアドレスを格納するSerer IP1211と、オフローダがサーバ側に対して公開しているIPアドレスを格納するOffloader IP for Serer1212と、サーバ101のTCPのポート番号を格納するSerer Port1213と、オフローダ100のサーバ側のTCPポート番号を格納するPort for Server1214と、サーバの送信済みデータのシーケンス番号を格納するServer Seq1215(第1端末シーケンス情報)と、オフローダ100がサーバ側に向けて送信済みのデータのシーケンス番号を格納するSeq for Server1216(第2端末シーケンス情報)と、サーバの送信済みデータに対してオフローダ100がACKを返信済みのシーケンス番号を格納するAcked Server Seq1217(第1確認シーケンス情報)と、オフローダ100がサーバ側に向けて送信済みのデータに対してサーバがACKを返信済みのシーケンス番号を格納するAcked Seq for Server1218(第2確認シーケンス情報)と、サーバ101とのTCPコネクションの状態を格納するServer State1219と、を含む。
Payload 1110 may include up to three TLS / SSL messages. SSL Len 1114/1118/1122 for storing message length, Msg Type 1115/1119/1123 for storing message type, SSL Others 1116/1120/1124 for storing other SSL header data, and TLS / SSL message body SSL Message 1117/1121/1125. Some of these may be included, and some may be included.
FIG. 12 shows the TCP status described in one entry of the TCP connection status storage table 808 that records the status of the TCP connection created by the offloader 100 between the client 102 and the server 101 (hereinafter referred to as TCP status). An example of the format is shown.
The TCP state includes a client IP 1201 for storing the client IP address, an offloader IP for client 1202 for storing the IP address that the offloader discloses to the client side, and a client port 1203 for storing the TCP port number of the client 102. Port for Client 1204 for storing the TCP port number on the client side of the offloader 100, Client Seq 1205 (first terminal sequence information) for storing the sequence number of the data transmitted by the client, and the offloader 100 toward the client side Seq for Client 1206 (second terminal sequence information) for storing the sequence number of the transmitted data, and the client's transmitted data Acked Client Seq 1207 (first confirmation sequence information) that stores the sequence number for which the offloader 100 has returned an ACK to the data, and the client returns an ACK to the data that the offloader 100 has transmitted to the client side Acknowledged Seq for Client 1208 (second confirmation sequence information) for storing the completed sequence number, Client State 1209 for storing the state of the TCP connection with the client 102, Server IP 1211 for storing the IP address of the server, and the offloader on the server side An Offloader IP for Server 1212 that stores an IP address that is open to the Internet, and a Server Port 1213 that stores the TCP port number of the server 101 Port for Server 1214 for storing the TCP port number on the server side of the offloader 100, Server Seq 1215 (first terminal sequence information) for storing the sequence number of the transmitted data of the server, and the offloader 100 has been transmitted to the server side Seq for Server 1216 (second terminal sequence information) for storing the sequence number of data, and Acked Server Seq 1217 (first confirmation sequence information) for storing the sequence number to which the offloader 100 has returned an ACK for the transmitted data of the server Then, the Acked Seq for Server 1218 (second confirmation sequence) that stores the sequence number to which the server has returned an ACK for the data that the offloader 100 has transmitted to the server side. Including information), and Server State1219 for storing the state of the TCP connection with the server 101, the.

図24には、Client Seq1205と、Acked Client Seq1207の関係を表す説明図を示す。
Client Seq1205は、クライアントがオフローダに送るべきデータ量のうち、クライアントがオフローダに送信してきたデータ量を表すための値である。一方、Acked Client Seq1207は、クライアントが送信してきたデータのうち、実際にオフローダが受信してACKをクライアントに返信したデータ量を表す。Acked Client Seq1207と、Client Seq1205の差は、クライアントが送信したが、オフローダがまだ受信していないデータ量を表す。
図25には、Seq for Client1206と、Acked Seq for Client1208の関係を表す説明図を示す。
Seq for Client1206は、オフローダがクライアントに送るべきデータ量のうち、オフローダが送信したデータ量を表すための値である。一方、Acked Seq for Client1208は、オフローダが実際にクライアントからのACKを受信済みのデータ量である。Seq for Client1206と、Acked Seq for Client1208の差は、オフローダが送信したが、クライアントの受信が確認されていないデータ量を表す。
図26には、Server Seq1215と、Acked Server Seq1217の関係を表す説明図を示す。
Server Seq1215は、サーバがオフローダに送るべきデータ量のうち、サーバがオフローダに送信してきたデータ量を表すための値である。一方、Acked Server Seq1217は、サーバが送信してきたデータのうち、実際にオフローダが受信してACKをサーバに返信したデータ量を表す。Acked Server Seq1217と、Server Seq1215の差は、サーバが送信したが、オフローダがまだ受信していないデータ量を表す。
FIG. 24 is an explanatory diagram showing the relationship between the client seq 1205 and the acked client seq 1207.
Client Seq 1205 is a value for representing the amount of data that the client has sent to the offloader out of the amount of data that the client should send to the offloader. On the other hand, Acked Client Seq 1207 represents the amount of data actually received by the offloader and returned from the ACK to the client among the data transmitted by the client. The difference between the Acked Client Seq 1207 and the Client Seq 1205 represents the amount of data transmitted by the client but not yet received by the offloader.
FIG. 25 is an explanatory diagram showing a relationship between the Seq for Client 1206 and the Acked Seq for Client 1208.
The Seq for Client 1206 is a value that represents the amount of data transmitted by the offloader among the amount of data that the offloader should send to the client. On the other hand, the Acked Seq for Client 1208 is the amount of data for which the offloader has actually received the ACK from the client. The difference between Seq for Client 1206 and Acked Seq for Client 1208 represents the amount of data transmitted by the offloader but not confirmed by the client.
FIG. 26 is an explanatory diagram showing the relationship between the Server Seq 1215 and the Acked Server Seq 1217.
Server Seq 1215 is a value for representing the amount of data that the server has sent to the offloader out of the amount of data that the server should send to the offloader. On the other hand, Acked Server Seq 1217 represents the amount of data actually received by the offloader and returned from the ACK to the server among the data transmitted by the server. The difference between the Acked Server Seq 1217 and the Server Seq 1215 represents the amount of data transmitted by the server but not yet received by the offloader.

図27には、Seq for Server1216と、Acked Seq for Server1218の関係を表す説明図を示す。
Seq for Server1216は、オフローダがサーバに送るべきデータ量のうち、オフローダが送信したデータ量を表すための値である。一方、Acked Seq for Server1218は、オフローダが実際にサーバからのACKを受信済みのデータ量である。Seq for Server1216と、Acked Seq for Serer1218の差は、オフローダが送信したが、サーバの受信が確認されていないデータ量を表す。
図20〜23には、TCP状態に記載されるシーケンス番号(Client Seq1205、Seq for Client1206、Acked Client Seq1207、Acked Seq for Client1208、Server Seq1215、Seq for Server1216、Acked Server Seq1217、Acked Seq for Server1218)と、パケットに記載されるシーケンス番号との関係を表す説明図を示す。
FIG. 27 is an explanatory diagram showing a relationship between the Seq for Server 1216 and the Acked Seq for Server 1218.
The Seq for Server 1216 is a value for representing the amount of data transmitted by the offloader among the amount of data that the offloader should send to the server. On the other hand, the Acked Seq for Server 1218 is the amount of data for which the offloader has actually received the ACK from the server. The difference between the Seq for Server 1216 and the Acked Seq for Server 1218 represents the amount of data transmitted by the offloader but not confirmed by the server.
20 to 23, the sequence numbers described in the TCP state (Client Seq 1205, Seq for Client 1206, Acked Client Seq 1207, Acked Seq for Client 1208, Server Seq 1215, Seq for Server 1216, Acked Ser 1212, Acked Ser S12 An explanatory view showing a relation with a sequence number described in a packet is shown.

図20には、クライアントがペイロード長Lのパケットを送信するときの説明図を示す。
オフローダは、クライアントからのパケット2001の送信シーケンス番号(A)と、Acked Client Seq1207(A)が一致する場合、Client Seq1205(A)に、ペイロード長Lを加算する(2008)。更に、Acked Client Seq1207(A)に、ペイロード長Lを加算して(2009)、シーケンス番号(A+L)を宛先シーケンス番号としたペイロード長0のパケット2002を、クライアントに向けて送信する。
次に、クライアントからオフローダに、送信シーケンス番号をA+Lとしたペイロード長Lのパケット2003が送られ、途中で廃棄されてしまったとする。
クライアントは、パケット2003が廃棄されたことが分からないため、続けて、送信シーケンス番号をA+2Lとしたペイロード長Lのパケット2004を、オフローダに向けて送信する。
オフローダは、パケット2004記載の送信シーケンス番号(A+2L)と、Acked Client Seq1207記載のシーケンス番号(A+L)が異なる場合、オフローダは、ペイロード長が‘0’より大きければ、パケットを受信バッファ809に蓄積する。そしてオフローダは、パケット2004記載の送信シーケンス番号(A+2L)を、Client Seq1205に記載し(2010)、Acked Client Seq1207記載のシーケンス番号(A+L)を宛先シーケンス番号としたペイロード長0のパケット2005を、クライアントに向けて送信する。
クライアントは、パケット2005を受け取ると、宛先シーケンス番号の値(A+L)により、パケット2003が廃棄されてしまったことを知り、送信シーケンス番号をA+Lとしたペイロード長Lのパケット2006(パケット2003と同じパケット)を、オフローダに向けて再度送信する。
オフローダは、パケット2006の送信シーケンス番号(A+L)と、Acked Client Seq1207記載のシーケンス番号(A+L)が一致することを確認すると、Acked Client Seq1207記載のシーケンス番号(A+L)に、パケット2006のペイロード長Lを加算して(2011)、シーケンス番号(A+2L)を宛先シーケンス番号としたペイロード長0のパケット2007を、クライアントに向けて送信する。
FIG. 20 is an explanatory diagram when the client transmits a packet having a payload length L.
When the transmission sequence number (A) of the packet 2001 from the client matches the Acked Client Seq 1207 (A), the offloader adds the payload length L to the Client Seq 1205 (A) (2008). Further, the payload length L is added to the Acked Client Seq 1207 (A) (2009), and a packet 2002 having a payload length 0 with the sequence number (A + L) as the destination sequence number is transmitted to the client.
Next, it is assumed that a packet 2003 having a payload length L with a transmission sequence number A + L is sent from the client to the offloader and discarded in the middle.
Since the client does not know that the packet 2003 has been discarded, the client continuously transmits a packet 2004 having a payload length L with the transmission sequence number A + 2L to the offloader.
When the transmission sequence number (A + 2L) described in the packet 2004 is different from the sequence number (A + L) described in the Acked Client Seq 1207, the offloader stores the packet in the reception buffer 809 if the payload length is larger than “0”. . Then, the offloader writes the transmission sequence number (A + 2L) described in the packet 2004 in the client seq 1205 (2010), and the packet 2005 having a payload length 0 with the sequence number (A + L) described in the acked client seq 1207 as the destination sequence number. Send to.
When the client receives the packet 2005, the client knows that the packet 2003 has been discarded from the value of the destination sequence number (A + L), and has a payload length L packet 2006 (the same packet as the packet 2003) with the transmission sequence number A + L. ) To the offloader again.
When the offloader confirms that the transmission sequence number (A + L) of the packet 2006 matches the sequence number (A + L) described in the Acked Client Seq 1207, the offloader sets the payload length L of the packet 2006 to the sequence number (A + L) described in the Acked Client Seq 1207. Are added (2011), and a packet 2007 having a payload length 0 with the sequence number (A + 2L) as the destination sequence number is transmitted to the client.

図21には、オフローダがクライアントに向けてペイロード長Lのパケットを送信するときの説明図を示す。
オフローダがクライアントに送るペイロード長Lのパケット2101の送信シーケンス番号(B)と、Seq for Client1206(B)が一致する場合、Seq for Client1206(B)に、ペイロード長Lを加算する(2108)。
その後、オフローダが、クライアントから、宛先シーケンス番号をB+Lとしたペイロード長0のパケット2102を受け取ると、Acked Seq for Client1208に、パケット記載の宛先シーケンス番号(B+L)を記載する(2109)。
次に、オフローダからクライアントに向けて、Seq for Client1206と同じ送信シーケンス番号(B+L)で送ったペイロード長Lのパケット2103が、途中で廃棄されてしまったとする。Seq for Client1206(B+L)には、パケット2103のペイロード長Lが加算される(2110)。
オフローダは、パケット2103が途中で廃棄されたことを知らないため、続けて、Seq for Client1206と同じ送信シーケンス番号(B+2L)を持つペイロード長Lのパケット2104を送る。Seq for Client1206(B+2L)には、パケット2104のペイロード長Lが加算される(2111)。
クライアントは、パケット2104を受け取ると、送信シーケンス番号の値(B+2L)より、その前のパケット2103が途中で廃棄されてしまったことを知る。パケット2103の再送をオフローダに促すため、宛先シーケンス番号をB+Lとしたペイロード長0のパケット2105とパケット2106を、オフローダに向けて送信する。
オフローダは、パケット2105記載の宛先シーケンス番号が、Acked Seq for Client1208の値と同じパケット2105とパケット2106を、連続して受け取った場合、パケット2103が途中で廃棄されてしまったことを知り、送信シーケンス番号(B+L)でペイロード長Lのパケット2107(パケット2103と同じパケット)を再度送信する。
クライアントは、パケット2107を受け取ると、宛先シーケンス番号をB+3Lとしたペイロード長0のパケット2108を、オフローダに向けて送信する。
FIG. 21 is an explanatory diagram when the offloader transmits a packet having a payload length L toward the client.
When the transmission sequence number (B) of the packet 2101 having the payload length L sent from the offloader to the client matches the Seq for Client 1206 (B), the payload length L is added to the Seq for Client 1206 (B) (2108).
After that, when the offloader receives a packet 2102 having a payload length 0 with the destination sequence number B + L from the client, the destination sequence number (B + L) described in the packet is described in the Acked Seq for Client 1208 (2109).
Next, it is assumed that a packet 2103 having a payload length L transmitted from the offloader to the client with the same transmission sequence number (B + L) as that of the Seq for Client 1206 has been discarded. The payload length L of the packet 2103 is added to the Seq for Client 1206 (B + L) (2110).
Since the offloader does not know that the packet 2103 has been discarded halfway, the offloader continues to send a packet 2104 having a payload length L having the same transmission sequence number (B + 2L) as the Seq for Client 1206. The payload length L of the packet 2104 is added to Seq for Client 1206 (B + 2L) (2111).
When the client receives the packet 2104, the client knows from the value of the transmission sequence number (B + 2L) that the previous packet 2103 has been discarded. In order to prompt the offloader to retransmit the packet 2103, the packet 2105 and the packet 2106 having a payload length of 0 with the destination sequence number B + L are transmitted to the offloader.
When the offloader continuously receives the packet 2105 and the packet 2106 whose destination sequence number described in the packet 2105 is the same as the value of the Acked Seq for Client 1208, the offloader knows that the packet 2103 has been discarded on the way, and the transmission sequence The packet 2107 having the payload length L with the number (B + L) (the same packet as the packet 2103) is transmitted again.
Upon receiving the packet 2107, the client transmits a packet 2108 having a payload length of 0 with a destination sequence number of B + 3L toward the offloader.

図22には、サーバがペイロード長Lのパケットを送信するときの説明図を示す。
オフローダは、サーバからのパケット2201の送信シーケンス番号(A)と、Acked Server Seq1217(A)が一致する場合、Server Seq1215(A)に、ペイロード長Lを加算する(2208)。更に、Acked Server Seq1217(A)に、ペイロード長Lを加算して(2209)、シーケンス番号(A+L)を宛先シーケンス番号としたペイロード長0のパケット2202を、サーバに向けて送信する。
次に、サーバからオフローダに、送信シーケンス番号をA+Lとしたペイロード長Lのパケット2203が送られ、途中で廃棄されてしまったとする。
サーバは、パケット2203が廃棄されたことが分からないため、続けて、送信シーケンス番号をA+2Lとしたペイロード長Lのパケット2204を、オフローダに向けて送信する。
オフローダは、パケット2204記載の送信シーケンス番号(A+2L)と、Acked Server Seq1217記載のシーケンス番号(A+L)が異なる場合、パケット2204記載の送信シーケンス番号(A+2L)を、Server Seq1215に記載し(2210)、Acked Server Seq1217記載のシーケンス番号(A+L)を宛先シーケンス番号としたペイロード長0のパケット2205を、サーバに向けて送信する。
サーバは、パケット2205を受け取ると、宛先番号の値(A+L)により、パケット2203が廃棄されてしまったことを知り、送信シーケンス番号をA+Lとしたペイロード長Lのパケット2206(パケット2203と同じパケット)を、オフローダに向けて再度送信する。
オフローダは、パケット2206の送信シーケンス番号(A+L)と、Acked Server Seq1217記載のシーケンス番号(A+L)が一致することを確認すると、Acked Server Seq1217記載のシーケンス番号(A+L)に、パケット2206のペイロード長Lを加算して(2211)、シーケンス番号(A+2L)を宛先シーケンス番号としたペイロード長0のパケット2207を、サーバに向けて送信する。
FIG. 22 is an explanatory diagram when the server transmits a packet having a payload length L.
When the transmission sequence number (A) of the packet 2201 from the server matches the Acked Server Seq 1217 (A), the offloader adds the payload length L to the Server Seq 1215 (A) (2208). Further, the payload length L is added to the Acked Server Seq 1217 (A) (2209), and a packet 2202 having a payload length 0 with the sequence number (A + L) as the destination sequence number is transmitted to the server.
Next, it is assumed that a packet 2203 having a payload length L with a transmission sequence number A + L is sent from the server to the offloader and discarded in the middle.
Since the server does not know that the packet 2203 has been discarded, the server subsequently transmits a packet 2204 having a payload length L with the transmission sequence number A + 2L to the offloader.
When the transmission sequence number (A + 2L) described in the packet 2204 is different from the sequence number (A + L) described in the Acked Server Seq 1217, the offloader writes the transmission sequence number (A + 2L) described in the packet 2204 in the Server Seq 1215 (2210), A packet 2205 having a payload length of 0 having the sequence number (A + L) described in the Acked Server Seq 1217 as the destination sequence number is transmitted to the server.
When the server receives the packet 2205, it knows that the packet 2203 has been discarded from the value of the destination number (A + L), and the packet 2206 having the payload length L with the transmission sequence number A + L (the same packet as the packet 2203) Is sent again to the offloader.
When the offloader confirms that the transmission sequence number (A + L) of the packet 2206 matches the sequence number (A + L) described in the Acked Server Seq 1217, the offloader sets the payload length L of the packet 2206 to the sequence number (A + L) described in the Acked Server Seq 1217. Are added (2211), and a packet 2207 with a payload length of 0 having the sequence number (A + 2L) as the destination sequence number is transmitted to the server.

図23には、オフローダがサーバに向けてペイロード長Lのパケットを送信するときの説明図を示す。
オフローダがサーバに送るペイロード長Lのパケット2301の送信シーケンス番号(B)と、Seq for Server1216(B)が一致する場合、Seq for Server1216(B)に、ペイロード長Lを加算する(2308)。
その後、オフローダが、サーバから、宛先シーケンス番号をB+Lとしたペイロード長0のパケット2302を受け取ると、Acked Seq for Server1218に、パケット記載の宛先シーケンス番号(B+L)を記載する(2309)。
次に、オフローダからサーバに向けて、Seq for Server1216と同じ送信シーケンス番号(B+L)で送ったペイロード長Lのパケット2303が、途中で廃棄されてしまったとする。Seq for Server1216(B+L)には、パケット2303のペイロード長Lが加算される(2310)。
オフローダは、パケット2303が途中で廃棄されたことを知らないため、続けて、Seq for Server1216と同じ送信シーケンス番号(B+2L)を持つペイロード長Lのパケット2304を送る。Seq for Server1216(B+2L)には、パケット2304のペイロード長Lが加算される(2311)。
サーバは、パケット2304を受け取ると、送信シーケンス番号の値(B+2L)より、その前のパケット2303が途中で廃棄されてしまったことを知る。パケット2303の再送をオフローダに促すため、宛先シーケンス番号をB+Lとしたペイロード長0のパケット2305とパケット2306を、オフローダに向けて送信する。
オフローダは、パケット2305記載の宛先シーケンス番号が、Acked Seq for Server1218の値と同じパケット2305とパケット2306を、連続して受け取った場合、パケット2303が途中で廃棄されてしまったことを知り、送信シーケンス番号(B+L)でペイロード長Lのパケット2307(パケット2303と同じパケット)を再度送信する。
サーバは、パケット2307を受け取ると、宛先シーケンス番号をB+3Lとしたペイロード長0のパケット2308を、オフローダに向けて送信する。
FIG. 23 illustrates an explanatory diagram when the offloader transmits a packet having a payload length L toward the server.
When the transmission sequence number (B) of the packet 2301 having the payload length L sent from the offloader to the server matches the Seq for Server 1216 (B), the payload length L is added to the Seq for Server 1216 (B) (2308).
Thereafter, when the offloader receives a packet 2302 having a payload length of 0 with the destination sequence number B + L from the server, the destination sequence number (B + L) described in the packet is described in the Acked Seq for Server 1218 (2309).
Next, it is assumed that a packet 2303 having a payload length L sent from the offloader to the server with the same transmission sequence number (B + L) as that of the Seq for Server 1216 has been discarded. The payload length L of the packet 2303 is added to Seq for Server 1216 (B + L) (2310).
Since the offloader does not know that the packet 2303 has been discarded halfway, the offloader continues to send a packet 2304 having a payload length L having the same transmission sequence number (B + 2L) as the Seq for Server 1216. The payload length L of the packet 2304 is added to Seq for Server 1216 (B + 2L) (2311).
When the server receives the packet 2304, the server knows from the transmission sequence number value (B + 2L) that the previous packet 2303 has been discarded. In order to prompt the offloader to retransmit the packet 2303, the packet 2305 and the packet 2306 having a payload length of 0 with the destination sequence number B + L are transmitted to the offloader.
When the offloader successively receives the packet 2305 and the packet 2306 whose destination sequence number described in the packet 2305 is the same as the value of the Acked Seq for Server 1218, the offloader knows that the packet 2303 has been discarded on the way, and the transmission sequence The packet 2307 (the same packet as the packet 2303) having the payload length L with the number (B + L) is transmitted again.
Upon receiving the packet 2307, the server transmits a packet 2308 having a payload length of 0 with a destination sequence number of B + 3L to the offloader.

3.TCP/IPレイヤ処理部(1/2)

図9には、TCP/IPレイヤ処理部807の内部のブロック図を示す。
TCP/IPレイヤ処理部807は、TCPの状態遷移判定部905と、ACK不一致パケット処理部911と、後続パケット再入力部921と、クライアント送信ACK処理部922と、サーバ送信ACK処理部924と、サーバ宛平文パケット処理部926と、クライアント宛暗号パケット処理部927と、を備える。
図13には、TCPの状態遷移判定部905の実施するフローチャートを示す。
TCPの状態遷移判定部905は、パケット901を受信すると、パケット記載のProto1101にTCPを表す値が格納されているか否かを確認する(ステップ1301)。TCPを表す値でない場合は廃棄する(ステップ1302)。次に、パケット記載の1102〜1105(送信元アドレス、宛先アドレス、送信元ポート、宛先ポート)と、1201〜1204または1211〜1214が一致するエントリが、TCPコネクション状態格納テーブル808に存在するか否かを判定する(ステップ1303)。存在しない場合は、受信パケットのFlag1108がSYNか否かを判定する(ステップ1313)。SYNでない場合は、廃棄する(ステップ1304)。SYNの場合は、新たなエントリ(1201〜1205にパケットの1102〜1106を記載した上で、Client Seq1205に‘1’を加算したエントリ)を作成して、TCPコネクション状態格納テーブル808へ書込み(948)、DIP1103とDport1105に、サーバのIPアドレスとポート番号を記載したサーバ宛SYNパケット(949)を作成する(ステップ1314)。ステップ1303にて、一致するエントリが存在する場合は、一致するエントリを読み出す(907)(ステップ1305)。更に、受信パケット記載の1102〜1105が、読み出したTCP状態記載の1201〜1204に一致する場合は、受信パケット記載の送信シーケンス番号1106がTCP状態記載のAcked Client Seq1207よりも大きいか否かを判定し、一方、受信パケット記載の11022〜1105がTCP状態記載の1211〜1214に一致する場合は、受信パケット記載の送信シーケンス番号1106がTCP状態記載のAcked Server Seq1217よりも大きいか否かを判定する(ステップ1306)。大きい場合は、ACK不一致パケット処理部911へとパケットおよび読み出したTCP状態を送信する(ステップ1309)。大きくない場合は、一致するか否かを判定する(ステップ1307)。一致しない場合は、廃棄する(ステップ1308)。一致する場合は、受信パケットにペイロードデータが存在するか否かを判定する(ステップ1310)。存在する場合は、TLS/SSLメッセージ処理部812へと、パケットおよび読み出したTCP状態を送信する(ステップ1312)。存在しない場合は、クライアント/サーバ送信ACK処理部922/924へと、パケットおよび読み出したTCP状態を送信する(ステップ1311)。
3. TCP / IP layer processing part (1/2)

FIG. 9 shows an internal block diagram of the TCP / IP layer processing unit 807.
The TCP / IP layer processing unit 807 includes a TCP state transition determination unit 905, an ACK mismatch packet processing unit 911, a subsequent packet re-input unit 921, a client transmission ACK processing unit 922, a server transmission ACK processing unit 924, The server-addressed plaintext packet processing unit 926 and the client-addressed encrypted packet processing unit 927 are provided.
FIG. 13 shows a flowchart executed by the TCP state transition determination unit 905.
When receiving the packet 901, the TCP state transition determination unit 905 checks whether or not a value representing TCP is stored in the Proto 1101 described in the packet (step 1301). If it is not a value representing TCP, it is discarded (step 1302). Next, whether or not there is an entry in the TCP connection state storage table 808 that matches 1102 to 1105 (source address, destination address, source port, destination port) described in the packet with 1201 to 1204 or 1211 to 1214. Is determined (step 1303). If not, it is determined whether Flag 1108 of the received packet is SYN (step 1313). If it is not SYN, it is discarded (step 1304). In the case of SYN, a new entry (entry obtained by adding 110 to 1106 of the packet in 1201 to 1205 and adding “1” to Client Seq 1205) is created and written to the TCP connection state storage table 808 (948) ), A server-addressed SYN packet (949) in which the IP address and port number of the server are described is created in DIP 1103 and Dport 1105 (step 1314). If there is a matching entry in step 1303, the matching entry is read (907) (step 1305). Further, when 1102 to 1105 described in the received packet match the read 1201 to 1204 described in the TCP state, it is determined whether or not the transmission sequence number 1106 described in the received packet is larger than the Acked Client Seq 1207 described in the TCP state. On the other hand, if 11022 to 1105 described in the received packet matches 1211 to 1214 described in the TCP state, it is determined whether or not the transmission sequence number 1106 described in the received packet is larger than the Acked Server Seq 1217 described in the TCP state. (Step 1306). If larger, the packet and the read TCP state are transmitted to the ACK mismatch packet processing unit 911 (step 1309). If not, it is determined whether or not they match (step 1307). If they do not match, they are discarded (step 1308). If they match, it is determined whether payload data exists in the received packet (step 1310). If it exists, the packet and the read TCP state are transmitted to the TLS / SSL message processing unit 812 (step 1312). If not, the packet and the read TCP state are transmitted to the client / server transmission ACK processing unit 922/924 (step 1311).

図14には、ACK不一致パケット処理部911の実施するフローチャートを示す。
ACK不一致パケット処理部911は、TCPの状態遷移判定部905からパケットおよびTCP状態を受け取ると、パケットのTCPペイロード長が‘0’よりも大きいか否かを判定する(ステップ1401)。大きい場合は、パケットを受信バッファ809に蓄積する(ステップ1402)。更に、パケットの送信シーケンス番号が、TCP状態記載のClient/Server Seq1205/1215よりも大きいか否かを判定する(ステップ1403)。大きい場合は、TCP状態記載のClient/Server Seq1205/1215を、パケットの送信シーケンス番号SSeq1106へと更新する(ステップ1404)。更に、TCP状態記載のAcked Client/Server Seq1207/1217を宛先シーケンス番号とし、Seq for Client/Server1206/1216を送信元シーケンス番号としたACKパケットを作成する(ステップ1405)。新たに作成したTCP状態は、TCPコネクション状態格納テーブル808へと書き込む(910)。新たに作成したパケットは、集約部904へと出力する(912)。
以上、ACK不一致パケット処理部911が、図14のフローチャートに従って処理することで、到着順が逆転した一部のパケットのみを受信バッファ809に書き込むことが可能となる。
また、図13のステップ1312において、パケットとTCP状態がTLS/SSLメッセージ処理部812へ転送され、TLS/SSLメッセージ処理部812での処理が終了すると、Acked Client/Server Seq1207/1217に、TCPペイロード長を加算して、新たなTCP状態831が作成される。
FIG. 14 shows a flowchart executed by the ACK mismatch packet processing unit 911.
When receiving the packet and the TCP state from the TCP state transition determination unit 905, the ACK mismatch packet processing unit 911 determines whether or not the TCP payload length of the packet is greater than “0” (step 1401). If larger, the packet is stored in the reception buffer 809 (step 1402). Further, it is determined whether or not the transmission sequence number of the packet is larger than the Client / Server Seq 1205/1215 described in the TCP state (step 1403). If it is larger, the Client / Server Seq 1205/1215 described in the TCP state is updated to the packet transmission sequence number SSeq 1106 (step 1404). Further, an ACK packet is created with the Acked Client / Server Seq 1207/1217 described in the TCP status as the destination sequence number and the Seq for Client / Server 1206/1216 as the source sequence number (step 1405). The newly created TCP state is written into the TCP connection state storage table 808 (910). The newly created packet is output to the aggregating unit 904 (912).
As described above, the ACK mismatch packet processing unit 911 performs processing according to the flowchart of FIG. 14, so that only a part of the packets whose arrival order is reversed can be written in the reception buffer 809.
In step 1312 of FIG. 13, the packet and the TCP state are transferred to the TLS / SSL message processing unit 812, and when the processing in the TLS / SSL message processing unit 812 is completed, the TCP payload is transferred to the Acked Client / Server Seq 1207/1217. A new TCP state 831 is created by adding the length.

図15には、後続パケット再入力部921の実施するフローチャートを示す。
後続パケット再入力部921は、TCP状態831を受け取ると、TCP状態記載のAcked Client/Server Seq1207/1217と一致する送信シーケンス番号を持つパケットが、受信バッファ809に蓄積されているか否かを判定する(ステップ1501)。蓄積されていない場合は終了する(ステップ1502)。蓄積されている場合は、受信バッファから前記パケットを読出し(917)、受信バッファ809から消去する(918)。更に、TCP状態と読み出したパケットをTLS/SSLメッセージ処理部812へと出力する(ステップ1503)。
図7には、クライアント102が送信する暗号化パケットが、オフローダ100によって復号化され、サーバ101に送られるシーケンス図を示す。
クライアント102が送信する暗号化パケット701は、オフローダのTLS/SSLメッセージ処理部812において復号化される。復号化された平文パケットは、改竄チェック用のMAC値を持たない場合、サーバ宛平文パケット処理部926において、サーバ宛送信バッファ811に蓄積される。更に、ACKパケット702をクライアント102に向けて送信する。
クライアント102が送信する暗号化パケット703が廃棄され、次に送信した暗号化パケット704がオフローダ100に到着した場合、オフローダ100は、パケット703が途中で廃棄されたものとみなし、重複ACK705、717を連続してクライアント102へ送信する。クライアントは、重複ACK705、717を2回受け取ると、パケット703が途中で廃棄されたことを知り、パケット703と同じパケット706を再送する。オフローダ100は、再送パケット706を受け取ると、通常のACKパケット707をクライアント102へ返信する。
オフローダ100が、改竄チェック用のMAC値を持つ暗号化パケット708を受け取った場合は、TLS/SSLメッセージ処理部812において復号化し、サーバ宛平文パケット処理部926において、これまでに蓄積したサーバ宛平文パケットを読み出して送信した(712〜714)後で、復号化したパケットを送信する(715)。
以上、後続パケット再入力部921が、図15のフローチャートに従って処理することで、受信バッファを経由するパケットを、到着順に誤りのある一部のパケットのみに限定しつつ、端末が送信した順番にパケットをTLS/SSLメッセージ処理部812に到着させることが可能となる。
FIG. 15 shows a flowchart executed by the subsequent packet re-input unit 921.
When the subsequent packet re-input unit 921 receives the TCP state 831, the subsequent packet re-input unit 921 determines whether or not a packet having a transmission sequence number that matches the Acked Client / Server Seq 1207/1217 described in the TCP state is accumulated in the reception buffer 809. (Step 1501). If not, the process ends (step 1502). If accumulated, the packet is read from the reception buffer (917) and deleted from the reception buffer 809 (918). Further, the TCP state and the read packet are output to the TLS / SSL message processing unit 812 (step 1503).
FIG. 7 shows a sequence diagram in which the encrypted packet transmitted by the client 102 is decrypted by the offloader 100 and sent to the server 101.
The encrypted packet 701 transmitted by the client 102 is decrypted by the TLS / SSL message processing unit 812 of the offloader. The decrypted plaintext packet is accumulated in the server-destined transmission buffer 811 in the server-destined plaintext packet processing unit 926 if it does not have a MAC value for tampering check. Further, the ACK packet 702 is transmitted to the client 102.
When the encrypted packet 703 transmitted by the client 102 is discarded and the next transmitted encrypted packet 704 arrives at the offloader 100, the offloader 100 regards that the packet 703 is discarded halfway, and receives duplicate ACKs 705 and 717. It transmits to the client 102 continuously. When the client receives duplicate ACKs 705 and 717 twice, the client knows that the packet 703 has been discarded halfway, and retransmits the same packet 706 as the packet 703. When the offloader 100 receives the retransmission packet 706, it returns a normal ACK packet 707 to the client 102.
When the offloader 100 receives the encrypted packet 708 having the MAC value for tampering check, the TLS / SSL message processing unit 812 decrypts it, and the server-destined plaintext packet processing unit 926 stores the server-destined plaintext. After the packet is read and transmitted (712-714), the decrypted packet is transmitted (715).
As described above, the subsequent packet re-input unit 921 performs processing according to the flowchart of FIG. 15, so that packets that pass through the reception buffer are limited to only some of the packets that have errors in the order of arrival, and packets are transmitted in the order in which they are transmitted by the terminal. Can arrive at the TLS / SSL message processing unit 812.

クライアント宛パケット処理部927は、TLS/SSLメッセージ処理部812が出力するクライアント宛パケットでTCPペイロード長が0より大きいパケットを、クライアント宛送信バッファ810に蓄積した上で、クライアント宛パケットを集約部904に出力する(941)。更に、TCP状態に記載の、オフローダ100がサーバ側に向けて送信済みのパケットのシーケンス番号を格納するSeq for Server1216を送信シーケンス番号に、サーバの送信済みパケットに対してオフローダ100がACKを返信済みのシーケンス番号を格納するAcked Server Seq1217を宛先シーケンス番号に用いて、サーバ向けのACKパケットを作成し、集約部904に出力する(941)。   The client-destined packet processing unit 927 accumulates in the client-destined transmission buffer 810 the packets destined for the client that are output by the TLS / SSL message processing unit 812 and have a TCP payload length greater than 0, and then aggregates the packets destined for the client 904 (941). Furthermore, the Seq for Server 1216 that stores the sequence number of the packet that the offloader 100 has transmitted to the server side described in the TCP state is set to the transmission sequence number, and the offloader 100 has returned an ACK to the transmitted packet of the server. An ACK packet for the server is created using the Acked Server Seq 1217 that stores the sequence number of the destination as the destination sequence number, and is output to the aggregating unit 904 (941).

図16には、クライアント送信ACK処理部922の実施するフローチャートを示す。
クライアント送信ACK処理部922は、クライアントからのACKパケットを受信すると、受信パケットの宛先シーケンス番号DSeq1107が、TCP状態記載のAcked Seq for Client1208よりも小さいか否かを判定する(ステップ1601)。小さい場合は、処理を終了して、パケットを廃棄する(ステップ1602)。大きい場合は、受信パケットの宛先シーケンス番号DSeq1107が、TCP状態記載のAcked Seq for Client1208よりも大きいか否かを判定する(ステップ1603)。大きい場合は、受信パケットの宛先シーケンス番号DSeq1107よりも、送信元シーケンス番号が小さなパケットをクライアント宛送信バッファ810から削除し、TCP状態記載のAcked Seq for Client1208に、受信パケット記載の宛先シーケンス番号DSeq1107を記入して、TCPコネクション状態格納テーブル808へ書き込む(946)(ステップ1604)。一致する場合は、TCP状態記載のClient State1209をみて、2回目に一致する重複ACKの場合か否かを判定する(ステップ1605)。2回目に一致する重複ACKでない場合は、TCP状態記載のClient State1209に、1回目に一致する重複ACKであることを記入する(ステップ1606)。2回目に一致する重複ACKである場合は、受信パケットの宛先シーケンス番号Dseq1107と同一の送信元シーケンス番号を持つパケットをクライアント宛送信バッファ810から読み出す(ステップ1607)。読み出したパケットは、集約部904へと出力される(945)。なお、ここでは一例として2回としたが、適宜の回数に設定することができる。
FIG. 16 shows a flowchart executed by the client transmission ACK processing unit 922.
When receiving the ACK packet from the client, the client transmission ACK processing unit 922 determines whether or not the destination sequence number DSeq 1107 of the received packet is smaller than the Acked Seq for Client 1208 described in the TCP state (step 1601). If it is smaller, the process is terminated and the packet is discarded (step 1602). If it is larger, it is determined whether or not the destination sequence number DSeq 1107 of the received packet is larger than the Acked Seq for Client 1208 described in the TCP state (step 1603). If it is larger, the packet with the transmission source sequence number smaller than the destination sequence number DSeq1107 of the received packet is deleted from the transmission buffer 810 addressed to the client, and the destination sequence number DSeq1107 described in the received packet is set in the Acked Seq for Client 1208 described in the TCP state. This is entered and written in the TCP connection state storage table 808 (946) (step 1604). If they match, the client state 1209 described in the TCP state is checked to determine whether or not it is a duplicate ACK that matches the second time (step 1605). If it is not a duplicate ACK that matches the second time, the fact that it is a duplicate ACK that matches the first time is entered in the Client State 1209 described in the TCP state (step 1606). If it is a duplicate ACK that matches the second time, a packet having the same source sequence number as the destination sequence number Dseq 1107 of the received packet is read from the transmission buffer 810 addressed to the client (step 1607). The read packet is output to the aggregation unit 904 (945). In addition, although it was set as 2 times here as an example, it can set to a suitable frequency | count.

図6には、サーバ101が送信する平文パケットが、オフローダ100によって暗号化され、クライアント102に送られるシーケンス図を示す。
サーバが送信する平文パケット601/604は、オフローダのTLS/SSLメッセージ処理部812において暗号化される。暗号化されたパケットは、クライアント宛パケット処理部927において、クライアント宛送信バッファ810に蓄積されると同時に、クライアント102に向けて送信される(602/605)。更に、ACKパケット603/606をサーバに向けて送信する。
クライアントは、クライアントに向けて送信された暗号化パケット602を受け取ると、ACKパケット607をオフローダに向けて送信する。
クライアントに向けて送信された暗号化パケット605が廃棄されると、図20で説明したように、宛先シーケンス番号がACKパケット607と同じACKパケット(重複ACKと呼ぶ)608、609が送られる。
オフローダは、重複ACKを2回受け取ったことを判定すると、暗号化パケット605が途中で廃棄されたことを知る。クライアント送信ACK処理部922が、クライアント宛送信バッファ810から暗号化パケット605を読み出し、暗号化パケット605と同じ暗号化パケット610を再送する。クライアント送信ACK処理部922は、1回目の重複ACK608を受信したとき何も再送せず、2回目の重複ACK609を受信したときに、クライアント102へ暗号化パケット610を再送する。クライアント102は、暗号化パケット610が再送されると、ACKパケット611を返信する。
なお、オフローダ100は、再送された暗号化パケット610に対するACKパケット611を受け取る前・後にかかわらず、サーバ101から平文パケット604の次の平文パケット613を受け取ると、TLS/SSLメッセージ処理部812において暗号化したパケット613を、クライアント宛パケット処理部927において、クライアント宛送信バッファ810に蓄積すると同時に、クライアント102に向けて送信する。更に、ACKパケット614をサーバに向けて送信する。
以上のように、クライアント送信ACK処理部922が図16に示すフローチャートに従って処理することで、クライアント宛送信バッファからのパケット読出しを2回目の重複ACKを受信したときに限定し、読出し回数を抑制することが可能となる。
FIG. 6 shows a sequence diagram in which a plaintext packet transmitted by the server 101 is encrypted by the offloader 100 and sent to the client 102.
The plaintext packet 601/604 transmitted by the server is encrypted by the TLS / SSL message processing unit 812 of the offloader. The encrypted packet is stored in the client-destined transmission buffer 810 in the client-destined packet processing unit 927 and simultaneously transmitted to the client 102 (602/605). Further, the ACK packet 603/606 is transmitted to the server.
When the client receives the encrypted packet 602 transmitted toward the client, the client transmits an ACK packet 607 toward the offloader.
When the encrypted packet 605 transmitted to the client is discarded, ACK packets (referred to as duplicate ACKs) 608 and 609 having the same destination sequence number as the ACK packet 607 are transmitted as described in FIG.
When the offloader determines that the duplicate ACK has been received twice, the offloader knows that the encrypted packet 605 has been discarded. The client transmission ACK processing unit 922 reads the encrypted packet 605 from the client-addressed transmission buffer 810, and retransmits the same encrypted packet 610 as the encrypted packet 605. The client transmission ACK processing unit 922 retransmits nothing when receiving the first duplicate ACK 608, and retransmits the encrypted packet 610 to the client 102 when receiving the second duplicate ACK 609. When the encrypted packet 610 is retransmitted, the client 102 returns an ACK packet 611.
When the offloader 100 receives the plaintext packet 613 next to the plaintext packet 604 from the server 101 regardless of before or after receiving the ACK packet 611 for the retransmitted encrypted packet 610, the TLS / SSL message processing unit 812 performs encryption. The packet 613 converted into a packet is transmitted to the client 102 at the same time as being stored in the client transmission buffer 810 in the packet processing unit 927 for the client. Further, an ACK packet 614 is transmitted to the server.
As described above, the client transmission ACK processing unit 922 performs processing according to the flowchart shown in FIG. 16, thereby limiting the packet reading from the client-addressed transmission buffer when the second duplicate ACK is received and suppressing the number of readings. It becomes possible.

4.TLS/SSLメッセージ処理部

図17には、受信パケットのペイロード1110が、複数のTLS/SSLメッセージを含むケース(1701)、1つのTLS/SSLメッセージを含むケース(1702)、一部のTLS/SSLメッセージを含むケース(1703〜1705)を示す。
一部のTLS/SSLメッセージを含むケース(1703〜1705)では、TLS/SSLヘッダを除く部分が暗号化されている場合がある。更に、後尾部分を含むケース(1705)では、最後尾に改竄チェック用のMAC値(メッセージが改竄されているか否かを判定するための値)が付加されている。改竄チェック用のMAC値を計算するためには、先頭部分から後尾部分までのメッセージ全体のハッシュ値が必要であるため、正しいメッセージを受け取ったかどうかを判定するためには、メッセージ最後尾のパケットの到着を待つ必要がある。
図10には、TLS/SSLメッセージ処理部812のブロック図を示す。
TLS/SSLメッセージ処理部812は、TLS/SSL状態格納テーブルから対応するTLS/SSL状態の読出しを行う状態読出し部1002と、パケットタイプ判定部1003と、パケットタイプの判定結果に基づいてメッセージの処理を行い返信パケットの作成と新たなTLS/SSL状態の作成を行いTLS/SSL状態格納テーブルへの書込みを行うメッセージ処理部1009とを備える。
状態読出し部1002は、TCP状態に対応したTLS/SSL状態を、TLS/SSL状態格納テーブル813から読み出す。
図19には、TLS/SSL状態格納テーブル813の1エントリに記載されるTLS/SSL状態のフォーマットの一例を示す。
TLS/SSL状態格納テーブル813は、TLS/SSLコネクション状態を格納する領域813−1と、TLS/SSLセッション状態を格納する領域813−2に分割される。
TLS/SSLコネクション状態を格納する領域813−1の1エントリは、サーバ側の鍵状態を格納するServer Key1901と、クライアント側の鍵状態を格納するClient Key1902と、サーバ側のMAC書込みシークレットを格納するServer MAC Key1903と、クライアント側のMAC書込みシークレットを格納するClient MAC Key1904と、サーバ側のシーケンス番号を格納するServer Seq1905と、クライアント側のシーケンス番号を格納するClient Seq1906と、サーバランダムを格納するServer Random1907と、クライアントランダムを格納するClient Random1908と、VerifyやMACなどの途中結果を格納するInterim Hash1909と、セッション状態を格納するエントリへのポインタを格納するSession Pointer1910を含む。
TLS/SSLセッション状態を格納する領域813−2の1エントリは、マスターシークレットを格納するMaster Secret1911と、セッションIDを格納するSession ID1912と、暗号方式を格納するCipher Suite1913とを含む。
4). TLS / SSL message processor

In FIG. 17, the payload 1110 of the received packet includes a case (1701) including a plurality of TLS / SSL messages, a case (1702) including one TLS / SSL message, and a case (1703) including a part of TLS / SSL messages. ~ 1705).
In a case including some TLS / SSL messages (1703 to 1705), the portion excluding the TLS / SSL header may be encrypted. Further, in the case (1705) including the tail portion, a MAC value for tampering check (a value for determining whether or not the message has been tampered with) is added at the end. In order to calculate the MAC value for tampering check, the hash value of the entire message from the head part to the tail part is necessary. Therefore, in order to determine whether or not a correct message has been received, It is necessary to wait for arrival.
FIG. 10 shows a block diagram of the TLS / SSL message processing unit 812.
The TLS / SSL message processing unit 812 reads a corresponding TLS / SSL state from the TLS / SSL state storage table, a packet type determination unit 1003, and a message process based on the packet type determination result. And a message processing unit 1009 for creating a reply packet and creating a new TLS / SSL state and writing to the TLS / SSL state storage table.
The state reading unit 1002 reads the TLS / SSL state corresponding to the TCP state from the TLS / SSL state storage table 813.
FIG. 19 shows an example of the format of the TLS / SSL state described in one entry of the TLS / SSL state storage table 813.
The TLS / SSL state storage table 813 is divided into an area 813-1 for storing a TLS / SSL connection state and an area 813-2 for storing a TLS / SSL session state.
One entry in the area 813-1 for storing the TLS / SSL connection state stores the Server Key 1901 for storing the server-side key state, the Client Key 1902 for storing the client-side key state, and the server-side MAC write secret. Server MAC Key 1903, Client MAC Key 1904 for storing the client-side MAC write secret, Server Seq 1905 for storing the server-side sequence number, Client Seq 1906 for storing the client-side sequence number, and Server Random 1907 for storing the server random number Client Random 1908 for storing client randomness, and I for storing intermediate results such as Verify and MAC ntermim Hash 1909 and Session Pointer 1910 for storing a pointer to an entry for storing the session state.
One entry of the area 813-2 for storing the TLS / SSL session state includes a master secret 1911 for storing the master secret, a session ID 1912 for storing the session ID, and a cipher suite 1913 for storing the encryption method.

パケットタイプ判定部1003は、TLS/SSL第1〜3ヘッダタイプ特定部1004〜1006とタイプ判定部1008と、パケットが2つ以上のTLS/SSLメッセージをから構成される場合に、2番目のメッセージの位置を判定する第2メッセージ位置判定部1010と、パケットが3つ以上のTLS/SSLメッセージをから構成される場合に、3番目のメッセージの位置を判定する第3メッセージ位置判定部1011とを備える。
第2メッセージ位置判定部1010は、TCP/IPヘッダ内のLen1100の値が、一番目のTLS/SSLヘッダ内のSSL Len1114の値とSSLヘッダ長とTCP/IPヘッダ長の和と一致しない場合に、2番目のTLS/SSLメッセージの位置を判定して、TLS/SSL第2ヘッダタイプ特定部1005に通知する。さらに、TCP/IPヘッダ内のLen1100の値と、一番目のTLS/SSLヘッダ内のSSL Len1114の値とSSLヘッダ長とTCP/IPヘッダ長の和との差を、第3メッセージ位置判定部1011へ通知する。
第3メッセージ位置判定部1011は、第2メッセージ位置判定部1010から通知された差が、2番目のTLS/SSLヘッダ内のSSL Len1118の値とSSLヘッダ長の和と一致しない場合に、3番目のTLS/SSLメッセージの位置を判定して、TLS/SSL第3ヘッダタイプ特定部1004に通知する。
The packet type determination unit 1003 is a second message when the packet is composed of TLS / SSL first to third header type specification units 1004 to 1006, a type determination unit 1008, and two or more TLS / SSL messages. A second message position determination unit 1010 for determining the position of the third message, and a third message position determination unit 1011 for determining the position of the third message when the packet is composed of three or more TLS / SSL messages. Prepare.
The second message position determination unit 1010 determines that the Len 1100 value in the TCP / IP header does not match the SSL Len 1114 value in the first TLS / SSL header, the SSL header length, and the TCP / IP header length. The position of the second TLS / SSL message is determined and notified to the TLS / SSL second header type identification unit 1005. Further, a difference between the value of Len1100 in the TCP / IP header, the value of SSL Len1114 in the first TLS / SSL header, and the sum of the SSL header length and the TCP / IP header length is determined as the third message position determination unit 1011. To notify.
If the difference notified from the second message position determination unit 1010 does not match the value of the SSL Len 1118 in the second TLS / SSL header and the sum of the SSL header lengths, the third message position determination unit 1011 The TLS / SSL message position is determined and notified to the TLS / SSL third header type identification unit 1004.

TLS/SSL第1〜3ヘッダタイプ特定部1004〜1006は、図17に示すように、ペイロードが最大3つのTLS/SSLメッセージを含む場合に、各メッセージのタイプの種類を判定する。TLS/SSL第1ヘッダタイプ特定部1006の判定するメッセージタイプは、クライアントが送信するハンドシェークメッセージ(Client Hello,KeyExchange,ChangeCipherSpec,Finished),サーバが送信する平文データ,クライアントからの暗号データ(先頭部分,中盤,最後尾)(図17の1703〜1705のケース)、のいずれかとなる。TLS/SSL第2ヘッダタイプ特定部1005の判定するメッセージタイプは、クライアントが送信するハンドシェークメッセージ(ChangeCipherSpec,Finished)のいずれかとなる。TLS/SSL第3ヘッダタイプ特定部1004の判定するメッセージタイプは、Finishedのみとなる。
タイプ判定部1008は、TLS/SSL第2ヘッダタイプ特定部1005と、TLS/SSL第3ヘッダタイプ特定部1004の判定結果を、TLS/SSL第1ヘッダタイプ特定部1006の判定結果に統合して、判定結果を出力する。たとえば、TLS/SSL第1ヘッダタイプ特定部1006の判定結果がKeyExchangeで、TLS/SSL第2ヘッダタイプ特定部1005の判定結果が無しの場合、パケットタイプ=KeyExchangeの判定結果を出力する。TLS/SSL第1ヘッダタイプ特定部1006の判定結果がKeyExchangeで、TLS/SSL第2ヘッダタイプ特定部1005の判定結果がChangeCipherSpecで、TLS/SSL第3ヘッダタイプ特定部1005の判定結果が無しの場合、パケットタイプ=KeyExchange+ChangeCipherSpecの判定結果を出力する。TLS/SSL第1ヘッダタイプ特定部1006の判定結果がKeyExchangeで、TLS/SSL第2ヘッダタイプ特定部1005の判定結果がChangeCipherSpecで、TLS/SSL第3ヘッダタイプ特定部1005の判定結果がFinishedの場合、パケットタイプ=KeyExchange+ChangeCipherSpec+Finishedの判定結果を出力する。
メッセージ処理部1009は、パケットタイプ判定部1003の判定結果に基づいて、TLS/SSLメッセージの処理を行い、クライアントの送信パケットに含まれるハンドシェークメッセージに応じて、新たなTLS/SSL状態およびハンドシェークメッセージを含むパケットを作成する。
The TLS / SSL first to third header type specifying units 1004 to 1006 determine the type of each message type when the payload includes a maximum of three TLS / SSL messages as shown in FIG. The message type determined by the TLS / SSL first header type identification unit 1006 is a handshake message (Client Hello, KeyExchange, ChangeCipherSpec, Finished) transmitted by the client, plaintext data transmitted by the server, and encrypted data (first part, (Middle, last) (cases 1703 to 1705 in FIG. 17). The message type determined by the TLS / SSL second header type identification unit 1005 is any of a handshake message (ChangeCipherSpec, Finished) transmitted by the client. The message type determined by the TLS / SSL third header type specifying unit 1004 is only Finished.
The type determining unit 1008 integrates the determination results of the TLS / SSL second header type specifying unit 1005 and the TLS / SSL third header type specifying unit 1004 into the determination results of the TLS / SSL first header type specifying unit 1006. , Output the judgment result. For example, if the determination result of the TLS / SSL first header type specifying unit 1006 is Key Exchange and the determination result of the TLS / SSL second header type specifying unit 1005 is not, the determination result of packet type = Key Exchange is output. The determination result of the TLS / SSL first header type specifying unit 1006 is KeyExchange, the determination result of the TLS / SSL second header type specifying unit 1005 is ChangeCipherSpec, and the determination result of the TLS / SSL third header type specifying unit 1005 is none In this case, the determination result of packet type = KeyExchange + ChangeCipherSpec is output. The determination result of the TLS / SSL first header type specifying unit 1006 is KeyExchange, the determination result of the TLS / SSL second header type specifying unit 1005 is ChangeCipherSpec, and the determination result of the TLS / SSL third header type specifying unit 1005 is Finished. In this case, the determination result of packet type = KeyExchange + ChangeCipherSpec + Finished is output.
The message processing unit 1009 processes the TLS / SSL message based on the determination result of the packet type determination unit 1003, and displays a new TLS / SSL state and handshake message according to the handshake message included in the client transmission packet. Create a containing packet.

図28には、メッセージ処理部1009のブロック図を示す。メッセージ処理部1009は、メッセージの判定結果に応じてパケットと状態情報を振り分ける振り分け部2801と、Client Helloメッセージを含むパケットと状態情報を用いてメッセージの処理を行うClient Hello処理部2803と、KeyExchangeメッセージを含むパケットと状態情報を用いてメッセージの処理を行うKeyExchange処理部2804と、ChangeCipherSpecメッセージのみを含むパケットと状態情報を用いてメッセージの処理を行うChangeCipherSpec処理部2805と、Finishedメッセージを含むパケットと状態情報を用いてメッセージの処理を行うFinished処理部2806と、Alertメッセージを含むパケットと状態情報を用いてメッセージの処理を行うAlert処理部2807と、暗号メッセージを含むパケットと状態情報を用いてメッセージの処理を行う暗号処理部2808と、平文メッセージを含むパケットと状態情報を用いてメッセージの処理を行う平文処理部2809と、各処理部から新たに出力されたパケットと状態情報を集約する集約部2802と、を備える。
Client Hello処理部2803は、入力パケットがClient Helloメッセージを含む場合、クライアントランダムと暗号スイートを抽出して、作成したサーバランダムと、使用する暗号スイートを指定するServer Helloメッセージと、公開鍵を含むServer Certificateメッセージと、Server Hello Doneメッセージを含むパケットを作成する。クライアントランダムとサーバランダムは、TLS/SSL状態のClient Random1908とServer Random1907に書き込まれる。更に、Client HelloメッセージとServer Helloメッセージと、Server Certificateメッセージと、Server Hello Doneメッセージを用いて、ハッシュ値を途中まで計算し、途中結果と端数メッセージをInterim Hash1909に記入する。さらに、状態情報のClient State1209に、Client Helloメッセージまでを受信したことを表す状態値を格納し、作成済みパケットと、更新した状態情報を集約部2802へと出力する。
FIG. 28 shows a block diagram of the message processing unit 1009. The message processing unit 1009 includes a distribution unit 2801 that distributes packets and state information according to the determination result of the message, a client hello processing unit 2803 that performs message processing using the packet and state information including the client hello message, and a key exchange message. KeyExchange processing unit 2804 that processes a message using a packet including status and status information, a Packet CipherSpec processing unit 2805 that processes a message using only a packet including status Change information and a packet including status and a packet including a Finished message and status Finished processing unit 2806 that processes a message using information, and packet and state including Alert message An alert processing unit 2807 for processing a message using information, a cryptographic processing unit 2808 for processing a message using a packet containing encrypted message and status information, and a packet containing the plaintext message and status information A plaintext processing unit 2809 that performs processing, and an aggregation unit 2802 that aggregates newly output packets and state information from each processing unit.
When the input packet includes a client hello message, the client hello processing unit 2803 extracts a client random and cipher suite, creates a server random, a server hello message that specifies a cipher suite to be used, and a server including a public key. A packet including a Certificate message and a Server Hello Done message is created. The client random and server random are written in the Client Random 1908 and Server Random 1907 in the TLS / SSL state. Further, a hash value is calculated halfway using the Client Hello message, the Server Hello message, the Server Certificate message, and the Server Hello Done message, and the intermediate result and the fractional message are entered in the Interim Hash 1909. Further, the state value indicating that the client Hello message has been received is stored in the client state 1209 of the state information, and the created packet and the updated state information are output to the aggregating unit 2802.

KeyExchange処理部2804は、入力パケットがKeyExchangeメッセージを含む場合、KeyExchangeメッセージ内の暗号化プリマスターシークレットを復号化し、マスターシークレットと、サーバ側の鍵状態と、クライアント側の鍵状態と、サーバ側のMAC書込みシークレットと、クライアント側のMAC書込みシークレットと、を作成する。それぞれ、TLS/SSL状態のMaster Secret1911と、Server Key1901と、Client Key1902と、Server MAC Key1903と、Client MAC Key1904へと書き込まれる。更に、KeyExchangeメッセージと、Interim Hash1909に記入された途中結果と端数メッセージを用いて、ハッシュ値を途中まで計算し、途中結果と端数メッセージをInterim Hash1909に記入する。また、状態情報のClient State1209に、KeyExchangeメッセージまでを受信したことを表す状態値を格納する。入力パケットが、KeyExchangeメッセージと、ChangeCipherSpecメッセージを含む場合は、状態情報のClient State1209に、ChangeCipherSpecメッセージまでを受信したことを表す状態値を格納する。更に、入力パケットがKeyExchangeメッセージとFinishedメッセージの両方を含む場合に、Finishedメッセージだけを抽出したパケットと、更新済みの状態情報を、Finished処理部2806へと送る。Finishedメッセージを含まない場合は、更新済みの状態情報を集約部2802へと出力する。
ChangeCipherSpec処理部2805は、入力パケットがChangeCipherSpecメッセージを含む場合、状態情報のClient State1209に、ChangeCipherSpecメッセージまでを受信したことを表す状態値を格納し、状態情報を集約部2802へと出力する。
Finished処理部2806は、入力パケットがFinishedメッセージを含む場合、TLS/SSL状態のServer Key1901を用いて復号化し、ベリファイ値と改竄チェック用のMAC値を抽出する。更に、Interim Hash1909に記入された途中結果と端数メッセージを用いて、ベリファイ値を計算し、Finished記載のベリファイ値と一致するか否かを判定する。一致しない場合は、Alertメッセージを含むパケットを作成する。一致する場合はFinishedメッセージと、Interim Hash1909に記入された途中結果と端数メッセージを用いて、ベリファイ値を計算し、ChangeCipherSpecメッセージとFinishedメッセージを含むパケットを作成する。Finishedメッセージは、改竄チェック用のMAC値を計算した上で、暗号化を行う。さらに、状態情報のClient State1209に、Finishedメッセージまでを受信したことを表す状態値を格納し、作成済みパケットと、更新した状態情報を集約部2802へと出力する。
When the input packet includes the KeyExchange message, the KeyExchange processing unit 2804 decrypts the encrypted premaster secret in the KeyExchange message, and the master secret, the server-side key state, the client-side key state, and the server-side MAC Create a write secret and a client-side MAC write secret. The data is written to the master secret 1911, the server key 1901, the client key 1902, the server MAC key 1903, and the client MAC key 1904 in the TLS / SSL state, respectively. Further, the hash value is calculated halfway using the KeyExchange message and the intermediate result and fraction message entered in the Interim Hash 1909, and the intermediate result and fraction message are entered in the Interim Hash 1909. Further, a state value indicating that the key exchange message is received is stored in the client state 1209 of the state information. When the input packet includes a KeyExchange message and a ChangeCipherSpec message, a state value indicating that the ChangeCipherSpec message has been received is stored in the Client State 1209 of the state information. Furthermore, when the input packet includes both the KeyExchange message and the Finished message, the packet from which only the Finished message is extracted and the updated status information are sent to the Finished processing unit 2806. When the Finished message is not included, the updated status information is output to the aggregation unit 2802.
If the input packet includes a ChangeCipherSpec message, the ChangeCipherSpec processing unit 2805 stores the status value indicating that the ChangeCipherSpec message has been received in the Client State 1209 of the status information, and outputs the status information to the aggregation unit 2802.
When the input packet includes the Finished message, the Finished processing unit 2806 uses the TLS / SSL state Server Key 1901 to decode the extracted packet, and extracts the verify value and the MAC value for tampering check. Furthermore, the verification value is calculated using the intermediate result and the fractional message entered in Interim Hash 1909, and it is determined whether or not it matches the verification value described in Finished. If they do not match, a packet including an Alert message is created. If they match, the verification value is calculated using the Finished message, the intermediate result entered in the Interim Hash 1909 and the fractional message, and a packet including the ChangeCipherSpec message and the Finished message is created. The Finished message is encrypted after calculating the MAC value for tampering check. Furthermore, the state value indicating that the Finished message has been received is stored in the client state 1209 of the state information, and the created packet and the updated state information are output to the aggregation unit 2802.

Alert処理部2807は、入力パケットがAlertメッセージを含む場合、警告メッセージの内容に応じて、TCPコネクションを終了するためのFINパケットを作成し、状態情報のClient State1209に、Alertメッセージを受信したことを表す状態値を格納し、作成したパケットと、更新した状態情報を集約部2802へと出力する。
暗号処理部2808は、入力パケットが暗号化データを含むサーバ宛パケットだった場合は、TLS/SSL状態のServer Key1901を用いて復号化し、復号化済みの平文を用いて改竄チェック用のMAC値を計算する。復号化したパケットにMAC値が含まれる場合は、計算したMAC値と、パケットに含まれるMAC値が一致するか否かを判定し、判定結果を表す状態値を、状態情報のClient State1209に格納する。さらに、復号化したパケットと、更新した状態情報を、集約部2802へと出力する。
平文処理部2809は、入力パケットが平文データを含むクライアント宛パケットだった場合は、平文を用いて改竄チェック用のMAC値を計算し、平文データに改竄チェック用のMAC値を追加した上で暗号化したクライアント宛パケットを、新たに作成する。また、入力パケットが改竄チェック用のMAC値を含まない平文データを暗号化したサーバ宛パケットだった場合は、暗号データを復号化したサーバ宛パケットと改竄チェック用のMAC値の途中結果を作成する。改竄チェック用のMAC値の途中結果は、TLS/SSL状態格納テーブル813に蓄積される。さらに、入力パケットが改竄チェック用のMAC値を含む平文データを暗号化したサーバ宛パケットだった場合は、TLS/SSL状態格納テーブル813に蓄積された改竄チェック用のMAC値の途中結果を読み出して、暗号データを復号化したサーバ宛パケットと改竄チェック用のMAC値を作成し、改竄チェック用のMAC値の整合性をチェックする。
以上のパケットタイプ判定部1003とメッセージ処理部1009とを備えることで、TLS/SSLメッセージ処理部812は、メッセージ単位ではなくパケット単位で処理することが可能となる。
If the input packet includes an Alert message, the Alert processing unit 2807 creates a FIN packet for ending the TCP connection according to the content of the warning message, and indicates that the Alert message has been received in the client state 1209 of the state information. The state value to be represented is stored, and the created packet and the updated state information are output to the aggregation unit 2802.
When the input packet is a packet addressed to the server including the encrypted data, the encryption processing unit 2808 decrypts it using the server key 1901 in the TLS / SSL state, and uses the decrypted plaintext to obtain the MAC value for tampering check. calculate. When the MAC value is included in the decrypted packet, it is determined whether or not the calculated MAC value matches the MAC value included in the packet, and the state value indicating the determination result is stored in the client state 1209 of the state information. To do. Further, the decrypted packet and the updated state information are output to the aggregation unit 2802.
When the input packet is a packet addressed to the client including the plaintext data, the plaintext processing unit 2809 calculates the MAC value for the tampering check using the plaintext, adds the MAC value for the tampering check to the plaintext data, and then encrypts it. Create a new packet addressed to the client. Also, if the input packet is a packet addressed to a server that encrypts plain text data that does not include the MAC value for tampering check, an intermediate result of the packet addressed to the server that decrypted the encrypted data and the MAC value for tampering check is created. . The intermediate result of the MAC value for falsification check is accumulated in the TLS / SSL state storage table 813. Further, when the input packet is a packet addressed to the server that encrypts plain text data including the MAC value for tampering check, the intermediate result of the MAC value for tampering check stored in the TLS / SSL state storage table 813 is read. Then, the server-addressed packet obtained by decrypting the encrypted data and the MAC value for falsification check are created, and the consistency of the MAC value for falsification check is checked.
By including the packet type determination unit 1003 and the message processing unit 1009 described above, the TLS / SSL message processing unit 812 can perform processing in units of packets, not in units of messages.

5.TCP/IPレイヤ処理部(2/2)

サーバ宛平文パケット処理部926は、TLS/SSLメッセージ処理部812が出力するサーバ宛パケットの処理を行う。以下、図9等を参照して説明する。
サーバ宛平文パケット処理部926は、TCPペイロード長が0より大きく、改竄チェック用のMAC値を含まない復号化済みサーバ宛平文パケットを受け取ったときは、MAC未ベリファイの情報と共に、サーバ宛送信バッファ811に蓄積する(934)。更に、TCP状態に記載の、オフローダ100がクライアント側に向けて送信済みのパケットのシーケンス番号を格納するSeq for Client1206を送信シーケンス番号に、クライアントの送信済みパケットに対してオフローダ100がACKを返信済みのシーケンス番号を格納するAcked Client Seq1207を宛先シーケンス番号に用いて、クライアント向けのACKパケットを作成する。図7に示すように、クライアントからの暗号パケットEncrypted Data701,704,706に対して、ACKパケット702、705、707が返信される。
TCPペイロード長が0より大きく、正しい改竄チェック用のMAC値を含む復号化済みサーバ宛平文パケットを受け取ったときは、これまで蓄積したMAC未ベリファイの復号化済みサーバ宛平文パケットを読み出して(933)、先に集約部904に出力してから、改竄チェック用のMAC値を含む復号化済みサーバ宛平文パケットを出力する(943)。蓄積してあったMAC未ベリファイ済みの復号化済みサーバ宛平文パケットは、MACベリファイ済みに書き換える(935)。更に、TCP状態に記載の、Seq for Client1206を送信シーケンス番号に、Acked Client Seq1207を宛先シーケンス番号に用いて、クライアント向けのACKパケットを作成する。図7に示すように、平文パケット712〜715が連続してサーバ101に向けて送信され、ACKパケット711がクライアントに返信される。
TCPペイロード長が0より大きく、誤った改竄チェック用のMAC値を含む復号化済みサーバ宛平文パケットを受け取ったときは、これまで蓄積したMAC未ベリファイの復号化済みサーバ宛平文パケットを削除して(935)、Alertメッセージを含むクライアント宛パケットと、TCPコネクションの終了を開始するサーバ宛FINパケットを作成し、集約部904へと出力する。図7に示すように、Alertパケット709がクライアント102に送信され、FINパケット710がサーバ101へと送信される。
5. TCP / IP layer processing part (2/2)

The server-destined plain text packet processing unit 926 processes the server-destined packet output from the TLS / SSL message processing unit 812. Hereinafter, a description will be given with reference to FIG.
The server-destined plaintext packet processing unit 926 receives a decrypted server-destined plaintext packet whose TCP payload length is greater than 0 and does not include the MAC value for tampering check, along with the MAC unverified information and the server-destined transmission buffer 811 is stored (934). Further, the Seq for Client 1206 that stores the sequence number of the packet that has been transmitted to the client side by the offloader 100 described in the TCP state is set to the transmission sequence number, and the offloader 100 has returned an ACK to the transmitted packet of the client. The ACK packet for the client is created using the Acked Client Seq 1207 storing the sequence number of the client as the destination sequence number. As shown in FIG. 7, ACK packets 702, 705, and 707 are returned in response to the encrypted packets Encrypted Data 701, 704, and 706 from the client.
When a decrypted server-destined plaintext packet having a TCP payload length larger than 0 and including a correct MAC value for tampering check is received, the MAC-unverified decrypted server-destined plaintext packet stored so far is read (933) ), First output to the aggregating unit 904, and then output a decrypted plaintext packet addressed to the server including the MAC value for falsification check (943). The stored plaintext packet destined for the MAC-unverified server is rewritten to MAC-verified (935). Further, an ACK packet for the client is created by using Seq for Client 1206 described in the TCP state as a transmission sequence number and Acked Client Seq 1207 as a destination sequence number. As shown in FIG. 7, plain text packets 712 to 715 are continuously transmitted to the server 101, and an ACK packet 711 is returned to the client.
When a decrypted server-addressed plaintext packet that has a TCP payload length greater than 0 and includes an incorrect MAC value for tampering check is received, the accumulated plaintext packet addressed to the server that has not been verified is deleted. (935) The client-destined packet including the Alert message and the server-destined FIN packet for starting the termination of the TCP connection are created and output to the aggregating unit 904. As shown in FIG. 7, an Alert packet 709 is transmitted to the client 102, and a FIN packet 710 is transmitted to the server 101.

図18には、サーバ送信ACK処理部924の実施するフローチャートを示す。
サーバ送信ACK処理部924は、サーバからのACKパケットを受信すると、受信パケットの宛先シーケンス番号DSeq1107が、TCP状態記載のAcked Seq for Server1218よりも小さいか否かを判定する(ステップ1801)。小さい場合は、処理を終了して、パケットを廃棄する(ステップ1802)。大きい場合は、受信パケットの宛先シーケンス番号DSeq1107が、TCP状態記載のAcked Seq for Server1218よりも大きいか否かを判定する(ステップ1803)。大きい場合は、受信パケットの宛先シーケンス番号DSeq1107よりも、送信元シーケンス番号が小さなパケットをサーバ宛送信バッファ811から削除し、TCP状態記載のAcked Seq for Server1218に、受信パケット記載の宛先シーケンス番号DSeq1107を記入して、TCPコネクション状態格納テーブル808へ書き込む(947)(ステップ1804)。一致する場合は、TCP状態記載のServer State1219をみて、2回目に一致する重複ACKの場合か否かを判定する(ステップ1805)。2回目に一致する重複ACKではない場合は、TCP状態記載のServer State1219に、1回目に一致する重複ACKであることを記入する(ステップ1806)。2回目に一致する重複ACKである場合は、受信パケットの宛先シーケンス番号Dseq1107と同一の送信元シーケンス番号を持つパケットをサーバ宛送信バッファ811から読み出す(ステップ1807)。読み出したパケットは、集約部904へと出力される(950)。なお、ここでは一例として2回としたが、適宜の回数に設定することができる。
以上のように、サーバ送信ACK処理部924が図18に示すフローチャートに従って処理することで、サーバ宛送信バッファからのパケット読出しを2回目の重複ACKを受信したときに限定し、読出し回数を抑制することが可能となる。
FIG. 18 shows a flowchart executed by the server transmission ACK processing unit 924.
When receiving the ACK packet from the server, the server transmission ACK processing unit 924 determines whether or not the destination sequence number DSeq 1107 of the received packet is smaller than the Acked Seq for Server 1218 described in the TCP state (step 1801). If it is smaller, the process is terminated and the packet is discarded (step 1802). If it is larger, it is determined whether or not the destination sequence number DSeq 1107 of the received packet is larger than the Acked Seq for Server 1218 described in the TCP state (step 1803). If larger, the packet with the transmission source sequence number smaller than the destination sequence number DSeq 1107 of the received packet is deleted from the server-destined transmission buffer 811 and the destination sequence number DSeq 1107 described in the received packet is set in the Acked Seq for Server 1218 described in the TCP state. It is entered and written in the TCP connection state storage table 808 (947) (step 1804). If they match, the server state 1219 described in the TCP state is checked to determine whether or not it is a duplicate ACK that matches the second time (step 1805). If it is not the duplicate ACK that matches the second time, the fact that it is the duplicate ACK that matches the first time is entered in the Server State 1219 described in the TCP state (step 1806). If the duplicate ACK matches the second time, the packet having the same source sequence number as the destination sequence number Dseq 1107 of the received packet is read from the server-addressed transmission buffer 811 (step 1807). The read packet is output to the aggregation unit 904 (950). In addition, although it was set as 2 times here as an example, it can set to a suitable frequency | count.
As described above, the server transmission ACK processing unit 924 performs processing according to the flowchart shown in FIG. 18, thereby limiting the packet reading from the server-addressed transmission buffer when the second duplicate ACK is received and suppressing the number of readings It becomes possible.

6.追記
本発明では、受信バッファ809の、サイズまたはメモリに占めるアドレス範囲を指定するレジスタを備え、外部の端末から、レジスタ値を変更するようにしてもよい。
また、本発明では、クライアント宛送信バッファ810の、サイズまたはメモリに占めるアドレス範囲を指定するレジスタを備え、外部の端末から、レジスタ値を変更するようにしてもよい。
また、本発明では、サーバ宛送信バッファ811の、サイズまたはメモリに占めるアドレス範囲を指定するレジスタを備え、外部の端末から、レジスタ値を変更するようにしてもよい。
6). Addendum In the present invention, a register for designating the size of the reception buffer 809 or the address range occupied in the memory may be provided, and the register value may be changed from an external terminal.
Further, in the present invention, a register for designating the size or address range occupied by the memory of the client transmission buffer 810 may be provided, and the register value may be changed from an external terminal.
In the present invention, a register for designating the size or address range of the server-addressed transmission buffer 811 may be provided, and the register value may be changed from an external terminal.

本発明は、TLS/SSLコネクション確立以外にも、各種の暗号化通信のためのコネクション確立に適用することができる。
The present invention can be applied to establishment of connections for various encrypted communications other than establishment of TLS / SSL connections.

800…パケット処理装置、807…TCP/IPレイヤ処理部、905…TCPの状態遷移判定部、911…ACK不一致パケット処理部、921…後続パケット再入力部、922…クライアント送信ACK処理部、924…サーバ送信ACK処理部、926…サーバ宛平文パケット処理部、927…クライアント宛パケット処理部。   800 ... Packet processing device, 807 ... TCP / IP layer processing unit, 905 ... TCP state transition determination unit, 911 ... ACK mismatch packet processing unit, 921 ... Subsequent packet re-input unit, 922 ... Client transmission ACK processing unit, 924 ... Server transmission ACK processing unit, 926... Server-directed plaintext packet processing unit, 927.

Claims (15)

クライアント端末とサーバ端末との間に設置され、前記サーバ端末から受信した平文データを暗号化して前記クライアント端末に送信し、前記クライアント端末から受信した暗号データを復号化して前記サーバ端末に送信するために、暗号化通信のコネクション確立シーケンスを前記サーバ端末に代わって実行するための通信装置において、
端末識別情報に対応して、端末が通信装置に送信してきたデータ量を表すための値である第1端末シーケンス情報と、端末が送信してきたデータのうち、実際に通信装置が受信して確認応答を端末に返信したデータ量を表す第1確認シーケンス情報と、通信装置が端末に送信したデータ量を表すための値である第2端末シーケンス情報と、通信装置が実際に端末からの確認応答を受信済みのデータ量である第2確認シーケンス情報と、を含むコネクション状態データを記憶し、コネクション毎にどこまで受信したかを記録するためのコネクション状態テーブルと、
パケットの到着順が逆転した場合に、後に到着すべきパケットをパケットヘッダと共に蓄積するための受信バッファと、
前記コネクション状態テーブルから、受信パケットに対応するコネクション状態を読出し、受信パケットが、受信済みデータの最後尾直後から後続しているか否かを判定し、パケットの到着順が逆転した場合に、後に到着すべきパケットをパケットヘッダと共に前記受信バッファに蓄積するためのパケット処理部と
を備え、

前記パケット処理部は、
端末から、送信元識別情報、送信シーケンス情報、宛先シーケンス情報、ペイロード長を含む、暗号化通信のコネクション確立のための第1の受信パケットを受信し、
前記コネクション状態テーブルを参照し、前記第1の受信パケットの送信元識別情報が一致するコネクション状態データを求め、
該コネクション状態データについて、前記端末からの前記第1の受信パケットの送信シーケンス情報Aと、第1確認シーケンス情報Aが一致する場合、第1端末シーケンス情報Aにペイロード長Lを加算して A+L に更新し、第1確認シーケンス情報Aにペイロード長Lを加算して A+L に更新し、シーケンス情報 A+L を宛先シーケンス情報としたペイロード長0の第1の送信パケットを、前記端末に向けて送信し、
一方、前記端末から、送信シーケンス情報 A+L 及びペイロード長Lの第2の受信パケットが送られたが、該第2の受信パケットを受信する前に、続けて前記端末から送信された、送信シーケンス情報 A+2L 及びペイロード長Lの第3の受信パケットを受信したとき、
前記コネクション状態テーブルを参照し、前記第3の受信パケットに含まれる送信シーケンス情報 A+2L と、第1確認シーケンス情報のシーケンス情報 A+L が異なる場合、該第3のパケットのペイロード長が0より大きければ該第3の受信パケットを前記受信バッファに蓄積し、該第3の受信パケットに含まれる送信シーケンス情報 A+2L を、第1端末シーケンス情報として前記コネクション状態テーブルを更新し、第1確認シーケンス情報のシーケンス情報 A+L を宛先シーケンス情報としたペイロード長0の第2の送信パケットを作成し、該第2の送信パケットを前記端末に向けて送信し、
前記端末は、前記第2の送信パケットを受け取ると、宛先シーケンス情報 A+L により、前記第2の受信パケットが前記通信装置で受信されていないことを判定することにより、前記端末から、送信シーケンス情報を A+L 及びペイロード長Lの前記第2の受信パケット又は前記第2の受信パケットと同じ内容の第4の受信パケットを受信し、
前記コネクション状態テーブルを参照し、前記第2又は第4の受信パケットの送信シーケンス情報 A+L と、第1確認シーケンス情報のシーケンス情報 A+L が一致することを確認すると、第1確認シーケンス情報 A+L に、前記第4の受信パケットのペイロード長Lを加算して A+2L に更新し、シーケンス情報 A+2L を宛先シーケンス情報としたペイロード長0の第3の送信パケットを作成し、該第3の送信パケットを前記端末に向けて送信する
前記通信装置。
Installed between a client terminal and a server terminal, for encrypting plain text data received from the server terminal and transmitting it to the client terminal, and for decrypting encrypted data received from the client terminal and transmitting to the server terminal In a communication device for executing a connection establishment sequence for encrypted communication on behalf of the server terminal,
Corresponding to the terminal identification information, the communication device actually receives and confirms the first terminal sequence information, which is a value for representing the amount of data transmitted from the terminal to the communication device, and the data transmitted from the terminal. First confirmation sequence information indicating the amount of data sent back to the terminal as a response, second terminal sequence information that is a value representing the amount of data transmitted from the communication device to the terminal, and the confirmation response from the terminal that the communication device actually transmits A connection status table for storing the connection status data including the second confirmation sequence information, which is the amount of data that has been received, and recording how far each connection has been received,
A reception buffer for accumulating packets that should arrive later together with the packet header when the arrival order of the packets is reversed;
Reads the connection status corresponding to the received packet from the connection status table, determines whether the received packet follows immediately after the end of the received data, and arrives later when the packet arrival order is reversed. A packet processing unit for accumulating packets to be received in the reception buffer together with a packet header ,

The packet processing unit
Receiving from the terminal a first received packet for establishing a connection for encrypted communication, including source identification information, transmission sequence information, destination sequence information, and payload length;
Referring to the connection state table, obtain connection state data that matches the source identification information of the first received packet,
For the connection status data, when the transmission sequence information A of the first received packet from the terminal and the first confirmation sequence information A match, the payload length L is added to the first terminal sequence information A to A + L Update, add the payload length L to the first confirmation sequence information A to update to A + L, and send the first transmission packet with the payload length 0 with the sequence information A + L as the destination sequence information to the terminal,
On the other hand, the transmission sequence information A + L and the second reception packet having the payload length L are transmitted from the terminal, but the transmission sequence information is transmitted from the terminal in succession before receiving the second reception packet. When a third received packet with A + 2L and payload length L is received,
Referring to the connection state table, when the transmission sequence information A + 2L included in the third received packet is different from the sequence information A + L of the first confirmation sequence information, if the payload length of the third packet is greater than 0, The third reception packet is accumulated in the reception buffer, the connection state table is updated using transmission sequence information A + 2L included in the third reception packet as first terminal sequence information, and sequence information of the first confirmation sequence information Creating a second transmission packet having a payload length of 0 with A + L as destination sequence information, and transmitting the second transmission packet to the terminal;
When the terminal receives the second transmission packet, the terminal determines transmission sequence information from the terminal by determining that the second reception packet is not received by the communication device based on destination sequence information A + L. Receiving the second received packet of A + L and payload length L or the fourth received packet having the same content as the second received packet;
Referring to the connection state table and confirming that the transmission sequence information A + L of the second or fourth received packet matches the sequence information A + L of the first confirmation sequence information, the first confirmation sequence information A + L The payload length L of the fourth received packet is added and updated to A + 2L, a third transmission packet with a payload length of 0 is generated with the sequence information A + 2L as the destination sequence information, and the third transmission packet is sent to the terminal The said communication apparatus which transmits toward.
請求項1に記載の通信装置において、
前記パケット処理部は、
パケットに含まれるメッセージを処理する暗号化通信メッセージ処理部と、
前記暗号化通信メッセージ処理部における送信シーケンス情報 A+L の前記第2又は第4の受信パケットの処理終了時に、送信シーケンス情報 A+2L の前記第3の受信パケットが受信バッファに蓄積されている場合に、該送信シーケンス情報 A+2L の前記第3の受信パケットを読み出して前記コネクション状態と共に前記暗号化通信メッセージ処理部に出力する後続パケット再入力部と、
を備え、到着順に誤りのある一部のパケットのみが前記受信バッファを経由することで、端末が送信した順番にパケットが前記暗号化通信メッセージ処理部に到着することを特徴とする通信装置。
The communication device according to claim 1,
The packet processing unit
An encrypted communication message processing unit for processing a message included in the packet;
When the third reception packet of the transmission sequence information A + 2L is accumulated in the reception buffer at the end of the processing of the second or fourth reception packet of the transmission sequence information A + L in the encrypted communication message processing unit, A subsequent packet re-input unit that reads the third received packet of the transmission sequence information A + 2L and outputs the third received packet together with the connection state to the encrypted communication message processing unit;
And only a part of the packets having errors in arrival order pass through the reception buffer, so that the packets arrive at the encrypted communication message processing unit in the order of transmission by the terminal.
請求項2に記載の通信装置において、
前記暗号化通信メッセージ処理部が作成したクライアント宛パケットをパケットヘッダと共に蓄積するクライアント宛送信バッファをさらに備え、
前記パケット処理部は、
前記暗号化通信メッセージ処理部が作成したクライアント宛パケットをパケットヘッダと共に前記クライアント宛送信バッファに蓄積すると共に、前記暗号化通信メッセージ処理部が作成した前記コネクション状態を前記コネクション状態テーブルに記録するクライアント宛パケット処理部と、
クライアント端末から受信したことを通知する確認応答パケットを受信したときに、前記クライアント宛て送信バッファの対応するパケットを消去し、再送を要求する確認応答パケットを予め定められた回数以上受信したときに、前記クライアント宛て送信バッファの対応するパケットを読み出して再送するクライアント送信ACK処理部と
を備えることで、前記クライアント宛送信バッファからのパケット読出し回数を抑制することを特徴とする通信装置。
The communication device according to claim 2,
Further comprising a client-addressed transmission buffer for accumulating packets addressed to the client created by the encrypted communication message processing section together with a packet header ;
The packet processing unit
The packet addressed to the client created by the encrypted communication message processing unit is stored in the transmission buffer addressed to the client together with a packet header, and the connection state created by the encrypted communication message processing unit is recorded in the connection state table. A packet processing unit;
When an acknowledgment packet notifying that it has been received from the client terminal is received, the corresponding packet in the transmission buffer addressed to the client is deleted, and when an acknowledgment packet requesting retransmission is received more than a predetermined number of times, A communication apparatus comprising: a client transmission ACK processing unit that reads and retransmits a corresponding packet in the transmission buffer addressed to the client, thereby suppressing the number of packet readings from the transmission buffer addressed to the client.
請求項2に記載の通信装置において、
前記暗号化通信メッセージ処理部は、
1つまたは複数または分割された暗号化通信のためのメッセージを含むパケットを入力し、入力された該メッセージに、どのようなメッセージタイプで暗号化通信のコネクション確立のためのメッセージが含まれるかを判定するための、パケットタイプ判定部を備え、
前記暗号化通信メッセージ処理部は、
暗号化通信のためのメッセージを処理する場合に、前記パケットタイプ判定部の判定結果に基づいて、
入力パケットが、サーバ端末が送信する平文データを含むパケットだった場合は、平文データを暗号化したクライアント宛パケットを作成し、
入力パケットが、クライアント端末が送信するハンドシェークメッセージを1つまたは複数含む場合は、受信した1つまたは複数のハンドシェークメッセージに対応するハンドシェークメッセージを含むパケットを作成し、
入力パケットが、クライアント端末が送信する暗号データを含み改竄チェック用のMAC値を含まないパケットだった場合は、暗号データを複号化したサーバ宛パケットとMAC値の途中結果を作成し、
入力パケットが、クライアント端末が送信する暗号データを含み改竄チェック用のMAC値を含むパケットだった場合は、暗号データを複号化したサーバ宛パケットと改竄チェック用のMAC値を作成し、改竄チェック用のMAC値の整合性をチェックすることで、
メッセージ単位ではなくパケット単位で処理することを特徴とする通信装置。
The communication device according to claim 2,
The encrypted communication message processing unit
A packet including a message for one or more or divided encrypted communications is input, and the input message includes the message type for establishing a connection for encrypted communication. A packet type determination unit for determining,
The encrypted communication message processing unit
When processing a message for encrypted communication, based on the determination result of the packet type determination unit,
If the input packet is a packet containing plain text data sent by the server terminal, create a packet for the client that encrypts the plain text data,
If the input packet contains one or more handshake messages sent by the client terminal, create a packet containing a handshake message corresponding to the received one or more handshake messages;
If the input packet is a packet that contains the encrypted data sent by the client terminal and does not contain the MAC value for falsification check, create an intermediate result of the packet addressed to the server that decrypted the encrypted data and the MAC value,
If the input packet is a packet that includes encrypted data sent by the client terminal and includes a MAC value for falsification check, create a packet addressed to the server that decrypts the encrypted data and a MAC value for falsification check, and check the falsification By checking the consistency of the MAC value for
A communication apparatus that processes in units of packets instead of in units of messages.
請求項4に記載の通信装置において、
サーバ宛パケットをMACベリファイの情報と共に蓄積するサーバ宛送信バッファをさらに備え、
前記パケット処理部は、
前記暗号化通信メッセージ処理部から、改竄チェック用のMAC値を含まない復号化済みパケットを受信したときに、MAC未ベリファイの情報と共に前記送信バッファに蓄積し、及び、前記暗号化通信メッセージ処理部から、正しい改竄チェック用のMAC値を含む復号化済みパケットを受け取ったときに、前記送信バッファに蓄積したMAC未ベリファイのパケットをMACベリファイ済とした上で読み出して送信してから、正しい改竄チェック用のMAC値を含む復号化済みパケットを送信し、及び、前記暗号化通信メッセージ処理部から、誤った改竄チェック用のMAC値を含む復号化済みパケットを受け取ったときに、前記送信バッファに蓄積したMAC未ベリファイのパケットを消去するサーバ宛平文パケット処理部と、
サーバ端末から、受信したことを通知する確認応答を受信したときに、前記サーバ宛送信バッファの対応するパケットを消去し、サーバ端末から、予め定められた回数以上再送を要求する確認応答を受信したときに、前記サーバ宛送信バッファの対応するパケットを読み出して再送するサーバ送信ACK処理部と、
を備えることで、
前記サーバ宛送信バッファからのパケット読出し回数の抑制することを特徴とする通信装置。
The communication device according to claim 4, wherein
A server-addressed transmission buffer for accumulating the server-addressed packet together with the MAC verify information;
The packet processing unit
When a decrypted packet that does not include a MAC value for falsification check is received from the encrypted communication message processing unit, it is stored in the transmission buffer together with MAC unverified information, and the encrypted communication message processing unit When a decrypted packet including a MAC value for correct tampering check is received from the packet, the MAC unverified packet stored in the transmission buffer is read out after being MAC verified, and then the correct tampering check is performed. When the decrypted packet including the MAC value for transmission is transmitted and the decrypted packet including the MAC value for erroneous tampering check is received from the encrypted communication message processing unit, the packet is stored in the transmission buffer. A plaintext packet processing unit addressed to the server for erasing the MAC unverified packet,
When a confirmation response notifying that it has been received is received from the server terminal, the corresponding packet in the transmission buffer addressed to the server is deleted, and the confirmation response requesting retransmission is received from the server terminal more than a predetermined number of times. A server transmission ACK processing unit that reads and retransmits a corresponding packet in the server-addressed transmission buffer;
By providing
A communication apparatus characterized in that the number of packet reads from the server-addressed transmission buffer is suppressed.
請求項1に記載の通信装置であって、
前記受信バッファの、サイズまたはメモリに占めるアドレス範囲を指定するレジスタを備え、
前記通信装置の外部の端末から、前記レジスタ値を変更することを特徴とする通信装置。
The communication device according to claim 1,
A register for designating a size or an address range occupying the memory of the reception buffer;
The communication apparatus, wherein the register value is changed from a terminal external to the communication apparatus.
請求項3に記載の通信装置であって、
前記クライアント宛送信バッファの、サイズまたはメモリに占めるアドレス範囲を指定するレジスタを備え、
前記通信装置の外部の端末から、前記レジスタ値を変更することを特徴とする通信装置。
The communication device according to claim 3,
A register for designating a size or an address range occupying memory of the transmission buffer addressed to the client;
The communication apparatus, wherein the register value is changed from a terminal external to the communication apparatus.
請求項5に記載の通信装置であって、
前記サーバ宛送信バッファの、サイズまたはメモリに占めるアドレス範囲を指定するレジスタを備え、
前記通信装置の外部の端末から、前記レジスタ値を変更することを特徴とする通信装置。
The communication device according to claim 5,
A register for designating a size of the transmission buffer addressed to the server or an address range occupied in memory
The communication apparatus, wherein the register value is changed from a terminal external to the communication apparatus.
請求項1に記載の通信装置において、
1つまたは複数または分割された暗号化通信のためのメッセージを含むパケットを入力し、入力された該メッセージに、どのようなメッセージタイプで暗号化通信のコネクション確立のためのメッセージが含まれるかを判定し、パケットに含まれるメッセージを処理するための暗号化通信メッセージ処理部をさらに備え、
クライアント端末からは、暗号化したマスターシークレットを含む第1コネクション確立メッセージと、暗号化通信の開始を通知する第2コネクション確立メッセージと、メッセージをベリファイするための第3コネクション確立メッセージを含む暗号化通信のコネクション確立のためのパケットを受信する際、
第1から第3のコネクション確立メッセージを別々の3つのパケットで到着するタイプ、第1コネクション確立メッセージと第2コネクション確立メッセージ・プラス・第3コネクション確立メッセージの2つのパケットで到着するタイプ、第1コネクション確立メッセージ・プラス・第2コネクション確立メッセージと第3コネクション確立メッセージの2つのパケットで到着するタイプ、第2コネクション確立メッセージと第3コネクション確立メッセージの2つのパケットで到着するタイプ、
のいずれかのタイプで受信し、
前記暗号化通信メッセージ処理部は、前記いずれかのタイプを判定することにより、メッセージをメッセージ単位ではなくパケット単位で処理することを特徴とする通信装置。
The communication device according to claim 1,
A packet including a message for one or more or divided encrypted communications is input, and the input message includes the message type for establishing a connection for encrypted communication. An encrypted communication message processing unit for determining and processing a message included in the packet;
From the client terminal, the encrypted communication including the first connection establishment message including the encrypted master secret, the second connection establishment message for notifying the start of the encrypted communication, and the third connection establishment message for verifying the message. When receiving a packet for establishing a connection
A type in which the first to third connection establishment messages arrive in three separate packets, a type in which the first connection establishment message and the second connection establishment message plus a third connection establishment message arrive in two packets, first A connection establishment message plus a type that arrives in two packets of a second connection establishment message and a third connection establishment message, a type that arrives in two packets of a second connection establishment message and a third connection establishment message,
Receive in any type of
The encrypted communication message processing unit processes a message not in units of messages but in units of packets by determining one of the types.
請求項1に記載の通信装置において、
受信したパケットが接続要求パケットであるとき、新たなエントリを前記コネクション状態テーブルに作成することを特徴とする通信装置。
The communication device according to claim 1,
When the received packet is a connection request packet, a new entry is created in the connection state table.
請求項1に記載の通信装置において、
前記端末は、クライアント端末又はサーバ端末であることを特徴とする通信装置。
The communication device according to claim 1,
The communication apparatus, wherein the terminal is a client terminal or a server terminal.
クライアント端末とサーバ端末との間に設置され、前記サーバ端末から受信した平文データを暗号化して前記クライアント端末に送信し、前記クライアント端末から受信した暗号データを復号化して前記サーバ端末に送信するために、暗号化通信のコネクション確立シーケンスを前記サーバ端末に代わって実行するための通信装置において、
端末識別情報に対応して、端末が通信装置に送信してきたデータ量を表すための値である第1端末シーケンス情報と、端末が送信してきたデータのうち、実際に通信装置が受信して確認応答を端末に返信したデータ量を表す第1確認シーケンス情報と、通信装置が端末に送信したデータ量を表すための値である第2端末シーケンス情報と、通信装置が実際に端末からの確認応答を受信済みのデータ量である第2確認シーケンス情報と、を含むコネクション状態データを記憶し、コネクション毎にどこまで受信したかを記録するためのコネクション状態テーブルと、
パケットの到着順が逆転した場合に、後に到着すべきパケットをパケットヘッダと共に蓄積するための受信バッファと、
前記コネクション状態テーブルから、受信パケットに対応するコネクション状態を読出し、受信パケットが、受信済みデータの最後尾直後から後続しているか否かを判定し、パケットの到着順が逆転した場合に、後に到着すべきパケットをパケットヘッダと共に前記受信バッファに蓄積するためのパケット処理部と
を備え、

前記パケット処理部は、
端末へ、送信元識別情報、送信シーケンス情報、宛先シーケンス情報、ペイロード長を含む、暗号化通信のコネクション確立のための第1の送信パケットを送信し、
前記コネクション状態テーブルを参照し、前記第1のパケットの送信元識別情報が一致するコネクション状態データを求め、
該コネクション状態データについて、ペイロード長Lの前記第1の送信パケットの送信シーケンス情報Bと、第2端末シーケンス情報Bが一致する場合、第2端末シーケンス情報Bにペイロード長Lを加算して B+L に更新し、
前記第1の送信パケットに応答して、前記端末から、宛先シーケンス情報を B+L としたペイロード長0の第1の受信パケットを受け取ると、前記コネクション状態テーブルの第2確認シーケンス情報に、前記第1の受信パケットに含まれる宛先シーケンス情報 B+L を記憶し、

一方、前記端末に向けて、前記コネクション状態テーブルを参照し、第2端末シーケンス情報と同じ送信シーケンス情報 B+L 及びペイロード長Lの第2の送信パケットを送り、第2端末シーケンス情報 B+L に、第2の送信パケットのペイロード長Lを加算して、B+2L に更新し、
続けて、第2端末シーケンス情報と同じ送信シーケンス情報 B+2L を持つペイロード長Lの第3の送信パケットを送り、第2端末シーケンス情報 B+2L に、該第3の送信パケットのペイロード長Lを加算し、B+3L に更新し、
前記端末は、前記第2の送信パケットを受け取る前に前記第3の送信パケットを受け取った場合、送信シーケンス情報 B+2L より、その前の前記第2の送信パケットが受信できなかったことを判定することにより、前記端末から送信された、前記第2の送信パケットの再送を促すため、宛先シーケンス情報を B+L としたペイロード長0の第2の受信パケットを受信し、
前記コネクション状態テーブルを参照し、前記第2の受信パケット又は該第2の受信パケットと同じ内容のパケットを、所定回数連続して受信した場合、前記第2の送信パケットが途中で廃棄されてしまったことを判定し、送信シーケンス情報 B+L 及びペイロード長Lの前記第2の送信パケットを再送又は前記第2の送信パケットと同じ内容の第4の送信パケットを送信し、
前記第2又は第4の送信パケットに応答して、前記端末から、宛先シーケンス情報を B+3L としたペイロード長0の第3の受信パケットを受信する
前記通信装置。
Installed between a client terminal and a server terminal, for encrypting plain text data received from the server terminal and transmitting it to the client terminal, and for decrypting encrypted data received from the client terminal and transmitting to the server terminal In a communication device for executing a connection establishment sequence for encrypted communication on behalf of the server terminal,
Corresponding to the terminal identification information, the communication device actually receives and confirms the first terminal sequence information, which is a value for representing the amount of data transmitted from the terminal to the communication device, and the data transmitted from the terminal. First confirmation sequence information indicating the amount of data sent back to the terminal as a response, second terminal sequence information that is a value representing the amount of data transmitted from the communication device to the terminal, and the confirmation response from the terminal that the communication device actually transmits A connection status table for storing the connection status data including the second confirmation sequence information, which is the amount of data that has been received, and recording how far each connection has been received,
A reception buffer for accumulating packets that should arrive later together with the packet header when the arrival order of the packets is reversed;
Reads the connection status corresponding to the received packet from the connection status table, determines whether the received packet follows immediately after the end of the received data, and arrives later when the packet arrival order is reversed. A packet processing unit for accumulating packets to be received in the reception buffer together with a packet header ,

The packet processing unit
Transmitting a first transmission packet for establishing a connection for encrypted communication, including transmission source identification information, transmission sequence information, destination sequence information, and payload length, to the terminal;
Referring to the connection state table, obtain connection state data that matches the source identification information of the first packet;
For the connection status data, when the transmission sequence information B of the first transmission packet having the payload length L matches the second terminal sequence information B, the payload length L is added to the second terminal sequence information B to B + L Updated,
In response to the first transmission packet, when receiving a first reception packet with a payload length of 0 having destination sequence information B + L from the terminal, the first confirmation sequence information in the connection state table includes the first confirmation sequence information. Destination sequence information B + L included in the received packet of

On the other hand, referring to the connection state table, the second transmission packet having the same transmission sequence information B + L and payload length L as the second terminal sequence information is sent to the terminal, and the second terminal sequence information B + L includes the second transmission packet. Is added to the payload length L of the transmission packet and updated to B + 2L,
Subsequently, a third transmission packet having a payload length L having the same transmission sequence information B + 2L as the second terminal sequence information is sent, and the payload length L of the third transmission packet is added to the second terminal sequence information B + 2L. Update to B + 3L,
When the terminal receives the third transmission packet before receiving the second transmission packet, the terminal determines from the transmission sequence information B + 2L that the previous second transmission packet has not been received. In order to prompt retransmission of the second transmission packet transmitted from the terminal, a second received packet having a payload length of 0 with destination sequence information B + L is received,
If the second reception packet or a packet having the same content as the second reception packet is continuously received a predetermined number of times with reference to the connection state table, the second transmission packet is discarded in the middle. Retransmit the second transmission packet with transmission sequence information B + L and payload length L or transmit a fourth transmission packet with the same content as the second transmission packet,
In response to the second or fourth transmission packet, the communication apparatus receives a third reception packet with a payload length of 0 having destination sequence information B + 3L from the terminal.
請求項12に記載の通信装置において、
1つまたは複数または分割された暗号化通信のためのメッセージを含むパケットを入力し、入力された該メッセージに、どのようなメッセージタイプで暗号化通信のコネクション確立のためのメッセージが含まれるかを判定し、パケットに含まれるメッセージを処理するための暗号化通信メッセージ処理部をさらに備え、
クライアント端末からは、暗号化したマスターシークレットを含む第1コネクション確立メッセージと、暗号化通信の開始を通知する第2コネクション確立メッセージと、メッセージをベリファイするための第3コネクション確立メッセージを含む暗号化通信のコネクション確立のためのパケットを受信する際、
第1から第3のコネクション確立メッセージを別々の3つのパケットで到着するタイプ、第1コネクション確立メッセージと第2コネクション確立メッセージ・プラス・第3コネクション確立メッセージの2つのパケットで到着するタイプ、第1コネクション確立メッセージ・プラス・第2コネクション確立メッセージと第3コネクション確立メッセージの2つのパケットで到着するタイプ、第2コネクション確立メッセージと第3コネクション確立メッセージの2つのパケットで到着するタイプ、
のいずれかのタイプで受信し、
前記暗号化通信メッセージ処理部は、前記いずれかのタイプを判定することにより、メッセージをメッセージ単位ではなくパケット単位で処理することを特徴とする通信装置。
The communication device according to claim 12, wherein
A packet including a message for one or more or divided encrypted communications is input, and the input message includes the message type for establishing a connection for encrypted communication. An encrypted communication message processing unit for determining and processing a message included in the packet;
From the client terminal, the encrypted communication including the first connection establishment message including the encrypted master secret, the second connection establishment message for notifying the start of the encrypted communication, and the third connection establishment message for verifying the message. When receiving a packet for establishing a connection
A type in which the first to third connection establishment messages arrive in three separate packets, a type in which the first connection establishment message and the second connection establishment message plus a third connection establishment message arrive in two packets, first A connection establishment message plus a type that arrives in two packets of a second connection establishment message and a third connection establishment message, a type that arrives in two packets of a second connection establishment message and a third connection establishment message,
Receive in any type of
The encrypted communication message processing unit processes a message not in units of messages but in units of packets by determining one of the types.
クライアント端末とサーバ端末との間に設置され、前記サーバ端末から受信した平文データを暗号化して前記クライアント端末に送信し、前記クライアント端末から受信した暗号データを復号化して前記サーバ端末に送信するために、暗号化通信のコネクション確立シーケンスを前記サーバ端末に代わって実行するための通信装置を備えた通信システムにおいて、
前記通信装置は、
端末識別情報に対応して、端末が通信装置に送信してきたデータ量を表すための値である第1端末シーケンス情報と、端末が送信してきたデータのうち、実際に通信装置が受信して確認応答を端末に返信したデータ量を表す第1確認シーケンス情報と、通信装置が端末に送信したデータ量を表すための値である第2端末シーケンス情報と、通信装置が実際に端末からの確認応答を受信済みのデータ量である第2確認シーケンス情報と、を含むコネクション状態データを記憶し、コネクション毎にどこまで受信したかを記録するためのコネクション状態テーブルと、
パケットの到着順が逆転した場合に、後に到着すべきパケットをパケットヘッダと共に蓄積するための受信バッファと、
前記コネクション状態テーブルから、受信パケットに対応するコネクション状態を読出し、受信パケットが、受信済みデータの最後尾直後から後続しているか否かを判定し、パケットの到着順が逆転した場合に、後に到着すべきパケットをパケットヘッダと共に前記受信バッファに蓄積するためのパケット処理部と
を備え、

前記パケット処理部は、
端末から、送信元識別情報、送信シーケンス情報、宛先シーケンス情報、ペイロード長を含む、暗号化通信のコネクション確立のための第1の受信パケットを受信し、
前記コネクション状態テーブルを参照し、前記第1の受信パケットの送信元識別情報が一致するコネクション状態データを求め、
該コネクション状態データについて、前記端末からの前記第1の受信パケットの送信シーケンス情報Aと、第1確認シーケンス情報Aが一致する場合、第1端末シーケンス情報Aにペイロード長Lを加算して A+L に更新し、第1確認シーケンス情報Aにペイロード長Lを加算して A+L に更新し、シーケンス情報 A+L を宛先シーケンス情報としたペイロード長0の第1の送信パケットを、前記端末に向けて送信し、
一方、前記端末から、送信シーケンス情報 A+L 及びペイロード長Lの第2の受信パケットが送られたが、該第2の受信パケットを受信する前に、続けて前記端末から送信された、送信シーケンス情報 A+2L 及びペイロード長Lの第3の受信パケットを受信したとき、
前記コネクション状態テーブルを参照し、前記第3の受信パケットに含まれる送信シーケンス情報 A+2L と、第1確認シーケンス情報のシーケンス情報 A+L が異なる場合、該第3のパケットのペイロード長が0より大きければ該第3の受信パケットを前記受信バッファに蓄積し、該第3の受信パケットに含まれる送信シーケンス情報 A+2L を、第1端末シーケンス情報として前記コネクション状態テーブルを更新し、第1確認シーケンス情報のシーケンス情報 A+L を宛先シーケンス情報としたペイロード長0の第2の送信パケットを作成し、該第2の送信パケットを前記端末に向けて送信し、
前記端末は、前記第2の送信パケットを受け取ると、宛先シーケンス情報 A+L により、前記第2の受信パケットが前記通信装置で受信されていないことを判定することにより、前記端末から、送信シーケンス情報を A+L 及びペイロード長Lの前記第2の受信パケット又は前記第2の受信パケットと同じ内容の第4の受信パケットを受信し、
前記コネクション状態テーブルを参照し、前記第2又は第4の受信パケットの送信シーケンス情報 A+L と、第1確認シーケンス情報のシーケンス情報 A+L が一致することを確認すると、第1確認シーケンス情報 A+L に、前記第4の受信パケットのペイロード長Lを加算して A+2L に更新し、シーケンス情報 A+2L を宛先シーケンス情報としたペイロード長0の第3の送信パケットを作成し、該第3の送信パケットを前記端末に向けて送信する
前記通信システム。
Installed between a client terminal and a server terminal, for encrypting plain text data received from the server terminal and transmitting it to the client terminal, and for decrypting encrypted data received from the client terminal and transmitting to the server terminal In addition, in a communication system including a communication device for executing a connection establishment sequence for encrypted communication on behalf of the server terminal,
The communication device
Corresponding to the terminal identification information, the communication device actually receives and confirms the first terminal sequence information, which is a value for representing the amount of data transmitted from the terminal to the communication device, and the data transmitted from the terminal. First confirmation sequence information indicating the amount of data sent back to the terminal as a response, second terminal sequence information that is a value representing the amount of data transmitted from the communication device to the terminal, and the confirmation response from the terminal that the communication device actually transmits A connection status table for storing the connection status data including the second confirmation sequence information, which is the amount of data that has been received, and recording how far each connection has been received,
A reception buffer for accumulating packets that should arrive later together with the packet header when the arrival order of the packets is reversed;
Reads the connection status corresponding to the received packet from the connection status table, determines whether the received packet follows immediately after the end of the received data, and arrives later when the packet arrival order is reversed. A packet processing unit for accumulating packets to be received in the reception buffer together with a packet header ,

The packet processing unit
Receiving from the terminal a first received packet for establishing a connection for encrypted communication, including source identification information, transmission sequence information, destination sequence information, and payload length;
Referring to the connection state table, obtain connection state data that matches the source identification information of the first received packet,
For the connection status data, when the transmission sequence information A of the first received packet from the terminal and the first confirmation sequence information A match, the payload length L is added to the first terminal sequence information A to A + L Update, add the payload length L to the first confirmation sequence information A to update to A + L, and send the first transmission packet with the payload length 0 with the sequence information A + L as the destination sequence information to the terminal,
On the other hand, the transmission sequence information A + L and the second reception packet having the payload length L are transmitted from the terminal, but the transmission sequence information is transmitted from the terminal in succession before receiving the second reception packet. When a third received packet with A + 2L and payload length L is received,
Referring to the connection state table, when the transmission sequence information A + 2L included in the third received packet is different from the sequence information A + L of the first confirmation sequence information, if the payload length of the third packet is greater than 0, The third reception packet is accumulated in the reception buffer, the connection state table is updated using transmission sequence information A + 2L included in the third reception packet as first terminal sequence information, and sequence information of the first confirmation sequence information Creating a second transmission packet having a payload length of 0 with A + L as destination sequence information, and transmitting the second transmission packet to the terminal;
When the terminal receives the second transmission packet, the terminal determines transmission sequence information from the terminal by determining that the second reception packet is not received by the communication device based on destination sequence information A + L. Receiving the second received packet of A + L and payload length L or the fourth received packet having the same content as the second received packet;
Referring to the connection state table and confirming that the transmission sequence information A + L of the second or fourth received packet matches the sequence information A + L of the first confirmation sequence information, the first confirmation sequence information A + L The payload length L of the fourth received packet is added and updated to A + 2L, a third transmission packet with a payload length of 0 is generated with the sequence information A + 2L as the destination sequence information, and the third transmission packet is sent to the terminal The said communication system which transmits toward.
請求項14に記載の通信システムにおいて、
前記通信装置は、
1つまたは複数または分割された暗号化通信のためのメッセージを含むパケットを入力し、入力された該メッセージに、どのようなメッセージタイプで暗号化通信のコネクション確立のためのメッセージが含まれるかを判定し、パケットに含まれるメッセージを処理するための暗号化通信メッセージ処理部をさらに備え、
クライアント端末からは、暗号化したマスターシークレットを含む第1コネクション確立メッセージと、暗号化通信の開始を通知する第2コネクション確立メッセージと、メッセージをベリファイするための第3コネクション確立メッセージを含む暗号化通信のコネクション確立のためのパケットを受信する際、
第1から第3のコネクション確立メッセージを別々の3つのパケットで到着するタイプ、第1コネクション確立メッセージと第2コネクション確立メッセージ・プラス・第3コネクション確立メッセージの2つのパケットで到着するタイプ、第1コネクション確立メッセージ・プラス・第2コネクション確立メッセージと第3コネクション確立メッセージの2つのパケットで到着するタイプ、第2コネクション確立メッセージと第3コネクション確立メッセージの2つのパケットで到着するタイプ、
のいずれかのタイプで受信し、
前記暗号化通信メッセージ処理部は、前記いずれかのタイプを判定することにより、メッセージをメッセージ単位ではなくパケット単位で処理することを特徴とする通信システム。
The communication system according to claim 14,
The communication device
A packet including a message for one or more or divided encrypted communications is input, and the input message includes the message type for establishing a connection for encrypted communication. An encrypted communication message processing unit for determining and processing a message included in the packet;
From the client terminal, the encrypted communication including the first connection establishment message including the encrypted master secret, the second connection establishment message for notifying the start of the encrypted communication, and the third connection establishment message for verifying the message. When receiving a packet for establishing a connection
A type in which the first to third connection establishment messages arrive in three separate packets, a type in which the first connection establishment message and the second connection establishment message plus a third connection establishment message arrive in two packets, first A connection establishment message plus a type that arrives in two packets of a second connection establishment message and a third connection establishment message, a type that arrives in two packets of a second connection establishment message and a third connection establishment message,
Receive in any type of
The encrypted communication message processing unit processes a message in units of packets instead of in units of messages by determining one of the types.
JP2009186710A 2009-08-11 2009-08-11 Communication apparatus and communication system Expired - Fee Related JP5423228B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009186710A JP5423228B2 (en) 2009-08-11 2009-08-11 Communication apparatus and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009186710A JP5423228B2 (en) 2009-08-11 2009-08-11 Communication apparatus and communication system

Publications (2)

Publication Number Publication Date
JP2011041008A JP2011041008A (en) 2011-02-24
JP5423228B2 true JP5423228B2 (en) 2014-02-19

Family

ID=43768323

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009186710A Expired - Fee Related JP5423228B2 (en) 2009-08-11 2009-08-11 Communication apparatus and communication system

Country Status (1)

Country Link
JP (1) JP5423228B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5987076B2 (en) * 2015-03-04 2016-09-06 日本電信電話株式会社 Setting information collecting apparatus, method and program thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3263879B2 (en) * 1993-10-06 2002-03-11 日本電信電話株式会社 Cryptographic communication system
JP3811057B2 (en) * 2001-12-10 2006-08-16 富士通株式会社 Relay connection management program and relay connection management method
JP4626646B2 (en) * 2007-11-30 2011-02-09 日本電気株式会社 Packet communication apparatus, packet communication method, and packet communication program

Also Published As

Publication number Publication date
JP2011041008A (en) 2011-02-24

Similar Documents

Publication Publication Date Title
US10419406B2 (en) Efficient forwarding of encrypted TCP retransmissions
CN108650227B (en) Handshaking method and system based on datagram secure transmission protocol
TW564624B (en) Non-invasive SSL payload processing for IP packet using streaming SSL parsing
US7870380B2 (en) Providing secure connections for data transmission
US7228412B2 (en) Bufferless secure sockets layer architecture
US7149892B2 (en) Secure sockets layer proxy architecture
KR100932834B1 (en) SPI message processing method
US7502925B2 (en) Method and apparatus for reducing TCP frame transmit latency
US8984268B2 (en) Encrypted record transmission
US20030014650A1 (en) Load balancing secure sockets layer accelerator
US20030014624A1 (en) Non-proxy internet communication
US20020035681A1 (en) Strategy for handling long SSL messages
JP2018528679A (en) Device and method for establishing a connection in a load balancing system
CN111756529B (en) Quantum session key distribution method and system
WO2012088889A1 (en) Data communication method and device and data interaction system based on browser
US20050160269A1 (en) Common security key generation apparatus
CN113904809B (en) Communication method, device, electronic equipment and storage medium
CN114095195B (en) Method, network device, and non-transitory computer readable medium for adaptive control of secure socket layer proxy
CN111741034B (en) Data transmission method, first terminal and second terminal
WO2023036348A1 (en) Encrypted communication method and apparatus, device, and storage medium
JP5423228B2 (en) Communication apparatus and communication system
CN114513418B (en) Data processing method and related equipment
KR102347568B1 (en) Block transfer method and device in blockchain system
JP2000124900A (en) Charge-collecting method, device therefor and communication system
Dudukovich et al. High-Rate Delay Tolerant Networking (HDTN) Software Requirements Analysis

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120201

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130122

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130319

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131105

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20131107

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131111

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees