SSL communication method, device, equipment, and storage medium
The keys in SSL communication are enhanced through the quantum key distribution network, which solves the problem of degradation of SSL communication security and realizes absolute security of data transmission.
Patent Information
- Application Number
- CN202210851170.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-07-19
AI Technical Summary
The security of SSL communication has declined due to the improvement of computer computing power and the development of quantum computing. The existing key negotiation algorithm is easily cracked, resulting in the threat of data transmission security.
Quantum key distribution (QKD) network is used to obtain the quantum key set, and quantum key enhancement is performed on Client Hello and Server Hello messages in the SSL handshake protocol to generate quantum session keys for encryption and transmission of data.
Through quantum key enhancement, the security in SSL communication process is improved, the key is prevented from being cracked, and the absolute security of data transmission is ensured.
Smart Images

Figure CN115225267B_ABST
Abstract
Description
Background Art
[0002] The Secure Sockets Layer (SSL) protocol is widely used on the Internet to provide authentication and data encryption transmission between communicating parties, and to verify the data security between the two parties. The SSL protocol is mainly composed of two sub-protocols: the SSL Handshake Protocol and the SSL Record Protocol. The SSL Handshake Protocol implements identity authentication, negotiates encryption algorithms and session keys for both parties through the exchange of information; the SSL Record Protocol works after the SSL Handshake Protocol is successful, and uses the negotiated session keys to provide encapsulation, compression, encryption and other functions for high-level data.
[0003] In the process of data encryption transmission in the SSL protocol, the session key used for encryption is generated by a key negotiation algorithm. The parameters required by the algorithm are transmitted by both parties through the network, and the security depends on the complexity of mathematical calculations. With the improvement of computer computing power, especially the development of quantum computing, the algorithm is easier to be cracked, which reduces the security of SSL communication.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide an SSL communication method and apparatus, device, and storage medium, which can at least to some extent overcome the problem of reduced data security between the two parties in SSL communication due to related technologies.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to one aspect of the present disclosure, there is provided an SSL communication method, which is applied to an SSL client, comprising:
[0008] Acquire a quantum key set through a quantum key distribution (QKD) network, wherein the quantum key set includes a plurality of quantum keys;
[0009] Performing quantum key enhancement on the Client Hello message based on the quantum key in the quantum key set to obtain an enhanced Client Hello message;
[0010] Receiving an enhanced Server Hello message sent by an SSL server; wherein the enhanced Server Hello message is obtained by the SSL server performing quantum key enhancement on the Server Hello message based on a quantum key set, and the SSL server obtains the quantum key set through the QKD network;
[0011] Performing quantum key enhancement on a key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key;
[0012] Generate a quantum session key based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key;
[0013] SSL communication is performed based on the quantum session key.
[0014] In some embodiments of the present disclosure, quantum key enhancement is performed on a Client Hello message based on a quantum key in the quantum key set to obtain an enhanced Client Hello message, including:
[0015] Acquire a first quantum key and a corresponding key identifier from the quantum key set;
[0016] Performing operations on the first quantum key according to a preset algorithm to generate a first calculated value;
[0017] An enhanced Client Hello message is generated based on the first calculated value and the key identifier of the first quantum key.
[0018] In some embodiments of the present disclosure, the SSL server performs quantum key enhancement on the Server Hello message based on the quantum key set, including:
[0019] Acquire a second quantum key and a corresponding key identifier from the quantum key set;
[0020] Performing operations on the second quantum key according to a preset algorithm to generate a second calculated value;
[0021] An enhanced Server Hello message is generated based on the second calculated value and the key identifier of the second quantum key.
[0022] In some embodiments of the present disclosure, the step of obtaining a quantum key set through a quantum key distribution QKD network includes:
[0023] Sending a quantum key request to the QKD management platform, wherein the quantum key request includes the number of quantum keys and the length of the quantum key;
[0024] Receive the quantum key set returned by the QKD management platform.
[0025] In some embodiments of the present disclosure, performing quantum key enhancement on a key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key includes:
[0026] Receive the encryption algorithm negotiation message sent by the SSL server and obtain the key exchange algorithm;
[0027] When the key exchange algorithm is the RSA algorithm, generating the pre-master key based on the encryption algorithm and the quantum key set;
[0028] When the key exchange algorithm is the DH algorithm, receiving an enhanced Server Key Exchange message sent by the SSL server, where the enhanced Server Key Exchange message is obtained by the SSL server performing quantum key enhancement on the Server Key Exchange message based on the quantum key set;
[0029] The enhanced Server Key Exchange message is parsed based on the quantum key set to obtain the pre-master key.
[0030] In some embodiments of the present disclosure, the SSL server performs quantum key enhancement on the Server KeyExchange message based on the quantum key set, including:
[0031] Obtain any quantum key and a corresponding key identifier from the quantum key set;
[0032] Using the quantum key to perform an XOR operation on the server DH public key to obtain a server enhanced DH public key;
[0033] The enhanced Server Key Exchange message is generated based on the server enhanced DH public key and the key identifier.
[0034] In some embodiments of the present disclosure, parsing the enhanced Server KeyExchange message based on the quantum key set to obtain the pre-master key includes:
[0035] Acquire a corresponding quantum key from the quantum key set based on the key identifier;
[0036] Performing an XOR operation on the server enhanced DH public key according to the quantum key to obtain the server DH public key;
[0037] Generate a client DH public key based on the server DH public key and DH parameters;
[0038] The pre-master key is generated based on the server DH public key and the client DH public key.
[0039] In some embodiments of the present disclosure, performing quantum key enhancement on the key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key further includes:
[0040] Performing quantum key enhancement on the Client Key Exchange message based on the quantum key set to obtain an enhanced Client Key Exchange message;
[0041] The enhanced Client Key Exchange message is sent to the SSL server, so that the SSL server parses the enhanced Client Key Exchange message based on the quantum key set to obtain the pre-master key.
[0042] In some embodiments of the present disclosure, when the key exchange algorithm is the DH algorithm, quantum key enhancement is performed on the Client Key Exchange message based on the quantum key set to obtain an enhanced Client Key Exchange message; including:
[0043] Obtain any quantum key and a corresponding key identifier from the quantum key set;
[0044] Using the quantum key to perform an XOR operation on the client DH public key to obtain the client enhanced DH public key;
[0045] The enhanced Client Key Exchange message is generated based on the client enhanced DH public key and the key identifier.
[0046] In some embodiments of the present disclosure, when the key exchange algorithm is the RSA algorithm, generating the pre-master key based on the encryption algorithm and the quantum key set includes:
[0047] Acquire a third quantum key from the quantum key set;
[0048] The third quantum key is used as the pre-master key.
[0049] In some embodiments of the present disclosure, when the key exchange algorithm is the RSA algorithm, quantum key enhancement is performed on the Client Key Exchange message based on the quantum key set to obtain an enhanced Client Key Exchange message, including:
[0050] Performing calculation on the third quantum key according to a preset algorithm to obtain a third calculated value;
[0051] An encryption operation is performed on the third calculated value and the key identifier of the third quantum key based on the RSA algorithm to obtain the enhanced Client Key Exchange message.
[0052] According to a second aspect of the present disclosure, there is provided an SSL communication method, which is applied to an SSL server, comprising:
[0053] Acquire a quantum key set through a quantum key distribution (QKD) network, wherein the quantum key set includes a plurality of quantum keys;
[0054] Performing quantum key enhancement on the Server Hello message based on the quantum key in the quantum key set to obtain an enhanced Server Hello message;
[0055] Receiving an enhanced Client Hello message sent by an SSL client; wherein the enhanced Client Hello message is obtained by the SSL client performing quantum key enhancement on the Client Hello message based on a quantum key set, and the SSL server obtains the quantum key set through the QKD network;
[0056] Performing quantum key enhancement on a key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key;
[0057] Generate a quantum session key based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key;
[0058] SSL communication is performed based on the quantum session key.
[0059] According to a third aspect of the present disclosure, there is provided an SSL communication device, applied to an SSL client, comprising:
[0060] A quantum key set acquisition module, used to acquire a quantum key set through a quantum key distribution QKD network, wherein the quantum key set includes a plurality of quantum keys;
[0061] Client Hello message enhancement module; used to perform quantum key enhancement on the Client Hello message based on the quantum key in the quantum key set to obtain an enhanced Client Hello message;
[0062] A Server Hello message receiving module, configured to receive an enhanced Server Hello message sent by an SSL server; wherein the enhanced Server Hello message is obtained by the SSL server performing quantum key enhancement on the Server Hello message based on a quantum key set, and the SSL server obtains the quantum key set through the QKD network;
[0063] A pre-master key acquisition module, used to perform quantum key enhancement on the key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key;
[0064] A quantum session key generation module, used to generate a quantum session key based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key;
[0065] An SSL communication module is used to perform SSL communication based on the quantum session key.
[0066] According to a fourth aspect of the present disclosure, there is provided an SSL communication device, applied to an SSL server, comprising:
[0067] A quantum key set acquisition module is used to acquire a quantum key set through a quantum key distribution (QKD) network, wherein the quantum key set includes a plurality of quantum keys;
[0068] A Server Hello message enhancement module, configured to perform quantum key enhancement on the Server Hello message based on the quantum key in the quantum key set to obtain an enhanced Server Hello message;
[0069] A Client Hello message receiving module, configured to receive an enhanced Client Hello message sent by an SSL client; wherein the enhanced Client Hello message is obtained by the SSL client performing quantum key enhancement on the Client Hello message based on a quantum key set, and the SSL server obtains the quantum key set through the QKD network;
[0070] A pre-master key acquisition module, used to perform quantum key enhancement on the key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key;
[0071] A quantum session key generation module, used to generate a quantum session key based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key;
[0072] An SSL communication module is used to perform SSL communication based on the quantum session key.
[0073] According to a fifth aspect of the present disclosure, there is provided an electronic device, including:
[0074] Processor; and
[0075] A memory, configured to store executable instructions of the processor;
[0076] Wherein, the processor is configured to execute the SSL communication method as described in any one of the above by executing the executable instructions.
[0077] According to a sixth aspect of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the SSL communication method as described in any one of the above is implemented.
[0078] The SSL communication method, apparatus, device, and storage medium provided by the embodiments of the present disclosure distribute quantum keys to SSL clients and SSL servers through a quantum key distribution QKD network. Select the quantum key in the quantum key set, and perform quantum key-based enhancement on the Client Hello message, Server Hello message, and key negotiation message between the communicating parties in the SSL protocol. The random numbers and pre-master keys in the communication process between the SSL client and the SSL server are enhanced by quantum keys before being transmitted, which effectively ensures the security of the exchange process between the two parties. Finally, based on the quantum-enhanced Client Hello message, Server Hello message, and pre-master key, a quantum session key is generated, and the quantum session key is used to encrypt and transmit data, ensuring the security of the data.
[0079] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0081] Figure 1 A schematic diagram showing the process of generating a session key during SSL communication in the prior art is shown;
[0082] Figure 2A flow chart showing an SSL communication method applied to an SSL client in an embodiment of the present disclosure;
[0083] Figure 3 A flowchart showing an SSL communication method applied to an SSL client in another embodiment of the present disclosure;
[0084] Figure 4 A flowchart showing the Server Key Exchange message enhancement in an embodiment of the present disclosure is shown;
[0085] Figure 5 A flowchart showing parsing of an enhanced Server Key Exchange message in an embodiment of the present disclosure is shown;
[0086] Figure 6 A flow chart showing an SSL communication method applied to an SSL server in an embodiment of the present disclosure;
[0087] Figure 7 A flowchart showing an SSL communication method in an application example of the present disclosure is shown;
[0088] Figure 8 A schematic diagram showing an SSL communication device applied to an SSL client in an embodiment of the present disclosure; and
[0089] Fig. 9 A schematic diagram showing an SSL communication device applied to an SSL server in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0090] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0091] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0092] See also Figure 1As shown, in the traditional SSL communication process, the generation of the session key between the SSL client 110 and the SSL server 120 is implemented by an algorithm (RSA algorithm or DH algorithm). The parameters used by the algorithm are obtained through a handshake exchange between the two parties. The data exchange during the handshake exchange process includes Client Hello message, Server Hello message, Client KeyExchange message, Server Key Exchange information, etc. Limited by the current computing power, with the improvement of computer computing power, especially the development of quantum computing, it has become easier to crack the algorithm, and the security of encrypted data has been threatened.
[0093] With the combination of quantum physics and information technology, quantum key distribution (QKD) technology has become a hope for solving security issues such as key generation and transmission. The "No-Cloning Theorem" is used to achieve absolute security of key distribution. The "No-Cloning Theorem" is a corollary of the "Heisenberg Uncertainty Principle", which means that the process of making an identical copy of any unknown quantum state in quantum mechanics is not feasible, because the premise of copying is measurement, and measurement generally changes the state of the quantum. Each bit of the key in QKD technology is transmitted by a single photon. The quantum behavior of a single photon makes it impossible for an eavesdropper to intercept and copy the state of the photon without being noticed, thereby ensuring the security of key generation and transmission. Based on the characteristics of quantum keys, the present invention uses quantum keys distributed through the QKD network to quantum enhance the interactive data in the SSL handshake protocol, effectively preventing the session key from being cracked and improving communication security.
[0094] The exemplary embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0095] Figure 2 A flowchart of an SSL communication method 100 according to an embodiment of the present application is schematically shown.
[0096] See also Figure 2 , an SSL communication method 200, applied to an SSL client, comprising:
[0097] Step S201, obtaining a quantum key set through a quantum key distribution QKD network, wherein the quantum key set includes a plurality of quantum keys;
[0098] Step S202, performing quantum key enhancement on the Client Hello message based on the quantum key in the quantum key set to obtain an enhanced Client Hello message;
[0099] Step S203, receiving an enhanced Server Hello message sent by the SSL server; wherein the enhanced Server Hello message is obtained by the SSL server performing quantum key enhancement on the Server Hello message based on the quantum key set, and the SSL server obtains the quantum key set through the QKD network;
[0100] Step S204, performing quantum key enhancement on the key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key;
[0101] Step S205, generating a quantum session key based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key;
[0102] Step S206: Perform SSL communication based on the quantum session key.
[0103] The SSL communication method of the embodiment of the present disclosure distributes quantum keys to the SSL client and SSL server through a quantum key distribution QKD network. The quantum keys in the quantum key set are selected to perform quantum key-based enhancement on the Client Hello message, Server Hello message and key negotiation message between the communicating parties in the SSL protocol. The random numbers and pre-master keys in the communication process between the SSL client and the SSL server are enhanced by quantum keys before being transmitted, which effectively ensures the security of the exchange process between the two parties. Finally, based on the quantum-enhanced Client Hello message, Server Hello message and pre-master key, a quantum session key is generated, and the quantum session key is used to encrypt and transmit data, ensuring the security of the data.
[0104] The following is a detailed description of each step of the SSL communication method 200 applied to the SSL client.
[0105] In step S201, a quantum key set is obtained through a quantum key distribution QKD network, and the quantum key set includes multiple quantum keys. Each quantum key is configured with a key identifier, and the corresponding quantum key can be obtained from the quantum key set through the key identifier. Specifically, the key identifier is set in the form of a key ID. Each quantum key has a corresponding key ID.
[0106] In one embodiment of the present disclosure, step S201 specifically includes:
[0107] Step S2011, sending a quantum key request to the QKD management platform, wherein the quantum key request includes the number of quantum keys and the length of the quantum key.
[0108] Step S2012, receiving the quantum key set returned by the QKD management platform. Specifically, the QKD network performs quantum key distribution with the SSL server through the QKD network according to the quantum key request, and distributes the quantum key to the SSL client and the SSL server.
[0109] In one embodiment of the present disclosure, step S201 further includes:
[0110] Step S2013, storing the quantum key set.
[0111] In step S202, quantum key enhancement is performed on the Client Hello message based on the quantum key in the quantum key set to obtain an enhanced Client Hello message.
[0112] In one embodiment of the present disclosure, step S202 specifically includes:
[0113] Step S2021, obtaining a first quantum key and a corresponding key identifier from the quantum key set. Specifically, the key identifier of the first quantum key Q_Key1 is ID1.
[0114] Step S2022: Calculate the first quantum key according to a preset algorithm to generate a first calculated value. In one embodiment, the preset algorithm may be a hash function, and a hash value H(Q_Key1) of the first quantum key is obtained through the hash function.
[0115] Step S2023: Generate an enhanced Client Hello message based on the first calculated value H(Q_Key1) and the key identifier of the first quantum key.
[0116] By performing quantum key enhancement on the Client Hello message, the original client random number Random_C of the Client Hello message is improved to the hash value H(Q_Key1) of quantum key ID1+quantum key Q_Key1. During the handshake process, the random number is not transmitted directly, only the key ID is transmitted, and the integrity of the quantum key is verified by transmitting the hash value of the quantum key. After receiving the enhanced Client Hello message, the SSL server obtains the corresponding quantum key Q_Key1 from the quantum key set distributed by the QKD network according to the quantum key ID1.
[0117] In step S203, an enhanced Server Hello message sent by an SSL server is received; wherein the enhanced Server Hello message is obtained by the SSL server performing quantum key enhancement on the Server Hello message based on the quantum key set, and the SSL server obtains the quantum key set through the QKD network.
[0118] In one embodiment of the present disclosure, in step S203, the SSL server performs quantum key enhancement on the ServerHello message based on the quantum key set, including:
[0119] Obtain a second quantum key Q_Key2 and a corresponding key identifier ID2 from the quantum key set; and perform operations on the second quantum key Q_Key2 according to a preset algorithm to generate a second calculated value. In one embodiment, the preset algorithm may be a hash function, and a hash value H(Q_Key2) of the second quantum key is obtained by the hash function.
[0120] An enhanced Server Hello message is generated based on the second calculated value H(Q_Key2) and the key identifier ID2 of the second quantum key.
[0121] By performing quantum key enhancement on the Server Hello message, the original server random number Random_S of the Server Hello message is improved to the hash value H(Q_Key2) of quantum key ID2+quantum key Q_Key2. After receiving the enhanced Server Hello message, the SSL client obtains the corresponding quantum key Q_Key2 from the quantum key set distributed by the QKD network according to quantum key ID2.
[0122] In step S204, quantum key enhancement is performed on the key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key.
[0123] See also Figure 3 , the SSL communication method applied to the SSL client further includes the following steps:
[0124] S301, performing quantum key enhancement on a Client Key Exchange message based on the quantum key set to obtain an enhanced Client Key Exchange message;
[0125] S302: Send the enhanced Client Key Exchange message to the SSL server, so that the SSL server parses the enhanced Client Key Exchange message based on the quantum key set to obtain the pre-master key.
[0126] In step S205, a quantum session key is generated based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key.
[0127] In one embodiment of the present disclosure, a quantum session key Fuc(Q_Key1, Q_Key2, Pre-master) is generated based on an enhanced Client Hello message, an enhanced Server Hello message, and a pre-master key Pre-master.
[0128] In step S206, the SSL client performs SSL communication with the SSL server based on the quantum session key Fuc (Q_Key1, Q_Key2, Pre-master).
[0129] In one embodiment of the present disclosure, step S204 specifically includes:
[0130] Step S2041, receiving an encryption algorithm negotiation message sent by the SSL server, and obtaining a key exchange algorithm. The key exchange algorithm is an RSA algorithm or a DH algorithm. When the key exchange algorithm is an RSA algorithm, quantum key enhancement is performed through step S2042. When the key exchange algorithm is a DH algorithm, quantum key enhancement is performed through step S2043.
[0131] Step S2042: When the key exchange algorithm is the RSA algorithm, the pre-master key is generated based on the encryption algorithm and the quantum key set.
[0132] Step S2043, when the key exchange algorithm is the DH algorithm, receiving an enhanced Server Key Exchange message sent by the SSL server, where the enhanced Server Key Exchange message is obtained by the SSL server performing quantum key enhancement on the Server Key Exchange message based on the quantum key set; parsing the enhanced Server Key Exchange message based on the quantum key set to obtain the pre-master key.
[0133] In one embodiment, step S2042 (RSA algorithm) specifically includes:
[0134] Acquire a third quantum key Q_Key3 from the quantum key set;
[0135] The third quantum key Q_Key3 is used as the pre-master key.
[0136] When using RSA for key negotiation, there is no Server Key Exchange message, and the original pre-master key (the original pre-master key is a string of random numbers) is improved to the third quantum key Q_Key3. Then execute the following Figure 3 Steps S301 to S302 are shown.
[0137] In one embodiment of the present disclosure, when RSA is used for key negotiation, step S301 includes:
[0138] The third quantum key Q_Key3 is operated according to a preset algorithm to obtain a third calculated value. Specifically, in one embodiment, the preset algorithm may be a hash function, and a hash value H(Q_Key3) of the third quantum key is obtained by the hash function:
[0139] The third calculated value H(Q_Key3) and the key identifier ID3 of the third quantum key are encrypted based on the RSA algorithm to obtain the enhanced Client Key Exchange message. Specifically, the enhanced Client Key Exchange message is generated by performing encryption operation through the RSA encryption algorithm E: E(quantum key ID3+key hash value H(Q_Key3)).
[0140] By performing quantum key enhancement on the Client Key Exchange message, the pre-master key is not directly transmitted during the message interaction process. Only the key identifier ID3 and the key hash value H (Q_Key3) encrypted by the RSA algorithm are transmitted. After the SSL server receives the enhanced Client Key Exchange message, it decrypts and obtains the quantum key ID3+H (Q_Key3). Based on the quantum key ID3, the corresponding quantum key Q_Key3 is obtained from the quantum key set, thereby effectively protecting the pre-master key on the client side.
[0141] When RSA is used for key negotiation, the quantum session key Fuc(Q_Key1, Q_Key2, Pre-master) = Fuc(Q_Key1, Q_Key2, Q_Key3).
[0142] Table 1 below exemplarily shows the steps for improving the SSL communication method when the RSA algorithm is used for key negotiation.
[0143] Table 1
[0144]
[0145]
[0146] In one embodiment, in step S2043, when the DH algorithm is used for key negotiation, the SSL client receives an enhanced Server Key Exchange message sent by the SSL server, parses the enhanced Server Key Exchange message based on the quantum key set, and obtains the pre-master key.
[0147] See also Figure 4 In one embodiment, the SSL server performs quantum key enhancement on the Server Key Exchange message based on the quantum key set to obtain the enhanced Server Key Exchange message. Specifically comprising:
[0148] Step S401, obtaining any quantum key and a corresponding key identifier from the quantum key set.
[0149] Step S402: Use the quantum key to perform an XOR operation on the server DH public key to obtain a server enhanced DH public key.
[0150] Step S403: Generate the enhanced Server KeyExchange message based on the server enhanced DH public key and the key identifier.
[0151] In one embodiment, for example, the quantum key Q_Key1 and the key identifier ID1 may be obtained. Q_Key1 performs an XOR operation on the server DH public key pubkey_S to obtain the server enhanced DH public key Q_pubkey_S. Wherein, Q_pubkey_S=pubkey_S⊕Q_Key1. The enhanced Server Key Exchange message is generated based on Q_pubkey_S and the key identifier ID1.
[0152] It is understandable that in other embodiments, Q_Key2, Q_Key3, Q_Key4, Q_Key5, etc. may also be obtained, and the present disclosure does not specifically limit this.
[0153] See also Figure 5 In one embodiment, the SSL client parses the enhanced Server Key Exchange message based on the quantum key set to obtain the pre-master key; specifically comprising:
[0154] Step S501, obtaining a corresponding quantum key from the quantum key set based on the key identifier;
[0155] Step S502, performing an XOR operation on the server enhanced DH public key according to the quantum key to obtain the server DH public key;
[0156] Step S503, generating a client DH public key based on the server DH public key and DH parameters;
[0157] Step S504: Generate the pre-master key based on the server DH public key and the client DH public key.
[0158] In one embodiment, the SSL client obtains the corresponding quantum key Q_Key1 from the quantum key set through the key identifier ID1. Then, an XOR operation is performed on the received server enhanced DH public key Q_pubkey_S to obtain the server DH public key pubkey_S. That is, pubkey_S = Q_pubkey_S ⊕ Q_Key1. After the SSL client obtains pubkey_S, it first generates a private key prikey_C for itself, and then calculates the client DH public key pubkey_C based on the DH parameters (parameters p, g) sent by the server, the server DH public key pubkey_S and its own private key prikey_C. Finally, the pre-master key DH (pubkey_S, pubkey_C) is obtained based on pubkey_S and pubkey_C.
[0159] After the SSL client obtains the pre-master key DH (pubkey_S, pubkey_C), it also performs the following Figure 3 Steps S301 to S302 are shown so that the SSL server obtains the corresponding pre-master key.
[0160] Specifically, in one embodiment of the present disclosure, when the DH algorithm is used for key negotiation, step S301 performs quantum key enhancement on the Client Key Exchange message based on the quantum key set to obtain an enhanced Client Key Exchange message; including:
[0161] Obtain any quantum key and the corresponding key identifier from the quantum key set. For example, the quantum key Q_Key2 and the key identifier ID2 may be obtained.
[0162] The quantum key Q_Key2 is used to perform an XOR operation on the client DH public key pubkey_C to obtain the client enhanced DH public key Q_pubkey_C. Q_pubkey_C = pubkey_C ⊕ Q_Key2.
[0163] The enhanced ClientKey Exchange message is generated based on the client enhanced DH public key Q_pubkey_C and the key identifier ID2.
[0164] The SSL client sends the enhanced Client Key Exchange message to the SSL server, and the SSL server obtains the quantum key Q_Key2 from the quantum key set according to the key identifier ID2. Then, an XOR operation is performed on the received client enhanced DH public key Q_pubkey_C to obtain the client DH public key pubkey_C. That is, pubkey_C=Q_pubkey_C⊕Q_Key2. Finally, the SSL client obtains the pre-master key DH(pubkey_S, pubkey_C) according to pubkey_S and pubkey_C.
[0165] When the key exchange algorithm is the DH algorithm, quantum key enhancement is performed on the Server Key Exchange and Client Key Exchange messages. During the message interaction process, pubkey_S and pubkey_C are not transmitted directly. Instead, Q_pubkey_S and Q_pubkey_C are obtained by performing an XOR operation on the public key using quantum keys Q_Key1 and Q_Key2. This effectively protects the DH public keys of the Server and Client, and improves the security of data interaction.
[0166] When the DH algorithm is used for key negotiation, the quantum session key Fuc(Q_Key1, Q_Key2, Pre-master) = Fuc(Q_Key1, Q_Key2, DH(pubkey_S, pubkey_C)).
[0167] Table 2 below exemplarily shows the steps for improving the SSL communication method when the DH algorithm is used for key negotiation.
[0168] Table 2
[0169]
[0170] See also Figure 6 , an SSL communication method 600 applied to an SSL server is provided, comprising:
[0171] Step S601, obtaining a quantum key set through a quantum key distribution QKD network, wherein the quantum key set includes a plurality of quantum keys;
[0172] Step S602, performing quantum key enhancement on the Server Hello message based on the quantum key in the quantum key set to obtain an enhanced Server Hello message;
[0173] Step S603, receiving an enhanced Client Hello message sent by the SSL client; wherein the enhanced Client Hello message is obtained by the SSL client performing quantum key enhancement on the Client Hello message based on the quantum key set, and the SSL server obtains the quantum key set through the QKD network;
[0174] Step S604, performing quantum key enhancement on the key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key;
[0175] Step S604, generating a quantum session key based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key;
[0176] Step S605: Perform SSL communication based on the quantum session key.
[0177] The SSL communication method of the embodiment of the present disclosure distributes quantum keys to the SSL client and SSL server through a quantum key distribution QKD network. The quantum keys in the quantum key set are selected to perform quantum key-based enhancement on the Client Hello message, Server Hello message and key negotiation message between the communicating parties in the SSL protocol. The random numbers and pre-master keys in the communication process between the SSL client and the SSL server are enhanced by quantum keys before being transmitted, which effectively ensures the security of the exchange process between the two parties. Finally, based on the quantum-enhanced Client Hello message, Server Hello message and pre-master key, a quantum session key is generated, and the quantum session key is used to encrypt and transmit data, ensuring the security of the data.
[0178] See also Figure 7 , an application example is given to demonstrate the principle of the above SSL communication method.
[0179] exist Figure 7In the process, the SSL client 710 generates the quantum key request information (key quantity, length, etc.) required for this communication through the quantum key request module 711. The quantum key distribution module 712 performs quantum key distribution with the SSL server 720 through the QKD network 730 based on the information obtained from the request module 711. The distributed quantum key is stored in the quantum key management module 713 to obtain a quantum key set. The quantum key selection module 714 selects the quantum key ID and the corresponding quantum key required for this communication from the quantum key management module 713. According to the quantum key selected by the selection module 714, the client random number and the client DH public key in the Client Hello and Client Key Exchange information in the SSL handshake process are enhanced based on the quantum key. The handshake information sent by the SSL server 720 is received and parsed, and the server-side quantum random number and the server DH public key are obtained according to the Server Hello and Server Key Exchange. The quantum session key is generated based on the information after the quantum key enhancement exchanged between the two parties. The quantum session key is used for application data encryption and secure communication.
[0180] exist Figure 7 In the process, the SSL server 720 generates the quantum key request information (key quantity, length, etc.) required for this communication through the quantum key request module 721. Or, the quantum key is distributed with the SSL client 710 through the QKD network 730 through the quantum key distribution module 722. The distributed quantum key is stored in the quantum key management module 723. The handshake information sent by the SSL client is received and parsed, and the client quantum random number and the client DH public key are obtained according to the Client Hello and Client Key Exchange messages. The quantum key selection module 724 selects the quantum key ID and the corresponding quantum key required for this communication from the quantum key management module 723. According to the quantum key selected by the selection module, the server random number and the server DH public key in the Server Hello and Server Key Exchange information in the SSL handshake process are enhanced based on the quantum key. A quantum session key is generated based on the information after the quantum key enhancement exchanged between the two parties. The quantum session key is used for secure communication of application data encryption.
[0181] exist Figure 7 The specific process of quantum key enhancement includes:
[0182] Step S701, SSL Client performs Client hello message enhancement, and the Client random number is enhanced to quantum key ID1 + key hash value H(Q_Key1).
[0183] Step S702, the SSL Server finds the corresponding quantum key Q_Key1 according to ID1.
[0184] Step S703: The SSL Server performs Server hello message enhancement, and the Server random number is enhanced to quantum key ID2 + key hash value H (Q_Key2).
[0185] Step S704, the SSL Client finds the corresponding quantum key Q_Key2 according to ID2.
[0186] Step S705,
[0187] When the DH algorithm is used, the SSL Server performs Server Key Exchange message enhancement, and the server DH public key pubkey_S is enhanced to Q_pubkey_S = pubkey_S ⊕ Q_Key1.
[0188] This message does not exist when the RSA algorithm is used.
[0189] Step S706, the SSL Client calculates pubkey_S=Q_pubkey_S⊕Q_Key1.
[0190] Step S707,
[0191] When the DH algorithm is used, the SSL Client performs Client Key Exchange message enhancement, and the Client DH public key pubkey_C is enhanced to Q_pubkey_C = pubkey_C ⊕ Q_Key2.
[0192] When the RSA algorithm is used, the SSL Client performs Client Key Exchange message enhancement, and the pre-master key E(pre_master) is enhanced to E(quantum key ID3+key hash value H(Q_Key3)).
[0193] Step S708, the SSL Server calculates pubkey_C = Q_pubkey_C ⊕ Q_Key2.
[0194] When the DH algorithm is used, a quantum session key Fuc(Q_Key1, Q_Key2, DH(pubkey_S, pubkey_C)) is generated. When the RSA algorithm is used, a quantum session key Fuc(Q_Key1, Q_Key2, Q_Key3) is generated. The quantum session key is used to encrypt and securely communicate application data through the classical network 740.
[0195] See also Figure 8, an SSL communication device 800 is provided, applied to an SSL client, comprising:
[0196] A quantum key set acquisition module 810 is used to acquire a quantum key set through a quantum key distribution QKD network, wherein the quantum key set includes a plurality of quantum keys;
[0197] A Client Hello message enhancement module 820 is used to perform quantum key enhancement on the Client Hello message based on the quantum key in the quantum key set to obtain an enhanced Client Hello message;
[0198] A Server Hello message receiving module 830 is used to receive an enhanced Server Hello message sent by an SSL server; wherein the enhanced Server Hello message is obtained by the SSL server performing quantum key enhancement on the Server Hello message based on a quantum key set, and the SSL server obtains the quantum key set through the QKD network;
[0199] A pre-master key acquisition module 840 is used to perform quantum key enhancement on the key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key;
[0200] A quantum session key generation module 850, configured to generate a quantum session key based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key;
[0201] The SSL communication module 860 is used to perform SSL communication based on the quantum session key.
[0202] The SSL communication device of the embodiment of the present disclosure distributes quantum keys to the SSL client and SSL server through a quantum key distribution QKD network. The quantum keys in the quantum key set are selected to perform quantum key-based enhancement on the Client Hello message, Server Hello message and key negotiation message between the communicating parties in the SSL protocol. The random numbers and pre-master keys in the communication process between the SSL client and the SSL server are enhanced by quantum keys before being transmitted, which effectively ensures the security of the exchange process between the two parties. Finally, based on the quantum-enhanced Client Hello message, Server Hello message and pre-master key, a quantum session key is generated, and the quantum session key is used to encrypt and transmit data, ensuring the security of the data.
[0203] In one embodiment of the present disclosure, the SSL communication device 800 may also include modules for implementing other process steps of the above-mentioned SSL communication method embodiments. Since the functions of the SSL communication device 800 have been described in detail in the corresponding method embodiments, the present disclosure will not repeat them here.
[0204] See also Fig. 9 , an SSL communication device 900 is provided, applied to an SSL server, comprising:
[0205] A quantum key set acquisition module 910 is configured to acquire a quantum key set through a quantum key distribution (QKD) network, wherein the quantum key set includes a plurality of quantum keys;
[0206] A Server Hello message enhancement module 920, configured to perform quantum key enhancement on the Server Hello message based on the quantum key in the quantum key set to obtain an enhanced Server Hello message;
[0207] The Client Hello message receiving module 930 is used to receive an enhanced Client Hello message sent by an SSL client; wherein the enhanced Client Hello message is obtained by the SSL client performing quantum key enhancement on the Client Hello message based on a quantum key set, and the SSL server obtains the quantum key set through the QKD network;
[0208] A pre-master key acquisition module 940 is used to perform quantum key enhancement on the key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key;
[0209] A quantum session key generation module 950, configured to generate a quantum session key based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key;
[0210] The SSL communication module 960 is used to perform SSL communication based on the quantum session key.
[0211] The SSL communication device of the embodiment of the present disclosure distributes quantum keys to the SSL client and SSL server through a quantum key distribution QKD network. The quantum keys in the quantum key set are selected to perform quantum key-based enhancement on the Client Hello message, Server Hello message and key negotiation message between the communicating parties in the SSL protocol. The random numbers and pre-master keys in the communication process between the SSL client and the SSL server are enhanced by quantum keys before being transmitted, which effectively ensures the security of the exchange process between the two parties. Finally, based on the quantum-enhanced Client Hello message, Server Hello message and pre-master key, a quantum session key is generated, and the quantum session key is used to encrypt and transmit data, ensuring the security of the data.
[0212] In one embodiment of the present disclosure, the SSL communication device 900 may also include modules for implementing other process steps of the above-mentioned SSL communication method embodiments. Since the functions of the SSL communication device 900 have been described in detail in the corresponding method embodiments, the present disclosure will not repeat them here.
[0213] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0214] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-mentioned SSL communication method is also provided.
[0215] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0216] In one embodiment of the present disclosure, the electronic device is presented in the form of a general-purpose computing device. The components of the electronic device may include but are not limited to: the at least one processing unit, the at least one storage unit, and a bus connecting different system components (including the storage unit and the processing unit).
[0217] The storage unit stores program codes, which can be executed by the processing unit, so that the processing unit performs the steps of various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit can perform the following steps: Figure 2 In the step S201 shown in the figure, a quantum key set is obtained through a quantum key distribution QKD network, and the quantum key set includes multiple quantum keys; in step S202, a Client Hello message is quantum key enhanced based on the quantum keys in the quantum key set to obtain an enhanced Client Hello message; in step S203, an enhanced Server Hello message sent by an SSL server is received; wherein the enhanced Server Hello message is obtained by the SSL server performing quantum key enhancement on the Server Hello message based on the quantum key set, and the SSL server obtains the quantum key set through the QKD network; in step S204, a key agreement message between the SSL server and the SSL client is quantum key enhanced based on the quantum key set to obtain a pre-master key; in step S205, a quantum session key is generated based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key; in step S206, SSL communication is performed based on the quantum session key.
[0218] The storage unit may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM) and / or a cache memory unit, and may further include a read-only memory unit (ROM).
[0219] The storage unit may also include a program / utility having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0220] The bus may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0221] The electronic device can also communicate with one or more external devices (such as keyboards, pointing devices, Bluetooth devices, etc.), and can also communicate with one or more devices that enable users to interact with the electronic device, and / or communicate with any device (such as routers, modems, etc.) that enables the electronic device to communicate with one or more other computing devices. This communication can be carried out through an input / output (I / O) interface. In addition, the electronic device can also communicate with one or more networks (such as local area networks (LANs), wide area networks (WANs) and / or public networks, such as the Internet) through a network adapter. As shown in the figure, the network adapter communicates with other modules of the electronic device through a bus. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0222] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0223] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0224] A program product for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0225] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0226] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0227] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0228] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0229] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0230] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0231] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0232] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A secure socket layer (SSL) communication method, applied to an SSL client, characterized in that: include: Acquire a quantum key set through a quantum key distribution (QKD) network, wherein the quantum key set includes a plurality of quantum keys; Performing quantum key enhancement on the Client Hello message based on the quantum key in the quantum key set to obtain an enhanced Client Hello message; Receive enhanced Server Hello messages sent by SSL servers; The enhanced Server Hello message is obtained by the SSL server performing quantum key enhancement on the Server Hello message based on the quantum key set, and the SSL server obtains the quantum key set through the QKD network; Performing quantum key enhancement on a key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key; Generate a quantum session key based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key; Perform SSL communication based on the quantum session key; The step of performing quantum key enhancement on a client hello message based on a quantum key in the quantum key set to obtain an enhanced Client Hello message includes: Acquire a first quantum key and a corresponding key identifier from the quantum key set; Performing operations on the first quantum key according to a preset algorithm to generate a first calculated value; An enhanced Client Hello message is generated based on the first calculated value and the key identifier of the first quantum key.
2. The SSL communication method according to claim 1, characterized in that: The step of obtaining a quantum key set through a quantum key distribution QKD network comprises: Sending a quantum key request to the QKD management platform, wherein the quantum key request includes the number of quantum keys and the length of the quantum key; Receive the quantum key set returned by the QKD management platform.
3. The SSL communication method according to claim 1, characterized in that: Performing quantum key enhancement on a key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key includes: Receive the encryption algorithm negotiation message sent by the SSL server and obtain the key exchange algorithm; When the key exchange algorithm is the RSA algorithm, generating the pre-master key based on the encryption algorithm and the quantum key set; When the key exchange algorithm is the DH algorithm, receiving an enhanced Server Key Exchange message sent by the SSL server, where the enhanced Server Key Exchange message is obtained by the SSL server performing quantum key enhancement on the Server Key Exchange message based on the quantum key set; The enhanced Server Key Exchange message is parsed based on the quantum key set to obtain the pre-master key.
4. The SSL communication method according to claim 3, characterized in that: Parsing the enhanced Server Key Exchange message based on the quantum key set to obtain the pre-master key includes: Acquire a corresponding quantum key from the quantum key set based on the key identifier; Performing an XOR operation on the server enhanced DH public key according to the quantum key to obtain the server DH public key; Generate a client DH public key based on the server DH public key and DH parameters; The pre-master key is generated based on the server DH public key and the client DH public key.
5. The SSL communication method according to claim 3, characterized in that: The method further comprises: performing quantum key enhancement on the key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key; Performing quantum key enhancement on the Client Key Exchange message based on the quantum key set to obtain an enhanced Client Key Exchange message; The enhanced Client Key Exchange message is sent to the SSL server, so that the SSL server parses the enhanced Client Key Exchange message based on the quantum key set to obtain the pre-master key.
6. The SSL communication method according to claim 5, characterized in that: When the key exchange algorithm is the DH algorithm, quantum key enhancement is performed on the Client Key Exchange message based on the quantum key set to obtain an enhanced Client Key Exchange message; including: Obtain any quantum key and a corresponding key identifier from the quantum key set; Using the quantum key to perform an XOR operation on the client DH public key to obtain the client enhanced DH public key; The enhanced Client Key Exchange message is generated based on the client enhanced DH public key and the key identifier.
7. The SSL communication method according to claim 5, characterized in that: When the key exchange algorithm is the RSA algorithm, generating the pre-master key based on the encryption algorithm and the quantum key set includes: Acquire a third quantum key from the quantum key set; The third quantum key is used as the pre-master key.
8. The SSL communication method according to claim 7, characterized in that: When the key exchange algorithm is the RSA algorithm, quantum key enhancement is performed on the Client Key Exchange message based on the quantum key set to obtain an enhanced Client Key Exchange message, including: Performing calculation on the third quantum key according to a preset algorithm to obtain a third calculated value; An encryption operation is performed on the third calculated value and the key identifier of the third quantum key based on the RSA algorithm to obtain the enhanced Client Key Exchange message.
9. An SSL communication method, applied to an SSL server, characterized in that: include: Acquire a quantum key set through a quantum key distribution (QKD) network, wherein the quantum key set includes a plurality of quantum keys; Performing quantum key enhancement on the Server Hello message based on the quantum key in the quantum key set to obtain an enhanced Server Hello message; Receive the enhanced Client Hello message sent by the SSL client; The enhanced Client Hello message is obtained by the SSL client performing quantum key enhancement on the Client Hello message based on the quantum key set, and the SSL server obtains the quantum key set through the QKD network; Performing quantum key enhancement on a key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key; Generate a quantum session key based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key; Perform SSL communication based on the quantum session key; The step of performing quantum key enhancement on the Server Hello message based on the quantum key in the quantum key set to obtain an enhanced Server Hello message includes: Acquire a second quantum key and a corresponding key identifier from the quantum key set; Performing operations on the second quantum key according to a preset algorithm to generate a second calculated value; An enhanced Server Hello message is generated based on the second calculated value and the key identifier of the second quantum key.
10. The SSL communication method according to claim 9, characterized in that: Performing quantum key enhancement on a key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key includes: An encryption algorithm negotiation message is sent to the SSL client so that the SSL client obtains a key exchange algorithm; When the key exchange algorithm is the DH algorithm, an enhanced Server Key Exchange message is sent to the SSL client, so that the SSL client parses the enhanced Server Key Exchange message based on the quantum key set to obtain the pre-master key, wherein the enhanced Server Key Exchange message is obtained by the SSL server performing quantum key enhancement on the Server Key Exchange message based on the quantum key set.
11. The SSL communication method according to claim 10, characterized in that: Performing quantum key enhancement on the ServerKey Exchange message based on the quantum key set includes: Obtain any quantum key and a corresponding key identifier from the quantum key set; Using the quantum key to perform an XOR operation on the server DH public key to obtain a server enhanced DH public key; The enhanced Server Key Exchange message is generated based on the server enhanced DH public key and the key identifier.
12. An SSL communication device, applied to an SSL client, characterized in that: include: A quantum key set acquisition module, used to acquire a quantum key set through a quantum key distribution QKD network, wherein the quantum key set includes a plurality of quantum keys; A Client Hello message enhancement module, configured to perform quantum key enhancement on the Client Hello message based on the quantum key in the quantum key set to obtain an enhanced Client Hello message; Server Hello message receiving module, used to receive enhanced Server Hello message sent by SSL server; A pre-master key acquisition module, used to perform quantum key enhancement on the key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key; A quantum session key generation module, used to generate a quantum session key based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key; An SSL communication module, used for performing SSL communication based on the quantum session key; The Client Hello message enhancement module is further used to obtain a first quantum key and a corresponding key identifier from the quantum key set; operate the first quantum key according to a preset algorithm to generate a first calculated value; An enhanced Client Hello message is generated based on the first calculated value and the key identifier of the first quantum key.
13. An SSL communication device, applied to an SSL server, characterized in that: include: A quantum key set acquisition module is used to acquire a quantum key set through a quantum key distribution (QKD) network, wherein the quantum key set includes a plurality of quantum keys; A Server Hello message enhancement module, configured to perform quantum key enhancement on the Server Hello message based on the quantum key in the quantum key set to obtain an enhanced Server Hello message; Client Hello message receiving module, used to receive enhanced Client Hello message sent by SSL client; A pre-master key acquisition module, used to perform quantum key enhancement on the key negotiation message between the SSL server and the SSL client based on the quantum key set to obtain a pre-master key; A quantum session key generation module, used to generate a quantum session key based on the enhanced Client Hello message, the enhanced Server Hello message and the pre-master key; An SSL communication module, used for performing SSL communication based on the quantum session key; The Server Hello message enhancement module is further used to obtain a second quantum key and a corresponding key identifier from the quantum key set; operate the second quantum key according to a preset algorithm to generate a second calculated value; and generate an enhanced Server Hello message based on the second calculated value and the key identifier of the second quantum key.
14. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the SSL communication method according to any one of claims 1 to 11 by executing the executable instructions.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the SSL communication method according to any one of claims 1 to 11 is implemented.
