JP2006215824A - Random number generation circuit - Google Patents

Random number generation circuit Download PDF

Info

Publication number
JP2006215824A
JP2006215824A JP2005028113A JP2005028113A JP2006215824A JP 2006215824 A JP2006215824 A JP 2006215824A JP 2005028113 A JP2005028113 A JP 2005028113A JP 2005028113 A JP2005028113 A JP 2005028113A JP 2006215824 A JP2006215824 A JP 2006215824A
Authority
JP
Japan
Prior art keywords
random number
generation circuit
circuit
number generation
pseudo
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.)
Withdrawn
Application number
JP2005028113A
Other languages
Japanese (ja)
Inventor
Shizuka Ishimura
静 石村
Akira Iketani
昭 池谷
Kazumasa Chiaki
一雅 千明
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2005028113A priority Critical patent/JP2006215824A/en
Priority to CN 200610004502 priority patent/CN1815527A/en
Priority to TW095103201A priority patent/TW200629192A/en
Priority to US11/275,874 priority patent/US20070067374A1/en
Priority to KR1020060010022A priority patent/KR100737651B1/en
Publication of JP2006215824A publication Critical patent/JP2006215824A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To generate random numbers difficult to predict and prevent reduction in safety by external influence. <P>SOLUTION: This circuit comprises a pseudo random number generation circuit generating M-series of pseudo random numbers, a physical random number generation circuit generating physical random numbers, and a modulation circuit modulating the physical random numbers generated by the physical random number generation circuit by use of the pseudo random number generated by the pseudo random number generation circuit. The pseudo random number generation circuit can generate a plurality of M-series of pseudo random numbers, and switches the M-series to be generated by the pseudo random number generation circuit based on the physical random numbers generated by the physical random number generation circuit. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、データの暗号化等に用いられる乱数を生成する乱数生成回路に関する。   The present invention relates to a random number generation circuit that generates a random number used for data encryption or the like.

近年、様々な情報処理システムにおいて、データの暗号化が行われている。暗号化においては、安全性を向上させるために乱数が用いられることが多い。このような乱数としては、例えば、線形帰還シフトレジスタを用いて生成可能なM系列(Maximum length code)等の擬似乱数がある。また、M系列等の擬似乱数以外の乱数としては、原子核の崩壊現象がランダムとなることや電気雑音等の自然現象を利用した物理乱数が知られており、暗号化においても物理乱数を利用することができる(例えば、特許文献1)。
特開2000−66592号公報
In recent years, data encryption has been performed in various information processing systems. In encryption, random numbers are often used to improve security. As such a random number, for example, there is a pseudo-random number such as an M sequence (Maximum length code) that can be generated using a linear feedback shift register. In addition, as random numbers other than pseudo-random numbers such as M series, there are known physical random numbers that use natural phenomena such as the decay phenomenon of atomic nuclei and electrical noise, and physical random numbers are also used for encryption. (For example, Patent Document 1).
JP 2000-66592 A

しかしながら、M系列等の擬似乱数は、一定の算術プロセスあるいは関数の組合せから生成されるため、同じ初期条件を与えれば同一の値となり、乱数を予測することが可能である。そのため、暗号化にM系列等の擬似乱数を用いる場合、安全性が十分であると言うことはできない。   However, pseudo-random numbers such as M-sequences are generated from a certain arithmetic process or combination of functions. Therefore, if the same initial conditions are given, the random numbers can be predicted with the same value. Therefore, when using pseudo-random numbers such as M series for encryption, it cannot be said that the security is sufficient.

また、“0”及び“1”を生成する物理乱数としてトランジスタノイズを用いる場合、一般に“0”の発生確率が45〜55%の範囲となり、“0”と“1”との発生頻度の差が大きく、乱数として用いることができない。また、一般的に物理乱数は微弱な信号であるため、暗号化に用いられる際には、暗号化に利用可能なレベルまで増幅器を用いて増幅されることが多い。このように増幅器を用いて増幅される物理乱数は、電界や磁界の影響を受ける場合がある。そのため、外部からの影響により電界や磁界が変化することにより、乱数が操作され、安全性が低下してしまうことがあった。   When transistor noise is used as a physical random number for generating “0” and “1”, the probability of occurrence of “0” is generally in the range of 45 to 55%, and the difference in occurrence frequency between “0” and “1”. Cannot be used as a random number. In general, since a physical random number is a weak signal, when used for encryption, it is often amplified using an amplifier to a level usable for encryption. Thus, the physical random number amplified using an amplifier may be affected by an electric field or a magnetic field. Therefore, when an electric field or a magnetic field changes due to an external influence, a random number is manipulated and safety may be lowered.

本発明は上記課題を鑑みてなされたものであり、予測困難な乱数を生成し、かつ、外部からの影響による安全性の低下を防止する乱数生成回路を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a random number generation circuit that generates random numbers that are difficult to predict and that prevents a decrease in safety due to external influences.

上記目的を達成するため、本発明の乱数生成回路は、擬似乱数系列の擬似乱数を生成する擬似乱数生成回路と、物理乱数を生成する物理乱数生成回路と、前記物理乱数生成回路により生成された物理乱数を前記擬似乱数生成回路により生成された擬似乱数に応じて変化させて出力する変調回路と、を備えることとする。   In order to achieve the above object, a random number generation circuit according to the present invention is generated by a pseudo random number generation circuit that generates a pseudo random number of a pseudo random number sequence, a physical random number generation circuit that generates a physical random number, and the physical random number generation circuit. A modulation circuit that changes a physical random number according to the pseudorandom number generated by the pseudorandom number generation circuit and outputs the physical random number.

なお、前記変調回路は、前記物理乱数生成回路により生成された物理乱数と、前記擬似乱数生成回路により生成された擬似乱数との排他的論理和を行う回路を備えることとすることができる。   The modulation circuit may include a circuit that performs an exclusive OR of the physical random number generated by the physical random number generation circuit and the pseudo random number generated by the pseudo random number generation circuit.

また、本発明の乱数生成回路は、複数の擬似乱数系列の擬似乱数を生成する擬似乱数生成回路と、物理乱数を生成する物理乱数生成回路と、を備え、前記擬似乱数生成回路は、前記物理乱数生成回路により生成された物理乱数に基づいて前記擬似乱数生成回路が生成する擬似乱数系列を切り替えることとすることができる。   The random number generation circuit of the present invention includes a pseudo random number generation circuit that generates pseudo random numbers of a plurality of pseudo random number sequences, and a physical random number generation circuit that generates physical random numbers, and the pseudo random number generation circuit includes the physical random number generation circuit. The pseudo random number sequence generated by the pseudo random number generation circuit can be switched based on the physical random number generated by the random number generation circuit.

そして、前記擬似乱数系列がM系列であり、前記擬似乱数生成回路は、線形帰還シフトレジスタと、複数のM系列における夫々のタップ位置を記憶する複数のレジスタと、前記物理乱数生成回路により生成された物理乱数に基づいて前記複数のレジスタの何れかを選択する選択回路と、前記線形帰還シフトレジスタに記憶されているデータと、前記選択回路により選択されたレジスタに記憶されているタップ位置とに基づいて前記線形帰還シフトレジスタへの帰還信号を生成する帰還信号生成回路と、を備えることとすることができる。   The pseudo random number sequence is an M sequence, and the pseudo random number generation circuit is generated by a linear feedback shift register, a plurality of registers that store respective tap positions in a plurality of M sequences, and the physical random number generation circuit. A selection circuit for selecting one of the plurality of registers based on the physical random number, data stored in the linear feedback shift register, and a tap position stored in the register selected by the selection circuit. And a feedback signal generation circuit for generating a feedback signal to the linear feedback shift register.

予測困難な乱数を生成し、かつ、外部からの影響による安全性の低下を防止することができる。   It is possible to generate random numbers that are difficult to predict and to prevent a decrease in safety due to external influences.

==全体構成==
図1は、本発明の乱数生成回路を用いる一実施形態である自動車の錠の施錠・解錠を行うキーレスエントリーシステム1の全体構成を示す図である。キーレスエントリーシステム1は、携帯型の子機2と自動車等に搭載される親機3とを含んで構成されている。子機2は、例えば、自動車のドアロックやステアリングロックの鍵穴に差し込むキーのハンドル部等に設けられている。また、親機3は、自動車側に設けられている。
== Overall structure ==
FIG. 1 is a diagram showing an overall configuration of a keyless entry system 1 that locks and unlocks a car lock, which is an embodiment using a random number generation circuit of the present invention. The keyless entry system 1 includes a portable child device 2 and a parent device 3 mounted on an automobile or the like. The subunit | mobile_unit 2 is provided in the handle | steering-wheel part of the key etc. which are inserted in the keyhole of a door lock of a motor vehicle, or a steering lock, for example. Moreover, the main | base station 3 is provided in the motor vehicle side.

子機2は、電池11、操作スイッチ12、データ処理回路13、及び送受信回路14を備えている。電池11は、子機2の各部の動作に必要な電力を供給するためのものである。操作スイッチ12は、利用者からの施錠・解錠の指示を受け付けるスイッチである。データ処理回路13は、施錠・解錠の際に必要となる認証用のデータの生成等を行う。送受信回路14は、データ処理回路13から出力されるデジタルデータをアナログデータに変換し、これを増幅して電磁波として送出する回路である。また、送受信回路14は、親機3から送出された電磁波を受信し、これをデジタルデータに変換してデータ処理回路13に入力することもできる。なお、電磁波としては、電波や赤外線が用いられる。   The subunit | mobile_unit 2 is provided with the battery 11, the operation switch 12, the data processing circuit 13, and the transmission / reception circuit 14. FIG. The battery 11 is for supplying electric power necessary for the operation of each part of the child device 2. The operation switch 12 is a switch that receives a locking / unlocking instruction from a user. The data processing circuit 13 generates authentication data necessary for locking / unlocking. The transmission / reception circuit 14 is a circuit that converts the digital data output from the data processing circuit 13 into analog data, amplifies it, and sends it as electromagnetic waves. In addition, the transmission / reception circuit 14 can receive an electromagnetic wave transmitted from the parent device 3, convert it into digital data, and input the digital data to the data processing circuit 13. Note that radio waves and infrared rays are used as the electromagnetic waves.

親機3は、データ処理回路21、送受信回路22、及び駆動回路23を備えている。データ処理回路21は、子機2から受信する認証用のデータに基づいた認証処理等を行う。送受信回路22は、子機2から送出された電磁波を受信し、これをデジタルデータに変換してデータ処理回路22に入力する回路である。また、送受信回路22は、データ処理回路21から出力されるデジタルデータをアナログデータに変換し、これを増幅して電磁波として送出することもできる。駆動回路23は、自動車の錠を施錠・解錠するロック機構を作動させるアクチュエータ24に駆動信号を送信する回路である。なお、親機2の各部21〜23には、自動車のバッテリ25から電力が供給されている。   The base unit 3 includes a data processing circuit 21, a transmission / reception circuit 22, and a drive circuit 23. The data processing circuit 21 performs an authentication process based on the authentication data received from the slave unit 2. The transmission / reception circuit 22 is a circuit that receives the electromagnetic wave transmitted from the slave unit 2, converts it into digital data, and inputs the digital data to the data processing circuit 22. The transmission / reception circuit 22 can also convert the digital data output from the data processing circuit 21 into analog data, amplify it, and send it out as electromagnetic waves. The drive circuit 23 is a circuit that transmits a drive signal to an actuator 24 that operates a lock mechanism that locks and unlocks the lock of the automobile. In addition, electric power is supplied to each part 21-23 of the main | base station 2 from the battery 25 of a motor vehicle.

==データ処理回路の構成==
図2は、データ処理回路13の構成を示す図である。データ処理回路13は、CPU51A、RAM(Random Access Memory)52A、EEPROM(Electrically Erasable Programmable Read-Only Memory)53A、乱数生成回路54A、暗号処理回路55A、及び入出力ポート56Aを備えている。そして、各部51A〜56Aはバス57Aにより互いに通信可能に接続されている。
== Configuration of Data Processing Circuit ==
FIG. 2 is a diagram illustrating a configuration of the data processing circuit 13. The data processing circuit 13 includes a CPU 51A, a RAM (Random Access Memory) 52A, an EEPROM (Electrically Erasable Programmable Read-Only Memory) 53A, a random number generation circuit 54A, an encryption processing circuit 55A, and an input / output port 56A. And each part 51A-56A is mutually connected by the bus | bath 57A so that communication is possible.

CPU51Aは、データ処理回路13の全体を制御するものである。RAM52Aには、CPU51Aが使用する作業用データ等が記憶される。EEPROM53Aは書き換え可能な不揮発性メモリであり、プログラムや保存用のデータ等が記憶されている。乱数生成回路54Aは、暗号化の処理において用いられる乱数を生成する回路である。暗号処理回路55Aは、共通鍵ブロック暗号方式における転置又は換字等の処理を行う回路である。入出力ポート56Aは、データ処理回路13の外部にある操作スイッチ12や送受信回路14等とデータの送受信を行うためのインタフェースである。   The CPU 51A controls the entire data processing circuit 13. The RAM 52A stores work data used by the CPU 51A. The EEPROM 53A is a rewritable nonvolatile memory, and stores a program, data for storage, and the like. The random number generation circuit 54A is a circuit that generates a random number used in the encryption process. The encryption processing circuit 55A is a circuit that performs processing such as transposition or substitution in the common key block encryption method. The input / output port 56 </ b> A is an interface for transmitting / receiving data to / from the operation switch 12, the transmission / reception circuit 14, and the like outside the data processing circuit 13.

なお、本実施形態では、共通鍵ブロック暗号方式としてDES(Data Encryption Standard)を用いることとする。このようなデータ処理回路13では、プログラムの実行や暗号処理回路55Aの制御等により、DESの暗号化又は復号の処理が行われる。なお、データ処理回路21も同様の構成であり、CPU51B、RAM52B、EEPROM53B、乱数生成回路54B、暗号処理回路55B、入出力ポート56B、及び各部51B〜56Bを互いに通信可能に接続するバス57Bを備えている。   In this embodiment, DES (Data Encryption Standard) is used as the common key block encryption method. In such a data processing circuit 13, DES encryption or decryption processing is performed by executing a program or controlling the encryption processing circuit 55A. The data processing circuit 21 has the same configuration, and includes a CPU 51B, a RAM 52B, an EEPROM 53B, a random number generation circuit 54B, an encryption processing circuit 55B, an input / output port 56B, and a bus 57B that connects the units 51B to 56B so that they can communicate with each other. ing.

==通信手順==
図3は、キーレスエントリーシステム1の子機2と親機3との間における通信手順を示すフローチャートである。まず、子機2の操作スイッチ12の操作等により送信処理が起動される(S301)。子機2のデータ処理回路13は、EEPROM53Aに記憶されている車番(車体番号)を親機3に送信する(S302)。親機3のデータ処理回路21は、子機2から車番が送信されてくるのを待機しており(S303)、子機2から送信されてくる車番を受信すると、当該車番をEEPROM53Bに記憶されている車番と比較する(S304)。
== Communication procedure ==
FIG. 3 is a flowchart showing a communication procedure between the slave unit 2 and the master unit 3 of the keyless entry system 1. First, a transmission process is started by operating the operation switch 12 of the slave unit 2 (S301). The data processing circuit 13 of the subunit | mobile_unit 2 transmits the vehicle number (body number) memorize | stored in EEPROM53A to the main | base station 3 (S302). The data processing circuit 21 of the master unit 3 waits for the vehicle number to be transmitted from the slave unit 2 (S303). When the vehicle number transmitted from the slave unit 2 is received, the vehicle number is stored in the EEPROM 53B. (S304).

車番が一致しない場合(S304:NG)、親機3のデータ処理回路21は、別の自動車の車番が送信されてきたと判断し、受信待機処理に戻る(S303)。車番が一致すると(S304:OK)、データ処理回路21は、乱数生成回路54Bを用いて64ビットの乱数である一時鍵R0を生成する(S305)。そして、データ処理回路21は、この一時鍵R0を、EEPROM53Bに記憶されている共通鍵Kを用いてDESで暗号化して子機2に送信する(S306)。   If the vehicle numbers do not match (S304: NG), the data processing circuit 21 of the parent device 3 determines that the vehicle number of another vehicle has been transmitted, and returns to the reception standby process (S303). When the vehicle numbers match (S304: OK), the data processing circuit 21 generates a temporary key R0 that is a 64-bit random number using the random number generation circuit 54B (S305). Then, the data processing circuit 21 encrypts this temporary key R0 with DES using the common key K stored in the EEPROM 53B and transmits it to the slave unit 2 (S306).

子機2のデータ処理回路13は、親機3から送信されてくる暗号化された一時鍵R0を受信すると、EEPROM53Aに記憶されている共通鍵Kを用いて一時鍵R0を復号する(S307)。続いて、データ処理回路13は、乱数生成回路54Aを用いて64ビットの乱数である一時鍵R1を生成する(S308)。そして、データ処理回路13は、この一時鍵R1を親機3から受信した一時鍵R0を用いてDESで暗号化して親機3に送信する(S309)。親機3のデータ処理回路21は、子機2から送信されてくる暗号化された一時鍵R1を受信すると、一時鍵R0を用いて一時鍵R1を復号する(S310)。   Upon receiving the encrypted temporary key R0 transmitted from the parent device 3, the data processing circuit 13 of the child device 2 decrypts the temporary key R0 using the common key K stored in the EEPROM 53A (S307). . Subsequently, the data processing circuit 13 uses the random number generation circuit 54A to generate a temporary key R1 that is a 64-bit random number (S308). Then, the data processing circuit 13 encrypts this temporary key R1 with DES using the temporary key R0 received from the parent device 3 and transmits it to the parent device 3 (S309). When receiving the encrypted temporary key R1 transmitted from the child device 2, the data processing circuit 21 of the parent device 3 decrypts the temporary key R1 using the temporary key R0 (S310).

その後、子機2のデータ処理回路13は、施錠・解錠指示等の情報データを、一時鍵R1を用いてDESで暗号化して親機3に送信する(S311)。親機3のデータ処理回路21は、子機2から送信されてくる暗号化された情報データを受信すると、一時鍵R1を用いて情報データを復号する(S312)。そして、データ処理回路21は、情報データに基づいて、例えば、駆動回路23を介してアクチュエータ24に施錠・解錠指示信号を送信する。   Thereafter, the data processing circuit 13 of the slave unit 2 encrypts information data such as a lock / unlock instruction with DES using the temporary key R1 and transmits it to the master unit 3 (S311). When receiving the encrypted information data transmitted from the child device 2, the data processing circuit 21 of the parent device 3 decrypts the information data using the temporary key R1 (S312). Then, the data processing circuit 21 transmits a locking / unlocking instruction signal to the actuator 24 via the drive circuit 23 based on the information data, for example.

このように、キーレスエントリーシステム1においては、子機2及び親機3において乱数生成回路54A,54Bを用いて一時鍵を生成し、DESによる暗号化及び復号の処理を繰り返し行うことにより、セキュリティ強度を高めている。   As described above, in the keyless entry system 1, the slave unit 2 and the master unit 3 generate temporary keys using the random number generation circuits 54A and 54B, and repeat the encryption and decryption processing by DES, thereby increasing the security strength. Is increasing.

==乱数生成回路の構成==
本実施形態においては、図3で説明した暗号化及び復号の処理における乱数生成処理において、乱数生成回路54A,54Bが用いられている。乱数生成回路54A及び乱数生成回路54Bは同様の構成であるため、以後、乱数生成回路54Aについて説明する。
== Configuration of random number generation circuit ==
In the present embodiment, random number generation circuits 54A and 54B are used in the random number generation processing in the encryption and decryption processing described in FIG. Since the random number generation circuit 54A and the random number generation circuit 54B have the same configuration, the random number generation circuit 54A will be described below.

図4は、乱数生成回路54Aの構成を示す図である。乱数生成回路54Aは、分周回路61、ボーレートジェネレータ62、カウンタ63、シフトレジスタ64、マスクAレジスタ65、マスクBレジスタ66、マルチプレクサ67、AND回路68、奇数パリティジェネレータ69、物理乱数生成回路70、OR回路71、D型フリップフロップ(以後、「D−FF」と称する)72、AND回路73、OR回路74、EXOR回路75、マルチプレクサ76、及びシフトレジスタ77を備えている。なお、シフトレジスタ64、マスクAレジスタ65、マスクBレジスタ66、及びシフトレジスタ77は、バス57Aに接続されている。   FIG. 4 is a diagram showing a configuration of the random number generation circuit 54A. The random number generation circuit 54A includes a frequency divider 61, a baud rate generator 62, a counter 63, a shift register 64, a mask A register 65, a mask B register 66, a multiplexer 67, an AND circuit 68, an odd parity generator 69, a physical random number generation circuit 70, An OR circuit 71, a D-type flip-flop (hereinafter referred to as "D-FF") 72, an AND circuit 73, an OR circuit 74, an EXOR circuit 75, a multiplexer 76, and a shift register 77 are provided. The shift register 64, the mask A register 65, the mask B register 66, and the shift register 77 are connected to the bus 57A.

分周回路61は、データ処理回路13における例えば6MHzのシステムクロック(Sys_clk)を4分の1に分周する回路である。また、ボーレートジェネレータ62は、例えば8ビットのレジスタに分周値を設定可能な回路である。そして、カウンタ63は、分周回路61から出力されるクロックをボーレートジェネレータ62に設定された分周値に基づいてカウントすることにより、乱数生成回路54Aの動作クロック(RCLK)を出力する。   The frequency dividing circuit 61 is a circuit that divides, for example, a 6 MHz system clock (Sys_clk) in the data processing circuit 13 by a factor of four. The baud rate generator 62 is a circuit that can set a frequency division value in, for example, an 8-bit register. Then, the counter 63 outputs the operation clock (RCLK) of the random number generation circuit 54A by counting the clock output from the frequency dividing circuit 61 based on the frequency division value set in the baud rate generator 62.

シフトレジスタ64は、例えば32ビット(Q〜Q31)の線形帰還シフトレジスタであり、クロック入力(C)には動作クロック(RCLK)が入力され、1ビット目(Q)のデータ入力端子(D)に帰還信号(F)が入力される。なお、シフトレジスタ64の初期値は、CPU51Aによりバス57Aを介して設定される。 The shift register 64 is, for example, a 32-bit (Q 0 to Q 31 ) linear feedback shift register, and an operation clock (RCLK) is input to the clock input (C), and a data input terminal of the first bit (Q 0 ). The feedback signal (F) is input to (D). The initial value of the shift register 64 is set by the CPU 51A via the bus 57A.

マスクAレジスタ65は、例えば32ビット(AQ〜AQ31)のレジスタであり、シフトレジスタ64でM系列の擬似乱数を生成する際のタップ位置を記憶するものである。例えば、シフトレジスタ64を用いて4ビットのM系列を生成する場合、帰還信号(F)を、例えば原始多項式X+X+1に基づいて次式(1)により求めることができる。

Figure 2006215824
The mask A register 65 is, for example, a 32-bit (AQ 0 to AQ 31 ) register, and stores a tap position when the shift register 64 generates an M-sequence pseudo-random number. For example, when a 4-bit M sequence is generated using the shift register 64, the feedback signal (F) can be obtained by the following equation (1) based on, for example, the primitive polynomial X 4 + X + 1.
Figure 2006215824

つまり、この場合、タップ位置は3ビット目と4ビット目であり、マスクAレジスタ65の3ビット目(AQ)と4ビット目(AQ)とに、例えば“1”が設定され、マスクAレジスタ65のその他のビットには、例えば“0”が設定される。 That is, in this case, the tap positions are the third bit and the fourth bit, and for example, “1” is set in the third bit (AQ 2 ) and the fourth bit (AQ 3 ) of the mask A register 65, and the mask For example, “0” is set in the other bits of the A register 65.

同様に、マスクBレジスタ66は、例えば32ビット(BQ〜BQ31)のレジスタであり、マスクAレジスタ66とは異なるタップ位置を記憶するものである。例えば、シフトレジスタ64を用いて前述したものとは異なる4ビットのM系列を生成する場合、帰還信号(F)を、例えば原始多項式X+X+1に基づいて次式(2)により求めることができる。

Figure 2006215824
Similarly, the mask B register 66 is a 32-bit (BQ 0 to BQ 31 ) register, for example, and stores a tap position different from the mask A register 66. For example, when generating a 4-bit M sequence different from that described above using the shift register 64, the feedback signal (F) is obtained by the following equation (2) based on, for example, the primitive polynomial X 4 + X 3 +1. Can do.
Figure 2006215824

つまり、この場合、タップ位置は1ビット目と4ビット目であり、マスクBレジスタ66の1ビット目(BQ)と4ビット目(BQ)とに、例えば“1”が設定され、マスクBレジスタ66のその他のビットには、例えば“0”が設定される。なお、マスクAレジスタ65及びマスクBレジスタ66の値は、CPU51Aによりバス57Aを介して設定される。 That is, in this case, the tap positions are the first bit and the fourth bit, and for example, “1” is set in the first bit (BQ 0 ) and the fourth bit (BQ 3 ) of the mask B register 66, and the mask For example, “0” is set in the other bits of the B register 66. Note that the values of the mask A register 65 and the mask B register 66 are set by the CPU 51A via the bus 57A.

マルチプレクサ67には、マスクAレジスタ65の値(AQ〜AQ31)とマスクBレジスタ66の値(BQ〜BQ31)とが入力されており、選択信号(SEL)が例えば“0”の場合はA側(AQ〜AQ31)を出力し、選択信号(SEL)が例えば“1”の場合はB側(BQ〜BQ31)を出力する。 The value of the mask A register 65 (AQ 0 to AQ 31 ) and the value of the mask B register 66 (BQ 0 to BQ 31 ) are input to the multiplexer 67, and the selection signal (SEL) is “0”, for example. In this case, the A side (AQ 0 to AQ 31 ) is output, and when the selection signal (SEL) is “1”, for example, the B side (BQ 0 to BQ 31 ) is output.

AND回路68(68−0〜68−31)は、シフトレジスタ64の値(Q〜Q31)と、マルチプレクサ67から出力されるマスクAレジスタ65の値(AQ〜AQ31)またはマスクBレジスタ66の値(BQ〜BQ31)との、ビット毎の論理和を行う回路である。つまり、AND回路68からは、シフトレジスタ64の値(Q〜Q31)のうち、タップ位置に対応するビットについては、そのビットに記憶されている値が出力され、それ以外のビットについては“0”が出力される。 AND circuit 68 (68-0~68-31) is the value of the shift register 64 (Q 0 to Q 31), the value (AQ 0 ~AQ 31) of the mask A register 65 to be output from the multiplexer 67 or a mask B This is a circuit for performing a logical OR for each bit with the value (BQ 0 to BQ 31 ) of the register 66. In other words, the value stored in the bit is output from the AND circuit 68 for the bit corresponding to the tap position among the values (Q 0 to Q 31 ) of the shift register 64, and the other bits are output. “0” is output.

奇数パリティジェネレータ69は、AND回路68から出力される値の排他的論理和を行う回路である。つまり、マルチプレクサ67から、マスクAレジスタ65の値(AQ〜AQ31)が出力される場合、次式(3)に示すように、奇数パリティジェネレータ69から出力される値は、マスクAレジスタ65に設定したタップ位置に基づいたM系列を生成する場合における、シフトレジスタ64への帰還信号(F)となる。

Figure 2006215824
The odd parity generator 69 is a circuit that performs exclusive OR of values output from the AND circuit 68. That is, when the value of the mask A register 65 (AQ 0 to AQ 31 ) is output from the multiplexer 67, the value output from the odd parity generator 69 is the mask A register 65 as shown in the following equation (3). This is the feedback signal (F) to the shift register 64 when generating an M series based on the tap position set to.
Figure 2006215824

同様に、マルチプレクサ67から、マスクBレジスタ66の値(BQ〜BQ31)が出力される場合、次式(4)に示すように、奇数パリティジェネレータ69から出力される値は、マスクBレジスタ66に設定したタップ位置に基づいたM系列を生成する場合における、シフトレジスタ64への帰還信号(F)となる。

Figure 2006215824
Similarly, when the value (BQ 0 to BQ 31 ) of the mask B register 66 is output from the multiplexer 67, the value output from the odd parity generator 69 is the mask B register as shown in the following equation (4). This is a feedback signal (F) to the shift register 64 when generating an M series based on the tap position set to 66.
Figure 2006215824

また、本実施形態においては、奇数パリティジェネレータ69から出力される帰還信号(F)を、M系列の擬似乱数(PSR:pseudo random numbers)として用いることとする。   In the present embodiment, the feedback signal (F) output from the odd parity generator 69 is used as an M-sequence pseudo random number (PSR).

物理乱数生成回路70は、物理乱数(PHR:physical random numbers)を生成する回路である。図5に物理乱数生成回路70の構成を示す。物理乱数生成回路70は、物理乱数発生源81、増幅回路82、及び二値化回路83を備える。物理乱数発生源81は、自然現象に基づいてランダムに変化する信号を生じうるものであり、例えば、特許文献1に開示されるような、接合を含む電流路に生じる雑音信号を生じる半導体素子を含むものとすることができる。なお、これに限られず、放射性物質の崩壊を利用したもの等もこの物理乱数発生源81として用いることができる。   The physical random number generation circuit 70 is a circuit that generates physical random numbers (PHR). FIG. 5 shows the configuration of the physical random number generation circuit 70. The physical random number generation circuit 70 includes a physical random number generation source 81, an amplification circuit 82, and a binarization circuit 83. The physical random number generation source 81 can generate a signal that randomly changes based on a natural phenomenon. For example, as disclosed in Patent Document 1, a semiconductor element that generates a noise signal generated in a current path including a junction is provided. Can be included. However, the present invention is not limited to this, and the physical random number generation source 81 that uses the decay of radioactive material can also be used.

物理乱数発生源81にて生成された信号は、増幅回路82において増幅され、さらに二値化回路83において二値化処理される。二値化回路83は、増幅回路より出力される増幅された信号の振幅と所定の閾値とを比較し、例えば、増幅された信号の振幅が所定の閾値より高いときには“1”を、低いときには“0”を物理乱数(PHR:physical random numbers)として出力する。なお、二値化回路83における閾値のレベルは、“1”および“0”の発生確率が概ね45〜55%となるように設定されている。   The signal generated by the physical random number generation source 81 is amplified by the amplification circuit 82 and further binarized by the binarization circuit 83. The binarization circuit 83 compares the amplitude of the amplified signal output from the amplifier circuit with a predetermined threshold. For example, when the amplitude of the amplified signal is higher than the predetermined threshold, it is “1”. “0” is output as physical random numbers (PHR). The threshold level in the binarization circuit 83 is set so that the probability of occurrence of “1” and “0” is approximately 45 to 55%.

OR回路71は、物理乱数生成回路70から出力される物理乱数(PHR)と、乱数生成回路54Aにおいて物理乱数を用いるかどうかを示す選択信号(MODE1)との論理和を行う回路である。本実施形態において、選択信号(MODE1)が“0”のときをカウンタモード、“1”のときをCPUモードと称することとする。カウンタモードの場合、OR回路71から出力される信号は、物理乱数生成回路70から出力される物理乱数(PHR)となり、他の回路において物理乱数(PHR)が用いられることとなる。一方、CPUモードの場合、OR回路71から出力される信号は常に“1”となるため、他の回路において物理乱数(PHR)が用いられないこととなる。   The OR circuit 71 is a circuit that performs a logical sum of a physical random number (PHR) output from the physical random number generation circuit 70 and a selection signal (MODE1) indicating whether or not the physical random number is used in the random number generation circuit 54A. In this embodiment, when the selection signal (MODE1) is “0”, it is referred to as a counter mode, and when it is “1”, it is referred to as a CPU mode. In the counter mode, the signal output from the OR circuit 71 is a physical random number (PHR) output from the physical random number generation circuit 70, and the physical random number (PHR) is used in other circuits. On the other hand, in the CPU mode, since the signal output from the OR circuit 71 is always “1”, the physical random number (PHR) is not used in other circuits.

D−FF72のデータ入力端子(D)には、OR回路71から出力される信号が入力される。つまり、カウンタモードの場合、D−FF72のデータ入力端子(D)には物理乱数(PHR)が入力されることとなる。また、D−FF72のクロック入力端子(C)には、動作クロック(RCLK)が入力される。そして、D−FF72のデータ入力端子(D)に入力されている物理乱数(PHR)が、動作クロック(RCLK)の立ち上がり時に、データ出力端子(Q)から物理乱数(PHRQ)として出力される。   A signal output from the OR circuit 71 is input to the data input terminal (D) of the D-FF 72. That is, in the counter mode, a physical random number (PHR) is input to the data input terminal (D) of the D-FF 72. The operation clock (RCLK) is input to the clock input terminal (C) of the D-FF 72. The physical random number (PHR) input to the data input terminal (D) of the D-FF 72 is output as a physical random number (PHRQ) from the data output terminal (Q) when the operation clock (RCLK) rises.

AND回路73は、D−FF72から出力される物理乱数(PHRQ)と、乱数生成回路54Aにおける動作モードを選択する選択信号(MODE0)との論理積を行い、マルチプレクサ67への選択信号(SEL)を出力する回路である。本実施形態において、選択信号(MODE0)が“0”のときを乗算モード、“1”のときをホッピングモードと称することとする。乗算モードとは、物理乱数をM系列の擬似乱数に応じて変化させて出力するモードであり、ホッピングモードとは、物理乱数に基づいてM系列を切り替えて出力するモードである。   The AND circuit 73 performs a logical product of the physical random number (PHRQ) output from the D-FF 72 and a selection signal (MODE0) for selecting the operation mode in the random number generation circuit 54A, and selects the selection signal (SEL) to the multiplexer 67. Is a circuit that outputs. In this embodiment, when the selection signal (MODE0) is “0”, it is referred to as a multiplication mode, and when it is “1”, it is referred to as a hopping mode. The multiplication mode is a mode in which a physical random number is changed according to an M-sequence pseudo-random number and is output, and the hopping mode is a mode in which the M-sequence is switched and output based on the physical random number.

乗算モードの場合、AND回路73から出力される選択信号(SEL)は常に“0”となる。つまり、乗算モードの場合、マルチプレクサ67はマスクAレジスタ65の値(AQ〜AQ31)を出力する。ホッピングモードの場合、AND回路73から出力される選択信号(SEL)は、D−FF72から出力される物理乱数(PHRQ)となる。つまり、ホッピングモードの場合、マルチプレクサ67は物理乱数(PHRQ)に応じてマスクAレジスタ65の値(AQ〜AQ31)またはマスクBレジスタ66の値(BQ〜BQ31)を出力する。 In the multiplication mode, the selection signal (SEL) output from the AND circuit 73 is always “0”. That is, in the multiplication mode, the multiplexer 67 outputs the value (AQ 0 to AQ 31 ) of the mask A register 65. In the hopping mode, the selection signal (SEL) output from the AND circuit 73 is a physical random number (PHRQ) output from the D-FF 72. That is, when the hopping mode, the multiplexer 67 outputs the value of the mask A register 65 in accordance with the physical random number (PHRQ) value of (AQ 0 ~AQ 31) or mask B register 66 (BQ 0 ~BQ 31).

OR回路74は、D−FF72から出力される物理乱数(PHRQ)と、動作モードの選択信号(MODE0)との論理和を行う回路である。つまり、乗算モードの場合、OR回路74から出力される信号は物理乱数(PHRQ)となり、ホッピングモードの場合、物理乱数(PHRQ)にかかわらず常に“1”となる。   The OR circuit 74 is a circuit that performs a logical sum of the physical random number (PHRQ) output from the D-FF 72 and the operation mode selection signal (MODE0). That is, in the multiplication mode, the signal output from the OR circuit 74 is a physical random number (PHRQ), and in the hopping mode, it is always “1” regardless of the physical random number (PHRQ).

EXOR回路75は、奇数パリティジェネレータ69から出力される擬似乱数(PSR)と、OR回路74から出力される信号との排他的論理和を行い、乱数(R)を出力する回路である。   The EXOR circuit 75 is a circuit that performs exclusive OR of the pseudo random number (PSR) output from the odd parity generator 69 and the signal output from the OR circuit 74 and outputs a random number (R).

マルチプレクサ76には、動作クロック(RCLK)を反転したクロック(/RCLK)と、CPU51Aからの読み出し信号(CPU_RD)とが入力される。そして、マルチプレクサ76は、選択信号(MODE1)がカウンタモードの場合はクロック(/RCLK)を出力し、CPUモードの場合は読み出し信号(CPU_RD)を出力する。   The multiplexer 76 receives a clock (/ RCLK) obtained by inverting the operation clock (RCLK) and a read signal (CPU_RD) from the CPU 51A. The multiplexer 76 outputs a clock (/ RCLK) when the selection signal (MODE1) is in the counter mode, and outputs a read signal (CPU_RD) when it is in the CPU mode.

シフトレジスタ77は、例えば8ビットの線形シフトレジスタであり、データ入力端子(D)にEXOR回路75から出力される乱数(R)が入力され、クロック入力端子(C)にマルチプレクサ76から出力されるクロック信号(/RCLK)または読み出し信号(CPU_RD)が入力される。   The shift register 77 is an 8-bit linear shift register, for example, and the random number (R) output from the EXOR circuit 75 is input to the data input terminal (D), and output from the multiplexer 76 to the clock input terminal (C). A clock signal (/ RCLK) or a read signal (CPU_RD) is input.

なお、本実施形態においては、シフトレジスタ64、マスクAレジスタ65、マスクBレジスタ66、マルチプレクサ67、AND回路68、及び奇数パリティジェネレータ69により本発明の擬似乱数生成回路が構成され、EXOR回路75により変調回路が構成されている。また、本実施形態において、マルチプレクサ67により本発明の選択回路が構成され、AND回路68及び奇数パリティジェネレータ69により本発明の帰還信号生成回路が構成されている。   In the present embodiment, the shift register 64, the mask A register 65, the mask B register 66, the multiplexer 67, the AND circuit 68, and the odd parity generator 69 constitute the pseudo random number generation circuit of the present invention, and the EXOR circuit 75 A modulation circuit is configured. In this embodiment, the multiplexer 67 constitutes the selection circuit of the present invention, and the AND circuit 68 and the odd parity generator 69 constitute the feedback signal generation circuit of the present invention.

==乱数生成回路の動作説明==
次に、乱数生成回路54Aの動作について説明する。
== Description of operation of random number generation circuit ==
Next, the operation of the random number generation circuit 54A will be described.

(1)乗算モード
まず、カウンタモードで、動作モードが乗算モードの場合の動作を説明する。乗算モードの場合、AND回路73から出力される選択信号(SEL)は常に“0”となり、マスクAレジスタ65の値(AQ〜AQ31)がマルチプレクサ67から出力される。そして、シフトレジスタ64の値(Q〜Q31)と、マスクAレジスタ65の値(AQ〜AQ31)との論理積を行った結果がAND回路68から出力され、奇数パリティジェネレータ69によってその排他的論理和が行われ、シフトレジスタ64への帰還信号(F)が生成される。また、奇数パリティジェネレータ69から出力される信号は、擬似乱数(PSR)としてEXOR回路75に入力される。この擬似乱数(PSR)は、マスクAレジスタ65に設定されたタップ位置に応じたM系列の擬似乱数となる。
(1) Multiplication Mode First, the operation in the counter mode when the operation mode is the multiplication mode will be described. In the multiplication mode, the selection signal (SEL) output from the AND circuit 73 is always “0”, and the value (AQ 0 to AQ 31 ) of the mask A register 65 is output from the multiplexer 67. Then, the value of the shift register 64 (Q 0 ~Q 31), the value of the mask A register 65 a result of the logical product of the (AQ 0 ~AQ 31) is outputted from the AND circuit 68, the odd parity generator 69 The exclusive OR is performed and a feedback signal (F) to the shift register 64 is generated. The signal output from the odd parity generator 69 is input to the EXOR circuit 75 as a pseudo random number (PSR). This pseudo random number (PSR) is an M-sequence pseudo random number corresponding to the tap position set in the mask A register 65.

EXOR回路75は、擬似乱数(PSR)と、OR回路74から出力される物理乱数(PHRQ)との排他的論理和を行い、乱数(R)をシフトレジスタ77に出力する。そして、シフトレジスタ77のクロック入力端子(C)には、マルチプレクサ76を介してクロック(/RCLK)が入力される。   The EXOR circuit 75 performs an exclusive OR of the pseudo random number (PSR) and the physical random number (PHRQ) output from the OR circuit 74, and outputs the random number (R) to the shift register 77. The clock (/ RCLK) is input to the clock input terminal (C) of the shift register 77 via the multiplexer 76.

図6は、各信号の出力タイミングを示すタイミングチャートである。図に示すように、動作クロック(RCLK)の立ち上がり時(例えば時刻t1)に、物理乱数(PHRQ)、擬似乱数(PSR)が生成され、さらにそれらの排他的論理和である乱数(R)が生成される。そして、動作クロック(RCLK)の立ち下がり時、つまり、クロック(/RCLK)の立ち上がり時(例えば時刻t2)に、乱数(R)がシフトレジスタ77にセットされる。   FIG. 6 is a timing chart showing the output timing of each signal. As shown in the figure, a physical random number (PHRQ) and a pseudo-random number (PSR) are generated at the rising edge of the operation clock (RCLK) (for example, time t1), and a random number (R) that is an exclusive OR of these is generated. Generated. Then, the random number (R) is set in the shift register 77 when the operation clock (RCLK) falls, that is, when the clock (/ RCLK) rises (for example, time t2).

なお、シフトレジスタ77は、EXOR回路75から出力される乱数(R)を8ビット記憶すると、CPU51Aに割込信号を送信する。CPU51Aは、この割込信号を受信すると、8ビットの乱数(R)をシフトレジスタ77から読み出す。   The shift register 77 stores an 8-bit random number (R) output from the EXOR circuit 75 and transmits an interrupt signal to the CPU 51A. When the CPU 51A receives this interrupt signal, it reads an 8-bit random number (R) from the shift register 77.

図7は、EXOR回路75に入力される物理乱数(PHRQ)及び擬似乱数(PSR)の組合せと、その発生確率を示す図である。物理乱数(PHRQ)が“0”となる確率をX(0≦X≦1)、擬似乱数(PSR)が“0”となる確率をY(0≦Y≦1)とすると、物理乱数(PHRQ)及び擬似乱数(PSR)が共に“0”となる確率はXY、物理乱数(PHRQ)が“0”、擬似乱数(PSR)が“1”となる確率はX(1−Y)となる。また、物理乱数(PHRQ)が“1”、擬似乱数が“0”となる確率は(1−X)Y、物理乱数(PHRQ)及び擬似乱数(PSR)が共に“1”となる確率は(1−X)(1−Y)となる。   FIG. 7 is a diagram showing a combination of physical random numbers (PHRQ) and pseudo-random numbers (PSR) input to the EXOR circuit 75 and their occurrence probabilities. If the probability that the physical random number (PHRQ) is “0” is X (0 ≦ X ≦ 1) and the probability that the pseudo-random number (PSR) is “0” is Y (0 ≦ Y ≦ 1), then the physical random number (PHRQ) ) And the pseudo random number (PSR) are both “0”, the probability that the physical random number (PHRQ) is “0”, and the pseudo random number (PSR) is “1” is X (1-Y). The probability that the physical random number (PHRQ) is “1” and the pseudorandom number is “0” is (1-X) Y, and the probability that both the physical random number (PHRQ) and the pseudorandom number (PSRQ) are “1” is ( 1-X) (1-Y).

したがって、乱数(R)が“0”となる確率P、および“1”となる確率Pは、次式(5),(6)により求められる。

Figure 2006215824
Accordingly, the probability P 0 that the random number (R) is “0” and the probability P 1 that is “1” are obtained by the following equations (5) and (6).
Figure 2006215824

ここで、例えば、擬似乱数(PSR)を16ビットのM系列とすると、擬似乱数(PSR)においては、“0”が32767回、“1”が32768回発生することとなり、Y≒0.4999(49.99%)となる。そして、物理乱数(PHRQ)における“0”の発生確率Xを、例えば、0.45(45%)とすると、P及びPは、式(5),(6)より、P≒0.50001(50.001%)、P≒0.49999(49.999%)となる。また、例えば、物理乱数(PHRQ)における“0”の発生確率Xを、例えば、0.55(55%)とすると、P≒0.49999(49.999%)、P≒0.50001(50.001%)となる。したがって、乱数(R)における“0”の発生確率の範囲は49.999〜50.001%程度となり、乱数として用いることができる。 Here, for example, if the pseudo random number (PSR) is a 16-bit M sequence, “0” is generated 32767 times and “1” is 32768 times in the pseudo random number (PSR), and Y≈0.4999. (49.99%). Then, the probability X of "0" in the physical random number (PHRQ), for example, when a 0.45 (45%), P 0 and P 1 has the formula (5), from (6), P 0 ≒ 0 50001 (50.001%), P 1 ≈0.49999 (49.999%). For example, if the occurrence probability X of “0” in the physical random number (PHRQ) is 0.55 (55%), for example, P 0 ≈0.49999 (49.999%), P 1 ≈0.50001 (50.001%). Accordingly, the range of the probability of occurrence of “0” in the random number (R) is about 49.999 to 50.001%, which can be used as a random number.

(2)ホッピングモード
次に、カウンタモードで、動作モードがホッピングモードの動作を説明する。ホッピングモードの場合、AND回路73から出力される選択信号(SEL)は、D−FF72から出力される物理乱数(PHRQ)となる。したがって、マルチプレクサ67は、物理乱数(PHRQ)が“0”の場合はマスクAレジスタ65の値(AQ〜AQ31)を出力し、“1”の場合はマスクBレジスタ66の値(BQ〜BQ31)を出力する。
(2) Hopping mode Next, the operation in the counter mode and the operation mode being the hopping mode will be described. In the hopping mode, the selection signal (SEL) output from the AND circuit 73 is a physical random number (PHRQ) output from the D-FF 72. Therefore, the multiplexer 67 outputs the value of the mask A register 65 (AQ 0 to AQ 31 ) when the physical random number (PHRQ) is “0”, and the value of the mask B register 66 (BQ 0 when it is “1”). To BQ 31 ).

物理乱数(PHRQ)が“0”の場合、シフトレジスタ64の値(Q〜Q31)と、マスクAレジスタ65の値(AQ〜AQ31)との論理積を行った結果がAND回路68から出力され、奇数パリティジェネレータ69によってその排他的論理和が行われ、シフトレジスタ64への帰還信号(F)が生成される。また、奇数パリティジェネレータ69から出力される信号は、擬似乱数(PSR)としてEXOR回路75に入力される。 For physical random number (PHRQ) is "0", the value of the shift register 64 (Q 0 ~Q 31), the value of the mask A register 65 a result of the logical product of the (AQ 0 ~AQ 31) is an AND circuit 68, and an exclusive OR is performed by the odd parity generator 69, and a feedback signal (F) to the shift register 64 is generated. The signal output from the odd parity generator 69 is input to the EXOR circuit 75 as a pseudo random number (PSR).

そして、物理乱数(PHRQ)が“1”の場合、シフトレジスタ64の値(Q〜Q31)と、マスクBレジスタ66の値(BQ〜BQ31)との論理積を行った結果がAND回路68から出力され、奇数パリティジェネレータ69によってその排他的論理和が行われ、シフトレジスタ64への帰還信号(F)が生成される。また、奇数パリティジェネレータ69から出力される信号は、擬似乱数(PSR)としてEXOR回路75に入力される。 When the physical random number (PHRQ) is “1”, the logical product of the value of the shift register 64 (Q 0 to Q 31 ) and the value of the mask B register 66 (BQ 0 to BQ 31 ) is obtained. The output from the AND circuit 68 is exclusive-ORed by the odd parity generator 69 to generate a feedback signal (F) to the shift register 64. The signal output from the odd parity generator 69 is input to the EXOR circuit 75 as a pseudo random number (PSR).

つまり、擬似乱数(PSR)は、物理乱数(PHRQ)が“0”の場合は、マスクAレジスタ65に設定されたタップ位置に応じたM系列の擬似乱数となり、物理乱数(PHRQ)が“1”の場合は、マスクBレジスタ65に設定されたタップ位置に応じたM系列の擬似乱数となる。   That is, when the physical random number (PHRQ) is “0”, the pseudo random number (PSR) is an M-sequence pseudo random number corresponding to the tap position set in the mask A register 65, and the physical random number (PHRQ) is “1”. In the case of “,” it becomes an M-sequence pseudo-random number corresponding to the tap position set in the mask B register 65.

ホッピングモードの場合、OR回路74の出力は常に“1”となるため、EXOR回路75から出力される乱数(R)は、擬似乱数(PSR)を反転したものとなる。シフトレジスタ77のデータ入力端子(D)には乱数(R)が入力され、クロック入力端子(C)には、マルチプレクサ76を介してクロック(/RCLK)が入力される。そして、乗算モードの場合と同様に、クロック(/RCLK)の立ち上がり時に、乱数(R)がシフトレジスタ77にセットされる。また、シフトレジスタ77は、EXOR回路75から出力される乱数(R)を8ビット記憶すると、CPU51Aに割込信号を送信する。CPU51Aは、この割込信号を受信すると、8ビットの乱数(R)をシフトレジスタ77から読み出す。   In the hopping mode, since the output of the OR circuit 74 is always “1”, the random number (R) output from the EXOR circuit 75 is an inverse of the pseudo random number (PSR). A random number (R) is input to the data input terminal (D) of the shift register 77, and a clock (/ RCLK) is input to the clock input terminal (C) via the multiplexer 76. Then, as in the multiplication mode, the random number (R) is set in the shift register 77 when the clock (/ RCLK) rises. The shift register 77 stores an 8-bit random number (R) output from the EXOR circuit 75 and transmits an interrupt signal to the CPU 51A. When the CPU 51A receives this interrupt signal, it reads an 8-bit random number (R) from the shift register 77.

(3)CPUモード
最後に、CPUモードの動作を説明する。CPUモードの場合、D−FF72から出力される信号(PHRQ)が常に“1”となる。したがって、AND回路73から出力される選択信号(SEL)は、乗算モードの場合は“0”、ホッピングモードの場合は“1”となる。つまり、マルチプレクサ67は、乗算モードの場合はマスクAレジスタ65の値(AQ〜AQ31)を出力し、ホッピングモードの場合はマスクBレジスタ66の値(BQ〜BQ31)を出力する。
(3) CPU Mode Finally, the operation in the CPU mode will be described. In the CPU mode, the signal (PHRQ) output from the D-FF 72 is always “1”. Therefore, the selection signal (SEL) output from the AND circuit 73 is “0” in the multiplication mode and “1” in the hopping mode. That is, the multiplexer 67 outputs the value (AQ 0 to AQ 31 ) of the mask A register 65 in the multiplication mode, and outputs the value (BQ 0 to BQ 31 ) of the mask B register 66 in the hopping mode.

そして、シフトレジスタ64の値(Q〜Q31)と、マスクAレジスタ65の値(AQ〜AQ31)またはマスクBレジスタ66の値(BQ〜BQ31)との論理積を行った結果がAND回路68から出力され、奇数パリティジェネレータ69によってその排他的論理和が行われ、シフトレジスタ64への帰還信号(F)が生成される。また、奇数パリティジェネレータ69から出力される信号は、擬似乱数(PSR)としてEXOR回路75に入力される。この擬似乱数(PSR)は、マスクAレジスタ65またはマスクBレジスタ66に設定されたタップ位置に応じたM系列の擬似乱数となる。 Then, was carried out with the value of the shift register 64 (Q 0 ~Q 31), the logical product of the value of the mask A register 65 the value of (AQ 0 ~AQ 31) or mask B register 66 (BQ 0 ~BQ 31) The result is output from the AND circuit 68, and the exclusive OR is performed by the odd parity generator 69, and the feedback signal (F) to the shift register 64 is generated. The signal output from the odd parity generator 69 is input to the EXOR circuit 75 as a pseudo random number (PSR). This pseudo random number (PSR) is an M-sequence pseudo random number corresponding to the tap position set in the mask A register 65 or the mask B register 66.

CPUモードの場合、OR回路74の出力は常に“1”となるため、EXOR回路75から出力される乱数(R)は、擬似乱数(PSR)を反転したものとなる。シフトレジスタ77のデータ入力端子(D)には乱数(R)が入力され、クロック入力端子(C)には、マルチプレクサ76を介してCPU51Aからの読み出し信号(CPU_RD)が入力される。そして、シフトレジスタ77においては、読み出し信号(CPU_RD)が入力されるたびに、乱数(R)がセットされる。また、シフトレジスタ77は、EXOR回路75から出力される乱数(R)を8ビット記憶すると、CPU51Aに割込信号を送信する。CPU51Aは、この割込信号を受信すると、8ビットの乱数(R)をシフトレジスタ77から読み出す。   In the CPU mode, since the output of the OR circuit 74 is always “1”, the random number (R) output from the EXOR circuit 75 is an inverse of the pseudo random number (PSR). A random number (R) is input to the data input terminal (D) of the shift register 77, and a read signal (CPU_RD) from the CPU 51A is input to the clock input terminal (C) via the multiplexer 76. In the shift register 77, each time a read signal (CPU_RD) is input, a random number (R) is set. The shift register 77 stores an 8-bit random number (R) output from the EXOR circuit 75 and transmits an interrupt signal to the CPU 51A. When the CPU 51A receives this interrupt signal, it reads an 8-bit random number (R) from the shift register 77.

以上、本発明の一実施形態である乱数生成回路54A,54Bを適用したキーレスエントリーシステム1について説明した。M系列の擬似乱数は、0の発生回数は1の発生回数より1少ないだけであり、1と0とがほぼ同数出現する乱数である。したがって、乗算モードの場合においては、物理乱数をM系列の擬似乱数に応じて変化させて出力することにより、つまり物理乱数をM系列の擬似乱数を用いて変調することにより、出力される1と0の発生頻度がM系列の擬似乱数と同等となり、乱数としての性能を満たすことができる。そして、出力される乱数は、物理乱数をM系列の擬似乱数で変調したものであるため、単なるM系列の擬似乱数と異なり、その出力パターンを予測することが困難となる。また、出力される乱数は、物理乱数をそのまま出力しているものではないため、外部からの影響により物理乱数が操作されたとしても、M系列の擬似乱数により変調されるため、物理乱数のみを用いる場合と比較して安全性の低下を防ぐことが可能となる。   The keyless entry system 1 to which the random number generation circuits 54A and 54B according to an embodiment of the present invention are applied has been described above. The M-sequence pseudo-random number is a random number in which the number of occurrences of 0 is only 1 less than the number of occurrences of 1 and 1 and 0 appear in substantially the same number. Therefore, in the case of the multiplication mode, the physical random number is changed according to the M-sequence pseudo-random number and output, that is, the physical random number is modulated using the M-sequence pseudo-random number, and 1 is output. The occurrence frequency of 0 becomes equivalent to the M-sequence pseudo-random number, and the performance as a random number can be satisfied. Since the output random number is obtained by modulating a physical random number with an M-sequence pseudo-random number, it is difficult to predict the output pattern unlike a simple M-sequence pseudo-random number. In addition, since the output random number is not a physical random number that is output as it is, even if the physical random number is manipulated due to an external influence, it is modulated by an M-sequence pseudo-random number. It is possible to prevent a decrease in safety compared to the case of using.

なお、前述した通り、物理乱数とM系列の擬似乱数との排他的論理和を行うことにより、物理乱数の変調を行うことができる。ここで、例えば、M系列を16ビットとした場合に出力される乱数における“0”の発生確率の範囲は49.999〜50.001%程度となり、乱数としての性能を満たすことができる。   As described above, the physical random number can be modulated by performing an exclusive OR of the physical random number and the M-sequence pseudo-random number. Here, for example, the range of the probability of occurrence of “0” in the random number output when the M sequence is 16 bits is about 49.999 to 50.001%, and the performance as a random number can be satisfied.

また、ホッピングモードの場合においては、物理乱数を用いてM系列を切り替えることにより、乱数の出力パターンを予測することが困難となる。また、出力される乱数は、物理乱数をそのまま出力しているものではないため、外部からの影響により物理乱数が操作されたとしても、M系列の擬似乱数が出力されるため、物理乱数のみを用いる場合と比較して安全性の低下を防ぐことが可能となる。なお、前述したように、例えば、M系列のタップ位置を記憶するレジスタを複数設けることにより、物理乱数に基づいてM系列を切り替えることができる。   In the case of the hopping mode, it is difficult to predict the output pattern of random numbers by switching the M series using physical random numbers. In addition, since the output random number is not the output of the physical random number as it is, even if the physical random number is manipulated due to external influences, the M-sequence pseudo-random number is output, so only the physical random number is output. It is possible to prevent a decrease in safety compared to the case of using. Note that, as described above, for example, by providing a plurality of registers for storing M-sequence tap positions, the M-sequence can be switched based on a physical random number.

以上、本発明の実施形態について説明したが、上記実施形態は本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。本発明は、その趣旨を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物も含まれる。   As mentioned above, although embodiment of this invention was described, the said embodiment is for making an understanding of this invention easy, and is not for limiting and interpreting this invention. The present invention can be changed and improved without departing from the gist thereof, and the present invention includes equivalents thereof.

例えば、本実施形態の乱数生成回路54Aにおいては、M系列のタップ位置を記憶するレジスタをマスクAレジスタ65及びマスクBレジスタ66の2つとしたが、タップ位置を記憶するレジスタを3つ以上設けることとしてもよい。タップ位置を記憶するレジスタを3つ以上設ける場合、例えば、フリップフロップ等を用いて物理乱数を2ビット以上記憶し、その値に応じてタップ位置を出力するレジスタを選択することとしてもよい。   For example, in the random number generation circuit 54A of the present embodiment, two registers, the mask A register 65 and the mask B register 66, are provided for storing the M-sequence tap positions, but three or more registers for storing the tap positions are provided. It is good. When three or more registers for storing tap positions are provided, for example, two or more bits of physical random numbers may be stored using a flip-flop or the like, and a register that outputs tap positions may be selected according to the value.

また、本実施形態においては、擬似乱数系列としてM系列を用いているが、例えば、Gold系列等の他の擬似乱数系列を用いることとしてもよい。擬似乱数系列としてGold系列を用いる場合においても、物理乱数をGold系列の擬似乱数を用いて変調して乱数を生成することにより、乱数の予測困難性を高めることができる。また、Gold系列を用いる場合においても、物理乱数をそのまま出力しているものではないため、外部からの影響により物理乱数が操作されたとしても、Gold系列の擬似乱数が出力されるため、物理乱数のみを用いる場合と比較して安全性の低下を防ぐことが可能となる。   In this embodiment, the M sequence is used as the pseudo random number sequence. However, for example, another pseudo random number sequence such as a Gold sequence may be used. Even when the Gold sequence is used as the pseudo-random number sequence, it is possible to increase the difficulty of predicting the random number by generating a random number by modulating the physical random number using the Gold-sequence pseudo-random number. Even when the Gold sequence is used, since the physical random number is not output as it is, even if the physical random number is manipulated due to an external influence, the Gold sequence pseudo-random number is output. It is possible to prevent a decrease in safety as compared with the case of using only.

また、Gold系列におけるタップ位置を記憶するレジスタを複数設け、物理乱数に基づいてタップ位置を出力するレジスタを選択することにより、Gold系列を切り替えることも可能である。これにより、乱数の予測困難性を高め、かつ、外部からの影響により安全性が低下することを防止することが可能となる。   It is also possible to switch the Gold series by providing a plurality of registers for storing the tap positions in the Gold series and selecting a register that outputs the tap positions based on physical random numbers. As a result, it becomes possible to increase the difficulty of predicting random numbers and to prevent the safety from being lowered due to external influences.

また、本実施形態においては、乱数生成回路54Aをキーレスエントリーシステム1における暗号化に用いることとしたが、乱数生成回路54Aは、キーレスエントリーシステム1に限らず、安全性を高めるために乱数を使用する様々な情報処理システムに適用することができる。このように、様々な情報処理システムにおいて、乱数生成回路54Aを適用することにより、予測困難で、かつ、外部からの影響による安全性の低下を防いだ乱数が得られることにより、その情報処理システムの安全性を高めることができる。   In the present embodiment, the random number generation circuit 54A is used for encryption in the keyless entry system 1. However, the random number generation circuit 54A is not limited to the keyless entry system 1, and uses random numbers to increase security. It can be applied to various information processing systems. As described above, by applying the random number generation circuit 54A in various information processing systems, random numbers that are difficult to predict and prevent deterioration in safety due to external influences can be obtained. Can improve the safety.

本発明の乱数生成回路を用いる一実施形態である自動車の錠の施錠・解錠を行うキーレスエントリーシステムの全体構成を示す図である。It is a figure which shows the whole structure of the keyless entry system which performs locking / unlocking of the lock | rock of the motor vehicle which is one Embodiment using the random number generation circuit of this invention. データ処理回路の構成を示す図である。It is a figure which shows the structure of a data processing circuit. キーレスエントリーシステムの子機と親機との間における通信手順を示すフローチャートである。It is a flowchart which shows the communication procedure between the subunit | mobile_unit and parent | base_device of a keyless entry system. 乱数生成回路の構成を示す図である。It is a figure which shows the structure of a random number generation circuit. 物理乱数生成回路70の構成を示す図である。2 is a diagram showing a configuration of a physical random number generation circuit 70. FIG. 乱数生成回路におけるタイミングチャートである。It is a timing chart in a random number generation circuit. 物理乱数及び擬似乱数の発生確率を示す図である。It is a figure which shows the generation | occurrence | production probability of a physical random number and a pseudorandom number.

符号の説明Explanation of symbols

1 キーレスエントリーシステム 2 子機
3 親機 11 電池
12 操作スイッチ 13,21 データ処理回路
14,22 送受信回路 23 駆動回路
24 アクチュエータ 25 バッテリ
51A,51B CPU 52A,52B RAM
53A,53B EEPROM 54A,54B 乱数生成回路
55A,55B 暗号処理回路 56A,56B 入出力ポート
61 分周回路 62 ボーレートジェネレータ
63 カウンタ 64 シフトレジスタ
65 マスクAレジスタ 66 マスクBレジスタ
67 マルチプレクサ 68 AND回路
69 奇数パリティジェネレータ 70 物理乱数生成回路
71 OR回路 72 D型フリップフロップ
73 AND回路 74 OR回路
75 EXOR回路 76 マルチプレクサ
77 シフトレジスタ
DESCRIPTION OF SYMBOLS 1 Keyless entry system 2 Slave unit 3 Master unit 11 Battery 12 Operation switch 13, 21 Data processing circuit 14, 22 Transmission / reception circuit 23 Drive circuit 24 Actuator 25 Battery 51A, 51B CPU 52A, 52B RAM
53A, 53B EEPROM 54A, 54B Random number generation circuit 55A, 55B Cryptographic processing circuit 56A, 56B I / O port 61 Dividing circuit 62 Baud rate generator 63 Counter 64 Shift register 65 Mask A register 66 Mask B register 67 Multiplexer 68 AND circuit 69 Odd parity Generator 70 Physical random number generation circuit 71 OR circuit 72 D-type flip-flop 73 AND circuit 74 OR circuit 75 EXOR circuit 76 Multiplexer 77 Shift register

Claims (4)

擬似乱数系列の擬似乱数を生成する擬似乱数生成回路と、
物理乱数を生成する物理乱数生成回路と、
前記物理乱数生成回路により生成された物理乱数を前記擬似乱数生成回路により生成された擬似乱数に応じて変化させて出力する変調回路と、
を備えることを特徴とする乱数生成回路。
A pseudo-random number generation circuit for generating a pseudo-random number of a pseudo-random number sequence;
A physical random number generation circuit for generating a physical random number;
A modulation circuit that changes the physical random number generated by the physical random number generation circuit according to the pseudo random number generated by the pseudo random number generation circuit, and outputs the modulation circuit;
A random number generation circuit comprising:
請求項1に記載の乱数生成回路であって、
前記変調回路は、前記物理乱数生成回路により生成された物理乱数と、前記擬似乱数生成回路により生成された擬似乱数との排他的論理和を行う回路を備えることを特徴とする乱数生成回路。
The random number generation circuit according to claim 1,
The modulation circuit includes a circuit that performs an exclusive OR of the physical random number generated by the physical random number generation circuit and the pseudo random number generated by the pseudo random number generation circuit.
複数の擬似乱数系列の擬似乱数を生成する擬似乱数生成回路と、
物理乱数を生成する物理乱数生成回路と、
を備え、
前記擬似乱数生成回路は、前記物理乱数生成回路により生成された物理乱数に基づいて前記擬似乱数生成回路が生成する擬似乱数系列を切り替えることを特徴とする乱数生成回路。
A pseudo-random number generation circuit for generating pseudo-random numbers of a plurality of pseudo-random number sequences;
A physical random number generation circuit for generating a physical random number;
With
The random number generation circuit, wherein the pseudo random number generation circuit switches a pseudo random number sequence generated by the pseudo random number generation circuit based on the physical random number generated by the physical random number generation circuit.
請求項3に記載の乱数生成回路であって、
前記擬似乱数系列がM系列であり、
前記擬似乱数生成回路は、
線形帰還シフトレジスタと、
複数のM系列における夫々のタップ位置を記憶する複数のレジスタと、
前記物理乱数生成回路により生成された物理乱数に基づいて前記複数のレジスタの何れかを選択する選択回路と、
前記線形帰還シフトレジスタに記憶されているデータと、前記選択回路により選択されたレジスタに記憶されているタップ位置とに基づいて前記線形帰還シフトレジスタへの帰還信号を生成する帰還信号生成回路と、
を備えることを特徴とする乱数生成回路。

The random number generation circuit according to claim 3,
The pseudo-random sequence is an M sequence;
The pseudo random number generation circuit includes:
A linear feedback shift register;
A plurality of registers for storing respective tap positions in a plurality of M series;
A selection circuit that selects any of the plurality of registers based on the physical random number generated by the physical random number generation circuit;
A feedback signal generation circuit that generates a feedback signal to the linear feedback shift register based on data stored in the linear feedback shift register and a tap position stored in the register selected by the selection circuit;
A random number generation circuit comprising:

JP2005028113A 2005-02-03 2005-02-03 Random number generation circuit Withdrawn JP2006215824A (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2005028113A JP2006215824A (en) 2005-02-03 2005-02-03 Random number generation circuit
CN 200610004502 CN1815527A (en) 2005-02-03 2006-01-25 Circuit for random number generation
TW095103201A TW200629192A (en) 2005-02-03 2006-01-26 Random number generating circuit
US11/275,874 US20070067374A1 (en) 2005-02-03 2006-02-01 Random Number Generating Circuit
KR1020060010022A KR100737651B1 (en) 2005-02-03 2006-02-02 Random numbers producting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005028113A JP2006215824A (en) 2005-02-03 2005-02-03 Random number generation circuit

Publications (1)

Publication Number Publication Date
JP2006215824A true JP2006215824A (en) 2006-08-17

Family

ID=36907714

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005028113A Withdrawn JP2006215824A (en) 2005-02-03 2005-02-03 Random number generation circuit

Country Status (2)

Country Link
JP (1) JP2006215824A (en)
CN (1) CN1815527A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957740A (en) * 2009-05-18 2011-01-26 索尼公司 SIC (semiconductor integrated circuit), messaging device and method and program
JP2012503829A (en) * 2008-09-23 2012-02-09 クゥアルコム・インコーポレイテッド System and method for executing a linear feedback shift instruction
JP2014208153A (en) * 2014-05-16 2014-11-06 株式会社三洋物産 Game machine
JP2014208152A (en) * 2014-05-16 2014-11-06 株式会社三洋物産 Game machine
JP2016019867A (en) * 2010-01-20 2016-02-04 株式会社三洋物産 Game machine
JP2017527225A (en) * 2014-09-14 2017-09-14 デュランド アレクサンドルDURAND Alexandre Cryptographic system reproducible random sequence
JP2019197394A (en) * 2018-05-10 2019-11-14 ウィンボンド エレクトロニクス コーポレーション Unique data generation device, semiconductor device, and authentication system

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013047727A (en) * 2011-08-29 2013-03-07 Sony Corp Information processing device, information processing method, program, and recording medium
CN103218177A (en) * 2013-04-19 2013-07-24 杭州电子科技大学 NAND Flash storage system with function of data balanced processing
CN103645882A (en) * 2013-12-09 2014-03-19 中颖电子股份有限公司 Batch out-of-order random number generation method based on single-chip microcomputer
CN109669669B (en) * 2018-12-06 2022-06-24 镕铭微电子(济南)有限公司 Error code generation method and error code generator

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012503829A (en) * 2008-09-23 2012-02-09 クゥアルコム・インコーポレイテッド System and method for executing a linear feedback shift instruction
CN101957740A (en) * 2009-05-18 2011-01-26 索尼公司 SIC (semiconductor integrated circuit), messaging device and method and program
JP2016019867A (en) * 2010-01-20 2016-02-04 株式会社三洋物産 Game machine
JP2014208153A (en) * 2014-05-16 2014-11-06 株式会社三洋物産 Game machine
JP2014208152A (en) * 2014-05-16 2014-11-06 株式会社三洋物産 Game machine
JP2017527225A (en) * 2014-09-14 2017-09-14 デュランド アレクサンドルDURAND Alexandre Cryptographic system reproducible random sequence
JP2019197394A (en) * 2018-05-10 2019-11-14 ウィンボンド エレクトロニクス コーポレーション Unique data generation device, semiconductor device, and authentication system
US11983303B2 (en) 2018-05-10 2024-05-14 Winbond Electronics Corp. Intrinsic data generation device, semiconductor device and authentication system

Also Published As

Publication number Publication date
CN1815527A (en) 2006-08-09

Similar Documents

Publication Publication Date Title
KR100737651B1 (en) Random numbers producting circuit
JP2006215824A (en) Random number generation circuit
US9512659B2 (en) Code hopping based system with increased security
JP2541480B2 (en) Pseudo random number generator
US8457306B2 (en) Cryptographic module and IC card
JP5954030B2 (en) Cryptographic processing apparatus and method
US10205589B2 (en) Encryption processing device and encryption processing method
WO2005073842A1 (en) Pseudo random number generation device and pseudo random number generation program
JPH08512183A (en) Cryptographic confirmation method of transmitted message using pseudo random number
KR101653121B1 (en) Integrated security device and signal processing method used by integrated security device
JPH1061277A (en) Remote control device
US5649014A (en) Pseudorandom composition-based cryptographic authentication process
KR100828272B1 (en) Cryptographic processing circuit
JP2006215825A (en) Random number generation circuit
JP2005253041A (en) System and method for authentication
TWI439101B (en) Apparatus and method for generating an authentication code
JP4787434B2 (en) ENCRYPTION METHOD, COMMUNICATION SYSTEM, DATA INPUT DEVICE
TWI573427B (en) Code hopping based system with increase security
JP2009264010A (en) Remote control device
US7860251B1 (en) Encryption-decryption circuit and method of operation
US11121884B2 (en) Electronic system capable of self-certification
JP2006215280A (en) Encryption processing circuit
JP4326482B2 (en) Cryptographic processing circuit
JPH0732975A (en) Lock releasing signal making device and lock releasing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071228

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20090706