JP5268741B2 - Pseudorandom number generator, pseudorandom number generation method, and pseudorandom number generation program - Google Patents
Pseudorandom number generator, pseudorandom number generation method, and pseudorandom number generation program Download PDFInfo
- Publication number
- JP5268741B2 JP5268741B2 JP2009081847A JP2009081847A JP5268741B2 JP 5268741 B2 JP5268741 B2 JP 5268741B2 JP 2009081847 A JP2009081847 A JP 2009081847A JP 2009081847 A JP2009081847 A JP 2009081847A JP 5268741 B2 JP5268741 B2 JP 5268741B2
- Authority
- JP
- Japan
- Prior art keywords
- mapping
- calculation
- initial
- pseudo
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
この発明は、変形テント関数を用いて擬似乱数生成を行う擬似乱数生成器、またその擬似乱数生成方法及び擬似乱数生成プログラムに関するものである。 The present invention relates to a pseudo-random number generator that performs pseudo-random number generation using a modified tent function, a pseudo-random number generation method thereof, and a pseudo-random number generation program.
従来のテント型写像を用いた乱数の生成においては、内部パラメータの変動を写像計算の都度に行うことにより軌道の拡散を図っている(特許文献1参照)。しかしながら、この手法によると、内部パラメータの変動処理が写像計算の都度に発生し、処理が複雑化し時間を要するものであった。また、乱数として使用できる部分は写像値の下位側ビットに限られるという問題があった。 In the generation of random numbers using a conventional tent type map, the trajectory is diffused by changing the internal parameters every time the map calculation is performed (see Patent Document 1). However, according to this method, the internal parameter variation process occurs every time the mapping calculation is performed, which complicates the process and requires time. Further, there is a problem that the portion that can be used as a random number is limited to the lower-order bits of the mapping value.
また、平文を初期値X0としX0を変形テント写像を用いて写像し暗号文Y を生成する一方、復号は逆写像し暗号文Y を平文X0に戻すという暗号化及び復号手法も知られている。この暗号化及び復号においては、鍵A から副鍵ANを複数生成し、写像(N) 毎に異なる副鍵ANを入力することでスライド攻撃に強い暗号方式を提供するものである(特許文献2参照)。この技術は、暗号化と復号を行うものであり、擬似乱数そのものを生成する手法ではなく、生成した擬似乱数により暗号化を行うものではない。 Also known is an encryption and decryption method in which plaintext is an initial value X0 and X0 is mapped using a modified tent mapping to generate ciphertext Y, while decryption is reverse mapped and ciphertext Y is returned to plaintext X0. . In this encryption and decryption, a plurality of sub-keys AN are generated from the key A and a different sub-key AN is input for each mapping (N) to provide an encryption method that is resistant to slide attacks (Patent Document 2). reference). This technique performs encryption and decryption, and is not a technique for generating a pseudo-random number itself, and does not perform encryption using the generated pseudo-random number.
更に、変形テント関数を用い、固定演算化したカオスの系から乱数値を抽出するものも知られている。この手法においては、周期の検出機構を設け、周期検出後に副鍵を用いるものである(特許文献3参照)。このものでは、カオスのシステムはどれでもよいとされているが、特に連続系のカオス(微分方程式系)での例が示されており、微分方程式系では一般的に乱数生成に時間がかかる問題がある。また、長い乱数値を抽出する場合には、その分、副鍵が複数個必要となることが予想され、鍵の管理が煩雑になるという問題がある。 Furthermore, there is also known a method of extracting a random value from a chaos system obtained by a fixed operation using a modified tent function. In this method, a period detection mechanism is provided, and a sub key is used after period detection (see Patent Document 3). In this case, any system of chaos can be used, but an example of continuous chaos (differential equation system) is shown. In general, the differential equation system takes time to generate random numbers. There is. Also, when extracting a long random number value, it is expected that a plurality of subkeys will be required, and there is a problem that key management becomes complicated.
本発明は、上記のような擬似乱数生成における問題に鑑みなされたもので、その目的は、構成が簡易でありながら内部パラメータの頻繁な変動なしに長周期の擬似乱数を得ることができ、また、生成が短時間で可能な擬似乱数生成器を提供することである。また、このような擬似乱数の生成を行う擬似乱数生成方法と擬似乱数生成プログラムを提供することを他の目的とする。 The present invention has been made in view of the above-described problems in pseudo-random number generation, and the object thereof is to obtain a long-period pseudo-random number without a frequent change in internal parameters while having a simple configuration. It is to provide a pseudo-random number generator that can be generated in a short time. Another object of the present invention is to provide a pseudo-random number generation method and a pseudo-random number generation program for generating such pseudo-random numbers.
本発明に係る擬似乱数生成器は、初期パラメータ及び写像初期値を準備する初期値準備手段と、初回は前記初期パラメータと前記写像初期値を変形テント関数に適用し写像計算を行い、2回目以降は前記初期パラメータ或いは他のパラメータと前回求められた写像値を前記変形テント関数に適用し写像計算を行う写像計算手段と、前記写像計算手段により得られた写像値から所定ビットを抽出して擬似乱数とするビット抽出手段と、前記写像計算手段により得られる写像値と前記写像初期値との比較結果に基づき、前記写像計算手段が用いる他のパラメータを作成更新するパラメータ作成更新手段と、擬似乱数生成の終了条件情報に基づき終了時の判定を行い、前記写像計算手段による次の計算への進行と、前記ビット抽出手段と前記パラメータ作成更新手段による次処理への進行とを制御する制御手段とを具備することを特徴とする。 The pseudorandom number generator according to the present invention comprises initial value preparation means for preparing initial parameters and mapping initial values, and first time applies the initial parameters and the mapping initial values to the modified tent function to perform mapping calculation, and subsequent times Applies the initial parameter or other parameters and the previously obtained mapping value to the modified tent function to perform mapping calculation, and extracts a predetermined bit from the mapping value obtained by the mapping calculation means to simulate A bit extraction means for making a random number, a parameter creation updating means for creating and updating other parameters used by the mapping calculation means based on a comparison result between the mapping value obtained by the mapping calculation means and the mapping initial value, and a pseudo-random number Based on the generation end condition information, a determination is made at the end, the progress to the next calculation by the mapping calculation means, the bit extraction means and the parameter Characterized by comprising a control means for controlling the progression to the next process by the data creation updating means.
本発明に係る擬似乱数生成器では、写像計算手段は、複数のテント関数により写像計算を行うものであり、初期値準備手段は、シード情報を準備するものであり、前記シード情報に基づき写像計算手段が用いるテント関数の切り換えを指示する切換指示手段を具備することを特徴とする。 In the pseudorandom number generator according to the present invention, the mapping calculation means performs mapping calculation by a plurality of tent functions, and the initial value preparation means prepares seed information, and mapping calculation is performed based on the seed information. It is characterized by comprising switching instruction means for instructing switching of a tent function used by the means.
本発明に係る擬似乱数生成器では、ビット抽出手段は、シード情報に基づき写像値から所定ビットを抽出する範囲を決定し、パラメータ作成更新手段は、シード情報に基づきパラメータの作成更新を行うことを特徴とする。 In the pseudo random number generator according to the present invention, the bit extraction unit determines a range for extracting a predetermined bit from the mapping value based on the seed information, and the parameter creation update unit performs parameter creation update based on the seed information. Features.
本発明に係る擬似乱数生成方法は、初期パラメータ及び写像初期値を準備する初期値準備ステップと、初回は前記初期パラメータと前記写像初期値を変形テント関数に適用し写像計算を行い、2回目以降は前記初期パラメータ或いは他のパラメータと前回求められた写像値を前記変形テント関数に適用し写像計算を行う写像計算ステップと、前記写像計算ステップにより得られた写像値から所定ビットを抽出して擬似乱数とするビット抽出ステップと、前記写像計算ステップにより得られる写像値と前記写像初期値との比較結果に基づき、前記写像計算ステップにおいて用いられる他のパラメータを作成更新するパラメータ作成更新ステップと、擬似乱数生成の終了条件情報に基づき終了時の判定を行い、前記写像計算ステップによる次の計算への進行と、前記ビット抽出ステップと前記パラメータ作成更新ステップによる次処理への進行とを制御する制御ステップとを具備することを特徴とする。 The pseudorandom number generation method according to the present invention includes an initial value preparation step of preparing an initial parameter and a mapping initial value, and a mapping calculation is performed by applying the initial parameter and the mapping initial value to a modified tent function for the first time and subsequent times. Applies the initial parameter or other parameters and the previously obtained mapping value to the modified tent function to perform a mapping calculation, extracts a predetermined bit from the mapping value obtained by the mapping calculation step, and simulates A random number bit extraction step, a parameter creation update step for creating and updating other parameters used in the mapping calculation step based on a comparison result between the mapping value obtained by the mapping calculation step and the mapping initial value, Based on the end condition information of random number generation, the end time is determined, and the following calculation is performed by the mapping calculation step. And progression to, characterized by comprising a control step of controlling the progression to the next process by the parameter generation updating step and said bit extraction step.
本発明に係る擬似乱数生成方法は、写像計算ステップでは、複数のテント関数により写像計算を行い、初期値準備ステップでは、シード情報を準備し、前記シード情報に基づき写像計算ステップが用いるテント関数の切り換えを指示する切換指示ステップを具備することを特徴とする。 The pseudorandom number generation method according to the present invention performs mapping calculation using a plurality of tent functions in the mapping calculation step, prepares seed information in the initial value preparation step, and uses the tent function used by the mapping calculation step based on the seed information. A switching instruction step for instructing switching is provided.
本発明に係る擬似乱数生成方法は、ビット抽出ステップでは、シード情報に基づき写像値から所定ビットを抽出する範囲を決定し、パラメータ作成更新ステップでは、シード情報に基づきパラメータの作成更新を行うことを特徴とする。 In the pseudorandom number generation method according to the present invention, in the bit extraction step, a range for extracting a predetermined bit from the mapping value is determined based on the seed information, and in the parameter creation update step, the parameter creation / update is performed based on the seed information. Features.
本発明に係る擬似乱数生成プログラムは、演算により擬似乱数を生成するコンピュータを、初期パラメータ及び写像初期値を準備する初期値準備手段、初回は前記初期パラメータと前記写像初期値を変形テント関数に適用し写像計算を行い、2回目以降は前記初期パラメータ或いは他のパラメータと前回求められた写像値を前記変形テント関数に適用し写像計算を行う写像計算手段、前記写像計算手段により得られた写像値から所定ビットを抽出して擬似乱数とするビット抽出手段、前記写像計算手段により得られる写像値と前記写像初期値との比較結果に基づき、前記写像計算手段が用いる他のパラメータを作成更新するパラメータ作成更新手段と、擬似乱数生成の終了条件情報に基づき終了時の判定を行い、前記写像計算手段による次の計算への進行と、前記ビット抽出手段と前記パラメータ作成更新手段による次処理への進行とを制御する制御手段として機能させる特徴とする。 The pseudorandom number generation program according to the present invention is a computer for generating pseudorandom numbers by calculation, initial value preparing means for preparing initial parameters and mapping initial values, and applying the initial parameters and the mapping initial values to the modified tent function for the first time. A mapping calculation means for performing a mapping calculation, and for the second and subsequent times, a mapping calculation means for performing a mapping calculation by applying the initial parameter or other parameters and a previously determined mapping value to the modified tent function, and a mapping value obtained by the mapping calculation means A bit extracting means for extracting a predetermined bit from a pseudo random number, a parameter for creating and updating other parameters used by the mapping calculation means based on a comparison result between the mapping value obtained by the mapping calculation means and the mapping initial value Based on the creation update means and the end condition information of pseudo-random number generation, determination at the end is performed, and the mapping calculation means And progression to calculate, characterized to function as control means for controlling the progression to the next process by the parameter generation updating means and said bit extraction means.
本発明に係る擬似乱数生成プログラムでは、コンピュータを写像計算手段として、複数のテント関数により写像計算を行うように機能させ、コンピュータを初期値準備手段として、シード情報を準備するように機能させ、コンピュータを、前記シード情報に基づき写像計算手段が用いるテント関数の切り換えを指示する切換指示手段として機能させることを特徴とする。 In the pseudorandom number generation program according to the present invention, the computer functions as a mapping calculation means to perform mapping calculation by a plurality of tent functions, and the computer functions as an initial value preparation means to prepare seed information. Are operated as switching instruction means for instructing switching of the tent function used by the mapping calculation means based on the seed information.
本発明に係る擬似乱数生成プログラムでは、コンピュータをビット抽出手段として、シード情報に基づき写像値から所定ビットを抽出する範囲を決定するように機能させ、コンピュータをパラメータ作成更新手段として、シード情報に基づきパラメータの作成更新を行うように機能させることを特徴とする。 In the pseudo-random number generation program according to the present invention, the computer functions as a bit extraction unit to determine a range for extracting a predetermined bit from the mapping value based on the seed information, and the computer functions as a parameter creation update unit based on the seed information. It is characterized by functioning to create and update parameters.
本発明によれば、変形テント関数を用いているため、写像計算毎に内部パラメータを変動させる必要がなく乱数生成を高速化することができるばかりでなく、ビット信号が一様にランダム化されており、所定ビットを抽出して擬似乱数を得ることができる。しかも、写像値と写像初期値との比較結果に基づき、写像計算手段が用いる他のパラメータを作成更新するので、パラメータ変更してランダム化された擬似乱数生成を続けることができる。 According to the present invention, since the modified tent function is used, it is not necessary to change the internal parameter for each mapping calculation, so that the random number generation can be speeded up, and the bit signal is uniformly randomized. In addition, a pseudo random number can be obtained by extracting predetermined bits. In addition, since other parameters used by the mapping calculation means are created and updated based on the comparison result between the mapping value and the mapping initial value, pseudorandom numbers generated by changing the parameters can be continued.
また、本発明によれば、シード情報に基づき写像計算手段が用いるテント関数を切り換えるので、テント関数の切り換えによって生成される擬似乱数のランダム化を図ることが可能である。更に、本発明によれば、シード情報に基づき写像値から所定ビットを抽出する範囲を決定するので、写像計算によりビット信号が一様にランダム化されて写像値について抽出によって更なるランダム化を図ることができる利点がある。 Further, according to the present invention, since the tent function used by the mapping calculation means is switched based on the seed information, it is possible to randomize the pseudo random number generated by switching the tent function. Furthermore, according to the present invention, since a range for extracting a predetermined bit from the mapping value is determined based on the seed information, the bit signal is uniformly randomized by mapping calculation, and further randomization is achieved by extracting the mapping value. There are advantages that can be made.
以下添付図面を参照して本発明に係る擬似乱数生成器、擬似乱数生成方法及び擬似乱数生成プログラムについて、それぞれの実施例を説明する。各図において、同一の構成要素には同一の符号を付して重複する説明を省略する。第1の実施例に係る擬似乱数生成器は、図1に示されるように、初期値準備手段10、写像計算手段20、ビット抽出手段30、ビット列記憶部40、パラメータ作成更新手段50、切換指示手段60、制御手段70を備える。
Embodiments of a pseudo random number generator, a pseudo random number generation method, and a pseudo random number generation program according to the present invention will be described below with reference to the accompanying drawings. In each figure, the same components are denoted by the same reference numerals, and redundant description is omitted. As shown in FIG. 1, the pseudo-random number generator according to the first embodiment includes an initial
初期値準備手段10は、シード情報Seed、ランダムビット長n、写像関数選択情報k0〜km-1、初期パラメータP及び写像初期値X0を準備するものである。シード情報Seedは、mビットの情報であり、例えばユーザによりランダムビット長nと共にキー入力等されるものである。写像関数選択情報k0〜km-1は、切換指示手段60により用いられる情報であり、ここで各ビットkjは、シード情報Seedを用いた任意の演算などの数値処理により得られる結果値を、更にmビットに変更した数値列中ビットであって、先頭からj番目のビットを意味する。 The initial value preparation means 10 prepares seed information Seed, a random bit length n, mapping function selection information k 0 to km −1 , an initial parameter P, and a mapping initial value X 0 . The seed information Seed is m-bit information, and is input by the user with a random bit length n, for example. The mapping function selection information k 0 to km −1 is information used by the switching instruction means 60, and each bit k j is a result value obtained by numerical processing such as an arbitrary calculation using the seed information Seed. Represents the jth bit from the beginning, which is a bit in the numerical sequence further changed to m bits.
写像初期値X0は、mビットのシードSeedを用いた任意の演算などの数値処理により得られる結果値を、指定可能な範囲内(1≦X0≦2L−1)に適応選択した値である。例えば、mod (2L−1)+1の計算後の値を採用することができる。また、初期パラメータPは、mビットのシードSeedを用いた任意の演算などの数値処理による得られる結果値を、指定可能な範囲内(1≦X0≦2L−1)に適応選択した値である。例えば、mod (2L−1)+1の計算後の値を採用することができる。上記のLは、写像計算手段20における演算精度がLビットであり、後述する変形テント関数の係数MがM=2Lであることに起因する数値である。そして、(2L−1)は、0〜2Lには整数値(0を含む)が(2L+1)個存在するから、この内の両端の数値である0と2Lとを除いて(2L−1)個となることを意味している。この両端の数値を除く意味は、後に説明する写像関数において、左右いずれかの写像関数の傾きが無限大となる場合を除くためのものである。 The mapping initial value X 0 is a value obtained by adaptively selecting a result value obtained by numerical processing such as an arbitrary calculation using an m-bit seed Seed within a specifiable range (1 ≦ X 0 ≦ 2 L −1). It is. For example, a value after calculation of mod (2 L −1) +1 can be adopted. The initial parameter P is a value obtained by adaptively selecting a result value obtained by numerical processing such as an arbitrary calculation using an m-bit seed Seed within a specifiable range (1 ≦ X 0 ≦ 2 L −1). It is. For example, a value after calculation of mod (2 L −1) +1 can be adopted. The above L is a numerical value resulting from the fact that the calculation accuracy in the mapping calculation means 20 is L bits and the coefficient M of the modified tent function described later is M = 2 L. Then, (2 L -1) is the 0 to 2 L from an integer value (including 0) (2 L +1) number exists, except 0 and the 2 L is a value at the end of this This means that it is (2 L −1). The meaning of excluding the numerical values at both ends is to exclude the case where the slope of one of the left and right mapping functions is infinite in the mapping function described later.
写像計算手段20は、初回は初期値準備手段10により準備された初期パラメータと写像初期値を変形テント関数に適用し写像計算を行い、2回目以降は初期パラメータ或いは他のパラメータと前回求められた写像値を変形テント関数に適用し写像計算を行うものである。 The mapping calculation means 20 applies the initial parameter prepared by the initial value preparation means 10 and the mapping initial value to the modified tent function for the first time to perform mapping calculation, and for the second and subsequent times, the initial parameter or other parameters were previously obtained. The mapping value is applied to the modified tent function to perform mapping calculation.
本実施例の写像計算手段20は、複数のテント関数により写像計算を行うものである。ここでは、図2(a)と図2(b)に示す2通りの変形テント関数F1、F2により写像計算を行うものであり、図2(a)の変形テント関数F1による変形テント写像の整数演算化式は次の式(1)に示すようであり、また、図2(b)の変形テント関数F2による変形テント写像の整数演算化式は次の式(2)に示すようである。 The mapping calculation means 20 of this embodiment performs mapping calculation using a plurality of tent functions. Here, mapping calculation is performed using the two modified tent functions F1 and F2 shown in FIGS. 2A and 2B, and an integer of the modified tent mapping by the modified tent function F1 in FIG. 2A. The arithmetic expression is as shown in the following expression (1), and the integer arithmetic expression of the modified tent mapping by the modified tent function F2 in FIG. 2B is as shown in the following expression (2).
切換指示手段60は、シード情報Seedに基づき写像計算手段20が用いるテント関数の切り換えを指示するものである。前述の通り、初期値準備手段10は、シード情報Seedから写像関数選択情報k0〜km-1を得ており、この写像関数選択情報k0〜km-1が「1」か「0」かによって、式(1)と式(2)とのいずれか一方を選択する指示を与える。
The switching instruction means 60 instructs the switching of the tent function used by the mapping calculation means 20 based on the seed information Seed. As described above, the initial
ビット抽出手段30は、写像計算手段20により得られた写像値から所定ビットを抽出して擬似乱数とするものである。ビット抽出手段30は、シード情報Seedに基づき写像値から所定ビットを抽出する範囲を決定して、抽出を行う。つまり、写像計算手段20により得られた写像値がLビット長であるとき、Lビット長から抽出するビット数qをシード情報Seedに基づき決定し、また、Lビット中のどのビットを抽出してqビットとするかを決定する。抽出したビットは、バッファを備えるビット列記憶部40に記憶する。記憶は、例えばビット列記憶部40の先頭側から記憶する。
The
ビット列記憶部40は、バッファからビット列を出力する機能を備えており、予め定められたタイミングに出力処理を行う。具体例としては、バッファが満杯になったときに出力を行う。この場合には、出力後にバッファをクリアし、バッファが満杯になったときに記憶できずに残ったビットをビット列記憶部40の先頭側から記憶し、以降同じ処理を繰り返す。
The bit
パラメータ作成更新手段50は、上記写像計算手段20により得られる写像値Xiと上記写像初期値X0との比較結果に基づき、写像計算手段20が用いる他のパラメータを作成更新するものである。写像初期値X0は初期値準備手段10により送られるので、これをレジスタmemに記憶しておき、上記写像計算手段20により、シード情報Seedのビット長mと同じm回目の写像値Xiが計算されたときに、当該計算されたm回目の写像値Xiが写像初期値X0と一致しているかを検出し、一致している場合に他のパラメータを作成更新する。 The parameter creation / updating means 50 creates and updates other parameters used by the mapping calculation means 20 based on the comparison result between the mapping value X i obtained by the mapping calculation means 20 and the mapping initial value X 0 . Since the mapping initial value X 0 is sent by the initial value preparation means 10, it is stored in the register mem, and the mapping calculation means 20 determines the m-th mapping value X i that is the same as the bit length m of the seed information Seed. When it is calculated, it is detected whether or not the calculated m-th mapping value X i matches the mapping initial value X 0, and if they match, other parameters are created and updated.
具体的には、次の関数h(P,Seed)により他のパラメータを作成更新する。
h(P,Seed)=(P+r(Seed))mod(2L−1)+1
上記において、r(Seed)は、シード情報Seedを用いた任意の演算などの数値処理により得られる結果値を示す。
Specifically, other parameters are created and updated by the following function h (P, Seed).
h (P, Seed) = (P + r (Seed)) mod (2 L −1) +1
In the above, r (Seed) indicates a result value obtained by numerical processing such as an arbitrary calculation using the seed information Seed.
制御手段70は、擬似乱数生成の終了条件情報に基づき終了時の判定を行い、上記写像計算手段20による次の計算への進行と、上記ビット抽出手段30と上記パラメータ作成更新手段50による次処理への進行とを制御するものである。具体的には、ビット抽出手段30により抽出されたビットの総ビット数が、予め設定された所望擬似乱数のランダムビット長nとなったかを検出し、ランダムビット長nとなっていなければ、次の写像計算等を行わせる一方、ランダムビット長nとなっている場合には、各手段による処理を終了させる。 The control means 70 makes a determination at the end based on the end condition information of the pseudo-random number generation, proceeds to the next calculation by the mapping calculation means 20, and the next processing by the bit extraction means 30 and the parameter creation update means 50 To control the progress to. Specifically, it is detected whether the total number of bits extracted by the bit extraction means 30 has reached the random bit length n of a desired pseudorandom number set in advance. On the other hand, if the random bit length is n, the processing by each means is terminated.
以上の通りに構成された擬似乱数生成器は、例えば、図3に示されるようなコンピュータシステムにより実現される。コンピュータシステムは、CPU1がバス2を介して主メモリ3、入力装置4、出力装置5、外部記憶装置6に接続された構成を有し、主メモリ3には擬似乱数生成プログラムPRGが記憶されている。
The pseudo-random number generator configured as described above is realized by, for example, a computer system as shown in FIG. The computer system has a configuration in which a
上記のCPU1が、図4に示されるフローチャートに対応する擬似乱数生成プログラムPRGを実行することにより図1の各手段が実現されるので、このフローチャートを参照して擬似乱数生成方法の処理を説明する。ここでは、シード情報Seedとランダムビット長nが例えば入力装置4などの外部により与えられるものとしてあるが、擬似乱数生成プログラムPRGに含まれているようにしても良い。
The above-described
CPU1は、擬似乱数生成プログラムPRGによる動作を開始し、初期値準備処理を行う(S11)。初期値準備処理S11では、シード情報Seedを用いて、写像関数選択情報k0〜km-1、初期パラメータP及び写像初期値X0を準備する。ここでは、図5に示す処理プログラムのように、シード情報Seedをそのまま写像関数選択情報k0〜km-1、初期パラメータP及び写像初期値X0として保持し、また、ランダムビット長nも保持する。更に、写像初期値X0は、レジスタmemに保持する一方、写像回数iをリセットして0とする。
The
次に、CPU1は、カウントアップを行う(S12)。このカウントアップは、写像回数iのカウントアップであり、「i←i+1」という処理である。次にCPU1は、関数切換・写像計算処理を行う(S13)。この関数切換・写像計算処理は、切換指示手段60と写像計算手段20による処理であり、詳細には、前段では、図6のフローチャートに示されるように、写像関数選択情報kjを参照し、この写像関数選択情報kjが0であるか1であるかに応じて(S21)、前述の式(1)と式(2)とのいずれか一方を整数演算化式として選択する(S22、S23)。これを処理プログラムとして示すと、図7のように表すことができる。上記処理より後段では、選択した上記整数演算化式により写像値Xiを計算する。
Next, the
次に、CPU1は、ビット抽出処理を行う(S14)。ビット抽出処理では、具体的には、次の3例を挙げることができる。第1例の関数は、
bs〜bs+q=g1(Xi,Xi+1,Seed)と表すことができ、
qは1回の抽出ビット数(任意)を示し、sは抽出した総ビット数を示し、処理後において「s=s+q」となる。g1(Xi,Xi+1,Seed)の具体的内容は図8に示すC言語によるプログラムにより表すことができる。図8の右に、記号の内容を示す。
Next, the
b s to b s + q = g1 (X i , X i + 1 , Seed),
q indicates the number of extracted bits at one time (arbitrary), s indicates the total number of extracted bits, and “s = s + q” after processing. The specific contents of g1 (X i , X i + 1 , Seed) can be expressed by a program in C language shown in FIG. The contents of the symbols are shown on the right side of FIG.
具体例により説明すると、図9に示すように計算された第1回目から第3回目までの写像値Xiを2進数で示すと、X1、X2、X3の右辺のようであり、対応するシード情報対応の写像関数選択情報kjが(k1,k2,k3)=(1,1,0)であるとすると、kjが0の写像値X3をビット反転させて/X3を得る。そして、X1、X2、/X3のそれぞれについて、後に得られた写像値Xi+1(もしくは、/Xi+1)におけるビットが1となっているビット位置に対応して、先に得られた写像値Xi(もしくは、/Xi)のビット値を取り出す。 To explain the specific examples, indicating a mapping value X i to the third binary number from the first calculated as shown in FIG. 9, is like the right side of X 1, X 2, X 3, If the mapping function selection information k j corresponding to the corresponding seed information is (k 1 , k 2 , k 3 ) = ( 1 , 1 , 0), the mapping value X 3 where k j is 0 is bit-inverted. / get the X 3. For each of X 1 , X 2 , and / X 3 , corresponding to the bit position where the bit in the mapping value X i + 1 (or / X i + 1 ) obtained later is 1, The bit value of the mapping value X i (or / X i ) obtained in the above is extracted.
以上の結果、図9において丸にて囲われたビット値が取り出され、バッファにBUFのように、{1,0,1,0,0,1,1,0,0,・・・}が保持される。 As a result, the bit value circled in FIG. 9 is extracted, and {1,0,1,0,0,1,1,0,0,...} Is stored in the buffer like BUF. Retained.
第2例の関数は、
bi=g2(Xi,Xi+1,Seed)と表すことができ、
g2(Xi,Xi+1,Seed)の具体的内容は図10に示すC言語によるプログラムにより表すことができる。図10の右に、記号の内容を示す。
The function of the second example is
b i = g2 (X i , X i + 1 , Seed)
The specific contents of g2 (X i , X i + 1 , Seed) can be expressed by a program in C language shown in FIG. The contents of the symbols are shown on the right side of FIG.
具体例により説明すると、図9と途中までは等しく、図11に示すように計算された第1回目から第3回目までの写像値Xiを2進数で示すと、X1、X2、X3の右辺のようであり、対応するシード情報対応の写像関数選択情報kjが(k1,k2,k3)=(1,1,0)であるとすると、kjが0の写像値X3をビット反転させて/X3を得る。そして、X1、X2、/X3のそれぞれについて、後に得られた写像値Xi+1(もしくは、/Xi+1)におけるビットが1となっているビット位置に対応して、先に得られた写像値Xi(もしくは、/Xi)のビット値を取り出す。 To explain with a specific example, it is the same as that in FIG. 9, and the mapping values X i calculated from the first time to the third time as shown in FIG. 11 are expressed in binary numbers as X 1 , X 2 , X If the mapping function selection information k j corresponding to the corresponding seed information is (k 1 , k 2 , k 3 ) = ( 1 , 1 , 0), the mapping is such that k j is 0. The value X 3 is bit-inverted to obtain / X 3 . For each of X 1 , X 2 , and / X 3 , corresponding to the bit position where the bit in the mapping value X i + 1 (or / X i + 1 ) obtained later is 1, The bit value of the mapping value X i (or / X i ) obtained in the above is extracted.
以上の結果、図9と同様に図11において丸にて囲われたビット値が取り出されるわけであるが、この後に各写像値単位で、排他的論理和演算を行って、X1に対して1を抽出し、X2に対して0を抽出する。
As a result of the above, the bit values circled in FIG. 11 are extracted as in FIG. 9, but after this, an exclusive OR operation is performed for each mapping value unit, and X 1 is calculated.
第3例の関数は、
bi=g3(Xi,Seed)と表すことができ、
g3(Xi,Seed)の具体的内容は図12に示すC言語によるプログラムにより表すことができる。図12の右に、記号の内容を示す。
The function of the third example is
b i = g3 (X i , Seed)
The specific contents of g3 (X i , Seed) can be expressed by a program in C language shown in FIG. The contents of the symbols are shown on the right side of FIG.
具体例により説明すると、図13に示すようにシード情報対応の写像関数選択情報kjが{1,1,0,0,1,1,・・・}であるとすると、1の場合にシフト量が2増加されて{2,4,4,4,6,0(8),・・・}とシフト量が計算される。第i回目の写像値Xiを2進数で示すと、X1={1,0,1,0,0,1,1,0,0}であると、上記計算されたシフト量の右シフトが行われる。kjのシフト量が6であると、シフトX1は{0,0,0,0,0,0,1,0,1}となり、これと1の論理積を作成してビットとする。 More specifically, assuming that mapping function selection information k j corresponding to seed information is {1, 1, 0, 0, 1, 1,...} As shown in FIG. The amount is increased by 2, and the shift amount is calculated as {2, 4, 4, 4, 6, 0 (8),. When the i-th mapping value X i is represented by a binary number, if X 1 = { 1, 0, 1, 0, 0, 1 , 1, 0, 0}, a right shift of the calculated shift amount. Is done. If the shift amount of k j is 6, the shift X 1 becomes {0, 0, 0, 0, 0, 0, 1, 0, 1}.
図14(a)は、写像関数選択情報kjが1の場合にシフト量が2増加される場合を示し、図14(b)は、写像関数選択情報kjでは2ビット(例えば、kjとkj+1)を用いて、これらが00の場合にシフト量が0増加され、これらが01の場合にシフト量が3増加され、これらが10の場合にシフト量が9増加され、これらが11の場合にシフト量が0増加される場合を示している。 FIG. 14 (a) shows a case where the shift amount is increased 2 when the mapping function selection information k j is 1, FIG. 14 (b), the mapping function selection information k j in 2 bits (e.g., k j And k j + 1 ), the shift amount is increased by 0 when they are 00, the shift amount is increased by 3 when they are 01, and the shift amount is increased by 9 when they are 10. This shows a case where the shift amount is increased by 0 when.
ここでは、シフトして巡回シフト(ローテイト)を用いるため、シフト量7以上を許容しても、巡回シフト結果値において全ビットが0の値となることはない。例えば図14(a)に対応した処理にて、シフト量が3の場合には巡回シフトにより図14(c)のようにシフト結果値が得られ、この結果値において最下位(最右)の1ビットを抽出することで、ステップS14におけるビット抽出処理を完了するように構成することもできる。 Here, since cyclic shift (rotate) is used by shifting, even if a shift amount of 7 or more is allowed, all bits in the cyclic shift result value do not become zero. For example, in the processing corresponding to FIG. 14A, when the shift amount is 3, a shift result value is obtained as shown in FIG. 14C by cyclic shift, and the lowest (rightmost) result value is obtained. By extracting one bit, the bit extraction process in step S14 can be completed.
本発明では、変形テント写像を用いることで写像値の全桁が乱数値として利用可能となるため、写像値ビット桁の抽出位置を任意選択でき、自由度を広く活用できるという特徴がある。こうした特徴を活かす手法として、本実施例では、ビット抽出処理においてシード情報対応の写像関数選択情報を参照することで、ユーザがランダムビット生成パターンを自在に変更可能な機構が提供できるように構成している。 In the present invention, since all the digits of the mapping value can be used as random numbers by using the modified tent mapping, the extraction position of the mapping value bit digit can be arbitrarily selected, and the degree of freedom can be widely utilized. As a technique that makes use of these features, this embodiment is configured to provide a mechanism that allows the user to freely change the random bit generation pattern by referring to the mapping function selection information corresponding to the seed information in the bit extraction process. ing.
更に、初期値設定で用いるシード情報Seedと別シード情報をビット抽出処理に利用することで、ユーザはランダムビット列のパターンをバリエーション豊富にすることができる。また、本実施例のように写像関数に与えるシード情報と別シード情報を用いることでもランダムビット列の生成パターンが変更でき、ランダムビット列パターンのバリエーションをより増加することも可能である。 Furthermore, by using the seed information Seed used for initial value setting and the separate seed information for the bit extraction process, the user can make the pattern of the random bit sequence rich. Further, the random bit string generation pattern can be changed by using seed information and other seed information given to the mapping function as in this embodiment, and the variation of the random bit string pattern can be further increased.
ステップS14におけるビット抽出処理の次に、CPU1は、ビット列記録出力処理を行う(S15)。ビット列記録出力処理においては、ビット抽出処理において抽出されたビットを先頭側から順にバッファに記憶してビット列を作り、予め定められたタイミングに出力する。具体例としては、バッファが満杯になったときに出力を行う。
Following the bit extraction process in step S14, the
例えば、図15に示すように、バッファBUFのサイズが1バイトであり、第1回目のビット抽出により{1,0,1}が、第2回目のビット抽出により{0,0,1,1,0,0}が、それぞれ抽出されたとする。この場合には、バッファBUFに、第1回目の抽出ビット{1,0,1}が記憶され、次に、第2回目の抽出ビット中の5ビット目までの{0,0,1,1,0}が記憶されると、バッファBUFが満杯となる。ここで、出力ビット列{1,0,1,0,0,1,1,0}が出力される。出力の後に、バッファBUFはクリアされ、第2回目の抽出ビット中の残余の1ビット{0}がバッファBUFに記憶される。以降は、上記と同様に処理が進められる。 For example, as shown in FIG. 15, the size of the buffer BUF is 1 byte, {1,0,1} is obtained by the first bit extraction, and {0,0,1,1 is obtained by the second bit extraction. , 0, 0} are extracted. In this case, the first extraction bit {1, 0, 1} is stored in the buffer BUF, and then {0, 0, 1, 1 up to the fifth bit in the second extraction bit. , 0} is stored, the buffer BUF becomes full. Here, the output bit string {1, 0, 1, 0, 0, 1, 1, 0} is output. After the output, the buffer BUF is cleared and the remaining 1 bit {0} in the second extracted bit is stored in the buffer BUF. Thereafter, the processing proceeds in the same manner as described above.
上記のような出力ビット列の出力処理に代えて、擬似乱数を使用するシステムから要求を発生させるように構成し、CPU1はこのシステムから要求があった場合に出力ビット列の出力を行うようにしても良い。また、ユーザが出力要求を発生させるように構成し、ユーザから要求があった場合に出力ビット列の出力を行うようにしても良い。更に、擬似乱数生成が終了した場合に出力ビット列の出力を行うようにしても良い。いずれの出力タイミングを採用しても良いが、それぞれの場合にバッファBUFの容量を必要な容量とする。
Instead of the output bit string output processing as described above, a request is generated from a system using pseudo-random numbers, and the
ビット列記録出力処理に続いて、CPU1は、パラメータ作成更新処理を行う(S16)。パラメータ作成更新処理では、ステップS13の関数切換・写像計算処理を行って得られた写像値Xiと上記ステップS11の初期値準備処理において準備してレジスタmemに記憶した写像初期値X0との比較結果に基づき、パラメータPを作成更新する。
Following the bit string record output process, the
具体的には、図16に示すように、写像計算回数がシード情報Seedのビット長mと同じになったことを検出したときに、レジスタmemに記憶されている写像初期値X0と今回において写像計算した写像値Xiとを比較し(S31)、同じ値かを検出する(S32)。 Specifically, as shown in FIG. 16, when it is detected that the number of mapping calculations is the same as the bit length m of the seed information Seed, the mapping initial value X 0 stored in the register mem and the current time The calculated map value X i is compared (S31), and it is detected whether it is the same value (S32).
同じ値でないことをステップ32において検出すると、そのまま通過し、同じ値であることをステップ32において検出すると、次の関数h(P,Seed)により他のパラメータを作成更新する(S33)。
h(P,Seed)=(P+r(Seed))mod(2L−1)+1
上記において、r(Seed)は、シード情報Seedを用いた任意の演算などの数値処理により得られる結果値を示す。
If it is detected in step 32 that they are not the same value, it passes as it is, and if it is detected in step 32 that it is the same value, other parameters are created and updated by the next function h (P, Seed) (S33).
h (P, Seed) = (P + r (Seed)) mod (2 L −1) +1
In the above, r (Seed) indicates a result value obtained by numerical processing such as an arbitrary calculation using the seed information Seed.
上記ステップS16のパラメータ作成更新処理を終了すると、CPU1は終了判定処理S17を行う(S17)。即ち、ビット抽出処理により抽出されたビットの総ビット数が、予め設定された所望擬似乱数のランダムビット長nとなったかを検出し、ランダムビット長nとなっていなければ、次の写像計算等を行わせるためにカウントアップ処理(S12)へ戻って処理を継続する一方、ランダムビット長nとなっている場合には、処理を終了させる。このようにして、ビット列記録出力処理(S15)により出力された出力ビット列が{b1,b2,b3,・・・,bn}となり所要ビット長の擬似乱数を得ることができる。
When the parameter creation / updating process in step S16 is completed, the
次に、第2の実施例を説明する。この第2の実施例に係る擬似乱数生成器においては、図17に示すように、図1の擬似乱数生成器に備えられていた切換指示手段60が備えられず、また、写像計算手段20Aとパラメータ作成更新手段50Aを備える。これ以外は、図1の擬似乱数生成器と同じ構成を有する。 Next, a second embodiment will be described. In the pseudo random number generator according to the second embodiment, as shown in FIG. 17, the switching instruction means 60 provided in the pseudo random number generator of FIG. 1 is not provided, and the map calculation means 20A and A parameter creation / updating means 50A is provided. Except this, it has the same configuration as the pseudo-random number generator of FIG.
写像計算手段20Aは、一つの変形テント関数により写像計算を行うものであり、例えば、図2(a)に示された変形テント関数F1を用いる。このため、テント関数の切り換えを指示する切換指示手段60が不要である。 The mapping calculation means 20A performs mapping calculation by one modified tent function, and uses, for example, the modified tent function F1 shown in FIG. Therefore, the switching instruction means 60 for instructing switching of the tent function is not necessary.
パラメータ作成更新手段50Aは、写像計算手段20Aによる写像計算が行われる毎に当該計算された写像値Xiが写像初期値X0と一致しているかを検出し、一致している場合に他のパラメータを作成更新する。この処理は、写像計算手段20により、シード情報Seedのビット長mと同じm回目の写像値Xiが計算されたときに、当該計算されたm回目の写像値Xiが写像初期値X0と一致しているかを検出し、一致している場合に他のパラメータを作成更新したパラメータ作成更新手段50と相違している。 The parameter creating / updating means 50A detects whether the calculated mapping value X i matches the mapping initial value X 0 every time mapping calculation by the mapping calculation means 20A is performed. Create and update parameters. In this process, when the m-th mapping value X i that is the same as the bit length m of the seed information Seed is calculated by the mapping calculation means 20, the calculated m-th mapping value X i is the mapping initial value X 0. Is different from the parameter creating / updating means 50 that creates and updates other parameters when they match.
以上の通りに構成された第2の実施例に係る擬似乱数生成器は第1の実施例に係る擬似乱数生成器と同様に、例えば、図3に示されるようなコンピュータシステムにより実現される。上記図3に示されたCPU1が、図18に示されるフローチャートに対応する擬似乱数生成プログラムPRGを実行することにより図17の各手段が実現されるので、このフローチャートを参照して擬似乱数生成方法の処理を説明する。
The pseudo-random number generator according to the second embodiment configured as described above is realized by, for example, a computer system as shown in FIG. 3 in the same manner as the pseudo-random number generator according to the first embodiment. The
図18に示されるフローチャートを図4に示されるフローチャートと比較して明らかな通り、図4のステップS13に代えて、図18ではステップS13Aとして写像計算処理を行う。また、図4のステップS16に代えて、図18ではステップS16Aとしてパラメータ作成更新処理を行う。それ以外の処理は第1の実施例と第2の実施例とは同じ処理を行うため、ステップS13AとステップS16Aのみについて説明を行う。 As apparent from the comparison of the flowchart shown in FIG. 18 with the flowchart shown in FIG. 4, instead of step S <b> 13 in FIG. 4, mapping calculation processing is performed as step S <b> 13 </ b> A in FIG. 18. Also, instead of step S16 in FIG. 4, in FIG. 18, parameter creation / update processing is performed as step S16A. Since the other processes are the same as those in the first and second embodiments, only step S13A and step S16A will be described.
ステップS13Aの写像計算処理においては、変形テント関数F1を用いて次の式により写像計算を行う。
Xi=F1(Xi-1,P)
F1は既に式(1)として示されているものである。このようにして、ステップS13Aの写像計算処理が行われて、写像値Xiが得られると、CPU1は、既に説明したような、ビット抽出処理(S14)、ビット列記録出力処理(S15)を行い、ステップS16Aのパラメータ作成更新処理を行う。
In the mapping calculation process of step S13A, mapping calculation is performed by the following equation using the modified tent function F1.
X i = F1 (X i- 1, P)
F1 has already been shown as equation (1). In this way, when the mapping calculation process in step S13A is performed and the mapping value X i is obtained, the
ステップS16Aのパラメータ作成更新処理においては、図19に示すように、写像計算が行われたことを検出したときに、レジスタmemに記憶されている写像初期値X0と今回において写像計算した写像値Xiとを比較し(S31A)、同じ値かを検出する(S32)。 In the parameter creation / updating process in step S16A, as shown in FIG. 19, when it is detected that the mapping calculation has been performed, the mapping initial value X 0 stored in the register mem and the mapping value calculated this time are calculated. comparing the X i (S31A), to detect whether the same value (S32).
同じ値でないことをステップ32において検出すると、そのまま通過し、同じ値であることをステップ32において検出すると、次の関数h(P,Seed)により他のパラメータを作成更新する(S33)。
h(P,Seed)=(P+r(Seed))mod(2L−1)+1
上記において、r(Seed)は、シード情報Seedを用いた任意の演算などの数値処理により得られる結果値を示す。
If it is detected in step 32 that they are not the same value, it passes as it is, and if it is detected in step 32 that it is the same value, other parameters are created and updated by the next function h (P, Seed) (S33).
h (P, Seed) = (P + r (Seed)) mod (2 L −1) +1
In the above, r (Seed) indicates a result value obtained by numerical processing such as an arbitrary calculation using the seed information Seed.
上記ステップS16Aのパラメータ作成更新処理を終了すると、CPU1は終了判定処理S17を行う(S17)。即ち、ビット抽出処理により抽出されたビットの総ビット数が、予め設定された所望擬似乱数のランダムビット長nとなったかを検出し、ランダムビット長nとなっていなければ、次の写像計算等を行わせるためにカウントアップ処理(S12)へ戻って処理を継続する一方、ランダムビット長nとなっている場合には、処理を終了させる。このようにして、ビット列記録出力処理(S15)により出力された出力ビット列が{b1,b2,b3,・・・,bn}となり所要ビット長の擬似乱数を得ることができる。
When the parameter creation / updating process in step S16A is completed, the
1 CPU
2 バス
3 主メモリ
4 入力装置
5 出力装置
6 外部記憶装置
10 初期値準備手段
20、20A 写像計算手段
30 ビット抽出手段
40 ビット列記憶部
50、50A パラメータ作成更新手段
60 切換指示手段
70 制御手段
1 CPU
2
Claims (9)
初回は前記初期パラメータと前記写像初期値を変形テント関数に適用し写像計算を行い、2回目以降は前記初期パラメータ或いは他のパラメータと前回求められた写像値を前記変形テント関数に適用し写像計算を行う写像計算手段と、
前記写像計算手段により得られた写像値から所定ビットを抽出して擬似乱数とするビット抽出手段と、
前記写像計算手段により得られる写像値と前記写像初期値との比較結果に基づき、前記写像計算手段が用いる他のパラメータを作成更新するパラメータ作成更新手段と、
擬似乱数生成の終了条件情報に基づき終了時の判定を行い、前記写像計算手段による次の計算への進行と、前記ビット抽出手段と前記パラメータ作成更新手段による次処理への進行とを制御する制御手段と
を具備することを特徴とする擬似乱数生成器。 Initial value preparation means for preparing initial parameters and mapping initial values;
In the first time, the initial parameter and the initial value of the mapping are applied to the modified tent function to perform the mapping calculation. In the second and subsequent times, the initial parameter or other parameters and the previously determined mapping value are applied to the modified tent function. Mapping calculation means for performing
A bit extraction unit that extracts a predetermined bit from the mapping value obtained by the mapping calculation unit to obtain a pseudo-random number;
Based on a comparison result between the mapping value obtained by the mapping calculation means and the mapping initial value, parameter creation updating means for creating and updating other parameters used by the mapping calculation means;
Control for determining the end time based on the end condition information of the pseudo-random number generation and controlling the progress to the next calculation by the mapping calculation means and the progress to the next processing by the bit extraction means and the parameter creation / update means And a pseudo-random number generator.
初期値準備手段は、シード情報を準備するものであり、
前記シード情報に基づき写像計算手段が用いるテント関数の切り換えを指示する切換指示手段を具備することを特徴とする請求項1に記載の擬似乱数生成器。 The mapping calculation means performs mapping calculation by a plurality of tent functions.
The initial value preparation means prepares seed information,
2. The pseudorandom number generator according to claim 1, further comprising switching instruction means for instructing switching of a tent function used by the mapping calculation means based on the seed information.
パラメータ作成更新手段は、シード情報に基づきパラメータの作成更新を行うことを特徴とする請求項2に記載の擬似乱数生成器。 The bit extraction means determines a range for extracting a predetermined bit from the mapping value based on the seed information,
3. The pseudorandom number generator according to claim 2, wherein the parameter creation / update means performs parameter creation / update based on the seed information.
初回は前記初期パラメータと前記写像初期値を変形テント関数に適用し写像計算を行い、2回目以降は前記初期パラメータ或いは他のパラメータと前回求められた写像値を前記変形テント関数に適用し写像計算を行う写像計算ステップと、
前記写像計算ステップにより得られた写像値から所定ビットを抽出して擬似乱数とするビット抽出ステップと、
前記写像計算ステップにより得られる写像値と前記写像初期値との比較結果に基づき、前記写像計算ステップにおいて用いられる他のパラメータを作成更新するパラメータ作成更新ステップと、
擬似乱数生成の終了条件情報に基づき終了時の判定を行い、前記写像計算ステップによる次の計算への進行と、前記ビット抽出ステップと前記パラメータ作成更新ステップによる次処理への進行とを制御する制御ステップと
を具備することを特徴とする擬似乱数生成方法。 An initial value preparation step for preparing initial parameters and initial mapping values;
In the first time, the initial parameter and the initial value of the mapping are applied to the modified tent function to perform the mapping calculation. In the second and subsequent times, the initial parameter or other parameters and the previously determined mapping value are applied to the modified tent function. A map calculation step for performing
A bit extraction step of extracting a predetermined bit from the mapping value obtained by the mapping calculation step and making it a pseudo-random number;
Based on the comparison result between the mapping value obtained by the mapping calculation step and the mapping initial value, a parameter creation update step for creating and updating other parameters used in the mapping calculation step;
Control for determining the end time based on the end condition information of the pseudo random number generation and controlling the progress to the next calculation by the mapping calculation step and the progress to the next processing by the bit extraction step and the parameter creation and update step A pseudo-random number generation method comprising the steps of:
初期値準備ステップでは、シード情報を準備し、
前記シード情報に基づき写像計算ステップが用いるテント関数の切り換えを指示する切換指示ステップを具備することを特徴とする請求項4に記載の擬似乱数生成方法。 In the map calculation step, the map calculation is performed using a plurality of tent functions.
In the initial value preparation step, seed information is prepared,
5. The pseudorandom number generation method according to claim 4, further comprising a switching instruction step for instructing switching of a tent function used by the mapping calculation step based on the seed information.
パラメータ作成更新ステップでは、シード情報に基づきパラメータの作成更新を行うことを特徴とする請求項5に記載の擬似乱数生成方法。 In the bit extraction step, a range for extracting a predetermined bit from the mapping value based on the seed information is determined,
6. The pseudo-random number generation method according to claim 5, wherein the parameter creation / update step performs parameter creation / update based on seed information.
初期パラメータ及び写像初期値を準備する初期値準備手段、
初回は前記初期パラメータと前記写像初期値を変形テント関数に適用し写像計算を行い、2回目以降は前記初期パラメータ或いは他のパラメータと前回求められた写像値を前記変形テント関数に適用し写像計算を行う写像計算手段、
前記写像計算手段により得られた写像値から所定ビットを抽出して擬似乱数とするビット抽出手段、
前記写像計算手段により得られる写像値と前記写像初期値との比較結果に基づき、前記写像計算手段が用いる他のパラメータを作成更新するパラメータ作成更新手段と、
擬似乱数生成の終了条件情報に基づき終了時の判定を行い、前記写像計算手段による次の計算への進行と、前記ビット抽出手段と前記パラメータ作成更新手段による次処理への進行とを制御する制御手段
として機能させる特徴とする擬似乱数生成プログラム。 A computer that generates pseudo-random numbers through computation,
Initial value preparation means for preparing initial parameters and initial mapping values;
In the first time, the initial parameter and the initial value of the mapping are applied to the modified tent function to perform the mapping calculation. In the second and subsequent times, the initial parameter or other parameters and the previously determined mapping value are applied to the modified tent function. Mapping calculation means for performing
Bit extraction means for extracting a predetermined bit from the map value obtained by the map calculation means and making it a pseudo-random number;
Based on a comparison result between the mapping value obtained by the mapping calculation means and the mapping initial value, parameter creation updating means for creating and updating other parameters used by the mapping calculation means;
Control for determining the end time based on the end condition information of the pseudo-random number generation and controlling the progress to the next calculation by the mapping calculation means and the progress to the next processing by the bit extraction means and the parameter creation / update means A pseudo-random number generation program characterized by functioning as a means.
コンピュータを初期値準備手段として、シード情報を準備するように機能させ、
コンピュータを、前記シード情報に基づき写像計算手段が用いるテント関数の切り換えを指示する切換指示手段として機能させることを特徴とする請求項7に記載の擬似乱数生成プログラム。 Using a computer as a mapping calculation means, functioning to perform mapping calculation with a plurality of tent functions,
Let the computer function as an initial value preparation means to prepare seed information,
8. The pseudo-random number generation program according to claim 7, wherein the computer is caused to function as switching instruction means for instructing switching of a tent function used by the mapping calculation means based on the seed information.
コンピュータをパラメータ作成更新手段として、シード情報に基づきパラメータの作成更新を行うように機能させることを特徴とする請求項7に記載の擬似乱数生成プログラム。 The computer functions as a bit extraction means to determine a range for extracting a predetermined bit from the mapping value based on the seed information,
8. The pseudo-random number generation program according to claim 7, wherein the computer functions as parameter creation / update means so as to create / update parameters based on seed information.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009081847A JP5268741B2 (en) | 2009-03-30 | 2009-03-30 | Pseudorandom number generator, pseudorandom number generation method, and pseudorandom number generation program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009081847A JP5268741B2 (en) | 2009-03-30 | 2009-03-30 | Pseudorandom number generator, pseudorandom number generation method, and pseudorandom number generation program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2010237735A JP2010237735A (en) | 2010-10-21 |
| JP5268741B2 true JP5268741B2 (en) | 2013-08-21 |
Family
ID=43092028
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2009081847A Active JP5268741B2 (en) | 2009-03-30 | 2009-03-30 | Pseudorandom number generator, pseudorandom number generation method, and pseudorandom number generation program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5268741B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6833643B2 (en) * | 2017-09-07 | 2021-02-24 | 東芝情報システム株式会社 | Compression processing device, decompression processing device, compression processing program, decompression processing program |
| JP7079546B2 (en) * | 2018-09-07 | 2022-06-02 | 東芝情報システム株式会社 | Pseudo-random number generator and pseudo-random number generator |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4351105B2 (en) * | 2004-03-31 | 2009-10-28 | 東芝情報システム株式会社 | Hash value generation device and hash value generation program |
-
2009
- 2009-03-30 JP JP2009081847A patent/JP5268741B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2010237735A (en) | 2010-10-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6517438B2 (en) | Cryptographic device to calculate target block cipher | |
| JP3783800B2 (en) | Encryption / decryption device and method using programmable logic device / device | |
| CN102096609B (en) | Instruction-set architecture for programmable cyclic redundancy check (CRC) computations | |
| JP4544538B2 (en) | Signature generation apparatus, key generation apparatus, and signature generation method | |
| JP2008145791A (en) | Cryptographic processing apparatus, cryptographic processing method, and computer program | |
| JP2008058827A (en) | Cryptographic processing apparatus, cryptographic processing method, and computer program | |
| EP3732822B1 (en) | Whitebox computation of keyed message authentication codes | |
| JP6044738B2 (en) | Information processing apparatus, program, and storage medium | |
| CN116436709B (en) | A data encryption and decryption method, device, equipment and medium | |
| CN101939724B (en) | Data processing device and method for executing obfuscated programs | |
| RU2124814C1 (en) | Method for encoding of digital data | |
| US7801307B2 (en) | Method of symmetric key data encryption | |
| JP2003152706A (en) | Encryption generating device, encryption decrypting device, encryption generating program, encryption decrypting program, authentication system, and electronic device | |
| JP5268741B2 (en) | Pseudorandom number generator, pseudorandom number generation method, and pseudorandom number generation program | |
| WO2006098015A1 (en) | Data converting apparatus and data converting method | |
| JP2014093612A (en) | Coding device and method of controlling the same | |
| JP2004004341A (en) | Power-residue calculation apparatus, power-residue calculation method and program | |
| JP5528281B2 (en) | Hash value arithmetic unit | |
| EP1941349A2 (en) | Method of generating pseudo-random numbers | |
| JP5113833B2 (en) | ENCRYPTION METHOD AND ENCRYPTION APPARATUS FOR IMPROVING OPERATION PERFORMANCE OF A CENTRAL PROCESSOR | |
| EP3166094B1 (en) | Matrix generation device, matrix generation method, and matrix generation program | |
| JP5207153B2 (en) | Pseudo random number generation system | |
| JP5391212B2 (en) | Secure search system, secret search device, secure search method, secure search program | |
| EP1875405B1 (en) | Improved cipher system | |
| CN108370311A (en) | Computing device and method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120314 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130430 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130507 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 5268741 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |