Casual quantum transmission method and system
Through third-party devices in the inadvertent quantum transmission, identity authentication and base vector consistency comparison are performed to generate a target location set, which solves the problem that the prior art cannot support n-select-1 or n-select-m transmission mode and communication security. It realizes support for n-select-m mode and communication security guarantee.
Patent Information
- Application Number
- CN202411439377.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-03
AI Technical Summary
The prior art cannot support the transmission mode of n-select-1 or n-select-m (m>1), and there are communication security problems.
Identity authentication is performed through third-party devices, and base vector consistency comparison is performed based on the sender's n group preparation bases and the receiver's n group measurement bases and m message indexes to generate a set of target positions to ensure the consistency of encryption and decryption. Avoiding the receiver's device forgery of the target location set, solving the problem that information transmission will be attacked by quantum computers.
It realizes support for n-select-m inadvertent transmission mode, while ensuring communication security, ensuring consistency of encryption and decryption, and avoiding information transmission being attacked by quantum computers.
Smart Images

Figure CN119254431A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum cryptography technology, and in particular to a quantum inadvertent transmission method and system. Background Art
[0002] Oblivious Transfer (OT) is an application protocol in cryptography, used for the interaction between the sender and the receiver of a message. The sender holds a set of data, and the receiver holds an index, which is used to select from the sender's data. After the end, the sender does not obtain the data, and the receiver obtains the sender's data corresponding to the index, while maintaining the confidentiality of the sender's other inputs and the confidentiality of the receiver's selection. At present, 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 selects "1" from "2" messages, n-choose-1 means that the receiver selects "1" from "n" messages, and n-choose-m means that the receiver can select "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.
[0004] However, the above technical solution cannot support n-choose-1 or n-choose-m (m>1) transmission mode, and there is a problem that the security of communication between the two parties cannot be guaranteed. Summary of the invention
[0005] The object of the present invention is to provide a quantum inadvertent transmission method and system to address the deficiencies in the above-mentioned prior art, so as to solve the problem that the prior art solutions cannot support n-choose-1 or n-choose-m (m>1) transmission modes.
[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 inadvertent transmission method, which is applied to a third-party device, and the method includes:
[0008] Receiving n groups of preparation bases sent by a sending device and a first ciphertext sent by a receiving device, where the first ciphertext is generated by encrypting m message indexes generated by the receiving device and n groups of measurement bases according to a first key, where n is an integer greater than 1, and m is an integer greater than or equal to 1;
[0009] Decrypting the first ciphertext according to a pre-stored receiver key to obtain m message indexes and n groups of measurement bases;
[0010] Generate a target position set according to m message indexes and n groups of measurement preparation pairs, wherein each of the measurement preparation pairs includes a preparation base and a measurement base with the same index identifier, the target position set includes n groups of parameters, the n groups of parameters correspond to the n groups of measurement preparation pairs one by one, and the values of m groups of parameters among the n groups of parameters are respectively used to characterize the positions of the same bases in the corresponding measurement preparation pairs, and the values of each group of parameters except the m groups of parameters are respectively used to characterize the positions of different bases in the corresponding measurement preparation pairs;
[0011] The target location set is encrypted to generate a second ciphertext, and the second ciphertext and the target location set are sent to the receiving device and the sending device respectively.
[0012] Optionally, generating a target location set according to the m message indexes and the n groups of measurement preparation pairs includes:
[0013] Determine m groups of measurement preparation pairs from the n groups of measurement preparation pairs according to the m message indexes and the index identifiers of the n groups of measurement preparation pairs, wherein the index identifier of each measurement preparation pair is the same as the index identifier of the measurement base and the index identifier of the preparation base in the measurement preparation pair;
[0014] generating m groups of parameters in the target position set according to the m groups of measurement preparation pairs;
[0015] generating nm groups of parameters in the target position set according to each group of measurement and preparation pairs in the n groups of measurement and preparation pairs except the m groups of measurement and preparation pairs;
[0016] The m group of parameters and the nm group of parameters are combined into the target position set.
[0017] Optionally, the determining m groups of measurement preparation pairs from n groups of measurement preparation pairs according to the m message indexes and index identifiers of the n groups of measurement preparation pairs includes:
[0018] Obtaining a current message index, wherein the current message index is any message index among the m message indexes;
[0019] The measurement preparation pairs in the n groups of measurement preparation pairs having the same index identifier as the current message index are used as a group of measurement preparation pairs in the m groups of measurement preparation pairs.
[0020] Optionally, generating m groups of parameters in the target position set according to the m groups of measurement preparation pairs includes:
[0021] Traversing the m groups of measurement and preparation pairs, determining positions of identical bases in the measurement base and the preparation base in each group of measurement and preparation pairs in turn, and generating m groups of parameters in the target position set according to the positions of the identical bases determined;
[0022] The step of generating nm groups of parameters in the target position set according to each group of measurement and preparation pairs in the n groups of measurement and preparation pairs except the m groups of measurement and preparation pairs comprises:
[0023] Traverse each group of measurement and preparation pairs in the n groups of measurement and preparation pairs except the m groups of measurement and preparation pairs, determine the positions of different bases in the measurement base and the preparation base in each group of measurement and preparation pairs in turn, and generate nm groups of parameters in the target position set according to the determined positions of different bases.
[0024] Optionally, before receiving the n groups of preparation bases sent by the sending device and the first ciphertext sent by the receiving device, the method further includes:
[0025] Generate an identity authentication key, and distribute the public key in the identity authentication key to the sender device and the receiver device;
[0026] Based on the quantum cryptography protocol, obtain the sender key sent by the sender device and the receiver key sent by the receiver device;
[0027] Signing the sender key to generate a first signature result, and sending the first signature result to the sender device so that the sender device verifies the first signature result;
[0028] The recipient key is signed to generate a second signature result, and the second signature result is sent to the recipient device so that the recipient device verifies the second signature result.
[0029] 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:
[0030] Determine n groups of preparation bases, and send the n groups of preparation bases to a third-party device;
[0031] Receiving a second ciphertext and a target location set returned by the third-party device;
[0032] Performing security verification on the second ciphertext, and if the security verification is passed, generating n encryption keys according to the pre-generated n groups of first quantum bits and the target position set;
[0033] According to the index identifiers of the n encryption keys, the n messages to be sent are encrypted in sequence to generate n third ciphertexts, and the n third ciphertexts are sent to the receiving device.
[0034] Optionally, generating n encryption keys according to the pre-generated n groups of first quantum bits and the target position set includes:
[0035] Determining n groups of target parameters according to the positions represented by each group of parameters in the target position set;
[0036] Obtaining a target position represented by each set of target parameters in n sets of target parameters;
[0037] A bit at each target position is selected from the n groups of first quantum bits, and n encryption keys are generated based on the bits at each target position.
[0038] In a third aspect, an embodiment of the present application further provides a quantum oblivious transmission method, which is applied to a receiving device, and the method includes:
[0039] Determine n groups of measurement bases and m message indexes, encrypt the n groups of measurement bases and the m message indexes to generate a first ciphertext, and send the first ciphertext to a third-party device;
[0040] Receiving a second ciphertext and a target location set returned by the third-party device;
[0041] Performing security verification on the second ciphertext, and if the security verification is passed, generating m decryption keys according to the pre-generated n groups of second quantum bits, the m message indexes and the target position set;
[0042] Receiving n third ciphertexts sent by the sending device, and determining the third ciphertexts corresponding to the m decryption keys according to index identifiers of the n third ciphertexts and index identifiers of the m decryption keys;
[0043] The m decryption keys are used to decrypt the third ciphertexts corresponding to the m decryption keys respectively, to generate m decrypted messages.
[0044] Optionally, generating m decryption keys according to the pre-generated n groups of second quantum bits, the m message indexes and the target position set includes:
[0045] Determining m groups of target parameters according to the m message indexes and the target location set;
[0046] Obtaining a target position represented by each set of target parameters in m sets of target parameters;
[0047] Determine m groups of second qubits according to the m message indexes and the n groups of second qubits;
[0048] A bit at each target position is selected from the m groups of second quantum bits, and m decryption keys are generated based on the bit at each target position.
[0049] In a fourth aspect, an embodiment of the present application further provides a quantum oblivious transmission system, the system comprising: a third-party device, a sender device, and a receiver device;
[0050] The third-party device is used to generate ciphertext based on the method provided in the first aspect;
[0051] The sending device is used to generate a ciphertext based on the method provided in the second aspect;
[0052] The receiving device is used to perform decryption based on the method provided in the third aspect.
[0053] The beneficial effects of this application are:
[0054] The present application provides a quantum oblivious transmission method and system. In this solution, in order to support an "n-choose-m" oblivious transmission mode and ensure that the identities of a sender device, a receiver device, and a third-party device are credible, it is proposed that in addition to a sender device and a receiver device, a quantum oblivious transmission system may also include: a third-party device. During the quantum oblivious transmission process, the third-party device performs basis vector consistency comparison according to n groups of preparation bases of the sender device and n groups of measurement bases of the receiver device and m message indexes to obtain a target position set, wherein the values of the m groups of parameters in the target position set are respectively used to characterize the positions of the same basis in the corresponding measurement preparation pairs, and the values of each group of parameters except the m groups of parameters are respectively used to characterize the positions of different bases in the corresponding measurement preparation pairs, thereby avoiding the possibility of the receiver device forging the target position set; at the same time, the target position set is distributed to the sender device and the receiver device, and the consistency of encryption and decryption is ensured through the target position set, thereby solving the problem that information transmission may be attacked by a quantum computer and ensuring the security of communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] 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.
[0056] Figure 1 It is a schematic diagram of the process flow of quantum key distribution based on BB84 protocol in the related technology;
[0057] Figure 2 A schematic diagram of the structure of a quantum inadvertent transmission system provided in an embodiment of the present application;
[0058] Figure 3 A schematic diagram of a flow chart of a quantum inadvertent transmission method provided in an embodiment of the present application;
[0059] Figure 4 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;
[0060] Figure 5 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;
[0061] Figure 6 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;
[0062] Figure 7 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;
[0063] Figure 8 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;
[0064] Fig. 9 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;
[0065] Fig.10 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;
[0066] Fig.11 A schematic diagram of a flow chart of another quantum inadvertent transmission method provided in an embodiment of the present application;
[0067] Fig.12 An interactive schematic diagram of a quantum inadvertent transmission method provided in an embodiment of the present application;
[0068] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0069] Icon: 100-quantum inadvertent transfer system; 1-third-party device; 2-sender device; 3-receiver device. DETAILED DESCRIPTION
[0070] 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.
[0071] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0072] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0073] First, the professional terms involved in this application are introduced.
[0074] 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.
[0075] 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:
[0076] Among them, reference Figure 1 It is a quantum key distribution process based on the BB84 protocol in the related technology. Specifically, Figure 1As shown in the figure, the process of the BB84 protocol is as follows: the sender randomly selects a preparation basis to modulate the randomly generated first quantum bit sequence, obtains a photon and sends it to the receiver; the receiver randomly selects a measurement basis to measure the photon and obtains a second quantum bit sequence, then the sender and the receiver compare the basis vectors for consistency, and retains the quantum bit data with the same basis vector as the final key.
[0077] For example, refer to Figure 1 As shown, the result of basis vector consistency comparison between the sender and the receiver is: the positions of the same basis include: 1, 4, 5, 6, 8, 9, and the positions of different bases 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.
[0078] 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.
[0079] 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 1 As shown, the quantum oblivious transmission system 100 includes: a third-party device 1, a sender device 2, and a receiver device 3. Exemplarily, for example, the third-party device 1 can be an electronic device with a data processing function such as a server.
[0080] Optionally, in the quantum oblivious transmission method provided in the present application, in order to support the "n-choose-m" oblivious transmission mode and ensure the trustworthiness of the identities of the sender device, the receiver device, and the third-party device, it is proposed that in addition to the sender device and the receiver device, the quantum oblivious transmission system may also include: a third-party device, that is, the third-party device performs identity authentication on the sender device and the receiver device to ensure communication security, and in the process of quantum oblivious transmission, the third-party device performs a basis vector consistency comparison based on the preparation basis sequence of the sender device and the measurement basis sequence of the receiver device to obtain a comparison result, that is, a target position set, thereby avoiding the possibility of the receiver device falsifying the comparison result; at the same time, the target position set is distributed to the sender device and the receiver device, and the consistency of encryption and decryption is ensured through the target position set, thereby solving the problem that information transmission may be attacked by quantum computers and ensuring the security of communication.
[0081] 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 shown. Figure 2Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0082] 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.
[0083] 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 A third-party device in the quantum inadvertent transfer method shown in .
[0084] It should be understood that in other embodiments, the order of some steps in the quantum inadvertent transmission method can be interchanged according to actual needs, or some steps can be omitted or deleted. Figure 3 As shown, the method includes:
[0085] S201. Receive n groups of preparation bases sent by a sending device and a first ciphertext sent by a receiving device.
[0086] The first ciphertext is generated by encrypting m message indexes and n groups of measurement bases generated by the receiving device according to the first key, wherein n is an integer greater than 1, and m is an integer greater than or equal to 1.
[0087] It should be noted that before the sending device and the receiving device interact with each other, the following steps are mainly included:
[0088] (1) The sending device randomly generates n groups of first qubits RS1, ..., RSn, and the length of each group of first qubits is k; at the same time, the sending device randomly determines n groups of preparation bases TS1, ..., TS n Modulate n groups of first quantum bits RS1, ..., RSn to generate n*k photons, and send n*k photons to the receiving device, where the number of prepared bases in each group is k.
[0089] (2) The receiving device randomly determines n groups of measurement bases TR1,...,TR n Measure n*k photons to generate n groups of second quantum bits RR1,...,RRn, where the number of measurement bases in each group is k and the length of each group of second quantum bits is k; at the same time, determine the m message indexes to be received, i.e., {i1,...,i m}; At the same time, a selection bit sequence ML can also be generated according to the index of the m pieces of information.
[0090] For example, 3 pieces of information at positions {2, 5, 6} are selected from 8 pieces of information, and the indexes of the m pieces of information are 2, 5, and 6. Accordingly, the generated selection bit sequence is 01001100 in binary.
[0091] (3) The sending device sends n groups of prepared bases to the third-party device.
[0092] (4) The receiving device uses the kr in the pre-stored receiving key enc key, m message indices and n measurement bases TR1,...,TR n Encryption is performed to generate a first ciphertext, and the first ciphertext is sent to a third-party device.
[0093] In this way, the sending device cannot know the m message indexes and n groups of measurement bases TR1, ..., TR generated by the receiving method device. n Otherwise, the sending device measures n groups of bases TR1,...,TR n and n groups of preparation bases TS1,...,TS n By comparing and judging, it can be determined which keys of the position sets are correct and which are illegal. Further, it can be determined that the information selected by the receiving device to receive violates the requirement of inadvertent transmission.
[0094] S202: Decrypt the first ciphertext according to a pre-stored receiver key to obtain m message indexes and n groups of measurement bases.
[0095] Therefore, in this example, the third-party device receives n groups of prepared bases TS1, ..., TS n The first ciphertext sent to the receiving device; and based on the receiving key kr enc The key decrypts the first ciphertext and obtains m message indexes and n groups of measurement bases TR1,...,TR n .
[0096] S203: Generate a target location set according to m message indexes and n groups of measurement preparation pairs.
[0097] Among them, each measurement and preparation pair includes a preparation basis and a measurement basis with the same index identifier, the target position set includes n groups of parameters, the n groups of parameters correspond one-to-one to the n groups of measurement and preparation pairs, and the values of m groups of parameters in the n groups of parameters are respectively used to characterize the positions of the same basis in the corresponding measurement and preparation pairs, and the values of each group of parameters except the m group of parameters are respectively used to characterize the positions of different bases in the corresponding measurement and preparation pairs.
[0098] Exemplarily, for example, a base TS1, ..., TS is prepared according to n groups n The index identification and n groups of measurement bases TR1,...,TRn The index identifier of is used to 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. For example, the first preparation base TS1 and the first measurement base TR1 are used as a group of measurement preparation pairs. Therefore, n groups of measurement preparation pairs can be obtained, namely (TS1, TR1),..., (TS n ,TR n ).
[0099] Among them, the preparation base TS in each group of measurement preparation pairs i With measurement base TR i Including the same base and different bases; then, the third-party equipment measures the prepared base TS in each group of preparation pairs i With measurement base TR i The consistency comparison of basis vectors is performed to obtain the positions of the same basis and the positions of different basis in each set of measurement preparation pairs. Figure 1 As shown, after the sending device and the receiving device compare the basis vector consistency results, the positions of the same basis include: 1, 4, 5, 6, 8, 9, and the positions of different basis include: 2, 3, 7.
[0100] For example, if the index identifier of the group of measurement preparation pairs is any one of the m message indexes, the position of the same basis in the group of measurement preparation pairs is recorded; if the index identifier of the group of measurement preparation pairs is not any one of the m message indexes, the position of the different basis in the group of measurement preparation pairs is recorded. Thus, according to the positions of the same basis in the m groups of measurement preparation pairs and the positions of the different basis in the nm groups of measurement preparation pairs obtained above, the target position set is obtained, which avoids the possibility of the receiving device forging the target position set and ensures the security of the communication between the two parties.
[0101] S204: Encrypt the target location set to generate a second ciphertext, and send the second ciphertext and the target location set to the receiving device and the sending device respectively.
[0102] Optionally, the third-party device uses a pre-generated authentication key to encrypt the target location set obtained above, generate a second ciphertext MAC, and sends the second ciphertext MAC and the target location set to the receiving device and the sending device respectively, so that the sending device generates n encryption keys according to the target location set, and the receiving device generates m decryption keys according to the target location set, thereby solving the n-choose-m (m>1) transmission mode and ensuring the security of the key distribution and transmission process.
[0103] In another achievable manner, for example, the third-party device sends the second ciphertext and the target location set to the receiving device, and the receiving device then forwards the second ciphertext and the target location set to the sending device.
[0104] In summary, the embodiment of the present application provides a quantum oblivious transmission method. In this scheme, in order to support the "n-choose-m" oblivious transmission mode and ensure the identity of the sender device, the receiver device, and the third-party device is credible, it is proposed that in addition to the sender device and the receiver device, the quantum oblivious transmission system may also include: a third-party device. During the quantum oblivious transmission process, the third-party device performs a basis vector consistency comparison based on the n groups of preparation bases of the sender device and the n groups of measurement bases of the receiver device and m message indexes to obtain a target position set, wherein the values of the m groups of parameters in the target position set are respectively used to characterize the positions of the same basis in the corresponding measurement preparation pairs, and the values of each group of parameters except the m groups of parameters are respectively used to characterize the positions of different bases in the corresponding measurement preparation pairs, thereby avoiding the possibility of the receiver device forging the target position set; at the same time, the target position set is distributed to the sender device and the receiver device, and the consistency of encryption and decryption is ensured through the target position set, thereby solving the problem that information transmission may be attacked by quantum computers and ensuring the security of communication.
[0105] The following example will explain in detail how to generate a target location set.
[0106] Optionally, refer to Figure 4 As shown, the above step S203 includes:
[0107] S301: Determine m groups of measurement preparation pairs from n groups of measurement preparation pairs according to m message indexes and index identifiers of n groups of measurement preparation pairs.
[0108] The index identifier of each measurement preparation pair is the same as the index identifier of the measurement base and the index identifier of the preparation base in the measurement preparation pair. For example, the index identifier of the first measurement preparation pair (TS1, TR1) and the index identifier 1 of the measurement base TS1 and the index identifier of the preparation base TR1 in the first measurement preparation pair (TS1, TR1) are all 1.
[0109] Therefore, m groups of measurement preparation pairs can be selected from n groups of measurement preparation pairs according to the m message indices and the index identifiers of the n groups of measurement preparation pairs. For example, if m is 3 and the three message indices are 2, 5, and 6, then three measurement preparation pairs can be selected from n groups of measurement preparation pairs, and the index identifiers of the three measurement preparation pairs are 2, 5, and 6, respectively, that is, the three measurement preparation pairs are: (TS2, TR2), (TS5, TR5), and (TS6, TR6).
[0110] S302: Generate m groups of parameters in a target position set according to m groups of measurement and preparation pairs.
[0111] S303 . Generate nm groups of parameters in the target position set according to each group of measurement and preparation pairs except the m group of measurement and preparation pairs in the n groups of measurement and preparation pairs.
[0112] S304. Combine the m group of parameters and the nm group of parameters into a target position set.
[0113] Optionally, for example, three groups of parameters in the target position set can be generated based on the three measurement and preparation pairs determined above, that is, the three groups of parameters are the positions with the same basis in (TS2, TR2), (TS5, TR5), and (TS6, TR6); at the same time, based on other groups of measurement and preparation pairs except (TS2, TR2), (TS5, TR5), and (TS6, TR6), n-3 groups of parameters in the target position set are generated, and the n-3 groups of parameters are the positions with different basis in the other groups of measurement and preparation pairs; then, the 3 groups of parameters and the n-3 groups of parameters are combined into a target position set.
[0114] Optionally, refer to Figure 5 As shown, the above step S301 includes:
[0115] S401. Get the current message index.
[0116] The current message index is any message index among the m message indexes.
[0117] S402: Take the measurement preparation pairs with the same index identifier as the current message index in the n groups of measurement preparation pairs as one group of measurement preparation pairs in the m groups of measurement preparation pairs.
[0118] In one implementable method, for example, the current message index is 5, and the current message index is any one of the three message indexes; the current message index is compared one by one with the index identifiers of the n groups of measurement preparation pairs. If the current message index 5 is the same as the index identifier of the fifth group of measurement preparation pairs (TS5, TR5), the fifth group of measurement preparation pairs (TS5, TR5) is used as one of the m groups of measurement preparation pairs until m groups of measurement preparation pairs are obtained, that is, it is determined whether the index identifier of this group of measurement preparation pairs is the same as any one of the m message indexes.
[0119] Optionally, refer to Figure 6 As shown, the above step S302 includes:
[0120] S501, traversing m groups of measurement and preparation pairs, determining the positions of identical bases in the measurement basis and the preparation basis in each group of measurement and preparation pairs in turn, and generating m groups of parameters in the target position set according to the determined positions of identical bases.
[0121] In one achievable manner, for example, after determining three groups of measurement and preparation pairs, basis vector consistency comparison is performed on each of the three groups of measurement and preparation pairs to obtain the positions of the same basis in the measurement basis and the preparation basis in each group of measurement and preparation pairs. For example, the positions of the same basis in (TS2, TR2) are 1 and 3, the positions of the same basis in (TS5, TR5) are 2 and 3, and the positions of the same basis in (TS6, TR6) are 4, 5, and 6; then, according to the positions of the same basis in each group of measurement and preparation pairs, three groups of parameters in the target position set are generated, namely {(1, 3)2, (2, 3)5, (4, 5, 6)6}, respectively, and the index identifiers of these three groups of parameters in the target position set are the same as the index identifiers of the corresponding measurement and preparation pairs. For example, the index identifier of (1, 3) in the target position set is the same as the index identifier of (TS2, TR2), so the index identifier of (1, 3)2 in the target position set is also 2.
[0122] Continuing with reference to Figure 6, the above step S303 includes:
[0123] S502, traversing each group of measurement and preparation pairs except the m group of measurement and preparation pairs in the n groups of measurement and preparation pairs, determining the positions of different bases in the measurement base and the preparation base in each group of measurement and preparation pairs in turn, and generating nm groups of parameters in the target position set according to the determined positions of different bases.
[0124] In one achievable manner, for example, basis vector consistency comparison is performed on each measurement and preparation pair in n groups except for m groups of measurement and preparation pairs, and the position of the same basis in the measurement basis and preparation basis in each measurement and preparation pair in nm groups of measurement and preparation pairs is obtained. For example, the first measurement and preparation pair (TS1, TR1), the third measurement and preparation pair (TS3, TR3), and the fourth measurement and preparation pair (TS4, TR4) are all measurement and preparation pairs in n groups except for m groups of measurement and preparation pairs. Therefore, the basis vector consistency comparison can be performed on the first measurement preparation pair (TS1, TR1), the third measurement preparation pair (TS3, TR3), the fourth measurement preparation pair (TS4, TR4), and the seventh measurement preparation pair (TS7, TR7), respectively, to obtain that the positions of different bases in the first measurement preparation pair (TS1, TR1) are 1 and 4, the positions of different bases in the third measurement preparation pair (TS3, TR3) are 2, 4, and 5, the positions of different bases in the fourth measurement preparation pair (TS4, TR4) are 1 and 3, and the positions of different bases in the seventh measurement preparation pair (TS7, TR7) are 1 and 5; then, according to the positions of different bases in each group of measurement preparation pairs, the nm groups of parameters in the target position set are generated, namely, {(1, 4)1, (2, 4, 5)3, (1, 3)4, (1, 5)7}, and the index identifier of this nm group of parameters in the target position set is the same as the index identifier of the corresponding measurement preparation pair. For example, the index identifier of (1, 4)1 in the target position set is the same as the index identifier of (TS1, TR1), so the index identifier of (1, 4)1 in the target position set is also 1.
[0125] Therefore, it can be determined that the target position set generated above is {(1, 4)1, (1, 3)2, (2, 4, 5)3, (1, 3)4, (2, 3)5, (4, 5, 6)6, (1, 5)7}.
[0126] The following examples will explain in detail how to use third-party devices to perform identity authentication to ensure the identity security of the data transmission process.
[0127] Optionally, refer to Figure 7 As shown, before the above step S201, it also includes:
[0128] S601: Generate an identity authentication key, and distribute the public key in the identity authentication key to a sender device and a receiver device.
[0129] Optionally, before the sender device and the receiver device interact with each other, two-way identity authentication may be performed through a third-party device, that is, identity authentication between the third-party device and the sender device (or receiver device), and identity authentication between the sender device and the receiver device.
[0130] In one achievable manner, for example, identity authentication between a third-party device and a sender device and a receiver device is introduced. Specifically, the third-party device generates an identity authentication key PQC, and the identity authentication key PQC includes: a private key sk PQC and the public key P PQC , and the public key P PQC Distribute to sender and receiver devices.
[0131] S602. Based on the quantum cryptography protocol, obtain a sender key sent by the sender device and a receiver key sent by the receiver device.
[0132] In one achievable manner, for example, the sender device generates a sender key based on the BB84 quantum key distribution protocol, and the sender key includes: a private key ks mac and authentication key ks auth , and sends the generated sender key to a third-party device, which receives and stores the sender key sent by the sender device; at the same time, the receiver device generates a receiver key based on the BB84 quantum key distribution protocol, and the receiver key includes: private key kr enc and the authentication key kr auth and sends the generated recipient key to a third-party device, which receives and stores the recipient key sent by the recipient device.
[0133] S603: Sign the sender key to generate a first signature result, and send the first signature result to the sender device so that the sender device verifies the first signature result.
[0134] In one possible implementation, for example, the third-party device uses the PQC algorithm to authenticate the key ks in the sender key. auth Sign and generate the first signature result SS, that is: SS = sign (sk PQC ,hash(ks auth ), and sends the first signature result SS to the sender device, so that the sender device uses the public key ks in the sender key auth The first signature result SS is verified to verify the authenticity and credibility of the third-party device.
[0135] S604: Sign the recipient's key to generate a second signature result, and send the second signature result to the recipient's device so that the recipient's device verifies the second signature result.
[0136] In one possible implementation, for example, the third-party device uses the PQC algorithm to verify the authentication key kr in the receiver key. authSign and generate the second signature result SR, that is: SR = sign (sk PQC ,hash(kr auth ), and sends the second signature result SR to the recipient device, so that the recipient device uses the authentication key kr in the recipient key auth The second signature result SR is verified to verify the authenticity and credibility of the third-party device, thereby realizing two-way identity authentication among the receiving device, the sending device and the third-party device.
[0137] Optionally, two-way identity authentication can also be performed between the receiving device, the sending device and the third-party device. In this case, the receiving device and the sending device only need to generate an identity authentication key and sign the negotiated authentication keys ksauth and krauth. The third-party device verifies the signature information to complete the identity authentication of the receiving and sending parties, thereby ensuring the security of communication.
[0138] The following embodiment will be used to explain in detail how the sending device generates n encrypted passwords based on the target location set sent by the third-party device. The following method is applied to Figure 2 The sender device in .
[0139] Optionally, refer to Figure 8 As shown, the method includes:
[0140] S701. Determine n groups of preparation bases, and send the n groups of preparation bases to a third-party device.
[0141] S702: Receive a second ciphertext and a target location set returned by a third-party device.
[0142] S703, performing security verification on the second ciphertext. If the security verification passes, generating n encryption keys based on the pre-generated n groups of first quantum bits and target position sets.
[0143] In one possible implementation, for example, the target position set is recorded as L1,...,L n , the third-party device uses the private key ks in the sender's key mac Calculate the MAC value of the target location set and generate the second ciphertext MAC, that is, MAC = hmac (ks mac, L1,...,L n ), and sends the second ciphertext MAC and the target location set to the sending device; then, after the sending device receives the second ciphertext MAC and the target location set, the sending device uses the private key ks in the sending key macThe second ciphertext MAC is security verified to determine whether the second ciphertext MAC and the target position set are generated by a third-party device. If so, the security verification is passed, and n encryption keys are generated according to the pre-generated n groups of first quantum bits RS1, ..., RSn and the target position set, namely the first encryption key keyS1, ..., the nth encryption key keyS n .
[0144] S704. Encrypt the n messages to be sent in sequence according to the index identifiers of the n encryption keys, generate n third ciphertexts, and send the n third ciphertexts to the receiving device.
[0145] For example, the n messages to be sent are respectively a first message m1, a second message m2, ..., an nth message m n wait.
[0146] Optionally, for example, if the index identifier of the first encryption key keyS1 is 1, the first encryption key keyS1 is used to encrypt the first message m1 to generate the third ciphertext e1; similarly, if the index identifier of the second encryption key keyS2 is 2, the second encryption key keyS2 is used to encrypt the second message m2 to generate the third ciphertext e2; and so on, n third ciphertexts can be generated, namely e1,...,e n , and all n third ciphertexts are sent to the receiving device.
[0147] Optionally, refer to Fig. 9 As shown, the above step S703 includes:
[0148] S801. Determine n groups of target parameters according to the positions represented by each group of parameters in the target position set.
[0149] In this example, for example, the target position set generated above is {(1, 4)1, (1, 3)2, (2, 4, 5)3, (1, 3)4, (2, 3)5, (4, 5, 6)6, (1, 5)7}. Then, according to the position represented by the first group of parameters (1, 4)1, the first group of parameters can be determined to be 1 and 4. Similarly, according to the position represented by the second group of parameters (1, 3)2, the second group of parameters can be determined to be 1 and 3. And so on, n groups of target parameters can be obtained.
[0150] S802: Obtain a target position represented by each set of target parameters in n sets of target parameters.
[0151] Exemplarily, for example, positions 1 and 4 represented by the first set of parameters (1, 4) 1 and positions 1 and 3 represented by the second set of parameters (1, 3) 2 are obtained, and so on, the target position represented by each set of target parameters can be obtained.
[0152] S803, selecting bits at each target position from the n groups of first quantum bits, and generating n encryption keys based on the bits at each target position.
[0153] On the basis of the above embodiment, for example, bits at each target position are selected from n groups of first quantum bits RS1, ..., RSn, and n encryption keys are generated based on the bits at each target position. For example, positions 1 and 4 represented by the first group of parameters are obtained, and the bit at position 1 and the bit at position 4 in the first group of first quantum bits RS1 are obtained, such as the bit at position 1 is 1 and the bit at position 4 is 0, and the bit 1 at position 1 and the bit 0 at position 4 are used as the first encryption key keyS1, that is, the first encryption key keyS1 is 10; and so on, n encryption keys can be generated, that is, the first encryption key keyS1, ..., the nth encryption key keyS n .
[0154] The following example will be used to explain in detail how the receiving device generates n decryption passwords based on the target location set sent by the third-party device. The following method is applied to Figure 2 The receiving device in
[0155] Optionally, refer to Fig.10 As shown, the method includes:
[0156] S901. Determine n groups of measurement bases and m message indexes, encrypt the n groups of measurement bases and the m message indexes, generate a first ciphertext, and send the first ciphertext to a third-party device.
[0157] Optionally, the receiving device randomly determines n groups of measurement bases TR1, ..., TR n and m message indices {i1,...,i m}, the receiving device uses the private key kr in the receiving key enc , for n groups of measurement bases TR1,...,TR n and m message indexes to generate a first ciphertext, and send the first ciphertext to a third-party device.
[0158] S902: Receive the second ciphertext and the target location set returned by the third-party device.
[0159] S903. Perform security verification on the second ciphertext. If the security verification is passed, generate m decryption keys based on the pre-generated n groups of second quantum bits, m message indexes and target position sets.
[0160] Optionally, the receiving device receives the second ciphertext and the target position set returned by the third-party device, and performs security verification on the second ciphertext to determine whether the second ciphertext and the target position set are generated by the third-party device. If so, the security verification is passed, and m decryption keys are generated according to the pre-generated n groups of second quantum bits RR1, ..., RRn, m message indexes and target position sets, i.e., the first decryption key keyR i1 ,..., the mth decryption key keyR im .
[0161] S904: Receive n third ciphertexts sent by the sending device, and determine the third ciphertexts corresponding to the m decryption keys according to the index identifiers of the n third ciphertexts and the index identifiers of the m decryption keys.
[0162] Optionally, the receiving device receives n third ciphertexts sent by the sending device, namely, e1, ..., e n , and according to the index identifiers of the n third ciphertexts and the index identifiers of the m decryption keys, the third ciphertexts corresponding to the m decryption keys to be decrypted are selected from the n third ciphertexts, for example, the first decryption key keyR i1 The corresponding third ciphertext e i1 , and the mth decryption key keyR im The corresponding third ciphertext e im etc., that is, e i1 ,...,e im .
[0163] S905. Use the m decryption keys to decrypt the third ciphertexts corresponding to the m decryption keys respectively, and generate m decrypted messages.
[0164] Optionally, for example, using the first decryption key keyR i1 , for the first decryption key keyR i1 The corresponding third ciphertext e i1 Decrypt and generate the decrypted second message; similarly, use the mth decryption key keyR im , for the mth decryption key keyR im The corresponding third ciphertext e im Decryption is performed to generate the decrypted mth message; and so on, m decrypted messages are generated.
[0165] Optionally, refer to Fig.11 As shown, the above step S903 includes:
[0166] S1001. Determine m groups of target parameters according to m message indexes and target location sets.
[0167] In this example, for example, the target position set generated above is {(1, 4)1, (1, 3)2, (2, 4, 5)3, (1, 3)4, (2, 3)5, (4, 5, 6)6, (1, 5)7}, then m groups of target parameters can be selected from the target position set according to the m message indexes. For example, the m message indexes are 2, 5, and 6, respectively. Then, according to the index identifiers of each group of parameters in the target position set, m groups of target parameters with the same index as the m message indexes are selected. Therefore, the m groups of target parameters selected are the second group of parameters (1, 3)2, the fifth group of parameters (2, 3)5, and the sixth group of parameters (4, 5, 6)6.
[0168] S1002. Obtain a target position represented by each set of target parameters in m sets of target parameters.
[0169] Optionally, for example, the target positions represented by the second group of parameters (1, 3) 2 can be obtained as 1 and 3; similarly, the positions represented by the fifth group of parameters (2, 3) 5 can be obtained as 2 and 3; and so on, the target positions represented by each group of target parameters in the m groups of target parameters can be obtained.
[0170] S1003. Determine m groups of second quantum bits based on m message indexes and n groups of second quantum bits.
[0171] Optionally, for example, if the m message indices are 2, 5, and 6 respectively, the m message indices are compared with the index identifiers of the n groups of second quantum bits RR1, ..., RRn one by one. i The index identifier of the group of second qubits RR is the same as any of the m message indices. i As one of the m groups of second qubits. For example, if the index identifier of the second group of second qubits RR2 is the same as the message index 5 in the m message indexes, the second group of second qubits RR2 is taken as one of the m groups of second qubits, and so on, m groups of second qubits can be selected from the n groups of second qubits.
[0172] S1004. Select a bit at each target position from the m groups of second quantum bits, and generate m decryption keys based on the bits at each target position.
[0173] On the basis of the above embodiment, for example, taking the second group of second quantum bits RR2 as an example, according to the target positions represented by the second group of parameters (1, 3)2 are 1 and 3, bits at each target position are selected from the second group of second quantum bits RR2, such as obtaining the bit at position 1 and the bit at position 3 in the second quantum bit RS1, such as the bit at position 1 is 0, the bit at position 4 is 0, and the bit 0 at position 1 and the bit 0 at position 3 are used as the first decryption key keyR i1, that is, the first decryption key keyR i1 is 00; and so on, m decryption keys can be generated, namely the first decryption key keyR i1 ,..., the mth decryption key keyR im .
[0174] Optionally, refer to Fig.12 As shown, it is an interactive schematic diagram of a quantum inadvertent transmission method provided by an embodiment of the present application, and the method includes:
[0175] in, Fig.12 In the specification, the third-party device is abbreviated as the trusted third party, the sender device is abbreviated as the sender, and the receiver device is abbreviated as the receiver.
[0176] First, the identity authentication key generated by the third-party device. The specific generation process is as follows:
[0177] (1) Generate an identity authentication key PQC, where the identity authentication key includes: private key sk PQC and the public key P PQC ;
[0178] (2) The identity authentication key P PQC The public key P in PQC Distribute to sender and receiver devices.
[0179] Second, the identity authentication of the third-party device. The specific process is as follows:
[0180] (1) Obtain the sender key sent by the sender device, where the sender key includes the private key ks mac and authentication key ks auth ;
[0181] (2) Obtain the recipient key sent by the recipient device, where the recipient key includes the private key kr enc and the authentication key kr auth ;
[0182] (3) The third-party device uses the PQC algorithm to verify the authentication key ks in the sender's key. auth Signing, generating a first signature result SS, and sending the first signature result SS to the sending device;
[0183] (4) The sender uses the authentication key ks in the sender key auth Verify the first signature result SS;
[0184] (5) The third-party device uses the PQC algorithm to verify the authentication key kr in the receiver's key. auth Sign, generate a second signature result SR, and send the second signature result SR to the recipient device;
[0185] (6) The receiving device uses the authentication key kr in the receiving key auth The second signature result SR is verified.
[0186] Step 3: Perform “n-choose-m” oblivious transmission based on third-party devices. The specific process is as follows:
[0187] (1) The sending device generates n groups of first quantum bit sequences RS1,...,RSn with a length of k, and randomly selects n groups with a number of k to prepare base sequences TS1,...,TS n Modulate the first quantum bit sequence RS1, ..., RSn to generate n*k photons, and send the n*k photons to the receiving device;
[0188] (2) The receiving device randomly selects n groups of k measurement base sequences TR1,...TR n Measure n*k photons to generate n second quantum bit sequences RR1,...,RRn of length k, and determine the message indexes {i1,...,i m}, then generate the selection bit sequence ML;
[0189] For example, if 3 pieces of information at positions {2, 5, 6} are selected from 8 pieces of information, the bit sequence selected is binary 01001100.
[0190] (3) The sending device prepares the base sequence TS1,...,TS with n groups of k. n Send to third-party devices;
[0191] (4) The receiving device uses the private key kr in the receiving key enc , select the bit sequence ML and n groups of k measurement base sequences TR1,...,TR n Encrypt and send the ciphertext to a third-party device;
[0192] (5) Comparison of third-party equipment in turn (TS1, TR1),..., (TS n ,TR n ) prepares the consistency of the base sequence, and obtains the set of positions with the same base and the set of positions with different bases in each group. If the group index is in {i1,...,i m}, then record the position sets with the same basis, otherwise record the position sets with different basis, and continue in sequence until n position sets L1,...,L are generated. n , using the private key ks in the sender's key mac Calculate L1,...,L nMAC value, and L1,...,L n It is sent together with the MAC value to the receiving device;
[0193] (6) The receiving device is based on L i1 ,...,L im From RR i1 ,...,RR im Then select the corresponding bits to generate m decryption keys, i.e. keyR i1 ,...,keyR im , and L1,...,L n and its MAC value are returned to the sending device;
[0194] (7) The sender device uses the private key ks in the sender key mac Verify the MAC value. If it passes the security authentication, then according to L1,...,L n , select corresponding bits from n groups of first quantum bit sequences RS1,...,RSn with length k to generate n encryption keys, namely keyS1,...,keyS n , and then treat the n messages m1,...,m sent separately n Encryption is performed to generate n ciphertexts, namely e1,...,e n ;
[0195] (8) The receiving device uses m decryption keys, namely keyR i1 ,...,keyR im The decryption indexes are i1,...,i m The ciphertext information e i1 ,...,e im , generate m decrypted messages.
[0196] Fig.13 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, sending device and third-party device shown may be a computing device with data processing and data receiving and sending functions.
[0197] The electronic device includes: a processor 1301 and a memory 1302 .
[0198] The memory 1302 is used to store programs, and the processor 1301 calls the programs stored in the memory 1302 to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.
[0199] 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.
[0200] 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.
[0201] 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.
[0202] 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.
[0203] 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 third-party device, the method includes: Receiving n groups of preparation bases sent by a sending device and a first ciphertext sent by a receiving device, where the first ciphertext is generated by encrypting m message indexes generated by the receiving device and n groups of measurement bases according to a first key, where n is an integer greater than 1, and m is an integer greater than or equal to 1; Decrypting the first ciphertext according to a pre-stored receiver key to obtain m message indexes and n groups of measurement bases; Generate a target position set according to m message indexes and n groups of measurement preparation pairs, wherein each of the measurement preparation pairs includes a preparation base and a measurement base with the same index identifier, the target position set includes n groups of parameters, the n groups of parameters correspond to the n groups of measurement preparation pairs one by one, and the values of m groups of parameters among the n groups of parameters are respectively used to characterize the positions of the same bases in the corresponding measurement preparation pairs, and the values of each group of parameters except the m groups of parameters are respectively used to characterize the positions of different bases in the corresponding measurement preparation pairs; The target location set is encrypted to generate a second ciphertext, and the second ciphertext and the target location set are sent to the receiving device and the sending device respectively.
2. The method according to claim 1, characterized in that The generating a target location set according to the m message indexes and the n groups of measurement preparation pairs includes: Determine m groups of measurement preparation pairs from the n groups of measurement preparation pairs according to the m message indexes and the index identifiers of the n groups of measurement preparation pairs, wherein the index identifier of each measurement preparation pair is the same as the index identifier of the measurement base and the index identifier of the preparation base in the measurement preparation pair; generating m groups of parameters in the target position set according to the m groups of measurement preparation pairs; generating nm groups of parameters in the target position set according to each group of measurement and preparation pairs in the n groups of measurement and preparation pairs except the m groups of measurement and preparation pairs; The m group of parameters and the nm group of parameters are combined into the target position set.
3. The method according to claim 2, characterized in that The determining m groups of measurement preparation pairs from the n groups of measurement preparation pairs according to the m message indexes and the index identifiers of the n groups of measurement preparation pairs comprises: Obtaining a current message index, wherein the current message index is any message index among the m message indexes; The measurement preparation pairs in the n groups of measurement preparation pairs having the same index identifier as the current message index are used as a group of measurement preparation pairs in the m groups of measurement preparation pairs.
4. The method according to claim 2, characterized in that: The generating m groups of parameters in the target position set according to the m groups of measurement preparation pairs includes: Traversing the m groups of measurement and preparation pairs, determining positions of identical bases in the measurement base and the preparation base in each group of measurement and preparation pairs in turn, and generating m groups of parameters in the target position set according to the positions of the identical bases determined; The step of generating nm groups of parameters in the target position set according to each group of measurement and preparation pairs in the n groups of measurement and preparation pairs except the m groups of measurement and preparation pairs comprises: Traverse each group of measurement and preparation pairs in the n groups of measurement and preparation pairs except the m groups of measurement and preparation pairs, determine the positions of different bases in the measurement base and the preparation base in each group of measurement and preparation pairs in turn, and generate nm groups of parameters in the target position set according to the determined positions of different bases.
5. The method according to claim 1, characterized in that Before receiving the n groups of preparation bases sent by the sending device and the first ciphertext sent by the receiving device, the method further includes: Generate an identity authentication key, and distribute the public key in the identity authentication key to the sender device and the receiver device; Based on the quantum cryptography protocol, obtain the sender key sent by the sender device and the receiver key sent by the receiver device; Signing the sender key to generate a first signature result, and sending the first signature result to the sender device so that the sender device verifies the first signature result; The recipient key is signed to generate a second signature result, and the second signature result is sent to the recipient device so that the recipient device verifies the second signature result.
6. A quantum inadvertent transmission method, characterized in that: Applied to a sending device, the method includes: Determine n groups of preparation bases, and send the n groups of preparation bases to a third-party device; Receiving a second ciphertext and a target location set returned by the third-party device; Performing security verification on the second ciphertext, and if the security verification is passed, generating n encryption keys according to the pre-generated n groups of first quantum bits and the target position set; According to the index identifiers of the n encryption keys, the n messages to be sent are encrypted in sequence to generate n third ciphertexts, and the n third ciphertexts are sent to the receiving device.
7. The method according to claim 6, characterized in that The step of generating n encryption keys according to the pre-generated n groups of first quantum bits and the target position set includes: Determining n groups of target parameters according to the positions represented by each group of parameters in the target position set; Obtaining a target position represented by each set of target parameters in n sets of target parameters; A bit at each target position is selected from the n groups of first quantum bits, and n encryption keys are generated based on the bits at each target position.
8. A quantum inadvertent transmission method, characterized in that: Applied to a receiving device, the method includes: Determine n groups of measurement bases and m message indexes, encrypt the n groups of measurement bases and the m message indexes to generate a first ciphertext, and send the first ciphertext to a third-party device; Receiving a second ciphertext and a target location set returned by the third-party device; Performing security verification on the second ciphertext, and if the security verification is passed, generating m decryption keys according to the pre-generated n groups of second quantum bits, the m message indexes and the target position set; Receiving n third ciphertexts sent by the sending device, and determining the third ciphertexts corresponding to the m decryption keys according to index identifiers of the n third ciphertexts and index identifiers of the m decryption keys; The m decryption keys are used to decrypt the third ciphertexts corresponding to the m decryption keys respectively, to generate m decrypted messages.
9. The method according to claim 8, characterized in that The generating m decryption keys according to the pre-generated n groups of second quantum bits, the m message indexes and the target position set comprises: Determining m groups of target parameters according to the m message indexes and the target location set; Obtaining a target position represented by each set of target parameters in m sets of target parameters; Determine m groups of second qubits according to the m message indexes and the n groups of second qubits; A bit at each target position is selected from the m groups of second quantum bits, and m decryption keys are generated based on the bit at each target position.
10. A quantum inadvertent transmission system, characterized in that: The system comprises: a third-party device, a sender device and a receiver device; The third-party device is used to generate ciphertext based on the method described in any one of claims 1 to 5; The sending device is used to generate ciphertext based on the method described in any one of claims 6 or 7; The receiving device is used for decrypting based on the method according to any one of claims 8 or 9.
Citation Information
Patent Citations
Quantum casual transmission method and system, server and medium
CN118473634A
BBM92 protocol-based quantum casual transmission method and device
CN118631437A
Casual transmission method and device based on measurement device independent quantum communication protocol
CN118631438A