JP2007287079A - Pseudo random number generation device, pseudo random number generation method, pseudo random number generation program, ciphering device and deciphering device - Google Patents

Pseudo random number generation device, pseudo random number generation method, pseudo random number generation program, ciphering device and deciphering device Download PDF

Info

Publication number
JP2007287079A
JP2007287079A JP2006116557A JP2006116557A JP2007287079A JP 2007287079 A JP2007287079 A JP 2007287079A JP 2006116557 A JP2006116557 A JP 2006116557A JP 2006116557 A JP2006116557 A JP 2006116557A JP 2007287079 A JP2007287079 A JP 2007287079A
Authority
JP
Japan
Prior art keywords
random number
address
pseudo
remainder
storage element
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006116557A
Other languages
Japanese (ja)
Other versions
JP4709685B2 (en
Inventor
Kunio Yamagishi
国夫 山岸
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.)
Fujitsu FIP Corp
Original Assignee
Fujitsu FIP 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 Fujitsu FIP Corp filed Critical Fujitsu FIP Corp
Priority to JP2006116557A priority Critical patent/JP4709685B2/en
Publication of JP2007287079A publication Critical patent/JP2007287079A/en
Application granted granted Critical
Publication of JP4709685B2 publication Critical patent/JP4709685B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a pseudo random number generation device capable of outputting the random number sequence of a long cycle by a relatively small device scale. <P>SOLUTION: The pseudo random number generation device comprises: a pseudo random number generator 11 for generating a primary random number R1; a register 12 comprising storage elements for the same number as the number of kinds of the random number patterns of a secondary random number R2, where the different random number patterns are stored in the respective storage elements; and a control part 13 for agitating the register 12 with the two or more storage elements specified by selected first address and second address as objects and outputting a numerical value stored in the storage element specified by a selected third address as the secondary random number. At least one of the first address, the second address and the third address is supplied as the primary random number R1 or an operational value based on the primary random number R1. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本願発明は、擬似乱数生成装置、擬似乱数生成方法および擬似乱数生成プログラム並びに暗号化装置および復号化装置に係り、特に複数の記憶要素から構成されてすべての種類の乱数パターンが記憶される配列を用いて、周期の短い1次乱数から周期の長い2次乱数を生成することができる擬似乱数生成装置、擬似乱数生成方法および擬似乱数生成プログラム並びに当該擬似乱数生成装置を具備する暗号化装置および復号化装置に関する。   The present invention relates to a pseudo-random number generation device, a pseudo-random number generation method, a pseudo-random number generation program, an encryption device, and a decryption device, and more particularly, an array configured of a plurality of storage elements and storing all types of random number patterns. Pseudorandom number generation device, pseudorandom number generation method, pseudorandom number generation program, pseudorandom number generation program capable of generating long-term secondary random number from primary random number with short cycle, and encryption device and decryption including the pseudorandom number generation device The present invention relates to a conversion device.

ここで、本願明細書において使用する用語について、以下のように定義を行う。乱数パターンとは、所定のビット数を有するビット列を単位として生成される乱数のビットパターンを意味するものとする。乱数値とは、乱数を十進数で表現したものをいう。配列とは、それぞれが固有のアドレスを有する複数の記憶要素の連続的なまたは断続的な集合体をいう。配列は、具体的にはレジスタやRAM上の所定の記憶領域等として与えられる。   Here, terms used in this specification are defined as follows. The random number pattern means a random number bit pattern generated with a bit string having a predetermined number of bits as a unit. A random value means a random number represented by a decimal number. An array refers to a continuous or intermittent collection of a plurality of storage elements each having a unique address. Specifically, the array is given as a predetermined storage area on a register or RAM.

配列の撹拌とは、配列に記憶された数値の組合せを変えることなく、記憶要素に記憶される数値を入れ替えることをいう。例えば、記憶要素A,BおよびCにそれぞれ数値a,bおよびcが記憶されているものとする。記憶要素Aおよび記憶要素Bを対象として配列を撹拌する際には、記憶要素Aに数値bを記憶させ、記憶要素Bに数値aを記憶させる。また、記憶要素A,BおよびCを対象として配列を撹拌する際には、記憶要素Aに数値cを記憶させ、記憶要素Bに数値aを記憶させ、記憶要素Cに数値bを記憶させる。   Stirring an array means replacing the numerical values stored in the storage elements without changing the combination of the numerical values stored in the array. For example, it is assumed that numerical values a, b, and c are stored in the storage elements A, B, and C, respectively. When the array is agitated for the storage element A and the storage element B, the numerical value b is stored in the storage element A, and the numerical value a is stored in the storage element B. When the array is agitated for the storage elements A, B, and C, the numerical value c is stored in the storage element A, the numerical value a is stored in the storage element B, and the numerical value b is stored in the storage element C.

演算値とは、与えられた1または複数の数値を基にして実行する任意の演算処理の結果として得られる数値を意味するものとする。演算処理の例としては、関数を構成する変数に与えられた数値を代入して関数値を算出する演算処理、所定の規則に基づいて与えられた数値を表すビット列を分割することで1または複数の数値を生成する演算処理、所定の規則に基づいて与えられた複数の数値をそれぞれ表すビット列を結合することで数値を生成する演算処理、FIFO等のバッファに与えられた数値を入力して異なる数値を出力する演算処理、アドレス対応テーブル等のテーブルを参照して与えられた数値に対応する数値を出力する演算処理あるいはこれらの演算処理を任意に組み合わせて実現される演算処理等が挙げられる。   An arithmetic value means a numerical value obtained as a result of an arbitrary arithmetic process executed based on one or more given numerical values. Examples of the arithmetic processing include arithmetic processing for calculating a function value by substituting a numerical value given to a variable constituting the function, and dividing one or a plurality of bit strings representing a numerical value given based on a predetermined rule Processing for generating numerical values, arithmetic processing for generating numerical values by combining bit strings each representing a plurality of numerical values given based on a predetermined rule, and inputting numerical values given to a buffer such as a FIFO Examples include arithmetic processing for outputting numerical values, arithmetic processing for outputting numerical values corresponding to numerical values given by referring to a table such as an address correspondence table, and arithmetic processing realized by arbitrarily combining these arithmetic processing.

本願発明においては、配列は、擬似乱数生成装置から出力される乱数の乱数パターンの種類数と同数の記憶要素を有する。記憶要素は、乱数の生成単位となるビット数と同数またはそれ以上の記憶容量を有する。配列の撹拌は、少なくとも2つの記憶要素を対象として実行される。配列の撹拌の対象となる2つの記憶要素を特定するための2つのアドレスをそれぞれ第1のアドレスおよび第2のアドレスとする。また、2次乱数を取り出す記憶要素を特定するためのアドレスを第3のアドレスとする。   In the present invention, the array has the same number of storage elements as the number of random number patterns of random numbers output from the pseudo-random number generator. The storage element has a storage capacity equal to or greater than the number of bits that is a unit for generating random numbers. The agitation of the array is performed on at least two storage elements. Two addresses for specifying two storage elements to be an object of stirring the array are set as a first address and a second address, respectively. Also, an address for specifying a storage element from which the secondary random number is extracted is assumed to be a third address.

現在、使用されている暗号方式は、大きく分けて公開鍵暗号方式と共通鍵暗号方式とに類別される。公開鍵暗号方式では、暗号化に公開鍵または秘密鍵のいずれか一方の鍵が使用され、復号化に他方の鍵が使用される。共通鍵暗号方式では、暗号化および復号化に同一の鍵(共通鍵)を使用する。また、共通鍵暗号方式は、大きく分けてブロック暗号方式とストリーム暗号方式とに類別される。ブロック暗号方式では、平文を所定の大きさのブロックに分割して、ブロック単位に暗号化を実行する。暗号文についても、ブロック毎に当該ブロックを暗号化するのに使用されたキーと同一のキーを使用して、ブロック単位で暗号文を復号化する。ストリーム暗号方式では、暗号化装置側において、例えば共通鍵により与えられる所定の初期状態から逐次的に生成される擬似乱数(キーストリーム)を鍵として平文との間でビット単位にまたは所定数のビット列単位に論理演算(排他的論理和が好適である)を実行して、平文を暗号化する。復号化装置側においても、同一のキーストリームを用いて、暗号文との間でビット単位または所定数のビット列単位に論理演算を実行して、暗号文を復号化する。   Currently used encryption methods are roughly classified into a public key encryption method and a common key encryption method. In the public key cryptosystem, one of a public key and a secret key is used for encryption, and the other key is used for decryption. In the common key cryptosystem, the same key (common key) is used for encryption and decryption. The common key cryptosystem is roughly classified into a block cryptosystem and a stream cryptosystem. In the block encryption method, plaintext is divided into blocks of a predetermined size, and encryption is executed in units of blocks. Also for the ciphertext, the ciphertext is decrypted in units of blocks by using the same key as that used to encrypt the block for each block. In the stream encryption method, on the encryption device side, for example, a pseudo random number (key stream) sequentially generated from a predetermined initial state given by a common key is used as a key in a bit unit or a predetermined number of bit strings. Performs a logical operation (preferably exclusive OR) on the unit to encrypt the plaintext. Also on the decryption device side, the ciphertext is decrypted by performing a logical operation in bit units or a predetermined number of bit string units with the ciphertext using the same key stream.

共通鍵暗号方式においては、セッション毎に変更されるセッションキーとして、またはキーストリームとして、多くの場合擬似乱数が使用される。特に、ストリーム暗号方式では、擬似乱数として与えられるキーストリームにより平文をそのまま暗号文に暗号化するので、擬似乱数の乱数性が暗号強度に強い影響を及ぼす。擬似乱数を発生させる擬似乱数生成器としては、線形合同生成器や線形フィードバックシフトレジスタ(LFSR:Linear Feedback Shift Register)等が知られている。   In the common key cryptosystem, pseudo random numbers are often used as a session key changed for each session or as a key stream. In particular, in the stream encryption method, since plain text is encrypted as it is into cipher text using a key stream given as a pseudo random number, the randomness of the pseudo random number has a strong influence on the encryption strength. As a pseudo random number generator for generating a pseudo random number, a linear congruence generator, a linear feedback shift register (LFSR), and the like are known.

線形合同生成器では、以下のような数式に基づき擬似乱数を生成する。
=(aXn−1+b) mod m (1)
初期値として与えられるXは、例えば送信側および受信側で共有される共通鍵により与えられる。全状態数がmであるので、最大周期(最長周期)はmとなる。この擬似乱数生成方法は、生成アルゴリズムが単純であり、高速に乱数を生成可能であるとともに、統計的にもよい振る舞いを示すことが知られている。
The linear congruence generator generates pseudo-random numbers based on the following mathematical formula.
Xn = (aXn -1 + b) mod m (1)
X 0 given as an initial value, for example given by the common key shared by the transmission side and the receiving side. Since the total number of states is m, the maximum period (longest period) is m. It is known that this pseudo-random number generation method has a simple generation algorithm, can generate random numbers at high speed, and exhibits a good statistical behavior.

図7は、線形フィードバックシフトレジスタの構成の一例を示す図である。図中のC〜Cの値は、予め0または1に定められている。n段のシフトレジスタの各段について、C=1である段の記憶要素に記憶された数値Si−kの排他的論理和が出力Sとなる。シフト動作において、この出力Sがフィードバックされる。この線形フィードバックシフトレジスタの初期状態は、例えば送信側および受信側で共有される共通鍵により与えられる。すべての段に0が記憶された場合には、永続的に0を出力するのみであるので、これは乱数としては使用できない。したがって、線形フィードバックシフトレジスタの最大周期は、2−1となる。この最大周期をとる乱数系列は、M系列と呼ばれている。上記のような線形合同生成器や線形フィードバックシフトレジスタ等の擬似乱数生成器に関しては、例えば、「暗号理論入門」(共立出版株式会社、岡本栄司著、1993年発行)に記載されている。 FIG. 7 is a diagram illustrating an example of the configuration of the linear feedback shift register. The values of C 1 to C n in the figure are set to 0 or 1 in advance. For each stage of the n-stage shift register, the exclusive OR of the numerical values S i−k stored in the storage elements of the stage where C k = 1 is the output S i . In the shift operation, this output S i is fed back. The initial state of the linear feedback shift register is given by, for example, a common key shared between the transmission side and the reception side. If 0 is stored in all stages, it is only output permanently 0, so this cannot be used as a random number. Therefore, the maximum period of the linear feedback shift register is 2 n −1. The random number sequence having the maximum period is called an M sequence. The pseudo-random number generator such as the linear congruence generator and the linear feedback shift register as described above is described in, for example, “Introduction to Cryptography” (Kyoritsu Publishing Co., Ltd., Eiji Okamoto, published in 1993).

「暗号理論入門」(共立出版株式会社、岡本栄司著、1993年発行)"Introduction to cryptography" (Kyoritsu Publishing Co., Ltd., written by Eiji Okamoto, published in 1993)

上記のような擬似乱数生成器は、乱数生成のアルゴリズムが比較的単純であるとともに周期の比較的短い乱数系列を出力するので、そのまま平文の暗号化に使用すると、暗号文を解読される危険性があるという課題があった。また、複数の線形フィードバックシフトレジスタの出力を非線形コンバイナで結合する手法等が考案されているが、充分な周期を得るためには装置規模が大きくなるという課題があった。   The pseudo-random number generator as described above has a relatively simple random number generation algorithm and outputs a random number sequence with a relatively short period. There was a problem that there was. Further, a method of combining outputs of a plurality of linear feedback shift registers with a non-linear combiner has been devised, but there is a problem that the apparatus scale becomes large in order to obtain a sufficient period.

本願発明は、上記課題を解決するために、比較的小さな装置規模で周期の長い乱数系列を生成することができる擬似乱数生成装置、擬似乱数生成方法および擬似乱数生成プログラム並びに当該擬似乱数生成装置を具備する暗号化装置および復号化装置を提供することを目的とする。   In order to solve the above problems, the present invention provides a pseudo-random number generation device, a pseudo-random number generation method, a pseudo-random number generation program, and a pseudo-random number generation device capable of generating a long-period random number sequence with a relatively small device scale. It is an object of the present invention to provide an encryption device and a decryption device that are provided.

乱数は、「0」または「1」の値をとるバイナリビットの集合から成るビット列として与えられる。乱数生成の単位として、例えば2ビットを考える。2ビットとして得られる乱数の乱数パターンは、「00」,「01」,「10」,「11」の4種類である。4つの乱数値から得られる順列は、4!で与えられ、24パターンとなる。一方、線形合同生成器や線形フィードバックシフトレジスタを用いた乱数生成においては、ある乱数値xが出力された次には乱数値yが出力され、乱数値xが出力された次に乱数値y以外の乱数値が出力されることはない。すなわち、線形合同生成器や線形フィードバックシフトレジスタから出力される乱数系列は循環特性を有している。このような場合に、2ビットを単位として生成される乱数から成る最大周期の乱数系列は8ビット(2ビット*4パターン)となる。   The random number is given as a bit string composed of a set of binary bits having a value of “0” or “1”. As a random number generation unit, for example, 2 bits are considered. There are four types of random number patterns obtained as 2 bits: “00”, “01”, “10”, and “11”. The permutation obtained from four random values is 4! Gives 24 patterns. On the other hand, in random number generation using a linear congruence generator or a linear feedback shift register, a random number value x is output next to a random number value y, and then a random number value x is output and then a random number value y other than the random number value y. Will not be output. That is, the random number sequence output from the linear congruence generator or the linear feedback shift register has a cyclic characteristic. In such a case, a random number sequence having a maximum period composed of random numbers generated in units of 2 bits is 8 bits (2 bits * 4 patterns).

次に、乱数生成の単位として、コンピュータで扱い易い1バイト(8ビット)を考える。8ビットとして得られる乱数の乱数パターンは、2=256種類である。256個の乱数値から得られる順列は、256!で与えられ、約8.6*10506となり、概ね無限のパターンを得ることができる。一方、線形合同生成器や線形フィードバックシフトレジスタを用いた乱数生成においては、生成される乱数系列が循環特性を有するために、8ビットを単位として生成される乱数から成る最大周期の乱数系列は2048ビット(8ビット*256パターン)となる。 Next, 1 byte (8 bits) that can be easily handled by a computer is considered as a random number generation unit. There are 2 8 = 256 random number patterns of random numbers obtained as 8 bits. The permutation obtained from 256 random values is 256! Is approximately 8.6 * 10 506 , and an almost infinite pattern can be obtained. On the other hand, in random number generation using a linear congruence generator or a linear feedback shift register, since a generated random number sequence has a cyclic characteristic, a random number sequence having a maximum period consisting of random numbers generated in units of 8 bits is 2048. This is a bit (8 bits * 256 patterns).

上述したように、線形合同生成器や線形フィードバックシフトレジスタから出力されて、循環特性を有する乱数系列の最大周期は大きなものではない。本願発明では、所定のビット数を単位として生成される乱数について、それぞれの乱数パターンに対応する異なる乱数値の集合を基礎として順列により与えられる数値系列が非常に大きなパターン数を有していることに着目する。そこで、乱数パターンの種類数と同数の記憶要素を有する配列を用意する。この配列内のそれぞれの記憶要素に異なる乱数パターンを記憶させることで、配列内で順列としてすべてのパターンの数値系列を表現することができる。   As described above, the maximum period of the random number sequence output from the linear congruence generator or the linear feedback shift register and having the cyclic characteristic is not large. In the present invention, for a random number generated with a predetermined number of bits as a unit, a numerical sequence given by a permutation based on a set of different random values corresponding to each random number pattern has a very large number of patterns. Pay attention to. Therefore, an array having the same number of storage elements as the number of types of random number patterns is prepared. By storing different random number patterns in the respective storage elements in the array, it is possible to express numerical sequences of all patterns as permutations in the array.

本願発明では、原則的に、所定の規則に基づいて選定される第1のアドレスおよび第2のアドレスにより特定される2つの記憶要素を対象として配列を撹拌する。また、所定の規則に基づいて選定される第3のアドレスにより特定される記憶要素に記憶される数値を擬似乱数生成装置から乱数として出力する。上述したように、異なる乱数値の集合を基礎として順列により与えられる数値系列は概ね無限のパターンを有するから、配列から周期の長い乱数系列を得られる可能性が大きい。本願発明は、第1のアドレス、第2のアドレスおよび第3のアドレスのなかの少なくとも1つのアドレスを、周期の短い第1の乱数または第1の乱数に基づく演算値として与えることで、周期の長い第2の乱数を生成することを意図するものである。   In the present invention, in principle, the arrangement is agitated for two storage elements specified by the first address and the second address selected based on a predetermined rule. Further, the numerical value stored in the storage element specified by the third address selected based on a predetermined rule is output as a random number from the pseudo random number generation device. As described above, since a numerical sequence given by a permutation based on a set of different random values has an almost infinite pattern, it is highly possible to obtain a random sequence having a long period from the array. The present invention provides at least one of the first address, the second address, and the third address as a first random number having a short period or an operation value based on the first random number, It is intended to generate a long second random number.

上記の技術的課題を解決するために、本願発明に係る擬似乱数生成装置は、第1の乱数を生成する擬似乱数生成手段と、第2の乱数の乱数パターンの種類数と同数の記憶要素から構成されて、それぞれの記憶要素には異なる乱数パターンが記憶される配列と、少なくとも選定された第1のアドレスおよび第2のアドレスにより特定される2以上の記憶要素を対象として配列を撹拌するとともに、選定された第3のアドレスにより特定される記憶要素に記憶される数値を第2の乱数として出力する制御手段とを有して構成され、第1のアドレス、第2のアドレスおよび第3のアドレスのなかの少なくとも1つのアドレスが、第1の乱数または第1の乱数に基づく演算値として与えられるようにしたものである。   In order to solve the above technical problem, a pseudo-random number generation device according to the present invention comprises a pseudo-random number generation means for generating a first random number, and the same number of storage elements as the number of types of second random number patterns. And an array in which different random number patterns are stored in each storage element, and at least two storage elements specified by the first address and the second address selected are agitated. And a control means for outputting a numerical value stored in the storage element specified by the selected third address as a second random number, and comprising the first address, the second address, and the third At least one of the addresses is given as a first random number or an operation value based on the first random number.

また、本願発明に係る擬似乱数生成装置は、制御手段が、第1の乱数の生成回数を第2の乱数の乱数パターンの種類数で除した剰余を算出し、第1のアドレスまたは第2のアドレスの少なくとも一方のアドレスが、前記剰余または前記剰余に基づく演算値として与えられるようにしたものである。   In the pseudo random number generation device according to the present invention, the control means calculates a remainder obtained by dividing the number of generations of the first random number by the number of types of the random number pattern of the second random number, and the first address or the second At least one of the addresses is given as the remainder or an operation value based on the remainder.

また、本願発明に係る擬似乱数生成装置は、第1のアドレスおよび第3のアドレスが、第1の乱数または第1の乱数に基づく演算値として与えられ、第2のアドレスが前記剰余または前記剰余に基づく演算値として与えられるようにしたものである。   In the pseudo random number generation device according to the present invention, the first address and the third address are given as the first random number or an operation value based on the first random number, and the second address is the remainder or the remainder. It is made to be given as a calculation value based on.

また、本願発明に係る擬似乱数生成装置は、第1のアドレスおよび第3のアドレスが、前記剰余または前記剰余に基づく演算値として与えられ、第2のアドレスが第1の乱数または第1の乱数に基づく演算値として与えられるようにしたものである。   In the pseudo random number generation device according to the present invention, the first address and the third address are given as the remainder or a calculated value based on the remainder, and the second address is the first random number or the first random number. It is made to be given as a calculation value based on.

また、本願発明に係る擬似乱数生成装置は、擬似乱数生成手段が、線形合同生成器または線形フィードバックシフトレジスタとして与えられるようにしたものである。   In the pseudorandom number generation device according to the present invention, the pseudorandom number generation means is provided as a linear congruence generator or a linear feedback shift register.

また、本願発明に係る擬似乱数生成装置は、第1の乱数を生成する第1の擬似乱数生成手段と、第3の乱数を生成する第2の擬似乱数生成手段と、第2の乱数の乱数パターンの種類数と同数の記憶要素から構成されて、それぞれの記憶要素には異なる乱数パターンが記憶される配列と、少なくとも選定された第1のアドレスおよび第2のアドレスにより特定される2以上の記憶要素を対象として配列を撹拌するとともに、選定された第3のアドレスにより特定される記憶要素に記憶される数値を第2の乱数として出力する制御手段とを有して構成され、第1のアドレス、第2のアドレスおよび第3のアドレスのなかの少なくとも1つのアドレスが、第1の乱数または第1の乱数に基づく演算値として与えられ、第1のアドレスまたは第2のアドレスの少なくとも一方のアドレスが、第3の乱数または第3の乱数に基づく演算値として与えられるようにしたものである。   The pseudo-random number generation device according to the present invention includes a first pseudo-random number generation unit that generates a first random number, a second pseudo-random number generation unit that generates a third random number, and a random number of a second random number. It is composed of the same number of storage elements as the number of types of patterns, and each storage element stores an array in which different random number patterns are stored, and at least two or more specified by the selected first address and second address Control means for agitating the array for the storage element and outputting a numerical value stored in the storage element specified by the selected third address as a second random number, At least one of the address, the second address, and the third address is provided as a first random number or an operation value based on the first random number, and the first address or the second address is provided. At least one of the address-less, is obtained as given as an operation value based on the third random number and the third random number.

また、本願発明に係る擬似乱数生成装置は、制御手段が、第1の乱数の生成回数を第2の乱数の乱数パターンの種類数で除した剰余を算出し、第1のアドレスが第3の乱数または第3の乱数に基づく演算値として与えられ、第2のアドレスが前記剰余または前記剰余に基づく演算値として与えられ、第3のアドレスが第1の乱数または第1の乱数に基づく演算値として与えられるようにしたものである。   In the pseudo random number generation device according to the present invention, the control means calculates a remainder obtained by dividing the number of generations of the first random number by the number of types of random number patterns of the second random number, and the first address is the third number. Given as a computation value based on a random number or a third random number, a second address is given as a computation value based on the remainder or the remainder, and a third address is a computation value based on the first random number or the first random number Is to be given as

また、本願発明に係る暗号化装置は、本願発明に係る擬似乱数生成装置を有して構成され、擬似乱数生成装置から出力される乱数系列と、平文を構成するデータ系列とに対して、ビット毎または所定数のビット列毎に、所定の論理演算を実行して、暗号文を構成するデータ系列を生成するようにしたものである。   The encryption device according to the present invention is configured to include the pseudo-random number generation device according to the present invention, and the bit sequence for the random number sequence output from the pseudo-random number generation device and the data sequence constituting the plaintext A predetermined logical operation is executed every time or every predetermined number of bit strings to generate a data series constituting the ciphertext.

また、本願発明に係る擬似乱数生成方法は、第1の乱数を生成する工程と、第1の乱数の生成回数を第2の乱数の乱数パターンの種類数で除した剰余を算出する工程と、第1のアドレスおよび第2のアドレスを選定する工程と、第2の乱数の乱数パターンの種類数と同数の記憶要素から構成されて、それぞれの記憶要素には異なる乱数パターンが記憶される配列において、第1のアドレスにより特定される記憶要素に記憶される数値と第2のアドレスにより特定される記憶要素に記憶される数値とを交換する工程と、第3のアドレスを選定する工程と、配列において第3のアドレスにより特定される記憶要素に記憶される数値を第2の乱数として出力する工程とを有し、第1のアドレス、第2のアドレスおよび第3のアドレスのなかの少なくとも1つのアドレスが、第1の乱数または第1の乱数の演算値として与えられ、第1のアドレスまたは第2のアドレスの少なくとも一方のアドレスが、前記剰余または前記剰余の演算値として与えられるようにしたものである。   The pseudo-random number generation method according to the present invention includes a step of generating a first random number, a step of calculating a remainder obtained by dividing the number of generations of the first random number by the number of types of random number patterns of the second random number, In an array comprising a step of selecting the first address and the second address, and the same number of storage elements as the number of types of the random number pattern of the second random number, each storage element storing a different random number pattern Exchanging the numerical value stored in the storage element specified by the first address with the numerical value stored in the storage element specified by the second address, selecting the third address, and array And outputting a numerical value stored in the storage element specified by the third address as a second random number, and the number of the first address, the second address, and the third address is small. One address is given as the first random number or the calculated value of the first random number, and at least one address of the first address or the second address is given as the calculated value of the remainder or the remainder It is a thing.

また、本願発明に係る擬似乱数生成プログラムは、第1の乱数を生成するステップと、第1の乱数の生成回数を第2の乱数の乱数パターンの種類数で除した剰余を算出するステップと、 第1のアドレスおよび第2のアドレスを、それぞれ第1の乱数または第1の乱数に基づく演算値あるいは前記剰余または前記剰余に基づく演算値として与えるステップと、第2の乱数の乱数パターンの種類数と同数の記憶要素から構成されて、それぞれの記憶要素には異なる乱数パターンが記憶される配列において、第1のアドレスにより特定される記憶要素に記憶される数値と第2のアドレスにより特定される記憶要素に記憶される数値とを交換するステップと、第3のアドレスを、第1の乱数または第1の乱数に基づく演算値あるいは前記剰余または前記剰余に基づく演算値として与えるステップと、配列において第3のアドレスにより特定される記憶要素に記憶される数値を第2の乱数として出力するステップとを有するようにしたものである。   Further, the pseudo random number generation program according to the present invention includes a step of generating a first random number, a step of calculating a remainder obtained by dividing the number of generations of the first random number by the number of types of random number patterns of the second random number, A step of giving the first address and the second address as a first random number or a calculated value based on the first random number, or the remainder or a calculated value based on the remainder, respectively, and the number of types of random number patterns of the second random number In the array in which different random number patterns are stored in each storage element, specified by the numerical value stored in the storage element specified by the first address and the second address Exchanging the numerical value stored in the storage element, and the third address, the first random number, the calculated value based on the first random number or the remainder or And providing a calculated value based on the serial remainder is obtained by the numerical values stored in the storage element specified by a third address in the sequence to a step of outputting the second random number.

本願発明によれば、第1の乱数を生成する擬似乱数生成手段と、第2の乱数の乱数パターンの種類数と同数の記憶要素から構成されて、それぞれの記憶要素には異なる乱数パターンが記憶される配列と、少なくとも選定された第1のアドレスおよび第2のアドレスにより特定される2以上の記憶要素を対象として配列を撹拌するとともに、選定された第3のアドレスにより特定される記憶要素に記憶される数値を第2の乱数として出力する制御手段とを有し、第1のアドレス、第2のアドレスおよび第3のアドレスのなかの少なくとも1つのアドレスが、第1の乱数または第1の乱数に基づく演算値として与えられるように構成したので、撹拌することにより順列として膨大なパターン数の数値系列を表現するのが可能である配列内の任意の記憶要素から第2の乱数を取り出すことにより、周期の長い乱数系列を得ることができるという効果を奏する。   According to the present invention, it is composed of pseudo-random number generating means for generating a first random number and the same number of storage elements as the number of types of random number patterns of the second random number, and different random number patterns are stored in the respective storage elements. The array is agitated for at least two or more storage elements specified by the selected first address and second address, and the storage element specified by the selected third address Control means for outputting a stored numerical value as a second random number, wherein at least one of the first address, the second address, and the third address is the first random number or the first random number. Since it is configured to be given as a calculation value based on a random number, it is possible to express a numerical series with a huge number of patterns as a permutation by stirring. By retrieving the second random number from 憶 element, an effect that can be obtained a long random sequence of cycles.

本願発明によれば、第1の乱数の生成回数を第2の乱数の乱数パターンの種類数で除した剰余を算出し、第1のアドレスまたは第2のアドレスの少なくとも一方のアドレスが、前記剰余または前記剰余に基づく演算値として与えられるように構成したので、配列内のすべての記憶要素のアドレスを均等に選定することが保証されて、配列を全範囲にわたって偏りなく撹拌することが可能となるから、周期の長い乱数系列を得られる可能性を大きくすることができるという効果を奏する。また、カウンタ等の簡単な演算回路を使用しての単純な演算により前記剰余を算出することが可能であるから、擬似乱数生成装置の回路構成を簡略化することができるという効果を奏する。   According to the present invention, a remainder obtained by dividing the number of generations of the first random number by the number of types of random number patterns of the second random number is calculated, and at least one of the first address and the second address is the remainder. Alternatively, since it is configured to be given as an operation value based on the remainder, it is guaranteed that the addresses of all the storage elements in the array are evenly selected, and the array can be uniformly stirred over the entire range. Therefore, there is an effect that the possibility of obtaining a random number sequence having a long cycle can be increased. In addition, since the remainder can be calculated by a simple calculation using a simple calculation circuit such as a counter, the circuit configuration of the pseudo random number generation device can be simplified.

本願発明によれば、擬似乱数生成手段が線形合同生成器または線形フィードバックシフトレジスタとして与えられるように構成したので、比較的簡単な演算回路を用いて第1の乱数を生成することが可能であるから、擬似乱数生成装置の回路構成を簡略化することができるという効果を奏する。   According to the present invention, since the pseudo-random number generation means is configured to be provided as a linear congruence generator or a linear feedback shift register, it is possible to generate the first random number using a relatively simple arithmetic circuit. Therefore, the circuit configuration of the pseudorandom number generator can be simplified.

本願発明によれば、第1の乱数を生成する第1の擬似乱数生成手段と別個に設けられた第2の擬似乱数生成手段を用いて第3の乱数を生成し、第3の乱数を使用して配列を撹拌するように構成したので、第1の乱数の周期の影響を低減して配列の記憶内容を変化させることが可能となるから、撹拌することにより順列として膨大なパターン数の数値系列を表現できる配列をより有効に利用することができて、周期の長い乱数系列を得ることができるという効果を奏する。   According to the present invention, the third pseudo random number generating means provided separately from the first pseudo random number generating means for generating the first random number is used to generate the third random number, and the third random number is used. Since the arrangement is agitated, the influence of the first random number period can be reduced and the stored contents of the arrangement can be changed. An array that can represent a sequence can be used more effectively, and a random number sequence having a long period can be obtained.

最初に、本願発明に係る擬似乱数生成装置の動作原理を簡単なモデルを用いて説明する。図1は、本願発明に係る擬似乱数生成装置の動作原理を説明するためのモデルの構成を示す図である。図1において、1は周期の短い1次乱数R1を生成する擬似乱数生成器、2は0〜9のアドレスを有する10個の記憶要素から構成されるレジスタ、3はレジスタ2を撹拌するとともにレジスタ2内のいずれかの記憶要素に記憶された数値を2次乱数R2として出力する制御部である。   First, the operation principle of the pseudorandom number generator according to the present invention will be described using a simple model. FIG. 1 is a diagram showing the configuration of a model for explaining the operating principle of the pseudorandom number generator according to the present invention. In FIG. 1, 1 is a pseudo-random number generator that generates a primary random number R1 having a short cycle, 2 is a register composed of 10 storage elements having addresses 0 to 9, and 3 is a register that agitates register 2 and registers 2 is a control unit that outputs a numerical value stored in one of the storage elements 2 as a secondary random number R2.

擬似乱数生成器1は、0〜9の数値範囲の数値を乱数として出力する。レジスタ2の10個の記憶要素には、0〜9の数値が1つずつ記憶される。すなわち、レジスタ2の異なる記憶要素には、同一の数値が記憶されることはない。これにより、レジスタ2内の任意の記憶要素に記憶された数値を2次乱数として取り出せば、2次乱数は0〜9の数値範囲のいずれかの数値をとることになる。   The pseudo random number generator 1 outputs a numerical value in a numerical range of 0 to 9 as a random number. The ten storage elements of the register 2 store numerical values of 0 to 9 one by one. That is, the same numerical value is not stored in different storage elements of the register 2. Thereby, if a numerical value stored in an arbitrary storage element in the register 2 is taken out as a secondary random number, the secondary random number takes any numerical value in a numerical range of 0-9.

制御部3は、1次乱数R1の生成回数を計数して、2次乱数の生成順番を示す順序番号Iを設定する。制御部3は、式(2)に基づいて、循環順序番号Imを算出する。
Im=I mod 10 (2)
すなわち、循環順序番号Imは、順序番号Iを10で除した剰余として与えられ、周期10で循環する。順序番号Iを除する数値10は、レジスタ2を構成する記憶要素の数と同数である。これにより、擬似乱数生成器1から出力される1次乱数R1および循環順序番号Imにより、レジスタ2を構成するすべての記憶要素のアドレスを選定することが可能となる。
The control unit 3 counts the number of generations of the primary random number R1 and sets a sequence number I indicating the generation order of the secondary random numbers. The control unit 3 calculates the circulation sequence number Im based on the formula (2).
Im = I mod 10 (2)
That is, the circulation sequence number Im is given as a remainder obtained by dividing the sequence number I by 10 and circulates in the cycle 10. A numerical value 10 excluding the sequence number I is the same as the number of storage elements constituting the register 2. As a result, it is possible to select the addresses of all the storage elements constituting the register 2 based on the primary random number R1 and the cyclic sequence number Im output from the pseudo-random number generator 1.

Figure 2007287079
Figure 2007287079

表1は、擬似乱数を生成する過程を示す表である。ここでは、擬似乱数生成器1は、周期が4の乱数系列「0−1−4−3」を逐次的に出力するものとする。また、レジスタ2のアドレスが0から始まるのに対応して、順序番号Iも0から始まるものとする。レジスタ2を撹拌する際に対象となる2つの記憶要素を特定するアドレスについては、第1のアドレスが1次乱数R1として与えられ、第2のアドレスが循環順序番号Imとして与えられる。表1において、アドレスとして与えられるこれらの数値には斜線が付されている。また、2次乱数R2を取り出す記憶要素を特定する第3のアドレスは、1次乱数R1として与えられる。制御部3は、1次乱数R1をアドレスとする記憶要素に記憶される数値と循環順序番号Imをアドレスとする記憶要素に記憶される数値とを交換する。その後、制御部3は、1次乱数R1をアドレスとする記憶要素に記憶される数値を2次乱数R2として出力する。   Table 1 is a table showing a process of generating pseudo random numbers. Here, it is assumed that the pseudorandom number generator 1 sequentially outputs a random number sequence “0-1-4-3” having a period of 4. It is assumed that the sequence number I starts from 0 corresponding to the address of the register 2 starting from 0. As for the address that specifies the two storage elements to be targeted when the register 2 is stirred, the first address is given as the primary random number R1, and the second address is given as the circulation sequence number Im. In Table 1, these numerical values given as addresses are hatched. Further, the third address for specifying the storage element from which the secondary random number R2 is extracted is given as the primary random number R1. The control unit 3 exchanges a numerical value stored in the storage element having the primary random number R1 as an address and a numerical value stored in the storage element having the circulation sequence number Im as an address. Thereafter, the control unit 3 outputs the numerical value stored in the storage element having the primary random number R1 as an address as the secondary random number R2.

例として、1次乱数R1として「0−1−4−3」の乱数系列が3周期生成された後、次の1次乱数R1として「0」が出力された際の2次乱数R2の生成について説明する。1次乱数R1として「0」が出力されると、順序番号Iは1増分されるから、Iとして12が設定される。mod(12,10)は2となるので、循環順序番号Imとして2が設定される。前回までのレジスタの撹拌により、レジスタ2において、1次乱数R1として与えられるアドレス“0”の記憶要素には数値6が記憶され、循環順序番号Imとして与えられるアドレス“2”の記憶要素には数値4が記憶されている。制御部3は、これらの数値を交換する。すなわち、アドレス“0”の記憶要素には数値4を記憶させ、アドレス“2”の記憶要素には数値6を記憶させる。数値の交換が完了すれば、制御部3は、1次乱数R1として与えられるアドレス“0”の記憶要素に記憶される数値4を2次乱数R2として出力する。   As an example, after the random number sequence of “0-1-4-3” is generated as the primary random number R1 for three periods, the secondary random number R2 is generated when “0” is output as the next primary random number R1. Will be described. When “0” is output as the primary random number R1, the sequence number I is incremented by 1, so that 12 is set as I. Since mod (12, 10) is 2, 2 is set as the circulation sequence number Im. Due to the agitation of the register up to the previous time, the numerical value 6 is stored in the storage element of the address “0” given as the primary random number R1 in the register 2, and the storage element of the address “2” given as the circulation sequence number Im is stored in the register 2 The numerical value 4 is stored. The control unit 3 exchanges these numerical values. That is, the numerical value 4 is stored in the storage element at the address “0”, and the numerical value 6 is stored in the storage element at the address “2”. When the exchange of numerical values is completed, the control unit 3 outputs the numerical value 4 stored in the storage element of the address “0” given as the primary random number R1 as the secondary random number R2.

表1に示されるように、15回の乱数生成処理において、0〜9のすべての数値が2次乱数R2として出力されているとともに、周期は現れない。また、レジスタ2の記憶内容も初期値と全て異なっている。このように、擬似乱数生成器1から出力される周期4の1次乱数「0−1−4−3」を基礎として、周期の長い2次乱数を生成することが可能となる。なお、上記の乱数生成処理においては、レジスタを撹拌した後に2次乱数を取り出す構成としたが、2次乱数を取り出した後にレジスタを撹拌するような構成としてもよい。   As shown in Table 1, in the random number generation process of 15 times, all numerical values of 0 to 9 are output as the secondary random number R2, and no period appears. The stored contents of the register 2 are all different from the initial values. As described above, it is possible to generate a secondary random number having a long cycle based on the primary random number “0-1-4-3” having a cycle 4 output from the pseudo-random number generator 1. In the above random number generation process, the secondary random number is extracted after the register is stirred. However, the register may be stirred after the secondary random number is extracted.

以下、添付の図面を参照して本願発明に係る実施の形態を説明する。なお、以下の説明においては、実施の形態の各構成要素と、特許請求の範囲に記載された発明の各構成要素との対応関係を明らかにするために、実施の形態の各構成要素にそれぞれ対応する特許請求の範囲に記載された発明の各構成要素を、以下の説明文中において適宜かっこ書きにより示すものとする。   Embodiments according to the present invention will be described below with reference to the accompanying drawings. In the following description, in order to clarify the correspondence between each constituent element of the embodiment and each constituent element of the invention described in the claims, each constituent element of the embodiment is described. Each component of the invention described in the corresponding claims will be appropriately indicated in parentheses in the following description.

実施の形態1.
図2は、この発明の実施の形態1による擬似乱数生成装置の構成の一例を示す図である。ここでは、コンピュータで扱い易い1バイト(8ビット)の乱数を出力する擬似乱数生成装置について説明する。8ビットで与えられる乱数は、256種類の異なる乱数パターンを有する。図2において、11は例えば線形合同生成器や線形フィードバックシフトレジスタ等として与えられ比較的周期の短い1次乱数(第1の乱数)R1を生成する擬似乱数生成器(擬似乱数生成手段)、12は2次乱数(第2の乱数)R2の乱数パターンの種類数と同数の記憶要素から構成されてそれぞれの記憶要素には異なる乱数パターンが記憶されるレジスタ(配列)、13は選定された第1のアドレスおよび第2のアドレスにより特定されるレジスタ12内の2つの記憶要素を対象としてレジスタ12を撹拌するとともに選定された第3のアドレスにより特定されるレジスタ12内の記憶要素に記憶される数値を2次乱数R2として出力する制御部(制御手段)である。
Embodiment 1 FIG.
FIG. 2 is a diagram showing an example of the configuration of the pseudorandom number generator according to Embodiment 1 of the present invention. Here, a pseudo-random number generator that outputs a 1-byte (8-bit) random number that is easy to handle by a computer will be described. A random number given by 8 bits has 256 different random number patterns. In FIG. 2, 11 is a pseudorandom number generator (pseudorandom number generating means) that generates a primary random number (first random number) R1 having a relatively short cycle, which is given as, for example, a linear congruence generator or a linear feedback shift register. Is a register (array) configured with the same number of storage elements as the random number pattern of the secondary random number (second random number) R2, each storing a different random number pattern. The register 12 is agitated for two storage elements in the register 12 specified by the first address and the second address, and stored in the storage element in the register 12 specified by the selected third address. It is a control part (control means) which outputs a numerical value as secondary random number R2.

この実施の形態では、擬似乱数生成器11として、以下の式(3)に基づいて、0〜255の数値範囲の8ビットの乱数パターンを生成する線形合同生成器を採用するものとする。
i+1=(3*R+1) mod 256 (3)
生成された乱数Rを3倍して1を加えた数値を256で除した剰余を、新たに生成される乱数Ri+1とする。式(3)に基づいて乱数を生成する線形合同生成器は、初期値R=0として乱数を生成すると、周期128の乱数系列を出力する。すなわち、この線形合同生成器は、8ビットで表される乱数の256種類の乱数パターンのなかで、半分の128種類の乱数パターンを出力する。
In this embodiment, as the pseudo-random number generator 11, a linear congruence generator that generates an 8-bit random number pattern in a numerical range of 0 to 255 based on the following equation (3) is adopted.
R i + 1 = (3 * R i +1) mod 256 (3)
A remainder obtained by multiplying the generated random number R i by 3 and adding 1 to the result is divided by 256 to be a newly generated random number R i + 1 . The linear congruence generator that generates random numbers based on Equation (3) generates a random number sequence with a period of 128 when generating random numbers with an initial value R 0 = 0. That is, this linear congruence generator outputs 128 types of random number patterns which are half of 256 types of random number patterns represented by 8 bits.

レジスタ12としては、0〜255の数値範囲のアドレスを有する256個の記憶要素から構成されて、それぞれの記憶要素が8ビットの記憶容量を有するレジスタを採用する。制御部13については、レジスタ12内の任意の2つの記憶要素に記憶された数値を交換するために、いずれか一方または両方の数値を記憶する記憶部、および乱数の生成回数を計数するカウンタ等を内蔵する構成としてもよい。また、これらの構成要素については、制御部13に独立に設けることも可能である。   The register 12 is composed of 256 storage elements having addresses in the numerical range of 0 to 255, and each storage element employs a register having a storage capacity of 8 bits. For the control unit 13, in order to exchange numerical values stored in any two storage elements in the register 12, a storage unit that stores one or both numerical values, a counter that counts the number of random numbers generated, and the like It is good also as a structure which incorporates. Further, these components can be provided independently in the control unit 13.

図3は、この発明の実施の形態1による擬似乱数生成方法の一例を示すフローチャートである。擬似乱数生成器11は、8ビットから成る1次乱数R1を生成して出力する(ステップ1)。制御部13は、擬似乱数生成器11から1次乱数R1が出力される毎に、順序番号Iを1増分する(ステップS2)。例えば、制御部13に内蔵されたカウンタの計数値を順序番号Iに対応付けて、1次乱数R1が出力される毎にカウンタの計数値を1増分することで、当該処理を実現することができる。順序番号Iが設定されれば、制御部13は、以下の式(4)に基づいて、循環順序番号Imを算出する(ステップS3)。
Im=I mod 256 (4)
256は2次乱数の乱数パターンの種類数を表すものである。これにより、Imは0〜255の数値範囲の数値を順番に与えるので、循環順序番号Imまたは循環順序番号Imを基にした演算値により、レジスタ12内の記憶要素のアドレスを均等に選定することが可能になる。
FIG. 3 is a flowchart showing an example of the pseudo-random number generation method according to Embodiment 1 of the present invention. The pseudo random number generator 11 generates and outputs a primary random number R1 consisting of 8 bits (step 1). The control unit 13 increments the sequence number I by 1 each time the primary random number R1 is output from the pseudo random number generator 11 (step S2). For example, the processing value can be realized by associating the count value of the counter built in the control unit 13 with the sequence number I and incrementing the count value of the counter by 1 each time the primary random number R1 is output. it can. If the sequence number I is set, the control unit 13 calculates the circulation sequence number Im based on the following equation (4) (step S3).
Im = I mod 256 (4)
256 represents the number of types of secondary random number patterns. As a result, Im gives a numerical value in the range of 0 to 255 in order, so that the addresses of the storage elements in the register 12 are evenly selected based on the cyclic sequence number Im or the calculated value based on the cyclic sequence number Im. Is possible.

循環順序番号Imが設定されれば、制御部13は、1次乱数R1をアドレスとする記憶要素に記憶される数値と循環順序番号Imをアドレスとする記憶要素に記憶される数値とを交換する(ステップS4)。例えば、制御部13に内蔵される記憶部とレジスタ12内の記憶要素との間で数値の受け渡しを実行することで、当該処理を実現することができる。レジスタの撹拌が完了すれば、制御部13は、1次乱数R1をアドレスとする記憶要素に記憶される数値を2次乱数R2として出力する(ステップS5)。2次乱数R2が出力されれば、所定数の乱数系列の出力が完了したか否かを判定する(ステップS6)。所定数の乱数系列の出力が完了していなければ、処理をステップS1に復帰させて、新たな2次乱数R2の生成処理を継続する。所定数の乱数系列の出力が完了していれば、乱数生成に係る処理を終了する。   If the circulation sequence number Im is set, the control unit 13 exchanges the numerical value stored in the storage element having the primary random number R1 as an address and the numerical value stored in the storage element having the circulation sequence number Im as an address. (Step S4). For example, the process can be realized by executing a numerical value exchange between a storage unit built in the control unit 13 and a storage element in the register 12. If the stirring of the register is completed, the control unit 13 outputs the numerical value stored in the storage element having the primary random number R1 as an address as the secondary random number R2 (step S5). If the secondary random number R2 is output, it is determined whether or not the output of a predetermined number of random number sequences has been completed (step S6). If the output of the predetermined number of random number sequences has not been completed, the process returns to step S1, and the process of generating a new secondary random number R2 is continued. If the output of the predetermined number of random number sequences has been completed, the processing relating to random number generation is terminated.

Figure 2007287079
Figure 2007287079

表2は、実施の形態1による擬似乱数生成装置を用いて得られる乱数系列において出現する乱数パターンの出現傾向を示す表である。表2に示されるように、1次乱数が循環する周期の7倍の回数にわたって2次乱数を生成することで、2次乱数として出現する乱数系列における乱数パターンの種類数が上限の256となる。実際に検証してみると、2次乱数が、32,768の周期を有することが判明した。1次乱数の周期が128であるから、2次乱数は1次乱数の256倍(32,768/128=256)の周期を有することになる。   Table 2 is a table showing the appearance tendency of the random number pattern appearing in the random number sequence obtained by using the pseudo random number generation device according to the first embodiment. As shown in Table 2, the number of types of random number patterns in the random number sequence appearing as the secondary random number reaches the upper limit of 256 by generating the secondary random number over the number of times that the primary random number circulates seven times. . When actually verified, it was found that the secondary random number has a period of 32,768. Since the period of the primary random number is 128, the secondary random number has a period 256 times that of the primary random number (32,768 / 128 = 256).

Figure 2007287079
Figure 2007287079

表3は、実施の形態1による擬似乱数生成装置を用いて得られる乱数系列において出現する各乱数パターンの分布状況を示す表である。表3において、乱数パターン出現平均回数は、2次乱数の乱数パターン毎の出現回数の平均値を示す。乱数パターン出現最小回数は、2次乱数のすべての乱数パターンの出現回数のなかで最小の出現回数を示す。乱数パターン出現最大回数は、2次乱数のすべての乱数パターンの出現回数のなかで最大の出現回数を示す。出現回数最大偏差は、乱数パターン出現平均回数と乱数パターン最小出現回数との差の絶対値および乱数パターン出現平均回数と乱数パターン出現最大回数との差の絶対値について大きい方の数値を乱数パターン出現平均回数で除した数値を示す。出現回数平均偏差は、2次乱数の乱数パターン毎に出現回数と乱数パターン出現平均回数との差の絶対値を乱数パターン出現平均回数で除した数値を累積して得られる数値を乱数パターンの種類数(すなわち256)で除した数値を示す。偏差率は、出現回数平均偏差を百分率で表したものである。表3に示されるように、乱数生成回数が大きくなるほど、偏差率が小さくなり各乱数パターンの出現回数が平均化されることが分かる。偏差率が0.01%であるとは、256*10000回の乱数生成において、それぞれの乱数パターンが平均して9999回〜10001回出現することを意味する。   Table 3 is a table showing the distribution status of each random number pattern appearing in the random number sequence obtained by using the pseudo-random number generator according to the first embodiment. In Table 3, the random pattern appearance average number represents the average value of the number of appearances for each random number pattern of the secondary random number. The minimum number of appearances of the random number pattern indicates the minimum number of appearances among the appearance numbers of all the random number patterns of the secondary random numbers. The maximum number of appearances of the random number pattern indicates the maximum number of appearances among the appearance numbers of all random number patterns of the secondary random number. For the maximum deviation of the number of appearances, the absolute value of the difference between the average number of appearances of the random number pattern and the minimum number of appearances of the random number pattern and the absolute value of the difference between the average number of appearances of the random number pattern and the maximum number of appearances of the random number pattern Indicates the number divided by the average number of times. The average deviation of the number of appearances is the type of random number pattern obtained by accumulating the numerical value obtained by dividing the absolute value of the difference between the number of appearances and the random number pattern appearance average number by the random number pattern appearance average number for each random number pattern of the secondary random number. A numerical value divided by a number (ie 256) is shown. The deviation rate is a percentage of the average appearance frequency deviation. As shown in Table 3, it can be seen that as the number of random number generations increases, the deviation rate decreases and the number of appearances of each random number pattern is averaged. The deviation rate of 0.01% means that each random number pattern appears on average from 9999 to 10001 times in 256 * 10000 random number generation.

擬似乱数生成器11としては、式(3)に基づいて乱数生成を実行する線形合同生成器に限定されることがないのは言うまでもない。例えば、以下の式(5)に基づいて、0〜255の数値範囲の8ビットの乱数パターンを生成する線形合同生成器を採用してもよい。
i+1=3*R mod 256 (5)
この線形合同生成器を用いても、乱数生成テストを実行した。式(5)に基づいて1次乱数を生成する線形合同生成器は、周期64の乱数系列を出力する。この線形合同生成器を擬似乱数生成器11として採用した擬似乱数生成装置から出力される2次乱数は、65,536の周期を有することが判明した。1次乱数の周期が64であるから、2次乱数は1次乱数の1,024倍(65,536/64)の周期を有することになる。
Needless to say, the pseudo-random number generator 11 is not limited to a linear congruence generator that executes random number generation based on Equation (3). For example, you may employ | adopt the linear congruence generator which produces | generates the 8-bit random number pattern of the numerical value range of 0-255 based on the following formula | equation (5).
R i + 1 = 3 * R i mod 256 (5)
A random number generation test was also performed using this linear congruence generator. A linear congruence generator that generates primary random numbers based on equation (5) outputs a random number sequence with a period of 64. It was found that the secondary random number output from the pseudo random number generator adopting this linear congruence generator as the pseudo random number generator 11 has a period of 65,536. Since the period of the primary random number is 64, the secondary random number has a period of 1,024 times (65,536 / 64) of the primary random number.

上記の実施の形態1においては、配列として与えられるレジスタ12が256個の記憶要素を有するとともに、それぞれの記憶要素が8ビットの記憶容量を有する構成としたが、本願発明はこのような構成に限定されるものではない。例えば、コンピュータが2バイトを単位として動作する場合には、それぞれが2バイトの記憶容量を有する65536個の記憶要素から成るレジスタが用意される。記憶要素がnビットの記憶容量を有して、記憶要素に記憶された数値を2次乱数として出力する場合には、2次乱数の乱数パターンの種類数は2となる。したがって、2個の記憶要素から成るレジスタを用意することで、8ビットの場合と同様に周期の長いnビットの2次乱数を生成することが可能となる。 In the first embodiment, the register 12 given as an array has 256 storage elements, and each storage element has a storage capacity of 8 bits. However, the present invention has such a configuration. It is not limited. For example, when the computer operates in units of 2 bytes, a register including 65536 storage elements each having a storage capacity of 2 bytes is prepared. When the storage element has a storage capacity of n bits and the numerical value stored in the storage element is output as a secondary random number, the number of types of the random number pattern of the secondary random number is 2n . Therefore, by preparing a register composed of 2 n storage elements, it is possible to generate an n-bit secondary random number having a long cycle as in the case of 8 bits.

上記の実施の形態1においては、1次乱数R1をアドレスとする記憶要素と循環順序番号Imをアドレスとする記憶要素とを対象としてレジスタ12を撹拌し、1次乱数R1をアドレスとする記憶要素に記憶された数値を2次乱数R2として出力する構成としたが、本願発明はこのような構成に限定されるものではない。本願発明に係る擬似乱数生成装置においては、撹拌の対象となる2つの記憶要素のアドレス(第1アドレスおよび第2アドレス)および2次乱数を取り出す対象となる記憶要素のアドレス(第3アドレス)を選定する必要がある。撹拌される配列を用いて周期の短い1次乱数から周期の長い2次乱数を生成するという本願発明の趣旨を鑑みれば、第1アドレス、第2アドレスおよび第3アドレスのなかの少なくとも1つのアドレスが、1次乱数または1次乱数に基づく演算値として与えられることは必須の要件となる。1次乱数または1次乱数に基づく演算値として与えられるアドレスの数は1、2または3のいずれでもよい。また、第1のアドレス、第2のアドレスおよび第3のアドレスのいずれについても、1次乱数または1次乱数に基づく演算値として与えられる。例えば、第1のアドレスおよび第3のアドレスが1次乱数として与えられるとともに、第2のアドレスが1次乱数に基づく演算値として与えられる構成としてもよい。   In the first embodiment, the register 12 is agitated for the storage element whose address is the primary random number R1 and the storage element whose address is the circulation sequence number Im, and the storage element whose address is the primary random number R1. However, the present invention is not limited to such a configuration. In the pseudo random number generation device according to the present invention, the addresses of the two storage elements to be agitated (first address and second address) and the address of the storage element from which secondary random numbers are extracted (third address) are obtained. It is necessary to select. In view of the gist of the present invention to generate a secondary random number having a long period from a primary random number having a short period using an agitated arrangement, at least one address among the first address, the second address, and the third address Is a primary random number or an arithmetic value based on the primary random number is an essential requirement. The number of addresses given as a primary random number or an operation value based on the primary random number may be 1, 2 or 3. Further, any of the first address, the second address, and the third address is given as a primary random number or a calculated value based on the primary random number. For example, the first address and the third address may be given as primary random numbers, and the second address may be given as an operation value based on the primary random numbers.

循環順序番号Imについては、第1アドレス、第2アドレスおよび第3アドレスのなかの少なくとも1つのアドレスが、循環順序番号または循環順序番号に基づく演算値として与えられることは必須の要件ではない。但し、循環順序番号Imを使用することで、レジスタ12内のすべての記憶要素のアドレスを均等に選定することができる。すなわち、循環順序番号Imを使用することで、レジスタ12を偏りなく撹拌することが可能となる。循環順序番号のこのような特性を鑑みれば、第1のアドレスまたは第2のアドレスの少なくとも一方のアドレスが、循環順序番号または循環順序番号に基づく演算値として与えられるのが好適である。なお、第3のアドレスが、循環順序番号または循環順序番号に基づく演算値として与えられてもよい。   For the cyclic sequence number Im, it is not an essential requirement that at least one of the first address, the second address, and the third address is given as an operation value based on the cyclic sequence number or the cyclic sequence number. However, by using the circulation sequence number Im, the addresses of all the storage elements in the register 12 can be selected equally. That is, by using the circulation sequence number Im, it is possible to stir the register 12 without deviation. In view of such characteristics of the cyclic sequence number, it is preferable that at least one of the first address and the second address is given as an operation value based on the cyclic sequence number or the cyclic sequence number. Note that the third address may be given as a cyclic sequence number or an operation value based on the cyclic sequence number.

第1のアドレス、第2のアドレスおよび第3のアドレスのなかで、第1の乱数または第1の乱数に基づく演算値あるいは循環順序番号または循環順序番号に基づく演算値として与えられないアドレスについては、所定の規則に基づく他の演算方法を用いて選定する必要がある。   Among the first address, the second address, and the third address, an address that is not given as a first random number, an operation value based on the first random number, or a circulation sequence number or an operation value based on the circulation sequence number It is necessary to select using another calculation method based on a predetermined rule.

以下では、1次乱数R1に基づく演算処理について、幾つか説明する。例えば、関数を構成する変数に1次乱数R1を代入して関数値を算出することで、1次乱数R1に基づく演算値を算出する。ここで、実施の形態1において、擬似乱数生成器11が9ビットを単位として1次乱数R1を生成するような装置構成を考える。1次乱数R1は0〜511の範囲の数値をとるから、1次乱数R1の乱数パターンの種類数は512となる。この場合、例えば式(6)を用いて1次乱数R1を変換する。
R1’={R1−mod(R1,2)}/2 (6)
この変換により得られる乱数R1’は、0から255の数値範囲の数値をとるから、この乱数R1’を用いてレジスタ12内の記憶要素のアドレスを選定する。
Below, some arithmetic processing based on the primary random number R1 will be described. For example, the operation value based on the primary random number R1 is calculated by calculating the function value by substituting the primary random number R1 into the variable constituting the function. Here, in the first embodiment, consider an apparatus configuration in which the pseudo random number generator 11 generates the primary random number R1 in units of 9 bits. Since the primary random number R1 takes a numerical value in the range of 0 to 511, the number of types of random number patterns of the primary random number R1 is 512. In this case, the primary random number R1 is converted using, for example, Equation (6).
R1 ′ = {R1-mod (R1,2)} / 2 (6)
Since the random number R1 ′ obtained by this conversion takes a numerical value in the numerical range of 0 to 255, the address of the storage element in the register 12 is selected using this random number R1 ′.

所定の規則に基づいて1次乱数R1を表すビット列を分割することで、1次乱数R1に基づく1または複数の演算値を生成するようにしてもよい。例えば1次乱数R1として4バイト(32ビット)の乱数パターンが生成される場合には、1次乱数R1を4分割して、8ビット毎に演算値を生成する。この演算値を用いて、レジスタ12内の記憶要素のアドレスを選定する。また、1次乱数R1として16ビットの乱数パターンが生成される場合には、乱数パターンを分割して前半の8ビットまたは後半の8ビットを演算値とする。この演算値を用いて、レジスタ12内の記憶要素のアドレスを選定する。   One or a plurality of calculation values based on the primary random number R1 may be generated by dividing the bit string representing the primary random number R1 based on a predetermined rule. For example, when a 4-byte (32-bit) random number pattern is generated as the primary random number R1, the primary random number R1 is divided into four, and an operation value is generated every 8 bits. Using this calculated value, the address of the storage element in the register 12 is selected. When a 16-bit random number pattern is generated as the primary random number R1, the random number pattern is divided and the first half 8 bits or the second half 8 bits are used as the operation value. Using this calculated value, the address of the storage element in the register 12 is selected.

所定の規則に基づいて1次乱数R1を表すビット列を結合することで、1次乱数R1に基づく演算値を生成するようにしてもよい。例えば1次乱数R1として4ビットの乱数パターンが生成される場合には、連続する2つの1次乱数R1のビットパターンを結合して得られる8ビットのビットパターンを演算値とする。この演算値を用いて、レジスタ12内の記憶要素のアドレスを選定する。   An arithmetic value based on the primary random number R1 may be generated by combining bit strings representing the primary random number R1 based on a predetermined rule. For example, when a 4-bit random number pattern is generated as the primary random number R1, an 8-bit bit pattern obtained by combining two consecutive primary random number R1 bit patterns is used as an operation value. Using this calculated value, the address of the storage element in the register 12 is selected.

バッファに1次乱数R1を入力して、出力として得られる数値を演算値とするようにしてもよい。例えば、擬似乱数生成器11と制御部13との間に、FIFOを配置する。FIFOは、擬似乱数生成器11から1次乱数R1を入力して、1次乱数R1の入力に応じて最も先にFIFOに入力された数値を演算値として制御部13に出力する。この演算値を用いて、レジスタ12内の記憶要素のアドレスを選定する。   A primary random number R1 may be input to the buffer, and a numerical value obtained as an output may be used as an operation value. For example, a FIFO is arranged between the pseudorandom number generator 11 and the control unit 13. The FIFO receives the primary random number R1 from the pseudo-random number generator 11 and outputs the numerical value input first to the FIFO in accordance with the input of the primary random number R1 to the control unit 13 as an arithmetic value. Using this calculated value, the address of the storage element in the register 12 is selected.

アドレス変換テーブル等のテーブルを参照して、1次乱数R1に対応する数値を演算値とするようにしてもよい。本願発明に係る配列は、上記の実施の形態において使用されるレジスタや、RAM上の所定の記憶領域等として与えられる。このような記憶領域に存在する記憶要素のアドレスに対しては、必ずしも0〜255の数値範囲の数値が割り当てられるものではない。また、アドレスとして割り当てられる数値は、必ずしも連続する数値として与えられるものでもない。このような場合には、1次乱数R1が0〜255の数値範囲における連続的な数値として与えられるとしても、1次乱数毎に当該1次乱数をレジスタ内の記憶要素のそれぞれ異なるアドレスに対応付ける必要がある。アドレス変換テーブルを用いることにより、1次乱数R1とレジスタ内の記憶要素のアドレスとを1対1で対応付けることが可能になる。したがって、アドレス変換テーブルを参照して得られた数値を演算値とする。この演算値を用いて、レジスタ12内の記憶要素のアドレスを選定する。   By referring to a table such as an address conversion table, a numerical value corresponding to the primary random number R1 may be used as the operation value. The arrangement according to the present invention is given as a register used in the above embodiment, a predetermined storage area on the RAM, or the like. A numerical value in the numerical range of 0 to 255 is not necessarily assigned to an address of a storage element existing in such a storage area. Also, numerical values assigned as addresses are not necessarily given as consecutive numerical values. In such a case, even if the primary random number R1 is given as a continuous numerical value in the numerical range of 0 to 255, the primary random number is associated with different addresses of the storage elements in the register for each primary random number. There is a need. By using the address conversion table, it is possible to associate the primary random number R1 and the address of the storage element in the register on a one-to-one basis. Therefore, a numerical value obtained by referring to the address conversion table is used as a calculation value. Using this calculated value, the address of the storage element in the register 12 is selected.

さらに、1次乱数R1に係る上記の演算処理を組合わせた演算処理を用いて、一次乱数R1に基づく演算値を算出する構成としてもよい。例えば、擬似乱数生成器11と制御部13との間に、バッファを配置する。擬似乱数生成器11から出力される1次乱数R1を変数とする関数値をアドレスとして特定されるバッファ内の記憶要素に記憶される数値を出力する。そして、この記憶要素に1次乱数R1を記憶させる。   Furthermore, it is good also as a structure which calculates the calculated value based on the primary random number R1 using the calculation process which combined said calculation process concerning the primary random number R1. For example, a buffer is arranged between the pseudorandom number generator 11 and the control unit 13. A numerical value stored in a storage element in the buffer specified by using a function value having the primary random number R1 output from the pseudo random number generator 11 as a variable is output. The primary random number R1 is stored in this storage element.

循環順序番号Imについても、上記の演算処理を適宜適用して演算値を求めることができる。さらに、1次乱数R1および循環順序番号Imの両方を基にして演算値を求める構成としてもよい。例えば、1次乱数R1および循環順序番号Imを共に変数とする関数f(R1,Im)を定義して、この関数値を演算値として記憶要素のアドレスを選定するようにしてもよい。   As for the circulation sequence number Im, the calculation value can be obtained by appropriately applying the above calculation processing. Furthermore, it is good also as a structure which calculates | requires a calculated value based on both the primary random number R1 and the circulation order number Im. For example, a function f (R1, Im) having both the primary random number R1 and the circulation sequence number Im as variables may be defined, and the address of the storage element may be selected using this function value as an operation value.

上記の実施の形態1においては、1次乱数R1をアドレスとする記憶要素に記憶される数値と循環順序番号Imをアドレスとする記憶要素に記憶される数値とを交換してレジスタ12を撹拌した後に、1次乱数R1をアドレスとする記憶要素に記憶される数値を2次乱数R2として出力する構成としたが、本願発明はこのような構成に限定されるものではない。本願発明に係る擬似乱数生成方法(擬似乱数生成プログラム)においては、選定された第3のアドレスにより特定される記憶要素に記憶される数値を2次乱数R2として出力した後に、選定された第1のアドレスおよび第2のアドレスにより特定される2つの記憶要素に記憶される数値を対象としてレジスタ12を撹拌するように構成してもよい。   In the first embodiment, the register 12 is agitated by exchanging the numerical value stored in the storage element having the primary random number R1 as the address and the numerical value stored in the storage element having the circulation sequence number Im as the address. Later, the numerical value stored in the storage element having the primary random number R1 as an address is output as the secondary random number R2, but the present invention is not limited to such a configuration. In the pseudo random number generation method (pseudo random number generation program) according to the present invention, the numerical value stored in the storage element specified by the selected third address is output as the secondary random number R2, and then the first selected The register 12 may be agitated for the numerical values stored in the two storage elements specified by the address and the second address.

また、レジスタ12を撹拌する毎に、2次乱数R2を出力する構成としているが、本願発明はこのような構成に限定されるものではない。本願発明における擬似乱数生成方法(擬似乱数生成プログラム)においては、レジスタ12を1回撹拌する毎に、複数の2次乱数R2を出力する構成としてもよい。また、2次乱数R2を1回出力する毎に、レジスタ12を複数回撹拌する構成としてもよい。本願の特許請求の範囲に記載された擬似乱数生成方法および擬似乱数生成プログラムに係る発明を構成する各工程(ステップ)は、必ずしも記載された順に時系列に実行されるものではなく、順序が逆になる場合もあれば、ある工程(ステップ)を1回実行する間に他の工程(ステップ)を複数回実行する場合もあり得る。本願の特許請求の範囲に記載された擬似乱数生成方法および擬似乱数生成プログラムに係る発明の技術的範囲が、上記の種々の実施態様を全て包括するものとして与えられている点に留意されたい。   Further, every time the register 12 is stirred, the secondary random number R2 is output. However, the present invention is not limited to such a configuration. In the pseudorandom number generation method (pseudorandom number generation program) in the present invention, a configuration may be adopted in which a plurality of secondary random numbers R2 are output each time the register 12 is stirred once. Alternatively, the register 12 may be stirred a plurality of times each time the secondary random number R2 is output once. The steps (steps) constituting the invention according to the pseudorandom number generation method and the pseudorandom number generation program described in the claims of the present application are not necessarily executed in time series in the order described, and the order is reversed. In some cases, another process (step) may be executed a plurality of times while a certain process (step) is executed once. It should be noted that the technical scope of the invention relating to the pseudo-random number generation method and the pseudo-random number generation program described in the claims of the present application is given as encompassing all the various embodiments described above.

以上のように、この実施の形態1による擬似乱数生成装置によれば、1次乱数R1を生成する擬似乱数生成器11と、2次乱数R2の乱数パターンの種類数と同数の記憶要素から構成されて、それぞれの記憶要素には異なる乱数パターンが記憶されるレジスタ12と、選定された第1のアドレスおよび第2のアドレスにより特定される2つの記憶要素を対象としてレジスタ12を撹拌するとともに、選定された第3のアドレスにより特定される記憶要素に記憶される数値を2次乱数R2として出力する制御部13とを有し、第1のアドレス、第2のアドレスおよび第3のアドレスのなかの少なくとも1つのアドレスが、1次乱数R1または1次乱数R1に基づく演算値として与えられるように構成したので、撹拌することにより順列として膨大なパターン数の数値系列を表現するのが可能であるレジスタ12内の任意の記憶要素から2次乱数R2を取り出すことにより、周期の長い乱数系列を得ることができる。   As described above, according to the pseudo random number generation device according to the first embodiment, the pseudo random number generator 11 that generates the primary random number R1 and the number of storage elements equal to the number of types of the random number pattern of the secondary random number R2 are configured. In addition, the register 12 in which different random number patterns are stored in each storage element, and the register 12 are agitated for the two storage elements specified by the selected first address and second address, And a control unit 13 that outputs a numerical value stored in the storage element specified by the selected third address as a secondary random number R2, and includes the first address, the second address, and the third address. Since at least one address is given as a primary random number R1 or a calculated value based on the primary random number R1, the expansion is performed as a permutation by stirring. By taking out the secondary random number R2 from any storage element in the register 12 is possible to express a pattern number of the numerical sequence, it is possible to obtain a long random sequence of cycles.

また、1次乱数R1の生成回数を2次乱数R2の乱数パターンの種類数で除した剰余として与えられる循環順序番号Imを算出し、第1のアドレスまたは第2のアドレスの少なくとも一方のアドレスが、循環順序番号Imまたは循環順序番号Imに基づく演算値として与えられるように構成したので、循環順序番号Imを用いることでレジスタ12内のすべての記憶要素のアドレスを均等に選定することが保証されて、レジスタ12を全範囲にわたって偏りなく撹拌することが可能となるから、周期の長い乱数系列を得られる可能性が大きくなる。さらに、循環順序番号Imはカウンタ等の簡単な演算回路を使用しての単純な演算により算出することが可能であるから、擬似乱数生成装置の回路構成を簡略化することができる。   Further, a circulation sequence number Im given as a remainder obtained by dividing the number of generations of the primary random number R1 by the number of types of random number patterns of the secondary random number R2 is calculated, and at least one address of the first address or the second address is calculated. Since it is configured to be given as a cyclic sequence number Im or an operation value based on the cyclic sequence number Im, it is guaranteed that the addresses of all the storage elements in the register 12 are equally selected by using the cyclic sequence number Im. As a result, the register 12 can be agitated without bias over the entire range, so that the possibility of obtaining a random number sequence having a long period is increased. Furthermore, since the circulation sequence number Im can be calculated by a simple calculation using a simple calculation circuit such as a counter, the circuit configuration of the pseudo-random number generation device can be simplified.

また、1次乱数R1を生成する擬似乱数生成器11が線形合同生成器または線形フィードバックシフトレジスタとして与えられるように構成したので、比較的簡単な演算回路を用いて1次乱数R1を生成することが可能となるから、擬似乱数生成装置の回路構成を簡略化することができる。   In addition, since the pseudo random number generator 11 that generates the primary random number R1 is provided as a linear congruence generator or a linear feedback shift register, the primary random number R1 can be generated using a relatively simple arithmetic circuit. Therefore, the circuit configuration of the pseudorandom number generator can be simplified.

実施の形態2.
図4は、この発明の実施の形態2による擬似乱数生成装置の構成の一例を示す図である。図4において、21は例えば線形合同生成器や線形フィードバックシフトレジスタ等として与えられ比較的周期の短い1次乱数R1(第1の乱数)を生成する擬似乱数生成器(第1の擬似乱数生成手段)、22は例えば線形合同生成器や線形フィードバックシフトレジスタ等として与えられ比較的周期の短い撹拌用乱数RS(第3の乱数)を生成する擬似乱数生成器(第2の擬似乱数制御手段)、23は2次乱数R2(第2の乱数)の乱数パターンの種類数と同数の記憶要素から構成されてそれぞれの記憶要素には異なる乱数パターンが記憶されるレジスタ(配列)、24は選定された第1のアドレスおよび第2のアドレスにより特定されるレジスタ23内の2つの記憶要素を対象としてレジスタ23を撹拌するとともに選定された第3のアドレスにより特定されるレジスタ23内の記憶要素に記憶される数値を2次乱数R2として出力する制御部(制御手段)である。
Embodiment 2. FIG.
FIG. 4 is a diagram showing an example of the configuration of a pseudorandom number generator according to Embodiment 2 of the present invention. In FIG. 4, reference numeral 21 denotes a pseudo random number generator (first pseudo random number generating means) which is given as, for example, a linear congruence generator or a linear feedback shift register and generates a primary random number R1 (first random number) having a relatively short period. ), 22 is given as, for example, a linear congruence generator, a linear feedback shift register or the like, and generates a random number for stirring RS (third random number) with a relatively short cycle (second pseudo random number control means), 23 is a register (array) configured with the same number of storage elements as the number of types of random number patterns of the secondary random number R2 (second random number), and each storage element stores a different random number pattern, and 24 is selected. The register 23 is agitated and selected for the two storage elements in the register 23 specified by the first address and the second address. Controller for outputting a numerical value stored in the storage element in the register 23, identified as secondary random number R2 by less is (control means).

この実施の形態2では、擬似乱数生成器21として、式(5)(Ri+1=3*R mod 256)に基づいて0〜255の数値範囲の8ビットの乱数パターンを生成する線形合同生成器を採用するものとする。また、擬似乱数生成器22として、以下の式(7)に基づいて0〜255の数値範囲の8ビットの乱数パターンを生成する線形合同生成器を採用するものとする。
i+1=(5*R+1)mod 256 (7)
さらに、レジスタ23として、0〜255の数値範囲のアドレスを有する256個の記憶要素から構成されて、それぞれの記憶要素が8ビットの記憶容量を有するレジスタを採用する。
In the second embodiment, as the pseudo-random number generator 21, a linear congruential generation that generates an 8-bit random number pattern in the numerical range of 0 to 255 based on the equation (5) (R i + 1 = 3 * R i mod 256). A vessel shall be adopted. Further, as the pseudo-random number generator 22, a linear congruence generator that generates an 8-bit random number pattern in a numerical range of 0 to 255 based on the following equation (7) is adopted.
R i + 1 = (5 * R i +1) mod 256 (7)
Further, as the register 23, a register which is composed of 256 storage elements having an address in a numerical range of 0 to 255, and each storage element has a storage capacity of 8 bits is adopted.

図5は、この発明の実施の形態2による擬似乱数生成方法の一例を示すフローチャートである。擬似乱数生成器21は、8ビットの1次乱数R1を生成して出力する(ステップS11)。擬似乱数生成器22は、8ビットの撹拌用乱数RSを生成して出力する(ステップS12)。   FIG. 5 is a flowchart showing an example of a pseudo-random number generation method according to Embodiment 2 of the present invention. The pseudorandom number generator 21 generates and outputs an 8-bit primary random number R1 (step S11). The pseudo random number generator 22 generates and outputs an 8-bit stirring random number RS (step S12).

1次乱数R1および撹拌用乱数RSが出力されれば、制御部24は、1次乱数R1をアドレスとする記憶要素に記憶される数値と、撹拌用乱数RSをアドレスとする記憶要素に記憶される数値とを交換する(ステップS13)。すなわち、1次乱数R1を第1のアドレスとするとともに撹拌用乱数RSを第2のアドレスとして、レジスタ23を撹拌する。レジスタ23の撹拌が完了すれば、制御部24は、1次乱数R1をアドレスとする記憶要素に記憶される数値を2次乱数R2として出力する(ステップS14)。   If the primary random number R1 and the stirring random number RS are output, the control unit 24 stores the numerical value stored in the storage element having the primary random number R1 as an address and the storage element having the stirring random number RS as an address. The numerical value is exchanged (step S13). That is, the register 23 is stirred using the primary random number R1 as the first address and the stirring random number RS as the second address. When the stirring of the register 23 is completed, the control unit 24 outputs the numerical value stored in the storage element having the primary random number R1 as an address as the secondary random number R2 (step S14).

2次乱数R2が出力されれば、所定数の乱数系列の出力が完了したか否かを判定する(ステップS15)。所定数の乱数系列の出力が完了していなければ、処理をステップS11に復帰させて、乱数生成処理を継続する。所定数の乱数系列の出力が完了していれば、乱数生成に係る処理を終了する。   If the secondary random number R2 is output, it is determined whether or not the output of a predetermined number of random number sequences has been completed (step S15). If the output of the predetermined number of random number sequences has not been completed, the process returns to step S11 and the random number generation process is continued. If the output of the predetermined number of random number sequences has been completed, the processing relating to random number generation is terminated.

式(5)に基づいて乱数を生成する線形合同生成器は、周期64の乱数系列を出力する。式(7)に基づいて乱数を生成する線形合同生成器は、周期64の乱数系列を出力する。擬似乱数生成器21から出力される1次乱数R1により与えられる第1のアドレスおよび擬似乱数生成器22から出力される撹拌用乱数RSにより与えられる第2のアドレスにより特定される2つの記憶要素を対象としてレジスタ23を撹拌し、擬似乱数生成器21から出力される1次乱数R1により与えられる第3のアドレスにより特定される記憶要素に記憶される数値を2次乱数R2として出力する実施の形態2による擬似乱数生成装置は、4,194,048の周期を有することが判明した。1次乱数R1の周期が64であるから、2次乱数R2は1次乱数R1の65,532倍(4,194,048/64)の周期を有することになる。   The linear congruence generator that generates random numbers based on Equation (5) outputs a random number sequence with a period of 64. The linear congruence generator that generates random numbers based on Equation (7) outputs a random number sequence with a period of 64. Two storage elements specified by the first address given by the primary random number R1 output from the pseudorandom number generator 21 and the second address given by the random number RS for stirring output from the pseudorandom number generator 22 Embodiment in which register 23 is agitated as a target, and a numerical value stored in a storage element specified by a third address given by primary random number R1 output from pseudorandom number generator 21 is output as secondary random number R2 It has been found that the pseudorandom number generator according to 2 has a period of 4,194,048. Since the period of the primary random number R1 is 64, the secondary random number R2 has a period 65,532 times (4,194,048 / 64) times that of the primary random number R1.

実施の形態1による擬似乱数生成装置について説明したのと同様に、1次乱数または1次乱数に基づく演算値、撹拌用乱数または撹拌用乱数に基づく演算値、あるいは実施の形態1で使用した循環順序番号または循環順序番号に基づく演算値を、第1のアドレス、第2のアドレスおよび第3のアドレスのなかのいずれのアドレスとしても与えることができる。なお、撹拌用乱数RSは、レジスタ23を撹拌するための乱数として与えられる。この役割を考慮すれば、撹拌用乱数または撹拌用乱数に基づく演算値を、第1のアドレスまたは第2のアドレスの少なくとも一方のアドレスとして与えるのが好適である。   Similar to the description of the pseudo-random number generator according to the first embodiment, a primary random number or an arithmetic value based on the primary random number, an arithmetic value based on the stirring random number or the random number for stirring, or the circulation used in the first embodiment An operation value based on the sequence number or the cyclic sequence number can be given as any one of the first address, the second address, and the third address. The stirring random number RS is given as a random number for stirring the register 23. In consideration of this role, it is preferable to provide a stirring random number or a calculated value based on the stirring random number as at least one of the first address and the second address.

また、1次乱数R1を生成する毎に、撹拌用乱数RSを生成してレジスタ23を撹拌する構成としているが、本願発明はこのような構成に限定されるものではない。撹拌用乱数RSの生成を1次乱数R1の生成よりも先に実行するようにしてもよい。また、撹拌用乱数RSを1回生成する間に1次乱数R1を複数回生成して、レジスタ23の撹拌および2次乱数R2の出力を実行するように構成してもよい。   Further, every time the primary random number R1 is generated, the agitation random number RS is generated and the register 23 is agitated. However, the present invention is not limited to such a configuration. The generation of the random number for stirring RS may be executed before the generation of the primary random number R1. Further, the primary random number R1 may be generated a plurality of times while the stirring random number RS is generated once, and the stirring of the register 23 and the output of the secondary random number R2 may be executed.

この実施の形態2による擬似乱数生成装置は、実施の形態1による擬似乱数生成装置と同様の効果を奏するものである。さらに、擬似乱数生成器22を用いて撹拌用乱数RSを1次乱数R1とは別個に生成するとともに撹拌用乱数RSを使用してレジスタ23を撹拌するように構成したので、1次乱数R1の周期の影響を低減してレジスタ23の記憶内容を変化させることができるから、撹拌することにより順列として膨大なパターン数の数値系列を表現できるレジスタ23をより有効に利用することができて、周期の長い乱数系列を得ることができる。   The pseudo random number generation device according to the second embodiment has the same effects as the pseudo random number generation device according to the first embodiment. Furthermore, since the random number for stirring RS is generated separately from the primary random number R1 using the pseudo random number generator 22, and the register 23 is stirred using the random number for stirring RS, the primary random number R1 Since the memory contents of the register 23 can be changed by reducing the influence of the period, the register 23 that can represent a numerical sequence having a huge number of patterns as a permutation by stirring can be used more effectively. A long random number sequence can be obtained.

図3および図5に示されるフローチャートに記載された各工程を実行するプログラムコードから成る擬似乱数生成プログラムは、当該擬似乱数生成プログラムが記憶されたCD−ROMやDVD−ROM等の情報記憶媒体を入手することで、あるいは当該擬似乱数生成プログラムが格納された外部のサーバからダウンロードすることで利用することができる。情報記憶媒体から読み出されるか、あるいは外部のサーバからダウンロードされた擬似乱数生成プログラムは、例えばパーソナルコンピュータとして与えられる端末装置内の記憶手段にインストールされる。記憶手段にインストールされた擬似乱数生成プログラムを、端末装置内のCPUにより実行することで、実施の形態1および実施の形態2において説明した擬似乱数生成方法を実現することができる。   A pseudo-random number generation program comprising program codes for executing the steps described in the flowcharts shown in FIGS. 3 and 5 is an information storage medium such as a CD-ROM or DVD-ROM in which the pseudo-random number generation program is stored. It can be used by obtaining it or by downloading it from an external server storing the pseudo random number generation program. The pseudo-random number generation program read from the information storage medium or downloaded from an external server is installed in a storage unit in a terminal device provided as a personal computer, for example. By executing the pseudo random number generation program installed in the storage means by the CPU in the terminal device, the pseudo random number generation method described in the first and second embodiments can be realized.

適用例1.
図6は、本願発明に係る擬似乱数生成装置を適用した暗号システムの構成の一例を示す図である。図6において、31,32は本願発明に係る擬似乱数生成装置、33,34は論理演算処理装置、35は通信路である。擬似乱数生成装置31と擬似乱数生成装置32とは、同一に構成されるか、あるいは同一の論理構造を有するように構成される。論理演算処理装置33と論理演算処理装置34とは、同一に構成されるか、同一の論理構造を有するように構成される。論理演算処理装置33,34は、一般的には排他的論理和演算を実行する演算回路として与えられる。この暗号システムにおいて、擬似乱数生成装置31,32から出力される乱数系列は、ストリーム暗号を生成するためのキーストリームとして使用される。
Application Example 1
FIG. 6 is a diagram showing an example of the configuration of an encryption system to which the pseudo random number generation device according to the present invention is applied. In FIG. 6, reference numerals 31 and 32 denote pseudo-random number generators according to the present invention, reference numerals 33 and 34 denote logical operation processors, and reference numeral 35 denotes a communication path. The pseudo random number generation device 31 and the pseudo random number generation device 32 are configured to be the same or have the same logical structure. The logical operation processing device 33 and the logical operation processing device 34 are configured to be the same or have the same logical structure. The logical operation processing devices 33 and 34 are generally provided as arithmetic circuits that execute exclusive OR operations. In this cryptographic system, the random number sequence output from the pseudo-random number generators 31 and 32 is used as a key stream for generating a stream cipher.

擬似乱数生成装置31と論理演算処理装置33とを有して構成される暗号化装置では、送信側と受信側とで共有される共通鍵を用いて、擬似乱数生成装置31を初期状態に設定する。具体的には、1次乱数(および撹拌用乱数)を生成する擬似乱数生成器の初期値を設定するとともにレジスタに初期の記憶内容を設定する。論理演算処理装置33は、平文を構成するデータ系列と擬似乱数生成装置31から出力される乱数系列とを入力して、ビット単位または所定数のビット列を単位として所定の論理演算を実行し、暗号文を構成するデータ系列を生成して通信路35に出力する。   In the encryption device configured to include the pseudo random number generation device 31 and the logical operation processing device 33, the pseudo random number generation device 31 is set to an initial state using a common key shared between the transmission side and the reception side. To do. Specifically, an initial value of a pseudo random number generator that generates a primary random number (and a random number for stirring) is set, and initial storage contents are set in a register. The logical operation processing device 33 inputs a data sequence constituting a plaintext and a random number sequence output from the pseudo random number generation device 31, executes a predetermined logical operation in units of bits or a predetermined number of bit strings, and performs encryption. A data series constituting the sentence is generated and output to the communication path 35.

擬似乱数生成装置32と論理演算処理装置34とを有して構成される復号化装置では、共通鍵を用いて擬似乱数生成装置32を初期状態に設定する。論理演算処理装置34は、暗号文を構成するデータ系列と擬似乱数生成装置32から出力される乱数系列とを入力して、ビット単位または所定数のビット列を単位として所定の論理演算を実行し、平文を構成するデータ系列を生成する。   In a decryption device configured to include the pseudo random number generation device 32 and the logical operation processing device 34, the pseudo random number generation device 32 is set to an initial state using a common key. The logical operation processing device 34 inputs the data sequence constituting the ciphertext and the random number sequence output from the pseudo-random number generation device 32, executes a predetermined logical operation in units of bits or a predetermined number of bit strings, Generate data series that make up plaintext.

なお、上記の実施の形態1および実施の形態2により説明される擬似乱数生成装置等は、本願発明を限定するものではなく、例示することを意図して開示されているものである。本願発明の技術的範囲は特許請求の範囲の記載により定められるものであり、特許請求の範囲に記載された発明の技術的範囲内において種々の設計的変更が可能である。例えば、上記の実施の形態では、第1のアドレスおよび第2のアドレスにより特定される2つの記憶要素を対象としてレジスタを撹拌する構成としているが、3以上の記憶要素を対象としてレジスタを撹拌する構成としてもよい。この場合にも、撹拌の対象となる記憶要素を特定する3以上のアドレスおよび2次乱数を取り出す記憶要素を特定するアドレスのなかの少なくとも1つのアドレスは、1次乱数または1次乱数に基づく演算値により与えられる。さらに、これらのアドレスのなかの少なくとも1つのアドレスが、循環順序番号または循環順序番号に基づく演算値により与えられるのが好適である。   Note that the pseudo-random number generation device and the like described in the first embodiment and the second embodiment are not intended to limit the present invention but are disclosed for the purpose of illustration. The technical scope of the present invention is defined by the description of the scope of claims, and various design changes can be made within the technical scope of the invention described in the scope of claims. For example, in the above embodiment, the register is stirred for two storage elements specified by the first address and the second address, but the register is stirred for three or more storage elements. It is good also as a structure. Also in this case, at least one address among the three or more addresses that specify the storage element to be agitated and the address that specifies the storage element from which the secondary random number is extracted is an operation based on the primary random number or the primary random number. Given by value. Furthermore, it is preferable that at least one of these addresses is given by a cyclic sequence number or an operation value based on the cyclic sequence number.

また、本願発明に係る擬似乱数生成装置は、ストリーム暗号システムに適用できるのみではない。例えば、擬似乱数生成装置から出力される乱数系列をセッションキーとして使用することで、本願発明に係る擬似乱数生成装置をブロック暗号システムに適用することができる。さらに、擬似乱数生成装置から出力される乱数系列をモンテカルロシミュレーション用乱数等として使用することで、本願発明に係る擬似乱数生成装置をコンピュータシミュレーションシステムに適用することができる。   Moreover, the pseudo random number generation device according to the present invention is not only applicable to a stream cipher system. For example, by using a random number sequence output from the pseudorandom number generator as a session key, the pseudorandom number generator according to the present invention can be applied to a block cipher system. Furthermore, by using the random number sequence output from the pseudo-random number generator as a random number for Monte Carlo simulation, the pseudo-random number generator according to the present invention can be applied to a computer simulation system.

本願発明は、ストリーム暗号システム、ブロック暗号システムまたはコンピュータシミュレーションシステム等の種々のシステムで使用される擬似乱数生成装置に広く適用できるものである。   The present invention can be widely applied to pseudo-random number generators used in various systems such as stream cipher systems, block cipher systems, and computer simulation systems.

本願発明に係る擬似乱数生成装置の動作原理を説明するためのモデルの構成を示す図である。It is a figure which shows the structure of the model for demonstrating the operating principle of the pseudorandom number generation apparatus which concerns on this invention. この発明の実施の形態1による擬似乱数生成装置の構成の一例を示す図である。It is a figure which shows an example of a structure of the pseudorandom number generation apparatus by Embodiment 1 of this invention. 実施の形態1による擬似乱数生成方法の一例を示すフローチャートである。5 is a flowchart illustrating an example of a pseudo random number generation method according to the first embodiment. この発明の実施の形態2による擬似乱数生成装置の構成の一例を示す図である。It is a figure which shows an example of a structure of the pseudorandom number generation apparatus by Embodiment 2 of this invention. 実施の形態2による擬似乱数生成方法の一例を示すフローチャートである。6 is a flowchart illustrating an example of a pseudo-random number generation method according to a second embodiment. 本願発明に係る擬似乱数生成装置を適用した暗号システムの構成の一例を示す図である。It is a figure which shows an example of a structure of the encryption system to which the pseudorandom number generator which concerns on this invention is applied. 線形フィードバックシフトレジスタの構成の一例を示す図である。It is a figure which shows an example of a structure of a linear feedback shift register.

符号の説明Explanation of symbols

1 擬似乱数生成器、2 レジスタ、3 制御部、11 擬似乱数生成器(擬似乱数生成手段)、12 レジスタ(配列)、13 制御部(制御手段)、21 擬似乱数生成器(第1の擬似乱数生成手段)、22 擬似乱数生成器(第2の擬似乱数生成手段)、23 レジスタ(配列)、24 制御部(制御手段)、31,32 擬似乱数生成装置、33,34 論理演算処理装置、35 通信路

1 pseudo random number generator, 2 registers, 3 control unit, 11 pseudo random number generator (pseudo random number generation means), 12 register (array), 13 control unit (control means), 21 pseudo random number generator (first pseudo random number generator) Generating means), 22 pseudo random number generator (second pseudo random number generating means), 23 register (array), 24 control unit (control means), 31, 32 pseudo random number generating device, 33, 34 logical operation processing device, 35 Communication path

Claims (10)

第1の乱数を生成する擬似乱数生成手段と、
第2の乱数の乱数パターンの種類数と同数の記憶要素から構成されて、それぞれの記憶要素には異なる乱数パターンが記憶される配列と、
少なくとも選定された第1のアドレスおよび第2のアドレスにより特定される2以上の記憶要素を対象として配列を撹拌するとともに、選定された第3のアドレスにより特定される記憶要素に記憶される数値を第2の乱数として出力する制御手段とを有して構成され、
第1のアドレス、第2のアドレスおよび第3のアドレスのなかの少なくとも1つのアドレスが、第1の乱数または第1の乱数に基づく演算値として与えられることを特徴とする擬似乱数生成装置。
Pseudo-random number generation means for generating a first random number;
An array composed of the same number of storage elements as the number of types of random number patterns of the second random number, each storage element storing a different random number pattern;
The array is agitated for at least two or more storage elements specified by the selected first address and the second address, and a numerical value stored in the storage element specified by the selected third address is Control means for outputting as a second random number,
A pseudo-random number generation device, wherein at least one of the first address, the second address, and the third address is given as a first random number or an operation value based on the first random number.
制御手段が、第1の乱数の生成回数を第2の乱数の乱数パターンの種類数で除した剰余を算出し、
第1のアドレスまたは第2のアドレスの少なくとも一方のアドレスが、前記剰余または前記剰余に基づく演算値として与えられることを特徴とする請求項1記載の擬似乱数生成装置。
The control means calculates a remainder obtained by dividing the number of generations of the first random number by the number of types of random number patterns of the second random number,
The pseudorandom number generation device according to claim 1, wherein at least one of the first address and the second address is given as the remainder or an operation value based on the remainder.
第1のアドレスおよび第3のアドレスが、第1の乱数または第1の乱数に基づく演算値として与えられ、
第2のアドレスが前記剰余または前記剰余に基づく演算値として与えられることを特徴とする請求項2記載の擬似乱数生成装置。
The first address and the third address are given as a first random number or an operation value based on the first random number,
The pseudo-random number generation device according to claim 2, wherein the second address is given as the remainder or an operation value based on the remainder.
第1のアドレスおよび第3のアドレスが、前記剰余または前記剰余に基づく演算値として与えられ、
第2のアドレスが第1の乱数または第1の乱数に基づく演算値として与えられることを特徴とする請求項2記載の擬似乱数生成装置。
A first address and a third address are given as the remainder or an operation value based on the remainder;
3. The pseudo-random number generation device according to claim 2, wherein the second address is given as a first random number or an operation value based on the first random number.
擬似乱数生成手段が、線形合同生成器または線形フィードバックシフトレジスタとして与えられることを特徴とする請求項1記載の擬似乱数生成装置。 2. The pseudo-random number generation device according to claim 1, wherein the pseudo-random number generation means is provided as a linear congruence generator or a linear feedback shift register. 第1の乱数を生成する第1の擬似乱数生成手段と、
第3の乱数を生成する第2の擬似乱数生成手段と、
第2の乱数の乱数パターンの種類数と同数の記憶要素から構成されて、それぞれの記憶要素には異なる乱数パターンが記憶される配列と、
少なくとも選定された第1のアドレスおよび第2のアドレスにより特定される2以上の記憶要素を対象として配列を撹拌するとともに、選定された第3のアドレスにより特定される記憶要素に記憶される数値を第2の乱数として出力する制御手段とを有して構成され、
第1のアドレス、第2のアドレスおよび第3のアドレスのなかの少なくとも1つのアドレスが、第1の乱数または第1の乱数に基づく演算値として与えられ、
第1のアドレスまたは第2のアドレスの少なくとも一方のアドレスが、第3の乱数または第3の乱数に基づく演算値として与えられることを特徴とする擬似乱数生成装置。
First pseudo random number generating means for generating a first random number;
Second pseudo-random number generation means for generating a third random number;
An array composed of the same number of storage elements as the number of types of random number patterns of the second random number, each storage element storing a different random number pattern;
The array is agitated for at least two or more storage elements specified by the selected first address and the second address, and a numerical value stored in the storage element specified by the selected third address is Control means for outputting as a second random number,
At least one of the first address, the second address, and the third address is provided as a first random number or an operation value based on the first random number;
A pseudo-random number generation device, wherein at least one of the first address and the second address is given as an operation value based on a third random number or a third random number.
制御手段が、第1の乱数の生成回数を第2の乱数の乱数パターンの種類数で除した剰余を算出し、
第1のアドレスが第3の乱数または第3の乱数に基づく演算値として与えられ、
第2のアドレスが前記剰余または前記剰余に基づく演算値として与えられ、
第3のアドレスが第1の乱数または第1の乱数に基づく演算値として与えられることを特徴とする請求項6記載の擬似乱数生成装置。
The control means calculates a remainder obtained by dividing the number of generations of the first random number by the number of types of random number patterns of the second random number,
The first address is given as a third random number or an arithmetic value based on the third random number,
A second address is given as the remainder or an arithmetic value based on the remainder;
The pseudo-random number generation device according to claim 6, wherein the third address is given as a first random number or an operation value based on the first random number.
請求項1記載の擬似乱数生成装置を有して構成され、
擬似乱数生成装置から出力される乱数系列と、平文を構成するデータ系列とに対して、ビット毎または所定数のビット列毎に、所定の論理演算を実行して、暗号文を構成するデータ系列を生成することを特徴とする暗号化装置。
The pseudorandom number generator according to claim 1 is provided.
A data sequence constituting the ciphertext is obtained by executing a predetermined logical operation for each bit or a predetermined number of bit strings on the random number sequence output from the pseudorandom number generator and the data sequence constituting the plaintext. An encryption device characterized by generating.
第1の乱数を生成する工程と、
第1の乱数の生成回数を第2の乱数の乱数パターンの種類数で除した剰余を算出する工程と、
第1のアドレスおよび第2のアドレスを選定する工程と、
第2の乱数の乱数パターンの種類数と同数の記憶要素から構成されて、それぞれの記憶要素には異なる乱数パターンが記憶される配列において、第1のアドレスにより特定される記憶要素に記憶される数値と第2のアドレスにより特定される記憶要素に記憶される数値とを交換する工程と、
第3のアドレスを選定する工程と、
配列において第3のアドレスにより特定される記憶要素に記憶される数値を第2の乱数として出力する工程とを有し、
第1のアドレス、第2のアドレスおよび第3のアドレスのなかの少なくとも1つのアドレスが、第1の乱数または第1の乱数の演算値として与えられ、
第1のアドレスまたは第2のアドレスの少なくとも一方のアドレスが、前記剰余または前記剰余の演算値として与えられることを特徴とする擬似乱数生成方法。
Generating a first random number;
Calculating a remainder obtained by dividing the number of generations of the first random number by the number of types of random number patterns of the second random number;
Selecting a first address and a second address;
It is composed of the same number of storage elements as the number of types of random number patterns of the second random number, and is stored in the storage element specified by the first address in an array in which different random number patterns are stored in each storage element. Exchanging the numerical value and the numerical value stored in the storage element specified by the second address;
Selecting a third address;
Outputting a numerical value stored in a storage element specified by a third address in the array as a second random number,
At least one of the first address, the second address, and the third address is given as a first random number or an operation value of the first random number;
A pseudo-random number generation method, wherein at least one of the first address and the second address is given as the remainder or the operation value of the remainder.
第1の乱数を生成するステップと、
第1の乱数の生成回数を第2の乱数の乱数パターンの種類数で除した剰余を算出するステップと、
第1のアドレスおよび第2のアドレスを、それぞれ第1の乱数または第1の乱数に基づく演算値あるいは前記剰余または前記剰余に基づく演算値として与えるステップと、
第2の乱数の乱数パターンの種類数と同数の記憶要素から構成されて、それぞれの記憶要素には異なる乱数パターンが記憶される配列において、第1のアドレスにより特定される記憶要素に記憶される数値と第2のアドレスにより特定される記憶要素に記憶される数値とを交換するステップと、
第3のアドレスを、第1の乱数または第1の乱数に基づく演算値あるいは前記剰余または前記剰余に基づく演算値として与えるステップと、
配列において第3のアドレスにより特定される記憶要素に記憶される数値を第2の乱数として出力するステップとを有することを特徴とする擬似乱数生成プログラム。


Generating a first random number;
Calculating a remainder obtained by dividing the number of generations of the first random number by the number of types of random number patterns of the second random number;
Providing the first address and the second address as a first random number or a calculated value based on the first random number, or the remainder or a calculated value based on the remainder, respectively;
It is composed of the same number of storage elements as the number of types of random number patterns of the second random number, and is stored in the storage element specified by the first address in an array in which different random number patterns are stored in each storage element. Exchanging the numerical value and the numerical value stored in the storage element specified by the second address;
Providing a third address as a first random number, a calculated value based on the first random number, or the remainder or a calculated value based on the remainder;
And a step of outputting a numerical value stored in a storage element specified by a third address in the array as a second random number.


JP2006116557A 2006-04-20 2006-04-20 Pseudorandom number generation device, pseudorandom number generation method, pseudorandom number generation program, encryption device, and decryption device Active JP4709685B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006116557A JP4709685B2 (en) 2006-04-20 2006-04-20 Pseudorandom number generation device, pseudorandom number generation method, pseudorandom number generation program, encryption device, and decryption device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006116557A JP4709685B2 (en) 2006-04-20 2006-04-20 Pseudorandom number generation device, pseudorandom number generation method, pseudorandom number generation program, encryption device, and decryption device

Publications (2)

Publication Number Publication Date
JP2007287079A true JP2007287079A (en) 2007-11-01
JP4709685B2 JP4709685B2 (en) 2011-06-22

Family

ID=38758767

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006116557A Active JP4709685B2 (en) 2006-04-20 2006-04-20 Pseudorandom number generation device, pseudorandom number generation method, pseudorandom number generation program, encryption device, and decryption device

Country Status (1)

Country Link
JP (1) JP4709685B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008177654A (en) * 2007-01-16 2008-07-31 Sony Corp Data processor, data processing method, and computer program
JP2013161482A (en) * 2012-02-06 2013-08-19 Arm Ltd Apparatus and method for controlling refreshing of data in dram
KR101630791B1 (en) * 2015-03-27 2016-06-16 황순영 Method of generating true random number from pseudo random number and computer readable medium
JP2019053556A (en) * 2017-09-15 2019-04-04 株式会社エヌ・ティ・ティ・データ Data generation device, data generation method, and program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62296183A (en) * 1986-06-17 1987-12-23 松下電器産業株式会社 Data jamming apparatus
JPH10303882A (en) * 1997-04-24 1998-11-13 Fuji Xerox Co Ltd Enciphering method
JP2005149412A (en) * 2003-11-19 2005-06-09 Toshiba Corp Memory shuffling device, memory shuffling method and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62296183A (en) * 1986-06-17 1987-12-23 松下電器産業株式会社 Data jamming apparatus
JPH10303882A (en) * 1997-04-24 1998-11-13 Fuji Xerox Co Ltd Enciphering method
JP2005149412A (en) * 2003-11-19 2005-06-09 Toshiba Corp Memory shuffling device, memory shuffling method and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008177654A (en) * 2007-01-16 2008-07-31 Sony Corp Data processor, data processing method, and computer program
JP2013161482A (en) * 2012-02-06 2013-08-19 Arm Ltd Apparatus and method for controlling refreshing of data in dram
KR101630791B1 (en) * 2015-03-27 2016-06-16 황순영 Method of generating true random number from pseudo random number and computer readable medium
JP2019053556A (en) * 2017-09-15 2019-04-04 株式会社エヌ・ティ・ティ・データ Data generation device, data generation method, and program
JP6991025B2 (en) 2017-09-15 2022-01-12 株式会社エヌ・ティ・ティ・データ Data generator, data generation method, and program

Also Published As

Publication number Publication date
JP4709685B2 (en) 2011-06-22

Similar Documents

Publication Publication Date Title
JP4828068B2 (en) Computer efficient linear feedback shift register
Kocarev et al. Pseudorandom bits generated by chaotic maps
JP5911654B2 (en) Random number generator and stream cipher
JP4774509B2 (en) Pseudo random number generation system
US7280659B2 (en) Pseudorandom number generating apparatus or encryption or decryption apparatus using the same
US20050097153A1 (en) Pseudorandom number generator
WO2009100104A1 (en) Cryptographic system incorporating a digitally generated chaotic numerical sequence
JP2005215688A (en) Hardware encryption/decryption apparatus using s-box operation, and method for the same
JPWO2004032098A1 (en) Pseudorandom number generation method and pseudorandom number generator
US7480687B2 (en) Pseudorandom number generator for a stream cipher
JP4709685B2 (en) Pseudorandom number generation device, pseudorandom number generation method, pseudorandom number generation program, encryption device, and decryption device
KR20090031505A (en) Method and device for generating a pseudorandom string
JP5188414B2 (en) Information processing apparatus, information processing method, and program
Moghadam et al. Designing a random number generator with novel parallel LFSR substructure for key stream ciphers
JP4857230B2 (en) Pseudorandom number generator and encryption processing device using the same
Easttom Random Number Generators
JP5207153B2 (en) Pseudo random number generation system
JP5268011B2 (en) Encryption system and decryption system
Lee et al. Uniform random number generator using leap-ahead LFSR architecture
KR20130014003A (en) Non-linear binary random number generator using feedback carry shift register
JP5268010B2 (en) Encryption system and decryption system
Ziani et al. CFA: A New Family of Hybrid CA-Based PRNGs
Abubaker Probabilistic, lightweight cryptosystems based on finite automata
Ziani et al. Research Article CFA: A New Family of Hybrid CA-Based PRNGs
Ghosh The Improvement of Period of Pseudo Random Number Sequence: an Algebraic Approach

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090129

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100914

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101101

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110222

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110318

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250