WO2021232255A1 - True random number generator and electronic device - Google Patents
True random number generator and electronic device Download PDFInfo
- Publication number
- WO2021232255A1 WO2021232255A1 PCT/CN2020/091112 CN2020091112W WO2021232255A1 WO 2021232255 A1 WO2021232255 A1 WO 2021232255A1 CN 2020091112 W CN2020091112 W CN 2020091112W WO 2021232255 A1 WO2021232255 A1 WO 2021232255A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- signal
- sampling
- frequency
- random number
- output
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/58—Random or pseudo-random number generators
Definitions
- the embodiments of the present application relate to the field of information security technology, and in particular, to a true random number generator and electronic equipment.
- the True Random Number Generator As an indispensable part of the cryptographic system, the True Random Number Generator (TRNG) is generally used to generate high-quality random number sequences required in the cryptographic system, for example, to generate security keys.
- TRNG True Random Number Generator
- the embodiments of the present invention provide a true random number generator and an electronic device to overcome the defects in the prior art.
- the first aspect of the embodiments of the present application provides a true random number generator, which includes a first up-sampling circuit, a first down-sampling circuit, a second up-sampling circuit, and a second down-sampling circuit;
- the first up-sampling circuit receives the first high-frequency clock signal output by the first high-frequency oscillator and the low-frequency clock signal output by the low-frequency oscillator, and the first up-sampling circuit is used to increase the first high-frequency clock signal according to the low-frequency clock signal Edge sampling, output the first up-sampling signal;
- the first down-sampling circuit receives the first high-frequency clock signal and the low-frequency clock signal, and the first down-sampling circuit is configured to sample the falling edge of the first high-frequency clock signal according to the low-frequency clock signal, and output the first down-sampling signal;
- the second up-sampling circuit receives the second high-frequency clock signal and the low-frequency clock signal output by the second high-frequency oscillator.
- the second up-sampling circuit is used to sample the rising edge of the second high-frequency clock signal according to the low-frequency clock signal, and output the first 2. Up-sampled signal;
- the second down-sampling circuit receives the second high-frequency clock signal and the low-frequency clock signal, and the second down-sampling circuit is used to sample the falling edge of the second high-frequency clock signal according to the low-frequency clock signal, and output the second down-sampling signal;
- the post-processing circuit receives the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal, and the post-processing circuit is used for processing one of the first up-sampling signal and the first down-sampling signal, Perform an exclusive OR operation with one of the second up-sampled signal and the second down-sampled signal to generate and output a true random number signal.
- the first high-frequency oscillator, the second high-frequency oscillator, and the low-frequency oscillator are different oscillators, so the first high-frequency clock signal and the second high-frequency clock
- the signal and the low-frequency clock signal are uncorrelated clock signals.
- the first high-frequency clock signal and the second high-frequency clock signal are sampled at the rising edge and the falling edge of the first high-frequency clock signal through the low-frequency clock signal, respectively, and the first up-sampled signal,
- the first down-sampled signal, the second up-sampled signal, and the second down-sampled signal are not correlated with each other.
- one of the first up-sampled signal and the first down-sampled signal is XORed with one of the second up-sampled signal and the second down-sampled signal through a post-processing circuit, and the two XOR operations are performed
- the signals are not correlated with each other, the sampling mode can be set to the same or can be set to different, and the two signals are obtained by sampling according to different high-frequency clock signals, so the two signals that are subjected to the exclusive OR operation are mutually exclusive
- the independence is high, which improves the randomness of the true random number signal obtained through the XOR operation, and at the same time, the output sequence of the true random number signal can meet the independent and uniformly distributed random number characteristics through the XOR operation.
- FIG. 1 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application
- FIG. 2 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application.
- FIG. 3 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application.
- FIG. 4 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application.
- FIG. 5 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application.
- FIG. 6 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application.
- FIG. 7 is a schematic structural diagram of an electronic device containing a true random number generator provided by an embodiment of the application.
- random number generators are mainly divided into two types: pseudo random number generators and true random number generators.
- the random sequence calculated by a deterministic algorithm is called a pseudo-random number. If the attacker has sufficient computing power, the generation rule of the pseudo-random number can be predicted, and it is generally used in occasions with low security requirements.
- the true random number is generated by physical methods, and the natural randomness of the real world is selected. Because it has the advantages of unpredictable and unreproducible from the outside world, it can better protect the transmission of information and is widely used in the field of information security.
- the core of a true random number generator must be an essentially random physical process, which is selected from natural randomness.
- a true random number generator there are many ways to realize a true random number generator, such as discrete-time chaos method, direct noise amplification method, oscillation sampling method, metastable sampling method, etc.
- the oscillation sampling method is the most widely used due to its simple implementation method and good data randomness.
- the random number signal generated by the true random number generator implemented according to the oscillation sampling method is not very random, and the output sequence of the random number signal cannot meet the characteristics of independent and uniformly distributed random numbers.
- the real random number signal generated by the real random number generator has a high cracking rate, thereby increasing the probability of data leakage during transmission and harming users Experience.
- the embodiments of the present application provide a true random number generator and electronic equipment to overcome the low randomness of random number signals in the prior art, and the output sequence of random number signals satisfies independent and uniformly distributed random number characteristics. Technical defects.
- the first high-frequency oscillator, the second high-frequency oscillator, and the low-frequency oscillator are different oscillators, so the first high-frequency clock signal and the second high-frequency clock
- the signal and the low-frequency clock signal are uncorrelated clock signals.
- the first high-frequency clock signal and the second high-frequency clock signal are sampled at the rising edge and the falling edge of the first high-frequency clock signal through the low-frequency clock signal, respectively, and the first up-sampled signal,
- the first down-sampled signal, the second up-sampled signal, and the second down-sampled signal are not correlated with each other.
- one of the first up-sampled signal and the first down-sampled signal is XORed with one of the second up-sampled signal and the second down-sampled signal through a post-processing circuit, and the two XOR operations are performed
- the signals are not correlated with each other, the sampling mode can be set to the same or can be set to different, and the two signals are obtained by sampling according to different high-frequency clock signals, so the two signals that are subjected to the exclusive OR operation are mutually exclusive
- the independence is high, which improves the randomness of the true random number signal obtained through the XOR operation, and at the same time, the output sequence of the true random number signal can meet the independent and uniformly distributed random number characteristics through the XOR operation.
- FIG. 1 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the present application.
- the true random number generator provided by the first embodiment of the present application includes: a first up-sampling circuit 101 , The first down-sampling circuit 102, the second up-sampling circuit 103, and the second down-sampling circuit 104.
- the first up-sampling circuit 101 receives the first high-frequency clock signal output by the first high-frequency oscillator 201 and the low-frequency clock signal output by the low-frequency oscillator 203.
- the clock signal is sampled on the rising edge, and the first up-sampling signal is output.
- the first down-sampling circuit 102 receives the first high-frequency clock signal and the low-frequency clock signal, and the first down-sampling circuit 102 is configured to sample the first high-frequency clock signal on the falling edge according to the low-frequency clock signal, and output the first down-sampling signal.
- the second up-sampling circuit 103 receives the second high-frequency clock signal and the low-frequency clock signal output by the second high-frequency oscillator 202, and the second up-sampling circuit 103 is used to sample the rising edge of the second high-frequency clock signal according to the low-frequency clock signal , Output the second up-sampling signal;
- the second down-sampling circuit 104 receives the second high-frequency clock signal and the low-frequency clock signal, and the second down-sampling circuit 104 is configured to sample the falling edge of the second high-frequency clock signal according to the low-frequency clock signal, and output the second down-sampling signal.
- the post-processing circuit 105 receives the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal.
- the post-processing circuit 105 is used to perform an exclusive OR operation on one of the first up-sampled signal and the first down-sampled signal with one of the second up-sampled signal and the second down-sampled signal to generate a true random number signal And output.
- the first input terminal 1011 of the first up-sampling circuit 101 is connected to the output terminal 2011 of the first high-frequency oscillator 201, and the first input terminal 1011 of the first up-sampling circuit 101 receives The first high-frequency clock signal output by the first high-frequency oscillator 201; the second input terminal 1012 of the first up-sampling circuit 101 and the output terminal 2031 of the low-frequency oscillator 203 are conducted, and the second input of the first up-sampling circuit 101
- the terminal 1012 receives the low-frequency clock signal output by the low-frequency oscillator 203.
- the output terminal 1013 of the first up-sampling circuit 101 is connected to the first input terminal 1051 of the post-processing circuit 105.
- the first input terminal 1051 of the post-processing circuit 105 receives the first up-sampling signal output from the output terminal 1013 of the first up-sampling circuit 101.
- the first input terminal 1021 of the first down-sampling circuit 102 is connected to the output terminal 2011 of the first high-frequency oscillator 201, and the first input terminal 1021 of the first down-sampling circuit 102 receives the first output from the first high-frequency oscillator 201
- a high-frequency clock signal the second input terminal 1022 of the first down-sampling circuit 102 and the output terminal 2031 of the low-frequency oscillator 203 are conducted, and the second input terminal 1022 of the first down-sampling circuit 102 receives the low-frequency output from the low-frequency oscillator 203
- the output terminal 1023 of the first down-sampling circuit 102 and the second input terminal 1052 of the post-processing circuit 105 are connected.
- the second input terminal 1052 of the post-processing circuit 105 receives the first down-sampling signal output from the output terminal 1023 of the first down-sampling circuit 102.
- the first input terminal 1031 of the second up-sampling circuit 103 is connected to the output terminal 2021 of the second high-frequency oscillator 202, and the first input terminal 1031 of the second up-sampling circuit 103 receives the first output from the second high-frequency oscillator 202.
- Two high-frequency clock signals, the second input terminal 1032 of the second up-sampling circuit 103 and the output terminal 2031 of the low-frequency oscillator 203 are conducted, and the second input terminal 1032 of the second up-sampling circuit 103 receives the low-frequency output of the low-frequency oscillator 203
- the output terminal 1033 of the second up-sampling circuit 103 and the third input terminal 1053 of the post-processing circuit 105 are connected.
- the third input terminal 1053 of the post-processing circuit 105 receives the second up-sampling signal output from the output terminal 1033 of the second up-sampling circuit 103.
- the first input terminal 1041 of the second down-sampling circuit 104 is connected to the output terminal 2021 of the second high-frequency oscillator 202, and the first input terminal 1041 of the second down-sampling circuit 104 receives the first output from the second high-frequency oscillator 202.
- Two high-frequency clock signals, the second input terminal 1042 of the second down-sampling circuit 104 and the output terminal 2031 of the low-frequency oscillator 203 are conducted, and the second input terminal 1042 of the second down-sampling circuit 104 receives the low-frequency output from the low-frequency oscillator 203
- the output terminal 1043 of the second down-sampling circuit 104 and the fourth input terminal 1054 of the post-processing circuit 105 are connected.
- the fourth input terminal 1054 of the post-processing circuit 105 receives the second down-sampling signal output from the output terminal 1043 of the second down-sampling circuit 104.
- the output terminal 1055 of the post-processing circuit 105 outputs a true random number signal.
- phase jitter is a random phenomenon caused by thermal noise in an oscillator
- phase jitter is essentially a kind of noise, which is a random variable conforming to a Gaussian distribution. Since the phase jitter of the first high-frequency oscillator, the second high-frequency oscillator, and the low-frequency oscillator are random, the low-frequency clock signal generated by the low-frequency oscillator is compared with the first high-frequency clock signal generated by the first high-frequency oscillator. The second high-frequency clock signal generated by the second high-frequency oscillator performs rising edge sampling and falling edge sampling respectively.
- the output sequence is random.
- a true random number signal is generated by XORing one of the first up-sampling signal and the first down-sampling signal with one of the second up-sampling signal and the second down-sampling signal The output sequence is random.
- the first up-sampling signal is generated by the first up-sampling circuit 101 for sampling the rising edge of the first high-frequency clock signal according to the low-frequency clock signal.
- the frequency of the first up-sampling signal is the same as that of the low-frequency clock signal.
- the sampling signal is generated by the first down-sampling circuit 103 for sampling the falling edge of the first high-frequency clock signal according to the low-frequency clock signal, and the frequency of the first down-sampling signal is the same as the frequency of the low-frequency clock signal.
- the frequencies of the second up-sampling signal and the second down-sampling signal are the same as the frequency of the low-frequency clock signal.
- the frequency and low-frequency clock signal of the true random number signal generated by XORing one of the first up-sampling signal and the first down-sampling signal with one of the second up-sampling signal and the second down-sampling signal The frequency is the same.
- the frequency of the low-frequency clock signal is 32K Hz
- the frequencies of the first high-frequency clock signal and the second high-frequency clock signal are greater than or equal to 80 MHz and less than or equal to 100 MHz
- the frequency of the true random number signal is 32K Hz.
- the XOR operation is based on the two-bit data to generate one bit of data, so it can reduce the correlation between the first digit and the next digit in the output sequence of the true random number signal, so that the true
- the two digits in the output sequence of the random number signal are independent of each other.
- the output sequence of the true random number signal obtained by the exclusive OR operation can also meet the uniformly distributed random number characteristics.
- the post-processing circuit performs an exclusive-OR operation on the first up-sampled signal and the second down-sampled signal as an example.
- the output sequence of any one of the first up-sampled signal and the second down-sampled signal appears in the output sequence
- the probabilities of "0" and "1" are 0.5C and 0.5C, respectively, where C ⁇ 1, and C is a parameter used to measure the independence between the first up-sampled signal and the second down-sampled signal.
- a true random number signal is generated by XORing the first up-sampled signal and the second down-sampled signal.
- P(0) and P(1) are closer to 0.5, so the output sequence "0" and "1" of the true random number signal generated after the exclusive OR operation are evenly distributed .
- the first high-frequency oscillator that outputs the first high-frequency clock signal, the second high-frequency oscillator that outputs the second high-frequency clock signal, and the low-frequency oscillator that outputs the low-frequency clock signal are different oscillators, which can be regarded as different oscillators.
- the first high-frequency clock signal, the second high-frequency clock signal, and the low-frequency clock signal are not related to each other, that is, the first high-frequency clock signal, the second high-frequency clock signal, and the low-frequency clock
- the signals will not have any connection with each other, and it is impossible to obtain another clock signal based on one of the clock signals.
- the first up-sampling signal and the first down-sampling signal are obtained by sampling the first high-frequency clock signal according to the low-frequency clock signal
- the second up-sampling signal and the second down-sampling signal are obtained by sampling the second high-frequency clock signal according to the low-frequency clock signal.
- the signal is sampled, so the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal are not correlated with each other.
- the post-processing circuit performs an exclusive OR operation on one of the first up-sampled signal and the first down-sampled signal and one of the second up-sampled signal and the second down-sampled signal, and the two signals are subjected to the exclusive OR operation
- the mutual non-correlation and sampling mode can be set to be the same or different, and they are signals obtained by sampling respectively according to different high-frequency clock signals. Among them, compared with two signals obtained by sampling based on the same high-frequency clock signal, the signals obtained by sampling based on different high-frequency clock signals are more mutually independent. Therefore, the randomness of the true random number signal generated by the post-processing circuit through the exclusive OR operation is relatively high.
- the first high-frequency oscillator, the second high-frequency oscillator, and the low-frequency oscillator are different oscillators, so the first high-frequency clock signal and the second high-frequency clock
- the signal and the low-frequency clock signal are clock signals that are not related to each other.
- the first high-frequency clock signal and the second high-frequency clock signal are respectively sampled on the rising edge and the falling edge through the low-frequency clock signal, and the first up-sampled signal, The first down-sampled signal, the second up-sampled signal, and the second down-sampled signal are not correlated with each other.
- one of the first up-sampled signal and the first down-sampled signal is XORed with one of the second up-sampled signal and the second down-sampled signal through a post-processing circuit, and the two XOR operations are performed
- the signals are not correlated with each other, the sampling mode can be set to the same or can be set to different, and the two signals are obtained by sampling according to different high-frequency clock signals, so the two signals that are subjected to the exclusive OR operation are mutually exclusive
- the independence is high, which improves the randomness of the true random number signal obtained through the XOR operation, and at the same time, the output sequence of the true random number signal can meet the independent and uniformly distributed random number characteristics through the XOR operation.
- FIG. 2 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application.
- the true random number generator further includes a first Three up-sampling circuit 108 and third down-sampling circuit 109.
- the third up-sampling circuit 108 receives the third high-frequency clock signal output by the third high-frequency oscillator 204 and the low-frequency clock signal output by the low-frequency oscillator 203.
- the clock signal is sampled on the rising edge, and the third up-sampling signal is output.
- the third down-sampling circuit 109 receives the third high-frequency clock signal and the low-frequency clock signal, and the third down-sampling circuit 109 is configured to sample the third high-frequency clock signal on the falling edge according to the low-frequency clock signal, and output the third down-sampling signal.
- the post-processing circuit 105 receives the third up-sampling signal and the third down-sampling signal.
- the post-processing circuit 105 is used to sample the first up-sampling signal, one of the first down-sampling signals, the second up-sampling signal, and the second down-sampling signal. Select any two signals from one of the signals and one of the third up-sampled signal and the third down-sampled signal to perform an exclusive OR operation to generate and output a true random number signal.
- the first input terminal 1081 of the third up-sampling circuit 108 and the output terminal 2041 of the third high-frequency oscillator 204 are turned on, and the first input terminal 1081 of the third up-sampling circuit 108 receives The first high-frequency clock signal output by the third high-frequency oscillator 204; the second input terminal 1082 of the third up-sampling circuit 108 and the output terminal 2031 of the low-frequency oscillator 203 are conducted, and the second input of the third up-sampling circuit 108 The terminal 1082 receives the low-frequency clock signal output by the low-frequency oscillator 203.
- the output terminal 1083 of the third up-sampling circuit 108 is connected to the fifth input terminal 1056 of the post-processing circuit 105.
- the fifth input terminal 1056 of the post-processing circuit 105 receives the third up-sampling signal output from the output terminal 1083 of the third up-sampling circuit 108.
- the first input terminal 1091 of the third down-sampling circuit 109 is connected to the output terminal 2041 of the third high-frequency oscillator 204, and the first input terminal 1091 of the third down-sampling circuit 109 receives the first output from the third high-frequency oscillator 204
- a high-frequency clock signal, the second input terminal 1092 of the third down-sampling circuit 109 and the output terminal 2031 of the low-frequency oscillator 203 are conducted, and the second input terminal 1092 of the third down-sampling circuit 109 receives the low-frequency output from the low-frequency oscillator 203
- the output terminal 1093 of the third down-sampling circuit 109 is connected to the sixth input terminal 1057 of the post-processing circuit 105.
- the sixth input terminal 1057 of the post-processing circuit 105 receives the first down-sampling signal output from the output terminal 1093 of the third down-sampling circuit 109.
- the first high-frequency oscillator, the second high-frequency oscillator, the third high-frequency oscillator, and the low-frequency oscillator are different oscillators, and the first high-frequency clock signal , The second high-frequency clock signal, the third high-frequency clock signal, and the low-frequency clock signal are uncorrelated clock signals.
- the first, second, and third high-frequency clock signals are The signal is sampled at the rising edge and the falling edge, and the obtained first up-sampling signal, first down-sampling signal, second up-sampling signal, second down-sampling signal, third up-sampling signal, and third down-sampling signal are obtained. They are not related to each other.
- the post-processing circuit from the first up-sampled signal, one of the first down-sampled signals, the second up-sampled signal, one of the second down-sampled signals, and the third up-sampled signal and the third down-sampled signal Select any two signals from one of the signals for XOR operation.
- the two signals for XOR operation are not related to each other.
- the sampling method can be set to the same or different, and is based on different high frequency
- the two signals obtained by sampling the clock signal therefore, the independence of the two signals subjected to the exclusive OR operation is relatively high, which improves the randomness of the true random number signal obtained through the exclusive OR operation.
- the output sequence of the true random number signal can meet the characteristics of independent and uniformly distributed random numbers.
- FIG. 3 is a schematic circuit structure diagram of a true random number generator provided in an embodiment of the present application.
- the post-processing circuit 105 includes a first switch 301, the second switch 302 and the exclusive OR gate 303, the first input terminal 3011 of the first switch 301 receives the first up-sampling signal, the second input terminal 3012 of the first switch 302 receives the first down-sampling signal, the first switch 301 It is used to output a first switching signal, and the first switching signal is a first up-sampling signal or a first down-sampling signal.
- the first input terminal 3021 of the second switch 302 receives the second up-sampling signal
- the second input terminal 3022 of the second switch 302 receives the second down-sampling signal
- the second switch 302 is used to output the second switching signal, the second switching signal It is the second up-sampled signal or the second down-sampled signal.
- the first input terminal 3031 of the XOR gate 303 receives the first switch signal
- the second input terminal 3032 of the XOR gate 303 receives the second switch signal
- the XOR gate 303 is used to XOR the first switch signal and the second switch signal. Or operation to generate and output a true random number signal.
- the first input terminal 3011 of the first switch 301 is connected to the output terminal 1013 of the first up-sampling circuit 101 through the first input terminal 1051 of the post-processing circuit 105, and the first switch 301
- the first input terminal 3011 receives the first up-sampling signal.
- the second input terminal 3012 of the first switch 301 is connected to the output terminal 1023 of the first down-sampling circuit 102 through the second input terminal 1052 of the post-processing circuit 105, and the second input terminal 3012 of the first switch 301 receives the first down-sampling Signal.
- the first input terminal 3021 of the second switch 302 is connected to the output terminal 1033 of the second up-sampling circuit 103 through the third input terminal 1053 of the post-processing circuit 105, and the first input terminal 3021 of the second switch 302 receives the second up-sampling Signal.
- the second input terminal 3022 of the second switch 302 is connected to the output terminal 1043 of the second down-sampling circuit 104 through the fourth input terminal 1054 of the post-processing circuit 105, and the second input terminal 3022 of the second switch 302 receives the second down-sampling Signal.
- the first input terminal 3031 of the exclusive OR gate 303 is connected to the output terminal 3013 of the first switch 301, the second input terminal 3032 of the exclusive OR gate 303 is connected to the output terminal 3033 of the second switch 302, and the exclusive OR gate 303 passes through the output The terminal 3033 outputs a true random number signal.
- the first switch 301 and the second switch 302 are single-pole double-throw switches.
- the first switch unit 301 is configured such that when the first input terminal 3011 of the first switch unit 301 and the output terminal 3033 of the first switch unit 301 are connected, the first switch signal output by the output terminal 3013 of the first switch unit 301 is the first switch signal.
- An up-sampling signal At this time, the signal input to the first input terminal 3031 of the exclusive OR gate 303 is the first up-sampling signal.
- the first switch unit 301 is configured such that when the second input terminal 3012 of the first switch unit 301 is connected to the output terminal 3033 of the first switch unit 301, the first switch signal output by the output terminal 3013 of the first switch unit 301 is the first switch signal.
- the down-sampled signal at this time, the signal input to the first input terminal 3031 of the exclusive OR gate 303 is the first down-sampled signal.
- the second switch unit 302 is configured such that when the first input terminal 3021 of the second switch unit 302 and the output terminal 3023 of the second switch unit 302 are connected, the second switch signal output by the output terminal 3023 of the second switch unit 302 is the first switch signal.
- the second up-sampling signal At this time, the signal input to the second input terminal 3032 of the exclusive OR gate 303 is the second up-sampling signal.
- the second switch unit 302 is configured such that when the second input terminal 3022 of the second switch unit 302 and the output terminal 3023 of the second switch unit 302 are connected, the second switch signal output by the output terminal 3023 of the second switch unit 302 is the first switch signal.
- the second down-sampled signal At this time, the signal input to the second input terminal 3032 of the exclusive OR gate 303 is the second down-sampled signal.
- the post-processing circuit includes a first switch, a second switch, and an exclusive OR gate.
- the first switch and the second switch can be configured in different conduction states to make the input exclusive
- the sampling method of the two signals of the OR gate can be the same (both signals are up-sampled signals or both are down-sampled signals) or different (one signal is an up-sampled signal, and the other signal is a down-sampled signal), which is convenient Select the sampling method of the two signals to be XORed.
- FIG. 4 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the present application.
- the control terminal 3014 of the first switch 301 Receiving the first control signal, the first switch 301 outputs a first up-sampling signal in response to the first control signal.
- the control terminal 3014 of the first switch 301 receives the second control signal, and the first switch 301 outputs the first down-sampling signal in response to the second control signal.
- the control terminal 3014 of the first switch 301 receives the first control signal, and the first switch 301 connects the first input terminal 3011 of the first switch 301 to the first switch 301 in response to the first control signal.
- the output terminal 3013 of the first switch 301 is turned on, and the output terminal 3013 of the first switch 301 outputs the first up-sampling signal.
- control terminal 3014 of the first switch 301 receives the second control signal, and the first switch 301 conducts the second input terminal 3012 of the first switch 301 and the output terminal 3013 of the first switch 301 in response to the second control signal, and The output terminal 3013 of a switch 301 outputs the first down-sampling signal.
- control circuit in the true random number generator can output the first control signal or the second control signal; or, the control chip in the electronic device where the true random number generator is located can output the first control signal or the second control signal.
- control chip in the electronic device where the true random number generator is located can randomly output the first control signal or the second control signal, or can output the first control signal and the second control signal cyclically according to a preset period.
- the control terminal of the first switch receives the first control signal, and the first switch outputs the first up-sampling signal in response to the first control signal; or the control terminal of the first switch receives the first control signal.
- Two control signals the first switch outputs the first down-sampling signal in response to the second control signal, so that the first switch can configure itself into different conduction states according to the received different control signals, which is convenient for the output of the first switch
- the sampling method of the signal is controlled.
- control terminal 3024 of the second switch 302 receives the third control signal, and the second switch 302 outputs the second up-sampling signal in response to the third control signal.
- control terminal 3024 of the second switch 302 receives the fourth control signal, and the second switch 302 outputs the second down-sampling signal in response to the fourth control signal.
- control terminal 3024 of the second switch 302 receives the third control signal, and the second switch 302 connects the first input terminal 3021 of the second switch 302 to the second switch 302 in response to the third control signal.
- the output terminal 3023 of the second switch 302 is turned on, and the output terminal 3023 of the second switch 302 outputs the first up-sampling signal.
- control terminal 3024 of the second switch 302 receives the fourth control signal
- the second switch 302 conducts the second input terminal 3022 of the second switch 302 and the output terminal 3023 of the second switch 302 in response to the fourth control signal
- the output terminal 3023 of the second switch 302 outputs the first down-sampling signal.
- control circuit in the true random number generator can output the third control signal or the fourth control signal; or, the control chip in the electronic device where the true random number generator is located can output the third control signal or the fourth control signal.
- control chip in the electronic device where the true random number generator is located can randomly output the third control signal or the fourth control signal, and can also output the third control signal and the fourth control signal cyclically according to a preset period.
- the control terminal of the second switch receives the third control signal, and the second switch outputs the second up-sampling signal in response to the third control signal; or the control terminal of the second switch receives the first Four control signals, the second switch outputs a second down-sampling signal in response to the fourth control signal.
- the second switch can configure itself into different conduction states according to the different control signals received, which facilitates control of the sampling mode of the signal output by the second switch.
- the period value of the first high-frequency clock signal and the period value of the second high-frequency clock signal are the period value of the high-frequency clock, and the standard deviation value of the phase jitter of the low-frequency clock signal
- the ratio to the high-frequency clock period value is greater than or equal to 100 and less than or equal to 1000.
- the low-frequency oscillator that generates the low-frequency clock signal when the first high-frequency clock signal and the second high-frequency clock signal are respectively subjected to rising edge sampling or falling edge sampling according to the low-frequency clock signal, the low-frequency oscillator that generates the low-frequency clock signal generates the first high-frequency clock signal
- the phase jitter of the first high-frequency oscillator and the second high-frequency oscillator that generate the second high-frequency clock signal are random, and the phase jitter of the first high-frequency oscillator and the second high-frequency oscillator are relative to the phase jitter of the low-frequency oscillator.
- the phase jitter of the frequency oscillator can be ignored, so the randomness of the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal mainly depends on the standard deviation of the phase jitter of the low-frequency oscillator. (That is, the root mean square value) relative to the period value of the first high-frequency oscillator and the second high-frequency oscillator.
- the period value of the first high-frequency clock signal and the second high-frequency clock signal is the high-frequency clock period value, when the ratio of the standard deviation value of the phase jitter of the low-frequency clock signal to the high-frequency clock period value is greater than or equal to 100 and less than or When it is equal to 1000, the output sequences of the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal are relatively random.
- FIG. 5 is a schematic circuit structure diagram of a true random number generator provided in an embodiment of the present application
- the true random number generator also includes a differential circuit 106.
- the input terminal 1061 of the differential circuit 106 receives a true random number signal
- the first output terminal 1062 of the differential circuit 106 outputs a true random number signal
- the second output terminal 1063 of the differential circuit 106 outputs Differential output signal
- the differential output signal and the true random number signal form a pair of differential signals.
- the input terminal 1061 of the differential circuit 106 and the output terminal 1055 of the post-processing circuit 105 are connected.
- the differential circuit 106 receives a true random number signal, and outputs a true random number signal and a differential output signal forming a pair of differential signals with the true random number signal to enhance the signal transmission process
- the anti-interference ability of the true random number signal and the differential output signal can be verified according to the true random number signal and the differential output signal to avoid errors caused by malicious attacks or tampering of the signal wiring.
- FIG. 6 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the present application, and the differential circuit 106 includes an inverter 107 , The input terminal 1071 of the inverter 107 receives a true random number signal, and the output terminal 1072 of the inverter 107 outputs a differential output signal.
- the input terminal 1071 of the inverter 107 is connected to the output terminal 1055 of the post-processing circuit 105 through the input terminal 1061 of the differential circuit 106, so that the input terminal 1071 of the inverter 107 inputs a true random number signal.
- the output terminal 1072 of 107 is connected to the second output terminal 1063 of the differential circuit 106, and the output terminal 1061 of the differential circuit 106 is connected to the first output terminal 1062 of the differential circuit 106.
- the inverter 107 is used to reverse the true random number signal input from the input terminal 1071 of the inverter 107, so that the differential output signal output from the output terminal of the inverter 107 has the opposite phase and the same frequency as the true random number signal.
- the output signal and the true random number signal form a pair of differential signals.
- the differential circuit 106 includes an inverter 107.
- the input terminal 1071 of the inverter 107 receives a true random number signal, and the inverter 107 reverses the true random number signal to make
- the differential output signal output by the output terminal 1072 of the inverter 107 is opposite to the true random number signal and has the same frequency, and the differential output signal and the true random number signal form a pair of differential signals.
- FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
- the electronic device 300 provided by the second embodiment of the present application includes a low-frequency oscillator 203, a first high-frequency oscillator 201, The second high-frequency oscillator 202 and any of the true random number generators 301 provided in the first embodiment of the present application, the first high-frequency oscillator 201 is used to output the first high-frequency clock signal, and the second high-frequency oscillator 202 Used to output the second high frequency clock signal.
- the first input terminal 3011 of the true random number generator 301 is connected to the output terminal 2011 of the first high-frequency oscillator 201, and the first input terminal 1011 of the first up-sampling circuit 101 passes through
- the first input terminal 3011 of the true random number generator 301 is connected to the output terminal 2011 of the first high-frequency oscillator 201, and receives the first high-frequency clock signal output by the first high-frequency oscillator 201.
- the first input terminal 1021 of the first down-sampling circuit 102 is connected to the output terminal 2011 of the first high-frequency oscillator 201 through the first input terminal 3011 of the true random number generator 301, and receives the output of the first high-frequency oscillator 201 The first high-frequency clock signal.
- the second input terminal 3012 of the true random number generator 301 is connected to the output terminal 2021 of the second high-frequency oscillator 202, and the first input terminal 1031 of the second up-sampling circuit 103 passes through the second input of the true random number generator 301
- the terminal 3012 is connected to the output terminal 2021 of the second high-frequency oscillator 202 to receive the second high-frequency clock signal output by the second high-frequency oscillator 202.
- the first input terminal 1041 of the second down-sampling circuit 104 is connected to the output terminal 2021 of the second high-frequency oscillator 202 through the second input terminal 3012 of the true random number generator 301, and receives the output of the second high-frequency oscillator 202.
- the second high frequency clock signal is connected to the output terminal 2021 of the second high-frequency oscillator 202, and the first input terminal 1031 of the second up-sampling circuit 103 passes through the second input of the true random number generator 301
- the terminal 3012 is connected to the output terminal
- the third input terminal 3013 of the true random number generator 301 is connected to the output terminal 2031 of the low frequency oscillator 203, the second input terminal 1012 of the first up-sampling circuit 101, the second input terminal 1022 of the first down-sampling circuit 102
- the second input terminal 1032 of the second up-sampling circuit 103 and the second input terminal 1042 of the second down-sampling circuit 104 are both conducted through the third input terminal 3013 of the true random number generator 301 and the output terminal 2031 of the low frequency oscillator 203 , Receiving the low-frequency clock signal output by the low-frequency oscillator 203.
- the electronic device provided by the embodiment of the present application includes a low frequency oscillator 203, a first high frequency oscillator 201, a second high frequency oscillator 202, and a true random number generator 301.
- the first high frequency oscillator 201 is used to output the first The high-frequency clock signal
- the second high-frequency oscillator 202 is used to output the second high-frequency clock signal.
- the two signals for the exclusive OR operation in the true random number generator 301 are not correlated with each other, the sampling mode can be set to the same or different, and the two signals are obtained by sampling according to different high-frequency clock signals.
- the two signals undergoing exclusive OR operation are highly independent of each other, which improves the randomness of the true random number signal obtained through the exclusive OR operation, and enables the output sequence of the true random number signal to meet independent and uniformly distributed randomness Number characteristics.
- the types of the first high-frequency oscillator 201 and the second high-frequency oscillator 202 include a crystal oscillator, a phase-locked loop, and a voltage-controlled oscillator.
- the oscillator types of the first high-frequency oscillator 201 and the second high-frequency oscillator 202 include crystal oscillators, phase-locked loops, and voltage-controlled oscillators. Compared with oscillators, crystal oscillators, phase-locked loops, and voltage-controlled oscillators have lower phase jitter.
- the low-frequency clock signal the first high-frequency clock signal and the second high-frequency clock signal are sampled at the rising edge and the falling edge respectively.
- the generated output sequences of the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal are relatively random.
- An output sequence of a true random number signal generated by performing an exclusive OR operation with one of the second up-sampling signal and the second down-sampling signal has high randomness.
- the low frequency oscillator 203, the first high frequency oscillator 201, and the second high frequency oscillator 202 are all relaxation oscillators.
- the typical value of the average current of the low frequency oscillator 203 is less than 100 nanoamperes, and the typical value of the average current of the first high frequency oscillator 201 and the typical value of the average current of the second high frequency oscillator 202 are both greater than 500 microamperes.
- the oscillator type of the first high frequency oscillator 201 and the second high frequency oscillator 202 is different from the oscillator type of the low frequency oscillator 203.
- the first high-frequency oscillator 201 and the second high-frequency oscillator 202 are relaxation oscillators, and the oscillator types of the low-frequency oscillator 203 include voltage-controlled oscillators, phase-locked loops, and crystal oscillators; or, the first A high-frequency oscillator 201 and a second high-frequency oscillator 202 are both phase-locked loops.
- the oscillator types of the low-frequency oscillator 203 include relaxation oscillators, voltage-controlled oscillators, and crystal oscillators; or, the first high-frequency oscillator 201.
- the second high-frequency oscillator 202 is a crystal oscillator.
- the oscillator types of the low-frequency oscillator 203 include relaxation oscillators, voltage-controlled oscillators, and phase-locked loops; or, the first high-frequency oscillator 201 and the second high-frequency oscillator 201
- the frequency oscillators 202 are all voltage controlled oscillators, and the oscillator types of the low frequency oscillator 203 include relaxation oscillators, phase-locked loops, and crystal oscillators.
- the electronic device compared with the first high-frequency oscillator 201, the second high-frequency oscillator 202, and the low-frequency oscillator 203 being the same oscillator type, when the first high-frequency oscillator 201 .
- the type of the second high frequency oscillator 202 is different from the type of the low frequency oscillator 203, the independence between the first high frequency oscillator 201 or the second high frequency oscillator 202 and the low frequency oscillator 203 is better, and the first The high-frequency clock signal or the second high-frequency clock signal is more independent from the low-frequency clock signal, and the first high-frequency clock signal and the second high-frequency clock signal are respectively sampled on the rising edge and the falling edge according to the low-frequency clock signal.
- the generated output sequence of the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal are more random.
- the electronic device 300 includes a chip or a chipset, and the chip or a chipset includes a low-frequency oscillator 203, a first high-frequency oscillator 201, and a second high-frequency oscillator 202.
- the low-frequency oscillator The device 203 is a wake-up clock source of the chip or chipset, and the first high-frequency oscillator 301 and the second high-frequency oscillator 202 are both system reference clock sources of the chip.
- the chip or chipset may contain the true random number generator, and the chip may also contain other functional modules or circuits.
- the electronic device may be a mobile terminal with NFC recognition function, which contains an NFC controller chip And the security chip, the NFC controller chip is connected with the security chip, and the security chip contains a true random number generator, which is used to generate a true random number, and is used for the NFC controller to identify the NFC card reader within the detection range Verification, and the low-frequency oscillator 203, the first high-frequency oscillator 201, and the second high-frequency oscillator 202 can be distributed in the NFC controller and/or the security chip.
- the low-frequency oscillator 203, the first high-frequency oscillator 201, and the second high-frequency oscillator 202 not only provide clock signals for the true random number generator, but are also used to provide the true random number generator in the electronic device.
- Function modules other than the generator provide wake-up clock and system reference clock.
- the electronic device uses the wake-up clock source contained in the chip or chipset as the low-frequency oscillator, and uses multiple reference clock sources contained in the system as the first high-frequency oscillator and the second high-frequency oscillator.
- Oscillator under the premise of not affecting the generation of true random number signals, multiplexing the oscillator in the chip as the clock source, improving the utilization of circuit modules in the device, and avoiding adding more oscillators to the electronic device. Reduce the manufacturing cost of electronic equipment.
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Manipulation Of Pulses (AREA)
Abstract
A true random number generator and an electronic device. The true random number generator comprises a first up-sampling circuit (101), a first down-sampling circuit (102), a second up-sampling circuit (103) and a second down-sampling circuit (104), wherein the first up-sampling circuit (101) outputs a first up-sampling signal, the first down-sampling circuit (102) outputs a first down-sampling signal, the second up-sampling circuit (103) outputs a second up-sampling signal, and the second down-sampling circuit (104) outputs a second down-sampling signal; and a post-processing circuit (105) used to perform an exclusive-OR operation on one of the first up-sampling signal and the first down-sampling signal and one of the second up-sampling signal and the second down-sampling signal to generate and output a true random number signal, wherein the two signals that have been subjected to the exclusive-OR operation are signals respectively sampled according to different high-frequency clock signals, and have relatively high independence of each other, thus improving the randomness of an obtained true random number signal, such that an output sequence of the true random number signal can satisfy the random number characteristic of independent and uniform distribution.
Description
本申请实施例涉及信息安全技术领域,尤其涉及一种真随机数发生器及电子设备。The embodiments of the present application relate to the field of information security technology, and in particular, to a true random number generator and electronic equipment.
随着网络技术的广泛利用,移动支付得到了较为广泛的普及,电子设备被越来越多的用于存储、处理、传输包含关键信息例如移动支付信息的数据,因此信息安全的重要性也日渐提高。为了避免信息在传递的过程中被窃取,在信息进行传递前,一般需要使用安全密钥对信息进行加密。With the widespread use of network technology, mobile payment has been widely popularized. Electronic devices are increasingly used to store, process, and transmit data containing key information such as mobile payment information. Therefore, the importance of information security is also increasing. improve. In order to prevent the information from being stolen during the transfer process, it is generally necessary to encrypt the information with a security key before the information is transferred.
作为密码系统必不可少的一部分,真随机数发生器(True Random Number Generator,TRNG)一般用于产生密码系统中所需的高质量随机数序列,例如用于产生安全密钥等。As an indispensable part of the cryptographic system, the True Random Number Generator (TRNG) is generally used to generate high-quality random number sequences required in the cryptographic system, for example, to generate security keys.
发明内容Summary of the invention
有鉴于此,本发明实施例提供一种真随机数发生器及电子设备,用以克服现有技术中存在的缺陷。In view of this, the embodiments of the present invention provide a true random number generator and an electronic device to overcome the defects in the prior art.
本申请的实施例的第一方面提供了一种真随机数发生器,真随机数发生器包括第一上采样电路、第一下采样电路、第二上采样电路以及第二下采样电路;The first aspect of the embodiments of the present application provides a true random number generator, which includes a first up-sampling circuit, a first down-sampling circuit, a second up-sampling circuit, and a second down-sampling circuit;
第一上采样电路接收第一高频振荡器输出的第一高频时钟信号以及低频振荡器输出的低频时钟信号,第一上采样电路用于根据低频时钟信号对第一高频时钟信号进行上升沿采样,输出第一上采样信号;The first up-sampling circuit receives the first high-frequency clock signal output by the first high-frequency oscillator and the low-frequency clock signal output by the low-frequency oscillator, and the first up-sampling circuit is used to increase the first high-frequency clock signal according to the low-frequency clock signal Edge sampling, output the first up-sampling signal;
第一下采样电路接收第一高频时钟信号以及低频时钟信号,第一下采样电路用于根据低频时钟信号对第一高频时钟信号进行下降沿采样,输出第一下采样信号;The first down-sampling circuit receives the first high-frequency clock signal and the low-frequency clock signal, and the first down-sampling circuit is configured to sample the falling edge of the first high-frequency clock signal according to the low-frequency clock signal, and output the first down-sampling signal;
第二上采样电路接收第二高频振荡器输出的第二高频时钟信号以及低频时钟信号,第二上采样电路用于根据低频时钟信号对第二高频时钟信号进行上升沿采样,输出第二上采样信号;The second up-sampling circuit receives the second high-frequency clock signal and the low-frequency clock signal output by the second high-frequency oscillator. The second up-sampling circuit is used to sample the rising edge of the second high-frequency clock signal according to the low-frequency clock signal, and output the first 2. Up-sampled signal;
第二下采样电路接收第二高频时钟信号以及低频时钟信号,第二下采样 电路用于根据低频时钟信号对第二高频时钟信号进行下降沿采样,输出第二下采样信号;The second down-sampling circuit receives the second high-frequency clock signal and the low-frequency clock signal, and the second down-sampling circuit is used to sample the falling edge of the second high-frequency clock signal according to the low-frequency clock signal, and output the second down-sampling signal;
后处理电路接收第一上采样信号、第一下采样信号、第二上采样信号以及第二下采样信号,后处理电路用于对第一上采样信号、第一下采样信号中的一个信号,与第二上采样信号、第二下采样信号中的一个信号进行异或运算,以生成真随机数信号并输出。The post-processing circuit receives the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal, and the post-processing circuit is used for processing one of the first up-sampling signal and the first down-sampling signal, Perform an exclusive OR operation with one of the second up-sampled signal and the second down-sampled signal to generate and output a true random number signal.
本申请的实施例提供的真随机数发生器中,第一高频振荡器、第二高频振荡器以及低频振荡器为不同的振荡器,因此第一高频时钟信号、第二高频时钟信号以及低频时钟信号为互不相关的时钟信号,通过低频时钟信号对第一高频时钟信号、第二高频时钟信号分别进行上升沿采样与下降沿采样,所得到的第一上采样信号、第一下采样信号、第二上采样信号以及第二下采样信号之间互不相关。之后通过后处理电路对第一上采样信号、第一下采样信号中的一个信号,与第二上采样信号、第二下采样信号中的一个信号进行异或运算,进行异或运算的两个信号互不相关、采样方式可以被设置为相同也可以被设置为不同、并且是分别根据不同的高频时钟信号进行采样获得的两个信号,因此进行异或运算的两个信号相互之间的独立性较高,提高了通过异或运算获得的真随机数信号的随机性,同时通过异或运算使真随机数信号的输出序列能够满足独立、均匀分布的随机数特性。In the true random number generator provided by the embodiment of the present application, the first high-frequency oscillator, the second high-frequency oscillator, and the low-frequency oscillator are different oscillators, so the first high-frequency clock signal and the second high-frequency clock The signal and the low-frequency clock signal are uncorrelated clock signals. The first high-frequency clock signal and the second high-frequency clock signal are sampled at the rising edge and the falling edge of the first high-frequency clock signal through the low-frequency clock signal, respectively, and the first up-sampled signal, The first down-sampled signal, the second up-sampled signal, and the second down-sampled signal are not correlated with each other. After that, one of the first up-sampled signal and the first down-sampled signal is XORed with one of the second up-sampled signal and the second down-sampled signal through a post-processing circuit, and the two XOR operations are performed The signals are not correlated with each other, the sampling mode can be set to the same or can be set to different, and the two signals are obtained by sampling according to different high-frequency clock signals, so the two signals that are subjected to the exclusive OR operation are mutually exclusive The independence is high, which improves the randomness of the true random number signal obtained through the XOR operation, and at the same time, the output sequence of the true random number signal can meet the independent and uniformly distributed random number characteristics through the XOR operation.
后文将参照附图以示例性而非限制性的方式详细描述本申请实施例的一些具体实施例。附图中相同的附图标记标示了相同或类似的部件或部分。本领域技术人员应该理解,这些附图未必是按比例绘制的。附图中:Hereinafter, some specific embodiments of the embodiments of the present application will be described in detail in an exemplary but not restrictive manner with reference to the accompanying drawings. The same reference numerals in the drawings indicate the same or similar components or parts. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the attached picture:
图1为本申请实施例提供的一种真随机数发生器的示意性电路结构图;FIG. 1 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application;
图2为本申请实施例提供的一种真随机数发生器的示意性电路结构图;2 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application;
图3为本申请实施例提供的一种真随机数发生器的示意性电路结构图;3 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application;
图4为本申请实施例提供的一种真随机数发生器的示意性电路结构图;4 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application;
图5为本申请实施例提供的一种真随机数发生器的示意性电路结构图;FIG. 5 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application;
图6为本申请实施例提供的一种真随机数发生器的示意性电路结构图;6 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application;
图7为本申请实施例提供的一种含有真随机数发生器的电子设备的示意性结构图。FIG. 7 is a schematic structural diagram of an electronic device containing a true random number generator provided by an embodiment of the application.
下面结合本发明实施例附图进一步说明本发明实施例具体实现。The specific implementation of the embodiments of the present invention will be further described below in conjunction with the accompanying drawings of the embodiments of the present invention.
相关技术中,随机数发生器主要分为两种:伪随机数发生器和真随机数发生器。用确定性的算法计算得到的随机序列叫伪随机数,如果攻击者拥有足够的计算能力,则完全可以预测到伪随机数的产生规律,一般应用在安全性要求较低的场合。而真随机数是由物理方法产生,选取了真实世界的自然随机性,因为具有外界无法预知、不可再现等优点,能够更好的保护信息的传输,广泛应用在信息安全领域。In related technologies, random number generators are mainly divided into two types: pseudo random number generators and true random number generators. The random sequence calculated by a deterministic algorithm is called a pseudo-random number. If the attacker has sufficient computing power, the generation rule of the pseudo-random number can be predicted, and it is generally used in occasions with low security requirements. The true random number is generated by physical methods, and the natural randomness of the real world is selected. Because it has the advantages of unpredictable and unreproducible from the outside world, it can better protect the transmission of information and is widely used in the field of information security.
真随机数发生器的核心必须是一个本质上随机的物理过程,它选自于自然随机性。实现真随机数发生器的方式有很多种,例如离散时间混沌法,噪声直接放大法,振荡采样法,亚稳态采样法等。其中振荡采样法由于实现方法简单、数据随机性良好,应用最为广泛。但是根据振荡采样法实现的真随机数发生器所产生的随机数信号随机性不高,随机数信号的输出序列无法满足独立、均匀分布的随机数特性,其破解率相对于根据离散时间混沌法,噪声直接放大法,振荡采样法,亚稳态采样法等实现的真随机数发生器所生成的随机数信号的破解率要高,从而提高了数据在传输时被泄露的几率,损害了用户体验。The core of a true random number generator must be an essentially random physical process, which is selected from natural randomness. There are many ways to realize a true random number generator, such as discrete-time chaos method, direct noise amplification method, oscillation sampling method, metastable sampling method, etc. Among them, the oscillation sampling method is the most widely used due to its simple implementation method and good data randomness. However, the random number signal generated by the true random number generator implemented according to the oscillation sampling method is not very random, and the output sequence of the random number signal cannot meet the characteristics of independent and uniformly distributed random numbers. , Noise direct amplification method, oscillating sampling method, metastable sampling method, etc. The real random number signal generated by the real random number generator has a high cracking rate, thereby increasing the probability of data leakage during transmission and harming users Experience.
有鉴于此,本申请实施例提供一种真随机数发生器及电子设备,用以克服现有技术中随机数信号随机性不高、随机数信号的输出序列满足独立、均匀分布的随机数特性的技术缺陷。In view of this, the embodiments of the present application provide a true random number generator and electronic equipment to overcome the low randomness of random number signals in the prior art, and the output sequence of random number signals satisfies independent and uniformly distributed random number characteristics. Technical defects.
本申请的实施例提供的真随机数发生器中,第一高频振荡器、第二高频振荡器以及低频振荡器为不同的振荡器,因此第一高频时钟信号、第二高频时钟信号以及低频时钟信号为互不相关的时钟信号,通过低频时钟信号对第一高频时钟信号、第二高频时钟信号分别进行上升沿采样与下降沿采样,所得到的第一上采样信号、第一下采样信号、第二上采样信号以及第二下采样信号之间互不相关。之后通过后处理电路对第一上采样信号、第一下采样信号中的一个信号,与第二上采样信号、第二下采样信号中的一个信号进行异或运算,进行异或运算的两个信号互不相关、采样方式可以被设置为相同也可以被设置为不同、并且是分别根据不同的高频时钟信号进行采样获得的两个信号,因此进行异或运算的两个信号相互之间的独立性较高,提高了通过异或运算获得的真随机数信号的随机性,同时通过异或运算使真随机数信号的输出序列能够满足独 立、均匀分布的随机数特性。In the true random number generator provided by the embodiment of the present application, the first high-frequency oscillator, the second high-frequency oscillator, and the low-frequency oscillator are different oscillators, so the first high-frequency clock signal and the second high-frequency clock The signal and the low-frequency clock signal are uncorrelated clock signals. The first high-frequency clock signal and the second high-frequency clock signal are sampled at the rising edge and the falling edge of the first high-frequency clock signal through the low-frequency clock signal, respectively, and the first up-sampled signal, The first down-sampled signal, the second up-sampled signal, and the second down-sampled signal are not correlated with each other. After that, one of the first up-sampled signal and the first down-sampled signal is XORed with one of the second up-sampled signal and the second down-sampled signal through a post-processing circuit, and the two XOR operations are performed The signals are not correlated with each other, the sampling mode can be set to the same or can be set to different, and the two signals are obtained by sampling according to different high-frequency clock signals, so the two signals that are subjected to the exclusive OR operation are mutually exclusive The independence is high, which improves the randomness of the true random number signal obtained through the XOR operation, and at the same time, the output sequence of the true random number signal can meet the independent and uniformly distributed random number characteristics through the XOR operation.
下面结合本申请实施例附图进一步说明本申请实施例具体实现。The specific implementation of the embodiments of the present application will be further described below in conjunction with the drawings of the embodiments of the present application.
实施例一Example one
图1为本申请实施例提供的一种真随机数发生器的示意性电路结构图,如图1所示,本申请实施例一提供的真随机数发生器,包括:第一上采样电路101、第一下采样电路102、第二上采样电路103以及第二下采样电路104。FIG. 1 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the present application. As shown in FIG. 1, the true random number generator provided by the first embodiment of the present application includes: a first up-sampling circuit 101 , The first down-sampling circuit 102, the second up-sampling circuit 103, and the second down-sampling circuit 104.
第一上采样电路101接收第一高频振荡器201输出的第一高频时钟信号以及低频振荡器203输出的低频时钟信号,第一上采样电路101用于根据低频时钟信号对第一高频时钟信号进行上升沿采样,输出第一上采样信号。The first up-sampling circuit 101 receives the first high-frequency clock signal output by the first high-frequency oscillator 201 and the low-frequency clock signal output by the low-frequency oscillator 203. The clock signal is sampled on the rising edge, and the first up-sampling signal is output.
第一下采样电路102接收第一高频时钟信号以及低频时钟信号,第一下采样电路102用于根据低频时钟信号对第一高频时钟信号进行下降沿采样,输出第一下采样信号。The first down-sampling circuit 102 receives the first high-frequency clock signal and the low-frequency clock signal, and the first down-sampling circuit 102 is configured to sample the first high-frequency clock signal on the falling edge according to the low-frequency clock signal, and output the first down-sampling signal.
第二上采样电路103接收第二高频振荡器202输出的第二高频时钟信号以及低频时钟信号,第二上采样电路103用于根据低频时钟信号对第二高频时钟信号进行上升沿采样,输出第二上采样信号;The second up-sampling circuit 103 receives the second high-frequency clock signal and the low-frequency clock signal output by the second high-frequency oscillator 202, and the second up-sampling circuit 103 is used to sample the rising edge of the second high-frequency clock signal according to the low-frequency clock signal , Output the second up-sampling signal;
第二下采样电路104接收第二高频时钟信号以及低频时钟信号,第二下采样电路104用于根据低频时钟信号对第二高频时钟信号进行下降沿采样,输出第二下采样信号。The second down-sampling circuit 104 receives the second high-frequency clock signal and the low-frequency clock signal, and the second down-sampling circuit 104 is configured to sample the falling edge of the second high-frequency clock signal according to the low-frequency clock signal, and output the second down-sampling signal.
后处理电路105接收第一上采样信号、第一下采样信号、第二上采样信号以及第二下采样信号。后处理电路105用于对第一上采样信号、第一下采样信号中的一个信号,与第二上采样信号、第二下采样信号中的一个信号进行异或运算,以生成真随机数信号并输出。The post-processing circuit 105 receives the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal. The post-processing circuit 105 is used to perform an exclusive OR operation on one of the first up-sampled signal and the first down-sampled signal with one of the second up-sampled signal and the second down-sampled signal to generate a true random number signal And output.
示例性地,如图1所示,第一上采样电路101的第一输入端1011与第一高频振荡器201的输出端2011导通,第一上采样电路101的第一输入端1011接收第一高频振荡器201输出的第一高频时钟信号;第一上采样电路101的第二输入端1012与低频振荡器203的输出端2031导通,第一上采样电路101的第二输入端1012接收低频振荡器203输出的低频时钟信号。第一上采样电路101的输出端1013与后处理电路105的第一输入端1051导通。后处理电路105的第一输入端1051接收第一上采样电路101的输出端1013输出的第一上采样信号。Exemplarily, as shown in FIG. 1, the first input terminal 1011 of the first up-sampling circuit 101 is connected to the output terminal 2011 of the first high-frequency oscillator 201, and the first input terminal 1011 of the first up-sampling circuit 101 receives The first high-frequency clock signal output by the first high-frequency oscillator 201; the second input terminal 1012 of the first up-sampling circuit 101 and the output terminal 2031 of the low-frequency oscillator 203 are conducted, and the second input of the first up-sampling circuit 101 The terminal 1012 receives the low-frequency clock signal output by the low-frequency oscillator 203. The output terminal 1013 of the first up-sampling circuit 101 is connected to the first input terminal 1051 of the post-processing circuit 105. The first input terminal 1051 of the post-processing circuit 105 receives the first up-sampling signal output from the output terminal 1013 of the first up-sampling circuit 101.
第一下采样电路102的第一输入端1021与第一高频振荡器201的输出端 2011导通,第一下采样电路102的第一输入端1021接收第一高频振荡器201输出的第一高频时钟信号,第一下采样电路102的第二输入端1022与低频振荡器203的输出端2031导通,第一下采样电路102的第二输入端1022接收低频振荡器203输出的低频时钟信号,第一下采样电路102的输出端1023与后处理电路105的第二输入端1052导通。后处理电路105的第二输入端1052接收第一下采样电路102的输出端1023输出的第一下采样信号。The first input terminal 1021 of the first down-sampling circuit 102 is connected to the output terminal 2011 of the first high-frequency oscillator 201, and the first input terminal 1021 of the first down-sampling circuit 102 receives the first output from the first high-frequency oscillator 201 A high-frequency clock signal, the second input terminal 1022 of the first down-sampling circuit 102 and the output terminal 2031 of the low-frequency oscillator 203 are conducted, and the second input terminal 1022 of the first down-sampling circuit 102 receives the low-frequency output from the low-frequency oscillator 203 For the clock signal, the output terminal 1023 of the first down-sampling circuit 102 and the second input terminal 1052 of the post-processing circuit 105 are connected. The second input terminal 1052 of the post-processing circuit 105 receives the first down-sampling signal output from the output terminal 1023 of the first down-sampling circuit 102.
第二上采样电路103的第一输入端1031与第二高频振荡器202的输出端2021导通,第二上采样电路103的第一输入端1031接收第二高频振荡器202输出的第二高频时钟信号,第二上采样电路103的第二输入端1032与低频振荡器203的输出端2031导通,第二上采样电路103的第二输入端1032接收低频振荡器203输出的低频时钟信号,第二上采样电路103的输出端1033与后处理电路105的第三输入端1053导通。后处理电路105的第三输入端1053接收第二上采样电路103的输出端1033输出的第二上采样信号。The first input terminal 1031 of the second up-sampling circuit 103 is connected to the output terminal 2021 of the second high-frequency oscillator 202, and the first input terminal 1031 of the second up-sampling circuit 103 receives the first output from the second high-frequency oscillator 202. Two high-frequency clock signals, the second input terminal 1032 of the second up-sampling circuit 103 and the output terminal 2031 of the low-frequency oscillator 203 are conducted, and the second input terminal 1032 of the second up-sampling circuit 103 receives the low-frequency output of the low-frequency oscillator 203 For the clock signal, the output terminal 1033 of the second up-sampling circuit 103 and the third input terminal 1053 of the post-processing circuit 105 are connected. The third input terminal 1053 of the post-processing circuit 105 receives the second up-sampling signal output from the output terminal 1033 of the second up-sampling circuit 103.
第二下采样电路104的第一输入端1041与第二高频振荡器202的输出端2021导通,第二下采样电路104的第一输入端1041接收第二高频振荡器202输出的第二高频时钟信号,第二下采样电路104的第二输入端1042与低频振荡器203的输出端2031导通,第二下采样电路104的第二输入端1042接收低频振荡器203输出的低频时钟信号,第二下采样电路104的输出端1043与后处理电路105的第四输入端1054导通。后处理电路105的第四输入端1054接收第二下采样电路104的输出端1043输出的第二下采样信号。The first input terminal 1041 of the second down-sampling circuit 104 is connected to the output terminal 2021 of the second high-frequency oscillator 202, and the first input terminal 1041 of the second down-sampling circuit 104 receives the first output from the second high-frequency oscillator 202. Two high-frequency clock signals, the second input terminal 1042 of the second down-sampling circuit 104 and the output terminal 2031 of the low-frequency oscillator 203 are conducted, and the second input terminal 1042 of the second down-sampling circuit 104 receives the low-frequency output from the low-frequency oscillator 203 For the clock signal, the output terminal 1043 of the second down-sampling circuit 104 and the fourth input terminal 1054 of the post-processing circuit 105 are connected. The fourth input terminal 1054 of the post-processing circuit 105 receives the second down-sampling signal output from the output terminal 1043 of the second down-sampling circuit 104.
后处理电路105的输出端1055输出真随机数信号。The output terminal 1055 of the post-processing circuit 105 outputs a true random number signal.
具体地,相位抖动(jitter)是振荡器中因热噪声所引起的一种随机现象,相位抖动本质上也是一种噪声,是一种符合高斯分布的随机性变量。由于第一高频振荡器、第二高频振荡器以及低频振荡器的相位抖动是随机的,因此根据低频振荡器生成低频时钟信号对第一高频振荡器生成的第一高频时钟信号、第二高频振荡器生成的第二高频时钟信号分别进行上升沿采样与下降沿采样所生成的第一上采样信号、第一下采样信号、第二上采样信号、第二下采样信号的输出序列是随机的,通过对第一上采样信号、第一下采样信号中的一个信号,与第二上采样信号、第二下采样信号中的一个信号进行异或运算生成的真随机数信号的输出序列是随机的。Specifically, phase jitter (jitter) is a random phenomenon caused by thermal noise in an oscillator, and phase jitter is essentially a kind of noise, which is a random variable conforming to a Gaussian distribution. Since the phase jitter of the first high-frequency oscillator, the second high-frequency oscillator, and the low-frequency oscillator are random, the low-frequency clock signal generated by the low-frequency oscillator is compared with the first high-frequency clock signal generated by the first high-frequency oscillator. The second high-frequency clock signal generated by the second high-frequency oscillator performs rising edge sampling and falling edge sampling respectively. The output sequence is random. A true random number signal is generated by XORing one of the first up-sampling signal and the first down-sampling signal with one of the second up-sampling signal and the second down-sampling signal The output sequence is random.
第一上采样信号是第一上采样电路101用于根据低频时钟信号对第一高 频时钟信号进行上升沿采样生成的,第一上采样信号的频率与低频时钟信号的频率相同,第一下采样信号是第一下采样电路103用于根据低频时钟信号对第一高频时钟信号进行下降沿采样生成的,第一下采样信号的频率与低频时钟信号的频率相同。基于同样的道理,第二上采样信号以及第二下采样信号的频率均与低频时钟信号的频率相同。通过对第一上采样信号、第一下采样信号中的一个信号,与第二上采样信号、第二下采样信号中的一个信号进行异或运算生成的真随机数信号的频率与低频时钟信号的频率相同。The first up-sampling signal is generated by the first up-sampling circuit 101 for sampling the rising edge of the first high-frequency clock signal according to the low-frequency clock signal. The frequency of the first up-sampling signal is the same as that of the low-frequency clock signal. The sampling signal is generated by the first down-sampling circuit 103 for sampling the falling edge of the first high-frequency clock signal according to the low-frequency clock signal, and the frequency of the first down-sampling signal is the same as the frequency of the low-frequency clock signal. Based on the same principle, the frequencies of the second up-sampling signal and the second down-sampling signal are the same as the frequency of the low-frequency clock signal. The frequency and low-frequency clock signal of the true random number signal generated by XORing one of the first up-sampling signal and the first down-sampling signal with one of the second up-sampling signal and the second down-sampling signal The frequency is the same.
示例性地,低频时钟信号的频率为32K赫兹,第一高频时钟信号以及第二高频时钟信号的频率大于或等于80M赫兹且小于或等于100M赫兹,真随机数信号的频率为32K赫兹。Exemplarily, the frequency of the low-frequency clock signal is 32K Hz, the frequencies of the first high-frequency clock signal and the second high-frequency clock signal are greater than or equal to 80 MHz and less than or equal to 100 MHz, and the frequency of the true random number signal is 32K Hz.
在后处理电路中,进行异或运算时是根据两位数据产生一位数据,因此可以降低真随机数信号的输出序列的中前一位数与后一位数之间的相关性,使真随机数信号的输出序列中前后两位数相互独立。In the post-processing circuit, the XOR operation is based on the two-bit data to generate one bit of data, so it can reduce the correlation between the first digit and the next digit in the output sequence of the true random number signal, so that the true The two digits in the output sequence of the random number signal are independent of each other.
另外,在后处理电路中,进行异或运算得到的真随机数信号的输出序列也能够满足均匀分布的随机数特性。示例性地,以后处理电路对第一上采样信号以及第二下采样信号进行异或运算为例进行说明,第一上采样信号以及第二下采样信号中任一一路信号的输出序列中出现“0”、“1”的概率分别为0.5C与0.5C,其中C<1,C为用于衡量第一上采样信号与第二下采样信号之间的独立性的参数,C的值越小,第一上采样信号与第二下采样信号之间的独立性越好,第一上采样信号与第二下采样信号越不相关。通过对第一上采样信号以及第二下采样信号进行异或运算生成真随机数信号,该真随机数信号中出现“0”的概率为P(0)=(0.5+C)
2+(0.5-C)
2=0.5+2C
2、真随机数信号中出现“1”的概率为P(1)=(0.5+C)*(0.5-C)+(0.5-C)*(0.5+C)=0.5-2C
2,与0.5C相比,P(0)与P(1)更加接近0.5,因此经过异或运算后生成的真随机数信号的输出序列“0”和“1”的分布均匀。
In addition, in the post-processing circuit, the output sequence of the true random number signal obtained by the exclusive OR operation can also meet the uniformly distributed random number characteristics. Exemplarily, the post-processing circuit performs an exclusive-OR operation on the first up-sampled signal and the second down-sampled signal as an example. The output sequence of any one of the first up-sampled signal and the second down-sampled signal appears in the output sequence The probabilities of "0" and "1" are 0.5C and 0.5C, respectively, where C<1, and C is a parameter used to measure the independence between the first up-sampled signal and the second down-sampled signal. The value of C is Smaller, the better the independence between the first up-sampling signal and the second down-sampling signal, the more irrelevant the first up-sampling signal and the second down-sampling signal. A true random number signal is generated by XORing the first up-sampled signal and the second down-sampled signal. The probability of "0" in the true random number signal is P(0)=(0.5+C) 2 +(0.5 -C) 2 =0.5+2C 2 , the probability of "1" appearing in a true random number signal is P(1)=(0.5+C)*(0.5-C)+(0.5-C)*(0.5+C) =0.5-2C 2 , compared with 0.5C, P(0) and P(1) are closer to 0.5, so the output sequence "0" and "1" of the true random number signal generated after the exclusive OR operation are evenly distributed .
其中,输出第一高频时钟信号的第一高频振荡器、输出第二高频时钟信号的第二高频振荡器以及输出低频时钟信号的低频振荡器为不同的振荡器,可以被视为物理上以不同实体存在的计时仪器,第一高频时钟信号、第二高频时钟信号与低频时钟信号之间互不相关,即第一高频时钟信号、第二高频时钟信号与低频时钟信号相互之间不会产生任何联系,无法根据其中一个时钟信号得到另一个时钟信号。第一上采样信号、第一下采样信号是根据低频时钟信号对 第一高频时钟信号进行采样得到的,第二上采样信号、第二下采样信号是根据低频时钟信号对第二高频时钟信号进行采样得到的,因此第一上采样信号、第一下采样信号、第二上采样信号、第二下采样信号之间互不相关。后处理电路对第一上采样信号、第一下采样信号中的一个信号,与第二上采样信号、第二下采样信号中的一个信号进行异或运算,其中进行异或运算的两个信号互不相关、采样方式可以被设置为相同也可以被设置为不同、并且是分别根据不同的高频时钟信号进行采样获得的信号。其中,与根据同一个高频时钟信号进行采样获得的两个信号相比,分别根据不同的高频时钟信号进行采样获得的信号相互之间的独立性较高。因此后处理电路通过异或运算生成的真随机数信号的随机性较高。Among them, the first high-frequency oscillator that outputs the first high-frequency clock signal, the second high-frequency oscillator that outputs the second high-frequency clock signal, and the low-frequency oscillator that outputs the low-frequency clock signal are different oscillators, which can be regarded as different oscillators. A timing instrument that physically exists as different entities. The first high-frequency clock signal, the second high-frequency clock signal, and the low-frequency clock signal are not related to each other, that is, the first high-frequency clock signal, the second high-frequency clock signal, and the low-frequency clock The signals will not have any connection with each other, and it is impossible to obtain another clock signal based on one of the clock signals. The first up-sampling signal and the first down-sampling signal are obtained by sampling the first high-frequency clock signal according to the low-frequency clock signal, and the second up-sampling signal and the second down-sampling signal are obtained by sampling the second high-frequency clock signal according to the low-frequency clock signal. The signal is sampled, so the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal are not correlated with each other. The post-processing circuit performs an exclusive OR operation on one of the first up-sampled signal and the first down-sampled signal and one of the second up-sampled signal and the second down-sampled signal, and the two signals are subjected to the exclusive OR operation The mutual non-correlation and sampling mode can be set to be the same or different, and they are signals obtained by sampling respectively according to different high-frequency clock signals. Among them, compared with two signals obtained by sampling based on the same high-frequency clock signal, the signals obtained by sampling based on different high-frequency clock signals are more mutually independent. Therefore, the randomness of the true random number signal generated by the post-processing circuit through the exclusive OR operation is relatively high.
本申请的实施例提供的真随机数发生器中,第一高频振荡器、第二高频振荡器以及低频振荡器为不同的振荡器,因此第一高频时钟信号、第二高频时钟信号以及低频时钟信号为互不相关的时钟信号,通过低频时钟信号对第一高频时钟信号、第二高频时钟信号分别进行上升沿采样与下降沿采样,所得到的第一上采样信号、第一下采样信号、第二上采样信号以及第二下采样信号之间互不相关。之后通过后处理电路对第一上采样信号、第一下采样信号中的一个信号,与第二上采样信号、第二下采样信号中的一个信号进行异或运算,进行异或运算的两个信号互不相关、采样方式可以被设置为相同也可以被设置为不同、并且是分别根据不同的高频时钟信号进行采样获得的两个信号,因此进行异或运算的两个信号相互之间的独立性较高,提高了通过异或运算获得的真随机数信号的随机性,同时通过异或运算使真随机数信号的输出序列能够满足独立、均匀分布的随机数特性。In the true random number generator provided by the embodiment of the present application, the first high-frequency oscillator, the second high-frequency oscillator, and the low-frequency oscillator are different oscillators, so the first high-frequency clock signal and the second high-frequency clock The signal and the low-frequency clock signal are clock signals that are not related to each other. The first high-frequency clock signal and the second high-frequency clock signal are respectively sampled on the rising edge and the falling edge through the low-frequency clock signal, and the first up-sampled signal, The first down-sampled signal, the second up-sampled signal, and the second down-sampled signal are not correlated with each other. After that, one of the first up-sampled signal and the first down-sampled signal is XORed with one of the second up-sampled signal and the second down-sampled signal through a post-processing circuit, and the two XOR operations are performed The signals are not correlated with each other, the sampling mode can be set to the same or can be set to different, and the two signals are obtained by sampling according to different high-frequency clock signals, so the two signals that are subjected to the exclusive OR operation are mutually exclusive The independence is high, which improves the randomness of the true random number signal obtained through the XOR operation, and at the same time, the output sequence of the true random number signal can meet the independent and uniformly distributed random number characteristics through the XOR operation.
可选的,图2为本申请实施例提供的一种真随机数发生器的示意性电路结构图,如图2所示,在本申请的一个实施例中,真随机数发生器还包括第三上采样电路108以及第三下采样电路109。Optionally, FIG. 2 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the application. As shown in FIG. 2, in an embodiment of the application, the true random number generator further includes a first Three up-sampling circuit 108 and third down-sampling circuit 109.
第三上采样电路108接收第三高频振荡器204输出的第三高频时钟信号以及低频振荡器203输出的低频时钟信号,第三上采样电路108用于根据低频时钟信号对第三高频时钟信号进行上升沿采样,输出第三上采样信号。The third up-sampling circuit 108 receives the third high-frequency clock signal output by the third high-frequency oscillator 204 and the low-frequency clock signal output by the low-frequency oscillator 203. The clock signal is sampled on the rising edge, and the third up-sampling signal is output.
第三下采样电路109接收第三高频时钟信号以及低频时钟信号,第三下采样电路109用于根据低频时钟信号对第三高频时钟信号进行下降沿采样,输出第三下采样信号。The third down-sampling circuit 109 receives the third high-frequency clock signal and the low-frequency clock signal, and the third down-sampling circuit 109 is configured to sample the third high-frequency clock signal on the falling edge according to the low-frequency clock signal, and output the third down-sampling signal.
后处理电路105接收第三上采样信号以及第三下采样信号,后处理电路105用于从第一上采样信号、第一下采样信号中的一个信号、第二上采样信号、第二下采样信号中的一个信号、以及第三上采样信号、第三下采样信号中的一个信号中选取任两个信号进行异或运算,以生成真随机数信号并输出。The post-processing circuit 105 receives the third up-sampling signal and the third down-sampling signal. The post-processing circuit 105 is used to sample the first up-sampling signal, one of the first down-sampling signals, the second up-sampling signal, and the second down-sampling signal. Select any two signals from one of the signals and one of the third up-sampled signal and the third down-sampled signal to perform an exclusive OR operation to generate and output a true random number signal.
示例性地,如图2所示,第三上采样电路108的第一输入端1081与第三高频振荡器204的输出端2041导通,第三上采样电路108的第一输入端1081接收第三高频振荡器204输出的第一高频时钟信号;第三上采样电路108的第二输入端1082与低频振荡器203的输出端2031导通,第三上采样电路108的第二输入端1082接收低频振荡器203输出的低频时钟信号。第三上采样电路108的输出端1083与后处理电路105的第五输入端1056导通。后处理电路105的第五输入端1056接收第三上采样电路108的输出端1083输出的第三上采样信号。Exemplarily, as shown in FIG. 2, the first input terminal 1081 of the third up-sampling circuit 108 and the output terminal 2041 of the third high-frequency oscillator 204 are turned on, and the first input terminal 1081 of the third up-sampling circuit 108 receives The first high-frequency clock signal output by the third high-frequency oscillator 204; the second input terminal 1082 of the third up-sampling circuit 108 and the output terminal 2031 of the low-frequency oscillator 203 are conducted, and the second input of the third up-sampling circuit 108 The terminal 1082 receives the low-frequency clock signal output by the low-frequency oscillator 203. The output terminal 1083 of the third up-sampling circuit 108 is connected to the fifth input terminal 1056 of the post-processing circuit 105. The fifth input terminal 1056 of the post-processing circuit 105 receives the third up-sampling signal output from the output terminal 1083 of the third up-sampling circuit 108.
第三下采样电路109的第一输入端1091与第三高频振荡器204的输出端2041导通,第三下采样电路109的第一输入端1091接收第三高频振荡器204输出的第一高频时钟信号,第三下采样电路109的第二输入端1092与低频振荡器203的输出端2031导通,第三下采样电路109的第二输入端1092接收低频振荡器203输出的低频时钟信号,第三下采样电路109的输出端1093与后处理电路105的第六输入端1057导通。后处理电路105的第六输入端1057接收第三下采样电路109的输出端1093输出的第一下采样信号。The first input terminal 1091 of the third down-sampling circuit 109 is connected to the output terminal 2041 of the third high-frequency oscillator 204, and the first input terminal 1091 of the third down-sampling circuit 109 receives the first output from the third high-frequency oscillator 204 A high-frequency clock signal, the second input terminal 1092 of the third down-sampling circuit 109 and the output terminal 2031 of the low-frequency oscillator 203 are conducted, and the second input terminal 1092 of the third down-sampling circuit 109 receives the low-frequency output from the low-frequency oscillator 203 For the clock signal, the output terminal 1093 of the third down-sampling circuit 109 is connected to the sixth input terminal 1057 of the post-processing circuit 105. The sixth input terminal 1057 of the post-processing circuit 105 receives the first down-sampling signal output from the output terminal 1093 of the third down-sampling circuit 109.
本申请的实施例提供的真随机数发生器中,第一高频振荡器、第二高频振荡器、第三高频振荡器以及低频振荡器为不同的振荡器,第一高频时钟信号、第二高频时钟信号、第三高频时钟信号以及低频时钟信号为互不相关的时钟信号,通过低频时钟信号对第一高频时钟信号、第二高频时钟信号、第三高频时钟信号分别进行上升沿采样与下降沿采样,所得到的第一上采样信号、第一下采样信号、第二上采样信号、第二下采样信号、第三上采样信号、第三下采样信号之间互不相关。之后通过后处理电路从第一上采样信号、第一下采样信号中的一个信号、第二上采样信号、第二下采样信号中的一个信号、以及第三上采样信号、第三下采样信号中的一个信号中选取任两个信号进行异或运算,其中进行异或运算的两个信号互不相关、采样方式可以被设置为相同也可以被设置为不同、并且是分别根据不同的高频时钟信号进行采样获得的两个信号,因此进行异或运算的两个信号相互之间的独立性较高,提高了通过异或运算获得 的真随机数信号的随机性,同时通过异或运算使真随机数信号的输出序列能够满足独立、均匀分布的随机数特性。In the true random number generator provided by the embodiment of the present application, the first high-frequency oscillator, the second high-frequency oscillator, the third high-frequency oscillator, and the low-frequency oscillator are different oscillators, and the first high-frequency clock signal , The second high-frequency clock signal, the third high-frequency clock signal, and the low-frequency clock signal are uncorrelated clock signals. The first, second, and third high-frequency clock signals are The signal is sampled at the rising edge and the falling edge, and the obtained first up-sampling signal, first down-sampling signal, second up-sampling signal, second down-sampling signal, third up-sampling signal, and third down-sampling signal are obtained. They are not related to each other. Then through the post-processing circuit from the first up-sampled signal, one of the first down-sampled signals, the second up-sampled signal, one of the second down-sampled signals, and the third up-sampled signal and the third down-sampled signal Select any two signals from one of the signals for XOR operation. The two signals for XOR operation are not related to each other. The sampling method can be set to the same or different, and is based on different high frequency The two signals obtained by sampling the clock signal, therefore, the independence of the two signals subjected to the exclusive OR operation is relatively high, which improves the randomness of the true random number signal obtained through the exclusive OR operation. The output sequence of the true random number signal can meet the characteristics of independent and uniformly distributed random numbers.
可选地,在本申请的一个实施例中,图3为本申请实施例提供的一种真随机数发生器的示意性电路结构图,如图3所示,后处理电路105包括第一开关301、第二开关302以及异或门303,第一开关301的第一输入端3011接收第一上采样信号,第一开关302的第二输入端3012接收第一下采样信号,第一开关301用于输出第一开关信号,第一开关信号为第一上采样信号或第一下采样信号。第二开关302的第一输入端3021接收第二上采样信号,第二开关302的第二输入端3022接收第二下采样信号,第二开关302用于输出第二开关信号,第二开关信号为第二上采样信号或第二下采样信号。异或门303的第一输入端3031接收第一开关信号,异或门303的第二输入端3032接收第二开关信号,异或门303用于对第一开关信号以及第二开关信号进行异或运算,以生成真随机数信号并输出。Optionally, in an embodiment of the present application, FIG. 3 is a schematic circuit structure diagram of a true random number generator provided in an embodiment of the present application. As shown in FIG. 3, the post-processing circuit 105 includes a first switch 301, the second switch 302 and the exclusive OR gate 303, the first input terminal 3011 of the first switch 301 receives the first up-sampling signal, the second input terminal 3012 of the first switch 302 receives the first down-sampling signal, the first switch 301 It is used to output a first switching signal, and the first switching signal is a first up-sampling signal or a first down-sampling signal. The first input terminal 3021 of the second switch 302 receives the second up-sampling signal, the second input terminal 3022 of the second switch 302 receives the second down-sampling signal, the second switch 302 is used to output the second switching signal, the second switching signal It is the second up-sampled signal or the second down-sampled signal. The first input terminal 3031 of the XOR gate 303 receives the first switch signal, the second input terminal 3032 of the XOR gate 303 receives the second switch signal, and the XOR gate 303 is used to XOR the first switch signal and the second switch signal. Or operation to generate and output a true random number signal.
示例性地,如图3所示,第一开关301的第一输入端3011通过后处理电路105的第一输入端1051与第一上采样电路101的输出端1013导通,第一开关301的第一输入端3011接收第一上采样信号。第一开关301的第二输入端3012通过后处理电路105的第二输入端1052与第一下采样电路102的输出端1023导通,第一开关301的第二输入端3012接收第一下采样信号。Exemplarily, as shown in FIG. 3, the first input terminal 3011 of the first switch 301 is connected to the output terminal 1013 of the first up-sampling circuit 101 through the first input terminal 1051 of the post-processing circuit 105, and the first switch 301 The first input terminal 3011 receives the first up-sampling signal. The second input terminal 3012 of the first switch 301 is connected to the output terminal 1023 of the first down-sampling circuit 102 through the second input terminal 1052 of the post-processing circuit 105, and the second input terminal 3012 of the first switch 301 receives the first down-sampling Signal.
第二开关302的第一输入端3021通过后处理电路105的第三输入端1053与第二上采样电路103的输出端1033导通,第二开关302的第一输入端3021接收第二上采样信号。第二开关302的第二输入端3022通过后处理电路105的第四输入端1054与第二下采样电路104的输出端1043导通,第二开关302的第二输入端3022接收第二下采样信号。The first input terminal 3021 of the second switch 302 is connected to the output terminal 1033 of the second up-sampling circuit 103 through the third input terminal 1053 of the post-processing circuit 105, and the first input terminal 3021 of the second switch 302 receives the second up-sampling Signal. The second input terminal 3022 of the second switch 302 is connected to the output terminal 1043 of the second down-sampling circuit 104 through the fourth input terminal 1054 of the post-processing circuit 105, and the second input terminal 3022 of the second switch 302 receives the second down-sampling Signal.
异或门303的第一输入端3031与第一开关301的输出端3013导通,异或门303的第二输入端3032与第二开关302的输出端3033导通,异或门303通过输出端3033输出真随机数信号。The first input terminal 3031 of the exclusive OR gate 303 is connected to the output terminal 3013 of the first switch 301, the second input terminal 3032 of the exclusive OR gate 303 is connected to the output terminal 3033 of the second switch 302, and the exclusive OR gate 303 passes through the output The terminal 3033 outputs a true random number signal.
示例性地,第一开关301与第二开关302为单刀双掷开关。第一开关单元301被配置为第一开关单元301的第一输入端3011与第一开关单元301的输出端3033导通时,第一开关单元301的输出端3013输出的第一开关信号为第一上采样信号,此时输入异或门303的第一输入端3031的信号为第一上采样信号。Exemplarily, the first switch 301 and the second switch 302 are single-pole double-throw switches. The first switch unit 301 is configured such that when the first input terminal 3011 of the first switch unit 301 and the output terminal 3033 of the first switch unit 301 are connected, the first switch signal output by the output terminal 3013 of the first switch unit 301 is the first switch signal. An up-sampling signal. At this time, the signal input to the first input terminal 3031 of the exclusive OR gate 303 is the first up-sampling signal.
第一开关单元301被配置为第一开关单元301的第二输入端3012与第一开关单元301的输出端3033导通时,第一开关单元301的输出端3013输出的第一开关信号为第一下采样信号,此时输入异或门303的第一输入端3031的信号为第一下采样信号。The first switch unit 301 is configured such that when the second input terminal 3012 of the first switch unit 301 is connected to the output terminal 3033 of the first switch unit 301, the first switch signal output by the output terminal 3013 of the first switch unit 301 is the first switch signal. The down-sampled signal, at this time, the signal input to the first input terminal 3031 of the exclusive OR gate 303 is the first down-sampled signal.
第二开关单元302被配置为第二开关单元302的第一输入端3021与第二开关单元302的输出端3023导通时,第二开关单元302的输出端3023输出的第二开关信号为第二上采样信号,此时输入异或门303的第二输入端3032的信号为第二上采样信号。The second switch unit 302 is configured such that when the first input terminal 3021 of the second switch unit 302 and the output terminal 3023 of the second switch unit 302 are connected, the second switch signal output by the output terminal 3023 of the second switch unit 302 is the first switch signal. The second up-sampling signal. At this time, the signal input to the second input terminal 3032 of the exclusive OR gate 303 is the second up-sampling signal.
第二开关单元302被配置为第二开关单元302的第二输入端3022与第二开关单元302的输出端3023导通时,第二开关单元302的输出端3023输出的第二开关信号为第二下采样信号,此时输入异或门303的第二输入端3032的信号为第二下采样信号。The second switch unit 302 is configured such that when the second input terminal 3022 of the second switch unit 302 and the output terminal 3023 of the second switch unit 302 are connected, the second switch signal output by the output terminal 3023 of the second switch unit 302 is the first switch signal. The second down-sampled signal. At this time, the signal input to the second input terminal 3032 of the exclusive OR gate 303 is the second down-sampled signal.
本申请的实施例提供的真随机数发生器中,后处理电路包括第一开关、第二开关以及异或门,第一开关与第二开关可以被配置为不同的导通状态,使输入异或门的两个信号的采样方式可以为相同(两个信号均为上采样信号或均为下采样信号)也可以为不同(一个信号为上采样信号,另一个信号为下采样信号),方便对进行异或运算的两个信号的采样方式进行选择。In the true random number generator provided by the embodiment of the present application, the post-processing circuit includes a first switch, a second switch, and an exclusive OR gate. The first switch and the second switch can be configured in different conduction states to make the input exclusive The sampling method of the two signals of the OR gate can be the same (both signals are up-sampled signals or both are down-sampled signals) or different (one signal is an up-sampled signal, and the other signal is a down-sampled signal), which is convenient Select the sampling method of the two signals to be XORed.
可选地,在本申请的一个实施例中,图4为本申请实施例提供的一种真随机数发生器的示意性电路结构图,如图4所示,第一开关301的控制端3014接收第一控制信号,第一开关301响应于第一控制信号输出第一上采样信号。或,第一开关301的控制端3014接收第二控制信号,第一开关301响应于第二控制信号输出第一下采样信号。Optionally, in an embodiment of the present application, FIG. 4 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the present application. As shown in FIG. 4, the control terminal 3014 of the first switch 301 Receiving the first control signal, the first switch 301 outputs a first up-sampling signal in response to the first control signal. Or, the control terminal 3014 of the first switch 301 receives the second control signal, and the first switch 301 outputs the first down-sampling signal in response to the second control signal.
示例性地,如图4所示,第一开关301的控制端3014接收第一控制信号,第一开关301响应于第一控制信号将第一开关301的第一输入端3011与第一开关301的输出端3013导通,第一开关301的输出端3013输出第一上采样信号。Exemplarily, as shown in FIG. 4, the control terminal 3014 of the first switch 301 receives the first control signal, and the first switch 301 connects the first input terminal 3011 of the first switch 301 to the first switch 301 in response to the first control signal. The output terminal 3013 of the first switch 301 is turned on, and the output terminal 3013 of the first switch 301 outputs the first up-sampling signal.
或,第一开关301的控制端3014接收第二控制信号,第一开关301响应于第二控制信号将第一开关301的第二输入端3012与第一开关301的输出端3013导通,第一开关301的输出端3013输出第一下采样信号。Or, the control terminal 3014 of the first switch 301 receives the second control signal, and the first switch 301 conducts the second input terminal 3012 of the first switch 301 and the output terminal 3013 of the first switch 301 in response to the second control signal, and The output terminal 3013 of a switch 301 outputs the first down-sampling signal.
其中,真随机数发生器中的控制电路可以输出第一控制信号或第二控制信号;或者,真随机数发生器所在的电子设备中的控制芯片可以输出第一控制信号或第二控制信号。示例性地,真随机数发生器所在的电子设备中的控制芯 片可以随机输出第一控制信号或第二控制信号,也可以根据预设周期循环输出第一控制信号与第二控制信号。Wherein, the control circuit in the true random number generator can output the first control signal or the second control signal; or, the control chip in the electronic device where the true random number generator is located can output the first control signal or the second control signal. Exemplarily, the control chip in the electronic device where the true random number generator is located can randomly output the first control signal or the second control signal, or can output the first control signal and the second control signal cyclically according to a preset period.
申请的实施例提供的真随机数发生器中,第一开关的控制端接收第一控制信号,第一开关响应于第一控制信号输出第一上采样信号;或第一开关的控制端接收第二控制信号,第一开关响应于第二控制信号输出第一下采样信号,使第一开关能够根据所收到的不同控制信号将自身配置为不同的导通状态,方便对第一开关所输出的信号的采样方式进行控制。In the true random number generator provided by the embodiment of the application, the control terminal of the first switch receives the first control signal, and the first switch outputs the first up-sampling signal in response to the first control signal; or the control terminal of the first switch receives the first control signal. Two control signals, the first switch outputs the first down-sampling signal in response to the second control signal, so that the first switch can configure itself into different conduction states according to the received different control signals, which is convenient for the output of the first switch The sampling method of the signal is controlled.
可选地,在本申请的一个实施例中,如图4所示,第二开关302的控制端3024接收第三控制信号,第二开关302响应于第三控制信号输出第二上采样信号。或,第二开关302的控制端3024接收第四控制信号,第二开关302响应于第四控制信号输出第二下采样信号。Optionally, in an embodiment of the present application, as shown in FIG. 4, the control terminal 3024 of the second switch 302 receives the third control signal, and the second switch 302 outputs the second up-sampling signal in response to the third control signal. Or, the control terminal 3024 of the second switch 302 receives the fourth control signal, and the second switch 302 outputs the second down-sampling signal in response to the fourth control signal.
示例性地,如图4所示,第二开关302的控制端3024接收第三控制信号,第二开关302响应于第三控制信号将第二开关302的第一输入端3021与第二开关302的输出端3023导通,第二开关302的输出端3023输出第一上采样信号。Exemplarily, as shown in FIG. 4, the control terminal 3024 of the second switch 302 receives the third control signal, and the second switch 302 connects the first input terminal 3021 of the second switch 302 to the second switch 302 in response to the third control signal. The output terminal 3023 of the second switch 302 is turned on, and the output terminal 3023 of the second switch 302 outputs the first up-sampling signal.
或,第二开关302的控制端3024接收第四控制信号,第二开关302响应于第四控制信号将第二开关302的第二输入端3022与第二开关302的输出端3023导通,第二开关302的输出端3023输出第一下采样信号。Or, the control terminal 3024 of the second switch 302 receives the fourth control signal, and the second switch 302 conducts the second input terminal 3022 of the second switch 302 and the output terminal 3023 of the second switch 302 in response to the fourth control signal, and The output terminal 3023 of the second switch 302 outputs the first down-sampling signal.
其中,真随机数发生器中的控制电路可以输出第三控制信号或第四控制信号;或者,真随机数发生器所在的电子设备中的控制芯片可以输出第三控制信号或第四控制信号。示例性地,真随机数发生器所在的电子设备中的控制芯片可以随机输出第三控制信号或第四控制信号,也可以根据预设周期循环输出第三控制信号与第四控制信号。Wherein, the control circuit in the true random number generator can output the third control signal or the fourth control signal; or, the control chip in the electronic device where the true random number generator is located can output the third control signal or the fourth control signal. Exemplarily, the control chip in the electronic device where the true random number generator is located can randomly output the third control signal or the fourth control signal, and can also output the third control signal and the fourth control signal cyclically according to a preset period.
申请的实施例提供的真随机数发生器中,第二开关的控制端接收第三控制信号,第二开关响应于第三控制信号输出第二上采样信号;或第二开关的控制端接收第四控制信号,第二开关响应于第四控制信号输出第二下采样信号。使第二开关能够根据所收到的不同控制信号将自身配置为不同的导通状态,方便对第二开关所输出的信号的采样方式进行控制。In the true random number generator provided by the embodiment of the application, the control terminal of the second switch receives the third control signal, and the second switch outputs the second up-sampling signal in response to the third control signal; or the control terminal of the second switch receives the first Four control signals, the second switch outputs a second down-sampling signal in response to the fourth control signal. The second switch can configure itself into different conduction states according to the different control signals received, which facilitates control of the sampling mode of the signal output by the second switch.
可选地,在本申请的一个实施例中,第一高频时钟信号的周期值以及第二高频时钟信号的周期值为高频时钟周期值,低频时钟信号的相位抖动的标准方差值与高频时钟周期值的比例大于或等于100且小于或等于1000。Optionally, in an embodiment of the present application, the period value of the first high-frequency clock signal and the period value of the second high-frequency clock signal are the period value of the high-frequency clock, and the standard deviation value of the phase jitter of the low-frequency clock signal The ratio to the high-frequency clock period value is greater than or equal to 100 and less than or equal to 1000.
具体地,在根据低频时钟信号对第一高频时钟信号以及第二高频时钟信 号分别进行上升沿采样或进行下降沿采样时,产生低频时钟信号的低频振荡器、产生第一高频时钟信号的第一高频振荡器、产生第二高频时钟信号的第二高频振荡器的相位抖动均为随机的,其中相对于低频振荡器的相位抖动,第一高频振荡器以及第二高频振荡器的相位抖动可以忽略,因此一上采样信号、第一下采样信号、第二上采样信号、第二下采样信号的随机性的高低主要依赖于低频振荡器相位抖动的标准方差值(即均方根值)相对于第一高频振荡器以及第二高频振荡器的周期值的大小。第一高频时钟信号以及第二高频时钟信号的周期值为高频时钟周期值,当低频时钟信号的相位抖动的标准方差值与高频时钟周期值的比例大于或等于100且小于或等于1000时,第一上采样信号、第一下采样信号、第二上采样信号、第二下采样信号的输出序列是随机性较高。Specifically, when the first high-frequency clock signal and the second high-frequency clock signal are respectively subjected to rising edge sampling or falling edge sampling according to the low-frequency clock signal, the low-frequency oscillator that generates the low-frequency clock signal generates the first high-frequency clock signal The phase jitter of the first high-frequency oscillator and the second high-frequency oscillator that generate the second high-frequency clock signal are random, and the phase jitter of the first high-frequency oscillator and the second high-frequency oscillator are relative to the phase jitter of the low-frequency oscillator. The phase jitter of the frequency oscillator can be ignored, so the randomness of the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal mainly depends on the standard deviation of the phase jitter of the low-frequency oscillator. (That is, the root mean square value) relative to the period value of the first high-frequency oscillator and the second high-frequency oscillator. The period value of the first high-frequency clock signal and the second high-frequency clock signal is the high-frequency clock period value, when the ratio of the standard deviation value of the phase jitter of the low-frequency clock signal to the high-frequency clock period value is greater than or equal to 100 and less than or When it is equal to 1000, the output sequences of the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal are relatively random.
实施例二Example two
在实施例一的基础上,本申请实施例二提供的真随机数发生器中,如图5所示,图5为本申请实施例提供的一种真随机数发生器的示意性电路结构图,真随机数发生器还包括差分电路106,差分电路106的输入端1061接收真随机数信号,差分电路106的第一输出端1062输出真随机数信号,差分电路106的第二输出端1063输出差分输出信号,差分输出信号与真随机数信号形成一对差分信号。On the basis of the first embodiment, in the true random number generator provided in the second embodiment of the present application, as shown in FIG. 5, FIG. 5 is a schematic circuit structure diagram of a true random number generator provided in an embodiment of the present application The true random number generator also includes a differential circuit 106. The input terminal 1061 of the differential circuit 106 receives a true random number signal, the first output terminal 1062 of the differential circuit 106 outputs a true random number signal, and the second output terminal 1063 of the differential circuit 106 outputs Differential output signal, the differential output signal and the true random number signal form a pair of differential signals.
示例性地,如图5所示,差分电路106的输入端1061与后处理电路105的输出端1055导通。Exemplarily, as shown in FIG. 5, the input terminal 1061 of the differential circuit 106 and the output terminal 1055 of the post-processing circuit 105 are connected.
本申请的实施例提供的真随机数发生器中,差分电路106接收真随机数信号,并输出真随机数信号以及与真随机数信号形成一对差分信号的差分输出信号,以增强信号传输过程中真随机数信号与差分输出信号的抗干扰能力,同时能够根据真随机数信号与差分输出信号进行校验,避免真随机数信号因受到恶意攻击或信号走线被篡改而出错。In the true random number generator provided by the embodiment of the present application, the differential circuit 106 receives a true random number signal, and outputs a true random number signal and a differential output signal forming a pair of differential signals with the true random number signal to enhance the signal transmission process The anti-interference ability of the true random number signal and the differential output signal can be verified according to the true random number signal and the differential output signal to avoid errors caused by malicious attacks or tampering of the signal wiring.
可选地,在本申请的一个实施例中,如图6所示,图6为本申请实施例提供的一种真随机数发生器的示意性电路结构图,差分电路106包括反相器107,反相器107的输入端1071接收真随机数信号,反相器107的输出端1072输出差分输出信号。Optionally, in an embodiment of the present application, as shown in FIG. 6, FIG. 6 is a schematic circuit structure diagram of a true random number generator provided by an embodiment of the present application, and the differential circuit 106 includes an inverter 107 , The input terminal 1071 of the inverter 107 receives a true random number signal, and the output terminal 1072 of the inverter 107 outputs a differential output signal.
示例性地,反相器107的输入端1071通过差分电路106的输入端1061与后处理电路105的输出端1055导通,使反相器107的输入端1071输入真随 机数信号,反相器107的输出端1072与差分电路106的第二输出端1063导通,差分电路106的输出端1061与差分电路106的第一输出端1062导通。反相器107用于对反相器107的输入端1071输入的真随机数信号反向,使从反相器107的输出端输出的差分输出信号与真随机数信号相位相反、频率相同,差分输出信号与真随机数信号形成一对差分信号。Exemplarily, the input terminal 1071 of the inverter 107 is connected to the output terminal 1055 of the post-processing circuit 105 through the input terminal 1061 of the differential circuit 106, so that the input terminal 1071 of the inverter 107 inputs a true random number signal. The output terminal 1072 of 107 is connected to the second output terminal 1063 of the differential circuit 106, and the output terminal 1061 of the differential circuit 106 is connected to the first output terminal 1062 of the differential circuit 106. The inverter 107 is used to reverse the true random number signal input from the input terminal 1071 of the inverter 107, so that the differential output signal output from the output terminal of the inverter 107 has the opposite phase and the same frequency as the true random number signal. The output signal and the true random number signal form a pair of differential signals.
本申请的实施例提供的真随机数发生器中,差分电路106包括反相器107,反相器107的输入端1071接收真随机数信号,反相器107对真随机数信号反向,使反相器107的输出端1072输出的差分输出信号与真随机数信号相位相反、频率相同,差分输出信号与真随机数信号形成一对差分信号。In the true random number generator provided by the embodiment of the present application, the differential circuit 106 includes an inverter 107. The input terminal 1071 of the inverter 107 receives a true random number signal, and the inverter 107 reverses the true random number signal to make The differential output signal output by the output terminal 1072 of the inverter 107 is opposite to the true random number signal and has the same frequency, and the differential output signal and the true random number signal form a pair of differential signals.
实施例三Example three
图7为本申请实施例提供的一种电子设备的示意性结构图,如图7所示,本申请实施例二提供的电子设备300,包括低频振荡器203、第一高频振荡器201、第二高频振荡器202以及本申请实施例一提供的任一种的真随机数发生器301,第一高频振荡器201用于输出第一高频时钟信号,第二高频振荡器202用于输出第二高频时钟信号。FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the application. As shown in FIG. 7, the electronic device 300 provided by the second embodiment of the present application includes a low-frequency oscillator 203, a first high-frequency oscillator 201, The second high-frequency oscillator 202 and any of the true random number generators 301 provided in the first embodiment of the present application, the first high-frequency oscillator 201 is used to output the first high-frequency clock signal, and the second high-frequency oscillator 202 Used to output the second high frequency clock signal.
示例性地,如图7所示,真随机数发生器301的第一输入端3011与第一高频振荡器201的输出端2011导通,第一上采样电路101的第一输入端1011通过真随机数发生器301的第一输入端3011与第一高频振荡器201的输出端2011导通,接收第一高频振荡器201输出的第一高频时钟信号。第一下采样电路102的第一输入端1021通过真随机数发生器301的第一输入端3011与第一高频振荡器201的输出端2011导通,接收第一高频振荡器201输出的第一高频时钟信号。Exemplarily, as shown in FIG. 7, the first input terminal 3011 of the true random number generator 301 is connected to the output terminal 2011 of the first high-frequency oscillator 201, and the first input terminal 1011 of the first up-sampling circuit 101 passes through The first input terminal 3011 of the true random number generator 301 is connected to the output terminal 2011 of the first high-frequency oscillator 201, and receives the first high-frequency clock signal output by the first high-frequency oscillator 201. The first input terminal 1021 of the first down-sampling circuit 102 is connected to the output terminal 2011 of the first high-frequency oscillator 201 through the first input terminal 3011 of the true random number generator 301, and receives the output of the first high-frequency oscillator 201 The first high-frequency clock signal.
真随机数发生器301的第二输入端3012与第二高频振荡器202的输出端2021导通,第二上采样电路103的第一输入端1031通过真随机数发生器301的第二输入端3012与第二高频振荡器202的输出端2021导通,接收第二高频振荡器202输出的第二高频时钟信号。第二下采样电路104的第一输入端1041通过真随机数发生器301的第二输入端3012与第二高频振荡器202的输出端2021导通,接收第二高频振荡器202输出的第二高频时钟信号。The second input terminal 3012 of the true random number generator 301 is connected to the output terminal 2021 of the second high-frequency oscillator 202, and the first input terminal 1031 of the second up-sampling circuit 103 passes through the second input of the true random number generator 301 The terminal 3012 is connected to the output terminal 2021 of the second high-frequency oscillator 202 to receive the second high-frequency clock signal output by the second high-frequency oscillator 202. The first input terminal 1041 of the second down-sampling circuit 104 is connected to the output terminal 2021 of the second high-frequency oscillator 202 through the second input terminal 3012 of the true random number generator 301, and receives the output of the second high-frequency oscillator 202. The second high frequency clock signal.
真随机数发生器301的第三输入端3013与低频振荡器203的输出端2031导通,第一上采样电路101的第二输入端1012、第一下采样电路102的第二输 入端1022、第二上采样电路103的第二输入端1032以及第二下采样电路104的第二输入端1042均通过真随机数发生器301的第三输入端3013与低频振荡器203的输出端2031导通,接收低频振荡器203输出的低频时钟信号。The third input terminal 3013 of the true random number generator 301 is connected to the output terminal 2031 of the low frequency oscillator 203, the second input terminal 1012 of the first up-sampling circuit 101, the second input terminal 1022 of the first down-sampling circuit 102 The second input terminal 1032 of the second up-sampling circuit 103 and the second input terminal 1042 of the second down-sampling circuit 104 are both conducted through the third input terminal 3013 of the true random number generator 301 and the output terminal 2031 of the low frequency oscillator 203 , Receiving the low-frequency clock signal output by the low-frequency oscillator 203.
本申请的实施例提供的电子设备包括低频振荡器203、第一高频振荡器201、第二高频振荡器202以及真随机数发生器301,第一高频振荡器201用于输出第一高频时钟信号,第二高频振荡器202用于输出第二高频时钟信号。真随机数发生器301中进行异或运算的两个信号是互不相关、采样方式可以被设置为相同也可以被设置为不同、分别根据不同的高频时钟信号进行采样获得的两个信号,进行异或运算的两个信号相互之间的独立性较高,提高了通过异或运算获得的真随机数信号的随机性,并使真随机数信号的输出序列能够满足独立、均匀分布的随机数特性。The electronic device provided by the embodiment of the present application includes a low frequency oscillator 203, a first high frequency oscillator 201, a second high frequency oscillator 202, and a true random number generator 301. The first high frequency oscillator 201 is used to output the first The high-frequency clock signal, and the second high-frequency oscillator 202 is used to output the second high-frequency clock signal. The two signals for the exclusive OR operation in the true random number generator 301 are not correlated with each other, the sampling mode can be set to the same or different, and the two signals are obtained by sampling according to different high-frequency clock signals. The two signals undergoing exclusive OR operation are highly independent of each other, which improves the randomness of the true random number signal obtained through the exclusive OR operation, and enables the output sequence of the true random number signal to meet independent and uniformly distributed randomness Number characteristics.
可选地,在本申请的一个实施例中,第一高频振荡器201以及第二高频振荡器202的类型包括晶体振荡器、锁相环、压控振荡器。Optionally, in an embodiment of the present application, the types of the first high-frequency oscillator 201 and the second high-frequency oscillator 202 include a crystal oscillator, a phase-locked loop, and a voltage-controlled oscillator.
在本申请实施例所提供的电子设备中,第一高频振荡器201以及第二高频振荡器202的振荡器类型包括晶体振荡器、锁相环、压控振荡器,其中与其他类型的振荡器相比,晶体振荡器、锁相环、压控振荡器的相位抖动较低,根据低频时钟信号对第一高频时钟信号、第二高频时钟信号分别进行上升沿采样与下降沿采样所生成的第一上采样信号、第一下采样信号、第二上采样信号、第二下采样信号的输出序列的随机性较高,通过对第一上采样信号、第一下采样信号中的一个信号,与第二上采样信号、第二下采样信号中的一个信号进行异或运算生成的真随机数信号的输出序列的随机性较高。In the electronic device provided by the embodiment of the present application, the oscillator types of the first high-frequency oscillator 201 and the second high-frequency oscillator 202 include crystal oscillators, phase-locked loops, and voltage-controlled oscillators. Compared with oscillators, crystal oscillators, phase-locked loops, and voltage-controlled oscillators have lower phase jitter. According to the low-frequency clock signal, the first high-frequency clock signal and the second high-frequency clock signal are sampled at the rising edge and the falling edge respectively. The generated output sequences of the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal are relatively random. An output sequence of a true random number signal generated by performing an exclusive OR operation with one of the second up-sampling signal and the second down-sampling signal has high randomness.
可选地,在本申请的一个实施例中,低频振荡器203、第一高频振荡器201以及第二高频振荡器202均为张弛振荡器。低频振荡器203的平均电流的典型值小于100纳安,第一高频振荡器201的平均电流的典型值以及第二高频振荡器202的平均电流的典型值均大于500微安。Optionally, in an embodiment of the present application, the low frequency oscillator 203, the first high frequency oscillator 201, and the second high frequency oscillator 202 are all relaxation oscillators. The typical value of the average current of the low frequency oscillator 203 is less than 100 nanoamperes, and the typical value of the average current of the first high frequency oscillator 201 and the typical value of the average current of the second high frequency oscillator 202 are both greater than 500 microamperes.
可选地,在本申请的一个实施例中,第一高频振荡器201、第二高频振荡器202的振荡器类型与低频振荡器203的振荡器类型不同。Optionally, in an embodiment of the present application, the oscillator type of the first high frequency oscillator 201 and the second high frequency oscillator 202 is different from the oscillator type of the low frequency oscillator 203.
示例性地,第一高频振荡器201、第二高频振荡器202均为张弛振荡器,低频振荡器203的振荡器类型包括压控振荡器、锁相环、晶体振荡器;或者,第一高频振荡器201、第二高频振荡器202均为锁相环,低频振荡器203的振荡器类型包括张弛振荡器、压控振荡器、晶体振荡器;或者,第一高频振荡器 201、第二高频振荡器202均为晶体振荡器,低频振荡器203的振荡器类型包括张弛振荡器、压控振荡器、锁相环;或者,第一高频振荡器201、第二高频振荡器202均为压控振荡器,低频振荡器203的振荡器类型包括张弛振荡器、锁相环、晶体振荡器。Exemplarily, the first high-frequency oscillator 201 and the second high-frequency oscillator 202 are relaxation oscillators, and the oscillator types of the low-frequency oscillator 203 include voltage-controlled oscillators, phase-locked loops, and crystal oscillators; or, the first A high-frequency oscillator 201 and a second high-frequency oscillator 202 are both phase-locked loops. The oscillator types of the low-frequency oscillator 203 include relaxation oscillators, voltage-controlled oscillators, and crystal oscillators; or, the first high-frequency oscillator 201. The second high-frequency oscillator 202 is a crystal oscillator. The oscillator types of the low-frequency oscillator 203 include relaxation oscillators, voltage-controlled oscillators, and phase-locked loops; or, the first high-frequency oscillator 201 and the second high-frequency oscillator 201 The frequency oscillators 202 are all voltage controlled oscillators, and the oscillator types of the low frequency oscillator 203 include relaxation oscillators, phase-locked loops, and crystal oscillators.
在本申请实施例所提供的电子设备中,与第一高频振荡器201、第二高频振荡器202以及低频振荡器203为相同的振荡器类型相比较,当第一高频振荡器201、第二高频振荡器202的类型与低频振荡器203的类型不同时,第一高频振荡器201或第二高频振荡器202与低频振荡器203之间的独立性更好,第一高频时钟信号或第二高频时钟信号与低频时钟信号之间的独立性更好,根据低频时钟信号对第一高频时钟信号、第二高频时钟信号分别进行上升沿采样与下降沿采样所生成的第一上采样信号、第一下采样信号、第二上采样信号、第二下采样信号的输出序列的随机性更高,提高了通过对第一上采样信号、第一下采样信号中的一个信号,与第二上采样信号、第二下采样信号中的一个信号进行异或运算生成的真随机数信号的随机性。In the electronic device provided by the embodiment of the present application, compared with the first high-frequency oscillator 201, the second high-frequency oscillator 202, and the low-frequency oscillator 203 being the same oscillator type, when the first high-frequency oscillator 201 , When the type of the second high frequency oscillator 202 is different from the type of the low frequency oscillator 203, the independence between the first high frequency oscillator 201 or the second high frequency oscillator 202 and the low frequency oscillator 203 is better, and the first The high-frequency clock signal or the second high-frequency clock signal is more independent from the low-frequency clock signal, and the first high-frequency clock signal and the second high-frequency clock signal are respectively sampled on the rising edge and the falling edge according to the low-frequency clock signal The generated output sequence of the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal are more random. The randomness of the true random number signal generated by XORing one of the signals in the second up-sampling signal and the second down-sampling signal.
可选地,在本申请的一个实施例中,电子设备300包括芯片或者芯片组,芯片或者芯片组包括低频振荡器203、第一高频振荡器201以及第二高频振荡器202,低频振荡器203为芯片或芯片组的唤醒时钟源,第一高频振荡器301以及第二高频振荡器202均为芯片的系统参考时钟源。芯片或者芯片组内可以包含该真随机数发生器,芯片内还可以包含其他功能模块或者电路,比如在一个例子中,电子设备可以是具有NFC识别功能的移动终端,其包含有NFC控制器芯片和安全芯片,NFC控制器芯片与安全芯片连接,其中安全芯片内含有真随机数发生器,用于产生真随机数,用于NFC控制器在识别到检测范围内的NFC读卡器时进行身份验证,而低频振荡器203、第一高频振荡器201以及第二高频振荡器202可以分布在NFC控制器和/或安全芯片中。也就是说,所述低频振荡器203、第一高频振荡器201以及第二高频振荡器202除了为真随机数发生器提供时钟信号之外,还用于为电子设备中除真随机数发生器以外的功能模块提供唤醒时钟和系统参考时钟。Optionally, in an embodiment of the present application, the electronic device 300 includes a chip or a chipset, and the chip or a chipset includes a low-frequency oscillator 203, a first high-frequency oscillator 201, and a second high-frequency oscillator 202. The low-frequency oscillator The device 203 is a wake-up clock source of the chip or chipset, and the first high-frequency oscillator 301 and the second high-frequency oscillator 202 are both system reference clock sources of the chip. The chip or chipset may contain the true random number generator, and the chip may also contain other functional modules or circuits. For example, in one example, the electronic device may be a mobile terminal with NFC recognition function, which contains an NFC controller chip And the security chip, the NFC controller chip is connected with the security chip, and the security chip contains a true random number generator, which is used to generate a true random number, and is used for the NFC controller to identify the NFC card reader within the detection range Verification, and the low-frequency oscillator 203, the first high-frequency oscillator 201, and the second high-frequency oscillator 202 can be distributed in the NFC controller and/or the security chip. In other words, the low-frequency oscillator 203, the first high-frequency oscillator 201, and the second high-frequency oscillator 202 not only provide clock signals for the true random number generator, but are also used to provide the true random number generator in the electronic device. Function modules other than the generator provide wake-up clock and system reference clock.
本申请实施例所提供的电子设备利用其包含的芯片或芯片组所含有的唤醒时钟源作为低频振荡器,利用系统含有的多个参考时钟源分别作为第一高频振荡器、第二高频振荡器,从而在不影响真随机数信号生成的前提下,复用芯片中作为时钟源的振荡器,提高了设备中电路模块的利用率,避免在电子设备 中新增更多的振荡器,降低了电子设备的制造成本。The electronic device provided by the embodiment of the application uses the wake-up clock source contained in the chip or chipset as the low-frequency oscillator, and uses multiple reference clock sources contained in the system as the first high-frequency oscillator and the second high-frequency oscillator. Oscillator, under the premise of not affecting the generation of true random number signals, multiplexing the oscillator in the chip as the clock source, improving the utilization of circuit modules in the device, and avoiding adding more oscillators to the electronic device. Reduce the manufacturing cost of electronic equipment.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the difference from other embodiments. In particular, as for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above descriptions are only examples of the present application, and are not used to limit the present application. For those skilled in the art, this application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the scope of the claims of this application.
Claims (14)
- 一种真随机数发生器,其特征在于,所述真随机数发生器包括第一上采样电路、第一下采样电路、第二上采样电路以及第二下采样电路;A true random number generator, characterized in that the true random number generator includes a first up-sampling circuit, a first down-sampling circuit, a second up-sampling circuit, and a second down-sampling circuit;所述第一上采样电路接收第一高频振荡器输出的第一高频时钟信号以及低频振荡器输出的低频时钟信号,所述第一上采样电路用于根据所述低频时钟信号对所述第一高频时钟信号进行上升沿采样,输出第一上采样信号;The first up-sampling circuit receives a first high-frequency clock signal output by a first high-frequency oscillator and a low-frequency clock signal output by a low-frequency oscillator. Sampling the rising edge of the first high-frequency clock signal, and outputting the first up-sampling signal;所述第一下采样电路接收所述第一高频时钟信号以及所述低频时钟信号,所述第一下采样电路用于根据所述低频时钟信号对所述第一高频时钟信号进行下降沿采样,输出第一下采样信号;The first down-sampling circuit receives the first high-frequency clock signal and the low-frequency clock signal, and the first down-sampling circuit is configured to perform a falling edge on the first high-frequency clock signal according to the low-frequency clock signal Sampling, output the first down-sampled signal;所述第二上采样电路接收第二高频振荡器输出的第二高频时钟信号以及所述低频时钟信号,所述第二上采样电路用于根据所述低频时钟信号对所述第二高频时钟信号进行上升沿采样,输出第二上采样信号;The second up-sampling circuit receives a second high-frequency clock signal output by a second high-frequency oscillator and the low-frequency clock signal. Sampling the rising edge of the high-frequency clock signal, and output the second up-sampling signal;所述第二下采样电路接收所述第二高频时钟信号以及所述低频时钟信号,所述第二下采样电路用于根据所述低频时钟信号对所述第二高频时钟信号进行下降沿采样,输出第二下采样信号;The second down-sampling circuit receives the second high-frequency clock signal and the low-frequency clock signal, and the second down-sampling circuit is configured to perform a falling edge on the second high-frequency clock signal according to the low-frequency clock signal Sampling, output the second down-sampling signal;所述后处理电路接收所述第一上采样信号、所述第一下采样信号、所述第二上采样信号以及所述第二下采样信号,所述后处理电路用于对所述第一上采样信号、所述第一下采样信号中的一个信号,与所述第二上采样信号、所述第二下采样信号中的一个信号进行异或运算,以生成真随机数信号并输出。The post-processing circuit receives the first up-sampling signal, the first down-sampling signal, the second up-sampling signal, and the second down-sampling signal, and the post-processing circuit is used for processing the first One of the up-sampled signal and the first down-sampled signal is XORed with one of the second up-sampled signal and the second down-sampled signal to generate and output a true random number signal.
- 根据权利要求1所述的真随机数发生器,其特征在于,所述真随机数发生器还包括第三上采样电路以及第三下采样电路;The true random number generator according to claim 1, wherein the true random number generator further comprises a third up-sampling circuit and a third down-sampling circuit;所述第三上采样电路接收第三高频振荡器输出的第三高频时钟信号以及低频振荡器输出的低频时钟信号,所述第三上采样电路用于根据所述低频时钟信号对所述第三高频时钟信号进行上升沿采样,输出第三上采样信号;The third up-sampling circuit receives a third high-frequency clock signal output by a third high-frequency oscillator and a low-frequency clock signal output by a low-frequency oscillator. The third high-frequency clock signal is sampled at the rising edge, and a third up-sampling signal is output;所述第三下采样电路接收所述第三高频时钟信号以及所述低频时钟信号,所述第三下采样电路用于根据所述低频时钟信号对所述第三高频时钟信号进行下降沿采样,输出第三下采样信号;The third down-sampling circuit receives the third high-frequency clock signal and the low-frequency clock signal, and the third down-sampling circuit is configured to perform a falling edge on the third high-frequency clock signal according to the low-frequency clock signal Sampling, output the third down-sampling signal;所述后处理电路接收所述第三上采样信号以及所述第三下采样信号,所述后处理电路用于从所述第一上采样信号、所述第一下采样信号中的一个信号、所述第二上采样信号、所述第二下采样信号中的一个信号、以及所述第三上采样信号、所述第三下采样信号中的一个信号中选取任两个信号进行异或运算,以生成所述真随机数信号并输出。The post-processing circuit receives the third up-sampling signal and the third down-sampling signal, and the post-processing circuit is used to obtain one of the first up-sampling signal, the first down-sampling signal, Select any two signals among the second up-sampled signal, one of the second down-sampled signals, and one of the third up-sampled signal and the third down-sampled signal to perform an exclusive OR operation , To generate and output the true random number signal.
- 根据权利要求1所述的真随机数发生器,其特征在于,所述后处理电路包括第一开关、第二开关以及异或门;The true random number generator according to claim 1, wherein the post-processing circuit comprises a first switch, a second switch and an exclusive OR gate;所述第一开关的第一输入端接收所述第一上采样信号,所述第一开关的第二输入端接收所述第一下采样信号,所述第一开关用于输出第一开关信号,所述第一开关信号为所述第一上采样信号或所述第一下采样信号;The first input terminal of the first switch receives the first up-sampling signal, the second input terminal of the first switch receives the first down-sampling signal, and the first switch is used to output a first switch signal , The first switch signal is the first up-sampling signal or the first down-sampling signal;所述第二开关的第一输入端接收所述第二上采样信号,所述第二开关的第二输入端接收所述第二下采样信号,所述第二开关用于输出第二开关信号,所述第二开关信号为所述第二上采样信号或所述第二下采样信号;The first input terminal of the second switch receives the second up-sampling signal, the second input terminal of the second switch receives the second down-sampling signal, and the second switch is used to output a second switch signal , The second switch signal is the second up-sampling signal or the second down-sampling signal;所述异或门的第一输入端接收所述第一开关信号,所述异或门的第二输入端接收所述第二开关信号,所述异或门用于对所述第一开关信号以及所述第二开关信号进行异或运算,以生成所述真随机数信号并输出。The first input terminal of the XOR gate receives the first switch signal, the second input terminal of the XOR gate receives the second switch signal, and the XOR gate is used to compare the first switch signal. And the second switch signal performs an exclusive OR operation to generate and output the true random number signal.
- 根据权利要求3所述的真随机数发生器,其特征在于,所述第一开关的控制端接收第一控制信号,所述第一开关响应于所述第一控制信号输出所述第一上采样信号;The true random number generator according to claim 3, wherein the control terminal of the first switch receives a first control signal, and the first switch outputs the first upper switch in response to the first control signal. Sample signal或,所述第一开关的控制端接收第二控制信号,所述第一开关响应于所述第二控制信号输出所述第一下采样信号。Or, the control terminal of the first switch receives a second control signal, and the first switch outputs the first down-sampling signal in response to the second control signal.
- 根据权利要求3所述的真随机数发生器,其特征在于,所述第二开关的控制端接收第三控制信号,所述第二开关响应于所述第三控制信号输出所述第二上采样信号;The true random number generator according to claim 3, wherein the control terminal of the second switch receives a third control signal, and the second switch outputs the second upper switch in response to the third control signal. Sample signal或,所述第二开关的控制端接收第四控制信号,所述第二开关响应于所述第四控制信号输出所述第二下采样信号。Or, the control terminal of the second switch receives a fourth control signal, and the second switch outputs the second down-sampling signal in response to the fourth control signal.
- 根据权利要求1-5中任一项所述的真随机数发生器,其特征在于,所述真随机数发生器还包括差分电路,所述差分电路的输入端接收所述真随机数信号,所述差分电路的第一输出端输出所述真随机数信号,所述差分电路的第二输出端输出差分输出信号,所述差分输出信号与所述真随机数信号形成一对差分信号。The true random number generator according to any one of claims 1 to 5, wherein the true random number generator further comprises a differential circuit, and the input terminal of the differential circuit receives the true random number signal, The first output terminal of the differential circuit outputs the true random number signal, and the second output terminal of the differential circuit outputs a differential output signal. The differential output signal and the true random number signal form a pair of differential signals.
- 根据权利要求6所述的真随机数发生器,其特征在于,所述差分电路包括反相器,所述反相器的输入端接收所述真随机数信号,所述反相器的输出端输出所述差分输出信号。The true random number generator according to claim 6, wherein the differential circuit comprises an inverter, the input terminal of the inverter receives the true random number signal, and the output terminal of the inverter The differential output signal is output.
- 根据权利要求1-7中任一项所述的真随机数发生器,其特征在于,所述第一高频时钟信号的周期值以及所述第二高频时钟信号的周期值为高频时钟周 期值,所述低频时钟信号的相位抖动的标准方差值与所述高频时钟周期值的比例大于或等于100且小于或等于1000。The true random number generator according to any one of claims 1-7, wherein the period value of the first high-frequency clock signal and the period value of the second high-frequency clock signal are high-frequency clock Period value, the ratio of the standard deviation value of the phase jitter of the low-frequency clock signal to the period value of the high-frequency clock is greater than or equal to 100 and less than or equal to 1000.
- 根据权利要求1-7中任一项所述的真随机数发生器,其特征在于,所述低频时钟信号的频率为32K赫兹,所述第一高频时钟信号以及所述第二高频时钟信号的频率大于或等于80M赫兹且小于或等于100M赫兹。The true random number generator according to any one of claims 1-7, wherein the frequency of the low-frequency clock signal is 32K Hz, and the first high-frequency clock signal and the second high-frequency clock The frequency of the signal is greater than or equal to 80 MHz and less than or equal to 100 MHz.
- 一种电子设备,其特征在于,包括低频振荡器、第一高频振荡器、第二高频振荡器以及权利要求1-9中任一项所述的真随机数发生器,所述第一高频振荡器用于输出第一高频时钟信号,所述第二高频振荡器用于输出第二高频时钟信号,所述低频振荡器用于输出低频时钟信号。An electronic device, characterized by comprising a low-frequency oscillator, a first high-frequency oscillator, a second high-frequency oscillator, and the true random number generator according to any one of claims 1-9, the first The high frequency oscillator is used to output a first high frequency clock signal, the second high frequency oscillator is used to output a second high frequency clock signal, and the low frequency oscillator is used to output a low frequency clock signal.
- 根据要求10所述的电子设备,其特征在于,所述第一高频振荡器以及所述第二高频振荡器的振荡器类型包括晶体振荡器、锁相环、压控振荡器。The electronic device according to claim 10, wherein the oscillator types of the first high-frequency oscillator and the second high-frequency oscillator include a crystal oscillator, a phase-locked loop, and a voltage-controlled oscillator.
- 根据要求10所述的电子设备,其特征在于,所述低频振荡器、所述第一高频振荡器以及所述第二高频振荡器均为张弛振荡器,所述低频振荡器的平均电流的典型值小于100纳安,所述第一高频振荡器的平均电流的典型值以及所述第二高频振荡器的平均电流的典型值均大于500微安。The electronic device according to claim 10, wherein the low-frequency oscillator, the first high-frequency oscillator, and the second high-frequency oscillator are all relaxation oscillators, and the average current of the low-frequency oscillator is The typical value of is less than 100 nanoamperes, and the typical value of the average current of the first high-frequency oscillator and the typical value of the average current of the second high-frequency oscillator are both greater than 500 microamperes.
- 根据要求10所述的电子设备,其特征在于,所述第一高频振荡器、所述第二高频振荡器均为张弛振荡器,所述低频振荡器的振荡器类型包括压控振荡器、锁相环、晶体振荡器;The electronic device according to claim 10, wherein the first high-frequency oscillator and the second high-frequency oscillator are relaxation oscillators, and the oscillator type of the low-frequency oscillator includes a voltage-controlled oscillator , Phase-locked loop, crystal oscillator;或,所述第一高频振荡器、所述第二高频振荡器均为锁相环,所述低频振荡器的振荡器类型包括张弛振荡器、压控振荡器、晶体振荡器;Or, the first high-frequency oscillator and the second high-frequency oscillator are both phase-locked loops, and the oscillator types of the low-frequency oscillator include relaxation oscillators, voltage-controlled oscillators, and crystal oscillators;或,所述第一高频振荡器、所述第二高频振荡器均为晶体振荡器,所述低频振荡器的振荡器类型包括张弛振荡器、压控振荡器、锁相环;Or, the first high-frequency oscillator and the second high-frequency oscillator are both crystal oscillators, and the oscillator types of the low-frequency oscillator include relaxation oscillators, voltage-controlled oscillators, and phase-locked loops;或,所述第一高频振荡器、所述第二高频振荡器均为压控振荡器,所述低频振荡器的振荡器类型包括张弛振荡器、锁相环、晶体振荡器。Or, the first high-frequency oscillator and the second high-frequency oscillator are both voltage-controlled oscillators, and the oscillator types of the low-frequency oscillator include relaxation oscillators, phase-locked loops, and crystal oscillators.
- 根据要求10-13任意一项所述的电子设备,其特征在于,所述电子设备包括与所述真随机数发生器连接的芯片或芯片组,所述低频振荡器还用于为所述芯片或芯片组提供唤醒时钟,所述第一高频振荡器以及所述第二高频振荡器还用于为所述芯片或芯片组提供系统参考时钟。The electronic device according to any one of claims 10-13, wherein the electronic device comprises a chip or a chipset connected to the true random number generator, and the low-frequency oscillator is also used to provide Or the chipset provides a wake-up clock, and the first high-frequency oscillator and the second high-frequency oscillator are also used to provide a system reference clock for the chip or chipset.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/091112 WO2021232255A1 (en) | 2020-05-19 | 2020-05-19 | True random number generator and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/091112 WO2021232255A1 (en) | 2020-05-19 | 2020-05-19 | True random number generator and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021232255A1 true WO2021232255A1 (en) | 2021-11-25 |
Family
ID=78709015
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/091112 WO2021232255A1 (en) | 2020-05-19 | 2020-05-19 | True random number generator and electronic device |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2021232255A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115037283A (en) * | 2022-08-12 | 2022-09-09 | 山东华翼微电子技术股份有限公司 | High-speed phase jitter physical random source circuit and working method thereof |
CN115065344A (en) * | 2022-08-15 | 2022-09-16 | 山东华翼微电子技术股份有限公司 | Low-power-consumption phase jitter physical random source circuit and working method thereof |
CN117539429A (en) * | 2023-11-21 | 2024-02-09 | 海光信息技术(苏州)有限公司 | True random number generator, chip and electronic device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105005462A (en) * | 2015-09-06 | 2015-10-28 | 电子科技大学 | Mixed random number generator and method for generating random number by using mixed random number generator |
US20170048061A1 (en) * | 2015-08-12 | 2017-02-16 | Samsung Electronics Co., Ltd. | Apparatus for generating random number |
US20180314493A1 (en) * | 2016-03-08 | 2018-11-01 | Secturion Systems, Inc. | Systolic Random Number Generator |
CN109683852A (en) * | 2018-12-24 | 2019-04-26 | 成都三零嘉微电子有限公司 | A kind of real random number generator |
CN111082925A (en) * | 2019-10-23 | 2020-04-28 | 中山大学 | Embedded system encryption protection device and method based on AES algorithm and PUF technology |
-
2020
- 2020-05-19 WO PCT/CN2020/091112 patent/WO2021232255A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170048061A1 (en) * | 2015-08-12 | 2017-02-16 | Samsung Electronics Co., Ltd. | Apparatus for generating random number |
CN105005462A (en) * | 2015-09-06 | 2015-10-28 | 电子科技大学 | Mixed random number generator and method for generating random number by using mixed random number generator |
US20180314493A1 (en) * | 2016-03-08 | 2018-11-01 | Secturion Systems, Inc. | Systolic Random Number Generator |
CN109683852A (en) * | 2018-12-24 | 2019-04-26 | 成都三零嘉微电子有限公司 | A kind of real random number generator |
CN111082925A (en) * | 2019-10-23 | 2020-04-28 | 中山大学 | Embedded system encryption protection device and method based on AES algorithm and PUF technology |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115037283A (en) * | 2022-08-12 | 2022-09-09 | 山东华翼微电子技术股份有限公司 | High-speed phase jitter physical random source circuit and working method thereof |
CN115037283B (en) * | 2022-08-12 | 2022-10-21 | 山东华翼微电子技术股份有限公司 | High-speed phase jitter physical random source circuit and working method thereof |
CN115065344A (en) * | 2022-08-15 | 2022-09-16 | 山东华翼微电子技术股份有限公司 | Low-power-consumption phase jitter physical random source circuit and working method thereof |
CN117539429A (en) * | 2023-11-21 | 2024-02-09 | 海光信息技术(苏州)有限公司 | True random number generator, chip and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Alioto | Trends in hardware security: From basics to ASICs | |
WO2021232255A1 (en) | True random number generator and electronic device | |
JP6761934B1 (en) | True random number generators and devices with detection and correction capabilities | |
CN106293617B (en) | Real random number generator | |
KR102709350B1 (en) | Reliability enhancement methods for physically unclonable function bitstring generation | |
US20140189890A1 (en) | Device authentication using a physically unclonable functions based key generation system | |
Yu et al. | Chaos‐Based Engineering Applications with a 6D Memristive Multistable Hyperchaotic System and a 2D SF‐SIMM Hyperchaotic Map | |
US20040010526A1 (en) | Random number generator and method for generating a random number | |
CN107306180B (en) | Encryption and decryption device and power analysis defense method thereof | |
CN111338603A (en) | True random number generator and electronic equipment | |
Johnson et al. | Remote dynamic partial reconfiguration: A threat to Internet-of-Things and embedded security applications | |
Wang et al. | A silicon PUF based entropy pump | |
TW201820200A (en) | Security system and terminal chip | |
US9384682B2 (en) | Electronic circuit, electronic apparatus, and authentication system | |
Zalivaka et al. | FPGA implementation of modeling attack resistant arbiter PUF with enhanced reliability | |
Tao et al. | FPGA based true random number generators using non-linear feedback ring oscillators | |
US20090327381A1 (en) | True random number generator | |
Nassar et al. | CaPUF: Cascaded PUF structure for machine learning resiliency | |
Wang et al. | A Lightweight Authentication Protocol Against Modeling Attacks Based on a Novel LFSR-APUF | |
Cao et al. | A new reconfigurable true random number generator and physical unclonable function unified chip with on-chip auto-calibration | |
CN116136755A (en) | Random number generator and method of operating a random number generator | |
Shahrak et al. | Two-way real time multimedia stream authentication using physical unclonable functions | |
Chang et al. | Modeling attack resistant arbiter puf with time-variant obfuscation scheme | |
CN111782179B (en) | True random number generator | |
CN110795063B (en) | Physical random number generation method with adjustable power consumption and rate |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20936124 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20936124 Country of ref document: EP Kind code of ref document: A1 |