A method and device for enhancing confidentiality based on hash function combination
By combining the square modulus hash function and the number-theoretical transform hash function, the problem of high computational complexity in the existing technology is solved, flexible adjustment of key length and improvement of calculation speed is achieved, and the performance of quantum key distribution equipment is improved.
Patent Information
- Application Number
- CN202411986381.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2044-12-31
AI Technical Summary
During the existing quantum key distribution process, the confidential enhancement algorithm based on general-purpose hash function has high computational complexity and low calculation rate, which cannot meet the requirements of high-performance QKD for high-speed real-time implementation.
The confidential enhancement method is adopted based on the combination of square modulus hash function and number-theoretical transform hash function. The shared consistent low-security key is initially compressed through the square modulus hash function, and then the number-theoretical transform hash function is used for final compression, so as to achieve flexible adjustment of the key length.
It significantly reduces the calculation amount of the key confidentiality enhancement algorithm, improves the computing speed, and improves the performance of quantum key distribution equipment.
Smart Images

Figure CN119814300B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum secure communication technology, and in particular to a confidentiality enhancement algorithm that can be applied in the process of quantum key distribution, which can effectively improve the performance of quantum secure quantum key distribution equipment. Background Art
[0002] Quantum Key Distribution (QKD) is a novel cryptographic technology that leverages the principles of quantum mechanics to enable the sharing of provably secure random numbers between two parties involved in a QKD process. This technology leverages quantum mechanics to enable the sharing of secure random numbers over public channels, ensuring strict and provable security. This technology is widely applicable to highly secure confidential information systems.
[0003] Quantum key distribution mainly consists of two stages: modulation, transmission and demodulation of quantum states at the physical layer, and data post-processing at the logical layer. Post-processing mainly includes screening, parameter estimation, error correction, and confidentiality enhancement. During quantum key distribution, the communicating parties use quantum channels to transmit quantum states at the physical layer; and since the data post-processing stage at the logical layer processes only data information, the communicating parties complete information exchange through classical channels. The overall diagram is shown in the attached figure. Figure 1 The confidentiality enhancement process in post-processing is to compress and map the original key obtained by both parties in quantum key distribution after error correction to a shorter final key, which can eliminate the part of the original key obtained by the eavesdropper, so that the quantum key finally shared by both parties in quantum key distribution is completely random to the eavesdropper, ensuring that both parties can share secure random numbers.
[0004] In the existing technology, both parties of quantum key distribution mostly use a general-purpose hash function to implement a confidentiality enhancement algorithm, which is achieved by constructing a specific Toeplitz matrix and multiplying it with the original key. The advantage of this method is that the Toeplitz matrix is simple to construct, and thanks to the special structure of the matrix, the speed of confidentiality enhancement can be improved by matrix partitioning, FFT acceleration, parallel programming and other methods. However, due to the mathematical principle of this method, its computational complexity is relatively high, and the amount of calculation will increase with the length of the key processing by O(n 2 ) is increasing rapidly, which cannot meet the needs of high-performance QKD for high-speed and real-time confidentiality enhancement. Summary of the Invention
[0005] In order to solve the problems of high computational complexity and low computational speed in existing confidentiality enhancement methods, the present invention provides a confidentiality enhancement method and device based on a combination of a square modulus hash function and a number theoretic transformation hash function.
[0006] The technical solution of the present invention is a confidentiality enhancement method based on a combination of hash functions. In this method, quantum key distribution includes at least two participants: a first participant and a second participant. The method steps include:
[0007] Step 1: The first and second parties obtain a shared low-security key S after quantum state modulation, quantum channel transmission, demodulation, screening, parameter estimation, and error correction.
[0008] Step 2: The first participant randomly selects a square modulus hash function g from the square modulus hash function family SQH x , and shared with the second participant through the classical channel, and both parties use the square modulus hash function g x Compress the shared low-security key S to obtain a consistent intermediate key S'=g x (S);
[0009] Step 3: The first participant randomly selects a number-theoretic transformation hash function h from the number-theoretic transformation hash function family NH c , and shared with the second participant through the classical channel. Both parties use number theory to transform the hash function h c Compress the intermediate key S' to obtain the consistent final security key K = h c (S').
[0010] Furthermore, in step 2, the first participant randomly selects a square modulus hash function g from the square modulus hash function family SQH x The method is:
[0011] The first participant obtains a random number x with the same number of bits as the confidentiality-enhanced input from the random number generator. The two parties in quantum key distribution select a square modulus hash function from the square modulus hash function family SQH based on the random number x.
[0012] Where S = <S1,S2,…,S k ,>,x= <x1,x2,…,x k >, where each element represents a shared consistent low-security key and a random number for each block, k represents the number of blocks, p1 is a Mersenne prime number, and mod represents modulus.
[0013] Furthermore, the square modulus hash function family SQH in step 2 is:
[0014]
[0015] is the finite field of input, is the finite field of output;
[0016] Furthermore, the first participant in step 3 randomly selects a number-theoretic transformation hash function h from the number-theoretic transformation hash function family NH. c The method is:
[0017] The first participant obtains a random number c from a random number generator. Both c and the intermediate key S' are divided into L segments of length p2, namely c1, c2, ..., c i ,...c L , and neither end is 0, p2 is another prime number different from p1, and both parties of quantum key distribution use random number c to select number theoretic transformation hash function h from the number theoretic transformation hash function family NH c (S') = (INTT(c·S')) 1,2,,β , where β is the number of output segments for security enhancement, and INTT(·) represents the inverse fast number theoretic transform.
[0018] Furthermore, the number theory transformation hash function family NH in step 3 is:
[0019]
[0020] is the input finite field, is the output finite field;
[0021] A privacy enhancement device based on a combination of hash functions, the device comprising a first quantum key distribution end and a second quantum key distribution end;
[0022] The first quantum key distribution end and the second quantum key distribution end are both used to obtain a shared consistent low-security key S;
[0023] The first quantum key distribution end randomly selects a square modulus hash function g from the square modulus hash function family SQH x and shared to another quantum key distribution end through a classical channel;
[0024] The first quantum key distribution end and the second quantum key distribution end use the square modulus hash function g x Compress the shared low-security key S to obtain a consistent intermediate key S'=g x (S);
[0025] The first quantum key distribution end randomly selects a number-theoretic transformation hash function h from the number-theoretic transformation hash function family NH. c and shared to another quantum key distribution end through a classical channel;
[0026] The first quantum key distribution end and the second quantum key distribution end use number theory to transform the hash function h c Compress the intermediate key S' to obtain the consistent final security key K = hc (S').
[0027] The beneficial effect of the present invention is that the present invention uses square modulus hashing to compress the input shared consistent low-security key in a block processing manner, which can ensure that the computational complexity does not increase rapidly as the original key processing length becomes longer. Compared with the computational growth of the existing confidentiality enhancement scheme, the attached figure shows the following. Figure 2 Using number-theoretic transformation hashing allows for more flexible adjustment of the final secure key length for confidentiality enhancement. A key confidentiality enhancement method combining square modulus hashing and number-theoretic transformation hashing has been implemented. When the input key length is long, this significantly reduces the computational complexity of the confidentiality enhancement algorithm for the original key, increasing the computational speed of the confidentiality enhancement, which is of great significance for improving the performance of quantum key distribution devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 Schematic diagram of the two parties involved in quantum communication in the present invention.
[0029] Figure 2 This is a comparison chart of the computational complexity of the method of the present invention and the existing mainstream confidentiality enhancement method based on general-purpose hash functions.
[0030] Figure 3 Schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of 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 making creative efforts are within the scope of protection of the present invention.
[0032] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0033] The following is combined with Figure 2 The present invention is further described with reference to the accompanying drawings and specific examples, but is not intended to be limiting of the present invention.
[0034] The confidentiality enhancement method based on the combination of a square modulus hash function and a number theoretic transformation hash function of this embodiment includes:
[0035] Step 1: After quantum state modulation, quantum channel transmission, demodulation, screening, parameter estimation, and error correction, both parties in quantum key distribution obtain a shared consistent low-security key S as input;
[0036] The shared consistent low-security key S in this embodiment is shared by both parties of quantum key distribution, has a fixed length and is consistent, but part of its information is eavesdropped, and the amount of information eavesdropped per bit is T bits. The specific eavesdropped part is unknown to both parties of quantum key distribution.
[0037] Step 2: The first participant in quantum key distribution randomly selects a square modulus hash function g from the square modulus hash function family SQH. x , and shared to the second participant through the classical channel, the two parties of quantum key distribution use the square modulus hash function g x Compress the shared low-security key S to obtain a consistent intermediate key S'=g x (S);
[0038] Step 3: The first participant in quantum key distribution randomly selects a number-theoretic transformation hash function h from the number-theoretic transformation hash function family NH. c , and shared with the second participant through the classical channel, the two parties in quantum key distribution use number theory to transform the hash function h c Compress the intermediate key S' to obtain the consistent final security key K = h c (S').
[0039] This embodiment is a key confidentiality enhancement method that combines a square modulus hash function with a number theoretic transformation hash function. When the input key length is long, the computational complexity of the key confidentiality enhancement algorithm is significantly reduced, thereby improving the key processing rate.
[0040] In step 2 of this embodiment, a random number x is obtained from a random number generator, which is the same as the number of bits of the privacy-enhanced input. The two parties to the quantum key distribution select a square modulus hash function from the square modulus hash function family SQH based on the random number x. S= <S1,S2,…,S k ,<,x= <x1,x2,…,x k >, respectively, represents the shared consistent low-security key and random number of each block, k represents the number of blocks, p1 is the Mersenne prime number, and mod represents the modulus. The square modulus hash function family SQH is: is the finite field of input, is the finite field of output.
[0041] In step 3 of this embodiment, a random number c is obtained from a random number generator. Both c and the intermediate key S' are divided into L segments of length p2, namely c1, c2, ..., c i ,...c L , and neither end is 0, p2 is another prime number different from p1, and both parties of quantum key distribution use random number c to select number theoretic transformation hash function h from the number theoretic transformation hash function family NH c(S') = (INTT(c·S')) 1,2,...,β , where β is the number of output segments for the security enhancement, and INTT(·) represents the inverse fast number theoretic transformation. The family of number theoretic transformation hash functions NH is: is the input finite field, is the output finite field.
[0042] Specific embodiment: This embodiment is used for quantum key distribution. The two parties use a confidentiality enhancement method that supports long key input to extract the final security key from the shared consistent low-security key of both parties, specifically including the following steps:
[0043] Step 1, parameter calculation: First determine the first key parameter p1 of the privacy enhancement algorithm, and the input set of the square modulus hash function family SQH is a finite field Its size is determined by the finite field and the number of blocks k, where p1 is a Mersenne prime number; then determine the second key parameter p2 and the third key parameter L of the privacy enhancement algorithm, and the input set of the number theory transformation hash function family NH is a finite field Its size is determined by the finite field Determined by the number of blocks L, p2 is another prime number different from p1.
[0044] For example, in this embodiment, p1=2 756839 -1, to simplify the key S as a mapping from binary to finite field, take p2 = 2 64 -2 32 +1, L = 65536, to simplify the mapping of the intermediate key S' from binary to a finite field. The number of input blocks k and the number of output blocks β can be set according to the needs of both parties to quantum key distribution. The larger the number of input blocks k, the longer the input block length of the confidentiality enhancement algorithm, the less affected by the finite code length effect, and the higher the ratio of the final security key output of the confidentiality enhancement to the shared consistent low security key. However, at the same time, the upper limit of the ratio of the final security key output of the confidentiality enhancement to the shared consistent low security key is lower. For example, in this embodiment, k = 3. In this embodiment, the number of binary bits of the confidentiality enhancement input key is 3 × 756839 = 2270517, the maximum output length of the final security key is 756839, and the maximum output ratio is 33.3%.
[0045] Step 2: Read the low-security key: The two parties in the quantum key distribution obtain the verified consistent low-security shared key S=S from their respective quantum key distribution error negotiation modules. A =S B The number of bits obtained is the same as the number of bits in the privacy-enhanced input, which is 2270517 bits.
[0046] Step 3: The first participant in the quantum key distribution obtains a random number from the random number generator that has the same number of bits as the confidentiality-enhanced input, which in this example is a 2270517-bit random number, and sends it to the second participant through the classical channel.
[0047] Step 4: Quantum key distribution: both parties use random numbers as x to obtain the square modulus hash function g. x , respectively using the square modulus hash function g x Compress the shared low-security key S to obtain a consistent intermediate key S'=g x (S), the length of the intermediate key is the unit block length, which is 756839 bits in this embodiment.
[0048] Step 5: The first participant of the quantum key distribution obtains a random number c from the random number generator. c is divided into L segments of length p2, namely c1, c2, ..., c i ,...c L , and neither end is 0. In this example, the length of c is a 64×65536=4194304-bit random number, which is sent to the second participant through the classical channel.
[0049] Step 7: Quantum key distribution: both parties use random number c to select number theoretic transformation hash function h from the number theoretic transformation hash function family NH. c (S') = (INTT(c·S')) 1,2,...,β , the value of 64×β is the final security key length, which needs to be calculated based on the system state parameters, but the maximum value does not exceed k, which is 756839.
[0050] This embodiment also provides a privacy enhancement device based on a combination of a square modulus hash function and a number theory transformation hash function, comprising a first quantum key distribution end and a second quantum key distribution end;
[0051] The first quantum key distribution end and the second quantum key distribution end are both used to obtain a shared consistent low-security key S;
[0052] The first quantum key distribution end is also used to randomly select a square modulus hash function g from the square modulus hash function family SQH x and shared to another quantum key distribution end through a classical channel;
[0053] The first quantum key distribution end and the second quantum key distribution end are also used to use the square modulus hash function g x Compress the shared low-security key S to obtain a consistent intermediate key S'=g x (S);
[0054] The first quantum key distribution terminal is also used to randomly select a number-theoretic transformation hash function h from the number-theoretic transformation hash function family NH. c and shared to another quantum key distribution end through a classical channel;
[0055] The first quantum key distribution end and the second quantum key distribution end are also used to transform the hash function h using number theory c Compress the intermediate key S' to obtain the consistent final security key K = h c (S').
[0056] The first quantum key distribution end of this embodiment randomly selects a square modulus hash function g from the square modulus hash function family SQH x The process is as follows: a random number x is obtained from a random number generator with the same number of bits as the confidentiality-enhanced input, and the two parties in quantum key distribution select a square modulus hash function from the square modulus hash function family SQH according to the random number x. S= <S1,S2,…,S k ,>,x= <x1,x2,…,x k >, respectively, represents the shared consistent low-security key and random number of each block, k represents the number of blocks, p1 is the Mersenne prime number, and mod represents the modulus. The square modulus hash function family SQH is: is the finite field of input, is the finite field of output.
[0057] The first quantum key distribution end of this embodiment randomly selects a number theoretic transformation hash function h from the number theoretic transformation hash function family NH. c The process is as follows: Get a random number c from the random number generator, c and the intermediate key S' are divided into L segments of length p2, namely c1, c2, ..., c i ,...c L , and neither end is 0, p2 is another prime number different from p1, and both parties of quantum key distribution use random number c to select number theoretic transformation hash function h from the number theoretic transformation hash function family NH c (S') = (INTT(c·S')) 1,2,...,β , where β is the number of output segments for the security enhancement, and INTT(·) represents the inverse fast number theoretic transformation. The family of number theoretic transformation hash functions NH is: is the input finite field, is the output finite field.
[0058] Figure 2 This is a comparison chart of the computational complexity of the method of the present invention and the existing mainstream confidentiality enhancement method based on general-purpose hash functions. Figure 2In the figure, the gray data points represent the confidentiality enhancement methods that use direct calculations on the Toeplitz matrix (such as Zhang X, Nie YQ, Liang H, et al. FPGA implementation of Toeplitz hashing extractor for real time post-processing of raw random numbers [J]. IEEE, 2016. DOI: 10.1109 / RTC.2016.7543094.), and the red data points represent the confidentiality enhancement methods that use the Toeplitz matrix and use fast Fourier transform (FFT) to accelerate calculations (such as Wang X, Zhang YC, Yu S, et al. High-speed Implementation of Length-compatible Privacy Amplification in Continuous-variable Quantum Key Distribution [J]. IEEE Photonics Journal, 2018. DOI: 10.1109 / JPHOT.2018.2824316.). As can be seen from the figure, as the processing key length increases, the calculation growth rate of the method proposed in this invention is significantly lower than that of the existing methods.
[0059] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0060] It should be further appreciated by those skilled in the art that the units and algorithmic steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of both. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the present invention.
[0061] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0062] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for enhancing confidentiality based on a combination of hash functions, wherein the method comprises at least two parties responsible for quantum key distribution: a first party and a second party; the method comprises the following steps: Step 1: The first and second parties obtain a shared low-security key S after quantum state modulation, quantum channel transmission, demodulation, screening, parameter estimation, and error correction. Step 2: The first participant randomly selects a square modulus hash function g from the square modulus hash function family SQH x , and shared with the second participant through the classical channel, and both parties use the square modulus hash function g x Compress the shared low-security key S to obtain a consistent intermediate key S'=g x (S); In step 2, the first participant randomly selects a square modulus hash function g from the square modulus hash function family SQH. x The method is: The first participant obtains a random number x with the same number of bits as the confidentiality-enhanced input from the random number generator. The two parties in quantum key distribution select a square modulus hash function from the square modulus hash function family SQH based on the random number x. Where S=<S1,S2,…,S k ,>,x= <x1,x2,…,x k >, where each element represents a shared consistent low-security key and a random number for each block, k represents the number of blocks, p1 is a Mersenne prime number, and mod represents modulus; Step 3: The first participant randomly selects a number-theoretic transformation hash function h from the number-theoretic transformation hash function family NH c , and shared with the second participant through the classical channel. Both parties use the number theory to transform the hash function h c Compress the intermediate key S' to obtain the consistent final security key K = h c (S'); The first participant in step 3 randomly selects a number-theoretic transformation hash function h from the number-theoretic transformation hash function family NH. c The method is: The first participant obtains a random number c from a random number generator. Both c and the intermediate key S' are divided into L segments of length p2, namely c1, c2, ..., c i ,...c L , and neither end is 0, p2 is another prime number different from p1, and both parties of quantum key distribution use random number c to select number theoretic transformation hash function h from the number theoretic transformation hash function family NH c (S') = (INTT(c·S')) 1,2,...,β , where β is the number of output segments for security enhancement, and INTT(·) represents the inverse fast number theoretic transform.
2. The method for enhancing confidentiality based on a combination of hash functions according to claim 1, wherein: The square modulus hash function family SQH in step 2 is: is the finite field of input, is the finite field of output.
3. The method for enhancing confidentiality based on a combination of hash functions according to claim 1, wherein: The number theory transformation hash function family NH in step 3 is: is the input finite field, is the output finite field.
4. A privacy enhancement device based on a combination of hash functions, configured to execute the privacy enhancement method according to any one of claims 1 to 3, the device comprising a first quantum key distribution terminal and a second quantum key distribution terminal; The first quantum key distribution end and the second quantum key distribution end are both used to obtain a shared consistent low-security key S; The first quantum key distribution end randomly selects a square modulus hash function g from the square modulus hash function family SQH x and shared to another quantum key distribution end through a classical channel; The first quantum key distribution end and the second quantum key distribution end use the square modulus hash function g x Compress the shared low-security key S to obtain a consistent intermediate key S'=g x (S); The first quantum key distribution end randomly selects a number-theoretic transformation hash function h from the number-theoretic transformation hash function family NH. c and shared to another quantum key distribution end through a classical channel; The first quantum key distribution end and the second quantum key distribution end use number theory to transform the hash function h c Compress the intermediate key S' to obtain the consistent final security key K = h c (S').
Citation Information
Patent Citations
Private key amplification method and system for multi-degree-of-freedom modulation QKD
CN112769561A
Byzantine fault-tolerant consensus method based on quantum key distribution
CN113271204A
Cited By
Large-scale and high-speed quantum key distribution post-processing secrecy enhancement method and system
CN121012630A