High-speed pseudo-random number generation method and high-speed pseudo-random number generator based on FPGA

By using the chaos model algorithm and embedded cross-coupling topology on the FPGA platform, combined with 128-bit fixed-point number design and block processing, the existing technology problems of high cost, low speed and insufficient randomness of the pseudo-random number generator of the chaotic circuit are solved. Problem, efficient, low-cost, high-speed pseudo-random number generation is achieved to meet high bandwidth requirements.

CN114911455BActive Publication Date: 2024-09-13LANZHOU UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210583056.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2024-09-13
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

Existing pseudo-random number generators for chaotic circuits have high cost and low generation rate, cannot meet high bandwidth requirements, and are not random enough to pass strict randomness tests.

Method used

The FPGA-based chaos model algorithm is used to achieve efficient pseudo-random number generation through the embedded cross-coupling topology of two-dimensional logistic mapping and one-dimensional tent mapping, combined with 128-bit fixed-point number design and block processing.

Benefits of technology

It achieves efficient and low-power pseudo-random number generation with a rate of 10Gbps. It can pass strict randomness tests and costs less than 5,000 yuan. It is suitable for high bandwidth requirements and military purposes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114911455B
    Figure CN114911455B
Patent Text Reader

Abstract

The present invention discloses a high-speed pseudo-random number generation method and a high-speed pseudo-random number generator based on FPGA. An appropriate chaos model algorithm is used in FPGA to generate high-speed pseudo-random numbers. The overall operation in the FPGA circuit adopts a 128-bit fixed-point number design to achieve sufficient calculation accuracy, effectively suppress chaos degradation, improve output bandwidth, enhance throughput, and increase key space. During the operation process, the chaos model algorithm is processed in blocks, and the operations that take up a lot of time in the model are divided into small parts for parallel completion. The pseudo-random number rate generated by the present invention can reach 10Gbps, which can meet the video transmission with high bandwidth requirements; the pseudo-random number sequence generated can pass strict and high-standard randomness tests, and the complexity of the generated sequence is also guaranteed; in addition, the cost of the pseudo-random number generator of the present invention is greatly reduced, while the resource utilization efficiency of the FPGA is improved and the power consumption is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of communication information security, and in particular relates to a high-speed pseudo-random number generation method and a high-speed pseudo-random number generator based on FPGA. Background Art

[0002] In today's information age, random numbers have been widely used in many fields. For example, in cryptography, random numbers can be used for password transmission, storage, and calculation; in radar monitoring, random numbers can be used to generate radar waveforms, and the noise waveform generated by random numbers has the advantages of anti-interference and low interception; random numbers are used in mechanical vibration, and the Monte Carlo method can be used to predict the randomness of mechanical vibration. Therefore, it is of great application value to study the random numbers that can generate high randomness and high complexity.

[0003] The methods for generating random numbers mainly include the methods of generating pseudo-random numbers by algorithms, generating true random numbers by physical entropy sources, and generating random numbers by chaotic circuits. Among them, the methods of generating pseudo-random numbers by algorithms and generating true random numbers by physical entropy sources are feasible, but have fatal disadvantages such as platform limitations, susceptibility to environmental interference, and high cost. Therefore, the present invention adopts the method of generating random numbers by chaotic circuits. Chaotic circuits can generate both pseudo-random numbers and true random numbers, but because the generation rate of true random numbers is low, the difficulty is high, and the cost is high, the present invention selects pseudo-random numbers with higher performance for generation, which have faster generation speed, repeatability, and reproducibility.

[0004] At present, the main research directions and results of pseudo-random number generation in chaotic circuits are as follows: First, the traditional chaotic model is implemented using an XOR circuit. Although this model is small in scale and has low resource occupancy, the random numbers it generates are not very random and require post-processing, with a rate of only 7.38Mbit / s; secondly, the model of an enhanced low-dimensional chaotic system plus sin operations can be miniaturized and chip-based, but the complex algorithm results in a low rate of generation.

[0005] In summary, the existing chaotic circuit pseudo-random number generator has the following defects:

[0006] 1. The cost is high. The price of existing mature pseudo-random number generators is as high as hundreds of thousands;

[0007] 2. The random number generation rate is low. The current maximum rate is only 6.78Gbps, which is far from enough for high-bandwidth video transmission and enterprise or military use.

[0008] 3. The generated sequence complexity is not enough and cannot pass randomness standard tests such as NIST SP800-22 and TestU01. Summary of the invention

[0009] In view of the deficiencies pointed out in the above background technology, the present invention provides a high-speed pseudo-random number generation method and a high-speed pseudo-random number generator based on FPGA, aiming to solve the problems existing in the prior art in the above background technology.

[0010] To achieve the above object, the technical solution adopted by the present invention is:

[0011] A high-speed pseudo-random number generation method based on FPGA comprises the following steps:

[0012] First, the following chaos model algorithm is established:

[0013]

[0014] Among them, α, β, γ 1 ,γ 2 are the parameters of the two-dimensional logistic mapping, and a is the control parameter of the one-dimensional tent model;

[0015] Secondly, the chaos model algorithm is implemented in FPGA. The overall operation in the FPGA circuit adopts 128-bit fixed-point number design. During the operation, the chaos model algorithm is processed in blocks, and the operations that take up a lot of time in the model are divided into small parts for parallel completion.

[0016] The above method makes the generated pseudo-random numbers have high enough randomness at the model level, so that they can pass the strict and high-standard randomness test without using XOR operation, and also ensure the complexity of the generated sequence. The method has a small amount of calculation and a relatively efficient calculation method, which makes the resource occupancy rate of FPGA reach a low level, showing a high utilization rate, thereby reducing its power consumption.

[0017] Preferably, the chaotic model algorithm performs block processing as follows, wherein the mod operation is omitted:

[0018]

[0019] Among them, the superscripts 1, 2, 3, and 4 represent P1, P2, P3, and P4, respectively, which are the operations of the first, second, third, and fourth parts in the FPAG operation module. The parameters are (α, β, γ 1 ,γ 2 ,a)=(4,4,2,2,0.5), so that the operation result mod of the whole system cannot produce a negative result, and then the operation of the mod function can be expressed as cutting off the integer digits in the operation process and retaining the decimal digits;

[0020] For P2 and P4 operations, the following formula is used to split the 128-bit multiplication into three 64-bit operations to significantly reduce the operating frequency loss:

[0021] X 2 ={A,B}×{A,B}={(A 2 ), (2AB), (B 2 )}.

[0022] Preferably, in the block processing mode, the calculation process is as follows:

[0023] S0: Input 128-bit x n ,y n Initial value;

[0024] S1: For P1: do 1-x n Operations;

[0025] For P2, P4: Perform A 2 , B 2 , 2AB calculation operation;

[0026] For P3, first use y n The MSB of y n Is it greater than 0.5, that is, the value of a, which determines whether to use y n (When 0≤y n <0.5) or (1-y n )(When 0.5≤y n <1), and since 1-a and a are both equal to 0.5, dividing by 1-a or a is equal to multiplying by 2, i.e., a one-bit left shift operation. Therefore, the result after the above judgment is subjected to the F operation to form the calculation result on the right side of the dotted line in the model algorithm, and the result on the left side of the dotted line in the model algorithm is formed without the F operation;

[0027] S2: For P1: do 1-x n With x n The operation of multiplication;

[0028] For P2 and P4: perform addition operations to calculate x n 2 ,y n 2 ;

[0029] For P3: multiply the left and right parts of the dotted line;

[0030] S3: Cut 128MSB of the output 256-bit result, change the cut position according to the multiplied response parameter, then add the remaining parts of P1 and P2, and add the remaining parts of P3 and P4, the result is x n+1 ,y n+1 , and simultaneously convert the x of the two channels n+1 ,y n+1 Output is performed to form a single 256-bit wide output.

[0031] The present invention further provides a high-speed pseudo-random number generator based on FPGA, which applies an embedded cross-coupling topological structure generated by embedding a one-dimensional tent chaotic map into a two-dimensional logistic chaotic map. Therefore, the pseudo-random number generator mainly includes:

[0032] One-dimensional tent mapping module: used to map y, expressed as follows:

[0033]

[0034] Where k is the number of iterations and α is the control parameter, i.e., parameter a in the embedded cross-coupling mapping.

[0035] Two-dimensional logistic mapping module: used to map x and y respectively, as shown below:

[0036]

[0037] Among them, λ 1 , 2 All are control parameters;

[0038] Input coupling module: used to couple the outputs of two dimensions and send them to two input channels respectively;

[0039] Output coupling module: used to generate and output pseudo-random numbers.

[0040] Compared with the shortcomings and deficiencies of the prior art, the present invention has the following beneficial effects:

[0041] (1) The present invention provides a new pseudo-random number generation method based on FPGA. The proposed chaos model algorithm has a small amount of computation and is highly efficient, which reduces the resource occupancy rate of FPGA and improves the resource utilization efficiency, thereby reducing its power consumption.

[0042] (2) The pseudo-random number rate generated by the present invention can reach 10 Gbps, which can meet most daily needs and can also be used for enterprise or military purposes with higher requirements. It far exceeds the rate that can be achieved by existing pseudo-random number algorithm implementations.

[0043] (3) The present invention makes the generated pseudo-random numbers have sufficiently high randomness at the model level, so that they can pass strict and high-standard randomness tests without using XOR operations, and also ensure the complexity of the generated sequence. The pseudo-random number sequence generated by the present invention can pass internationally renowned tests such as NIST and TestU01.

[0044] (4) The pseudo-random numbers generated by the present invention only rely on FPGA chips, and the cost is only less than about 5,000 yuan. Moreover, for a single FPGA chip, multiple channels can be used to output pseudo-random numbers, and the generation speed can be further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a schematic diagram of the model structure of a high-speed pseudo-random number generator based on FPGA provided in an embodiment of the present invention.

[0046] Figure 2 The diagram is a circuit structure diagram of an FPGA internal implementation of a high-speed pseudo-random number generation method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0048] The high-speed pseudo-random number generation method based on FPGA provided by the present invention is as follows:

[0049] First, a new pseudo-random number generation algorithm is proposed, and the designed chaos model is as follows:

[0050]

[0051] Among them, α, β, γ 1 ,γ 2 are the parameters of the two-dimensional logistic mapping, and a is the control parameter of the one-dimensional tent model.

[0052] Secondly, the model is implemented in FPGA. The FPGA model selected is Xilinx Kintex-7xc7k325tffg900-2. The structure of the hardware circuit is as follows Figure 2As shown. In a chaotic system, due to limited calculation accuracy, chaos degradation will occur, causing a large deviation between the calculation result and the expected result of the theory, which will eventually reduce the nonlinear dynamic characteristics of the entire system, thereby further reducing the complexity of the generated sequence. Therefore, the overall calculation in the FPGA circuit of the present invention adopts a 128-bit fixed-point number design, which can not only achieve sufficient calculation accuracy and effectively suppress chaos degradation, but also improve the output bandwidth, enhance throughput, and increase the key space, providing a guarantee for further applications (such as encryption, etc.); in addition, the 128-bit bit width balances the relationship between resources, energy consumption, and rate, so that the rate of pseudo-random number generation reaches 10Gbps. At the same time, it reduces the main resource occupancy rate in the FPGA. The main resource occupancy rate in the FPGA of the present invention is shown in Table 1:

[0053] Table 1 FPGA main resource occupancy rate

[0054] resource LUT FF DSP Slice Usage 4694 2227 224 1772 Occupancy rate 2% 1% 27% 3.4%

[0055] The power consumption of the invention is 668mw, and the efficiency is 61.964pJ / b. Compared with the random number generators available on the market, the energy consumption is extremely low.

[0056] The model structure of the high-speed pseudo-random number generator based on FPGA is as follows: Figure 1 As shown, the one-dimensional tent chaos map and the two-dimensional logistic chaos map are combined, that is, the one-dimensional tent chaos map is embedded in the two-dimensional logistic chaos map to generate an embedded cross-coupling topological structure, and the structure is applied to the pseudo-random number generator. Therefore, the pseudo-random number generator mainly includes:

[0057] One-dimensional tent mapping module: used to map y, expressed as follows:

[0058]

[0059] Where k is the number of iterations and α is the control parameter, i.e., parameter a in the embedded cross-coupling mapping.

[0060] Two-dimensional logistic mapping module: used to map x and y respectively, as shown below:

[0061]

[0062] Among them, λ 1 , 2 All are control parameters;

[0063] Input coupling module: used to couple the outputs of two dimensions and send them to two input channels respectively;

[0064] Output coupling module: used to generate and output pseudo-random numbers.

[0065] In FPGA implementation, although the above model has significant advantages, its operation is relatively complex and the 128-bit fixed-point number design greatly reduces the operating frequency of the system. Therefore, during the operation, the above chaos model is divided into blocks, and the operations that take up a lot of time in the model are divided into small parts for parallel completion. The specific block processing method is as follows, in which the mod operation is omitted:

[0066]

[0067] Among them, the superscripts 1, 2, 3, and 4 represent P1, P2, P3, and P4 respectively. Figure 2 The operations of P1, P2, P3, and P4 correspond to each other. The whole system is designed with a state machine. The iterative values ​​of the X channel and the Y channel are all 128 bits, but integers will still appear in the operation. Therefore, the parameters are selected as (α, β, γ 1 ,γ 2 ,a)=(4,4,2,2,0.5). By selecting the above parameters, it is impossible for a negative number to be generated in the operation result mod of the whole system. Therefore, the operation of the mod function can be expressed as cutting off the integer digits in the operation process and retaining the decimal digits.

[0068] For parts P2 and P4, since they contain x n ,y n The square operation of these two 128-bit multiplications requires a lot of time and hardware resources, which will cause a high frequency loss. Therefore, the following formula is used to split the 128-bit multiplication into three 64-bit operations, thereby greatly improving the operating frequency.

[0069] X 2 ={A,B}×{A,B}={(A 2 ), (2AB), (B 2 )}

[0070] In the block processing mode, the operation process, i.e. the state machine, is described as follows:

[0071] S0: Input 128-bit x n ,y n Initial value;

[0072] S1: For P1: do 1-x n Operations;

[0073] For P2, P4: Perform A 2 , B 2 , 2AB calculation operation;

[0074] For P3, first use y n The MSB of y n Is it greater than 0.5, that is, the value of a, which determines whether to use y n (When 0≤y n <0.5) or (1-y n )(When 0.5≤y n <1), and since 1-a and a are both equal to 0.5, dividing by 1-a or a is equal to multiplying by 2, i.e., a one-bit left shift operation. Therefore, the result after the above judgment is subjected to the F operation to form the calculation result on the right side of the dotted line in the model algorithm, and the result on the left side of the dotted line in the model algorithm is formed without the F operation;

[0075] S2: For P1: do 1-x n With x n The operation of multiplication;

[0076] For P2 and P4: perform addition operations to calculate x n 2 ,y n 2 ;

[0077] For P3: multiply the left and right parts of the dotted line;

[0078] S3: The output 256-bit result is subjected to the operation of cutting off 128MSB, and the cutting position is changed accordingly according to the multiplied response parameter, such as P1 is less than 16 = 2 4 , it should be truncated after 4 digits; then add the remaining parts of P1 and P2, and add the remaining parts of P3 and P4, the result is x n+1 ,y n+1 , and at the same time, the x of the two channels n+1 ,y n+1 Output is performed to form a single 256-bit wide output.

[0079] Finally, the timing analysis is carried out. The maximum operating frequency of the circuit is 120.51Mhz, and the rate is about 10.04Gbps, which can meet most daily needs, such as picture and video encryption, etc. Taking the video with high bandwidth requirements as an example (after H.264 encoding): video (FHD) 6Mbps, video (UHD) 32Mbps, it can also meet the requirements of Gbps rate for enterprises or higher military purposes, far exceeding the rate that can be achieved by the existing pseudo-random number algorithm. The pseudo-random number sequence generated by the present invention has high complexity and can pass the internationally renowned NIST, TestU01 and other randomness standard tests.

[0080] In addition to the performance advantages, the present invention also has significant economic benefits and considerable market competitiveness. The current market price of pseudo-random code generators with the same performance is usually hundreds of thousands of RMB, while the pseudo-random numbers generated by the present invention only rely on FPGA chips, and the cost is only less than 5,000 RMB. Moreover, for a single FPGA chip, multiple channels can be used to output pseudo-random numbers, so the speed can be further improved.

[0081] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A high-speed pseudo-random number generation method based on FPGA, characterized in that: The following steps are involved: First, the following chaos model algorithm is established: Among them, α, β, γ1, γ2 are the parameters of the two-dimensional logistic mapping, and a is the control parameter of the one-dimensional tent model; Secondly, the chaos model algorithm is implemented in FPGA. The overall operation in the FPGA circuit adopts 128-bit fixed-point number design. During the operation process, the chaos model algorithm is processed in blocks, and the operations that take up a lot of time in the model are divided into small parts for parallel completion. The chaotic model algorithm performs block processing as follows, wherein the mod operation is omitted: Among them, the superscripts 1, 2, 3, and 4 represent P1, P2, P3, and P4, respectively, which are the four operations in the FPAG operation module; the parameters are selected as (α, β, γ1, γ2, a) = (4, 4, 2, 2, 0.5); For P2 and P4 operations, the following formula is used to split the 128-bit multiplication into three 64-bit operations: X 2 ={A,B}×{A,B}={(A 2 ),(2AB),(B 2 )}; Under the block processing method, the calculation process is as follows: S0: Input 128-bit x n ,y n Initial value; S1: For P1: do 1-x n Operations; For P2, P4: Perform A 2 , B 2 , 2AB calculation operation; For P3, first use y n The MSB of y n Is it greater than 0.5, that is, the value of a, which determines whether to use y n (When 0≤y n <0.5) or (1-y n )(When 0.5≤y n <1), and since 1-a and a are both equal to 0.5, dividing by 1-a or a is equal to multiplying by 2, i.e., a one-bit left shift operation. Therefore, the result after the above judgment is subjected to the F operation to form the calculation result on the right side of the dotted line in the model algorithm, and the result on the left side of the dotted line in the model algorithm is formed without the F operation; S2: For P1: do 1-x n With x n The operation of multiplication; For P2 and P4: perform addition operations to calculate x n 2 ,y n 2 ; For P3: multiply the left and right parts of the dotted line; S3: Cut 128MSB of the output 256-bit result, change the cut position according to the multiplied response parameter, then add the remaining parts of P1 and P2, and add the remaining parts of P3 and P4, the result is x n+1 ,y n+1 , and simultaneously convert the x of the two channels n+1 ,y n+1 Output is performed to form a single 256-bit wide output.

2. A high-speed pseudo-random number generator for the high-speed pseudo-random number generation method based on FPGA as claimed in claim 1, characterized in that: The embedded cross-coupling topology structure generated by embedding the one-dimensional tent chaos map into the two-dimensional logistic chaos map is applied, including: One-dimensional tent mapping module: used to map y, Two-dimensional logistic mapping module: used to map x and y respectively; Input coupling module: used to couple the outputs of two dimensions and send them to two input channels respectively; Output coupling module: used to generate and output pseudo-random numbers.

Citation Information

Patent Citations

  • High-frequency asynchronous random number generator based on FPGA

    CN107678731A

  • High-speed random number generation method and apparatus

    CN108345446A

  • FPGA Design of Pseudorandom Number Generator Based on Fractional Chaos and Zuchongzhi Algorithm

    CN109508175A