Key generation method and related equipment

Through the key generation method of quantum entangled state, the key management complexity and authentication problems in symmetric cryptographic identity authentication are solved, and the high-security key generation and identity authentication are realized, which simplifies the system design.

CN119011140APending Publication Date: 2024-11-22CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411179178.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing identity authentication technology based on symmetric passwords requires preset key sharing. As user nodes increase, key management complexity increases, and symmetric keys cannot be directly authenticated. It is necessary to combine other authentication mechanisms to increase the system complexity. Spend.

Method used

By acquiring multiple particles in a quantum entangled state, generating a test sequence based on quantum random numbers, determining the measurement basis vector, and generating a key through measurement and hashing processing, using the quantum uncloned characteristics and the instant correlation characteristics of the entangled state to achieve identity Authentication and key generation avoid preset keys and frequent updates.

Benefits of technology

Reduces the complexity of the key system, improves the security of keys and the reliability of authentication, and does not need to rely on other authentication mechanisms, simplifies the key management process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011140A_ABST
    Figure CN119011140A_ABST
Patent Text Reader

Abstract

The invention provides a key generation method and related equipment, and relates to the technical field of networks. The method comprises the following steps: acquiring one of a plurality of particles in a quantum entanglement state; generating a test sequence based on the quantum random number, and determining a plurality of measurement basis vectors according to the test sequence; measuring a particle based on the plurality of measurement basis vectors to obtain a first measurement result; performing hash processing on the test sequence to obtain a processed test sequence, and determining the same measurement basis vector selected by the two communication parties based on the processed test sequence; and determining a second measurement result corresponding to the same measurement basis vector in the first measurement result, and generating a key based on the second measurement result. According to the method and the device, the security of the secret key can be high, the secret key system does not need to preset the secret key, the possibility that the secret key is stolen by frequently updating the secret key is avoided, and the complexity of the secret key system is reduced; identity verification can be realized without relying on other authentication mechanisms, and the complexity of a key system is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Most of the existing identity authentication technologies based on symmetric encryption require users to share keys in advance. If the number of user nodes in the network increases, the number of keys that need to be preset will increase, and the difficulty and cost of presetting keys will continue to increase. At the same time, in order to ensure that the shared keys are not stolen maliciously, the system needs to update the keys frequently to reduce the theft of keys, making key management more complicated and increasing the complexity of the key system. Moreover, symmetric keys can only ensure the confidentiality and integrity of data to a certain extent, and do not directly have identity authentication functions. When used alone, it is impossible to confirm whether the sender is legitimate. In order to ensure security, it must be used in conjunction with other authentication mechanisms, which also increases the complexity of the key system.

[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0004] The present disclosure provides a key generation method and related devices, which at least to a certain extent overcome the problem of complex implementation of key-based identity authentication key systems in related technologies.

[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0006] According to a first aspect of the present disclosure, there is provided a key generation method, comprising:

[0007] Obtain one particle among multiple particles in a quantum entangled state;

[0008] Generate a test sequence based on quantum random numbers, and determine a plurality of measurement basis vectors according to the test sequence;

[0009] Measuring the one particle based on the multiple measurement basis vectors to obtain a first measurement result;

[0010] Performing hash processing on the test sequence to obtain a processed test sequence, and determining the same measurement basis vector selected by both communicating parties based on the processed test sequence;

[0011] Determine a second measurement result corresponding to the same measurement basis vector in the first measurement result, and generate a key based on the second measurement result.

[0012] In some embodiments of the present disclosure, performing hash processing on the test sequence to obtain a processed test sequence, and determining the same measurement basis vector selected by both communicating parties based on the processed test sequence includes:

[0013] dividing the processed test sequence into a plurality of first sequences;

[0014] Performing hash processing on each segment of the first sequence to obtain a hash value corresponding to each segment of the first sequence;

[0015] Receiving multiple second sequences and hash values ​​corresponding to each second sequence sent by a second negotiating party; wherein the first negotiating party and the second negotiating party constitute the communicating parties;

[0016] Based on the hash value corresponding to each segment of the first sequence and the hash value corresponding to each segment of the second sequence, the same measurement basis vector selected by both communicating parties is determined.

[0017] In some embodiments of the present disclosure, each segment of the first sequence includes a paragraph marker, and each segment of the second sequence includes a paragraph marker;

[0018] The method of determining the same measurement basis vector selected by both communicating parties based on the hash value corresponding to each segment of the first sequence and the hash value corresponding to each segment of the second sequence includes:

[0019] Compare the hash values ​​corresponding to the first sequence and the second sequence of the same paragraph identifiers to determine the paragraph identifiers with the same hash values;

[0020] Based on the first sequence corresponding to the paragraph identifier, the same measurement basis vector selected by both communicating parties is determined.

[0021] In some embodiments of the present disclosure, it also includes:

[0022] If it is determined that there is no paragraph tag with the same hash value, regenerate the test sequence;

[0023] Based on the regenerated test sequence, the hash values ​​corresponding to the first sequence and the hash values ​​corresponding to the second sequence of the same paragraph identifiers are compared until paragraph identifiers with the same hash values ​​are determined.

[0024] In some embodiments of the present disclosure, after determining that the same measurement basis vector is selected by both communicating parties, the method further includes:

[0025] Performing a shift process on the first sequence corresponding to the paragraph mark to obtain at least one third sequence;

[0026] receiving at least one fourth sequence sent by the second negotiating party; wherein the fourth sequence is obtained by performing a shift process on the second sequence corresponding to the paragraph mark;

[0027] Verifying the same measurement basis vector based on the at least one third sequence and the at least one fourth sequence;

[0028] Wherein, determining a second measurement result corresponding to the same measurement basis vector in the first measurement result includes:

[0029] When the verification passes, a second measurement result corresponding to the same measurement basis vector in the first measurement result is determined.

[0030] In some embodiments of the present disclosure, verifying the same measurement basis vector based on the at least one third sequence and the at least one fourth sequence includes:

[0031] Comparing original bits of the at least one third sequence with original bits of the at least one fourth sequence;

[0032] If the comparison results are consistent, the verification is confirmed to be successful.

[0033] In some embodiments of the present disclosure, after determining that the same measurement basis vector is selected by both communicating parties, the method further includes:

[0034] Select at least one verification paragraph tag from the paragraph tags with the same hash value;

[0035] Performing a shift process on the first sequence corresponding to the verification paragraph identifier to obtain at least one fifth sequence;

[0036] receiving at least one sixth sequence sent by the second negotiating party; wherein the sixth sequence is obtained by performing a shift process on the second sequence corresponding to the verification paragraph identifier;

[0037] Verifying the same measurement basis vector based on the at least one fifth sequence and the at least one sixth sequence;

[0038] Wherein, determining a second measurement result corresponding to the same measurement basis vector in the first measurement result includes:

[0039] When the verification passes, a second measurement result corresponding to the same measurement basis vector in the first measurement result is determined.

[0040] In some embodiments of the present disclosure, after generating a key based on the second measurement result, the method further includes:

[0041] performing error detection on the key;

[0042] In response to error detection being passed, error correction and / or privacy amplification is performed on the key to obtain a shared key.

[0043] In some embodiments of the present disclosure, after obtaining the shared key, the method further includes:

[0044] The shared key is used for identity authentication.

[0045] In some embodiments of the present disclosure, determining a plurality of measurement basis vectors according to the test sequence includes:

[0046] Based on a preset selection rule, determining a plurality of measurement basis vectors according to the test sequence;

[0047] The preset selection rule is used to characterize the corresponding relationship between the bit value in the test sequence and the measurement basis vector.

[0048] According to a second aspect of the present disclosure, there is also provided a key generation device, comprising:

[0049] An acquisition module, used for acquiring one particle among multiple particles in a quantum entangled state;

[0050] A measurement basis vector determination module, used to generate a test sequence based on quantum random numbers, and determine a plurality of measurement basis vectors according to the test sequence;

[0051] A particle measurement module, configured to measure the one particle based on the multiple measurement basis vectors to obtain a first measurement result;

[0052] The same measurement basis vector determination module is used to perform hash processing on the test sequence to obtain a processed test sequence, and determine the same measurement basis vector selected by the two communicating parties based on the processed test sequence;

[0053] The key generation module is used to determine a second measurement result corresponding to the same measurement basis vector in the first measurement result, and generate a key based on the second measurement result.

[0054] According to a third aspect of the present disclosure, an electronic device is also provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the key generation method described in any one of the above-mentioned first aspects by executing the executable instructions.

[0055] According to a fourth aspect of the present disclosure, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the key generation method described in any one of the first aspects above is implemented.

[0056] According to a fifth aspect of the present disclosure, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the key generation method described in any one of the first aspects above is implemented.

[0057] The key generation method provided in the embodiment of the present disclosure obtains one particle among multiple particles in a quantum entangled state; generates a test sequence based on quantum random numbers, and determines multiple measurement basis vectors according to the test sequence; measures a particle based on multiple measurement basis vectors to obtain a first measurement result; performs hash processing on the test sequence to obtain a processed test sequence, and determines the same measurement basis vector selected by both communicating parties based on the processed test sequence; determines the second measurement result corresponding to the same measurement basis vector in the first measurement result, and generates a key based on the second measurement result. By utilizing the quantum non-cloning property and the instant association property of the entangled state, the generated key has high security, so that the key-based identity authentication key system does not need to pre-set the key, and there is no need to frequently update the key to reduce the possibility of the key being stolen, thereby reducing the complexity of the key system; by utilizing the instant association property of the entangled state, the communicating parties can achieve identity authentication without relying on other authentication mechanisms, thereby reducing the complexity of the key system.

[0058] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0060] Figure 1 A schematic diagram showing a key generation system architecture in an embodiment of the present disclosure;

[0061] Figure 2 A schematic diagram of a key generation method according to an embodiment of the present disclosure is shown;

[0062] Figure 3 A schematic diagram showing a specific implementation process of S208 in some embodiments of the present disclosure is shown;

[0063] Figure 4 A schematic diagram showing a specific implementation process of S308 in some embodiments of the present disclosure is shown;

[0064] Figure 5 A schematic diagram of a key generation method in some embodiments of the present disclosure is shown;

[0065] Figure 6 A schematic diagram of a key generation method flow in some other embodiments of the present disclosure is shown;

[0066] Figure 7A schematic diagram of a key generation method in some exemplary embodiments of the present disclosure is shown;

[0067] Figure 8 A schematic diagram of a key generation method flow in some other exemplary embodiments of the present disclosure is shown;

[0068] Fig. 9 A schematic diagram of a key generation workflow in a specific example of the present disclosure is shown;

[0069] Fig.10 The specific example of the present disclosure is shown based on Fig. 9 Schematic diagram of the generated quantum key distribution process;

[0070] Fig.11 A schematic diagram of a key generation device in an embodiment of the present disclosure is shown; and

[0071] Fig.12 A structural block diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0072] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0073] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0074] The specific implementation of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.

[0075] Figure 1 FIG. 1 shows an exemplary application system architecture diagram to which the key generation method in the embodiment of the present disclosure can be applied. Figure 1 As shown, the system architecture may include: a first negotiating party 101 and a second negotiating party 102. The first negotiating party 101 and the second negotiating party 102 constitute two communicating parties.

[0076] The first negotiating party 101 may be a terminal device, i.e., various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, wearable devices, augmented reality devices, virtual reality devices, smart gateways, etc. It may also be a server that provides various services. Optionally, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0077] The second negotiating party 102 may be a terminal device, i.e., various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, wearable devices, augmented reality devices, virtual reality devices, smart gateways, etc. It may also be a server that provides various services. Optionally, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0078] Based on the non-cloning of quantum mechanics and the Heisenberg uncertainty principle, any eavesdropping will destroy the characteristics of the entangled state and be detected. The quantum entangled pair of the communicating parties is measured to achieve secure information transmission and identity authentication. The quantum entanglement source generates a pair or more particles in a quantum entangled state, such as photons, and sends two of the photons to the communicating parties respectively. The first negotiation party 101 and the second negotiation party 102 each randomly select a measurement basis (such as the polarization direction of the photon) for measurement and record their respective measurement results. Then, the first negotiation party 101 and the second negotiation party 102 exchange measurement basis information through the classical channel and compare the exchanged measurement basis information based on the exchanged measurement basis information, and compare the results obtained under the same measurement basis. If the photon is in an entangled state, no matter which measurement basis is selected, the results are highly correlated, for example, one is in a "+" state and the other is in a "-" state, which indicates that the communication has not been tampered with. The selected measurement basis is kept confidential between the communicating parties until the measurement is completed and the information is exchanged through the classical channel. If multiple measurement results show the expected correlation, then the identity authentication is successful. The above process utilizes the non-local characteristics of quantum entanglement. Any attempt to monitor or interfere with the entangled state will destroy the entanglement and thus be discovered during the authentication process. Therefore, it provides higher security than traditional mainstream encryption verification methods, and does not require the communicating parties to share keys in advance, making the system simpler.

[0079] In some embodiments of the present disclosure, the first negotiating party 101 is used to obtain a particle among multiple particles in a quantum entangled state, generate a first test sequence based on quantum random numbers, and determine multiple measurement basis vectors according to the first test sequence; measure a particle based on the multiple measurement basis vectors to obtain a first measurement result; perform hash processing on the first test sequence to obtain a processed first test sequence, and determine the same measurement basis vector selected by the communicating two parties based on the processed first test sequence; determine a second measurement result corresponding to the same measurement basis vector in the first measurement result, and generate a key based on the second measurement result.

[0080] Specifically, the first negotiating party 101 is used to divide the first test sequence into multiple first sequence segments; perform hash processing on each first sequence segment to obtain a hash value corresponding to each first sequence segment; receive multiple second sequence segments sent by the second negotiating party 102 and a hash value corresponding to each second sequence segment; and determine the same measurement basis vector selected by both communicating parties based on the hash value corresponding to each first sequence segment and the hash value corresponding to each second sequence segment. Each first sequence segment includes a paragraph identifier, and each second sequence segment includes a paragraph identifier. By comparing the hash value of the first sequence with the hash value of the second sequence having the same paragraph identifier, if the hash values ​​are the same, it indicates that the first sequence and the second sequence corresponding to the paragraph identifier are the same, that is, the measurement basis vectors randomly selected by the communicating parties are the same, and the same measurement basis vector selected by the communicating parties can be determined, and a key is generated according to the second measurement result corresponding to the same measurement basis vector.

[0081] It should be noted that since the first negotiating party 101 and the second negotiating party 102 are highly random when generating the test sequence, there may be a situation where the hash values ​​are not the same. At this time, the communicating parties each regenerate the test sequence, and repeat the process of comparing the hash value corresponding to the first sequence of the same paragraph identifier and the hash value corresponding to the second sequence based on the first test sequence until it is determined that the hash values ​​are the same.

[0082] In some embodiments of the present disclosure, the first negotiating party 101 is also used to perform shift processing on the first sequence corresponding to the paragraph identifiers with the same hash value to obtain at least one third sequence; receive at least one fourth sequence sent by the second negotiating party 102; wherein the fourth sequence is obtained by performing shift processing on the second sequence corresponding to the paragraph identifiers with the same hash value; and verify the same measurement basis vector based on at least one third sequence and at least one fourth sequence. That is, when the verification passes, the second measurement result corresponding to the same measurement basis vector in the first measurement result is determined. The same measurement basis vector is further verified by the shift processing to ensure that the determined same measurement basis vector is more accurate, and the shift processing increases the complexity of the verification to ensure the security of the key finally generated.

[0083] In some other embodiments of the present disclosure, the first negotiating party 101 is also used to select at least one verification paragraph identifier from the paragraph identifiers with the same hash value, and send the at least one verification paragraph identifier to the second negotiating party 102 to inform the second negotiating party 102; perform shift processing on the first sequence corresponding to the verification paragraph identifier to obtain at least one fifth sequence; receive at least one sixth sequence sent by the second negotiating party 102; wherein the sixth sequence is obtained by performing shift processing on the second sequence corresponding to the verification paragraph identifier; verify the same measurement basis vector based on at least one fifth sequence and at least one sixth sequence; when the verification is passed, determine the second measurement result corresponding to the same measurement basis vector in the first measurement result. That is to say, when verifying the accuracy of the same measurement basis vector, at least one segment is selected from several first sequences with the same hash value for verification, and the randomness of the selection further increases the difficulty of verification, thereby improving the security of the generated key.

[0084] In some embodiments of the present disclosure, the second negotiating party 102 is used to obtain another particle among multiple particles in a quantum entangled state. It should be noted that the particle obtained by the second negotiating party 102 is in a quantum entangled state with the particle obtained by the first negotiating party 101. A second test sequence is generated based on quantum random numbers, and multiple measurement basis vectors are determined according to the second test sequence; the particle is measured based on the multiple measurement basis vectors to obtain a third measurement result; the second test sequence is hashed to obtain a processed second test sequence, and the same measurement basis vector selected by the communicating parties is determined based on the processed second test sequence; a fourth measurement result corresponding to the same measurement basis vector in the third measurement result is determined, and a key is generated based on the fourth measurement result.

[0085] Specifically, the second negotiating party 102 is used to divide the second test sequence into multiple segments of the second sequence; perform hash processing on each segment of the second sequence to obtain a hash value corresponding to each segment of the second sequence; receive multiple segments of the first sequence sent by the first negotiating party 101 and the hash value corresponding to each segment of the first sequence; based on the hash value corresponding to each segment of the second sequence and the hash value corresponding to each segment of the first sequence, determine the same measurement basis vector selected by the communicating parties. Each segment of the first sequence includes a paragraph identifier, and each segment of the second sequence includes a paragraph identifier. By comparing the hash value of the first sequence with the hash value of the second sequence having the same paragraph identifier, if the hash values ​​are the same, it indicates that the first sequence and the second sequence corresponding to the paragraph identifier are the same, that is, the measurement basis vectors randomly selected by the communicating parties are the same, which can be used to determine the same measurement basis vector selected by the communicating parties, and generate a key according to the second measurement result corresponding to the same measurement basis vector.

[0086] It should be noted that since the first negotiating party 101 and the second negotiating party 102 are highly random when generating the test sequence, there may be a situation where the hash values ​​are not the same. At this time, the communicating parties each regenerate the test sequence, and the second negotiating party 102 repeats the process of comparing the hash value corresponding to the second sequence of the same paragraph identifier and the hash value corresponding to the first sequence based on the second test sequence until it is determined that the hash values ​​are the same.

[0087] In some embodiments of the present disclosure, the second negotiating party 102 is further used to perform shift processing on the second sequence corresponding to the paragraph identifier with the same hash value to obtain at least one fourth sequence; receive at least one third sequence sent by the first negotiating party 101; and verify the same measurement basis vector based on at least one third sequence and at least one fourth sequence. That is, when the verification passes, the fourth measurement result corresponding to the same measurement basis vector in the third measurement result is determined. The same measurement basis vector is further verified by the shift processing to ensure that the determined same measurement basis vector is more accurate, and the shift processing increases the complexity of the verification to ensure the security of the key finally generated.

[0088] In some other embodiments of the present disclosure, the second negotiating party 102 is also used to select at least one verification paragraph identifier from the paragraph identifiers with the same hash value, and send the at least one verification paragraph identifier to the first negotiating party 101 to inform the first negotiating party 101; perform shift processing on the second sequence corresponding to the verification paragraph identifier to obtain at least one sixth sequence; receive at least one fifth sequence sent by the first negotiating party 101; verify the same measurement basis vector based on at least one fifth sequence and at least one sixth sequence; when the verification is passed, determine the fourth measurement result corresponding to the same measurement basis vector in the third measurement result. That is to say, when verifying the accuracy of the same measurement basis vector, at least one segment is selected from several segments of the second sequence with the same hash value for verification, and the randomness of the selection further increases the difficulty of verification, thereby improving the security of the generated key.

[0089] like Figure 1 As shown, an interactive method of an exemplary application system architecture of a key generation method in an exemplary embodiment of the present disclosure includes:

[0090] S102, the first negotiating party 101 obtains particle L1;

[0091] S104, the first negotiation party 101 generates a first test sequence based on quantum random numbers, and determines a plurality of measurement basis vectors according to the first test sequence; and measures the particle L1 based on the plurality of measurement basis vectors to obtain a first measurement result;

[0092] S106, the second negotiating party 102 obtains particle L2;

[0093] It should be noted that particle L1 and particle L2 are a pair of particles in a quantum entangled state generated by a quantum entanglement source.

[0094] S108, the second negotiating party 102 generates a second test sequence based on the quantum random number, and determines a plurality of measurement basis vectors according to the second test sequence; and measures the particle L2 based on the plurality of measurement basis vectors to obtain a third measurement result;

[0095] S110, the first negotiating party 101 divides the first test sequence into multiple first sequence segments, performs hash processing on each first sequence segment, and obtains a hash value corresponding to each first sequence segment;

[0096] It should be noted that the first sequence includes paragraph markers. For example, the paragraph markers of the n paragraphs of the first sequence are 1, 2, ..., n respectively.

[0097] S112, the first negotiating party 101 sends the hash value corresponding to the first sequence with the paragraph mark to the second negotiating party 102;

[0098] S114, the second negotiating party 102 divides the second test sequence into multiple second sequences, performs hash processing on each second sequence, and obtains a hash value corresponding to each second sequence;

[0099] It should be noted that the second sequence includes paragraph markers. For example, the paragraph markers of the n second sequences are 1, 2, ..., n respectively. The paragraph markers included in the second sequence may be the same as those included in the first sequence.

[0100] S116, the second negotiating party 102 sends the hash value corresponding to the second sequence with the paragraph mark to the first negotiating party 101;

[0101] S118, the first negotiating party 101 compares the hash values ​​corresponding to the first sequence and the second sequence of the same paragraph identifiers to determine the paragraph identifiers with the same hash values;

[0102] S120, the second negotiating party 102 compares the hash values ​​corresponding to the second sequence of the same paragraph identifiers with the hash values ​​corresponding to the first sequence to determine the paragraph identifiers with the same hash values;

[0103] S122, the first negotiating party 101 determines the same measurement basis vector selected by both communicating parties based on the first sequence corresponding to the paragraph identifiers with the same hash value;

[0104] S124, the second negotiating party 102 determines the same measurement basis vector selected by both communicating parties based on the second sequence corresponding to the paragraph identifiers with the same hash value;

[0105] S126, the first negotiating party 101 selects at least one verification paragraph identifier from the paragraph identifiers with the same hash value;

[0106] S128, the first negotiating party 101 sends at least one verification paragraph identifier to the second negotiating party 102;

[0107] It should be noted that the second negotiating party 102 may also select at least one verification paragraph identifier from the paragraph identifiers with the same hash value, and send it to the first negotiating party 101, which is not limited in the embodiment of the present disclosure.

[0108] S130, the first negotiating party 101 performs a shift process on the first sequence corresponding to the verification paragraph identifier to obtain at least one fifth sequence;

[0109] S132, the first negotiating party 101 sends at least one fifth sequence to the second negotiating party 102;

[0110] S134, the second negotiating party 102 performs shift processing on the second sequence corresponding to the verification paragraph identifier to obtain at least one sixth sequence;

[0111] S136, the second negotiating party 102 sends at least one sixth sequence to the first negotiating party 101;

[0112] S138, the first negotiating party 101 verifies the same measurement basis vector based on at least one fifth sequence and at least one sixth sequence;

[0113] S140, when the verification is passed, the first negotiating party 101 determines a second measurement result corresponding to the same measurement basis vector in the first measurement result, and generates a key based on the second measurement result;

[0114] S142, the second negotiating party 102 verifies the same measurement basis vector based on at least one fifth sequence and at least one sixth sequence;

[0115] S144: When the verification is passed, the second negotiating party 102 determines a fourth measurement result corresponding to the same measurement basis vector in the third measurement result, and generates a key based on the fourth measurement result.

[0116] Under the above system architecture, a key generation method is provided in an embodiment of the present disclosure. In some embodiments, the key generation method provided in an embodiment of the present disclosure can be implemented by the first negotiating party 101, can be implemented by the second negotiating party 102, or can be implemented by the interaction between the first negotiating party 101 and the second negotiating party 102.

[0117] like Figure 2 As shown, a key generation method provided in an embodiment of the present disclosure is applied to a first negotiating party, comprising:

[0118] S202, obtaining a particle from a plurality of particles in a quantum entangled state;

[0119] It should be noted that a pair or more quantum entangled particles can be generated in a quantum entanglement source, and the particles can be photons. Two particles in the pair or more quantum entangled particles are sent to the communicating parties, that is, the first negotiating party and the second negotiating party respectively. Based on the non-cloning of quantum mechanics and the Heisenberg uncertainty principle, any eavesdropping will destroy the entangled state and will be detected. By measuring the two particles in the quantum entangled state of the communicating parties, secure information transmission and identity authentication can be achieved.

[0120] S204, generating a test sequence based on quantum random numbers, and determining a plurality of measurement basis vectors according to the test sequence;

[0121] It should be noted that the quantum random number is generated by a quantum random number generator, and the test sequence is a bit sequence of a predetermined length. For example, a test sequence of 1024 bits in length can be generated. In specific implementation, based on the preset selection rules, multiple measurement basis vectors are determined according to the test sequence; wherein the preset selection rules are used to characterize the correspondence between the bit value in the test sequence and the measurement basis vector. For example, when the bit value in the test sequence is 0, it represents the measurement basis vector Z corresponding to the bit value at this time, and when the bit value in the test sequence is 1, it represents the measurement basis vector X corresponding to the bit value at this time. It can be understood by those skilled in the art that the above examples are only examples, and it can also be preset that when the bit value is 0, it represents the measurement basis vector X corresponding to the bit value at this time; when the bit value is preset to 1, it represents the measurement basis vector Z corresponding to the bit value at this time, and the embodiments of the present disclosure are not limited here.

[0122] S206, measuring a particle based on multiple measurement basis vectors to obtain a first measurement result;

[0123] It should be noted that the polarization state of a particle is a physical quantity that is often used to encode quantum information. Photons can have horizontal polarization (usually marked as |H>), vertical polarization (|V>), or linear polarization at any angle, as well as circular polarization or elliptical polarization. When measuring a particle, the particle is projected onto an eigenstate of the measurement basis vector, and the corresponding probability result is obtained based on the overlap between the polarization state of the particle and the measurement basis vector, thereby obtaining the measurement result of the particle based on the measurement basis vector.

[0124] S208, performing hash processing on the test sequence to obtain a processed test sequence, and determining the same measurement basis vector selected by both communicating parties based on the processed test sequence;

[0125] It should be noted that since the two communicating parties determine the measurement basis vector based on quantum random numbers, which are highly random, the key generation needs to be based on the same measurement basis vector selected by the two communicating parties. Therefore, the two communicating parties need to disclose some data or information through the classical channel to determine the same measurement basis vector selected by both parties, but the same selected measurement basis vector cannot be directly disclosed to avoid interference with the security of the generated key after leakage.

[0126] It should be noted that the classical channel refers to the physical or virtual medium used to transmit classical information. In contrast to the quantum channel, the classical channel follows the principles of classical physics and electromagnetism and does not involve quantum mechanical effects. It can include: wired channels, wireless channels, storage media, and network channels.

[0127] S210: Determine a second measurement result corresponding to the same measurement basis vector in the first measurement result, and generate a key based on the second measurement result.

[0128] It should be noted that the results of particle measurement by the communicating parties based on the same measurement basis vector selected by both parties are consistent, and a string of bit streams can be generated based on the consistent measurement results, which is the key recognized by both parties.

[0129] It can be seen from the above steps that the key generation method provided in the embodiments of the present invention, by utilizing the quantum non-cloning property and the instant association property of the entangled state, makes the generated key highly secure, so that the key-based identity authentication key system does not need to pre-set keys, and there is no need to frequently update keys to reduce the possibility of key theft, thereby reducing the complexity of the key system; by utilizing the instant association property of the entangled state, the communicating parties can achieve identity authentication without relying on other authentication mechanisms, thereby reducing the complexity of the key system.

[0130] In some embodiments of the present disclosure, the specific implementation process of S208 is as follows: Figure 3 As shown, the following steps are included:

[0131] S302, dividing the test sequence into a plurality of first sequences;

[0132] It should be noted that the test sequence is divided into multiple first sequences, which can be evenly divided into multiple first sequences. For example, the test sequence with a length of 1024 bits can be divided into 16 first sequences, each of which has a length of 64 bits. In order to distinguish the first sequence, each first sequence includes a paragraph identifier, which can be numbered according to the front and back positions of the first sequence in the test sequence. For example, starting from the sequence head, the 16 first sequences in the above example are numbered 1, 2, ..., 16 in sequence as the paragraph identifiers of the 16 first sequences.

[0133] S304, performing hash processing on each segment of the first sequence to obtain a hash value corresponding to the first sequence;

[0134] It should be noted that the hash value is a fixed-length string generated by a specific hash function after processing the input data. This process usually converts input data of any length into a shorter, fixed-length binary string, which is called a hash value. Due to the uniqueness and irreversibility of the hash value, the communicating parties publicly disclose the hash value corresponding to the first sequence and the hash value corresponding to the second sequence, which can not only compare the paragraphs with consistent test sequences, but also avoid the leakage of original data, ensure data privacy and security, and thus ensure the security of key generation.

[0135] In some embodiments of the present disclosure, the hash value corresponding to each first sequence may be calculated by using a hash function such as MD5 (Message Digest Algorithm 5), SHA-1 (Secure Hash Algorithm 1), SHA-256, SHA-3 or BLAKE2.

[0136] S306, receiving multiple second sequences and a hash value corresponding to each second sequence sent by the second negotiating party;

[0137] It should be noted that the first negotiating party and the second negotiating party constitute the communicating parties. The second negotiating party generates a test sequence based on quantum random numbers, and divides the test sequence generated by the second negotiating party into multiple second sequences in the same test sequence segmentation method as the first negotiating party. It can be understood by those skilled in the art that the first negotiating party and the second negotiating party can independently generate the first sequence and the second sequence by pre-agreing on the length of the test sequence and the way of segmenting the test sequence. It is also possible that after the first negotiating party generates the test sequence and segments the test sequence, the length bit number of the generated test sequence and the way of segmenting the test sequence are sent to the second negotiating party to inform the second negotiating party.

[0138] S308: Determine the same measurement basis vector selected by both communicating parties based on the hash value corresponding to each segment of the first sequence and the hash value corresponding to each segment of the second sequence.

[0139] It should be noted that, like the first sequence, the second sequence includes paragraph marks. In some embodiments of the present disclosure, S308 is specifically implemented as follows: Figure 4 As shown, the following steps may be included:

[0140] S402, comparing hash values ​​corresponding to a first sequence and a second sequence of the same paragraph identifiers to determine paragraph identifiers with the same hash values;

[0141] S404: Determine the same measurement basis vector selected by both communicating parties based on the first sequence corresponding to the paragraph identifier.

[0142] It should be noted that when the hash value corresponding to the first sequence and the hash value corresponding to the second sequence of the same paragraph identifier are the same, it means that the original data of the first sequence and the second sequence are the same, that is, the measurement basis vectors are the same.

[0143] In some embodiments of the present disclosure, due to the randomness of the selection of the measurement basis vector, there may be a situation where there are no paragraph identifiers with the same hash value. In this case, the key generation method provided by the embodiment of the present disclosure is Figure 4 Based on the above, the method further includes: regenerating a test sequence; based on the regenerated test sequence, comparing the hash values ​​corresponding to the first sequence and the hash values ​​corresponding to the second sequence of the same paragraph identifier, until determining paragraph identifiers with the same hash values. That is, determining that there are no paragraph identifiers with the same hash values, regenerating the test sequence, and looping steps S204, S206, S302 to S306, S402, until determining paragraph identifiers with the same hash values.

[0144] In some embodiments of the present disclosure, a key generation method is provided, such as Figure 5 As shown, in Figure 3 On the basis of, after determining that the same measurement basis vectors are selected by both communicating parties, the following steps are also included:

[0145] S502, performing shift processing on the first sequence corresponding to the paragraph identifiers with the same hash value to obtain at least one third sequence;

[0146] It should be noted that by performing a shift processing on the first sequence corresponding to the paragraph identifier with the same hash value to increase the complexity of verification, even if the attacker knows the hash value of a certain first sequence before the shift, it is impossible to accurately predict the bit content after the shift, thereby improving the security of the same measurement basis vector after verification. In specific implementation, the first negotiating party can select a preset shift value agreed with the second negotiating party to shift left or right, and the second negotiating party can also select an agreed shift value to shift left or right. It should be noted that the shift processing performed by the first negotiating party and the second negotiating party is the same. In order to further increase the complexity of verification, the first negotiating party can randomly select a shift value to shift left or right, and send the randomly selected shift value and the shift processing to the second negotiating party in an encrypted manner to inform the second negotiating party so that the second negotiating party can perform a shift processing on the second sequence corresponding to the paragraph identifier with the same hash value.

[0147] S504, receiving at least one fourth sequence sent by the second negotiating party;

[0148] The fourth sequence is obtained by the second negotiating party performing a shift process on the second sequence corresponding to the paragraph identifiers having the same hash value.

[0149] S506: Verify the same measurement basis vector based on at least one segment of the third sequence and at least one segment of the fourth sequence.

[0150] When S506 is specifically implemented, it includes: comparing the original bits of at least one segment of the third sequence and the original bits of at least one segment of the fourth sequence; if the comparison results are consistent, it is determined that the verification is passed. That is, according to the paragraph identifier, the original bits of the third sequence and the original bits of the fourth sequence corresponding to the same paragraph identifier are compared respectively. If the comparison is consistent, it indicates that the third sequence and the fourth sequence are consistent, that is, the determined identical measurement basis vector is accurate and the verification is passed.

[0151] Accordingly, step S210 is changed to S210'. When the verification is passed, a second measurement result corresponding to the same measurement basis vector in the first measurement result is determined, and a key is generated based on the second measurement result.

[0152] In other embodiments of the present disclosure, a key generation method is provided, such as Figure 6 As shown, in Figure 3 On the basis of, after determining that the same measurement basis vectors are selected by both communicating parties, the following steps are also included:

[0153] S602, selecting at least one verification paragraph identifier from the paragraph identifiers with the same hash value;

[0154] It should be noted that at least one verification paragraph identifier is selected from the paragraph identifiers with the same hash value, rather than all the paragraph identifiers with the same hash value, which further increases the complexity of verification. The attacker not only needs to crack whether the displacement is left or right during the displacement processing, and what the displacement value is, but also needs to determine the first sequence corresponding to the paragraph identifiers with the same hash value from at least a fifth sequence after partial displacement processing, which greatly increases the difficulty of cracking for the attacker, thereby improving the security of the key.

[0155] It should be noted that the at least one verification paragraph identifier can be jointly agreed upon in advance by the first negotiating party and the second negotiating party, or can be randomly determined by either party and sent to the other party after determination to inform the other party of the at least one verification paragraph identifier.

[0156] S604, performing shift processing on the first sequence corresponding to the verification paragraph identifier to obtain at least one fifth sequence;

[0157] It should be noted that the first negotiating party can select a preset displacement value agreed upon with the second negotiating party to shift left or right, and the second negotiating party can also select an agreed displacement value to shift left or right. It should be noted that the displacement processing performed by the first negotiating party and the second negotiating party is the same. In order to further increase the complexity of verification, the first negotiating party can randomly select a displacement value to shift left or right, and send the randomly selected displacement value and displacement processing to the second negotiating party in an encrypted manner to inform the second negotiating party so that the second negotiating party can perform displacement processing on the second sequence corresponding to the paragraph identifier with the same hash value.

[0158] S606, receiving at least one sixth sequence sent by the second negotiating party;

[0159] It should be noted that the sixth sequence is obtained by the second negotiating party performing a shift processing on the second sequence corresponding to the verification paragraph identifier, and the shift processing performed is consistent with the shift processing performed by the first negotiating party on the first sequence corresponding to the verification paragraph identifier.

[0160] S608: Verify the same measurement basis vector based on at least one segment of the fifth sequence and at least one segment of the sixth sequence.

[0161] When S608 is specifically implemented, it includes: comparing the original bits of at least one section of the fifth sequence and the original bits of at least one section of the sixth sequence; if the comparison results are consistent, it is determined that the verification is passed. That is, according to the paragraph identifier, the original bits of the fifth sequence and the original bits of the sixth sequence corresponding to the same paragraph identifier are compared respectively. If the comparison is consistent, it indicates that the fifth sequence and the sixth sequence are consistent, that is, the determined identical measurement basis vector is accurate and the verification is passed.

[0162] Accordingly, step S210 is changed to S210'. When the verification is passed, a second measurement result corresponding to the same measurement basis vector in the first measurement result is determined, and a key is generated based on the second measurement result.

[0163] In some embodiments of the present disclosure, a key generation method is provided, such as Figure 7 As shown, in Figure 2 On the basis of, after S210, the following steps are also included:

[0164] S702, performing error detection on the generated key;

[0165] It should be noted that in order to detect whether there is an eavesdropper, the communicating parties further disclose a portion of the reserved key bits for error rate check. If the error rate is too high, it indicates that there may be an eavesdropper or channel noise. The communicating parties discard the entire key and start again to ensure the security of the final generated key. If the error rate is within the expected range, it means that the error detection has passed.

[0166] S704, in response to the error detection being passed, performing error correction and / or privacy amplification on the key to obtain a shared key.

[0167] It should be noted that error correction refers to the use of information reconciliation protocols (such as information reconciliation coding or low-density parity check codes) to eliminate errors caused by channel noise or eavesdropping, ensuring that the keys of both communicating parties are exactly the same. Privacy amplification refers to the use of an algorithm to shorten the length of the key to ensure that even if an eavesdropper may have obtained part of the information, the entire key cannot be predicted. Privacy amplification ensures the absolute security of the final key.

[0168] In specific implementation, the BB84 protocol can be used for error detection, error correction, and privacy amplification.

[0169] It should be noted that after obtaining the shared key, both communicating parties have the same, secure, and unknown key to any third party. The shared key can be used for subsequent encrypted communications to complete the secure transmission of encrypted data. In some embodiments of the present disclosure, a key generation method is provided, such as Figure 8 As shown, in Figure 7 On this basis, the following steps are also included:

[0170] S802, use the shared key to perform identity authentication.

[0171] That is, the first negotiating party uses a shared key to authenticate itself with the second negotiating party. For example, the first negotiating party can use a part of the shared key to encrypt a challenge message and send it to the second negotiating party. The second negotiating party decrypts and responds with the same key to confirm the identities of both parties and ensure the security of communication.

[0172] In order to better illustrate the key generation method provided by the embodiment of the present disclosure, a specific example is now given for further explanation. Fig. 9 The key generation workflow shown includes:

[0173] Preparation phase: Generate a pair or more quantum entangled particles in the quantum entanglement source, and send a pair of entangled particle pairs to the communication party Alice and the communication party Bob respectively.

[0174] Randomly select measurement basis: Alice and Bob each randomly select a measurement basis vector, and the selection of the measurement basis vector is generated by quantum random numbers.

[0175] Specifically, Alice and Bob each use a quantum random number generator to generate a test sequence of a specific length. For example, a sequence of 1024 bits is generated, and the bit value can be used as a selection of a measurement basis vector used in key distribution (for example, 0 represents the selection of basis Z, and 1 represents the selection of basis X).

[0176] Alice and Bob divide their respective test sequences into multiple small segments, for example, into 16 segments, each segment having 64 bits.

[0177] Each segment of the sequence is hashed using a secure algorithm such as SHA-256, and then the hash value is exchanged through a classical channel. Only the hash value of each segment, rather than the original sequence, is disclosed in the classical channel to protect information security.

[0178] After publishing the hash value, Alice and Bob randomly select a shift value and shift their respective sequences. Then, both parties only disclose the original bits of certain segments after the shift (not all) through the classical channel for direct bit comparison. The displacement increases the complexity of verification. Even if the attacker knows the hash value of a segment before the shift, he cannot accurately predict the content of the bits after the shift. Both parties select specific segments, disclose the bits of these segments after the shift, and compare the results. If the bit sequences after the shift are consistent, this shows that the quantum random number generation process is independent and unbiased.

[0179] During statistical testing and feedback, a similarity threshold is set, that is, the threshold of the similarity between each sequence segment. For example, if the similarity between all small sequence segments is less than 0.05, it is considered that the test result does not meet the randomness assumption and the test sequence needs to be regenerated.

[0180] like Fig.10 As shown, based on Fig. 9 The generated quantum key distribution process specifically includes:

[0181] A pair or more quantum entangled particles are generated from a quantum entanglement source and sent to communication parties Alice and Bob respectively.

[0182] Alice and Bob each randomly choose a measurement basis (usually corresponding to different ways of measuring quantum states, such as the polarization direction of a photon) to measure the particle. Both parties record their own measurement results but do not share this information.

[0183] Alice and Bob exchange their respective measurement basis information through the classical channel, but do not exchange the measurement results.

[0184] The two parties select the measurements performed under the same measurement basis vector according to the measurement basis vector information selected by the other party, and generate a shared key based on these measurement results.

[0185] Using a pre-agreed protocol, such as the ground state correction and error correction steps in the BB84 protocol, Alice and Bob compare a small portion of the key via communication over a classical channel to detect and correct errors introduced by quantum channel noise.

[0186] Using the remaining fragments of the verified shared key, both parties authenticate their identities. For example, Alice encrypts a challenge message with a portion of the key and sends it to Bob, who decrypts and responds with the same key, confirming the identities of both parties and the security of the communication.

[0187] If the identity authentication is successful, proceed with subsequent communication; if it fails, exit or perform secondary authentication.

[0188] It can be seen that this specific example ensures that the quantum state cannot be accurately copied by utilizing the quantum non-cloning property, and uses a new entangled pair and a randomly selected measurement basis in each communication to prevent information from being intercepted or maliciously monitored, so as to ensure safer communication. Compared with the traditional symmetric encryption system that requires a third party to manage the key, this specific example does not require the intervention of a third party, which reduces the complexity of the system to achieve simple system management. In addition, this specific example can directly verify whether the communicating party is legal, and any illegal interception or intervention will be detected by the system, and identity authentication can be achieved. In the Internet of Things system, the frequent data exchange between devices requires a highly secure identity authentication mechanism. In this specific example, identity authentication through quantum entanglement can provide a more secure authentication method for smart devices to prevent illegal devices from accessing the network.

[0189] It can be seen from the above process that the key generated by this specific example has strong anti-attack ability: quantum entanglement identity authentication is based on the non-cloning of quantum states and the instant association characteristics of entangled states, so that any attempt to eavesdrop or tamper with communications will destroy the quantum state and will be detected immediately, greatly increasing the difficulty of attack. The key generated by this specific example can realize secure key distribution, generate secure keys through quantum entanglement pairs, and provide a one-time key for each communication session. These keys can be securely distributed among IoT devices for subsequent encrypted communications, and can remain efficient and secure even in IoT systems with a large number of devices and wide distribution. And each IoT device can use the shared entangled state for identity authentication before accessing the network. It can also be an identity authentication between a server or gateway and an IoT device. And it can reduce man-in-the-middle attacks. Due to the special properties of the quantum entangled state, any third party attempting to insert into the communication link will cause the destruction of the entangled state, thereby exposing its existence and improving the overall security of the IoT system. It can also be integrated into the existing architecture without changing too many traditional related infrastructures, and can be directly embedded in the existing IoT network architecture.

[0190] It should be noted that the acquisition, storage, use, and processing of data in the technical solution disclosed in this disclosure are in compliance with the relevant provisions of national laws and regulations.

[0191] Based on the same inventive concept, the present disclosure also provides a key generation device in the following embodiments. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0192] Fig.11 A schematic diagram of a key generation device in an embodiment of the present disclosure is shown. Fig.11 As shown, the device comprises:

[0193] An acquisition module 1101 is used to acquire one particle among multiple particles in a quantum entangled state;

[0194] A measurement basis vector determination module 1102 is used to generate a test sequence based on quantum random numbers and determine a plurality of measurement basis vectors according to the test sequence;

[0195] A particle measurement module 1103 is used to measure a particle based on multiple measurement basis vectors to obtain a first measurement result;

[0196] The same measurement basis vector determining module 1104 is used to perform hash processing on the test sequence to obtain a processed test sequence, and determine the same measurement basis vector selected by the two communicating parties based on the processed test sequence;

[0197] The key generation module 1105 is configured to determine a second measurement result corresponding to the same measurement basis vector in the first measurement result, and generate a key based on the second measurement result.

[0198] It should be noted that the acquisition module 1101, the measurement basis vector determination module 1102, the particle measurement module 1103, the same measurement basis vector determination module 1104 and the key generation module 1105 correspond to S202 to S210 in the method embodiment, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above method embodiment. It should be noted that the above modules as part of the device can be executed in a computer system such as a set of computer executable instructions.

[0199] In some embodiments of the present disclosure, the measurement basis vector determination module 1102 is specifically used to: determine multiple measurement basis vectors according to a test sequence based on a preset selection rule; wherein the preset selection rule is used to characterize the correspondence between the bit values ​​in the test sequence and the measurement basis vectors.

[0200] In specific implementation, the same measurement basis vector determination module 1104 is specifically used for:

[0201] dividing the test sequence into a plurality of first sequences;

[0202] Perform hash processing on each first sequence to obtain a hash value corresponding to each first sequence;

[0203] Receiving multiple second sequences and hash values ​​corresponding to each second sequence sent by the second negotiating party; wherein the first negotiating party and the second negotiating party constitute two communicating parties;

[0204] Based on the hash value corresponding to each segment of the first sequence and the hash value corresponding to each segment of the second sequence, the same measurement basis vector selected by both communicating parties is determined.

[0205] In some embodiments of the present disclosure, each first sequence includes a paragraph identifier, and each second sequence includes a paragraph identifier. The same measurement basis vector determination module 1104 is specifically used to: compare the hash value corresponding to the first sequence of the same paragraph identifier and the hash value corresponding to the second sequence, and determine the paragraph identifiers with the same hash value; based on the first sequence corresponding to the paragraph identifier, determine the same measurement basis vector selected by the communicating parties.

[0206] In some embodiments of the present disclosure, it also includes: a loop module, which is used to: if it is determined that there are no paragraph identifiers with the same hash value, regenerate a test sequence; based on the regenerated test sequence, compare the hash value corresponding to the first sequence of the same paragraph identifier with the hash value corresponding to the second sequence, until a paragraph identifier with the same hash value is determined.

[0207] In some embodiments of the present disclosure, it also includes: a first verification module, which is used to: perform shift processing on the first sequence corresponding to the paragraph identifier to obtain at least one third sequence; receive at least one fourth sequence sent by the second negotiating party; wherein the fourth sequence is obtained by performing shift processing on the second sequence corresponding to the paragraph identifier; and verify the same measurement basis vector based on at least one third sequence and at least one fourth sequence. Accordingly, the key generation module 1105 is specifically used to: when the verification is passed, determine the second measurement result corresponding to the same measurement basis vector in the first measurement result.

[0208] In some specific embodiments of the present disclosure, the first verification module is specifically used to: compare the original bits of at least one segment of the third sequence and the original bits of at least one segment of the fourth sequence; if the comparison results are consistent, it is determined that the verification is passed.

[0209] In some embodiments of the present disclosure, it also includes: a first verification module, which is used to: select at least one verification paragraph identifier from the paragraph identifiers with the same hash value; perform shift processing on the first sequence corresponding to the verification paragraph identifier to obtain at least one fifth sequence; receive at least one sixth sequence sent by the second negotiating party; wherein the sixth sequence is obtained by performing shift processing on the second sequence corresponding to the verification paragraph identifier; and verify the same measurement basis vector based on at least one fifth sequence and at least one sixth sequence. Accordingly, the key generation module 1105 is specifically used to: when the verification is passed, determine the second measurement result corresponding to the same measurement basis vector in the first measurement result.

[0210] In some embodiments of the present disclosure, it also includes: a shared key generation module, which is used to: perform error detection on the key; in response to the error detection being passed, perform error correction and / or privacy amplification on the key to obtain a shared key.

[0211] In some embodiments of the present disclosure, it also includes: an identity authentication module, which is used to: perform identity authentication using a shared key.

[0212] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0213] Refer to the following Fig.12 1200 according to this embodiment of the present disclosure is described. Fig.12 The electronic device 1200 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0214] like Fig.12 As shown, the electronic device 1200 is in the form of a general computing device. The components of the electronic device 1200 may include but are not limited to: at least one processing unit 1210, at least one storage unit 1220, and a bus 1230 connecting different system components (including the storage unit 1220 and the processing unit 1210).

[0215] The storage unit stores a program code, which can be executed by the processing unit 1210, so that the processing unit 1210 performs the steps of various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 1210 can perform the following steps of the above method embodiment:

[0216] Obtain one particle among multiple particles in a quantum entangled state;

[0217] Generate a test sequence based on quantum random numbers, and determine a plurality of measurement basis vectors according to the test sequence;

[0218] Measuring a particle based on multiple measurement basis vectors to obtain a first measurement result;

[0219] Performing hash processing on the test sequence to obtain a processed test sequence, and determining the same measurement basis vector selected by both communicating parties based on the processed test sequence;

[0220] A second measurement result corresponding to the same measurement basis vector in the first measurement result is determined, and a key is generated based on the second measurement result.

[0221] The storage unit 1220 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 12201 and / or a cache storage unit 12202 , and may further include a read-only storage unit (ROM) 12203 .

[0222] The storage unit 1220 may also include a program / utility 12204 having a set (at least one) of program modules 12205, such program modules 12205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0223] Bus 1230 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0224] The electronic device 1200 may also communicate with one or more external devices 1240 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1200, and / or communicate with any device that enables the electronic device 1200 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1250. Furthermore, the electronic device 1200 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1260. As shown, the network adapter 1260 communicates with other modules of the electronic device 1200 via a bus 1230. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0225] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0226] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer program product, which includes: a computer program, which implements the above-mentioned key generation method when executed by a processor.

[0227] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.

[0228] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0229] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0230] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0231] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0232] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0233] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0234] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0235] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A key generation method, characterized in that: Applicable to the first negotiating party, including: Obtain one particle among multiple particles in a quantum entangled state; Generate a test sequence based on quantum random numbers, and determine a plurality of measurement basis vectors according to the test sequence; Measuring the one particle based on the multiple measurement basis vectors to obtain a first measurement result; Performing hash processing on the test sequence to obtain a processed test sequence, and determining the same measurement basis vector selected by both communicating parties based on the processed test sequence; Determine a second measurement result corresponding to the same measurement basis vector in the first measurement result, and generate a key based on the second measurement result.

2. The key generation method according to claim 1, characterized in that: Performing hash processing on the test sequence to obtain a processed test sequence, and determining the same measurement basis vector selected by both communicating parties based on the processed test sequence, including: Dividing the test sequence into a plurality of first sequences; Performing hash processing on each segment of the first sequence to obtain a hash value corresponding to each segment of the first sequence; Receiving multiple second sequences and a hash value corresponding to each second sequence sent by a second negotiating party; wherein the first negotiating party and the second negotiating party constitute the communicating parties; Based on the hash value corresponding to each segment of the first sequence and the hash value corresponding to each segment of the second sequence, the same measurement basis vector selected by both communicating parties is determined.

3. The key generation method according to claim 2, characterized in that: Each of the first sequence includes a paragraph tag, and each of the second sequence includes a paragraph tag; The method of determining the same measurement basis vector selected by both communicating parties based on the hash value corresponding to each segment of the first sequence and the hash value corresponding to each segment of the second sequence includes: Comparing the hash values ​​corresponding to the first sequence and the hash values ​​corresponding to the second sequence of the same paragraph identifiers to determine the paragraph identifiers with the same hash values; Based on the first sequence corresponding to the paragraph identifier, the same measurement basis vector selected by both communicating parties is determined.

4. The key generation method according to claim 3, characterized in that: Also includes: If it is determined that there is no paragraph tag with the same hash value, regenerate the test sequence; Based on the regenerated test sequence, the hash values ​​corresponding to the first sequence and the hash values ​​corresponding to the second sequence of the same paragraph identifiers are compared until paragraph identifiers with the same hash values ​​are determined.

5. The key generation method according to claim 3, characterized in that: After determining that the same measurement basis vector is selected by both communicating parties, it also includes: Performing a shift process on the first sequence corresponding to the paragraph mark to obtain at least one third sequence; receiving at least one fourth sequence sent by the second negotiating party; wherein the fourth sequence is obtained by performing a shift process on the second sequence corresponding to the paragraph mark; Verifying the same measurement basis vector based on the at least one third sequence and the at least one fourth sequence; Wherein, determining a second measurement result corresponding to the same measurement basis vector in the first measurement result includes: When the verification passes, a second measurement result corresponding to the same measurement basis vector in the first measurement result is determined.

6. The key generation method according to claim 5, characterized in that: Verifying the same measurement basis vector based on the at least one third sequence and the at least one fourth sequence includes: Comparing original bits of the at least one third sequence with original bits of the at least one fourth sequence; If the comparison results are consistent, the verification is confirmed to be successful.

7. The key generation method according to claim 3, characterized in that: After determining that the same measurement basis vector is selected by both communicating parties, it also includes: Select at least one verification paragraph tag from the paragraph tags with the same hash value; Performing a shift process on the first sequence corresponding to the verification paragraph identifier to obtain at least one fifth sequence; receiving at least one sixth sequence sent by the second negotiating party; wherein the sixth sequence is obtained by performing a shift process on the second sequence corresponding to the verification paragraph identifier; Verifying the same measurement basis vector based on the at least one fifth sequence and the at least one sixth sequence; Wherein, determining a second measurement result corresponding to the same measurement basis vector in the first measurement result includes: When the verification passes, a second measurement result corresponding to the same measurement basis vector in the first measurement result is determined.

8. The key generation method according to claim 1, characterized in that: After generating a key based on the second measurement result, the method further includes: performing error detection on the key; In response to error detection being passed, error correction and / or privacy amplification is performed on the key to obtain a shared key.

9. The key generation method according to claim 8, characterized in that: After obtaining the shared key, it also includes: The shared key is used for identity authentication.

10. The key generation method according to claim 1, characterized in that: Determining a plurality of measurement basis vectors according to the test sequence includes: Based on a preset selection rule, determining a plurality of measurement basis vectors according to the test sequence; The preset selection rule is used to characterize the corresponding relationship between the bit value in the test sequence and the measurement basis vector.

11. A key generation device, characterized in that: include: An acquisition module, used for acquiring one particle among multiple particles in a quantum entangled state; A measurement basis vector determination module, used to generate a test sequence based on quantum random numbers, and determine a plurality of measurement basis vectors according to the test sequence; A particle measurement module, configured to measure the one particle based on the multiple measurement basis vectors to obtain a first measurement result; The same measurement basis vector determination module is used to perform hash processing on the test sequence to obtain a processed test sequence, and determine the same measurement basis vector selected by the two communicating parties based on the processed test sequence; The key generation module is used to determine a second measurement result corresponding to the same measurement basis vector in the first measurement result, and generate a key based on the second measurement result.

12. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the key generation method according to any one of claims 1 to 10 by executing the executable instructions.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the key generation method according to any one of claims 1 to 10 is implemented.

14. A computer program product comprising: A computer program or instruction, characterized in that when the computer program or instruction is executed by a processor, it implements the key generation method described in any one of claims 1 to 10.

Citation Information

Cited By

  • Quantum key generation method and device, equipment and medium

    CN119652506A

  • Identity authentication method and device and related equipment

    CN120223311A