JP2015114434A - Device for encrypting stream cipher, device for decrypting stream cipher, method for encrypting stream cipher, method for decrypting stream cipher, and program - Google Patents

Device for encrypting stream cipher, device for decrypting stream cipher, method for encrypting stream cipher, method for decrypting stream cipher, and program Download PDF

Info

Publication number
JP2015114434A
JP2015114434A JP2013255307A JP2013255307A JP2015114434A JP 2015114434 A JP2015114434 A JP 2015114434A JP 2013255307 A JP2013255307 A JP 2013255307A JP 2013255307 A JP2013255307 A JP 2013255307A JP 2015114434 A JP2015114434 A JP 2015114434A
Authority
JP
Japan
Prior art keywords
ciphertext
output
register
internal state
key sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2013255307A
Other languages
Japanese (ja)
Inventor
清本 晋作
Shinsaku Kiyomoto
晋作 清本
三宅 優
Masaru Miyake
優 三宅
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 JP2013255307A priority Critical patent/JP2015114434A/en
Publication of JP2015114434A publication Critical patent/JP2015114434A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To impart message authentication without changing the configuration of a stream cipher processing unit.SOLUTION: An initial key and an initial vector are inputted to update an internal state, a key sequence (random number) is generated, and exclusive-ORing with plaintext divided in accordance with the generated key sequence and the data size of the key sequence is performed, whereby cipher text is outputted. Next, the outputted cipher text is inputted, one internal state is selected, in accordance with the inputted cipher text, from among internal states stored in a plurality of registers, and updating of the stored data of each register is executed, in a message authentication register composed of a plurality of registers, for all of cipher texts in accordance with the inputted internal state. Then, a prescribed fixed bit data string is inputted and an updating process is executed, and a message authenticator is outputted from the message authentication register.

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 for providing message authentication without changing the configuration of the stream cipher processing unit About.

近年、コンピュータを利用した様々なサービスが提供されている。多くのサービスにおいては、通信の秘匿を実現するため、暗号が利用される。暗号方式として最も一般的なものは、1つの鍵で暗号化および復号化を行う共通鍵暗号方式であるが、共通鍵暗号方式は、大きくブロック暗号方式とストリーム暗号方式の2つに分けられる。前者は、最も一般的に用いられている方式であるが、後者の方が処理速度に優れるため、近年注目を集めつつある。ここで、ストリーム暗号は、初期鍵を初期化処理により攪拌して、初期の内部状態を生成し、生成した状態を逐次更新しながら、暗号化の各系列を生成する(例えば、特許文献1参照。)。   In recent years, various services using computers have been provided. In many services, encryption is used to conceal communication. The most common encryption method is a common key encryption method that performs encryption and decryption with a single key, but the common key encryption method is roughly divided into a block encryption method and a stream encryption method. The former is the method that is most commonly used, but the latter has been attracting attention in recent years because it is superior in processing speed. Here, in the stream cipher, an initial key is stirred by an initialization process, an initial internal state is generated, and each sequence of encryption is generated while sequentially updating the generated state (see, for example, Patent Document 1). .)

特開2000−209195号公報JP 2000-209195 A

しかしながら、従来のストリーム暗号では、暗号化機能のみを提供するが、改ざん防止を行うためのメッセージ認証機能を提供することはできなかったという問題があった。   However, the conventional stream cipher only provides an encryption function, but has a problem that it cannot provide a message authentication function for preventing falsification.

そこで、本発明は、上述の課題に鑑みてなされたものであり、ストリーム暗号処理部の構成を変更することなく、メッセージ認証を付与するストリーム暗号の暗号化装置、ストリーム暗号の復号化装置、ストリーム暗号の暗号化方法、ストリーム暗号の復号化方法およびプログラムを提供することを目的とする。   Therefore, the present invention has been made in view of the above-described problems. A stream cipher encryption apparatus, a stream cipher decryption apparatus, and a stream that provide message authentication without changing the configuration of the stream cipher processing section. It is an object of the present invention to provide a 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.

(1)本発明は、初期鍵と初期ベクトルを入力し、内部状態を更新して、生成した鍵系列(乱数)を生成する初期化処理手段と、該生成した鍵系列と鍵系列のデータサイズに応じて分割した平文との排他的論理和演算を行なって、暗号文を出力する排他的論理和演算器と、該出力された暗号文を入力し、入力した暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択する選択関数器と、複数のレジスタで構成され、該選択した内部状態を格納するメッセージ認証用レジスタと、前記メッセージ認証用レジスタにおいて、前記入力した内部状態に応じて、各レジスタの格納データの更新を前記選択関数器からの出力がなくなるまで実行し、その後、所定の固定ビットデータ列を入力して、さらに、前記各レジスタの格納データの更新を実行する更新手段と、該更新手段の処理終了後に、前記メッセージ認証用レジスタに格納されているデータをメッセージ認証子として出力させる出力制御手段と、該出力されたメッセージ認証子と前記排他的論理和演算器が出力する暗号文とを結合して出力する出力手段と、を備えたことを特徴とするストリーム暗号の暗号化装置を提案している。 (1) The present invention inputs an initial key and an initial vector, updates the internal state, generates an generated key sequence (random number), and the generated key sequence and the data size of the key sequence The exclusive OR operation with the plaintext divided according to the above, and an exclusive OR operator that outputs the ciphertext and the output ciphertext, and according to the input ciphertext, a plurality of A selection function unit that selects one internal state from internal states stored in a register, a message authentication register that includes a plurality of registers and stores the selected internal state, and the message authentication register; Depending on the input internal state, update of the stored data of each register is executed until there is no output from the selection function unit, and then a predetermined fixed bit data string is input. An update means for updating stored data; an output control means for outputting the data stored in the message authentication register as a message authenticator after the processing of the update means is completed; and the output message authenticator; There is proposed a stream cipher encryption apparatus comprising output means for combining and outputting ciphertext output by the exclusive OR calculator.

(2)本発明は、(1)のストリーム暗号の暗号化装置について、前記選択関数器は、前記入力した暗号文(数値データ)に対して、modn(n;正の整数からなる定数)の演算処理を行い、その剰余をインデックスとして、前記複数のレジスタ内に格納された内部状態のうち、該インデックスに対応するレジスタの内部状態を選択することを特徴とするストリーム暗号の暗号化装置を提案している。 (2) The present invention relates to the stream cipher encryption apparatus according to (1), wherein the selection function unit is configured such that modn (n is a constant consisting of a positive integer) A stream cipher encryption device that performs arithmetic processing and uses the remainder as an index to select an internal state of a register corresponding to the index from among the internal states stored in the plurality of registers. doing.

(3)本発明は、(1)または(2)のストリーム暗号の暗号化装置について、前記初期化処理手段が、フィードバックシフトレジスタとフィードバック演算器とから構成され、前記フィードバック演算器の入力ビット列と出力ビット列とを対応づけ、前記出力ビット列が異なるビット列となるよう長周期化する第1の演算テーブルを動的に生成する第1の演算テーブル生成手段を備え、該生成した前記第1の演算テーブルを用いて、初期化処理を行うことを特徴とするストリーム暗号の暗号化装置を提案している。 (3) The present invention relates to the stream cipher encryption apparatus according to (1) or (2), wherein the initialization processing means includes a feedback shift register and a feedback calculator, and an input bit string of the feedback calculator A first operation table generating unit that dynamically generates a first operation table that associates an output bit sequence and makes the output bit sequence have a different period so that the output bit sequence becomes a different bit sequence; and the generated first operation table And a stream cipher encryption device characterized in that initialization processing is performed using.

(4)本発明は、(1)または(2)に記載のストリーム暗号の暗号化装置により生成されるメッセージ認証子付き暗号文を復号するストリーム暗号の復号化装置であって、前記メッセージ認証子付き暗号文を暗号文とメッセージ認証子に分離する分離手段と、該分離したメッセージ認証子を格納する格納手段と、初期値と初期ベクトルを入力し、内部状態を更新して、生成した鍵系列(乱数)を生成する初期処理手段と、該生成した鍵系列と前記分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文との排他的論理和演算を行なって、平文を出力する排他的論理和演算器と、該分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文を入力し、入力した暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択する選択関数器と、複数のレジスタで構成され、該選択した内部状態を格納するメッセージ認証用レジスタと、前記メッセージ認証用レジスタにおいて、前記入力した内部状態に応じて、各レジスタの格納データの更新を前記選択関数器からの出力がなくなるまで実行し、その後、所定の固定ビットデータ列を入力して、さらに、前記各レジスタの格納データの更新を実行する更新手段と、該更新手段の処理終了後に、前記メッセージ認証用レジスタに格納されているデータをメッセージ認証子として出力させる出力制御手段と、前記格納手段に格納されたメッセージ認証子と前記出力されたメッセージ認証子とを照合する照合手段と、を備えたことを特徴とするストリーム暗号の復号化装置を提案している。 (4) The present invention provides a stream cipher decrypting device for decrypting a ciphertext with a message authenticator generated by the stream cipher encrypting device according to (1) or (2), wherein the message authenticator Separation means for separating the attached ciphertext into ciphertext and message authenticator, storage means for storing the separated message authenticator, an initial value and an initial vector are input, the internal state is updated, and the generated key sequence An initial processing means for generating (random number) and an exclusive OR operation of the generated key sequence and the ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence, and outputting plaintext An exclusive OR operator and a ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence are input, and 1 is determined from internal states stored in a plurality of registers according to the input ciphertext. One A selection function unit that selects an internal state, a plurality of registers, a message authentication register that stores the selected internal state, and the message authentication register, each of the registers according to the input internal state Update means for updating stored data until there is no output from the selection function unit, then inputting a predetermined fixed bit data string, and further updating the stored data of each register, and the update After the processing of the means is completed, the output control means for outputting the data stored in the message authentication register as a message authenticator, and the message authenticator stored in the storage means are compared with the output message authenticator And a stream cipher decryption device characterized by comprising a collating means for performing

(5)本発明は、(4)のストリーム暗号の復号化装置について、前記選択関数器は、前記入力した暗号文(数値データ)に対して、modn(n;正の整数からなる定数)の演算処理を行い、その剰余をインデックスとして、前記複数のレジスタ内に格納された内部状態のうち、該インデックスに対応するレジスタの内部状態を選択することを特徴とするストリーム暗号の復号化装置を提案している。 (5) The present invention relates to the stream cipher decryption device according to (4), wherein the selection function unit is configured such that modn (n is a constant composed of a positive integer) with respect to the input ciphertext (numerical data). A stream cipher decryption device that performs arithmetic processing and uses the remainder as an index to select an internal state of a register corresponding to the index from among the internal states stored in the plurality of registers. doing.

(6)本発明は、(4)または(5)のストリーム暗号の復号化装置について、前記初期化処理手段が、フィードバックシフトレジスタとフィードバック演算器とから構成され、前記フィードバック演算器の入力ビット列と出力ビット列とを対応づけ、前記出力ビット列が異なるビット列となるよう長周期化する第1の演算テーブルを動的に生成する第1の演算テーブル生成手段を備え、該生成した前記第1の演算テーブルを用いて、初期化処理を行うことを特徴とするストリーム暗号の復号化装置を提案している。 (6) The present invention relates to the stream cipher decryption device according to (4) or (5), wherein the initialization processing means includes a feedback shift register and a feedback calculator, and an input bit string of the feedback calculator A first operation table generating unit that dynamically generates a first operation table that associates an output bit sequence and makes the output bit sequence have a different period so that the output bit sequence becomes a different bit sequence; and the generated first operation table And a stream cipher decryption device characterized by performing initialization processing using the.

(7)本発明は、コンピュータが、初期鍵と初期ベクトルを入力し、内部状態を更新して、鍵系列(乱数)を生成する第1のステップと、該生成した鍵系列と鍵系列のデータサイズに応じて分割した平文との排他的論理和演算を行なって、暗号文を出力する第2のステップと、該出力された暗号文を入力し、入力した暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択する第3のステップと、複数のレジスタで構成されたメッセージ認証用レジスタにおいて、前記入力した内部状態に応じて、各レジスタの格納データの更新処理を、前記第3のステップからの出力がなくなるまで実行する第4のステップと、所定の固定ビットデータ列を入力して前記更新処理を実行する第5のステップと、前記メッセージ認証用レジスタからメッセージ認証子を出力する第6のステップと、前記第6のステップで出力されるメッセージ認証子と前記第2のステップで出力される暗号文とを結合して出力する第7のステップと、を実行することを特徴とするストリーム暗号の暗号化方法を提案している。 (7) The present invention provides a first step in which a computer inputs an initial key and an initial vector, updates an internal state, and generates a key sequence (random number), and the generated key sequence and key sequence data A second step of performing an exclusive OR operation with the plaintext divided according to the size to output the ciphertext, and inputting the output ciphertext, and a plurality of registers according to the input ciphertext In a third step of selecting one internal state from the internal states stored in and a message authentication register composed of a plurality of registers, updating of stored data in each register according to the input internal state A fourth step of executing the process until there is no output from the third step, a fifth step of executing the update process by inputting a predetermined fixed bit data string, and the message authentication. A sixth step of outputting a message authenticator from the register for registering, and a seventh step of combining and outputting the message authenticator output in the sixth step and the ciphertext output in the second step And a stream cipher encryption method characterized by executing the following.

(8)本発明は、(7)に記載のストリーム暗号の暗号化方法により生成されるメッセージ認証子付き暗号文を復号するストリーム暗号の復号化方法であって、コンピュータが、前記メッセージ認証子付き暗号文を暗号文とメッセージ認証子に分離する第1のステップと、該分離したメッセージ認証子を格納する第2のステップと、初期鍵と初期ベクトルを入力し、内部状態を更新して、鍵系列(乱数)を生成する第3のステップと、該生成した鍵系列と前記分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文との排他的論理和演算を行なって、平文を出力する第4のステップと、前記分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文を入力し、入力した該暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択する第5のステップと、複数のレジスタで構成されたメッセージ認証用レジスタにおいて、前記入力した内部状態に応じて、各レジスタの格納データの更新処理を、前記第5のステップからの出力がなくなるまで実行する第6のステップと、所定の固定ビットデータ列を入力して前記更新処理を実行する第7のステップと、前記メッセージ認証用レジスタからメッセージ認証子を出力する第8のステップと、該出力されたメッセージ認証子と前記格納されたメッセージ認証子とを照合する第9のステップと、を実行することを特徴とするストリーム暗号の復号化方法を提案している。 (8) The present invention provides a stream cipher decryption method for decrypting a ciphertext with a message authenticator generated by the stream cipher encryption method according to (7), wherein a computer includes the message authenticator A first step of separating the ciphertext into a ciphertext and a message authenticator, a second step of storing the separated message authenticator, an initial key and an initial vector are input, the internal state is updated, and the key A third step of generating a sequence (random number), and performing an exclusive OR operation on the generated key sequence and the ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence, A fourth step of outputting, a ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence, and an internal state stored in a plurality of registers according to the input ciphertext In the fifth step of selecting one internal state from the above and a message authentication register composed of a plurality of registers, the update processing of the data stored in each register is performed according to the input internal state. A sixth step that is executed until there is no output from the step; a seventh step that executes the updating process by inputting a predetermined fixed bit data string; and a message that outputs a message authenticator from the message authentication register. The stream cipher decryption method is characterized by executing step 8 and a ninth step of collating the output message authenticator with the stored message authenticator.

(9)本発明は、コンピュータに、初期鍵と初期ベクトルを入力し、内部状態を更新して、鍵系列(乱数)を生成する第1のステップと、該生成した鍵系列と鍵系列のデータサイズに応じて分割した平文との排他的論理和演算を行なって、暗号文を出力する第2のステップと、該出力された暗号文を入力し、入力した暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択する第3のステップと、複数のレジスタで構成されたメッセージ認証用レジスタにおいて、前記入力した内部状態に応じて、各レジスタの格納データの更新処理を、前記第3のステップからの出力がなくなるまで実行する第4のステップと、所定の固定ビットデータ列を入力して前記更新処理を実行する第5のステップと、前記メッセージ認証用レジスタからメッセージ認証子を出力する第6のステップと、前記第6のステップで出力されるメッセージ認証子と前記第2のステップで出力される暗号文とを結合して出力する第7のステップと、を実行させるためのプログラムを提案している。 (9) According to the present invention, a first step of inputting an initial key and an initial vector to a computer, updating an internal state to generate a key sequence (random number), and the generated key sequence and key sequence data A second step of performing an exclusive OR operation with the plaintext divided according to the size to output the ciphertext, and inputting the output ciphertext, and a plurality of registers according to the input ciphertext In a third step of selecting one internal state from the internal states stored in and a message authentication register composed of a plurality of registers, updating of stored data in each register according to the input internal state A fourth step of executing the process until there is no output from the third step, a fifth step of executing the update process by inputting a predetermined fixed bit data string, and the message authentication. A sixth step of outputting a message authenticator from the register for registering, and a seventh step of combining and outputting the message authenticator output in the sixth step and the ciphertext output in the second step And we have proposed a program to execute.

(10)本発明は、(7)に記載のストリーム暗号の暗号化方法により生成されるメッセージ認証子付き暗号文を復号するストリーム暗号の復号化方法をコンピュータに実行させるためのプログラムであって、コンピュータに、前記メッセージ認証子付き暗号文を暗号文とメッセージ認証子に分離する第1のステップと、該分離したメッセージ認証子を格納する第2のステップと、初期鍵と初期ベクトルを入力し、内部状態を更新して、鍵系列(乱数)を生成する第3のステップと、該生成した鍵系列と前記分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文との排他的論理和演算を行なって、平文を出力する第4のステップと、前記分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文を入力し、入力した該暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択する第5のステップと、複数のレジスタで構成されたメッセージ認証用レジスタにおいて、前記入力した内部状態に応じて、各レジスタの格納データの更新処理を、前記第5のステップからの出力がなくなるまで実行する第6のステップと、所定の固定ビットデータ列を入力して前記更新処理を実行する第7のステップと、前記メッセージ認証用レジスタからメッセージ認証子を出力する第8のステップと、該出力されたメッセージ認証子と前記格納されたメッセージ認証子とを照合する第9のステップと、を実行させるためのプログラムを提案している。 (10) The present invention is a program for causing a computer to execute a stream cipher decryption method for decrypting a ciphertext with a message authenticator generated by the stream cipher encryption method according to (7), A computer inputs a first step of separating the ciphertext with a message authenticator into a ciphertext and a message authenticator, a second step of storing the separated message authenticator, an initial key and an initial vector, A third step of updating the internal state to generate a key sequence (random number), and an exclusive logic of the generated key sequence and a ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence A fourth step of performing a sum operation and outputting a plaintext; and input a ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence. Accordingly, in the fifth step of selecting one internal state from the internal states stored in the plurality of registers, and in the message authentication register composed of a plurality of registers, each of the input internal states A sixth step of executing the update process of the data stored in the register until there is no output from the fifth step; a seventh step of executing the update process by inputting a predetermined fixed bit data string; A program for executing an eighth step of outputting a message authenticator from the message authentication register and a ninth step of collating the output message authenticator with the stored message authenticator is suggesting.

本発明によれば、ストリーム暗号処理部の構成を変更することなく、メッセージ認証を付与することができるという効果がある。   According to the present invention, there is an effect that message authentication can be given without changing the configuration of the stream encryption processing unit.

本発明の実施形態に係るストリーム暗号の暗号化装置の構成を示す図である。It is a figure which shows the structure of the encryption apparatus of the stream encryption which concerns on embodiment of this invention. 本発明の実施形態に係る初期処理部の構成を示す図である。It is a figure which shows the structure of the initial stage process part which concerns on embodiment of this invention. 本発明の実施形態に係るストリーム暗号の暗号化装置の処理を示す図である。It is a figure which shows the process of the encryption apparatus of the stream encryption which concerns on embodiment of this invention. 本発明の実施形態に係るストリーム暗号の復号化装置の構成を示す図である。It is a figure which shows the structure of the decoding apparatus of the stream encryption which concerns on embodiment of this invention. 本発明の実施形態に係るストリーム暗号の復号化装置の処理を示す図である。It is a figure which shows the process of the decoding apparatus of the stream encryption which concerns on embodiment of this invention.

以下、本発明の実施形態について、図面を用いて、詳細に説明する。
なお、本実施形態における構成要素は適宜、既存の構成要素等との置き換えが可能であり、また、他の既存の構成要素との組合せを含む様々なバリエーションが可能である。したがって、本実施形態の記載をもって、特許請求の範囲に記載された発明の内容を限定するものではない。
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に示すように、本実施形態に係るストリーム暗号の暗号化装置は、初期化処理部100と、排他的論理和演算器200と、選択関数器300と、メッセージ認証子用レジスタ400と、更新部500と、出力制御部600、出力部650とから構成されている。
<Configuration of Stream Cipher Encryption Device>
As shown in FIG. 1, the stream cipher encryption apparatus according to the present embodiment includes an initialization processing unit 100, an exclusive OR calculator 200, a selection function unit 300, a message authenticator register 400, The update unit 500 includes an output control unit 600 and an output unit 650.

初期化処理部100は、初期鍵と初期ベクトルを入力し、内部状態を更新して、鍵系列(乱数)を生成する。ここで、得られた内部状態は、内部に設けた複数のレジスタに格納される。また、複数のレジスタには、それぞれインデックスが付されている。なお、初期化処理部100の詳細な構成については、後述する。排他的論理和演算器200は、生成した鍵系列と鍵系列のデータサイズに応じて分割した平文との排他的論理和演算を行なって、暗号文を出力する。   The initialization processing unit 100 receives an initial key and an initial vector, updates the internal state, and generates a key sequence (random number). Here, the obtained internal state is stored in a plurality of registers provided therein. Each of the plurality of registers is assigned an index. The detailed configuration of the initialization processing unit 100 will be described later. The exclusive OR calculator 200 performs an exclusive OR operation on the generated key sequence and the plaintext divided according to the data size of the key sequence, and outputs a ciphertext.

選択関数器300は、排他的論理和演算器200から出力された暗号文を入力し、入力した暗号文に応じて、初期化処理部100の内部に設けた複数のレジスタ内に格納された内部状態から1つの内部状態を選択して更新部500に出力する。例えば、入力した暗号文(数値データ)に対して、modn(n;正の整数からなる定数)の演算処理を行い、その剰余をインデックスとして、複数のレジスタ内に格納された内部状態のうち、そのインデックスに対応するレジスタの内部状態を選択する。なお、上記の演算処理は、暗号文を例えば、2進数や10進数に変換して行なってもよい。   The selection function unit 300 receives the ciphertext output from the exclusive OR calculator 200, and stores internal data stored in a plurality of registers provided in the initialization processing unit 100 in accordance with the input ciphertext. One internal state is selected from the states and output to the updating unit 500. For example, the input ciphertext (numerical data) is subjected to arithmetic processing of modn (n; a constant consisting of a positive integer), and the remainder is used as an index among the internal states stored in a plurality of registers The internal state of the register corresponding to the index is selected. The above arithmetic processing may be performed by converting the ciphertext into, for example, a binary number or a decimal number.

メッセージ認証子用レジスタ400は、複数の単位レジスタから構成される。なお、メッセージ認証子用レジスタ400のビットサイズは、要求されるセキュリティ要件に応じたビットサイズになるように、構成する単位レジスタの個数が決められている。 The message authenticator register 400 includes a plurality of unit registers. Note that the number of unit registers to be configured is determined so that the bit size of the message authenticator register 400 becomes a bit size according to required security requirements.

更新部500は、メッセージ認証子用レジスタ400において、選択関数器300が出力した内部状態に応じて、各レジスタの格納データの更新を選択関数器300からの出力がなくなるまで実行し、その後、所定の固定ビットデータ列を入力して、さらに、各レジスタの格納データの更新を実行する。例えば、選択関数器300が出力した内部状態に応じた各レジスタの格納データの更新は、メッセージ認証用のレジスタを各32ビットのレジスタ4つで構成した場合に、第1レジスタの値と、入力される内部状態の値を加算し、第2レジスタデータを第1レジスタに、第3レジスタのデータを第2レジスタに、第4レジスタのデータを第3レジスタに移動させ、空となった第4レジスタに、先ほど加算した値を入力するような処理によって行なわれる。なお、所定の固定ビットとは、すべてが1のデータ列、すべてが0のデータ列等でもよいし、初期ベクトルを用いてもよい。また、この際、更新処理は、少なくとも1回行なうが、回数を増やすことが好ましい。これらの更新処理は、暗号文の内容がすべてのデータに伝播するように、攪拌するものであり、これにより、第三者の攻撃に対して、耐性を高めることができる。   In the message authenticator register 400, the update unit 500 updates the data stored in each register until there is no output from the selection function unit 300 according to the internal state output by the selection function unit 300, and then The fixed bit data string is input, and the data stored in each register is updated. For example, the update of the data stored in each register according to the internal state output by the selection function unit 300 is performed by inputting the value of the first register and the input when the message authentication register is composed of four 32-bit registers. The second register data is moved to the first register, the third register data is moved to the second register, the fourth register data is moved to the third register, and the fourth register becomes empty. This process is performed by inputting the previously added value into the register. The predetermined fixed bits may be all 1 data strings, all 0 data strings, or the like, or an initial vector may be used. At this time, the update process is performed at least once, but it is preferable to increase the number of times. These update processes are agitated so that the contents of the ciphertext are propagated to all data, and this can increase resistance to attacks by third parties.

出力制御部600は、更新手段の処理終了後に、前記メッセージ認証用レジスタに格納されているデータをメッセージ認証子として出力させる。出力部650は、出力されたメッセージ認証子と排他的論理和演算器が出力する暗号文とを結合して出力する。
<初期化処理部の詳細な構成>
The output controller 600 causes the data stored in the message authentication register to be output as a message authenticator after the processing of the updating means is completed. The output unit 650 combines and outputs the output message authenticator and the ciphertext output by the exclusive OR calculator.
<Detailed configuration of initialization processing unit>

図2に示すように、初期化処理部100は、フィードバックシフトレジスタ110、120と、フィードバック演算器130、140、150と、クロックコントローラ160とから構成されている。   As shown in FIG. 2, the initialization processing unit 100 includes feedback shift registers 110 and 120, feedback calculators 130, 140 and 150, and a clock controller 160.

フィードバックシフトレジスタ110、120は、入力ビットが直前の状態の線形写像になっているシフトレジスタであり、その値を構成するビット列の一部の排他的論理和を入力ビットとするシフトレジスタである。   The feedback shift registers 110 and 120 are shift registers whose input bits are a linear mapping of the immediately previous state, and are shift registers whose input bits are the exclusive OR of a part of the bit string constituting the value.

フィードバック演算器130、140、150は、フィードバックシフトレジスタ110、120から入力されるビット列に対し、係数を乗算してフィードバックするビット列を生成する。クロックコントローラ160は、クロックに同期して、フィードバック演算器130、140、150にビット列を出力する。   The feedback calculators 130, 140, and 150 generate bit strings that are fed back by multiplying the bit strings input from the feedback shift registers 110 and 120 by coefficients. The clock controller 160 outputs a bit string to the feedback calculators 130, 140, and 150 in synchronization with the clock.

図2に示すような初期化処理部100には、初期化処理部100の一部を構成するフィードバック演算器の入力ビット列と出力ビット列とを対応づけ、出力ビット列が異なるビット列となるよう長周期化する演算テーブルが動的に生成される。この演算テーブルの処理について、以下、説明する。   The initialization processing unit 100 as shown in FIG. 2 associates an input bit string and an output bit string of a feedback arithmetic unit that constitutes a part of the initialization processing unit 100 so that the output bit string becomes a different bit string. The operation table to be generated is dynamically generated. The processing of this calculation table will be described below.

いま、フィードバックシフトレジスタ110(LFSR−A)は、1レジスタあたり32bitの5つのレジスタから構成され、フィードバック関数f(x)は、数1とする。ここで、αは32bitから32bitへの変換を与える。 Now, the feedback shift register 110 (LFSR-A) is composed of five registers of 32 bits per register, and the feedback function f A (x) is expressed by Equation 1. Here, α 0 gives a conversion from 32 bits to 32 bits.

Figure 2015114434
Figure 2015114434

時刻t≧0のときのフィードバックシフトレジスタ110(LFSR−A)の値を、数2とすると、At+5はフィードバック関数より数3で与えられる。 Assuming that the value of the feedback shift register 110 (LFSR-A) at time t ≧ 0 is Equation 2, At + 5 is given by Equation 3 from the feedback function.

Figure 2015114434
Figure 2015114434

Figure 2015114434
Figure 2015114434

αは、GF(232)の元で、数4の根とする。但し、βは、原始多項式数5の根である。 α 0 is an element of GF (2 32 ) and is a root of Equation 4. Where β is the root of the primitive polynomial number 5.

Figure 2015114434
Figure 2015114434

Figure 2015114434
Figure 2015114434

したがって、α変換は、GF(232)内の乗算で表される。
つまり、数6の関係となる。
Therefore, the α 0 transformation is represented by multiplication in GF (2 32 ).
That is, the relationship of Equation 6 is established.

Figure 2015114434
Figure 2015114434

ここで、Aを数7としたとき、αを用いて、Aは、数8で表される。 Here, when the number 7 A, using alpha 0, A is represented by the number 8.

Figure 2015114434
Figure 2015114434

Figure 2015114434
Figure 2015114434

したがって、α・Aは、数9のように表され、ベクトル表記を用いると、数10のように表される。 Therefore, α 0 · A is expressed as shown in Equation 9, and is expressed as shown in Equation 10 using vector notation.

Figure 2015114434
Figure 2015114434

Figure 2015114434
Figure 2015114434

ここで、a→(aβ24、aβ、aβ12、aβ71)変換をテーブル化すると数11のようになる。 Here, when the a 3 → (a 3 β 24 , a 3 β 3 , a 3 β 12 , a 3 β 71 ) conversion is tabulated, the following formula 11 is obtained.

Figure 2015114434
Figure 2015114434

このテーブルを用いると、α変換は次の数12のように計算できる。 Using this table, the α 0 transformation can be calculated as in the following equation ( 12).

Figure 2015114434
Figure 2015114434

このテーブルk2_alpha0_mulを実行時に動的に生成する。具体的には、その前のステップ、a→(aβ24、aβ、aβ12、aβ71)をすべてのaに対して、実行時に計算することで、テーブルを生成する。なお、フィードバックシフトレジスタ120(LFSR−B)についても同様の処理となる。 This table k2_alpha0_mul is dynamically generated at the time of execution. Specifically, by calculating the previous step, a 3 → (a 3 β 24 , a 3 β 3 , a 3 β 12 , a 3 β 71 ) for all a 3 at runtime, Generate a table. The same processing is performed for the feedback shift register 120 (LFSR-B).

<ストリーム暗号の暗号化装置の処理>
図3を用いて、本発明の実施形態に係るストリーム暗号の暗号化装置の処理について説明する。
<Processing of encryption device for stream cipher>
The processing of the stream cipher encryption apparatus according to the embodiment of the present invention will be described with reference to FIG.

まず、初期鍵と初期ベクトルを入力し、内部状態を更新して、鍵系列(乱数)を生成し(ステップS110)、生成した鍵系列と鍵系列のデータサイズに応じて分割した平文との排他的論理和演算を行なって、暗号文を出力する(ステップS120)。   First, an initial key and an initial vector are input, the internal state is updated, a key sequence (random number) is generated (step S110), and the generated key sequence and the plaintext divided according to the data size of the key sequence are excluded. A logical OR operation is performed to output a ciphertext (step S120).

次に、出力された暗号文を入力し、入力した暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択し(ステップS130)、複数のレジスタで構成されたメッセージ認証用レジスタにおいて、入力した内部状態に応じて、各レジスタの格納データの更新処理を、選択関数器300からの出力がなくなるまで実行する(ステップS140)。   Next, the output ciphertext is input, and according to the input ciphertext, one internal state is selected from the internal states stored in the plurality of registers (step S130), and the plurality of registers are configured. In the message authentication register, the process of updating the data stored in each register is executed according to the input internal state until there is no output from the selection function device 300 (step S140).

そして、所定の固定ビットデータ列を入力して更新処理を実行し(ステップS150)、メッセージ認証用レジスタからメッセージ認証子を出力する(ステップS160)。そして、このメッセージ認証子と暗号文とを結合して最終の出力とする(ステップS170)。   Then, a predetermined fixed bit data string is input and update processing is executed (step S150), and a message authenticator is output from the message authentication register (step S160). Then, the message authenticator and the ciphertext are combined to obtain a final output (step S170).

以上、説明したように、本実施形態によれば、ストリーム暗号処理部の構成を変更することなく、メッセージ認証を付与することができる。   As described above, according to the present embodiment, message authentication can be given without changing the configuration of the stream encryption processing unit.

<ストリーム暗号の復号化装置の構成>
図4に示すように、本実施形態に係るストリーム暗号の復号化装置は、初期化処理部100と、排他的論理和演算器210と、選択関数器300と、メッセージ認証子用レジスタ400と、更新部500と、出力制御部600と、分離部700と、格納部800と、照合部900とから構成されている。なお、ストリーム暗号の暗号化装置と同一の符号を付す構成要素については、同様の機能を有することから、その詳細な説明は、省略する。
<Configuration of Decryption Device for Stream Cipher>
As shown in FIG. 4, the stream cipher decryption apparatus according to the present embodiment includes an initialization processing unit 100, an exclusive OR calculator 210, a selection function unit 300, a message authenticator register 400, The update unit 500, the output control unit 600, the separation unit 700, the storage unit 800, and the collation unit 900 are configured. In addition, since the component which attaches | subjects the code | symbol same as the encryption apparatus of a stream cipher has the same function, the detailed description is abbreviate | omitted.

分離部700は、メッセージ認証子付き暗号文を暗号文とメッセージ認証子に分離する。排他的論理和演算器210は、初期化処理部100が生成した鍵系列と分離部700が分離した暗号文とを鍵系列のデータサイズに応じて分割した暗号文との排他的論理和演算を行なって、平文を出力する。格納部800は、分離部700が分離したメッセージ認証子を格納する。照合部900は、格納部800に格納されたメッセージ認証子とメッセージ認証子用レジスタ400から出力されたメッセージ認証子とを照合する。   The separating unit 700 separates the ciphertext with a message authenticator into a ciphertext and a message authenticator. The exclusive OR calculator 210 performs an exclusive OR operation on the ciphertext obtained by dividing the key sequence generated by the initialization processing unit 100 and the ciphertext separated by the separation unit 700 according to the data size of the key sequence. Line and output plaintext. The storage unit 800 stores the message authenticator separated by the separation unit 700. The collation unit 900 collates the message authenticator stored in the storage unit 800 with the message authenticator output from the message authenticator register 400.

<ストリーム暗号の復号化装置の処理>
図5を用いて、本発明の実施形態に係るストリーム暗号の復号化装置の処理について説明する。
<Processing of Decryption Device for Stream Cipher>
The processing of the stream cipher decryption apparatus according to the embodiment of the present invention will be described with reference to FIG.

まず、メッセージ認証子付き暗号文を暗号文とメッセージ認証子に分離し(ステップS210)、分離したメッセージ認証子を格納する(ステップS220)。   First, the ciphertext with a message authenticator is separated into a ciphertext and a message authenticator (step S210), and the separated message authenticator is stored (step S220).

次いで、初期鍵と初期ベクトルを入力し、内部状態を更新して、鍵系列(乱数)を生成し(ステップS230)、生成した鍵系列と分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文との排他的論理和演算を行なって、平文を出力する(ステップS240)。   Next, the initial key and the initial vector are input, the internal state is updated, a key sequence (random number) is generated (step S230), and the ciphertext separated from the generated key sequence is divided according to the data size of the key sequence An exclusive OR operation with the ciphertext is performed, and a plaintext is output (step S240).

さらに、分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文を入力し、入力した暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択し(ステップS250)、複数のレジスタで構成されたメッセージ認証用レジスタにおいて、入力した内部状態に応じて、各レジスタの格納データの更新処理を、選択関数器300からの出力がなくなるまで実行(ステップS260)した後、所定の固定ビットデータ列を入力して、同様に、更新処理を実行する(ステップS270)。   Further, the ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence is input, and one internal state is selected from the internal states stored in a plurality of registers according to the input ciphertext ( In step S250), in the message authentication register composed of a plurality of registers, the update processing of the data stored in each register is executed according to the input internal state until there is no output from the selection function unit 300 (step S260). After that, a predetermined fixed bit data string is input and the update process is executed similarly (step S270).

そして、メッセージ認証用レジスタからメッセージ認証子を出力し(ステップS280)、出力されたメッセージ認証子と格納されたメッセージ認証子とを照合する(ステップS290)。   Then, the message authentication code is output from the message authentication register (step S280), and the output message authentication code is compared with the stored message authentication code (step S290).

以上、説明したように、本実施形態によれば、ストリーム暗号処理部の構成を変更することなく、簡易に、メッセージ認証を実行することができる。   As described above, according to the present embodiment, message authentication can be easily executed without changing the configuration of the stream encryption processing unit.

なお、ストリーム暗号の暗号化装置およびストリーム暗号の復号化装置の処理をコンピュータシステムが読み取り可能な記録媒体に記録し、この記録媒体に記録されたプログラムを情報収集システムに読み込ませ、実行することによって本発明のストリーム暗号の暗号化装置およびストリーム暗号の復号化装置を実現することができる。ここでいうコンピュータシステムとは、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 read into the information collecting system and executed. The stream cipher encryption apparatus and stream cipher decryption apparatus of the present invention can be realized. 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, 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.

100;初期化処理部
110;フィードバックシフトレジスタ
120;フィードバックシフトレジスタ
130;フィードバック演算器
140;フィードバック演算器
150;フィードバック演算器
160;クロックコントローラ
200;排他的論理和演算器
210;排他的論理和演算器
300;選択関数器
400;メッセージ認証子用レジスタ
500;更新部
600;出力制御部
650;出力部
700;分離部
800;格納部
900;照合部
DESCRIPTION OF SYMBOLS 100; Initialization processing part 110; Feedback shift register 120; Feedback shift register 130; Feedback calculator 140; Feedback calculator 150; Feedback calculator 160; Clock controller 200; Exclusive OR operator 210; Exclusive OR operation Unit 300; selection function unit 400; message authenticator register 500; update unit 600; output control unit 650; output unit 700; separation unit 800; storage unit 900;

Claims (10)

初期鍵と初期ベクトルを入力し、内部状態を更新して、生成した鍵系列(乱数)を生成する初期化処理手段と、
該生成した鍵系列と鍵系列のデータサイズに応じて分割した平文との排他的論理和演算を行なって、暗号文を出力する排他的論理和演算器と、
該出力された暗号文を入力し、入力した暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択する選択関数器と、
複数のレジスタで構成され、該選択した内部状態を格納するメッセージ認証用レジスタと、
前記メッセージ認証用レジスタにおいて、前記入力した内部状態に応じて、各レジスタの格納データの更新を前記選択関数器からの出力がなくなるまで実行し、その後、所定の固定ビットデータ列を入力して、さらに、前記各レジスタの格納データの更新を実行する更新手段と、
該更新手段の処理終了後に、前記メッセージ認証用レジスタに格納されているデータをメッセージ認証子として出力させる出力制御手段と、
該出力されたメッセージ認証子と前記排他的論理和演算器が出力する暗号文とを結合してメッセージ認証子付き暗号文を出力する出力手段と、
を備えたことを特徴とするストリーム暗号の暗号化装置。
An initialization processing means for inputting an initial key and an initial vector, updating an internal state, and generating a generated key sequence (random number);
An exclusive OR operation unit that performs an exclusive OR operation between the generated key sequence and the plaintext divided according to the data size of the key sequence, and outputs a ciphertext;
A selection function unit that inputs the output ciphertext and selects one internal state from the internal states stored in a plurality of registers according to the input ciphertext;
A message authentication register configured by a plurality of registers and storing the selected internal state;
In the message authentication register, according to the input internal state, update the stored data of each register until there is no output from the selection function unit, and then input a predetermined fixed bit data string, Update means for updating the data stored in each register;
Output control means for outputting the data stored in the message authentication register as a message authenticator after the processing of the updating means is completed;
Output means for combining the output message authenticator and the ciphertext output by the exclusive OR calculator to output a ciphertext with a message authenticator;
A stream cipher encryption apparatus comprising:
前記選択関数器は、前記入力した暗号文(数値データ)に対して、modn(n;正の整数からなる定数)の演算処理を行い、その剰余をインデックスとして、前記複数のレジスタ内に格納された内部状態のうち、該インデックスに対応するレジスタの内部状態を選択することを特徴とする請求項1に記載のストリーム暗号の暗号化装置。   The selection function unit performs a modn (n: constant consisting of a positive integer) operation on the input ciphertext (numerical data) and stores the remainder as an index in the plurality of registers. 2. The stream cipher encryption apparatus according to claim 1, wherein an internal state of a register corresponding to the index is selected from the internal states. 前記初期化処理手段が、フィードバックシフトレジスタとフィードバック演算器とから構成され、前記フィードバック演算器の入力ビット列と出力ビット列とを対応づけ、前記出力ビット列が異なるビット列となるよう長周期化する第1の演算テーブルを動的に生成する第1の演算テーブル生成手段を備え、該生成した前記第1の演算テーブルを用いて、初期化処理を行うことを特徴とする請求項1または請求項2に記載のストリーム暗号の暗号化装置。   The initialization processing means includes a feedback shift register and a feedback arithmetic unit, associates an input bit string and an output bit string of the feedback arithmetic unit, and makes a long period so that the output bit string becomes a different bit string. The first calculation table generation unit that dynamically generates a calculation table is provided, and initialization processing is performed using the generated first calculation table. Stream cipher encryption device. 請求項1または請求項2に記載のストリーム暗号の暗号化装置により生成されるメッセージ認証子付き暗号文を復号するストリーム暗号の復号化装置であって、
前記メッセージ認証子付き暗号文を暗号文とメッセージ認証子に分離する分離手段と、
該分離したメッセージ認証子を格納する格納手段と、
初期値と初期ベクトルを入力し、内部状態を更新して、生成した鍵系列(乱数)を生成する初期処理手段と、
該生成した鍵系列と前記分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文との排他的論理和演算を行なって、平文を出力する排他的論理和演算器と、
該分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文を入力し、入力した暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択する選択関数器と、
複数のレジスタで構成され、該選択した内部状態を格納するメッセージ認証用レジスタと、
前記メッセージ認証用レジスタにおいて、前記入力した内部状態に応じて、各レジスタの格納データの更新を前記選択関数器からの出力がなくなるまで実行し、その後、所定の固定ビットデータ列を入力して、さらに、前記各レジスタの格納データの更新を実行する更新手段と、
該更新手段の処理終了後に、前記メッセージ認証用レジスタに格納されているデータをメッセージ認証子として出力させる出力制御手段と、
前記格納手段に格納されたメッセージ認証子と前記出力されたメッセージ認証子とを照合する照合手段と、
を備えたことを特徴とするストリーム暗号の復号化装置。
A stream cipher decrypting device for decrypting a ciphertext with a message authenticator generated by the stream cipher encrypting device according to claim 1,
Separating means for separating the ciphertext with the message authenticator into a ciphertext and a message authenticator;
Storage means for storing the separated message authenticator;
An initial processing means for inputting an initial value and an initial vector, updating an internal state, and generating a generated key sequence (random number);
Performing an exclusive OR operation on the generated key sequence and the ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence, and outputting a plaintext;
A selection function that inputs a ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence and selects one internal state from the internal states stored in a plurality of registers according to the input ciphertext And
A message authentication register configured by a plurality of registers and storing the selected internal state;
In the message authentication register, according to the input internal state, update the stored data of each register until there is no output from the selection function unit, and then input a predetermined fixed bit data string, Update means for updating the data stored in each register;
Output control means for outputting the data stored in the message authentication register as a message authenticator after the processing of the updating means is completed;
Collation means for collating the message authenticator stored in the storage means with the output message authenticator;
An apparatus for decrypting a stream cipher, comprising:
前記選択関数器は、前記入力した暗号文(数値データ)に対して、modn(n;正の整数からなる定数)の演算処理を行い、その剰余をインデックスとして、前記複数のレジスタ内に格納された内部状態のうち、該インデックスに対応するレジスタの内部状態を選択することを特徴とする請求項4に記載のストリーム暗号の復号化装置。   The selection function unit performs a modn (n: constant consisting of a positive integer) operation on the input ciphertext (numerical data) and stores the remainder as an index in the plurality of registers. 5. The apparatus for decrypting a stream cipher according to claim 4, wherein an internal state of a register corresponding to the index is selected from the internal states. 前記初期化処理手段が、フィードバックシフトレジスタとフィードバック演算器とから構成され、前記フィードバック演算器の入力ビット列と出力ビット列とを対応づけ、前記出力ビット列が異なるビット列となるよう長周期化する第1の演算テーブルを動的に生成する第1の演算テーブル生成手段を備え、該生成した前記第1の演算テーブルを用いて、初期化処理を行うことを特徴とする請求項4または請求項5に記載のストリーム暗号の復号化装置。   The initialization processing means includes a feedback shift register and a feedback arithmetic unit, associates an input bit string and an output bit string of the feedback arithmetic unit, and makes a long period so that the output bit string becomes a different bit string. 6. The method according to claim 4, further comprising first calculation table generation means for dynamically generating a calculation table, wherein initialization processing is performed using the generated first calculation table. Stream cipher decryption device. コンピュータが、
初期鍵と初期ベクトルを入力し、内部状態を更新して、鍵系列(乱数)を生成する第1のステップと、
該生成した鍵系列と鍵系列のデータサイズに応じて分割した平文との排他的論理和演算を行なって、暗号文を出力する第2のステップと、
該出力された暗号文を入力し、入力した暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択する第3のステップと、
複数のレジスタで構成されたメッセージ認証用レジスタにおいて、前記入力した内部状態に応じて、各レジスタの格納データの更新処理を、前記第3のステップからの出力がなくなるまで実行する第4のステップと、
所定の固定ビットデータ列を入力して前記更新処理を実行する第5のステップと、
前記メッセージ認証用レジスタからメッセージ認証子を出力する第6のステップと、
前記第6のステップで出力されるメッセージ認証子と前記第2のステップで出力される暗号文とを結合して出力する第7のステップと、
を実行することを特徴とするストリーム暗号の暗号化方法。
Computer
A first step of inputting an initial key and an initial vector, updating an internal state, and generating a key sequence (random number);
A second step of performing an exclusive OR operation between the generated key sequence and the plaintext divided according to the data size of the key sequence, and outputting a ciphertext;
A third step of inputting the output ciphertext and selecting one internal state from the internal states stored in a plurality of registers according to the input ciphertext;
In a message authentication register composed of a plurality of registers, a fourth step of executing update processing of stored data in each register in accordance with the input internal state until there is no output from the third step; ,
A fifth step of inputting a predetermined fixed bit data string and executing the updating process;
A sixth step of outputting a message authenticator from the message authentication register;
A seventh step of combining and outputting the message authenticator output in the sixth step and the ciphertext output in the second step;
A stream cipher encryption method characterized by executing
請求項7に記載のストリーム暗号の暗号化方法により生成されるメッセージ認証子付き暗号文を復号するストリーム暗号の復号化方法であって、
コンピュータが、
前記メッセージ認証子付き暗号文を暗号文とメッセージ認証子に分離する第1のステップと、
該分離したメッセージ認証子を格納する第2のステップと、
初期鍵と初期ベクトルを入力し、内部状態を更新して、鍵系列(乱数)を生成する第3のステップと、
該生成した鍵系列と前記分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文との排他的論理和演算を行なって、平文を出力する第4のステップと、
前記分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文を入力し、入力した該暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択する第5のステップと、
複数のレジスタで構成されたメッセージ認証用レジスタにおいて、前記入力した内部状態に応じて、各レジスタの格納データの更新処理を、前記第5のステップからの出力がなくなるまで実行する第6のステップと、
所定の固定ビットデータ列を入力して前記更新処理を実行する第7のステップと、
前記メッセージ認証用レジスタからメッセージ認証子を出力する第8のステップと、
該出力されたメッセージ認証子と前記格納されたメッセージ認証子とを照合する第9のステップと、
を実行することを特徴とするストリーム暗号の復号化方法。
A stream cipher decryption method for decrypting a ciphertext with a message authenticator generated by the stream cipher encryption method according to claim 7,
Computer
A first step of separating the ciphertext with the message authenticator into a ciphertext and a message authenticator;
A second step of storing the separated message authenticator;
A third step of inputting an initial key and an initial vector, updating an internal state, and generating a key sequence (random number);
A fourth step of performing an exclusive OR operation on the generated key sequence and the ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence, and outputting plaintext;
A ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence is input, and one internal state is selected from internal states stored in a plurality of registers according to the input ciphertext. 5 steps,
In a message authentication register composed of a plurality of registers, a sixth step of executing update processing of stored data in each register until there is no output from the fifth step in accordance with the input internal state; ,
A seventh step of inputting the predetermined fixed bit data string and executing the updating process;
An eighth step of outputting a message authenticator from the message authentication register;
A ninth step of collating the output message authenticator with the stored message authenticator;
A method of decrypting a stream cipher, characterized in that:
コンピュータに、
初期鍵と初期ベクトルを入力し、内部状態を更新して、鍵系列(乱数)を生成する第1のステップと、
該生成した鍵系列と鍵系列のデータサイズに応じて分割した平文との排他的論理和演算を行なって、暗号文を出力する第2のステップと、
該出力された暗号文を入力し、入力した暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択する第3のステップと、
複数のレジスタで構成されたメッセージ認証用レジスタにおいて、前記入力した内部状態に応じて、各レジスタの格納データの更新処理を、前記第3のステップからの出力がなくなるまで実行する第4のステップと、
所定の固定ビットデータ列を入力して前記更新処理を実行する第5のステップと、
前記メッセージ認証用レジスタからメッセージ認証子を出力する第6のステップと、
前記第6のステップで出力されるメッセージ認証子と前記第2のステップで出力される暗号文とを結合して出力する第7のステップと、
を実行させるためのプログラム。
On the computer,
A first step of inputting an initial key and an initial vector, updating an internal state, and generating a key sequence (random number);
A second step of performing an exclusive OR operation between the generated key sequence and the plaintext divided according to the data size of the key sequence, and outputting a ciphertext;
A third step of inputting the output ciphertext and selecting one internal state from the internal states stored in a plurality of registers according to the input ciphertext;
In a message authentication register composed of a plurality of registers, a fourth step of executing update processing of stored data in each register in accordance with the input internal state until there is no output from the third step; ,
A fifth step of inputting a predetermined fixed bit data string and executing the updating process;
A sixth step of outputting a message authenticator from the message authentication register;
A seventh step of combining and outputting the message authenticator output in the sixth step and the ciphertext output in the second step;
A program for running
請求項7に記載のストリーム暗号の暗号化方法により生成されるメッセージ認証子付き暗号文を復号するストリーム暗号の復号化方法をコンピュータに実行させるためのプログラムであって、
コンピュータに、
前記メッセージ認証子付き暗号文を暗号文とメッセージ認証子に分離する第1のステップと、
該分離したメッセージ認証子を格納する第2のステップと、
初期鍵と初期ベクトルを入力し、内部状態を更新して、鍵系列(乱数)を生成する第3のステップと、
該生成した鍵系列と前記分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文との排他的論理和演算を行なって、平文を出力する第4のステップと、
前記分離した暗号文を鍵系列のデータサイズに応じて分割した暗号文を入力し、入力した該暗号文に応じて、複数のレジスタ内に格納された内部状態から1つの内部状態を選択する第5のステップと、
複数のレジスタで構成されたメッセージ認証用レジスタにおいて、前記入力した内部状態に応じて、各レジスタの格納データの更新処理を、前記第5のステップからの出力がなくなるまで実行する第6のステップと、
所定の固定ビットデータ列を入力して前記更新処理を実行する第7のステップと、
前記メッセージ認証用レジスタからメッセージ認証子を出力する第8のステップと、
該出力されたメッセージ認証子と前記格納されたメッセージ認証子とを照合する第9のステップと、
を実行させるためのプログラム。
A program for causing a computer to execute a stream cipher decryption method for decrypting a ciphertext with a message authenticator generated by the stream cipher encryption method according to claim 7,
On the computer,
A first step of separating the ciphertext with the message authenticator into a ciphertext and a message authenticator;
A second step of storing the separated message authenticator;
A third step of inputting an initial key and an initial vector, updating an internal state, and generating a key sequence (random number);
A fourth step of performing an exclusive OR operation on the generated key sequence and the ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence, and outputting plaintext;
A ciphertext obtained by dividing the separated ciphertext according to the data size of the key sequence is input, and one internal state is selected from internal states stored in a plurality of registers according to the input ciphertext. 5 steps,
In a message authentication register composed of a plurality of registers, a sixth step of executing update processing of stored data in each register until there is no output from the fifth step in accordance with the input internal state; ,
A seventh step of inputting the predetermined fixed bit data string and executing the updating process;
An eighth step of outputting a message authenticator from the message authentication register;
A ninth step of collating the output message authenticator with the stored message authenticator;
A program for running
JP2013255307A 2013-12-10 2013-12-10 Device for encrypting stream cipher, device for decrypting stream cipher, method for encrypting stream cipher, method for decrypting stream cipher, and program Pending JP2015114434A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013255307A JP2015114434A (en) 2013-12-10 2013-12-10 Device for encrypting stream cipher, device for decrypting stream cipher, method for encrypting stream cipher, method for decrypting stream cipher, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013255307A JP2015114434A (en) 2013-12-10 2013-12-10 Device for encrypting stream cipher, device for decrypting stream cipher, method for encrypting stream cipher, method for decrypting stream cipher, and program

Publications (1)

Publication Number Publication Date
JP2015114434A true JP2015114434A (en) 2015-06-22

Family

ID=53528295

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013255307A Pending JP2015114434A (en) 2013-12-10 2013-12-10 Device for encrypting stream cipher, device for decrypting stream cipher, method for encrypting stream cipher, method for decrypting stream cipher, and program

Country Status (1)

Country Link
JP (1) JP2015114434A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112235607A (en) * 2020-09-16 2021-01-15 浙江大华技术股份有限公司 Data security protection method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08505275A (en) * 1992-12-30 1996-06-04 テルストラ・コーポレイション・リミテッド Device and method for generating a cipher stream
WO2001052472A1 (en) * 2000-01-14 2001-07-19 Mitsubishi Denki Kabushiki Kaisha Method and apparatus for encryption, method and apparatus for decryption, and computer-readable medium storing program
JP2004226969A (en) * 2003-01-24 2004-08-12 Samsung Electronics Co Ltd Cryptographic system and method for supporting multiple modes
JP2012039180A (en) * 2010-08-03 2012-02-23 Kddi Corp Encryptor of stream encryption, decoder of stream encryption, encrypting method of stream encryption, decoding method of stream encryption, and program
JP2013179422A (en) * 2012-02-28 2013-09-09 Kddi Corp Encryption device of stream cipher, decryption device of stream cipher, encryption method of stream cipher, decryption method and program of stream cipher

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08505275A (en) * 1992-12-30 1996-06-04 テルストラ・コーポレイション・リミテッド Device and method for generating a cipher stream
WO2001052472A1 (en) * 2000-01-14 2001-07-19 Mitsubishi Denki Kabushiki Kaisha Method and apparatus for encryption, method and apparatus for decryption, and computer-readable medium storing program
JP2004226969A (en) * 2003-01-24 2004-08-12 Samsung Electronics Co Ltd Cryptographic system and method for supporting multiple modes
JP2012039180A (en) * 2010-08-03 2012-02-23 Kddi Corp Encryptor of stream encryption, decoder of stream encryption, encrypting method of stream encryption, decoding method of stream encryption, and program
JP2013179422A (en) * 2012-02-28 2013-09-09 Kddi Corp Encryption device of stream cipher, decryption device of stream cipher, encryption method of stream cipher, decryption method and program of stream cipher

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112235607A (en) * 2020-09-16 2021-01-15 浙江大华技术股份有限公司 Data security protection method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US11159305B2 (en) Homomorphic data decryption method and apparatus for implementing privacy protection
WO2020253234A1 (en) Data homomorphic encryption and decryption method and apparatus for implementing privacy protection
JP6244429B2 (en) Stream cipher encryption apparatus, stream cipher decryption apparatus, stream cipher encryption method, stream cipher decryption method, and program
JP4728657B2 (en) Stream cipher design using rotation buffer
EP2962185B1 (en) Random number generator and stream cipher
Rahimunnisa et al. FPGA implementation of AES algorithm for high throughput using folded parallel architecture
JP2003015522A (en) Ciphering circuit
EP3716524A2 (en) Ultra-low latency advanced encryption standard
Seo et al. Optimized implementation of SIKE round 2 on 64-bit ARM Cortex-A processors
JP2002229445A (en) Modulator exponent device
US11522669B2 (en) Using cryptographic blinding for efficient use of Montgomery multiplication
CN116366248B (en) Kyber implementation method and system based on compact instruction set expansion
JP2015114434A (en) Device for encrypting stream cipher, device for decrypting stream cipher, method for encrypting stream cipher, method for decrypting stream cipher, and program
JP5102536B2 (en) Stream cipher encryption apparatus, decryption apparatus, encryption method, decryption method, and program
JP2012068436A (en) Hash value arithmetic device, hash value arithmetic method and hash value arithmetic program
CN110071927B (en) Information encryption method, system and related components
JP5822757B2 (en) Stream cipher encryption apparatus, stream cipher decryption apparatus, stream cipher encryption method, stream cipher decryption method, and program
Oder Efficient and side-channel resistant implementation of lattice-based cryptography
Bhattacharjee et al. Efficient hardware accelerator for AEGIS-128 authenticated encryption
CN116055039B (en) Random number generation method and device based on block cipher algorithm
KR102282363B1 (en) Bit-serial hight operation apparatus and its method, computer-readable recording medium and computer program having program language for the same
KR102498133B1 (en) Apparatus for processing modular multiply operation and methods thereof
WO2021131667A1 (en) Secret calculation device, secret calculation method, and program
JP2011130312A (en) Ciphering device and deciphering device for stream cipher, ciphering method and deciphering method for stream cipher, and program
JP2008040244A (en) Aes encryption circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160727

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170524

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170606

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20180104