Data transmission method and device and quantum computer system
By generating the first private key and verification information in a quantum computing system, the security problem of data transmission under quantum computer attacks is solved. A hybrid encryption algorithm is used to ensure the security and privacy of data transmission.
Patent Information
- Application Number
- CN202410698684.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2025-12-09
Smart Images

Figure CN121098521A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of quantum computing, and particularly relates to a data transmission method and device and a quantum computer system. BACKGROUND
[0002] A quantum computer is a physical device that performs high-speed mathematical and logical operations, stores and processes quantum information in accordance with the laws of quantum mechanics. When a device processes and calculates quantum information and runs quantum algorithms, it is a quantum computer. Quantum computers have the ability to process mathematical problems more efficiently than ordinary computers, for example, they can accelerate the time for cracking RSA keys from hundreds of years to a few hours, so they have become a key technology under research.
[0003] With the continuous progress of quantum computers in hardware technology, error correction methods, algorithm theory and application, etc. in multiple dimensions, traditional public key algorithms gradually become vulnerable and face the risk of being attacked by quantum computers because they cannot resist the attack of quantum computers. That is, the existing encryption method has a high possibility of being broken. SUMMARY
[0004] The purpose of the application is to provide a data transmission method, device and quantum computer system to improve the security of the data transmission process.
[0005] In a first aspect, one embodiment of the present application provides a data transmission method applied to a first terminal, the method comprising: generating a first private key and verification information based on public key information and a predefined generation algorithm, respectively;
[0006] sending the verification information to a second terminal to enable the second terminal to perform encryption and decryption verification between the first terminal and the second terminal based on the verification information;
[0007] when receiving a verification success result returned by the second terminal, encrypting original data based on the first private key and an encryption algorithm, and sending the first ciphertext information obtained by encryption to the second terminal.
[0008] Optionally, before generating the first private key and the verification information based on the public key information and the predefined generation algorithm, respectively, the method further comprises:
[0009] sending an acquisition instruction of the public key information to the second terminal to enable the second terminal to generate the public key information based on the indication of the acquisition instruction;
[0010] receiving the public key information returned by the second terminal.
[0011] Optionally, the method further comprises:
[0012] In response to detecting the second ciphertext information sent by the second terminal, the second ciphertext information is decrypted based on the first private key and the decryption algorithm corresponding to the encryption algorithm to obtain the processing result corresponding to the original data.
[0013] The second encrypted information is generated by the second terminal encrypting the processing result based on the second private key and the encryption algorithm. The second private key is generated by the second terminal based on the initial private key generated when generating the public key information, the verification information, and the predefined generation algorithm.
[0014] Optionally, the first terminal communicates with the second terminal via a cloud server.
[0015] Optionally, the above encryption algorithm includes: SM4 encryption algorithm.
[0016] Optionally, the aforementioned raw data includes at least one of the following:
[0017] Data to be calculated, used to instruct the second terminal to perform task calculations, and query data, used to instruct the second terminal to query the task calculation results.
[0018] Secondly, one embodiment of this application provides a data transmission method applied to a second terminal. The method includes: receiving verification information sent by a first terminal, wherein the verification information is generated by the first terminal based on public key information and a predefined generation algorithm.
[0019] Based on the above verification information, the encryption and decryption verification of the first terminal and the second terminal is performed, and when the encryption and decryption verification of the first terminal and the second terminal is successful, a verification success result is returned to the first terminal, and a second private key is generated.
[0020] The system receives the first encrypted information sent by the first terminal and decrypts the first encrypted information based on the second private key and decryption algorithm to obtain the original data.
[0021] Optionally, before receiving the verification information sent by the first terminal, the method further includes:
[0022] In response to receiving the public key information acquisition instruction sent by the first terminal, the public key information and the initial private key are generated based on the instructions of the acquisition instruction;
[0023] Send the aforementioned public key information to the aforementioned first terminal;
[0024] Furthermore, after receiving the verification information sent by the first terminal, the method further includes:
[0025] Based on the aforementioned initial private key and the aforementioned verification information, encryption and decryption verification is performed between the aforementioned first terminal and the aforementioned second terminal.
[0026] Optionally, the above-mentioned generation of the second private key includes:
[0027] Based on the aforementioned initial private key, the aforementioned verification information, and the aforementioned predefined generation algorithm, the aforementioned second private key is generated.
[0028] Optionally, after receiving the first encrypted information sent by the first terminal and decrypting the first encrypted information based on the second private key and decryption algorithm to obtain the original data, the method further includes:
[0029] In response to detecting the query command sent by the first terminal for the processing result of the raw data, the processing result corresponding to the raw data is determined;
[0030] The processing result is encrypted using the second private key and encryption algorithm, and the encrypted second ciphertext information is sent to the first terminal.
[0031] Thirdly, one embodiment of this application provides a quantum computer system, which includes a first terminal, a cloud server, and a second terminal, wherein the first terminal and the second terminal are connected to communicate through the cloud server.
[0032] The aforementioned quantum computer system includes a first terminal, a cloud server, and a second terminal, wherein the first terminal and the second terminal communicate with each other through the cloud server.
[0033] The first terminal generates a first private key and verification information based on the public key information and a predefined generation algorithm, and forwards the verification information to the second terminal through the cloud server.
[0034] The second terminal performs encryption and decryption verification between the first terminal and the second terminal based on the verification information. When the verification is successful, a second private key is generated, and the verification success result is sent to the first terminal through the cloud server.
[0035] When the first terminal receives the verification success result, it encrypts the original data based on the first private key and encryption algorithm, and forwards the encrypted first ciphertext information to the second terminal through the cloud server.
[0036] The second terminal decrypts the first ciphertext information based on the second private key and the decryption algorithm to obtain the original data.
[0037] Optionally, the first terminal sends a query instruction for the raw data processing result to the cloud server, and the cloud server sends the query instruction to the second terminal.
[0038] The second terminal determines the processing result corresponding to the original data according to the query instruction; and encrypts the processing result based on the second private key and encryption algorithm to obtain the second ciphertext information.
[0039] The second terminal sends the second encrypted information to the cloud server, and the cloud server sends the second encrypted information to the first terminal.
[0040] The first terminal decrypts the second ciphertext information based on the first private key and the decryption algorithm to obtain the processing result.
[0041] Fourthly, another embodiment of this application provides a data transmission apparatus applied to a first terminal, the apparatus comprising:
[0042] The generation unit is used to generate the first private key and verification information based on the public key information and a predefined generation algorithm, respectively.
[0043] The sending unit is used to send the above-mentioned verification information to the second terminal, so that the second terminal can perform encryption and decryption verification between the first terminal and the second terminal based on the above-mentioned verification information;
[0044] The encryption unit is used to encrypt the original data based on the first private key and the encryption algorithm when it receives the verification success result returned by the second terminal, and to send the encrypted first ciphertext information to the second terminal.
[0045] Fifthly, another embodiment of this application provides a data transmission device applied to a second terminal. The device includes: a receiving unit for receiving verification information sent by a first terminal, wherein the verification information is generated by the first terminal based on public key information and a predefined generation algorithm.
[0046] The verification unit is configured to perform encryption and decryption verification on the first terminal and the second terminal based on the above verification information, and, when the encryption and decryption verification between the first terminal and the second terminal is successful, return a verification success result to the first terminal, and generate a second private key.
[0047] The decryption unit is used to receive the first ciphertext information sent by the first terminal, and to decrypt the first ciphertext information based on the second private key and the decryption algorithm to obtain the original data.
[0048] Sixthly, another embodiment of this application provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the preceding claims when running.
[0049] In a seventh aspect, another embodiment of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the methods described in any of the preceding claims.
[0050] Compared with existing technologies, the data transmission method, apparatus, and quantum computer system provided by this invention allow a first terminal to generate a first private key and verification information based on public key information and a predefined generation algorithm. The generated first private key is not sent to a second terminal; only the verification information is sent to the second terminal to allow the second terminal to determine whether an encryption / decryption agreement has been established between the two terminals. Once the second terminal confirms the agreement, the encrypted data sent by the first terminal can be decrypted by the second terminal. Throughout the entire data transmission process between the first and second terminals, neither the first private key used for encryption by the first terminal nor the second private key used for decryption by the second terminal is transmitted over the public internet. This method avoids the propagation of the private keys used for encryption and decryption over the public internet. Even if the encrypted information is intercepted during transmission over the public internet, the interceptor will be unable to decrypt it due to the lack of the private key, thus greatly increasing the security of the data transmission process. Attached Figure Description
[0051] Figure 1 A hardware structure block diagram of a quantum processing system for a data transmission method provided in an embodiment of the present invention;
[0052] Figure 2 A flowchart illustrating a data transmission method provided in an embodiment of the present invention;
[0053] Figure 3 A flowchart illustrating a data transmission method provided in an embodiment of the present invention;
[0054] Figure 4 A schematic diagram of the architecture of a quantum computer system provided in an embodiment of the present invention;
[0055] Figure 5 A schematic diagram of a quantum processing system provided in an embodiment of the present invention;
[0056] Figure 6 This is a schematic diagram illustrating the process by which a first terminal requests a public key from a second terminal, as provided in an embodiment of the present invention.
[0057] Figure 7 This is a schematic diagram illustrating the verification process performed by the second terminal according to an embodiment of the present invention.
[0058] Figure 8 This is a schematic diagram illustrating the generation of first encrypted information by a first terminal according to an embodiment of the present invention;
[0059] Figure 9 This is a schematic diagram illustrating the acquisition of raw data by a second terminal according to an embodiment of the present invention;
[0060] Figure 10 This is a schematic diagram illustrating the process of a second terminal generating second encrypted information, provided in an embodiment of the present invention.
[0061] Figure 11 This is a schematic diagram illustrating the process of a first terminal decrypting second ciphertext information, provided in an embodiment of the present invention.
[0062] Figure 12 This invention provides a schematic diagram illustrating the data transmission process between a first terminal and a second terminal in a quantum processing system, as provided in an embodiment of the invention.
[0063] Figure 13 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present invention;
[0064] Figure 14 This is a schematic diagram of a data transmission device provided in an embodiment of the present invention. Detailed Implementation
[0065] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0066] The present invention first provides a data transmission method, which can be applied to terminal devices, such as computer terminals, specifically ordinary computers, quantum computers, etc.
[0067] The data transmission method disclosed herein can be applied to terminal devices in quantum processing systems (computer terminals and quantum computers; it should be understood that a quantum computer can be understood as both a system-level and hardware-level device, and here, "quantum computer" can refer to the operating system of the quantum computer (system-level), that is, the execution entity of the data transmission method disclosed herein can, in some cases, be the operating system of the quantum computer), such as... Figure 1 As shown, Figure 1This is a schematic diagram of a possible quantum processing system architecture provided in this disclosure. A computer terminal is connected to a cloud server via a network. The cloud server is also connected to a quantum computer (which can be understood as the cloud server and the quantum computer's operating system) via a network. The computer terminal can be used to send computational tasks to the quantum computer. The quantum computer processes the tasks sent by the computer terminal and generates corresponding computational results. (It should be understood that the sent tasks first reach the quantum computer's operating system, which then forwards the tasks to the quantum computer's hardware layer for computation.) The computer terminal and the quantum computer terminal can interact with each other using the cloud server.
[0068] It should be understood that quantum computers have special requirements for their operating environment. Therefore, quantum computers are usually fixed in their suitable operating environment, while computer terminal devices can remotely send computing tasks to quantum computers, making the process of sending tasks to quantum computers more convenient.
[0069] A computer terminal may include one or more processors (processors may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs) and a memory for storing data transmission methods. Optionally, the computer terminal may also include a transmission device for communication functions and input / output devices. The memory can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the data transmission methods in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0070] The transmission device is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0071] It should be understood that a true quantum computer has a hybrid structure, comprising two main parts: a classical computer responsible for performing classical computations and control, and a quantum device responsible for running quantum programs to achieve quantum computation. A quantum program is a sequence of instructions written in a quantum language such as QRunes that can run on a quantum computer, supporting operations on quantum logic gates and ultimately enabling quantum computation. Specifically, a quantum program is a sequence of instructions that operates on quantum logic gates according to a specific timing order.
[0072] In practical applications, due to limitations in the development of quantum device hardware, quantum computing simulations are often required to verify quantum algorithms, quantum applications, and so on. Quantum computing simulation is the process of simulating the execution of a quantum program corresponding to a specific problem using a virtual architecture (i.e., a quantum virtual machine) built with the resources of a regular computer. Typically, it is necessary to construct a quantum program corresponding to a specific problem. The quantum program referred to in this embodiment of the invention is a program written in a classical language that represents qubits and their evolution, wherein qubits, quantum logic gates, etc., related to quantum computing all have corresponding classical code representations.
[0073] Quantum circuits, also known as quantum logic circuits, are a manifestation of quantum programming and are the most commonly used general-purpose quantum computing model. They represent circuits that operate on qubits under an abstract concept. They consist of qubits, circuits (timelines), and various quantum logic gates. Finally, the results are often read out through quantum measurement operations.
[0074] Unlike traditional circuits that use metal wires to transmit voltage or current signals, in quantum circuits, the circuits can be seen as being connected by time. That is, the state of a quantum bit evolves naturally over time, following the instructions of the Hamiltonian operator until it encounters a logic gate and is operated on.
[0075] A quantum program corresponds to a total quantum circuit. The quantum program mentioned in this invention refers to this total quantum circuit, where the total number of qubits in the total quantum circuit is the same as the total number of qubits in the quantum program. This can be understood as follows: a quantum program can consist of a quantum circuit, measurement operations on the qubits within the quantum circuit, registers for storing measurement results, and control flow nodes (jump instructions). A quantum circuit can contain dozens, hundreds, or even thousands of quantum logic gate operations. The execution process of a quantum program is the process of executing all the quantum logic gates according to a certain timing order. It should be noted that the timing order refers to the chronological order in which individual quantum logic gates are executed.
[0076] It should be noted that in ordinary silicon-based computing devices, the processing units are CMOS transistors. These computing units are not limited by time or coherence; that is, they are available at any time without time constraints. Furthermore, currently, the number of these computing units in silicon chips is sufficient; a single chip currently contains tens of thousands of computing units. The sufficient number of computing units and the fixed selectable computing logic of CMOS transistors, such as AND logic, allow for computational efficiency through a combination of numerous CMOS transistors and limited logic functions.
[0077] Unlike the logic units in ordinary computing devices, the basic computing unit in current quantum computers is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited in its usability and is not always available. Making full use of qubits within their available usability time is a key challenge in quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of its performance. Each qubit performs computational functions through on-demand configured logic functions. Given the limited number of qubits and the diverse logic functions in quantum computing, such as Hadamard gates (H gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), RX gates, RY gates, RZ gates, CNOT gates, CR gates, iSWAP gates, Tofoli gates, etc., quantum logic gates are generally represented using unitary matrices. A unitary matrix is not only a matrix form but also an operation and transformation. Generally, the effect of a quantum logic gate on a quantum state is calculated by left-multiplying the unitary matrix by the matrix corresponding to the right vector of the quantum state. In quantum computing, a limited number of qubits are combined with a variety of logical functions to achieve computational effects.
[0078] Given these differences in quantum computers, the design of logical functions applied to qubits (including the design of whether qubits are used and the design of the efficiency of each qubit's use) is crucial for improving the computational performance of quantum computers and requires specialized design. The aforementioned design considerations for qubits are technical problems that ordinary computing devices do not need to address.
[0079] For ease of understanding, since the main improvement of this disclosure lies in the data transmission process, unless otherwise specified below, the interaction between the quantum computer and the classical computer can be understood as the interaction between the quantum computer's operating system and the classical computer, and the interaction between the second terminal and the first terminal can be understood as the interaction between the quantum computer's operating system and the classical computer.
[0080] In related technologies, within quantum processing systems, during information exchange between quantum computers and classical computers via cloud servers, when the classical computer needs to send data to be processed to the cloud server, the data can be encrypted using a secure hypertext transfer protocol. However, if this encryption protocol is compromised during transmission, the data may be intercepted, leading to leakage during transmission.
[0081] In other words, in related technologies, the data to be processed faces the risk of being intercepted during transmission, thus causing data leakage.
[0082] See Figure 2 , Figure 2 This is a flowchart illustrating a data transmission method provided in an embodiment of the present invention. This data transmission method can be applied to a first terminal, and the first terminal and a second terminal can communicate; that is, it can be understood that the first terminal and the second terminal can exchange information. Figure 2 As shown, the above data transmission method may include:
[0083] Step 201: Generate the first private key and verification information based on the public key information and the predefined generation algorithm.
[0084] As an example, public key information can indicate a public key, and the public key information can be generated by a second terminal, that is, the second terminal can also store the public key information.
[0085] As an example, a predefined generation algorithm can be used to generate a first private key and verification information based on a public key and a random number. This predefined generation algorithm can be agreed upon beforehand by the first and second terminals; that is, the second terminal can also include the predefined generation algorithm, or a generation algorithm that matches the predefined algorithm. In other words, the first and second terminals can call the same set of predefined generation algorithms.
[0086] As an example, a predefined generation algorithm can be understood as a hybrid of standard lattice-based cryptographic algorithms (Kyber, a family of lattice-based cryptographic constructions) and ECC (Elliptic Curve Cryptography) algorithms. Of course, the specific choice between lattice-based and ECC algorithms can be made based on the actual situation.
[0087] In other words, the predefined generation algorithm can be understood as a hybrid encryption algorithm combining post-quantum cryptography and traditional public-key algorithms. Post-quantum algorithms may include, but are not limited to: (1) lattice-based cryptographic algorithms; (2) encoding-based cryptographic algorithms; (3) multivariate-based cryptographic algorithms; and (4) hash-based signature algorithms. Of course, the specific post-quantum cryptographic algorithm chosen can be limited according to the actual situation.
[0088] In other words, the predefined generation algorithm is a hybrid algorithm formed by post-quantum cryptography and traditional public-key cryptography, and the specific generation method can be reasonably set according to the actual situation. In this way, since post-quantum cryptography is used in the process of generating the first private key, the first ciphertext information obtained by encrypting with the first private key can effectively resist various attacks from quantum computers, making the data transmission process highly secure.
[0089] As an example, the first private key can be used to encrypt the data that needs to be sent.
[0090] As an example, verification information can be used to determine whether a second terminal can decrypt encrypted data sent by a first terminal before the first data transmission; specifically:
[0091] The second terminal generates public key information and an initial private key (or, in other words, generates a key pair upon receiving a public key information retrieval instruction, which includes the matching initial private key and public key). When the second terminal receives the verification information, it can perform encryption and decryption verification between the first and second terminals based on the initial private key and the verification information. For example, if the second terminal can generate a second private key based on the initial private key, verification information, a random number, and a predefined generation algorithm, then the verification is successful.
[0092] As an example, although both the first private key and the verification information can be generated using public key information and a predefined generation algorithm, they are different. The verification information can be understood as the identification information of the first private key; that is, obtaining the verification information is not the same as obtaining the first private key. For example, the private key can be understood as a key to open or close a specific door, while the verification information can be understood as a number for that key. The second terminal can then perform encryption and decryption verification between the first terminal and the second terminal based on the initial public key and the verification information.
[0093] Step 202: Send the verification information to the second terminal.
[0094] As an example, the second terminal can perform encryption / decryption verification between the first and second terminals based on the verification information.
[0095] As an example, if the second terminal can generate a second private key (which can be understood as a specific string) based on the initial private key, verification information, random number, and a predefined generation algorithm, then the verification is successful. That is, if the predefined generation algorithm can generate a specific string based on the initial private key, verification information, and random number, it indicates that the calculation process is coherent and has not been altered, thus indicating that the verification between the first and second terminals is successful.
[0096] As an example, before encrypting the data to be sent using the first private key, verification information can be sent to the second terminal for verification, so that the encrypted data sent to the second terminal can be decrypted by the second terminal using the second private key.
[0097] Step 203: Upon receiving the successful verification result returned by the second terminal, encrypt the original data based on the first private key and the encryption algorithm, and send the encrypted first ciphertext information to the second terminal.
[0098] As an example, raw data can be understood as data that needs to be sent to the second terminal (e.g., data that needs to be processed by the second terminal, data that instructs the second terminal to query the processing results, etc.).
[0099] In some implementation scenarios, the raw data includes at least one of the following:
[0100] The data to be calculated is used to instruct the second terminal to perform task calculations, and the query data is used to instruct the second terminal to query the task calculation results. That is, it can be understood that when the first terminal sends data that needs to be processed by the second terminal, it can use the first private key and encryption algorithm to encrypt the data (original data). When the first terminal needs the second terminal to query the processing results of the data, it can also use the first private key and encryption algorithm to encrypt the query instruction data.
[0101] It should be understood that the first ciphertext information is completely different from the original data. That is, after encrypting the original data using the first private key and encryption algorithm, the obtained first ciphertext information is significantly different from the original data. Therefore, the first ciphertext information can be sent to the second terminal to ensure the security of data transmission.
[0102] As an example, when the second terminal determines that the encryption and decryption verification between the first terminal and the second terminal is successful based on the verification information, the second private key in the second terminal can be used to decrypt the first ciphertext information so that the second terminal can obtain the original data.
[0103] As can be seen, in this disclosure, the first terminal can generate a first private key and verification information based on public key information and a predefined generation algorithm. The generated first private key is not sent to the second terminal; only the verification information is sent to the second terminal so that the second terminal can determine whether an encryption / decryption agreement has been established between the first and second terminals. Once the second terminal confirms the establishment of the encryption / decryption agreement, the second terminal can decrypt the encrypted data sent by the first terminal. Throughout the entire data transmission process between the first and second terminals, neither the first private key used for encryption by the first terminal nor the second private key used for decryption by the second terminal is transmitted over the public internet. This method avoids the propagation of the private keys used for encryption and decryption over the public internet. Even if the encrypted information obtained through encryption using the private key is intercepted during transmission over the public internet, the interceptor will be unable to decrypt the encrypted information because they do not possess the private key, thus greatly increasing the security of the data transmission process.
[0104] In other words, in this disclosure, a first private key and verification information can be generated based on public key information and a predefined generation algorithm, respectively. The first private key can be stored locally, while the verification information can be sent to a second terminal. The second terminal then performs encryption / decryption verification between itself and the first terminal based on the verification information to determine if it can decrypt the encrypted information sent by the first terminal. After the second terminal returns a successful verification result, the first terminal can encrypt the original data based on the first private key and the encryption algorithm, and send the encrypted first ciphertext information to the second terminal. During this process, the first private key is not transmitted over the public network between the first and second terminals. Instead, the first ciphertext information, completely different from the original data, is transmitted. Therefore, even if the first ciphertext information is intercepted during transmission, the interceptor will not be able to obtain the original data due to the lack of the first private key. This enhances the security of data transmission.
[0105] Furthermore, the predefined generation algorithm can also be a hybrid algorithm (e.g., a combination of the Kyber cipher and ECC-type algorithms), which makes it more difficult to crack the first ciphertext information, thereby further increasing the security of the transmission process.
[0106] In some implementations, it is not necessary to encrypt the verification information when sending it, which can improve the timeliness of the second terminal obtaining the verification information and the timeliness of the second terminal performing encryption and decryption verification.
[0107] It should be understood that if the verification information is altered during transmission, the second terminal will be unable to generate a second private key using the verification information, and thus the second terminal can output a result indicating that the encryption / decryption verification between the first and second terminals failed.
[0108] If the verification information is intercepted midway, and since the verification information is not used to encrypt the original file, even if the interceptor obtains the verification information, they will not be able to decrypt the first ciphertext information because they cannot obtain the first private key.
[0109] As can be seen, under the data transmission logic disclosed herein, the verification information does not need to be transmitted in encrypted form and can be transmitted directly using the public network, thereby improving the efficiency of encryption and decryption verification between the first terminal and the second terminal.
[0110] It should be understood that the network path for data transmission between the first terminal and the second terminal can be understood as the public network. However, during the transmission of data using the public network, the data is at risk of being intercepted.
[0111] It should be noted that the first terminal and the second terminal can pre-agree on the encryption and decryption algorithm. When the second terminal determines that the encryption and decryption verification between the first terminal and the second terminal is successful based on the verification information, it can be indicated that the first private key of the first terminal matches the second private key of the second terminal. In this case, the encrypted information transmitted between the first terminal and the second terminal can be decrypted by both the first terminal and the second terminal.
[0112] In some embodiments, before step 201 (generating the first private key and verification information based on the public key information and a predefined generation algorithm, respectively), the above data transmission method may further include:
[0113] Send a public key information acquisition instruction to the second terminal, so that the second terminal generates public key information based on the instructions of the acquisition instruction;
[0114] Receive the public key information returned by the second terminal.
[0115] It should be noted that the second terminal generates a key pair based on the public key information retrieval command. This key pair includes an initial private key and a public key. The initial private key can be used for subsequent verification and for generating a second private key. Since the first and second terminals use the same generation algorithm, if the calculation process is continuous during verification, it indicates successful verification. If the second terminal, after receiving the verification information, cannot generate a specific string (the second private key) using the verification information, the initial private key, and the random number, it indicates verification failure.
[0116] As an example, the public key information can be generated by the second terminal and sent to the first terminal by the second terminal.
[0117] It should be understood that the second terminal can be understood as a data processing end (in a quantum processing system, the second terminal can be understood as a quantum computer, or the operating system of a quantum computer). Therefore, by using the second terminal to generate public key information, the second terminal can generate public key information according to the specific interface situation. This helps the second terminal to promptly determine the interface for receiving and processing the first ciphertext information after receiving it from the first terminal, thereby enabling the second terminal to efficiently complete the decryption of the first ciphertext information and the processing of the original data.
[0118] In some implementations, since the public key information is not used for encrypting the data to be transmitted, the second terminal can send the public key information to the first terminal directly via the public network without encrypting it. That is, transmitting the public key information via the public network does not affect the security of the first terminal sending the first encrypted information to the second terminal; at the same time, it can improve the efficiency of the first terminal obtaining the public key information.
[0119] As can be seen, in this disclosure, during the data interaction between the first terminal and the second terminal, encryption and decryption verification is performed between the first terminal and the second terminal. The data sent during the encryption and decryption verification process does not need to be encrypted. After the encryption and decryption verification is completed, the data to be sent can be encrypted using the locally stored private key. That is, in the data transmission logic of this disclosure, the public network never transmits the private key used for encryption or the predefined generation algorithm. Only the encrypted information or information that does not affect the encryption effect is transmitted, which makes the data transmission process highly secure.
[0120] In some embodiments, the above data transmission method may further include: in response to detecting the second ciphertext information sent by the second terminal, decrypting the second ciphertext information based on the first private key and the decryption algorithm corresponding to the encryption algorithm to obtain the processing result corresponding to the original data.
[0121] The second encrypted information is generated by the second terminal encrypting the processing result based on the second private key and the encryption algorithm. The second private key is generated by the second terminal based on the initial private key, verification information and predefined generation algorithm generated when generating the public key information.
[0122] As an example, when the second terminal sends data to the first terminal, it can use a second private key and an encryption algorithm, while the first terminal can use a first private key and a decryption algorithm to decrypt the data.
[0123] It should be understood that the second terminal can generate a key pair (initial private key and public key) based on the public key information retrieval instruction. After receiving the verification information, the second terminal can generate a second private key using a predefined generation algorithm, the initial private key, the verification information, and a random number. Furthermore, when the second terminal can generate a specific string, it indicates that a second private key has been generated, and it can be determined that the generated second private key matches the first private key. Thus, during data transmission between the first and second terminals, the first terminal can use the first private key and decryption algorithm to decrypt the second ciphertext sent by the second terminal, and the second terminal can use the second private key and decryption algorithm to decrypt the first ciphertext sent by the first terminal. When the first terminal needs to send data, it can use the first private key and encryption algorithm to encrypt it; similarly, when the second terminal needs to send data, it can use the second private key and encryption algorithm to encrypt it.
[0124] As can be seen, the original data that needs to be processed by the second terminal is transmitted over the public network in the form of the first encrypted information, while the processing result corresponding to the original data is transmitted over the public network in the form of the second encrypted information. This makes the data transmission process more secure.
[0125] In some embodiments, the first terminal can communicate with the second terminal through a cloud server.
[0126] As an example, the first terminal and the second terminal communicate through a cloud server, which facilitates the first terminal to send computing tasks to the second terminal. In other words, the cloud server can be understood as a relay station in the data transmission process.
[0127] In some embodiments, the encryption algorithm may include the SM4 encryption algorithm.
[0128] As an example, the SM4 (Simplified Message Block Cipher for 128-bit Data) encryption algorithm is characterized by high security and high computational efficiency. Therefore, the encryption algorithm disclosed in this paper uses the SM4 encryption algorithm to more efficiently encrypt the original data, and the encrypted first ciphertext information is also more difficult to break. That is, using the SM4 encryption algorithm can also make the output transmission process more secure.
[0129] As can be seen, before the first terminal needs to send the original data, it can first send a public key information acquisition instruction to the second terminal, so that the second terminal can return the public key information. The first terminal can generate a first private key and verification information based on the public key information, a random number and a hybrid encryption algorithm, and can send the verification information to the second terminal for encryption and decryption verification. If the second terminal determines that the encryption and decryption verification between the first terminal and the second terminal is successful, it can return a verification success result. When the first terminal receives the verification success result sent by the second terminal, it can use the first private key and the encryption algorithm to encrypt the original data to obtain the first ciphertext information, and can send the first ciphertext information to the second terminal so that the second terminal can decrypt the first ciphertext information to obtain the original data.
[0130] In other words, before the first terminal and the second terminal send data that needs to be encrypted, they first perform an initial verification of the encryption transmission process. Specifically, this can be understood as the first terminal first obtaining the public key information fed back by the second terminal, and then the first terminal using the public key information, random number, and hybrid encryption algorithm to generate a first private key and verification information. Then, the first terminal sends the verification information to the second terminal so that the second terminal can verify it. After the verification is successful, the first terminal can use the first private key and encryption algorithm to encrypt the original data (the data that needs to be encrypted for transmission), generate the first ciphertext information, and send it to the second terminal.
[0131] In this disclosure, the first private key used for encryption is not transmitted on the public network during the initialization verification process. Moreover, the first private key is generated using a hybrid encryption method, and the SM4 encryption algorithm is used in the process of generating the first ciphertext information. That is, the first private key is difficult to crack and will not be leaked from the public network. Therefore, the data transmission method of this disclosure can transmit data more securely.
[0132] Please see Figure 3 , Figure 3 This is a flowchart illustrating a data transmission method provided in this disclosure. This data transmission method can be applied to a second terminal, and the first terminal and the second terminal can communicate; that is, it can be understood that the first terminal and the second terminal can exchange information. Figure 3 As shown, the above data transmission method may include:
[0133] Step S301: Receive verification information sent by the first terminal.
[0134] Here, the verification information is generated by the first terminal based on public key information and a predefined generation algorithm.
[0135] As an example, the verification information is generated by the first terminal based on the public key information and a predefined generation algorithm. The specific generation method has been described in detail in the above embodiments, and will not be repeated here for the sake of brevity.
[0136] Step S302: Perform encryption and decryption verification on the first terminal and the second terminal based on the verification information; and when the encryption and decryption verification between the first terminal and the second terminal is successful, return a verification success result to the first terminal; and generate a second private key.
[0137] As an example, the second terminal can perform encryption and decryption verification between the first terminal and the second terminal based on the verification information. That is, the second terminal can generate a second private key based on the verification information, the initial private key, the random number, and the predefined generation algorithm. If the second private key cannot be generated, it proves that the verification has failed. Conversely, if the verification is successful, the second private key can be generated.
[0138] The hybrid encryption algorithm has been described in detail in the above embodiments, and will not be repeated here for the sake of brevity.
[0139] As an example, when the second terminal determines that the encryption / decryption verification is successful, it can indicate that the first private key generated by the first terminal matches the second private key generated by the second terminal. When the first terminal receives the successful verification result, it can generate the first ciphertext information based on the first private key and the encryption algorithm.
[0140] Step S303: Receive the first ciphertext information sent by the first terminal, and decrypt the first ciphertext information based on the second private key and decryption algorithm to obtain the original data.
[0141] As an example, when the first terminal uses the SM4 encryption algorithm, the second terminal will use the SM4 decryption algorithm; that is, there is usually a matching encryption and decryption algorithm. Since both the first and second terminals need to encrypt and decrypt data during interaction, they can store the same encryption and decryption algorithm.
[0142] As an example, since the second terminal has already performed a verification that the first and second terminals can perform encryption and decryption, and the verification is successful, the second terminal can then use the second private key to decrypt the first ciphertext information and obtain the original data.
[0143] As can be seen, through the above method, the second terminal can accurately obtain the original data through the first encrypted information. Furthermore, before the second terminal receives the first encrypted information, neither the first nor the second private key has been transmitted over the public internet. This means that even if the interceptor obtains the first encrypted information, they cannot decrypt it and therefore cannot obtain the original data. In other words, the method disclosed herein makes the information exchange process between the first and second terminals more secure.
[0144] In some embodiments, before step S301 (receiving verification information sent by the first terminal), the above data transmission method is further used for:
[0145] In response to receiving a public key information retrieval instruction from the first terminal, the system generates public key information and an initial private key based on the instruction; and sends the public key information to the first terminal.
[0146] Furthermore, after receiving the verification information sent by the first terminal, the above method may further include:
[0147] Based on the initial private key and the aforementioned verification information, encryption and decryption verification is performed between the first terminal and the second terminal.
[0148] As an example, when the first terminal needs to send encrypted information to the second terminal, it can send a public key information retrieval instruction to the second terminal. This allows the second terminal to determine the interface used to process the information from the first terminal based on the actual situation, and to generate public key information based on that interface before sending it to the first terminal. It should be noted that the second terminal actually generates a key pair, which includes a public key and an initial private key.
[0149] As an example, the first terminal can use the public key information to generate the first private key, while the second terminal can use the initial private key, the verification information generated based on the public key, and the random number to generate the second private key.
[0150] In some implementations, generating a second private key may specifically include:
[0151] A second private key is generated based on the initial private key, verification information, and a predefined generation algorithm.
[0152] In some embodiments, after step S304 (receiving the first ciphertext information sent by the first terminal, and decrypting the first ciphertext information based on the second private key and decryption algorithm to obtain the original data), the above data transmission method may further include: in response to detecting a query instruction sent by the first terminal for the processing result of the original data, determining the processing result corresponding to the original data;
[0153] The processing result is encrypted using a second private key and an encryption algorithm, and the encrypted second ciphertext information is sent to the first terminal.
[0154] As an example, when the first terminal needs to query the processing result of the second terminal on the original data, it can send a query command to the second terminal. After receiving the query command, the second terminal can query the processing result (of course, in some cases, the processing result can indicate the processing of the original data; that is, the processing result can include: the actual result after processing is complete, and the query result during processing). The processing result can then be encrypted using a second private key and an encryption algorithm to obtain second ciphertext information, which is then sent to the first terminal. The first terminal can then use its first private key to decrypt the second ciphertext information and obtain the processing result corresponding to the original data.
[0155] It is evident that during the information exchange between the first terminal and the second terminal, both the original data and the corresponding processing results are transmitted in encrypted form, thereby ensuring the security of data transmission between the first terminal and the second terminal.
[0156] In some embodiments, when the second terminal sends the processing result to the first terminal, the second private key can be used to decrypt the processing result to obtain the third ciphertext information, and the third ciphertext information can be sent to the first terminal so that the first terminal can use the first private key to decrypt the third ciphertext information and obtain the processing result.
[0157] In some implementations, an encrypted network transmission protocol can be established during data transmission between the first terminal and the second terminal, which can further enhance the security of the data transmission process.
[0158] Please see Figure 4 , Figure 4 The quantum computer system provided in this disclosure may include a first terminal, a cloud server, and a second terminal, wherein the first terminal and the second terminal are connected to communicate through the cloud server.
[0159] The first terminal generates a first private key and verification information based on the public key information and a predefined generation algorithm, and forwards the verification information to the second terminal through the cloud server;
[0160] The second terminal performs encryption and decryption verification between the first terminal and the second terminal based on the verification information. When the verification is successful, it generates a second private key and sends the verification success result to the first terminal through the cloud server.
[0161] When the first terminal receives the successful verification result, it encrypts the original data based on the first private key and encryption algorithm, and forwards the encrypted first ciphertext information to the second terminal through the cloud server.
[0162] The second terminal decrypts the first ciphertext information using the second private key and decryption algorithm to obtain the original data.
[0163] As can be seen, the first terminal can generate a first private key and verification information based on the public key information and a predefined generation algorithm, and can send the verification information to the second terminal for verification. When the second terminal confirms successful verification, it can return a success result to the first terminal, allowing the first terminal to determine that it can use the first private key to encrypt information when sending it to the second terminal. Correspondingly, the second terminal can also use the second private key to decrypt the ciphertext information encrypted by the first terminal.
[0164] In some embodiments, the first terminal may send a query instruction for the raw data processing result to the cloud server, and the cloud server will send the query instruction to the second terminal.
[0165] The second terminal determines the processing result corresponding to the original data according to the query command; and encrypts the processing result based on the second private key and encryption algorithm to obtain the second ciphertext information.
[0166] The second terminal sends the second encrypted information to the cloud server, and the cloud server sends the second encrypted information to the first terminal;
[0167] The first terminal decrypts the second ciphertext information based on the first private key and the decryption algorithm to obtain the processing result.
[0168] In some embodiments, the first terminal encrypts the query instruction based on the first private key and the encryption algorithm to obtain third ciphertext information, and the cloud server forwards the third ciphertext information to the second terminal.
[0169] The second terminal decrypts the third ciphertext information based on the second private key and the decryption algorithm to obtain the query command.
[0170] As can be seen, query commands can also be transmitted in encrypted form. This makes the transmission process between the first terminal and the second terminal more secure, making it difficult for the interceptor to obtain the original data sent from the first terminal to the second terminal for processing.
[0171] To facilitate understanding of the ideas in this disclosure, it can be further combined with... Figures 5-12 This disclosure describes the technical concept used in the data transmission process.
[0172] Depend on Figure 5 A schematic diagram of a possible quantum processing system provided in this disclosure, such as Figure 5It is evident that a quantum processing system can include a local user terminal (the first terminal, which can also be understood as a quantum computer), a quantum cloud (which can be understood as a cloud server), a quantum computing operating system (the operating system of the quantum computer), and the measurement, control, and hardware systems of the quantum computer.
[0173] Depend on Figure 5 It is evident that the transmission lines between the local user terminal and the quantum cloud, as well as between the quantum cloud and the quantum computing operating system, can be understood as public networks, while the transmission lines between the quantum computing operating system and the quantum computer's measurement, control, and hardware systems can be understood as internal networks. Public network transmissions may face the risk of interception, while internal network transmissions, due to their transmission process within the quantum computer, typically do not face the risk of interception.
[0174] In other words, the scenario disclosed herein is to encrypt the transmitted data during the transmission of data from a quantum processing system over the public internet.
[0175] In related technologies, the common method for public network communication is HTTP + OpenSSL (using the OpenSSL library to implement secure communication based on HTTP (Hypertext Transfer Protocol)). However, this method is weak against attacks from quantum computers, and if the data is intercepted during transmission, it faces the risk of data leakage. In other words, the data transmission process in quantum processing systems is not very secure in related technologies.
[0176] This disclosure allows for the initialization of the connection between the first terminal and the second terminal before sending encrypted data (e.g., data related to task processing or task queries) to a local user terminal (first terminal) via a quantum computing operating system (or, as understood as the second terminal). The specific process may include: sending an instruction to a cloud server to invoke the public key; the cloud server then sending a public key generation instruction to the second terminal; the second terminal generating a key pair including the public key and an initial private key; and sending the public key to the first terminal; the first terminal generating a first private key and verification information based on the public key, a random number, and a hybrid algorithm; sending the verification information to the second terminal; and the second terminal performing verification based on the verification information and returning the verification result.
[0177] The second terminal can also generate a second private key based on the initial private key, verification information, and random number during verification. This indicates that the verification was successful. In other words, when the verification is successful, the second terminal has already obtained the second private key.
[0178] In other words, before sending data that requires encryption, this disclosure first initializes the encryption process. The specific process has been described in detail in the above embodiments. To better understand the initialization process, one can also refer to...Figure 6 and Figure 7 To gain a further understanding, Figure 6 This can be understood as a diagram illustrating the process of the first terminal requesting a public key from the second terminal. Figure 7 This can be understood as a schematic diagram of the verification process performed by the second terminal. Once the second terminal passes the verification, it can be determined that the first terminal can encrypt the data using the first private key, and the second terminal can decrypt the encrypted information using the second private key.
[0179] After initialization is complete, the process can continue. Figures 8-9 To understand the data transmission concept of this disclosure, Figure 8 This can be understood as a diagram illustrating the generation of the first encrypted information by the first terminal. Figure 9 This can be understood as a schematic diagram of the second terminal obtaining the raw data. Figure 8 As can be seen, the first terminal can use the SM4 encryption algorithm to encrypt the plaintext (original data) of the computational data to obtain the ciphertext (first ciphertext information), from which... Figure 8 It is evident that the plaintext of the computed data (original data) and the ciphertext of the computed data (first ciphertext information) are completely different. Accordingly, Figure 9 This can be understood as the second terminal using the SM4 decryption algorithm to decrypt the ciphertext of the computational data (the first ciphertext information) to obtain the plaintext of the computational data (the original data).
[0180] We can continue to combine Figures 10-11 To understand the ideas in this disclosure, Figure 10 This can be understood as a schematic diagram of the process by which a second terminal generates second encrypted information. Figure 11 This can be understood as a schematic diagram of the process of the first terminal decrypting the second ciphertext information; by Figure 10 As can be seen, after the second terminal encrypts the plaintext of the calculation result (processing result), the ciphertext of the calculation result (second ciphertext information) can be obtained. Figure 11 As can be seen, the first terminal can decrypt the ciphertext of the calculation result (second ciphertext information) to obtain the plaintext of the calculation result (processing result).
[0181] Combination Figures 5-11 As can be seen, this disclosure first initializes the data before encrypting it. During the entire encryption process, the original data is not transmitted over the public network, which makes the data transmission process more secure.
[0182] To better understand the ideas in this disclosure, one can combine them with... Figure 12 To explain, Figure 12 This can be understood as a schematic diagram of the data transmission process between the first and second terminals in a quantum processing system under the present invention. Figure 12As can be seen, before sending data that needs to be encrypted, the first terminal and the second terminal will initialize each other (the first terminal and the second terminal will perform encryption and decryption calibration). After that, during the data exchange process, the first private key and the second private key can be used to encrypt the original data. In this way, the original data has not been transmitted over the public network, thereby improving the security of data transmission.
[0183] See Figure 13 , Figure 13 This is a schematic diagram of a data transmission device according to an embodiment of the present invention. The data transmission device 1300 is applied to a first terminal and includes:
[0184] The generation unit 1301 is used to generate a first private key and verification information based on public key information and a predefined generation algorithm, respectively.
[0185] The sending unit 1302 is used to send the above-mentioned verification information to the second terminal, so that the second terminal can perform encryption and decryption verification between the first terminal and the second terminal based on the above-mentioned verification information;
[0186] The encryption unit 1303 is used to encrypt the original data based on the first private key and the encryption algorithm when it receives the verification success result returned by the second terminal, and to send the encrypted first ciphertext information to the second terminal.
[0187] Optionally, before generating the first private key and verification information based on the public key information and the predefined generation algorithm, the aforementioned data transmission device 1300 is further used for:
[0188] Send the above-mentioned public key information acquisition instruction to the above-mentioned second terminal, so that the above-mentioned second terminal generates the above-mentioned public key information based on the instructions of the above-mentioned acquisition instruction;
[0189] Receive the public key information returned by the second terminal.
[0190] Optionally, the data transmission device 1300 is further configured to: in response to detecting the second ciphertext information sent by the second terminal, decrypt the second ciphertext information based on the first private key and the decryption algorithm corresponding to the encryption algorithm, and obtain the processing result corresponding to the original data;
[0191] The second encrypted information is generated by the second terminal encrypting the processing result based on the second private key and the encryption algorithm. The second private key is generated by the second terminal based on the initial private key generated when generating the public key information, the verification information, and the predefined generation algorithm.
[0192] Optionally, the first terminal communicates with the second terminal via a cloud server.
[0193] Optionally, the above encryption algorithm includes: SM4 encryption algorithm.
[0194] Optionally, the above raw data includes at least one of the following:
[0195] Data to be calculated, used to instruct the second terminal to perform task calculations, and query data, used to instruct the second terminal to query the task calculation results.
[0196] See Figure 14 , Figure 14 This is a schematic diagram of a data transmission device provided in an embodiment of the present invention. The data transmission device 1400 is applied to a second terminal and includes:
[0197] The receiving unit 1401 is used to receive verification information sent by the first terminal, wherein the verification information is generated by the first terminal based on public key information and a predefined generation algorithm.
[0198] The verification unit 1402 is used to perform encryption and decryption verification on the first terminal and the second terminal based on the above verification information, and when the encryption and decryption verification between the first terminal and the second terminal is successful, return a verification success result to the first terminal, and generate a second private key.
[0199] The decryption unit 1403 is used to receive the first ciphertext information sent by the first terminal, and to decrypt the first ciphertext information based on the second private key and the decryption algorithm to obtain the original data.
[0200] Optionally, before receiving the verification information sent by the first terminal, the data transmission device 1400 is further configured to: in response to receiving the public key information acquisition instruction sent by the first terminal, generate the public key information and the initial private key based on the instruction.
[0201] Send the aforementioned public key information to the aforementioned first terminal;
[0202] Furthermore, after receiving the verification information sent by the first terminal, the method further includes:
[0203] Based on the aforementioned initial private key and the aforementioned verification information, encryption and decryption verification is performed between the aforementioned first terminal and the aforementioned second terminal.
[0204] Optionally, the data transmission device 1400 is further configured to generate the second private key based on the initial private key, the verification information, and the predefined generation algorithm.
[0205] Optionally, after receiving the first encrypted information sent by the first terminal and decrypting the first encrypted information based on the second private key and decryption algorithm to obtain the original data, the data transmission device 1400 is further configured to: in response to detecting a query instruction sent by the first terminal for the processing result of the original data, determine the processing result corresponding to the original data.
[0206] The processing result is encrypted using the second private key and encryption algorithm, and the encrypted second ciphertext information is sent to the first terminal.
[0207] Another embodiment of the present invention provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the method embodiments above when it is run.
[0208] Specifically, in this embodiment, the storage medium can be configured to store a computer program for performing the following steps:
[0209] Generate the first private key and verification information based on the public key information and a predefined generation algorithm, respectively;
[0210] The above verification information is sent to the second terminal so that the second terminal can perform encryption and decryption verification between the first terminal and the second terminal based on the above verification information;
[0211] Upon receiving the successful verification result from the second terminal, the original data is encrypted using the first private key and encryption algorithm, and the encrypted first ciphertext information is sent to the second terminal. Alternatively,
[0212] Receive verification information sent by the first terminal, wherein the verification information is generated by the first terminal based on public key information and a predefined generation algorithm;
[0213] Based on the above verification information, the encryption and decryption verification of the first terminal and the second terminal is performed, and when the encryption and decryption verification of the first terminal and the second terminal is successful, a verification success result is returned to the first terminal, and a second private key is generated.
[0214] The system receives the first encrypted information sent by the first terminal and decrypts the first encrypted information based on the second private key and decryption algorithm to obtain the original data.
[0215] Specifically, in this embodiment, the storage medium may include, but is not limited to, USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks, and other media capable of storing computer programs.
[0216] Another embodiment of the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the method embodiments above.
[0217] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.
[0218] Specifically, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0219] Generate the first private key and verification information based on the public key information and a predefined generation algorithm, respectively;
[0220] The above verification information is sent to the second terminal so that the second terminal can perform encryption and decryption verification between the first terminal and the second terminal based on the above verification information;
[0221] Upon receiving the successful verification result from the second terminal, the original data is encrypted using the first private key and encryption algorithm, and the encrypted first ciphertext information is sent to the second terminal. Alternatively,
[0222] Receive verification information sent by the first terminal, wherein the verification information is generated by the first terminal based on public key information and a predefined generation algorithm;
[0223] Based on the above verification information, the encryption and decryption verification of the first terminal and the second terminal is performed, and when the encryption and decryption verification of the first terminal and the second terminal is successful, a verification success result is returned to the first terminal, and a second private key is generated.
[0224] The system receives the first encrypted information sent by the first terminal and decrypts the first encrypted information based on the second private key and decryption algorithm to obtain the original data.
[0225] The above description of the structure, features and effects of the present invention is based on the embodiments shown in the figures. The above description is only a preferred embodiment of the present invention. However, the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, shall be within the protection scope of the present invention as long as they do not exceed the spirit covered by the specification and figures.
Claims
1. A data transmission method, characterized in that, Applied to a first terminal, the method includes: Generate the first private key and verification information based on the public key information and a predefined generation algorithm, respectively; The verification information is sent to the second terminal so that the second terminal can perform encryption and decryption verification between the first terminal and the second terminal based on the verification information; Upon receiving a successful verification result from the second terminal, the original data is encrypted based on the first private key and the encryption algorithm, and the encrypted first ciphertext information is sent to the second terminal.
2. The method according to claim 1, characterized in that, Before generating the first private key and verification information based on the public key information and a predefined generation algorithm, the method further includes: Send a command to obtain the public key information to the second terminal, so that the second terminal generates the public key information based on the instructions of the command; Receive the public key information returned by the second terminal.
3. The method according to claim 1, characterized in that, The method further includes: In response to detecting the second ciphertext information sent by the second terminal, the second ciphertext information is decrypted based on the first private key and the decryption algorithm corresponding to the encryption algorithm to obtain the processing result corresponding to the original data; The second ciphertext information is generated by the second terminal encrypting the processing result based on the second private key and the encryption algorithm. The second private key is generated by the second terminal based on the initial private key generated when generating the public key information, the verification information, and the predefined generation algorithm.
4. The method according to claim 1, characterized in that, The first terminal communicates with the second terminal through a cloud server.
5. The method according to claim 1, characterized in that, The encryption algorithm includes: SM4 encryption algorithm.
6. The method according to claim 1, characterized in that, The raw data includes at least one of the following: Data to be calculated, used to instruct the second terminal to perform task calculations; and query data, used to instruct the second terminal to query the task calculation results.
7. A data transmission method, characterized in that, Applied to a second terminal, the method includes: Receive verification information sent by the first terminal, wherein the verification information is generated by the first terminal based on public key information and a predefined generation algorithm; Based on the verification information, the first terminal and the second terminal are encrypted and decrypted, and when the encryption and decryption verification between the first terminal and the second terminal is successful, a verification success result is returned to the first terminal, and a second private key is generated. The system receives first encrypted information sent by the first terminal and decrypts the first encrypted information based on the second private key and decryption algorithm to obtain the original data.
8. The method according to claim 7, characterized in that, Before receiving the verification information sent by the first terminal, the method further includes: In response to receiving a public key information acquisition instruction sent by the first terminal, the public key information and an initial private key are generated based on the instructions of the acquisition instruction; Send the public key information to the first terminal; And, after receiving the verification information sent by the first terminal, the method further includes: Based on the initial private key and the verification information, encryption and decryption verification is performed between the first terminal and the second terminal.
9. The method according to claim 8, characterized in that, The generation of the second private key includes: The second private key is generated based on the initial private key, the verification information, and the predefined generation algorithm.
10. The method according to claim 7, characterized in that, After receiving the first encrypted information sent by the first terminal, and decrypting the first encrypted information based on the second private key and decryption algorithm to obtain the original data, the method further includes: In response to detecting a query command sent by the first terminal for the processing result of the original data, the processing result corresponding to the original data is determined; The processing result is encrypted based on the second private key and the encryption algorithm, and the encrypted second ciphertext information is sent to the first terminal.
11. A quantum computer system, characterized in that, The quantum computer system includes a first terminal, a cloud server, and a second terminal, wherein the first terminal and the second terminal communicate with each other through the cloud server. The first terminal generates a first private key and verification information based on public key information and a predefined generation algorithm, and forwards the verification information to the second terminal through the cloud server; The second terminal performs encryption and decryption verification between the first terminal and the second terminal based on the verification information. When the verification is successful, it generates a second private key and sends the verification success result to the first terminal through the cloud server. When the first terminal receives the verification success result, it encrypts the original data based on the first private key and the encryption algorithm, and forwards the encrypted first ciphertext information to the second terminal through the cloud server. The second terminal decrypts the first ciphertext information based on the second private key and the decryption algorithm to obtain the original data.
12. A data transmission device, characterized in that, Applied to a first terminal, the device includes: The generation unit is used to generate the first private key and verification information based on the public key information and a predefined generation algorithm, respectively. A sending unit is configured to send the verification information to a second terminal, so that the second terminal performs encryption and decryption verification between the first terminal and the second terminal based on the verification information; The encryption unit is used to encrypt the original data based on the first private key and the encryption algorithm when it receives the verification success result returned by the second terminal, and to send the encrypted first ciphertext information to the second terminal.
13. A data transmission device, characterized in that, Applied to a second terminal, the device includes: The receiving unit is configured to receive verification information sent by the first terminal, wherein the verification information is generated by the first terminal based on public key information and a predefined generation algorithm; The verification unit is configured to perform encryption and decryption verification on the first terminal and the second terminal based on the verification information, and, when the encryption and decryption verification between the first terminal and the second terminal is successful, return a verification success result to the first terminal, and generate a second private key. The decryption unit is used to receive the first ciphertext information sent by the first terminal, and to decrypt the first ciphertext information based on the second private key and the decryption algorithm to obtain the original data.
14. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 10 when it is run.
15. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 10.