Method and device for carrying out key distribution by utilizing short-time correlation of optical fiber channel

By using fiber channel short-term correlation, group comparison and bit error rate quantification coding to generate keys and enhance confidentiality, the problem of insufficient security and high cost of fiber physical layer key distribution technology is solved, and an efficient and secure solution is achieved. key distribution system.

CN119341741APending Publication Date: 2025-01-21南昌理工学院
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411458079.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing fiber optic physical layer key distribution technology has problems such as insufficient security, limited key distribution rate and distance, and is relatively expensive and is not suitable for large-scale commercial use.

Method used

Using the short-term correlation of the optical fiber channel, the two communicating parties send binary data streams at the same time, group them according to odd and even bits, compare the received data and the sent data, remove inconsistent bits, calculate the bit error rate, and perform quantized coding. Generate the original key and perform confidentiality enhancement on it.

Benefits of technology

It achieves high security, high key generation rate and long-distance key transmission, reduces costs, and is suitable for large-scale commercial use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119341741A_ABST
    Figure CN119341741A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of optical fiber physical layer key distribution, in particular to a method and a device for carrying out key distribution by utilizing optical fiber channel short-time correlation. Comprising the following steps: two communication parties simultaneously send binary data streams to each other; data sent by both communication parties are divided into two groups according to odd bits and even bits; the two communication parties compare the received data with the sent data and tell the opposite party of the inconsistent bit positions of the data, and the opposite party rejects the data of the corresponding bits; the two communication parties respectively calculate the bit error rate of the remaining data; the two communication parties respectively carry out quantization coding on the bit error rate to obtain an original key; and performing confidentiality enhancement processing on the original key to obtain a final key. A parallel interaction scheme and an odd-even staggered arrangement data transmission scheme are adopted in the design, so that the data transmission time can be remarkably shortened, the short-time correlation of optical fiber channels can be better utilized, and the consistency of keys is improved; the requirement of high-capacity key transmission is met, and the requirement of secure key transmission is also ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of optical fiber physical layer key distribution, in particular to a method and device for key distribution using short-time correlation of optical fiber channels. Background Art

[0002] With the rapid development of new technologies for optical layer transmission, switching and networking, the speed and distance of optical communications have been greatly improved, and the openness of optical network infrastructure has been significantly enhanced. However, the existing optical communication system is not secure, and the optical fiber transmission process is basically in an unprotected state. The optical signal can be directly eavesdropped from the optical cable or optical amplifier and the data information carried can be analyzed and intercepted. As the physical layer security threats and impacts become increasingly prominent, it is necessary to rethink and examine the inherent connection between communication and security, and study the optical fiber physical layer security communication technology.

[0003] In order to improve the security of the communication system, it is necessary to provide secure and reliable consistent keys for both parties in communication. At present, the fiber optic physical layer key distribution technologies mainly include: quantum key distribution, polarization-dependent key distribution, visible light key distribution, etc. Quantum key distribution technology requires expensive equipment, and the key distribution rate and distance are limited. Polarization-dependent key and visible light key distribution require the transformation of optical fiber links and are not suitable for large-scale applications.

[0004] The short-term correlation of the optical fiber channel refers to the sampling of the characteristics of the optical fiber physical channel in a very short time, and the discovery of the characteristic change is relatively small, with the characteristic of continuous change. Based on this characteristic, the consistency of key distribution can be guaranteed. It is crucial to use the short-term correlation of the optical fiber channel to invent a key distribution system with high security, high key generation rate, and long key transmission distance.

[0005] How to improve the key distribution rate, how to ensure the key security, and how to reduce the cost for large-scale commercial use by using the short-term correlation of the optical fiber channel are urgent problems to be solved. In view of this, we propose a method and device for key distribution using the short-term correlation of the optical fiber channel to ensure the security of key distribution. Summary of the invention

[0006] The object of the present invention is to provide a method and device for key distribution using short-term correlation of optical fiber channels to solve the problems raised in the above background technology.

[0007] To solve the above technical problems, one of the purposes of the present invention is to provide a method for key distribution using short-term correlation of an optical fiber channel, comprising the following steps:

[0008] S1, both communicating parties send binary data streams of equal size to each other at the same time;

[0009] S2. The data sent by both communicating parties are divided into two groups according to odd bits and even bits, wherein the odd bits of the two groups of data are used by one party, and the even bits of the two groups of data are used by the other party;

[0010] S3, the communicating parties compare the received data with the sent data, tell the other party the bit positions of the inconsistent data, and the other party removes the data of the corresponding bits;

[0011] S4, the communicating parties respectively calculate the bit error rate of the remaining data; the bit error rate reflects the physical characteristics of the optical fiber channel;

[0012] S5, the communicating parties quantize and encode the bit error rate respectively to obtain the original key;

[0013] S6. Perform confidentiality enhancement and other processing on the original key to obtain the final key.

[0014] As a further improvement of the technical solution, in step S1, both communicating parties simultaneously send binary data streams to each other as follows:

[0015] Assume that the two communicating parties are communication party A and communication party B, and both communication parties A and B send binary data streams of equal size to each other at the same time.

[0016] As a further improvement of the technical solution, in step S2, the specific process of dividing the data sent by both communicating parties into two groups according to odd bits and even bits is as follows:

[0017] The binary data stream sent by communication party A is transmitted in the order of odd bits (A1, A2, ..., A n ) and even-numbered digits (B1, B2, ..., B n ) were divided into two groups;

[0018] The binary data stream sent by communication party B is divided into odd bits (A n+1 ,A n+2 ,...,A 2n ) and even-numbered digits (B n+1 ,B n+2 ,...,B 2n ) were divided into two groups;

[0019] Assume that odd-numbered bits are used by communication party A and even-numbered bits are used by communication party B, then:

[0020] The even-numbered bits (B1, B2, ..., B n ) is received by the communication party B as (B'1, B'2, ..., B' n );

[0021] The odd number of bits sent by communication party B (A n+1 , An+2 , ..., A 2n ) is received by the communication party A as (A′ n+1 , A′ n+2 , ..., A′ 2n );

[0022] Right now:

[0023] The communication party A has a communication with the data (A1, A2, ..., A n , A′ n+1 , A′ n+2 , ..., A′ 2n ) is processed; the communication party B processes the data (B′1, B′2, ..., B′ n , B n+1 , B n+2 , ..., B 2n ) for processing.

[0024] As a further improvement of the technical solution, in step S3, the communicating parties compare the received data with the sent data, tell the other party the bit positions of the inconsistent data, and the other party removes the data of the corresponding bits, specifically:

[0025] The communication party A will receive the odd-numbered data (A' n+1 , A′ n+2 , ..., A′ 2n ) and the odd-numbered bits of data sent (A1, A2, ..., A n ) compare bit by bit;

[0026] The communication party B receives the even-numbered data (B′1, B′2, ..., B′ n ) and the even-numbered bits sent (B n+1 , B n+2 , ..., B 2n ) compare bit by bit;

[0027] The communicating parties A and B sort out the bit position information of the inconsistent data respectively and inform each other through the communication channel;

[0028] The communicating parties A and B respectively remove the data at the corresponding bit positions in the data they have processed based on the inconsistent bit position information of the data informed by the other party.

[0029] As a further improvement of the technical solution, in step S4, the communication parties respectively calculate the bit error rate of the remaining data as follows:

[0030] The bit error rate BER1 of the remaining data of communication party A is:

[0031] BER1=E1 / N1

[0032] Where E1 is the number of bits that have errors during the transmission of communication party A, and N1 is the total number of odd-bit data bits sent by communication party A;

[0033] The bit error rate BER2 of the remaining data of communication party B is:

[0034] BER2=E2 / N2

[0035] Where E2 is the number of bits that are erroneous during the transmission process of communication party B, and N2 is the total number of odd-bit data bits sent by communication party B;

[0036] The number of bits that have errors during the transmission process is calculated by comparing the sent data with the received and retained data.

[0037] As a further improvement of the technical solution, in step S5, the communicating parties respectively quantize and encode the bit error rate to obtain the original key, which specifically includes the following steps:

[0038] S5.1, setting quantization interval: dividing the possible value range of the bit error rate into several intervals;

[0039] S5.2, determining a quantization value: assigning a quantization value to each quantization interval;

[0040] S5.3, quantizing: according to the interval where the bit error rate is located, corresponding to the corresponding quantized value;

[0041] S5.4, quantization sequence generation: the communicating parties A and B respectively quantize and encode the bit error rates calculated by themselves to obtain the corresponding quantization value sequence;

[0042] S5.5. Original key generation: The communicating parties A and B respectively use the corresponding quantized value sequence calculated by themselves as part of their original key.

[0043] As a further improvement of the technical solution, in step S6, the means of performing confidentiality enhancement processing on the original key is one or more combinations of encryption, hash operation, key expansion, randomization, multi-layer encryption, key segmentation, regular update and secure storage; wherein:

[0044] Encryption processing: Use encryption algorithms to encrypt the original key to increase the confidentiality of the key; symmetric encryption algorithms or asymmetric encryption algorithms can be used to ensure that only authorized communication parties can decrypt and use the key;

[0045] Hash operation: Perform a hash operation on the original key to generate a hash value of fixed length; the hash value can be used to verify the integrity and consistency of the key to prevent the key from being tampered with;

[0046] Key expansion: Through the key expansion algorithm, the original key is expanded into a longer key sequence to increase the complexity and security of the key;

[0047] Randomization: Randomize the original key, such as adding random noise or performing random transformation, to make the key more difficult to predict and crack;

[0048] Multi-layer encryption: Use multi-layer encryption to encrypt the original key multiple times to increase the difficulty of cracking;

[0049] Key splitting: Split the original key into multiple parts, store or transmit them separately, and combine them only when needed to reduce the risk of key leakage;

[0050] Regular update: Regularly update the original key to reduce the chance of the key being attacked or cracked;

[0051] Secure storage: Store the original key in a secure medium or device, and take measures such as access control and encrypted storage to ensure the secure storage of the key.

[0052] As a further improvement of the technical solution, the specific operation process of the key expansion is as follows:

[0053] A key stretching algorithm is an algorithm used to increase the length or complexity of a key to improve the security of an encryption system.

[0054] Assume that the original key is K and has a length of n bits; it needs to be extended to an extended key K' with a length of m bits. The specific steps include the following:

[0055] C1, initialize the extended key K' to empty;

[0056] C2, copy the original key K to the first n bits of the extended key K';

[0057] C3. For the remaining mn bits, generate them in the following way:

[0058] Define a function f that takes the current key bit and some other parameters (such as the number of iterations) as input and outputs a bit;

[0059] Starting from the n+1th bit, calculate each bit in turn:

[0060] The value of bit i is f(K'[in],i), where K'[in] is one of the first n bits of the extended key K' and i is the index of the current bit;

[0061] C4. Repeat step C3 until the length of the extended key K' reaches m bits.

[0062] As a further improvement of the technical solution, the specific operation process of the randomization process is as follows:

[0063] D1. Generate a random number seed: Use a random number generator to generate a random number seed; this seed will be used in the subsequent random number generation process to ensure that the result of each randomization process is different;

[0064] D2. Disrupt the original key sequence: Based on the random number seed, use a certain scrambling algorithm (such as a shuffling algorithm) to scramble the bits or bytes of the original key; for example, the scrambling effect can be achieved by randomly exchanging bits or bytes at certain positions in the original key;

[0065] D3. Add random noise: Add random noise to the scrambled key. This can be achieved by generating some random bits or bytes and performing an XOR operation on them with the key.

[0066] D4. Repeating steps: The above steps D1-D3 may be repeated as many times as needed to further increase the degree of randomization.

[0067] The second object of the present invention is to provide a device for key distribution using short-time correlation of optical fiber channels, which is used to implement the steps of the above-mentioned method for key distribution using short-time correlation of optical fiber channels, including system terminals of two communicating parties connected by optical fiber channel signals, each system terminal including a data processing module, a modulator, a demodulator, a transmitter and a receiver; wherein:

[0068] The transmitter in one system terminal is connected to the receiver in another system terminal through an optical fiber channel, so that two data stream transmission channels in opposite directions are formed between the two system terminals of the communicating parties;

[0069] The binary data stream in one system terminal is sent to another system terminal through a modulator and a transmitter in sequence;

[0070] The receiver in one system terminal receives the binary data stream sent from another system terminal and passes through the receiver and demodulator in sequence;

[0071] In each system terminal, the binary data stream sent out by itself and the binary data stream received from another system terminal are both transmitted to the data processing module for data processing.

[0072] Compared with the prior art, the present invention has the following beneficial effects:

[0073] 1. In the method and device for key distribution using short-term correlation of optical fiber channels, the communicating parties adopt a parallel interaction scheme. Compared with the serial interaction scheme, the key distribution rate is higher and the consistency is better. The odd-even interleaved data transmission scheme makes full use of the short-term correlation of the optical fiber channel, improves the consistency of the key, and realizes a high-speed, high-consistency, and high-security key distribution system;

[0074] 2. The method and device for key distribution using short-time correlation of optical fiber channels can directly use the existing optical communication system and transform the digital signal processing part of the existing communication system without changing other equipment of the communication link or adding additional transmission equipment. It is an economical and practical solution for improving communication capacity and security, and is suitable for large-scale promotion;

[0075] 3. The method and device for key distribution using the short-time correlation of the optical fiber channel can, on the one hand, significantly shorten the data transmission time; on the other hand, it can better utilize the short-time correlation of the optical fiber channel to improve the consistency of the key; it not only meets the needs of large-capacity key transmission, but also ensures the needs of secure key transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 It is a system block diagram of an exemplary device for key distribution using short-time correlation of an optical fiber channel in the present invention;

[0077] Figure 2 It is an exemplary block diagram of the principle of data transmission of odd-even interleaved arrangement in the present invention;

[0078] Figure 3 It is a principle block diagram of an exemplary data serial interaction scheme in the present invention;

[0079] Figure 4 It is a principle block diagram of an exemplary data parallel interaction solution in the present invention;

[0080] 100, data processing module; 200, modulator; 300, demodulator; 400, transmitter; 500, receiver; 600, optical fiber channel. DETAILED DESCRIPTION

[0081] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0082] Example 1

[0083] like Figure 1 As shown, this embodiment provides a device for key distribution using short-time correlation of an optical fiber channel, including system terminals of two communicating parties connected by optical fiber channel 600 signals, each system terminal including a data processing module 100, a modulator 200, a demodulator 300, a transmitter 400 and a receiver 500; wherein:

[0084] The transmitter 400 in one system terminal is signal-connected to the receiver 500 in another system terminal through the optical fiber channel 600, so that two data stream transmission channels in opposite directions are formed between the two system terminals of the communicating parties;

[0085] The binary data stream in one system terminal is sent to another system terminal via the modulator 200 and the transmitter 400 in sequence;

[0086] The receiver 500 in one system terminal receives the binary data stream sent from another system terminal and passes through the receiver 500 and the demodulator 300 in sequence;

[0087] In each system terminal, the binary data stream sent out by itself and the binary data stream received from another system terminal are both transmitted to the data processing module 100 for data processing.

[0088] like Figure 2-Figure 4 As shown, this embodiment also provides a method for key distribution using short-time correlation of optical fiber channels. Based on the above-mentioned device for key distribution using short-time correlation of optical fiber channels, the method includes the following steps:

[0089] S1, both parties send binary data streams to each other at the same time; Figure 4 As shown in ①②;

[0090] In this step, it is assumed that the communicating parties are communicating party A and communicating party B, and both communicating parties A and B send binary data streams of the same size to each other at the same time; for example, both communicating parties A and B send 2n bits of binary data respectively.

[0091] S2. The data sent by both communicating parties are divided into two groups according to odd bits and even bits, wherein the odd bits of the two groups of data are used by one party, and the even bits of the two groups of data are used by the other party; communicating party A processes the odd bits of data in the data processing module 100 of its system terminal, and communicating party B processes the even bits of data in the data processing module 100 of its system terminal;

[0092] like Figure 2 As shown, the specific process of this step is:

[0093] The binary data stream sent by communication party A (A1, B1, A2, B2, ..., An , B n ) according to the odd digits (A1, A2, ..., A n ) and even-numbered bits (B1, B2, ..., B n ) were divided into two groups;

[0094] The binary data stream sent by communication party B (A n+1 , B n+1 , A n+2 , A n+2 , ..., A 2n ., B 2n )According to the odd digit (A n+1 , A n+2 , ..., A 2n ) and even-numbered digits (B n+1 , B n+2 , ..., B 2n ) were divided into two groups;

[0095] Assume that odd-numbered bits are used by communication party A and even-numbered bits are used by communication party B, then:

[0096] The even-numbered bits (B1, B2, ..., B n ) is received by communication party B as (B′1, B′2, ..., B′ n );

[0097] The odd number of bits sent by communication party B (A n+1 , A n+2 , ..., A 2n ) is received by the communication party A as (A′ n+1 , A′ n+2 , ..., A′ 2n );

[0098] Right now:

[0099] The communication party A has a communication with the data (A1, A2, ..., A n , A′ n+1 , A′ n+2 , ..., A′ 2n ) is processed; the communication party B processes the data (B′1, B′2, ..., B′ n , B n+1 , B n+2 , ..., B 2n ) for processing.

[0100] Such grouping and data processing distribution fully utilizes the short-term correlation of the optical fiber channel and helps to improve the consistency and security of subsequent key distribution.

[0101] S3. The two communicating parties compare the received data with the sent data, and inform the other party of the bit positions where the data is inconsistent, and the other party removes the data of the corresponding bits. The specific process of this step is:

[0102] The communication party A will receive the odd-numbered data (A' n+1 , A′ n+2 , ..., A′ 2n ) and the odd-numbered bits of data sent (A1, A2, ..., A n ) compare bit by bit;

[0103] The communication party B receives the even-numbered data (B′1, B′2, ..., B′ n ) and the even-numbered bits sent (B n+1 , B n+2 , ..., B 2n ) compare bit by bit;

[0104] The communicating parties A and B sort out the bit position information of the inconsistent data respectively and inform each other through the communication channel;

[0105] The communicating parties A and B respectively remove the data at the corresponding bit positions from their processed data according to the inconsistent bit position information of the data informed by the other party; Figure 4 As shown in ③④.

[0106] For example, suppose the data sent by communication party B (B n+1 , B n+2 , ..., B 2n ) and the received data (B′1, B′2, ..., B′ n ), the communication party B notifies the communication party A of the "inconsistency in the 5th bit", and the communication party A removes the 5th bit of data from the data it has processed. Similarly, the communication party A also operates in a similar manner. Through such detailed steps, it can be ensured that the communication parties accurately remove the inconsistent data bits, preparing for the subsequent calculation of the bit error rate and the generation of the key.

[0107] S4, the communicating parties respectively calculate the bit error rate of the remaining data; the bit error rate reflects the physical characteristics of the optical fiber channel;

[0108] In this step, the specific algorithm includes:

[0109] The bit error rate BER1 of the remaining data of communication party A is:

[0110] BER1=E1 / N1

[0111] Where E1 is the number of bits that have errors during the transmission of communication party A, and N1 is the total number of odd-bit data bits sent by communication party A;

[0112] The bit error rate BER2 of the remaining data of communication party B is:

[0113] BER2=E2 / N2

[0114] Where E2 is the number of bits that are erroneous during the transmission process of communication party B, and N2 is the total number of odd-bit data bits sent by communication party B;

[0115] The number of bits that have errors during the transmission process is calculated by comparing the sent data with the received and retained data.

[0116] For example, suppose the odd-bit data sent by communication party A is 10110, and the total number of bits N1 = 5. After receiving and removing the corresponding bits, the remaining data is 10010. Compared with the sent data, the third bit is wrong. Then the number of wrong bits E1 = 1, and the bit error rate BER1 = 1 / 5 = 0.2. Similarly, the calculation process of communication party B is similar to that of communication party A.

[0117] Through such refinement and improvement, the bit error rate can be calculated more accurately, thereby more accurately reflecting the physical characteristics of the optical fiber channel and providing a more reliable basis for subsequent key generation.

[0118] S5, the communicating parties quantize and encode the bit error rate respectively to obtain the original key;

[0119] This step specifically includes the following steps:

[0120] S5.1, set quantization interval: divide the possible value range of the bit error rate into several intervals; suppose you want to divide the range of the bit error rate into five intervals [0, 0.1), [0.1, 0.2), [0.2, 0.3), [0.3, 0.4), [0.4, 0.5), then you need to first clarify the starting and ending bit error rate values ​​of each interval in turn, such as the starting value of the first interval [0, 0.1) is 0, and the ending value is 0.1 (excluding 0.1);

[0121] S5.2, determine the quantization value: assign a quantization value to each quantization interval; assign a unique quantization value to each of the above five intervals, such as assigning quantization values ​​0, 1, 2, 3, and 4 to the five intervals in sequence;

[0122] S5.3, quantization: according to the interval of the bit error rate, correspond it to the corresponding quantization value; suppose: the bit error rate calculated by communication party A is 0.15, and the quantization value is 1 after quantization coding; the bit error rate calculated by communication party B is 0.08, and the quantization value is 0 after quantization coding; then the original keys of communication party A and communication party B contain quantization values ​​1 and 0 respectively;

[0123] S5.4, quantization sequence generation: the communicating parties A and B respectively quantize and encode the bit error rates calculated by themselves to obtain the corresponding quantization value sequence;

[0124] S5.5. Original key generation: The communicating parties A and B respectively use the corresponding quantized value sequence calculated by themselves as part of their original key.

[0125] Through such optimization and refinement, the bit error rate can be processed more effectively, and a more secure and reliable original key can be obtained, laying the foundation for subsequent confidentiality enhancement and other processing. In addition, in practical applications, the number and range of quantization intervals and the corresponding quantization values ​​can be reasonably set according to specific needs and the distribution of bit error rates. Such quantization interval settings help to quantize and encode the bit error rate more accurately, thereby better generating the original key.

[0126] S6, performing confidentiality enhancement and other processing on the original key to obtain the final key;

[0127] In this step, the means of enhancing the confidentiality of the original key is one or more combinations of encryption, hash operation, key expansion, randomization, multi-layer encryption, key segmentation, regular update and secure storage; these confidentiality enhancement means can be used alone or in combination, and the appropriate method can be selected according to the specific application scenario and security requirements to improve the security and confidentiality of the original key; among which:

[0128] Encryption processing: Use encryption algorithms to encrypt the original key to increase the confidentiality of the key; symmetric encryption algorithms or asymmetric encryption algorithms can be used to ensure that only authorized communication parties can decrypt and use the key;

[0129] Hash operation: Perform a hash operation on the original key to generate a hash value of fixed length; the hash value can be used to verify the integrity and consistency of the key to prevent the key from being tampered with;

[0130] Key expansion: Through the key expansion algorithm, the original key is expanded into a longer key sequence to increase the complexity and security of the key;

[0131] Randomization: Randomize the original key, such as adding random noise or performing random transformation, to make the key more difficult to predict and crack;

[0132] Multi-layer encryption: Use multi-layer encryption to encrypt the original key multiple times to increase the difficulty of cracking;

[0133] Key splitting: Split the original key into multiple parts, store or transmit them separately, and combine them only when needed to reduce the risk of key leakage;

[0134] Regular update: Regularly update the original key to reduce the chance of the key being attacked or cracked;

[0135] Secure storage: Store the original key in a secure medium or device, and take measures such as access control and encrypted storage to ensure the secure storage of the key.

[0136] The hashing algorithm can be refined and optimized in many ways. The following is a common example:

[0137] (1) Choose a suitable hash function: Choose a hash function with good randomness and collision resistance, such as SHA-256, SHA-512, etc. These hash functions can convert the input original key into a hash value of fixed length;

[0138] (2) Increasing the number of hash rounds: The security of hash operations can be improved by increasing the number of rounds of the hash function. Each round can include some complex operations, such as bit operations and logical operations, to increase the randomness of the hash value.

[0139] (3) Introducing Salt: Introducing a salt value in the hash operation. The salt value is a randomly generated string. The original key is combined with the salt value before the hash operation. This can increase the diversity of the hash value. Even if the original key is the same, the generated hash value will be different due to different salt values.

[0140] (4) Handling hash conflicts: When a hash conflict occurs (i.e., different inputs produce the same hash value), some conflict resolution strategies can be used, such as recalculating the hash value, using a linked list or other data structure to store the conflicting key-value pairs;

[0141] (5) Optimize the hash table structure: If a hash table is used to store hash values ​​and related data, the structure of the hash table can be optimized to improve storage and query efficiency; for example, select an appropriate hash table size, handle hash table expansion, etc.

[0142] (6) Combining with other encryption technologies: Hash operations can be combined with other encryption technologies, such as symmetric encryption and asymmetric encryption, to further enhance the security of the key;

[0143] (7) Regularly update the hash algorithm: With the improvement of computing power and the development of attack methods, the hash algorithm should be updated regularly to adapt to new security requirements.

[0144] Exemplarily, the steps of optimizing using the SHA-256 hash function may be as follows:

[0145] a. Generate a random salt value: Use a random number generator to generate a random salt value;

[0146] b. Combine the original key and salt value: Combine the original key and salt value by concatenation, hashing, etc.

[0147] c. Perform multiple hash operations: Perform multiple SHA-256 hash operations on the combined key to increase the complexity of the hash value;

[0148] d. Handle hash conflicts: If a hash conflict occurs, a linked list or other data structure can be used to store the conflicting key-value pairs and handle them during query;

[0149] e. Store hash value: Store the final generated hash value for subsequent verification and use.

[0150] Through the above-mentioned refinement and optimization, the security and reliability of hash operations can be improved, and the confidentiality of the original key can be enhanced. The specific optimization method should be selected and adjusted according to actual needs and security requirements.

[0151] Furthermore, the specific operation process of key expansion is as follows:

[0152] A key extension algorithm is an algorithm used to increase the length or complexity of a key to improve the security of an encryption system;

[0153] Assume that the original key is K, and its length is n bits; it is desired to be extended to an extended key K' with a length of m bits; the specific steps include the following:

[0154] C1, initialize the extended key K' to empty;

[0155] C2, copy the original key K to the first n bits of the extended key K′;

[0156] C3. For the remaining mn bits, generate them in the following way:

[0157] Define a function f that takes the current key bit and some other parameters (such as the number of iterations) as input and outputs a bit;

[0158] Starting from the n+1th bit, calculate each bit in turn:

[0159] The value of bit i is f(K′[in], i), where K′[in] is one of the first n bits of the extended key K′ and i is the index of the current bit;

[0160] C4. Repeat step C3 until the length of the extended key K′ reaches m bits.

[0161] The extended key K′ generated in this way is related to the original key K, but has a higher length and complexity, which increases the difficulty for attackers to crack the key. Of course, the key expansion algorithm in actual applications may be more complex and may combine multiple encryption technologies and hash functions to ensure the security of the key.

[0162] It should be noted that the specific implementation of the key expansion algorithm should be designed and selected according to the needs and security requirements of the encryption system. At the same time, the security of the key does not only depend on the key expansion algorithm, but is also closely related to other parts of the entire encryption system (such as encryption algorithm, key management, etc.).

[0163] Furthermore, the specific operation process of randomization is as follows:

[0164] D1. Generate a random number seed: Use a random number generator to generate a random number seed; this seed will be used in the subsequent random number generation process to ensure that the result of each randomization process is different;

[0165] D2. Disrupt the original key sequence: Based on the random number seed, use a certain scrambling algorithm (such as a shuffling algorithm) to scramble the bits or bytes of the original key; for example, the scrambling effect can be achieved by randomly exchanging bits or bytes at certain positions in the original key;

[0166] D3. Add random noise: Add random noise to the scrambled key. This can be achieved by generating some random bits or bytes and performing an XOR operation on them with the key.

[0167] D4. Repeating steps: The above steps D1-D3 may be repeated as many times as needed to further increase the degree of randomization.

[0168] Through the above randomization processing algorithm, the original key can be made more random and unpredictable, thereby enhancing the security of the key. It should be noted that the specific randomization processing algorithm can be adjusted and optimized according to actual needs, and a reliable random number generator should be used to ensure the quality of randomness. In addition, randomization is only a means of enhancing key confidentiality, and is usually used in combination with other encryption technologies to provide more comprehensive key security protection.

[0169] In summary, in this technical solution, the communicating parties adopt a parallel interactive data stream transmission solution (such as Figure 4 Compared with the traditional serial interactive data stream transmission scheme (such as Figure 3As shown), the short-term correlation of the optical fiber channel can be fully utilized to improve the consistency of the key, and ultimately improve the key generation rate and security.

[0170] Those skilled in the art will appreciate that the process of implementing all or part of the steps of the above embodiments may be completed by hardware, or may be completed by instructing related hardware through a program.

[0171] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for key distribution using short-term correlation of optical fiber channels, characterized in that: The steps include: S1, both communicating parties send binary data streams to each other simultaneously; S2. The data sent by both communicating parties are divided into two groups according to odd bits and even bits, wherein the odd bits of the two groups of data are used by one party, and the even bits of the two groups of data are used by the other party; S3, the communicating parties compare the received data with the sent data, tell the other party the bit positions of the inconsistent data, and the other party removes the data of the corresponding bits; S4, both communicating parties calculate the bit error rate of the remaining data respectively; S5, the communicating parties quantize and encode the bit error rate respectively to obtain the original key; S6. Perform confidentiality enhancement processing on the original key to obtain the final key.

2. The method for key distribution using short-term correlation of optical fiber channels according to claim 1, characterized in that: In step S1, both communicating parties simultaneously send binary data streams to each other as follows: Assume that the two communicating parties are communication party A and communication party B, and both communication parties A and B send binary data streams of equal size to each other at the same time.

3. The method for key distribution using short-term correlation of optical fiber channels according to claim 2, characterized in that: In step S2, the specific process of dividing the data sent by both communicating parties into two groups according to odd bits and even bits is as follows: The binary data stream sent by communication party A is transmitted in the order of odd bits (A1, A2, ..., A n ) and even-numbered digits (B1, B2, ..., B n ) were divided into two groups; The binary data stream sent by communication party B is divided into odd bits (A n+1 ,A n+2 ,...,A 2n ) and even-numbered digits (B n+1 ,B n+2 ,...,B 2n ) were divided into two groups; Assume that odd-numbered bits are used by communication party A and even-numbered bits are used by communication party B, then: The even-numbered bits (B1, B2, ..., B n ) is received by the communication party B as (B'1, B'2, ..., B' n ); The odd number of bits sent by communication party B (A n+1 ,A n+2 ,...,A 2n ) is received by the communication party A as (A' n+1 ,A' n+2 ,...,A' 2n ); Right now: The communication party A has a data (A1, A2, ..., A n ,A' n+1 ,A' n+2 ,...,A' 2n ) is processed; the communication party B processes the data (B'1, B'2, ..., B' n ,B n+1 ,B n+2 ,...,B 2n ) for processing.

4. The method for key distribution using short-term correlation of optical fiber channels according to claim 3, characterized in that: In step S3, the communicating parties compare the received data with the sent data, inform each other of the bit positions where the data are inconsistent, and the other party removes the data of the corresponding bit positions, specifically: The communication party A will receive the odd-numbered data (A' n+1 ,A' n+2 ,...,A' 2n ) and the odd-numbered bits sent (A1, A2, ..., A n ) compare bit by bit; The communication party B will receive the even-numbered data (B'1, B'2, ..., B' n ) and the even-numbered bits sent (B n+1 ,B n+2 ,...,B 2n ) compare bit by bit; The communicating parties A and B sort out the bit position information of the inconsistent data respectively and inform each other through the communication channel; The communicating parties A and B respectively remove the data at the corresponding bit positions in the data they process based on the inconsistent bit position information of the data informed by the other party.

5. The method for key distribution using short-term correlation of optical fiber channels according to claim 4, characterized in that: In step S4, the communication parties respectively calculate the bit error rate of the remaining data as follows: The bit error rate BER1 of the remaining data of communication party A is: BER1=E1 / N1 Where E1 is the number of bits that have errors during the transmission of communication party A, and N1 is the total number of odd-bit data bits sent by communication party A; The bit error rate BER2 of the remaining data of communication party B is: BER2=E2 / N2 Where E2 is the number of bits that are erroneous during the transmission process of communication party B, and N2 is the total number of odd-bit data bits sent by communication party B; The number of bits that have errors during the transmission process is calculated by comparing the sent data with the received and retained data.

6. The method for key distribution using short-term correlation of optical fiber channels according to claim 5, characterized in that: In step S5, the communicating parties respectively quantize and encode the bit error rate to obtain the original key, which specifically includes the following steps: S5.1, setting quantization interval: dividing the possible value range of the bit error rate into several intervals; S5.2, determining a quantization value: assigning a quantization value to each quantization interval; S5.3, quantizing: according to the interval where the bit error rate is located, corresponding to the corresponding quantized value; S5.4, quantization sequence generation: the communicating parties A and B respectively quantize and encode the bit error rates calculated by themselves to obtain the corresponding quantization value sequence; S5.

5. Original key generation: The communicating parties A and B respectively use the corresponding quantized value sequence calculated by themselves as part of their original key.

7. The method for key distribution using short-term correlation of optical fiber channels according to claim 1, characterized in that: In step S6, the means of performing confidentiality enhancement processing on the original key is one or more combinations of encryption, hash operation, key expansion, randomization, multi-layer encryption, key segmentation, regular update and secure storage; wherein: Encryption processing: Use encryption algorithms to encrypt the original key to increase the confidentiality of the key; Hash operation: Perform a hash operation on the original key to generate a hash value of fixed length; Key expansion: Through the key expansion algorithm, the original key is expanded into a longer key sequence to increase the complexity and security of the key; Randomization: Randomize the original key; Multi-layer encryption: Use multi-layer encryption to encrypt the original key multiple times; Key splitting: Split the original key into multiple parts, store or transmit them separately, and combine them only when needed; Regular update: Regularly update the original key; Secure storage: Store the original key in a secure medium or device.

8. The method for key distribution using short-term correlation of optical fiber channels according to claim 7, characterized in that: The specific operation process of the key expansion is as follows: Assume that the original key is K and has a length of n bits; it needs to be extended to an extended key K' with a length of m bits. The specific steps include the following: C1, initialize the extended key K' to empty; C2, copy the original key K to the first n bits of the extended key K'; C3. For the remaining mn bits, generate them in the following way: Define a function f that takes the current key bits and some parameters as input and outputs a bit; Starting from the n+1th bit, calculate each bit in turn: The value of bit i is f(K'[in],i), where K'[in] is one of the first n bits of the extended key K' and i is the index of the current bit; C4. Repeat step C3 until the length of the extended key K' reaches m bits.

9. The method for key distribution using short-term correlation of optical fiber channels according to claim 7, characterized in that: The specific operation process of the randomization process is as follows: D1. Generate a random number seed: Use a random number generator to generate a random number seed; D2. Disrupt the original key sequence: Use a scrambling algorithm to scramble the bits or bytes of the original key based on the random number seed; D3. Add random noise: Add random noise to the scrambled key; D4. Repeating steps: The above steps D1-D3 may be repeated as many times as needed to further increase the degree of randomization.

10. A device for key distribution using short-time correlation of optical fiber channels, used to implement the steps of the method for key distribution using short-time correlation of optical fiber channels as described in any one of claims 1 to 9, characterized in that: The invention comprises system terminals of two communicating parties connected by optical fiber channel (600) signals, each of which comprises a data processing module (100), a modulator (200), a demodulator (300), a transmitter (400) and a receiver (500); wherein: A transmitter (400) in one system terminal is signal-connected to a receiver (500) in another system terminal via an optical fiber channel (600), so that two data stream transmission channels in opposite directions are formed between the two system terminals of the communicating parties; The binary data stream in one system terminal is sent to another system terminal via a modulator (200) and a transmitter (400) in sequence; A receiver (500) in a system terminal receives a binary data stream sent from another system terminal and passes through the receiver (500) and the demodulator (300) in sequence; In each system terminal, the binary data stream sent out by itself and the binary data stream received from another system terminal are both transmitted to the data processing module (100) for data processing.