Secure communication method, device and system, electronic equipment and storage medium
By generating a derived private key based on a quantum-protected key and a temporary private key and then modifying the shared key, the risk of quantum computing cracking is solved, communication security and resistance to quantum attacks are improved, and forward confidentiality and compatibility with engineering implementation are achieved.
Patent Information
- Application Number
- CN202511199538.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-12-16
AI Technical Summary
Existing key exchange protocols that rely on discrete logarithm problems are at risk of being cracked when facing quantum computing. How can we improve communication security?
By generating a derived private key based on a quantum-protected key and a temporary private key, generating a public key using a preset key exchange algorithm, and then modifying the derived shared key using the quantum-protected key to generate the target shared key, security is improved by ensuring that even if the discrete logarithm problem is cracked, the temporary private key cannot be known.
It enhances communication security and resistance to quantum attacks, balances forward confidentiality and engineering feasibility, and ensures that the security of the target shared key depends on the confidentiality of the temporary key and the quantum protection key.
Smart Images

Figure CN121150902A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication security, and in particular to a secure communication method, device, system, electronic device and storage medium. BACKGROUND
[0002] In a communication protocol such as Transport Layer Security (TLS) and Internet Protocol Security (IPSec), a Diffie-Hellman Ephemeral (DHE) protocol is supported for key agreement. DHE is a variant of the Diffie-Hellman (DH) protocol, and the underlying algorithm is consistent with DH. Compared with the static private key of the DH protocol, DHE uses a temporary private key to ensure the forward security of the session. A symmetric key is negotiated using a temporary private key for each session, so even if the key of a session is cracked, it will not affect previous historical sessions. The security of the DHE / DH protocol depends on the discrete logarithm problem, that is, it is difficult to calculate the private key from the public key. Once the discrete logarithm problem is cracked, the private key can be calculated from the public key, and the shared key generated by the DHE protocol can be calculated.
[0003] When dealing with the discrete logarithm problem, quantum computing is much faster than traditional computers. There is a Shor algorithm in quantum computing that is specifically designed for the discrete logarithm problem, which can reduce the complexity of solving the discrete logarithm problem from the exponential level of traditional computers to the polynomial level. Large-scale discrete logarithm problems that are almost impossible for traditional computers to solve within a reasonable time may be solved by quantum computers within a reasonable time. With the development and application of quantum computing technology, the DHE protocol based on the discrete logarithm problem faces the risk of being cracked by quantum computers.
[0004] Therefore, how to make the key exchange protocol relying on the discrete logarithm problem be able to cope with the threat of quantum computing cracking and improve the security of communication has become a technical problem to be solved in the industry. SUMMARY
[0005] The present application provides a secure communication method, device, system, electronic device and storage medium, which are used to solve the technical problem of how to make the key exchange protocol relying on the discrete logarithm problem be able to cope with the threat of quantum computing cracking and improve the security of communication.
[0006] The present application provides a secure communication method applied to a first device, comprising: A first derived private key is generated based on the quantum protection key and the first temporary private key, and a first public key is generated by performing operations on the first derived private key based on a preset key exchange algorithm. Send the first public key to the second device, and receive the second public key sent by the second device; the second public key is generated by the second device based on the quantum protection key and the preset key exchange algorithm. The second public key is processed based on the preset key exchange algorithm to generate a first derived shared key; The first derived shared key is modified based on the quantum protection key and the first temporary private key to obtain the target shared key, and then the second device is communicated based on the target shared key.
[0007] In some embodiments, before generating the first derived private key based on the quantum protection key and the first temporary private key, the method further includes: Send first key negotiation information to the second device; the first key negotiation information is used to instruct the first device to support the application of quantum protection keys in the preset key exchange algorithm; The device receives second key negotiation information sent by the second device; the second key negotiation information is generated by the second device after confirming the first key negotiation information; the second key negotiation information is used to instruct the second device to support the application of quantum protection keys in the preset key exchange algorithm.
[0008] In some embodiments, sending the first public key to the second device includes: Send the key identifiers of the first public key and the quantum protection key to the second device; The first device and the second device are connected to a quantum key distribution network; the second device obtains the quantum protection key from the quantum key distribution network based on the key identifier.
[0009] In some embodiments, generating the first derived private key based on the quantum protection key and the first temporary private key includes: Generate the first temporary private key; The deviation between the quantum protection key and the first temporary private key is determined as the first derived private key.
[0010] In some embodiments, the step of modifying the first derived shared key based on the quantum protection key and the first temporary private key to obtain the target shared key includes: Using the generator in the preset key exchange algorithm as the base and the product of the quantum protection key and the first temporary private key as the power, a correction coefficient is generated based on the base and the power. The target shared key is obtained by multiplying the correction coefficient and the first derived shared key based on the preset key exchange algorithm.
[0011] In some embodiments, the preset key exchange algorithm is the Diffie-Hellman temporary key exchange algorithm.
[0012] This application provides a secure communication device, comprising: The generation module is used to generate a first derived private key based on the quantum protection key and the first temporary private key, and to perform operations on the first derived private key based on a preset key exchange algorithm to generate a first public key; The transceiver module is used to send the first public key to the second device and receive the second public key sent by the second device; the second public key is generated by the second device based on the quantum protection key and the preset key exchange algorithm; The computation module is used to perform operations on the second public key based on the preset key exchange algorithm to generate a first derived shared key; The correction module is used to correct the first derived shared key based on the quantum protection key and the first temporary private key to obtain a target shared key, and to communicate with the second device based on the target shared key.
[0013] This application provides a secure communication system, including at least two communication devices and a quantum key distribution network; All communication devices are connected to the quantum key distribution network; The communication device is equipped with the aforementioned secure communication apparatus for secure communication based on the quantum protection key sent by the quantum key distribution network.
[0014] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the secure communication method described above.
[0015] This application provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned secure communication method.
[0016] The secure communication method, apparatus, system, electronic device, and storage medium provided in this application generate a first derived private key based on a quantum protection key and a first temporary private key, and perform calculations on the first derived private key based on a preset key exchange algorithm to generate a first public key; send the first public key to a second device, and receive a second public key sent by the second device; perform calculations on the second public key based on the preset key exchange algorithm to generate a first derived shared key; modify the first derived shared key based on the quantum protection key and the first temporary private key to obtain a target shared key, and communicate with the second device based on the target shared key; since the final calculated target shared key has been modified to eliminate the influence of the quantum protection key, it is still the original key generated by the preset key exchange algorithm. Even if the discrete logarithm problem is cracked, the attacker can only obtain the derived private key during the public key exchange process, and cannot know the temporary private key generated by the device itself, and therefore cannot know the final generated target shared key, thus improving the security of communication. Furthermore, by enhancing the preset key exchange algorithm with a quantum protection key, the security of the final generated target shared key depends on both the confidentiality of the temporary key and the confidentiality of the quantum protection key, thereby improving the communication's resistance to quantum attacks and balancing security, forward confidentiality, and feasibility of engineering implementation. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the secure communication method provided in this application.
[0020] Figure 2 This is a schematic diagram of the secure communication method provided in this application.
[0021] Figure 3 This is a schematic diagram of the secure communication device provided in this application.
[0022] Figure 4 This is a schematic diagram of the secure communication system provided in this application.
[0023] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps, units, or modules is not necessarily limited to those explicitly listed, but may include other steps, units, or modules not explicitly listed or inherent to such processes, methods, products, or devices.
[0026] The DHE protocol's enhancement of the DH protocol in the key negotiation process lies in forward security, ensuring that even if the key of the current session is cracked, the encrypted data of previous sessions cannot be decrypted. However, it does not solve the problem that computing power can crack the discrete logarithm problem upon which key negotiation is based, thereby obtaining the shared key calculated by both communicating parties. If the discrete logarithm problem can be cracked in an extremely short time, a quantum attack can decrypt the session in real time.
[0027] In order to address the shortcomings of related technologies, Figure 1 This is one of the flowcharts illustrating the secure communication method provided in this application, such as... Figure 1 As shown, the method includes steps 110, 120, 130 and 140.
[0028] Step 110: Generate a first derived private key based on the quantum protection key and the first temporary private key, and perform operations on the first derived private key based on a preset key exchange algorithm to generate a first public key.
[0029] Specifically, the secure communication method provided in this application is applicable to scenarios where multiple devices communicate securely, and the executing entity is a secure communication device. This device can be implemented in software, such as a secure communication program running in a communication device; or it can be implemented in hardware, such as a mobile terminal, computer, server, or cloud platform that executes the secure communication method.
[0030] The first device and the second device can be any electronic device capable of network communication and cryptographic operations. For example, they can be smartphones, laptops, desktop computers, servers, IoT devices, in-vehicle infotainment systems, terminals or controllers in industrial control systems, etc. It should be noted that the first device and the second device are relative; the difference lies in that the first device is the initiator of the communication, and the second device is the peer device communicating with the first device. The secure communication method provided in this application embodiment will be described below using the first device as an example.
[0031] A quantum-protected key refers to a key that is resistant to quantum computing attacks. Here, quantum protection means that the confidentiality of the key is not threatened by currently known quantum computing algorithms (such as Shor's algorithm). This quantum-protected key can be pre-negotiated and stored by the first and second devices through various secure methods. For example, it can be generated through negotiation using a post-quantum cryptography algorithm; distributed through a quantum key distribution (QKD) network; or securely configured through physical means (such as manual deployment). In this embodiment, the quantum-protected key can be a symmetric key, the length of which can be set according to security level requirements, such as 128 bits, 256 bits, or higher. Importantly, the first and second devices possess the same quantum-protected key, which forms the foundation of trust between them.
[0032] The first temporary private key is a temporary or transient private key. It is dynamically generated by the first device each time a communication session is initiated or responded to. Its temporality is key to achieving forward secrecy; even if the long-term key (such as a quantum-protected key) is leaked at some point in the future, the encrypted data of past communication sessions cannot be decrypted. This first temporary private key can be generated by a random number generator inside the first device; it is essentially a sequence of random bits with sufficient entropy.
[0033] After obtaining the quantum protection key and the first temporary private key, the first device combines the two to generate a first derived private key. This generation can employ various cryptographically secure fusion methods. In one specific embodiment, the deviation between the quantum protection key and the first temporary private key can be used as the first derived private key.
[0034] The first device uses a preset key exchange algorithm to process the generated first derived private key to generate the first public key. The preset key exchange algorithm typically refers to a classic, efficient, and widely used asymmetric key exchange algorithm in the current computing environment, such as DH, DHE, or its variant, Elliptic Curve Diffie-Hellman (ECDH). The first public key can be securely transmitted publicly.
[0035] It should be noted here that the preset key exchange algorithm can be a key calculation method belonging to the key exchange protocol. For example, the DHE algorithm is a mathematical formula (discrete logarithm temporary key calculation), while the DHE protocol is a practical communication specification obtained by embedding this algorithm into the complete handshake process, adding authentication, message format, and state machine.
[0036] Step 120: Send the first public key to the second device and receive the second public key sent by the second device; the second public key is generated by the second device based on the quantum protection key and the preset key exchange algorithm.
[0037] Specifically, after generating the first public key, the first device sends it to the second device via a communication network. Simultaneously or subsequently, the first device receives the second public key sent by the second device.
[0038] In this embodiment, the second public key is generated by the second device using a process that is completely symmetrical with that of the first device. Specifically, the second device also possesses the same quantum protection key and independently generates its own second temporary private key. Then, the second device similarly generates a second derived private key based on the quantum protection key and its second temporary private key, and performs operations on the second derived private key using the same preset key exchange algorithm to obtain the second public key. This symmetrical process ensures equality between the two parties during the key negotiation process.
[0039] Step 130: Perform operations on the second public key based on the preset key exchange algorithm to generate the first derived shared key.
[0040] Specifically, after receiving the second public key, the first device continues to execute the subsequent steps of the preset key exchange algorithm. The first device uses the first derived private key generated in the aforementioned steps to perform a multiplication operation with the received second public key, thereby generating a shared key, referred to in this embodiment as the first derived shared key.
[0041] According to the principle of key exchange algorithm, after receiving the first public key, the second device will also perform the same operation and obtain a second derived shared key that is completely corresponding to the first derived shared key calculated by the first device.
[0042] Step 140: Modify the first derived shared key based on the quantum protection key and the first temporary private key to obtain the target shared key, and communicate with the second device based on the target shared key.
[0043] Specifically, the first derived shared key is generated based on the second public key, which in turn is generated based on the second derived private key, which is generated based on the quantum protection key and the second temporary private key. The first derived shared key is necessarily influenced by the quantum protection key.
[0044] According to the preset key exchange algorithm, the first derived shared key can be modified using a quantum protection key and a first temporary private key to eliminate the influence of the quantum protection key on the operation result of the first derived shared key, thereby obtaining the final target shared key.
[0045] The same symmetrical operation method is adopted for the second device, and the same target shared key as the first device can be obtained in the end.
[0046] After generating the final target shared key, both the first and second devices possess a session key that combines forward secrecy (derived from the temporary private key) with resistance to quantum attacks (derived from the quantum protection key). Subsequently, both parties can use this target shared key to encrypt and decrypt all business data transmitted between them using one or more symmetric encryption algorithms, thereby achieving secure communication.
[0047] The secure communication method provided in this application generates a first derived private key based on a quantum protection key and a first temporary private key, and performs calculations on the first derived private key based on a preset key exchange algorithm to generate a first public key; sends the first public key to a second device, and receives a second public key sent by the second device; performs calculations on the second public key based on the preset key exchange algorithm to generate a first derived shared key; modifies the first derived shared key based on the quantum protection key and the first temporary private key to obtain a target shared key, and communicates with the second device based on the target shared key. Since the final calculated target shared key has been modified, eliminating the influence of the quantum protection key, it remains the original key generated by the preset key exchange algorithm. Even if the discrete logarithm problem is cracked, the attacker can only obtain the derived private key during the public key exchange process, and cannot know the temporary private key generated by the device itself, thus unable to know the final generated target shared key, improving communication security. Furthermore, by enhancing the preset key exchange algorithm with a quantum protection key, the security of the final generated target shared key depends simultaneously on the confidentiality of the temporary key and the confidentiality of the quantum protection key, improving the communication's resistance to quantum attacks and balancing security, forward secrecy, and engineering feasibility.
[0048] It should be noted that each implementation method of this application can be freely combined, rearranged, or executed individually, and does not need to rely on or depend on a fixed execution order.
[0049] In some embodiments, before generating the first derived private key based on the quantum protection key and the first temporary private key, the method further includes: Send first key negotiation information to the second device; the first key negotiation information is used to instruct the first device to support the application of quantum protection keys in a preset key exchange algorithm; The device receives second key negotiation information sent by the second device; the second key negotiation information is generated by the second device after confirming the first key negotiation information; the second key negotiation information is used to instruct the second device to support the application of quantum protection keys in the preset key exchange algorithm.
[0050] Specifically, before the first device generates the first derived private key based on the quantum protection key and the first temporary private key, the method also includes a negotiation process to ensure that both communicating parties agree to and support the adoption of the enhanced security mechanism proposed in this application.
[0051] As the initiator of communication or at the initial stage of protocol interaction, the first device first sends first key negotiation information to the second device. This first key negotiation information can be a signaling message or a protocol field, indicating that the first device supports the application of a quantum-protected key in a preset key exchange algorithm. For example, in a communication scenario based on the Transport Layer Security (TLS) protocol, this information can be represented as a specific cipher suite identifier or an extended field. By sending this information, the first device proactively proposes the use of an enhanced security mode.
[0052] The second key negotiation information is a confirmation message generated and sent by the second device after receiving and correctly parsing the first key negotiation information and confirming that it also supports the enhanced security mechanism. It indicates that the second device supports the application of quantum protection keys in the preset key exchange algorithm.
[0053] Only after the first device successfully receives this second key negotiation information indicating agreement and support will it proceed to the subsequent key generation steps. If the second device does not support this mechanism, it may choose a conventional cipher suite supported by both parties, or it may directly refuse the connection. The first device will not proceed to the subsequent specific steps of this application without receiving affirmative second key negotiation information.
[0054] The secure communication method provided in this application determines the application of a quantum-protected key in a preset key exchange algorithm by sending key negotiation information. This not only avoids communication failures caused by one end not supporting the key, but also effectively resists degradation attacks through explicit negotiation and confirmation. Attackers cannot force both parties to downgrade to a weaker, conventional security protocol without quantum protection by tampering with the negotiation message without the knowledge of both parties, thereby enhancing the robustness and security of the entire communication establishment process.
[0055] In some embodiments, sending the first public key to the second device includes: Send the key identifiers of the first public key and the quantum protection key to the second device; The first and second devices are connected to a quantum key distribution network; the second device obtains the quantum protection key from the quantum key distribution network based on the key identifier.
[0056] Specifically, the first device and the second device can jointly access a quantum key distribution network. A quantum key distribution network is a communication infrastructure built upon quantum physics principles (such as the no-cloning property of quantum states and quantum entanglement). Its core function is to generate and distribute quantum protection keys to legitimate users within the network (such as the first and second devices here). Keys distributed through a quantum key distribution network are not dependent on computational complexity and are naturally resistant to eavesdropping attacks, including those from quantum computers.
[0057] The first and second devices can pre-generate and store one or more quantum protection keys through a quantum key distribution network. To manage these keys efficiently and securely, the quantum key distribution network assigns a unique key identifier to each generated quantum protection key. The key identifier does not contain any secret information about the key; it is merely a reference or pointer, such as a universally unique identifier, a sequence number, or a hash value.
[0058] When the first device performs a key exchange, in constructing the message to be sent to the second device, in addition to the first public key, it will also include a key identifier for the quantum protection key selected for this session.
[0059] After receiving the information from the first device, the second device parses out the first public key and key identifier. It then uses the received key identifier as an index to search within the quantum key distribution network. Since the key has already been synchronized through the quantum key distribution network, the second device can accurately locate and load the exact same quantum protection key selected by the first device based on the key identifier. Subsequently, the second device can use the acquired quantum protection key to continue performing subsequent key generation and modification steps.
[0060] The secure communication method provided in this application offers a dynamic and scalable quantum-protected key management scheme by introducing a quantum key distribution network and a key identifier. First, it clarifies that the source of the quantum-protected key is the quantum key distribution network, fundamentally guaranteeing the key's resistance to quantum attacks. Second, by transmitting a lightweight key identifier instead of the key itself during communication, security is greatly enhanced, avoiding the risk of long-term key exposure in classical channels, while also improving communication efficiency.
[0061] In some embodiments, generating a first derived private key based on a quantum-protected key and a first temporary private key includes: Generate the first temporary private key; The deviation between the quantum protection key and the first temporary private key is determined as the first derived private key.
[0062] Specifically, the first temporary private key can be a random key dynamically generated by the first device for this communication session. For example, the first device may call its internal cryptographically secure pseudo-random number generator to generate a bit sequence with sufficient length and entropy as the first temporary private key. The one-time use characteristic of this key is the basis for ensuring forward confidentiality.
[0063] The first device then calculates the deviation between the quantum protection key and the first temporary private key, determining it as the first derived private key. This deviation can be obtained by subtracting the quantum protection key from the first temporary private key, i.e.: First derived private key = First temporary private key - Quantum protection key. Generating the first derived private key by determining the deviation essentially involves using a temporary, secure random number (the first temporary private key) to "perturb" or "mask" the long-term, more secure root key (the quantum protection key), thereby deriving a derived private key used only for this session. This derived private key contains both the security root of the quantum protection key and the temporality of the first temporary private key.
[0064] In one specific implementation, the deviation can also be obtained through addition between the two keys.
[0065] The secure communication method provided in this application, which generates a derived private key by determining the deviation, has significant computational efficiency advantages. The computational overhead of operations such as subtraction is far lower than that of complex cryptographic hash operations, which is particularly important for devices with limited computing power. At the same time, the method has simpler implementation logic, helping to reduce code complexity and potential implementation errors.
[0066] In some embodiments, the target shared key is obtained by modifying the first derived shared key based on the quantum protection key and the first temporary private key, including: Using the generator in the preset key exchange algorithm as the base and the product of the quantum protection key and the first temporary private key as the power, a correction coefficient is generated based on the base and the power. The target shared key is obtained by multiplying the correction coefficient and the first derived shared key using a preset key exchange algorithm.
[0067] Specifically, a generator refers to a common parameter upon which the predefined key exchange algorithm relies. In the case of the DHE protocol algorithm, the generator (usually denoted as g) is a special element in the "modulo p multiplication group," where p is a large prime number. This group contains all integers from 1 to p-1. g is called a "generator" because by calculating different powers of g (g... 1 ,g 2 ,g 3 Taking the modulo of p again can generate a very large subset of the group, or even all the elements.
[0068] The generator can be used as the base, and the product of the quantum protection key and the first temporary private key can be raised to the power. The result of the power operation can be used as the correction coefficient.
[0069] The correction coefficient is multiplied by the first derived shared key to obtain the product. The final target shared key is then obtained by applying the product to a preset key exchange algorithm.
[0070] The secure communication method provided in this application inherently injects the security of the quantum protection key and the temporary key into the group theory structure of the key exchange algorithm. The target shared key is obtained by modifying the first derived shared key with the quantum protection key and the first temporary private key, thereby eliminating the influence of the quantum protection key on the operation result generated by the first derived shared key.
[0071] In some embodiments, the preset key exchange algorithm is the Diffie-Hellman temporary key exchange algorithm.
[0072] Specifically, taking the Diffie-Hellman Temporal (DHE) key exchange algorithm as an example, Figure 2 This is a schematic diagram of the secure communication method provided in this application, such as... Figure 2 As shown, this application provides a communication method for enhancing the DHE algorithm based on a quantum key distribution (QKD) network.
[0073] In this embodiment, the first device is taken as the client and the second device as the server. The client and server communicate via the TLS 1.2 protocol, and a quantum-protected key is used to enhance the DHE algorithm during the communication process. The improved DHE algorithm key negotiation process includes: Step 1: The client sends a ClientHello message. In the ClientHello message's list of supported cipher suites, an identifier is added to the supported key exchange protocol section. This identifier indicates that the client supports "QKD-enhanced DHE key exchange protocol".
[0074] Step 2: When the server receives the ClientHello message, if the server also supports the "QKD-enhanced DHE key exchange protocol", the server sends a ServerHello message. In the key exchange protocol section of the cipher suite in the ServerHello message, the server selects the identifier of "QKD-enhanced DHE key exchange protocol".
[0075] Step 3: The server sends the Certificate.
[0076] Step 4: The server generates its own DHE private key and selects a quantum protection key through the QKD network. Using a private key derivation algorithm, a derived private key is generated. Then, using the original DHE algorithm, a public key is generated from the derived private key. The public key and... The identifier (such as key number, timestamp, or hash) is sent to the client via a ServerKeyExchange message. In addition to the original message content, the ServerKeyExchange message includes an additional field indicating... The logo.
[0077] Both the client and server are connected to the QKD network. Quantum protected key. The generation situation can be divided into the following situations: (1) QKD network generates in real time (2) The QKD network generates quantum protection keys in batches and sends them to the client and server for storage. At the start of communication, the client and server select from the pre-stored keys. (3) The client and server communicate through a secure channel protected by a one-time key, and exchange the key generated by the QKD network out of band. .
[0078] In this embodiment of the application, it is not required that different methods be used for each session. , The generation, selection and The lifecycle management is handled by the QKD key management module in both the client and server.
[0079] Step 5: The server sends a ServerHelloDone message.
[0080] Step 6: The client receives the server's public key and... After identifying the identifier, generate your own DHE private key, according to... The identifier is selected through the QKD key management module. The derived private key is calculated, and the DHE public key is calculated using the derived private key according to the original DHE algorithm. The public key is then sent to the server via a ClientKeyExchange message.
[0081] Step 7: The client sends a ChangeCipherSpec message.
[0082] Step 8: The client calculates the derived shared key using the received server public key according to the original DHE algorithm, and then uses it. Using your own DHE private key, use a correction algorithm to correct the derived shared key, and calculate the final target shared key for the DHE protocol.
[0083] Step 9: The client sends a Finished message.
[0084] Step 10: The server sends a ChangeCipherSpec message.
[0085] Step 11: The server calculates the derived shared key based on the received client public key using the original DHE algorithm, and then uses it... Using your own DHE private key, use a correction algorithm to correct the derived shared key, and calculate the final target shared key for the DHE protocol.
[0086] Step 12: The server sends a Finished message.
[0087] The private key derivation algorithm in the above process is as follows: The client generates a random private key 'a' and uses QKD to protect the key. Calculate the derived private key a` = f(a, K0). f is a private key derivation function, for example, a` = a - Calculate the public key A`=g a` `mod p` (the original DHE algorithm) sends A' to the server. `p` is the largest prime number chosen by the client and server in the original DHE algorithm, and `g` is the generator chosen by the client and server in the original DHE algorithm. `mod` is the modulo function.
[0088] The server generates a random private key b and uses QKD to protect the key. Calculate the derived private key b`=f(b, K0), specifically b`=b- Calculate the public key B`=g b` mod p (DHE original algorithm) sends B` to the client.
[0089] The correction algorithm in the above process is as follows: After receiving B', the client calculates the derived shared key: K' A =(B`) a mod p (the original DHE algorithm), modified to the original target shared key K A =F(K` A(a, K0). F is the derived shared key correction function, for example, K A =K` A mod p=( ) mod p=g ab mod p.
[0090] After receiving A', the server calculates the derived shared key: K' B =(A`) b mod p (the original DHE algorithm), modified to the original target shared key K B =F(K` B (a, K0). Specifically: K B = K` B mod p=( modp=g ab mod p.
[0091] K A =K B =g ab mod p, which is consistent with the target shared key calculated by the original DHE protocol, is only related to the private key a / b generated by the DHE protocol itself. For other communication protocols that use DHE to negotiate the target shared key, the modification method is the same as described above.
[0092] The secure communication method provided in this application has the following beneficial effects: (1) Related technologies: DHE solves the forward security of sessions by generating different DHE temporary private keys for each session, but it does not solve the security problem that the DHE shared key can be calculated after the discrete logarithm problem is cracked. With the development of quantum computing technology, there is a risk that the session can be decrypted in real time. The public key exchanged by the DHE protocol does not directly carry the private key of the DHE protocol. Even if the discrete logarithm problem is cracked, it is impossible to know the private key of the DHE protocol itself, and it is impossible to calculate the shared key finally negotiated by the DHE protocol.
[0093] (2) Compared to the high cost and significant modifications to existing communication protocols when using QKD key distribution for one-time pad sessions, this application retains the DHE protocol key negotiation process and the original private key. It only uses the QKD protection key K0 to create a derived private key, and then generates the DHE public key from the derived private key. The temporality of the original DHE private key ensures the temporality of the derived private key. Generating a public key from the derived private key hides the DHE private key itself, thus preserving the forward security inherent in the DHE protocol and resisting threats from the discrete logarithm problem. Furthermore, it eliminates the need for real-time, large-scale consumption of keys generated by the QKD network. Since the discrete logarithm problem does not affect the security of the DHE shared key, the system using this application can use a shorter DHE private key to improve system performance.
[0094] (3) The implementation of the original DHE protocol and communication protocol in this application makes very little change. The added calculation is the type of calculation supported by the DHE algorithm itself. No additional encryption and decryption calculation is added. The form of the shared key generated by the DHE protocol is not changed. The engineering implementation is simple and the compatibility is strong. It can enable the DHE protocol to cope with the threat of quantum computing to crack the discrete logarithm problem with a small modification cost.
[0095] The apparatus provided in the embodiments of this application is described below. The apparatus described below can be referred to in correspondence with the method described above.
[0096] Figure 3 This is a schematic diagram of the secure communication device provided in this application, such as... Figure 3 As shown, the secure communication device 300 includes: The generation module 310 is used to generate a first derived private key based on the quantum protection key and the first temporary private key, and to perform operations on the first derived private key based on a preset key exchange algorithm to generate a first public key; The transceiver module 320 is used to send the first public key to the second device and receive the second public key sent by the second device; the second public key is generated by the second device based on the quantum protection key and a preset key exchange algorithm. The operation module 330 is used to perform operations on the second public key based on a preset key exchange algorithm to generate a first derived shared key; The correction module 340 is used to correct the first derived shared key based on the quantum protection key and the first temporary private key to obtain the target shared key, and to communicate with the second device based on the target shared key.
[0097] The secure communication device provided in this application embodiment can function as a first device or as a component of a first device to communicate with a second device. Since the final calculated target shared key has been modified to eliminate the influence of the quantum protection key, it remains the original key generated by the preset key exchange algorithm. Even if the discrete logarithm problem is cracked, the attacker can only obtain the derived private key during the public key exchange process, and cannot know the temporary private key generated by the device itself, thus preventing them from knowing the final target shared key, thereby improving communication security. Furthermore, by enhancing the preset key exchange algorithm with the quantum protection key, the security of the final generated target shared key depends simultaneously on the confidentiality of the temporary key and the confidentiality of the quantum protection key, improving the communication's resistance to quantum attacks and balancing security, forward secrecy, and engineering feasibility.
[0098] Figure 4 This is a schematic diagram of the secure communication system provided in this application, such as... Figure 4 As shown, the secure communication system 400 includes at least two communication devices 410 and a quantum key distribution network 420.
[0099] All communication devices 410 are connected to the quantum key distribution network 420; The communication device 410 is equipped with a secure communication device 300 for secure communication based on the quantum protection key sent by the quantum key distribution network.
[0100] Specifically, the communication device 410 may further include a quantum key acquisition device 411 and a quantum key management device 412. The quantum key acquisition device is connected to a quantum key distribution network and is used to acquire quantum protection keys. The quantum key management device is used to manage the quantum protection keys throughout their entire lifecycle.
[0101] The secure communication system provided in this application embodiment includes a communication device equipped with the secure communication apparatus described in the above embodiment. This system can counter the threat of quantum computing key cracking and improves communication security. Furthermore, by enhancing the preset key exchange algorithm with a quantum protection key, the security of the final generated target shared key depends simultaneously on the confidentiality of the temporary key and the confidentiality of the quantum protection key, thereby improving the communication's resistance to quantum attacks and balancing security, forward secrecy, and engineering feasibility.
[0102] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application, such as... Figure 5As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor, communications interface, and memory communicate with each other via the communications bus. The processor can invoke logical commands stored in the memory to execute the methods described in the above embodiments, for example: A first derived private key is generated based on the quantum protection key and the first temporary private key, and a first public key is generated by performing operations on the first derived private key based on a preset key exchange algorithm; the first public key is sent to the second device, and a second public key is received from the second device; the second public key is generated by the second device based on the quantum protection key and the preset key exchange algorithm; a first derived shared key is generated by performing operations on the second public key based on the preset key exchange algorithm; the first derived shared key is modified based on the quantum protection key and the first temporary private key to obtain the target shared key, and communication is conducted with the second device based on the target shared key.
[0103] Furthermore, the logical commands in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several commands to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0104] The processor in the electronic device provided in this application embodiment can call logical instructions in the memory to implement the above method. Its specific implementation method is the same as the aforementioned method implementation method and can achieve the same beneficial effect, which will not be repeated here.
[0105] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the methods provided in the above embodiments.
[0106] The specific implementation method is the same as the aforementioned method implementation method and can achieve the same beneficial effects, so it will not be repeated here.
[0107] This application provides a computer program product, including a computer program that, when executed by a processor, implements the method described above.
[0108] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0109] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A secure communication method, characterized in that, Applied to the first device, including: A first derived private key is generated based on the quantum protection key and the first temporary private key, and a first public key is generated by performing operations on the first derived private key based on a preset key exchange algorithm. Send the first public key to the second device, and receive the second public key sent by the second device; the second public key is generated by the second device based on the quantum protection key and the preset key exchange algorithm. The second public key is processed based on the preset key exchange algorithm to generate a first derived shared key; The first derived shared key is modified based on the quantum protection key and the first temporary private key to obtain the target shared key, and then the second device is communicated based on the target shared key.
2. The secure communication method according to claim 1, characterized in that, Before generating the first derived private key based on the quantum protection key and the first temporary private key, the method further includes: Send first key negotiation information to the second device; the first key negotiation information is used to instruct the first device to support the application of quantum protection keys in the preset key exchange algorithm; The device receives second key negotiation information sent by the second device; the second key negotiation information is generated by the second device after confirming the first key negotiation information; the second key negotiation information is used to instruct the second device to support the application of quantum protection keys in the preset key exchange algorithm.
3. The secure communication method according to claim 1, characterized in that, Sending the first public key to the second device includes: Send the key identifiers of the first public key and the quantum protection key to the second device; The first device and the second device are connected to a quantum key distribution network; the second device obtains the quantum protection key from the quantum key distribution network based on the key identifier.
4. The secure communication method according to claim 1, characterized in that, The generation of the first derived private key based on the quantum protection key and the first temporary private key includes: Generate the first temporary private key; The deviation between the quantum protection key and the first temporary private key is determined as the first derived private key.
5. The secure communication method according to claim 4, characterized in that, The step of modifying the first derived shared key based on the quantum protection key and the first temporary private key to obtain the target shared key includes: Using the generator in the preset key exchange algorithm as the base and the product of the quantum protection key and the first temporary private key as the power, a correction coefficient is generated based on the base and the power. The target shared key is obtained by multiplying the correction coefficient and the first derived shared key based on the preset key exchange algorithm.
6. The secure communication method according to claim 1, characterized in that, The preset key exchange algorithm is the Diffie-Hellman temporary key exchange algorithm.
7. A secure communication device, characterized in that, include: The generation module is used to generate a first derived private key based on the quantum protection key and the first temporary private key, and to perform operations on the first derived private key based on a preset key exchange algorithm to generate a first public key; The transceiver module is used to send the first public key to the second device and receive the second public key sent by the second device; The second public key is generated by the second device based on the quantum protection key and the preset key exchange algorithm; The computation module is used to perform operations on the second public key based on the preset key exchange algorithm to generate a first derived shared key; The correction module is used to correct the first derived shared key based on the quantum protection key and the first temporary private key to obtain a target shared key, and to communicate with the second device based on the target shared key.
8. A secure communication system, characterized in that, Includes at least two communication devices and a quantum key distribution network; All communication devices are connected to the quantum key distribution network; The communication device is equipped with the secure communication device as described in claim 7, used for secure communication based on the quantum protection key sent by the quantum key distribution network.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the secure communication method according to any one of claims 1 to 6.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the secure communication method according to any one of claims 1 to 6.