Quantum key generation method and device and storage medium

Through the quantum key generation method, quantum keys are generated using quantum effects and biological characteristics, which solves the problem that keys are easily cracked in traditional encryption methods, realizes safe and effective key transmission, and improves the security of key authentication.

CN119135350APending Publication Date: 2024-12-13CHINA TELECOM NETWORK SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411455992.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Traditional encryption methods are easy to crack during data transmission, resulting in security risks, and the prior art is difficult to effectively improve the security of keys.

Method used

Using the quantum key generation method, quantum keys are generated using quantum effects and biological characteristics, random sequences are generated by superimposing initial seed sequences and lasers, sampling is combined with pre-selected quantum states, and quantum keys are generated and transmitted, and during the transmission process Add a check bit to ensure the security of the key.

Benefits of technology

It realizes secure key distribution based on the principles of quantum mechanics, effectively improving the security of key authentication, and ensuring the security and effectiveness of key transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135350A_ABST
    Figure CN119135350A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and discloses a quantum key generation method and device and a storage medium, the method is applied to a quantum key distributor, and the method comprises the following steps: superposing seed bits included in an initial seed sequence based on a quantum effect to obtain a superposed status bit, the initial seed sequence is generated according to identification characteristics and biological characteristics of a client, different photons are generated by using a laser device with a state bit as a ground state, state measurement is carried out on the photons respectively, a random sequence is obtained, the laser device is arranged in a quantum key distributor, and the quantum key distributor is arranged on the client. The number of the random numbers included in the random sequence is the same as the number of the photons, the random numbers included in the random sequence are sampled based on the pre-selected quantum state to obtain the quantum key, the quantum key is generated by effectively utilizing the quantum effect and the biological characteristics, safe and effective key transmission is achieved, and then the security of key authentication is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology and provides a method, device and storage medium for generating a quantum key. Background Art

[0002] With the development of information technology and the improvement of computing power, encryption algorithms may face the risk of being cracked. Data security and privacy protection are becoming increasingly important. Although traditional encryption methods rely on the complexity of calculations to generate keys, the keys are likely to be cracked during data transmission, resulting in the leakage of transmitted data, thus creating security risks. Summary of the invention

[0003] The embodiments of the present application provide a method, device and storage medium for generating a quantum key, which are used to generate a quantum key by utilizing quantum effects and biological characteristics, thereby improving the security of key authentication.

[0004] The specific technical solutions provided by this application are as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for generating a quantum key, which is applied to a quantum key distributor, and the method includes:

[0006] Based on the quantum effect, various sub-bits included in the initial seed sequence are superimposed to obtain the superimposed state bit, wherein the initial seed sequence is generated according to the identification feature and biometric feature of the client;

[0007] Using the laser to generate different photons with the state bit as the ground state, the state of each photon is measured respectively to obtain a random sequence, wherein the laser is set in a quantum key distributor, and the number of random numbers included in the random sequence is the same as the number of photons;

[0008] The random numbers included in the random sequence are sampled based on a pre-selected quantum state to obtain a quantum key.

[0009] Optionally, various sub-bits included in the initial seed sequence are superimposed based on quantum effects to obtain superimposed state bits, including:

[0010] The various sub-positions included in the initial seed sequence are analyzed in turn to obtain the seed states corresponding to the various sub-positions;

[0011] Based on the quantum effect, various sub-states are superimposed in sequence to obtain the superimposed state bit.

[0012] Optionally, the initial seed sequence is generated by:

[0013] Combining the collected identification feature and biometric feature of the client to obtain combined first feature information, wherein the identification feature is a unique identifier representing the client, and the biometric feature is biometric information presented by the client to the outside;

[0014] Binary-encode the first feature information to obtain encoded second feature information;

[0015] The second characteristic information is hashed using a hash function to obtain an initial seed sequence.

[0016] Optionally, different photons generated by the laser with the state bit as the ground state are used to measure the state of each photon to obtain a random sequence, including:

[0017] Different photons generated in the laser with the state bit as the ground state are sent separately for each photon;

[0018] Measure the state of each photon separately to obtain the polarization state of any photon;

[0019] A random number is obtained based on any polarization state, and a random sequence is obtained based on each random number.

[0020] Optionally, sampling each random number included in the random sequence based on a pre-selected quantum state to obtain a quantum key includes:

[0021] Preselecting at least one quantum state from a plurality of candidate quantum states based on a pre-agreed agreement with a client;

[0022] Selecting a random number consistent with a pre-selected quantum state from the random numbers included in the random sequence;

[0023] The selected random number with the same state is determined as the quantum key.

[0024] Optionally, the pre-selected quantum state includes some or all of the following candidate quantum states:

[0025] |0> state: represents horizontally polarized photons, which is the first ground state of the quantum bit;

[0026] |1> state: represents horizontally polarized photons, which is the second ground state of the quantum bit;

[0027] |+> state: represents the first superposition state of the photon in horizontal polarization and vertical polarization;

[0028] |->State: represents the photon being in the second superposition state of horizontal polarization and vertical polarization.

[0029] Optionally, after sampling each random number included in the random sequence based on a pre-selected quantum state to obtain a quantum key, the method further includes:

[0030] Adding a check bit to the quantum key to obtain a key to be sent, wherein the check bit is set according to a preset error correction code;

[0031] The key to be sent is transmitted through a communication channel or stored in a target medium to obtain a receiving key;

[0032] The received key is verified using the check bit to obtain a checksum. If the checksum is as expected, the received key is determined to be a secure key.

[0033] In a second aspect, the embodiment of the present application further provides a device for generating a quantum key, comprising:

[0034] A superposition unit, used for superimposing various sub-bits included in the initial seed sequence based on quantum effect to obtain a superimposed state bit, wherein the initial seed sequence is generated according to the identification feature and biometric feature of the client;

[0035] A measurement unit is used to use different photons generated by the laser with the state bit as the base state to measure the state of each photon respectively to obtain a random sequence, wherein the laser is set in the quantum key distributor, and the number of random numbers included in the random sequence is the same as the number of photons;

[0036] The sampling unit is used to sample the random numbers included in the random sequence based on a pre-selected quantum state to obtain a quantum key.

[0037] Optionally, various sub-bits included in the initial seed sequence are superimposed based on quantum effect to obtain a superimposed state bit, and the superposition unit is used to:

[0038] The various sub-positions included in the initial seed sequence are analyzed in turn to obtain the seed states corresponding to the various sub-positions;

[0039] Based on the quantum effect, various sub-states are superimposed in sequence to obtain the superimposed state bit.

[0040] Optionally, the initial seed sequence is generated by:

[0041] Combining the collected identification feature and biometric feature of the client to obtain combined first feature information, wherein the identification feature is a unique identifier representing the client, and the biometric feature is biometric information presented by the client to the outside;

[0042] Binary-encode the first feature information to obtain encoded second feature information;

[0043] The second characteristic information is hashed using a hash function to obtain an initial seed sequence.

[0044] Optionally, using a laser to generate different photons with the state bit as the base state, the state of each photon is measured to obtain a random sequence, and the measurement unit is used to:

[0045] Different photons generated in the laser with the state bit as the ground state are sent separately for each photon;

[0046] Measure the state of each photon separately to obtain the polarization state of any photon;

[0047] A random number is obtained based on any polarization state, and a random sequence is obtained based on each random number.

[0048] Optionally, the random numbers included in the random sequence are sampled based on a pre-selected quantum state to obtain a quantum key, and the sampling unit is used to:

[0049] Preselecting at least one quantum state from a plurality of candidate quantum states based on a pre-agreed agreement with a client;

[0050] Selecting a random number consistent with a pre-selected quantum state from the random numbers included in the random sequence;

[0051] The selected random number with the same state is determined as the quantum key.

[0052] Optionally, the pre-selected quantum state includes some or all of the following candidate quantum states:

[0053] |0> state: represents horizontally polarized photons, which is the first ground state of the quantum bit;

[0054] |1〉state: represents horizontally polarized photons, which is the second ground state of the qubit;

[0055] |+〉 state: represents the first superposition state of the photon in horizontal polarization and vertical polarization;

[0056] |-〉state: represents that the photon is in the second superposition state of horizontal polarization and vertical polarization.

[0057] Optionally, after sampling each random number included in the random sequence based on a pre-selected quantum state to obtain a quantum key, a verification unit is further included, and the verification unit is used to:

[0058] Adding a check bit to the quantum key to obtain a key to be sent, wherein the check bit is set according to a preset error correction code;

[0059] The key to be sent is transmitted through a communication channel or stored in a target medium to obtain a receiving key;

[0060] The received key is verified using the check bit to obtain a checksum. If the checksum is as expected, the received key is determined to be a secure key.

[0061] In a third aspect, a quantum key distributor comprises:

[0062] A memory for storing executable instructions;

[0063] A processor is used to read and execute executable instructions stored in a memory to implement any method as described in the first aspect.

[0064] In a fourth aspect, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor, the processor is enabled to execute any method described in the first aspect.

[0065] The beneficial effects of this application are as follows:

[0066] In summary, in an embodiment of the present application, a method, device and storage medium for generating a quantum key are provided. The method is applied to a quantum key distributor, including: superimposing various sub-bits included in an initial seed sequence based on quantum effects to obtain superimposed state bits, wherein the initial seed sequence is generated based on the identification features and biometrics of the client, using a laser to generate different photons with the state bit as the ground state, and measuring the state of each photon to obtain a random sequence, wherein the laser is arranged in the quantum key distributor, the number of random numbers included in the random sequence is the same as the number of photons, and the random numbers included in the random sequence are sampled based on a pre-selected quantum state to obtain a quantum key. The above-mentioned scheme of generating an initial seed sequence based on the identification features and biometrics of the client and generating a quantum key from the initial seed sequence uses the principles of quantum mechanics to achieve secure key distribution, rather than simply generating random numbers, and effectively using quantum effects and biometrics to generate quantum keys, thereby achieving secure and effective key transmission, thereby improving the security of key authentication.

[0067] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0069] Figure 1 A schematic diagram of a system architecture for generating a quantum key in an embodiment of the present application;

[0070] Figure 2 A schematic diagram of a method for generating a quantum key in an embodiment of the present application;

[0071] Figure 3 This is a schematic diagram of a process of generating a state bit according to an initial seed sequence in an embodiment of the present application;

[0072] Figure 4 This is a schematic diagram of a process of generating a random sequence according to a state bit in an embodiment of the present application;

[0073] Figure 5 A schematic diagram of a process for generating a quantum key according to a quantum state and a random sequence in an embodiment of the present application;

[0074] Figure 6 This is a schematic diagram of a process of verifying a quantum key using a check bit in an embodiment of the present application;

[0075] Figure 7 A schematic diagram of the logical architecture of a quantum key generation device in an embodiment of the present application;

[0076] Figure 8 A schematic diagram of the logical architecture of another device for generating a quantum key in an embodiment of the present application;

[0077] Fig. 9 This is a schematic diagram of the physical architecture of a quantum key distributor in an embodiment of the present application. DETAILED DESCRIPTION

[0078] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.

[0079] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented using sequences other than those illustrated or described herein.

[0080] The preferred implementation modes of the present application are described in detail below with reference to the accompanying drawings.

[0081] See also Figure 1 As shown, in the embodiment of the present application, the system includes at least one quantum key distributor, which is mainly used to generate a quantum key according to an initial seed sequence generated by the identification characteristics and biometric characteristics of the client. In addition, the system also includes a server and at least one client. Figure 1 In the above, different clients are represented by client 1, client 2, ... client n. Different clients have different identification features in the above system, and different clients also have different biometric features. When the server collects the identification features and biometric features of a certain client, it generates an initial seed sequence according to the identification features and biometric features, and then the quantum key distributor generates a quantum key according to the quantum effect and the initial seed sequence, and sends the quantum key to the client and the server, so that the client and the server can interact with each other using the quantum key. Exemplarily, the client includes a key storage unit, an encryption unit, a decryption unit, and a secure transmission unit. During the implementation process, the key storage unit stores the quantum key generated by the quantum key distributor through the quantum key distribution protocol. When the encryption unit needs to encrypt data, it uses the stored quantum key to encrypt the data. After receiving the encrypted data, the decryption unit uses the same quantum key to decrypt the data. The secure transmission unit transmits the encrypted data through a secure communication channel, so that even if the data is intercepted, it is difficult to crack.

[0082] In the embodiment of the present application, a method for generating a quantum key is implemented, which is mainly performed on the quantum key distributor side, and is described in detail below.

[0083] See also Figure 2 As shown, in the embodiment of the present application, a specific process of generating a quantum key is as follows:

[0084] Step 201: various sub-bits included in the initial seed sequence are superimposed based on quantum effects to obtain superimposed state bits, wherein the initial seed sequence is generated according to the identification features and biometric features of the client.

[0085] First of all, it should be noted that the initial seed sequence is generated in the following way:

[0086] (1) The collected identification feature and biometric feature of the client are combined to obtain a combined first feature information, wherein the identification feature is a unique identifier representing the client, and the biometric feature is biometric information presented by the client to the outside.

[0087] Considering that the identification features of different clients in the system are unique, in the embodiment of the present application, in order to distinguish each client, the server will first collect the identification features of each client. In addition, in order to accurately describe the features of each client itself and improve the recognition of the ciphertext sent by the client, in the embodiment of the present application, the server will also collect the biometric information presented by the client, that is, the biometric features. It should be noted that the above biometric information can be the fingerprint information, face information, iris information, etc. of the user using the client.

[0088] After the server collects the identification features and biometric features of the client, it will combine the above identification features and biometric features to generate a feature used to describe the client as a whole, namely, the first feature information. It should be noted that the above combination method can be flexibly set, for example, placing the identification feature directly behind the biometric feature for combination, placing the biometric feature directly behind the identification feature for combination, cross-combining the identification feature and the biometric feature, etc.

[0089] (2) Binary-encode the first feature information to obtain encoded second feature information.

[0090] During the implementation process, after obtaining the first feature information, the server performs binary encoding on the first feature information. For example, when the identification feature is C, the biological feature is K, and the first feature information is C+K, the first feature information is binary encoded, and the encoded second feature information is (C+K). bin .

[0091] (3) Use a hash function to perform hash processing on the second feature information to obtain an initial seed sequence.

[0092] In order to ensure the standardization and security of the initial seed sequence corresponding to each client, during the implementation process, after obtaining the second feature information, the server further uses a hash function to hash the second feature information. For example, the identification feature is C, the biological feature is K, and the second feature information is (C+K) bin In this case, the initial seed sequence obtained after hash processing is H(C+K), and the length of the initial seed sequence obtained by hash processing is a fixed length, thereby standardizing the length of each initial seed sequence. At the same time, the second feature information is further encrypted by hash processing, thereby improving the security of the initial seed sequence.

[0093] After the server generates an initial seed sequence based on the identification features and biometric features of the client, it sends the initial seed sequence to the quantum key distributor. The quantum key distributor superimposes various sub-bits included in the initial seed sequence based on quantum effects to obtain superimposed state bits. Figure 3 As shown, including:

[0094] Step 211: various sub-positions included in the initial seed sequence are analyzed in sequence to obtain seed states corresponding to the various sub-positions.

[0095] Quantum key distributors can use the principles of quantum mechanics, such as quantum entanglement and the quantum no-cloning theorem, to achieve secure key distribution, rather than simply generating random numbers. When the initial seed sequence enters the quantum key distributor, the various sub-bits included in the initial seed sequence will generate a specific state after passing through the quantum gate. Usually, the states of different seed bits are different. In terms of quantum dimensions, the shape of each seed bit itself and the angle between each seed bit and the standard reference line are different. Assume that the shape of each seed bit itself is a straight line, and the degrees of the angles between different seed bits and the standard reference line are different.

[0096] Based on this, during the implementation process, the quantum key distributor will analyze the various sub-bits included in the above initial seed sequence in turn, so as to obtain the seed state corresponding to each seed bit. It should be noted that the above seed state includes both the shape of the seed bit itself and the angle between the seed bit and the standard reference line.

[0097] Step 2012: Based on the quantum effect, various sub-states are superimposed in sequence to obtain superimposed state bits.

[0098] During the implementation, quantum effects need to be utilized, especially for the BB84 protocol. The quantum state |ψ〉=α|0〉+β|1〉 is a basic concept in quantum computing, which describes the superposition state of quantum bits. Here |0〉 and |1〉 are the two ground states of quantum bits, which form the basis of quantum computing, while α and β are complex coefficients that satisfy the normalization condition: |α| 2 +|β| 2 =1.

[0099] The above normalization condition ensures that the total probability of the entire system is 1. In quantum mechanics, the square of the modulus of α and β represents the probability of obtaining the state |0〉 and |1〉 after measurement, respectively. Therefore, if a quantum bit in state |ψ〉 is measured, the probability of obtaining |0〉 is |α| 2 , the probability of getting |1〉 is |β| 2 .

[0100] During the implementation process, after the seed states corresponding to various sub-bits are obtained, each seed state is superimposed in turn under the above-mentioned normalization conditions. For example, assuming that there are 4 seed states in total, seed state 1 and seed state 2, which are both straight line states, are superimposed to obtain seed state result 1, which is a longer straight line; at the same time, seed state 3 and seed state 4, which are both circular states, are superimposed to obtain seed state result 2, which is concentric circles. Seed state result 1 and seed state result 2 are superimposed again to obtain the superimposed state bit, thereby converting the initial seed sequence into a state bit through quantum effects.

[0101] Step 202: Use the laser to generate different photons with the state bit as the ground state, measure the state of each photon respectively, and obtain a random sequence, wherein the laser is set in a quantum key distributor, and the number of random numbers included in the random sequence is the same as the number of photons.

[0102] It should be noted that a laser is also provided in the quantum key distributor, and a random sequence can be generated based on the above state bits by using the laser. Figure 4 As shown, specifically including:

[0103] Step 2021: Different photons generated in the laser using the state bit as the ground state are sent separately.

[0104] During the implementation process, after the state bit is generated according to the initial seed sequence, the laser is further prompted to generate different photons under the stimulation of the state bit as the ground state. The above-mentioned laser can also send each generated photon for a distance along the quantum key distributor, that is, the evolution of different quantum states of the state bit is realized through quantum gate operation.

[0105] Step 2022: Measure the state of each photon respectively to obtain the polarization state of any photon.

[0106] Since the polarization states of the photons generated above are different, for example, the polarization state of the photons can be linear, circular, or other states. During the implementation, it is necessary to measure the states of the photons respectively to obtain the polarization state of each photon.

[0107] Step 2023: Obtain a random number based on any polarization state, and obtain a random sequence based on each random number.

[0108] Considering that the laser generates different photons under the stimulation of the state bit as the ground state, and the polarization state of each photon is different, based on this, a series of quantum gate operations and measurements are performed for the polarization state of any photon. For example, when the polarization state of the photon is linear polarization, the random number obtained according to the preset rule is 0; when the polarization state of the photon is circular polarization, the random number obtained according to the preset rule is 1, and so on. Repeat the above process, after obtaining a random number for each polarization state, a random sequence is obtained according to each random number, for example, the random sequence is R = r1, r2, ... rn, where ri is the result of measuring the polarization state of the i-th photon, that is, ri = M (|ψ〉), where M is the measurement operation.

[0109] It should be noted that, since the random numbers are determined according to the polarization state of the photons, the number of random numbers included in the above random sequence is the same as the number of photons.

[0110] Step 203: Sample the random numbers included in the random sequence based on the pre-selected quantum state to obtain a quantum key.

[0111] Considering that the number of photons generated by the above laser is large, the number of random numbers in the corresponding random sequence is also large. The above random numbers included in the random sequence are sampled based on the pre-selected quantum state to obtain the quantum key, see Figure 5 As shown, including:

[0112] Step 2031: preselect at least one quantum state from a plurality of candidate quantum states based on a pre-agreed agreement with the client.

[0113] First of all, it should be noted that the above-mentioned pre-selected quantum states include some or all of the following alternative quantum states: |0〉 state: represents a horizontally polarized photon, which is the first ground state of the quantum bit; |1〉 state: represents a horizontally polarized photon, which is the second ground state of the quantum bit; |+> state: represents that the photon is in the first superposition state of horizontal polarization and vertical polarization; |-> state: represents that the photon is in the second superposition state of horizontal polarization and vertical polarization.

[0114] The BB84 protocol includes the above four candidate quantum states. During the implementation process, in order to sample each random number, one or more of the above four candidate quantum states can be selected as the pre-selected quantum state. The principle of selection is that the quantum key distributor and the client need to agree in advance, that is, the same basis vector or quantum state is used between the quantum key distributor and the client through public channels.

[0115] Step 2032: Select a random number that is consistent with a pre-selected quantum state from the random numbers included in the random sequence.

[0116] During the implementation process, after determining the quantum state required for sampling, that is, the pre-selected quantum state, the base uses the pre-selected quantum state to sample each random number, that is, searches for a random number consistent with the pre-selected quantum state among the random numbers included in the random sequence. For example, when the pre-selected quantum state is the quantum state of |0> state, searches for a random number that is the same as the quantum state of |0> state among the random numbers included in the above random sequence. It should be noted that since the random number is determined based on the polarization state of the photon, the value of the random number represents a quantum state.

[0117] Step 2033: Determine the selected random number with the same state as the quantum key.

[0118] During the implementation process, after using the pre-selected quantum state to screen the random numbers included in the random sequence, that is, after selecting the random numbers with the same state from the random sequence, the selected random numbers are determined as the quantum keys.

[0119] In addition, after sampling the random numbers included in the random sequence based on the pre-selected quantum state and obtaining the quantum key, refer to Figure 6 As shown, it also includes:

[0120] Step 301: Add a check bit to the quantum key to obtain a key to be sent, wherein the check bit is set according to a preset error correction code.

[0121] In order to further improve the security of quantum keys, for example, possible errors in quantum keys are corrected by error correction codes such as parity check codes and Hamming codes, and the final quantum keys are extracted by privacy amplification technology. During the implementation process, a check bit is added to the quantum key. It should be noted that the check bit is set according to a preset error correction code, and the preset error correction code can be one of the parity check code, Hamming code, etc. After the check bit is added to the quantum key, the key to be sent can be obtained.

[0122] In one possible implementation, the quantum key may be converted into a binary format, and a check bit may be added to the converted binary format data according to the implementation rules of the selected preset error correction code. For example, when the preset error correction code is a Hamming code, the check bit is inserted into a specific position of the binary format data to obtain the key to be sent.

[0123] Step 302: The key to be sent is transmitted through a communication channel or stored in a target medium to obtain a receiving key.

[0124] After obtaining the key to be sent, it is necessary to further send the key to the client or server for use. During the implementation process, the key to be sent is transmitted through a communication channel so that the client or server receives the key. Alternatively, the key to be sent is stored in a target medium, such as a storage space of a client or a database, so as to obtain a received key after transmission or storage.

[0125] Step 303: Use the check bit to check the received key to obtain a checksum. If the checksum is as expected, the received key is determined to be a secure key.

[0126] During the implementation, when the receiving key arrives at the client or server, or is read from the target medium, the receiving key is further decoded, that is, the receiving key is verified using the check bit to obtain the checksum. It should be noted that during the verification process, the preset error correction code implementation rules need to be used to check the check bits in the data and calculate the checksum.

[0127] After the checksum is calculated, if the checksum meets expectations, for example, in a parity check, the checksum is an expected even number or an odd number, the received key is determined to be a secure key. If the checksum does not meet expectations, for example, in a parity check, the checksum is not an expected even number or an odd number, the received key is determined to be not a secure key.

[0128] During the implementation process, if it is determined that the received key is not a security key, and after the position of the error bit of the received key is determined, it can be flipped (0 to 1, or 1 to 0), thereby correcting the error and obtaining the final security key. The corrected security key can be verified and retransmitted again. If the error still exists, it may be necessary to request retransmission of the data.

[0129] Based on the same inventive concept, refer to Figure 7 and Figure 8 As shown, an embodiment of the present application provides a device for generating a quantum key, comprising:

[0130] A superposition unit 701 is used to superimpose various sub-bits included in the initial seed sequence based on quantum effect to obtain a superimposed state bit, wherein the initial seed sequence is generated according to the identification feature and biometric feature of the client;

[0131] The measuring unit 702 is used to use the laser to generate different photons with the state bit as the base state, and respectively measure the state of each photon to obtain a random sequence, wherein the laser is arranged in the quantum key distributor, and the number of random numbers included in the random sequence is the same as the number of photons;

[0132] The sampling unit 703 is used to sample the random numbers included in the random sequence based on the pre-selected quantum state to obtain the quantum key.

[0133] Optionally, various sub-bits included in the initial seed sequence are superimposed based on quantum effect to obtain a superimposed state bit, and the superposition unit 701 is used to:

[0134] The various sub-positions included in the initial seed sequence are analyzed in turn to obtain the seed states corresponding to the various sub-positions;

[0135] Based on the quantum effect, various sub-states are superimposed in sequence to obtain the superimposed state bit.

[0136] Optionally, the initial seed sequence is generated by:

[0137] Combining the collected identification feature and biometric feature of the client to obtain combined first feature information, wherein the identification feature is a unique identifier representing the client, and the biometric feature is biometric information presented by the client to the outside;

[0138] Binary-encode the first feature information to obtain encoded second feature information;

[0139] The second characteristic information is hashed using a hash function to obtain an initial seed sequence.

[0140] Optionally, different photons generated by a laser with the state bit as the base state are used to measure the state of each photon to obtain a random sequence, and the measurement unit 702 is used to:

[0141] Different photons generated in the laser with the state bit as the ground state are sent separately for each photon;

[0142] Measure the state of each photon separately to obtain the polarization state of any photon;

[0143] A random number is obtained based on any polarization state, and a random sequence is obtained based on each random number.

[0144] Optionally, the random numbers included in the random sequence are sampled based on a pre-selected quantum state to obtain a quantum key, and the sampling unit 703 is used to:

[0145] Preselecting at least one quantum state from a plurality of candidate quantum states based on a pre-agreed agreement with a client;

[0146] Selecting a random number consistent with a pre-selected quantum state from the random numbers included in the random sequence;

[0147] The selected random number with the same state is determined as the quantum key.

[0148] Optionally, the pre-selected quantum state includes some or all of the following candidate quantum states:

[0149] |0> state: represents horizontally polarized photons, which is the first ground state of the quantum bit;

[0150] |1> state: represents horizontally polarized photons, which is the second ground state of the quantum bit;

[0151] |+> state: represents the first superposition state of the photon in horizontal polarization and vertical polarization;

[0152] |->State: represents the photon being in the second superposition state of horizontal polarization and vertical polarization.

[0153] Optionally, after sampling each random number included in the random sequence based on a pre-selected quantum state to obtain a quantum key, a verification unit 704 is further included, and the verification unit 704 is used to:

[0154] Adding a check bit to the quantum key to obtain a key to be sent, wherein the check bit is set according to a preset error correction code;

[0155] The key to be sent is transmitted through a communication channel or stored in a target medium to obtain a receiving key;

[0156] The received key is verified using the check bit to obtain a checksum. If the checksum is as expected, the received key is determined to be a secure key.

[0157] Based on the same inventive concept, refer to Fig. 9 As shown, an embodiment of the present application provides a quantum key distributor, including: a memory 901, used to store executable instructions; a processor 902, used to read and execute the executable instructions stored in the memory, and execute any one of the methods of the first aspect above.

[0158] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor, the processor is enabled to execute the method described in any one of the first aspects above.

[0159] In summary, in an embodiment of the present application, a method, device and storage medium for generating a quantum key are provided. The method is applied to a quantum key distributor, including: superimposing various sub-bits included in an initial seed sequence based on quantum effects to obtain superimposed state bits, wherein the initial seed sequence is generated based on the identification features and biometrics of the client, using a laser to generate different photons with the state bit as the ground state, and measuring the state of each photon to obtain a random sequence, wherein the laser is arranged in the quantum key distributor, the number of random numbers included in the random sequence is the same as the number of photons, and the random numbers included in the random sequence are sampled based on a pre-selected quantum state to obtain a quantum key. The above-mentioned scheme of generating an initial seed sequence based on the identification features and biometrics of the client and generating a quantum key from the initial seed sequence uses the principles of quantum mechanics to achieve secure key distribution, rather than simply generating random numbers, and effectively using quantum effects and biometrics to generate quantum keys, thereby achieving secure and effective key transmission, thereby improving the security of key authentication.

[0160] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program product systems. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product system implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0161] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program product systems according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0162] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0163] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0164] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for generating a quantum key, characterized in that: Applied to a quantum key distributor, the method comprises: Based on the quantum effect, various sub-bits included in the initial seed sequence are superimposed to obtain a superimposed state bit, wherein the initial seed sequence is generated according to the identification feature and the biometric feature of the client; Using a laser to generate different photons with the state bit as the base state, respectively measure the state of each of the photons to obtain a random sequence, wherein the laser is arranged in the quantum key distributor, and the number of random numbers included in the random sequence is the same as the number of the photons; The random numbers included in the random sequence are sampled based on a pre-selected quantum state to obtain a quantum key.

2. The method according to claim 1, characterized in that The method of superimposing various sub-bits included in the initial seed sequence based on the quantum effect to obtain the superimposed state bit includes: Sequentially analyzing various sub-positions included in the initial seed sequence to obtain seed states corresponding to the various sub-positions; Based on the quantum effect, the seed states are superimposed in sequence to obtain a superimposed state bit.

3. The method according to claim 1, characterized in that The initial seed sequence is generated by: Combining the collected identification feature and the biological feature of the client to obtain combined first feature information, wherein the identification feature is a unique identifier representing the client, and the biological feature is biological information presented by the client to the outside; Binary-encode the first feature information to obtain encoded second feature information; The second feature information is hashed using a hash function to obtain the initial seed sequence.

4. The method according to claim 1, characterized in that The laser is used to generate different photons with the state bit as the base state, and the state of each photon is measured to obtain a random sequence, including: Different photons generated in the laser using the state bit as the base state, and sending each of the photons respectively; Measuring the state of each of the photons respectively to obtain the polarization state of any one of the photons; A random number is obtained based on any one of the polarization states, and a random sequence is obtained based on each of the random numbers.

5. The method according to claim 1, characterized in that The step of sampling each random number included in the random sequence based on a pre-selected quantum state to obtain a quantum key comprises: preselecting at least one quantum state from a plurality of candidate quantum states based on a pre-agreed agreement with the client; Selecting a random number consistent with the pre-selected quantum state from the random numbers included in the random sequence; The selected random number that is consistent with the state is determined as the quantum key.

6. The method according to claim 1, characterized in that The pre-selected quantum state includes part or all of the following candidate quantum states: |0> state: represents horizontally polarized photons, which is the first ground state of the quantum bit; |1> state: represents horizontally polarized photons, which is the second ground state of the quantum bit; |+> state: represents the first superposition state of the photon in horizontal polarization and vertical polarization; |->State: represents the photon being in the second superposition state of horizontal polarization and vertical polarization.

7. The method according to any one of claims 1 to 6, characterized in that: After sampling the random numbers included in the random sequence based on the pre-selected quantum state to obtain the quantum key, the method further includes: Adding a check bit to the quantum key to obtain a key to be sent, wherein the check bit is set according to a preset error correction code; The key to be sent is transmitted through a communication channel or stored in a target medium to obtain a receiving key; The received key is verified using the check bit to obtain a checksum, and if the checksum meets expectations, the received key is determined to be a secure key.

8. A device for generating a quantum key, characterized in that: include: A superposition unit, configured to superimpose various sub-bits included in an initial seed sequence based on a quantum effect to obtain a superimposed state bit, wherein the initial seed sequence is generated based on an identification feature and a biometric feature of the client; A measuring unit, used for using a laser to generate different photons with the state bit as a base state, to measure the state of each photon respectively, and obtain a random sequence, wherein the laser is arranged in the quantum key distributor, and the number of random numbers included in the random sequence is the same as the number of the photons; The sampling unit is used to sample the random numbers included in the random sequence based on a pre-selected quantum state to obtain a quantum key.

9. A quantum key distributor, characterized in that: include: A memory for storing executable instructions; A processor, configured to read and execute the executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the method according to any one of claims 1 to 7.