[go: up one dir, main page]

JP5100497B2 - Decoding device - Google Patents

Decoding device Download PDF

Info

Publication number
JP5100497B2
JP5100497B2 JP2008126727A JP2008126727A JP5100497B2 JP 5100497 B2 JP5100497 B2 JP 5100497B2 JP 2008126727 A JP2008126727 A JP 2008126727A JP 2008126727 A JP2008126727 A JP 2008126727A JP 5100497 B2 JP5100497 B2 JP 5100497B2
Authority
JP
Japan
Prior art keywords
random number
order
sequence
number sequence
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008126727A
Other languages
Japanese (ja)
Other versions
JP2009278306A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2008126727A priority Critical patent/JP5100497B2/en
Publication of JP2009278306A publication Critical patent/JP2009278306A/en
Application granted granted Critical
Publication of JP5100497B2 publication Critical patent/JP5100497B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、暗号化された暗号文データを復号して平文データを抽出する復号装置に関する。   The present invention relates to a decryption device that decrypts encrypted ciphertext data and extracts plaintext data.

共通鍵を用いた暗号化方式は、一定のブロック単位で暗号化するブロック暗号と、ビット単位のストリーム暗号に大別される。
これらの暗号化方式に対して、ネットワーク上のパケットをルータ等の中継装置で暗号化する方式としてはブロック暗号を利用することが多く、例えばブロック暗号を用いたIPsec(IP security)で高速にパケットを暗号化する方式として特許文献1(特開2004−180234号公報)に記載の技術がある。
Encryption schemes using a common key are broadly divided into block ciphers that are encrypted in fixed block units and bit stream ciphers.
In contrast to these encryption methods, a block cipher is often used as a method for encrypting a packet on a network by a relay device such as a router. For example, a packet is transmitted at high speed by IPsec (IP security) using the block cipher. There is a technique described in Patent Document 1 (Japanese Patent Application Laid-Open No. 2004-180234) as a method for encrypting the password.

他方、ストリーム暗号は共通鍵やIV(Initialization Vector)の設定等の初期化を一度実施した後は高いスループットで乱数を生成できる、ブロックサイズを一致させるためのパディングが不要なため伝送効率が高いといった利点があり、ネットワークの中継装置に用いる場合もある。
以下、一般的なストリーム暗号と、ネットワーク上のパケットをストリーム暗号で暗号化する中継装置を説明する。
On the other hand, stream ciphers can generate random numbers with high throughput once initialization such as common key and IV (Initialization Vector) settings is performed, and transmission efficiency is high because padding to match block sizes is unnecessary There is an advantage, and it may be used for a relay device of a network.
Hereinafter, a general stream cipher and a relay apparatus that encrypts a packet on the network with the stream cipher will be described.

図6は、一般的なストリーム暗号の構造を示すものである。   FIG. 6 shows the structure of a general stream cipher.

最初に、構成を説明する。
101は、乱数生成部である。乱数生成部101は、中間鍵111、更新関数112、出力関数113で構成される。
102は、平文データである。
103は、暗号文データである。
104は、共通鍵とIVである。
105は、クロックである。
106は、乱数列である。乱数列106は、出力関数113から出力される乱数性の高いビット列である。
107はXOR(eXclusive OR)部である。XOR部107は、乱数列と平文データの排他的論理和を行うことで暗号文データを生成する。
First, the configuration will be described.
101 is a random number generator. The random number generation unit 101 includes an intermediate key 111, an update function 112, and an output function 113.
Reference numeral 102 denotes plain text data.
Reference numeral 103 denotes ciphertext data.
104 is a common key and IV.
Reference numeral 105 denotes a clock.
106 is a random number sequence. The random number sequence 106 is a bit sequence with high randomness output from the output function 113.
Reference numeral 107 denotes an XOR (eXclusive OR) section. The XOR unit 107 generates ciphertext data by performing an exclusive OR of the random number sequence and the plaintext data.

なお、図6は平文データを暗号化する際の構成を表しているが、暗号文データを復号する際も構成は同一で、図6中の平文データ102と暗号文データ103の位置を入れ替えた構成となる。   6 shows the configuration when encrypting plaintext data, the configuration is the same when decrypting ciphertext data, and the positions of plaintext data 102 and ciphertext data 103 in FIG. 6 are switched. It becomes composition.

次に、動作を説明する。
まず共通鍵とIV104、及び中間鍵111に適切な初期値を設定する。
次に、更新関数112は、共通鍵とIV104、中間鍵111を入力として、クロック105が与えられる都度、新たな中間鍵111を出力として生成し、それまでの中間鍵111を更新していく。
出力関数113は、中間鍵111の一部を乱数列106として出力する。
XOR部107は、乱数列106と平文データ102の排他的論理和を行い暗号文データ103として出力する。
このようにクロック105が与えられる都度、更新関数112で中間鍵111を更新しながら乱数列106を生成し、それと平文データ102の排他的論理和をとることで暗号文パケット103を出力する。
Next, the operation will be described.
First, appropriate initial values are set for the common key, the IV 104, and the intermediate key 111.
Next, the update function 112 receives the common key, the IV 104, and the intermediate key 111, generates a new intermediate key 111 as an output every time the clock 105 is given, and updates the intermediate key 111 up to that time.
The output function 113 outputs a part of the intermediate key 111 as the random number sequence 106.
The XOR unit 107 performs exclusive OR of the random number sequence 106 and the plaintext data 102 and outputs the result as ciphertext data 103.
Thus, whenever the clock 105 is given, the random number sequence 106 is produced | generated while updating the intermediate key 111 with the update function 112, and the ciphertext packet 103 is output by taking the exclusive OR of it and the plaintext data 102.

ストリーム暗号は、一度出力した乱数を再度出力するためには再度中間鍵とIVを与えて所定の回数のクロックを与える必要がある。
当該の乱数を再出力するために与えるクロックの回数は一連の乱数列から当該の乱数を取り出した位置によって増減し、乱数列の生成を続けて後方に進むほど再度出力するのに時間が必要となる。
In the stream cipher, in order to output the random number once output, it is necessary to give the intermediate key and IV again and give a predetermined number of clocks.
The number of clocks given to re-output the random number increases or decreases depending on the position where the random number is extracted from a series of random numbers, and it takes time to output again as the random number sequence continues to be generated and moved backward. Become.

またストリーム暗号は、一連の乱数列を順番に出力していくため一部の乱数を飛ばしてその先の乱数を生成するような動作は困難である。
このような場合は、まず飛ばしたい部分の乱数を生成し、次に所望の乱数を生成する。飛ばした部分の乱数を後に使用する場合は、これを保管しておく必要がある。
In addition, since stream ciphers output a series of random numbers in order, it is difficult to generate a random number after skipping some random numbers.
In such a case, first, a random number of a portion to be skipped is generated, and then a desired random number is generated. If you want to use the skipped random number later, you need to save it.

図7は、ストリーム暗号で暗号化されたパケットを中継する一般的なストリーム暗号パケット中継装置を示すものである。   FIG. 7 shows a general stream cipher packet relay apparatus that relays a packet encrypted with the stream cipher.

最初に、構成を説明する。
201は、パケットを暗号化する中継装置である(以下、単に暗号装置ともいう)。
211は、パケットを復号する中継装置である(以下、単に復号装置ともいう)。
202と212は、それぞれ暗号装置と復号装置の受信部である。
203と213は、それぞれ暗号装置と復号装置のXOR部である。
204と214は、それぞれ暗号装置と復号装置の送信部である。
205と215は、それぞれ暗号装置と復号装置のクロック生成部である。
206と216は、それぞれ暗号装置と復号装置の乱数生成部である。乱数生成部
206、216の構造と動作は図6の乱数生成部101で説明した通りである。
207と217は、それぞれ暗号装置と復号装置の乱数列である。
208と218は、それぞれ暗号装置と復号装置が使用する共通鍵とIVである。
219は、復号装置の順序制御部である。
220は、復号装置の乱数バッファである。
231は、平文パケットである。
232は、暗号文パケットである。
233は、暗号文パケット232を転送するネットワークである。
First, the configuration will be described.
Reference numeral 201 denotes a relay device that encrypts a packet (hereinafter also simply referred to as an encryption device).
Reference numeral 211 denotes a relay device that decodes a packet (hereinafter also simply referred to as a decoding device).
Reference numerals 202 and 212 denote reception units of the encryption device and the decryption device, respectively.
Reference numerals 203 and 213 denote XOR sections of the encryption device and the decryption device, respectively.
Reference numerals 204 and 214 denote transmission units of the encryption device and the decryption device, respectively.
205 and 215 are clock generation units of the encryption device and the decryption device, respectively.
Reference numerals 206 and 216 denote random number generation units of the encryption device and the decryption device, respectively. The structure and operation of the random number generation units 206 and 216 are as described in the random number generation unit 101 of FIG.
207 and 217 are random number sequences of the encryption device and the decryption device, respectively.
208 and 218 are a common key and IV used by the encryption device and the decryption device, respectively.
Reference numeral 219 denotes a sequence control unit of the decoding device.
220 is a random number buffer of the decoding device.
Reference numeral 231 denotes a plaintext packet.
Reference numeral 232 denotes a ciphertext packet.
Reference numeral 233 denotes a network for transferring the ciphertext packet 232.

次に、暗号装置201と復号装置211の動作を説明する。   Next, operations of the encryption device 201 and the decryption device 211 will be described.

まず、暗号装置201と復号装置211は暗号化されたパケットで通信を行なう前に両装置の間で共通鍵とIV208及び218を共有しておく。
なお、両装置が互いに正しく暗号化と復号を行なうために前提となる動作として、暗号装置201と復号装置211は、ここで共有した単一の共通鍵と単一のIVをもとにして生成される一連の乱数列から、受信したパケットの暗号化及び復号に必要な量の乱数を順番に使用していく。
従って、暗号装置201と復号装置211の両装置において、暗号化するパケットの順番と復号するパケットの順番が一致している必要がある。
First, the encryption device 201 and the decryption device 211 share a common key and IVs 208 and 218 between the two devices before performing communication using encrypted packets.
Note that the encryption device 201 and the decryption device 211 are generated on the basis of a single common key and a single IV shared here, as prerequisite operations for both devices to correctly encrypt and decrypt each other. From the series of random number sequences, the amount of random numbers necessary for encryption and decryption of the received packet is sequentially used.
Therefore, in both the encryption device 201 and the decryption device 211, the order of packets to be encrypted and the order of packets to be decrypted need to match.

次に、暗号装置201の動作を説明する。
はじめに、受信部202は、平文パケット231を受信するとクロック生成部205にパケット一個分の乱数列の生成を要求するとともに平文パケット231をXOR部203に転送する。
次に、クロック生成部205は、パケット一個分のクロックを生成して乱数生成部206に出力する。
次に、乱数生成部206は、乱数列207を出力しXOR部203に転送する。
次に、XOR部203は、乱数列207と平文パケット231の排他的論理和をとり暗号文パケット232を生成し送信部204に転送する。
次に、送信部204は、暗号文パケット232のヘッダ部分に、パケット毎の転送順序番号(以下、転送番号ともいう)を付与してネットワーク233に送信する。
Next, the operation of the encryption device 201 will be described.
First, when receiving the plaintext packet 231, the reception unit 202 requests the clock generation unit 205 to generate a random number sequence for one packet and transfers the plaintext packet 231 to the XOR unit 203.
Next, the clock generation unit 205 generates a clock for one packet and outputs it to the random number generation unit 206.
Next, the random number generation unit 206 outputs the random number sequence 207 and transfers it to the XOR unit 203.
Next, the XOR unit 203 performs exclusive OR of the random number sequence 207 and the plaintext packet 231 to generate a ciphertext packet 232 and forwards it to the transmission unit 204.
Next, the transmission unit 204 assigns a transfer order number (hereinafter also referred to as a transfer number) for each packet to the header portion of the ciphertext packet 232 and transmits the packet to the network 233.

次に、復号装置211の動作を説明する。
はじめに、受信部212は、暗号文パケット232を受信するとパケット毎の転送順序を確認する。
ここでパケットを順序通り受信した場合と、順序が入れ替わって受信した場合の2通りがある。
Next, the operation of the decoding device 211 will be described.
First, when receiving the ciphertext packet 232, the receiving unit 212 confirms the transfer order for each packet.
Here, there are two cases, when the packets are received in order and when the packets are received with the order changed.

第一に、パケットを順序通り受信した場合の復号装置211の動作を説明する。
はじめに、受信部212は、パケットを順序通り受信したことを順序制御部219に通知する。加えて受信部212は、クロック生成部215にパケット一個分の乱数列の生成を要求するとともに暗号文パケット232をXOR部213に転送する。
次に、クロック生成部215は、パケット一個分のクロックを生成して乱数生成部216に出力する。
次に、乱数生成部216は、乱数列217を出力し順序制御部219に転送する。
次に、順序制御部219は、受信部212からパケットを順序通り受信した通知を受けているため、乱数列217をそのままXOR部213に転送する。
次に、XOR部213は、乱数列217と暗号文パケット232の排他的論理和をとり平文パケット231を生成し送信部214に転送する。
次に、送信部214は、平文パケット231を装置外に送信する。この際、ヘッダ部分に付与されたパケット毎の転送順序番号は削除して元に戻しておく。
First, the operation of the decoding device 211 when packets are received in order will be described.
First, the reception unit 212 notifies the sequence control unit 219 that packets have been received in order. In addition, the reception unit 212 requests the clock generation unit 215 to generate a random number sequence for one packet and transfers the ciphertext packet 232 to the XOR unit 213.
Next, the clock generation unit 215 generates a clock for one packet and outputs it to the random number generation unit 216.
Next, the random number generation unit 216 outputs a random number sequence 217 and transfers it to the order control unit 219.
Next, since the order control unit 219 receives a notification that the packets are received in order from the receiving unit 212, the random number sequence 217 is transferred to the XOR unit 213 as it is.
Next, the XOR unit 213 takes the exclusive OR of the random number sequence 217 and the ciphertext packet 232 to generate a plaintext packet 231 and forward it to the transmission unit 214.
Next, the transmission unit 214 transmits the plaintext packet 231 outside the apparatus. At this time, the transfer sequence number for each packet assigned to the header portion is deleted and restored.

第二に、パケットの順序が入れ替わって受信した場合の復号装置211の動作を説明する。
なお、この場合の動作は、ネットワーク233にて転送経路の切り替えや中継機器のバッファの枯渇等の理由で、パケットの転送順序が入れ替わったり、パケットが消失した場合を想定している。
ここで、あるパケットが他のパケットを追い越して受信した場合と、追い越されたパケットを後になって受信した場合の2通りがある。
Secondly, the operation of the decoding device 211 when the order of packets is changed and received will be described.
Note that the operation in this case assumes a case where the packet transfer order is changed or a packet is lost due to reasons such as transfer path switching in the network 233 or depletion of the buffer of the relay device.
Here, there are two cases: a case where a packet is received by overtaking another packet, and a case where the overtaken packet is received later.

第一に、パケットを追い越して受信した場合の復号装置211の動作を説明する。
はじめに、受信部212は、パケットを追い越して受信したことを順序制御部219に通知する。加えて受信部212は、クロック生成部215に、受信順序が入れ替わって追い抜かされたパケットの個数分の乱数列と、受信したパケット一個分の乱数列の生成を要求するとともに、暗号文パケット232をXOR部213に転送する。
次に、クロック生成部215は、受信順序が入れ替わって追い抜かされたパケットの個数分のクロックとパケット一個分のクロックを生成して乱数生成部216に出力する。
次に、乱数生成部216は、乱数列217を出力し順序制御部219に転送する。ここではパケットの転送順序の追い越しが発生しているため、まず追い抜かれたパケットの復号に必要な乱数列217を生成し、次に当該のパケットの復号に必要な乱数列217を生成する。
次に、順序制御部219は、受信部212からパケットを追い越して受信した通知を受けているため、まず追い抜かれたパケットの復号に必要な乱数列217を乱数バッファ220に格納し、続いて当該のパケットの復号に必要な乱数列217をXOR部213に転送する。
次に、XOR部213は、当該のパケットの復号に必要な乱数列217と暗号文パケット232の排他的論理和をとり平文パケット231を生成し送信部214に転送する。
次に、送信部214は、平文パケット231を装置外に送信する。この際、ヘッダ部分に付与されたパケット毎の転送順序番号は削除して元に戻しておく。
First, the operation of the decoding device 211 when the packet is received by overtaking will be described.
First, the reception unit 212 notifies the order control unit 219 that the packet has been received by overtaking. In addition, the reception unit 212 requests the clock generation unit 215 to generate a random number sequence for the number of packets that have been overtaken due to a change in the reception order, and a random number sequence for one received packet, and send a ciphertext packet 232 Transfer to the XOR unit 213.
Next, the clock generation unit 215 generates a clock for the number of packets that have been overtaken by switching the reception order and a clock for one packet, and outputs the generated clock to the random number generation unit 216.
Next, the random number generation unit 216 outputs a random number sequence 217 and transfers it to the order control unit 219. Here, since overtaking of the packet transfer order has occurred, a random number sequence 217 necessary for decoding the overtaken packet is first generated, and then a random number sequence 217 necessary for decoding the packet is generated.
Next, since the order control unit 219 receives the notification received by overtaking the packet from the reception unit 212, the sequence control unit 219 first stores the random number sequence 217 necessary for decoding the overtaken packet in the random number buffer 220, and then The random number sequence 217 necessary for decoding the packet is transferred to the XOR unit 213.
Next, the XOR unit 213 obtains an exclusive OR of the random number sequence 217 necessary for decryption of the packet and the ciphertext packet 232, generates a plaintext packet 231, and transfers it to the transmission unit 214.
Next, the transmission unit 214 transmits the plaintext packet 231 outside the apparatus. At this time, the transfer sequence number for each packet assigned to the header portion is deleted and restored.

第二に、追い越されたパケットを後になって受信した場合の復号装置211の動作を説明する。
はじめに、受信部212は、追い越されたパケットを受信したことを順序制御部219に通知する。加えて受信部212は、暗号文パケット232をXOR部213に転送する。なお当該のパケットの復号に必要な乱数列217は乱数バッファ220に既に格納されているため、受信部212はクロック生成部215に乱数列の生成を要求しない。
次に、順序制御部219は、受信部212から追い越されたパケットを受信した通知を受けているため、当該のパケットの復号に必要な乱数列217を乱数バッファ220から読み出してXOR部213に転送する。
次に、XOR部213は、当該のパケットの復号に必要な乱数列217と暗号文パケット232の排他的論理和をとり平文パケット231を生成し送信部214に転送する。
次に、送信部214は、平文パケット231を装置外に送信する。この際、ヘッダ部分に付与されたパケット毎の転送順序番号は削除して元に戻しておく。
特開2004−180234号公報
Secondly, the operation of the decoding device 211 when the overtaken packet is received later will be described.
First, the reception unit 212 notifies the order control unit 219 that the overtaken packet has been received. In addition, the reception unit 212 transfers the ciphertext packet 232 to the XOR unit 213. Since the random number sequence 217 necessary for decoding the packet is already stored in the random number buffer 220, the reception unit 212 does not request the clock generation unit 215 to generate a random number sequence.
Next, since the order control unit 219 receives the notification of receiving the overtaken packet from the reception unit 212, the sequence control unit 219 reads the random number sequence 217 necessary for decoding the packet from the random number buffer 220 and transfers it to the XOR unit 213. To do.
Next, the XOR unit 213 obtains an exclusive OR of the random number sequence 217 necessary for decryption of the packet and the ciphertext packet 232, generates a plaintext packet 231, and transfers it to the transmission unit 214.
Next, the transmission unit 214 transmits the plaintext packet 231 outside the apparatus. At this time, the transfer sequence number for each packet assigned to the header portion is deleted and restored.
JP 2004-180234 A

ネットワーク上に配置された中継装置間をストリーム暗号によって暗号化されたパケットで通信する際に、暗号装置がパケットを送信する順序と、復号装置がパケットを受信する順序が入れ替わり、復号装置においてあるパケットが他のパケットを追い越して受信すると、復号装置は受信したパケットの復号に必要な乱数列の生成に加えて、追い抜かされたパケットの復号に必要な乱数列も生成する必要がある。
このように追い越しが発生した場合、追い越しが発生しない通常の状態に比較して遅延が著しく増加して中継性能が落ち込むという課題がある。
When communicating between packets relayed on a network using packets encrypted by stream encryption, the order in which the encryption device transmits the packets and the order in which the decryption device receives the packets are switched, and a packet in the decryption device When the packet is received by overtaking another packet, the decoding device needs to generate a random number sequence necessary for decoding the overtaken packet in addition to generating a random number sequence necessary for decoding the received packet.
When overtaking occurs in this way, there is a problem in that the delay is significantly increased compared to a normal state where overtaking does not occur and the relay performance is degraded.

この発明は上記のような課題を解決することを主な目的の一つとしており、暗号文データの到着順序が入れ替わっても復号装置において遅延なく暗号文データを復号することを主な目的とする。   One of the main objects of the present invention is to solve the above-described problems, and it is a main object of the present invention to decrypt ciphertext data without delay in a decryption device even if the arrival order of ciphertext data is changed. .

本発明に係る復号装置は、
所定の乱数列生成アルゴリズムに従って乱数列を順序付けて生成し、データ順序が定められている平文データに対して順序が一致する乱数列を用いて平文データを暗号化する暗号装置から、平文データが暗号化された暗号文データを受信する復号装置であって、
前記暗号装置が用いる乱数列生成アルゴリズムと同じ乱数列生成アルゴリズムに従って乱数列を順序付けて生成する乱数生成部と、
前記乱数生成部により生成された複数の乱数列をその順序と対応付けて記憶する乱数記憶部と、
乱数列を用いて暗号文データを復号して平文データを抽出する復号部と、
前記暗号装置から送信された暗号文データを受信し、受信した暗号文データのデータ順序に一致する順序の乱数列を前記乱数記憶部から読み出し、読み出した乱数列と前記暗号文データとを前記復号部に出力するとともに、前記乱数生成部に対して新たな乱数列の生成を要求する受信部とを有し、
前記乱数生成部は、
前記受信部から新たな乱数列の生成が要求された場合に、前記暗号装置が用いる乱数列生成アルゴリズムと同じ乱数列生成アルゴリズムに従って、前記乱数記憶部における最後尾の順序の後の順序に対応する乱数列を生成し、
前記乱数記憶部は、
前記受信部が前記暗号文データに対して読み出した乱数列に代えて、前記乱数生成部により新たに生成された乱数列を記憶することを特徴とする。
The decoding device according to the present invention provides:
The plaintext data is encrypted from the encryption device that encrypts the plaintext data using a random number sequence that is generated by ordering the random number sequence according to a predetermined random number sequence generation algorithm and the order of the plaintext data with the data order determined. A decryption device for receiving encrypted ciphertext data,
A random number generation unit that generates an ordered random number sequence according to the same random number sequence generation algorithm as the random number sequence generation algorithm used by the cryptographic device;
A random number storage unit that stores a plurality of random number sequences generated by the random number generation unit in association with the order;
A decryption unit for decrypting ciphertext data using a random number sequence and extracting plaintext data;
The ciphertext data transmitted from the cipher apparatus is received, a random number sequence in an order matching the data order of the received ciphertext data is read from the random number storage unit, and the read random number sequence and the ciphertext data are decrypted And a receiver that requests the random number generator to generate a new random number sequence,
The random number generator
When the generation of a new random number sequence is requested from the receiving unit, it corresponds to the order after the last sequence in the random number storage unit according to the same random number sequence generation algorithm as the random number sequence generation algorithm used by the encryption device Generate a random number sequence,
The random number storage unit
The random number sequence newly generated by the random number generation unit is stored in place of the random number sequence read by the reception unit with respect to the ciphertext data.

本発明によれば、複数の乱数列を保持するとともに、受信した暗号文データの復号に用いるために乱数列を読み出した場合には、新たに乱数列を生成して補充することによって暗号文データの復号に使用すると予想される複数の乱数列を常に保持することができ、暗号文データの到着順序が入れ替わっても遅延なく暗号文データを復号することができる。   According to the present invention, a plurality of random number sequences are held, and when a random number sequence is read for use in decryption of the received ciphertext data, a new random number sequence is generated and supplemented to generate the ciphertext data. A plurality of random number sequences that are expected to be used for decryption can always be held, and the ciphertext data can be decrypted without delay even if the arrival order of the ciphertext data is changed.

実施の形態1.
図1は、本実施の形態に係る復号装置311の構成例を示す。
本実施の形態に係る復号装置311は、ストリーム暗号で暗号化されたパケットを中継するストリーム暗号パケット中継装置において用いられる。
なお、本復号装置311と対になる暗号装置の構成と動作は、図6及び図7を参照して背景技術において説明した通りである。
つまり、本実施の形態に係る復号装置311と対になる暗号装置は、所定の乱数列生成アルゴリズムに従って乱数列を順序付けて生成し、データ順序が定められている平文パケット(平文データ)に対して順序が一致する乱数列を用いて平文パケットを暗号化する暗号装置である。
そして、本実施の形態に係る復号装置311は、当該暗号装置から、平文パケットが暗号化された暗号文パケット(暗号文データ)を受信し、暗号文パケットのデータ順序に一致する順序の乱数列を用いて復号処理を行う。
Embodiment 1 FIG.
FIG. 1 shows a configuration example of a decoding device 311 according to the present embodiment.
Decryption apparatus 311 according to the present embodiment is used in a stream cipher packet relay apparatus that relays a packet encrypted with stream cipher.
The configuration and operation of the encryption device paired with the decryption device 311 are the same as those described in the background art with reference to FIGS.
That is, the encryption device paired with the decryption device 311 according to the present embodiment generates and generates a random number sequence in accordance with a predetermined random number sequence generation algorithm, and for a plaintext packet (plaintext data) in which the data order is determined. This is an encryption device that encrypts a plaintext packet using a random number sequence having the same order.
Then, the decryption apparatus 311 according to the present embodiment receives the ciphertext packet (ciphertext data) obtained by encrypting the plaintext packet from the encryption apparatus, and the random number sequence in the order matching the data order of the ciphertext packet. Is used to perform the decoding process.

最初に、本実施の形態における復号装置311の構成を説明する。
312は、復号装置311の受信部である。
313は、復号装置311のXOR部である。
314は、復号装置311の送信部である。
315は、復号装置311のクロック生成部である。
316は、復号装置311の乱数生成部である。乱数生成部316の構造と動作は図6の乱数生成部101で説明した通りである。
First, the configuration of decoding apparatus 311 in the present embodiment will be described.
Reference numeral 312 denotes a receiving unit of the decoding device 311.
Reference numeral 313 denotes an XOR section of the decoding device 311.
Reference numeral 314 denotes a transmission unit of the decoding device 311.
Reference numeral 315 denotes a clock generation unit of the decoding device 311.
Reference numeral 316 denotes a random number generation unit of the decryption device 311. The structure and operation of the random number generation unit 316 are as described for the random number generation unit 101 in FIG.

317は、復号装置311の乱数列である。
318は、復号装置311の共通鍵とIVである。
320は、復号装置311の乱数バッファである。乱数バッファ320はパケットを復号するための乱数列を格納するためのバッファであり、N(N≧2)個のパケットの乱数列を格納できるものとする。
321は、復号装置311の転送番号管理バッファである。転送番号管理バッファ321はパケットの転送番号を格納するためのバッファであり、N個のパケットの転送番号を格納できるものとする。
322は、復号装置311の最大転送番号レジスタである。最大転送番号レジスタ322はその内容が転送番号管理バッファ321に格納されたN個の転送番号の中で最も大きい番号(最後尾の順序の番号)を示すレジスタである。なお、最大転送番号レジスタで管理されているN個の転送番号の中で最も大きい番号をimaxとも表記する。
331は、平文パケットである。
332は、暗号文パケットである。暗号文パケット332には、ヘッダ部分に転送番号が示されている。
Reference numeral 317 denotes a random number sequence of the decryption device 311.
Reference numeral 318 denotes the common key and IV of the decryption apparatus 311.
320 is a random number buffer of the decoding device 311. The random number buffer 320 is a buffer for storing a random number sequence for decoding a packet, and can store a random number sequence of N (N ≧ 2) packets.
Reference numeral 321 denotes a transfer number management buffer of the decoding device 311. The transfer number management buffer 321 is a buffer for storing packet transfer numbers, and can store transfer numbers of N packets.
Reference numeral 322 denotes a maximum transfer number register of the decoding device 311. The maximum transfer number register 322 is a register indicating the largest number (number in the last order) among the N transfer numbers stored in the transfer number management buffer 321. The largest number among the N transfer numbers managed in the maximum transfer number register is also expressed as imax.
Reference numeral 331 denotes a plaintext packet.
Reference numeral 332 denotes a ciphertext packet. In the ciphertext packet 332, the transfer number is indicated in the header portion.

図1の構成において、乱数生成部316は、暗号装置が用いる乱数列生成アルゴリズムと同じ乱数列生成アルゴリズムに従って乱数列317を順序付けて生成する。つまり、乱数生成部316は、背景技術において説明したように、一つ前の乱数列の生成過程において生成された中間鍵を更新して次の中間鍵を生成し、生成した次の中間鍵の少なくとも一部を用いて次の乱数列を生成し、以降、中間鍵の更新と乱数列の生成を繰り返して、乱数列を順序付けて生成する。
乱数バッファ320は、乱数生成部316により生成された複数の乱数列317をその順序と対応付けて記憶する。乱数バッファ320は、乱数記憶部の例である。
受信部312は、暗号装置から送信された暗号文パケット332を受信し、受信した暗号文パケットの転送番号(データ順序)に一致する順序の乱数列を乱数バッファ320から読み出し、読み出した乱数列と暗号文パケット332とをXOR部313に出力するとともに、クロック生成部315を介して乱数生成部316に対して新たな乱数列の生成を要求する。
XOR部313は、受信部312から出力された乱数列を用いて暗号文パケット332を復号して平文パケット331を抽出する。XOR部313は、復号部の例である。
また、乱数生成部316は、受信部312から新たな乱数列の生成が要求された場合に、暗号装置が用いる乱数列生成アルゴリズムと同じ乱数列生成アルゴリズムに従って、乱数バッファ320における最後尾の順序の後の順序に対応する乱数列を生成し、乱数バッファ320は、受信部312が暗号文パケット332に対して読み出した乱数列に代えて、乱数生成部316により新たに生成された乱数列を記憶する。
In the configuration of FIG. 1, the random number generation unit 316 generates the random number sequence 317 in order according to the same random number sequence generation algorithm as the random number sequence generation algorithm used by the encryption device. That is, as described in the background art, the random number generation unit 316 updates the intermediate key generated in the previous random number sequence generation process to generate the next intermediate key, and generates the next intermediate key. The next random number sequence is generated using at least a part, and thereafter, the intermediate key update and the random number sequence generation are repeated to generate the random number sequence in order.
The random number buffer 320 stores a plurality of random number sequences 317 generated by the random number generation unit 316 in association with the order. The random number buffer 320 is an example of a random number storage unit.
The receiving unit 312 receives the ciphertext packet 332 transmitted from the encryption device, reads a random number sequence in an order that matches the transfer number (data order) of the received ciphertext packet from the random number buffer 320, and The ciphertext packet 332 is output to the XOR unit 313 and the random number generation unit 316 is requested to generate a new random number sequence via the clock generation unit 315.
The XOR unit 313 decrypts the ciphertext packet 332 using the random number sequence output from the reception unit 312 and extracts the plaintext packet 331. The XOR unit 313 is an example of a decoding unit.
In addition, when the reception unit 312 requests generation of a new random number sequence, the random number generation unit 316 determines the last order in the random number buffer 320 according to the same random number sequence generation algorithm as that used by the encryption device. A random number sequence corresponding to the later order is generated, and the random number buffer 320 stores the random number sequence newly generated by the random number generation unit 316 instead of the random number sequence read by the reception unit 312 with respect to the ciphertext packet 332. To do.

図2は、本実施の形態に係る復号装置の、乱数バッファ320と転送番号管理バッファ321の関係を示すものである。
転送番号管理バッファ321では、パケットの転送番号を記憶しており、乱数バッファでは転送番号管理バッファ321における転送番号の順序に対応させて、それぞれの転送番号のパケットの復号に用いられる乱数列が記憶されている。
このように、乱数バッファ320では、複数の乱数列を、パケットの転送番号(データ順序)に対応させて、順序付けて記憶している。
FIG. 2 shows the relationship between the random number buffer 320 and the transfer number management buffer 321 in the decoding apparatus according to the present embodiment.
The transfer number management buffer 321 stores the transfer number of the packet, and the random number buffer stores a random number sequence used for decoding the packet of each transfer number corresponding to the order of the transfer number in the transfer number management buffer 321. Has been.
In this manner, the random number buffer 320 stores a plurality of random number sequences in order in association with the packet transfer numbers (data order).

次に、本実施の形態における復号装置311の動作を説明する。   Next, the operation of decoding apparatus 311 in the present embodiment will be described.

まず、復号装置311は暗号化されたパケットで通信を行う前に対となる暗号装置との間で共通鍵とIV318を共有しておく。
また、復号装置311が対となる暗号装置と互いに正しく暗号化と復号を行うために前提となる動作として、復号装置311は、ここで共有した単一の共通鍵と単一のIVをもとにして生成される一連の乱数列から、受信したパケットの復号に必要な量の乱数列を順番に使用していく。
First, the decryption device 311 shares the common key and IV 318 with a pair of encryption devices before performing communication using the encrypted packet.
In addition, as a prerequisite operation for the decryption apparatus 311 to correctly encrypt and decrypt each other with a pair of encryption apparatuses, the decryption apparatus 311 is based on a single common key and a single IV shared here. From the series of random number sequences generated in this way, the random number sequence of the amount necessary for decoding the received packet is used in order.

さらに、パケットの通信を行う前の準備として、復号装置311は最初に受信するN個分のパケットの乱数列を事前に生成し乱数バッファ320に格納しておく。
そして、復号装置311は、転送番号管理バッファ321に、乱数を準備したN個のパケットのそれぞれの転送番号を格納しておく。
Further, as a preparation before performing packet communication, the decoding device 311 generates a random number sequence of N packets to be received first and stores it in the random number buffer 320 in advance.
Then, the decrypting device 311 stores the transfer numbers of the N packets prepared with random numbers in the transfer number management buffer 321.

以上の手順が完了すると、復号装置311は、暗号装置から送信された暗号文パケット332を受信することができる。
以下、復号装置311が暗号文パケット332を受信し、暗号文パケット332の復号を行う際の処理例を図3及び図4を参照して説明する。
When the above procedure is completed, the decryption device 311 can receive the ciphertext packet 332 transmitted from the encryption device.
Hereinafter, a processing example when the decryption apparatus 311 receives the ciphertext packet 332 and decrypts the ciphertext packet 332 will be described with reference to FIGS. 3 and 4.

まず、復号装置311が暗号文パケット332を受信する(S101)と、受信部312は受信したパケット毎の転送順序(ここではiとする)を転送番号管理バッファ321に存在するか否かを確認する(S102)。
ここで、確認の結果、(1)受信したパケットの転送番号と一致する転送番号が転送番号管理バッファ321に存在する場合と、(2)受信したパケットの転送番号と一致する転送番号が存在せずかつ受信したパケットの転送番号が転送番号管理バッファ321に格納されたN個の転送番号のいずれかよりも小さい場合(受信したバケットの転送番号がN個の転送番号のうちの先頭の順序のものよりも前の順序である場合)と、(3)受信したパケットの転送番号と一致する転送番号が存在せずかつ受信したパケットの転送番号が当該のバッファに格納されたN個の転送番号のいずれかよりも大きい場合(受信したバケットの転送番号がN個の転送番号のうちの最後尾の順序のものよりも後の順序である場合)の、3通りがある。
First, when the decryption device 311 receives the ciphertext packet 332 (S101), the reception unit 312 checks whether or not the transfer number management buffer 321 has the transfer order (here, i) for each received packet. (S102).
Here, as a result of the confirmation, (1) there is a transfer number that matches the transfer number of the received packet in the transfer number management buffer 321, and (2) there is no transfer number that matches the transfer number of the received packet. If the transfer number of the received packet is smaller than any of the N transfer numbers stored in the transfer number management buffer 321, the transfer number of the received bucket is the first transfer order of the N transfer numbers. (3) N transfer numbers in which there is no transfer number that matches the transfer number of the received packet and the transfer number of the received packet is stored in the buffer. If the transfer number of the received bucket is larger than any one of the N transfer numbers, there are three ways.

第一に、受信したパケットの転送番号に一致する転送番号が転送番号管理バッファ321に存在する場合(S102でYES)は、受信部312は、転送番号管理バッファ321のなかに転送番号がiからNを引いた数より小さいものがある場合(S103でYES)は、それを無効にする(ここではj個が無効化されたとする)(S104)。
なお、この場合の動作は、暗号装置が送信したパケットが何らかの理由でネットワーク上から消失したり、悪意を持った第三者が一度ネットワーク上に転送されたパケットを再送したりするような状況を想定している。復号装置311が一定時間を経過しても受信できなかったパケットの乱数列を無効にする動作である。
First, when a transfer number that matches the transfer number of the received packet exists in the transfer number management buffer 321 (YES in S102), the receiving unit 312 determines that the transfer number is i in the transfer number management buffer 321. If there is a value smaller than the number obtained by subtracting N (YES in S103), it is invalidated (assuming that j are invalidated here) (S104).
Note that the operation in this case is a situation in which the packet sent by the cryptographic device is lost from the network for some reason, or a malicious third party resends the packet once transferred to the network. Assumed. This is an operation of invalidating a random number sequence of a packet that could not be received even after a predetermined time has passed by the decryption apparatus 311.

例えば、図5(a)〜(c)に示す経緯で暗号文パケットが受信された場合は、図5(c)において転送番号11に対応する乱数列は無効化される。
具体的には、N=5の場合に、転送番号11〜15に対応する乱数列が乱数バッファ320に格納されているときに転送番号12(i=12)のパケットを受信した場合(図5(a))は、(i−N)は、12−5=7となり、すべての転送番号が(i−N)よりも値が大きいので、無効化される乱数列はない。
そして、次の番号である転送番号16に対応する乱数列が生成され、転送番号12の乱数列が格納されていた位置に転送番号16に対する乱数列が格納される。そして、この状態で、転送番号13(i=13)のパケットを受信した場合(図5(b))も、(i−N)は、13−5=8となり、すべての転送番号が(i−N)よりも値が大きいので、無効化される乱数列はない。
そして、次の番号である転送番号17に対応する乱数列が生成され、転送番号13の乱数列が格納されていた位置に転送番号17に対する乱数列が格納される。そして、この状態で、転送番号17(i=17)のパケットを受信した場合(図5(c))は、(i−N)は、17−5=12となり、転送番号11が(i−N)の値よりも小さいので、転送番号11に対する乱数列が無効化される。
For example, when a ciphertext packet is received as shown in FIGS. 5A to 5C, the random number sequence corresponding to the transfer number 11 is invalidated in FIG. 5C.
Specifically, when N = 5 and a random number sequence corresponding to transfer numbers 11 to 15 is stored in the random number buffer 320, a packet with transfer number 12 (i = 12) is received (FIG. 5). In (a)), (i−N) is 12−5 = 7, and all transfer numbers have a value larger than (i−N), so there is no random number sequence to be invalidated.
Then, a random number sequence corresponding to the next transfer number 16 is generated, and the random number sequence for the transfer number 16 is stored at the position where the random number sequence of the transfer number 12 was stored. In this state, when the packet with the transfer number 13 (i = 13) is received (FIG. 5B), (i−N) becomes 13−5 = 8, and all the transfer numbers are (i Since the value is larger than -N), no random number sequence is invalidated.
Then, a random number sequence corresponding to the transfer number 17 that is the next number is generated, and the random number sequence for the transfer number 17 is stored at the position where the random number sequence of the transfer number 13 was stored. In this state, when a packet with transfer number 17 (i = 17) is received (FIG. 5C), (i−N) is 17−5 = 12, and transfer number 11 is (i− Since the value is smaller than the value of N), the random number sequence for the transfer number 11 is invalidated.

一方、転送番号が(i−N)よりも小さいものがない場合(S103でNO)は、受信部312は、当該のパケットの復号に必要な乱数列をパケットの転送番号をもとにして乱数バッファ320から読みだしXOR部313に転送する(S105)。
さらに、受信部312は、クロック生成部315にパケット一個分の乱数列の生成を要求する(S106)とともに暗号文パケット332をXOR部313に転送する(S107)。
ここで生成を要求する乱数列は、今後受信することとなるパケット一個分の復号に必要な乱数列であるが、もしS104の動作において無効化した転送番号がある場合は、さらにパケットj個分の乱数列も要求する。
On the other hand, when there is no transfer number smaller than (i−N) (NO in S103), the receiving unit 312 uses the random number sequence necessary for decoding the packet as a random number based on the transfer number of the packet. The data is read from the buffer 320 and transferred to the XOR unit 313 (S105).
Further, the reception unit 312 requests the clock generation unit 315 to generate a random number sequence for one packet (S106) and transfers the ciphertext packet 332 to the XOR unit 313 (S107).
The random number sequence requested to be generated here is a random number sequence necessary for decoding one packet to be received in the future. If there is a transfer number invalidated in the operation of S104, an additional j packets are added. Request random number sequence.

次に、受信部312は、転送番号管理バッファ321のなかで転送番号がiの要素(領域)を、最大転送番号レジスタ322が示す値(imax)にさらに1を加えた値に変更する(S108)。
もしS104の動作において無効化した転送番号がある場合は、無効化したj個の要素を、最大転送番号レジスタ322が示す値(imax)にそれぞれ2からj+1ずつ加えた値に変更する。
Next, the receiving unit 312 changes the element (region) having the transfer number i in the transfer number management buffer 321 to a value obtained by adding 1 to the value (imax) indicated by the maximum transfer number register 322 (S108). ).
If there is an invalidated transfer number in the operation of S104, the invalidated j elements are changed to values obtained by adding 2 to j + 1 to the value (imax) indicated by the maximum transfer number register 322, respectively.

次に、受信部312は、最大転送番号レジスタ322の値(imax)に1を加える(S109)。
もしS104の動作において無効化した転送番号がある場合は、さらにjを加える。
Next, the receiving unit 312 adds 1 to the value (imax) of the maximum transfer number register 322 (S109).
If there is an invalid transfer number in the operation of S104, j is further added.

次に、XOR部313は、当該のパケットの復号に必要な乱数列と暗号文パケット332の排他的論理和をとり平文パケット331を生成し送信部314に転送する(S110)。
次に、送信部314は、平文パケット331を装置外に送信する。この際、ヘッダ部分に付与されたパケット毎の転送順序番号は削除して元に戻しておく。
Next, the XOR unit 313 takes the exclusive OR of the random number sequence necessary for decryption of the packet and the ciphertext packet 332, generates a plaintext packet 331, and transfers it to the transmission unit 314 (S110).
Next, the transmission unit 314 transmits the plaintext packet 331 outside the apparatus. At this time, the transfer sequence number for each packet assigned to the header portion is deleted and restored.

次に、クロック生成部315は、パケット一個分のクロックを生成して乱数生成部316に出力する。なお、もしS104の動作において無効化した転送番号がある場合は、これにパケットj個分のクロックを加えて生成する。   Next, the clock generation unit 315 generates a clock for one packet and outputs it to the random number generation unit 316. If there is an invalid transfer number in the operation of S104, it is generated by adding a clock for j packets to this.

次に、乱数生成部316は、乱数列317を生成し(S111)、受信部312に転送する。   Next, the random number generation unit 316 generates a random number sequence 317 (S111) and transfers it to the reception unit 312.

次に、受信部312は、乱数列317を乱数バッファ320に書き込む(S112)。
このときに乱数バッファ320のなかで乱数列317を書き込む場所は、これまでパケットの転送番号がiのパケットの乱数列が格納されていた場所である。
もしS104の動作において無効化した転送番号がある場合は乱数列317にはさらにパケットj個分の乱数列が含まれるが、乱数バッファ320のなかでこれらのパケットj個分の乱数列を書き込む場所は、転送番号管理バッファ321で新たに2からj+1の値を書き込んだ要素に対応する乱数バッファ内の位置で、受信部312はそれぞれの位置にj個の乱数列を生成した順に書き込む。
Next, the receiving unit 312 writes the random number sequence 317 in the random number buffer 320 (S112).
At this time, the place where the random number sequence 317 is written in the random number buffer 320 is the place where the random number sequence of the packet whose transfer number is i is stored.
If there is a transfer number invalidated in the operation of S104, the random number sequence 317 further includes a random number sequence for j packets, but the random number buffer 320 is where the random number sequence for these j packets is written. Is a position in the random number buffer corresponding to the element in which a value from 2 to j + 1 is newly written in the transfer number management buffer 321, and the receiving unit 312 writes j random number sequences to the respective positions in the order of generation.

第二に、受信したパケットの転送番号が転送番号管理バッファ321に格納されたN個の転送番号のいずれかよりも小さい場合、すなわちS102でNOであり、S113で小の場合は、受信部312は受信したパケットを復号せずに廃棄する(S114)。
なお、この場合の動作は、当該のパケットが暗号装置から送信されてから必要以上の時間を経過した後に復号装置が受信したもので通常起こりうる状況ではない。
悪意を持った第三者がパケットを再送したりすることを考慮して当該のパケットを廃棄する動作である。
Second, if the transfer number of the received packet is smaller than any of the N transfer numbers stored in the transfer number management buffer 321, that is, NO in S <b> 102 and smaller in S <b> 113, the receiving unit 312. Discards the received packet without decoding it (S114).
Note that the operation in this case is not a situation that can normally occur when the decryption device receives the packet after an unnecessarily long time has elapsed since the packet was transmitted from the encryption device.
This is an operation for discarding the packet in consideration of a malicious third party resending the packet.

第三に、受信したパケットの転送番号が転送番号管理バッファ321に格納されたN個の転送番号のいずれかよりも大きい場合、すなわちS102でNOであり、S113で大の場合は、受信部312は、受信したパケットを復号するための乱数列を含み、かつ転送番号が連続するパケットN個分の乱数列を新たに生成し、乱数バッファ320の内容を入れ替える。
なお、この場合の動作は、ケーブルの断線等で暗号装置から送信された暗号文パケットが一定の期間ネットワーク上で廃棄されていたことを考慮した動作である。
以下、詳細に動作を説明する。
Third, if the transfer number of the received packet is larger than any of the N transfer numbers stored in the transfer number management buffer 321, that is, NO in S 102 and large in S 113, the receiving unit 312. Includes a random number sequence for decrypting the received packet and newly generates a random number sequence for N packets with consecutive transfer numbers, and replaces the contents of the random number buffer 320.
The operation in this case is an operation that takes into account that the ciphertext packet transmitted from the encryption device due to cable disconnection or the like has been discarded on the network for a certain period.
Hereinafter, the operation will be described in detail.

まず、受信部312は、クロック生成部315にパケットN個分の乱数列の生成を要求する(S115)。
ここで、生成を要求する乱数列は、受信した当該のパケットを復号するための乱数列を含み、かつ転送番号が連続するパケットN個分の乱数列である。
なお、転送番号が連続するN個のパケットのそれぞれの転送番号をM、M+1、・・・、M+N−1とする。
受信したパケットの転送番号iは、このうちのどれかに一致することになる。
さらに受信部312は、転送番号管理バッファ321に、新たに乱数を準備するN個のパケットのそれぞれの転送番号M、M+1、・・・、M+N−1を格納する(S116)。つまり、転送番号管理バッファ321のN個の要素をM〜M+N−1の転送番号に対応させるように変更する。
First, the reception unit 312 requests the clock generation unit 315 to generate a random number sequence for N packets (S115).
Here, the random number sequence for which generation is requested is a random number sequence for N packets including a random number sequence for decoding the received packet and having consecutive transfer numbers.
Note that the transfer numbers of N packets with consecutive transfer numbers are M, M + 1,..., M + N−1.
The transfer number i of the received packet matches one of these.
Further, the reception unit 312 stores the transfer numbers M, M + 1,..., M + N−1 of N packets for which new random numbers are prepared in the transfer number management buffer 321 (S116). That is, the N elements of the transfer number management buffer 321 are changed to correspond to the transfer numbers M to M + N−1.

このときの乱数生成部316は、それまでの自身の内部状態は、転送番号が最大転送番号レジスタ322が示す値となるパケットを復号するための乱数列を生成する状態を保持している。
これに対してクロック生成部315は、乱数生成部316にクロックを継続して与えて転送番号がMのパケットを復号するための乱数列を生成する状態に遷移させる。
なお受信部312は、この間に生成される乱数列は破棄する。
次に、クロック生成部315は、パケットN個分のクロックを生成して乱数生成部316に出力する。
The random number generation unit 316 at this time holds a state of generating a random number sequence for decoding a packet whose transfer number has a value indicated by the maximum transfer number register 322 as its own internal state.
On the other hand, the clock generation unit 315 continuously gives a clock to the random number generation unit 316 and makes a transition to a state of generating a random number sequence for decoding a packet having a transfer number M.
The receiving unit 312 discards the random number sequence generated during this time.
Next, the clock generation unit 315 generates a clock for N packets and outputs it to the random number generation unit 316.

次に、乱数生成部316は、乱数列317を生成し(S117)、受信部312に転送する。   Next, the random number generation unit 316 generates a random number sequence 317 (S117) and transfers it to the reception unit 312.

次に、受信部312は、乱数列317を乱数バッファ320に書き込む(S118)。
このときに乱数バッファ320のなかでパケットN個分の乱数に相当する乱数列317を書き込む場所は、転送番号管理バッファ321で新たにMからM+(N−1)の値を書き込んだ要素に対応する乱数バッファ内の位置で、乱数生成部はそれぞれの位置にN個の乱数列を生成した順に書き込む。
次に、受信部312は、最大転送番号レジスタ322の内容をM+(N−1)に変更する(S119)。
Next, the receiving unit 312 writes the random number sequence 317 in the random number buffer 320 (S118).
At this time, the place where the random number sequence 317 corresponding to the random number of N packets is written in the random number buffer 320 corresponds to the element in which the value from M to M + (N−1) is newly written in the transfer number management buffer 321. The random number generation unit writes N random number sequences to the respective positions in the order in which they are generated.
Next, the receiving unit 312 changes the content of the maximum transfer number register 322 to M + (N−1) (S119).

次に、受信部312は暗号文パケット332をXOR部313に転送する。
また、受信部312は、当該のパケットの復号に必要な乱数列317をパケットの転送番号をもとにして乱数バッファ320から読みだしXOR部313に転送する(S105)。
Next, the receiving unit 312 transfers the ciphertext packet 332 to the XOR unit 313.
The receiving unit 312 reads the random number sequence 317 necessary for decoding the packet from the random number buffer 320 based on the transfer number of the packet, and transfers it to the XOR unit 313 (S105).

次に、受信部312は、クロック生成部315にパケット一個分の乱数列の生成を要求する(S106)。
ここで生成を要求する乱数列は、今後受信することとなる転送番号がM+Nのパケットの復号に必要な乱数列である。
さらに受信部312は、転送番号管理バッファ321のうち転送番号がiの要素を、最大転送番号レジスタ322が示す値(imax)にさらに1を加えた値に変更する(S108)。
Next, the reception unit 312 requests the clock generation unit 315 to generate a random number sequence for one packet (S106).
Here, the random number sequence that is requested to be generated is a random number sequence that is necessary for decoding a packet with a transfer number M + N that will be received in the future.
Further, the receiving unit 312 changes the element having the transfer number i in the transfer number management buffer 321 to a value obtained by adding 1 to the value (imax) indicated by the maximum transfer number register 322 (S108).

次に、XOR部313は、当該のパケットの復号に必要な乱数列と暗号文パケット332の排他的論理和をとり平文パケット331を生成し送信部314に転送する(S110)。
次に、送信部314は、平文パケット331を装置外に送信する。この際、ヘッダ部分に付与されたパケット毎の転送順序番号は削除して元に戻しておく。
Next, the XOR unit 313 takes the exclusive OR of the random number sequence necessary for decryption of the packet and the ciphertext packet 332, generates a plaintext packet 331, and transfers it to the transmission unit 314 (S110).
Next, the transmission unit 314 transmits the plaintext packet 331 outside the apparatus. At this time, the transfer sequence number for each packet assigned to the header portion is deleted and restored.

次に、クロック生成部315は、パケット一個分のクロックを生成して乱数生成部316に出力する。   Next, the clock generation unit 315 generates a clock for one packet and outputs it to the random number generation unit 316.

次に、乱数生成部316は、乱数列317を生成し(S111)、受信部312に転送する。   Next, the random number generation unit 316 generates a random number sequence 317 (S111) and transfers it to the reception unit 312.

次に、受信部312は、乱数列317を乱数バッファ320に書き込む(S112)。
このときに乱数バッファ320のなかで乱数列317を書き込む場所は、これまでパケットの転送番号がiのパケットの乱数列が格納されていた場所である。
Next, the receiving unit 312 writes the random number sequence 317 in the random number buffer 320 (S112).
At this time, the place where the random number sequence 317 is written in the random number buffer 320 is the place where the random number sequence of the packet whose transfer number is i is stored.

復号装置311がパケットの復号する際の遅延を少なくするには、なるべくS102でYESとなる第一のケースで動作できるようにする必要がある。
このため、乱数バッファ320が格納する乱数列の量には、暗号装置から復号装置311にパケットが到着するまでの遅延や、両装置の間に存在するルータ等の中継機器等の影響を考慮して、それぞれのネットワークに適切となるように選択する。
In order to reduce the delay when the decoding apparatus 311 decodes the packet, it is necessary to enable the operation in the first case where YES is obtained in S102 as much as possible.
For this reason, the amount of the random number sequence stored in the random number buffer 320 takes into account the delay until the packet arrives from the encryption device to the decryption device 311 and the influence of a relay device such as a router existing between the two devices. Select the appropriate one for each network.

以上のように、本実施の形態によれば、復号装置の、乱数バッファを複数のパケットの乱数列を格納できるように、転送番号管理バッファと最大転送番号を当該のパケットが既に受信済か否かを把握できるように、またそれを把握したことによって受信部が乱数バッファを更新できるように構成することで、復号装置でパケットの到着順序が入れ替わっても、当該パケットを復号するための乱数列が乱数バッファに用意されている範囲であれば、遅延を増すことなくパケットを復号して中継することができる。   As described above, according to the present embodiment, whether or not the packet has already received the transfer number management buffer and the maximum transfer number so that the random number buffer of the decoding apparatus can store a random number sequence of a plurality of packets. This is a random number sequence for decoding the packet even if the order of arrival of the packets is changed by the decoding device. Is within the range prepared in the random number buffer, the packet can be decoded and relayed without increasing the delay.

以上、本実施の形態では、常に乱数生成部から生成された一定量の乱数列を所定のバッファに準備しておき、パケットを受信してバッファにある乱数列を復号で使用したら、乱数生成部で新たに乱数列を生成してバッファに補充することによって、パケットの到着順序が入れ替わっても遅延を増すことなくストリーム暗号で暗号化されたパケットを復号することができる復号装置について説明した。   As described above, in the present embodiment, when a predetermined amount of random number sequence generated from the random number generation unit is always prepared in a predetermined buffer and the packet is received and the random number sequence in the buffer is used for decoding, the random number generation unit In the above description, a decryption apparatus has been described in which a random number sequence is newly generated and the buffer is replenished, so that packets encrypted with the stream cipher can be decrypted without increasing the delay even if the arrival order of the packets is changed.

なお、以上の説明では、復号装置としてIPsec等における中継装置を例示しつつ説明を行ったが、復号装置はパケットの最終的な受信装置であってもよい。   In the above description, the relay apparatus in IPsec or the like is exemplified as the decoding apparatus, but the decoding apparatus may be a final packet receiving apparatus.

最後に、本実施の形態に示した復号装置311のハードウェア構成例について説明する。
図8は、本実施の形態に示す復号装置311のハードウェア資源の一例を示す図である。
なお、図8の構成は、あくまでも復号装置311のハードウェア構成の一例を示すものであり、復号装置311のハードウェア構成は図8に記載の構成に限らず、他の構成であってもよい。
Lastly, a hardware configuration example of the decoding device 311 described in this embodiment will be described.
FIG. 8 is a diagram illustrating an example of hardware resources of the decoding device 311 illustrated in the present embodiment.
The configuration in FIG. 8 is merely an example of the hardware configuration of the decoding device 311. The hardware configuration of the decoding device 311 is not limited to the configuration described in FIG. .

図8において、復号装置311は、プログラムを実行するCPU911(Central Processing Unit、中央処理装置、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータ、プロセッサともいう)を備えている。
CPU911は、バス912を介して、例えば、ROM(Read Only Memory)913、RAM(Random Access Memory)914、通信ボード915、表示装置901、キーボード902、マウス903、磁気ディスク装置920と接続され、これらのハードウェアデバイスを制御する。
更に、CPU911は、FDD904(Flexible Disk Drive)、コンパクトディスク装置905(CDD)、プリンタ装置906、スキャナ装置907と接続していてもよい。また、磁気ディスク装置920の代わりに、光ディスク装置、メモリカード(登録商標)読み書き装置などの記憶装置でもよい。
RAM914は、揮発性メモリの一例である。ROM913、FDD904、CDD905、磁気ディスク装置920の記憶媒体は、不揮発性メモリの一例である。これらは、記憶装置の一例である。
通信ボード915、キーボード902、マウス903、スキャナ装置907、FDD904などは、入力装置の一例である。
また、通信ボード915、表示装置901、プリンタ装置906などは、出力装置の一例である。
In FIG. 8, the decoding device 311 includes a CPU 911 (also referred to as a central processing unit, a central processing unit, a processing unit, an arithmetic unit, a microprocessor, a microcomputer, and a processor) that executes a program.
The CPU 911 is connected to, for example, a ROM (Read Only Memory) 913, a RAM (Random Access Memory) 914, a communication board 915, a display device 901, a keyboard 902, a mouse 903, and a magnetic disk device 920 via a bus 912. Control hardware devices.
Further, the CPU 911 may be connected to an FDD 904 (Flexible Disk Drive), a compact disk device 905 (CDD), a printer device 906, and a scanner device 907. Further, instead of the magnetic disk device 920, a storage device such as an optical disk device or a memory card (registered trademark) read / write device may be used.
The RAM 914 is an example of a volatile memory. The storage media of the ROM 913, the FDD 904, the CDD 905, and the magnetic disk device 920 are an example of a nonvolatile memory. These are examples of the storage device.
A communication board 915, a keyboard 902, a mouse 903, a scanner device 907, an FDD 904, and the like are examples of input devices.
The communication board 915, the display device 901, the printer device 906, and the like are examples of output devices.

通信ボード915は、ネットワークに接続されている。例えば、通信ボード915は、LAN(ローカルエリアネットワーク)、インターネット、WAN(ワイドエリアネットワーク)などに接続されている。   The communication board 915 is connected to the network. For example, the communication board 915 is connected to a LAN (local area network), the Internet, a WAN (wide area network), or the like.

磁気ディスク装置920には、オペレーティングシステム921(OS)、ウィンドウシステム922、プログラム群923、ファイル群924が記憶されている。
プログラム群923のプログラムは、CPU911がオペレーティングシステム921、ウィンドウシステム922を利用しながら実行する。
The magnetic disk device 920 stores an operating system 921 (OS), a window system 922, a program group 923, and a file group 924.
The programs in the program group 923 are executed by the CPU 911 using the operating system 921 and the window system 922.

また、RAM914には、CPU911に実行させるオペレーティングシステム921のプログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。
また、RAM914には、CPU911による処理に必要な各種データが格納される。
The RAM 914 temporarily stores at least part of the operating system 921 program and application programs to be executed by the CPU 911.
The RAM 914 stores various data necessary for processing by the CPU 911.

また、ROM913には、BIOS(Basic Input Output System)プログラムが格納され、磁気ディスク装置920にはブートプログラムが格納されている。
復号装置311の起動時には、ROM913のBIOSプログラム及び磁気ディスク装置920のブートプログラムが実行され、BIOSプログラム及びブートプログラムによりオペレーティングシステム921が起動される。
The ROM 913 stores a BIOS (Basic Input Output System) program, and the magnetic disk device 920 stores a boot program.
When the decryption device 311 is activated, the BIOS program in the ROM 913 and the boot program in the magnetic disk device 920 are executed, and the operating system 921 is activated by the BIOS program and the boot program.

上記プログラム群923には、本実施の形態の説明において「〜部」として説明している機能を実行するプログラムが記憶されている。プログラムは、CPU911により読み出され実行される。   The program group 923 stores programs for executing the functions described as “˜units” in the description of the present embodiment. The program is read and executed by the CPU 911.

ファイル群924には、本実施の形態の説明において、「〜の判断」、「〜の計算」、「〜の演算」、「〜の比較」、「〜の生成」、「〜の更新」、「〜の設定」、「〜の登録」、「〜の選択」等として説明している処理の結果を示す情報やデータや信号値や変数値やパラメータが、「〜ファイル」や「〜データベース」の各項目として記憶されている。
「〜ファイル」や「〜データベース」は、ディスクやメモリなどの記録媒体に記憶される。ディスクやメモリなどの記憶媒体に記憶された情報やデータや信号値や変数値やパラメータは、読み書き回路を介してCPU911によりメインメモリやキャッシュメモリに読み出され、抽出・検索・参照・比較・演算・計算・処理・編集・出力・印刷・表示などのCPUの動作に用いられる。
抽出・検索・参照・比較・演算・計算・処理・編集・出力・印刷・表示のCPUの動作の間、情報やデータや信号値や変数値やパラメータは、メインメモリ、レジスタ、キャッシュメモリ、バッファメモリ等に一時的に記憶される。
また、本実施の形態で説明しているフローチャートの矢印の部分は主としてデータや信号の入出力を示し、データや信号値は、RAM914のメモリ、FDD904のフレキシブルディスク、CDD905のコンパクトディスク、磁気ディスク装置920の磁気ディスク、その他光ディスク、ミニディスク、DVD等の記録媒体に記録される。また、データや信号は、バス912や信号線やケーブルその他の伝送媒体によりオンライン伝送される。
In the description of the present embodiment, in the file group 924, “determination of”, “calculation of”, “calculation of”, “comparison of”, “generation of”, “update of”, Information, data, signal values, variable values, and parameters indicating the results of the processing described as “setting of”, “registration of”, “selection of”, etc. are “~ file” or “˜database”. It is memorized as each item.
The “˜file” and “˜database” are stored in a recording medium such as a disk or a memory. Information, data, signal values, variable values, and parameters stored in a storage medium such as a disk or memory are read out to the main memory or cache memory by the CPU 911 via a read / write circuit, and extracted, searched, referenced, compared, and calculated. Used for CPU operations such as calculation, processing, editing, output, printing, and display.
Information, data, signal values, variable values, and parameters are stored in the main memory, registers, cache memory, and buffers during the CPU operations of extraction, search, reference, comparison, calculation, processing, editing, output, printing, and display. It is temporarily stored in a memory or the like.
Also, the arrows in the flowchart described in this embodiment mainly indicate input / output of data and signals, and the data and signal values are the RAM 914 memory, the FDD904 flexible disk, the CDD905 compact disk, and the magnetic disk device. It is recorded on a recording medium such as a 920 magnetic disk, other optical disks, minidisks, and DVDs. Data and signals are transmitted online via a bus 912, signal lines, cables, or other transmission media.

また、本実施の形態の説明において「〜部」として説明しているものは、「〜回路」、「〜装置」、「〜機器」であってもよく、また、「〜ステップ」、「〜手順」、「〜処理」であってもよい。すなわち、「〜部」として説明しているものは、ROM913に記憶されたファームウェアで実現されていても構わない。或いは、ソフトウェアのみ、或いは、素子・デバイス・基板・配線などのハードウェアのみ、或いは、ソフトウェアとハードウェアとの組み合わせ、さらには、ファームウェアとの組み合わせで実施されても構わない。ファームウェアとソフトウェアは、プログラムとして、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ミニディスク、DVD等の記録媒体に記憶される。プログラムはCPU911により読み出され、CPU911により実行される。すなわち、プログラムは、本実施の形態の「〜部」としてコンピュータを機能させるものである。あるいは、本実施の形態の「〜部」の手順や方法をコンピュータに実行させるものである。   In addition, what is described as “˜unit” in the description of the present embodiment may be “˜circuit”, “˜device”, “˜device”, and “˜step”, “˜”. “Procedure” and “˜Process” may be used. That is, what is described as “˜unit” may be realized by firmware stored in the ROM 913. Alternatively, it may be implemented only by software, or only by hardware such as elements, devices, substrates, and wirings, by a combination of software and hardware, or by a combination of firmware. Firmware and software are stored as programs in a recording medium such as a magnetic disk, a flexible disk, an optical disk, a compact disk, a mini disk, and a DVD. The program is read by the CPU 911 and executed by the CPU 911. In other words, the program causes the computer to function as “to part” of the present embodiment. Alternatively, the procedure or method of “˜unit” in the present embodiment is executed by a computer.

このように、本実施の形態に示す復号装置311は、処理装置たるCPU、記憶装置たるメモリ、磁気ディスク等、入力装置たるキーボード、マウス、通信ボード等、出力装置たる表示装置、通信ボード等を備えるコンピュータであり、上記したように「〜部」として示された機能をこれら処理装置、記憶装置、入力装置、出力装置を用いて実現するものである。   As described above, the decoding device 311 described in this embodiment includes a CPU that is a processing device, a memory that is a storage device, a magnetic disk, a keyboard that is an input device, a mouse, a communication board, and a display device that is an output device, a communication board, and the like. As described above, the computer includes the functions indicated as “to part” by using these processing devices, storage devices, input devices, and output devices.

実施の形態1に係る復号装置の構成例を示す図。FIG. 3 shows a configuration example of a decoding apparatus according to the first embodiment. 実施の形態1に係る復号装置の乱数バッファと転送番号管理バッファとの関係を説明する図。FIG. 6 is a diagram for explaining a relationship between a random number buffer and a transfer number management buffer of the decoding device according to the first embodiment. 実施の形態1に係る復号装置の動作例を示すフローチャート図。FIG. 6 is a flowchart showing an operation example of the decoding apparatus according to the first embodiment. 実施の形態1に係る復号装置の動作例を示すフローチャート図。FIG. 6 is a flowchart showing an operation example of the decoding apparatus according to the first embodiment. 実施の形態1に係る復号装置において乱数列が無効化される例を説明する図。FIG. 6 illustrates an example in which a random number sequence is invalidated in the decryption device according to the first embodiment. 一般的なストリーム暗号の暗号装置の構成例を示す図。The figure which shows the structural example of the encryption apparatus of a general stream encryption. 一般的なストリーム暗号パケット中継装置を示す図。The figure which shows a general stream encryption packet relay apparatus. 実施の形態1に係る復号装置のハードウェア構成例を示す図。FIG. 3 is a diagram illustrating a hardware configuration example of the decoding device according to the first embodiment.

符号の説明Explanation of symbols

311 復号装置、312 受信部、313 XOR部、314 送信部、315 クロック生成部、316 乱数生成部、317 乱数列、318 共通鍵・IV、320 乱数バッファ、321 転送番号管理バッファ、322 最大転送番号レジスタ、331 平文パケット、332 暗号文パケット。   311 Decoder, 312 Receiver, 313 XOR, 314 Transmitter, 315 Clock Generator, 316 Random Number Generator, 317 Random Number Sequence, 318 Common Key / IV, 320 Random Number Buffer, 321 Transfer Number Management Buffer, 322 Maximum Transfer Number Register, 331 plaintext packet, 332 ciphertext packet.

Claims (5)

所定の乱数列生成アルゴリズムに従って乱数列を順序付けて生成し、データ順序が定められている平文データに対して順序が一致する乱数列を用いて平文データを暗号化する暗号装置から、平文データが暗号化された暗号文データを受信する復号装置であって、
前記暗号装置が用いる乱数列生成アルゴリズムと同じ乱数列生成アルゴリズムに従って乱数列を順序付けて生成する乱数生成部と、
前記乱数生成部により生成されたN(N≧2)個の乱数列をその順序と対応付けて記憶する乱数記憶部と、
記暗号装置から送信された暗号文データを受信し、受信した暗号文データのデータ順序に一致する順序の乱数列が前記乱数記憶部に記憶されていない場合に、受信した暗号文データのデータ順序が前記乱数記憶部における先頭の順序よりも前の順序であるか最後尾の順序よりも後の順序であるかを判断し、受信した暗号文のデータ順序が前記乱数記憶部における最後尾の順序よりも後の順序の場合は、前記暗号文データのデータ順序に一致する順序の乱数列を含むN個の乱数列を生成するよう前記乱数生成部に対して要求する受信部とを有し、
前記乱数生成部は、
前記受信部からN個の乱数列の生成を要求された場合に、前記暗号装置が用いる乱数列生成アルゴリズムと同じ乱数列生成アルゴリズムに従って、前記受信部が受信した暗号文データのデータ順序に一致する順序の乱数列を含むN個の乱数列を生成し、
前記乱数記憶部は、
記憶しているN個の乱数列に代えて、前記乱数生成部により生成された新たなN個の乱数列を記憶することを特徴とする復号装置。
The plaintext data is encrypted from the encryption device that encrypts the plaintext data using a random number sequence that is generated by ordering the random number sequence according to a predetermined random number sequence generation algorithm and the order of the plaintext data with the data order determined. A decryption device for receiving encrypted ciphertext data,
A random number generation unit that generates an ordered random number sequence according to the same random number sequence generation algorithm as the random number sequence generation algorithm used by the cryptographic device;
A random number storage unit that stores N (N ≧ 2) random number sequences generated by the random number generation unit in association with the order;
Receiving the encrypted data transmitted from the previous SL encryptor, when the random number sequence order that matches the data order of the encrypted data received is not stored in the random number memory unit, the data of the ciphertext data received It is determined whether the order is the order before the head order in the random number storage unit or the order after the tail order, and the data order of the received ciphertext is the last order in the random number storage unit A receiving unit that requests the random number generation unit to generate N random number sequences including a random number sequence in an order that matches the data sequence of the ciphertext data in the case of an order later than the order; ,
The random number generator
When generation of N random number sequences is requested from the receiving unit, the data order of the ciphertext data received by the receiving unit is matched according to the same random number sequence generating algorithm as the random number sequence generating algorithm used by the encryption device Generate N random number sequences including random number sequences in order ,
The random number storage unit
Instead of the N random sequence stored to have the decoding apparatus characterized by storing a new N random sequence generated by the random number generating unit.
前記受信部は、
前記乱数生成部によりN個の乱数列が新たに生成され、前記乱数記憶部により新たなN個の乱数列が記憶された後に、受信した暗号文データのデータ順序に一致する順序の乱数列を前記乱数記憶部から読み出すことを特徴とする請求項に記載の復号装置。
The receiver is
After the N random number sequences are newly generated by the random number generation unit and the new N random number sequences are stored by the random number storage unit, the random number sequence in the order matching the data sequence of the received ciphertext data The decoding device according to claim 1 , wherein the decoding device reads out from the random number storage unit.
前記受信部は、
受信した暗号文のデータ順序が前記乱数記憶部における先頭の順序よりも前の順序の場合は、受信した暗号文データを破棄することを特徴とする請求項又はに記載の復号装置。
The receiver is
It received if the data order is the order before the beginning of the sequence in the random number memory unit of ciphertext decryption apparatus according to claim 1 or 2, characterized in that discarding the ciphertext data received.
所定の乱数列生成アルゴリズムに従って乱数列を順序付けて生成し、データ順序が定められている平文データに対して順序が一致する乱数列を用いて平文データを暗号化する暗号装置から、平文データが暗号化された暗号文データを受信する復号装置であって、
前記暗号装置が用いる乱数列生成アルゴリズムと同じ乱数列生成アルゴリズムに従って乱数列を順序付けて生成する乱数生成部と、
前記乱数生成部により生成されたN(N≧2)個の乱数列をその順序と対応付けて記憶する乱数記憶部と、
記暗号装置から送信された暗号文データを受信し、受信した暗号文データのデータ順序に一致する順序の乱数列を前記乱数記憶部から読み出すとともに、受信した暗号文データのデータ順序から値Nを減じた値よりも前の順序の乱数列が前記乱数記憶部に記憶されているか否かを判定し、当該乱数列が前記乱数記憶部に記憶されている場合に、当該乱数列を無効化し、前記乱数生成部に対して、受信した暗号文データに対して読み出した乱数列の代わりとなる新たな乱数列の生成を要求するとともに、無効化した乱数列の代わりとなる新たな乱数列の生成を要求する受信部とを有し、
前記乱数生成部は、
前記受信部から新たな乱数列の生成が要求された場合に、前記暗号装置が用いる乱数列生成アルゴリズムと同じ乱数列生成アルゴリズムに従って、前記乱数記憶部における最後尾の順序の後の順序に対応する乱数列を生成し、
前記乱数記憶部は、
前記受信部が前記暗号文データに対して読み出した乱数列及び前記受信部が無効化した乱数列に代えて、前記乱数生成部により新たに生成された乱数列を記憶することを特徴とする復号装置。
The plaintext data is encrypted from the encryption device that encrypts the plaintext data using a random number sequence that is generated by ordering the random number sequence according to a predetermined random number sequence generation algorithm and the order of the plaintext data with the data order determined. A decryption device for receiving encrypted ciphertext data,
A random number generation unit that generates an ordered random number sequence according to the same random number sequence generation algorithm as the random number sequence generation algorithm used by the cryptographic device;
A random number storage unit that stores N (N ≧ 2) random number sequences generated by the random number generation unit in association with the order;
Receiving the encrypted data transmitted from the previous SL encryptor, with to read out the random number sequence order that matches the data order of the encrypted data received from the random number memory unit, the data order of the encrypted data received It is determined whether or not a random number sequence in an order before a value obtained by subtracting the value N is stored in the random number storage unit, and when the random number sequence is stored in the random number storage unit, the random number sequence is Invalidate and request the random number generator to generate a new random number sequence to replace the read random number sequence with respect to the received ciphertext data, and a new random number to replace the invalid random number sequence A receiving unit that requests generation of a sequence;
The random number generator
When the generation of a new random number sequence is requested from the receiving unit, it corresponds to the order after the last sequence in the random number storage unit according to the same random number sequence generation algorithm as the random number sequence generation algorithm used by the encryption device Generate a random number sequence,
The random number storage unit
The decryption unit stores a random number sequence newly generated by the random number generation unit in place of the random number sequence read by the reception unit with respect to the ciphertext data and the random number sequence invalidated by the reception unit. apparatus.
前記乱数生成部は、
一つ前の順序の乱数列の生成過程において生成された中間鍵を更新して次の中間鍵を生成し、生成した次の中間鍵の少なくとも一部を用いて次の順序の乱数列を生成し、以降、中間鍵の更新と乱数列の生成を繰り返して、乱数列を順序付けて生成することを特徴とする請求項1〜のいずれかに記載の復号装置。
The random number generator
The intermediate key generated in the process of generating the previous random number sequence is updated to generate the next intermediate key, and the next random number sequence is generated using at least a part of the generated next intermediate key and, since, by repeating the generation of updates and random number sequence intermediate key, decoding apparatus according to any one of claims 1 to 4, wherein the generating order the random number sequence.
JP2008126727A 2008-05-14 2008-05-14 Decoding device Expired - Fee Related JP5100497B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008126727A JP5100497B2 (en) 2008-05-14 2008-05-14 Decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008126727A JP5100497B2 (en) 2008-05-14 2008-05-14 Decoding device

Publications (2)

Publication Number Publication Date
JP2009278306A JP2009278306A (en) 2009-11-26
JP5100497B2 true JP5100497B2 (en) 2012-12-19

Family

ID=41443328

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008126727A Expired - Fee Related JP5100497B2 (en) 2008-05-14 2008-05-14 Decoding device

Country Status (1)

Country Link
JP (1) JP5100497B2 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2950485B2 (en) * 1992-02-17 1999-09-20 富士通エフ・アイ・ピー株式会社 Stream cipher processor
JP3769804B2 (en) * 1996-02-02 2006-04-26 ソニー株式会社 Decoding method and electronic device
JPH1141245A (en) * 1997-07-22 1999-02-12 Fujitsu Ltd Secret communication system
JP2003333032A (en) * 2002-05-15 2003-11-21 Oki Electric Ind Co Ltd Encryption processing method and encryption processor
JP4049104B2 (en) * 2004-01-30 2008-02-20 日本電気株式会社 Content distribution system, server, client, and program
JP4784044B2 (en) * 2004-03-15 2011-09-28 富士電機株式会社 Communication method and communication apparatus
JP2006019975A (en) * 2004-06-30 2006-01-19 Matsushita Electric Ind Co Ltd Cipher packet communication system, receiving device and transmitting device with which same is equipped , and communication method, receiving method, transmitting method, receiving program and transmitting program for cipher packet which are applied thereto

Also Published As

Publication number Publication date
JP2009278306A (en) 2009-11-26

Similar Documents

Publication Publication Date Title
US7336783B2 (en) Cryptographic systems and methods supporting multiple modes
US8983061B2 (en) Method and apparatus for cryptographically processing data
CN103109493B (en) Communicator, program and method
EP2634991B1 (en) Content-centric networking
US20070258468A1 (en) Intermediate network node supporting packet analysis of encrypted payload
US6944762B1 (en) System and method for encrypting data messages
US20070180270A1 (en) Encryption/decryption device, communication controller, and electronic instrument
CN111832051B (en) Symmetric encryption and decryption method and system based on FPGA
JP5133850B2 (en) Re-encryption system for storage node and network storage
CN106209401A (en) A kind of transmission method and device
CN115242415A (en) Data encryption method implemented at edge switch, electronic device, and program product
JP5100497B2 (en) Decoding device
KR101445483B1 (en) Method and system for secure data transfer using conditional proxy re-encryption
JP4912797B2 (en) ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION METHOD, AND PROGRAM
WO2022179326A1 (en) Encrypted communication using counter mode encryption and secret keys
KR20190069763A (en) Lightweight encryption algorithm security apparatus based on hardware authentication chip
Tripathi et al. The hybrid cryptography for enhancing the data security in fog computing
CN110611674B (en) Protocol interaction method, system and storage medium between different computer systems
JP5178269B2 (en) Decoding device and program
JP2010268149A (en) Decoder, decoding method, and program
US20250007722A1 (en) Multi-part transaction integrity protection and encryption
JP7213664B2 (en) Relay device, relay method and relay program
WO2006073200A1 (en) Communication system and communication method
JPH0934355A (en) Ciphering system and ciphering system applicable to communication network
CN119072897A (en) Encryption system and encryption method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110114

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120717

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120807

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: 20120828

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120925

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151005

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees