A quantum key distribution device security detection method and system
Patent Information
- Application Number
- CN202611524468.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]现有安全检测方式缺少一条能够在不对测试信号执行直接投影测量或重新制备的条件下,形成可控的辅助系统间接测量作用,并将辅助系统读出数据、施加辅助耦合时的接收端通信响应与无辅助耦合时的基准通信响应进行对应处理的检测链路,因而难以在同一测试条件下确定间接测量获得逻辑比特信息的能力及其引起的设备安全风险
本发明根据待测协议中各逻辑比特对应的量子态集合及条件概率构建逻辑比特统计态,并依据不同逻辑比特统计态之间的差异确定判别基,使正交信号模式的映射方向与待测协议的逻辑比特统计差异相对应;待测协议的编码态集合或条件概率发生变化时,可以重新构建逻辑比特统计态并更新判别基,因而能够在同一处理框架内适配不同的协议参数。
Smart Images

Figure CN123020058A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a security detection method and system for quantum key distribution devices. Background Technology
[0002] Quantum key distribution devices utilize the indistinguishability of quantum states and measurement perturbations for key negotiation. Practical devices typically determine their operating status using parameters such as qubit error rate, detection gain, device insertion loss, or probe response. When conducting security detection against indirect measurement effects that may affect the device, the auxiliary system can carry information related to logic bits through weak interactions with the test signal. The perturbations generated in this process have continuously adjustable characteristics, unlike intercept-and-retransmit tests that involve direct projection measurement and reconstructing the test signal.
[0003] Existing security testing methods lack a detection link that can form a controllable auxiliary system for indirect measurement without performing direct projection measurement or re-preparation of the test signal, and can process the data read out by the auxiliary system and the communication response of the receiver when auxiliary coupling is applied to correspond with the reference communication response when there is no auxiliary coupling. Therefore, it is difficult to determine the ability of indirect measurement to obtain logical bit information and the resulting equipment security risks under the same test conditions. Summary of the Invention
[0004] This invention provides a security detection method and system for quantum key distribution devices, which can reconstruct the logical bit statistical state and update the discrimination basis, thus enabling it to adapt to different protocol parameters within the same processing framework.
[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: Firstly, a security detection method for a quantum key distribution device includes: The parameters of the protocol under test are obtained, a baseline sequence without auxiliary coupling and a detection sequence with auxiliary coupling are generated, and the response characteristic data of the baseline QKD system are collected. Construct corresponding logical bit statistical states based on the set of quantum states and conditional probabilities of each logical bit, and determine the discriminant basis based on the differences between the logical bit statistical states; The test signal in the detection sequence is coherently mapped under the discriminant basis into at least two mutually orthogonal signal modes that maintain relative phase. The signal pattern is made to have a pattern-controlled weak interaction with the auxiliary system, forming a conditional auxiliary state associated with the signal pattern; a preset observable of the auxiliary system is measured to obtain auxiliary readout data for characterizing the distinguishability of the conditional auxiliary state; The signal mode after weak interaction is subjected to inverse coherent mode transformation, phase compensation and time delay matching to obtain the coincidence test signal and output it to the receiving test end of the sub-key distribution device under test. The signal coincidence does not perform path selection, projection measurement or re-preparation based on the auxiliary readout data. The system collects and receives the QKD system response feature data of the detection sequence from the test end. Based on the test sequence identifier and time window, the auxiliary readout data, the QKD system response feature data, and the benchmark QKD system response feature data are associated to form joint test data. Based on joint test data and parameter estimation rules that match the protocol under test, at least one security indicator is determined from among the following: potential information leakage index, equivalent qubit error rate introduced by indirect measurement of auxiliary system, upper bound of single-photon phase error, lower bound of key rate, and security risk level.
[0006] Secondly, a security detection system for a quantum key distribution device includes a test signal generation module, a discriminant basis mapping module, an auxiliary coupling module, an auxiliary readout module, a signal coincidence output module, a communication response acquisition module, and a security index calculation module. The test signal generation module generates a reference sequence and a detection sequence and acquires the response characteristic data of the reference QKD system; the discriminant basis mapping module constructs the logical bit statistical state, determines the discriminant basis, and coherently maps the test signal in the detection sequence into orthogonal signal modes; the auxiliary coupling module enables the orthogonal signal modes to have controlled weak interactions with the auxiliary system; and the auxiliary readout module measures the preset observables of the auxiliary system and obtains auxiliary readout data to characterize the distinguishability of the conditional auxiliary states. The signal overlap output module performs inverse coherent mode transformation, phase compensation, and delay matching on the orthogonal signal modes after weak interaction, and outputs the overlap test signal to the sub-key distribution device under test. It does not perform path selection, projection measurement, or re-preparation based on the auxiliary readout data. The communication response acquisition module is used to acquire and detect the response characteristic data of the QKD system. The security index calculation module is used to correlate the auxiliary readout data, the response characteristic data of the QKD system, and the baseline QKD system response characteristic data, and determine the potential information leakage index and security risk level.
[0007] The above-described solution of the present invention has at least the following beneficial effects: This invention constructs logical bit statistical states based on the set of quantum states and conditional probabilities corresponding to each logical bit in the protocol under test, and determines the discrimination basis based on the differences between different logical bit statistical states, so that the mapping direction of orthogonal signal modes corresponds to the logical bit statistical differences of the protocol under test; when the set of encoded states or conditional probabilities of the protocol under test changes, the logical bit statistical states can be reconstructed and the discrimination basis updated, thus enabling the adaptation of different protocol parameters within the same processing framework.
[0008] This invention coherently maps the test signals in the detection sequence into orthogonal signal modes that maintain relative phase, enabling each signal mode to have a mode-controlled weak interaction with the auxiliary system. Then, through inverse coherent mode transformation, phase compensation, and time delay matching, a coincident test signal is formed. The signal coincidence does not rely on path selection, projection measurement, or re-preparation based on the auxiliary readout data. Therefore, it can form an indirect measurement and detection condition that is different from the intercept-retransmission test, and retain the correspondence between the auxiliary system information acquisition and the receiver disturbance.
[0009] This invention sets up a reference sequence without auxiliary coupling and a detection sequence with auxiliary coupling. It associates the auxiliary readout data, the detection QKD system response characteristic data, and the reference QKD system response characteristic data according to the test sequence identifier and time window. Then, it determines the potential information leakage index and security risk level according to the parameter estimation rules matched with the protocol under test. Since the same joint test data simultaneously includes the auxiliary system readout, the detection sequence response, and the reference sequence response, it can reduce the information loss when judging based on a single qubit bit error rate or a single device parameter, and make the detection results correspond to specific test sequences and test times. Attached Figure Description
[0010] Figure 1 This is a schematic block diagram of the overall structure of a quantum key distribution device security detection system provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating a security detection method for a quantum key distribution device according to an embodiment of the present invention. Figure 3 This is a schematic diagram illustrating the process of jointly processing auxiliary readout data, QKD system response feature data, and benchmark data, and calculating security indicators according to an embodiment of the present invention. Figure 4 This is a schematic block diagram of the hardware structure of a security detection control device for performing the security detection method according to an embodiment of the present invention.
[0011] Explanation of reference numerals in the attached figures: 100. Quantum key distribution device security detection system; 110. Test signal generation module; 120. Discriminant basis mapping module; 130. Auxiliary coupling module; 140. Auxiliary readout module; 150. Signal overlap output module; 160. Communication response acquisition module; 170. Security index calculation module; 171. Data alignment and preprocessing unit; 172. Auxiliary information index estimation unit; 173. Communication response difference calculation unit; 174. Protocol parameter estimation unit; 175. Joint security index calculation unit.
[0012] 200. Subkey distribution device to be measured.
[0013] 300. Safety detection and control device; 310. Processor; 320. Memory; 321. Computer program; 322. Protocol and test configuration data; 323. Test data; 330. Communication interface; 340. Equipment control and data acquisition interface; 350. Internal bus. Detailed Implementation
[0014] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0015] This embodiment provides a security detection method for quantum key distribution devices, referring to... Figures 1 to 4 As shown, the method specifically includes the following steps.
[0016] To facilitate the implementation of the technical solution of this invention, the following description uses a test link authorized by the equipment owner or operator as the application environment. The test signal, auxiliary system and receiving test terminal are all configured or accessed by the tester. The obtained data is used to evaluate the security risks of the sub-key distribution device under specified protocol, specified coupling parameters and specified statistical conditions, and is not used to recover the keys of the actual communicating parties. The terms "first" and "second" in the text are only used to distinguish similar objects and do not indicate order or importance. "Multiple" means two or more, including open-ended statements.
[0017] like Figures 1 to 4 As shown, this embodiment employs a quantum key distribution device security detection system 100. The quantum key distribution device security detection system 100 includes a test signal generation module 110, a discriminant basis mapping module 120, an auxiliary coupling module 130, an auxiliary readout module 140, a signal overlap output module 150, a communication response acquisition module 160, and a security index calculation module 170. Each module can be implemented by independent optical devices, electronic acquisition units, control software, or combinations thereof. Optical signals are transmitted through optical path connections, and control parameters, timestamps, calibration status, and statistical data are transmitted through wired or wireless data connections.
[0018] The parameters of the protocol under test include at least the protocol type, logical bit set, coded state set, conditional probability of each coded state under the corresponding logical bit, prior probability of the logical bit, coding basis, light intensity category, pulse timing, receiver filtering rules, and security parameter estimation rules. Before starting the test, the tester writes the above parameters into the protocol and test configuration data and assigns a version number to the configuration so that each subsequent auxiliary readout record, communication response record, and security test result can be traced back to the same parameter version.
[0019] The test signal generation module 110 establishes a joint record for each test signal. The joint record has at least the test sequence identifier, pulse number, timestamp, logic bits, encoding base, light intensity category, coupling state, and parameter group number. The test sequence identifier is used to distinguish between the reference sequence, detection sequence, and calibration sequence. The coupling state is used to indicate whether auxiliary coupling is not applied, auxiliary coupling is applied, or the current coupling state is invalid. The parameter group number is used to associate the coupling strength, interaction time, auxiliary input state, readout setting, and signal coincidence setting.
[0020] The reference sequence and the detection sequence use the same test signal source, transmission channel, receiving test terminal, and protocol post-processing rules. The difference between the two is that the reference sequence does not allow the test signal to have effective mode controlled weak interaction with the auxiliary system, while the detection sequence allows the test signal to have the configured effective weak interaction with the auxiliary system. This setting makes the difference in communication response between the two types of sequences mainly correspond to changes in the auxiliary coupling state, thereby providing a reference for identifying the additional effects caused by indirect measurement of the auxiliary system.
[0021] In an interleaved execution mode, the safety detection and control device sends test signals cyclically in the order of reference sub-sequence, detection sub-sequence, reference sub-sequence, and detection sub-sequence, and makes adjacent sub-sequences use the same protocol parameters and receiving window; the safety detection and control device saves the start time, end time, environmental monitoring status, and calibration status of each sub-sequence respectively. When the time interval between adjacent sub-sequences exceeds the preset allowable value or the environmental status changes beyond the limit, the pair of reference sub-sequences and detection sub-sequences will not be directly combined into a control sample.
[0022] Before formal testing, the quantum key distribution device security testing system 100 performs optical path calibration, clock calibration, and auxiliary readout calibration. Optical path calibration is used to confirm the relative amplitude, relative phase, insertion loss, polarization state, spatial mode, and time delay of each orthogonal signal mode. Clock calibration is used to unify the test signal generation time, auxiliary readout sampling window, and receiver test detection window. Auxiliary readout calibration is used to determine the zero point, gain, noise range, saturation range, and discretization threshold. If any type of calibration fails to meet the registered tolerance, the security testing control device will mark the corresponding parameter group as unusable for security index calculation.
[0023] The quantum key distribution device security testing system 100 is set between the test signal generation module 110 and the sub-key distribution device under test 200, or at a designated test port of the sub-key distribution device under test 200. The test signal generation module 110 provides a test signal with a protocol tag to the discriminant basis mapping module 120. The discriminant basis mapping module 120 maps the test signal to mutually orthogonal signal modes and then sends it to the auxiliary coupling module 130. The auxiliary readout module 140 obtains auxiliary readout data from the auxiliary coupling module 130. The signal overlap output module 150 overlaps the interacting signal modes and outputs them to the receiving test end of the sub-key distribution device under test 200. The communication response acquisition module 160 acquires the QKD system response characteristic data of the sub-key distribution device under test 200. The security index calculation module 170 outputs the security test result based on the auxiliary readout data, the QKD system response characteristic data and the corresponding benchmark data.
[0024] The test signal generation module 110 is used to generate or receive test signals according to the protocol under test, and establish an independent test record for each signal. The test record includes at least a sequence number, timestamp, logical bits, encoding base, light intensity category, pulse timing, and test status identifier. The test status identifier is used to distinguish between a reference sequence without auxiliary coupling, a detection sequence with auxiliary coupling, and a reference sequence for calibration. In the case where the input signal is provided by the subkey distribution device 200 under test, the test signal generation module 110 does not change the protocol label, but only introduces the signal into the discriminant base mapping module 120 in a controlled manner at the authorized test interface.
[0025] The discriminant base mapping module 120 includes a protocol parameter receiving unit, a statistical state construction unit, a difference operator solving unit, and a coherent mode transformation unit. The statistical state construction unit constructs logical bit statistical states according to the occurrence probability of each coded state under each logical bit. The difference operator solving unit determines the discriminant subspace based on the differences of the statistical states. The coherent mode transformation unit maps the components in the discriminant subspace to at least two mutually orthogonal signal modes. The mapping process maintains the relative phase and time relationship between different modes, does not directly read the mode tag, and does not intercept, project, or re-prepare the test signal.
[0026] The auxiliary coupling module 130 includes at least one auxiliary system and a controlled weak interaction structure corresponding to the signal mode; the auxiliary system may be an optical probe, an intracavity mode, an atom or spin ensemble, a continuous variable auxiliary field, or other system capable of forming mode-related conditional auxiliary states; the auxiliary readout module 140 measures the preset observables of the auxiliary system, and the measurement results may be continuous values, discrete symbols, time arrival events, or statistics obtained from multiple repeated measurements; the auxiliary coupling module 130 and the auxiliary readout module 140 shall record coupling parameters, interaction timing, auxiliary input states, readout settings, and calibration information so as to correspond the readout results with specific detection sequences.
[0027] The signal re-combining output module 150 includes at least one of an inverse coherent mode conversion unit, a phase compensation unit, a time delay matching unit, and an output interface; the signal re-combining output module 150 re-combines each signal mode into a signal format that can be received by the subkey distribution device 200 under test according to the inverse transformation matched with the discriminant basis mapping module 120; the signal is not re-prepared based on the auxiliary readout result during the re-combining process; the communication response acquisition module 160 acquires detection events, screening results, gain, error gain, quantum bit error rate, and other response quantities specified by the protocol through the device control and data acquisition interface, and associates each response quantity with the sequence number and test status identifier of the test record.
[0028] Before formal testing, the quantum key distribution device security testing system 100 performs optical path, clock, and readout channel calibrations. Optical path calibration includes power or count response, relative phase, insertion loss, polarization or mode matching state, and delay for each signal mode. Clock calibration includes the time reference for test signal generation, auxiliary readout, and receiving test ends. Readout channel calibration includes the zero point, gain, noise variance, threshold, and saturation range of the auxiliary probe. The calibration sequence is not used for security indicator statistics or is treated as a separate calibration dataset in statistical processing.
[0029] In step S101, the security detection and control device reads the parameters of the protocol under test and completes the field check. The field check includes whether the protocol type exists, whether each logical bit has a corresponding set of quantum states, whether the conditional probabilities of each quantum state are normalizable, whether the coding basis and light intensity category have receiver processing rules, whether the reference sequence and detection sequence have a clear coupling state, and whether the security risk level has a pre-registered determination rule. After the field check is passed, the security detection and control device generates a configuration version number and a test batch number.
[0030] In step S102, the test signal generation module 110 generates or receives a controlled test signal according to the checked protocol parameters, organizes the reference sequence and detection sequence according to the test batch number, and first obtains the reference QKD system response characteristic data. The reference QKD system response characteristic data includes at least transmission events, valid detection events, screening results and error events. If the receiving test end also outputs gain, error gain or quantum bit error rate, the communication response acquisition module 160 simultaneously records the original count and the device output value for subsequent verification of the calculation caliber.
[0031] In step S103, the discriminant basis mapping module 120 establishes a logical bit statistical state for each logical bit. Specifically, it reads each quantum state corresponding to the logical bit, multiplies the density operator corresponding to each quantum state with its conditional probability to obtain the weighted density operator of the quantum state, and then sums the weighted density operators under the same logical bit to obtain a logical bit statistical state that can represent the overall statistical characteristics of the logical bit. When the sum of the conditional probabilities deviates from the allowable range, the module stops the calculation and requests a correction of the protocol configuration.
[0032] When logical bits have the same prior probability, the discrimination basis mapping module 120 subtracts the second logical bit statistical state from the first logical bit statistical state to obtain a statistical state difference object. When logical bits have different prior probabilities, the module first multiplies each logical bit statistical state by its corresponding prior probability to obtain a first weighted statistical state and a second weighted statistical state. Then, the second weighted statistical state is subtracted from the first weighted statistical state to obtain a weighted statistical state difference object. This avoids treating non-equal probability protocols as equal probability conditions.
[0033] The discriminant basis mapping module 120 performs feature subspace decomposition on the statistically different objects, assigning the feature vectors corresponding to positive feature values to the first discriminant subspace and the feature vectors corresponding to negative feature values to the second discriminant subspace. If there are zero feature values, the module merges the corresponding feature vectors into the first or second discriminant subspace according to the allocation rules registered before the test, or retains them as an independent supplementary subspace. Then, it normalizes the obtained vectors one by one and performs orthogonality checks to obtain the discriminant basis.
[0034] When performing feature subspace decomposition, the module first checks whether the dimension of the statistical state difference object is consistent with the dimension of the space where the protocol coding state is located. Then, it uses Hermitian matrix eigenvalue decomposition to obtain real eigenvalues and mutually orthogonal eigenvectors. If the numerical calculation produces an imaginary part with an amplitude smaller than the preset numerical tolerance, the imaginary part is treated as a numerical error. If the imaginary part exceeds the numerical tolerance or the eigenvectors cannot be orthogonally normalized, the current discrimination basis calculation is marked as a failure, and the transformation parameters are not sent to the coherent mode transformation unit.
[0035] In step S104, the discrimination basis mapping module 120 sets a coherent mode transformation according to the discrimination basis, and routes the components of the test signal in each discrimination basis direction to mutually orthogonal signal modes, while retaining the relative amplitude and relative phase of each component. The signal mode can be a spatial path mode, time mode, frequency mode or orbital angular momentum mode, as long as the corresponding device can perform a coherent forward transformation and a matched inverse transformation, and does not read the mode tag that can indicate the logic bits during the mapping process.
[0036] Taking two spatial path modes as an example, the coherent mode conversion unit first converts the test signal to the polarization direction corresponding to the discriminant, and then uses a polarization beam splitter to guide the first discriminant component to spatial path A and the second discriminant component to spatial path B. Neither path A nor path B is equipped with a photon detector for determining the path label. The two paths are respectively equipped with polarization shaping, phase compensation and adjustable time delay devices, so that the two paths entering the auxiliary coupling module 130 have registered working polarization and synchronization relationship.
[0037] For the BB84 polarization coding protocol that selects the coding basis and logic bits with equal probability, logic bit 0 can be represented by an equal probability mixture of horizontal polarization state and positive diagonal polarization state, and logic bit 1 can be represented by an equal probability mixture of vertical polarization state and negative diagonal polarization state. The discriminant basis mapping module 120 obtains two orthogonal discriminant directions rotated 22.5 degrees relative to the horizontal polarization direction according to the aforementioned weighting, accumulation, subtraction and feature subspace decomposition steps. This set of directions serves as the specific discriminant basis under the configuration of this protocol.
[0038] In the above polarization encoding example, the module sets the fast axis of the half-wave plate to 11.25 degrees relative to the horizontal polarization direction, converting the first discrimination direction to the horizontal polarization direction and the second discrimination direction to the vertical polarization direction. The polarization beam splitter then outputs the data to spatial path A and spatial path B respectively. The half-wave plate angle, the extinction ratio of the polarization beam splitter, and the reflection phase are calibrated using four known polarization reference states. If the angle error or the extinction ratio does not meet the tolerance, the system does not use this batch of mapping data.
[0039] The aforementioned 22.5-degree discrimination direction and 11.25-degree half-wave plate settings only correspond to the equal prior, ideal polarization coding BB84 configuration. When the logical bit prior probability, coding state set, or actual state preparation model changes, the discrimination basis mapping module re-executes the statistical state construction and feature subspace decomposition, and converts the newly obtained discrimination direction into the corresponding optical device control quantity. Since the transformation parameters are calculated from the protocol statistical state, the system does not need to apply a fixed angle to different protocols.
[0040] The detection method of this embodiment includes the following steps: Step S101, the security detection control device 300 configures the logical bit set, encoding base set, prior probability, light intensity category, pulse timing, number of test repetitions, auxiliary coupling parameter group and statistical confidence requirements according to the protocol under test, and determines the alternation mode of the reference sequence and the detection sequence; the configuration also includes the sampling rate of the auxiliary readout, the readout window, the thresholding rule and the acquisition field of the QKD system response feature data.
[0041] In step S102, the test signal generation module 110 generates or receives test signals with protocol tags and acquires reference data without applying auxiliary coupling. The reference sequence and the detection sequence use the same signal source, channel, receiving test terminal settings and protocol post-processing rules. When it is necessary to reduce the impact of time drift or environmental changes, the reference sequence and the detection sequence are repeatedly executed according to a preset interleaving period, instead of completing all reference sequences first and then completing all detection sequences.
[0042] In step S105, the auxiliary coupling module 130 enables each signal mode to undergo a mode-controlled weak interaction with the auxiliary system with adjustable parameters; the security detection and control device 300 records the coupling strength, interaction time, auxiliary input energy or equivalent input state, mode loss, phase compensation amount, and readout settings for each parameter group; when different modes use different parameters, the parameters of mode A and mode B are recorded separately, and a single average value cannot be used as a substitute; the interaction should avoid auxiliary probe saturation or direct blocking of signal modes within the test range, and the specific working range is jointly determined by the calibration sequence and the input range allowed by the sub-key distribution device under test.
[0043] In step S106, the auxiliary readout module 140 measures the auxiliary system within a preset readout window and associates the readout results with the test record; the signal overlap output module 150 simultaneously or subsequently performs inverse coherent transformation, phase compensation, and time delay matching on each signal mode and outputs the overlap signal to the sub-key distribution device 200 to be measured; the auxiliary readout can be completed before signal overlap or after the auxiliary system and the signal have interacted, depending on whether the auxiliary system needs to maintain coherence to reach the readout unit; regardless of the timing, the signal overlap process does not re-prepare the test signal based on the measured auxiliary results.
[0044] In step S107, the communication response acquisition module 160 acquires the responses of the sub-key distribution device 200 to the detection sequence and the reference sequence, and aligns them according to the sequence number, logical bits, encoding base, light intensity category, coupling parameter group and time window; after alignment, the total number of transmissions N, the number of detection or screening events M, the number of error events R and the number of auxiliary readout samples are counted respectively; when there are invalid events, timeout events or calibration events, they are processed according to the preset rejection rules, and the rejection quantity and rules are retained in the output report.
[0045] In step S108, the security index calculation module 170 performs joint processing on the auxiliary readout data, the detection sequence communication response, and the reference sequence communication response, and outputs at least one security index. The security index may include the information leakage index of the auxiliary readout, the equivalent quantum bit error rate introduced by the indirect measurement of the auxiliary system, the upper bound of the single-photon phase error required for protocol security proof, the lower bound of the key rate, or the security risk level determined according to preset rules. For different protocols, light source models, or finite statistical conditions, the parameter estimation and confidence interval methods that match the protocol are used, and the fixed formula of a certain embodiment is not generalized to a general conclusion.
[0046] The coherent mode conversion unit can be implemented by a beam splitter, polarization device, spatial mode converter, time delay unit, frequency mode converter or a combination thereof; the conversion matrix is calibrated by a known reference state before testing, at least confirming that the relative phase, amplitude ratio and time delay between modes meet the set error range; if the calibration result exceeds the range, the parameter group is marked as invalid and not directly used for safety index calculation; for the signal after mode mapping, the system only retains the coherent superposition between modes and does not record the mode label that can directly indicate the logic bits.
[0047] The quantum key distribution device security detection system 100 establishes a joint data record for each test pulse. The joint data record includes at least the test sequence number, timestamp, protocol tag, coupling state, parameter group number, auxiliary readout value, receiver detection event, screening result, and error identifier. The data alignment and preprocessing unit 171 of the security index calculation module 170 first performs counting, anomaly removal, and confidence interval estimation on the reference data and detection data respectively, and then compares them according to the same protocol tag and light intensity category to avoid directly mixing the reference data and detection data and masking the changes caused by auxiliary coupling.
[0048] The safety index calculation module 170 can also scan step by step according to coupling strength, interaction time, auxiliary input energy or readout threshold, and form parameter curves for each level of auxiliary readout distinguishability, coherence index, communication response change and statistical confidence interval; the risk level is determined by the protocol under test, equipment acceptance requirements or threshold rules pre-registered by the tester; when different protocols use different safety thresholds, the system retains the original index and threshold versions, so that the same test results can be verified; the risk level is used to characterize the safety risk under the specified test model, parameter range and statistical confidence conditions, and is not a conclusion of absolute equipment safety.
[0049] In the above general implementation, the auxiliary coupling module 130 can be replaced by different physical platforms, as long as the platform can form mode-related conditional auxiliary states without performing direct projection measurements or re-preparation of the test signal, and the coupling parameters and readout results can be recorded and calibrated; the orthogonal mode of the discriminant basis mapping module 120 is not limited to a spatial path, and the signal coincidence output module 150 provides the corresponding inverse transform according to the selected mode; subsequent implementations provide specific examples of polarization coding, Sagnac-assisted cross-Kerr coupling, and weak coherent pulse decoy state parameter estimation; these specific implementations are used to illustrate the possible implementations of the present invention and do not limit the scope of protection of the general technology chain.
[0050] In a cavity-enhanced optical-matter interaction structure, different orthogonal signal modes can be coupled to different cavity ports, polarization degenerate cavity modes, or time-selective cavity modes, and the cavity probe field, cavity-coupled atoms, or atomic ensemble are used as auxiliary systems. In the far-detuned dispersion operating region, the occupancy of the signal mode causes small conditional changes in the cavity transmission phase, cavity reflection phase, resonant frequency shift, or collective spin component of the auxiliary system. The auxiliary readout module 140 measures the auxiliary quantities, and the signal continues to be transmitted from the cavity output and enters the inverse coherent mode conversion. During implementation, the cavity detuning, linewidth, effective coupling rate, coherence, probe power, additional scattering, absorption, intermode crosstalk, and cavity-introduced time delay and loss are recorded and calibrated. When spontaneous scattering or absorption directly destroys the signal, the corresponding parameter range is not used as the weak interaction test range.
[0051] For controlled optical modulation or integrated optical transduction candidate structures, they are only considered as coherent controlled coupling structures if they contain nonlinear transduction, cavity coupling, or other quantum coherent control mechanisms, and if the signal mode occupancy can be conditionally altered through quantum input and output models. Ordinary electro-optic or acousto-optic modulators that are driven only by pre-configuration and whose modulation effect is independent of the mode occupancy of the test signal cannot independently form mode-dependent conditional auxiliary states and are not considered as physical realizations of the mode-controlled weak interactions. If such modulators are used to simulate the target reduced channel in authorized tests, they are marked as equivalent quantum channel simulation data and recorded and reported separately from the indirect measurement data of the actual auxiliary system.
[0052] The aforementioned alternative structure shares the same input, processing, and output constraints as the cross-Kerr structure: the input consists of orthogonal signal modes that retain relative phase and an auxiliary system in a known initial state; the processing generates a mode-dependent conditional auxiliary state that can be continuously adjusted by the coupling parameters; and the output includes test signals that continue to be transmitted without direct projection measurement or re-preparation, as well as calibrable auxiliary readout data. Different physical platforms employ their own validated input and output models, loss models, and readout statistics, and the Kerr Hamiltonian, coherent state overlap formula, or approximation relationship of the corresponding implementation described above cannot be directly applied to other platforms.
[0053] After the path mapping is completed, paths A and B, as mutually orthogonal signal modes, respectively engage in mode-controlled weak interactions with the corresponding auxiliary systems in the auxiliary coupling module 130. During the test, the paths are not selected, discarded, or re-prepared based on the auxiliary readout results. The auxiliary readout module 140 only measures the preset observables of the auxiliary system. Therefore, the optical path provided to the auxiliary coupling module 130 is a path superposition that retains the relative phase, rather than two independent copies of the measured signals.
[0054] In this embodiment, mapping calibration is performed using four known polarization states before formal testing to estimate at least the HWP angle error, PBS extinction ratio, relative time delay, relative amplitude, phase drift, and coincidence interference visibility of path A and path B. If any parameter exceeds the tolerance range registered by the tester in the security detection control device 300, the corresponding sequence is marked as calibration failure or invalid data, and the sequence is not directly used for statistics of information leakage index, equivalent bit error rate, or key rate lower bound.
[0055] It should be noted that the Breidbart basis and HWP angle in the above specific embodiments are specific implementation parameters under the standard polarization coding BB84 and equal prior logic bit statistical states; for bias basis, non-uniform prior, non-ideal state preparation or other coding degrees of freedom, the quantum key distribution device security detection system 100 can still use the technology chain of statistical state construction, difference operator solution and orthogonal mode mapping, but the discriminant state, optical transformation matrix and calibration parameters should be re-determined by the corresponding test configuration; this embodiment does not limit other protocols and physical platforms to 22.5° or 11.25°.
[0056] In step S105, the auxiliary coupling module 130 causes spatial path A and spatial path B to have mode-controlled weak interactions with one or more auxiliary systems, respectively. The auxiliary systems are in a known or calibrated initial state before the interaction. When spatial path A is occupied, the first auxiliary system generates a first condition change, and when spatial path B is occupied, the second auxiliary system generates a second condition change. The two condition changes should be distinguishable by auxiliary readout, but the test signal is not directly detected or re-prepared at the interaction location.
[0057] The safety detection and control device records the coupling strength, interaction time, auxiliary input state, mode loss, phase compensation amount, and calibration state for each orthogonal signal mode, without using an average coupling parameter to mask the differences between the two paths. If the coupling strengths of the two paths are inconsistent, the safety index calculation module retains the corresponding asymmetric condition auxiliary state and readout distribution. If the auxiliary readout of a certain path is saturated, the mode loss exceeds the limit, or the phase locking fails, the corresponding parameter group is marked as invalid.
[0058] In a cross-Kerr nonlinear coupling structure, spatial paths A and B satisfy polarization matching, spatial coincidence, and temporal coincidence with auxiliary probe light A and auxiliary probe light B, respectively, in a nonlinear medium, causing the photon number of the signal mode to conditionally change the phase of the corresponding probe. The module determines the actual coupling amount by combining the effective nonlinear response of the medium, the effective interaction time, and the residual response of the reference channel, and measures the phase drift of the probe itself by a signal-free reference sequence.
[0059] The cross-Kerr coupling quantity is determined using a textual process. First, the effective coupling rate of the nonlinear medium under the current operating band, polarization, and mode area is obtained. Then, the overlap duration of the signal pulse and probe pulse within the effective action region is obtained. The effective coupling rate is multiplied by the overlap duration to obtain the co-directional interaction quantity. Subsequently, the residual interaction quantity of the reference probe component is obtained. The residual interaction quantity is subtracted from the co-directional interaction quantity to obtain the effective differential coupling quantity used for this test recording.
[0060] In the dual Sagnac structure, each auxiliary probe is split into two propagation directions by the probe loop polarization beamsplitter. One propagation direction propagates in the same direction as the corresponding signal path and forms the effective probe component, while the other propagation direction serves as the reference probe component. The two components interfere after returning to the polarization beamsplitter. The polarization and phase devices in the loop convert the conditional phase change of the effective probe component relative to the reference probe component into a readable intensity difference or orthogonal component change.
[0061] If the reference probe component still has a non-negligible residual interaction with the signal, the safety detection and control device obtains the co-directional interaction and the reference interaction by calibrating sequences that only enable the co-directional coincidence condition and retain only the reference propagation condition, respectively, and then determines the effective differential coupling amount by the difference between the two. If the two propagation directions obtain the same conditional phase shift, the readout end can only obtain the common mode change, and the system marks the parameter group as not having the effective differential readout condition.
[0062] Cross-Kerr media may simultaneously introduce self-phase modulation, additional cross-phase modulation, absorption, Raman noise, finite response time, spectral entanglement, group velocity mismatch, and multimode effects. Therefore, the security detection and control device simultaneously records the probe input energy, action length, readout noise, additional loss, path asymmetry, and receiver bit error rate changes. When increasing the probe energy increases the readout amplitude but causes detector saturation or excessive signal loss, the system does not recognize this parameter as a valid weak interaction result.
[0063] The auxiliary coupling module 130 can also employ a cavity-enhanced optical-matter interaction structure to couple different orthogonal signal modes to different cavity ports, polarization cavity modes, or time-selective cavity modes, and use the cavity probe field, cavity-coupled atoms, or atomic ensemble as an auxiliary system; the occupancy of the signal mode causes conditional changes in the cavity transmission phase, cavity reflection phase, resonant frequency shift, or collective spin component, and the auxiliary readout module 140 measures the conditional changes, and the signal continues to enter the inverse coherent mode transformation from the cavity output.
[0064] When using a cavity enhancement structure, the system records cavity detuning, linewidth, effective coupling rate, probe power, additional scattering, absorption, intermode crosstalk, and cavity-introduced delay and loss. The cavity response without effective signal-assisted coupling is measured using a reference sequence. When spontaneous scattering or absorption directly destroys the signal, the safety detection and control device excludes the corresponding parameters from the weak interaction test range. Because this boundary treatment limits the intensity of the test effect, it avoids mistaking the destructive device response for indirect measurement effects.
[0065] When using quantum nondestructive detection structures, atomic spin or spin ensemble coupling structures, far-detuned dispersion coupling can be used to generate conditional rotations with different signs or amplitudes on the polarization or collective spin components of the auxiliary probe by different signal modes. The system records the detuning amount, optical depth, effective coupling coefficient, auxiliary initial state, relaxation time, magnetic field noise, additional scattering and readout efficiency, and then correlates the auxiliary conditional rotations with the communication response of the receiver through the same data correlation method.
[0066] In step S106, the auxiliary readout module 140 measures the preset observables of the auxiliary state under the registered readout window. The readout results can be continuous voltage, light intensity difference, in-phase component, quadrature component, discrete symbol, or statistics after multiple repeated measurements. Each readout result, along with the sampling time, channel number, gain level, zero-point calibration value, and saturation flag, is written into a joint record. If the sampling time cannot fall within the valid window of the corresponding test pulse, the readout result is marked as unmatched.
[0067] During dual-channel auxiliary readout, the module obtains the first readout value and the second readout value respectively, and then subtracts the second readout value from the first readout value to obtain the differential readout statistics. The noise of differential readout is not directly assumed to be the sum of the two noises. The module first calculates the product of the deviations of the two readouts relative to their respective means, and then averages the product of the deviations of the same calibration batch to obtain the covariance of the two noises. Then, the sum of the variance of the first channel and the variance of the second channel is subtracted by twice the covariance to obtain the differential readout variance.
[0068] Continuous auxiliary readouts can be saved completely or converted into discrete results according to the thresholds registered before the test. During thresholding, records with readout values less than the first threshold are assigned to the first result, records with readout values greater than the second threshold are assigned to the second result, and records between the two thresholds are assigned to uncertain results. When the thresholds are equal, records equal to the thresholds are processed according to preset boundary assignment rules. The system saves both the original continuous values and the threshold versions to prevent repeated threshold adjustments after the test and only reports the optimal result.
[0069] The signal overlap output module 150 performs inverse coherent mode transformation on spatial paths A and B after weak interaction. First, it compensates for the deterministic phase of the two paths according to the calibration record, then adjusts the variable delay to make the effective time envelopes of the two pulses overlap, and then adjusts the polarization and spatial mode to make the two path components enter the same output mode. The inverse transformation uses the device sequence and parameters that match the forward transformation, and the output format is adapted to the receiving test end of the subkey distribution device under test.
[0070] During signal overlap, the module records the relative phase, amplitude ratio, insertion loss, time delay difference, polarization extinction ratio, and interference visibility. When any parameter exceeds the tolerance, the corresponding sequence is marked as overlap failure. The module does not read auxiliary readout data to select a spatial path, does not discard a signal based on the readout result, and does not re-prepare a new test signal based on the auxiliary readout result. Therefore, the mode-related information retained by the auxiliary system can still be included in subsequent statistics along with the receiver disturbance.
[0071] The Kerr effective probe component and reference component in each Sagnac loop interfere after returning to the probe loop PBS; the HWP and phase compensator in the loop are used to set the operating point in the no-signal reference state and convert the effective differential conditional phase shift between the two propagation directions into a readable intensity difference or orthogonal component change; if the two propagation directions obtain exactly the same conditional phase shift, the phase shift is a common mode and cannot be used as the Sagnac differential readout in this embodiment; the Sagnac structure can be used to suppress some of the shared phase drift, but it cannot be assumed that technical noise, polarization drift and non-reciprocal phase have completely disappeared; the corresponding remaining quantity needs to be measured by the reference probe sequence and written into test data 323.
[0072] The formulas of the above-described corresponding implementations are based on an effective Kerr model with single photon, single spatiotemporal mode, approximate number conservation, and weak coupling. For phase-randomized weakly coherent pulses, the multi-photon component causes the probe conditional phase to change with the number of path photons, and the reduced signal state and decoy state observations should be calculated separately according to the above-described corresponding implementation examples. For media with significant absorption, non-instantaneous response, or multimode noise, the ideal unitary expression should be replaced by actual measured subchannels, process matrices, or verified input and output models. The dual Sagnac structure, coherent state probe, and balanced zero-difference readout in this embodiment are all optional specific implementations, and the use of other non-destructive auxiliary coupling structures that can form mode-correlated conditional auxiliary states and calibrate readouts is not excluded.
[0073] This embodiment focuses on a polarization-coded BB84 subkey key distribution device employing phase-randomized weak coherent pulses and vacuum-added weak decoy states. It explains how to incorporate the assisted coupling detection sequence and the unassisted coupling reference sequence into photon number decomposition, single-photon parameter estimation, and key rate lower bound calculation, respectively. This embodiment employs constraints such as asymptotic data, phase randomization, basis independence, symmetric random sampling, and dual-detector threshold detection with identical detection efficiency for both paths. For finite keys, basis-dependent sources, strength tag leakage, or other protocols, appropriate parameter estimation and security proof methods should be used, and the formulas in this embodiment cannot be directly applied.
[0074] In step S107, the communication response acquisition module 160 obtains the detection events, filtering results and error identifiers output by the receiving test end, and matches them with the auxiliary readout data according to the test sequence identifier, pulse number and time window. When there are multiple detection events for the same pulse, they are processed according to the double-click processing, time priority or event merging rules pre-defined by the protocol under test. If no corresponding rules are specified, the pulse is listed as an abnormal record and no event that is conducive to reducing the bit error rate is temporarily selected.
[0075] Data alignment first uses pulse sequence numbers under a unified clock for the first matching, then performs a second check by checking whether the received event timestamp is within the valid detection window of the pulse, and then performs a consistency check by parameter group number and coupling state. A valid joint record is generated when all three conditions are met. An invalid joint record is generated when there is a lack of auxiliary readout, a lack of received response, inconsistent parameter groups, or inconsistent time windows. The system counts the number of valid records and invalid records of each type.
[0076] For each test parameter group, the communication response acquisition module 160 counts the total number of transmission events, the number of valid detection events, and the number of error events. The number of valid detection events is divided by the total number of transmission events to obtain the gain, and the number of error events is divided by the total number of transmission events to obtain the error gain. When the number of valid detection events is greater than zero, the number of error events is divided by the number of valid detection events to obtain the bit error rate of the qubit. When the number of valid detection events is equal to zero, the last division is not performed, and the bit error rate is marked as incalculable.
[0077] The total number of emission events, the number of valid detection events, and the number of erroneous events for the reference sequence and the detection sequence are counted separately, without mixing the two types of data. The system first performs anomaly removal and confidence interval estimation for each type of data, and then establishes a comparison according to the same protocol label, light intensity category, and adjacent time period to obtain the gain change, error gain change, and quantum bit error rate change. Since this comparison maintains the consistency of data categories and processing rules, it can reduce the impact of drift or sample size differences on the judgment of security risks.
[0078] In step S108, the security index calculation module 170 determines the potential information leakage index based on the effective joint records. In the case of discrete assisted reading, the module first counts the number of joint occurrences according to the logical bits and the reading results, and then divides each number of joint occurrences by the total number of effective joint records to obtain the joint frequency of the logical bits and the reading results. Subsequently, the joint frequencies are summed according to the logical bits and the reading results to obtain two edge frequencies. The joint frequencies are then weighted and accumulated according to the degree of deviation of the joint frequencies from the product of the two edge frequencies to obtain the mutual information index.
[0079] When the detection target is the original key after screening, the security index calculation module 170 adds fields for encoding base, screening status, effective detection status and publicly disclosed protocol information to the joint record. First, the data is divided into subsets with the same public conditions according to these conditions. Then, the joint frequency, edge frequency and deviation degree are calculated repeatedly in each subset. Finally, the data is weighted and summarized according to the proportion of each subset in the effective record to obtain the conditional mutual information index. The empty subset does not participate in division and logarithmic operations, and its weight is recorded as zero.
[0080] In the case of continuous assisted readout, the module can divide the continuous readout into multiple intervals using pre-registered interval division rules, and then calculate the information index based on the discrete results; alternatively, it can use calibrated parameter distribution fitting or density estimation to obtain the readout distribution under different logic bits. During calculation, the interval width, kernel width, fitting model version, and effective sample number are retained. If the sample number is insufficient to meet the preset estimation conditions, a sample insufficient mark is output instead of a definite information leakage value.
[0081] When the selected security model needs to evaluate auxiliary systems that are not directly measured, the module determines the upper bound of information based on the conditional auxiliary states corresponding to each logical bit. The processing order is as follows: weight each conditional auxiliary state according to the prior probability of the logical bit, accumulate to obtain the average auxiliary state, determine the von Neumann entropy of the average auxiliary state and each conditional auxiliary state respectively, and then subtract the prior weighted sum of the entropies of each conditional auxiliary state from the entropy of the average auxiliary state to obtain the upper bound or reference quantity of the available information; the source of the conditional auxiliary state and the model premise are written into the detection report at the same time.
[0082] The equivalent qubit error rate caused by indirect measurement by the auxiliary system is not directly taken as the difference between the bit error rate of the detection sequence and the bit error rate of the reference sequence. The security index calculation module 170 first selects a channel model or a reference fitting relationship that matches the protocol under test, uses the reference sequence to determine the device's own noise and channel response, and then substitutes the additional coherence attenuation, gain change and error gain change in the detection sequence into the model to obtain the corresponding equivalent bit error parameters. If the model's applicability conditions are not met, only the observed response change is reported.
[0083] In the single-photon, two-way symmetric weakly coupled, and mode-accurately coincident computation example, the module characterizes the signal coherence retention degree by the degree of overlap between the two conditional auxiliary states. First, a difference is determined by subtracting the degree of overlap, and then the difference is divided by four to obtain the equivalent qubit error rate under the limited model. This textual calculation is only applicable to the single-photon and symmetric conditions. When there are multi-photon components, basis-dependent losses, or mode asymmetry in reality, the system uses the corresponding security model.
[0084] For phase-randomized weak coherent pulses, the test signal generation module 110 establishes light intensity categories according to vacuum state, weak decoy state and signal state, and sets a reference sequence and detection sequence for each light intensity category; the safety index calculation module 170 calculates the gain and error gain according to the light intensity category and the encoding basis, so that the same photon number component is described by the same set of conditional response parameters under the condition that no intensity tag leakage occurs.
[0085] The lower bound of single-photon yield is determined using a textual process. First, the weak decoy state gain is multiplied by the natural exponent of the weak decoy intensity to obtain the first gain term. Then, the signal state gain is multiplied by the natural exponent of the signal intensity and the ratio of the square of the weak decoy intensity to the square of the signal intensity to obtain the second gain term. Subsequently, the vacuum yield is multiplied by the ratio of the difference between the square of the signal intensity and the square of the weak decoy intensity to the square of the signal intensity to obtain the vacuum correction term. The second gain term and the vacuum correction term are subtracted sequentially from the first gain term, and then multiplied by the reciprocal of the product of the signal intensity and the difference between the signal intensity and the weak decoy intensity. The result is compared with zero, and the larger one is taken to obtain the lower bound of single-photon yield.
[0086] Before calculating the lower bound of single-photon yield, the module checks that the weak decoy strength is greater than zero, the signal strength is greater than the weak decoy strength, and both units are consistent. If the signal strength is equal to the weak decoy strength, the denominator of the above division is zero, and the system marks the parameter configuration as invalid. The reference sequence uses the signal state gain, weak decoy state gain, and vacuum yield of this sequence, and the detection sequence uses the corresponding data of this sequence. Input quantities are not spliced across sequences.
[0087] The original upper bound of the single-photon bit error rate is determined using a textual approach. First, the error gain of the weak decoy state is multiplied by the natural exponent of the weak decoy strength to obtain the first error term. Then, half of the vacuum yield is subtracted from the first error term to obtain the vacuum-corrected error term. The weak decoy strength is multiplied by the lower bound of the single-photon yield to obtain the bit error normalization factor. The vacuum-corrected error term is divided by the bit error normalization factor. Finally, the result is restricted to the range of zero to one to obtain the original upper bound of the single-photon bit error rate.
[0088] When the lower bound of the single-photon yield is zero, the system does not perform division with the bit error normalization as the denominator and marks the current parameter group as unsuitable for authenticating the positive key rate. Only when logical bit re-marking or protocol symmetry has been specified before the test, limiting the effective binary bit error rate used for key rate calculation to the range of zero to 1 / 2, will the original upper bound be compared with 1 / 2 and the smaller one be taken as the effective upper bound. If this condition is not met, the original upper bound will be retained.
[0089] When the conditions of basis independence, symmetric random sampling, and conjugate basis estimation specified in the protocol are met, the system uses the upper bound of the effective bit error rate of the conjugate basis single photon as the upper bound of the phase bit error rate of the key-based single photon. If the test records show that the auxiliary coupling changes with the coding basis, the two basis losses are different, the polarization correlation detection efficiency is inconsistent, or the source has a basis-dependent defect, then this correspondence is not used. Instead, the parameter estimation method suitable for the defect model is selected and each coding basis is estimated separately.
[0090] The lower bound of the key rate is determined using a textualized process. First, the basis matching probability is determined according to the key generation basis rules. Then, the signal state gain, signal state bit error rate, and error correction redundancy factor are input into the binary entropy processing to obtain the error correction leakage term. Subsequently, the signal strength, the natural exponent of the negative signal strength, the lower bound of the single-photon yield, and the difference between the binary entropy corresponding to the single-photon phase error upper bound are multiplied to obtain the single-photon privacy term. The error correction leakage term is subtracted from the single-photon privacy term, with negative values treated as zero, and then multiplied by the basis matching probability to obtain the lower bound of the key rate for each signal state pulse.
[0091] If only one coding basis is used to generate the key, the basis matching probability is the product of the probability that the sender chooses that basis and the probability that the receiver chooses that basis. If both matching bases generate the key and the two bases are statistically perfectly symmetrical, the total basis matching probability can be used for unified calculation. If the two bases are statistically asymmetrical, the contributions of the two bases are calculated separately and then summed. When normalization is required for all transmitted pulses, it is multiplied by the probability of selecting the signal strength. The detection report should indicate the normalization caliber used.
[0092] The lower bound of single-photon yield, the original upper bound of single-photon bit error rate, the effective upper bound, the upper bound of single-photon phase bit error rate, and the lower bound of key rate are calculated for the reference sequence and the detection sequence, respectively. Then, the changes in the two types of results and the corresponding confidence intervals are calculated. If the auxiliary coupling device introduces insertion loss, the report lists the decrease in gain, the increase in error gain, the change in single-photon parameters, and the change in key rate, respectively, without replacing each intermediate result with a single comprehensive difference.
[0093] The test signal generation module 110 writes the intensity label, coding basis β∈{Z, X}, logical bits, auxiliary coupling state, and reference state into the protocol label. For each intensity and coding basis, a detection sequence with auxiliary coupling and a reference sequence without auxiliary coupling are established respectively. The two types of sequences use the same light source, receiving test end, filtering rules, time window, and post-processing rules, and are sent or acquired in an interleaved manner to reduce the impact of drift on the differential results.
[0094] The security risk level is determined by the threshold or scoring rules registered before the test. The rules can divide the potential information leakage index into multiple intervals and the communication response change of the detection sequence relative to the baseline sequence into multiple intervals. Then, the two-dimensional mapping table is queried with the interval where the potential information leakage index is located as the row index and the interval where the communication response change is located as the column index to obtain the candidate risk level. When the parameter is located at the common boundary of two intervals, an interval is selected according to the registered boundary attribution rules.
[0095] To suppress level jumps caused by single fluctuations, the system can require candidate risk levels to reach a preset number of consecutive times before updating the output level, or set different upgrade and downgrade thresholds between adjacent levels; if auxiliary readout data is missing, baseline data is insufficient, communication responses cannot be aligned, or the corresponding security model is not applicable, the system will not replace the missing value with zero when outputting insufficient data or inapplicable model.
[0096] The quantum key distribution device security detection system 100 can scan the coupling strength, interaction time, auxiliary input energy, readout threshold, mode loss or phase compensation amount level by level. For each parameter level, the reference sequence and detection sequence, data alignment, potential information leakage index calculation and communication response comparison are re-executed. The scan results are output according to the parameter level number, and the number of valid samples, invalid samples, confidence conditions and configuration version are retained, so that the comparison between different parameter levels has a consistent data caliber.
[0097] When parameter scanning adopts a fixed sequence, the security detection and control device performs a rapid calibration before each step and confirms that the previous step has not caused probe saturation, device drift, or changes in the state of the sub-key distribution device to be measured. When adaptive selection of the next parameter step is adopted, the step is selected to be upgraded, downgraded, or maintained only based on the registered target range and the valid results of the previous step. The risk level threshold and data rejection rules are not modified. Since the scanning rules are determined before the test, the situation of selectively retaining parameter steps based on test results can be reduced.
[0098] Anomaly handling includes calibration failure, auxiliary probe or detector saturation, time synchronization anomaly, missing protocol tag, repeated pulse sequence number, parameter group inconsistency, receiver interface interruption, and data file corruption. When an anomaly is detected, the safety detection and control device stops the current parameter group or marks the corresponding record as invalid, saves the anomaly type, occurrence time, and the original data already obtained, and restarts from the new parameter group number after the anomaly is eliminated, without overwriting the original record.
[0099] For duplicate records, the system compares the test batch number, pulse sequence number, acquisition channel, and timestamp. Only one duplicate record that is completely identical is kept for statistics, and the rest are marked as duplicates. Duplicate records with inconsistent fields are all added to the conflict set. For out-of-bounds read values, the system saves the original sampled value and the out-of-bounds flag. Out-of-bounds values are not truncated and treated as normal samples. For time window boundary events, they are assigned according to the left-closed and right-open rules or other single rules registered before the test.
[0100] The safety detection and control device 300 includes a processor 310, a memory 320, a communication interface 330, a device control and data acquisition interface 340, and an internal bus 350. The processor 310 reads the protocol and test configuration data through the internal bus, sends control parameters to the test signal generation module 110, the discrimination base mapping module 120, the auxiliary coupling module 130, the auxiliary readout module 140, and the signal overlap output module 150, and obtains the joint record from the communication response acquisition module 160.
[0101] The processor 310 can be implemented by a central processing unit, a microcontroller, a digital signal processor, a field-programmable gate array, a graphics processor, a system-on-a-chip, or a combination thereof. Deterministic pulse triggering, sampling windows, and high-speed event acquisition can be performed by a field-programmable gate array or dedicated timing circuits. Statistical state solving, information index calculation, decoy state parameter estimation, and report generation can be performed by a central processing unit, a digital signal processor, or a graphics processor. Each processing unit exchanges data using a unified test batch number and time base.
[0102] The memory 320 stores computer programs, protocols, test configuration data, and test data. The test data includes at least pulse sequence number, timestamp, protocol tag, logical bits, encoding base, light intensity category, coupling state, parameter group number, calibration state, auxiliary readout value, receiver detection event, screening result, error identifier, gain, error gain, bit error rate, confidence interval, and risk level. The reference data, detection data, and calibration data are distinguished by independent datasets or status fields.
[0103] The communication interface 330 exchanges protocol responses, protocol and test configuration data, and security detection results with the key distribution device under test, the host computer, or the test management terminal. The device control and data acquisition interface 340 outputs control signals corresponding to light source triggering, intensity selection, polarization or mode conversion, phase compensation, auxiliary coupling, probe preparation, local oscillator phase, and sampling window, and acquires auxiliary readout waveforms, detection events, device status, and calibration data.
[0104] When the computer program is executed by the processor 310, it sequentially completes the following steps: protocol parameter checking, test sequence generation, reference communication response acquisition, logical bit statistical state construction, discrimination basis determination, coherent mode mapping, mode-controlled weak interaction, auxiliary readout, signal overlap, detection communication response acquisition, joint data generation, and security detection result determination. When the input of any step is missing or the calibration state is invalid, the computer program stops using the output of that step to continue calculation, thus preventing invalid intermediate results from entering the security risk level from the data link.
[0105] This embodiment provides a security detection control device 300 for executing the aforementioned quantum key distribution device security detection method. The security detection control device 300 includes a processor 310, a memory 320, a communication interface 330, a device control and data acquisition interface 340, and an internal bus 350. The processor 310, memory 320, communication interface 330, and device control and data acquisition interface 340 transmit instructions, data, and status information through the internal bus 350. The security detection control device 300 can be used as an independent control unit in the security detection system 100 for quantum key distribution devices, or it can be integrated with the test signal generation module 110, the security index calculation module 170, or a host computer.
[0106] The processor 310 is used to read and execute the computer program 321 in the memory 320, and complete steps S101 to S108 according to the program instructions of the computer program 321, including configuring the test protocol and statistical conditions, controlling the test signal and reference sequence, constructing the logical bit statistical state and discrimination basis, issuing coherent mode mapping parameters and auxiliary coupling parameters, triggering auxiliary readout and communication response acquisition, aligning joint data recording, performing parameter estimation and safety index calculation, and generating test results; the processor 310 is also used to monitor the working status of each module, and stop the current parameter group or mark the corresponding data as invalid when calibration fails, probe or detector saturates, time synchronization is abnormal, data is missing or interface is interrupted.
[0107] The processor 310 can be implemented by a central processing unit (CPU), microcontroller (MCU), digital signal processor (DSP), field-programmable gate array (FPGA), graphics processing unit (GPU), system-on-a-chip (SoC), or a combination thereof. For pulse triggering, sampling windows, and high-speed data acquisition that require time determination, it can be performed by an FPGA or dedicated timing circuits. For statistical state solving, mutual information calculation, decoy state parameter estimation, and report generation, it can be performed by a CPU, DSP, GPU, or a combination thereof. The above-mentioned different processing units can be set up in the same security detection and control device, or they can form a distributed control structure through the communication interface 330.
[0108] The memory 320 is used to store computer program 321, protocol and test configuration data 322 and test data 323; the memory 320 may include random access memory, read-only memory, flash memory, solid-state memory, magnetic memory or other storage units capable of storing computer programs and data; wherein, the volatile storage unit is used to store runtime cache and sampled data to be processed, and the non-volatile storage unit is used to store program version, configuration version, original test records, calculation results and audit logs.
[0109] The protocol and test configuration data 322 includes at least the type of protocol under test, logical bits and set of coded states, coding basis and its prior probability, signal strength and decoy state strength, pulse timing, number of test repetitions, organization of reference sequence and detection sequence, discriminant basis or mode transformation matrix, HWP angle, path phase compensation amount, auxiliary coupling parameters, probe input parameters, readout window and threshold, data rejection rules, confidence level, security indicator type and risk classification rules; the processor 310 performs an integrity check on the protocol and test configuration data 322 before starting the test and generates an independent number for each test that can identify the configuration version and parameter group.
[0110] Test data 323 includes at least the test pulse sequence number, timestamp, protocol tag, logical bits, encoding base, light intensity category, coupling state, parameter group number, calibration state, auxiliary readout value, receiver detection event, screening result, error identifier, gain, error gain, bit error rate, confidence interval, single photon parameter, key rate lower bound, and risk level; the baseline data, auxiliary coupling detection data, and calibration data are stored separately or clearly distinguished by the status field; after data alignment and index calculation, the processor 310 retains the original records, processing rules, and intermediate statistics for verification of the detection results.
[0111] The communication interface 330 is used to exchange protocol responses, protocol and test configuration data, and security test results with the device under test (DUT) 200, the host computer, the test management terminal, or the remote data server. The communication interface 330 can use Ethernet, serial interface, USB, fiber optic communication interface, wireless communication interface, or a dedicated management interface provided by the DUT. In the test mode authorized by the device owner or operator, the communication interface 330 receives the test events, base screening results, protocol status, or other exportable response data output by the DUT 200, and sends test start, stop, time synchronization, or specified test port configuration commands to the DUT 200.
[0112] The device control and data acquisition interface 340 is used to connect to the test signal generation module 110, the discriminant basis mapping module 120, the auxiliary coupling module 130, the auxiliary readout module 140, the signal coincidence output module 150, and the communication response acquisition module 160 in the security detection system 100 for the quantum key distribution device. The device control and data acquisition interface 340 outputs control signals such as light source triggering, intensity selection, polarization or mode conversion, phase compensation, Kerr or other weak coupling parameters, probe state preparation, local oscillator phase, and sampling window, and acquires auxiliary readout waveforms, detection events, device status, calibration data, and abnormal status. The device control and data acquisition interface 340 may include a digital-to-analog converter, an analog-to-digital converter, a digital input / output port, a time-to-digital converter, a clock synchronization port, an instrument control bus, or a combination thereof.
[0113] The internal bus 350 is used to transmit addresses, control, and data between the processor 310, memory 320, and various interfaces. The internal bus 350 can be a single system bus or can include a processor bus, memory bus, peripheral bus, and high-speed data channel. For auxiliary waveform reading and high-speed detection events, the security detection control device 300 can write the sampled data into the memory 320 through direct memory access, and the processor 310 can perform subsequent alignment and statistical processing without changing the original timestamp.
[0114] In one execution mode, the processor 310 first reads the protocol under test, test sequence, and coupling parameters from the protocol and test configuration data 322, completing step S101; then, it controls the test signal generation module 110 to generate or receive test signals with protocol tags through the device control and data acquisition interface 340, and acquires unassisted coupling reference data, completing step S102; the processor 310 calculates the logical bit statistical state, difference operator, and discriminant basis according to the encoded state set, and sends the corresponding transformation parameters to the discriminant basis mapping module 120, completing steps S103 and S104.
[0115] Subsequently, the processor 310 controls the auxiliary coupling module 130 to form controlled weak interactions according to the parameter group, and records the coupling strength, interaction time, probe status and calibration results of each mode, completing step S105; the auxiliary readout module 140 and the signal overlap output module 150 are triggered through the device control and data acquisition interface 340 to acquire auxiliary readout data and control signal coherent overlap, completing step S106; then the communication response of the sub-key distribution device 200 to be measured is obtained through the communication interface 330 or the device control and data acquisition interface 340, and the auxiliary readout, protocol tag, detection event and reference data are time aligned, completing step S107.
[0116] Finally, the processor 310 calls the computer program in the memory 320 to perform counting statistics, mutual information or auxiliary state index calculation, gain and error gain calculation, decoy state parameter estimation, key rate lower bound calculation or risk classification on the detection sequence and the reference sequence, respectively, to complete step S108; the output results include at least the configuration version used, the number of valid samples, the number of invalid samples, the parameter estimation premise, the statistical confidence condition and the risk level; when the applicable conditions of a certain formula are not met, the processor 310 does not output the definite value corresponding to the formula, or marks it as inapplicable and retains the original observation data.
[0117] The security detection and control device 300 can operate in an automatic control, manual confirmation control, or a combination of both. For operations that may change the working state or input conditions of the sub-key distribution device under test, the computer program 321 can set authorization verification, parameter range check, and execution confirmation. The test process can record the operator, test time, device identifier, configuration version, and program version. The above control and recording are used to ensure that the test process is traceable and does not change the aforementioned technical chain of discrimination base mapping, auxiliary coupling, signal overlap, and security index calculation.
[0118] In another embodiment, the processor 310, memory 320, communication interface 330, and device control and data acquisition interface 340 can be distributed across multiple physical devices. For example, the real-time controller is responsible for the light source, modulator, probe, and acquisition timing; the host computer is responsible for protocol configuration, statistical state solving, and security index calculation; and the data server is responsible for raw record storage and report archiving. Each device exchanges data through a communication link with a unified time reference and test record number. As long as each device jointly executes the security detection method and maintains the correspondence between protocol tags, auxiliary readouts, and communication responses, it is an optional implementation of the security detection control device 300.
[0119] In the absence of logical conflicts, the above implementation methods can be combined. Orthogonal signal modes can be replaced by spatial paths with time, frequency, or orbital angular momentum modes. The auxiliary coupling structure can be replaced by cross-Kerr structures with cavity enhancement structures, quantum non-destructive detection structures, or atomic spin coupling structures. Auxiliary readout can be continuous or discrete. After the replacement, the technology chain of protocol statistical state determination of the discriminant basis, coherent mode mapping, mode-controlled weak interaction, unconditional signal coincidence, and joint processing of the three types of data is still maintained.
[0120] The above are preferred embodiments of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principles described in the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A security detection method for a quantum key distribution device, characterized in that, include: The parameters of the protocol under test are obtained, a baseline sequence without auxiliary coupling and a detection sequence with auxiliary coupling are generated, and the response characteristic data of the baseline QKD system are collected. Construct corresponding logical bit statistical states based on the set of quantum states and conditional probabilities of each logical bit, and determine the discriminant basis based on the differences between the logical bit statistical states; The test signal in the detection sequence is coherently mapped under the discriminant basis into at least two mutually orthogonal signal modes that maintain relative phase. The signal pattern is made to have a pattern-controlled weak interaction with the auxiliary system, forming a conditional auxiliary state associated with the signal pattern; a preset observable of the auxiliary system is measured to obtain auxiliary readout data for characterizing the distinguishability of the conditional auxiliary state; The signal mode after weak interaction is subjected to inverse coherent mode transformation, phase compensation and time delay matching to obtain the coincidence test signal and output it to the receiving test end of the sub-key distribution device under test. The signal coincidence does not perform path selection, projection measurement or re-preparation based on the auxiliary readout data. The system collects and receives the QKD system response feature data of the detection sequence from the test end. Based on the test sequence identifier and time window, the auxiliary readout data, the QKD system response feature data, and the benchmark QKD system response feature data are associated to form joint test data. Based on joint test data and parameter estimation rules that match the protocol under test, at least one security indicator is determined from among the following: potential information leakage index, equivalent qubit error rate introduced by indirect measurement of auxiliary system, upper bound of single-photon phase error, lower bound of key rate, and security risk level.
2. The security detection method for quantum key distribution devices according to claim 1, characterized in that, Based on the set of quantum states and conditional probabilities of each logical bit, the corresponding logical bit statistical states are constructed, including: Multiply the density operator corresponding to each quantum state by its conditional probability to obtain the weighted density operator; sum the weighted density operators corresponding to the same logical bit to obtain the logical bit statistical state. The statistical states of the corresponding logical bits are weighted according to the prior probability of each logical bit to obtain the weighted statistical states; The weighted difference operator is obtained by subtracting the weighted statistical states corresponding to different logical bits. The discriminant basis is determined based on the positive and negative feature subspaces of the weighted difference operator, and the subspaces corresponding to zero feature values are pre-assigned or orthogonally completed.
3. The security detection method for quantum key distribution devices according to claim 2, characterized in that, The test signal in the detection sequence is coherently mapped to a signal mode under the discriminant basis, including: Set the coherent mode transformation parameters according to the discriminant basis; Based on the coherent mode transformation parameters, different discrimination basis components are mapped to the spatial path mode, time mode, frequency mode, or orbital angular momentum mode, respectively. The relative phase, amplitude ratio, and time delay between each signal mode are determined using a known reference state. When the relative phase, amplitude ratio, or time delay exceeds the corresponding tolerance range, the corresponding detection sequence is marked as invalid.
4. The security detection method for quantum key distribution devices according to claim 3, characterized in that, The signal patterns generate weak interactions with the auxiliary system in a controlled manner, including: Employing at least one of the following structures—a cross-Kerr nonlinear coupling structure, a cavity-enhanced photomatter interaction structure, a quantum nondestructive detection structure, an atomic spin coupling structure, or a spin ensemble coupling structure—different signal modes can form distinguishable conditional auxiliary states. For each signal mode, the coupling strength, interaction time, auxiliary input state, mode loss, and calibration state are recorded separately. When the auxiliary readout is saturated, the mode loss exceeds the allowable range, or the calibration status is invalid, the corresponding test parameter group will be marked as invalid.
5. The security detection method for a quantum key distribution device according to claim 4, characterized in that, The preset observables of the measurement assistance system include: The first and second readouts are obtained by employing statistical estimation methods such as continuous variable measurement, threshold measurement, discrete result measurement, or repeated measurement. Subtracting the second readout from the first readout value yields the differential readout statistic. The variance of the differential readout statistic is determined based on the measured variance and covariance of the first and second readouts, and the original readouts, differential readout statistic, sampling time, and saturation state are saved.
6. The security detection method for a quantum key distribution device according to claim 5, characterized in that, Processing the signal modes following weak interactions includes: Perform inverse coherent mode transformation based on the coherent mode transformation parameters; Phase compensation is performed based on the relative phase obtained from calibration, delay matching is performed based on the delay obtained from calibration, and polarization shaping and spatial mode matching are performed on each signal mode. The coincidence test signal is obtained based on the processed signal modes, and the relative phase, amplitude ratio, insertion loss, time delay, polarization extinction ratio or interference visibility during the coincidence process are recorded. The signal path is not selected or discarded based on the auxiliary readout data.
7. The security detection method for a quantum key distribution device according to claim 6, characterized in that, The reference sequence and the detection sequence use the same signal source, channel, receiving test terminal, and protocol post-processing rules, and are executed alternately according to a preset interleaving period; Align auxiliary readout data, detection events, filtering results, and error events according to test sequence identifier, protocol label, auxiliary coupling status, auxiliary coupling parameters, and time window; For each test parameter group, determine the total number of transmission events, the number of valid detection events, and the number of error events. Determine the gain based on the ratio of the number of valid detection events to the total number of transmission events, and determine the error gain based on the ratio of the number of error events to the total number of transmission events. When the number of valid detection events is zero, mark the corresponding bit error rate as incalculable.
8. The security detection method for a quantum key distribution device according to claim 7, characterized in that, Potential information leakage indicators were identified based on joint test data, including: The joint frequency is determined based on the number of times the logical bits and the auxiliary readout results occur together. The edge frequencies of the logical bits and the auxiliary readout results are determined based on the joint frequency. The mutual information or conditional mutual information is calculated based on the joint probability distribution of the logical bit random variable and the auxiliary readout random variable and the corresponding edge probability distribution, which serves as an indicator of potential information leakage. The changes in communication response caused by auxiliary coupling are determined based on the changes in gain, error gain, and bit error rate of the detection sequence and the reference sequence.
9. The security detection method for a quantum key distribution device according to claim 8, characterized in that, The test signals include phase-randomized weakly coherent pulses classified into vacuum state, weakly decoy state, and signal state; The gain and error gain of the reference sequence and detection sequence are determined according to the light intensity category and coding basis, respectively. The lower bound of single-photon yield and the upper bound of single-photon bit error rate are determined based on the gain and error gain. The upper bound of single-photon phase bit error rate and the lower bound of key rate are determined based on the phase bit error relationship matched with the protocol under test. The risk level mapping relationship is queried according to the preset interval where the potential information leakage index and the communication response change are located, and the security risk level is obtained.
10. A security detection system for a quantum key distribution device, characterized in that, It includes a test signal generation module, a discriminant basis mapping module, an auxiliary coupling module, an auxiliary readout module, a signal coincidence output module, a communication response acquisition module, and a safety index calculation module; The test signal generation module is used to generate the reference sequence and the detection sequence and to acquire the response characteristic data of the reference QKD system; The discriminant basis mapping module is used to construct logical bit statistical states, determine the discriminant basis, and coherently map the test signals in the detection sequence into orthogonal signal modes; the auxiliary coupling module is used to enable the orthogonal signal modes to have mode-controlled weak interactions with the auxiliary system; the auxiliary readout module is used to measure the preset observables of the auxiliary system and obtain auxiliary readout data to characterize the distinguishability of the conditional auxiliary states. The signal coincidence output module is used to perform inverse coherent mode transformation, phase compensation and time delay matching on the orthogonal signal mode after weak interaction, and output the coincidence test signal to the sub-key distribution device under test, without performing path selection, projection measurement or re-preparation based on the auxiliary readout data; The communication response acquisition module is used to collect response characteristic data of the detection QKD system; the security index calculation module is used to correlate auxiliary readout data, detection QKD system response characteristic data and benchmark QKD system response characteristic data, and determine potential information leakage indicators and security risk levels.
