Quantum casual transmission method and system, electronic equipment and storage medium

Through the use of target measurement and preparation and target positions in the inadvertent transmission of quantum transmission, the existing technology cannot support the N-selection-1 or N-selection -M mode, and achieve safe and efficient key distribution and information transmission.

CN119382876APending Publication Date: 2025-01-28中电信量子信息科技集团有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411493096.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The prior art cannot support the quantum inadvertent transmission mode of n-select-1 or n-select-m.

Method used

By receiving the n -group preparatory base sent by the sender's equipment, based on the n -group measurement base of the n -group system, and the target message indexed, the target measurement preparation is determined, the target position collection is generated, and it is sent to the device equipment. In order to generate the dense key to the target, support the inadvertent transmission mode of N-selection-1.

Benefits of technology

Realizing the inadvertent transmission mode of N-selection-1, ensuring the security of key distribution, improving the security ability of inadvertent transmission methods, and providing the foundation for the N-selection -m mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119382876A_ABST
    Figure CN119382876A_ABST
Patent Text Reader

Abstract

The invention provides a quantum casual transmission method and system, electronic equipment and a storage medium, and relates to the technical field of quantum cryptography. The method comprises the following steps: receiving n groups of preparation bases sent by sender equipment; determining a target measurement preparation pair according to the n groups of preparation bases, pre-generated n groups of measurement bases and a target message index; generating a target position set according to the target measurement preparation pair; and sending the target position set to the sender device, and generating a target decryption key according to the target position set, the target message index and n groups of pre-generated first quantum bits. In the scheme, in order to support an'n-select-1 'quantum casual transmission mode, the receiver equipment only performs base vector consistent comparison on the selected target measurement preparation pair to obtain the position of the same base, that is, the receiver equipment can only obtain the key of the group selected by the receiver equipment and cannot obtain the keys of other groups, so that the security of key distribution is ensured, and the accuracy of key distribution is improved. And the security capability of the casual transmission method is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum cryptography technology, and in particular to a quantum inadvertent transmission method, system, electronic device and storage medium. Background Art

[0002] Oblivious Transfer (OT) is an application protocol in cryptography, used in the interaction process between the sender and the receiver of a message. Currently, the oblivious transfer protocol includes many variants, namely 2-choose-1, n-choose-1, n-choose-m (m>1), etc. 2-choose-1 means that the receiver chooses "1" from "2" messages, n-choose-1 means that the receiver chooses "1" from "n" messages, and n-choose-m means that the receiver can choose "m" from "n" messages.

[0003] In the related art, when the sender and the receiver exchange data, only the 2-choose-1 transmission mode is supported. Specifically, the receiver generates a position set based on the sender's prepared substrate and its own measured substrate, and the position set includes: the same substrate position part and the different substrate position part; the receiver sends the position set to the sender; the sender generates two encryption keys based on the position set, and uses the two encryption keys to encrypt the message respectively, generates two ciphertexts, and sends the two ciphertexts to the receiver; the receiver decrypts the two ciphertexts based on the same substrate position in the position set, that is, the receiver can only decrypt one ciphertext message, and cannot decrypt the other message, thereby achieving inadvertent transmission.

[0004] However, the above technical solution cannot support n-choose-1 or n-choose-m transmission modes. Summary of the invention

[0005] The purpose of the present invention is to provide a quantum inadvertent transmission method, system, electronic device and storage medium to solve the technical problems existing in the prior art in view of the above-mentioned deficiencies in the prior art.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, an embodiment of the present application provides a quantum oblivious transmission method, which is applied to a receiving device, and the method includes:

[0008] Receive n groups of preparation bases sent by the sending device;

[0009] Determine a target measurement preparation pair according to the n groups of preparation bases, the n groups of measurement bases generated in advance, and the target message index, wherein the target measurement preparation pair includes a group of preparation bases and a group of measurement bases with the same index identifier;

[0010] Generate a target position set according to the target measurement and preparation pair, wherein the target position set includes: a plurality of position parameters, the values ​​of the position parameters are used to characterize the positions of the same basis in the target measurement and preparation pair;

[0011] The target position set is sent to the sending device, and a target decryption key is generated according to the target position set, the target message index and the pre-generated n groups of first quantum bits.

[0012] Optionally, determining the target measurement preparation pair according to the n groups of preparation bases, the pre-generated n groups of measurement bases, and the target message index includes:

[0013] Generating n to-be-selected measurement preparation pairs according to the index identifiers of the n groups of preparation bases and the index identifiers of the n groups of measurement bases;

[0014] The target measurement preparation pair is determined according to the index identifiers of the n groups of candidate measurement preparation pairs and the target message index.

[0015] Optionally, the determining the target measurement preparation pair according to the index identifiers of the n groups of measurement preparation pairs and the target message index includes:

[0016] Obtaining a current measurement preparation pair from the n measurement preparation pairs to be selected;

[0017] Determining whether the index identifier of the current measurement preparation pair is the same as the target message index;

[0018] If so, the current measurement preparation pair is used as the target measurement preparation pair.

[0019] Optionally, generating a target decryption key according to the target position set, the target message index, and the pre-generated n groups of first quantum bits includes:

[0020] Determining a target first quantum bit according to the target message index and the index identifiers of the n groups of first quantum bits;

[0021] Obtaining the target position represented by each position parameter in the target position set;

[0022] A bit at each target position is selected from the target first quantum bit, and the target decryption key is generated based on the bit at each target position.

[0023] Optionally, it also includes:

[0024] Receive n encrypted ciphertexts sent by the sender device;

[0025] According to the target message index, determining a target ciphertext to be decrypted from the n encrypted ciphertexts;

[0026] The target ciphertext is decrypted using the target decryption key to generate a decrypted message.

[0027] In a second aspect, an embodiment of the present application further provides a quantum oblivious transmission method, which is applied to a sending device, and the method includes:

[0028] Obtain n groups of randomly generated preparation bases in advance, and send the n groups of preparation bases to a receiving device;

[0029] Receiving a target location set returned by the receiving device;

[0030] According to the target position set and the pre-generated n groups of second quantum bits, n encryption keys are generated.

[0031] Optionally, generating n encryption keys according to the target position set and n pre-generated groups of second quantum bits includes:

[0032] Obtaining the target position represented by each position parameter in the target position set;

[0033] A bit at each target position is selected from each of the n groups of second quantum bits, and n encryption keys are generated based on the bits at each target position in the n groups.

[0034] Optionally, it also includes:

[0035] Using the n encryption keys, encrypting the n messages to be sent in sequence to generate n encrypted ciphertexts;

[0036] The n encrypted ciphertexts are sent to a receiving device.

[0037] In a third aspect, an embodiment of the present application further provides a quantum oblivious transmission system, the system comprising: a sender device and a receiver device;

[0038] The receiving device is used to perform decryption based on the method provided in the first aspect;

[0039] The sending device is used to generate ciphertext based on the method provided in the second aspect.

[0040] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the method provided in the first aspect or the steps of the method provided in the second aspect.

[0041] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method provided in the first aspect or the steps of the method provided in the second aspect are executed.

[0042] The beneficial effects of this application are:

[0043] The embodiment of the present application provides a quantum oblivious transmission method, system, electronic device and storage medium, the method comprising: receiving n groups of preparation bases sent by a sending device; determining a target measurement preparation pair according to the n groups of preparation bases, n groups of measurement bases generated in advance and a target message index, wherein the target measurement preparation pair comprises a group of preparation bases and a group of measurement bases with the same index identifier; generating a target position set according to the target measurement preparation pair, wherein the target position set comprises: multiple position parameters, wherein the values ​​of the position parameters are used to characterize the positions of the same bases in the target measurement preparation pair, that is, the receiving device only needs to compare the preparation base and the measurement base in the selected group to obtain the position set of the same base in the group; then, the target position set is sent to the sending device, and a target decryption key is generated according to the target position set, the target message index and the n groups of first quantum bits generated in advance, that is, in order to support the "n-select-1" oblivious transmission mode, the receiving device can only obtain the key of the group selected by itself, and cannot obtain the keys of other groups, thereby ensuring the security of key distribution and improving the security capability of the oblivious transmission method.

[0044] Secondly, the "n-choose-1" quantum oblivious transmission mode provided by this scheme does not require the participation of a third party. The receiving device only needs to select the target ciphertext to be decrypted from the n ciphertexts sent by the sending device, and use the pre-generated decryption key to generate the decrypted message for the target ciphertext, thus realizing the n-choose-1 quantum oblivious transmission mode.

[0045] In addition, based on the support of the n-choose-1 protocol variant by this scheme, an n-choose-m protocol variant can also be constructed, that is, for the specified m different pieces of information, by selecting the information at the corresponding position and executing the "n-choose-1" method m times, the selected m plaintext information can be obtained, thus realizing the n-choose-m quantum oblivious transmission mode and opening up a new path for the quantum oblivious transmission mode. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0047] Figure 1 It is a schematic diagram of the process flow of quantum key distribution based on BB84 protocol in the related technology;

[0048] Figure 2 A schematic diagram of the structure of a quantum inadvertent transmission system provided in an embodiment of the present application;

[0049] Figure 3 A schematic diagram of a flow chart of a quantum inadvertent transmission method provided in an embodiment of the present application;

[0050] Figure 4 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;

[0051] Figure 5 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;

[0052] Figure 6 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;

[0053] Figure 7 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;

[0054] Figure 8 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;

[0055] Fig. 9 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;

[0056] Fig.10 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;

[0057] Fig.11 An interactive schematic diagram of a quantum inadvertent transmission method provided in an embodiment of the present application;

[0058] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0059] Icon: 100-quantum inadvertent transfer system; 1-sender device; 2-receiver device. DETAILED DESCRIPTION

[0060] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0061] First, the professional terms involved in this application are introduced.

[0062] 1. Oblivious transmission: A cryptographic application protocol that is a method of secretly obtaining part of a message from a message set. The receiver knows whether he has received the message, but the sender does not know which part of the message the receiver has received.

[0063] 2. BB84 protocol: a key distribution protocol in quantum cryptography, which is based on the quantum uncertainty principle and the quantum non-cloning principle. The protocol contains two channels, quantum channel and classical channel, where the quantum channel is used to transmit quantum bits and the classical channel is used to transmit the universal measurement basis of both parties. The protocol process is as follows:

[0064] Among them, reference Figure 1 It is a quantum key distribution process based on the BB84 protocol in the related technology. Specifically, Figure 1 As shown in the figure, the process of BB84 protocol is as follows: the sending device randomly generates n groups of quantum bits RS 1 ,...,RSn, and the length of each group of quantum bits is k; at the same time, the sender randomly selects multiple groups of preparation basis TS 1 ,...,TS n , for example, prepare the base TS 1 It includes multiple preparation basis vectors, such as +×++××++×, and uses multiple groups of preparation basis TS 1 ,...,TS n For n groups of quantum bits RS 1 ,...,RSn is modulated to generate n*k photons, and n*k photons are sent to the receiving device.

[0065] Receiver multiple measurement bases TR 1 ,...,TR n Measure n*k photons to generate n groups of quantum bits RR 1 ,...,RRn, where, for example, the measurement basis TR 1 The receiving device receives multiple sets of preparation basis vectors TS sent by the sending device. 1 ,...,TS n , and multiple groups of preparation base TS 1 ,...,TS n and multiple measurement bases TR 1 ,...,TR n Compare the basis vectors for consistency and retain the qubit data with the same basis vector as the final key. For example, if the first basis TS 1 With the first measurement base TR 1 The result of basis vector consistency comparison is: the positions of the same basis include: 1, 4, 5, 6, 8, 9, and the positions of different basis include: 2, 3, 7. Then the bits corresponding to the positions of the same basis can be retained, such as retaining the bit corresponding to position 1 of the same basis as 1, and discarding the bit corresponding to position 3 of the different basis as 1.

[0066] The same basis refers to the same basis vectors at the same position in the same group of preparation basis and measurement basis with the same index identifier. For example, the first preparation basis TS 1 With the first measurement base TR 1 The index identifiers are all 1, and in the first preparation base TS 1 The basis vector at the first position in is +, and the first measurement basis TR 1 The basis vector at the first position in is also +, that is, the first prepared basis TS 1 The basis vector at the first position in the first measurement basis TR 1 The basis vector at the first position in is the same, and so on, we can get the first preparation basis TS 1 With the first measurement base TR 1 The positions of the same bases in include: 1, 4, 5, 6, 8, 9.

[0067] Different bases refer to base vectors at the same position in the same group of preparation bases and measurement bases with the same index identifiers. For example, the first preparation base TS 1 With the first measurement base TR 1 The index identifiers are all 1, and in the first preparation base TS 1 The basis vector at the second position in the equation is ×, and the first measurement basis TR 1 The basis vector at the second position in is also +, that is, the first prepared basis TS 1 The basis vector at the second position in the first measurement basis TR1 The basis vectors at the second position in the equation are different. By analogy, we can get the first preparation basis TS. 1 With the first measurement base TR 1 The positions of different bases in include: 2, 3, 7.

[0068] Before elaborating on the technical solution provided by the present application, a brief description is first given of the application scenarios of quantum inadvertent transmission involved in the present application.

[0069] refer to Figure 2 As shown, it is a schematic diagram of the structure of the quantum inadvertent transmission system provided in the embodiment of the present application; Figure 2 As shown, the quantum oblivious transmission system 100 includes: a sender device 1 and a receiver device 2. Exemplarily, for example, the sender device 1 and the receiver device 2 are both electronic devices with data processing functions and transceiver functions.

[0070] The sender device 1 and the receiver device 2 are used to execute the quantum oblivious transmission method provided by this scheme to realize the "n-choose-1" oblivious transmission mode, solve the problem that information transmission may be attacked by quantum computers, and ensure the security of communication.

[0071] Understandably, Figure 2 The structure described is only for illustration, and the quantum inadvertent transmission method may also include Figure 2 More or fewer components as shown, or with Figure 2 Different configurations are shown. Figure 2 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0072] The implementation principle and corresponding beneficial effects of the quantum inadvertent transmission method steps provided in the present application will be explained through a number of specific embodiments as follows.

[0073] In one embodiment, reference Figure 3 As shown, a quantum inadvertent transmission method is provided. Optionally, the execution subject of the method can be Figure 2 The receiving device in the quantum oblivious transmission method shown in . Figure 3 As shown, the method includes:

[0074] S301. Receive n groups of preparation bases sent by a sending device.

[0075] It should be noted that before the sending device and the receiving device interact with each other, the following steps are mainly included:

[0076] (1) The sending device randomly generates n groups of quantum bits RS 1 ,...,RSn, and each group of qubits RSi The length of is k; at the same time, the sending device randomly determines n groups of preparation base TS 1 ,...,TS n For n groups of quantum bits RS 1 ,...,RSn modulates to generate n*k photons, and sends n*k photons to the receiving device. i The number of is k.

[0077] (2) The receiving device randomly determines n groups of measurement bases TR 1 ,...,TR n , measure the received n*k photons and generate n groups of quantum bits RR 1 ,...,RRn, where each set of measurement bases TR i The number of qubits is k, and each group of qubits RR i The length of is k.

[0078] S302: Determine a target measurement preparation pair according to n groups of preparation bases, n groups of measurement bases generated in advance, and a target message index.

[0079] The target message index refers to the index identifier of the ciphertext that the receiving device specifies to receive from the multiple ciphertexts sent by the sending device. For example, the sending device sends n ciphertexts to the receiving device, and the receiving device specifies to receive the third ciphertext, that is, the target message index is 3.

[0080] The target measurement preparation pair includes a set of preparation bases and a set of measurement bases with the same index identifier. For example, if the target message index is 3, then the index identifier of the target measurement preparation pair is also 3, that is, the target measurement preparation pair includes a third preparation base TS with the same index identifier of 3. 3 and the third measurement basis TR 3 , that is, the target measurement preparation pair = {TS 3 , TR 3}.

[0081] S303: Generate a target position set according to the target measurement preparation pair.

[0082] The target position set includes: a plurality of position parameters, and the values ​​of the position parameters are used to characterize the positions of the same basis in the target measurement preparation pair.

[0083] For example, the target message index is i, and the preparation base TS in the target measurement preparation pair is i and measurement base TR i Including the same base and different bases, retain the position of the same base and discard the position of the different base. Therefore, the preparation base TS in the target measurement preparation pair i and measurement base TRi When performing basis vector consistency comparison, only the positions with the same basis are retained, and the target position set is generated from multiple positions with the same basis. Figure 1 As shown, the receiving device prepares the target measurement pair based on the preparation TS i and measurement base TR i After comparing the basis vectors for consistency, the positions of the same basis are obtained: 1, 4, 5, 6, 8, 9, that is, the target position set = {1, 4, 5, 6, 8, 9}, that is, the values ​​of each position parameter in the target position set are used to characterize the position of the same basis in the target measurement preparation pair.

[0084] Optionally, in this scheme, in order to improve the generation efficiency of the target position set, it is only necessary to select a set of target measurement preparation pairs from n sets of preparation bases and n sets of measurement bases according to the pre-specified message index of the target message to be received, and then perform basis vector consistency comparison on the target measurement preparation pairs to generate the positions of the same basis in the target measurement preparation pairs, without the need to perform basis vector consistency comparison on all preparation bases and measurement bases, thereby achieving the purpose of improving the information interaction efficiency of quantum inadvertent transmission.

[0085] In addition, the receiving device compares the basis vector consistency between the preparation basis and the measurement basis in the selected set of target measurement preparation pairs, that is, the sending device cannot know the message index generated by the receiving method device and the n set of measurement basis TR 1 ,...,TR n , and therefore it is impossible to know which specific set of measurement preparation pairs is used to generate the target position set, thereby ensuring the security of the key distribution and transmission process.

[0086] S304. Send the target position set to the sending device, and generate a target decryption key based on the target position set, the target message index and the pre-generated n groups of first quantum bits.

[0087] Optionally, the receiving device generates a target position set based on the generated target position set and the pre-generated first quantum bit RR. 1 ,...,RRn, generate a target decryption key; at the same time, send the target position set to the sending device, so that the sending device can generate a target decryption key according to the target position set and the pre-generated second quantum bit RS 1 ,...,RSn, generate n target encryption keys. So far, in order to support the n-choose-1 oblivious transfer mode, this scheme proposes that the receiving device only needs to return a set of position sets to the sending device, so that the receiving device can only obtain the key of the group selected by itself, and cannot obtain the keys of other groups. At the same time, the sending device cannot know the position of the same basis in all measurement preparation pairs, thereby ensuring the security of key distribution and improving the security capability of the oblivious transfer method.

[0088] In summary, an embodiment of the present application provides a quantum oblivious transmission method, the method comprising: receiving n groups of preparation bases sent by a sending device; determining a target measurement preparation pair according to the n groups of preparation bases, n groups of measurement bases generated in advance, and a target message index, wherein the target measurement preparation pair includes a group of preparation bases and a group of measurement bases with the same index identifier; generating a target position set according to the target measurement preparation pair, wherein the target position set includes: multiple position parameters, and the values ​​of the position parameters are used to characterize the positions of the same bases in the target measurement preparation pair, that is, the receiving device only needs to compare the preparation base and the measurement base in the selected group to obtain the position set of the same base in the group; then, the target position set is sent to the sending device, and a target decryption key is generated according to the target position set, the target message index, and the pre-generated n groups of first quantum bits, that is, in order to support the "n-select-1" oblivious transmission mode, the receiving device can only obtain the key of the group selected by itself, and cannot obtain the keys of other groups, thereby ensuring the security of key distribution and improving the security capability of the oblivious transmission method.

[0089] The following example will explain in detail how to generate a target location set.

[0090] Optionally, refer to Figure 4 As shown, the above step S302 includes:

[0091] S401: Generate n to-be-selected measurement preparation pairs according to index identifiers of n groups of preparation bases and index identifiers of n groups of measurement bases.

[0092] Optionally, in this embodiment, the receiving device prepares the base TS according to n groups. 1 ,...,TS n The index identifier and n groups of measurement bases TR 1 ,...,TR n , generate n groups of measurement preparation pairs, and the index identifier of the preparation base in each group of measurement preparation pairs is the same as the index identifier of the measurement base. 1 With the first measurement base TR 1 As a set of measurement preparation pairs, therefore, we can get n sets of measurement preparation pairs, namely (TS 1 ,TR 1 ),...,(TS n ,TR n ).

[0093] S402: Determine a target measurement preparation pair according to index identifiers of n groups of candidate measurement preparation pairs and a target message index.

[0094] For example, the target message index is 3. Therefore, the index identifiers of the n groups of candidate measurement preparation pairs are compared with the target message index. 3 ,TR 3 ), the third candidate measurement preparation pair (TS 3 ,TR 3 ) 3 Index identification and measurement base TR 3 The index identifiers of the third candidate measurement preparation are all 3, which is the same as the target message index, so the third candidate measurement preparation pair (TS 3 ,TR 3 ) as the target measurement preparation pair and stop the comparison operation.

[0095] Optionally, refer to Figure 5 As shown, the above step S402 includes:

[0096] S501: Obtain a current measurement preparation pair from among n measurement preparation pairs to be selected.

[0097] S502: Determine whether the index identifier of the current measurement preparation pair is the same as the target message index.

[0098] S503: If yes, take the current measurement preparation pair as the target measurement preparation pair.

[0099] Optionally, in this embodiment, for example, the current measurement preparation pair is (TS 2 ,TR 2 ), then the current measurement preparation pair (TS 2 ,TR 2 ) 2 Index identification and measurement base TR 2 The index identifier of the current measurement preparation pair (TS 2 ,TR 2 ) is identified as 2, and the current measurement preparation pair (TS 2 ,TR 2 ) is compared with the target message index 3. If the current measurement preparation is found to be 2 ,TR 2 ) is not the same as the target message index 3, then continue to pair the current measurement preparation with (TS 2 ,TR 2 ) for the next measurement preparation pair (TS 3 ,TR 3 ) is compared with the target message index. If the measurement preparation is found to be 3 ,TR 3) is the same as the target message index, then the measurement preparation (TS 3 ,TR 3 ) as the target measurement preparation pair.

[0100] Optionally, the following embodiments will be used to explain in detail how to generate a target decryption key based on a target location set.

[0101] Optionally, refer to Figure 6 As shown, the above step S304 includes:

[0102] S601. Determine a target first quantum bit according to a target message index and index identifiers of n groups of first quantum bits.

[0103] In one possible implementation, for example, the target message index is 3, and the first qubit of n groups is RR 1 ,...,RRn, where the first group of first qubits RR 1 If the index identifier is 1, then the index identifier of each group of first quantum bits needs to be compared with the target message index respectively. When the comparison is to the third group of first quantum bits RR 3 When the third group of first quantum bits RR is found 3 The index of the first qubit RR in the third group is the same as the target message index. 3 as the target first qubit.

[0104] S602: Obtain the target position represented by each position parameter in the target position set.

[0105] S603, selecting bits at each target position from the target quantum bit, and generating a target decryption key based on the bits at each target position.

[0106] In this embodiment, for example, the target position set = {1, 4, 5, 6, 8, 9}, that is, the target positions represented by the position parameters in the target position set are 1, 4, 5, 6, 8 and 9 respectively. Therefore, the first quantum bit RR of the third group can be 3 Select the bits at each target position, and generate a target decryption key based on the bits at each target position. Specifically, the third group of first quantum bits RR can be obtained 3 For example, the bit at position 1, the bit at position 4, the bit at position 5, the bit at position 6, the bit at position 8, and the bit at position 9, and the bit at position 1 is 1. Therefore, the bits at each target position can be combined into one target decryption key.

[0107] The following embodiments will specifically explain how to select a target ciphertext from the n ciphertexts sent by the sending device, and decrypt the target ciphertext based on the generated target decryption key to implement the n-to-1 quantum oblivious transfer mode.

[0108] Optionally, referring to Figure 7 as shown, the method further includes:

[0109] S701. Receive n encrypted ciphertexts sent by the sending device.

[0110] Exemplarily, for example, the receiving device receives n encrypted ciphertexts sent by the sending device, that is, e 1 ,..., e n . Among them, each encrypted ciphertext is generated by encrypting the n messages to be sent in sequence based on the n encryption keys generated by the sending device using the target location set.

[0111] S702. Determine a target ciphertext to be decrypted from the n encrypted ciphertexts according to the target message index.

[0112] S703. Use the target decryption key to decrypt the target ciphertext to generate a decrypted message.

[0113] For example, if the target message index is 3, the index identifiers of the n encrypted ciphertexts can be compared with the target message index respectively. When comparing to the third encrypted ciphertext e 3 , it is found that the index identifier of the third encrypted ciphertext e 3 is 3, which is the same as the target message index. That is, it can be determined that the third encrypted ciphertext e 3 is the target ciphertext specified for the receiving device to receive, and use the target decryption key to decrypt the third encrypted ciphertext e 3 to generate a decrypted message, realizing the n-to-1 quantum oblivious transfer mode; at the same time, the "n-to-1" quantum oblivious transfer mode provided by this solution does not require the participation of a third party.

[0114] Optionally, based on the "n-to-1" quantum oblivious transfer mode provided by this solution, for the oblivious transfer mode of "n-to-m", where m < n and m is an integer greater than 1. That is, for the existing n pieces of information, assuming that the index identifiers of the m pieces of information selected by the receiving device are denoted as: l 1 ,..., 1 m, for different m pieces of information, select the information at the corresponding position and execute the "n-choose-1" method m times, then the selected m plaintext information can be obtained, realizing the n-choose-m quantum oblivious transmission mode. Therefore, on the basis of supporting the n-choose-1 protocol variant in this scheme, the n-choose-m protocol variant can also be constructed, opening up a new path for the quantum oblivious transmission mode.

[0115] The following example will explain in detail how the sender generates n encryption keys based on the target location set returned by the receiver's device.

[0116] Optionally, refer to Figure 8 As shown, applied to a sending device, the method includes:

[0117] S801. Obtain n groups of randomly generated preparation bases in advance, and send the n groups of preparation bases to a receiving device.

[0118] S802: Receive a target location set returned by a receiving device.

[0119] S803. Generate n encryption keys according to the target position set and the n groups of second quantum bits generated in advance.

[0120] In this embodiment, the sending device generates n groups of pre-generated preparation base TS 1 ,...,TS n Send to the receiving device, which prepares the TS for multiple groups 1 ,...,TS n and multiple measurement bases TR 1 ,...,TR n The consistency comparison of the basis vectors is performed, and a set of target positions generated is returned to the sending device; then, the sending device compares the target position set with the pre-generated n sets of second qubits RS 1 ,...,RSn, generates n encryption keys. Therefore, in the "n-choose-1" quantum oblivious transmission mode provided by this scheme, the receiving device only sends the positions with the same two measurement bases in the group it chooses to receive. Only the key formed by the position of this group is consistent with that of the receiver. The probability that the measurement base positions of the same positions in other groups are the same is very small, and it is impossible to completely obtain the key data formed by the positions of other groups. Therefore, the receiver can only obtain the key of the group he chooses, and cannot obtain the keys of other groups, ensuring the security of key distribution.

[0121] Optionally, refer to Fig. 9 As shown, the above step S803 includes:

[0122] S901. Obtain target positions represented by each position parameter in a target position set.

[0123] S902, selecting bits at each target position from the n groups of second quantum bits respectively, and generating n encryption keys based on the bits at each target position in the n groups.

[0124] Optionally, for example, a second set of parameters (1, 3) may be obtained. 2 The target positions represented are 1 and 3; similarly, the fifth set of parameters (2, 3) can be obtained. 5 The represented positions are 2 and 3; and so on, the target position represented by each set of target parameters in the m sets of target parameters can be obtained.

[0125] In this embodiment, for example, the target position set = {1, 4, 5, 6, 8, 9}, that is, the target positions represented by the position parameters in the target position set are 1, 4, 5, 6, 8 and 9, respectively. Therefore, from each group of second qubits RS 1 ,...,RSn selects the bit at each target position and based on each group of second qubits RS 1 ,...,RSn, the bits at each target position generate n encryption keys. For example, the first group of second qubits RS 1 The bit at position 1, the bit at position 4, the bit at position 5, the bit at position 6, the bit at position 8, and the bit at position 9. For example, the bit at position 1 is 0, and the first group of second qubits RS 1 The bit combination at each target position is the first group of second qubits RS 1 A corresponding encryption key; and by analogy, other groups of second quantum bits RS can be generated based on the target position set i A corresponding encryption key, so far we can get n encryption keys generated by the sender device, that is, the first encryption key keyS 1 ,...,nth encryption key keyS n .

[0126] The following embodiment will explain in detail how the sending device generates n encrypted ciphertexts based on n encryption keys.

[0127] Optionally, refer to Fig.10 As shown, it also includes:

[0128] S1001. Use n encryption keys to encrypt n messages to be sent in turn to generate n encrypted ciphertexts.

[0129] S1002. Send n encrypted ciphertexts to a receiving device.

[0130] For example, the n messages to be sent are first messages m and 1, the second message m 2 , ..., the nth message m n wait.

[0131] Optionally, for example, the first encryption key keyS 1 If the index is 1, the first encryption key keyS is used. 1 For the first message m 1 Encrypt and generate the first encrypted ciphertext e 1 ; Similarly, the second encryption key keyS 2 If the index identifier is 2, the second encryption key keyS is used 2 For the second message m 2 Encrypt and generate the second encrypted ciphertext e 2 ; By analogy, n encrypted ciphertexts can be generated, namely e 1 ,...,e n , and all the n encrypted ciphertexts are sent to the receiving device, which obtains the specified target ciphertext from the n encrypted ciphertexts, and decrypts the specified ciphertext based on the decryption key to generate the target message, thereby realizing the "n-choose-1" quantum oblivious transmission mode.

[0132] Optionally, refer to Fig.11 As shown, it is an interactive schematic diagram of the "n-choose-1" quantum inadvertent transmission mode provided by the present application, and the method includes:

[0133] in, Fig.11 In the text, the sending device is referred to as the sender, and the receiving device is referred to as the receiver.

[0134] (1) The sender generates n groups of quantum bit sequences RS with a length of k 1 ,...,RSn, and randomly select n groups of k to prepare the base sequence TS 1 ,...,TS n For the quantum bit sequence RS 1 ,...,RSn performs modulation to generate n*k photons, and sends n*k photons to the receiving device;

[0135] (2) The receiver randomly selects n groups of k measurement base sequences TR 1 ,...TR n Measure n*k photons to generate n groups of quantum bit sequences RR with a length of k 1 ,...,RRn;

[0136] (3) The sender prepares the base sequence TS with n groups of k. 1 ,...,TS n Send to the recipient;

[0137] (4.1) The receiver selects a required set of preparation bases from n sets of preparation bases according to the message index of the specified message to be received, and compares them with the corresponding measurement base of the receiver to obtain a position set of the same base;

[0138] (4.2) The receiver stores the quantum bits in the group of positions as a key;

[0139] (4.3) The receiver returns the location set to the sender;

[0140] (5) The sender selects n groups of quantum bit sequences RS 1 ,..., select the bits at the corresponding positions in RSn as encryption keys, thus obtaining n keys;

[0141] (6) The sender uses n keys to encrypt the n pieces of information to be encrypted, generates n ciphertexts, and sends the n ciphertexts to the receiver;

[0142] (7) The receiver determines the selected target ciphertext from the n ciphertexts and uses the decryption key to decrypt the target ciphertext to generate the decrypted information.

[0143] Optionally, in the quantum oblivious transmission method provided in the present application, in order to support the "n-choose-1" and "n-choose-m" oblivious transmission modes, the receiving device mainly prepares the basis TS according to the randomly determined multiple groups. 1 ,...,TS n , target message index and multiple sets of prepared base TS sent by the sending device 1 ,...,TS n , generate a target position set, and generate a target decryption key based on the target position set, that is, the sending device cannot know the decryption key generated by the receiving device, which ensures the security of the decryption key generated by the receiving device and improves the security capability of the inadvertent transmission method.

[0144] At the same time, the receiving device sends a set of target positions to the sending device, so that the sending device can obtain the target position based on the predetermined n sets of first quantum bits RS 1 ,...,RSn and the target position set, generate n encryption keys, and the receiving device only needs to return a set of target position sets to the sending device, which improves the transmission efficiency and ensures the consistency of encryption and decryption; the sending device encrypts n messages to be sent based on n encryption keys, generates n ciphertexts, and sends the n ciphertexts to the receiving device. The receiving device decrypts the selected ciphertext based on the target message index and decryption key to generate a message, realizing the "n-choose-1" inadvertent transmission mode, solving the problem that information transmission will be attacked by quantum computers, and ensuring the security of communication.

[0145] Fig.12 A schematic diagram of an electronic device provided in an embodiment of the present application, the electronic device can be Figure 2 The receiving device and the sending device shown may be a computing device with data processing and data receiving and sending functions.

[0146] The electronic device includes: a processor 1201 and a memory 1202 .

[0147] The memory 1202 is used to store programs, and the processor 1201 calls the programs stored in the memory 1202 to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0148] Optionally, the present invention also provides a program product, such as a computer-readable storage medium, comprising a program, which is used to execute the above method embodiment when executed by a processor.

[0149] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0150] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0151] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0152] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

Claims

1. A quantum inadvertent transmission method, characterized in that: Applied to a receiving device, the method includes: Receive n groups of preparation bases sent by the sending device; Determine a target measurement preparation pair according to the n groups of preparation bases, the n groups of measurement bases generated in advance, and the target message index, wherein the target measurement preparation pair includes a group of preparation bases and a group of measurement bases with the same index identifier; Generate a target position set according to the target measurement and preparation pair, wherein the target position set includes: a plurality of position parameters, the values ​​of the position parameters are used to characterize the positions of the same basis in the target measurement and preparation pair; The target position set is sent to the sending device, and a target decryption key is generated according to the target position set, the target message index and the pre-generated n groups of first quantum bits.

2. The method according to claim 1, characterized in that The determining the target measurement preparation pair according to the n groups of preparation bases, the pre-generated n groups of measurement bases and the target message index includes: Generating n to-be-selected measurement preparation pairs according to the index identifiers of the n groups of preparation bases and the index identifiers of the n groups of measurement bases; The target measurement preparation pair is determined according to the index identifiers of the n groups of candidate measurement preparation pairs and the target message index.

3. The method according to claim 2, characterized in that The determining the target measurement preparation pair according to the index identifiers of the n groups of measurement preparation pairs and the target message index includes: Obtaining a current measurement preparation pair from the n measurement preparation pairs to be selected; Determining whether the index identifier of the current measurement preparation pair is the same as the target message index; If so, the current measurement preparation pair is used as the target measurement preparation pair.

4. The method according to claim 1, characterized in that: The generating a target decryption key according to the target position set, the target message index and the pre-generated n groups of first quantum bits includes: Determining a target first quantum bit according to the target message index and the index identifiers of the n groups of first quantum bits; Obtaining the target position represented by each position parameter in the target position set; A bit at each target position is selected from the target first quantum bit, and the target decryption key is generated based on the bit at each target position.

5. The method according to claim 1, characterized in that Also includes: Receive n encrypted ciphertexts sent by the sender device; According to the target message index, determining a target ciphertext to be decrypted from the n encrypted ciphertexts; The target ciphertext is decrypted using the target decryption key to generate a decrypted message.

6. A quantum inadvertent transmission method, characterized in that: Applied to a sending device, the method includes: Obtain n groups of randomly generated preparation bases in advance, and send the n groups of preparation bases to a receiving device; Receiving a target location set returned by the receiving device; According to the target position set and the pre-generated n groups of second quantum bits, n encryption keys are generated.

7. The method according to claim 6, characterized in that The step of generating n encryption keys according to the target position set and the pre-generated n groups of second quantum bits includes: Obtaining the target position represented by each position parameter in the target position set; A bit at each target position is selected from each of the n groups of second quantum bits, and n encryption keys are generated based on the bits at each target position in the n groups.

8. The method according to claim 6, characterized in that Also includes: Using the n encryption keys, encrypting the n messages to be sent in sequence to generate n encrypted ciphertexts; The n encrypted ciphertexts are sent to a receiving device.

9. A quantum inadvertent transmission system, characterized in that: The system comprises: a sending device and a receiving device; The receiving device is used to perform decryption based on the method according to any one of claims 1 to 5; The sending device is used to generate ciphertext based on the method according to any one of claims 6-8.

10. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the method as described in any one of claims 1 to 5 or the steps of the method as described in any one of claims 6 to 8.

11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 or the steps of the method according to any one of claims 6 to 8 are executed.

Citation Information

Patent Citations

  • Data processing method and related equipment

    CN113055158A

  • Casual transmission method, multi-party security computing platform and device for casual transmission

    CN114301609A

  • Casual transmission method and device, equipment and storage medium

    CN115412246A

  • Sending messages by oblivious transfer

    US20130159696A1