JP6287785B2 - Cryptographic processing apparatus, cryptographic processing method, and program - Google Patents

Cryptographic processing apparatus, cryptographic processing method, and program Download PDF

Info

Publication number
JP6287785B2
JP6287785B2 JP2014242332A JP2014242332A JP6287785B2 JP 6287785 B2 JP6287785 B2 JP 6287785B2 JP 2014242332 A JP2014242332 A JP 2014242332A JP 2014242332 A JP2014242332 A JP 2014242332A JP 6287785 B2 JP6287785 B2 JP 6287785B2
Authority
JP
Japan
Prior art keywords
key
data
lfsr
random number
stream
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.)
Active
Application number
JP2014242332A
Other languages
Japanese (ja)
Other versions
JP2016103799A (en
Inventor
香士 渋谷
香士 渋谷
孝典 五十部
孝典 五十部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2014242332A priority Critical patent/JP6287785B2/en
Publication of JP2016103799A publication Critical patent/JP2016103799A/en
Application granted granted Critical
Publication of JP6287785B2 publication Critical patent/JP6287785B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本開示は、暗号処理装置、および暗号処理方法、並びにプログラムに関する。さらに詳細には、共通鍵暗号の1つであるストリーム暗号を実行する暗号処理装置、および暗号処理方法、並びにプログラムに関する。   The present disclosure relates to a cryptographic processing device, a cryptographic processing method, and a program. More specifically, the present invention relates to a cryptographic processing apparatus, a cryptographic processing method, and a program that execute stream cipher that is one of common key ciphers.

情報化社会が発展すると共に、扱う情報を安全に守るための情報セキュリティ技術の重要性が増してきている。情報セキュリティ技術の構成要素の一つとして暗号技術があり、現在では様々な製品やシステムで暗号技術が利用されている。   With the development of the information society, the importance of information security technology for safeguarding the information handled is increasing. One of the components of information security technology is encryption technology, which is currently used in various products and systems.

暗号処理アルゴリズムには様々なものがあるが、基本的な技術の一つとして、共通鍵暗号がある。共通鍵暗号では、暗号化用の鍵と復号用の鍵が共通のものとなっている。暗号化処理、復号処理共に、その共通鍵から複数の鍵を生成し、例えばあるブロック単位、例えば64ビット、128ビット、256ビット等のブロックデータ単位でデータ変換処理を繰り返し実行する。   There are various cryptographic processing algorithms. One of the basic techniques is common key cryptography. In common key cryptography, an encryption key and a decryption key are common. In both the encryption process and the decryption process, a plurality of keys are generated from the common key, and the data conversion process is repeatedly executed in a certain block unit, for example, a block data unit such as 64 bits, 128 bits, 256 bits or the like.

共通鍵暗号のアルゴリズムとしては、過去の米国標準であるDES(Data Encryption Standard)や現在の米国標準であるAES(Advanced Encryption Standard)が知られている。他にも様々な共通鍵暗号が現在も提案され続けており、2007年にソニー株式会社が提案したCLEFIAも共通鍵暗号の一つである。   Known common key encryption algorithms include DES (Data Encryption Standard), which is a past US standard, and AES (Advanced Encryption Standard), which is a current US standard. Various other common key ciphers continue to be proposed, and CLEFIA proposed by Sony Corporation in 2007 is one of the common key ciphers.

なお、共通鍵暗号について開示した従来技術として、例えば特許文献1(特開2012−215813号公報)等がある。   In addition, as a prior art disclosed about a common key encryption, there exist patent document 1 (Unexamined-Japanese-Patent No. 2012-215813) etc., for example.

さらに、共通鍵暗号の一形態としてストリーム暗号がある。ストリーム暗号による暗号文生成処理は、以下のステップ(S1),(S2)を実行することで行われる。
(S1)秘密のパラメータである秘密鍵と、公開パラメータである初期ベクトル(IV:Initial Vector)から、キーストリームと呼ばれる擬似乱数系列を生成する。
(S2)平文と、生成したキーストリームの排他的論理和をとることにより、暗号文を生成する。
Furthermore, there is a stream cipher as one form of the common key cipher. The ciphertext generation process using the stream cipher is performed by executing the following steps (S1) and (S2).
(S1) A pseudo-random number sequence called a key stream is generated from a secret key that is a secret parameter and an initial vector (IV) that is a public parameter.
(S2) The ciphertext is generated by taking the exclusive OR of the plaintext and the generated key stream.

暗号文から平文を生成する処理は、以下のステップ(S3)、(S4)を実行する。
(S3)秘密のパラメータである秘密鍵と、公開パラメータである初期ベクトル(IV:Initial Vector)から、キーストリーム(擬似乱数系列)を生成する。
(S4)暗号文と、生成したキーストリームの排他的論理和をとることにより、平文を生成する。
The process of generating plaintext from ciphertext executes the following steps (S3) and (S4).
(S3) A key stream (pseudo-random number sequence) is generated from a secret key that is a secret parameter and an initial vector (IV) that is a public parameter.
(S4) A plaintext is generated by taking an exclusive OR of the ciphertext and the generated key stream.

平文生成処理において、ステップ(S4)で実行する排他的論理和の性質上、暗号文生成時に利用したキーストリームと同じキーストリームを用いて、暗号文の排他的論理和をとることにより平文を得ることができる。
つまり、共通の秘密情報である「秘密鍵」を送信者と受信者で安全に共有することにより、暗号化および復号処理が可能となる。
In the plaintext generation process, the plaintext is obtained by taking the exclusive OR of the ciphertext using the same keystream as the keystream used at the time of ciphertext generation due to the nature of the exclusive OR executed in step (S4). be able to.
That is, encryption and decryption processing can be performed by securely sharing a “secret key” that is common secret information between the sender and the receiver.

このストリーム暗号では、秘密鍵と、初期ベクトル(IV)から生成するキーストリームが必須要素となるが、このキーストリームを構成するビット値の偏りを利用した様々な攻撃が存在し、安全性に問題があるとの指摘がある。   In this stream cipher, the secret key and the key stream generated from the initial vector (IV) are indispensable elements. However, there are various attacks using the bias of the bit values constituting this key stream, and there is a problem with security. There is an indication that there is.

特開2012−215813号公報JP 2012-215813 A

本開示は、例えば上述の状況に鑑みてなされたものであり、安全性の高いストリーム暗号を実現する暗号処理装置、および暗号処理方法、並びにプログラムを提供することを目的とする。   The present disclosure has been made in view of, for example, the above-described situation, and an object thereof is to provide a cryptographic processing device, a cryptographic processing method, and a program that realize a highly secure stream cipher.

本開示の第1の側面は、
暗号鍵データからなるデータストリームであるキーストリームを生成するキーストリーム生成部と、
前記キーストリームを構成する暗号鍵データと、暗号処理対象データとの演算処理を実行する演算部を有し、
前記キーストリーム生成部は、
第1の秘密鍵に基づいて擬似乱数を生成する擬似乱数生成部と、
第2の秘密鍵に基づいてLFSR出力データを生成する線形フィードバックレジスタ(LFSR)と、
前記擬似乱数生成部の生成した疑似乱数と、前記LFSR出力データとの排他的論理和演算処理を実行する排他的論理和演算部を有し、
前記排他的論理和演算部の出力をキーストリームとして出力する暗号処理装置にある。
The first aspect of the present disclosure is:
A key stream generation unit that generates a key stream that is a data stream composed of encryption key data;
An operation unit that performs operation processing of encryption key data constituting the key stream and encryption processing target data;
The key stream generation unit
A pseudo-random number generator that generates a pseudo-random number based on the first secret key;
A linear feedback register (LFSR) that generates LFSR output data based on a second secret key;
An exclusive OR operation unit that executes an exclusive OR operation process between the pseudo random number generated by the pseudo random number generator and the LFSR output data;
The encryption processing apparatus outputs the output of the exclusive OR operation unit as a key stream.

さらに、本開示の第2の側面は、
復号鍵データからなるデータストリームであるキーストリームを生成するキーストリーム生成部と、
前記キーストリームを構成する復号鍵データと、復号処理対象データとの演算処理を実行する演算部を有し、
前記キーストリーム生成部は、
第1の秘密鍵に基づいて擬似乱数を生成する擬似乱数生成部と、
第2の秘密鍵に基づいてLFSR出力データを生成する線形フィードバックレジスタ(LFSR)と、
前記擬似乱数生成部の生成した疑似乱数と、前記LFSR出力データとの排他的論理和演算処理を実行する排他的論理和演算部を有し、
前記排他的論理和演算部の出力をキーストリームとして出力する復号処理装置にある。
Furthermore, the second aspect of the present disclosure is:
A key stream generation unit that generates a key stream that is a data stream composed of decryption key data;
An operation unit that performs an operation process between the decryption key data constituting the key stream and the decryption target data;
The key stream generation unit
A pseudo-random number generator that generates a pseudo-random number based on the first secret key;
A linear feedback register (LFSR) that generates LFSR output data based on a second secret key;
An exclusive OR operation unit that executes an exclusive OR operation process between the pseudo random number generated by the pseudo random number generator and the LFSR output data;
The decryption processing apparatus outputs the output of the exclusive OR operation unit as a key stream.

さらに、本開示の第3の側面は、
暗号処理装置において実行する暗号処理方法であり、
キーストリーム生成部が、暗号鍵データからなるデータストリームであるキーストリームを生成するキーストリーム生成ステップと、
演算部が、前記キーストリームを構成する暗号鍵データと、暗号処理対象データとの演算処理を実行する演算ステップを実行し、
前記キーストリーム生成ステップは、
擬似乱数生成部が、第1の秘密鍵に基づいて擬似乱数を生成する擬似乱数生成ステップと、
線形フィードバックレジスタ(LFSR)が、第2の秘密鍵に基づいてLFSR出力データを生成するLFSR出力データ生成ステップと、
排他的論理和演算部が、前記擬似乱数生成部の生成した疑似乱数と、前記LFSR出力データとの排他的論理和演算処理を実行する排他的論理和演算ステップを有し、
前記排他的論理和演算部の出力をキーストリームとして出力する暗号処理方法にある。
Furthermore, the third aspect of the present disclosure is:
A cryptographic processing method executed in the cryptographic processing device,
A key stream generation step in which a key stream generation unit generates a key stream that is a data stream composed of encryption key data; and
The calculation unit executes a calculation step of performing calculation processing of encryption key data constituting the key stream and encryption processing target data,
The key stream generation step includes:
A pseudo-random number generating unit that generates a pseudo-random number based on the first secret key;
An LFSR output data generation step, wherein a linear feedback register (LFSR) generates LFSR output data based on the second secret key;
An exclusive OR operation unit has an exclusive OR operation step of performing an exclusive OR operation process between the pseudo random number generated by the pseudo random number generator and the LFSR output data;
The encryption processing method outputs the output of the exclusive OR operation unit as a key stream.

さらに、本開示の第4の側面は、
暗号処理装置において暗号処理を実行させるプログラムであり、
キーストリーム生成部に、暗号鍵データからなるデータストリームであるキーストリームを生成させるキーストリーム生成ステップと、
演算部に、前記キーストリームを構成する暗号鍵データと、暗号処理対象データとの演算処理を実行させる演算ステップを実行させ、
前記プログラムは、前記キーストリーム生成ステップにおいて、
擬似乱数生成部に、第1の秘密鍵に基づいて擬似乱数を生成させる擬似乱数生成ステップと、
線形フィードバックレジスタ(LFSR)に、第2の秘密鍵に基づいてLFSR出力データを生成させるLFSR出力データ生成ステップと、
排他的論理和演算部に、前記擬似乱数生成部の生成した疑似乱数と、前記LFSR出力データとの排他的論理和演算処理を実行させる排他的論理和演算ステップを実行させ、
前記排他的論理和演算部の出力をキーストリームとして出力させるプログラムにある。
Furthermore, the fourth aspect of the present disclosure is:
A program for executing cryptographic processing in the cryptographic processing device,
A key stream generation step for causing the key stream generation unit to generate a key stream that is a data stream composed of encryption key data; and
Causing the calculation unit to execute a calculation step of executing calculation processing of the encryption key data constituting the key stream and the encryption processing target data;
In the key stream generation step, the program includes:
A pseudo-random number generation step for causing the pseudo-random number generator to generate a pseudo-random number based on the first secret key;
An LFSR output data generating step for causing a linear feedback register (LFSR) to generate LFSR output data based on the second secret key;
Causing the exclusive OR operation unit to execute an exclusive OR operation step of executing an exclusive OR operation of the pseudo random number generated by the pseudo random number generation unit and the LFSR output data;
In the program for outputting the output of the exclusive OR operation section as a key stream.

なお、本開示のプログラムは、例えば、様々なプログラム・コードを実行可能な情報処理装置やコンピュータ・システムに対して例えば記憶媒体によって提供されるプログラムである。このようなプログラムを情報処理装置やコンピュータ・システム上のプログラム実行部で実行することでプログラムに応じた処理が実現される。   Note that the program of the present disclosure is a program provided by, for example, a storage medium to an information processing apparatus or a computer system that can execute various program codes. By executing such a program by the program execution unit on the information processing apparatus or the computer system, processing according to the program is realized.

本開示のさらに他の目的、特徴や利点は、後述する本発明の実施例や添付する図面に基づくより詳細な説明によって明らかになるであろう。なお、本明細書においてシステムとは、複数の装置の論理的集合構成であり、各構成の装置が同一筐体内にあるものには限らない。   Other objects, features, and advantages of the present disclosure will become apparent from a more detailed description based on embodiments of the present invention described later and the accompanying drawings. In this specification, the system is a logical set configuration of a plurality of devices, and is not limited to one in which the devices of each configuration are in the same casing.

本開示の一実施例によれば、本開示の一実施例の構成によれば、安全性を向上させたストリーム暗号を実行する装置、方法が実現される。
具体的には、暗号鍵データからなるデータストリームであるキーストリームを生成するキーストリーム生成部と、キーストリームを構成する暗号鍵データと、暗号処理対象データとの演算処理を実行する演算部を有し、キーストリーム生成部は、第1の秘密鍵に基づいて擬似乱数を生成する擬似乱数生成部と、第2の秘密鍵に基づいてLFSR出力データを生成する線形フィードバックレジスタ(LFSR)と、擬似乱数生成部の生成した疑似乱数と、LFSR出力データとの排他的論理和演算処理を実行する排他的論理和演算部を有し、排他的論理和演算部の出力をキーストリームとして出力する。
本構成により、安全性を向上させたストリーム暗号を実行する装置、方法が実現される。
なお、本明細書に記載された効果はあくまで例示であって限定されるものではなく、また付加的な効果があってもよい。
According to an embodiment of the present disclosure, according to the configuration of the embodiment of the present disclosure, an apparatus and a method for executing stream cipher with improved security are realized.
Specifically, it has a key stream generation unit that generates a key stream that is a data stream composed of encryption key data, and an operation unit that performs an operation process on the encryption key data constituting the key stream and the data to be encrypted. The key stream generation unit includes a pseudo random number generation unit that generates a pseudo random number based on the first secret key, a linear feedback register (LFSR) that generates LFSR output data based on the second secret key, The exclusive OR operation part which performs the exclusive OR operation process of the pseudorandom numbers which the random number generation part produced | generated, and LFSR output data is provided, and the output of an exclusive OR operation part is output as a key stream.
With this configuration, an apparatus and a method for executing stream cipher with improved safety are realized.
Note that the effects described in the present specification are merely examples and are not limited, and may have additional effects.

ストリーム暗号に従った暗号処理構成について説明する図である。It is a figure explaining the encryption processing structure according to a stream encryption. ストリーム暗号に叱った復号処理構成について説明する図である。It is a figure explaining the decoding process structure over stream encryption. ストリーム暗号におけるキーストリームの偏りについて説明する図である。It is a figure explaining the bias | inclination of the key stream in a stream encryption. ストリーム暗号におけるキーストリームの偏りを利用した攻撃例について説明する図である。It is a figure explaining the example of an attack using the bias of the key stream in stream cipher. 本開示の実施例1に従ったストリーム暗号を適用した暗号処理の例について説明する図である。It is a figure explaining the example of the encryption process to which the stream encryption according to Example 1 of this indication is applied. 線形フィードバックシフトレジスタ(LFSR)の構成例について説明する図である。It is a figure explaining the structural example of a linear feedback shift register (LFSR). 線形フィードバックシフトレジスタ(LFSR)の構成例について説明する図である。It is a figure explaining the structural example of a linear feedback shift register (LFSR). 本開示の実施例1に従ったストリーム暗号を適用した復号処理の例について説明する図である。It is a figure explaining the example of the decoding process to which the stream encryption according to Example 1 of this indication is applied. 本開示の実施例2に従ったストリーム暗号を適用した暗号処理の例について説明する図である。It is a figure explaining the example of the encryption process to which the stream encryption according to Example 2 of this indication is applied. 本開示の実施例2に従ったストリーム暗号を適用した復号処理の例について説明する図である。It is a figure explaining the example of the decoding process to which the stream encryption according to Example 2 of this indication is applied. 本開示の実施例3に従ったストリーム暗号を適用した暗号処理の例について説明する図である。It is a figure explaining the example of the encryption process to which the stream encryption according to Example 3 of this indication is applied. 鍵変換部の構成例について説明する図である。It is a figure explaining the structural example of a key conversion part. 本開示の実施例3に従ったストリーム暗号を適用した復号処理の例について説明する図である。It is a figure explaining the example of the decoding process to which the stream encryption according to Example 3 of this indication is applied. 暗号処理装置としてのICモジュール700の構成例を示す図である。It is a figure which shows the structural example of IC module 700 as a cryptographic processing apparatus. 暗号処理実行機能を有するスマートフォンの構成例を示す図である。It is a figure which shows the structural example of the smart phone which has an encryption process execution function.

以下、図面を参照しながら本開示に係る暗号処理装置、および暗号処理方法、並びにプログラムの詳細について説明する。説明は、以下の項目に従って行う。
1.ストリーム暗号の概要について
2.安全性を高めたストリーム暗号の構成について
2−1.第2の秘密鍵(KL)に基づくLFSR出力を適用してキーストリームを生成する実施例(実施例1)
2−2.秘密鍵(Ks)に基づくLFSR出力を適用してキーストリームを生成する実施例(実施例2)
2−3.第1の秘密鍵(Ks)の変換データに基づくLFSR出力を適用してキーストリームを生成する実施例(実施例3)
3.暗号処理装置の構成例について
4.本開示の構成のまとめ
Hereinafter, the details of the encryption processing device, the encryption processing method, and the program according to the present disclosure will be described with reference to the drawings. The description will be made according to the following items.
1. 1. Overview of stream cipher 2. Configuration of stream cipher with improved security 2-1. Example (Example 1) which produces | generates a key stream by applying the LFSR output based on a 2nd secret key (KL)
2-2. Example (Example 2) which produces | generates a key stream by applying the LFSR output based on a secret key (Ks)
2-3. Example (Example 3) which produces | generates a key stream by applying the LFSR output based on the conversion data of a 1st secret key (Ks)
3. 3. Configuration example of cryptographic processing device Summary of composition of this disclosure

[1.ストリーム暗号の概要について]
まず、ストリーム暗号の概要について説明する。
ストリーム暗号は、共通鍵暗号の一つである。
図1、図2を参照して、ストリーム暗号に従った暗号化処理と復号処理について説明する。
[1. About stream cipher overview]
First, an overview of stream cipher will be described.
The stream cipher is one of common key ciphers.
An encryption process and a decryption process according to the stream cipher will be described with reference to FIGS.

図1は、ストリーム暗号に従った暗号化処理について説明する図である。
キーストリーム生成部50は、秘密鍵(Ks)11と、初期ベクトル(IV:Initial Vector)12を入力して、キーストリーム(擬似乱数)13を生成する。
秘密鍵(Ks)11と、初期ベクトル(IV)12は、暗号処理を実行する装置、例えばユーザの情報処理装置に予め格納されたデータである。
秘密鍵(Ks)11は、秘密情報であり、公開されたデータではない。特定のユーザ間、例えば暗号文生成ユーザと、暗号文を復号するユーザ間で共有される秘密情報である。
一方、初期ベクトル(IV)12は、公開データであり、不特定多数のユーザが知ることができるデータである。
FIG. 1 is a diagram illustrating an encryption process according to a stream cipher.
The key stream generation unit 50 receives a secret key (Ks) 11 and an initial vector (IV: Initial Vector) 12 and generates a key stream (pseudorandom number) 13.
The secret key (Ks) 11 and the initial vector (IV) 12 are data stored in advance in a device that executes cryptographic processing, for example, a user information processing device.
The secret key (Ks) 11 is secret information, not public data. This is secret information shared between specific users, for example, ciphertext generation users and users who decrypt ciphertexts.
On the other hand, the initial vector (IV) 12 is public data, and is data that can be known by an unspecified number of users.

キーストリーム生成部50は、鍵スケジュール部51と、擬似乱数生成部52を有する。
鍵スケジュール部51は、秘密鍵(Ks)11と、初期ベクトル(IV)12に基づいて、擬似乱数生成用初期データを生成して擬似乱数生成部52に出力する。
擬似乱数生成部52は、鍵スケジュール部51から入力する擬似乱数生成用初期データを適用して擬似乱数としてのキーストリーム13を生成して出力する。
The key stream generation unit 50 includes a key schedule unit 51 and a pseudo random number generation unit 52.
The key schedule unit 51 generates pseudo random number generation initial data based on the secret key (Ks) 11 and the initial vector (IV) 12 and outputs the generated initial data to the pseudo random number generation unit 52.
The pseudo random number generation unit 52 applies the pseudo random number generation initial data input from the key schedule unit 51 to generate and output the key stream 13 as a pseudo random number.

擬似乱数生成部52の出力するキーストリーム13は、各々が所定ビット単位のデータからなるデータ列によって構成される。具体的には例えば各々が1バイト(8ビット)データからなるデータ列:Z1,Z2,Z3,・・・である。
擬似乱数生成部52は、各々が所定長のデータからなるデータ列:Z1,Z2,Z3,・・・をキーストリームとして順次、出力する。
The key stream 13 output from the pseudo-random number generation unit 52 is configured by a data string composed of data in units of predetermined bits. Specifically, for example, a data string consisting of 1 byte (8 bits) data: Z1, Z2, Z3,.
The pseudo-random number generation unit 52 sequentially outputs data strings: Z1, Z2, Z3,... Each consisting of data of a predetermined length as a key stream.

キーストリーム構成要素である所定ビット単位のデータ:Z1,Z2,Z3,・・・の各々と、暗号処理対象となる平文の所定データ単位の分割データ:P1,P2,P3・・・の各々が、順次、排他的論理和演算部53に入力され、排他的論理和(XOR)演算処理が実行される。
この排他的論理和演算結果として算出するデータ列:C1,C2,C3・・・を、暗号文22として出力する。
Each of the predetermined bit unit data: Z1, Z2, Z3,... Which is a key stream component, and each of the divided data: P1, P2, P3,. Are sequentially input to the exclusive OR operation unit 53, and exclusive OR (XOR) operation processing is executed.
The data string C1, C2, C3... Calculated as the exclusive OR operation result is output as the ciphertext 22.

暗号文C1,C2,C3・・・と、キーストリーム:Z1,Z2,Z3・・・と、平文P1,P2,P3・・・との関係は以下の通りである。
C1=P1(+)Z1
C2=P2(+)Z2
C3=P3(+)Z3
・・・
なお、上記式において(+)は、排他的論理和演算を意味する。
また、平文の構成要素Pi、キーストリームの構成要素Zi、暗号文構成要素Ci、これらの各構成要素は、いずれも同一ビット数、例えば1バイト(8ビット)のデータに設定される。
The ciphertexts C1, C2, C3..., The key streams: Z1, Z2, Z3... And the plaintexts P1, P2, P3.
C1 = P1 (+) Z1
C2 = P2 (+) Z2
C3 = P3 (+) Z3
...
In the above formula, (+) means exclusive OR operation.
Also, the plaintext component Pi, the keystream component Zi, the ciphertext component Ci, and each of these components are set to data of the same number of bits, for example, 1 byte (8 bits).

このように、ストリーム暗号による暗号文生成処理は、以下のステップ(S1),(S2)を実行することで行われる。
(S1)秘密のパラメータである秘密鍵と、公開パラメータである初期ベクトル(IV:Initial Vector)から、キーストリームと呼ばれる擬似乱数系列Z1,Z2,Z3・・・を生成する。
(S2)平文の構成データP1,P2,P3・・・と、生成したキーストリームZ1,Z2,Z3・・・の排他的論理和をとることにより、暗号文C1,C2,C3・・・を生成する。
As described above, the ciphertext generation process using the stream cipher is performed by executing the following steps (S1) and (S2).
(S1) Pseudorandom number sequences Z1, Z2, Z3,... Called key streams are generated from a secret key that is a secret parameter and an initial vector (IV: Initial Vector) that is a public parameter.
(S2) The ciphertexts C1, C2, C3... Are obtained by taking the exclusive OR of the plaintext configuration data P1, P2, P3... And the generated key streams Z1, Z2, Z3. Generate.

図1を参照して説明した処理によって生成された暗号文22は、例えば、ネットワークを介して転送され、他のユーザの情報処理装置によって受信され、復号処理が実行される。
図2は、ストリーム暗号に従った復号処理について説明する図である。
ストリーム暗号に従った暗号処理と復号処理は、同一の装置構成を用いて実行可能である。
The ciphertext 22 generated by the processing described with reference to FIG. 1 is transferred via, for example, a network, received by an information processing apparatus of another user, and decrypted.
FIG. 2 is a diagram for explaining the decryption process according to the stream cipher.
The encryption process and the decryption process according to the stream cipher can be executed using the same device configuration.

図2に示す構成において、キーストリーム生成部70は、秘密鍵(Ks)41と、初期ベクトル(IV:Initial Vector)42を入力して、キーストリーム(擬似乱数)43を生成する。
秘密鍵(Ks)41と、初期ベクトル(IV)42は、復号処理を実行する装置、例えばユーザの情報処理装置に予め格納されたデータである。
秘密鍵(Ks)41は、秘密情報であり、公開されたデータではない。特定のユーザ間、例えば暗号文生成ユーザと、暗号文を復号するユーザ間で共有される秘密情報である。
In the configuration shown in FIG. 2, the key stream generation unit 70 receives a secret key (Ks) 41 and an initial vector (IV) 42 and generates a key stream (pseudo random number) 43.
The secret key (Ks) 41 and the initial vector (IV) 42 are data stored in advance in a device that executes a decryption process, for example, a user information processing device.
The secret key (Ks) 41 is secret information and not public data. This is secret information shared between specific users, for example, ciphertext generation users and users who decrypt ciphertexts.

すなわち、復号対象とする暗号文22が、図1に示す構成によって生成された暗号文22である場合、秘密鍵(Ks)41は、図1に示す暗号処理において適用した秘密鍵(Ks)11と同一の鍵である。
一方、初期ベクトル(IV)12は、公開データであり、不特定多数のユーザが知ることができるデータである。
復号対象とする暗号文22が、図1に示す構成によって生成された暗号文22である場合、初期ベクトル(IV)42も、図1に示す暗号処理において適用した初期ベクトル(IV)12と同一のデータである。
That is, when the ciphertext 22 to be decrypted is the ciphertext 22 generated by the configuration shown in FIG. 1, the secret key (Ks) 41 is the secret key (Ks) 11 applied in the encryption processing shown in FIG. Is the same key.
On the other hand, the initial vector (IV) 12 is public data, and is data that can be known by an unspecified number of users.
When the ciphertext 22 to be decrypted is the ciphertext 22 generated by the configuration shown in FIG. 1, the initial vector (IV) 42 is also the same as the initial vector (IV) 12 applied in the encryption processing shown in FIG. It is data of.

キーストリーム生成部70は、スケジュール部71と、擬似乱数生成部72を有する。
鍵スケジュール部71は、秘密鍵(Ks)41と、初期ベクトル(IV)42に基づいて、擬似乱数生成用初期データを生成して擬似乱数生成部72に出力する。
擬似乱数生成部72は、鍵スケジュール部71から入力する擬似乱数生成用初期データを適用して擬似乱数としてのキーストリーム43を生成して出力する。
なお、生成されるキーストリーム43は、同一の秘密鍵(Ks)と同一の初期ベクトル(IV)を用いた場合、同一のデータとなる。
The key stream generation unit 70 includes a schedule unit 71 and a pseudo random number generation unit 72.
The key schedule unit 71 generates pseudo random number generation initial data based on the secret key (Ks) 41 and the initial vector (IV) 42 and outputs the generated initial data to the pseudo random number generation unit 72.
The pseudo random number generation unit 72 applies the initial data for pseudo random number generation input from the key schedule unit 71 to generate and output a key stream 43 as a pseudo random number.
The generated key stream 43 is the same data when the same secret key (Ks) and the same initial vector (IV) are used.

本例では、図2に示す構成において、秘密鍵(Ks)41は、図1に示す秘密鍵(Ks)11と同一であり、初期ベクトル(IV)42は、図1に示す初期ベクトル(IV)12同一である。従って、図2に示す構成において生成されるキーストリーム43は、図1に示キーストリーム13と同一のデータとなる。   In this example, in the configuration shown in FIG. 2, the secret key (Ks) 41 is the same as the secret key (Ks) 11 shown in FIG. 1, and the initial vector (IV) 42 is the initial vector (IV) shown in FIG. ) 12 are identical. Therefore, the key stream 43 generated in the configuration shown in FIG. 2 is the same data as the key stream 13 shown in FIG.

擬似乱数生成部72の出力するキーストリーム43は、各々が所定ビット単位のデータからなるデータ列によって構成される。具体的には例えば各々が1バイト(8ビット)データからなるデータ列:Z1,Z2,Z3,・・・である。
擬似乱数生成部72は、各々が所定長のデータからなるデータ列:Z1,Z2,Z3,・・・をキーストリームとして順次、出力する。
The key stream 43 output from the pseudo-random number generator 72 is composed of a data string that is composed of data in predetermined bit units. Specifically, for example, a data string consisting of 1 byte (8 bits) data: Z1, Z2, Z3,.
The pseudo-random number generation unit 72 sequentially outputs data strings: Z1, Z2, Z3,... Each consisting of data of a predetermined length as a key stream.

キーストリーム構成要素である所定ビット単位のデータ:Z1,Z2,Z3,・・・の各々と、復号処理対象となる暗号文の所定データ単位の分割データ:C1,C2,C3・・・の各々が、排他的論理和演算部73に順次、入力され、排他的論理和(XOR)演算が実行される。
この排他的論理和演算結果として算出するデータ列:P1,P2,P3・・・が、復号結果としての平文21となる。
Each of the predetermined bit unit data: Z1, Z2, Z3,... Which is a key stream component, and each of the divided data of the predetermined data unit of the ciphertext to be decrypted: C1, C2, C3,. Are sequentially input to the exclusive OR operation unit 73, and an exclusive OR (XOR) operation is executed.
The data string P1, P2, P3... Calculated as the exclusive OR operation result is the plaintext 21 as the decryption result.

平文P1,P2,PC3・・・と、キーストリーム:Z1,Z2,Z3・・・と、暗号文C1,C2,C3・・・との関係は以下の通りである。
P1=C1(+)Z1
P2=C2(+)Z2
P3=C3(+)Z3
・・・
なお、上記式において(+)は、排他的論理和演算を意味する。
また、平文の構成要素Pi、キーストリームの構成要素Zi、暗号文構成要素Ci、これらの各構成要素は、いずれも同一ビット数、例えば1バイト(8ビット)のデータである。
The relationship between the plaintexts P1, P2, PC3..., The key streams Z1, Z2, Z3... And the ciphertexts C1, C2, C3.
P1 = C1 (+) Z1
P2 = C2 (+) Z2
P3 = C3 (+) Z3
...
In the above formula, (+) means exclusive OR operation.
Also, the plaintext component Pi, the key stream component Zi, the ciphertext component Ci, and each of these components are data of the same number of bits, for example, 1 byte (8 bits).

このように、ストリーム暗号による復号処理は、以下のステップ(S3)、(S4)を実行することで実行される。
(S3)秘密鍵と、初期ベクトル(IV)から、キーストリーム(擬似乱数系列)Z1,Z2,Z3・・・を生成する。
(S4)暗号文C1,C2,C3・・・と、生成したキーストリームZ1,Z2,Z3・・・の排他的論理和をとることにより、平文P1,P2,P3・・・を生成する。
As described above, the decryption process using the stream cipher is executed by executing the following steps (S3) and (S4).
(S3) Key streams (pseudo-random number sequences) Z1, Z2, Z3... Are generated from the secret key and the initial vector (IV).
(S4) The plaintexts P1, P2, P3,... Are generated by taking the exclusive OR of the ciphertexts C1, C2, C3... And the generated key streams Z1, Z2, Z3.

平文生成処理において、ステップ(S4)で実行する排他的論理和の性質上、暗号文生成時に利用したキーストリームと同じキーストリームを用いて、暗号文の排他的論理和をとることにより平文を得ることができる。
つまり、共通の秘密情報である「秘密鍵」を送信者と受信者で安全に共有することにより、暗号化および復号処理が可能となる。
In the plaintext generation process, the plaintext is obtained by taking the exclusive OR of the ciphertext using the same keystream as the keystream used at the time of ciphertext generation due to the nature of the exclusive OR executed in step (S4). be able to.
That is, encryption and decryption processing can be performed by securely sharing a “secret key” that is common secret information between the sender and the receiver.

図1、図2を参照して説明したように、ストリーム暗号では、鍵スケジューリングアルゴリズムと、擬似乱数生成アルゴリズムを適用して生成されるキーストリームを用いて処理が行われる。
図1、図2に示す鍵スケジュール部51,71内で実行する鍵スケジューリングアルゴリズムでは、秘密鍵(Ks)と、初期ベクトル(IV)とから、擬似乱数生成用初期データを生成する。
擬似乱数生成用初期データは、擬似乱数生成部52の内部状態と呼ばれる内部変数の初期値(初期状態)に相当する。なお、安全性の観点より、擬似乱数生成用初期データ(内部状態)のサイズは、秘密鍵(Ks)の2倍以上であることが求められる。
As described with reference to FIGS. 1 and 2, in the stream cipher, processing is performed using a key stream generated by applying a key scheduling algorithm and a pseudo-random number generation algorithm.
In the key scheduling algorithm executed in the key scheduling units 51 and 71 shown in FIGS. 1 and 2, pseudo random number generation initial data is generated from the secret key (Ks) and the initial vector (IV).
The initial data for pseudorandom number generation corresponds to an initial value (initial state) of an internal variable called an internal state of the pseudorandom number generator 52. From the viewpoint of security, the size of the initial data (internal state) for generating pseudo-random numbers is required to be at least twice as large as the secret key (Ks).

図1、図2に示す擬似乱数生成部52,72の実行する擬似乱数生成アルゴリズムでは、擬似乱数生成用初期データ(内部状態)を更新しながら各状態において固定長のキーストリームを構成するワードZ1、Z2、Z3・・・、を順次、生成する。
ここでZiは、時刻iにおける擬似乱数生成部からの出力であり、サイズはアルゴリズムによって異なる。たとえば、ストリーム暗号RC4の場合には、各ワードのサイズは1バイト(8ビット)である。
In the pseudo-random number generation algorithm executed by the pseudo-random number generators 52 and 72 shown in FIGS. 1 and 2, the word Z1 constituting a fixed-length key stream in each state while updating the initial data (internal state) for generating pseudo-random numbers. , Z2, Z3... Are sequentially generated.
Here, Zi is an output from the pseudorandom number generator at time i, and the size differs depending on the algorithm. For example, in the case of the stream cipher RC4, the size of each word is 1 byte (8 bits).

キーストリーム生成部の構成は、その内部状態の構成の違いから、線形フィードバックシフトレジスタ型と状態遷移型に大別される。
線形フィードバック型は、その名の通り線形フィードバックシフトレジスタをベースにしており、線形フィルター関数と、非線形フィードバックシフトレジスタと組み合わせることで安全性を確保している。代表的なものとして、SNOW 3G、 KCipher−2が挙げられる。
一方、状態遷移型はレジスタ内を非線形な関数により更新し、その一部をキーストリームとして出力する構成である。代表的なものとして、RC4が挙げられる。
The configuration of the key stream generation unit is broadly classified into a linear feedback shift register type and a state transition type based on the difference in the configuration of its internal state.
As the name suggests, the linear feedback type is based on a linear feedback shift register, and secures safety by combining a linear filter function and a non-linear feedback shift register. Representative examples include SNOW 3G and KCipher-2.
On the other hand, the state transition type has a configuration in which the register is updated with a non-linear function and a part thereof is output as a key stream. A typical example is RC4.

ストリーム暗号に対する代表的な攻撃例として以下の各種の攻撃がある。
(1)識別攻撃:キーストリームを真性乱数と識別する攻撃、
(2)予測攻撃:未知のキーストリームを予測する攻撃、
(3)鍵回復攻撃:キーストリームから、秘密鍵を求める攻撃、
(4)内部状態復元攻撃:キーストリームから秘密鍵と等価な内部状態を求める攻撃、
基本的には、ストリーム暗号は上記の攻撃すべてに対して耐性を有していることが求められる。
The following various attacks are typical examples of attacks on stream ciphers.
(1) Identification attack: an attack that identifies a key stream as a true random number,
(2) Prediction attack: An attack that predicts an unknown key stream,
(3) Key recovery attack: An attack that seeks a secret key from a key stream,
(4) Internal state restoration attack: An attack that seeks an internal state equivalent to a secret key from a key stream,
Basically, stream ciphers are required to be resistant to all of the above attacks.

特に上記の(3)鍵回復攻撃、および(4)内部状態復元攻撃、これらの攻撃は、キーストリームから、秘密鍵もしくはそれと等価な内部状態を求める攻撃である。これらの攻撃が成立すれば、すべての暗号文から平文情報を求めることができるため、非常に強力な攻撃方法である。
しかしながら、攻撃の前提として、攻撃者が十分な量(サイズ)のキーストリームの情報を知っていることが求められる。これは、攻撃者が、大量の平文暗号文ペアを保持しておく必要があることを意味する。この強い仮定のため、実際の利用においては脅威になりにくく、理論的な攻撃と考えられる。
Particularly, the above (3) key recovery attack and (4) internal state restoration attack, these attacks are attacks for obtaining a secret key or an equivalent internal state from a key stream. If these attacks are established, plaintext information can be obtained from all ciphertexts, which is a very powerful attack method.
However, as a premise of the attack, it is required that the attacker knows a sufficient amount (size) of information on the key stream. This means that the attacker needs to keep a large number of plaintext ciphertext pairs. Because of this strong assumption, it is unlikely to be a threat in actual use and is considered a theoretical attack.

一方、(1)識別攻撃は、キーストリームの統計的な偏りのみを利用する攻撃であり、実際に大きな脅威となりうることが指摘されている攻撃である。具体的には、異なる秘密鍵を適用して生成した暗号文を観測することのみで平文を回復することが可能となる。   On the other hand, (1) the identification attack is an attack that uses only the statistical bias of the key stream, and is an attack that has been pointed out to be a serious threat in practice. Specifically, plaintext can be recovered only by observing ciphertext generated by applying different secret keys.

(1)識別攻撃の具体例について、図3、図4を参照して説明する。この攻撃は、例えばキーストリームの偏りを利用した平文回復攻撃として実行される。
キーストリームの偏りの例について、図3を参照して説明する。
(1) A specific example of the identification attack will be described with reference to FIGS. This attack is executed, for example, as a plaintext recovery attack using the bias of the key stream.
An example of the key stream bias will be described with reference to FIG.

図3の左に示すキーストリーム生成部50の構成は、図1、図2に示すキーストリーム生成部の構成と同一の構成である。
図3に示すキーストリーム生成部50の生成するキーストリームの1つの構成要素(ワード)Z2に着目する。
キーストリームの1つの構成要素(ワード)を1バイト(8ビット)とすると、Z2の取り得る値は0〜255の256通りである。
The configuration of the key stream generation unit 50 shown on the left in FIG. 3 is the same as the configuration of the key stream generation unit shown in FIGS.
Attention is paid to one component (word) Z2 of the key stream generated by the key stream generation unit 50 shown in FIG.
If one component (word) of the key stream is 1 byte (8 bits), Z2 can take 256 values from 0 to 255.

理想的なランダム性が実現されている場合、Z2の値の出現確率は、0〜255全て均一となり、図3の[(a)理想]のグラフに示すように、0〜255の各値の出現確率は全て等しく、1/256となる。
しかし、現実には、キーストリームの構成要素(ワード)の値の出現確率には偏りが発生する。
Z2についての実際の出現確率の計測値は、図3の[(b)現実]に示すグラフの通り、0の出現確率が他の値に比較して高くなっている。
図3には、キーストリームの構成要素(ワード)の1つであるZ2についての検証結果を示しているが、その他のキーストリームの構成要素についても、それぞれ、出現しやすい値が存在する。
When ideal randomness is realized, the appearance probabilities of the value of Z2 are all 0 to 255, and as shown in the graph of [(a) ideal] in FIG. The appearance probabilities are all equal to 1/256.
However, in reality, the occurrence probability of the value of the component (word) of the key stream is biased.
As shown in the graph shown in [(b) Reality] in FIG. 3, the measured value of the actual appearance probability for Z2 has a higher appearance probability of 0 than other values.
FIG. 3 shows the verification result for Z2 which is one of the constituent elements (words) of the key stream, but there are values that are likely to appear for the constituent elements of the other key streams.

このような、キーストリームの統計的な偏りに基づいて、「ブロードキャスト・セッティング」を利用して、暗号文から平文を求めることが可能となる場合がある。
なお、「ブロードキャスト・セッティング」とは、"同じ平文を異なる鍵で暗号化し、暗号文を生成する状況"を意味する
Based on such statistical deviation of the key stream, it may be possible to obtain the plaintext from the ciphertext using “broadcast setting”.
"Broadcast setting" means "situation where the same plaintext is encrypted with different keys and ciphertext is generated"

「ブロードキャスト・セッティング」を利用して、暗号文から平文を求める攻撃の具体例について、図4を参照して説明する。
例えば、ある1つの平文Pを多数のユーザに同時に配信(ブロードキャスト)する場合、各ユーザに対応付けられた異なる秘密鍵k1〜kxを適用して、同一平文に対する暗号化処理を実行して、多数の暗号化データ(C1〜Cx)を生成して送信することが行われる。
A specific example of an attack for obtaining plaintext from ciphertext using “broadcast settings” will be described with reference to FIG.
For example, when a single plaintext P is simultaneously distributed (broadcast) to a large number of users, different secret keys k1 to kx associated with each user are applied to execute encryption processing on the same plaintext, The encrypted data (C1 to Cx) are generated and transmitted.

C1=E(k1,P)
C2=E(k2,P)
・・・
Cx=E(kx,P)
である。
ただし、E(ki,P)は、平文Pに対する鍵kiを適用した暗号化処理を意味する。
C1 = E (k1, P)
C2 = E (k2, P)
...
Cx = E (kx, P)
It is.
However, E (ki, P) means an encryption process using the key ki for the plaintext P.

同一平文Pに対して、多数の異なる鍵k1〜kxがネットワークを介して送信され他場合、悪意の第三者は、ネットワークを介した送受信データから、これらの多数の暗号化データ(C1=E(k1,P)〜Cx=E(kx,P))を比較的容易に取得することができる。
キーストリームの統計的な偏りがあると、取得した多数の暗号化データの解析に基づく平文算出が容易になる。この攻撃が、「ブロードキャスト・セッティング」を利用した暗号文から平文を求める識別攻撃である。
In the case where many different keys k1 to kx are transmitted through the network for the same plaintext P, the malicious third party can obtain a large number of encrypted data (C1 = E) from transmission / reception data through the network. (K1, P) to Cx = E (kx, P)) can be acquired relatively easily.
If there is a statistical bias in the key stream, plaintext calculation based on analysis of a large number of acquired encrypted data becomes easy. This attack is an identification attack for obtaining plaintext from ciphertext using “broadcast settings”.

この攻撃において、攻撃者は通信路上の暗号文を、ただ観測すればよいため、特別な仮定が必要ではなく、非常に強力な攻撃技術となる。
コンテンツをユーザごとの鍵で暗号化して、ネットワーク配信する処理は頻繁に行われており、この攻撃による損害は多大なものとなる恐れがある。
In this attack, since the attacker only has to observe the ciphertext on the communication path, no special assumption is required and it becomes a very powerful attack technique.
The process of encrypting the content with the key for each user and distributing it over the network is frequently performed, and there is a possibility that the damage caused by this attack will be significant.

なお、同じ平文を異なる鍵で暗号化し、暗号文を生成する「ブロードキャスト・セッティング」では、多くの場合、各セッション単位で利用鍵が異なるが、複数セッションで同じ鍵を利用してメッセージを送信する「マルチセッション・セッティング」も多く利用されている。これは、インターネットで広く用いられているSSL/TLSのプロトコルがユースケースと考えられる。   In “broadcast settings”, where the same plaintext is encrypted with different keys and the ciphertext is generated, the usage key is different for each session in many cases, but the same key is used for multiple sessions to send messages. Many “multi-session settings” are also used. The SSL / TLS protocol widely used on the Internet is considered as a use case.

図4を参照して説明した攻撃は、同一平文をベースとして異なる鍵で暗号化された複数の暗号文を集めるのみで実行可能な攻撃であり、例えばネットワーク配信されたデータを集めるのみで実行できるため、実際の脅威になる攻撃である。この攻撃を防ぐためには、ストリーム暗号において生成されるキーストリームに偏りを持たせないようにする必要がある。
出力に偏りが存在する場合には、図4を参照して説明した平文回復攻撃がやり易くなり、安全性が脅かされる。この脅威を防止するためには、何らかの対策をとる必要がある。
The attack described with reference to FIG. 4 is an attack that can be executed only by collecting a plurality of ciphertexts encrypted with different keys based on the same plaintext. For example, the attack can be executed only by collecting data distributed over the network. Therefore, it is an attack that becomes an actual threat. In order to prevent this attack, it is necessary to prevent the key stream generated in the stream cipher from being biased.
When the output is biased, the plain text recovery attack described with reference to FIG. 4 is easy to perform, and the safety is threatened. Some measures need to be taken to prevent this threat.

ストリーム暗号アルゴリズムにおける出力の偏りに起因する脆弱性を回避するための対策例としては、以下のようなものがある。
(1)別の安全なストリーム暗号に変更する。
もっとも単純な方法で、システム全体において、偏りのある弱いストリーム暗号を安全なストリーム暗号に変更することにより、脆弱性を取り除く。これにより、ブロードキャスト・セッティングにおいても、偏りによるキーストリームを利用した平文回復攻撃を完全に防ぐことができる。
Examples of countermeasures for avoiding vulnerabilities due to output bias in the stream cipher algorithm include the following.
(1) Change to another secure stream cipher.
In the simplest way, the vulnerability is removed by changing the biased weak stream cipher to a secure stream cipher throughout the system. As a result, even in the broadcast setting, it is possible to completely prevent a plaintext recovery attack using a key stream due to bias.

(2)アルゴリズムに修正を加えて、脆弱性を取り除く
ストリーム暗号自体を入れ替えるのではなく、アルゴリズムの一部に修正を加えることにより、偏りのある出力が発生する脆弱性を取り除く。例えば、出力の偏りを取り除くための方法としては、擬似ランダム関数(MAC関数等)を追加して、キーストリームを擬似ランダム置換に代入し、その出力を新しいキーストリームとすることで、脆弱性を取り除くことができる。
(2) Modifying the algorithm to remove the vulnerability Rather than replacing the stream cipher itself, modify the part of the algorithm to remove the vulnerability that produces biased output. For example, as a method for removing output bias, a pseudo-random function (MAC function, etc.) is added, a key stream is substituted for pseudo-random substitution, and the output is set as a new key stream. Can be removed.

これらの対策を行うことにより、偏りのあるキーストリームの問題は解決でき、安全にストリーム暗号を利用可能である。しかしながらこれらの対策には以下の問題点がある。   By taking these measures, the problem of the biased key stream can be solved, and the stream cipher can be used safely. However, these measures have the following problems.

(1)別の安全なストリーム暗号に変更する対策の問題点
すでに実装されている暗号をすべて変えることが必要となるため、費用的にも時間的にも大きなコストになる。また新規のハードウェアやソフトウェアの開発のコストもかかる。さらに、すでに出荷されているデバイスやシステムが、ネットワークにつながっていない場合には、ソフトウェア/ファームウェアアップデート等でも対応することが非常に難しい。特にハードウェアの変更はネットワーク経由でのアップデートは基本的にできず、コストが高い。
(1) Problems of measures for changing to another secure stream cipher It is necessary to change all the ciphers that have already been installed, which increases costs both in terms of cost and time. It also costs new hardware and software development. Furthermore, when devices and systems that have already been shipped are not connected to a network, it is very difficult to cope with software / firmware updates. In particular, hardware changes are basically impossible to update via the network, which is expensive.

(2)アルゴリズムに修正を加えて、脆弱性を取り除く対策の問題点
方法(1)とは異なりアルゴリズムすべてを変更するわけではないため、変更のコストは方法(1)と比べて、比較的軽微になることが予想される。しかしながら、既存のアルゴリズムを修正する場合は高い専門知識が必要である。既存システムの設計者でない場合、設計理論のすべてを把握できないため、修正がかえって他の深刻的な脆弱性を招く可能性がある。また、実際に安全な暗号を運用したい場合には。安全性評価を実施する必要があるが、これにも多くの時間や高い専門性が必要になる。
また、修正することにより、パファーマンスが大幅に低下してしまった場合には、他のシステムと整合性が取れなくなり、システム全体のパファーマンスも不安定になる可能性がある。例えば、前述の擬似ランダム置換を用いる場合には、大幅な速度の低下が予想される。
(2) Problems in measures to remove vulnerabilities by modifying the algorithm Unlike the method (1), not all algorithms are changed, so the cost of the change is relatively small compared to the method (1). It is expected to become. However, high expertise is required to modify existing algorithms. If you are not the designer of an existing system, you can not grasp all of the design theory, so it can be modified and cause other serious vulnerabilities. And if you really want to use secure encryption. It is necessary to conduct a safety assessment, but this also requires a lot of time and high expertise.
In addition, when the performance is greatly reduced by the correction, the consistency with other systems cannot be obtained, and the performance of the entire system may become unstable. For example, when using the above-mentioned pseudo-random substitution, a significant decrease in speed is expected.

[2.安全性を高めたストリーム暗号の構成について]
次に、上述した問題点を解決した安全性を強化した本開示のストリーム暗号の構成例について説明する。
[2. Configuration of stream cipher with improved security]
Next, a configuration example of the stream cipher of the present disclosure in which the security that solves the above-described problem is enhanced will be described.

本開示のストリーム暗号は、以下の特徴を持つ。
(a)追加実装コスト(ソフトウェア、ハードウェアとも)が低い。
(b)安全性評価を簡単に行うことができる。
(c)ストリーム暗号の実装性能(特に速度)を保つことが可能である。
The stream cipher of this indication has the following features.
(A) The additional mounting cost (both software and hardware) is low.
(B) Safety evaluation can be easily performed.
(C) The implementation performance (especially speed) of the stream cipher can be maintained.

本開示のストリーム暗号においては、既存のストリーム暗号において生成するキーストリームを変換して新たなキーストリームを生成する。
例えば、既存のストリーム暗号において生成するキーストリームに対して、所定の秘密情報を入力した線形フィードバックシフトレジスタ(LFSR:Linear Feedback Shift Register)の出力を、排他的論理和(XOR)して新たなキーストリームを生成して利用する。この構成により、安全性の高いストリーム暗号を実現する。
In the stream cipher of the present disclosure, a key stream generated in the existing stream cipher is converted to generate a new key stream.
For example, for a key stream generated in an existing stream cipher, an exclusive OR (XOR) is performed on the output of a linear feedback shift register (LFSR) to which predetermined secret information is input to obtain a new key. Generate and use a stream. With this configuration, a highly secure stream cipher is realized.

なお、線形フィードバックシフトレジスタの内部状態のサイズは、ストリーム暗号において適用する秘密鍵(Ks)のサイズよりも大きいことが望ましい。具体的な実施例として、以下の3通りの実施例について、順次説明する。   Note that the size of the internal state of the linear feedback shift register is preferably larger than the size of the secret key (Ks) applied in the stream cipher. As specific examples, the following three examples will be sequentially described.

(実施例1)線形フィードバックシフトレジスタ(LFSR)に、鍵スケジュール部に入力する秘密鍵(Ks)と異なる第2の秘密鍵(KL)を入力して、LFSRの初期状態を設定する。秘密鍵(Ks)に基づいて鍵スケジュール部と擬似乱数生成部の処理によって生成した擬似乱数と、第2の秘密鍵(KL)に基づくLFSRからの出力とを排他的論理和(XOR)したデータをキーストリームとする実施例。     (Example 1) A second secret key (KL) different from the secret key (Ks) input to the key schedule unit is input to the linear feedback shift register (LFSR) to set the initial state of the LFSR. Data obtained by exclusive OR (XOR) the pseudo random number generated by the processing of the key schedule unit and the pseudo random number generation unit based on the secret key (Ks) and the output from the LFSR based on the second secret key (KL) Is a key stream.

(実施例2)線形フィードバックシフトレジスタ(LFSR)に、鍵スケジュール部に入力する秘密鍵(Ks)と同じ秘密鍵(Ks)を入力して、LFSRの初期状態を設定する。秘密鍵(Ks)に基づいて鍵スケジュール部と擬似乱数生成部の処理によって生成した擬似乱数と、同じ秘密鍵(Ks)に基づくLFSRからの出力とを排他的論理和(XOR)したデータをキーストリームとする実施例。     (Example 2) The same secret key (Ks) as the secret key (Ks) input to the key schedule unit is input to the linear feedback shift register (LFSR) to set the initial state of the LFSR. Data obtained by exclusive ORing (XOR) the pseudorandom numbers generated by the processing of the key schedule unit and the pseudorandom number generation unit based on the secret key (Ks) and the output from the LFSR based on the same secret key (Ks) as a key An example of a stream.

(実施例3)線形フィードバックシフトレジスタ(LFSR)に、鍵スケジュール部に入力する秘密鍵(Ks)と同じ秘密鍵(Ks)を変換したデータ(Ks2)を入力して、LFSRの初期状態を設定する。秘密鍵(Ks)に基づいて鍵スケジュール部と擬似乱数生成部の処理によって生成した擬似乱数と、同じ秘密鍵(Ks)の変換データ(Ks2)に基づくLFSRからの出力とを排他的論理和(XOR)したデータをキーストリームとする実施例。     (Example 3) Data (Ks2) obtained by converting the same secret key (Ks) as the secret key (Ks) input to the key schedule part is input to the linear feedback shift register (LFSR) to set the initial state of the LFSR. To do. Exclusive OR of the pseudo random number generated by the processing of the key schedule unit and the pseudo random number generation unit based on the secret key (Ks) and the output from the LFSR based on the conversion data (Ks2) of the same secret key (Ks) ( An embodiment in which the XOR) data is used as a key stream.

なお、線形フィードバックシフトレジスタ(LFSR)は以下の特徴を持つことが知られている。
(a)出力系列は決定的で、現在の内部状態を知っていれば次の状態は推測可能。
(b)出力系列を観測することで、内部状態を復元することが可能。
また、本開示の各実施例において用いる線形フィードバックシフトレジスタ(LFSR)はさらに以下の特徴を持つことが望ましい。
(c)0と1の出現確率が真性乱数と統計的に同じ。
以下、各実施例について、順次、説明する。
Note that the linear feedback shift register (LFSR) is known to have the following characteristics.
(A) The output sequence is definitive, and the next state can be estimated if the current internal state is known.
(B) The internal state can be restored by observing the output series.
The linear feedback shift register (LFSR) used in each embodiment of the present disclosure preferably has the following features.
(C) The appearance probability of 0 and 1 is statistically the same as the true random number.
Hereinafter, each example will be described sequentially.

[2−1.第2の秘密鍵(KL)に基づくLFSR出力を適用してキーストリームを生成する実施例(実施例1)]
まず、実施例1として、線形フィードバックシフトレジスタ(LFSR)に、鍵スケジュール部に入力する秘密鍵(Ks)と異なる第2の秘密鍵(KL)を入力して、LFSRの初期状態を設定する実施例について説明する。
すなわち、秘密鍵(Ks)に基づいて鍵スケジュール部と擬似乱数生成部の処理によって生成した擬似乱数と、第2の秘密鍵(KL)に基づくLFSRからの出力とを排他的論理和(XOR)したデータをキーストリームとする実施例である。
[2-1. Embodiment in which LFSR output based on second secret key (KL) is applied to generate a key stream (embodiment 1)]
First, as the first embodiment, an initial state of the LFSR is set by inputting a second secret key (KL) different from the secret key (Ks) input to the key schedule unit to the linear feedback shift register (LFSR). An example will be described.
That is, an exclusive OR (XOR) of the pseudo random number generated by the processing of the key schedule unit and the pseudo random number generation unit based on the secret key (Ks) and the output from the LFSR based on the second secret key (KL) This is an embodiment in which the processed data is used as a key stream.

図5に本実施例1の暗号処理を実行する暗号処理装置の構成例を示す。
キーストリーム生成部110は、第1秘密鍵(Ks)131と、初期ベクトル(IV:Initial Vector)132、さらに、第2秘密鍵(KL)133を入力して、キーストリーム(擬似乱数)136を生成する。
FIG. 5 shows a configuration example of a cryptographic processing apparatus that executes the cryptographic processing of the first embodiment.
The key stream generation unit 110 receives the first secret key (Ks) 131, the initial vector (IV: Initial Vector) 132, and the second secret key (KL) 133, and generates a key stream (pseudorandom number) 136. Generate.

第1秘密鍵(Ks)131と、初期ベクトル(IV)132と、第2秘密鍵(KL)133は、暗号処理を実行する装置、例えばユーザの情報処理装置に予め格納されたデータである。
第1秘密鍵(Ks)131と、第2秘密鍵(KL)133は、秘密情報であり、公開されたデータではない。特定のユーザ間、例えば暗号文生成ユーザと、暗号文を復号するユーザ間で共有される秘密情報である。
また、第1秘密鍵(Ks)131と、第2秘密鍵(KL)133は、異なる鍵データである。
初期ベクトル(IV)132は、公開データであり、不特定多数のユーザが知ることができるデータである。
The first secret key (Ks) 131, the initial vector (IV) 132, and the second secret key (KL) 133 are data stored in advance in a device that performs cryptographic processing, for example, a user information processing device.
The first secret key (Ks) 131 and the second secret key (KL) 133 are secret information and are not public data. This is secret information shared between specific users, for example, ciphertext generation users and users who decrypt ciphertexts.
The first secret key (Ks) 131 and the second secret key (KL) 133 are different key data.
The initial vector (IV) 132 is public data, and is data that can be known by an unspecified number of users.

キーストリーム生成部110は、鍵スケジュール部111と、擬似乱数生成部112、さらに、線形フィードバックシフトレジスタ(LFSR)121と、排他的論理和(XOR)演算部122を有する。
鍵スケジュール部111は、第1秘密鍵(Ks)131と、初期ベクトル(IV)132に基づいて、擬似乱数生成用初期データを生成して擬似乱数生成部112に出力する。
擬似乱数生成部112は、鍵スケジュール部111から入力する擬似乱数生成用初期データを適用して擬似乱数134を生成して出力する。擬似乱数134は、図に示すZa1,Za2,・・・のデータシーケンスであり、例えば、Zaiの各々が1バイト(8ビット)の擬似乱数シーケンス:Za1,Za2,・・・を生成して排他的論理和(XOR)演算部122に出力する。
The key stream generation unit 110 includes a key schedule unit 111, a pseudo random number generation unit 112, a linear feedback shift register (LFSR) 121, and an exclusive OR (XOR) calculation unit 122.
The key schedule unit 111 generates pseudo random number generation initial data based on the first secret key (Ks) 131 and the initial vector (IV) 132 and outputs the generated initial data to the pseudo random number generation unit 112.
The pseudo random number generation unit 112 generates pseudo random numbers 134 by applying the pseudo random number generation initial data input from the key schedule unit 111 and outputs the pseudo random numbers 134. The pseudo random number 134 is a data sequence of Za1, Za2,... Shown in the figure. For example, each of Zai generates a 1-byte (8 bits) pseudorandom sequence: Za1, Za2,. To the logical OR (XOR) operation unit 122.

一方、第2秘密鍵(KL)133は、線形フィードバックシフトレジスタ(LFSR)121に入力される。
線形フィードバックシフトレジスタ(LFSR)121を構成するレジスタに、第2秘密鍵(KL)133の構成ビットがセットされる。この第2秘密鍵(KL)のセット状態をLFSRの初期状態とする。
その後、線形フィードバックシフトレジスタ(LFSR)121は、規定のシフト動作を順次、実行して、LFSR出力135を生成して出力する。
LFSR出力135は、図に示すO1,O2,・・・のデータシーケンスである。例えば、Oiの各々が1バイト(8ビット)のLFSR出力シーケンス:O1,O2,・・・を生成して排他的論理和(XOR)演算部122に出力する。
On the other hand, the second secret key (KL) 133 is input to the linear feedback shift register (LFSR) 121.
A configuration bit of the second secret key (KL) 133 is set in a register configuring the linear feedback shift register (LFSR) 121. This set state of the second secret key (KL) is the initial state of the LFSR.
Thereafter, the linear feedback shift register (LFSR) 121 sequentially executes a prescribed shift operation to generate and output the LFSR output 135.
The LFSR output 135 is a data sequence of O1, O2,. For example, each Oi generates a 1-byte (8-bit) LFSR output sequence: O 1, O 2,... And outputs it to the exclusive OR (XOR) operation unit 122.

線形フィードバックシフトレジスタ(LFSR)121に設定するレジスタ数(設定可能なビット数)は、第2秘密鍵(KL)の鍵長k bit以上とする(k'とする)。周期も最長周期2k'−1となるように、LFSR出力系列の特性を決める特性多項式は、k'次の原始多項式を用いる。 The number of registers (number of bits that can be set) set in the linear feedback shift register (LFSR) 121 is not less than the key length k bits of the second secret key (KL) (denoted k ′). A k′-order primitive polynomial is used as a characteristic polynomial for determining the characteristics of the LFSR output sequence so that the period is the longest period 2 k ′ −1.

線形フィードバックシフトレジスタ(LFSR)121の構成例について、図6、図7を参照して説明する。
図6は、線形フィードバックシフトレジスタ(LFSR)121に入力する第2秘密鍵(KL)133が128ビットデータであり、線形フィードバックシフトレジスタ(LFSR)121のレジスタ数(設定可能なビット数)も128としたLFSRの構成例である。
まず、レジスタD1〜D128の各々に第2秘密鍵(KL)133の構成ビットをセットする。この状態を初期状態とする。
その後、シフト処理として、
レジスタD1の格納ビット(X1)をレジスタD2、
レジスタD2の格納ビット(X2)をレジスタD3、
・・・
レジスタD127の格納ビット(X127)をレジスタD128、
このように1ビットシフトを行う。
A configuration example of the linear feedback shift register (LFSR) 121 will be described with reference to FIGS.
In FIG. 6, the second secret key (KL) 133 input to the linear feedback shift register (LFSR) 121 is 128-bit data, and the number of registers (the number of bits that can be set) of the linear feedback shift register (LFSR) 121 is also 128. This is a configuration example of the LFSR.
First, the constituent bits of the second secret key (KL) 133 are set in each of the registers D1 to D128. This state is the initial state.
After that, as a shift process,
The storage bit (X1) of the register D1 is set to the register D2,
The storage bit (X2) of the register D2 is set to the register D3,
...
The storage bit (X127) of the register D127 is set to the register D128,
Thus, 1-bit shift is performed.

レジスタD1には、以下のデータ(更新D1)を格納する。
更新D1=X128(+)X126(+)X101(+)X99
なお、上記式において、(+)は排他的論理和(XOR)を意味する。
図6に示すLFSRは、出力系列の特性を決める特性多項式として、以下の原始多項式f(x)を用いたLFSRである。
f(x)=X128(+)X126(+)X101(+)X99(+)1
図6に示すLFSRは、この多項式f(x)によって規定される構造を持つLFSRである。
The following data (update D1) is stored in the register D1.
Update D1 = X 128 (+) X 126 (+) X 101 (+) X 99
In the above formula, (+) means exclusive OR (XOR).
The LFSR shown in FIG. 6 is an LFSR using the following primitive polynomial f (x) as a characteristic polynomial that determines the characteristics of the output sequence.
f (x) = X 128 (+) X 126 (+) X 101 (+) X 99 (+) 1
The LFSR shown in FIG. 6 is an LFSR having a structure defined by this polynomial f (x).

レジスタD128から1ビットデータが、順次、出力される。この出力ビットの所定単位のデータ、たとえば1バイト(8ビット)データを、1つのLFSR出力Oiとして設定する。
図5に示すLFSR出力135は、各々が1バイト(8ビット)データからなるデータシーケンス:O1,O2,O3であり、これをLFSR出力135として排他的論理和(XOR)演算部122に出力する。
1-bit data is sequentially output from the register D128. Data of a predetermined unit of the output bits, for example, 1 byte (8 bits) data is set as one LFSR output Oi.
The LFSR output 135 shown in FIG. 5 is a data sequence: O1, O2, and O3 each consisting of 1 byte (8 bits) data, and this is output to the exclusive OR (XOR) operation unit 122 as the LFSR output 135. .

図6に示すLFSRは、線形フィードバックシフトレジスタ(LFSR)121に入力する第2秘密鍵(KL)133が128ビットデータである場合のLFSR構成例である。
次に、図7を参照して、線形フィードバックシフトレジスタ(LFSR)121に入力する第2秘密鍵(KL)133が64ビットデータである場合のLFSR構成例について説明する。
The LFSR shown in FIG. 6 is an example of the LFSR configuration when the second secret key (KL) 133 input to the linear feedback shift register (LFSR) 121 is 128-bit data.
Next, an exemplary LFSR configuration when the second secret key (KL) 133 input to the linear feedback shift register (LFSR) 121 is 64-bit data will be described with reference to FIG.

図7は、線形フィードバックシフトレジスタ(LFSR)121に入力する第2秘密鍵(KL)133が64ビットデータであり、線形フィードバックシフトレジスタ(LFSR)121のレジスタ数(設定可能なビット数)も64としたLFSRの構成例である。   In FIG. 7, the second secret key (KL) 133 input to the linear feedback shift register (LFSR) 121 is 64-bit data, and the number of registers (number of bits that can be set) of the linear feedback shift register (LFSR) 121 is also 64. This is a configuration example of the LFSR.

図7に示すLFSRは、1ビットレジスタD1〜D64を持つ。これらのレジスタD1〜D64の各々に第2秘密鍵(KL)133の構成ビットをセットする。この状態を初期状態とする。
その後、シフト処理として、
レジスタD1の格納ビット(X1)をレジスタD2、
レジスタD2の格納ビット(X2)をレジスタD3、
・・・
レジスタD63の格納ビット(X63)をレジスタD64、
このように1ビットシフトを行う。
The LFSR shown in FIG. 7 has 1-bit registers D1 to D64. The constituent bits of the second secret key (KL) 133 are set in each of these registers D1 to D64. This state is the initial state.
After that, as a shift process,
The storage bit (X1) of the register D1 is set to the register D2,
The storage bit (X2) of the register D2 is set to the register D3,
...
The storage bit (X63) of register D63 is set in register D64,
Thus, 1-bit shift is performed.

レジスタD1には、以下のデータ(更新D1)を格納する。
更新D1=X64(+)X63(+)X61(+)X60
なお、上記式において、(+)は排他的論理和(XOR)を意味する。
図7に示すLFSRは、出力系列の特性を決める特性多項式として、以下の原始多項式f(x)を用いたLFSRである。
f(x)=X64(+)X63(+)X61(+)X60(+)1
The following data (update D1) is stored in the register D1.
Update D1 = X64 (+) X63 (+) X61 (+) X60
In the above formula, (+) means exclusive OR (XOR).
The LFSR shown in FIG. 7 is an LFSR that uses the following primitive polynomial f (x) as a characteristic polynomial that determines the characteristics of the output sequence.
f (x) = X 64 (+) X 63 (+) X 61 (+) X 60 (+) 1

図7に示すLFSRは、上記の多項式f(x)によって規定される構造を持つLFSRである。
レジスタD64から1ビットデータが、順次、出力される。この出力ビットの所定単位のデータ、たとえば1バイト(8ビット)データを、1つのLFSR出力Oiとして設定する。
The LFSR shown in FIG. 7 is an LFSR having a structure defined by the polynomial f (x).
1-bit data is sequentially output from the register D64. Data of a predetermined unit of the output bits, for example, 1 byte (8 bits) data is set as one LFSR output Oi.

図5に示す暗号処理構成において、LFSR出力135は、各々が1バイト(8ビット)データからなるデータシーケンス:O1,O2,O3であり、これをLFSR出力135として排他的論理和(XOR)演算部122に出力する。   In the cryptographic processing configuration shown in FIG. 5, the LFSR output 135 is a data sequence: O1, O2, and O3 each consisting of 1 byte (8 bits) data, and this is used as the LFSR output 135 to perform an exclusive OR (XOR) operation. To the unit 122.

図6、図7を参照して、第2秘密鍵(KL)が128ビット鍵である場合と、64ビット鍵である場合のLFSRの構成例を説明した。図5に示すLFSR121は、これらの他にも、第2秘密鍵(KL)133のビット長に応じた様々な設定が可能である。   With reference to FIGS. 6 and 7, the configuration example of the LFSR when the second secret key (KL) is a 128-bit key and a 64-bit key has been described. In addition to these, the LFSR 121 shown in FIG. 5 can be variously set according to the bit length of the second secret key (KL) 133.

図5に示す構成において、排他的論理和(XOR)演算部122では、以下の2つのデータ(a),(b)の排他的論理和(XOR)演算を実行して、キーストリームZb1,Zb2,Zb3・・・を生成して出力する。
(a)第1秘密鍵(Ks)131に基づいて、鍵スケジュール部111、擬似乱数生成部112の処理によって生成された擬似乱数:Za1,Za2,Za3・・・
(b)第2秘密鍵(KL)133に基づいて、線形フィードバックシフトレジスタ(LFSR)121から出力されるLFSR出力:O1,O2,O3・・・
In the configuration shown in FIG. 5, the exclusive OR (XOR) operation unit 122 performs the following exclusive OR (XOR) operation of the two data (a) and (b) to generate the key streams Zb1 and Zb2. , Zb3... Are generated and output.
(A) Pseudorandom numbers generated by the processes of the key schedule unit 111 and the pseudorandom number generation unit 112 based on the first secret key (Ks) 131: Za1, Za2, Za3.
(B) LFSR output output from the linear feedback shift register (LFSR) 121 based on the second secret key (KL) 133: O1, O2, O3.

擬似乱数:Za1,Za2,Za3・・・の各々と、LFSR出力:O1,O2,O3・・・の各々のデータは、同一ビット数、例えば1バイト(8ビット)データである。
排他的論理和(XOR)演算部122では、これら2つのデータ、すなわち、
擬似乱数:Za1,Za2,Za3・・・
LFSR出力:O1,O2,O3・・・
これらのデータの排他的論理和(XOR)演算を実行して、キーストリームZb1,Zb2,Zb3・・・を生成して出力する。
キーストリームZb1,Zb2,Zb3・・・は、以下の算出式によって生成される。
Zb1=Za1(+)O1、
Zb2=Za2(+)O2、
Zb3=Za3(+)O3、
・・・
なお、上記式において、(+)は排他的論理和演算(XOR)を意味する。
Each of the pseudo random numbers: Za1, Za2, Za3... And the LFSR output: O1, O2, O3... Has the same number of bits, for example, 1 byte (8 bits) data.
In the exclusive OR (XOR) operation unit 122, these two data, that is,
Pseudo-random numbers: Za1, Za2, Za3 ...
LFSR output: O1, O2, O3 ...
An exclusive OR (XOR) operation of these data is executed to generate and output key streams Zb1, Zb2, Zb3.
The key streams Zb1, Zb2, Zb3... Are generated by the following calculation formula.
Zb1 = Za1 (+) O1,
Zb2 = Za2 (+) O2,
Zb3 = Za3 (+) O3,
...
In the above formula, (+) means exclusive OR (XOR).

キーストリーム136は、各々が所定ビット単位のデータからなるデータ列によって構成される。具体的には例えば各々が1バイト(8ビット)データからなるデータ列:Zb1,Zb2,Zb3,・・・である。
このように、キーストリーム生成部110の排他的論理和(XOR)演算部122は、各々が所定長のデータからなるデータ列:Zb1,Zb2,Zb3,・・・をキーストリームとして順次、出力する。
The key stream 136 is composed of a data string that is composed of data of a predetermined bit unit. Specifically, for example, a data string consisting of 1-byte (8-bit) data: Zb1, Zb2, Zb3,.
As described above, the exclusive OR (XOR) operation unit 122 of the key stream generation unit 110 sequentially outputs the data strings: Zb1, Zb2, Zb3,. .

キーストリーム構成要素である所定ビット単位のデータ:Zb1,Zb2,Zb3,・・・の各々は、排他的論理和演算部123において、暗号処理対象となる平文141の所定データ単位の分割データ:P1,P2,P3・・・の各々と排他的論理和(XOR)演算が実行される。
この排他的論理和演算結果として算出するデータ列:C1,C2,C3・・・を、暗号文142として出力する。
Each of the predetermined bit unit data: Zb1, Zb2, Zb3,..., Which is a key stream component, is divided into predetermined data units of plaintext 141 to be encrypted by the exclusive OR operation unit 123: P1. , P2, P3,... And an exclusive OR (XOR) operation is performed.
The data string C1, C2, C3... Calculated as the exclusive OR operation result is output as the ciphertext 142.

暗号文C1,C2,C3・・・と、キーストリーム:Zb1,Zb2,Z3・・・と、平文P1,P2,P3・・・との関係は以下の通りである。
C1=P1(+)Zb1
C2=P2(+)Zb2
C3=P3(+)Zb3
・・・
なお、上記式において(+)は、排他的論理和演算を意味する。
また、平文の構成要素Pi、キーストリームの構成要素Zbi、暗号文構成要素Ci、これらの各構成要素は、いずれも同一ビット数、例えば1バイト(8ビット)のデータである。
The ciphertexts C1, C2, C3..., The key streams: Zb1, Zb2, Z3... And the plaintexts P1, P2, P3.
C1 = P1 (+) Zb1
C2 = P2 (+) Zb2
C3 = P3 (+) Zb3
...
In the above formula, (+) means exclusive OR operation.
Also, the plaintext component Pi, the key stream component Zbi, the ciphertext component Ci, and each of these components are data of the same number of bits, for example, 1 byte (8 bits).

このように、本実施例1に従ったストリーム暗号による暗号文生成処理は、以下のステップ(Sa1)〜(Sa4)を実行することで行われる。
(Sa1)秘密のパラメータである第1秘密鍵(Ks)と、公開パラメータである初期ベクトル(IV:Initial Vector)から、擬似乱数系列Za1,Za2,Za3・・・を生成する。
(Sa2)秘密のパラメータである第2秘密鍵(KL)から、LFSR出力系列O1,O2,O3・・・を生成する。
(Sa3)擬似乱数系列Za1,Za2,Za3・・・と、LFSR出力系列O1,O2,O3・・・との排他的論理和(XOR)により、キーストリームZb1,Zb2,Zb3・・・を生成する。
(Sa4)平文の構成データP1,P2,P3・・・と、生成したキーストリームZb1,Zb2,Zb3・・・の排他的論理和をとることにより、暗号文C1,C2,C3・・・を生成する。
As described above, the ciphertext generation process using the stream cipher according to the first embodiment is performed by executing the following steps (Sa1) to (Sa4).
(Sa1) A pseudo random number sequence Za1, Za2, Za3... Is generated from a first secret key (Ks) that is a secret parameter and an initial vector (IV) that is a public parameter.
(Sa2) The LFSR output series O1, O2, O3... Is generated from the second secret key (KL) which is a secret parameter.
(Sa3) Key streams Zb1, Zb2, Zb3,... Are generated by exclusive OR (XOR) of pseudo-random number sequences Za1, Za2, Za3... And LFSR output sequences O1, O2, O3. To do.
(Sa4) The ciphertexts C1, C2, C3... Are obtained by taking the exclusive OR of the plaintext configuration data P1, P2, P3... And the generated key streams Zb1, Zb2, Zb3. Generate.

図5を参照して説明した処理によって生成された暗号文142は、例えば、ネットワークを介して転送され、他のユーザの情報処理装置によって受信され、復号処理が実行される。
図8は、本実施例1に従った復号処理について説明する図である。
本実施例1のストリーム暗号に従った暗号処理と復号処理は、同一の装置構成を用いて実現される。
For example, the ciphertext 142 generated by the processing described with reference to FIG. 5 is transferred via a network, received by an information processing apparatus of another user, and decrypted.
FIG. 8 is a diagram illustrating the decoding process according to the first embodiment.
The encryption process and the decryption process according to the stream cipher of the first embodiment are realized using the same device configuration.

図8に示す構成において、キーストリーム生成部210は、第1秘密鍵(Ks)231と、初期ベクトル(IV:Initial Vector)232、さらに、第2秘密鍵(KL)233を入力して、キーストリーム(擬似乱数)236を生成する。   In the configuration shown in FIG. 8, the key stream generation unit 210 inputs a first secret key (Ks) 231, an initial vector (IV: Initial Vector) 232, and a second secret key (KL) 233. A stream (pseudo random number) 236 is generated.

第1秘密鍵(Ks)231と、初期ベクトル(IV)232と、第2秘密鍵(KL)233は、暗号処理を実行する装置、例えばユーザの情報処理装置に予め格納されたデータである。
第1秘密鍵(Ks)231と、第2秘密鍵(KL)233は、秘密情報であり、公開されたデータではない。特定のユーザ間、例えば暗号文生成ユーザと、暗号文を復号するユーザ間で共有される秘密情報である。
すなわち、復号対象とする暗号文142が、図5に示す構成によって生成された暗号文142である場合、第1秘密鍵(Ks)231は、図5に示す暗号処理において適用した第1秘密鍵(Ks)131と同一の鍵である。
また、第2秘密鍵(KL)233は、図5に示す暗号処理において適用した第2秘密鍵(Ks)133と同一の鍵である。
The first secret key (Ks) 231, the initial vector (IV) 232, and the second secret key (KL) 233 are data stored in advance in a device that performs cryptographic processing, for example, a user information processing device.
The first secret key (Ks) 231 and the second secret key (KL) 233 are secret information and are not public data. This is secret information shared between specific users, for example, ciphertext generation users and users who decrypt ciphertexts.
That is, when the ciphertext 142 to be decrypted is the ciphertext 142 generated by the configuration shown in FIG. 5, the first secret key (Ks) 231 is the first secret key applied in the encryption process shown in FIG. (Ks) 131 is the same key.
The second secret key (KL) 233 is the same key as the second secret key (Ks) 133 applied in the encryption process shown in FIG.

一方、初期ベクトル(IV)232は、公開データであり、不特定多数のユーザが知ることができるデータである。
復号対象とする暗号文142が、図5に示す構成によって生成された暗号文142である場合、初期ベクトル(IV)232も、図5に示す暗号処理において適用した初期ベクトル(IV)132と同一のデータである。
On the other hand, the initial vector (IV) 232 is public data and is data that can be known by an unspecified number of users.
When the ciphertext 142 to be decrypted is the ciphertext 142 generated by the configuration shown in FIG. 5, the initial vector (IV) 232 is also the same as the initial vector (IV) 132 applied in the encryption processing shown in FIG. It is data of.

キーストリーム生成部210は、鍵スケジュール部211と、擬似乱数生成部212、さらに、線形フィードバックシフトレジスタ(LFSR)221と、排他的論理和(XOR)演算部222を有する。
鍵スケジュール部211は、第1秘密鍵(Ks)231と、初期ベクトル(IV)232に基づいて、擬似乱数生成用初期データを生成して擬似乱数生成部212に出力する。
擬似乱数生成部212は、鍵スケジュール部211から入力する擬似乱数生成用初期データを適用して擬似乱数234を生成して出力する。擬似乱数234は、図に示すZa1,Za2,・・・のデータシーケンスであり、例えば、Zaiの各々が1バイト(8ビット)の擬似乱数シーケンス:Za1,Za2,・・・を生成して排他的論理和(XOR)演算部222に出力する。
The key stream generation unit 210 includes a key schedule unit 211, a pseudo random number generation unit 212, a linear feedback shift register (LFSR) 221, and an exclusive OR (XOR) calculation unit 222.
The key schedule unit 211 generates pseudo random number generation initial data based on the first secret key (Ks) 231 and the initial vector (IV) 232 and outputs the generated initial data to the pseudo random number generation unit 212.
The pseudo random number generation unit 212 generates pseudo random numbers 234 by applying the pseudo random number generation initial data input from the key schedule unit 211 and outputs the pseudo random numbers 234. The pseudo random number 234 is a data sequence of Za1, Za2,... Shown in the figure. For example, each of Zai generates a 1-byte (8 bits) pseudorandom sequence: Za1, Za2,. To the logical OR (XOR) operation unit 222.

一方、第2秘密鍵(KL)233は、線形フィードバックシフトレジスタ(LFSR)221に入力される。
線形フィードバックシフトレジスタ(LFSR)221を構成するレジスタに、第2秘密鍵(KL)233の構成ビットがセットされる。この第2秘密鍵(KL)のセット状態をLFSRの初期状態とする。
その後、線形フィードバックシフトレジスタ(LFSR)221は、規定のシフト動作を順次、実行して、LFSR出力235を生成して出力する。
LFSR出力235は、図に示すO1,O2,・・・のデータシーケンスであり、例えば、Oiの各々が1バイト(8ビット)のLFSR出力シーケンス:O1,O2,・・・を生成して排他的論理和(XOR)演算部222に出力する。
On the other hand, the second secret key (KL) 233 is input to the linear feedback shift register (LFSR) 221.
A configuration bit of the second secret key (KL) 233 is set in a register configuring the linear feedback shift register (LFSR) 221. This set state of the second secret key (KL) is the initial state of the LFSR.
Thereafter, the linear feedback shift register (LFSR) 221 sequentially executes a prescribed shift operation to generate and output the LFSR output 235.
The LFSR output 235 is a data sequence of O1, O2,... Shown in the figure. For example, each Oi generates a 1-byte (8-bit) LFSR output sequence: O1, O2,. To the logical OR (XOR) operation unit 222.

図8に示すキーストリーム生成部210の構成は、図5を参照して説明したキーストリーム生成部110の構成と同一構成である。
線形フィードバックシフトレジスタ(LFSR)221の具体例として図6、図7を参照して2つの例を説明したが、暗号処理に用いたLFSRと復号処理に用いるLFSRは同一構成とする。
図8に示すキーストリーム生成部210の構成を、図5を参照して説明したキーストリーム生成部110の構成と同一とし、入力する各データ、すなわち、第1秘密鍵(Ks)、初期ベクトル(IV)、第2秘密鍵(KL)を同一とすることで、いずれにおいても同一のキーストリームZb1,Zb2,Zb3・・が生成される。
The configuration of the key stream generation unit 210 illustrated in FIG. 8 is the same as the configuration of the key stream generation unit 110 described with reference to FIG.
Two specific examples of the linear feedback shift register (LFSR) 221 have been described with reference to FIGS. 6 and 7. The LFSR used for the encryption process and the LFSR used for the decryption process have the same configuration.
The configuration of the key stream generation unit 210 shown in FIG. 8 is the same as the configuration of the key stream generation unit 110 described with reference to FIG. 5, and each input data, that is, the first secret key (Ks), the initial vector ( IV), by making the second secret key (KL) the same, the same key stream Zb1, Zb2, Zb3,.

図8に示す構成において、排他的論理和(XOR)演算部222では、以下の2つのデータ(a),(b)の排他的論理和(XOR)演算を実行して、キーストリームZb1,Zb2,Zb3・・・を生成して出力する。
(a)第1秘密鍵(Ks)231に基づいて、鍵スケジュール部211、擬似乱数生成部212の処理によって生成された擬似乱数:Za1,Za2,Za3・・・
(b)第2秘密鍵(KL)233に基づいて、線形フィードバックシフトレジスタ(LFSR)221から出力されるLFSR出力:O1,O2,O3・・・
In the configuration shown in FIG. 8, the exclusive OR (XOR) operation unit 222 executes the exclusive OR (XOR) operation of the following two data (a) and (b) to generate the key streams Zb1 and Zb2. , Zb3... Are generated and output.
(A) Pseudorandom numbers generated by the processes of the key schedule unit 211 and the pseudorandom number generation unit 212 based on the first secret key (Ks) 231: Za1, Za2, Za3.
(B) LFSR output output from the linear feedback shift register (LFSR) 221 based on the second secret key (KL) 233: O1, O2, O3.

擬似乱数:Za1,Za2,Za3・・・の各々と、LFSR出力:O1,O2,O3・・・の各々のデータは、同一ビット数、例えば1バイト(8ビット)データである。
排他的論理和(XOR)演算部222では、これら2つのデータ、すなわち、
擬似乱数:Za1,Za2,Za3・・・
LFSR出力:O1,O2,O3・・・
これらのデータの排他的論理和(XOR)演算を実行して、キーストリームZb1,Zb2,Zb3・・・を生成して出力する。
キーストリームZb1,Zb2,Zb3・・・は、以下の算出式によって生成される。
Zb1=Za1(+)O1、
Zb2=Za2(+)O2、
Zb3=Za3(+)O3、
・・・
なお、上記式において、(+)は排他的論理和演算(XOR)を意味する。
Each of the pseudo random numbers: Za1, Za2, Za3... And the LFSR output: O1, O2, O3... Has the same number of bits, for example, 1 byte (8 bits) data.
In the exclusive OR (XOR) operation unit 222, these two data, that is,
Pseudo-random numbers: Za1, Za2, Za3 ...
LFSR output: O1, O2, O3 ...
An exclusive OR (XOR) operation of these data is executed to generate and output key streams Zb1, Zb2, Zb3.
The key streams Zb1, Zb2, Zb3... Are generated by the following calculation formula.
Zb1 = Za1 (+) O1,
Zb2 = Za2 (+) O2,
Zb3 = Za3 (+) O3,
...
In the above formula, (+) means exclusive OR (XOR).

キーストリーム236は、各々が所定ビット単位のデータからなるデータ列によって構成される。具体的には例えば各々が1バイト(8ビット)データからなるデータ列:Zb1,Zb2,Zb3,・・・である。
このように、キーストリーム生成部210の排他的論理和(XOR)演算部222は、各々が所定長のデータからなるデータ列:Zb1,Zb2,Zb3,・・・をキーストリームとして順次、出力する。
The key stream 236 is composed of a data string that is composed of data in predetermined bit units. Specifically, for example, a data string consisting of 1-byte (8-bit) data: Zb1, Zb2, Zb3,.
As described above, the exclusive OR (XOR) calculation unit 222 of the key stream generation unit 210 sequentially outputs a data string consisting of data of a predetermined length: Zb1, Zb2, Zb3,. .

キーストリーム構成要素である所定ビット単位のデータ:Zb1,Zb2,Zb3,・・・の各々は、排他的論理和演算部223において、復号処理対象となる暗号文142の所定データ単位の分割データ:C1,C2,C3・・・の各々と排他的論理和(XOR)演算が実行される。
この排他的論理和演算結果として算出するデータ列:P1,P2,P3・・・が、復号結果としての平文141となる。
Each of predetermined bit unit data: Zb1, Zb2, Zb3,... Which is a key stream constituent element is divided into predetermined data units of the ciphertext 142 to be decrypted by the exclusive OR operation unit 223: An exclusive OR (XOR) operation is performed with each of C1, C2, C3.
The data string: P1, P2, P3... Calculated as the exclusive OR operation result becomes the plaintext 141 as the decryption result.

平文P1,P2,PC3・・・と、キーストリーム:Zb1,Zb2,Zb3・・・と、暗号文C1,C2,C3・・・との関係は以下の通りである。
P1=C1(+)Zb1
P2=C2(+)Zb2
P3=C3(+)Zb3
・・・
なお、上記式において(+)は、排他的論理和演算を意味する。
また、平文の構成要素Pi、キーストリームの構成要素Zbi、暗号文構成要素Ci、これらの各構成要素は、いずれも同一ビット数、例えば1バイト(8ビット)のデータである。
The plaintext P1, P2, PC3..., The key streams: Zb1, Zb2, Zb3... And the ciphertexts C1, C2, C3.
P1 = C1 (+) Zb1
P2 = C2 (+) Zb2
P3 = C3 (+) Zb3
...
In the above formula, (+) means exclusive OR operation.
Also, the plaintext component Pi, the key stream component Zbi, the ciphertext component Ci, and each of these components are data of the same number of bits, for example, 1 byte (8 bits).

このように、本実施例1に従ったストリーム暗号による復号処理は、以下のステップ(Sb1)〜(Sb4)を実行することで行われる。
(Sb1)秘密のパラメータである第1秘密鍵(Ks)と、公開パラメータである初期ベクトル(IV:Initial Vector)から、擬似乱数系列Za1,Za2,Za3・・・を生成する。
(Sb2)秘密のパラメータである第2秘密鍵(KL)から、LFSR出力系列O1,O2,O3・・・を生成する。
(Sb3)擬似乱数系列Za1,Za2,Za3・・・と、LFSR出力系列O1,O2,O3・・・との排他的論理和(XOR)により、キーストリームZb1,Zb2,Zb3・・・を生成する。
(Sb4)暗号文C1,C2,C3・・・と、生成したキーストリームZb1,Zb2,Zb3・・・の排他的論理和をとることにより、平文の構成データP1,P2,P3・・・を生成する。
As described above, the decryption process using the stream cipher according to the first embodiment is performed by executing the following steps (Sb1) to (Sb4).
(Sb1) A pseudo random number sequence Za1, Za2, Za3,... Is generated from a first secret key (Ks) that is a secret parameter and an initial vector (IV) that is a public parameter.
(Sb2) The LFSR output series O1, O2, O3... Is generated from the second secret key (KL) which is a secret parameter.
(Sb3) Key streams Zb1, Zb2, Zb3,... Are generated by exclusive OR (XOR) of pseudo random number sequences Za1, Za2, Za3,... And LFSR output sequences O1, O2, O3,. To do.
(Sb4) By taking an exclusive OR of the ciphertexts C1, C2, C3... And the generated key streams Zb1, Zb2, Zb3..., Plaintext configuration data P1, P2, P3. Generate.

平文生成処理において、ステップ(Sb4)で実行する排他的論理和の性質上、暗号文生成時に利用したキーストリームと同じキーストリームを用いて、暗号文の排他的論理和をとることにより平文を得ることができる。   In the plaintext generation process, the plaintext is obtained by taking the exclusive OR of the ciphertext using the same key stream as the keystream used at the time of ciphertext generation due to the property of the exclusive OR executed in step (Sb4). be able to.

なお、本実施例では、共通の秘密情報として、第1秘密鍵(Ks)と、第2秘密鍵(KL)を送信者と受信者で安全に共有することにより、暗号化および復号処理が可能となる。   In the present embodiment, encryption and decryption processing can be performed by securely sharing the first secret key (Ks) and the second secret key (KL) as common secret information between the sender and the receiver. It becomes.

この実施例1では、先に図1、図2を参照して説明した従来のストリーム暗号処理構成と比較して、例えば以下の優位性を持つ。   The first embodiment has, for example, the following advantages over the conventional stream encryption processing configuration described above with reference to FIGS.

(A)安全性の優位性について
例えば、擬似乱数生成部112の出力する擬似乱数Za1,Za2,・・・に偏りがあった場合においても、偏りのあるこれらの擬似乱数Za1,Za2,・・・に対して、0、1の出現頻度が均一なLFSRの出力O1,O2・・・を、排他的論理和(XOR)演算を施して新たなキーストリームZb1,Zb2,・・・を生成することで、偏りを取り除くことができる。
(A) Superiority of safety For example, even when the pseudorandom numbers Za1, Za2,... Output from the pseudorandom number generator 112 are biased, these pseudorandom numbers Za1, Za2,. .., And the LFSR outputs O1, O2,... With uniform appearance frequencies of 0, 1 are subjected to an exclusive OR (XOR) operation to generate new key streams Zb1, Zb2,. Thus, the bias can be removed.

この偏りが除去されたキーストリームZb1,Zb2,・・・を平文に対して適用するため、偏りのないキーストリームを適用した暗号処理が可能となる。
この処理によって、先に図4を参照して説明したブロードキャスト・セッティングを利用した平文回復攻撃を防ぐことができる。
Since the key streams Zb1, Zb2,... From which the bias has been removed are applied to plaintext, it is possible to perform encryption processing using a key stream having no bias.
This processing can prevent a plaintext recovery attack using the broadcast setting described above with reference to FIG.

例えばLFSR出力Oiは、各々の値が等確率で生成されるため、ランダムに第1秘密鍵(Ks)と、第2秘密鍵(KL)が与えられる場合、第1秘密鍵(Ks)に基づいて生成される擬似乱数(Zi)、および第2秘密鍵(KL)に基づいて生成されるLFSR出力(Oi)の値の分布は一様になる。   For example, the LFSR output Oi is generated based on the first secret key (Ks) when the first secret key (Ks) and the second secret key (KL) are randomly given because each value is generated with equal probability. The distribution of values of the LFSR output (Oi) generated based on the pseudo random number (Zi) generated in this way and the second secret key (KL) is uniform.

また、仮にLFSRの出力が攻撃者に露呈した場合は、LFSRの性質上、第2秘密鍵(KL)は露呈してしまう。しかしながら、第2秘密鍵(KL)の露呈は、第1秘密鍵(Ks)の露呈には影響しない。従って、全体の安全性は元々のストリーム暗号の安全性より低下しないことが保障される。なお、暗号文等からLFSRの出力を推定するためには、キーストリーム生成部内部の排他的論理和処理以前の擬似乱数系列の推定が必要となり、この推定は極めて困難となる。   Further, if the output of the LFSR is exposed to the attacker, the second secret key (KL) is exposed due to the nature of the LFSR. However, the exposure of the second secret key (KL) does not affect the exposure of the first secret key (Ks). Therefore, it is ensured that the overall security does not deteriorate from the security of the original stream cipher. In order to estimate the output of the LFSR from ciphertext or the like, it is necessary to estimate a pseudo-random number sequence before exclusive OR processing inside the key stream generation unit, and this estimation becomes extremely difficult.

(B)実装コストの優位性について
本実施例1において用いる線形フィードバックシフトレジスタ(LFSR)はレジスタと排他的論理和(XOR)演算処理構成のみで実装可能であり、H/W(ハードウェア)で構成した場合の実装コストが小さい。そのため、既存のシステムに付加しても大きなコストアップにならない。また。S/W(ソフトウェア)実装とした場合においても高速処理が可能であり、RC4など、既存のストリーム暗号のパフォーマンスを低下させない。さらにLFSRは同期を取るために必要なカウンターとして用いることも可能であり、他の用途に利用することもできる。
(B) Superiority of mounting cost The linear feedback shift register (LFSR) used in the first embodiment can be mounted only by a register and an exclusive OR (XOR) arithmetic processing configuration, and is H / W (hardware). The implementation cost when configured is small. For this reason, even if it is added to an existing system, the cost will not increase. Also. Even in the case of S / W (software) implementation, high-speed processing is possible, and performance of existing stream ciphers such as RC4 is not deteriorated. Further, the LFSR can be used as a counter necessary for synchronization, and can be used for other purposes.

なお、本実施例1を適用可能な既存のストリーム暗号の一例として、例えば、秘密鍵(Ks)として128ビット鍵を適用した128ビットキーRC4がある。
この128ビットキーRC4に本実施例1を適用する場合、秘密鍵(Ks)のサイズを128ビットとし、第2秘密鍵(KL)のビットサイズ、およびLFSRのレジスタ数(セット可能なビット数)のサイズを128ビット、LFSRの周期を最大周期2128−1となるようにLFSRを選択する。
具体的には、LFSRは、先に図6を参照して説明した構成とし、LFSRの構成を規定する特性多項式は、以下の128次の原始多項式とする。
f(x)=X128(+)X126(+)X101(+)X99(+)1
An example of an existing stream cipher to which the first embodiment is applicable is a 128-bit key RC4 to which a 128-bit key is applied as a secret key (Ks), for example.
When the first embodiment is applied to the 128-bit key RC4, the size of the secret key (Ks) is 128 bits, the bit size of the second secret key (KL), and the number of LFSR registers (number of bits that can be set) The LFSR is selected such that the size of the LFSR is 128 bits and the LFSR cycle is the maximum cycle 2 128 −1.
Specifically, the LFSR has the configuration described above with reference to FIG. 6, and the characteristic polynomial that defines the configuration of the LFSR is the following 128th order primitive polynomial.
f (x) = X 128 (+) X 126 (+) X 101 (+) X 99 (+) 1

既存のストリーム暗号RC4に、例えば図6を参照して説明したLFSRと、排他的論理和演算部を付加することで、図5を参照して説明したキーストリーム生成部110を構成することが可能である。すなわち、既存の構成をそのまま利用して複数の構成要素を追加するのみで安全性を高めた暗号処理構成を実現することができる。   For example, by adding the LFSR described with reference to FIG. 6 and the exclusive OR operation unit to the existing stream cipher RC4, the key stream generation unit 110 described with reference to FIG. 5 can be configured. It is. In other words, it is possible to realize an encryption processing configuration with improved security simply by adding a plurality of components using the existing configuration as it is.

[2−2.秘密鍵(Ks)に基づくLFSR出力を適用してキーストリームを生成する実施例(実施例2)]
次に、実施例2として、線形フィードバックシフトレジスタ(LFSR)に、鍵スケジュール部に入力する秘密鍵(Ks)と同じ秘密鍵(Ks)を入力して、LFSRの初期状態を設定する実施例について説明する。
すなわち、秘密鍵(Ks)に基づいて鍵スケジュール部と擬似乱数生成部の処理によって生成した擬似乱数と、同じ秘密鍵(Ks)に基づくLFSRからの出力とを排他的論理和(XOR)したデータをキーストリームとする実施例である。
[2-2. Embodiment in which key stream is generated by applying LFSR output based on secret key (Ks) (second embodiment)]
Next, as a second embodiment, the same secret key (Ks) as the secret key (Ks) input to the key schedule unit is input to the linear feedback shift register (LFSR) to set the initial state of the LFSR. explain.
That is, data obtained by performing an exclusive OR (XOR) of a pseudo random number generated by processing of the key schedule unit and the pseudo random number generation unit based on the secret key (Ks) and an output from the LFSR based on the same secret key (Ks) Is a key stream.

図9に本実施例2の暗号処理を実行する暗号処理装置の構成例を示す。
図9に示すキーストリーム生成部110は、先に実施例1の構成として説明した図5に示すキーストリーム生成部110と同一の構成である。
図1に示す構成との差異は、図9に示すキーストリーム生成部110の線形フィードバックシフトレジスタ(LFSR)121に対して、第1秘密鍵(Ks)を入力している点である。
FIG. 9 shows a configuration example of a cryptographic processing apparatus that executes the cryptographic processing of the second embodiment.
The key stream generation unit 110 illustrated in FIG. 9 has the same configuration as the key stream generation unit 110 illustrated in FIG. 5 described above as the configuration of the first embodiment.
The difference from the configuration shown in FIG. 1 is that the first secret key (Ks) is input to the linear feedback shift register (LFSR) 121 of the key stream generation unit 110 shown in FIG.

すなわち、実施例2では、図5に示す第2秘密鍵(KL)133を用いず、第1秘密鍵(Ks)を鍵スケジュール部111と、線形フィードバックシフトレジスタ(LFSR)121の双方に入力する。   That is, in the second embodiment, the second secret key (KL) 133 shown in FIG. 5 is not used, and the first secret key (Ks) is input to both the key schedule unit 111 and the linear feedback shift register (LFSR) 121. .

図9に示すキーストリーム生成部110は、第1秘密鍵(Ks)131と、初期ベクトル(IV:Initial Vector)132を入力して、キーストリーム(擬似乱数)136を生成する。   9 receives a first secret key (Ks) 131 and an initial vector (IV: Initial Vector) 132, and generates a key stream (pseudorandom number) 136.

キーストリーム生成部110は、鍵スケジュール部111と、擬似乱数生成部112、さらに、線形フィードバックシフトレジスタ(LFSR)121と、排他的論理和(XOR)演算部122を有する。
鍵スケジュール部111は、第1秘密鍵(Ks)131と、初期ベクトル(IV)132に基づいて、擬似乱数生成用初期データを生成して擬似乱数生成部112に出力する。
擬似乱数生成部112は、鍵スケジュール部111から入力する擬似乱数生成用初期データを適用して擬似乱数134を生成して出力する。擬似乱数134は、図に示すZa1,Za2,・・・のデータシーケンスであり、例えば、Zaiの各々が1バイト(8ビット)の擬似乱数シーケンス:Za1,Za2,・・・を生成して排他的論理和(XOR)演算部122に出力する。
The key stream generation unit 110 includes a key schedule unit 111, a pseudo random number generation unit 112, a linear feedback shift register (LFSR) 121, and an exclusive OR (XOR) calculation unit 122.
The key schedule unit 111 generates pseudo random number generation initial data based on the first secret key (Ks) 131 and the initial vector (IV) 132 and outputs the generated initial data to the pseudo random number generation unit 112.
The pseudo random number generation unit 112 generates pseudo random numbers 134 by applying the pseudo random number generation initial data input from the key schedule unit 111 and outputs the pseudo random numbers 134. The pseudo random number 134 is a data sequence of Za1, Za2,... Shown in the figure. For example, each of Zai generates a 1-byte (8 bits) pseudorandom sequence: Za1, Za2,. To the logical OR (XOR) operation unit 122.

さらに、第1秘密鍵(Ks)131は、線形フィードバックシフトレジスタ(LFSR)121に入力される。
線形フィードバックシフトレジスタ(LFSR)121を構成するレジスタに、第1秘密鍵(Ks)131の構成ビットがセットされる。この第1秘密鍵(Ks)のセット状態をLFSRの初期状態とする。
その後、線形フィードバックシフトレジスタ(LFSR)121は、規定のシフト動作を順次、実行して、LFSR出力135を生成して出力する。
LFSR出力135は、図に示すO1,O2,・・・のデータシーケンスであり、例えば、Oiの各々が1バイト(8ビット)のLFSR出力シーケンス:O1,O2,・・・を生成して排他的論理和(XOR)演算部122に出力する。
Further, the first secret key (Ks) 131 is input to the linear feedback shift register (LFSR) 121.
A configuration bit of the first secret key (Ks) 131 is set in a register configuring the linear feedback shift register (LFSR) 121. This set state of the first secret key (Ks) is the initial state of the LFSR.
Thereafter, the linear feedback shift register (LFSR) 121 sequentially executes a prescribed shift operation to generate and output the LFSR output 135.
The LFSR output 135 is a data sequence of O1, O2,... Shown in the figure. For example, each Oi generates a 1-byte (8-bit) LFSR output sequence: O1, O2,. To the logical OR (XOR) operation unit 122.

線形フィードバックシフトレジスタ(LFSR)121に設定するレジスタ数(設定可能なビット数)は、第1秘密鍵(Ks)の鍵長k bit以上とする(k'とする)。周期も最大周期2k'−1となるように、出力系列の特性を決める特性多項式は原始多項式を用いる。
具体的には、例えば、先に図6、図7を参照して説明した構成を持つ。
The number of registers (number of bits that can be set) set in the linear feedback shift register (LFSR) 121 is not less than the key length k bits of the first secret key (Ks) (denoted k ′). A primitive polynomial is used as the characteristic polynomial that determines the characteristics of the output sequence so that the period also becomes the maximum period 2 k ′ −1.
Specifically, for example, the configuration described above with reference to FIGS.

排他的論理和(XOR)演算部122では、以下の2つのデータ(a),(b)の排他的論理和(XOR)演算を実行して、キーストリームZb1,Zb2,Zb3・・・を生成して出力する。
(a)第1秘密鍵(Ks)131に基づいて、鍵スケジュール部111、擬似乱数生成部112の処理によって生成された擬似乱数:Za1,Za2,Za3・・・
(b)第1秘密鍵(Ks)131に基づいて、線形フィードバックシフトレジスタ(LFSR)121から出力されるLFSR出力:O1,O2,O3・・・
The exclusive OR (XOR) operation unit 122 executes the exclusive OR (XOR) operation of the following two data (a) and (b) to generate the key streams Zb1, Zb2, Zb3. And output.
(A) Pseudorandom numbers generated by the processes of the key schedule unit 111 and the pseudorandom number generation unit 112 based on the first secret key (Ks) 131: Za1, Za2, Za3.
(B) LFSR output output from the linear feedback shift register (LFSR) 121 based on the first secret key (Ks) 131: O1, O2, O3.

擬似乱数:Za1,Za2,Za3・・・の各々と、LFSR出力:O1,O2,O3・・・の各々のデータは、同一ビット数、例えば1バイト(8ビット)データである。
排他的論理和(XOR)演算部122では、これら2つのデータ、すなわち、
擬似乱数:Za1,Za2,Za3・・・
LFSR出力:O1,O2,O3・・・
これらのデータの排他的論理和(XOR)演算を実行して、キーストリームZb1,Zb2,Zb3・・・を生成して出力する。
キーストリームZb1,Zb2,Zb3・・・は、以下の算出式によって生成される。
Zb1=Za1(+)O1、
Zb2=Za2(+)O2、
Zb3=Za3(+)O3、
・・・
なお、上記式において、(+)は排他的論理和演算(XOR)を意味する。
Each of the pseudo random numbers: Za1, Za2, Za3... And the LFSR output: O1, O2, O3... Has the same number of bits, for example, 1 byte (8 bits) data.
In the exclusive OR (XOR) operation unit 122, these two data, that is,
Pseudo-random numbers: Za1, Za2, Za3 ...
LFSR output: O1, O2, O3 ...
An exclusive OR (XOR) operation of these data is executed to generate and output key streams Zb1, Zb2, Zb3.
The key streams Zb1, Zb2, Zb3... Are generated by the following calculation formula.
Zb1 = Za1 (+) O1,
Zb2 = Za2 (+) O2,
Zb3 = Za3 (+) O3,
...
In the above formula, (+) means exclusive OR (XOR).

キーストリーム136は、各々が所定ビット単位のデータからなるデータ列によって構成される。具体的には例えば各々が1バイト(8ビット)データからなるデータ列:Zb1,Zb2,Zb3,・・・である。
このように、キーストリーム生成部110の排他的論理和(XOR)演算部122は、各々が所定長のデータからなるデータ列:Zb1,Zb2,Zb3,・・・をキーストリームとして順次、出力する。
The key stream 136 is composed of a data string that is composed of data of a predetermined bit unit. Specifically, for example, a data string consisting of 1-byte (8-bit) data: Zb1, Zb2, Zb3,.
As described above, the exclusive OR (XOR) operation unit 122 of the key stream generation unit 110 sequentially outputs the data strings: Zb1, Zb2, Zb3,. .

キーストリーム構成要素である所定ビット単位のデータ:Zb1,Zb2,Zb3,・・・の各々は、排他的論理和演算部123において、暗号処理対象となる平文141の所定データ単位の分割データ:P1,P2,P3・・・の各々と排他的論理和(XOR)演算が実行される。
この排他的論理和演算結果として算出するデータ列:C1,C2,C3・・・を、暗号文142として出力する。
Each of the predetermined bit unit data: Zb1, Zb2, Zb3,..., Which is a key stream component, is divided into predetermined data units of plaintext 141 to be encrypted by the exclusive OR operation unit 123: P1. , P2, P3,... And an exclusive OR (XOR) operation is performed.
The data string C1, C2, C3... Calculated as the exclusive OR operation result is output as the ciphertext 142.

暗号文C1,C2,C3・・・と、キーストリーム:Zb1,Zb2,Z3・・・と、平文P1,P2,P3・・・との関係は以下の通りである。
C1=P1(+)Zb1
C2=P2(+)Zb2
C3=P3(+)Zb3
・・・
なお、上記式において(+)は、排他的論理和演算を意味する。
また、平文の構成要素Pi、キーストリームの構成要素Zbi、暗号文構成要素Ci、これらの各構成要素は、いずれも同一ビット数、例えば1バイト(8ビット)のデータである。
The ciphertexts C1, C2, C3..., The key streams: Zb1, Zb2, Z3... And the plaintexts P1, P2, P3.
C1 = P1 (+) Zb1
C2 = P2 (+) Zb2
C3 = P3 (+) Zb3
...
In the above formula, (+) means exclusive OR operation.
Also, the plaintext component Pi, the key stream component Zbi, the ciphertext component Ci, and each of these components are data of the same number of bits, for example, 1 byte (8 bits).

このように、本実施例2に従ったストリーム暗号による暗号文生成処理は、以下のステップ(Sa1)〜(Sa4)を実行することで行われる。
(Sa1)秘密のパラメータである第1秘密鍵(Ks)と、公開パラメータである初期ベクトル(IV:Initial Vector)から、擬似乱数系列Za1,Za2,Za3・・・を生成する。
(Sa2)秘密のパラメータである第1秘密鍵(Ks)から、LFSR出力系列O1,O2,O3・・・を生成する。
(Sa3)擬似乱数系列Za1,Za2,Za3・・・と、LFSR出力系列O1,O2,O3・・・との排他的論理和(XOR)により、キーストリームZb1,Zb2,Zb3・・・を生成する。
(Sa4)平文の構成データP1,P2,P3・・・と、生成したキーストリームZb1,Zb2,Zb3・・・の排他的論理和をとることにより、暗号文C1,C2,C3・・・を生成する。
As described above, the ciphertext generation process using the stream cipher according to the second embodiment is performed by executing the following steps (Sa1) to (Sa4).
(Sa1) A pseudo random number sequence Za1, Za2, Za3... Is generated from a first secret key (Ks) that is a secret parameter and an initial vector (IV) that is a public parameter.
(Sa2) The LFSR output sequences O1, O2, O3,... Are generated from the first secret key (Ks) that is a secret parameter.
(Sa3) Key streams Zb1, Zb2, Zb3,... Are generated by exclusive OR (XOR) of pseudo-random number sequences Za1, Za2, Za3... And LFSR output sequences O1, O2, O3. To do.
(Sa4) The ciphertexts C1, C2, C3... Are obtained by taking the exclusive OR of the plaintext configuration data P1, P2, P3... And the generated key streams Zb1, Zb2, Zb3. Generate.

図9を参照して説明した処理によって生成された暗号文142は、例えば、ネットワークを介して転送され、他のユーザの情報処理装置によって受信され、復号処理が実行される。
図10は、本実施例2に従った復号処理について説明する図である。
本実施例2のストリーム暗号に従った暗号処理と復号処理は、同一の装置構成を用いて実現される。
For example, the ciphertext 142 generated by the processing described with reference to FIG. 9 is transferred via a network, received by an information processing apparatus of another user, and decrypted.
FIG. 10 is a diagram for explaining the decoding process according to the second embodiment.
The encryption process and the decryption process according to the stream cipher of the second embodiment are realized using the same device configuration.

図10に示す構成において、キーストリーム生成部210は、第1秘密鍵(Ks)231と、初期ベクトル(IV:Initial Vector)232を入力して、キーストリーム(擬似乱数)236を生成する。   In the configuration shown in FIG. 10, the key stream generation unit 210 receives a first secret key (Ks) 231 and an initial vector (IV: Initial Vector) 232 and generates a key stream (pseudorandom number) 236.

第1秘密鍵(Ks)231と、初期ベクトル(IV)232は、暗号処理を実行する装置、例えばユーザの情報処理装置に予め格納されたデータである。
第1秘密鍵(Ks)231は、秘密情報であり、公開されたデータではない。特定のユーザ間、例えば暗号文生成ユーザと、暗号文を復号するユーザ間で共有される秘密情報である。
一方、初期ベクトル(IV)232は、公開データであり、不特定多数のユーザが知ることができるデータである。
復号対象とする暗号文142が、図9に示す構成によって生成された暗号文142である場合、初期ベクトル(IV)232も、図9に示す暗号処理において適用した初期ベクトル(IV)132と同一のデータである。
The first secret key (Ks) 231 and the initial vector (IV) 232 are data stored in advance in a device that performs cryptographic processing, for example, a user information processing device.
The first secret key (Ks) 231 is secret information, not public data. This is secret information shared between specific users, for example, ciphertext generation users and users who decrypt ciphertexts.
On the other hand, the initial vector (IV) 232 is public data and is data that can be known by an unspecified number of users.
When the ciphertext 142 to be decrypted is the ciphertext 142 generated by the configuration shown in FIG. 9, the initial vector (IV) 232 is also the same as the initial vector (IV) 132 applied in the encryption processing shown in FIG. It is data of.

キーストリーム生成部210は、鍵スケジュール部211と、擬似乱数生成部212、さらに、線形フィードバックシフトレジスタ(LFSR)221と、排他的論理和(XOR)演算部222を有する。
鍵スケジュール部211は、第1秘密鍵(Ks)231と、初期ベクトル(IV)232に基づいて、擬似乱数生成用初期データを生成して擬似乱数生成部212に出力する。
擬似乱数生成部212は、鍵スケジュール部211から入力する擬似乱数生成用初期データを適用して擬似乱数234を生成して出力する。擬似乱数234は、図に示すZa1,Za2,・・・のデータシーケンスであり、例えば、Zaiの各々が1バイト(8ビット)の擬似乱数シーケンス:Za1,Za2,・・・を生成して排他的論理和(XOR)演算部222に出力する。
The key stream generation unit 210 includes a key schedule unit 211, a pseudo random number generation unit 212, a linear feedback shift register (LFSR) 221, and an exclusive OR (XOR) calculation unit 222.
The key schedule unit 211 generates pseudo random number generation initial data based on the first secret key (Ks) 231 and the initial vector (IV) 232 and outputs the generated initial data to the pseudo random number generation unit 212.
The pseudo random number generation unit 212 generates pseudo random numbers 234 by applying the pseudo random number generation initial data input from the key schedule unit 211 and outputs the pseudo random numbers 234. The pseudo random number 234 is a data sequence of Za1, Za2,... Shown in the figure. For example, each of Zai generates a 1-byte (8 bits) pseudorandom sequence: Za1, Za2,. To the logical OR (XOR) operation unit 222.

さらに、第1秘密鍵(Ks)231は、線形フィードバックシフトレジスタ(LFSR)221に入力される。
線形フィードバックシフトレジスタ(LFSR)221を構成するレジスタに、第1秘密鍵(Ks)231の構成ビットがセットされる。この第1秘密鍵(Ks)のセット状態をLFSRの初期状態とする。
その後、線形フィードバックシフトレジスタ(LFSR)221は、規定のシフト動作を順次、実行して、LFSR出力235を生成して出力する。
LFSR出力235は、図に示すO1,O2,・・・のデータシーケンスであり、例えば、Oiの各々が1バイト(8ビット)のLFSR出力シーケンス:O1,O2,・・・を生成して排他的論理和(XOR)演算部222に出力する。
Further, the first secret key (Ks) 231 is input to the linear feedback shift register (LFSR) 221.
A configuration bit of the first secret key (Ks) 231 is set in a register configuring the linear feedback shift register (LFSR) 221. This set state of the first secret key (Ks) is the initial state of the LFSR.
Thereafter, the linear feedback shift register (LFSR) 221 sequentially executes a prescribed shift operation to generate and output the LFSR output 235.
The LFSR output 235 is a data sequence of O1, O2,... Shown in the figure. For example, each Oi generates a 1-byte (8-bit) LFSR output sequence: O1, O2,. To the logical OR (XOR) operation unit 222.

図10に示すキーストリーム生成部210の構成は、図9を参照して説明したキーストリーム生成部110の構成と同一構成である。
線形フィードバックシフトレジスタ(LFSR)221の具体例として図6、図7を参照して2つの例を説明したが、暗号処理に用いたLFSRと復号処理に用いるLFSRは同一構成とする。
図10に示すキーストリーム生成部210の構成を、図9を参照して説明したキーストリーム生成部110の構成と同一とし、入力する各データ、すなわち、第1秘密鍵(Ks)、初期ベクトル(IV)を同一とすることで、いずれにおいても同一のキーストリームZb1,Zb2,Zb3・・が生成される。
The configuration of the key stream generation unit 210 illustrated in FIG. 10 is the same as the configuration of the key stream generation unit 110 described with reference to FIG.
Two specific examples of the linear feedback shift register (LFSR) 221 have been described with reference to FIGS. 6 and 7. The LFSR used for the encryption process and the LFSR used for the decryption process have the same configuration.
The configuration of the key stream generation unit 210 shown in FIG. 10 is the same as the configuration of the key stream generation unit 110 described with reference to FIG. 9, and each input data, that is, the first secret key (Ks), the initial vector ( By making IV) the same, the same key stream Zb1, Zb2, Zb3,.

図10に示す構成において、排他的論理和(XOR)演算部222では、以下の2つのデータ(a),(b)の排他的論理和(XOR)演算を実行して、キーストリームZb1,Zb2,Zb3・・・を生成して出力する。
(a)第1秘密鍵(Ks)231に基づいて、鍵スケジュール部211、擬似乱数生成部212の処理によって生成された擬似乱数:Za1,Za2,Za3・・・
(b)第1秘密鍵(Ks)231に基づいて、線形フィードバックシフトレジスタ(LFSR)221から出力されるLFSR出力:O1,O2,O3・・・
In the configuration shown in FIG. 10, the exclusive OR (XOR) operation unit 222 performs the following exclusive OR (XOR) operation of the two data (a) and (b) to generate the key streams Zb1 and Zb2. , Zb3... Are generated and output.
(A) Pseudorandom numbers generated by the processes of the key schedule unit 211 and the pseudorandom number generation unit 212 based on the first secret key (Ks) 231: Za1, Za2, Za3.
(B) LFSR output output from the linear feedback shift register (LFSR) 221 based on the first secret key (Ks) 231: O1, O2, O3.

擬似乱数:Za1,Za2,Za3・・・の各々と、LFSR出力:O1,O2,O3・・・の各々のデータは、同一ビット数、例えば1バイト(8ビット)データである。
排他的論理和(XOR)演算部222では、これら2つのデータ、すなわち、
擬似乱数:Za1,Za2,Za3・・・
LFSR出力:O1,O2,O3・・・
これらのデータの排他的論理和(XOR)演算を実行して、キーストリームZb1,Zb2,Zb3・・・を生成して出力する。
キーストリームZb1,Zb2,Zb3・・・は、以下の算出式によって生成される。
Zb1=Za1(+)O1、
Zb2=Za2(+)O2、
Zb3=Za3(+)O3、
・・・
なお、上記式において、(+)は排他的論理和演算(XOR)を意味する。
Each of the pseudo random numbers: Za1, Za2, Za3... And the LFSR output: O1, O2, O3... Has the same number of bits, for example, 1 byte (8 bits) data.
In the exclusive OR (XOR) operation unit 222, these two data, that is,
Pseudo-random numbers: Za1, Za2, Za3 ...
LFSR output: O1, O2, O3 ...
An exclusive OR (XOR) operation of these data is executed to generate and output key streams Zb1, Zb2, Zb3.
The key streams Zb1, Zb2, Zb3... Are generated by the following calculation formula.
Zb1 = Za1 (+) O1,
Zb2 = Za2 (+) O2,
Zb3 = Za3 (+) O3,
...
In the above formula, (+) means exclusive OR (XOR).

キーストリーム236は、各々が所定ビット単位のデータからなるデータ列によって構成される。具体的には例えば各々が1バイト(8ビット)データからなるデータ列:Zb1,Zb2,Zb3,・・・である。
このように、キーストリーム生成部210の排他的論理和(XOR)演算部222は、各々が所定長のデータからなるデータ列:Zb1,Zb2,Zb3,・・・をキーストリームとして順次、出力する。
The key stream 236 is composed of a data string that is composed of data of predetermined bits. Specifically, for example, a data string consisting of 1-byte (8-bit) data: Zb1, Zb2, Zb3,.
As described above, the exclusive OR (XOR) calculation unit 222 of the key stream generation unit 210 sequentially outputs a data string consisting of data of a predetermined length: Zb1, Zb2, Zb3,. .

キーストリーム構成要素である所定ビット単位のデータ:Zb1,Zb2,Zb3,・・・の各々は、排他的論理和演算部223において、復号処理対象となる暗号文141の所定データ単位の分割データ:C1,C2,C3・・・の各々と排他的論理和(XOR)演算が実行される。
この排他的論理和演算結果として算出するデータ列:P1,P2,P3・・・が、復号結果としての平文142となる。
Each of the predetermined bit unit data: Zb1, Zb2, Zb3,... Which is a key stream component is divided data of the predetermined data unit of the ciphertext 141 to be decrypted by the exclusive OR operation unit 223: An exclusive OR (XOR) operation is performed with each of C1, C2, C3.
The data string: P1, P2, P3,... Calculated as the exclusive OR operation result becomes the plaintext 142 as the decryption result.

平文P1,P2,PC3・・・と、キーストリーム:Zb1,Zb2,Zb3・・・と、暗号文C1,C2,C3・・・との関係は以下の通りである。
P1=C1(+)Zb1
P2=C2(+)Zb2
P3=C3(+)Zb3
・・・
なお、上記式において(+)は、排他的論理和演算を意味する。
また、平文の構成要素Pi、キーストリームの構成要素Zbi、暗号文構成要素Ci、これらの各構成要素は、いずれも同一ビット数、例えば1バイト(8ビット)のデータである。
The plaintext P1, P2, PC3..., The key streams: Zb1, Zb2, Zb3... And the ciphertexts C1, C2, C3.
P1 = C1 (+) Zb1
P2 = C2 (+) Zb2
P3 = C3 (+) Zb3
...
In the above formula, (+) means exclusive OR operation.
Also, the plaintext component Pi, the key stream component Zbi, the ciphertext component Ci, and each of these components are data of the same number of bits, for example, 1 byte (8 bits).

このように、本実施例2に従ったストリーム暗号による復号処理は、以下のステップ(Sb1)〜(Sb4)を実行することで行われる。
(Sb1)秘密のパラメータである第1秘密鍵(Ks)と、公開パラメータである初期ベクトル(IV:Initial Vector)から、擬似乱数系列Za1,Za2,Za3・・・を生成する。
(Sb2)秘密のパラメータである第1秘密鍵(Ks)から、LFSR出力系列O1,O2,O3・・・を生成する。
(Sb3)擬似乱数系列Za1,Za2,Za3・・・と、LFSR出力系列O1,O2,O3・・・との排他的論理和(XOR)により、キーストリームZb1,Zb2,Zb3・・・を生成する。
(Sb4)暗号文C1,C2,C3・・・と、生成したキーストリームZb1,Zb2,Zb3・・・の排他的論理和をとることにより、平文の構成データP1,P2,P3・・・を生成する。
As described above, the decryption process using the stream cipher according to the second embodiment is performed by executing the following steps (Sb1) to (Sb4).
(Sb1) A pseudo random number sequence Za1, Za2, Za3,... Is generated from a first secret key (Ks) that is a secret parameter and an initial vector (IV) that is a public parameter.
(Sb2) LFSR output sequences O1, O2, O3,... Are generated from the first secret key (Ks) that is a secret parameter.
(Sb3) Key streams Zb1, Zb2, Zb3,... Are generated by exclusive OR (XOR) of pseudo random number sequences Za1, Za2, Za3,... And LFSR output sequences O1, O2, O3,. To do.
(Sb4) By taking an exclusive OR of the ciphertexts C1, C2, C3... And the generated key streams Zb1, Zb2, Zb3..., Plaintext configuration data P1, P2, P3. Generate.

平文生成処理において、ステップ(Sb4)で実行する排他的論理和の性質上、暗号文生成時に利用したキーストリームと同じキーストリームを用いて、暗号文の排他的論理和をとることにより平文を得ることができる。   In the plaintext generation process, the plaintext is obtained by taking the exclusive OR of the ciphertext using the same key stream as the keystream used at the time of ciphertext generation due to the property of the exclusive OR executed in step (Sb4). be able to.

なお、本実施例では、共通の秘密情報として、第1秘密鍵(Ks)を送信者と受信者で安全に共有することにより、暗号化および復号処理が可能となる。   In the present embodiment, as the common secret information, the first secret key (Ks) is securely shared between the sender and the receiver, thereby enabling encryption and decryption processing.

この実施例2では、先に図1、図2を参照して説明した従来のストリーム暗号処理構成と比較して、例えば以下の優位性を持つ。   The second embodiment has, for example, the following advantages over the conventional stream cipher processing configuration described above with reference to FIGS.

(A)安全性の優位性について
例えば、図9に示す擬似乱数生成部112の出力する擬似乱数Za1,Za2,・・・に偏りがあった場合においても、偏りのあるこれらの擬似乱数Za1,Za2,・・・に対して、0、1の出現頻度が均一なLFSRの出力O1,O2・・・を、排他的論理和(XOR)演算を施して新たなキーストリームZb1,Zb2,・・・を生成することで、偏りを取り除くことができる。
(A) Regarding the superiority of security For example, even when the pseudorandom numbers Za1, Za2,... Output from the pseudorandom number generator 112 shown in FIG. .. Are output by performing an exclusive OR (XOR) operation on the outputs O1, O2,... Of the LFSRs with uniform appearance frequencies of 0, 1, and new key streams Zb1, Zb2,. By generating ・, it is possible to remove the bias.

この偏りが除去されたキーストリームZb1,Zb2,・・・を平文に対して適用するため、偏りのないキーストリームを適用した暗号処理が可能となる。
この処理によって、先に図4を参照して説明したブロードキャスト・セッティングを利用した平文回復攻撃を防ぐことができる。
Since the key streams Zb1, Zb2,... From which the bias has been removed are applied to plaintext, it is possible to perform encryption processing using a key stream having no bias.
This processing can prevent a plaintext recovery attack using the broadcast setting described above with reference to FIG.

例えばLFSR出力Oiは、各々の値が等確率で生成されるため、ランダムに第1秘密鍵(Ks)が与えられる場合、第1秘密鍵(Ks)に基づいて生成される擬似乱数(Zi)、およびLFSR出力(Oi)の値の分布は一様になる。   For example, since each value of the LFSR output Oi is generated with equal probability, when a first secret key (Ks) is randomly given, a pseudo random number (Zi) generated based on the first secret key (Ks) , And LFSR output (Oi) value distribution is uniform.

また、仮にLFSRの出力が攻撃者に露呈した場合は、LFSRの性質上、第1秘密鍵(Ks)は露呈してしまう。しかしながら、暗号文等からLFSRの出力推定には、キーストリーム生成部内部の排他的論理和処理以前の擬似乱数系列の推定も必要となり、この推定は極めて困難である。   Further, if the output of the LFSR is exposed to the attacker, the first secret key (Ks) is exposed due to the nature of the LFSR. However, estimation of LFSR output from ciphertext or the like also requires estimation of a pseudo-random number sequence before exclusive OR processing inside the key stream generation unit, and this estimation is extremely difficult.

(B)実装コストの優位性について
本実施例2において用いる線形フィードバックシフトレジスタ(LFSR)はレジスタと排他的論理和(XOR)演算処理構成のみで実装可能であり、H/W(ハードウェア)で構成した場合の実装コストが小さい。そのため、既存のシステムに付加しても大きなコストアップにならない。また。S/W(ソフトウェア)実装とした場合においても高速処理が可能である。また、新たな鍵も必要なく、LFSRを追加するのみでよいので、実装コストを最小限に抑えることが可能である。
(B) Superiority of mounting cost The linear feedback shift register (LFSR) used in the second embodiment can be mounted only by a register and an exclusive OR (XOR) arithmetic processing configuration, and is H / W (hardware). The implementation cost when configured is small. For this reason, even if it is added to an existing system, the cost will not increase. Also. Even in the case of S / W (software) mounting, high-speed processing is possible. Also, since no new key is required and only the LFSR needs to be added, the implementation cost can be minimized.

なお、本実施例2を適用可能な既存のストリーム暗号の一例として、例えば、秘密鍵(Ks)として128ビット鍵を適用した128ビットキーRC4がある。
この128ビットキーRC4に本実施例2を適用する場合、秘密鍵(Ks)のサイズを128ビットとし、LFSRのレジスタ数(セット可能なビット数)のサイズは128ビット、周期は最大周期2128−1となるようにLFSRを選択する。
具体的には、LFSRは、先に図6を参照して説明した構成とし、LFSRの出力系列を決める特性多項式は、以下の128次の原始多項式とする。
f(x)=X128(+)X126(+)X101(+)X99(+)1
As an example of an existing stream cipher to which the second embodiment can be applied, for example, there is a 128-bit key RC4 to which a 128-bit key is applied as a secret key (Ks).
When the second embodiment is applied to the 128-bit key RC4, the size of the secret key (Ks) is 128 bits, the size of the number of LFSR registers (number of bits that can be set) is 128 bits, and the period is the maximum period 2 128. The LFSR is selected to be -1.
Specifically, the LFSR is configured as described above with reference to FIG. 6, and the characteristic polynomial that determines the output sequence of the LFSR is the following 128th order primitive polynomial.
f (x) = X 128 (+) X 126 (+) X 101 (+) X 99 (+) 1

既存のストリーム暗号RC4に、図6を参照して説明したLFSRと、排他的論理和演算部を付加することで、図9を参照して説明したキーストリーム生成部110を構成することが可能である。すなわち、既存の構成をそのまま利用してわずかな構成追加を行うのみで、安全性を高めた暗号処理構成を実現することができる。   The key stream generation unit 110 described with reference to FIG. 9 can be configured by adding the LFSR and the exclusive OR operation unit described with reference to FIG. 6 to the existing stream cipher RC4. is there. That is, an encryption processing configuration with improved security can be realized by using the existing configuration as it is and adding only a few configurations.

[2−3.第1の秘密鍵(Ks)の変換データに基づくLFSR出力を適用してキーストリームを生成する実施例(実施例3)]
次に、実施例3として、線形フィードバックシフトレジスタ(LFSR)に、鍵スケジュール部に入力する秘密鍵(Ks)と同じ秘密鍵(Ks)を変換したデータ(Ks2)を入力して、LFSRの初期状態を設定する実施例について説明する。
すなわち、秘密鍵(Ks)に基づいて鍵スケジュール部と擬似乱数生成部の処理によって生成した擬似乱数と、同じ秘密鍵(Ks)の変換データ(Ks2)に基づくLFSRからの出力とを排他的論理和(XOR)したデータをキーストリームとする実施例である。
[2-3. Embodiment in which LFSR output based on conversion data of first secret key (Ks) is applied to generate a key stream (third embodiment)]
Next, as Example 3, data (Ks2) obtained by converting the same secret key (Ks) as the secret key (Ks) input to the key schedule unit is input to the linear feedback shift register (LFSR), and the initial LFSR An embodiment for setting the state will be described.
In other words, the pseudo-random number generated by the processing of the key schedule unit and the pseudo-random number generation unit based on the secret key (Ks) and the output from the LFSR based on the conversion data (Ks2) of the same secret key (Ks) are exclusive logic. In this embodiment, the sum (XOR) data is used as a key stream.

図11に本実施例3の暗号処理を実行する暗号処理装置の構成例を示す。
図11に示すキーストリーム生成部510は、先に実施例1の構成として説明した図5に示すキーストリーム生成部110に、鍵変換部521を追加した構成を持つ。
さらに、図1に示す構成との差異は、図11に示すキーストリーム生成部510の線形フィードバックシフトレジスタ(LFSR)522の前段に追加した鍵変換部521に第1秘密鍵(Ks)を入力している点である。
FIG. 11 shows a configuration example of a cryptographic processing apparatus that executes the cryptographic processing of the third embodiment.
A key stream generation unit 510 illustrated in FIG. 11 has a configuration in which a key conversion unit 521 is added to the key stream generation unit 110 illustrated in FIG. 5 described above as the configuration of the first embodiment.
Further, the difference from the configuration shown in FIG. 1 is that the first secret key (Ks) is input to the key conversion unit 521 added to the preceding stage of the linear feedback shift register (LFSR) 522 of the key stream generation unit 510 shown in FIG. It is a point.

すなわち、実施例3では、実施例2と同様、図5に示す第2秘密鍵(KL)133を用いず、第1秘密鍵(Ks)を、スケジュール部511と、線形フィードバックシフトレジスタ(LFSR)522の前段の鍵変換部521の双方に入力する構成を持つ。   That is, in the third embodiment, similarly to the second embodiment, the second secret key (KL) 133 shown in FIG. 522 is configured to be input to both the key conversion unit 521 at the preceding stage of 522.

図11に示すキーストリーム生成部510は、第1秘密鍵(Ks)531と、初期ベクトル(IV:Initial Vector)532を入力して、キーストリーム(擬似乱数)536を生成する。   A key stream generation unit 510 illustrated in FIG. 11 receives a first secret key (Ks) 531 and an initial vector (IV: Initial Vector) 532, and generates a key stream (pseudo random number) 536.

キーストリーム生成部510は、鍵スケジュール部511と、擬似乱数生成部512、さらに、鍵変換部521と、線形フィードバックシフトレジスタ(LFSR)522、排他的論理和(XOR)演算部523を有する。
鍵スケジュール部511は、第1秘密鍵(Ks)531と、初期ベクトル(IV)532に基づいて、擬似乱数生成用初期データを生成して擬似乱数生成部512に出力する。
擬似乱数生成部512は、鍵スケジュール部511から入力する擬似乱数生成用初期データを適用して擬似乱数534を生成して出力する。擬似乱数534は、図に示すZa1,Za2,・・・のデータシーケンスであり、例えば、Zaiの各々が1バイト(8ビット)の擬似乱数シーケンス:Za1,Za2,・・・を生成して排他的論理和(XOR)演算部523に出力する。
The key stream generation unit 510 includes a key schedule unit 511, a pseudo random number generation unit 512, a key conversion unit 521, a linear feedback shift register (LFSR) 522, and an exclusive OR (XOR) calculation unit 523.
The key schedule unit 511 generates pseudo random number generation initial data based on the first secret key (Ks) 531 and the initial vector (IV) 532 and outputs the generated initial data to the pseudo random number generation unit 512.
The pseudo random number generation unit 512 generates pseudo random numbers 534 by applying the pseudo random number generation initial data input from the key schedule unit 511 and outputs the generated pseudo random numbers 534. The pseudo random number 534 is a data sequence of Za1, Za2,... Shown in the figure. For example, each of Zai generates a 1-byte (8 bits) pseudorandom sequence: Za1, Za2,. To the logical OR (XOR) operation unit 523.

さらに、第1秘密鍵(Ks)531は、鍵変換部521に入力される。
鍵変換部521の具体的な一構成例を図12に示す。
鍵変換部521は、図12に示すように、ハッシュ関数(SHA−1)実行部551、ビット数調整部552を有する。
Further, the first secret key (Ks) 531 is input to the key conversion unit 521.
A specific configuration example of the key conversion unit 521 is shown in FIG.
As illustrated in FIG. 12, the key conversion unit 521 includes a hash function (SHA-1) execution unit 551 and a bit number adjustment unit 552.

ハッシュ関数(SHA−1)実行部551は、入力データである第1秘密鍵(Ks)に対して、たとえばSHA−1等のハッシュ関数を適用して、ハッシュデータを生成する。
ビット数調整部552は、ハッシュ関数実行部551からの入力に対して、ビット数調整処理を実行し、ビット数調整後の鍵変換データを線形フィードバックシフトレジスタ(LFSR)522に入力する。
The hash function (SHA-1) execution unit 551 generates hash data by applying a hash function such as SHA-1 to the first secret key (Ks) that is input data.
The bit number adjustment unit 552 performs bit number adjustment processing on the input from the hash function execution unit 551, and inputs the key conversion data after the bit number adjustment to the linear feedback shift register (LFSR) 522.

具体的には、例えば、第1秘密鍵(Ks)531が128ビットデータである場合、ハッシュ関数(SHA−1)実行部551は、入力データである第1秘密鍵(Ks)に対して、たとえばSHA−1等の一方向性ハッシュ関数を適用して、160ビットのハッシュデータを生成する。
ビット数調整部552は、ハッシュ関数実行部551から入力する160ビットデータに対して、ビット数調整処理を実行し、128ビットの変換鍵データ(Ks2)を生成して線形フィードバックシフトレジスタ(LFSR)522に入力する。
なお、図12に示す鍵変換部521の構成は一例であり、鍵データ変換部521は、この他の構成を適用して、入力鍵データを変換する構成としてもよい。
Specifically, for example, when the first secret key (Ks) 531 is 128-bit data, the hash function (SHA-1) execution unit 551 performs the following on the first secret key (Ks) that is input data: For example, a one-way hash function such as SHA-1 is applied to generate 160-bit hash data.
The bit number adjustment unit 552 performs bit number adjustment processing on the 160-bit data input from the hash function execution unit 551, generates 128-bit conversion key data (Ks2), and generates a linear feedback shift register (LFSR). Input to 522.
The configuration of the key conversion unit 521 illustrated in FIG. 12 is an example, and the key data conversion unit 521 may be configured to convert the input key data by applying another configuration.

鍵データ変換部521が、第1秘密鍵(Ks)531に基づいて生成した変換鍵データ(Ks2)は、線形フィードバックシフトレジスタ(LFSR)522に入力される。
線形フィードバックシフトレジスタ(LFSR)522を構成するレジスタに、第1秘密鍵(Ks)531に基づいて生成された変換鍵データ(Ks2)の構成ビットがセットされる。この変換鍵データ(Ks2)のセット状態をLFSRの初期状態とする。
その後、線形フィードバックシフトレジスタ(LFSR)522は、規定のシフト動作を順次、実行して、LFSR出力535を生成して出力する。
LFSR出力535は、図に示すO1,O2,・・・のデータシーケンスであり、例えば、Oiの各々が1バイト(8ビット)のLFSR出力シーケンス:O1,O2,・・・を生成して排他的論理和(XOR)演算部523に出力する。
The conversion key data (Ks2) generated by the key data conversion unit 521 based on the first secret key (Ks) 531 is input to the linear feedback shift register (LFSR) 522.
A configuration bit of the conversion key data (Ks2) generated based on the first secret key (Ks) 531 is set in a register configuring the linear feedback shift register (LFSR) 522. The set state of the conversion key data (Ks2) is set as the initial state of the LFSR.
Thereafter, the linear feedback shift register (LFSR) 522 sequentially performs a prescribed shift operation to generate and output an LFSR output 535.
The LFSR output 535 is a data sequence of O1, O2,... Shown in the figure. For example, each Oi generates a 1-byte (8-bit) LFSR output sequence: O1, O2,. To the logical OR (XOR) operation unit 523.

線形フィードバックシフトレジスタ(LFSR)522に設定するレジスタ数(設定可能なビット数)は、第1秘密鍵(Ks)の鍵長k bit以上とする(k'とする)。周期も最大周期2k'−1となるように、特性多項式は原始多項式を用いる。
具体的には、例えば、先に図6、図7を参照して説明した構成を持つ。
The number of registers (number of bits that can be set) set in the linear feedback shift register (LFSR) 522 is not less than the key length k bits of the first secret key (Ks) (referred to as k ′). A primitive polynomial is used as the characteristic polynomial so that the period is the maximum period 2 k ′ −1.
Specifically, for example, the configuration described above with reference to FIGS.

排他的論理和(XOR)演算部523では、以下の2つのデータ(a),(b)の排他的論理和(XOR)演算を実行して、キーストリームZb1,Zb2,Zb3・・・を生成して出力する。
(a)第1秘密鍵(Ks)531に基づいて、鍵スケジュール部511、擬似乱数生成部512の処理によって生成された擬似乱数:Za1,Za2,Za3・・・
(b)第1秘密鍵(Ks)531に基づく変換鍵データ(Ks2)に基づいて、線形フィードバックシフトレジスタ(LFSR)522から出力されるLFSR出力:O1,O2,O3・・・
The exclusive OR (XOR) operation unit 523 executes the exclusive OR (XOR) operation of the following two data (a) and (b) to generate key streams Zb1, Zb2, Zb3,. And output.
(A) Pseudorandom numbers generated by the processes of the key schedule unit 511 and the pseudorandom number generation unit 512 based on the first secret key (Ks) 531: Za1, Za2, Za3.
(B) LFSR output output from the linear feedback shift register (LFSR) 522 based on the conversion key data (Ks2) based on the first secret key (Ks) 531: O1, O2, O3.

擬似乱数:Za1,Za2,Za3・・・の各々と、LFSR出力:O1,O2,O3・・・の各々のデータは、同一ビット数、例えば1バイト(8ビット)データである。
排他的論理和(XOR)演算部523では、これら2つのデータ、すなわち、
擬似乱数:Za1,Za2,Za3・・・
LFSR出力:O1,O2,O3・・・
これらのデータの排他的論理和(XOR)演算を実行して、キーストリームZb1,Zb2,Zb3・・・を生成して出力する。
キーストリームZb1,Zb2,Zb3・・・は、以下の算出式によって生成される。
Zb1=Za1(+)O1、
Zb2=Za2(+)O2、
Zb3=Za3(+)O3、
・・・
なお、上記式において、(+)は排他的論理和演算(XOR)を意味する。
Each of the pseudo random numbers: Za1, Za2, Za3... And the LFSR output: O1, O2, O3... Has the same number of bits, for example, 1 byte (8 bits) data.
In the exclusive OR (XOR) operation unit 523, these two data, that is,
Pseudo-random numbers: Za1, Za2, Za3 ...
LFSR output: O1, O2, O3 ...
An exclusive OR (XOR) operation of these data is executed to generate and output key streams Zb1, Zb2, Zb3.
The key streams Zb1, Zb2, Zb3... Are generated by the following calculation formula.
Zb1 = Za1 (+) O1,
Zb2 = Za2 (+) O2,
Zb3 = Za3 (+) O3,
...
In the above formula, (+) means exclusive OR (XOR).

キーストリーム536は、各々が所定ビット単位のデータからなるデータ列によって構成される。具体的には例えば各々が1バイト(8ビット)データからなるデータ列:Zb1,Zb2,Zb3,・・・である。
このように、キーストリーム生成部510の排他的論理和(XOR)演算部523は、各々が所定長のデータからなるデータ列:Zb1,Zb2,Zb3,・・・をキーストリームとして順次、出力する。
The key stream 536 is composed of a data string that is composed of data in predetermined bit units. Specifically, for example, a data string consisting of 1-byte (8-bit) data: Zb1, Zb2, Zb3,.
As described above, the exclusive OR (XOR) operation unit 523 of the key stream generation unit 510 sequentially outputs the data strings: Zb1, Zb2, Zb3,. .

キーストリーム構成要素である所定ビット単位のデータ:Zb1,Zb2,Zb3,・・・の各々は、排他的論理和演算部524において、暗号処理対象となる平文141の所定データ単位の分割データ:P1,P2,P3・・・の各々と排他的論理和(XOR)演算が実行される。
この排他的論理和演算結果として算出するデータ列:C1,C2,C3・・・を、暗号文542として出力する。
Each of predetermined bit unit data: Zb1, Zb2, Zb3,... Which is a key stream constituent element is divided into predetermined data unit divided data: P1 of plaintext 141 to be encrypted in the exclusive OR operation unit 524. , P2, P3,... And an exclusive OR (XOR) operation is performed.
The data string C1, C2, C3... Calculated as the exclusive OR operation result is output as ciphertext 542.

暗号文C1,C2,C3・・・と、キーストリーム:Zb1,Zb2,Z3・・・と、平文P1,P2,P3・・・との関係は以下の通りである。
C1=P1(+)Zb1
C2=P2(+)Zb2
C3=P3(+)Zb3
・・・
なお、上記式において(+)は、排他的論理和演算を意味する。
また、平文の構成要素Pi、キーストリームの構成要素Zbi、暗号文構成要素Ci、これらの各構成要素は、いずれも同一ビット数、例えば1バイト(8ビット)のデータである。
The ciphertexts C1, C2, C3..., The key streams: Zb1, Zb2, Z3... And the plaintexts P1, P2, P3.
C1 = P1 (+) Zb1
C2 = P2 (+) Zb2
C3 = P3 (+) Zb3
...
In the above formula, (+) means exclusive OR operation.
Also, the plaintext component Pi, the key stream component Zbi, the ciphertext component Ci, and each of these components are data of the same number of bits, for example, 1 byte (8 bits).

このように、本実施例3に従ったストリーム暗号による暗号文生成処理は、以下のステップ(Sa1)〜(Sa4)を実行することで行われる。
(Sa1)秘密のパラメータである第1秘密鍵(Ks)と、公開パラメータである初期ベクトル(IV:Initial Vector)から、擬似乱数系列Za1,Za2,Za3・・・を生成する。
(Sa2)秘密のパラメータである第1秘密鍵(Ks)の変換処理を実行して変換鍵データ(Ks2)を生成し、変換鍵データ(Ks2)から、LFSR出力系列O1,O2,O3・・・を生成する。
(Sa3)擬似乱数系列Za1,Za2,Za3・・・と、LFSR出力系列O1,O2,O3・・・との排他的論理和(XOR)により、キーストリームZb1,Zb2,Zb3・・・を生成する。
(Sa4)平文の構成データP1,P2,P3・・・と、生成したキーストリームZb1,Zb2,Zb3・・・の排他的論理和をとることにより、暗号文C1,C2,C3・・・を生成する。
As described above, the ciphertext generation processing by the stream cipher according to the third embodiment is performed by executing the following steps (Sa1) to (Sa4).
(Sa1) A pseudo random number sequence Za1, Za2, Za3... Is generated from a first secret key (Ks) that is a secret parameter and an initial vector (IV) that is a public parameter.
(Sa2) A conversion process of the first secret key (Ks), which is a secret parameter, is executed to generate conversion key data (Ks2), and from the conversion key data (Ks2), the LFSR output sequences O1, O2, O3,. Generate
(Sa3) Key streams Zb1, Zb2, Zb3,... Are generated by exclusive OR (XOR) of pseudorandom number sequences Za1, Za2, Za3,. To do.
(Sa4) The ciphertexts C1, C2, C3... Are obtained by taking the exclusive OR of the plaintext configuration data P1, P2, P3... And the generated key streams Zb1, Zb2, Zb3. Generate.

図11を参照して説明した処理によって生成された暗号文542は、例えば、ネットワークを介して転送され、他のユーザの情報処理装置によって受信され、復号処理が実行される。
図13は、本実施例3に従った復号処理について説明する図である。
本実施例3のストリーム暗号に従った暗号処理と復号処理は、同一の装置構成を用いて実現される。
For example, the ciphertext 542 generated by the processing described with reference to FIG. 11 is transferred via a network, received by an information processing apparatus of another user, and decrypted.
FIG. 13 is a diagram for explaining the decoding process according to the third embodiment.
The encryption process and the decryption process according to the stream cipher of the third embodiment are realized using the same device configuration.

図13に示す構成において、キーストリーム生成部610は、第1秘密鍵(Ks)631と、初期ベクトル(IV:Initial Vector)632を入力して、キーストリーム(擬似乱数)636を生成する。   In the configuration shown in FIG. 13, the key stream generation unit 610 receives a first secret key (Ks) 631 and an initial vector (IV: Initial Vector) 632 and generates a key stream (pseudo random number) 636.

第1秘密鍵(Ks)631と、初期ベクトル(IV)632は、暗号処理を実行する装置、例えばユーザの情報処理装置に予め格納されたデータである。
第1秘密鍵(Ks)631は、秘密情報であり、公開されたデータではない。特定のユーザ間、例えば暗号文生成ユーザと、暗号文を復号するユーザ間で共有される秘密情報である。
一方、初期ベクトル(IV)632は、公開データであり、不特定多数のユーザが知ることができるデータである。
復号対象とする暗号文542が、図11に示す構成によって生成された暗号文542である場合、初期ベクトル(IV)632も、図11に示す暗号処理において適用した初期ベクトル(IV)532と同一のデータである。
The first secret key (Ks) 631 and the initial vector (IV) 632 are data stored in advance in a device that executes cryptographic processing, for example, a user information processing device.
The first secret key (Ks) 631 is secret information, not public data. This is secret information shared between specific users, for example, ciphertext generation users and users who decrypt ciphertexts.
On the other hand, the initial vector (IV) 632 is public data and is data that can be known by an unspecified number of users.
When the ciphertext 542 to be decrypted is the ciphertext 542 generated by the configuration shown in FIG. 11, the initial vector (IV) 632 is also the same as the initial vector (IV) 532 applied in the encryption processing shown in FIG. It is data of.

キーストリーム生成部610は、鍵スケジュール部611と、擬似乱数生成部612、さらに、鍵変換部621、線形フィードバックシフトレジスタ(LFSR)622、排他的論理和(XOR)演算部623を有する。
鍵スケジュール部611は、第1秘密鍵(Ks)631と、初期ベクトル(IV)632に基づいて、擬似乱数生成用初期データを生成して擬似乱数生成部612に出力する。
擬似乱数生成部612は、鍵スケジュール部611から入力する擬似乱数生成用初期データを適用して擬似乱数634を生成して出力する。擬似乱数634は、図に示すZa1,Za2,・・・のデータシーケンスであり、例えば、Zaiの各々が1バイト(8ビット)の擬似乱数シーケンス:Za1,Za2,・・・を生成して排他的論理和(XOR)演算部623に出力する。
The key stream generation unit 610 includes a key schedule unit 611, a pseudo random number generation unit 612, a key conversion unit 621, a linear feedback shift register (LFSR) 622, and an exclusive OR (XOR) calculation unit 623.
The key schedule unit 611 generates pseudo random number generation initial data based on the first secret key (Ks) 631 and the initial vector (IV) 632 and outputs the generated initial data to the pseudo random number generation unit 612.
The pseudo random number generation unit 612 generates pseudo random numbers 634 by applying the pseudo random number generation initial data input from the key schedule unit 611 and outputs the pseudo random numbers 634. The pseudo random number 634 is a data sequence of Za1, Za2,... Shown in the figure. For example, each of Zai generates a 1-byte (8 bits) pseudorandom sequence: Za1, Za2,. To the logical OR (XOR) operation unit 623.

さらに、第1秘密鍵(Ks)631は、鍵変換部621に入力される。
鍵変換部621は、図11の構成における鍵変換部521と同一の構成を持つ。すなわち、例えば図12に示すように、ハッシュ関数(SHA−1)実行部551、ビット数調整部552によって構成される。
鍵データ変換部621が、第1秘密鍵(Ks)631に基づいて生成した変換鍵データ(Ks2)は、線形フィードバックシフトレジスタ(LFSR)622に入力される。
Further, the first secret key (Ks) 631 is input to the key conversion unit 621.
The key conversion unit 621 has the same configuration as the key conversion unit 521 in the configuration of FIG. That is, for example, as shown in FIG. 12, the hash function (SHA-1) execution unit 551 and the bit number adjustment unit 552 are configured.
The conversion key data (Ks2) generated by the key data conversion unit 621 based on the first secret key (Ks) 631 is input to the linear feedback shift register (LFSR) 622.

線形フィードバックシフトレジスタ(LFSR)622を構成するレジスタに、第1秘密鍵(Ks)631に基づいて生成された変換鍵データ(Ks2)の構成ビットがセットされる。この変換鍵データ(Ks2)のセット状態をLFSRの初期状態とする。
その後、線形フィードバックシフトレジスタ(LFSR)622は、規定のシフト動作を順次、実行して、LFSR出力635を生成して出力する。
LFSR出力635は、図に示すO1,O2,・・・のデータシーケンスであり、例えば、Oiの各々が1バイト(8ビット)のLFSR出力シーケンス:O1,O2,・・・を生成して排他的論理和(XOR)演算部623に出力する。
A configuration bit of converted key data (Ks2) generated based on the first secret key (Ks) 631 is set in a register configuring the linear feedback shift register (LFSR) 622. The set state of the conversion key data (Ks2) is set as the initial state of the LFSR.
Thereafter, the linear feedback shift register (LFSR) 622 sequentially performs a prescribed shift operation to generate and output an LFSR output 635.
The LFSR output 635 is a data sequence of O1, O2,... Shown in the figure. For example, each Oi generates a 1-byte (8-bit) LFSR output sequence: O1, O2,. To the logical OR (XOR) operation unit 623.

図13に示すキーストリーム生成部610の構成は、図11を参照して説明したキーストリーム生成部510の構成と同一構成である。
線形フィードバックシフトレジスタ(LFSR)622は、例えば、先に具体例として説明した図6、図7に示す構成を持つ。なお、暗号処理に用いたLFSRと復号処理に用いるLFSRは同一構成とする。
図13に示すキーストリーム生成部610の構成を、図11を参照して説明したキーストリーム生成部510の構成と同一とし、入力する各データ、すなわち、第1秘密鍵(Ks)、初期ベクトル(IV)を同一とすることで、いずれにおいても同一のキーストリームZb1,Zb2,Zb3・・が生成される。
The configuration of the key stream generation unit 610 illustrated in FIG. 13 is the same as the configuration of the key stream generation unit 510 described with reference to FIG.
The linear feedback shift register (LFSR) 622 has, for example, the configuration shown in FIGS. 6 and 7 described above as a specific example. Note that the LFSR used for encryption processing and the LFSR used for decryption processing have the same configuration.
The configuration of the key stream generation unit 610 shown in FIG. 13 is the same as the configuration of the key stream generation unit 510 described with reference to FIG. 11, and each data to be input, that is, the first secret key (Ks), the initial vector ( By making IV) the same, the same key stream Zb1, Zb2, Zb3,.

図13に示す構成において、排他的論理和(XOR)演算部623では、以下の2つのデータ(a),(b)の排他的論理和(XOR)演算を実行して、キーストリームZb1,Zb2,Zb3・・・を生成して出力する。
(a)第1秘密鍵(Ks)631に基づいて、鍵スケジュール部611、擬似乱数生成部612の処理によって生成された擬似乱数:Za1,Za2,Za3・・・
(b)第1秘密鍵(Ks)631に基づく変換鍵データ(Ks2)に基づいて、線形フィードバックシフトレジスタ(LFSR)622から出力されるLFSR出力:O1,O2,O3・・・
In the configuration shown in FIG. 13, the exclusive OR (XOR) operation unit 623 executes the exclusive OR (XOR) operation of the following two data (a) and (b) to generate the key streams Zb1 and Zb2 , Zb3... Are generated and output.
(A) Pseudorandom numbers generated by the processes of the key schedule unit 611 and the pseudorandom number generation unit 612 based on the first secret key (Ks) 631: Za1, Za2, Za3,.
(B) Based on the conversion key data (Ks2) based on the first secret key (Ks) 631, LFSR outputs output from the linear feedback shift register (LFSR) 622: O1, O2, O3.

擬似乱数:Za1,Za2,Za3・・・の各々と、LFSR出力:O1,O2,O3・・・の各々のデータは、同一ビット数、例えば1バイト(8ビット)データである。
排他的論理和(XOR)演算部623では、これら2つのデータ、すなわち、
擬似乱数:Za1,Za2,Za3・・・
LFSR出力:O1,O2,O3・・・
これらのデータの排他的論理和(XOR)演算を実行して、キーストリームZb1,Zb2,Zb3・・・を生成して出力する。
キーストリームZb1,Zb2,Zb3・・・は、以下の算出式によって生成される。
Zb1=Za1(+)O1、
Zb2=Za2(+)O2、
Zb3=Za3(+)O3、
・・・
なお、上記式において、(+)は排他的論理和演算(XOR)を意味する。
Each of the pseudo random numbers: Za1, Za2, Za3... And the LFSR output: O1, O2, O3... Has the same number of bits, for example, 1 byte (8 bits) data.
In the exclusive OR (XOR) operation unit 623, these two data, that is,
Pseudo-random numbers: Za1, Za2, Za3 ...
LFSR output: O1, O2, O3 ...
An exclusive OR (XOR) operation of these data is executed to generate and output key streams Zb1, Zb2, Zb3.
The key streams Zb1, Zb2, Zb3... Are generated by the following calculation formula.
Zb1 = Za1 (+) O1,
Zb2 = Za2 (+) O2,
Zb3 = Za3 (+) O3,
...
In the above formula, (+) means exclusive OR (XOR).

キーストリーム636は、各々が所定ビット単位のデータからなるデータ列によって構成される。具体的には例えば各々が1バイト(8ビット)データからなるデータ列:Zb1,Zb2,Zb3,・・・である。
このように、キーストリーム生成部610の排他的論理和(XOR)演算部623は、各々が所定長のデータからなるデータ列:Zb1,Zb2,Zb3,・・・をキーストリームとして順次、出力する。
The key stream 636 is composed of a data string that is composed of data in predetermined bit units. Specifically, for example, a data string consisting of 1-byte (8-bit) data: Zb1, Zb2, Zb3,.
As described above, the exclusive OR (XOR) operation unit 623 of the key stream generation unit 610 sequentially outputs the data strings: Zb1, Zb2, Zb3,. .

キーストリーム構成要素である所定ビット単位のデータ:Zb1,Zb2,Zb3,・・・の各々は、排他的論理和演算部624において、復号処理対象となる暗号文542の所定データ単位の分割データ:C1,C2,C3・・・の各々と排他的論理和(XOR)演算が実行される。
この排他的論理和演算結果として算出するデータ列:P1,P2,P3・・・が、復号結果としての平文541となる。
Each of the predetermined bit unit data: Zb1, Zb2, Zb3,... Which is a key stream component is divided data of the predetermined data unit of the ciphertext 542 to be decrypted by the exclusive OR calculator 624: An exclusive OR (XOR) operation is performed with each of C1, C2, C3.
The data string: P1, P2, P3... Calculated as the exclusive OR operation result becomes the plaintext 541 as the decryption result.

平文P1,P2,PC3・・・と、キーストリーム:Zb1,Zb2,Zb3・・・と、暗号文C1,C2,C3・・・との関係は以下の通りである。
P1=C1(+)Zb1
P2=C2(+)Zb2
P3=C3(+)Zb3
・・・
なお、上記式において(+)は、排他的論理和演算を意味する。
また、平文の構成要素Pi、キーストリームの構成要素Zbi、暗号文構成要素Ci、これらの各構成要素は、いずれも同一ビット数、例えば1バイト(8ビット)のデータである。
The plaintext P1, P2, PC3..., The key streams: Zb1, Zb2, Zb3... And the ciphertexts C1, C2, C3.
P1 = C1 (+) Zb1
P2 = C2 (+) Zb2
P3 = C3 (+) Zb3
...
In the above formula, (+) means exclusive OR operation.
Also, the plaintext component Pi, the key stream component Zbi, the ciphertext component Ci, and each of these components are data of the same number of bits, for example, 1 byte (8 bits).

このように、本実施例3に従ったストリーム暗号による復号処理は、以下のステップ(Sb1)〜(Sb4)を実行することで行われる。
(Sb1)秘密のパラメータである第1秘密鍵(Ks)と、公開パラメータである初期ベクトル(IV:Initial Vector)から、擬似乱数系列Za1,Za2,Za3・・・を生成する。
(Sb2)秘密のパラメータである第1秘密鍵(Ks)に基づいて生成される変換鍵データ(Ks2)から、LFSR出力系列O1,O2,O3・・・を生成する。
(Sb3)擬似乱数系列Za1,Za2,Za3・・・と、LFSR出力系列O1,O2,O3・・・との排他的論理和(XOR)により、キーストリームZb1,Zb2,Zb3・・・を生成する。
(Sb4)暗号文C1,C2,C3・・・と、生成したキーストリームZb1,Zb2,Zb3・・・の排他的論理和をとることにより、平文の構成データP1,P2,P3・・・を生成する。
As described above, the decryption process using the stream cipher according to the third embodiment is performed by executing the following steps (Sb1) to (Sb4).
(Sb1) A pseudo random number sequence Za1, Za2, Za3,... Is generated from a first secret key (Ks) that is a secret parameter and an initial vector (IV) that is a public parameter.
(Sb2) LFSR output sequences O1, O2, O3... Are generated from the conversion key data (Ks2) generated based on the first secret key (Ks) that is a secret parameter.
(Sb3) Key streams Zb1, Zb2, Zb3,... Are generated by exclusive OR (XOR) of pseudo random number sequences Za1, Za2, Za3,... And LFSR output sequences O1, O2, O3,. To do.
(Sb4) By taking an exclusive OR of the ciphertexts C1, C2, C3... And the generated key streams Zb1, Zb2, Zb3..., Plaintext configuration data P1, P2, P3. Generate.

平文生成処理において、ステップ(Sb4)で実行する排他的論理和の性質上、暗号文生成時に利用したキーストリームと同じキーストリームを用いて、暗号文の排他的論理和をとることにより平文を得ることができる。   In the plaintext generation process, the plaintext is obtained by taking the exclusive OR of the ciphertext using the same key stream as the keystream used at the time of ciphertext generation due to the property of the exclusive OR executed in step (Sb4). be able to.

なお、本実施例では、共通の秘密情報として、第1秘密鍵(Ks)を送信者と受信者で安全に共有することにより、暗号化および復号処理が可能となる。   In the present embodiment, as the common secret information, the first secret key (Ks) is securely shared between the sender and the receiver, thereby enabling encryption and decryption processing.

この実施例3では、先に図1、図2を参照して説明した従来のストリーム暗号処理構成と比較して、例えば以下の優位性を持つ。   The third embodiment has, for example, the following advantages over the conventional stream cipher processing configuration described above with reference to FIGS.

(A)安全性の優位性について
例えば、図11に示す擬似乱数生成部512の出力する擬似乱数Za1,Za2,・・・に偏りがあった場合においても、偏りのあるこれらの擬似乱数Za1,Za2,・・・に対して、0、1の出現頻度が均一なLFSRの出力O1,O2・・・を、排他的論理和(XOR)演算を施して新たなキーストリームZb1,Zb2,・・・を生成することで、偏りを取り除くことができる。
(A) Superiority of safety For example, even when the pseudorandom numbers Za1, Za2,... Output from the pseudorandom number generator 512 shown in FIG. .. Are output by performing an exclusive OR (XOR) operation on the outputs O1, O2,... Of the LFSRs with uniform appearance frequencies of 0, 1, and new key streams Zb1, Zb2,. By generating ・, it is possible to remove the bias.

この偏りが除去されたキーストリームZb1,Zb2,・・・を平文に対して適用するため、偏りのないキーストリームを適用した暗号処理が可能となる。
この処理によって、先に図4を参照して説明したブロードキャスト・セッティング時の平文回復攻撃を防ぐことができる。
Since the key streams Zb1, Zb2,... From which the bias has been removed are applied to plaintext, it is possible to perform encryption processing using a key stream having no bias.
By this processing, it is possible to prevent the plaintext recovery attack at the time of the broadcast setting described above with reference to FIG.

例えばLFSR出力Oiは、各々の値が等確率で生成されるため、ランダムに第1秘密鍵(Ks)が与えられる場合、第1秘密鍵(Ks)に基づいて生成される擬似乱数(Zi)、およびLFSR出力(Oi)の値の分布は一様になる。   For example, since each value of the LFSR output Oi is generated with equal probability, when a first secret key (Ks) is randomly given, a pseudo random number (Zi) generated based on the first secret key (Ks) , And LFSR output (Oi) value distribution is uniform.

また、仮にLFSRの出力が攻撃者に露呈した場合は、LFSRの性質上、第1秘密鍵(Ks)に基づいて生成された変換鍵データ(Ks2)は露呈してしまう。しかし、第1秘密鍵(Ks)自体は露呈することがない。
また、暗号文等からLFSRの出力推定には、キーストリーム生成部内部の排他的論理和処理以前の擬似乱数系列の推定も必要となり、この推定は極めて困難である。
Also, if the output of the LFSR is exposed to an attacker, the conversion key data (Ks2) generated based on the first secret key (Ks) will be exposed due to the nature of the LFSR. However, the first secret key (Ks) itself is not exposed.
In addition, estimation of LFSR output from ciphertext or the like requires estimation of a pseudo-random number sequence before exclusive OR processing inside the key stream generation unit, and this estimation is extremely difficult.

(B)実装コストの優位性について
本実施例3において用いる線形フィードバックシフトレジスタ(LFSR)はレジスタと排他的論理和(XOR)演算処理構成のみで実装可能であり、H/W(ハードウェア)で構成した場合の実装コストが小さい。そのため、既存のシステムに付加しても大きなコストアップにならない。また。S/W(ソフトウェア)実装とした場合においても高速処理が可能である。また、新たな鍵も必要なく、LFSRを追加するのみでよいので、実装コストを最小限に抑えることが可能である。
(B) Superiority of mounting cost The linear feedback shift register (LFSR) used in the third embodiment can be mounted only by a register and an exclusive OR (XOR) arithmetic processing configuration, and is H / W (hardware). The implementation cost when configured is small. For this reason, even if it is added to an existing system, the cost will not increase. Also. Even in the case of S / W (software) mounting, high-speed processing is possible. Also, since no new key is required and only the LFSR needs to be added, the implementation cost can be minimized.

なお、本実施例3を適用可能な既存のストリーム暗号の一例として、例えば、秘密鍵(Ks)として128ビット鍵を適用した128ビットキーRC4がある。
この128ビットキーRC4に本実施例3を適用する場合、秘密鍵(Ks)のサイズを128ビットとし、LFSRのレジスタ数(セット可能なビット数)のサイズは128ビット、その周期は最大周期2128−1となるようにLFSRを選択する。
具体的には、LFSRは、先に図6を参照して説明した構成とし、LFSRの出力系列の特性を決める特性多項式は、以下の128次の原始多項式とする。
f(x)=X128(+)X126(+)X101(+)X99(+)1
An example of an existing stream cipher to which the third embodiment can be applied is a 128-bit key RC4 to which a 128-bit key is applied as a secret key (Ks), for example.
When the third embodiment is applied to the 128-bit key RC4, the size of the secret key (Ks) is 128 bits, the size of the number of LFSR registers (number of bits that can be set) is 128 bits, and the cycle is the maximum cycle 2 The LFSR is selected to be 128-1.
Specifically, the LFSR has the configuration described above with reference to FIG. 6, and the characteristic polynomial that determines the characteristics of the output sequence of the LFSR is the following 128th order primitive polynomial.
f (x) = X 128 (+) X 126 (+) X 101 (+) X 99 (+) 1

既存のストリーム暗号RC4に、図6を参照して説明したLFSRと、鍵排他的変換部、および論理和演算部を付加することで、図11を参照して説明したキーストリーム生成部510を構成することが可能であり、既存の構成をそのまま利用して、安全性を高めた暗号処理構成を実現することができる。   The key stream generation unit 510 described with reference to FIG. 11 is configured by adding the LFSR, the key exclusive conversion unit, and the OR operation unit described with reference to FIG. 6 to the existing stream cipher RC4. It is possible to implement an encryption processing configuration with increased security by using an existing configuration as it is.

[3.暗号処理装置の構成例について]
最後に、上述した実施例に従った暗号処理を実行する暗号処理装置の構成例について説明する。
上述した実施例に従った暗号処理を実行する暗号処理装置は、暗号処理を実行する様々な情報処理装置に搭載可能である。具体的には、PC、TV、レコーダ、プレーヤ、通信機器、さらに、RFID、スマートカード、センサネットワーク機器、デンチ/バッテリー認証モジュール、健康・医療機器、自立型ネットワーク機器等、例えばデータ処理や通信処理に伴う暗号処理を実行する様々な機器において利用可能である。
[3. About configuration example of cryptographic processor]
Finally, a configuration example of a cryptographic processing apparatus that performs cryptographic processing according to the above-described embodiment will be described.
The cryptographic processing apparatus that performs cryptographic processing according to the above-described embodiments can be mounted on various information processing apparatuses that perform cryptographic processing. Specifically, PC, TV, recorder, player, communication device, RFID, smart card, sensor network device, dent / battery authentication module, health / medical device, self-supporting network device, etc., for example, data processing and communication processing It can be used in various devices that execute cryptographic processing associated with the above.

本開示の暗号処理を実行する装置の一例としてのICモジュール800の構成例を図14に示す。上述の処理は、例えばPC、ICカード、リーダライタ、スマートフォンやウェアラブルデバイス等の様々な情報処理装置において実行可能であり、図14に示すICモジュール800は、これら様々な機器に構成することが可能である。   FIG. 14 illustrates a configuration example of the IC module 800 as an example of an apparatus that executes the cryptographic processing according to the present disclosure. The above-described processing can be executed in various information processing apparatuses such as a PC, an IC card, a reader / writer, a smartphone, and a wearable device, and the IC module 800 illustrated in FIG. 14 can be configured in these various devices. It is.

図14に示すCPU(Central processing Unit)801は、暗号処理の開始や、終了、データの送受信の制御、各構成部間のデータ転送制御、その他の各種プログラムを実行するプロセッサである。メモリ802は、CPU801が実行するプログラム、あるいは演算パラメータなどの固定データを格納するROM(Read−Only−Memory)、CPU801の処理において実行されるプログラム、およびプログラム処理において適宜変化するパラメータの格納エリア、ワーク領域として使用されるRAM(Random Access Memory)等からなる。また、メモリ802は暗号処理に必要な鍵データや、暗号処理において適用する変換テーブル(置換表)や変換行列に適用するデータ等の格納領域として使用可能である。なおデータ格納領域は、耐タンパ構造を持つメモリとして構成されることが好ましい。   A CPU (Central processing Unit) 801 illustrated in FIG. 14 is a processor that executes the start and end of cryptographic processing, control of data transmission / reception, data transfer control between each component, and other various programs. A memory 802 is a ROM (Read-Only-Memory) that stores programs executed by the CPU 801 or fixed data such as calculation parameters, a program executed in the processing of the CPU 801, and a parameter storage area that changes as appropriate in the program processing, It consists of RAM (Random Access Memory) used as a work area. The memory 802 can be used as a storage area for key data necessary for encryption processing, data to be applied to a conversion table (substitution table) or conversion matrix applied in the encryption processing, and the like. The data storage area is preferably configured as a memory having a tamper resistant structure.

暗号処理部803は、上記において説明した暗号処理構成を有し、共通鍵ブロック暗号処理アルゴリズムに従った暗号処理、復号処理を実行する。   The cryptographic processing unit 803 has the cryptographic processing configuration described above, and executes cryptographic processing and decryption processing according to a common key block cryptographic processing algorithm.

なお、ここでは、暗号処理手段を個別モジュールとした例を示したが、このような独立した暗号処理モジュールを設けず、例えば暗号処理プログラムをROMに格納し、CPU801がROM格納プログラムを読み出して実行するように構成してもよい。   Here, an example is shown in which the cryptographic processing means is an individual module, but such an independent cryptographic processing module is not provided, for example, a cryptographic processing program is stored in the ROM, and the CPU 801 reads and executes the ROM stored program. You may comprise.

乱数発生器804は、暗号処理に必要となる鍵の生成などにおいて必要となる乱数の発生処理を実行する。   The random number generator 804 executes random number generation processing necessary for generating a key necessary for encryption processing.

送受信部805は、外部とのデータ通信を実行するデータ通信処理部であり、例えばリーダライタ等、ICモジュールとのデータ通信を実行し、ICモジュール内で生成した暗号文の出力、あるいは外部のリーダライタ等の機器からのデータ入力などを実行する。   The transmission / reception unit 805 is a data communication processing unit that performs data communication with the outside. For example, the data transmission / reception unit 805 performs data communication with an IC module such as a reader / writer, and outputs a ciphertext generated in the IC module or an external reader. Data input from devices such as writers is executed.

なお、上述した実施例において説明した暗号処理装置は、入力データとしての平文を暗号化する暗号化処理に適用可能であるのみならず、入力データとしての暗号文を平文に復元する復号処理にも適用可能である。
暗号化処理、復号処理、双方の処理において、上述した実施例において説明した構成を適用することが可能である。
Note that the encryption processing apparatus described in the above-described embodiment is not only applicable to encryption processing for encrypting plaintext as input data, but also for decryption processing for restoring ciphertext as input data to plaintext. Applicable.
The configurations described in the above-described embodiments can be applied to both the encryption process and the decryption process.

図15は、本開示に係る暗号処理を実行するスマートフォン900の概略的な構成の一例を示すブロック図である。スマートフォン900は、プロセッサ901、メモリ902、ストレージ903、外部接続インタフェース904、カメラ906、センサ907、マイクロフォン908、入力デバイス909、表示デバイス910、スピーカ911、無線通信インタフェース913、アンテナスイッチ914、アンテナ915、バス917、バッテリー918及び補助コントローラ919を備える。   FIG. 15 is a block diagram illustrating an example of a schematic configuration of the smartphone 900 that executes the cryptographic processing according to the present disclosure. The smartphone 900 includes a processor 901, a memory 902, a storage 903, an external connection interface 904, a camera 906, a sensor 907, a microphone 908, an input device 909, a display device 910, a speaker 911, a wireless communication interface 913, an antenna switch 914, an antenna 915, A bus 917, a battery 918, and an auxiliary controller 919 are provided.

プロセッサ901は、例えばCPU(Central Processing Unit)又はSoC(System on Chip)であってよく、スマートフォン900のアプリケーションレイヤ及びその他のレイヤの機能を制御し、また、暗号処理を制御する。メモリ902は、RAM(Random Access Memory)及びROM(Read Only Memory)を含み、プロセッサ901により実行されるプログラム及びデータを記憶する。また、メモリ902は、暗号処理に必要な鍵データや、暗号処理において適用する変換テーブル(置換表)や変換行列に適用するデータ等の格納領域として使用可能である。なおデータ格納領域は、耐タンパ構造を持つメモリとして構成されることが好ましい。ストレージ903は、半導体メモリ又はハードディスクなどの記憶媒体を含み得る。外部接続インタフェース904は、メモリーカード又はUSB(Universal Serial Bus)デバイスなどの外付けデバイスをスマートフォン900へ接続するためのインタフェースである。   The processor 901 may be, for example, a CPU (Central Processing Unit) or a SoC (System on Chip), and controls functions of an application layer and other layers of the smartphone 900 and controls cryptographic processing. The memory 902 includes a RAM (Random Access Memory) and a ROM (Read Only Memory), and stores programs executed by the processor 901 and data. The memory 902 can be used as a storage area for key data necessary for encryption processing, data to be applied to a conversion table (substitution table) or conversion matrix applied in the encryption processing, and the like. The data storage area is preferably configured as a memory having a tamper resistant structure. The storage 903 can include a storage medium such as a semiconductor memory or a hard disk. The external connection interface 904 is an interface for connecting an external device such as a memory card or a USB (Universal Serial Bus) device to the smartphone 900.

カメラ906は、例えば、CCD(Charge Coupled Device)又はCMOS(Complementary Metal Oxide Semiconductor)などの撮像素子を有し、撮像画像を生成する。センサ907は、例えば、測位センサ、ジャイロセンサ、地磁気センサ及び加速度センサなどのセンサ群を含み得る。マイクロフォン908は、スマートフォン900へ入力される音声を音声信号へ変換する。カメラ906で生成された画像や、センサ907で取得されたセンサデータ、マイクロフォン908で取得した音声信号などは、プロセッサ901により暗号化され無線通信インタフェース913を介して他の装置に送信されてもよい。入力デバイス909は、例えば、表示デバイス910の画面上へのタッチを検出するタッチセンサ、キーパッド、キーボード、ボタン又はスイッチなどを含み、ユーザからの操作又は情報入力を受け付ける。表示デバイス910は、液晶ディスプレイ(LCD)又は有機発光ダイオード(OLED)ディスプレイなどの画面を有し、スマートフォン900の出力画像を表示する。スピーカ911は、スマートフォン900から出力される音声信号を音声に変換する。   The camera 906 includes, for example, an imaging element such as a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS), and generates a captured image. The sensor 907 may include a sensor group such as a positioning sensor, a gyro sensor, a geomagnetic sensor, and an acceleration sensor. The microphone 908 converts sound input to the smartphone 900 into an audio signal. An image generated by the camera 906, sensor data acquired by the sensor 907, an audio signal acquired by the microphone 908, and the like may be encrypted by the processor 901 and transmitted to another device via the wireless communication interface 913. . The input device 909 includes, for example, a touch sensor that detects a touch on the screen of the display device 910, a keypad, a keyboard, a button, or a switch, and receives an operation or information input from a user. The display device 910 has a screen such as a liquid crystal display (LCD) or an organic light emitting diode (OLED) display, and displays an output image of the smartphone 900. The speaker 911 converts an audio signal output from the smartphone 900 into audio.

無線通信インタフェース913は、無線通信を実行し、典型的には、ベースバンドプロセッサ、RF(Radio Frequency)回路及びパワーアンプなどを含み得る。無線通信インタフェース913は、通信制御プログラムを記憶するメモリ、当該プログラムを実行するプロセッサ及び関連する回路を集積したワンチップのモジュールであってもよい。無線通信インタフェース913は、無線LAN方式に加えて、近距離無線通信方式、近接無線通信方式又はセルラ通信方式などの他の種類の無線通信方式をサポートしてもよい。   The wireless communication interface 913 performs wireless communication, and typically includes a baseband processor, an RF (Radio Frequency) circuit, a power amplifier, and the like. The wireless communication interface 913 may be a one-chip module in which a memory that stores a communication control program, a processor that executes the program, and related circuits are integrated. The wireless communication interface 913 may support other types of wireless communication methods such as a short-range wireless communication method, a proximity wireless communication method, or a cellular communication method in addition to the wireless LAN method.

バス917は、プロセッサ901、メモリ902、ストレージ903、外部接続インタフェース904、カメラ906、センサ907、マイクロフォン908、入力デバイス909、表示デバイス910、スピーカ911、無線通信インタフェース913及び補助コントローラ919を互いに接続する。バッテリー918は、図中に破線で部分的に示した給電ラインを介して、図15に示したスマートフォン900の各ブロックへ電力を供給する。補助コントローラ919は、例えば、スリープモードにおいて、スマートフォン900の必要最低限の機能を動作させる。   The bus 917 connects the processor 901, memory 902, storage 903, external connection interface 904, camera 906, sensor 907, microphone 908, input device 909, display device 910, speaker 911, wireless communication interface 913, and auxiliary controller 919 to each other. . The battery 918 supplies power to each block of the smartphone 900 illustrated in FIG. 15 through a power supply line partially illustrated by a broken line in the drawing. For example, the auxiliary controller 919 operates the minimum necessary functions of the smartphone 900 in the sleep mode.

なお、上述した実施例において説明したスマートフォンにおける暗号処理は、入力データとしての平文を暗号化する暗号化処理に適用可能であるのみならず、入力データとしての暗号文を平文に復元する復号処理にも適用可能である。
暗号化処理、復号処理、双方の処理において、上述した実施例において説明した構成を適用することが可能である。
また、図15に示すスマートフォン900に図14に示すICモジュール800を搭載し、上述した実施例に従った暗号処理をICモジュール800において実行する構成としてもよい。
Note that the encryption processing in the smartphone described in the above-described embodiment is not only applicable to encryption processing for encrypting plaintext as input data, but also for decryption processing for restoring ciphertext as input data to plaintext. Is also applicable.
The configurations described in the above-described embodiments can be applied to both the encryption process and the decryption process.
Further, the IC module 800 shown in FIG. 14 may be mounted on the smartphone 900 shown in FIG. 15, and the encryption processing according to the above-described embodiment may be executed in the IC module 800.

[4.本開示の構成のまとめ]
以上、特定の実施例を参照しながら、本開示の実施例について詳解してきた。しかしながら、本開示の要旨を逸脱しない範囲で当業者が実施例の修正や代用を成し得ることは自明である。すなわち、例示という形態で本発明を開示してきたのであり、限定的に解釈されるべきではない。本開示の要旨を判断するためには、特許請求の範囲の欄を参酌すべきである。
[4. Summary of composition of the present disclosure]
As described above, the embodiments of the present disclosure have been described in detail with reference to specific embodiments. However, it is obvious that those skilled in the art can make modifications and substitutions of the embodiments without departing from the gist of the present disclosure. In other words, the present invention has been disclosed in the form of exemplification, and should not be interpreted in a limited manner. In order to determine the gist of the present disclosure, the claims should be taken into consideration.

なお、本明細書において開示した技術は、以下のような構成をとることができる。
(1) 暗号鍵データからなるデータストリームであるキーストリームを生成するキーストリーム生成部と、
前記キーストリームを構成する暗号鍵データと、暗号処理対象データとの演算処理を実行する演算部を有し、
前記キーストリーム生成部は、
第1の秘密鍵に基づいて擬似乱数を生成する擬似乱数生成部と、
第2の秘密鍵に基づいてLFSR出力データを生成する線形フィードバックレジスタ(LFSR)と、
前記擬似乱数生成部の生成した疑似乱数と、前記LFSR出力データとの排他的論理和演算処理を実行する排他的論理和演算部を有し、
前記排他的論理和演算部の出力をキーストリームとして出力する暗号処理装置。
The technology disclosed in this specification can take the following configurations.
(1) a key stream generation unit that generates a key stream that is a data stream composed of encryption key data;
An operation unit that performs operation processing of encryption key data constituting the key stream and encryption processing target data;
The key stream generation unit
A pseudo-random number generator that generates a pseudo-random number based on the first secret key;
A linear feedback register (LFSR) that generates LFSR output data based on a second secret key;
An exclusive OR operation unit that executes an exclusive OR operation process between the pseudo random number generated by the pseudo random number generator and the LFSR output data;
An encryption processing apparatus that outputs an output of the exclusive OR operation unit as a key stream.

(2) 前記第1の秘密鍵と前記第2の秘密鍵は、異なる秘密鍵である(1)に記載の暗号処理装置。   (2) The cryptographic processing device according to (1), wherein the first secret key and the second secret key are different secret keys.

(3) 前記第1の秘密鍵と前記第2の秘密鍵は、同一の秘密鍵である(1)に記載の暗号処理装置。   (3) The cryptographic processing device according to (1), wherein the first secret key and the second secret key are the same secret key.

(4) 前記第2の秘密鍵は、前記第1の秘密鍵に基づくデータ変換処理によって生成された鍵である(1)に記載の暗号処理装置。   (4) The cryptographic processing apparatus according to (1), wherein the second secret key is a key generated by a data conversion process based on the first secret key.

(5) 前記キーストリーム生成部は、鍵変換部を有し、
前記鍵変換部は、前記第1の秘密鍵を入力して該第1の秘密鍵と異なる第2の秘密鍵を生成して前記線形フィードバックレジスタ(LFSR)に入力する(1)に記載の暗号処理装置。
(5) The key stream generation unit includes a key conversion unit,
The key conversion unit receives the first secret key, generates a second secret key different from the first secret key, and inputs the second secret key to the linear feedback register (LFSR). Processing equipment.

(6) 前記鍵変換部は、
一方向性ハッシュ関数を適用したデータ変換を実行する(5)に記載の暗号処理装置。
(6) The key conversion unit
The cryptographic processing apparatus according to (5), which performs data conversion to which a one-way hash function is applied.

(7) 前記擬似乱数生成部は、1バイト単位の擬似乱数を生成し、
前記線形フィードバックレジスタ(LFSR)は、1バイト単位のLFSR出力を生成し、
前記排他的論理和演算部は、1バイト単位の擬似乱数と、1バイト単位のLFSR出力との排他的論理和演算を実行して、1バイト単位の暗号鍵データからなるキーストリームを生成する(1〜(6)いずれかに記載の暗号処理装置。
(7) The pseudo random number generation unit generates a pseudo random number in units of 1 byte,
The linear feedback register (LFSR) generates an LFSR output in 1-byte units,
The exclusive OR operation unit performs an exclusive OR operation on a 1-byte unit pseudo-random number and a 1-byte unit LFSR output to generate a key stream composed of 1-byte unit encryption key data ( The cryptographic processing device according to any one of 1 to (6).

(8) 前記線形フィードバックレジスタ(LFSR)は、特性多項式が、
f(x)=X128(+)X126(+)X101(+)X99(+)1
上記の128次の原始多項式によって規定される構成である(1)〜(7)いずれかに記載の暗号処理装置。
(8) The linear feedback register (LFSR) has a characteristic polynomial
f (x) = X 128 (+) X 126 (+) X 101 (+) X 99 (+) 1
The cryptographic processing device according to any one of (1) to (7), wherein the cryptographic processing device has a configuration defined by the 128th-order primitive polynomial.

(9) 前記線形フィードバックレジスタ(LFSR)は、特性多項式が、
f(x)=X64(+)X63(+)X61(+)X60(+)1
上記の64次の原始多項式によって規定される構成である(1)〜(7)いずれかに記載の暗号処理装置。
(9) The linear feedback register (LFSR) has a characteristic polynomial
f (x) = X 64 (+) X 63 (+) X 61 (+) X 60 (+) 1
The cryptographic processing device according to any one of (1) to (7), wherein the cryptographic processing device has a configuration defined by the 64th order primitive polynomial.

(10) 前記キーストリーム生成部は、
前記第1の秘密鍵を入力して、擬似乱数生成用初期データを生成する鍵スケジュール部と、
前記鍵スケジュール部の生成した疑似乱数生成用初期データを入力して擬似乱数を出力する擬似乱数生成部を有する構成である(1)〜(9)いずれかに記載の暗号処理装置。
(10) The key stream generation unit
A key schedule unit that inputs the first secret key and generates initial data for generating pseudo-random numbers;
The cryptographic processing device according to any one of (1) to (9), wherein the cryptographic processing device includes a pseudo-random number generation unit that inputs pseudo-random number generation initial data generated by the key schedule unit and outputs a pseudo-random number.

(11) 復号鍵データからなるデータストリームであるキーストリームを生成するキーストリーム生成部と、
前記キーストリームを構成する復号鍵データと、復号処理対象データとの演算処理を実行する演算部を有し、
前記キーストリーム生成部は、
第1の秘密鍵に基づいて擬似乱数を生成する擬似乱数生成部と、
第2の秘密鍵に基づいてLFSR出力データを生成する線形フィードバックレジスタ(LFSR)と、
前記擬似乱数生成部の生成した疑似乱数と、前記LFSR出力データとの排他的論理和演算処理を実行する排他的論理和演算部を有し、
前記排他的論理和演算部の出力をキーストリームとして出力する復号処理装置。
(11) a key stream generation unit that generates a key stream that is a data stream including decryption key data;
An operation unit that performs an operation process between the decryption key data constituting the key stream and the decryption target data;
The key stream generation unit
A pseudo-random number generator that generates a pseudo-random number based on the first secret key;
A linear feedback register (LFSR) that generates LFSR output data based on a second secret key;
An exclusive OR operation unit that executes an exclusive OR operation process between the pseudo random number generated by the pseudo random number generator and the LFSR output data;
A decryption processing device that outputs the output of the exclusive OR operation unit as a key stream.

(12) 暗号処理装置において実行する暗号処理方法であり、
キーストリーム生成部が、暗号鍵データからなるデータストリームであるキーストリームを生成するキーストリーム生成ステップと、
演算部が、前記キーストリームを構成する暗号鍵データと、暗号処理対象データとの演算処理を実行する演算ステップを実行し、
前記キーストリーム生成ステップは、
擬似乱数生成部が、第1の秘密鍵に基づいて擬似乱数を生成する擬似乱数生成ステップと、
線形フィードバックレジスタ(LFSR)が、第2の秘密鍵に基づいてLFSR出力データを生成するLFSR出力データ生成ステップと、
排他的論理和演算部が、前記擬似乱数生成部の生成した疑似乱数と、前記LFSR出力データとの排他的論理和演算処理を実行する排他的論理和演算ステップを有し、
前記排他的論理和演算部の出力をキーストリームとして出力する暗号処理方法。
(12) A cryptographic processing method executed in the cryptographic processing device,
A key stream generation step in which a key stream generation unit generates a key stream that is a data stream composed of encryption key data; and
The calculation unit executes a calculation step of performing calculation processing of encryption key data constituting the key stream and encryption processing target data,
The key stream generation step includes:
A pseudo-random number generating unit that generates a pseudo-random number based on the first secret key;
An LFSR output data generation step, wherein a linear feedback register (LFSR) generates LFSR output data based on the second secret key;
An exclusive OR operation unit has an exclusive OR operation step of performing an exclusive OR operation process between the pseudo random number generated by the pseudo random number generator and the LFSR output data;
An encryption processing method for outputting an output of the exclusive OR operation unit as a key stream.

(13) 暗号処理装置において暗号処理を実行させるプログラムであり、
キーストリーム生成部に、暗号鍵データからなるデータストリームであるキーストリームを生成させるキーストリーム生成ステップと、
演算部に、前記キーストリームを構成する暗号鍵データと、暗号処理対象データとの演算処理を実行させる演算ステップを実行させ、
前記プログラムは、前記キーストリーム生成ステップにおいて、
擬似乱数生成部に、第1の秘密鍵に基づいて擬似乱数を生成させる擬似乱数生成ステップと、
線形フィードバックレジスタ(LFSR)に、第2の秘密鍵に基づいてLFSR出力データを生成させるLFSR出力データ生成ステップと、
排他的論理和演算部に、前記擬似乱数生成部の生成した疑似乱数と、前記LFSR出力データとの排他的論理和演算処理を実行させる排他的論理和演算ステップを実行させ、
前記排他的論理和演算部の出力をキーストリームとして出力させるプログラム。
(13) A program for executing cryptographic processing in the cryptographic processing device,
A key stream generation step for causing the key stream generation unit to generate a key stream that is a data stream composed of encryption key data; and
Causing the calculation unit to execute a calculation step of executing calculation processing of the encryption key data constituting the key stream and the encryption processing target data;
In the key stream generation step, the program includes:
A pseudo-random number generation step for causing the pseudo-random number generator to generate a pseudo-random number based on the first secret key;
An LFSR output data generating step for causing a linear feedback register (LFSR) to generate LFSR output data based on the second secret key;
Causing the exclusive OR operation unit to execute an exclusive OR operation step of executing an exclusive OR operation of the pseudo random number generated by the pseudo random number generation unit and the LFSR output data;
A program for outputting the output of the exclusive OR operation unit as a key stream.

また、明細書中において説明した一連の処理はハードウェア、またはソフトウェア、あるいは両者の複合構成によって実行することが可能である。ソフトウェアによる処理を実行する場合は、処理シーケンスを記録したプログラムを、専用のハードウェアに組み込まれたコンピュータ内のメモリにインストールして実行させるか、あるいは、各種処理が実行可能な汎用コンピュータにプログラムをインストールして実行させることが可能である。例えば、プログラムは記録媒体に予め記録しておくことができる。記録媒体からコンピュータにインストールする他、LAN(Local Area Network)、インターネットといったネットワークを介してプログラムを受信し、内蔵するハードディスク等の記録媒体にインストールすることができる。   The series of processing described in the specification can be executed by hardware, software, or a combined configuration of both. When executing processing by software, the program recording the processing sequence is installed in a memory in a computer incorporated in dedicated hardware and executed, or the program is executed on a general-purpose computer capable of executing various processing. It can be installed and run. For example, the program can be recorded in advance on a recording medium. In addition to being installed on a computer from a recording medium, the program can be received via a network such as a LAN (Local Area Network) or the Internet and can be installed on a recording medium such as a built-in hard disk.

なお、明細書に記載された各種の処理は、記載に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。また、本明細書においてシステムとは、複数の装置の論理的集合構成であり、各構成の装置が同一筐体内にあるものには限らない。   Note that the various processes described in the specification are not only executed in time series according to the description, but may be executed in parallel or individually according to the processing capability of the apparatus that executes the processes or as necessary. Further, in this specification, the system is a logical set configuration of a plurality of devices, and the devices of each configuration are not limited to being in the same casing.

上述したように、本開示の一実施例の構成によれば、安全性を向上させたストリーム暗号を実行する装置、方法が実現される。
具体的には、暗号鍵データからなるデータストリームであるキーストリームを生成するキーストリーム生成部と、キーストリームを構成する暗号鍵データと、暗号処理対象データとの演算処理を実行する演算部を有し、キーストリーム生成部は、第1の秘密鍵に基づいて擬似乱数を生成する擬似乱数生成部と、第2の秘密鍵に基づいてLFSR出力データを生成する線形フィードバックレジスタ(LFSR)と、擬似乱数生成部の生成した疑似乱数と、LFSR出力データとの排他的論理和演算処理を実行する排他的論理和演算部を有し、排他的論理和演算部の出力をキーストリームとして出力する。
本構成により、安全性を向上させたストリーム暗号を実行する装置、方法が実現される。
As described above, according to the configuration of an embodiment of the present disclosure, an apparatus and a method for executing stream cipher with improved security are realized.
Specifically, it has a key stream generation unit that generates a key stream that is a data stream composed of encryption key data, and an operation unit that performs an operation process on the encryption key data constituting the key stream and the data to be encrypted. The key stream generation unit includes a pseudo random number generation unit that generates a pseudo random number based on the first secret key, a linear feedback register (LFSR) that generates LFSR output data based on the second secret key, The exclusive OR operation part which performs the exclusive OR operation process of the pseudorandom numbers which the random number generation part produced | generated, and LFSR output data is provided, and the output of an exclusive OR operation part is output as a key stream.
With this configuration, an apparatus and a method for executing stream cipher with improved safety are realized.

11 秘密鍵
12 初期ベクトル
13 キーストリーム(擬似乱数)
21 平文
22 暗号文
50 キーストリーム生成部
51 鍵スケジュール部
52 擬似乱数生成部
53 排他的論理和(XOR)演算部
41 秘密鍵
42 初期ベクトル
43 キーストリーム(擬似乱数)
70 キーストリーム生成部
71 鍵スケジュール部
72 擬似乱数生成部
73 排他的論理和(XOR)演算部
110 キーストリーム生成部
111 鍵スケジュール部
112 擬似乱数生成部
121 線形フィードバックシフトレジスタ(LFSR)
122 排他的論理和(XOR)演算部
131 第1秘密鍵(Ks)
132 初期ベクトル
133 第2秘密鍵(KL)
134 出力擬似乱数
135 LFSR出力
136 キーストリーム(擬似乱数)
141 平文
142 暗号文
210 キーストリーム生成部
211 鍵スケジュール部
212 擬似乱数生成部
221 線形フィードバックシフトレジスタ(LFSR)
222 排他的論理和(XOR)演算部
231 第1秘密鍵(Ks)
232 初期ベクトル
233 第2秘密鍵(KL)
234 出力擬似乱数
235 LFSR出力
236 キーストリーム(擬似乱数)
510 キーストリーム生成部
511 鍵スケジュール部
512 擬似乱数生成部
521 鍵変換部
522 線形フィードバックシフトレジスタ(LFSR)
523 排他的論理和(XOR)演算部
531 第1秘密鍵(Ks)
532 初期ベクトル
534 出力擬似乱数
535 LFSR出力
536 キーストリーム(擬似乱数)
541 平文
542 暗号文
551 ハッシュ関数実行部
552 ビット数調整部
610 キーストリーム生成部
611 鍵スケジュール部
612 擬似乱数生成部
621 鍵変換部
622 線形フィードバックシフトレジスタ(LFSR)
623 排他的論理和(XOR)演算部
631 第1秘密鍵(Ks)
632 初期ベクトル
634 出力擬似乱数
635 LFSR出力
636 キーストリーム(擬似乱数)
800 ICモジュール
801 CPU(Central processing Unit)
802 メモリ
803 暗号処理部
804 乱数生成部
805 送受信部
900 スマートフォン
901 プロセッサ
902 メモリ
903 ストレージ
904 外部接続インタフェース
906 カメラ
907 センサ
908 マイクロフォン
909 入力デバイス
910 表示デバイス
911 スピーカ
913 無線通信インタフェース
914 アンテナスイッチ
915 アンテナ
917 バス
918 バッテリー
919 補助コントローラ
11 Secret key 12 Initial vector 13 Key stream (pseudo-random number)
21 plaintext 22 ciphertext 50 key stream generation unit 51 key schedule unit 52 pseudo random number generation unit 53 exclusive OR (XOR) operation unit 41 secret key 42 initial vector 43 key stream (pseudo random number)
70 Key Stream Generation Unit 71 Key Schedule Unit 72 Pseudo Random Number Generation Unit 73 Exclusive OR (XOR) Operation Unit 110 Key Stream Generation Unit 111 Key Schedule Unit 112 Pseudo Random Number Generation Unit 121 Linear Feedback Shift Register (LFSR)
122 Exclusive OR (XOR) Operation Unit 131 First Secret Key (Ks)
132 Initial vector 133 Second secret key (KL)
134 Output pseudo random number 135 LFSR output 136 Key stream (pseudo random number)
141 plaintext 142 ciphertext 210 key stream generation unit 211 key schedule unit 212 pseudorandom number generation unit 221 linear feedback shift register (LFSR)
222 Exclusive OR (XOR) operation unit 231 First secret key (Ks)
232 Initial vector 233 Second secret key (KL)
234 Output pseudo random number 235 LFSR output 236 Key stream (pseudo random number)
510 Key stream generation unit 511 Key schedule unit 512 Pseudo random number generation unit 521 Key conversion unit 522 Linear feedback shift register (LFSR)
523 Exclusive OR (XOR) operation part 531 1st secret key (Ks)
532 Initial vector 534 Output pseudorandom number 535 LFSR output 536 Key stream (pseudorandom number)
541 Plain text 542 Cipher text 551 Hash function execution unit 552 Bit number adjustment unit 610 Key stream generation unit 611 Key schedule unit 612 Pseudo random number generation unit 621 Key conversion unit 622 Linear feedback shift register (LFSR)
623 Exclusive OR (XOR) operation part 631 1st secret key (Ks)
632 Initial vector 634 Output pseudo-random number 635 LFSR output 636 Key stream (pseudo-random number)
800 IC module 801 CPU (Central processing Unit)
802 Memory 803 Encryption processing unit 804 Random number generation unit 805 Transmission / reception unit 900 Smartphone 901 Processor 902 Memory 903 Storage 904 External connection interface 906 Camera 907 Sensor 908 Microphone 909 Input device 910 Display device 911 Speaker 913 Wireless communication interface 914 Antenna switch 915 Antenna 917 918 Battery 919 Auxiliary controller

Claims (13)

暗号鍵データからなるデータストリームであるキーストリームを生成するキーストリーム生成部と、
前記キーストリームを構成する暗号鍵データと、暗号処理対象データとの演算処理を実行する演算部を有し、
前記キーストリーム生成部は、
第1の秘密鍵に基づいて擬似乱数を生成する擬似乱数生成部と、
第2の秘密鍵に基づいてLFSR出力データを生成する線形フィードバックレジスタ(LFSR)と、
前記擬似乱数生成部の生成した擬似乱数と、前記LFSR出力データとの排他的論理和演算処理を実行する排他的論理和演算部を有し、
前記排他的論理和演算部の出力をキーストリームとして出力する構成であり、
前記キーストリームは、前記キーストリーム生成部への入力値に応じて値が決定される再現可能な擬似乱数である暗号処理装置。
A key stream generation unit that generates a key stream that is a data stream composed of encryption key data;
An operation unit that performs operation processing of encryption key data constituting the key stream and encryption processing target data;
The key stream generation unit
A pseudo-random number generator that generates a pseudo-random number based on the first secret key;
A linear feedback register (LFSR) that generates LFSR output data based on a second secret key;
An exclusive OR operation unit that executes an exclusive OR operation process between the pseudo random number generated by the pseudo random number generation unit and the LFSR output data;
The output of the exclusive OR operation unit is output as a key stream ,
The cryptographic processing apparatus , wherein the key stream is a reproducible pseudo-random number whose value is determined according to an input value to the key stream generation unit .
前記第1の秘密鍵と前記第2の秘密鍵は、異なる秘密鍵である請求項1に記載の暗号処理装置。   The cryptographic processing apparatus according to claim 1, wherein the first secret key and the second secret key are different secret keys. 前記第1の秘密鍵と前記第2の秘密鍵は、同一の秘密鍵である請求項1に記載の暗号処理装置。   The cryptographic processing apparatus according to claim 1, wherein the first secret key and the second secret key are the same secret key. 前記第2の秘密鍵は、前記第1の秘密鍵に基づくデータ変換処理によって生成された鍵である請求項1に記載の暗号処理装置。   The cryptographic processing apparatus according to claim 1, wherein the second secret key is a key generated by a data conversion process based on the first secret key. 前記キーストリーム生成部は、鍵変換部を有し、
前記鍵変換部は、前記第1の秘密鍵を入力して該第1の秘密鍵と異なる第2の秘密鍵を生成して前記線形フィードバックレジスタ(LFSR)に入力する請求項1に記載の暗号処理装置。
The key stream generation unit includes a key conversion unit,
2. The encryption according to claim 1, wherein the key conversion unit receives the first secret key, generates a second secret key different from the first secret key, and inputs the second secret key to the linear feedback register (LFSR). Processing equipment.
前記鍵変換部は、
一方向性ハッシュ関数を適用したデータ変換を実行する請求項5に記載の暗号処理装置。
The key conversion unit
The cryptographic processing apparatus according to claim 5, wherein data conversion is performed by applying a one-way hash function.
前記擬似乱数生成部は、1バイト単位の擬似乱数を生成し、
前記線形フィードバックレジスタ(LFSR)は、1バイト単位のLFSR出力を生成し、
前記排他的論理和演算部は、1バイト単位の擬似乱数と、1バイト単位のLFSR出力との排他的論理和演算を実行して、1バイト単位の暗号鍵データからなるキーストリームを生成する請求項1に記載の暗号処理装置。
The pseudo-random number generator generates a pseudo-random number in 1-byte units,
The linear feedback register (LFSR) generates an LFSR output in 1-byte units,
The exclusive OR operation unit performs an exclusive OR operation on a 1-byte unit pseudo-random number and a 1-byte unit LFSR output to generate a key stream composed of 1-byte unit encryption key data. Item 4. The cryptographic processing device according to Item 1.
前記線形フィードバックレジスタ(LFSR)は、特性多項式が、
f(x)=X128(+)X126(+)X101(+)X99(+)1
上記の128次の原始多項式によって規定される構成である請求項1に記載の暗号処理装置。
The linear feedback register (LFSR) has a characteristic polynomial:
f (x) = X 128 (+) X 126 (+) X 101 (+) X 99 (+) 1
The cryptographic processing apparatus according to claim 1, wherein the cryptographic processing apparatus is configured by the 128th-order primitive polynomial.
前記線形フィードバックレジスタ(LFSR)は、特性多項式が、
f(x)=X64(+)X63(+)X61(+)X60(+)1
上記の64次の原始多項式によって規定される構成である請求項1に記載の暗号処理装置。
The linear feedback register (LFSR) has a characteristic polynomial:
f (x) = X 64 (+) X 63 (+) X 61 (+) X 60 (+) 1
The cryptographic processing apparatus according to claim 1, wherein the cryptographic processing apparatus has a configuration defined by the 64th order primitive polynomial.
前記キーストリーム生成部は、
前記第1の秘密鍵を入力して、擬似乱数生成用初期データを生成する鍵スケジュール部と、
前記鍵スケジュール部の生成した擬似乱数生成用初期データを入力して擬似乱数を出力する擬似乱数生成部を有する構成である請求項1に記載の暗号処理装置。
The key stream generation unit
A key schedule unit that inputs the first secret key and generates initial data for generating pseudo-random numbers;
Cryptographic processing apparatus according to claim 1 which is configured to have a pseudo-random number generator outputting a pseudorandom number by entering the pseudo-random number generator for the initial data generated by the key scheduling part.
復号鍵データからなるデータストリームであるキーストリームを生成するキーストリーム生成部と、
前記キーストリームを構成する復号鍵データと、復号処理対象データとの演算処理を実行する演算部を有し、
前記キーストリーム生成部は、
第1の秘密鍵に基づいて擬似乱数を生成する擬似乱数生成部と、
第2の秘密鍵に基づいてLFSR出力データを生成する線形フィードバックレジスタ(LFSR)と、
前記擬似乱数生成部の生成した擬似乱数と、前記LFSR出力データとの排他的論理和演算処理を実行する排他的論理和演算部を有し、
前記排他的論理和演算部の出力をキーストリームとして出力する構成であり、
前記キーストリームは、前記キーストリーム生成部への入力値に応じて値が決定される再現可能な擬似乱数である復号処理装置。
A key stream generation unit that generates a key stream that is a data stream composed of decryption key data;
An operation unit that performs an operation process between the decryption key data constituting the key stream and the decryption target data;
The key stream generation unit
A pseudo-random number generator that generates a pseudo-random number based on the first secret key;
A linear feedback register (LFSR) that generates LFSR output data based on a second secret key;
An exclusive OR operation unit that executes an exclusive OR operation process between the pseudo random number generated by the pseudo random number generation unit and the LFSR output data;
The output of the exclusive OR operation unit is output as a key stream ,
The decryption processing device , wherein the key stream is a reproducible pseudo-random number whose value is determined according to an input value to the key stream generation unit .
暗号処理装置において実行する暗号処理方法であり、
キーストリーム生成部が、暗号鍵データからなるデータストリームであるキーストリームを生成するキーストリーム生成ステップと、
演算部が、前記キーストリームを構成する暗号鍵データと、暗号処理対象データとの演算処理を実行する演算ステップを実行し、
前記キーストリーム生成ステップは、
擬似乱数生成部が、第1の秘密鍵に基づいて擬似乱数を生成する擬似乱数生成ステップと、
線形フィードバックレジスタ(LFSR)が、第2の秘密鍵に基づいてLFSR出力データを生成するLFSR出力データ生成ステップと、
排他的論理和演算部が、前記擬似乱数生成部の生成した擬似乱数と、前記LFSR出力データとの排他的論理和演算処理を実行する排他的論理和演算ステップを有し、
前記排他的論理和演算部の出力をキーストリームとして出力する暗号処理方法であり、
前記キーストリームは、前記キーストリーム生成部への入力値に応じて値が決定される再現可能な擬似乱数である暗号処理方法
A cryptographic processing method executed in the cryptographic processing device,
A key stream generation step in which a key stream generation unit generates a key stream that is a data stream composed of encryption key data; and
The calculation unit executes a calculation step of performing calculation processing of encryption key data constituting the key stream and encryption processing target data,
The key stream generation step includes:
A pseudo-random number generating unit that generates a pseudo-random number based on the first secret key;
An LFSR output data generation step, wherein a linear feedback register (LFSR) generates LFSR output data based on the second secret key;
The exclusive OR operation unit has an exclusive OR operation step of performing an exclusive OR operation process between the pseudo random number generated by the pseudo random number generation unit and the LFSR output data;
An encryption processing method for outputting an output of the exclusive OR operation unit as a key stream ,
The cryptographic processing method, wherein the key stream is a reproducible pseudo-random number whose value is determined according to an input value to the key stream generation unit .
暗号処理装置において暗号処理を実行させるプログラムであり、
キーストリーム生成部に、暗号鍵データからなるデータストリームであるキーストリームを生成させるキーストリーム生成ステップと、
演算部に、前記キーストリームを構成する暗号鍵データと、暗号処理対象データとの演算処理を実行させる演算ステップを実行させ、
前記プログラムは、前記キーストリーム生成ステップにおいて、
擬似乱数生成部に、第1の秘密鍵に基づいて擬似乱数を生成させる擬似乱数生成ステップと、
線形フィードバックレジスタ(LFSR)に、第2の秘密鍵に基づいてLFSR出力データを生成させるLFSR出力データ生成ステップと、
排他的論理和演算部に、前記擬似乱数生成部の生成した擬似乱数と、前記LFSR出力データとの排他的論理和演算処理を実行させる排他的論理和演算ステップを実行させ、
前記排他的論理和演算部の出力をキーストリームとして出力させるプログラムであり、
前記キーストリームは、前記キーストリーム生成部への入力値に応じて値が決定される再現可能な擬似乱数であるプログラム
A program for executing cryptographic processing in the cryptographic processing device,
A key stream generation step for causing the key stream generation unit to generate a key stream that is a data stream composed of encryption key data; and
Causing the calculation unit to execute a calculation step of executing calculation processing of the encryption key data constituting the key stream and the encryption processing target data;
In the key stream generation step, the program includes:
A pseudo-random number generation step for causing the pseudo-random number generator to generate a pseudo-random number based on the first secret key;
An LFSR output data generating step for causing a linear feedback register (LFSR) to generate LFSR output data based on the second secret key;
Causing the exclusive OR operation unit to execute an exclusive OR operation step of executing an exclusive OR operation process between the pseudo random number generated by the pseudo random number generation unit and the LFSR output data;
A program for outputting the output of the exclusive OR operation unit as a key stream ,
The key stream is a reproducible pseudo-random number whose value is determined according to an input value to the key stream generation unit .
JP2014242332A 2014-11-28 2014-11-28 Cryptographic processing apparatus, cryptographic processing method, and program Active JP6287785B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014242332A JP6287785B2 (en) 2014-11-28 2014-11-28 Cryptographic processing apparatus, cryptographic processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014242332A JP6287785B2 (en) 2014-11-28 2014-11-28 Cryptographic processing apparatus, cryptographic processing method, and program

Publications (2)

Publication Number Publication Date
JP2016103799A JP2016103799A (en) 2016-06-02
JP6287785B2 true JP6287785B2 (en) 2018-03-07

Family

ID=56089240

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014242332A Active JP6287785B2 (en) 2014-11-28 2014-11-28 Cryptographic processing apparatus, cryptographic processing method, and program

Country Status (1)

Country Link
JP (1) JP6287785B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11838402B2 (en) 2019-03-13 2023-12-05 The Research Foundation For The State University Of New York Ultra low power core for lightweight encryption

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6584732B2 (en) * 2017-06-27 2019-10-02 三菱電機株式会社 Code generation apparatus, code generation method, and code generation program
TWI760546B (en) * 2017-08-23 2022-04-11 安地卡及巴布達商區塊鏈控股有限公司 Computer-implemented system and method for highly secure, high speed encryption and transmission of data
KR101975800B1 (en) * 2017-08-23 2019-05-08 다운정보통신(주) Parallel Processing Method and Parallelization System for High Speed Stream Cipher Implementation
CN113541947B (en) * 2021-09-16 2021-11-26 飞天诚信科技股份有限公司 Work key generation method and device and computer readable storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3604674B2 (en) * 2001-09-26 2004-12-22 株式会社東芝 Random number generation circuit
JP4248950B2 (en) * 2003-06-24 2009-04-02 株式会社ルネサステクノロジ Random number generator
JP4363273B2 (en) * 2004-07-28 2009-11-11 日本ビクター株式会社 Random number generator
US9116764B2 (en) * 2007-04-17 2015-08-25 Conversant Intellectual Property Management Inc. Balanced pseudo-random binary sequence generator
JP5188414B2 (en) * 2009-02-09 2013-04-24 三菱電機株式会社 Information processing apparatus, information processing method, and program
JP5559011B2 (en) * 2010-11-02 2014-07-23 Kddi株式会社 Stream cipher encryption apparatus, stream cipher encryption method and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11838402B2 (en) 2019-03-13 2023-12-05 The Research Foundation For The State University Of New York Ultra low power core for lightweight encryption

Also Published As

Publication number Publication date
JP2016103799A (en) 2016-06-02

Similar Documents

Publication Publication Date Title
US9819657B2 (en) Protection of memory interface
US10187200B1 (en) System and method for generating a multi-stage key for use in cryptographic operations
JP6287785B2 (en) Cryptographic processing apparatus, cryptographic processing method, and program
JP6406350B2 (en) Cryptographic processing apparatus, cryptographic processing method, and program
JP5481455B2 (en) Cryptographic processing device
JP2017504838A (en) Countermeasures against side-channel attacks against cryptographic algorithms
JP2009506438A (en) Cryptographically secure pseudorandom number generator
JP2014509812A (en) Establishing a unique key during chip manufacture
US20120314857A1 (en) Block encryption device, block decryption device, block encryption method, block decryption method and program
JPWO2006100801A1 (en) Keystream encryption apparatus and method, and program
JPWO2008010441A1 (en) Cryptographic apparatus, program and method
US20180054301A1 (en) Method and device for data encryption
JP2015191106A (en) Encryption processing device, encryption processing method, and program
Christina et al. Optimized Blowfish encryption technique
Jassim et al. A survey on stream ciphers for constrained environments
WO2015146430A1 (en) Encryption processing device, and encryption processing method and program
JP6348273B2 (en) Information processing system
WO2016059870A1 (en) Cipher processing apparatus, cipher processing method, and program
Subramanian et al. Adaptive counter clock gated S-Box transformation based AES algorithm of low power consumption and dissipation in VLSI system design
US8718278B2 (en) Method and system for encryption of a datastream
Buja et al. The direction of lightweight ciphers in mobile big data computing
Landge et al. VHDL based Blowfish implementation for secured embedded system design
JP2008276728A (en) Pseudorandom number generator and encryption device using the same
JP2005309148A (en) Data converter and the data conversion method
Labbi et al. Symmetric encryption algorithm for RFID systems using a dynamic generation of key

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170201

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170927

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171107

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171113

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180122

R151 Written notification of patent or utility model registration

Ref document number: 6287785

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151