JPS61193183A - Random number generation circuit - Google Patents

Random number generation circuit

Info

Publication number
JPS61193183A
JPS61193183A JP60032620A JP3262085A JPS61193183A JP S61193183 A JPS61193183 A JP S61193183A JP 60032620 A JP60032620 A JP 60032620A JP 3262085 A JP3262085 A JP 3262085A JP S61193183 A JPS61193183 A JP S61193183A
Authority
JP
Japan
Prior art keywords
circuit
output
value
bit
random number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP60032620A
Other languages
Japanese (ja)
Inventor
白石 高義
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP60032620A priority Critical patent/JPS61193183A/en
Publication of JPS61193183A publication Critical patent/JPS61193183A/en
Pending legal-status Critical Current

Links

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、乱数発生回路に関し、特に暗号機およびモン
テカルロ・シミュレータ等で使用される疑似乱数発生回
路に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a random number generation circuit, and particularly to a pseudorandom number generation circuit used in cryptographic machines, Monte Carlo simulators, and the like.

〔発明の背景〕[Background of the invention]

暗号機には、疑似乱数を使用するが、従来より乱数とし
て、2値M系列乱数が使用されている。これは、米国特
許第3816764号、米国特許第3911216号各
明細書に記載されているように、ガロア体0F(2n)
上に作られるものである。このため、長周期の乱数を発
生させるには。
Pseudo-random numbers are used in cryptographic machines, and binary M-sequence random numbers have conventionally been used as random numbers. This is a Galois field 0F(2n) as described in U.S. Patent No. 3,816,764 and U.S. Pat. No. 3,911,216.
It is made on top. Therefore, to generate long-period random numbers.

高次の2の拡張ガロア体を得る必要があった。It was necessary to obtain an extended Galois field of higher order 2.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、長周期の疑似乱数を比較的低次の多値
既約多項式で発生し、2値演算回路で実現して、これを
暗号装置およびモンテカルロ・シミュレーションの乱数
として使用できるような乱数発生回路を提供することに
ある。
An object of the present invention is to generate long-period pseudorandom numbers using relatively low-order multi-value irreducible polynomials, implement them in a binary arithmetic circuit, and use them as random numbers in cryptographic devices and Monte Carlo simulations. The purpose of this invention is to provide a random number generation circuit.

〔発明の構成〕[Structure of the invention]

上記目的を達成するため、本発明の乱数発生回路は、M
 r = 2 r−1ガロア体GF(Mrn)上り乱数
を発生させるため、Mr個のビット加算器を用い、最上
位ビットの桁上げ出力を、最下位ビットの桁上げ入力に
接続し、And回路の出力が総て′1″のとき、結果出
力ビットを0′″とするようなMr値加算回路と、該M
r値加算回路の加算出力にその出力が接続され、r×r
Xノビ乗算器を用いたMr値乗算回路と、各段r個のシ
フトレジスタ複数段とで構成されることに特徴がある。
In order to achieve the above object, the random number generation circuit of the present invention has M
In order to generate r = 2 r-1 Galois field GF (Mrn) upstream random numbers, Mr bit adders are used, the carry output of the most significant bit is connected to the carry input of the least significant bit, and an AND circuit is used. An Mr value addition circuit which sets the result output bit to 0'' when all outputs of the M
Its output is connected to the addition output of the r value addition circuit, and r×r
It is characterized by being composed of an Mr value multiplier circuit using an X-Novi multiplier and multiple stages of shift registers, each stage having r number of stages.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の実施例を、図面により詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

第2図は1本発明に使用される2ビツトの加算器の説明
図である。
FIG. 2 is an explanatory diagram of a 2-bit adder used in the present invention.

一般に、ガロア体は、素数pを素体として、ガロア体G
F(pn)に拡張できる。一方、電子計算機等で使用さ
れている演算回路は、2値演算である。従って、素数p
の演算を、2値演算を基にして行うことを提案する。先
ず、素数pには、P=2”−1・・・・・ (1) のメルセンヌ数を選ぶ。この数は、2値数からの変換が
容易である。また、基本的に、2進演算が使用できる。
In general, a Galois field is a Galois field with a prime number p as a prime field, and a Galois field G
It can be extended to F(pn). On the other hand, arithmetic circuits used in electronic computers and the like perform binary arithmetic operations. Therefore, the prime number p
We propose to perform the calculations based on binary calculations. First, for the prime number p, choose the Mersenne number of P=2"-1... (1). This number is easy to convert from a binary number. Also, basically, it is a binary number. Arithmetic operations can be used.

例えば、M2=22−1=3   の3値演算では、2
個の2進演算器を利用して演算を行う、また、i (1
1)2 (= (3)3=O)を有効に利用することを
考えた。
For example, in the three-value operation M2=22-1=3, 2
Arithmetic operations are performed using binary arithmetic units of i (1
1) I thought about making effective use of 2 (= (3) 3=O).

以下、3値の例について説明する。An example of three values will be explained below.

第2図の1は、1ビツトの加算器である。すなわち、j
、kを各1ビツト入力、μを下位からの桁上げビット入
力とすると、これらの2進計算結果は1桁上げ出力ビッ
トCと、出力ビットeとである。
1 in FIG. 2 is a 1-bit adder. That is, j
, k are 1 bit input each, and μ is a carry bit input from the lower order.The results of these binary calculations are a 1 carry output bit C and an output bit e.

第3図は、第2図の加算器と論理回路とを組合せた3値
加算回路の構成図であり、第4図は第3図の演算結果を
示す図である。
FIG. 3 is a block diagram of a three-value addition circuit that combines the adder and logic circuit of FIG. 2, and FIG. 4 is a diagram showing the calculation results of FIG. 3.

第3図において、1は2ビット加算器、2は排他的論理
和回路(mod2演算回路)またはナンド回路、3はア
ンド回路である。また、第4図の横をai1ate縦を
す、bl、内部(7)a、b交点をe2e□とする。
In FIG. 3, 1 is a 2-bit adder, 2 is an exclusive OR circuit (mod 2 arithmetic circuit) or a NAND circuit, and 3 is an AND circuit. Also, let the horizontal side of Fig. 4 be ai1ate, the vertical side be bl, and the intersection of a and b inside (7) be e2e□.

いは、Caxeax)を(10)とし、(b8゜bs)
を(10)とすれば、第3図より。
In other words, (Caxeax) is (10) and (b8°bs)
If we assume (10), then from Figure 3.

a 2+b 2によりc2=1が出力し、これがμmに
入力することにより、el:=1が出力する。
c2=1 is output by a 2 + b 2, and by inputting this to μm, el:=1 is output.

その結果として、(eaet)= (01)である。As a result, (eaet)=(01).

なお、このとき、(dt−dt)は(01)であるため
、排他的論理和回路2の出力はlとなり、アンド回路3
の出力はCax−ex)= (01)となる、また、別
の例では、(az+ ai)=(01)=  (b2.
bよ)=(10)のとき、加算器1の出力は(d2.c
tt)= (it)であるため、排他的論理和回路2の
出力は0となり、従って、アンド回路3の出力は(eg
o at)=(00)である。
Note that at this time, since (dt-dt) is (01), the output of the exclusive OR circuit 2 is l, and the AND circuit 3
The output of is Cax-ex)=(01), and in another example, (az+ai)=(01)=(b2.
b) = (10), the output of adder 1 is (d2.c
tt) = (it), the output of the exclusive OR circuit 2 is 0, and therefore the output of the AND circuit 3 is (eg
o at)=(00).

なお、ここで、(00)=O,(OX)=1゜(10)
=2.とすれば、第4図は、3値演算表となっている。
In addition, here, (00)=O, (OX)=1°(10)
=2. Then, FIG. 4 is a ternary calculation table.

この3値演算回路を用いて、3値最大周期疑似乱数発生
回路を構成する。
This three-value calculation circuit is used to configure a three-value maximum period pseudo-random number generation circuit.

3値最大周期疑似乱数は1次数nの原始既約多項式f 
n(x)=a nxn+a n−□x”−”+ ・・・
・拳a 1x十a O・・・ (2)(aiは、0,1
.2である)により求められる。
The ternary maximum period pseudorandom number is a primitive irreducible polynomial f of first degree n
n(x)=a nxn+a n-□x"-"+...
・Fist a 1x 10a O... (2) (ai is 0,1
.. 2).

その周期Pnは、P=3n−1である。Its period Pn is P=3n-1.

n=3の場合、f 3 (x)=x”+2x+1 ・・
・・・ (3) 周期P3は、P、=33−1=26 そこで、f、を3進表示し、上式(3)を(10%式% 初期値を(001)aとして、 (010)s (1000)s= (012)3  (mod (10
(1200)3= (212)3 (mod  f3)
(2120)3:: (111)3 (nod  fa
)(1110)3= (122)3 (1220)3=  (202)3  (nod   
f3)(2020)  、=  (011)3  (n
od   f3)以下、同じようにして、 (1100)3= (112)3 (1120)s= (102) 3 (1020)3= (002)s (200)z (2000)3= (021)3 (2100)a” (121)s (1210)3= (222)3 (2220) 3= (211)z (2110)3= (101)s (1010)3= (022)s (2200) 3= (221)3 (2210) 3” (201)3 (2010)s” (001)3 これで1周期とする。
When n=3, f 3 (x)=x"+2x+1...
... (3) The period P3 is P, = 33-1 = 26 Therefore, f is expressed in ternary notation, and the above formula (3) is expressed as (10% formula % With the initial value as (001)a, (010 )s (1000)s= (012)3 (mod (10
(1200)3= (212)3 (mod f3)
(2120)3:: (111)3 (nod fa
)(1110)3=(122)3(1220)3=(202)3(nod
f3) (2020) , = (011)3 (n
od f3) Similarly, (1100)3= (112)3 (1120)s= (102) 3 (1020)3= (002)s (200)z (2000)3= (021)3 (2100)a” (121)s (1210)3= (222)3 (2220) 3= (211)z (2110)3= (101)s (1010)3= (022)s (2200) 3= (221)3 (2210) 3" (201)3 (2010)s" (001)3 This is one cycle.

第5図は1本発明の一実施例を示す3値乱数発生回路の
ブロック図であって、シフトレジスタおよび3値加算回
路を使用している。
FIG. 5 is a block diagram of a ternary random number generation circuit showing one embodiment of the present invention, which uses a shift register and a ternary adder circuit.

第5図において、S、1.S□2*S21+522tS
31+S3gはシフトレジスタ4.Ao。
In FIG. 5, S, 1. S□2*S21+522tS
31+S3g is shift register 4. Ao.

A1は第3図の3値加算器イである。この回路は、シフ
トクロツタにより駆動される。
A1 is the ternary adder A in FIG. This circuit is driven by a shift clock.

先ず、81□〜S3□のシフトレジスタがすべて′O”
にリセットされ、初期値として、P 2 +P1=(0
1)が入力されたとすると、第1クロツクに811=1
がセットされる。このシフトレジスタの状態を、(00
,00,Of)で示す。
First, all shift registers from 81□ to S3□ are set to 'O'.
is reset to P 2 +P1=(0
1) is input, 811=1 is input to the first clock.
is set. The state of this shift register is (00
,00,Of).

すなわち、(S3□S 31 + S 22 * S 
1□511)である。
That is, (S3□S 31 + S 22 * S
1□511).

次のシフトクロックでは、(P2Pl)= (00)で
あれば、シフトレジスタの状態(S2の状態)は、(0
0,01,00)である。
At the next shift clock, if (P2Pl) = (00), the state of the shift register (state of S2) is (0
0,01,00).

その次のシフトクロックでも、(PgPx)=(00)
とする、S3状態は、(01,00,00)である。
At the next shift clock, (PgPx) = (00)
The S3 state is (01,00,00).

第4シフトクロツクでは、(Q*Q1)= (01)で
あって、Aoの入力b!=1.A工の入力b1=1が発
生し、S4状態は、(00,01゜10)となる。
At the fourth shift clock, (Q*Q1)=(01) and input b of Ao! =1. Input b1=1 of A work is generated, and the S4 state becomes (00,01°10).

次のSIsの状態は、(01,10,00) であり 
Slの状態は、(10,01,10)である。
The state of the next SIs is (01,10,00)
The state of Sl is (10,01,10).

第7シフトクロツクでは、(QgQ□)=(10)が発
生し、A工人力は、(a2at)=(10)−(bgb
x)= (10) 、出力は、(eze 1)= (0
1)、Ao大入力、(bzbx)=(01)、出力は、
(egex)= (01)となって、S7の状態は、(
OX、OX、01)となる。
At the 7th shift clock, (QgQ□) = (10) occurs, and the A labor force is (a2at) = (10) - (bgb
x) = (10), the output is (eze 1) = (0
1), Ao large input, (bzbx) = (01), output is
(egex) = (01), and the state of S7 is (
OX, OX, 01).

第8シフトクロツクでは、(QgQx)= (。At the 8th shift clock, (QgQx) = (.

1)、A、入力(agat)= (01)−(b2bL
)= (01)、出力(east)= (10)−Ao
大入力agaz)= (00)−(bzbz)= (1
0)、出力(e * e t) = (10)となる。
1), A, input (agat) = (01) - (b2bL
) = (01), output (east) = (10) - Ao
Large input agaz) = (00) - (bzbz) = (1
0), and the output (e * e t) = (10).

第9シフトクロツクでは、(Q2Q□)=(01)、A
、入力(82at)= (10)−(bzb t)= 
(01)、出力(e 2 e t) = (00) −
A、入力(a2at)= (00)、(b2bx)= 
(10)、S”の状態は、(10,00,10)である
At the 9th shift clock, (Q2Q□)=(01), A
, input (82at) = (10) - (bzb t) =
(01), output (e 2 et) = (00) −
A, input (a2at) = (00), (b2bx) =
(10), the state of S'' is (10,00,10).

第10シフトクロツクでは、(Q2Q1)=(10)=
Ax入力(a x a t) = (10) −(bz
bx)= (1o) 、出力(e2et)=(01)、
Ao大入力bzbx)= (ox)。
At the 10th shift clock, (Q2Q1)=(10)=
Ax input (ax a t) = (10) - (bz
bx) = (1o), output (e2et) = (01),
Ao large input bzbx) = (ox).

S10の状態は、(00,01,01)である。The state of S10 is (00,01,01).

また、S11の状態は、(01,01,00)である、
以下、同じようにして、 S” 2= (01,01,10) Sl 3= (01,00,10) S14= (00,00,10) S15= (00,10,00) SIB= (10,00,00) S1フ= (00,10,01) S’ ”= (10,01,00) SI B= (01,10,01) S 2 ’= (1,0,10,10)S”= (10
,01,01) 522=  (01,00,0f) S23=  (00,10,10) S2’=  (10,10,00) S2S=  (10,10,01) 82B=  (10,00,01) S27= (00,00,01) でS’(7)状態に戻っている。すなわち、第5図では
、  f 3 (x)=x3+2x+1を満足している
。一般に、3値n次については。
Moreover, the state of S11 is (01,01,00),
Hereafter, in the same way, S" 2= (01,01,10) Sl 3= (01,00,10) S14= (00,00,10) S15= (00,10,00) SIB= (10 ,00,00) SI B= (00,10,01) S'''= (10,01,00) SI B= (01,10,01) S 2 '= (1,0,10,10)S ”= (10
,01,01) 522= (01,00,0f) S23= (00,10,10) S2'= (10,10,00) S2S= (10,10,01) 82B= (10,00,01 ) S27 = (00,00,01) and returns to the S'(7) state. That is, in FIG. 5, f 3 (x)=x3+2x+1 is satisfied. Generally, for the ternary nth order.

fn=(x)=xn+an−4xn−1+・・・+c 
1 x+a O の既約多項式について、2個1組のシフトレジスタをn
組用意し、al=Oの位置に3値加算器イを設置する。
fn=(x)=xn+an-4xn-1+...+c
For an irreducible polynomial of 1 x+a O, a set of two shift registers is
Prepare a set and install a ternary adder a at the position al=O.

配線は、最終シフトレジスタの出力Q2.Q1を接続す
るが。
The wiring connects the final shift register output Q2. I will connect Q1.

a1=1のとき、Q2→b2端子eQl→b2端子、a
1=2のとき、Q2→b2端子p Q1+b1端子に接
続する。
When a1=1, Q2→b2 terminal eQl→b2 terminal, a
When 1=2, connect Q2→b2 terminal p to Q1+b1 terminal.

乱数は、出力Q 2 Q tを3値の乱数列として使用
する場合と、各組のレジスタの内容を乱数として使用す
る場合のいずれでも可能である。
Random numbers can be generated either by using the output Q 2 Q t as a ternary random number sequence or by using the contents of each set of registers as random numbers.

このように1本実施例では、3値乱数が容易に発生でき
るため、GF(2n)上の乱数に0F(3n)上の乱数
が使用でき、従って、シミュレーション暗号への乱数の
応用範囲が拡張される。
In this way, in this embodiment, since ternary random numbers can be easily generated, random numbers on 0F(3n) can be used as random numbers on GF(2n), and the range of application of random numbers to simulation cryptography is therefore expanded. be done.

すなわち、GF (2n)上の乱数周期C2がC2=2
n−1 に対して、GF (3n)上の乱数周期C3は、C,=
3n−1 であり、低次数で長周期の03が得られる。
That is, the random number period C2 on GF (2n) is C2=2
For n-1, the random number period C3 on GF (3n) is C,=
3n-1, and a low-order, long-period 03 is obtained.

次に、他の実施例について、説明する。Next, other embodiments will be described.

この場合にも、素数pの演算を2値で行うために、能率
のよいメンセンヌ数M1=2r−1に着目し、メンセン
ヌ数の拡張体による演算回路を提案する。
In this case as well, in order to perform binary operations on the prime number p, we focus on the efficient Mensenne number M1=2r-1 and propose an arithmetic circuit using an extended field of Mensenne numbers.

例えば、M3=23−1=7の7値演算では、3個の2
値演算回路を利用して演算を行う、7値数は、2進数3
ビツトにより表現できる。
For example, in a seven-value operation where M3=23-1=7, three 2
A 7-value number, which is calculated using a value calculation circuit, is a binary number 3
It can be expressed by bits.

(1)?= (001)2 (2)?= (010)、z (3)?= (011)z (4)?= (100)2 (5)  ?=  (101)  t (6)  ?=  (110)2 ここで、(a)7は7値、(XXり2は2進数を示す。(1)? = (001)2 (2)? = (010),z (3)? = (011)z (4)? = (100)2 (5) ? = (101) t (6) ? = (110)2 Here, (a) 7 indicates a 7-value, and (XX-2 indicates a binary number).

以下1本発明の一実施例として、7値の例について説明
する。
An example of seven values will be described below as an embodiment of the present invention.

第6図(a)、(b)は、それぞれ1+1ビツト加算器
11および3×3ビット乗算器12の構成図である。a
、bは入力、Uは桁上げ入力、Cは桁上げ出力、eは加
算出力である。また、a2yal+ ao+ bl、b
l、I)Oは、乗算入力、C2+C11COは桁上げ出
力、C2,eよ。
FIGS. 6(a) and 6(b) are block diagrams of a 1+1 bit adder 11 and a 3×3 bit multiplier 12, respectively. a
, b is an input, U is a carry input, C is a carry output, and e is an addition output. Also, a2yal+ ao+ bl, b
l, I) O is multiplication input, C2+C11CO is carry output, C2, e.

eoは乗算結果出力である。eo is the multiplication result output.

第7図は、1+1ビツト加算器11を利用した7値加算
回路15を示す図である。
FIG. 7 is a diagram showing a seven-value addition circuit 15 using the 1+1 bit adder 11.

入力a2+ C1+ aQおよびbl、bl、bOは、
各々2進表示による7値数である。また、13はNAN
DAND回路はAND回路である。
The inputs a2+ C1+ aQ and bl, bl, bO are
Each is a 7-value number expressed in binary. Also, 13 is NAN
The DAND circuit is an AND circuit.

第7図の7値加算回路15の演算を、第9図(a)に示
す。
The operation of the seven-value addition circuit 15 in FIG. 7 is shown in FIG. 9(a).

例えば、(6) 7+ (5)7の場合、a 、)+b
 (、=1で+c o=Q、e (、=1゜al+bl
=1で−01=Oe e t=1ya 2+b 2= 
(10)2で、c 、=l=ut3゜C2=oにより、 a o+b o+u 6= (10)29 Q o=1
=u 1*6o=Q。
For example, in the case of (6) 7 + (5) 7, a , ) + b
(,=1 and +c o=Q, e (,=1゜al+bl
=1 and -01=Oe e t=1ya 2+b 2=
(10) With 2, c , = l = ut3 ° C2 = o, a o + b o + u 6 = (10) 29 Q o = 1
=u 1*6o=Q.

a 1+ b 1+ u 1= (10)  t e 
01= 1 = u 21e□=0゜ a 2+b 2+u 2= (11)  2t C2=
’=uOpe 2 = 1 。
a 1+ b 1+ u 1= (10) te
01= 1 = u 21e□=0゜a 2+b 2+u 2= (11) 2t C2=
'=uOpe2=1.

で、C2+ Bit eoが一時(001)2となるが
、定状として(100)2どなる。この時点にクロック
信号c ’Qを出して、計算結果d2sdi+d o 
 (100)2を得る。
So, C2+ Bit eo temporarily becomes (001)2, but becomes (100)2 in the fixed state. At this point, output the clock signal c'Q and calculate the calculation result d2sdi+d o
We get (100)2.

第8図は1本発明の一実施例を示す7値乗算回路のブロ
ック図であり、第9図(b)は第8図の演算結果を示す
説明図である。
FIG. 8 is a block diagram of a seven-value multiplier circuit showing an embodiment of the present invention, and FIG. 9(b) is an explanatory diagram showing the calculation result of FIG. 8.

例えば、(6)7X (5)tの場合、乗算器12のC
21Qly QO出力と、e2p131* eo比出力
For example, in the case of (6)7X (5)t, C of multiplier 12
21Qly QO output and e2p131* eo ratio output.

(110)  gX  (101)  z=(0111
10)  2であるから、 c、=Q、 c1=l、 
co=l。
(110) gX (101) z=(0111
10) Since 2, c,=Q, c1=l,
co=l.

(011)! fB 2 =1 g  13 1” 1 @  e o
 =Oe(110)gとなり、   ′ 従って、第9図(a)により、 (011)*+ (110)2= (010) 2が定
状状態としてg2* gi+ goが得られる。
(011)! fB 2 = 1 g 13 1” 1 @ e o
=Oe(110)g,' Therefore, according to FIG. 9(a), g2*gi+go is obtained with (011)*+ (110)2= (010) 2 being the steady state.

すなわち。Namely.

5×6=2(mod7)・・・・・・・ (5)である
5×6=2 (mod 7) (5).

これらの7値演算回路15.16を用いて、7値最長周
期疑似乱数発生回路を構成することができる。7値最長
周期疑似乱数は1次数nの原始既約多項式f、(x)=
a nxn+an−x x”−”+・・・・・+a 1
x+a 、により、求められる。
By using these 7-value calculation circuits 15 and 16, a 7-value longest period pseudo random number generation circuit can be constructed. The 7-value longest period pseudorandom number is a primitive irreducible polynomial f of first degree n, (x)=
a nxn+an-x x”-”+・・・・・・+a 1
It is determined by x+a.

その周期Pnは、P、=7”−1である。Its period Pn is P,=7''-1.

n=1の場合、f x (X)=x+2等が原始既約多
項式で、周期は、P1=7−1=6である。
When n=1, f x (X)=x+2, etc. are primitive irreducible polynomials, and the period is P1=7-1=6.

n=2の場合、F2(x)=x”+x+3等で周期は、
P2=72−1=48である。
When n=2, F2(x)=x”+x+3, etc., and the period is
P2=72-1=48.

n =3の場合、 f 3 (x) =x 3+3 x
+2等で、周期は、P3=73−1=342である。
If n = 3, f 3 (x) = x 3 + 3 x
+2 etc., and the period is P3=73-1=342.

F3を7進で示し、(1032)、と表す。F3 is expressed in hexadecimal and expressed as (1032).

初期値を(001)?として。Initial value (001)? As.

(001)? (010)? (100)? (1000)?= (045)? (nod (103
すなわち、(1000)−(1032)= (0一3=
7−3=4.(mod7) −2= 7−2 = 5 、  (m o d 7 )
従って、(0−3−2)= (045)である。
(001)? (010)? (100)? (1000)? = (045)? (nod (103
That is, (1000)-(1032)= (0-3=
7-3=4. (mod7) -2=7-2=5, (mod7)
Therefore, (0-3-2)=(045).

(450)? (4500)?= (526)y   mod (10
32)             すなわち。
(450)? (4500)? = (526)y mod (10
32) That is.

(4500)?=4X (1032)?= (55−1
)?= (526)? 12=5  (mod7)、8=1  (mod7)以
下、同じようにして。
(4500)? =4X (1032)? = (55-1
)? = (526)? 12 = 5 (mod 7), 8 = 1 (mod 7) Do the same thing below.

(5260)?= (254)? (2540)y=(553)? (5530)?= (524)? (5240)?= (234)? (2340)?= (353)y (3530)?= (511)t (5110)  フ= (104)  フ(1040)
?= (015)t (150)? 第1図は、本発明の一実施例を示す7値最長周期疑似乱
数発生回路の構成図である。
(5260)? = (254)? (2540)y=(553)? (5530)? = (524)? (5240)? = (234)? (2340)? = (353)y (3530)? = (511) t (5110) Fu = (104) Fu (1040)
? = (015)t (150)? FIG. 1 is a block diagram of a seven-value longest period pseudo-random number generation circuit showing an embodiment of the present invention.

Ftz〜F33の3個3段のシフトレジスタ17.18
を使用している。前述のF3の7値最長周期疑似乱数発
生回路である。なお、シフトレジスタ17,1Bのうち
、終段のシフトレジスタ18の出力は逆論理出理を使用
している。F3(x ) = x 3+ 3 x + 
2であるため、乗算回路16のMPl、MP、は(3)
?=  (2)qをシフトレジスタ18の出力f、、f
1.f0に対して乗算するように設定する。この回路は
、シフトクロックにより駆動される。
3 3-stage shift registers from Ftz to F33 17.18
are using. This is the above-mentioned F3 7-value longest period pseudo random number generation circuit. Incidentally, among the shift registers 17 and 1B, the output of the final stage shift register 18 uses inverse logic logic. F3(x) = x 3+ 3 x +
2, MPl and MP of the multiplication circuit 16 are (3)
? = (2) q is the output f of the shift register 18, , f
1. Set to multiply f0. This circuit is driven by a shift clock.

初めに−a2e ale aQに、(0,0,1)2=
 (1)?を1回のみ入力した後は、(0,0゜0)2
= (0)?とする(なお、シフトレジスタ17.18
は、すべて110”にリセットされている)、第1クロ
ツクで、出力aにより(1)7がセットされ、この時の
シフトレジスタ17.18の状態を(001)、と示す
、すなわち。
First, in −a2e ale aQ, (0,0,1)2=
(1)? After entering only once, (0,0゜0)2
= (0)? (In addition, shift register 17.18
(all are reset to 110''), (1)7 is set by the output a at the first clock, and the state of the shift register 17.18 at this time is indicated as (001), ie.

F 33= F 32 = F 3t = OF 23
 ” F 2□=F21=O F 1s = F l 2= Oe    F□1=1
次の第2クロック時には、F21が“1”にセットされ
、Fllは“0″にリセットされる。これを(010)
7と示す。
F 33 = F 32 = F 3t = OF 23
” F 2□=F21=O F 1s = F l 2= Oe F□1=1
At the next second clock, F21 is set to "1" and Fll is reset to "0". This (010)
Shown as 7.

同じように、第3クロック時には(100)?どなる。Similarly, (100) at the third clock? bawl.

$−4クロック時には、h2.hl、ho倍信号。At $-4 clock, h2. hl, ho-fold signal.

hz=1.ht=1.ho=O−(110)2”(6)
7が出力される。
hz=1. ht=1. ho=O−(110)2”(6)
7 is output.

MPoの出力は(6)?X (2)7= (5)sMP
lの出力は(6)フ×(3)?= (4)4F13〜F
1□が(O)7であるから、F13=1.F1□=O,
F11=1 F23=1.F2□=O,F 2t =0が設定され、
(045)、の状態となる。
What is the output of MPo (6)? X (2)7= (5)sMP
The output of l is (6) f x (3)? = (4) 4F13~F
Since 1□ is (O)7, F13=1. F1□=O,
F11=1 F23=1. F2□=O, F2t=0 are set,
The state becomes (045).

次の第5クロック時には、h2〜h、が0”であるため
、(450)?の状態となる。
At the next fifth clock, since h2 to h are 0'', the state is (450)?.

第6クロツクは、h 2=O,h 1=1.h o=1
、(oli)z= (3)  ?が出力され、MPO=
 (3)7X (2)?= (6)  7MP 1 =
 (3)  ? X (3)  ?= (2)  ?F
1=(0)?   (F□3=O−F□2=O9F 1
 t = o) テあるから、(526)?(7)状態
となる。
The sixth clock has h2=O, h1=1. h o = 1
, (oli)z= (3)? is output, MPO=
(3)7X (2)? = (6) 7MP 1 =
(3)? X (3)? = (2)? F
1=(0)? (F□3=O-F□2=O9F 1
t = o) Because there is te, (526)? (7) Becomes a state.

第7クロック時には、h=2.   (h 2=Q。At the seventh clock, h=2. (h2=Q.

h 1=1− h o=o)が出力される。h1=1−ho=o) is output.

MPo” (2)?X (2)?= (4)tMP1=
 (2)?X (3)?= (6)?Fl=(6)? であるから、F2へのセットは、   (6)?+(6
)?= (5)  フとなり、(254)?の状態とな
る。
MPo” (2)?X (2)?= (4)tMP1=
(2)? X (3)? = (6)? Fl=(6)? Therefore, setting to F2 is (6)? +(6
)? = (5) becomes (254)? The state will be as follows.

以下、同じような手順で進行し、第343クロツク時に
、(001)の状態が戻ってくる。
Thereafter, the process proceeds in a similar manner, and the state (001) returns at the 343rd clock.

一般に、Mr=2r−1の素数に対して、1+1ビツト
加算器をr個用い、最上位ビットの桁上げ出力を、最下
位ビットの桁上げ入力に接続し、結果ビットが総て“1
”となっている時を除く、すなわちオール“1”のAn
d回路を設け。
Generally, for a prime number Mr = 2r-1, r pieces of 1+1 bit adders are used, the carry output of the most significant bit is connected to the carry input of the least significant bit, and the resultant bits are all "1".
”, that is, all “1” An
d circuit installed.

その出力が1”のとき、結果出力ビットをII OII
とする。これを、Mr値加算回路と呼ぶ。
When the output is 1”, set the result output bit to II OII
shall be. This is called an Mr value addition circuit.

次に、I’×rビット乗算器を用い、この出力を第8図
と同じように、Mr値加算回路の加算入力に接続する。
Next, an I'×r bit multiplier is used, and its output is connected to the addition input of the Mr value addition circuit in the same way as in FIG.

これを、Mr値乗算回路と呼ぶ。This is called an Mr value multiplication circuit.

Mr値における最長周期疑似乱数を得るために。To obtain the longest period pseudorandom number in Mr value.

GF(Mr)上の原始既約多項式fM”nを与える。A primitive irreducible polynomial fM''n on GF(Mr) is given.

fMrn=anxn+an−1xn−1+・ ・ ・+
alx+a(。
fMrn=anxn+an-1xn-1+・・・・+
alx+a(.

乱数発生回路は、第1図で明らかなように、各段、r個
のシフトレジスタを設け、Mr値加算回路、Mr値乗算
回路を定数81に対応して設置する。このとき、Mr値
乗算回路の乗数設定はalの値である。乱数0次に対し
、上記の回路をn段設ける。最終段のシフト出力は、逆
論理値として各段Mr値乗算回路の被乗数入力に接続す
る。
As is clear from FIG. 1, the random number generation circuit is provided with r shift registers in each stage, and an Mr value addition circuit and an Mr value multiplication circuit are provided corresponding to the constant 81. At this time, the multiplier setting of the Mr value multiplication circuit is the value of al. For the zero-order random number, n stages of the above circuit are provided. The shift output of the final stage is connected as an inverse logic value to the multiplicand input of each stage Mr value multiplier circuit.

なお、第4図のN a n d回路13、And回路1
4は1乗算回路16において7の乗数で“0′″になる
ことから(第9図(b)参照)、特に必要というわけで
はない。
Note that the N a n d circuit 13 and the And circuit 1 in FIG.
Since 4 is a multiplier of 7 in the 1 multiplier circuit 16 and becomes "0'' (see FIG. 9(b)), it is not particularly necessary.

本実施例では、最大周期疑似乱数が、最終段シフトレジ
スタの正論理値を、Mr値列として使用することができ
る。また、各段からの正論理値を、OF(Mrn)の値
として使用できる。
In this embodiment, the maximum period pseudo-random number can use the positive logic value of the final stage shift register as the Mr value sequence. Further, the positive logic value from each stage can be used as the value of OF(Mrn).

〔発明の効果〕〔Effect of the invention〕

以上、説明したように、本発明によれば、多値乱数が簡
単に発生できるため、シミュレーション暗号への乱数の
応用範囲が拡張される。
As described above, according to the present invention, multivalued random numbers can be easily generated, so that the range of application of random numbers to simulation cryptography is expanded.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の一実施例を示す7値最長疑似乱数発生
回路の構成図、第2図は2ビツト加算器の構成図、第3
図は第2図の2ビツト加算器と論理回路を用いた3値加
算回路の構成図、第4図は第3図の加算結果を示す図、
第5図はシフトレジスタと3値加算回路を用いた3値乱
数発生回路の構成図、第6図は1+1ビツト加算器と3
×3ビット乗算器のブロック図、第7図は本発明に用い
る7値加算回路の構成図、第゛8図は本発明に用いる7
値乗算回路の構成図、第9図は第7図および第8図の加
算回路と乗算回路の演算結果を示す図である。 11:1+1ビット加算器、12:3X3ビット乗算器
、13:Nand回路、14 : A n d回路、1
5ニア値加算回路、16:7値乗算回路、17.18:
シフトレジスタ、1:2ビット加算器、2:排他的論理
和回路(mod2演算回路)またはN a n d回路
、3:And回路、4:シフトレジスタ。 職 穎 Q        (婦 @zlfJ         f、y日射2図    
  第7図 8j/■
Fig. 1 is a block diagram of a 7-value longest pseudorandom number generation circuit showing one embodiment of the present invention, Fig. 2 is a block diagram of a 2-bit adder, and Fig. 3 is a block diagram of a 2-bit adder.
The figure is a block diagram of a ternary addition circuit using the 2-bit adder and logic circuit in Figure 2, and Figure 4 is a diagram showing the addition result in Figure 3.
Figure 5 is a block diagram of a ternary random number generation circuit using a shift register and a ternary adder circuit, and Figure 6 is a 1+1 bit adder and a ternary random number generation circuit.
7 is a block diagram of a 3-bit multiplier, FIG. 7 is a block diagram of a 7-value addition circuit used in the present invention, and FIG.
FIG. 9, a block diagram of the value multiplication circuit, is a diagram showing the calculation results of the addition circuit and multiplication circuit of FIGS. 7 and 8. 11: 1+1 bit adder, 12: 3x3 bit multiplier, 13: Nand circuit, 14: A n d circuit, 1
5-near value addition circuit, 16:7-value multiplication circuit, 17.18:
Shift register, 1: 2-bit adder, 2: exclusive OR circuit (mod 2 arithmetic circuit) or N an d circuit, 3: And circuit, 4: shift register. Job Q (woman @zlfJ f, y solar radiation 2 diagram
Figure 7 8j/■

Claims (1)

【特許請求の範囲】 1、Mr=2^r−1ガロア体GF(Mr^n)上の乱
数を発生させるため、Mr個のビット加算器を用い、最
上位ビットの桁上げ出力を、最下位ビットの桁上げ入力
に接続し、And回路の出力が総て“1”のとき、結果
出力ビットを“0”とするようなMr値加算回路と、該
Mr値加算回路の加算入力にその出力が接続され、かつ
r×rビット乗算器を用いたMr値乗算回路と、各段r
個のシフトレジスタ複数段とで構成されることを特徴と
する乱数発生回路。 2、ガロア体3^n(GF(3^n))上の乱数を発生
させる場合、2個のビット加算器を用いた3値加算回路
と、2列のシフトレジスタとを設けることを特徴とする
特許請求の範囲第1項記載の乱数発生回路。
[Claims] 1. Mr = 2^r-1 In order to generate random numbers on the Galois field GF (Mr^n), Mr bit adders are used, and the carry output of the most significant bit is An Mr value addition circuit which is connected to the carry input of the lower bits and sets the result output bit to "0" when all the outputs of the AND circuit are "1", and the addition input of the Mr value addition circuit. Mr value multiplier circuit with output connected and using r×r bit multiplier, and each stage r
A random number generation circuit comprising a plurality of stages of shift registers. 2. When generating random numbers on the Galois field 3^n (GF(3^n)), a ternary addition circuit using two bit adders and a two-column shift register are provided. A random number generation circuit according to claim 1.
JP60032620A 1985-02-22 1985-02-22 Random number generation circuit Pending JPS61193183A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60032620A JPS61193183A (en) 1985-02-22 1985-02-22 Random number generation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60032620A JPS61193183A (en) 1985-02-22 1985-02-22 Random number generation circuit

Publications (1)

Publication Number Publication Date
JPS61193183A true JPS61193183A (en) 1986-08-27

Family

ID=12363892

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60032620A Pending JPS61193183A (en) 1985-02-22 1985-02-22 Random number generation circuit

Country Status (1)

Country Link
JP (1) JPS61193183A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008304914A (en) * 2007-06-07 2008-12-18 Harris Corp Mixed radix number generator with selected statistical artifact
JP2008304916A (en) * 2007-06-07 2008-12-18 Harris Corp Mixed radix conversion with a priori defined statistical artifacts
WO2020121451A1 (en) * 2018-12-12 2020-06-18 日本電気株式会社 Random number supplying method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008304914A (en) * 2007-06-07 2008-12-18 Harris Corp Mixed radix number generator with selected statistical artifact
JP2008304916A (en) * 2007-06-07 2008-12-18 Harris Corp Mixed radix conversion with a priori defined statistical artifacts
WO2020121451A1 (en) * 2018-12-12 2020-06-18 日本電気株式会社 Random number supplying method and device
JPWO2020121451A1 (en) * 2018-12-12 2021-10-21 日本電気株式会社 Random number supply method and device

Similar Documents

Publication Publication Date Title
Scott et al. A fast VLSI multiplier for GF (2 m)
CN1734526B (en) Data conversion device and method
US7921145B2 (en) Extending a repetition period of a random sequence
US4667301A (en) Generator for pseudo-random numbers
KR20050088506A (en) Scalable montgomery modular multiplier supporting multiple precision
JPS6197746A (en) Random number generator
JP2002040933A (en) Ciphering device using standard algorithm for ciphering data
US7024560B2 (en) Power-residue calculating unit using Montgomery algorithm
US7480691B2 (en) Arithmetic device for multiple precision arithmetic for Montgomery multiplication residue arithmetic
JP2011528810A (en) Method and processor apparatus for realizing multiplication of characteristic 2
CN101295237A (en) High-speed divider for quotient and balance
JPS61193183A (en) Random number generation circuit
Surendran et al. Implementation of fast multiplier using modified Radix-4 booth algorithm with redundant binary adder for low energy applications
JP4282193B2 (en) Multiplier
JP4709685B2 (en) Pseudorandom number generation device, pseudorandom number generation method, pseudorandom number generation program, encryption device, and decryption device
Xie et al. Low-complexity systolic multiplier for GF (2 m) using toeplitz matrix-vector product method
JPH01220528A (en) Parity generator
JPH0916379A (en) Communication method and equipment therefor
KR100316025B1 (en) Encryption and decryption device using data encryption standard algorithm
JP3806762B2 (en) Random number generator, random number generation method and program
Ramapragada et al. Design and FPGA implementation of high-speed area and power efficient 64-bit modified dual CLCG based pseudo random bit generator
JP3618554B2 (en) Code generation method and code generation apparatus
Ali et al. Optimal datapath design for a cryptographic processor: the Blowfish algorithm
Reji et al. Three-Operand Binary Addition Using Parallel Prefix Adders
JP3702475B2 (en) Automatic circuit generator