JP2011130312A - Ciphering device and deciphering device for stream cipher, ciphering method and deciphering method for stream cipher, and program - Google Patents

Ciphering device and deciphering device for stream cipher, ciphering method and deciphering method for stream cipher, and program Download PDF

Info

Publication number
JP2011130312A
JP2011130312A JP2009288629A JP2009288629A JP2011130312A JP 2011130312 A JP2011130312 A JP 2011130312A JP 2009288629 A JP2009288629 A JP 2009288629A JP 2009288629 A JP2009288629 A JP 2009288629A JP 2011130312 A JP2011130312 A JP 2011130312A
Authority
JP
Japan
Prior art keywords
internal state
plaintext
ciphertext
bit string
bit
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.)
Granted
Application number
JP2009288629A
Other languages
Japanese (ja)
Other versions
JP5489696B2 (en
Inventor
Shinsaku Kiyomoto
晋作 清本
Toshiaki Tanaka
俊昭 田中
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.)
KDDI Corp
Original Assignee
KDDI 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 KDDI Corp filed Critical KDDI Corp
Priority to JP2009288629A priority Critical patent/JP5489696B2/en
Publication of JP2011130312A publication Critical patent/JP2011130312A/en
Application granted granted Critical
Publication of JP5489696B2 publication Critical patent/JP5489696B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To improve the efficiency of ciphering or deciphering processing for a short plain text or a short cipher text without adding a different logic. <P>SOLUTION: Initialization is performed using an initial key and an initial vector, and after completing the initialization processing, a bit sequence having the same length of the cipher text is selected from an internal state. Then, exclusive OR operation is performed between the selected bit sequence and the cipher text to output a plain text. Accordingly, a short cipher text is decrypted without processing of key-based sequence generation, so that the deciphering processing is made to be more efficient without requiring adding a different logic. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、ストリーム暗号の暗号化装置、ストリーム暗号の復号化装置、ストリーム暗号の暗号化方法、ストリーム暗号の復号化方法およびプログラムに関する。   The present invention relates to a stream cipher encryption apparatus, a stream cipher decryption apparatus, a stream cipher encryption method, a stream cipher decryption method, and a program.

近年、インターネットの目覚しい普及により、コンピュータを利用した様々なサービスが提供されている。こうして提供されるサービスの多くは、その通信内容を秘匿化するために暗号が利用されている。ここで、暗号方式としては、1つの鍵で暗号化と復号化とを行う共通鍵暗号方式が一般的であるが、この共通鍵暗号方式は、大きくブロック暗号方式とストリーム暗号方式とに大別される。   In recent years, various services using computers have been provided due to the remarkable spread of the Internet. Many of the services provided in this way use encryption to conceal the communication contents. Here, as the encryption method, a common key encryption method in which encryption and decryption are performed with one key is common, but this common key encryption method is roughly divided into a block encryption method and a stream encryption method. Is done.

ストリーム暗号方式は、ブロック暗号方式よりも高速な処理が期待できるため、例えば、映画等の大容量データを伝送するための方式として、近年、注目を浴びているが、ストリーム暗号方式の場合には、暗号処理と復号処理との同期をとらなければならないという問題があった。そのため、一定サイズ以上の誤りなく受信した暗号文を利用して、同期を自動的に回復する自己同期型のストリーム暗号装置が提案されている(例えば、特許文献1参照。)。   Since the stream encryption method can be expected to process faster than the block encryption method, for example, as a method for transmitting large-capacity data such as a movie in recent years, attention has been paid to the stream encryption method. There is a problem that the encryption process and the decryption process must be synchronized. For this reason, a self-synchronous stream cipher apparatus that automatically recovers synchronization using a ciphertext received without error of a certain size or more has been proposed (for example, see Patent Document 1).

特開2001−16197号公報JP 2001-16197 A

ところが、ストリーム暗号は、初期鍵を初期化処理により攪拌して、初期の内部状態を生成し、生成した状態を逐次更新しながら、暗号化の各系列を生成する。また、従来のストリーム暗号では、初期化ののち、さらに鍵系列生成処理を行っていた。そのため、従来のストリーム暗号では、鍵系列生成処理を行わないと、暗号化処理ができず、短い平文を暗号化する場合には冗長な処理となっていたという問題があった。   However, in the stream cipher, the initial key is agitated by the initialization process, an initial internal state is generated, and each sequence of encryption is generated while sequentially updating the generated state. In the conventional stream cipher, the key sequence generation processing is further performed after initialization. Therefore, the conventional stream cipher has a problem that the encryption process cannot be performed unless the key sequence generation process is performed, and the process is redundant when a short plaintext is encrypted.

そこで、本発明は、上述の課題に鑑みてなされたものであり、異なるロジックを追加する事無く、短い平文あるいは暗号文に対する暗号化処理あるいは復号化処理の効率化を図るストリーム暗号の暗号化装置、ストリーム暗号の復号化装置、ストリーム暗号の暗号化方法、ストリーム暗号の復号化方法およびプログラムを提供することを目的とする。   Therefore, the present invention has been made in view of the above-described problems, and an encryption apparatus for stream cipher that improves the efficiency of encryption processing or decryption processing for short plaintext or ciphertext without adding different logic. An object of the present invention is to provide a stream cipher decryption device, a stream cipher encryption method, a stream cipher decryption method, and a program.

本発明は、上記の課題を解決するために、以下の事項を提案している。なお、理解を容易にするために、本発明の実施形態に対応する符号を付して説明するが、これに限定されるものではない。   The present invention proposes the following matters in order to solve the above problems. In addition, in order to make an understanding easy, although the code | symbol corresponding to embodiment of this invention is attached | subjected and demonstrated, it is not limited to this.

(1)本発明は、初期鍵と初期ベクトルとを用いて、初期化処理を行う初期化処理手段(例えば、図1の初期化処理部101に相当)と、該初期化処理終了後に、内部状態の中から平文と同じ長さのビット列を選択する選択手段(例えば、図1のビット選択部102に相当)と、該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する演算手段(例えば、図1の排他的論理和演算部103に相当)と、を備えたことを特徴とするストリーム暗号の暗号化装置を提案している。   (1) The present invention provides an initialization processing means (for example, equivalent to the initialization processing unit 101 in FIG. 1) that performs an initialization process using an initial key and an initial vector, and an internal process after the initialization process is completed. A selection means (for example, corresponding to the bit selection unit 102 in FIG. 1) for selecting a bit string having the same length as the plaintext from the state, and performing an exclusive OR operation on the selected bit string and the plaintext, And a stream cipher encryption device characterized by comprising an operation means (for example, equivalent to the exclusive OR operation unit 103 in FIG. 1).

この発明によれば、初期化処理手段は、初期鍵と初期ベクトルとを用いて、初期化処理を行う。選択手段は、初期化処理終了後に、内部状態の中から平文と同じ長さのビット列を選択する。演算手段は、その選択したビット列と平文との排他的論理和演算を行い、暗号文を出力する。したがって、短い平文について、鍵系列生成処理を実行せずに暗号化を行うため、異なるロジックを追加する必要がなく、暗号化処理の効率化を図ることができる。   According to the present invention, the initialization processing means performs the initialization process using the initial key and the initial vector. The selection means selects a bit string having the same length as the plaintext from the internal state after the initialization process is completed. The computing means performs an exclusive OR operation between the selected bit string and the plaintext, and outputs a ciphertext. Accordingly, since encryption is performed for a short plaintext without executing the key sequence generation process, it is not necessary to add different logic, and the efficiency of the encryption process can be improved.

(2)本発明は、(1)のストリーム暗号の暗号化装置について、前記選択されたビット列が1ビット以上、かつ、前記内部状態の半分以下であることを特徴とするストリーム暗号の暗号化装置を提案している。   (2) The stream cipher encryption apparatus according to (1), wherein the selected bit string is 1 bit or more and half or less of the internal state. Has proposed.

この発明によれば、選択されたビット列が1ビット以上、かつ、内部状態の半分以下である。つまり、ストリーム暗号の内部状態に対して、半分以下の短い平文を暗号化する場合に、内部状態のビット列を直接使うことで処理負荷を軽減する。   According to the present invention, the selected bit string is 1 bit or more and half or less of the internal state. In other words, when encrypting a short plain text that is less than half of the internal state of the stream cipher, the processing load is reduced by directly using the bit string of the internal state.

(3)本発明は、(2)のストリーム暗号の暗号化装置について、前記平文の長さが前記内部状態の半分よりも大きい場合には、1ビット以上、かつ、内部状態の半分以下の平文について処理を行い、残りの平文の暗号化する場合には、前記初期化処理手段が初期ベクトルを変更して、再度、初期化処理を行うことを特徴とするストリーム暗号の暗号化装置を提案している。   (3) The present invention relates to the stream cipher encryption device of (2), when the length of the plaintext is larger than half of the internal state, the plaintext of 1 bit or more and half or less of the internal state When the remaining plaintext is encrypted, the initialization processing means changes the initial vector and performs the initialization process again. ing.

この発明によれば、平文の長さが内部状態の半分よりも大きい場合には、1ビット以上、かつ、内部状態の半分以下の平文について処理を行い、残りの平文の暗号化する場合には、初期化処理手段が初期ベクトルを変更して、再度、初期化処理を行う。つまり、平文の長さが内部状態の半分よりも大きい場合には、少なくとも、内部状態の半分以下のビット列に区切って、それぞれについて、再度、初期化処理を行い、暗号化の処理を実行する。これにより、平文の長さが内部状態の半分よりも大きい場合であっても、鍵系列生成処理を実行せずに暗号化を行うため、異なるロジックを追加する必要がなく、暗号化処理の効率化を図ることができる。   According to the present invention, when the length of the plaintext is longer than half of the internal state, processing is performed on a plaintext of 1 bit or more and half or less of the internal state, and the remaining plaintext is encrypted. The initialization processing means changes the initial vector and performs initialization processing again. That is, when the length of the plaintext is larger than half of the internal state, at least the bit string is divided into half or less of the internal state, and the initialization process is performed again for each, and the encryption process is executed. As a result, even if the plaintext length is longer than half of the internal state, encryption is performed without executing the key sequence generation process, so there is no need to add different logic and the efficiency of the encryption process Can be achieved.

(4)本発明は、初期鍵と初期ベクトルとを用いて、初期化処理を行う初期化処理手段(例えば、図5の初期化処理部101に相当)と、該初期化処理終了後に、内部状態の中から暗号文と同じ長さのビット列を選択する選択手段(例えば、図5のビット選択部102に相当)と、該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する演算手段(例えば、図5の排他的論理和演算部201に相当)と、を備えたことを特徴とするストリーム暗号の復号化装置を提案している。   (4) The present invention relates to an initialization processing means (for example, equivalent to the initialization processing unit 101 in FIG. 5) for performing initialization processing using an initial key and an initial vector, and after the initialization processing, A selection means (for example, corresponding to the bit selection unit 102 in FIG. 5) for selecting a bit string having the same length as the ciphertext from the state, and performing an exclusive OR operation between the selected bit string and the ciphertext; A stream cipher decryption device characterized by comprising arithmetic means for outputting plaintext (for example, corresponding to the exclusive OR operation unit 201 in FIG. 5) is proposed.

この発明によれば、初期化処理手段は、初期鍵と初期ベクトルとを用いて、初期化処理を行う。選択手段は、初期化処理終了後に、内部状態の中から平文と同じ長さのビット列を選択する。演算手段は、その選択したビット列と暗号文との排他的論理和演算を行い、平文を出力する。したがって、短い暗号文について、鍵系列生成処理を実行せずに復号化を行うため、異なるロジックを追加する必要がなく、復号化処理の効率化を図ることができる。   According to the present invention, the initialization processing means performs the initialization process using the initial key and the initial vector. The selection means selects a bit string having the same length as the plaintext from the internal state after the initialization process is completed. The computing means performs an exclusive OR operation between the selected bit string and the ciphertext, and outputs a plaintext. Therefore, since the short ciphertext is decrypted without executing the key sequence generation process, it is not necessary to add different logic, and the efficiency of the decryption process can be improved.

(5)本発明は、(4)のストリーム暗号の復号化装置について、前記選択されたビット列が1ビット以上、かつ、前記内部状態の半分以下であることを特徴とするストリーム暗号の復号化装置を提案している。   (5) The present invention relates to the stream cipher decryption device of (4), wherein the selected bit string is 1 bit or more and half or less of the internal state. Has proposed.

この発明によれば、選択されたビット列が1ビット以上、かつ、内部状態の半分以下である。つまり、ストリーム暗号の内部状態に対して、半分以下の短い暗号文を復号化する場合に、内部状態のビット列を直接使うことで処理負荷を軽減する。   According to the present invention, the selected bit string is 1 bit or more and half or less of the internal state. That is, when decrypting a ciphertext shorter than half of the internal state of the stream cipher, the processing load is reduced by directly using the bit string in the internal state.

(6)本発明は、(5)のストリーム暗号の復号化装置について、前記暗号文の長さが前記内部状態の半分よりも大きい場合には、1ビット以上、かつ、内部状態の半分以下の暗号文について処理を行い、残りの暗号文の復号化する場合には、前記初期化処理手段が初期ベクトルを変更して、再度、初期化処理を行うことを特徴とするストリーム暗号の復号化装置を提案している。   (6) The present invention relates to the decryption apparatus for stream cipher of (5), when the length of the ciphertext is larger than half of the internal state, it is 1 bit or more and half or less of the internal state A stream cipher decryption device characterized in that when processing is performed on ciphertext and the remaining ciphertext is decrypted, the initialization processing means changes the initial vector and performs initialization processing again. Has proposed.

この発明によれば、暗号文の長さが内部状態の半分よりも大きい場合には、1ビット以上、かつ、内部状態の半分以下の暗号文について処理を行い、残りの暗号文の復号化する場合には、初期化処理手段が初期ベクトルを変更して、再度、初期化処理を行う。つまり、暗号文の長さが内部状態の半分よりも大きい場合には、少なくとも、内部状態の半分以下のビット列に区切って、それぞれについて、再度、初期化処理を行い、復号化の処理を実行する。これにより、暗号文の長さが内部状態の半分よりも大きい場合であっても、鍵系列生成処理を実行せずに復号化を行うため、異なるロジックを追加する必要がなく、復号化処理の効率化を図ることができる。   According to the present invention, when the length of the ciphertext is longer than half of the internal state, the ciphertext of 1 bit or more and half or less of the internal state is processed, and the remaining ciphertext is decrypted. In this case, the initialization processing means changes the initial vector and performs initialization processing again. In other words, if the length of the ciphertext is greater than half of the internal state, at least divide it into bit strings that are less than or equal to half of the internal state, perform initialization processing again, and execute decryption processing. . As a result, even if the length of the ciphertext is larger than half of the internal state, the decryption is performed without executing the key sequence generation process, so there is no need to add different logic and Efficiency can be improved.

(7)本発明は、入力する平文の長さが1ビット以上、かつ、内部状態の半分以下である場合のストリーム暗号の暗号化方法であって、初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップ(例えば、図2のステップS101に相当)と、該初期化処理終了後に、内部状態の中から平文と同じ長さのビット列を選択する第2のステップ(例えば、図2のステップS102に相当)と、該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する第3のステップ(例えば、図2のステップS103に相当)と、を備えたことを特徴とするストリーム暗号の暗号化方法を提案している。   (7) The present invention is an encryption method for stream ciphers when the length of an input plaintext is 1 bit or more and half or less of the internal state, using an initial key and an initial vector, A first step (for example, corresponding to step S101 in FIG. 2), and a second step (for example, selecting a bit string having the same length as the plaintext from the internal state after the initialization process is completed) 2) and a third step (for example, equivalent to step S103 in FIG. 2) for performing an exclusive OR operation on the selected bit string and the plaintext and outputting a ciphertext. A stream cipher encryption method characterized by comprising the above is proposed.

この発明によれば、初期鍵と初期ベクトルとを用いて、初期化処理を行い、初期化処理終了後に、内部状態の中から平文と同じ長さのビット列を選択する。そして、その選択したビット列と平文との排他的論理和演算を行い、暗号文を出力する。したがって、短い平文について、鍵系列生成処理を実行せずに暗号化を行うため、異なるロジックを追加する必要がなく、暗号化処理の効率化を図ることができる。   According to the present invention, an initialization process is performed using an initial key and an initial vector, and after completion of the initialization process, a bit string having the same length as the plaintext is selected from the internal state. Then, an exclusive OR operation of the selected bit string and plaintext is performed and ciphertext is output. Accordingly, since encryption is performed for a short plaintext without executing the key sequence generation process, it is not necessary to add different logic, and the efficiency of the encryption process can be improved.

(8)本発明は、入力する平文の長さが内部状態の半分以上である場合のストリーム暗号の暗号化方法であって、初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップ(例えば、図4のステップS201に相当)と、該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する第2のステップ(例えば、図4のステップS202に相当)と、該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する第3のステップ(例えば、図4のステップS203に相当)と、初期ベクトルのみを変更して、初期化処理を行う第4のステップ(例えば、図4のステップS204に相当)と、該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する第5のステップ(例えば、図4のステップS205に相当)と、該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する第6のステップ(例えば、図4のステップS206に相当)と、前記第4のステップから第6のステップまでの処理を残りの平文の長さが1ビット以上、かつ、前記内部状態の半分以下になるまで、続行する第7のステップ(例えば、図4のステップS207に相当)と、前記出力されたすべての暗号文を連結して、前記平文に対応する暗号文を出力する第8のステップ(例えば、図4のステップS208に相当)と、を備えたことを特徴とするストリーム暗号の暗号化方法を提案している。   (8) The present invention is an encryption method for stream ciphers when the length of an input plaintext is more than half of the internal state. The first method performs initialization using an initial key and an initial vector. Step (for example, corresponding to step S201 in FIG. 4) and a second step (for example, step S202 in FIG. 4) for selecting a bit string of 1 bit or more and half or less of the internal state after completion of the initialization process. And a third step (for example, corresponding to step S203 in FIG. 4) for performing an exclusive OR operation between the selected bit string and the plaintext and outputting a ciphertext, and changing only the initial vector. A fourth step (for example, corresponding to step S204 in FIG. 4) for performing the initialization process, and a fifth bit string for selecting a bit string of 1 bit or more and half or less of the internal state after the initialization process is completed. The (E.g., corresponding to step S205 in FIG. 4), and a sixth step (e.g., in step S206 in FIG. 4) that performs an exclusive OR operation on the selected bit string and the plaintext and outputs a ciphertext. And the seventh step of continuing the processing from the fourth step to the sixth step until the remaining plaintext length is 1 bit or more and half or less of the internal state (for example, 4) (equivalent to step S207 in FIG. 4), and an eighth step (for example, equivalent to step S208 in FIG. 4) of concatenating all the output ciphertexts and outputting ciphertext corresponding to the plaintext, And a stream cipher encryption method characterized by comprising:

この発明によれば、初期鍵と初期ベクトルとを用いて、初期化処理を行い、初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択して、その選択したビット列と平文との排他的論理和演算を行い、暗号文を出力する。次に、初期ベクトルのみを変更して、初期化処理を行い、初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択して、その選択したビット列と平文との排他的論理和演算を行い、暗号文を出力する。そして、第4のステップから第6のステップまでの処理を残りの平文の長さが1ビット以上、かつ、内部状態の半分以下になるまで、続行し、出力されたすべての暗号文を連結して、平文に対応する暗号文を出力する。したがって、平文の長さが内部状態の半分よりも大きい場合には、少なくとも、内部状態の半分以下のビット列に区切って、それぞれについて、再度、初期化処理を行い、暗号化の処理を実行する。これにより、平文の長さが内部状態の半分よりも大きい場合であっても、鍵系列生成処理を実行せずに暗号化を行うため、異なるロジックを追加する必要がなく、暗号化処理の効率化を図ることができる。   According to the present invention, initialization processing is performed using an initial key and an initial vector, and after completion of the initialization processing, a bit string of 1 bit or more and half or less of the internal state is selected, and the selected bit string The ciphertext is output by performing an exclusive OR operation with the plaintext. Next, only the initial vector is changed and initialization processing is performed. After the initialization processing is completed, a bit string of 1 bit or more and half or less of the internal state is selected, and the selected bit string and the plaintext are excluded. Perform logical OR operation and output ciphertext. The processing from the fourth step to the sixth step is continued until the remaining plaintext length is 1 bit or more and half or less of the internal state, and all the output ciphertexts are concatenated. The ciphertext corresponding to the plaintext is output. Therefore, if the length of the plaintext is larger than half of the internal state, at least the bit string of half or less of the internal state is divided and the initialization process is performed again for each to execute the encryption process. As a result, even if the plaintext length is longer than half of the internal state, encryption is performed without executing the key sequence generation process, so there is no need to add different logic and the efficiency of the encryption process Can be achieved.

(9)本発明は、入力する暗号文の長さが1ビット以上、かつ、内部状態の半分以下である場合のストリーム暗号の復号化方法であって、初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップ(例えば、図6のステップS301に相当)と、該初期化処理終了後に、内部状態の中から暗号文と同じ長さのビット列を選択する第2のステップ(例えば、図6のステップS302に相当)と、該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する第3のステップ(例えば、図6のステップS303に相当)と、を備えたことを特徴とするストリーム暗号の復号化方法を提案している。   (9) The present invention is a method for decrypting a stream cipher when the length of the input ciphertext is 1 bit or more and half or less of the internal state, using an initial key and an initial vector, A first step for performing initialization processing (for example, corresponding to step S301 in FIG. 6), and a second step for selecting a bit string having the same length as the ciphertext from the internal state after completion of the initialization processing ( For example, this corresponds to step S302 in FIG. 6), and a third step (for example, corresponding to step S303 in FIG. 6) that performs an exclusive OR operation on the selected bit string and the ciphertext and outputs a plaintext. And a stream cipher decryption method characterized by comprising:

この発明によれば、初期鍵と初期ベクトルとを用いて、初期化処理を行い、初期化処理終了後に、内部状態の中から暗号文と同じ長さのビット列を選択する。そして、その選択したビット列と暗号文との排他的論理和演算を行い、平文を出力する。したがって、短い暗号文について、鍵系列生成処理を実行せずに復号化を行うため、異なるロジックを追加する必要がなく、復号化処理の効率化を図ることができる。   According to the present invention, an initialization process is performed using an initial key and an initial vector, and after completion of the initialization process, a bit string having the same length as the ciphertext is selected from the internal state. Then, an exclusive OR operation between the selected bit string and the ciphertext is performed, and plaintext is output. Therefore, since the short ciphertext is decrypted without executing the key sequence generation process, it is not necessary to add different logic, and the efficiency of the decryption process can be improved.

(10)本発明は、入力する暗号文の長さが内部状態の半分以上である場合のストリーム暗号の復号化方法であって、初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップ(例えば、図8のステップS401に相当)と、該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する第2のステップ(例えば、図8のステップS402に相当)と、該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する第3のステップ(例えば、図8のステップS403に相当)と、初期ベクトルのみを変更して、初期化処理を行う第4のステップ(例えば、図8のステップS404に相当)と、該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下に等しいビット列を選択する第5のステップ(例えば、図8のステップS405に相当)と、該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する第6のステップ(例えば、図8のステップS406に相当)と、前記第4のステップから第6のステップまでの処理を残りの暗号文の長さが1ビット以上、かつ、前記内部状態の半分以下になるまで、続行する第7のステップ(例えば、図8のステップS407に相当)と、前記出力されたすべての平文を連結して、前記暗号文に対応する平文を出力する第8のステップ(例えば、図8のステップS408に相当)と、を備えたことを特徴とするストリーム暗号の復号化方法を提案している。   (10) The present invention is a method for decrypting a stream cipher when the length of an input ciphertext is more than half of the internal state, and performs an initialization process using an initial key and an initial vector. 1 step (for example, corresponding to step S401 in FIG. 8) and a second step (for example, step in FIG. 8) for selecting a bit string of 1 bit or more and half or less of the internal state after the initialization process is completed. S402), a third step (for example, equivalent to step S403 in FIG. 8) of performing an exclusive OR operation on the selected bit string and the ciphertext and outputting plaintext, and changing only the initial vector Then, a fourth step (for example, corresponding to step S404 in FIG. 8) for performing the initialization process and a bit string equal to 1 bit or more and equal to or less than half of the internal state are selected after the initialization process is completed. A fifth step (for example, corresponding to step S405 in FIG. 8) and a sixth step (for example, the step in FIG. 8) that performs an exclusive OR operation on the selected bit string and the ciphertext and outputs plaintext And the seventh step of continuing the processing from the fourth step to the sixth step until the length of the remaining ciphertext is 1 bit or more and half or less of the internal state. (E.g., corresponding to step S407 in FIG. 8) and an eighth step (for example, corresponding to step S408 in FIG. 8) of connecting all the output plaintexts and outputting plaintext corresponding to the ciphertext. And a stream cipher decryption method characterized by comprising:

この発明によれば、初期鍵と初期ベクトルとを用いて、初期化処理を行い、初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択して、その選択したビット列と暗号文との排他的論理和演算を行い、平文を出力する。次に、初期ベクトルのみを変更して、初期化処理を行い、初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択して、その選択したビット列と暗号文との排他的論理和演算を行い、平文を出力する。そして、第4のステップから第6のステップまでの処理を残りの暗号文の長さが1ビット以上、かつ、内部状態の半分以下になるまで、続行し、出力されたすべての平文を連結して、暗号文に対応する平文を出力する。したがって、暗号文の長さが内部状態の半分よりも大きい場合には、少なくとも、内部状態の半分以下のビット列に区切って、それぞれについて、再度、初期化処理を行い、復号化の処理を実行する。これにより、暗号文の長さが内部状態の半分よりも大きい場合であっても、鍵系列生成処理を実行せずに復号化を行うため、異なるロジックを追加する必要がなく、復号化処理の効率化を図ることができる。   According to the present invention, initialization processing is performed using an initial key and an initial vector, and after completion of the initialization processing, a bit string of 1 bit or more and half or less of the internal state is selected, and the selected bit string And the ciphertext are subjected to an exclusive OR operation, and plaintext is output. Next, only the initial vector is changed and initialization processing is performed. After the initialization processing is completed, a bit string of 1 bit or more and half or less of the internal state is selected, and the selected bit string and the ciphertext are Performs an exclusive OR operation and outputs plaintext. The process from the fourth step to the sixth step is continued until the length of the remaining ciphertext is 1 bit or more and half or less of the internal state, and all the output plaintexts are concatenated. The plaintext corresponding to the ciphertext is output. Therefore, when the length of the ciphertext is larger than half of the internal state, at least, it is divided into bit strings less than or equal to half of the internal state, and the initialization process is performed again for each to execute the decryption process. . As a result, even if the length of the ciphertext is larger than half of the internal state, the decryption is performed without executing the key sequence generation process, so there is no need to add different logic and Efficiency can be improved.

(11)本発明は、入力する平文の長さが1ビット以上、かつ、内部状態の半分以下である場合のストリーム暗号の暗号化方法をコンピュータに実行させるためのプログラムであって、初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップ(例えば、図2のステップS101に相当)と、該初期化処理終了後に、内部状態の中から平文と同じ長さのビット列を選択する第2のステップ(例えば、図2のステップS102に相当)と、該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する第3のステップ(例えば、図2のステップS103に相当)と、をコンピュータに実行させるためのプログラムを提案している。   (11) The present invention is a program for causing a computer to execute a stream cipher encryption method when the length of an input plaintext is 1 bit or more and half or less of the internal state, A first step (for example, corresponding to step S101 in FIG. 2) for performing initialization processing using an initial vector, and after completion of the initialization processing, a bit string having the same length as plain text is selected from the internal state A second step (for example, corresponding to step S102 in FIG. 2), and a third step (for example, in FIG. 2) that performs an exclusive OR operation between the selected bit string and the plaintext, and outputs a ciphertext. (Corresponding to step S103) is proposed.

この発明によれば、初期鍵と初期ベクトルとを用いて、初期化処理を行い、初期化処理終了後に、内部状態の中から平文と同じ長さのビット列を選択する。そして、その選択したビット列と平文との排他的論理和演算を行い、暗号文を出力する。したがって、短い平文について、鍵系列生成処理を実行せずに暗号化を行うため、異なるロジックを追加する必要がなく、暗号化処理の効率化を図ることができる。   According to the present invention, an initialization process is performed using an initial key and an initial vector, and after completion of the initialization process, a bit string having the same length as the plaintext is selected from the internal state. Then, an exclusive OR operation of the selected bit string and plaintext is performed and ciphertext is output. Accordingly, since encryption is performed for a short plaintext without executing the key sequence generation process, it is not necessary to add different logic, and the efficiency of the encryption process can be improved.

(12)本発明は、入力する平文の長さが内部状態の半分以上である場合のストリーム暗号の暗号化方法をコンピュータに実行させるためのプログラムであって、初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップ(例えば、図4のステップS201に相当)と、該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する第2のステップ(例えば、図4のステップS202に相当)と、該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する第3のステップ(例えば、図4のステップS203に相当)と、初期ベクトルのみを変更して、初期化処理を行う第4のステップ(例えば、図4のステップS204に相当)と、該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する第5のステップ(例えば、図4のステップS205に相当)と、該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する第6のステップ(例えば、図4のステップS206に相当)と、前記第4のステップから第6のステップまでの処理を残りの平文の長さが1ビット以上、かつ、前記内部状態の半分以下になるまで、続行する第7のステップ(例えば、図4のステップS207に相当)と、前記出力されたすべての暗号文を連結して、前記平文に対応する暗号文を出力する第8のステップ(例えば、図4のステップS208に相当)と、をコンピュータに実行させるためのプログラムを提案している。   (12) The present invention is a program for causing a computer to execute a stream cipher encryption method when the length of input plaintext is more than half of the internal state, using an initial key and an initial vector. First step for performing initialization process (for example, corresponding to step S201 in FIG. 4) and second step for selecting a bit string of 1 bit or more and half or less of the internal state after the initialization process is completed (For example, corresponding to step S202 in FIG. 4) and a third step (for example, corresponding to step S203 in FIG. 4) that performs an exclusive OR operation on the selected bit string and the plaintext and outputs a ciphertext. And a fourth step (for example, corresponding to step S204 in FIG. 4) in which only the initial vector is changed and the initialization process is performed, and one bit or more after the initialization process is completed. A fifth step (for example, corresponding to step S205 in FIG. 4) for selecting a bit string less than half of the state, an exclusive OR operation of the selected bit string and the plaintext, and outputting a ciphertext (For example, corresponding to step S206 in FIG. 4) and the processing from the fourth step to the sixth step, the remaining plaintext length is 1 bit or more and half or less of the internal state. Up to the seventh step (for example, corresponding to step S207 in FIG. 4) and the eighth step (for example, for outputting the ciphertext corresponding to the plaintext by concatenating all the ciphertexts output) , Which corresponds to step S208 in FIG. 4), is proposed.

この発明によれば、初期鍵と初期ベクトルとを用いて、初期化処理を行い、初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択して、その選択したビット列と平文との排他的論理和演算を行い、暗号文を出力する。次に、初期ベクトルのみを変更して、初期化処理を行い、初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択して、その選択したビット列と平文との排他的論理和演算を行い、暗号文を出力する。そして、第4のステップから第6のステップまでの処理を残りの平文の長さが1ビット以上、かつ、内部状態の半分以下になるまで、続行し、出力されたすべての暗号文を連結して、平文に対応する暗号文を出力する。したがって、平文の長さが内部状態の半分よりも大きい場合には、少なくとも、内部状態の半分以下のビット列に区切って、それぞれについて、再度、初期化処理を行い、暗号化の処理を実行する。これにより、平文の長さが内部状態の半分よりも大きい場合であっても、鍵系列生成処理を実行せずに暗号化を行うため、異なるロジックを追加する必要がなく、暗号化処理の効率化を図ることができる。   According to the present invention, initialization processing is performed using an initial key and an initial vector, and after completion of the initialization processing, a bit string of 1 bit or more and half or less of the internal state is selected, and the selected bit string The ciphertext is output by performing an exclusive OR operation with the plaintext. Next, only the initial vector is changed and initialization processing is performed. After the initialization processing is completed, a bit string of 1 bit or more and half or less of the internal state is selected, and the selected bit string and the plaintext are excluded. Perform logical OR operation and output ciphertext. The processing from the fourth step to the sixth step is continued until the remaining plaintext length is 1 bit or more and half or less of the internal state, and all the output ciphertexts are concatenated. The ciphertext corresponding to the plaintext is output. Therefore, if the length of the plaintext is larger than half of the internal state, at least the bit string of half or less of the internal state is divided and the initialization process is performed again for each to execute the encryption process. As a result, even if the plaintext length is longer than half of the internal state, encryption is performed without executing the key sequence generation process, so there is no need to add different logic and the efficiency of the encryption process Can be achieved.

(13)本発明は、入力する暗号文の長さが1ビット以上、かつ、内部状態の半分以下である場合のストリーム暗号の復号化方法をコンピュータに実行させるためのプログラムであって、初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップ(例えば、図6のステップS301に相当)と、該初期化処理終了後に、内部状態の中から暗号文と同じ長さのビット列を選択する第2のステップ(例えば、図6のステップS302に相当)と、該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する第3のステップ(例えば、図6のステップS303に相当)と、をコンピュータに実行させるためのプログラムを提案している。   (13) The present invention is a program for causing a computer to execute a method for decrypting a stream cipher when the length of an input ciphertext is 1 bit or more and half or less of the internal state, and an initial key And the initial step using the initial vector (for example, corresponding to step S301 in FIG. 6), and after completion of the initialization process, a bit string having the same length as the ciphertext from the internal state A second step (for example, corresponding to step S302 in FIG. 6), and a third step (for example, FIG. 6) that performs an exclusive OR operation on the selected bit string and the ciphertext and outputs plaintext. 6 is equivalent to step S303 in FIG. 6).

この発明によれば、初期鍵と初期ベクトルとを用いて、初期化処理を行い、初期化処理終了後に、内部状態の中から暗号文と同じ長さのビット列を選択する。そして、その選択したビット列と暗号文との排他的論理和演算を行い、平文を出力する。したがって、短い暗号文について、鍵系列生成処理を実行せずに復号化を行うため、異なるロジックを追加する必要がなく、復号化処理の効率化を図ることができる。   According to the present invention, an initialization process is performed using an initial key and an initial vector, and after completion of the initialization process, a bit string having the same length as the ciphertext is selected from the internal state. Then, an exclusive OR operation between the selected bit string and the ciphertext is performed, and plaintext is output. Therefore, since the short ciphertext is decrypted without executing the key sequence generation process, it is not necessary to add different logic, and the efficiency of the decryption process can be improved.

(14)本発明は、入力する暗号文の長さが内部状態の半分以上である場合のストリーム暗号の復号化方法をコンピュータに実行させるためのプログラムであって、初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップ(例えば、図8のステップS401に相当)と、該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する第2のステップ(例えば、図8のステップS402に相当)と、該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する第3のステップ(例えば、図8のステップS403に相当)と、初期ベクトルのみを変更して、初期化処理を行う第4のステップ(例えば、図8のステップS404に相当)と、該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下に等しいビット列を選択する第5のステップ(例えば、図8のステップS405に相当)と、該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する第6のステップ(例えば、図8のステップS406に相当)と、前記第4のステップから第6のステップまでの処理を残りの暗号文の長さが1ビット以上、かつ、前記内部状態の半分以下になるまで、続行する第7のステップ(例えば、図8のステップS407に相当)と、前記出力されたすべての平文を連結して、前記暗号文に対応する平文を出力する第8のステップ(例えば、図8のステップS408に相当)と、をコンピュータに実行させるためのプログラムを提案している。   (14) The present invention is a program for causing a computer to execute a stream cipher decryption method when the length of an input ciphertext is more than half of the internal state, and uses an initial key and an initial vector. The first step (for example, corresponding to step S401 in FIG. 8) for performing the initialization process, and the second sequence for selecting a bit string of 1 bit or more and half or less of the internal state after the initialization process is completed Step (for example, equivalent to step S402 in FIG. 8) and a third step (for example, equivalent to step S403 in FIG. 8) that performs an exclusive OR operation on the selected bit string and the ciphertext and outputs plaintext ), A fourth step (for example, corresponding to step S404 in FIG. 8) for performing initialization processing by changing only the initial vector, and after completion of the initialization processing, 1 bit or more, and A fifth step (for example, corresponding to step S405 in FIG. 8) for selecting a bit string equal to half or less of the partial state, an exclusive OR operation between the selected bit string and the ciphertext, and outputting plaintext The sixth step (e.g., corresponding to step S406 in FIG. 8) and the processing from the fourth step to the sixth step are the remaining ciphertext length of 1 bit or more and half of the internal state. A seventh step to be continued until the following is satisfied (for example, corresponding to step S407 in FIG. 8), and an eighth step in which all the output plaintexts are concatenated and a plaintext corresponding to the ciphertext is output. (For example, corresponding to step S408 in FIG. 8) is proposed.

この発明によれば、初期鍵と初期ベクトルとを用いて、初期化処理を行い、初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択して、その選択したビット列と暗号文との排他的論理和演算を行い、平文を出力する。次に、初期ベクトルのみを変更して、初期化処理を行い、初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択して、その選択したビット列と暗号文との排他的論理和演算を行い、平文を出力する。そして、第4のステップから第6のステップまでの処理を残りの暗号文の長さが1ビット以上、かつ、内部状態の半分以下になるまで、続行し、出力されたすべての平文を連結して、暗号文に対応する平文を出力する。したがって、暗号文の長さが内部状態の半分よりも大きい場合には、少なくとも、内部状態の半分以下のビット列に区切って、それぞれについて、再度、初期化処理を行い、復号化の処理を実行する。これにより、暗号文の長さが内部状態の半分よりも大きい場合であっても、鍵系列生成処理を実行せずに復号化を行うため、異なるロジックを追加する必要がなく、復号化処理の効率化を図ることができる。   According to the present invention, initialization processing is performed using an initial key and an initial vector, and after completion of the initialization processing, a bit string of 1 bit or more and half or less of the internal state is selected, and the selected bit string And the ciphertext are subjected to an exclusive OR operation, and plaintext is output. Next, only the initial vector is changed and initialization processing is performed. After the initialization processing is completed, a bit string of 1 bit or more and half or less of the internal state is selected, and the selected bit string and the ciphertext are Performs an exclusive OR operation and outputs plaintext. The process from the fourth step to the sixth step is continued until the length of the remaining ciphertext is 1 bit or more and half or less of the internal state, and all the output plaintexts are concatenated. The plaintext corresponding to the ciphertext is output. Therefore, when the length of the ciphertext is larger than half of the internal state, at least, it is divided into bit strings less than or equal to half of the internal state, and the initialization process is performed again for each to execute the decryption process. . As a result, even if the length of the ciphertext is larger than half of the internal state, the decryption is performed without executing the key sequence generation process, so there is no need to add different logic and Efficiency can be improved.

本発明によれば、ストリーム暗号の内部状態に対して、短い平文あるいは暗号文を暗号化あるいは復号化する場合に、内部状態のビット列を直接使うことで処理負荷を軽減することができるという効果がある。   According to the present invention, when a short plaintext or ciphertext is encrypted or decrypted with respect to the internal state of the stream cipher, the processing load can be reduced by directly using the bit string of the internal state. is there.

第1の実施形態に係る暗号化装置の構成を示す図である。It is a figure which shows the structure of the encryption apparatus which concerns on 1st Embodiment. 第1の実施形態に係る暗号化装置の処理を示す図である。It is a figure which shows the process of the encryption apparatus which concerns on 1st Embodiment. 第2の実施形態に係る暗号化装置の構成を示す図である。It is a figure which shows the structure of the encryption apparatus which concerns on 2nd Embodiment. 第2の実施形態に係る暗号化装置の処理を示す図である。It is a figure which shows the process of the encryption apparatus which concerns on 2nd Embodiment. 第3の実施形態に係る復号化装置の構成を示す図である。It is a figure which shows the structure of the decoding apparatus which concerns on 3rd Embodiment. 第3の実施形態に係る復号化装置の処理を示す図である。It is a figure which shows the process of the decoding apparatus which concerns on 3rd Embodiment. 第4の実施形態に係る復号化装置の構成を示す図である。It is a figure which shows the structure of the decoding apparatus which concerns on 4th Embodiment. 第4の実施形態に係る復号化装置の処理を示す図である。It is a figure which shows the process of the decoding apparatus which concerns on 4th Embodiment.

以下、本発明の実施形態について、図面を用いて、詳細に説明する。
なお、本実施形態における構成要素は適宜、既存の構成要素等との置き換えが可能であり、また、他の既存の構成要素との組合せを含む様々なバリエーションが可能である。したがって、本実施形態の記載をもって、特許請求の範囲に記載された発明の内容を限定するものではない。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
Note that the constituent elements in the present embodiment can be appropriately replaced with existing constituent elements and the like, and various variations including combinations with other existing constituent elements are possible. Therefore, the description of the present embodiment does not limit the contents of the invention described in the claims.

<第1の実施形態>
図1および図2を用いて、本実施形態に係るストリーム暗号の暗号化装置について説明する。
<First Embodiment>
A stream cipher encryption apparatus according to this embodiment will be described with reference to FIGS. 1 and 2.

<ストリーム暗号の暗号化装置の構成>
図1に示すように、本実施形態に係るストリーム暗号の暗号化装置は、初期化処理部101と、ビット選択部102と、排他的論理和演算部103とから構成されている。なお、本実施形態に係るストリーム暗号の暗号化装置は、短い平文に対して好適な暗号化装置である。
<Configuration of Stream Cipher Encryption Device>
As shown in FIG. 1, the encryption device for stream encryption according to the present embodiment includes an initialization processing unit 101, a bit selection unit 102, and an exclusive OR operation unit 103. The stream cipher encryption apparatus according to this embodiment is an encryption apparatus suitable for short plaintext.

初期化処理部101は、初期鍵と初期ベクトルとを用いて、初期化処理を行う。ビット選択部102は、初期化処理終了後に、内部状態の中から平文と同じ長さのビット列を選択する。排他的論理和演算部103は、その選択したビット列と平文との排他的論理和演算を行い、暗号文を出力する。なお、本実施形態では、安全性を担保するために、平文の長さは、内部状態の大きさの半分以下であることが望ましい。   The initialization processing unit 101 performs initialization processing using an initial key and an initial vector. The bit selection unit 102 selects a bit string having the same length as the plain text from the internal state after the initialization process is completed. The exclusive OR operation unit 103 performs an exclusive OR operation on the selected bit string and plaintext, and outputs a ciphertext. In the present embodiment, in order to ensure safety, it is desirable that the length of the plaintext is not more than half of the size of the internal state.

<ストリーム暗号の暗号化装置の処理>
図2を用いて、本実施形態に係るストリーム暗号の暗号化装置の処理について説明する。
初期化処理部101が、初期鍵と初期ベクトルとを用いて、初期化処理を行う(ステップS101)。ビット選択部102は、初期化処理終了後に、内部状態の中から平文と同じ長さのビット列を選択する(ステップS102)。そして、排他的論理和演算部103が、その選択したビット列と平文との排他的論理和演算を行い、暗号文を出力する(ステップS103)。
<Processing of encryption device for stream cipher>
The processing of the stream cipher encryption apparatus according to this embodiment will be described with reference to FIG.
The initialization processing unit 101 performs initialization processing using the initial key and the initial vector (step S101). After completion of the initialization process, the bit selection unit 102 selects a bit string having the same length as the plain text from the internal state (step S102). Then, the exclusive OR operation unit 103 performs an exclusive OR operation between the selected bit string and the plaintext, and outputs a ciphertext (step S103).

したがって、本実施形態によれば、短い平文について、鍵系列生成処理を実行せずに暗号化を行うため、異なるロジックを追加する必要がなく、暗号化処理の効率化を図ることができる。   Therefore, according to this embodiment, since encryption is performed for a short plaintext without executing the key sequence generation process, it is not necessary to add different logic, and the efficiency of the encryption process can be improved.

<第2の実施形態>
図3および図4を用いて、本実施形態に係るストリーム暗号の暗号化装置について説明する。
<Second Embodiment>
A stream cipher encryption apparatus according to this embodiment will be described with reference to FIGS. 3 and 4.

<ストリーム暗号の暗号化装置の構成>
図3に示すように、本実施形態に係るストリーム暗号の暗号化装置は、初期化処理部101と、ビット選択部102と、排他的論理和演算部103と、初期ベクトル供給部104と、結合部105とから構成されている。なお、本実施形態に係るストリーム暗号の暗号化装置は、平文の合計の長さが内部状態の半分よりも大きい場合に好適な暗号化装置である。また、第1の実施形態と同一の符号を付す構成要素については、同一の機能を有するものであることから、その詳細な説明は、省略する。
<Configuration of Stream Cipher Encryption Device>
As shown in FIG. 3, the encryption device for stream cipher according to the present embodiment includes an initialization processing unit 101, a bit selection unit 102, an exclusive OR operation unit 103, an initial vector supply unit 104, Part 105. The stream cipher encryption apparatus according to the present embodiment is an encryption apparatus suitable for a case where the total length of plaintext is longer than half of the internal state. In addition, since components having the same reference numerals as those in the first embodiment have the same functions, detailed descriptions thereof are omitted.

初期ベクトル供給部104は、平文の合計の長さが内部状態の半分よりも大きく、残りの部分を暗号化する場合に、初期化処理部101に新たな初期ベクトルを供給する。これにより、初期化処理部101は、再度、初期化処理を実行する。結合部105は、平文の合計の長さが内部状態の半分よりも大きく、何回かに分けて暗号化を行った場合に、順次、排他的論理和演算部103から出力される暗号文を結合して、最終的な暗号文を生成する。   The initial vector supply unit 104 supplies a new initial vector to the initialization processing unit 101 when the total length of the plaintext is longer than half of the internal state and the remaining part is encrypted. Thereby, the initialization process part 101 performs an initialization process again. When the total length of the plaintext is larger than half of the internal state and the encryption is divided into several times, the combining unit 105 sequentially outputs the ciphertexts output from the exclusive OR operation unit 103. Combine to generate the final ciphertext.

<ストリーム暗号の暗号化装置の処理>
図4を用いて、本実施形態に係るストリーム暗号の暗号化装置の処理について説明する。
初期化処理部101は、初期鍵と初期ベクトルとを用いて、初期化処理を行う(ステップS201)。ビット選択部102は、初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する(ステップS202)。
<Processing of encryption device for stream cipher>
The processing of the stream cipher encryption apparatus according to this embodiment will be described with reference to FIG.
The initialization processing unit 101 performs initialization processing using the initial key and the initial vector (step S201). The bit selection unit 102 selects a bit string of 1 bit or more and half or less of the internal state after completion of the initialization process (step S202).

排他的論理和演算部103は、その選択したビット列と平文との排他的論理和演算を行い、暗号文を出力する(ステップS203)。次に、平文の合計の長さが内部状態の半分よりも大きい場合には、残りの平文を暗号化するために、初期ベクトル供給部104により、初期ベクトルのみを変更して、初期化処理部101が、再度、初期化処理を行う(ステップS204)。   The exclusive OR operation unit 103 performs an exclusive OR operation between the selected bit string and the plaintext, and outputs a ciphertext (step S203). Next, if the total length of the plaintext is larger than half of the internal state, the initial vector supply unit 104 changes only the initial vector to encrypt the remaining plaintext, and the initialization processing unit 101 performs the initialization process again (step S204).

ビット選択部102は、初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する(ステップS205)。排他的論理和演算部103は、その選択したビット列と平文との排他的論理和演算を行い、暗号文を出力する(ステップS206)。   After completion of the initialization process, the bit selection unit 102 selects a bit string of 1 bit or more and half or less of the internal state (step S205). The exclusive OR operation unit 103 performs an exclusive OR operation between the selected bit string and the plaintext, and outputs a ciphertext (step S206).

そして、ステップS204からステップS206までの処理を残りの平文の長さが1ビット以上、かつ、内部状態の半分以下になるまで、続行する(ステップS207)。そして、排他的論理和演算部103から、順次出力されたすべての暗号文を結合部105が連結して、平文に対応する暗号文を出力する(ステップS208)。   Then, the processing from step S204 to step S206 is continued until the length of the remaining plaintext is 1 bit or more and half or less of the internal state (step S207). Then, all the ciphertexts sequentially output from the exclusive OR operation unit 103 are connected by the combining unit 105, and a ciphertext corresponding to the plaintext is output (step S208).

したがって、本実施形態によれば、平文の長さが内部状態の半分よりも大きい場合には、少なくとも、内部状態の半分以下のビット列に区切って、それぞれについて、再度、初期化処理を行い、暗号化の処理を実行する。これにより、平文の長さが内部状態の半分よりも大きい場合であっても、鍵系列生成処理を実行せずに暗号化を行うため、異なるロジックを追加する必要がなく、暗号化処理の効率化を図ることができる。   Therefore, according to the present embodiment, when the length of the plaintext is larger than half of the internal state, the bit string is divided into at least half of the internal state and the initialization process is performed again for each of them. Execute the process. As a result, even if the plaintext length is longer than half of the internal state, encryption is performed without executing the key sequence generation process, so there is no need to add different logic and the efficiency of the encryption process Can be achieved.

<第3の実施形態>
図5および図6を用いて、本実施形態に係るストリーム暗号の復号化装置について説明する。
<Third Embodiment>
The stream cipher decoding apparatus according to this embodiment will be described with reference to FIGS.

<ストリーム暗号の復号化装置の構成>
図5に示すように、本実施形態に係るストリーム暗号の復号化装置は、初期化処理部101と、ビット選択部102と、排他的論理和演算部201とから構成されている。なお、本実施形態に係るストリーム暗号の復号化装置は、短い平文に対して好適な復号化装置である。また、第1の実施形態と同一の符号を付す構成要素については、同一の機能を有するものであることから、その詳細な説明は、省略する。
<Configuration of Decryption Device for Stream Cipher>
As shown in FIG. 5, the stream cipher decryption apparatus according to the present embodiment includes an initialization processing unit 101, a bit selection unit 102, and an exclusive OR operation unit 201. The stream cipher decryption apparatus according to the present embodiment is a decryption apparatus suitable for short plaintext. In addition, since components having the same reference numerals as those in the first embodiment have the same functions, detailed descriptions thereof are omitted.

排他的論理和演算部201は、ビット選択部102が選択したビット列と暗号文との排他的論理和演算を行い、平文を出力する。なお、本実施形態では、安全性を担保するために、平文の長さは、内部状態の大きさの半分以下であることが望ましい。   The exclusive OR operation unit 201 performs an exclusive OR operation on the bit string selected by the bit selection unit 102 and the ciphertext, and outputs a plaintext. In the present embodiment, in order to ensure safety, it is desirable that the length of the plaintext is not more than half of the size of the internal state.

<ストリーム暗号の復号化装置の処理>
図6を用いて、本実施形態に係るストリーム暗号の復号化装置の処理について説明する。
初期化処理部101が、初期鍵と初期ベクトルとを用いて、初期化処理を行う(ステップS301)。ビット選択部102は、初期化処理終了後に、内部状態の中から暗号文と同じ長さのビット列を選択する(ステップS302)。そして、排他的論理和演算部201が、その選択したビット列と暗号文との排他的論理和演算を行い、平文を出力する(ステップS303)。
<Processing of Decryption Device for Stream Cipher>
With reference to FIG. 6, the processing of the decryption apparatus for the stream cipher according to this embodiment will be described.
The initialization processing unit 101 performs initialization processing using the initial key and the initial vector (step S301). After completion of the initialization process, the bit selection unit 102 selects a bit string having the same length as the ciphertext from the internal state (step S302). Then, the exclusive OR operation unit 201 performs an exclusive OR operation between the selected bit string and the ciphertext, and outputs a plaintext (step S303).

したがって、本実施形態によれば、短い暗号文について、鍵系列生成処理を実行せずに復号化を行うため、異なるロジックを追加する必要がなく、復号化処理の効率化を図ることができる。   Therefore, according to this embodiment, since a short ciphertext is decrypted without executing the key sequence generation process, it is not necessary to add different logic, and the efficiency of the decryption process can be improved.

<第4の実施形態>
図7および図8を用いて、本実施形態に係るストリーム暗号の復号化装置について説明する。
<Fourth Embodiment>
The stream cipher decryption apparatus according to this embodiment will be described with reference to FIGS.

<ストリーム暗号の復号化装置の構成>
図7に示すように、本実施形態に係るストリーム暗号の復号暗号化装置は、初期化処理部101と、ビット選択部102と、初期ベクトル供給部104と、排他的論理和演算部201と、結合部202とから構成されている。なお、本実施形態に係るストリーム暗号の復号化装置は、暗号文の合計の長さが内部状態の半分よりも大きい場合に好適な復号化装置である。また、第2および第3の実施形態と同一の符号を付す構成要素については、同一の機能を有するものであることから、その詳細な説明は、省略する。
<Configuration of Decryption Device for Stream Cipher>
As shown in FIG. 7, the decryption / encryption device for stream cipher according to the present embodiment includes an initialization processing unit 101, a bit selection unit 102, an initial vector supply unit 104, an exclusive OR operation unit 201, It is comprised from the coupling | bond part 202. FIG. The stream cipher decryption apparatus according to the present embodiment is a decryption apparatus suitable for a case where the total length of ciphertext is larger than half of the internal state. In addition, since components having the same reference numerals as those in the second and third embodiments have the same functions, detailed descriptions thereof are omitted.

結合部202は、暗号文の合計の長さが内部状態の半分よりも大きく、何回かに分けて復号化を行った場合に、順次、排他的論理和演算部201から出力される平文を結合して、最終的な平文を生成する。   When the combined length of the ciphertext is larger than half of the internal state and decryption is performed in several times, the combining unit 202 sequentially outputs plaintexts output from the exclusive OR operation unit 201. Combine to generate the final plaintext.

<ストリーム暗号の復号化装置の処理>
図8を用いて、本実施形態に係るストリーム暗号の復号化装置の処理について説明する。
初期化処理部101は、初期鍵と初期ベクトルとを用いて、初期化処理を行う(ステップS401)。ビット選択部102は、初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する(ステップS402)。
<Processing of Decryption Device for Stream Cipher>
The processing of the decryption apparatus for stream cipher according to the present embodiment will be described with reference to FIG.
The initialization processing unit 101 performs initialization processing using the initial key and the initial vector (step S401). After completing the initialization process, the bit selection unit 102 selects a bit string of 1 bit or more and half or less of the internal state (step S402).

排他的論理和演算部201は、その選択したビット列と暗号文との排他的論理和演算を行い、平文を出力する(ステップS403)。次に、暗号文の合計の長さが内部状態の半分よりも大きい場合には、残りの暗号文を復号化するために、初期ベクトル供給部104により、初期ベクトルのみを変更して、初期化処理部101が、再度、初期化処理を行う(ステップS404)。   The exclusive OR operation unit 201 performs an exclusive OR operation between the selected bit string and the ciphertext, and outputs a plaintext (step S403). Next, when the total length of the ciphertext is larger than half of the internal state, the initial vector supply unit 104 changes only the initial vector and initializes it in order to decrypt the remaining ciphertext. The processing unit 101 performs initialization processing again (step S404).

ビット選択部102は、初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する(ステップS405)。排他的論理和演算部201は、その選択したビット列と暗号文との排他的論理和演算を行い、平文を出力する(ステップS406)。   After completing the initialization process, the bit selection unit 102 selects a bit string of 1 bit or more and half or less of the internal state (step S405). The exclusive OR operation unit 201 performs an exclusive OR operation between the selected bit string and the ciphertext, and outputs a plaintext (step S406).

そして、ステップS404からステップS406までの処理を残りの暗号文の長さが1ビット以上、かつ、内部状態の半分以下になるまで、続行する(ステップS407)。そして、排他的論理和演算部201から、順次出力されたすべての平文を結合部203が連結して、暗号文に対応する平文を出力する(ステップS408)。   Then, the processing from step S404 to step S406 is continued until the length of the remaining ciphertext is 1 bit or more and half or less of the internal state (step S407). Then, all the plaintexts sequentially output from the exclusive OR operation unit 201 are connected by the combining unit 203, and a plaintext corresponding to the ciphertext is output (step S408).

したがって、本実施形態によれば、暗号文の長さが内部状態の半分よりも大きい場合には、少なくとも、内部状態の半分以下のビット列に区切って、それぞれについて、再度、初期化処理を行い、復号化の処理を実行する。これにより、暗号文の長さが内部状態の半分よりも大きい場合であっても、鍵系列生成処理を実行せずに復号化を行うため、異なるロジックを追加する必要がなく、復号化処理の効率化を図ることができる。   Therefore, according to the present embodiment, when the length of the ciphertext is larger than half of the internal state, at least, it is divided into bit strings equal to or less than half of the internal state, and the initialization process is performed again for each. The decryption process is executed. As a result, even if the length of the ciphertext is larger than half of the internal state, the decryption is performed without executing the key sequence generation process, so there is no need to add different logic and Efficiency can be improved.

なお、ストリーム暗号の暗号化装置およびストリーム暗号の復号化装置の処理をコンピュータ読み取り可能な記録媒体に記録し、この記録媒体に記録されたプログラムをストリーム暗号の暗号化装置およびストリーム暗号の復号化装置に読み込ませ、実行することによって本発明のストリーム暗号の暗号化装置およびストリーム暗号の復号化装置を実現することができる。ここでいうコンピュータシステムとは、OSや周辺装置等のハードウェアを含む。   The processing of the stream cipher encryption device and the stream cipher decryption device is recorded on a computer-readable recording medium, and the program recorded on the recording medium is stored in the stream cipher encryption device and the stream cipher decryption device. The stream cipher encryption apparatus and the stream cipher decryption apparatus according to the present invention can be realized by reading and executing the above. The computer system here includes an OS and hardware such as peripheral devices.

また、「コンピュータシステム」は、WWW(World Wide Web)システムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されても良い。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。   Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW (World Wide Web) system is used. The program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line.

また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組合せで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。   The program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.

以上、この発明の実施形態につき、図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   The embodiments of the present invention have been described in detail with reference to the drawings. However, the specific configuration is not limited to the embodiments, and includes designs and the like that do not depart from the gist of the present invention.

101;初期化処理部
102;ビット選択部
103;排他的論理和演算部
104;初期ベクトル供給部
105;結合部
201;排他的論理和演算部
202;結合部
101; initialization processing unit 102; bit selection unit 103; exclusive OR operation unit 104; initial vector supply unit 105; combining unit 201; exclusive OR operation unit 202; combining unit

Claims (14)

初期鍵と初期ベクトルとを用いて、初期化処理を行う初期化処理手段と、
該初期化処理終了後に、内部状態の中から平文と同じ長さのビット列を選択する選択手段と、
該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する演算手段と、
を備えたことを特徴とするストリーム暗号の暗号化装置。
Initialization processing means for performing initialization processing using the initial key and the initial vector;
A selection means for selecting a bit string having the same length as the plaintext from the internal state after the initialization process is completed;
An arithmetic means for performing an exclusive OR operation between the selected bit string and the plaintext, and outputting a ciphertext;
A stream cipher encryption apparatus comprising:
前記選択されたビット列が1ビット以上、かつ、前記内部状態の半分以下であることを特徴とする請求項1に記載のストリーム暗号の暗号化装置。   The stream cipher encryption apparatus according to claim 1, wherein the selected bit string is 1 bit or more and half or less of the internal state. 前記平文の長さが前記内部状態の半分よりも大きい場合には、1ビット以上、かつ、内部状態の半分以下の平文について処理を行い、残りの平文の暗号化する場合には、前記初期化処理手段が初期ベクトルを変更して、再度、初期化処理を行うことを特徴とする請求項2に記載のストリーム暗号の暗号化装置。   When the length of the plaintext is larger than half of the internal state, processing is performed on a plaintext of 1 bit or more and half or less of the internal state, and when the remaining plaintext is encrypted, the initialization is performed. 3. The stream cipher encryption apparatus according to claim 2, wherein the processing means changes the initial vector and performs the initialization process again. 初期鍵と初期ベクトルとを用いて、初期化処理を行う初期化処理手段と、
該初期化処理終了後に、内部状態の中から暗号文と同じ長さのビット列を選択する選択手段と、
該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する演算手段と、
を備えたことを特徴とするストリーム暗号の復号化装置。
Initialization processing means for performing initialization processing using the initial key and the initial vector;
A selection means for selecting a bit string having the same length as the ciphertext from the internal state after the initialization process is completed;
An arithmetic means for performing an exclusive OR operation between the selected bit string and the ciphertext, and outputting plaintext;
An apparatus for decrypting a stream cipher, comprising:
前記選択されたビット列が1ビット以上、かつ、前記内部状態の半分以下であることを特徴とする請求項4に記載のストリーム暗号の復号化装置。   5. The stream cipher decoding apparatus according to claim 4, wherein the selected bit string is 1 bit or more and half or less of the internal state. 前記暗号文の長さが前記内部状態の半分よりも大きい場合には、1ビット以上、かつ、内部状態の半分以下の暗号文について処理を行い、残りの暗号文の復号化する場合には、前記初期化処理手段が初期ベクトルを変更して、再度、初期化処理を行うことを特徴とする請求項5に記載のストリーム暗号の復号化装置。   When the length of the ciphertext is larger than half of the internal state, the ciphertext of 1 bit or more and half or less of the internal state is processed, and when the remaining ciphertext is decrypted, 6. The apparatus for decrypting a stream cipher according to claim 5, wherein the initialization processing means changes the initial vector and performs the initialization process again. 入力する平文の長さが1ビット以上、かつ、内部状態の半分以下である場合のストリーム暗号の暗号化方法であって、
初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップと、
該初期化処理終了後に、内部状態の中から平文と同じ長さのビット列を選択する第2のステップと、
該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する第3のステップと、
を備えたことを特徴とするストリーム暗号の暗号化方法。
An encryption method of stream cipher when the length of input plaintext is 1 bit or more and half or less of the internal state,
A first step of performing an initialization process using an initial key and an initial vector;
A second step of selecting a bit string having the same length as the plaintext from the internal state after the initialization process is completed;
A third step of performing an exclusive OR operation between the selected bit string and the plaintext, and outputting a ciphertext;
A stream cipher encryption method characterized by comprising:
入力する平文の長さが内部状態の半分以上である場合のストリーム暗号の暗号化方法であって、
初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップと、
該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する第2のステップと、
該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する第3のステップと、
初期ベクトルのみを変更して、初期化処理を行う第4のステップと、
該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する第5のステップと、
該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する第6のステップと、
前記第4のステップから第6のステップまでの処理を残りの平文の長さが1ビット以上、かつ、前記内部状態の半分以下になるまで、続行する第7のステップと、
前記出力されたすべての暗号文を連結して、前記平文に対応する暗号文を出力する第8のステップと、
を備えたことを特徴とするストリーム暗号の暗号化方法。
An encryption method of stream cipher when the length of plaintext to be input is more than half of the internal state,
A first step of performing an initialization process using an initial key and an initial vector;
A second step of selecting a bit string of 1 bit or more and half or less of the internal state after the initialization process;
A third step of performing an exclusive OR operation between the selected bit string and the plaintext, and outputting a ciphertext;
A fourth step of performing initialization processing by changing only the initial vector;
A fifth step of selecting a bit string of 1 bit or more and half or less of the internal state after the initialization process is completed;
A sixth step of performing an exclusive OR operation between the selected bit string and the plaintext, and outputting a ciphertext;
A seventh step of continuing the processing from the fourth step to the sixth step until the length of the remaining plaintext is 1 bit or more and half or less of the internal state;
An eighth step of concatenating all the output ciphertexts and outputting ciphertexts corresponding to the plaintexts;
A stream cipher encryption method characterized by comprising:
入力する暗号文の長さが1ビット以上、かつ、内部状態の半分以下である場合のストリーム暗号の復号化方法であって、
初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップと、
該初期化処理終了後に、内部状態の中から暗号文と同じ長さのビット列を選択する第2のステップと、
該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する第3のステップと、
を備えたことを特徴とするストリーム暗号の復号化方法。
A method of decrypting a stream cipher when the length of an input ciphertext is 1 bit or more and half or less of an internal state,
A first step of performing an initialization process using an initial key and an initial vector;
A second step of selecting a bit string having the same length as the ciphertext from the internal state after the initialization process is completed;
A third step of performing an exclusive OR operation between the selected bit string and the ciphertext and outputting plaintext;
A method of decrypting a stream cipher, comprising:
入力する暗号文の長さが内部状態の半分以上である場合のストリーム暗号の復号化方法であって、
初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップと、
該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する第2のステップと、
該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する第3のステップと、
初期ベクトルのみを変更して、初期化処理を行う第4のステップと、
該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下に等しいビット列を選択する第5のステップと、
該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する第6のステップと、
前記第4のステップから第6のステップまでの処理を残りの暗号文の長さが1ビット以上、かつ、前記内部状態の半分以下になるまで、続行する第7のステップと、
前記出力されたすべての平文を連結して、前記暗号文に対応する平文を出力する第8のステップと、
を備えたことを特徴とするストリーム暗号の復号化方法。
A method for decrypting a stream cipher when the length of the input ciphertext is more than half of the internal state,
A first step of performing an initialization process using an initial key and an initial vector;
A second step of selecting a bit string of 1 bit or more and half or less of the internal state after the initialization process;
A third step of performing an exclusive OR operation between the selected bit string and the ciphertext and outputting plaintext;
A fourth step of performing initialization processing by changing only the initial vector;
A fifth step of selecting a bit string equal to 1 bit or more and equal to or less than half of the internal state after the initialization process is completed;
A sixth step of performing an exclusive OR operation between the selected bit string and the ciphertext and outputting plaintext;
A seventh step of continuing the processing from the fourth step to the sixth step until the length of the remaining ciphertext is 1 bit or more and half or less of the internal state;
An eighth step of concatenating all the output plaintexts and outputting plaintext corresponding to the ciphertext;
A method of decrypting a stream cipher, comprising:
入力する平文の長さが1ビット以上、かつ、内部状態の半分以下である場合のストリーム暗号の暗号化方法をコンピュータに実行させるためのプログラムであって、
初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップと、
該初期化処理終了後に、内部状態の中から平文と同じ長さのビット列を選択する第2のステップと、
該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する第3のステップと、
をコンピュータに実行させるためのプログラム。
A program for causing a computer to execute a stream cipher encryption method when the length of an input plaintext is 1 bit or more and half or less of an internal state,
A first step of performing an initialization process using an initial key and an initial vector;
A second step of selecting a bit string having the same length as the plaintext from the internal state after the initialization process is completed;
A third step of performing an exclusive OR operation between the selected bit string and the plaintext, and outputting a ciphertext;
A program that causes a computer to execute.
入力する平文の長さが内部状態の半分以上である場合のストリーム暗号の暗号化方法をコンピュータに実行させるためのプログラムであって、
初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップと、
該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する第2のステップと、
該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する第3のステップと、
初期ベクトルのみを変更して、初期化処理を行う第4のステップと、
該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する第5のステップと、
該選択したビット列と前記平文との排他的論理和演算を行い、暗号文を出力する第6のステップと、
前記第4のステップから第6のステップまでの処理を残りの平文の長さが1ビット以上、かつ、前記内部状態の半分以下になるまで、続行する第7のステップと、
前記出力されたすべての暗号文を連結して、前記平文に対応する暗号文を出力する第8のステップと、
をコンピュータに実行させるためのプログラム。
A program for causing a computer to execute a stream cipher encryption method when the length of an input plaintext is more than half of the internal state,
A first step of performing an initialization process using an initial key and an initial vector;
A second step of selecting a bit string of 1 bit or more and half or less of the internal state after the initialization process;
A third step of performing an exclusive OR operation between the selected bit string and the plaintext, and outputting a ciphertext;
A fourth step of performing initialization processing by changing only the initial vector;
A fifth step of selecting a bit string of 1 bit or more and half or less of the internal state after the initialization process is completed;
A sixth step of performing an exclusive OR operation between the selected bit string and the plaintext, and outputting a ciphertext;
A seventh step of continuing the processing from the fourth step to the sixth step until the length of the remaining plaintext is 1 bit or more and half or less of the internal state;
An eighth step of concatenating all the output ciphertexts and outputting ciphertexts corresponding to the plaintexts;
A program that causes a computer to execute.
入力する暗号文の長さが1ビット以上、かつ、内部状態の半分以下である場合のストリーム暗号の復号化方法をコンピュータに実行させるためのプログラムであって、
初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップと、
該初期化処理終了後に、内部状態の中から暗号文と同じ長さのビット列を選択する第2のステップと、
該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する第3のステップと、
をコンピュータに実行させるためのプログラム。
A program for causing a computer to execute a stream cipher decryption method when the length of an input ciphertext is 1 bit or more and half or less of an internal state,
A first step of performing an initialization process using an initial key and an initial vector;
A second step of selecting a bit string having the same length as the ciphertext from the internal state after the initialization process is completed;
A third step of performing an exclusive OR operation between the selected bit string and the ciphertext and outputting plaintext;
A program that causes a computer to execute.
入力する暗号文の長さが内部状態の半分以上である場合のストリーム暗号の復号化方法をコンピュータに実行させるためのプログラムであって、
初期鍵と初期ベクトルとを用いて、初期化処理を行う第1のステップと、
該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下のビット列を選択する第2のステップと、
該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する第3のステップと、
初期ベクトルのみを変更して、初期化処理を行う第4のステップと、
該初期化処理終了後に、1ビット以上、かつ、内部状態の半分以下に等しいビット列を選択する第5のステップと、
該選択したビット列と前記暗号文との排他的論理和演算を行い、平文を出力する第6のステップと、
前記第4のステップから第6のステップまでの処理を残りの暗号文の長さが1ビット以上、かつ、前記内部状態の半分以下になるまで、続行する第7のステップと、
前記出力されたすべての平文を連結して、前記暗号文に対応する平文を出力する第8のステップと、
をコンピュータに実行させるためのプログラム。
A program for causing a computer to execute a method for decrypting a stream cipher when the length of an input ciphertext is more than half of the internal state,
A first step of performing an initialization process using an initial key and an initial vector;
A second step of selecting a bit string of 1 bit or more and half or less of the internal state after the initialization process;
A third step of performing an exclusive OR operation between the selected bit string and the ciphertext and outputting plaintext;
A fourth step of performing initialization processing by changing only the initial vector;
A fifth step of selecting a bit string equal to 1 bit or more and equal to or less than half of the internal state after the initialization process is completed;
A sixth step of performing an exclusive OR operation between the selected bit string and the ciphertext and outputting plaintext;
A seventh step of continuing the processing from the fourth step to the sixth step until the length of the remaining ciphertext is 1 bit or more and half or less of the internal state;
An eighth step of concatenating all the output plaintexts and outputting plaintext corresponding to the ciphertext;
A program that causes a computer to execute.
JP2009288629A 2009-12-21 2009-12-21 Stream cipher encryption apparatus, stream cipher decryption apparatus, stream cipher encryption method, stream cipher decryption method, and program Active JP5489696B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009288629A JP5489696B2 (en) 2009-12-21 2009-12-21 Stream cipher encryption apparatus, stream cipher decryption apparatus, stream cipher encryption method, stream cipher decryption method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009288629A JP5489696B2 (en) 2009-12-21 2009-12-21 Stream cipher encryption apparatus, stream cipher decryption apparatus, stream cipher encryption method, stream cipher decryption method, and program

Publications (2)

Publication Number Publication Date
JP2011130312A true JP2011130312A (en) 2011-06-30
JP5489696B2 JP5489696B2 (en) 2014-05-14

Family

ID=44292373

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009288629A Active JP5489696B2 (en) 2009-12-21 2009-12-21 Stream cipher encryption apparatus, stream cipher decryption apparatus, stream cipher encryption method, stream cipher decryption method, and program

Country Status (1)

Country Link
JP (1) JP5489696B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140143210A (en) * 2012-04-02 2014-12-15 가부시키가이샤 크립토 베이직 Encryption device, decryption device, encryption method, decryption method, and program
JP2016004170A (en) * 2014-06-17 2016-01-12 Kddi株式会社 Encryption device and decryption device, encryption method and decryption method, and encryption program and decryption program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JPN6013057337; カール・H・マイアー,スティーブン・M・マティス: 暗号:コンピュータ・データ保護の新展開 , 19860210, p.75, 78-87, 株式会社自然社 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140143210A (en) * 2012-04-02 2014-12-15 가부시키가이샤 크립토 베이직 Encryption device, decryption device, encryption method, decryption method, and program
KR102033196B1 (en) 2012-04-02 2019-11-29 가부시키가이샤 크립토 베이직 Encryption device, decryption device, encryption method, decryption method, and program
JP2016004170A (en) * 2014-06-17 2016-01-12 Kddi株式会社 Encryption device and decryption device, encryption method and decryption method, and encryption program and decryption program

Also Published As

Publication number Publication date
JP5489696B2 (en) 2014-05-14

Similar Documents

Publication Publication Date Title
JP5120830B2 (en) Method and system for generating ciphertext and message authentication code using shared hardware
KR101370223B1 (en) Low latency block cipher
US8966279B2 (en) Securing the implementation of a cryptographic process using key expansion
Rahimunnisa et al. FPGA implementation of AES algorithm for high throughput using folded parallel architecture
KR20100069610A (en) Methods and devices for a chained encryption mode
US8718280B2 (en) Securing keys of a cipher using properties of the cipher process
JP4909668B2 (en) Hybrid encryption apparatus and hybrid encryption method
JP5489696B2 (en) Stream cipher encryption apparatus, stream cipher decryption apparatus, stream cipher encryption method, stream cipher decryption method, and program
JP2012039180A (en) Encryptor of stream encryption, decoder of stream encryption, encrypting method of stream encryption, decoding method of stream encryption, and program
Buell Modern symmetric ciphers—Des and Aes
JP5431191B2 (en) Authenticated stream cipher encryption apparatus, authenticated stream cipher decryption apparatus, encryption method, decryption method, and program
JP4938430B2 (en) Nonlinear function unit, stream cipher encryption apparatus, decryption apparatus, MAC generation apparatus, stream cipher encryption method, decryption method, MAC generation method, and program
JP5102536B2 (en) Stream cipher encryption apparatus, decryption apparatus, encryption method, decryption method, and program
JP5415020B2 (en) Stream cipher encryption apparatus, decryption apparatus, MAC generation apparatus, stream cipher encryption method, decryption method, MAC generation method, and program
JP5559011B2 (en) Stream cipher encryption apparatus, stream cipher encryption method and program
JP2011119985A (en) Encryption and decryption method
JP5084224B2 (en) Self-synchronous stream cipher encryption apparatus, decryption apparatus, self-synchronous stream cipher system, MAC generation apparatus, encryption method, decryption method, MAC generation method, and program
JP5706751B2 (en) Stream cipher encryption apparatus, stream cipher decryption apparatus, stream cipher encryption method, stream cipher decryption method, and program
JP5096794B2 (en) Stream cipher encryption device, stream cipher decryption device, self-synchronization stream cipher encryption device, self-synchronization stream cipher decryption device, stream cipher encryption method, self-synchronization stream cipher encryption method And programs
JP2013098722A (en) Ciphering device of stream cipher, deciphering device of stream cipher, ciphering method of stream cipher, deciphering method of stream cipher, and program
JP5431190B2 (en) Authenticated stream cipher encryption apparatus, authenticated stream cipher decryption apparatus, encryption method, decryption method, and program
JP2009037095A (en) Data scrambling apparatus, data descrambling apparatus, data scrambling method, data descrambling method and program
JP5801095B2 (en) Stream cipher encryption apparatus, stream cipher decryption apparatus, stream cipher encryption method, stream cipher decryption method, and program
JP5748634B2 (en) Key sequence output device, stream cipher encryption device, stream cipher decryption device, key sequence output method, and program
JP5495825B2 (en) Stream cipher secret calculation encryption apparatus, stream cipher secret calculation decryption apparatus, encryption method, decryption method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120830

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131126

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140127

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140225

R150 Certificate of patent or registration of utility model

Ref document number: 5489696

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150