Method for extracting shared random bits from optical fading variation amplitude at both ends of a channel

By extracting shared random bits from the amplitude of light decay changes at both ends of the channel and combining them with quantum key distribution post-processing technology, the problem of high cost of quantum key distribution is solved, achieving low-cost and secure shared key distribution and improving the generation rate and randomness of shared random bits.

CN116318645BActive Publication Date: 2026-05-15CHANGCHUN UNIV OF SCI & TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHANGCHUN UNIV OF SCI & TECH
Filing Date
2022-10-20
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing quantum key distribution technologies are costly to implement. How can we distribute shared keys to legitimate communicating parties in a cost-effective and secure manner?

Method used

By extracting shared random bits from the amplitude of optical attenuation changes at both ends of the channel, and using laser transceivers A and B to sample, normalize, quantize boundary sequences, and convert Gray codes, combined with error estimation and error checking techniques in quantum key distribution post-processing, the consistency of the shared random bit sequence between the two communicating parties is ensured.

Benefits of technology

It significantly reduces the inconsistency rate of shared random bit sequences, improves the generation rate and randomness of shared random bits, and achieves low-cost secure key distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116318645B_ABST
    Figure CN116318645B_ABST
Patent Text Reader

Abstract

The application discloses a method for extracting shared random bits from the amplitude of optical fading changes at both ends of a channel. The method realizes the quantization of the amplitude sequence of an optical signal by transmitting the amplitude sequence of adjacent optical fading changes in an atmospheric turbulence optical channel, and finally generates a shared random bit sequence for sharing by both legal communication parties. Since the atmospheric turbulence optical channel is reciprocal, both legal communication parties can know the specific change direction of the optical fading, which provides a guarantee for the low inconsistency rate of the original shared random bit sequence. Since the information transmitted in the channel is only the amplitude sequence of adjacent optical fading changes and the quantization threshold sequence, information leakage is effectively prevented. Finally, a multi-threshold quantization algorithm is used for quantization operation, which improves the generation rate and randomness of the shared random bits to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information security technology, and is a method for extracting shared random bits from the amplitude of optical attenuation changes at both ends of a channel. Background Technology

[0002] Information security is a major concern today. In network communication, data is typically encrypted to protect the data transmitted between communicating parties. However, the security of traditional public-key cryptography for shared key distribution will be challenged once quantum computers become practical. Quantum key distribution (QKD) is another technique for distributing shared keys between legitimate communicating parties, but its current implementation cost is too high. How to distribute shared keys securely and cost-effectively between legitimate communicating parties is a problem worthy of further research. Researchers have proposed methods for extracting shared random bits from random optical signals in reciprocal bidirectional atmospheric turbulence optical channels, using these extracted random bits as a shared random key between the communicating parties at both ends of the channel. For example, Chinese invention patent application number 201811370939.1 discloses a method for extracting shared random bits from the fading of atmospheric turbulence optical signals. Extracting random bits from the fading of random optical signals requires first sampling and measuring the fading, and then thresholding the sampled values. The paper published in *Optics Express*, Volume 26, Issue 13, 2018, pages 16422-16441, provides a detailed description of the reciprocity problem in bidirectional optical transmission channels. Because bidirectional optical transmission channels are reciprocal, it can be guaranteed that the extracted original shared random bit sequences are essentially identical. Based on this, key negotiation and error checking techniques are used to correct inconsistencies in the original shared random bit sequences extracted from the two communication ends, ultimately making the original shared random bit sequences a truly usable shared key sequence. The paper published in *IEEE Transactions on Vehicular Technology*, Volume 67, Issue 12, 2018, pages 12462-12466, suggests using the difference between adjacent measurements as the basis for quantization operations, eliminating the need for any adaptive channel adjustments, thus making the algorithm implementation more lightweight. Referring to differential quantization and the reciprocity characteristics of bidirectional optical transmission channels, this invention discloses a method for extracting shared random bits from optical attenuation variation amplitude at both ends of a channel. The biggest difference between this method and the paper mentioned above in IEEE Transactions on Vehicular Technology, Vol. 67, No. 12, 2018, pp. 12462-12466, is that this invention transmits a quantization boundary sequence and an optical attenuation variation amplitude sequence in the channel. Using the optical attenuation variation amplitude sequence as the basis for quantization operations not only ensures a low inconsistency rate in the original shared random bit sequences extracted by both communicating parties, but also improves the extraction rate and randomness of shared random bits to a certain extent. Summary of the Invention

[0003] The purpose of this invention is to provide a method for extracting shared random bits from the amplitude of optical attenuation changes at both ends of a channel, and to quantize and extract shared random bits from the amplitude of the detection electrical signal of the optical signal after atmospheric turbulence transmission.

[0004] The technical solution of this method is implemented as follows: a method for extracting shared random bits from the amplitude of optical attenuation changes at both ends of the channel, characterized by the following hardware system and execution steps:

[0005] Laser transceiver A and laser transceiver B are required, and they must be able to see each other. Laser transceiver A includes laser A, transceiver optical system A, detector A, and computer A. Laser transceiver B includes laser B, transceiver optical system B, detector B, and computer B. (The last sentence appears to be incomplete and possibly refers to a different topic.) Figure 1 As shown, the laser signal A001 emitted by laser A is transmitted into the atmospheric turbulence channel via transceiver optical system A, and then enters the detector B after reaching transceiver optical system B; the laser signal B001 emitted by laser B is transmitted into the atmospheric turbulence channel via transceiver optical system B, and then enters the detector A after reaching transceiver optical system A; computer A collects the electrical signal output by detector A in real time, and computer B collects the electrical signal output by detector B in real time.

[0006] 1) The first part of this method enables laser transceiver A and laser transceiver B to function normally. Specific operations include:

[0007] Step 101: Make laser A and laser B work normally, make detector A and detector B work normally, make computer A and computer B work normally, and make transceiver optical system A and transceiver optical system B aligned and working normally.

[0008] 2) The second part of this method involves performing the following operations in laser transceiver A:

[0009] Step 201: In the data acquisition program of computer A, create a counter CounterA and set CounterA=1; set time t... A =0; Create a one-dimensional array ArrayA with N elements in the memory of computer A. ArrayA is used to store the amplitude sampled values ​​of the electrical signal output by detector A; Create a one-dimensional array ArrayA_1 with N elements in the memory of computer A. ArrayA_1 is used to store the result of normalization processing of the sampled values ​​in arrayA; Create a one-dimensional array ArrayA_1 with N elements in the memory of computer A; A one-dimensional array ArrayA_2 with 100 elements is used to store the difference in optical attenuation between adjacent light outputs of detector A; a new array containing 100 elements is created in the memory of computer A. A one-dimensional array ArrayA_3 with q elements is created to store the amplitude of adjacent light attenuation changes output by detector A. An array ArrayAB with q elements is created in the memory of computer A to store the quantization boundary sequence calculated by computer A, where q is a positive integer. A list ListA is created in the memory of computer A to store the quantization partitioning results; ListA is initially empty. A list ListAL is created in the memory of computer A to store the Gray code sequence converted from the quantization partitioning results; ListAL is initially empty.

[0010] Step 202: At time t A The acquisition program of laser transceiver A samples the amplitude of the electrical signal output by detector A once to obtain a sample value C001; and assigns the sample value C001 to the CounterA-th element of array ArrayA.

[0011] Step 203: Let CounterA = CounterA + 1; Let t A =t A +δ t δ t The sampling time interval;

[0012] Step 204: If CounterA>N, proceed to Step 205; otherwise, proceed to Step 202.

[0013] Step 205: On computer A, use the program to sequentially target... Perform the following operation: Normalize each sample value in array ArrayA:

[0014] Step 205-1: Let This represents the i-th sampled value in array ArrayA; This represents the result after normalizing the i-th sample value in array ArrayA;

[0015] Step 205-2: Let Assign the value to the i-th element of array ArrayA_1 ;in and All are positive integers;

[0016] Step 206: Target each step in turn. Perform the following operations:

[0017] Step 206-1: Let Let represent the value of the i-th element in array ArrayA_1. ;

[0018] Step 206-2: Assign the value to the i-th element of array ArrayA_2. , that is to say ,like Figure 2 As shown in step ①;

[0019] Step 207: Let This represents the value of the i-th element in array ArrayA_2, respectively targeting... Assign the value to the i-th element of array ArrayA_3 ,in ,like Figure 2 As shown in step ②; where This indicates taking the absolute value of x;

[0020] Step 208: Calculate the empirical cumulative distribution function of the values ​​of the elements in array ArrayA_2. , respectively targeting ,make ,calculate , in turn Store the sequence in array ArrayAB; use the sequence in array ArrayAB as quantization boundaries to extract random bit sequences; where q represents the number of preset quantization boundaries;

[0021] Step 209: Laser transceiver A sends array A_2 and array AB to laser transceiver B.

[0022] 2) The third part of this method involves performing the following operations in laser transceiver B:

[0023] Step 301: In the acquisition program of computer B, create a counter CounterB and set CounterB=1; set time t... B =0; Create a one-dimensional array ArrayB with N elements in the memory of computer B. ArrayB is used to store the amplitude sampled values ​​of the electrical signal output by detector B; Create a one-dimensional array ArrayB_1 with N elements in the memory of computer B. ArrayB_1 is used to store the result of normalization processing of the sampled values ​​in arrayB; Create a one-dimensional array ArrayB_1 with N elements in the memory of computer B; A one-dimensional array ArrayB_2 with 100 elements is used to store the difference in optical attenuation between adjacent light outputs of detector B; a new array containing 100 elements is created in the memory of computer B. A one-dimensional array ArrayB_3 with 1 element is used to store the result of processing array ArrayA_3; a list ListB is created in the memory of computer B to store the quantization partitioning result, and ListB is made empty; a list ListBL is created in the memory of computer B to store the Gray code sequence obtained by converting the quantization partitioning result, and ListBL is made empty.

[0024] Step 302: At time t B Laser transceiver B samples the amplitude of the electrical signal output by detector B to obtain a sample value D001; the CounterB-th element of array ArrayB is assigned the sample value D001.

[0025] Step 303: Let CounterB = CounterB + 1; Let t B =t B +δ t δ t The sampling time interval;

[0026] Step 304: If CounterB > N, proceed to Step 305; otherwise, proceed to Step 302.

[0027] Step 305: In computer B, use the program to sequentially target... Perform the following operation: Normalize each sample value in array ArrayB:

[0028] Step 305-1: Let This represents the i-th sampled value in array ArrayB; This represents the result after normalizing the i-th sample value in array ArrayB;

[0029] Step 305-2: Let Assign the value to the i-th element of array ArrayB_1 ;in and All are positive integers;

[0030] Step 306: Target each one in turn Perform the following operations:

[0031] Step 306-1: Let Let the value of the i-th element in array ArrayB_1 be represented by... ;

[0032] Step 306-2: Assign the value to the i-th element of array ArrayB_2. , that is to say ,like Figure 2 As shown in step ③.

[0033] 4) The fourth part of this method performs the following operations after laser transceiver B receives the arrays ArrayA_2 and ArrayAB sent by laser transceiver A:

[0034] Step 401: Let This represents the value of the i-th element in array ArrayA_3, respectively targeting... ,judge Check if the above formula is true. If it is true, then assign the value to the i-th element in array ArrayB_3. , that is to say If the above formula is not true, then the i-th element in array ArrayB_3 will be assigned a value. , that is to say ,like Figure 2 As shown in step ④;

[0035] Step 402: Target each step in turn. Perform the following operations:

[0036] Step 403-1: Let j = 1;

[0037] Step 403-2: Judgment Check if the condition is true. If true, then add the i-th element from list B. Assigned value ;

[0038] Step 403-3: If This is not true; judgment is invalid. Is it true? If it is true, then let... Proceed to Step 403-2 if necessary, otherwise proceed to Step 403-4.

[0039] Step 403-4: If If this condition is not met, then the i-th element in ListB will be removed. Assign the value j;

[0040] Step 404: Let This represents the value of the i-th element in list B, which is then used to represent the values ​​of the elements in the list B. ,Will Convert to Gray code and store in listListBL.

[0041] 5) The fifth part of this method involves performing a quantization operation in laser transceiver A:

[0042] Step 501: Target each step in turn. Perform the following operations:

[0043] Step 501-1: Let j = 1;

[0044] Step 501-2: Judgment Check if the condition is true. If true, then add the i-th element from list ListA. Assigned value ;

[0045] Step 501-3: If This is not true; judgment is invalid. Is it true? If it is true, then let... Proceed to Step 501-2 if necessary, otherwise proceed to Step 501-4.

[0046] Step 501-4: If This is not true; remove the i-th element from list ListA. Assign the value j;

[0047] Step 502: Let This represents the value of the i-th element in list ListA, which is then used to represent the values ​​of the elements in each list. ,Will Convert to Gray code and store in listListAL.

[0048] 6) In the sixth part of this method, inconsistencies in the original shared random bit sequences extracted by laser transceiver A and laser transceiver B are corrected. The specific steps are as follows:

[0049] Step 701: Use error estimation, key negotiation, and error checking techniques in quantum key distribution post-processing to find and correct inconsistent bits in the original shared random bit sequences stored in ListA and ListB, so that the random bits in ListA and ListB are consistent, and the laser transceiver A and laser transceiver B have the same bit sequence.

[0050] When implementing this method, the first part of this method is executed first, followed by the second and third parts of this method being executed simultaneously, then the fourth and fifth parts being executed simultaneously, and finally the sixth part of this method is executed.

[0051] The positive effects of this invention are as follows: In the method of this invention, in a reciprocal bidirectional atmospheric turbulence channel, the fading direction of the optical signal is consistent. When both parties in legitimate communication calculate the amplitude direction of the adjacent optical fading measured by sampling, they can know whether the direction of the adjacent optical fading is increasing or decreasing. Transmitting the amplitude sequence of the adjacent optical fading and the quantization boundary sequence in the channel to extract the shared random bit sequence, and then performing quantization operation on this basis, not only significantly reduces the inconsistency rate of generating the original shared random bit sequence, but also improves the generation rate and randomness of the shared random bit to a certain extent. Attached Figure Description

[0052] Figure 1 A schematic diagram of the system hardware structure for a method of extracting shared random bits from the amplitude of optical attenuation changes at both ends of a channel;

[0053] Figure 2 This is a diagram illustrating the changes in data. Detailed Implementation

[0054] To make the features and advantages of this method clearer, the method is further described below with reference to specific embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. In this embodiment, laser transceiver A and laser transceiver B are located on the rooftops of two high-rise buildings, respectively. Detector A and detector B are both PIN photodetectors. Computer A of laser transceiver A and computer B of laser transceiver B are both connected to the Internet. Computer A and computer B can communicate with each other through the Internet to perform error estimation, key negotiation, and error checking operations via the Internet channel. Both laser A and laser B output stable laser signals, and the power of the laser signal output by laser A is equal to the power of the laser signal output by laser B. A paper published in the *Journal of Cryptography*, Vol. 2, No. 2, 2015, pp. 113-121, provides a detailed description of error estimation, key negotiation, and error checking operations in quantum key distribution post-processing. By borrowing error estimation, key negotiation, and error checking techniques used in quantum key distribution post-processing, inconsistent bit correction can be performed on the original shared random bit sequences extracted by two laser transceivers, ensuring that the final shared random bit sequence becomes a usable shared random bit sequence in practice. The transceiver optical system A and transceiver optical system B are guaranteed to have reciprocal bidirectional channels using the method described in the paper "Optics Express" (Vol. 26, No. 13, pp. 16422-16441, 2018).

[0055] The technical solution of this method is implemented as follows: a method for extracting shared random bits from the amplitude of optical attenuation changes at both ends of the channel, characterized by the following hardware system and execution steps:

[0056] Laser transceiver A and laser transceiver B are required, and they must be able to see each other. Laser transceiver A includes laser A, transceiver optical system A, detector A, and computer A. Laser transceiver B includes laser B, transceiver optical system B, detector B, and computer B. (The last sentence appears to be incomplete and possibly refers to a different topic.) Figure 1 As shown, the laser signal A001 emitted by laser A is transmitted into the atmospheric turbulence channel via transceiver optical system A, and then enters the detector B after reaching transceiver optical system B; the laser signal B001 emitted by laser B is transmitted into the atmospheric turbulence channel via transceiver optical system B, and then enters the detector A after reaching transceiver optical system A; computer A collects the electrical signal output by detector A in real time, and computer B collects the electrical signal output by detector B in real time.

[0057] 1) The first part of this method enables laser transceiver A and laser transceiver B to function normally. Specific operations include:

[0058] Step 101: Make laser A and laser B work normally, make detector A and detector B work normally, make computer A and computer B work normally, and make transceiver optical system A and transceiver optical system B aligned and working normally.

[0059] 2) The second part of this method involves performing the following operations in laser transceiver A:

[0060] Step 201: In the data acquisition program of computer A, create a counter CounterA and set CounterA=1; set time t... A =0; Create a one-dimensional array ArrayA with N elements in the memory of computer A. ArrayA is used to store the amplitude sampled values ​​of the electrical signal output by detector A; Create a one-dimensional array ArrayA_1 with N elements in the memory of computer A. ArrayA_1 is used to store the result of normalization processing of the sampled values ​​in arrayA; Create a one-dimensional array ArrayA_1 with N elements in the memory of computer A; A one-dimensional array ArrayA_2 with 100 elements is used to store the difference in optical attenuation between adjacent light outputs of detector A; a new array containing 100 elements is created in the memory of computer A. A one-dimensional array ArrayA_3 with q elements is created to store the amplitude of adjacent light attenuation changes output by detector A. An array ArrayAB with q elements is created in the memory of computer A to store the quantization boundary sequence calculated by computer A, where q is a positive integer. A list ListA is created in the memory of computer A to store the quantization partitioning results; ListA is initially empty. A list ListAL is created in the memory of computer A to store the Gray code sequence converted from the quantization partitioning results; ListAL is initially empty.

[0061] Step 202: At time t A The acquisition program of laser transceiver A samples the amplitude of the electrical signal output by detector A once to obtain a sample value C001; and assigns the sample value C001 to the CounterA-th element of array ArrayA.

[0062] Step 203: Let CounterA = CounterA + 1; Let t A =t A +δ t δ t The sampling time interval;

[0063] Step 204: If CounterA>N, proceed to Step 205; otherwise, proceed to Step 202.

[0064] Step 205: On computer A, use the program to sequentially target... Perform the following operation: Normalize each sample value in array ArrayA:

[0065] Step 205-1: Let This represents the i-th sampled value in array ArrayA; This represents the result after normalizing the i-th sample value in array ArrayA;

[0066] Step 205-2: Let Assign the value to the i-th element of array ArrayA_1 ;in and All are positive integers;

[0067] Step 206: Target each step in turn. Perform the following operations:

[0068] Step 206-1: Let Let represent the value of the i-th element in array ArrayA_1. ;

[0069] Step 206-2: Assign the value to the i-th element of array ArrayA_2. , that is to say ,like Figure 2 As shown in step ①;

[0070] Step 207: Let This represents the value of the i-th element in array ArrayA_2, respectively targeting... Assign the value to the i-th element of array ArrayA_3 ,in ,like Figure 2 As shown in step ②; where This indicates taking the absolute value of x;

[0071] Step 208: Calculate the empirical cumulative distribution function of the values ​​of the elements in array ArrayA_2. , respectively targeting ,make ,calculate , in turn Store the sequence in array ArrayAB; use the sequence in array ArrayAB as quantization boundaries to extract random bit sequences; where q represents the number of preset quantization boundaries;

[0072] Step 209: Laser transceiver A sends array A_2 and array AB to laser transceiver B.

[0073] 2) The third part of this method involves performing the following operations in laser transceiver B:

[0074] Step 301: In the acquisition program of computer B, create a counter CounterB and set CounterB=1; set time t... B =0; Create a one-dimensional array ArrayB with N elements in the memory of computer B. ArrayB is used to store the amplitude sampled values ​​of the electrical signal output by detector B; Create a one-dimensional array ArrayB_1 with N elements in the memory of computer B. ArrayB_1 is used to store the result of normalization processing of the sampled values ​​in arrayB; Create a one-dimensional array ArrayB_1 with N elements in the memory of computer B; A one-dimensional array ArrayB_2 with 100 elements is used to store the difference in optical attenuation between adjacent light outputs of detector B; a new array containing 100 elements is created in the memory of computer B. A one-dimensional array ArrayB_3 with 1 element is used to store the result of processing array ArrayA_3; a list ListB is created in the memory of computer B to store the quantization partitioning result, and ListB is made empty; a list ListBL is created in the memory of computer B to store the Gray code sequence obtained by converting the quantization partitioning result, and ListBL is made empty.

[0075] Step 302: At time t B Laser transceiver B samples the amplitude of the electrical signal output by detector B to obtain a sample value D001; the CounterB-th element of array ArrayB is assigned the sample value D001.

[0076] Step 303: Let CounterB = CounterB + 1; Let t B =t B +δ t δ t The sampling time interval;

[0077] Step 304: If CounterB > N, proceed to Step 305; otherwise, proceed to Step 302.

[0078] Step 305: In computer B, use the program to sequentially target... Perform the following operation: Normalize each sample value in array ArrayB:

[0079] Step 305-1: Let This represents the i-th sampled value in array ArrayB; This represents the result after normalizing the i-th sample value in array ArrayB;

[0080] Step 305-2: Let Assign the value to the i-th element of array ArrayB_1 ;in and All are positive integers;

[0081] Step 306: Target each one in turn Perform the following operations:

[0082] Step 306-1: Let Let the value of the i-th element in array ArrayB_1 be represented by... ;

[0083] Step 306-2: Assign the value to the i-th element of array ArrayB_2. , that is to say ,like Figure 2 As shown in step ③.

[0084] 4) The fourth part of this method performs the following operations after laser transceiver B receives the arrays ArrayA_2 and ArrayAB sent by laser transceiver A:

[0085] Step 401: Let This represents the value of the i-th element in array ArrayA_3, respectively targeting... ,judge Check if the above formula is true. If it is true, then assign the value to the i-th element in array ArrayB_3. , that is to say If the above formula is not true, then the i-th element in array ArrayB_3 will be assigned a value. , that is to say ,like Figure 2 As shown in step ④;

[0086] Step 402: Target each step in turn. Perform the following operations:

[0087] Step 403-1: Let j = 1;

[0088] Step 403-2: Judgment Check if the condition is true. If true, then add the i-th element from list B. Assigned value ;

[0089] Step 403-3: If This is not true; judgment is invalid. Is it true? If it is true, then let... Proceed to Step 403-2 if necessary, otherwise proceed to Step 403-4.

[0090] Step 403-4: If If this condition is not met, then the i-th element in ListB will be removed. Assign the value j;

[0091] Step 404: Let This represents the value of the i-th element in list B, which is then used to represent the values ​​of the elements in the list B. ,Will Convert to Gray code and store in listListBL.

[0092] 5) The fifth part of this method involves performing a quantization operation in laser transceiver A:

[0093] Step 501: Target each step in turn. Perform the following operations:

[0094] Step 501-1: Let j = 1;

[0095] Step 501-2: Judgment Check if the condition is true. If true, then add the i-th element from list ListA. Assigned value ;

[0096] Step 501-3: If This is not true; judgment is invalid. Is it true? If it is true, then let... Proceed to Step 501-2 if necessary, otherwise proceed to Step 501-4.

[0097] Step 501-4: If This is not true; remove the i-th element from list ListA. Assign the value j;

[0098] Step 502: Let This represents the value of the i-th element in list ListA, which is then used to represent the values ​​of the elements in each list. ,Will Convert to Gray code and store in listListAL.

[0099] 6) In the sixth part of this method, inconsistencies in the original shared random bit sequences extracted by laser transceiver A and laser transceiver B are corrected. The specific steps are as follows:

[0100] Step 701: Use error estimation, key negotiation, and error checking techniques in quantum key distribution post-processing to find and correct inconsistent bits in the original shared random bit sequences stored in ListA and ListB, so that the random bits in ListA and ListB are consistent, and the laser transceiver A and laser transceiver B have the same bit sequence.

[0101] When implementing this method, the first part of this method is executed first, followed by the second and third parts of this method being executed simultaneously, then the fourth and fifth parts being executed simultaneously, and finally the sixth part of this method is executed.

[0102] In this embodiment, δ t=1 millisecond; q=63; The output light intensity of laser A and laser B is stable in time. The output light intensity of laser A and laser B is the same, and the inconsistency rate of the initial shared random bit sequence obtained by quantization is 0.003.

[0103] Those skilled in the art will understand that arrays and lists are concepts in computer programming; they are collections of elements arranged in a sequential order and are containers for storing data. Regarding lists, a detailed description is provided in Chapter 2, Section 2.1 of the book *Data Structures (C Language Edition)*, edited by Yan Weimin and Wu Weimin, published by Tsinghua University Press (ISBN 978-7-302-14751-0). Regarding arrays, detailed descriptions are provided in Chapter 5, Sections 5.1 and 5.2 of the same book. In this embodiment, the elements of both arrays and lists are numbered starting from 1. For an array or list containing N elements, the first element stored is called the 1st element, and the last element stored is called the Nth element. The book *Probability and Statistics, 4th Edition*, authored by Morris H. DeGroot and Mark J. Schervish (ISBN 978-0-321-50046-5), published by Pearson Education, is also relevant. Page 658 of the edition describes the method for calculating the empirical cumulative distribution function. In step 208, array Array_2 is actually a set of random observation samples, and the empirical cumulative distribution function of the random observations can be calculated based on array Array_2. ;Calculate the quantization boundary in step Step 208 In this case, q is generally set to 2. m -1, where m is a positive integer and j is also a positive integer.

Claims

1. A method for extracting shared random bits based on the amplitude of adjacent optical attenuation changes during transmission, characterized in that, The required hardware system and execution steps are as follows: The technical solution of this method is implemented as follows: a method for extracting shared random bits from the amplitude of optical attenuation changes at both ends of the channel, characterized by the following hardware system and execution steps: Laser transceiver A and laser transceiver B are required, and they are mutually line-of-sight. Laser transceiver A includes a laser A, a transceiver optical system A, a detector A, and a computer A. Laser transceiver B includes a laser B, a transceiver optical system B, a detector B, and a computer B. The laser signal A001 emitted by laser A is transmitted into an atmospheric turbulence channel via transceiver optical system A, and then reaches transceiver optical system B before being incident on detector B. The laser signal B001 emitted by laser B is transmitted into an atmospheric turbulence channel via transceiver optical system B, and then reaches transceiver optical system A before being incident on detector A. Computer A collects the electrical signals output by detector A in real time, and computer B collects the electrical signals output by detector B in real time. 1) The first part of this method enables laser transceiver A and laser transceiver B to function normally. Specific operations include: Step 101: Make laser A and laser B work normally, make detector A and detector B work normally, make computer A and computer B work normally, and make transceiver optical system A and transceiver optical system B aligned and working normally. 2) The second part of this method involves performing the following operations in laser transceiver A: Step 201: In the data acquisition program of computer A, create a counter CounterA and set CounterA=1; set time t... A =0; Create a one-dimensional array ArrayA with N elements in the memory of computer A. ArrayA is used to store the amplitude sampled values ​​of the electrical signal output by detector A; Create a one-dimensional array ArrayA_1 with N elements in the memory of computer A. ArrayA_1 is used to store the result of normalization processing of the sampled values ​​in arrayA; Create a one-dimensional array ArrayA_1 with N elements in the memory of computer A; A one-dimensional array ArrayA_2 with 100 elements is used to store the difference in optical attenuation between adjacent light outputs of detector A; a new array containing 100 elements is created in the memory of computer A. A one-dimensional array ArrayA_3 with q elements is created to store the amplitude of adjacent light attenuation changes output by detector A. An array ArrayAB with q elements is created in the memory of computer A to store the quantization boundary sequence calculated by computer A, where q is a positive integer. A list ListA is created in the memory of computer A to store the quantization partitioning results; ListA is initially empty. A list ListAL is created in the memory of computer A to store the Gray code sequence converted from the quantization partitioning results; ListAL is initially empty. Step 202: At time t A The acquisition program of laser transceiver A samples the amplitude of the electrical signal output by detector A once to obtain a sample value C001; and assigns the sample value C001 to the CounterA-th element of array ArrayA. Step 203: Let CounterA = CounterA + 1; Let t A =t A +δ t δ t The sampling time interval; Step 204: If CounterA>N, proceed to Step 205; otherwise, proceed to Step 202. Step 205: On computer A, use the program to sequentially target... Perform the following operation: Normalize each sample value in array ArrayA: Step 205-1: Let This represents the i-th sampled value in array ArrayA; This represents the result after normalizing the i-th sample value in array ArrayA; Step 205-2: Let Assign the value to the i-th element of array ArrayA_1 ;in and All are positive integers; Step 206: Target each step in turn. Perform the following operations: Step 206-1: Let Let represent the value of the i-th element in array ArrayA_1. ; Step 206-2: Assign the value to the i-th element of array ArrayA_2. , that is to say ; Step 207: Let This represents the value of the i-th element in array ArrayA_2, respectively targeting... Assign the value to the i-th element of array ArrayA_3 ,in ;in This indicates taking the absolute value of x; Step 208: Calculate the empirical cumulative distribution function of the values ​​of the elements in array ArrayA_2. , respectively targeting ,make ,calculate , in turn Store the sequence in array ArrayAB; use the sequence in array ArrayAB as quantization boundaries to extract random bit sequences; where q represents the number of preset quantization boundaries; Step 209: Laser transceiver A sends array A_2 and array AB to laser transceiver B; 2) The third part of this method involves performing the following operations in laser transceiver B: Step 301: In the acquisition program of computer B, create a counter CounterB and set CounterB=1; set time t... B =0; Create a one-dimensional array ArrayB with N elements in the memory of computer B. ArrayB is used to store the amplitude sampled values ​​of the electrical signal output by detector B; Create a one-dimensional array ArrayB_1 with N elements in the memory of computer B. ArrayB_1 is used to store the result of normalization processing of the sampled values ​​in arrayB; Create a one-dimensional array ArrayB_1 with N elements in the memory of computer B; A one-dimensional array ArrayB_2 with 100 elements is used to store the difference in optical attenuation between adjacent light outputs of detector B; a new array containing 100 elements is created in the memory of computer B. A one-dimensional array ArrayB_3 with 1 element is used to store the result of processing array ArrayA_3; a list ListB is created in the memory of computer B to store the quantization partitioning result, and ListB is made empty; a list ListBL is created in the memory of computer B to store the Gray code sequence obtained by converting the quantization partitioning result, and ListBL is made empty. Step 302: At time t B Laser transceiver B samples the amplitude of the electrical signal output by detector B to obtain a sample value D001; the CounterB-th element of array ArrayB is assigned the sample value D001. Step 303: Let CounterB = CounterB + 1; Let t B =t B +δ t δ t The sampling time interval; Step 304: If CounterB > N, proceed to Step 305; otherwise, proceed to Step 302. Step 305: In computer B, use the program to sequentially target... Perform the following operation: Normalize each sample value in array ArrayB: Step 305-1: Let This represents the i-th sampled value in array ArrayB; This represents the result after normalizing the i-th sample value in array ArrayB; Step 305-2: Let Assign the value to the i-th element of array ArrayB_1 ;in and All are positive integers; Step 306: Target each one in turn Perform the following operations: Step 306-1: Let Let the value of the i-th element in array ArrayB_1 be represented by... ; Step 306-2: Assign the value to the i-th element of array ArrayB_2. , that is to say ; 4) The fourth part of this method performs the following operations after laser transceiver B receives the arrays ArrayA_2 and ArrayAB sent by laser transceiver A: Step 401: Let This represents the value of the i-th element in array ArrayA_3, respectively targeting... ,judge Check if the above formula is true. If it is true, then assign the value to the i-th element in array ArrayB_3. , that is to say If the above formula is not true, then the i-th element in array ArrayB_3 will be assigned a value. , that is to say ; Step 402: Target each step in turn. Perform the following operations: Step 403-1: Let j = 1; Step 403-2: Judgment Check if the condition is true. If true, then add the i-th element from list B. Assigned value ; Step 403-3: If This is not true; judgment is invalid. Is it true? If it is true, then let... Proceed to Step 403-2 if necessary, otherwise proceed to Step 403-4. Step 403-4: If If this condition is not met, then the i-th element in ListB will be removed. Assign the value j; Step 404: Let This represents the value of the i-th element in list B, which is then used to represent the values ​​of the elements in the list B. ,Will Convert to Gray code and store them sequentially in listListBL; 5) The fifth part of this method involves performing a quantization operation in laser transceiver A: Step 501: Target each step in turn. Perform the following operations: Step 501-1: Let j = 1; Step 501-2: Judgment Check if the condition is true. If true, then add the i-th element from list ListA. Assigned value ; Step 501-3: If This is not true; judgment is invalid. Is it true? If it is true, then let... Proceed to Step 501-2 if necessary, otherwise proceed to Step 501-4. Step 501-4: If This is not true; remove the i-th element from list ListA. Assign the value j; Step 502: Let This represents the value of the i-th element in list ListA, which is then used to represent the values ​​of the elements in each list. ,Will Convert to Gray code and store them sequentially in listListAL; 6) In the sixth part of this method, inconsistencies in the original shared random bit sequences extracted by laser transceiver A and laser transceiver B are corrected. The specific steps are as follows: Step 701: Use error estimation, key negotiation, and error checking techniques in quantum key distribution post-processing to find and correct inconsistent bits in the original shared random bit sequences stored in ListA and ListB, so that the random bits in ListA and ListB are consistent, and the laser transceiver A and laser transceiver B have the same bit sequence. When implementing this method, the first part of the method is executed first, followed by the second and third parts of the method being executed simultaneously, then the fourth and fifth parts being executed simultaneously, and finally the sixth part of the method being executed.