True random number generation device based on ring oscillator principle and method of use

CN122431640APending Publication Date: 2026-07-21CCORE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CCORE TECH CO LTD
Filing Date
2026-03-12
Publication Date
2026-07-21

Smart Images

  • Figure CN122431640A_ABST
    Figure CN122431640A_ABST
Patent Text Reader

Abstract

The application discloses a true random number generation device and a use method based on a ring oscillator principle, and belongs to the technical field of true random number generation. The device comprises a non-deterministic module, a clock system and a deterministic module. The non-deterministic module comprises four physical random source generation circuits, each of which comprises an exclusive OR output unit, a true random number generator and a plurality of ring oscillators, and the true random number generator comprises a flip-flop. The clock system controls the flip-flop to trigger sampling of a high-frequency sequence output by the exclusive OR output unit, and obtains and outputs a preliminary random number. The deterministic module processes the preliminary random number output by each physical random source generation circuit, and obtains a random number output sequence. The outputs of the four physical random source generation circuits are independent, each physical random source generation circuit can independently generate a preliminary random number, and four physical random source generation circuits are adopted in the design for the purpose of security, so that the attack resistance of the circuit is effectively enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of true random number generation technology, and in particular to a true random number generation device and method based on the principle of a ring oscillator. Background Technology

[0002] Any true random number generator consists of two basic functional units: a nondeterministic unit, which is the source of the unpredictability of the entire system and is usually called the physical random source; and a deterministic unit, which processes the data provided by the physical random source and produces a uniform and independent sequence of random numbers, usually called the post-processing algorithm unit.

[0003] Existing true random number generators, such as pure digital true random number generators based on ring oscillator phase jitter, generate random numbers through pure digital logic. Due to the inherent defects in their entropy source characteristics and circuit architecture, they have poor resistance to attacks, resulting in poor core attributes such as unpredictability and non-reproducibility of the generated random numbers, thus reducing the security of random numbers. Summary of the Invention

[0004] To address the issues of unpredictability and non-reproducibility of generated random numbers in existing technologies, which reduce the security of random numbers, this application mainly provides a true random number generation device based on the principle of a ring oscillator and a method for using the true random number generation device based on the principle of a ring oscillator.

[0005] To achieve the above objectives, the first technical solution adopted in this application is: a true random number generation device based on the principle of a ring oscillator, comprising: a nondeterministic module, which includes: four physical random source generation circuits, wherein each of the four physical random source generation circuits includes an XOR output unit, a true random number generator, and multiple ring oscillators, and the true random number generator includes a flip-flop; a clock system, which controls the flip-flops to trigger sampling of the high-frequency sequence output by the XOR output unit to obtain and output preliminary random numbers; and a deterministic module, which performs post-processing on the preliminary random numbers output by each physical random source generation circuit to obtain a random number output sequence.

[0006] Optionally, each of the multiple ring oscillators consists of 16 inverters, 11 three-input XOR gates, and one three-input XNOR gate.

[0007] Optionally, the outputs of 11 three-input XOR gates are XORed with the outputs of a three-input XNOR gate.

[0008] Optionally, each physical random source generation circuit uses different low-frequency clock sampling sequences as low-frequency sequence control triggers to sample the high-frequency sequence output by the XOR output unit.

[0009] Optionally, the clock system includes an oscillator clock path and a system clock divider path.

[0010] Optionally, the oscillator clock path includes four parallel oscillator clocks, a software-configurable switch, and a fixed frequency divider. The four parallel oscillator clocks, the software-configurable switch, and the fixed frequency divider are connected in series, and the low-frequency clock sampling sequences output by the four parallel oscillator clocks are different.

[0011] Optionally, the four parallel oscillator clocks are: system power-on clock, internal timer clock, serial peripheral interface backup clock, and backup clock.

[0012] Optionally, the true random number generation device also includes a self-test module, which performs startup tests and online tests on the output sequences of multiple ring oscillators, the preliminary random numbers output by each physical random source generation circuit, and the random number output sequence.

[0013] Optionally, the self-test module includes a frequency test module, an ordered pair test module, and a poker test module.

[0014] The second technical solution adopted in this application is: a method for using a true random number generation device based on the principle of a ring oscillator, comprising: an output step, wherein the clock system of the nondeterministic module controls the trigger to sample the high-frequency sequence output by the XOR output unit, thereby obtaining and outputting preliminary random numbers, wherein the nondeterministic module includes four physical random source generation circuits, each of the four physical random source generation circuits including an XOR output unit, a true random number generator and multiple ring oscillators, the true random number generator including a trigger; and a post-processing step, wherein the preliminary random numbers output by each physical random source generation circuit are post-processed to obtain a random number output sequence.

[0015] The beneficial effects that the technical solution of this application can achieve are: when the technical solution of this application is applied, the output of the four physical random source generation circuits is independent, and each physical random source generation circuit can generate preliminary random numbers independently. For security reasons, four physical random source generation circuits are used in the design to effectively enhance the circuit's anti-attack capability. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram of a specific embodiment of a true random number generation device based on the principle of a ring oscillator according to this application; Figure 2 This is a schematic diagram of the nondeterministic unit included in a true random number generation device based on the principle of a ring oscillator according to this application; Figure 3 This is a schematic diagram of the physical random source generation circuit included in the true random number generation device based on the principle of a ring oscillator according to this application. Figure 4 This is a circuit diagram of the physical random source generation circuit included in the true random number generation device based on the principle of a ring oscillator according to this application. Figure 5 This is a schematic diagram of the clock configuration of the clock system included in the true random number generation device based on the principle of a ring oscillator according to this application; Figure 6 This is a schematic diagram of the self-test module included in the true random number generation device based on the principle of a ring oscillator according to this application; Figure 7 This is a flowchart of a specific embodiment of a method for using a true random number generation device based on the principle of a ring oscillator according to this application.

[0018] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0019] The preferred embodiments of this application will now be described in detail with reference to the accompanying drawings, so that the advantages and features of this application can be more easily understood by those skilled in the art, thereby providing a clearer and more definite definition of the scope of protection of this application.

[0020] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0021] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. The specific embodiments described below can be combined with each other to form new embodiments. The same or similar ideas or processes described in one embodiment may not be repeated in other embodiments.

[0022] Figure 1 This is a schematic diagram of a specific embodiment of a true random number generation device based on the principle of a ring oscillator according to this application.

[0023] Figure 2 This is a schematic diagram of the nondeterministic unit included in a true random number generation device based on the principle of a ring oscillator according to this application.

[0024] Figure 3 This is a schematic diagram of the physical random source generation circuit included in the true random number generation device based on the principle of a ring oscillator according to this application.

[0025] Figure 4 This is a circuit diagram of the physical random source generation circuit included in the true random number generation device based on the principle of a ring oscillator according to this application.

[0026] Figure 5 This is a schematic diagram of the clock configuration of the clock system included in the true random number generation device based on the principle of a ring oscillator according to this application.

[0027] Figure 6 This is a schematic diagram of the self-test module included in the true random number generation device based on the principle of a ring oscillator according to this application.

[0028] Figure 1 The true random number generation device based on the ring oscillator principle shown includes: a nondeterministic module 101, which includes four physical random source generation circuits, wherein each physical random source generation circuit includes a ring oscillator digital circuit and a clock, and the ring oscillator digital circuit includes an XOR output unit, a true random number generator and multiple ring oscillators.

[0029] In one specific embodiment of this application, the nondeterministic module 101, such as Figure 2 The diagram shows four physical random source generation circuits, which are physically identical. Figure 3 As shown, each physical random source generation circuit includes an XOR output unit, a true random number generator, and multiple ring oscillators. For example, the physical random source generation circuit may include an XOR output unit, a true random number generator, and six ring oscillators based on the phase jitter principle.

[0030] Optional, such as Figure 4 As shown, each of the multiple ring oscillators consists of 16 inverters, 11 three-input XOR gates, and one three-input XNOR gate. Specifically, each ring oscillator can be a high-speed oscillation circuit composed of 16 inverters, 11 three-input XOR gates, and one three-input XNOR gate.

[0031] Optionally, the outputs of 11 three-input XOR gates are XORed with the outputs of a three-input XNOR gate.

[0032] In one specific embodiment of this application, the nondeterministic module 101 includes a clock system that controls a trigger to sample the high-frequency sequence output by the XOR output unit, obtaining and outputting a preliminary random number. In practice, for each physical random source generation circuit, firstly, the XOR outputs of six physically identical ring oscillator digital circuits based on the phase jitter principle constitute a high-frequency sequence. Secondly, the sampled clock sequence of the clock output included in the physical random source generation circuit constitutes a low-frequency sequence. Then, the low-frequency sequence can sample the high-frequency sequence to obtain a preliminary random number.

[0033] Optional, such as Figure 5 As shown, each physical random source generation circuit uses different low-frequency clock sampling sequences as low-frequency sequence control triggers to sample the high-frequency sequence output by the XOR output unit. This can be understood as different physical random source generation circuits using different low-frequency clock sampling sequences. Specifically, the clock path of each physical random source generation circuit can be configured from its original path to a new clock path via software configuration, enabling the four physical random source generation circuits to use different clocks. Therefore, by sampling the high-frequency sequence with different low-frequency clock sampling sequences, the randomness of the initial random numbers generated by the physical random source generation circuits can be improved, thereby enhancing the security of the final generated random numbers.

[0034] Optionally, the clock system includes an oscillator clock path and a system clock divider path. In practice, the clock of any physical random source circuit can be configured via software to select either the oscillator clock path or the system clock divider path.

[0035] Optionally, the oscillator clock path includes four parallel oscillator clocks, a software-configurable switch, and a fixed frequency divider, wherein the four parallel oscillator clocks, the software-configurable switch, and the fixed frequency divider are connected in series. The fixed frequency divider can divide the original clock signal by a fixed value. The low-frequency clock sampling sequences output by the four parallel oscillator clocks are different.

[0036] Optionally, the four parallel oscillator clocks are: system power-on clock, internal timer clock, serial peripheral interface backup clock, and backup clock. The system power-on clock provides a stable clock source output during system power-on. The internal timer clock can be an internal timer clock. The serial peripheral interface backup clock can be an SPI (serial peripheral interface) backup clock; when SPI is used as the master device, the serial peripheral interface backup clock can be used as an accurate clock source output.

[0037] Figure 1 The true random number generation device based on the principle of ring oscillator shown includes: a deterministic module 102, which performs post-processing on each preliminary random number output by the non-deterministic module to obtain a random number output sequence.

[0038] In one specific embodiment of this application, the deterministic module 102 performs post-processing on the preliminary random numbers output by each physical random source generation circuit to obtain a random number output sequence. In practice, the deterministic module can be a post-processing algorithm circuit, employing the SM3 algorithm circuit. The preliminary random numbers output by the four physical random source generation circuits are processed to obtain a final uniform and independent random number output sequence.

[0039] Optional, such as Figure 6 As shown, the true random number generation device also includes a self-test module 103. The self-test module 103 performs startup tests and online tests on the output sequences of multiple ring oscillators, the preliminary random numbers output by each physical random source circuit, and the random number output sequence. Specifically, the self-test module can perform startup tests and online tests on the output sequences of multiple ring oscillators, the preliminary random numbers output by each physical random source circuit, and the random number output sequence, respectively, and generate corresponding startup warning messages and online warning messages. Therefore, the self-test module can determine the security of the true random number generation device, thereby further improving the security of the generated random numbers.

[0040] Optionally, the self-testing module includes a frequency verification module, an ordered evenness verification module, and a poker verification module. The frequency verification module verifies the uniformity and independence of random numbers from three dimensions: single-bit distribution, two-bit correlation, and multi-bit combination distribution. The ordered evenness verification module verifies the uniformity and independence of random numbers from three dimensions: two-bit correlation distribution. The poker verification module verifies the uniformity and independence of random numbers from three dimensions: multi-bit combination distribution. This detects whether the random number sequence exhibits systematic bias, periodicity, or inter-bit correlation, thereby determining the security of the random number sequence.

[0041] The beneficial effects that the technical solution of this application can achieve are: when the technical solution of this application is applied, the output of the four physical random source generation circuits is independent, and each physical random source generation circuit can generate preliminary random numbers independently. For security reasons, four physical random source generation circuits are used in the design to effectively enhance the circuit's anti-attack capability.

[0042] Figure 7 This is a flowchart of another specific embodiment of the method of using a true random number generation device based on the principle of a ring oscillator according to this application.

[0043] exist Figure 7 In the specific embodiment shown, the method of using the true random number generation device based on the ring oscillator principle mainly includes: output step S701, where the clock system control flip-flop included in the nondeterministic module triggers sampling of the high-frequency sequence output by the XOR output unit to obtain and output preliminary random numbers. The nondeterministic module includes four physical random source generation circuits. Each of the four physical random source generation circuits includes an XOR output unit, a true random number generator, and multiple ring oscillators. The true random number generator includes a flip-flop. Post-processing step S702, where the preliminary random numbers output by each physical random source generation circuit are post-processed to obtain a random number output sequence.

[0044] The method of using the true random number generation device based on the ring oscillator principle provided in this application can be used to execute the true random number generation device based on the ring oscillator principle described in any of the above embodiments. The implementation principle and technical effect are similar, and will not be repeated here.

[0045] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0046] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0047] The above are merely embodiments of this application and do not limit the scope of this patent application. Any equivalent structural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of this application.

Claims

1. A true random number generation device based on the principle of a ring oscillator, characterized in that, include: Nondeterministic modules, including: The four-channel physical random source generation circuit includes an XOR output unit, a true random number generator, and multiple ring oscillators. The true random number generator includes a trigger. A clock system controls the flip-flops to sample the high-frequency sequence output by the XOR output unit, obtaining and outputting a preliminary random number; and The deterministic module performs post-processing on the preliminary random numbers output by each physical random source generation circuit to obtain a random number output sequence.

2. The true random number generation device based on the ring oscillator principle according to claim 1, characterized in that, Each of the plurality of ring oscillators consists of 16 inverters, 11 three-input XOR gates, and one three-input XNOR gate.

3. The true random number generation device based on the ring oscillator principle according to claim 2, characterized in that, The output of the 11 three-input XOR gates is XORed with the output of a three-input XNOR gate.

4. The true random number generation device based on the ring oscillator principle according to claim 1, characterized in that, Each physical random source generation circuit uses different low-frequency clock sampling sequences as low-frequency sequences to control the flip-flops to sample the high-frequency sequences output by the XOR output unit.

5. The true random number generation device based on the ring oscillator principle according to claim 4, characterized in that, The clock system includes an oscillator clock path and a system clock divider path.

6. The true random number generation device based on the ring oscillator principle according to claim 5, characterized in that, The oscillator clock path includes four parallel oscillator clocks, a software configurable switch, and a fixed frequency divider. The four parallel oscillator clocks, the software configurable switch, and the fixed frequency divider are connected in series, and the low-frequency clock sampling sequences output by the four parallel oscillator clocks are different.

7. The true random number generation device based on the ring oscillator principle according to claim 6, characterized in that, The four parallel oscillator clocks are: system power-on clock, internal timer clock, serial peripheral interface backup clock, and backup clock.

8. The true random number generation device based on the ring oscillator principle according to claim 1, characterized in that, The true random number generation device further includes a self-testing module, which performs startup tests and online tests on the output sequences of the plurality of ring oscillators, the preliminary random numbers output by each physical random source generation circuit, and the random number output sequence.

9. The true random number generation device based on the principle of a ring oscillator according to claim 8, characterized in that, The self-test module includes a frequency test module, an ordered even test module, and a poker test module.

10. A method of using a true random number generation device based on the principle of a ring oscillator, characterized in that, include: In the output step, the nondeterministic module includes a clock system control flip-flop that triggers sampling of the high-frequency sequence output by the XOR output unit to obtain and output a preliminary random number. The nondeterministic module includes four physical random source generation circuits. Each of the four physical random source generation circuits includes an XOR output unit, a true random number generator, and multiple ring oscillators. The true random number generator includes a flip-flop. The post-processing step involves post-processing the initial random numbers output by each physical random source generation circuit to obtain a random number output sequence.