[go: up one dir, main page]

CN116405205A - A method for generating quantum random numbers after real-time entropy evaluation - Google Patents

A method for generating quantum random numbers after real-time entropy evaluation Download PDF

Info

Publication number
CN116405205A
CN116405205A CN202310466281.9A CN202310466281A CN116405205A CN 116405205 A CN116405205 A CN 116405205A CN 202310466281 A CN202310466281 A CN 202310466281A CN 116405205 A CN116405205 A CN 116405205A
Authority
CN
China
Prior art keywords
real
quantum
entropy
matrix
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310466281.9A
Other languages
Chinese (zh)
Inventor
郭晓敏
林发定
郭龑强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Taiyuan University of Technology
Original Assignee
Taiyuan University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taiyuan University of Technology filed Critical Taiyuan University of Technology
Priority to CN202310466281.9A priority Critical patent/CN116405205A/en
Publication of CN116405205A publication Critical patent/CN116405205A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0852Quantum cryptography
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Theoretical Computer Science (AREA)
  • Complex Calculations (AREA)

Abstract

The invention provides a method for generating a real-time entropy evaluation post-processing quantum random number. The quality of the random number determines the privacy and the safety of a communication system, side information is inevitably introduced in the quantum random number generation process due to quantum detection, the quantum noise entropy content of the system must be strictly estimated, and the random number is post-processed by using an extractor which is proved by a safety information theory. The invention provides a method for reconstructing the space distribution of quantum state phases in real time in a continuous variable quantum random number generation scheme and measuring the deviation between the space distribution and an ideal value, and updating entropy evaluation in real time when the deviation reaches a re-judgment threshold value, so that the scale of a post-processing matrix is adjusted in real time; the seeds for constructing the random extractor are updated in real time, and the information theory safety generalized hash post-processing of the multipath quantum random numbers is realized in parallel on the basis. The invention provides a random number real-time entropy evaluation post-processing scheme with intensive cost and strong expansibility, which can effectively improve the actual safety and practicability of a quantum random number generator.

Description

一种实时熵评估后处理量子随机数产生方法A method for generating quantum random numbers after real-time entropy evaluation

技术领域technical field

本发明属于加密技术领域,具体涉及一种实时熵评估后处理量子随机数产生方法。The invention belongs to the technical field of encryption, and in particular relates to a method for generating quantum random numbers after real-time entropy evaluation.

背景技术Background technique

随机码是加密技术的关键,从根本上决定着信息系统的安全。量子随机数发生器基于量子物理内禀不确定性,具有信息论可证的随机性,提供了最安全的随机数产生方案。过去的十多年,该领域的研究多聚焦于突破更高的产率门槛和通过更全面的统计测试套件。近期,信息安全领域越来越意识到随机数的研究重心应转向其熵源的严格评估。严格来说,量子随机数生成器的物理实现中的任何缺陷都可能泄漏与生成随机数相关的信息,即所谓的边信息。诸如经典或量子的关联性都可能被窃听者利用以猜测测量结果。在边信息存在的情况下,可以提取的最大随机量是由量子条件最小熵决定的。以往报道的连续变量量子随机数产生方案中熵评估一劳永逸,并没有连续监测系统动态特性和证明其安全性,而是应用同样适用于伪随机数的统计测试套件后验地对私密增强的输出结果进行测试,只有最小熵实时、可靠的先验评估才能保证其安全行和随机性。Random codes are the key to encryption technology and fundamentally determine the security of information systems. Quantum random number generators are based on the inherent uncertainty of quantum physics and have provable randomness from information theory, providing the safest random number generation scheme. In the past decade or so, research in this field has focused on breaking through higher yield thresholds and passing more comprehensive statistical test suites. Recently, the field of information security has increasingly realized that the research focus of random numbers should shift to the rigorous evaluation of their entropy sources. Strictly speaking, any flaw in the physical implementation of a quantum random number generator may leak information related to generating random numbers, so-called side information. Correlations such as classical or quantum could be exploited by an eavesdropper to guess the measurement. In the presence of side information, the maximum amount of randomness that can be extracted is determined by the quantum conditional minimum entropy. The entropy evaluation in the continuous variable quantum random number generation scheme reported in the past is done once and for all. Instead of continuously monitoring the dynamic characteristics of the system and proving its security, the statistical test suite that is also applicable to pseudo-random numbers is applied to the output results of privacy enhancement. For testing, only the minimum entropy real-time, reliable prior evaluation can guarantee its security and randomness.

在量子随机数产生方案中,基于真空态量子正交分量起伏不确定性测量提取随机数方案尤其具有实用化前景,其真空态不受到外界物理量的影响,并且不能被攻击者控制或关联。实际应用中,随着通信距离的不断加大与通信时间的不断加长,势必对量子随机数的产生速率以及实时安全性提出更高的要求,而一个不可忽视的问题是物理熵源在长时间工作时间下由于温度、噪声等可变因素影响下其熵可能会发生变化,影响量子随机数发生器在长时间工作条件下的高稳定性以及安全性。Among the quantum random number generation schemes, the random number extraction scheme based on the fluctuation uncertainty measurement of the quantum orthogonal components of the vacuum state is particularly promising for practical application. The vacuum state is not affected by external physical quantities and cannot be controlled or correlated by attackers. In practical applications, with the continuous increase of communication distance and communication time, higher requirements are bound to be placed on the generation rate of quantum random numbers and real-time security, and a problem that cannot be ignored is that the physical entropy source is During working hours, its entropy may change under the influence of variable factors such as temperature and noise, which affects the high stability and safety of the quantum random number generator under long-term working conditions.

发明内容Contents of the invention

本发明针对现有技术的问题,提供一种实时熵评估后处理量子随机数产生方法,具体包括以下步骤:Aiming at the problems of the prior art, the present invention provides a method for generating a quantum random number after real-time entropy evaluation, which specifically includes the following steps:

对原始真随机序列进行熵评估;重构真空态Wigner函数在相空间的分布,使用KLD相对熵度量实验真空态与理想真空态间的差距,实时掌握量子态纯度的变化,根据实验室安全环境得出的最小熵下界波动范围得到确切的阈值,实际运行时波动超出该阈值即认为受到第三方攻击或干扰,随即重新进行最小熵评估,得到实时的Toeplitz后处理矩阵规模;Perform entropy evaluation on the original true random sequence; reconstruct the distribution of the vacuum state Wigner function in the phase space, use the KLD relative entropy to measure the gap between the experimental vacuum state and the ideal vacuum state, and grasp the change of the quantum state purity in real time, according to the laboratory safety environment The obtained minimum entropy lower bound fluctuation range obtains the exact threshold value. If the actual runtime fluctuation exceeds this threshold value, it is considered to be attacked or interfered by a third party, and then the minimum entropy evaluation is re-evaluated to obtain the real-time Toeplitz post-processing matrix scale;

基于现场可编程逻辑门阵列的硬件条件和Toeplitz矩阵规模,设计矩阵大小可随着实时评估的量子熵动态改变的三级并行流水线算法,并且实时更新构建Toeplitz哈希矩阵的随机种子,对量子随机数进行信息论安全的实时广义哈希提取;Based on the hardware conditions of the field programmable logic gate array and the scale of the Toeplitz matrix, design a three-stage parallel pipeline algorithm whose matrix size can be dynamically changed with the real-time evaluated quantum entropy, and update the random seed for constructing the Toeplitz hash matrix in real time. Real-time generalized hash extraction for information-theoretic security;

基于现场可编程逻辑门阵列的并行计算优势,实现三个以上不同量子边带模式下的实时提取,多通道实时并行高速生成安全的量子随机数。Based on the advantages of parallel computing of Field Programmable Logic Gate Array, real-time extraction of more than three different quantum sideband modes is realized, and multi-channel real-time parallel high-speed generation of safe quantum random numbers.

进一步的,所述原始真随机序列的生成方法为:Further, the generation method of the original true random sequence is:

搭建光场真空态的平衡零拍探测系统,提取真空量子涨落作为生成真随机数的熵源,使本底光和真空场经50/50光学分束器发生干涉,经分束器输出光强基本相等的两束光信号后进行平衡零拍探测得到光电流信号,使平衡零拍探测得到的光电流信号与射频信号混频并经滤波器滤波后,经模数转换器进行模数转换得到原始真随机序列。Build a balanced zero-beat detection system for the vacuum state of the light field, extract the vacuum quantum fluctuation as the entropy source for generating true random numbers, make the background light and the vacuum field interfere with a 50/50 optical beam splitter, and output light through the beam splitter The two beams of light signals that are strong and basically equal are subjected to balanced zero-beat detection to obtain a photocurrent signal, and the photocurrent signal obtained by the balanced zero-beat detection is mixed with the radio frequency signal and filtered by a filter, and then converted to an analog-to-digital by an analog-to-digital converter Get the original true random sequence.

进一步的,所述对原始真随机序列进行熵评估时需要提前确定最优采样范围。Further, the optimal sampling range needs to be determined in advance when performing entropy evaluation on the original true random sequence.

进一步的,确定最优采样范围的方法为:Further, the method to determine the optimal sampling range is:

使用电压放大器不断调节交流电压增益,使用示波器采集各路放大后的输出,将采集的数据进行频数统计,当超出示波器采样范围的频数约等于中间最高帧的频数时,所采集的真随机序列中“0”和“1”的比例相近,为随机数最优采样范围。Use a voltage amplifier to continuously adjust the AC voltage gain, use an oscilloscope to collect the amplified outputs of each channel, and perform frequency statistics on the collected data. When the frequency beyond the sampling range of the oscilloscope is approximately equal to the frequency of the highest frame in the middle, in the collected true random sequence The proportion of "0" and "1" is similar, which is the optimal sampling range of random numbers.

进一步的,所述矩阵规模可变三级并行流水线算法包括:Further, the three-stage parallel pipeline algorithm with variable matrix scale includes:

第一级是子矩阵的构建,通过地址依次从BRAM中选取子种子构建随机子矩阵;The first level is the construction of the sub-matrix, and the sub-seeds are sequentially selected from the BRAM through the address to construct a random sub-matrix;

第二级是子矩阵的运算,将所构造的子矩阵与原始随机序列进行乘法运算,得到子矩阵乘法结果;The second stage is the operation of the sub-matrix, and the constructed sub-matrix is multiplied with the original random sequence to obtain the sub-matrix multiplication result;

第三级是子矩阵结果异或,将每个周期得到子矩阵乘法结果进行异或。The third stage is the XOR of the sub-matrix results, and performs XOR on the sub-matrix multiplication results obtained in each cycle.

进一步的,所述子矩阵的构建包括随机种子的存放和随机种子的选取两个模块。Further, the construction of the sub-matrix includes two modules: storage of random seeds and selection of random seeds.

进一步的,所述实时熵评估后的动态矩阵规模变换共包括以下三个步骤;Further, the dynamic matrix scale transformation after the real-time entropy evaluation includes the following three steps in total;

第一个步骤是建立祛除边信息的最小熵物理模型;计算平衡零拍探测系统的传递函数,对设备输出的功率谱进行校准;在ADC最优采样范围下,通过校准功率谱得到信号方差、条件信号方差和条件过量噪声方差;建立系统参数与安全参数之间的距离,即置信区间,严格校准最小熵下界。The first step is to establish a minimum entropy physical model that removes side information; calculate the transfer function of the balanced zero-beat detection system, and calibrate the power spectrum output by the device; under the optimal sampling range of the ADC, the signal variance, Conditional signal variance and conditional excess noise variance; establish the distance between system parameters and safety parameters, that is, confidence intervals, and strictly calibrate the minimum entropy lower bound.

第二个步骤是实时的熵评估反馈;检测最小熵下界的变化情况,并对量子攻击进行防备,重构真空态Wigner函数在相空间的分布,并用KLD相对熵度量实验真空态与理想真空态的差距,实时掌握量子态纯度的变化,结合最小熵下界波动范围得到实时的后处理矩阵规模;在得到实时的矩阵规模后,以四个并行后处理通道为例:上位机通过UART接口传输八位指令至可编辑门阵列,用以表示四个并行后处理通道的六十四个矩阵规模;The second step is real-time entropy evaluation feedback; detect the change of the minimum entropy lower bound, and prevent quantum attacks, reconstruct the distribution of the vacuum state Wigner function in the phase space, and use the KLD relative entropy to measure the experimental vacuum state and the ideal vacuum state The gap between quantum states can be grasped in real time, and the real-time post-processing matrix scale can be obtained by combining the minimum entropy lower bound fluctuation range; after obtaining the real-time matrix scale, take four parallel post-processing channels as an example: the host computer transmits eight Bit instructions to programmable gate arrays to represent sixty-four matrix sizes for four parallel post-processing channels;

第三个步骤是现场可编程逻辑门阵列内部后处理矩阵规模动态变换;首先构造选择电路,假设最大的矩阵规模为j×k,子矩阵的规模为j×q,可知共有k/q个不同的子矩阵乘法结果异或总周期数,同时也是不同矩阵规模内含有的子矩阵总数,在这里我们使用y来表示。在接收到指令后,译码解析得到相应通道的矩阵规模,在完成一次大矩阵乘法后依照相应的矩阵规模选择对应的子矩阵乘法结果异或总周期数实现实时熵评估后的动态矩阵规模变换。The third step is to dynamically change the size of the post-processing matrix inside the FPGA; first, construct the selection circuit, assuming that the largest matrix size is j×k, and the size of the sub-matrix is j×q, it can be seen that there are k/q different The sub-matrix multiplication result of XOR is the total number of cycles, which is also the total number of sub-matrices contained in different matrix sizes, here we use y to represent. After receiving the instruction, decode and analyze to obtain the matrix size of the corresponding channel. After completing a large matrix multiplication, select the corresponding sub-matrix multiplication result according to the corresponding matrix size, XOR the total number of cycles to realize the dynamic matrix size transformation after real-time entropy evaluation .

进一步的,所述采集光电子信号时,将现场可编程逻辑门阵列的处理时钟降低至模数转换器采样时钟的一半,使用缓冲器驱动全局时钟以及全局复位高扇出信号,在关键路径插入多级流水线寄存器减少逻辑延迟;对高扇出寄存器使用寄存器复制手段降低寄存器的扇出。Further, when collecting optoelectronic signals, the processing clock of the field programmable logic gate array is reduced to half of the sampling clock of the analog-to-digital converter, the buffer is used to drive the global clock and the global reset high fan-out signal is inserted into the critical path Stage pipeline registers reduce logic delay; use register replication method for high fan-out registers to reduce register fan-out.

进一步的,所述本底光为采用中心波长1550nmLD-TC40型半导体激光器输出的连续波激光;Further, the background light is a continuous wave laser output by a LD-TC40 semiconductor laser with a center wavelength of 1550nm;

所述射频信号为采用100kHz~4000MHz的HP8648A型信号发生器产生不同频带的信号;Described radio frequency signal is to adopt the HP8648A type signal generator of 100kHz~4000MHz to produce the signal of different frequency bands;

所述平衡零拍探测采用1.6GHz的PDB480C-AC型平衡探测器探测 The balanced zero beat detection adopts 1.6GHz PDB480C-AC type balanced detector to detect ;

所述滤波器为频率范围1MHz-2GHz的ZFM-11+型混频器以及频率为100MHz的BLP-100+型低通滤波器;Described filter is the ZFM-11+ type mixer of frequency range 1MHz-2GHz and the frequency is the BLP-100+ type low-pass filter of 100MHz;

所述现场可编程逻辑门阵列型号为Xilinx Kintex-7 XC7K325T;The field programmable logic gate array model is Xilinx Kintex-7 XC7K325T;

所述模数转换器型号为ADS42LB69。The analog-to-digital converter model is ADS42LB69.

本发明具有以下技术效果之一:The present invention has one of the following technical effects:

(1)本发明实现了随机动态选取真随机种子用于构建哈希后处理矩阵。将m个真随机种子移位后生成的n个子种子以及多个长度为a比特的真随机数分别存放至FPGA不同的片上块存储器中,a比特的真随机数随机表示0~2a-1;将2^a分为m等份,每完成一次矩阵乘法,通过随机数的大小选取对应的真随机种子构建新的Toeplitz哈希矩阵;每使用一次真随机数即将其抛弃,在原有的块存储器地址内写入新的a比特真随机数,消除使用的周期性。随机动态选取真随机种子用于构建哈希后处理矩阵可以提高随机数的安全性,消除掉在使用不变的真随机种子构建Toeplitz矩阵所引入的非随机因素。(1) The present invention realizes random dynamic selection of a true random seed for constructing a hash post-processing matrix. Store n sub-seeds generated by shifting m true random seeds and a number of true random numbers with a length of a bits in different on-chip block memories of the FPGA, and the true random numbers of a bits randomly represent 0~2 a -1 ; Divide 2^a into m equal parts, each time a matrix multiplication is completed, select the corresponding true random seed through the size of the random number to construct a new Toeplitz hash matrix; A new a-bit true random number is written in the memory address to eliminate the periodicity of use. Randomly dynamically selecting a true random seed to construct a hash post-processing matrix can improve the security of random numbers and eliminate the non-random factors introduced by using a constant true random seed to construct a Toeplitz matrix.

(2)本发明实现了真随机数生成过程中的实时熵值评估以及Toeplitz矩阵的实时动态改变。在真随机数高速生成的同时实时采集原始随机数据进行熵值评估,得到实时的提取比例并计算得到确切的Toeplitz哈希矩阵的规模;在现场可编程逻辑门阵列中编程预设了y种矩阵规模,上位机根据实时熵评估结果通过UART串口传输相应指令至现场可编程逻辑门阵列;现场可编程逻辑门阵列对指令进行译码解析,得到各个通道的矩阵规模,在完成一次大矩阵乘法后经选择电路选择其所对应的子矩阵乘法结果异或总周期数,实现Toeplitz哈希矩阵的动态变换。保证了实时高速生成随机数的同时也能有效的保证其安全性。(2) The present invention realizes real-time entropy evaluation and real-time dynamic change of Toeplitz matrix in the true random number generation process. While true random numbers are generated at high speed, raw random data is collected in real time for entropy evaluation, and the real-time extraction ratio is obtained and the exact size of the Toeplitz hash matrix is calculated; y types of matrices are preset in the field programmable logic gate array Scale, according to the real-time entropy evaluation results, the host computer transmits corresponding instructions to the FPGA through the UART serial port; the FPGA decodes and analyzes the instructions to obtain the matrix size of each channel, after completing a large matrix multiplication The selection circuit selects the corresponding sub-matrix multiplication result to XOR the total number of cycles to realize the dynamic transformation of the Toeplitz hash matrix. It ensures the real-time high-speed generation of random numbers and effectively guarantees its security.

(3)本发明设计优良的时序保证了量子随机数发生器在长时间工作条件下的高稳定性以及安全性,在12小时的长时间测试中,产生的随机数均通过NIST,Diehard以及TestU01测试。(3) The excellent timing sequence designed by the present invention ensures the high stability and safety of the quantum random number generator under long-term working conditions. During the 12-hour long-term test, the generated random numbers all passed NIST, Diehard and TestU01 test.

(4)本发明产生的高速随机序列充分利用逻辑运算硬件单元的并行计算优势,并行实现多路量子随机数的广义哈希后处理,实时高速地生成量子随机数,最终可达到11Gbts/s的生成速率。(4) The high-speed random sequence produced by the present invention makes full use of the parallel computing advantages of logic operation hardware units, realizes the generalized hash post-processing of multi-channel quantum random numbers in parallel, generates quantum random numbers in real time and at high speed, and finally can reach 11Gbts/s Generate rate.

附图说明Description of drawings

附图大体上通过举例而不是限制的方式示出各种实施例,并且与说明书以及权利要求书一起用于对所发明的实施例进行说明。在适当的时候,在所有附图中使用相同的附图标记指代同一或相似的部分。这样的实施例是例证性的,而并非旨在作为本装置或方法的穷尽或排他实施例。The drawings illustrate various embodiments, generally by way of example and not limitation, and together with the description and claims serve to describe embodiments of the invention. Where appropriate, the same reference numbers will be used throughout the drawings to refer to the same or like parts. Such embodiments are illustrative, and not intended to be exhaustive or exclusive embodiments of the apparatus or method.

图1为本发明的平衡零拍探测系统示意图;Fig. 1 is a schematic diagram of a balanced zero-beat detection system of the present invention;

图2为本发明中真空噪声的频谱图;Fig. 2 is the spectrogram of vacuum noise among the present invention;

图3为本发明信噪比示意图;Fig. 3 is a schematic diagram of the signal-to-noise ratio of the present invention;

图4为本发明后处理算法流程图;Fig. 4 is the post-processing algorithm flowchart of the present invention;

图中1、1550nmLD-TC40型半导体激光器;2、光衰减器;3、50/50分束器;4、低通滤波器;5、光电探测器;6、平衡零拍探测器;7、混频器;8、信号发生器;9、100M低通滤波器;10、示波器;11、模数转换器;12、现场可编程门阵列;13、UART串口;14、上位机。In the figure 1, 1550nmLD-TC40 semiconductor laser; 2, optical attenuator; 3, 50/50 beam splitter; 4, low-pass filter; 5, photoelectric detector; 6, balanced zero-beat detector; 7, hybrid 8. Signal generator; 9. 100M low-pass filter; 10. Oscilloscope; 11. Analog-to-digital converter; 12. Field programmable gate array; 13. UART serial port; 14. Host computer.

具体实施方式Detailed ways

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and embodiments.

本发明实施例提供一种实时熵评估后处理量子随机数产生方法,包括如下步骤:An embodiment of the present invention provides a method for generating a quantum random number after real-time entropy evaluation, including the following steps:

步骤1:搭建光场真空态的平衡零拍探测系统。光场真空态的平衡零拍探测系统如图1所示。采用中心波长1550nmLD-TC40型半导体激光器1不断输出连续波激光作为平衡零拍探测系统的本底光,经衰减器2后与真空光经50/50光学分束器3发生干涉产生光强基本相等的反射光以及透射光;反射光与透射光分别由一对高量子效率且性能对称的光电探测器5探测。两个探测器将探测到的光信号强度起伏转换为宽带的光电流信号起伏,光电流信号的差信号比例于真空场的正交分量起伏,且将其放大到了宏观水平。如图3所示,量子噪声与低频部分噪声的信噪比为10dB以上,可作为此类量子随机数发生器的量子熵源。本步骤中采用1.6GHz的PDB480C-AC型平衡探测器进行平衡零拍探测。Step 1: Build a balanced zero-beat detection system for the vacuum state of the light field. The balanced zero-beat detection system of the light field vacuum state is shown in Fig. 1 . The LD-TC40 semiconductor laser 1 with a central wavelength of 1550nm is used to continuously output continuous wave laser light as the background light of the balanced zero-beat detection system. After passing through the attenuator 2, it interferes with the vacuum light through the 50/50 optical beam splitter 3 to produce basically equal light intensity. The reflected light and the transmitted light; the reflected light and the transmitted light are respectively detected by a pair of photodetectors 5 with high quantum efficiency and symmetrical performance. The two detectors convert the detected optical signal intensity fluctuations into broadband photocurrent signal fluctuations, and the difference signal of the photocurrent signals is proportional to the orthogonal component fluctuation of the vacuum field, and amplifies it to the macroscopic level. As shown in Figure 3, the signal-to-noise ratio of quantum noise and low-frequency part noise is above 10dB, which can be used as the quantum entropy source of this type of quantum random number generator. In this step, a 1.6GHz PDB480C-AC balanced detector is used for balanced zero-beat detection.

步骤2:如图1所示,平衡零拍探测器6的光电流输出通过频率范围1MHz-2GHz的ZFM-11+型混频器7分别与射频信号8进行混频,然后通过频率为100MHz的BLP-100+型低通滤波器9进行滤波将带宽降至100M,以满足奈奎斯特二倍采样定律;而后由型号为ADS42LB69,最高采样率为250MS/S的模数转化器11进行采集。Step 2: As shown in Figure 1, the photocurrent output of the balanced zero-beat detector 6 is mixed with the RF signal 8 respectively through the ZFM-11+ type mixer 7 with a frequency range of 1MHz-2GHz, and then passed through a frequency range of 100MHz BLP-100+ type low-pass filter 9 performs filtering to reduce the bandwidth to 100M, so as to satisfy the Nyquist double sampling law; then it is collected by an analog-to-digital converter 11 with a model ADS42LB69 and a maximum sampling rate of 250MS/S .

步骤3:采集拍频信号建立祛除边信息的最小熵物理模型,ADC采集探测器带宽内各个频率处平衡零拍探测系统输出的拍频信号,使用平均周期图法重构功率谱,并对功率谱进行校准。在ADC最优采样范围下,通过校准后的功率谱得到信号方差、条件信号方差和条件过量噪声方差。建立系统参数与安全参数之间的距离,即置信区间,严格校准最小熵下界并得到最小熵的波动范围。Step 3: Collect the beat frequency signal to establish the minimum entropy physical model to remove side information. The ADC collects the beat frequency signal output by the balanced zero-beat detection system at each frequency within the detector bandwidth, uses the average periodogram method to reconstruct the power spectrum, and calculates the power The spectrum is calibrated. Under the optimal sampling range of the ADC, the signal variance, conditional signal variance and conditional excess noise variance are obtained through the calibrated power spectrum. Establish the distance between the system parameters and the security parameters, that is, the confidence interval, strictly calibrate the minimum entropy lower bound and obtain the fluctuation range of the minimum entropy.

步骤4:实时熵评估及反馈。采集原始随机序列,检测最小熵下界的变化情况,并对有可能的量子攻击进行防备,如遭遇热态攻击时,使用量子条件最小熵计算反而会增大其熵值,此时真空态Wigner函数在相空间分布会变宽变矮,使用KLD相对熵度量实验真空态与理想真空态的差距,通过实时掌握量子态纯度的变化,及时发现量子攻击。结合最小熵波动范围进行阈值判断,决定是否重新做量子条件最小熵评估,得到后处理的矩阵规模。Step 4: Real-time entropy evaluation and feedback. Collect the original random sequence, detect the change of the lower bound of the minimum entropy, and take precautions against possible quantum attacks. For example, when encountering a thermal attack, using the minimum entropy calculation of the quantum condition will increase its entropy value. At this time, the vacuum state Wigner function The distribution in the phase space will become wider and shorter, and the KLD relative entropy is used to measure the gap between the experimental vacuum state and the ideal vacuum state, and the quantum attack can be detected in time by grasping the change of the quantum state purity in real time. Combined with the minimum entropy fluctuation range for threshold judgment, decide whether to re-evaluate the minimum entropy of the quantum condition, and obtain the matrix size of the post-processing.

步骤4:基于现场可编程逻辑门阵列的并发特性,设计矩阵规模可变的三级并行流水线算法,实时更新随机种子构建Toeplitz哈希矩阵进行量子随机数的广义哈希提取。基于现场可编程门阵列的并发特性,将一个大矩阵运算拆分成多个规模合适的小矩阵运算。将一个周期的大矩阵运算分成多个周期的子矩阵运算,缓解了现场可编程逻辑门阵列12的资源压力和时序压力。矩阵规模可变模块包含指令译码模块和矩阵规模选择模块,指令译码模块依照所设计的指令集对上位机所传输的指令进行解析,得到对应的通道信息和矩阵规模信息。同时在此模块预存了y种可选的矩阵规模及其对应的y种不同的完整大矩阵运算所需的时钟周期数。通过解析得到的通道信息和矩阵规模信息改变最大运算时钟周期数以及子种子选取周期数实现矩阵规模的动态变换。三级并行流水线的第一级是子矩阵的构建。如图3所示,模数转换器输出的数字信号通过LVDS差分总线传输至现场可编辑门阵列。选择m个用于构建Toeplitz矩阵的真随机种子,编写C程序对其进行移位生成共n个子种子并写入文本文件,将文本文件存入现场可编辑门阵列的片上块随机存储器,同时在片上块随机存储器再存入多个a比特真随机数,随机表示0~2a-1,将2^a分为m等份,每完成一次矩阵乘法,便选取一个a比特真随机数,通过随机数的大小随机选取随机种子构建新的Toeplitz哈希矩阵,同时写入新的真随机数覆盖原有的真随机数。三级并行流水线的第二级是子矩阵的乘法。使用与门代替乘法器实现单比特间的乘法;使用异或门实现加法。通过与门以及异或门的组合可完成一次矩阵的“乘加”运算。三级并行流水线的第三级是子矩阵运算结果相加模块。在子矩阵运算的第一个周期使用寄存器对子矩阵运算结果进行缓存,之后每一个周期都将寄存器的当前值与子矩阵运算结果进行异或。经多个周期异或运算得到输出结果。在本步骤中,为缓解现场可编辑门阵列的资源消耗以及优化时序,使用以下几种手段:1)采用双口异步FIFO对模数转换器输出至现场可编辑门阵列的数字信号进行缓存,将现场可编辑门阵列的处理时钟降低至ADC采样时钟的一半,使每个时钟参与计算的原始随机序列为原来的两倍,缓解时序压力。2)对过长的组合逻辑插入流水线寄存器减少组合逻辑的级数;对高扇出的寄存器使用寄存器复制的方法降低扇出,提高驱动能力;在关键路径插入多级流水线寄存器减少逻辑延迟。3)使用缓冲器驱动全局时钟以及全局复位等高扇出信号,降低扇出,提高驱动能力并优化时序。Step 4: Based on the concurrency characteristics of field programmable logic gate arrays, design a three-stage parallel pipeline algorithm with variable matrix size, and update random seeds in real time to construct Toeplitz hash matrix for generalized hash extraction of quantum random numbers. Based on the concurrency characteristics of the field programmable gate array, a large matrix operation is split into multiple small matrix operations of appropriate size. Dividing a large matrix operation of one cycle into sub-matrix operations of multiple cycles relieves the resource pressure and timing pressure of the field programmable logic gate array 12 . The variable matrix size module includes an instruction decoding module and a matrix size selection module. The instruction decoding module analyzes the instructions transmitted by the host computer according to the designed instruction set, and obtains the corresponding channel information and matrix size information. At the same time, the module pre-stores y optional matrix sizes and the corresponding clock cycles required for y different complete large matrix operations. By changing the channel information and matrix scale information obtained through analysis, the maximum number of operating clock cycles and the number of sub-seed selection cycles are changed to realize the dynamic transformation of the matrix scale. The first stage of the three-stage parallel pipeline is the construction of the submatrix. As shown in Figure 3, the digital signal output by the analog-to-digital converter is transmitted to the field programmable gate array through the LVDS differential bus. Select m true random seeds used to construct the Toeplitz matrix, write a C program to shift them to generate a total of n sub-seeds and write them into a text file, and store the text file in the on-chip block random access memory of the field editable gate array, and at the same time The on-chip block random access memory then stores multiple a-bit true random numbers, randomly representing 0 to 2 a -1, divides 2^a into m equal parts, and selects an a-bit true random number every time a matrix multiplication is completed, and passes The size of the random number randomly selects a random seed to construct a new Toeplitz hash matrix, and at the same time writes a new true random number to cover the original true random number. The second stage of the three-stage parallel pipeline is the multiplication of sub-matrixes. Use an AND gate instead of a multiplier to realize multiplication between single bits; use an exclusive OR gate to realize addition. Through the combination of AND gate and XOR gate, a matrix "multiply-add" operation can be completed. The third stage of the three-stage parallel pipeline is a sub-matrix operation result addition module. In the first cycle of the sub-matrix operation, the register is used to cache the result of the sub-matrix operation, and then the current value of the register is XORed with the result of the sub-matrix operation in each cycle. The output result is obtained after multiple cycles of XOR operation. In this step, in order to alleviate the resource consumption of the field programmable gate array and optimize the timing, the following methods are used: 1) the digital signal output from the analog-to-digital converter to the field programmable gate array is buffered by using a dual-port asynchronous FIFO, The processing clock of the field programmable gate array is reduced to half of the sampling clock of the ADC, so that the original random sequence involved in the calculation of each clock is twice the original, and the timing pressure is relieved. 2) Insert pipeline registers for overly long combinatorial logic to reduce the number of stages of combinatorial logic; use register replication for high fan-out registers to reduce fan-out and improve drive capability; insert multi-stage pipeline registers in critical paths to reduce logic delays. 3) Use buffers to drive high fan-out signals such as global clocks and global resets to reduce fan-out, improve drive capability and optimize timing.

步骤5:基于步骤3所设计矩阵规模可变的三级并行流水线算法,硬件实现实时熵评估以及Toeplitz哈希矩阵规模的动态变化。共包括三个步骤。第一个步骤是实时的熵评估。定时重复步骤3,采集原始的随机序列,检测最小熵下界,重构真空态Wigner函数在相空间的分布,使用KLD相对熵度量实验真空态与理想真空态的差距,通过实时掌握量子态纯度的变化,结合最小熵波动范围得到后处理的矩阵规模。第二个模块是串口指令发送模块。本发明设计了一个简单的指令集。每次指令大小与串口位宽的大小相等,为x-bit。对x-bit指令的高z位编码为独热码,表示此次指令对z个通道的哪个通道有效;对x-bit指令的剩余位进行二进制编码,表示y种不同的矩阵规模。在得到实时的矩阵规模后上位机14通过UART串口13将指令发送至现场可编辑门阵列12;第三个步骤是矩阵动态改变模块,步骤4中设计了矩阵规模可变的三级并行流水线算法,现场可编辑门阵列在接收到上位机所发送的指令之后对其进行解析,得到通道信息和矩阵规模信息,在完成当前的大矩阵运算之后以此改变最大运算时钟周期数以及子种子选取周期数,实现后处理矩阵规模的动态变化。Step 5: Based on the three-stage parallel pipeline algorithm with variable matrix size designed in step 3, the hardware realizes real-time entropy evaluation and dynamic change of Toeplitz hash matrix size. There are three steps involved. The first step is real-time entropy evaluation. Repeat step 3 regularly, collect the original random sequence, detect the minimum entropy lower bound, reconstruct the distribution of the vacuum state Wigner function in the phase space, use the KLD relative entropy to measure the gap between the experimental vacuum state and the ideal vacuum state, and grasp the quantum state purity in real time. Variation, combined with the minimum entropy fluctuation range to obtain the postprocessing matrix size. The second module is the serial port instruction sending module. The present invention designs a simple instruction set. The size of each command is equal to the bit width of the serial port, which is x-bit. Encode the high z bit of the x-bit command as a one-hot code, indicating which channel of the z channels the command is valid for; binary code the remaining bits of the x-bit command, indicating y different matrix sizes. After obtaining the real-time matrix scale, the upper computer 14 sends instructions to the field programmable gate array 12 through the UART serial port 13; the third step is the matrix dynamic change module, and a three-stage parallel pipeline algorithm with variable matrix scale is designed in step 4 , the field editable gate array parses the instruction sent by the host computer after receiving it, obtains channel information and matrix scale information, and changes the maximum operation clock cycle number and sub-seed selection cycle after completing the current large matrix operation Number, realize the dynamic change of post-processing matrix scale.

本发明通过计算经典噪声引入的熵值大小,从原始数据的总熵值扣除经典噪声熵,计算原始数据所包含的纯量子熵的大小,以此作为数据后处理中真随机数提取的参数,使后续进行随机数提取时,随机数的提取比例也最高。在现场可编辑门阵列中存储多个随机种子以及可不断更新的真随机数,实现了构建Toeplitz的真随机种子的随机选取,消除了种子不变所引入的非随机因素。通过对现场可编辑门阵列逻辑资源的统筹规划来建立了矩阵规模可变的三级并行流水线后处理算法,经实时的熵值评估后确定实时的Toeplitz哈希矩阵规模,实现了量子随机数的实时安全高速产生。The present invention calculates the entropy value introduced by the classical noise, deducts the classical noise entropy from the total entropy value of the original data, and calculates the size of the pure quantum entropy contained in the original data, which is used as the parameter for extracting the true random number in the post-processing of the data. Therefore, when the random number is extracted subsequently, the extraction ratio of the random number is also the highest. Multiple random seeds and continuously updated true random numbers are stored in the Field Editable Gate Array, which realizes the random selection of true random seeds for constructing Toeplitz, and eliminates the non-random factors introduced by invariant seeds. Through the overall planning of field programmable gate array logic resources, a three-stage parallel pipeline post-processing algorithm with variable matrix scale is established. After real-time entropy evaluation, the real-time Toeplitz hash matrix scale is determined, and the quantum random number is realized. Real-time safe high-speed generation.

以上所述,仅为本发明优选的具体实施方式,但本发明的保护范围不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,根据本发明的技术方案及其发明构思加以等同替换或改变,都应涵盖在本发明的保护范围之内。The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto, any person familiar with the technical field within the technical scope disclosed in the present invention, according to the technical solution of the present invention and its Any equivalent replacement or change of the inventive concept shall fall within the protection scope of the present invention.

Claims (9)

1. The method for generating the real-time entropy evaluation post-processing quantum random number is characterized by comprising the following steps of:
entropy evaluation is carried out on the original true random sequence; reconstructing the distribution of the vacuum state Wigner function in the phase space, using the difference between the KLD relative entropy measurement experiment vacuum state and the ideal vacuum state, grasping the change of the quantum state purity, giving a threshold value according to the minimum entropy fluctuation range in the laboratory safety environment, considering that the fluctuation exceeds the threshold value in the actual operation, and then carrying out the operation of minimum entropy reevaluation and post-processing matrix adjustment; obtaining a real-time Toeplitz post-processing matrix scale;
based on hardware conditions of a field programmable gate array and Toeplitz matrix scale, designing a three-level parallel pipeline algorithm with the size of the matrix dynamically changing along with quantum entropy estimated in real time, updating and constructing random seeds of a Toeplitz hash matrix in real time, and carrying out information-theory safe real-time generalized hash extraction on quantum random numbers;
based on the parallel computing advantage of the field programmable gate array, real-time extraction under more than three different quantum sideband modes is realized, and the safe quantum random numbers are generated in real time and at high speed by multiple channels.
2. The method according to claim 1, wherein the generating method of the original true random sequence is:
a balanced homodyne detection system of a light field vacuum state is built, vacuum quantum fluctuation is extracted to serve as an entropy source for generating a true random number, background light and a vacuum field are made to interfere through a 50/50 optical beam splitter, two light signals with basically equal light intensity are output through the beam splitter, balanced homodyne detection is carried out to obtain a photocurrent signal, the photocurrent signal obtained through balanced homodyne detection is mixed with a radio frequency signal and filtered through a filter, and then analog-digital conversion is carried out through an analog-digital converter to obtain an original true random sequence.
3. The method of claim 1, wherein the entropy evaluation of the original true random sequence requires a prior determination of an optimal sampling range.
4. A method according to claim 3, characterized in that the method of determining the optimal sampling range is:
the gain of the alternating voltage is continuously regulated by using a voltage amplifier, the output of each amplified path is collected by using an oscilloscope, the frequency count is carried out on the collected data, and when the frequency exceeding the sampling range of the oscilloscope is approximately equal to the frequency of the highest frame in the middle, the proportion of 0 and 1 in the collected true random sequence is similar, so that the random number optimal sampling range is obtained.
5. The method of claim 1, wherein the matrix-scale variable three-stage parallel pipeline algorithm comprises:
the first stage is the construction of a submatrix, wherein a random submatrix is constructed by sequentially selecting submatrices from BRAM through addresses, namely an on-chip block memory of the FPGA;
the second stage is the operation of the submatrix, and the constructed submatrix and the original random sequence are subjected to multiplication operation to obtain a submatrix multiplication result;
the third stage is the exclusive or of the submatrix result, and the submatrix multiplication result obtained in each period is exclusive or.
6. The method of claim 6, wherein the construction of the submatrices comprises two modules of random seed storage and random seed selection.
7. The method of claim 1, wherein the real-time entropy-estimated dynamic matrix scale transformation includes the following three steps;
the first step is to build a minimum entropy physical model for removing side information; calculating a transfer function of the balanced homodyne detection system, and calibrating a power spectrum output by equipment; under the optimal sampling range of the analog-to-digital converter, the signal variance, the conditional signal variance and the conditional excessive noise variance are obtained through calibrating the power spectrum; establishing a distance between a system parameter and a safety parameter, namely a confidence interval, and strictly calibrating a minimum entropy lower bound;
the second step is real-time entropy assessment feedback; detecting the change condition of the minimum entropy lower bound, preparing quantum attack, reconstructing the distribution of a vacuum state Wigner function in a phase space, measuring the difference between the experimental vacuum state and the ideal vacuum state by using KLD relative entropy, grasping the change of the quantum state purity in real time, and obtaining the real-time post-processing matrix scale by combining the fluctuation range of the minimum entropy lower bound; after obtaining the real-time matrix size, take four parallel post-processing channels as an example: the upper computer transmits eight-bit instructions to the editable gate array through the UART interface to represent sixty-four matrix scales of four parallel post-processing channels;
the third step is the post-processing matrix scale dynamic transformation inside the field programmable gate array; firstly, a selection circuit is constructed, after an instruction is received, the matrix scale of a corresponding channel is obtained through decoding and analysis, and after one large matrix multiplication is completed, the corresponding submatrix multiplication result or the total period number is selected according to the corresponding matrix scale, so that the dynamic matrix scale transformation after the real-time entropy evaluation is realized.
8. The method of claim 1, wherein the processing clock of the field programmable gate array is reduced to half of the sampling clock of the analog-to-digital converter when the optoelectronic signal is collected, the buffer is used to drive the global clock and the global reset high fan-out signal, and a multistage pipeline register is inserted in the critical path to reduce logic delay; register replication is used on high fan-out registers to reduce the fan-out of the registers.
9. The method of claim 2, wherein,
the background light is continuous wave laser output by adopting a semiconductor laser with a central wavelength of 1550nm LD-TC 40;
the radio frequency signals are signals with different frequency bands generated by adopting an HP8648A type signal generator with the frequency of 100 kHz-4000 MHz;
the balanced homodyne detection adopts a PDB480C-AC type balanced detector of 1.6GHz to detect
The filter is a ZFM-11+ type mixer with the frequency range of 1MHz-2GHz and a BLP-100+ type low-pass filter with the frequency of 100 MHz;
the field programmable gate array model is Xilinx Kintex-7 XC7K325T;
the model number of the analog-digital converter is ADS42LB69.
CN202310466281.9A 2023-04-26 2023-04-26 A method for generating quantum random numbers after real-time entropy evaluation Pending CN116405205A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310466281.9A CN116405205A (en) 2023-04-26 2023-04-26 A method for generating quantum random numbers after real-time entropy evaluation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310466281.9A CN116405205A (en) 2023-04-26 2023-04-26 A method for generating quantum random numbers after real-time entropy evaluation

Publications (1)

Publication Number Publication Date
CN116405205A true CN116405205A (en) 2023-07-07

Family

ID=87017932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310466281.9A Pending CN116405205A (en) 2023-04-26 2023-04-26 A method for generating quantum random numbers after real-time entropy evaluation

Country Status (1)

Country Link
CN (1) CN116405205A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117151237A (en) * 2023-08-11 2023-12-01 正则量子(北京)技术有限公司 Quantum random number generation method and device based on diode electron tunneling effect
CN118466902A (en) * 2024-07-10 2024-08-09 北京中科国光量子科技有限公司 An ultra-micro ripple-resistant quantum random number chip
CN119628829A (en) * 2024-11-19 2025-03-14 北京智芯微电子科技有限公司 Optical heterodyne entropy source for generating true random numbers, manufacturing method, chip and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117151237A (en) * 2023-08-11 2023-12-01 正则量子(北京)技术有限公司 Quantum random number generation method and device based on diode electron tunneling effect
CN117151237B (en) * 2023-08-11 2024-03-22 正则量子(北京)技术有限公司 Quantum random number generation method and device based on diode electron tunneling effect
CN118466902A (en) * 2024-07-10 2024-08-09 北京中科国光量子科技有限公司 An ultra-micro ripple-resistant quantum random number chip
CN119628829A (en) * 2024-11-19 2025-03-14 北京智芯微电子科技有限公司 Optical heterodyne entropy source for generating true random numbers, manufacturing method, chip and system

Similar Documents

Publication Publication Date Title
CN116405205A (en) A method for generating quantum random numbers after real-time entropy evaluation
Zheng et al. 6 Gbps real-time optical quantum random number generator based on vacuum fluctuation
Guo et al. Truly random number generation based on measurement of phase noise of a laser
US11080021B2 (en) Amplifying, generating, or certifying randomness
EP3329359B1 (en) Quantum random number generators
CN113037463A (en) Method for generating quantum random code at high speed in real time based on chaos amplification quantum noise
Fang et al. Noise and chaos contributions in fast random bit sequence generated from broadband optoelectronic entropy sources
CN108776582B (en) Quantum tunneling effect-based true random number sequence generation method
CN103399726B (en) Streamlined combined-type pseudo-random number generator
Stanco et al. Efficient random number generation techniques for CMOS single-photon avalanche diode array exploiting fast time tagging units
Durt et al. Fast quantum-optical random-number generators
Zhang et al. FPGA implementation of Toeplitz hashing extractor for real time post-processing of raw random numbers
Veljković et al. Low-cost implementations of on-the-fly tests for random number generators
CN108037907B (en) A Quantum Random Number Generation Method Based on Vacuum Parallelism
CN109783059B (en) Quantum random number generation method and device
Gehring et al. Ultra-fast real-time quantum random number generator with correlated measurement outcomes and rigorous security certification
Allini et al. Evaluation and monitoring of free running oscillators serving as source of randomness
Pandey et al. A comparative study and analysis of quantum random number generator with true random number generator
Guo et al. Parallel and real-time post-processing for quantum random number generators
Sajal et al. True random number generation using dark noise modulation of a single-photon avalanche diode
CN113961979A (en) Relay protection safety chip password service module and Hash algorithm unit thereof
Chouhan et al. FPGA-based Toeplitz Strong Extractor for Quantum Random Number Generators
Márton et al. Enhancing the operational efficiency of quantum random number generators
Qiao et al. White Gaussian Noise Generation With a Vacuum State Quantum Entropy Source Chip
Zhao et al. 40Gbps Tri-type Quantum Random Number Generator

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination