A quantum random number post-processing method and device
By dividing the original data generated by two quantum random number generators into blocks and calculating the vector inner product, the problem of the need for random seeds and the inability to generate random numbers in real time in the existing technology is solved, and efficient and real-time quantum random number generation is achieved. .
Patent Information
- Application Number
- CN202211013862.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2042-08-23
AI Technical Summary
Existing quantum random number post-processing methods require additional perfect random number seeds and can only be generated at extremely low rates in harsh physical environments, resulting in inefficiency and limited application range. At the same time, these methods are offline. Unable to output random numbers in real time.
By obtaining the original data generated by two quantum random number generators, taking the preset initial block data length as the starting point, dividing it according to the increasing rule, and then performing vector inner product calculation on the finite field to generate a random number vector, Finally spliced into the final random number vector.
This method can generate random numbers online in real time without using random seeds, improves the generation rate, reduces waiting time, and expands the application scope of the quantum random number generator.
Smart Images

Figure CN115396090B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum communication technology, specifically, to the field of quantum cryptography technology, and more specifically, to a quantum random number post-processing method and device. Background Art
[0002] Quantum random number post-processing is a very important link in the field of quantum cryptography. The effect and rate of quantum random number post-processing directly affect the effect of quantum cryptography application. The traditional method of quantum random number post-processing is to use a randomness extractor to purify a long but imperfect input raw data into a shorter but approximately uniformly distributed random number.
[0003] At present, quantum random number post-processing mainly uses quantum-proof extractors, where quantum-proof means that even if the adversary (which can be regarded as a quantum computer) has part of the information of the original random data, the output random number is almost uniformly distributed in the eyes of the adversary. Quantum-proof extractors are mainly divided into two categories: one is the extractor used in the schemes described in references [1,2], namely the Toeplitz matrix, which constructs a random matrix through a random seed and then multiplies the matrix with the original data to obtain the final random number output; the other is the extractor used in the scheme described in reference [3], namely the Trevisan extractor, which constructs a random matrix through a random seed and then uses an algorithm that is much more complex than the Toeplitz matrix to calculate the final random number output. Both types of extractors require the use of an additional segment of perfect random numbers (also known as seeds) and the device that generates the seeds needs to have device independence. However, under the existing technology, seeds can only be generated at a very low rate (10kbps) in harsh physical environments, which seriously affects the generation rate of the final random number. In addition, both types of extractors use offline algorithms, that is, they need to obtain all the original random data before outputting the processed random numbers, and cannot output them in real time.
[0004] In summary, the existing random number post-processing methods using quantum-proof extractors have the following problems: 1. Existing quantum-proof extractors need to input an additional perfect random number as a seed and can only generate seeds at an extremely low rate under harsh environments (such as the requirement for devices to generate seeds), which severely limits the efficiency of existing post-processing algorithms and the application scope of quantum random number generators; 2. Existing quantum-proof extractors are all offline and cannot output the final random number in real time. They have disadvantages such as large memory consumption and long processing time. These disadvantages also limit the application of quantum random number generators in practical scenarios.
[0005] References are as follows:
[0006] [1] Marco Tomamichel, Christian Schaffner, Adam Smith, and RenatoRenner. Leftover hashing against quantum side information. In Proceedings of 2010 international symposium on information theory, ISIT, pages 2703–2707. IEEE, 2010.
[0007] [2]Renato Renner.Security of Quantum Key Distribution.PhD thesis,Swiss Federal Institute of Technology Zurich,September2005.
[0008] [3] A.De, C.Portmann, T.Vidick, and R.Renner, SIAM J.Comput.41,915(2012). Summary of the invention
[0009] Therefore, the purpose of the present invention is to overcome the defects of the prior art and provide a quantum random number post-processing method and device.
[0010] The objective of the present invention is achieved through the following technical solutions:
[0011] According to a first aspect of the present invention, a quantum random number post-processing method is provided, the method being used for post-processing two groups of original data generated by two quantum random number generators, wherein the method comprises: S1, obtaining a preset initial block data length; S2, taking the initial block data length as a starting point, dividing the two groups of original data into blocks with different data lengths according to a preset data length increasing rule, and performing vector inner product calculations on the block data with the same block data length between the two groups of original data to obtain a random number vector corresponding to the current block data group; S3, concatenating the multiple random number vectors according to the order in which the corresponding block data are generated to obtain a final random number vector.
[0012] Preferably, the initial block data length is determined based on the balance requirements between security and computing efficiency in the application scenario.
[0013] Preferably, the initial block data length is 100.
[0014] Preferably, the preset rule for increasing the data length is that the length of the next block data is the length of the previous block data plus 1.
[0015] Preferably, each time the block original data is acquired, post-processing is performed after all original data of the same block data length in the two groups of original data are acquired.
[0016] In some embodiments of the present invention, in step S2, the vector inner product calculation includes the following steps:
[0017] S21, using the first preset rule to determine the finite field corresponding to the current block data by the current block data length ; The first preset rule is:
[0018]
[0019] in, is the identifier of the finite field over which the inner product function is computed, n r is the length of the block data of the rth block data, and b is the bit length of each variable in each group of original data;
[0020] S22, the block data with the same length of the current block data in the two sets of original data are placed in the finite field Perform vector inner product calculation on the random number vector corresponding to the current sub-block data group.
[0021] In some embodiments of the present invention, the number of block calculations of the block original data in step S2 is obtained through the following steps: T1, obtaining the length of the final random number; T2, based on the length of the final random number, inversely solving the total number of block calculations according to the increasing rule of the block data length and the initial block data length.
[0022] According to a second aspect of the present invention, a quantum random number processing device is provided, comprising: a random number extractor and two quantum random number generators, wherein the two quantum random number generators are used to respectively generate random number raw data in real time, and the random number extractor is configured to adopt a quantum random number processing method provided in the first aspect to post-process the raw data generated by each quantum random number generator to obtain a corresponding random number.
[0023] Preferably, the quantum random number generator is a quantum random number generator capable of generating raw random numbers whose minimum entropy grows linearly with the length of the data.
[0024] Compared with the prior art, the advantages of the present invention are: the quantum random number post-processing method provided by the present invention reduces the waiting time for obtaining all the original random data in the post-processing of the existing scheme for generating the final random number while ensuring the quality of the final random number, thereby improving the random number generation rate; since the present invention generates random numbers without using random seeds, that is, the random seeds required in harsh environments and with extremely low generation rates are reduced, that is, the random number generation rate of the present invention is further improved, thereby expanding the application scope of the quantum random number generator provided by the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The embodiments of the present invention are further described below with reference to the accompanying drawings, in which:
[0026] Figure 1 A schematic diagram of quantum random number post-processing according to the present invention;
[0027] Figure 2 A schematic diagram of a process of a quantum random number post-processing method according to an embodiment of the present invention;
[0028] Figure 3 FIG. 4 is a schematic diagram of the operation of an extractor according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail by specific embodiments below. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0030] As mentioned in the background technology section, the quantum-proof extractors in the prior art need to input an additional perfect random number as a seed and can only generate seeds at an extremely low rate under harsh environments (such as the requirements for devices that generate seeds), which severely limits the efficiency of existing post-processing algorithms and the scope of application of quantum random number generators. In addition, the existing quantum-proof extractors are all offline and cannot output the final random number in real time. They have disadvantages such as large memory consumption and long processing time. These disadvantages also limit the application of quantum random number generators in practical scenarios. In the process of studying the properties of existing original random numbers, the inventors found that the original random data generally has the property of a block minimum entropy source, that is, the minimum entropy of the original random data grows linearly with the length of the data. Simply put, this property of the original random number makes it feasible to extract random numbers from part of the data in the original random number (also referred to as block data in the present invention) without affecting the properties of the final random number. Based on this characteristic of the original random number, the present invention proposes a new quantum random number post-processing method. Figure 1 As shown, the present invention uses two quantum random number generators, random number generator 1 and random number generator 2, to generate an original random number, namely, original random number X and original random number Y respectively; the random number extractor outputs the final random number Z based on the original random number X and the original random number Y. Thus, without the need for a random seed, two sets of independent original random data are used for online real-time processing to generate the final random number.
[0031] like Figure 2As shown, a quantum random number post-processing method according to an embodiment of the present invention is provided, which is used to post-process two groups of original data generated by two quantum random number generators to obtain random numbers of required length. In summary, the method includes: S1, obtaining a preset initial block data length; S2, taking the initial block data length set in step S1 as the starting point, the two groups of original data are respectively divided into blocks with different data lengths according to the preset data length increasing rule, and the block data with the same block data length between the two groups of original data are respectively calculated by vector inner product to obtain the random number vector corresponding to the current block data group; S3, the random number vectors of the multiple times are spliced according to the order of generation of the corresponding block data to obtain the final random number vector. Therefore, the present invention sequentially blocks the original data generated by the two quantum random number generators in real time, thereby improving the generation rate of random numbers. It should be further pointed out that in the process of generating random numbers of the present invention, each time the block data is obtained, the current block data lengths of the two quantum random number generators obtained reach the corresponding lengths, and then post-processing will be performed. In other words, the present invention belongs to an online algorithm, which reduces the waiting time of the generated original data, shortens the total post-processing time of the original data, does not require a random seed, and improves the generation rate of random numbers. Each of the above steps is described in detail below in conjunction with the embodiments of the present invention.
[0032] In step S1, a preset initial block data length is obtained.
[0033] According to one embodiment of the present invention, the preset length of the initial block data is determined experimentally based on the balance between security and computational efficiency in the application scenario. Specifically, in the scenario where rapid random number generation is required, a too long length of the initial block data will cause waste of the original random data and increase the computational difficulty in the random number generation process; if the length of the initial block data is too short, although the computational difficulty of the random number generation process is reduced, the security of the generated random numbers is reduced. Therefore, the length of the initial block data of the present invention can be determined experimentally based on the balance between security and computational efficiency in the application scenario, and the present invention does not limit this.
[0034] In step S2, taking the initial block data length set in step S1 as the starting point, the two groups of original data are divided into blocks with different data lengths according to the preset data length increasing rule, and the vector inner product calculation is performed on the block data with the same block data length between the two groups of original data to obtain the random number vector corresponding to the current block data group.
[0035] According to an embodiment of the present invention, each time the block original data is obtained, all original data of the same block data length in the two groups of original data are obtained and then post-processed.
[0036] According to one embodiment of the present invention, the post-processing includes performing vector inner product calculation on the block data, including the following steps:
[0037] S21, using the first preset rule to determine the finite field corresponding to the current block data by the current block data length ; The first preset rule is:
[0038]
[0039] in, is the identifier of the finite field over which the inner product function is computed, n r is the length of the block data of the rth block data, and b is the bit length of each variable in each group of original data.
[0040] S22, the block data with the same length of the current block data in the two sets of original data are placed in the finite field The vector inner product calculation is performed on the random number vector corresponding to the current sub-block data group. The vector inner product calculation is a calculation method known to those skilled in the art and will not be described in detail here.
[0041] Vectors X and Y represent two sets of original data respectively. The first set of original data is a random vector X=X1X2…X t ∈({0, 1} b ) t , the second set of original data is a random vector Y=Y1Y2…Y t ∈({0, 1} b ) t , where t represents the number of variables in the random vectors X and Y, and b represents the bit length of each variable in the random vectors X and Y (for example, taking the random vector X corresponding to the first set of original data as an example, when t is 5 and b is 8, it means that the first set of random vectors X contains five variables X1, X2, X3, X4, and X5, and the bit length of each variable is 8). The present invention uses the two sets of original data generated by the quantum random number generator to have the block min entropy source property. For any subset X of the variable X I , for any subset Y of the variable Y I , I∈{1,...t}, then, H min (X I )≥0.6b|I|,H min (Y I )≥0.6b|I|, where H min The function is the minimum entropy function.
[0042] Based on the specific mathematical definition that both sets of original data have the property of block min entropy source, the work of the extractor will be specifically introduced below. According to one embodiment of the present invention, each block data set is post-processed by the following steps P21 and P22:
[0043] P21. Based on the length of the last block data, the length of the current block data is obtained based on the preset data length increment rule, and after the last block data is obtained from the two groups of random number original data, the random number original data corresponding to the length of the current block data is respectively extracted to form the current block data group. According to one embodiment of the present invention, if the current is the first block data, the data is obtained according to the initial block length. According to one embodiment of the present invention, the length of the initial block can be set to any length greater than or equal to 100, and the block data after the initial block is obtained according to the preset data length increment rule, wherein the preset data length increment rule is: the length of the next block data is the length of the last block data plus 1. The data length increment rule is not limited to this, and different length increment rules can be adopted according to the specific application scenario, such as adding 2, adding 3, etc. in sequence. After obtaining the current block data length, the original data of the block length is obtained from the two quantum random number generators respectively to form a block data group.
[0044] P22, perform vector inner product calculation on the two groups of block data in the current sub-block data group obtained in step P21 to obtain a random number vector corresponding to the current sub-block data group. Figure 3 As shown, it shows a schematic diagram of the operation of an extractor of the present invention, wherein X represents the first group of original data, Y represents the second group of original data, n1, n1+1, ..., n1+r-1 are the lengths of the block data from the first block data to the rth block data, n1 is the length of the initial data block, X I1 , X I2 …X Ir is the first block data to the rth block data in the first set of original data, Y I1 , Y I2 …Y Ir is the first block data to the rth block data in the second set of original data, Z (1) , Z (2) ,......,Z (r) These are the random numbers output by post-processing the 1st block data group to the rth block data group. The corresponding finite field The inner product function on (the calculation of the inner product function is known in the art, and the present invention does not elaborate on the specific principle of the inner product function). The present invention adopts a real-time online processing method, and starts post-processing after obtaining two groups of raw data of corresponding lengths in real time each time, without paying attention to whether subsequent random numbers are generated.
[0045] In order to better understand the present invention, the processing of the first block data group and the second block data group are respectively described as examples below.
[0046] When post-processing the first block data group, the two sets of original random numbers X obtained are I1 and Y I1 When the preset initial block data length n1 is reached, the first preset rule is used to determine the finite field corresponding to the current block data The length of the first block data is n1, and the corresponding inner product function is determined according to n1. Then, all the original data X of the first block length in the two sets of original data I1 and Y I1 (X I1 and Y I1 To form the first block data group) use the inner product function Calculate and get the random number Z corresponding to the first block data group (1) .
[0047] Starting from the second block data processing, each time (represented by the rth time, r is an integer greater than 1) the post-processing calculation of the block data group is performed on the two sets of original random numbers X obtained respectively. Ir and Y Ir When the length of the block data reaches n1+r-1, the first preset rule is used to determine the finite field corresponding to the current block data The length of the block data of the rth block data is n r =n1+r-1, according to n r Determine the corresponding inner product function Then, all the original data X of the current sub-block length in the two sets of original data Ir and Y Ir Using the inner product function Calculate and get the random number Z corresponding to the rth block data group (r) .
[0048] It can be seen from the above embodiments that the present invention does not require a seed, but only requires two sets of independent original random data to generate the final random number online in real time, and has the advantages of fast calculation speed and low memory consumption.
[0049] In step S3, the random number vectors obtained each time are concatenated according to the order in which the corresponding block data are generated to obtain a final random number vector.
[0050] According to one embodiment of the present invention, in step S2, it also includes obtaining the length of the final random number and performing an inverse solution based on the length of the final random number according to the increasing rule of the length of the block data and the length of the initial block data to obtain the total number of block calculations. It should be further explained that before the post-processing of the quantum random number, the final length of the final random number is preset and stored, and then during the post-processing of the quantum random number, the length of the final random number can be obtained through a simple data acquisition operation, which is known to those skilled in the art and will not be elaborated on here. According to an example of the present invention, the length of the final random number is set to 1000, the length of the initial block is set to 100, and the increasing rule of the length of the block data is 100, 101, ... 100 + r-1, where r is the total number of block calculations, and the relationship between the length of the final random number and the total number of block calculations is:
[0051] (100+100+r-1)r / 2=1000 (1)
[0052] Then solve formula 1 to obtain a positive solution r. If the positive solution is not an integer, the value of the positive solution is rounded down as the total number of block calculations r. In the example here, after solving formula 1, r = 9.57 is obtained, and the final r = 9 after rounding down. It should be further pointed out that when the block data length increasing rule is that the length of the initial block increases by more than 1, it is only necessary to replace formula (1) with the summation formula of the length sequence corresponding to the length increasing rule, and perform the same inverse calculation as the above example to obtain the corresponding total number of block calculations. Such calculations are known in the art and are not presented one by one in the present invention.
[0053] Follow the above steps to calculate the block data of the original data. When the number of times the block data is calculated reaches the total number of block calculations r, the random number Z will be obtained. (1) , Z (2) ,......,Z (r) , when concatenating matrices, the random number Zw 1) , Z (2) ,......,Z (r) Represented as a random number vector Combine the final random numbers in the form of matrix splicing
[0054] According to an example of the present invention, the algorithm pseudo code for implementing an embodiment of the method of the present invention is shown in Table 1.
[0055] Table 1
[0056]
[0057] It can be seen from the pseudo code in Table 1 that the method of the present invention does not use a random seed, and the original random number data is processed in blocks, which is independent of the overall length of the original data, thereby improving the random number generation rate.
[0058] In order to better illustrate the technical effect of the present invention, the present invention is analyzed and verified from the following two aspects (the rate of generating random numbers of the present invention and the uniform distribution quality of the final random numbers generated by the present invention).
[0059] 1. The rate of generating random numbers of the present invention
[0060] Through the introduction of the above specific embodiments, it can be seen that the scheme of generating the final random number of the present invention is a scheme for generating random numbers online, that is, using the property that the original random data generally has a block minimum entropy source (block min entropy source), without the need for a random seed, two groups of original random data are divided into data blocks (wherein, the block data with the same length constitutes a block data group), when the data in each block data group reaches the corresponding data length, the input extractor is post-processed, and the random number corresponding to the block data group is output in real time. The scheme of generating the final random number online in the present invention at least reduces the waiting time for obtaining all the original random data in the post-processing in the existing scheme for generating the final random number, and improves the generation rate of random numbers; because the present invention does not use random seeds to generate random numbers, it also reduces the need for random seeds in harsh environments and with extremely low generation rates, which further improves the rate of generating random numbers in the present invention, and expands the application scope of the quantum random number generator provided by the present invention.
[0061] 2. Uniform distribution quality of the final random numbers generated by the present invention
[0062] Regarding the uniform distribution quality of the final random numbers generated by the present invention, those skilled in the art know that the final random numbers generated must meet the requirements of approximate uniform distribution. Therefore, as long as it is proved that the final random numbers generated by the present invention meet the requirements of approximate uniform distribution, it can be shown that the uniform distribution quality of the random numbers generated by the present invention meets the requirements.
[0063] Mathematically speaking, it is only necessary to prove that when the length n1 of the first block of data in the original random data of the present invention is greater than the set value, the random number Z generated by the present invention is (1) , Z (2) ...Z (r)The distance between the uniform distribution and the random number can be arbitrarily small, that is, the final random number generated by the present invention can be arbitrarily close to the uniform distribution, satisfying the uniform distribution quality of the final random number in the art. The uniform distribution quality proof process of the final random number generated by the present invention is summarized below.
[0064] First, we introduce the lemma that has been proven in the prior art: when two bit strings of equal length are input into the inner product function for vector inner product calculation, the result of the vector inner product calculation is a bit string that is shorter than any of the input bit strings. The XOR value of any randomly extracted substring in the result of the vector inner product calculation can be written as a binary function of the two input bit strings of equal length. If the minimum entropy of the two input bit strings of equal length is large, then the output result of the binary function (only one bit) is close to uniform distribution. In mathematical terms, let f:{0,1} n ×{0,1} n →{0,1} is an arbitrary binary function that takes two bit strings of equal length as input and outputs one bit, and this function corresponds to a Hadamard matrix (any two rows or columns of a Hadamard matrix are orthogonal). Let A and B be two bit strings {0,1} n independent random variables on the bit string {0, 1} n Randomly extracted bit string), if the random variables A, B satisfy the following corresponding properties: H min (A)≥k1 and H min (B)≥k2, then:
[0065]
[0066] in, H min The function is the minimum entropy function, k1 and k2 are standard values, n is the length of the bit string, and P[f(A, B)=1] is the probability that the binary function value is 1 among the binary function values (1 or 0) of random variables A and B.
[0067] Secondly, based on the above lemma, the random number Z generated by the present invention is (1) , Z (2) ,......,Z (r) Do the following steps to deduce.
[0068] First, the random number generated by the present invention is an infinitely long random bit string (0 or 1). For the convenience of description, the bit string Z (1) , Z (2) ,……,Z (r) As an example, the derivation process is explained. Let the i-th bit of the bit string be z iWhen the bit string Z (1) , Z (2) ,……,Z (r) It can be expressed as z1z2…z i …. The random number Z generated by the present invention (1) , Z (2) ,……,Z (r) This is equivalent to cutting the string into several pieces. For example, the first piece Z (1) Contains the first l1 bits, that is The second Z (2) Contains the first Z (1) The last 12 bits, that is The rth block Z (r) Contains the r-1th block Z (r-1) After l r bits, that is in Represents the rth block Z (r) Therefore, the bit string z1z2…z i The substring in ... is represented by z S , Let the set of positive integers S = {1, 4, 6, 13}, then the string z S =z1z4z6z 13 According to the technical solution of the present invention, two groups of original random data are processed into blocks. As the first set of raw data block data and the second set of original data block data A binary function of , the truth table of which can be written in the form of a matrix: Different values of, the column represents For different values of , the matrix must be a Hadamard matrix with the property that any two rows or columns are orthogonal, where Represents substring z S The value of the XOR operation of all bits in, for example, let S = {1, 4, 6, 13}, then Ξ(S) represents z S The blocks involved, for example, when z1 comes from Z (1) , z4 and z6 come from Z (2) , z 13 From Z (5) , then Ξ(S)={1,2,5}.
[0069] Second, according to the above lemma, we can directly get the following conclusion: for any set S containing several positive integers, we have:
[0070]
[0071] in Specifically, when the random variable A is set to , the random variable B is set to n is set to n=b∑ r∈Ξ(S) n r , k1 and k2 are both set to 0.6b∑ r∈Ξ(S) n r , Formula (3) can be obtained from Formula (2) in the introduction, where b represents the bit length of each variable in the random vectors X and Y corresponding to the original random number, and n r is the length of the rth block data in the original random number, is a bit string (z S )z1z2…z i The probability that the XOR value of all bits in the sequence is 1 (1 or 0).
[0072] Third, using the XOR lemma and formula (3), the random number generated by the present invention is an infinite random number with a distance less than or equal to ∑ S∈S ,in
[0073]
[0074] Specifically, in the XOR lemma, the bit string D = D1D2…D i ...is a string of random bits (0 or 1) whose distance from the uniform distribution is less than or equal to The random number generated by the present invention is an infinitely long random number z1z2…z i ... and the bit string D = D1D2...D i ...have the same properties, let D be z1z2…z i …,but, So we get the random numbers z2…z i ...is less than or equal to the uniform distribution
[0075] By performing some mathematical derivations known in the art on formula (4), we obtain
[0076]
[0077] Wherein, n1 represents the block data length of the first block data, that is, the initial block data length, and b represents the bit length of each variable in the random vectors X and Y corresponding to the original random number.
[0078] It can be seen that as the initial block data length n1 increases, the upper limit value of formula (5) is 18. It can be arbitrarily small, that is, the distance between the random number generated by the present invention and the uniform distribution can be arbitrarily small, which shows that the random number generated by the present invention satisfies the approximate uniform distribution.
[0079] In summary, the quantum random number post-processing method provided by the present invention reduces the waiting time for obtaining all the original random data in the post-processing of the existing scheme for generating the final random number while ensuring the quality of the final random number, and improves the generation rate of random numbers; since the present invention generates random numbers without using random seeds, it reduces the need for random seeds in harsh environments and with extremely low generation rates, which further improves the rate of random number generation of the present invention and expands the application scope of the quantum random number generator provided by the present invention.
[0080] It should be noted that although the above describes the various steps in a specific order, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently or even in a different order as long as the required functions can be achieved.
[0081] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0082] Computer readable storage medium can be a tangible device that holds and stores instructions used by an instruction execution device. Computer readable storage medium can include, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a protruding structure in a groove on which instructions are stored, and any suitable combination thereof.
[0083] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A quantum random number post-processing method, characterized in that: The method is used to post-process two groups of original data generated by two quantum random number generators, wherein the minimum entropy of the two groups of original data generated by the quantum random number generators increases linearly with the length of the data, and the method comprises: S1, obtaining the preset initial block data length; S2, starting from the initial block data length, dividing the two groups of original data into blocks with different data lengths according to a preset data length increasing rule, and performing vector inner product calculation on the block data with the same block data length between the two groups of original data to obtain a random number vector corresponding to the current block data group; wherein the vector inner product calculation includes: S21, using the first preset rule to determine the finite field corresponding to the current block data by the current block data length ; The first preset rule is: in, is the identifier of the finite field over which the inner product function is computed, It is The length of the sub-block data. is the bit length of each variable in each set of raw data; S22, the block data with the same length of the current block data in the two sets of original data are placed in the finite field Perform vector inner product calculation on the random number vector corresponding to the current sub-block data group; S3. Concatenate multiple random number vectors according to the order in which their corresponding block data are generated to obtain a final random number vector.
2. The method according to claim 1, characterized in that The initial block data length is determined based on the balance requirements of security and computing efficiency in the application scenario.
3. The method according to claim 2, characterized in that The length of the initial block data is 100.
4. The method according to claim 1, characterized in that The preset rule for increasing the data length is that the length of the next block data is the length of the previous block data plus 1.
5. The method according to claim 1, characterized in that: Each time the block raw data is obtained, post-processing is performed after all the raw data of the same block data length in the two groups of raw data are obtained.
6. The method according to claim 1, characterized in that The number of block calculations of the block original data in step S2 is obtained by the following steps: T1. Get the length of the final random number; T2. Based on the length of the final random number, the total number of block calculations is obtained by inversely solving the problem according to the increasing rule of the block data length and the initial block data length.
7. A quantum random number processing device, characterized in that: The device comprises: Two quantum random number generators, used to generate random number raw data in real time respectively; A random number extractor, configured to post-process the raw data generated by each quantum random number generator using the method described in any one of claims 1 to 6 to obtain a corresponding random number.
8. The device according to claim 7, characterized in that The quantum random number generator is a quantum random number generator capable of generating original random numbers whose minimum entropy increases linearly with the length of data.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program can be executed by a processor to implement the steps of any method described in claims 1 to 6.
10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the electronic device to implement the steps of the method as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
High-speed real-time random number processor and implementing method thereof
CN106155629A
Efficient post-processing method and device for quantum random numbers and quantum random number generator
CN110472739A