Encrypted communication method, related equipment and encrypted communication system
By sending the PSK home information to the server device in the handshake process of the TLS protocol, the problem of determining PSK identification under various acquisition methods is solved, and the handshake efficiency and data transmission security between the client device and the server device are improved.
Patent Information
- Application Number
- CN202310639113.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2024-12-03
AI Technical Summary
In the TLS protocol handshake process, when there are multiple ways to obtain PSK between the client device and the server device, it is difficult for the server device to determine the PSK corresponding to the PSK identification, resulting in the failure of the handshake.
The client device sends the PSK corresponding home information to the server device, including the configuration type to which the PSK belongs or the identification of the PSK provider. The server device determines the key distribution system for the PSK belongs to based on this information, thereby improving the handshake efficiency.
By providing home information, the number of message interactions is reduced, communication resources is saved, handshake efficiency is improved, and the risk of PSK leakage is reduced through the security of quantum keys, and the security of data transmission is enhanced.
Smart Images

Figure CN119070974A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to an encrypted communication method, related equipment and an encrypted communication system. Background Art
[0002] Pre-shared key (PSK) is an important component of the transport layer security (TLS) protocol. PSK can be used to perform identity authentication during the handshake process of the TLS protocol and can also participate in the key derivation process of the TLS protocol.
[0003] In the handshake process of the TLS protocol, the client device first obtains the PSK in a preset manner, and then sends the PSK identifier corresponding to the PSK to the server device. The server device obtains the PSK corresponding to the PSK identifier in the same manner as the client device.
[0004] In actual applications, there may be multiple ways to obtain PSK between the same group of client devices and server devices. For example, the client devices and server devices support multiple PSK configuration types (such as manually written configuration types and hardware written configuration types), or there are multiple PSK providers between the client devices and server devices. When there are multiple optional ways to obtain PSK between the client devices and server devices, if the server device receives a PSK identifier from the client device, it is difficult for the server device to determine the PSK corresponding to the PSK identifier through the PSK identifier, which results in a handshake failure between the client device and the server device. Summary of the invention
[0005] The present application provides an encrypted communication method, related devices and an encrypted communication system for improving the handshake efficiency between a client device and a server device.
[0006] In a first aspect, the present application provides a method for encrypted communication. The client device obtains a PSK, and the PSK obtained by the server device should be the same as that of the client device. Therefore, the client device sends the attribution information corresponding to the PSK to the server device, and the attribution information includes at least one of the configuration type to which the PSK belongs or the identifier of the provider of the PSK. After the server device receives the attribution information corresponding to the PSK from the client device, the server device determines the key distribution system to which the PSK belongs based on the attribution information, thereby improving the handshake efficiency between the client device and the server device.
[0007] Based on the first aspect, in an optional implementation, the attribution information is carried in a handshake request message sent by the client device to the server device. Specifically, the handshake request message includes a first indication field, a second indication field, and a PSK identifier corresponding to the PSK, wherein the first indication field carries the configuration type to which the PSK belongs, and the second indication field carries the identifier of the provider of the PSK. The client device carries the configuration type to which the PSK belongs, the identifier of the provider of the PSK, and the PSK identifier in a handshake request message, and sends the handshake request message to the server device, thereby reducing the number of message interactions between the client device and the server device, saving communication resources, and improving handshake efficiency.
[0008] Based on the first aspect, in an optional implementation, the first indication field is included in the first extension header of the handshake request message, and the second indication field and the PSK identifier corresponding to the PSK are included in the second extension header of the handshake request message. That is, the first indication field and the second indication field are respectively included in different extension headers of the handshake request message.
[0009] Based on the first aspect, in an optional implementation, the client device indicates to the server device the configuration type of the PSK that the client device wants to use through a handshake request message. Specifically, the handshake request message includes a first indication field, and the first indication field carries the configuration type to which the PSK belongs.
[0010] After the server device receives the handshake request message from the client device, the first indication field in the handshake request message carries the configuration type to which the PSK belongs. The server device can determine whether it supports the configuration type of the PSK specified by the client device. If the server device supports the configuration type of the PSK specified by the client device, the server device sends a response message to the client device for the handshake request message, and the response message indicates that the server device supports the configuration type to which the PSK belongs.
[0011] Based on the first aspect, in an optional implementation, after the client device receives a response message from the server device, it determines that the server device supports the configuration type of the PSK specified by the client device based on the response message. Thus, the client device obtains the PSK based on the configuration type of the PSK. The client device sends an exchange message to the server device, and the exchange message carries the identifier of the provider of the PSK and the PSK identifier corresponding to the PSK, wherein the identifier of the provider of the PSK is carried in the second indication field contained in the exchange message.
[0012] Based on the first aspect, in an optional implementation, the client device obtains QK through the QKD system, and the client device determines the QK as the PSK in the handshake process between the client device and the server device. Thus, the extremely high security of the quantum key is utilized to reduce the risk of PSK leakage between the client device and the server device.
[0013] Based on the first aspect, in an optional implementation, the configuration type to which the PSK in the belonging information belongs indicates that the PSK is a quantum key type.
[0014] Based on the first aspect, in an optional implementation, the attribution information also includes at least one of the field length of the PSK or the check function of the PSK. In practical applications, the field length of the PSK and the check function of the PSK greatly affect the security of the PSK. The client device further informs the server device of the field length of the PSK or at least one of the check functions of the PSK through the attribution information, so that the server device performs a security check on the PSK according to the field length of the PSK or the check function of the PSK. If the field length of the PSK or the check function of the PSK passes the security check of the server device, the server device allows the handshake process between the client device and the server device to be executed with the PSK; if the field length of the PSK or the check function of the PSK fails to pass the security check of the server device, the server device terminates the handshake process between the client device and the server device. In the handshake process between the client device and the server device, the security check of the PSK is performed, thereby improving the security of data transmission between the client device and the server device.
[0015] In a second aspect, the present application provides a method for encrypted communication, the method comprising:
[0016] The server device receives attribution information corresponding to the PSK from the client device, wherein the attribution information includes at least one of a configuration type to which the PSK belongs or an identifier of a provider of the PSK;
[0017] The server device determines the key distribution system to which the PSK belongs based on the belonging information.
[0018] Based on the second aspect, in an optional implementation manner, the server device receives the attribution information corresponding to the PSK from the client device, including:
[0019] The server device receives a handshake request message from the client device, where the handshake request message includes a first indication field, a second indication field, and a PSK identifier corresponding to the PSK, wherein the first indication field carries the configuration type to which the PSK belongs, and the second indication field carries the identifier of the provider of the PSK.
[0020] Based on the second aspect, in an optional implementation, the first indication field is included in a first extended header of the handshake request message, and the second indication field and a PSK identifier corresponding to the PSK are included in a second extended header of the handshake request.
[0021] Based on the second aspect, in an optional implementation manner, the server device receives the attribution information corresponding to the PSK from the client device, including:
[0022] The server device receives a handshake request message from the client device, where the handshake request message includes a first indication field, wherein the first indication field carries a configuration type to which the PSK belongs.
[0023] Based on the second aspect, in an optional implementation manner, the method further includes:
[0024] The server device sends a response message to the client device in response to the handshake request message, where the response message indicates that the server device supports the configuration type to which the PSK belongs;
[0025] The server device receives an exchange message from the client device, the exchange message carrying an identifier of a PSK provider and a PSK identifier corresponding to the PSK, wherein the identifier of the PSK provider is carried in a second indication field included in the exchange message.
[0026] Based on the second aspect, in an optional implementation, the configuration type to which the PSK in the belonging information belongs indicates a quantum key type, and the server device determines the key distribution system to which the PSK belongs according to the belonging information, including:
[0027] The server device determines the quantum key distribution QKD system to which the PSK belongs based on the ownership information.
[0028] Based on the second aspect, in an optional implementation, the attribution information further includes at least one of a field length of the PSK or a check function of the PSK.
[0029] Based on the second aspect, in an optional implementation manner, the method further includes:
[0030] The server device determines whether the PSK satisfies the security check according to at least one of the field length of the PSK or the check function of the PSK;
[0031] If so, the server device executes the step of determining the key distribution system to which the PSK belongs according to the belonging information.
[0032] The information interaction and execution process and other contents of the implementation method shown in this aspect are based on the same concept as the implementation method shown in the first aspect. Therefore, for the description of the beneficial effects shown in this aspect, please refer to the above-mentioned first aspect, and the details will not be repeated here.
[0033] In a third aspect, the present application provides a client device, which includes a processing unit and a transceiver unit.
[0034] A processing unit, used for obtaining a pre-shared key PSK;
[0035] The transceiver unit is used to send the belonging information corresponding to the PSK to the server device, so that the server device determines the key distribution system to which the PSK belongs according to the belonging information, wherein the belonging information includes at least one of the configuration type to which the PSK belongs or the identifier of the provider of the PSK.
[0036] Based on the third aspect, in an optional implementation, the transceiver unit is specifically used to send a handshake request message to the server device, the handshake request message includes a first indication field, a second indication field and a PSK identifier corresponding to the PSK, wherein the first indication field carries the configuration type to which the PSK belongs, and the second indication field carries the identifier of the provider of the PSK.
[0037] Based on the third aspect, in an optional implementation, the first indication field is included in a first extension header of the handshake request message, and the second indication field and a PSK identifier corresponding to the PSK are included in a second extension header of the handshake request message.
[0038] Based on the third aspect, in an optional implementation, the transceiver unit is specifically used to send a handshake request message to the server device, and the handshake request message includes a first indication field, wherein the first indication field carries the configuration type to which the PSK belongs.
[0039] Based on the third aspect, in an optional implementation, the transceiver unit is also used to receive a response message from the server device to the handshake request message, the response message indicating that the server device supports the configuration type to which the PSK belongs; and send an exchange message to the server device, the exchange message carrying an identifier of the provider of the PSK and a PSK identifier corresponding to the PSK, wherein the identifier of the provider of the PSK is carried in a second indication field contained in the exchange message.
[0040] Based on the third aspect, in an optional implementation, the processing unit is specifically used to obtain a quantum key QK through a quantum key distribution QKD system; and determine that QK is PSK.
[0041] Based on the third aspect, in an optional implementation, the configuration type to which the PSK in the belonging information belongs indicates a quantum key type.
[0042] Based on the third aspect, in an optional implementation, the attribution information further includes at least one of a field length of the PSK or a check function of the PSK.
[0043] The information interaction and execution process and other contents of the implementation method shown in this aspect are based on the same concept as the implementation method shown in the first aspect. Therefore, for the description of the beneficial effects shown in this aspect, please refer to the above-mentioned first aspect, and the details will not be repeated here.
[0044] In a fourth aspect, the present application provides a server device, which includes a transceiver unit and a processing unit.
[0045] A transceiver unit, configured to receive attribution information corresponding to a PSK from a client device, wherein the attribution information includes at least one of a configuration type to which the PSK belongs or an identifier of a provider of the PSK;
[0046] The processing unit is used to determine the key distribution system to which the PSK belongs according to the belonging information.
[0047] Based on the fourth aspect, in an optional implementation, the transceiver unit is specifically used to receive a handshake request message from a client device, the handshake request message includes a first indication field, a second indication field and a PSK identifier corresponding to the PSK, wherein the first indication field carries the configuration type to which the PSK belongs, and the second indication field carries the identifier of the provider of the PSK.
[0048] Based on the fourth aspect, in an optional implementation, the first indication field is included in a first extended header of the handshake request message, and the second indication field and the PSK identifier corresponding to the PSK are included in a second extended header of the handshake request.
[0049] Based on the fourth aspect, in an optional implementation, the transceiver unit is specifically used to receive a handshake request message from a client device, where the handshake request message includes a first indication field, wherein the first indication field carries a configuration type to which the PSK belongs.
[0050] Based on the fourth aspect, in an optional implementation, the processing unit is further used to send a response message to the client device for the handshake request message, the response message indicating that the server device supports the configuration type to which the PSK belongs;
[0051] The transceiver unit is further used to receive an exchange message from a client device, the exchange message carrying an identifier of a PSK provider and a PSK identifier corresponding to the PSK, wherein the identifier of the PSK provider is carried in a second indication field included in the exchange message.
[0052] Based on the fourth aspect, in an optional implementation, the configuration type to which the PSK in the belonging information belongs indicates the quantum key type, and the processing unit is specifically used for the server device to determine the quantum key distribution QKD system to which the PSK belongs based on the belonging information.
[0053] Based on the fourth aspect, in an optional implementation, the attribution information further includes at least one of a field length of the PSK or a check function of the PSK.
[0054] Based on the fourth aspect, in an optional implementation, the processing unit is also used to determine whether the PSK meets the security verification based on the field length of the PSK or at least one of the verification functions of the PSK; if so, the processing unit executes the step of determining the key distribution system to which the PSK belongs based on the attribution information.
[0055] In a fifth aspect, the present application provides a network device, which includes a processor coupled to a memory, the memory being used to store instructions, and when the instructions are executed by the processor, the device implements the method in the first aspect or any possible implementation of the first aspect.
[0056] In a sixth aspect, the present application provides a network device, which includes a processor coupled to a memory, the memory being used to store instructions, and when the instructions are executed by the processor, the device implements the method in the second aspect or any possible implementation of the second aspect.
[0057] In a seventh aspect, the present application provides an encrypted communication system, the encrypted communication system comprising the network device as described in the fifth aspect, and the network device as described in the sixth aspect.
[0058] In an eighth aspect, the present application provides a computer-readable storage medium having instructions stored thereon, which, when executed, causes a computer to execute the method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0059] In a ninth aspect, the present application provides a computer-readable storage medium having instructions stored thereon, which, when executed, causes a computer to execute the method in the second aspect or any possible implementation of the second aspect.
[0060] In the tenth aspect, an embodiment of the present application provides a chip, including a memory and a processor, the memory being used to store computer instructions, and the processor being used to call and run the computer instructions from the memory to execute the method of the above-mentioned first aspect and any possible implementation of the first aspect, or to execute the above-mentioned second aspect and any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0062] Figure 1 This is a handshake process diagram for PSK application in TLS1.3 protocol;
[0063] Figure 2 This is a handshake process diagram for PSK application in TLS1.2 protocol;
[0064] Figure 3 A schematic diagram of the framework of the encrypted communication system provided in the embodiment of the present application;
[0065] Figure 4 A schematic diagram of a flow chart of an encrypted communication method in an embodiment of the present application;
[0066] Figure 5 A schematic diagram of the framework of the key distribution system in an embodiment of the present application;
[0067] Figure 6 Another schematic diagram of the encrypted communication method in the embodiment of the present application;
[0068] Figure 7 A schematic diagram of a scenario where a client device and a server device are connected to multiple key distribution systems at the same time;
[0069] Figure 8 A schematic diagram of the structure of a client device provided in an embodiment of the present application;
[0070] Fig. 9 A schematic diagram of the structure of a server device provided in an embodiment of the present application;
[0071] Fig.10 A schematic diagram of the logical structure of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0072] The embodiments of the present application provide an encrypted communication method, related devices and an encrypted communication system for improving the handshake efficiency between a client device and a server device.
[0073] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation mode of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the embodiments of the present application. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0074] In the embodiments of the present application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.
[0075] The terms "first", "second", "third", "fourth" and the like (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0076] Some nouns or terms used in the embodiments of the present application are explained below, and these nouns or terms are also considered as part of the content of the invention.
[0077] The transport layer security (TLS) protocol is an encryption protocol used to provide confidentiality and data integrity between two communicating applications (such as a client device and a server device) to prevent data from being eavesdropped or tampered with during transmission. The TLS protocol is roughly divided into two phases: the handshake phase and the data transmission phase. During the handshake phase, the client device and the server device of the TLS protocol negotiate a set of encryption algorithms and integrity verification algorithms for protecting data transmission, as well as the keys used by each algorithm. After the client device and the server device complete the handshake process of the TLS protocol, the negotiated algorithms and keys are used to protect the data transmitted between the client device and the server device.
[0078] Quantum communication, as one of the frontier fields of physics today, is the first development direction of quantum information science towards practical application. The core of quantum communication is quantum key distribution, which is based on the basic physical principles of quantum mechanics, solves the problem of secure key distribution, and can achieve theoretically unconditionally secure confidential communication. With the development of quantum cryptography technology, quantum key distribution, as a typical application of quantum cryptography, has become a research hotspot for scholars. By building a quantum secure communication network, constructing a key pool on each network node, and realizing confidential communication between network nodes, quantum key distribution can be achieved across the entire network.
[0079] Quantum Key Distribution (QKD) uses quantum microscopic effects to unconditionally and securely establish the same quantum key (QK) between two legal communicating parties. QKD is a hardware-based method. The security of QKD comes from quantum mechanics and has unconditional security, which enables the communicating parties to generate and share random and secure keys to encrypt and decrypt messages. Even if the eavesdropper is given unlimited computing resources, the eavesdropper cannot crack it using the decryption algorithm. The security foundation of QKD is that the key source is unpredictable and the channel eavesdropping is detectable. On the one hand, the QKD key source is a quantum true random number that cannot be predicted. On the other hand, the quantum state sent into the channel satisfies the quantum no-cloning theorem. The eavesdropping behavior in the channel will disturb the quantum state, which can be detected by the receiver. Moreover, QKD can continuously produce keys, and the application side can continuously update the keys.
[0080] Pre-shared key (PSK) is an important component of the transport layer security (TLS) protocol. PSK can be used to perform identity authentication during the handshake process of the TLS protocol, and can also participate in the key derivation process of the TLS protocol to enhance the quantum resistance of the key negotiation process.
[0081] In the handshake process of the TLS protocol, the client device first obtains the PSK in a preset manner, and then sends the PSK identifier corresponding to the PSK to the server device, and the server device obtains the PSK corresponding to the PSK identifier in the same manner as the client device. Next, the application of PSK in the handshake process of the TLS1.3 protocol is introduced in conjunction with the accompanying drawings.
[0082] See also Figure 1 , Figure 1 The following is a handshake flow diagram of PSK application in TLS1.3 protocol. Figure 1As shown, in the handshake process in the TLS1.3 protocol, the client device sends a handshake request message (ie, ClientHello message) to the server device, wherein the ClientHello message includes a psk_key_exchange_mode extension and a pre_shared_key extension. Specifically, the psk_key_exchange_mode extension is used to instruct the server device how to use PSK during the key negotiation process. Optionally, the psk_key_exchange_mode extension is enum{psk_ke0), psk_dhe_ke(1),(255)}PskKeyExchangeMode, where if the value of the psk_ke field is 0, it indicates that only PSK participates in the key negotiation process; if the value of the psk_dhe_ke field is 1, it indicates that the key negotiation process is participated in by PSK and the Diffie-Hellman over either finitefields or elliptic curves (ECC) algorithm. In actual applications, the psk_key_exchange_mode extension is generally only sent by the client device and is only carried in the ClientHello message.
[0083] For the pre_shared_key extension carried in the ClientHello message, the pre_shared_key extension in the ClientHello message is used to inform the server device which PSKs are available. Optionally, the format of this extension is defined as struct{PskIdentity identities; PskBinderEntry binders}OfferedPsks. Among them, the PskIdentity identities field in the pre_shared_key extension is the ID list corresponding to the PSK provided by the client device, and the PskBinderEntry binders field is the authentication field calculated based on the PSK.
[0084] After the server device receives the handshake request message (ClientHello message), it needs to select a PSK through the PskIdentity identities field in the pre_shared_key extension of the ClientHello message. Then, the server device sends a response message (i.e., ServerHello message) to the client device in response to the handshake request message. Among them, the ServerHello message includes the pre_shared_key extension, and the message format of the pre_shared_key extension applied in the client device and the server device is different. The pre_shared_key extension in the ServerHello message sent by the server device is used to inform the client device of the result of the server device selecting the PSK. Optionally, the format of the pre_shared_key extension is defined as struct{opaque identity;uint32obfuscated_ticket_age}PskIdentity, where opaque identity represents the identifier of the PSK selected by the server device, and obfuscated_ticket_age represents the life cycle (aging time) of the PSK selected by the server device.
[0085] See also Figure 2 , Figure 2 The following is a handshake flow diagram of PSK application in TLS1.2 protocol. Figure 2As shown, in the handshake process in the TLS1.2 protocol, the client device sends a handshake request message (i.e., ClientHello message) to the server device, wherein the ClientHello message carries the PSK encryption suite that can be selected by the server. After receiving the ClientHello message, the server device sends a response message (i.e., ServerHello message) to the Client device for the ClientHello message, and the ServerHello message indicates the PSK encryption suite selected by the server device. Optionally, the ServerHello message carries the serverKeyExchange extension, and the psk_identity_hint field in the serverKeyExchange extension is used to indicate the server device's requirements for the selection of the PSK (e.g., the string length of the PSK). The client device receives the ServerHello message and selects the PSK according to the indication of the psk_identity_hint field in the serverKeyExchange extension. The client device carries the PSK identifier corresponding to the selected PSK in the ClientKeyExchange message sent to the server device. After receiving the ClientKeyExchange message, the server device obtains the PSK corresponding to the PSK identifier through the key distribution system according to the PSK identifier in the ClientKeyExchange message.
[0086] As can be seen from the above, the server device obtains the PSK corresponding to the PSK identifier based on the PSK identifier from the client device. In actual applications, there may be multiple ways of obtaining PSK between the same group of client devices and server devices. For example, the client device and the server device support multiple PSK configuration types (such as configuration types written manually and configuration types written by hardware) at the same time, or there are multiple PSK providers between the client device and the server device. When there are multiple optional ways to obtain PSK between the client device and the server device, if the server device receives the PSK identifier from the client device, it is difficult for the server device to determine the PSK corresponding to the PSK identifier through the PSK identifier, which causes the handshake failure between the client device and the server device.
[0087] For example, the client device and the server device negotiated the configuration type of the manually written PSK and the configuration type of the hardware written PSK at the same time. The client device obtains the PSK and the PSK identifier corresponding to the PSK through the manually written configuration type, and sends the PSK identifier to the server device. After receiving the PSK identifier, the server device may use the PSK identifier to obtain the PSK with the hardware written configuration type, so that the server device cannot successfully obtain the PSK that matches the PSK identifier, resulting in a handshake failure between the client device and the server device.
[0088] For another example, the client device and the server device negotiate multiple PSK providers (such as PSK provider A and provider B) at the same time. The client device obtains the PSK and the PSK identifier corresponding to the PSK from provider A, and sends the PSK identifier to the server device. After receiving the PSK identifier, the server device may obtain the PSK corresponding to the PSK identifier from provider B, so that the server device cannot successfully obtain the PSK that matches the PSK identifier, resulting in a handshake failure between the client device and the server device.
[0089] In view of this, the embodiments of the present application provide a method for encrypted communication, related devices and an encrypted communication system for improving the handshake efficiency between a client device and a server device. The encrypted communication method of the present application is suitable for Figure 3 The encrypted communication system provided by the embodiment of the present application is shown in FIG. The encrypted communication system at least includes: Figure 3 The client device and the server device shown in . The client device obtains the PSK, and the PSK obtained by the server device should be the same as that of the client device. Therefore, the client device sends the attribution information corresponding to the PSK to the server device, and the attribution information includes at least one of the configuration type to which the PSK belongs or the identifier of the provider of the PSK. After the server device receives the attribution information corresponding to the PSK from the client device, the server device determines the key distribution system to which the PSK belongs based on the attribution information, thereby improving the handshake efficiency between the client device and the server device.
[0090] Optionally, the attribution information includes the configuration type to which the PSK belongs or the identifier of the provider of the PSK, that is, after the client device obtains the PSK, it informs the server device through the attribution information of the configuration type and provider to which the PSK specifically belongs. Exemplarily, a plurality of PSK configuration types are negotiated between the client device and the server device, specifically including manually written configuration types, hardware written configuration types, and quantum key configuration types. Among them, for the configuration type of the quantum key, there are multiple quantum key providers (supplier A, supplier B, and supplier C) to choose from. If the client device selects the configuration type of the quantum key and selects supplier B as the provider of the PSK, the attribution information includes the configuration type to which the PSK belongs (the configuration type of the quantum key) or the identifier of the provider of the PSK (the identifier of supplier B), so that the server device determines the key distribution system to which the PSK belongs based on the attribution information, and the key distribution system corresponds to supplier B in the configuration type of the quantum key.
[0091] Optionally, the attribution information includes the configuration type to which the PSK belongs, but does not include the identifier of the provider of the PSK, that is, after the client device obtains the PSK, it informs the server device through the attribution information of the configuration type to which the PSK belongs. Exemplarily, a plurality of PSK configuration types are negotiated between the client device and the server device, specifically including manually written configuration types, hardware written configuration types, and quantum key configuration types. Among them, for each PSK configuration type, there is only one PSK provider to choose from. If the client device selects the quantum key configuration type, the attribution information includes the configuration type to which the PSK belongs (the quantum key configuration type), so that the server device determines that the PSK belongs to the quantum key configuration type based on the attribution information. However, there is only one PSK provider for the quantum key configuration type between the client device and the server device, so the only provider for the quantum key configuration type is the key distribution system to which the PSK belongs.
[0092] Optionally, the attribution information includes the identifier of the provider of the PSK, but does not include the configuration type to which the PSK belongs, that is, after the client device obtains the PSK, it informs the server device through the attribution information of the provider to which the PSK belongs. Exemplarily, a unique configuration type of PSK is negotiated between the client device and the server device, such as the configuration type of the quantum key. Among them, for the configuration type of the quantum key, there are multiple PSK providers (supplier A, supplier B and supplier C) to choose from. If the client device selects supplier B, the attribution information includes the identifier of the provider of the PSK (the identifier of supplier B). After the server device receives the attribution information, since only the PSK configuration type of the quantum key is negotiated between the client device and the server device, the server device determines that the PSK belongs to the PSK configuration type of the quantum key, and determines that supplier B is the key distribution system to which the PSK belongs based on the identifier of supplier B in the attribution information.
[0093] For the convenience of description, in the embodiment of the present application, the attribution information includes the configuration type to which the PSK belongs and the identifier of the provider of the PSK as an exemplary description.
[0094] The client device and the server device in the embodiment of the present application are entities for sending signals, or receiving signals, or sending and receiving signals. In an encrypted communication system, the client device and the server device communicate through a wireless network, a wired network, a removable storage medium or other dedicated data communication technology. Among them, the wireless network is usually the Internet, but it can also be any network, including but not limited to any combination of Bluetooth, Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, dedicated network or virtual private network. The removable storage medium can be a Universal Serial Bus (USB) flash drive, a mobile hard disk or other removable storage medium, etc., and this application is not limited here.
[0095] In an embodiment of the present application, the client device and the server device obtain PSK through a key distribution system. Specifically, in the key distribution system, multiple PSKs and multiple PSK identifiers are stored, and each PSK corresponds to a PSK identifier in the key distribution system. After the server device sends the PSK identifier to the key distribution system, the key distribution system can find the corresponding PSK according to the PSK identifier and send it to the server device. In practical applications, the key distribution system is a physical device or software service for storing, managing and providing PSK. Optionally, the key distribution system can be integrated and deployed in the client device and the server device. For example, in a PSK scenario of a manually configured configuration type or a PSK scenario of a hardware-written configuration type, the key distribution system is a database for storing PSK in the client device and the server device. In this scenario, the key distribution system is a software service integrated and deployed in the client device and the server device. The client device and the server device obtain PSK through the key distribution system, which is equivalent to obtaining PSK through local PSK data; for example, in a PSK scenario of a quantum key type, the key distribution system is an independent physical device (such as a QKD server) that stores, manages and provides PSK. Figure 3 As shown, the client device and the server device interact with the key distribution system (for example, obtaining PSK and sending and receiving PSK identifiers) through the key management entity (KME) of the key distribution system.
[0096] Next, the encryption communication method in the embodiment of the present application is introduced. Specifically, the encryption communication method is applicable to the TLS1.3 protocol and the TLS1.2 protocol, or is also applicable to the PSK negotiation process of other communication protocols, which is not limited in the embodiment of the present application.
[0097] First, the encrypted communication method in the embodiment of the present application is applied to the TLS1.3 protocol as an example to introduce the encrypted communication method in the embodiment of the present application. Figure 4 , Figure 4 This is a flow chart of the encrypted communication method in the embodiment of the present application. The encrypted communication method can be applied to Figure 3 In the encrypted communication system shown in FIG. Figure 3 The client device and the server device in the illustrated encrypted communication system are used as the execution subject of the interaction diagram to illustrate the method, but the present application does not limit the execution subject of the interaction diagram. Figure 4 The client device in the method may also be a chip, a chip system, or a processor that supports the client device to implement the method, or may be a logic node, a logic module, or software that can implement all or part of the functions of the client device; Figure 4The server device in the method may also be a chip, a chip system, or a processor that supports the server device to implement the method, or a logical node, a logical module, or software that can implement all or part of the server device functions. Figure 4 As shown, the encryption communication method in the embodiment of the present application includes but is not limited to steps 101 to 104.
[0098] 101. The client device obtains the PSK.
[0099] At least one key distribution system is negotiated between the client device and the server device. The client device selects a key distribution system for providing PSK, and obtains PSK for encrypted communication with the server device through the key distribution system. In the embodiment of the present application, the key distribution system is a physical device or software service for storing, managing and providing PSK. A PSK provider in a PSK configuration type corresponds to an independent key distribution system. For example, Figure 5 As shown, in the PSK configuration type scenario of the quantum key, supplier A, supplier B and supplier C are all PSK providers, then supplier A, supplier B and supplier C are independent key distribution systems (key distribution system A, key distribution system B and key distribution system C).
[0100] In the embodiment of the present application, on the one hand, at least one PSK configuration type can be supported simultaneously between the client device and the server device. Optionally, the client device obtains PSK based on a manually configured configuration type, or obtains PSK based on a hardware-written configuration type, or obtains PSK based on a quantum key configuration type, or the client device can also obtain PSK based on other configuration types. In the embodiment of the present application, there is no specific limitation on the configuration type of PSK.
[0101] On the other hand, for the same PSK configuration type, there can be at least one PSK provider between the client device and the server device. For example, for the quantum key configuration type, the client device and the server device can negotiate and select one of the providers A, B or C as the PSK provider.
[0102] In actual applications, the key distribution system stores multiple PSKs and multiple PSK identifiers, and each PSK corresponds to a PSK identifier in the key distribution system. When a client device obtains a PSK through the key distribution system, it also obtains the PSK identifier corresponding to the PSK.
[0103] 102. The client device sends a handshake request message to the server device, wherein the attribution information is carried in the handshake request message.
[0104] After the client device obtains the PSK, the server device needs to obtain a PSK that is the same as the client device. Therefore, the client device sends the attribution information corresponding to the PSK to the server device, and the attribution information includes at least one of the configuration type to which the PSK belongs or the identifier of the provider of the PSK. The attribution information is used by the server device to determine the key distribution system to which the PSK belongs. In the TLS1.3 protocol, the attribution information in the embodiment of the present application is carried in the handshake request message sent by the client device to the server device. Specifically, the handshake request message includes a first indication field, a second indication field, and a PSK identifier corresponding to the PSK, wherein the first indication field carries the configuration type to which the PSK belongs, and the second indication field carries the identifier of the provider of the PSK. The client device carries the configuration type to which the PSK belongs, the identifier of the provider of the PSK, and the PSK identifier in a handshake request message and sends it to the server device, thereby reducing the number of message interactions between the client device and the server device, saving communication resources, and improving handshake efficiency.
[0105] In a possible implementation, the first indication field is included in the first extension header of the handshake request message, and the second indication field and the PSK identifier corresponding to the PSK are included in the second extension header of the handshake request message. That is, the first indication field and the second indication field are respectively included in different extension headers of the handshake request message.
[0106] In a possible implementation, the attribution information also includes at least one of the field length of the PSK or the verification function of the PSK. In practical applications, the field length of the PSK and the verification function of the PSK greatly affect the security of the PSK. The client device further informs the server device of the field length of the PSK or at least one of the verification functions of the PSK through the attribution information, so that the server device performs a security check on the PSK according to the field length of the PSK or the verification function of the PSK. If the field length of the PSK or the verification function of the PSK passes the security check of the server device, the server device allows the handshake process between the client device and the server device to be executed with the PSK; if the field length of the PSK or the verification function of the PSK fails to pass the security check of the server device, the server device terminates the handshake process between the client device and the server device. In the handshake process between the client device and the server device, the security check of the PSK is performed, thereby improving the security of data transmission between the client device and the server device.
[0107] Exemplarily, in the handshake request message of the embodiment of the present application, on the one hand, a PskType extension is added as the first extension header to carry the first indication information. The PskType extension is carried in the handshake request message (ClientHello message) of the TLS1.3 protocol. Optionally, the PskType extension is defined as: enum{qkd_psk(0),(255)}PskType. On the other hand, the pre_shared_key extension in the TLS1.3 protocol is modified as the second extension header to carry the second indication information. Optionally, the format of the modified pre_shared_key extension in the embodiment of the present application is defined as struct{InnerPskIdentity identitits; PskBinderEntry binders}PskIdentity. Specifically, for the InnerPskIdentity field in the pre_shared_key extension, the total length limit for the opaqueidentity field in the TLS1.3 protocol is met, that is, the total length of the InnerPskIdentity field cannot exceed 2^16-1 bytes. For example, the InnerPskIdentity field can be defined and processed as follows:
[0108] Struct{
[0109] opaque domain_id<1...2^16-1>
[0110] opaque identity<1...2^16-1>
[0111] opaque extension<0...2^16-1>
[0112] }InnerPskIdentity. Among them, the opaque domain_id field represents the identifier of the provider of the PSK. For example, the identifier of the provider of the PSK can be the domain name of the key distribution system; the opaque identity field represents the PSK identifier corresponding to the PSK selected by the client device. In the same key distribution system, one PSK identifier corresponds to one PSK. In other words, the PSK identifier is unique; the opaque extension field is used to carry other additional information related to the PSK. The opaque extension field is optional. Optionally, the opaque extension field can carry at least one of the field length of the PSK or the verification function of the PSK. For example, the opaque extension field can be defined and processed as follows:
[0113] struct{
[0114] uint32 quantum_key_length;
[0115] uint16 target_kdf
[0116] }extension. Among them, quantum_key_length indicates the field length of PSK, target_kdf indicates the verification function of PSK, and the PskBinderEntry binders field in the pre_shared_key extension is the verification code calculated based on PSK and the verification function corresponding to the PSK.
[0117] It should be understood that the above format definition of the first extension header and the first indication field is only an exemplary description. In practical applications, the first extension header and the first indication field can also be other formats for definition, which is not limited in the embodiments of the present application.
[0118] 103. The server device determines the key distribution system to which the PSK belongs based on the belonging information.
[0119] After receiving the handshake request message from the client device, the server device determines the configuration type to which the PSK belongs according to the first indication field in the handshake request message. Optionally, the client device obtains the QK through the QKD system, and the client device determines the QK as the PSK in the handshake process between the client device and the server device. Thus, the extremely high security of the quantum key is utilized to reduce the risk of PSK leakage between the client device and the server device. Furthermore, the configuration type to which the PSK belongs in the attribution information indicates that the PSK is a quantum key type.
[0120] The server device determines the provider of the PSK according to the second indication field in the handshake request message (specifically the opaque domain_id field in the pre_shared_key extension), thereby determining the configuration type to which the PSK belongs and the provider of the PSK as the key distribution system to which the PSK belongs.
[0121] 104. The server device obtains the PSK through the key distribution system.
[0122] After the server device determines the key distribution system to which the PSK belongs, since in the same key distribution system, one PSK identifier only corresponds to one PSK, the server device can request the PSK corresponding to the PSK identifier from the key distribution system through the PSK identifier carried in the handshake request message. For example, if the server device determines that the PSK belongs to key distribution system A, the server device sends the PSK identifier to key distribution system A, thereby obtaining the PSK corresponding to the PSK identifier.
[0123] In the embodiment of the present application, the client device sends the attribution information corresponding to the PSK to the server device, and the attribution information includes at least one of the configuration type to which the PSK belongs or the identifier of the provider of the PSK. The server device determines the key distribution system to which the PSK belongs based on the attribution information, thereby improving the handshake efficiency between the client device and the server device.
[0124] Next, the encrypted communication method in the embodiment of the present application is introduced by taking the application of the encrypted communication method in the embodiment of the present application to the TLS1.2 protocol as an example. Figure 6 , Figure 6 Another schematic diagram of the encrypted communication method in the embodiment of the present application is shown in FIG. Figure 3 In the encrypted communication system shown in FIG. Figure 3 The client device and the server device in the illustrated encrypted communication system are used as the execution subject of the interaction diagram to illustrate the method, but the present application does not limit the execution subject of the interaction diagram. Figure 6 The client device in the method may also be a chip, a chip system, or a processor that supports the client device to implement the method, or may be a logic node, a logic module, or software that can implement all or part of the functions of the client device; Figure 6 The server device in the method may also be a chip, a chip system, or a processor that supports the server device to implement the method, or a logical node, a logical module, or software that can implement all or part of the server device functions. Figure 6 As shown, the encryption communication method in the embodiment of the present application includes but is not limited to steps 201 to 206.
[0125] 201. The client device sends a handshake request message to the server device, where the handshake request message includes a first indication field, wherein the first indication field carries a configuration type to which the PSK belongs.
[0126] The client device indicates to the server device the configuration type of the PSK that the client device wants to use through a handshake request message. Specifically, the handshake request message includes a first indication field, and the first indication field carries the configuration type to which the PSK belongs.
[0127] Exemplarily, in the handshake request message of the embodiment of the present application, on the one hand, a PskType extension is added as the first extension header to carry the first indication information. The PskType extension is carried in the handshake request message (ClientHello message) of the TLS1.2 protocol. Optionally, the PskType extension is defined as: enum{qkd_psk(0),(255)}PskType.
[0128] 202. The server device sends a response message to the client device in response to the handshake request message.
[0129] After the server device receives the handshake request message from the client device, the first indication field in the handshake request message carries the configuration type to which the PSK belongs. The server device can determine whether it supports the configuration type of the PSK specified by the client device. If the server device supports the configuration type of the PSK specified by the client device, the server device sends a response message to the client device for the handshake request message, and the response message indicates that the server device supports the configuration type to which the PSK belongs. Optionally, if the server device does not support the configuration type of the PSK specified by the client device, the server device can terminate this handshake process.
[0130] Exemplarily, the response message sent by the server device to the client device includes a ServerKeyExchange extension, and the psk_identity_hint field in the ServerKeyExchange extension is used to indicate that the server device supports the configuration type of the PSK specified by the client device. Optionally, if the response message sent by the server device to the client device does not include the ServerKeyExchange extension, or the ServerKeyExchange extension does not include the psk_identity_hint field, it can be indicated that the server device does not support the configuration type of the PSK specified by the client device, and the handshake process is terminated. In addition, if the server device has certain requirements for the PSK, the server device can also carry the server device's requirements for the PSK in the psk_identity_hint field in the ServerKeyExchange extension of the response message. For example, the server device can specify the field length of the PSK or the verification function of the PSK in the psk_identity_hint field.
[0131] 203. The client device obtains the PSK according to the response message.
[0132] After receiving the response message from the server device, the client device determines that the server device supports the configuration type of the PSK specified by the client device according to the response message. Thus, the client device obtains the PSK based on the configuration type of the PSK. Optionally, in actual applications, when the client device obtains the PSK, it also obtains the PSK identifier corresponding to the PSK.
[0133] Exemplarily, if the response message includes a ServerKeyExchange extension, and the ServerKeyExchange extension includes a psk_identity_hint field, the client device determines that the server device supports the configuration type of the PSK specified by the client device; if the response message does not include a ServerKeyExchange extension, or the ServerKeyExchange extension does not include a psk_identity_hint field, the client device determines that the server device does not support the configuration type of the PSK specified by the client device.
[0134] Furthermore, if the psk_identity_hint field in the ServerKeyExchange extension of the response message carries the server device's requirement for the PSK, the client device obtains a PSK that matches the server device's requirement based on the configuration type of the PSK.
[0135] In the embodiment of the present application, the content of the client device obtaining the PSK in step 203 is the same as the above Figure 4 The content of obtaining the PSK by the client device in step 101 of the corresponding embodiment is similar. Please refer to the description of the aforementioned step 101 for details, which will not be repeated here.
[0136] 204. The client device sends an exchange message to the server device, where the exchange message carries the identifier of the provider of the PSK and the PSK identifier corresponding to the PSK.
[0137] After the client device obtains the PSK and the PSK identifier corresponding to the PSK, it sends an exchange message to the server device, which carries the identifier of the PSK provider and the PSK identifier corresponding to the PSK, wherein the identifier of the PSK provider is carried in the second indication field included in the exchange message.
[0138] Exemplarily, the exchange message includes a ClientKeyExchange extension, which includes a domain_id field (i.e., the second indication field) and an identity field, wherein the domain_id field represents the identifier of the provider of the PSK, for example, the identifier of the provider of the PSK may be the domain name of the key distribution system; the identity field represents the PSK identifier corresponding to the PSK selected by the client device, and within the same key distribution system, one PSK identifier corresponds to one PSK.
[0139] 205. The server device determines the key distribution system corresponding to the PSK.
[0140] Through step 202, the server device determines the configuration type to which the PSK belongs. Through step 204, the server device determines the provider of the PSK based on the identifier of the provider of the PSK, so that the server device determines the key distribution system corresponding to the PSK.
[0141] 206. The server device obtains the PSK through the key distribution system.
[0142] In the embodiment of the present application, steps 205 to 206 are the same as those described above. Figure 4 Step 103 to step 104 of the corresponding embodiment are similar. Please refer to the description of the aforementioned step 103 to step 104 for details, which will not be repeated here.
[0143] It should be understood that the above Figure 4 The corresponding embodiments and Figure 6 The corresponding embodiments are only exemplary descriptions of the application of the encryption communication method in the embodiments of the present application to the TLS1.3 protocol and the TLS1.2 protocol. In actual applications, the encryption communication method in the embodiments of the present application is also applicable to the PSK negotiation process of other communication protocols, and the embodiments of the present application do not limit this.
[0144] On the other hand, in the embodiment of the present application, the execution sequence between the step "the client device obtains the PSK" and the step "the client device sends the attribution information to the server device" is not limited. Figure 4 The corresponding encrypted communication method is applied in the scenario of TLS1.3 protocol. The client device first obtains PSK and then sends the attribution information to the server device; for example, Figure 6 The corresponding encrypted communication method is applied in the scenario of TLS1.2 protocol. The client device first sends the configuration type of PSK in the attribution information to the server device, and then obtains the PSK.
[0145] As can be seen from the above, multiple key distribution systems can be supported simultaneously between the client device and the server device, for example, multiple PSK configuration types can be supported between the client device and the server device, or multiple PSK providers can be supported between the client device and the server device. In an embodiment of the present application, the client device can obtain multiple PSKs from different key distribution systems. Based on the needs of the actual application scenario, the server device selects one of the PSKs from the multiple PSKs to execute the handshake process, thereby improving the flexibility of the server device in selecting the PSK and facilitating the selection of a PSK that better meets the needs of the actual application scenario.
[0146] For example, Figure 7 As shown, the client device and the server device support both PSK configuration type A and PSK configuration type B, and there are multiple PSK providers (supplier B1 and supplier B2) for PSK configuration type B between the client device and the server device. Therefore, the client device and the server device support key distribution system A, key distribution system B1 and key distribution system B2 at the same time. In this scenario, the client device sends a handshake request to the server device, and the handshake request carries the configuration type of PSK in the attribution information. Optionally, the configuration type of the PSK indicates the configuration type B of the PSK. After receiving the handshake request, the server device sends a response message to the client device for the handshake request, and the response message indicates that the server device supports the configuration type B of the PSK. The client device obtains the PSK and the PSK identifier from supplier B1 and supplier B2 respectively through the configuration type B of the PSK. The client device sends an exchange message to the server device, and the exchange message carries the identifier of the provider of the PSK and the PSK identifier corresponding to the PSK. Specifically, the exchange message includes {the identifier of supplier B1, the PSK identifier corresponding to the PSK from supplier B1} and {the identifier of supplier B2, the PSK identifier corresponding to the PSK from supplier B2}. Exemplarily, the server device selects the PSK from supplier B1 according to the exchange message. Thus, the server sends the PSK identifier corresponding to the PSK from supplier B1 to supplier B1, thereby obtaining the PSK.
[0147] In order to better implement the above solution of the embodiment of the present application, accordingly, the embodiment of the present application also provides a related device for implementing the above solution. Figure 8 , Figure 8 A schematic diagram of the structure of a client device provided in an embodiment of the present application. The device may be a client device, or a component of a client device (such as a processor, a chip, or a chip system, etc.), or a logical node, a logical module, or software that can implement all or part of the functions of the client device. Figure 8As shown, the client device includes a processing unit 301 and a transceiver unit 302 .
[0148] The processing unit 301 is used to obtain a pre-shared key PSK;
[0149] The transceiver unit 302 is used to send the belonging information corresponding to the PSK to the server device, so that the server device determines the key distribution system to which the PSK belongs according to the belonging information, wherein the belonging information includes at least one of the configuration type to which the PSK belongs or the identifier of the provider of the PSK.
[0150] In one possible design, the transceiver unit 302 is specifically used to send a handshake request message to the server device, and the handshake request message includes a first indication field, a second indication field and a PSK identifier corresponding to the PSK, wherein the first indication field carries the configuration type to which the PSK belongs, and the second indication field carries the identifier of the provider of the PSK.
[0151] In a possible design, the first indication field is included in a first extended header of the handshake request message, and the second indication field and a PSK identifier corresponding to the PSK are included in a second extended header of the handshake request message.
[0152] In one possible design, the transceiver unit 302 is specifically used to send a handshake request message to the server device, where the handshake request message includes a first indication field, wherein the first indication field carries the configuration type to which the PSK belongs.
[0153] In one possible design, the transceiver unit 302 is also used to receive a response message from the server device to the handshake request message, the response message indicating that the server device supports the configuration type to which the PSK belongs; and send an exchange message to the server device, the exchange message carrying an identifier of the provider of the PSK and a PSK identifier corresponding to the PSK, wherein the identifier of the provider of the PSK is carried in a second indication field contained in the exchange message.
[0154] In one possible design, the processing unit 301 is specifically used to obtain a quantum key QK through a quantum key distribution QKD system; and determine that the QK is a PSK.
[0155] In one possible design, the configuration type to which the PSK in the belonging information belongs indicates the quantum key type.
[0156] In one possible design, the attribution information also includes at least one of a PSK field length or a PSK check function.
[0157] It should be noted that the information interaction, execution process, etc. between the modules / units in the client device are the same as those in this application. Figure 4 or Figure 6The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0158] See also Fig. 9 , Fig. 9 A schematic diagram of the structure of a server device provided in an embodiment of the present application. The device may be a server device, or a component of a server device (such as a processor, a chip, or a chip system, etc.), or a logical node, a logical module, or software that can implement all or part of the functions of the server device. Fig. 9 As shown, the server device includes a transceiver unit 401 and a processing unit 402 .
[0159] The transceiver unit 401 is used to receive the attribution information corresponding to the PSK from the client device, wherein the attribution information includes at least one of the configuration type to which the PSK belongs or the identifier of the provider of the PSK;
[0160] The processing unit 402 is used to determine the key distribution system to which the PSK belongs according to the belonging information.
[0161] In one possible design, the transceiver unit 401 is specifically used to receive a handshake request message from a client device, wherein the handshake request message includes a first indication field, a second indication field and a PSK identifier corresponding to the PSK, wherein the first indication field carries the configuration type to which the PSK belongs, and the second indication field carries the identifier of the provider of the PSK.
[0162] In a possible design, the first indication field is included in a first extended header of the handshake request message, and the second indication field and a PSK identifier corresponding to the PSK are included in a second extended header of the handshake request.
[0163] In one possible design, the transceiver unit 401 is specifically used to receive a handshake request message from a client device, where the handshake request message includes a first indication field, wherein the first indication field carries the configuration type to which the PSK belongs.
[0164] In one possible design, the processing unit 402 is further configured to send a response message to the client device in response to the handshake request message, wherein the response message indicates that the server device supports the configuration type to which the PSK belongs;
[0165] The transceiver unit 401 is further configured to receive an exchange message from a client device, the exchange message carrying an identifier of a PSK provider and a PSK identifier corresponding to the PSK, wherein the identifier of the PSK provider is carried in a second indication field included in the exchange message.
[0166] In one possible design, the configuration type to which the PSK in the belonging information belongs indicates the quantum key type, and the processing unit 402 is specifically used for the server device to determine the quantum key distribution QKD system to which the PSK belongs based on the belonging information.
[0167] In one possible design, the attribution information also includes at least one of a field length of the PSK or a check function of the PSK.
[0168] In one possible design, the processing unit 402 is also used to determine whether the PSK meets the security verification based on the field length of the PSK or at least one of the verification functions of the PSK; if so, the processing unit 402 executes the step of determining the key distribution system to which the PSK belongs based on the attribution information.
[0169] It should be noted that the information interaction and execution process between the modules / units in the server device are the same as those in this application. Figure 4 or Figure 6 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0170] See also Fig.10 , Fig.10 A logical structure diagram of a network device 50 provided in an embodiment of the present application. The network device 50 is deployed with Figure 8 The client device described in the corresponding embodiment is used to implement Figure 4 or Figure 6 The functions implemented by the client device in the corresponding embodiment, or the network device 50 is deployed with Fig. 9 The server device described in the corresponding embodiment is used to implement Figure 4 or Figure 6 The functions implemented by the server device in the corresponding embodiment. The network device 50 includes: a memory 501, a processor 502, a communication interface 503 and a bus 504. The memory 501, the processor 502 and the communication interface 503 are connected to each other through the bus 504.
[0171] The memory 501 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 501 may store programs. When the programs stored in the memory 501 are executed by the processor 502, the processor 502 and the communication interface 503 are used to execute the above-mentioned Figure 4 Corresponding encryption communication method embodiment or Figure 6 Corresponding encryption communication method embodiment.
[0172] The processor 502 may be a central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), a digital signal processor (DSP), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components or any combination thereof, for executing related programs to implement one or more steps of steps 101-103 of the data processing method embodiment in the present application. The steps of the data processing method disclosed in the embodiment of the present application may be executed by a compiler and an executor, wherein the compiler and the executor may be executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 501, and the processor 502 reads the information in the memory 501, and executes one or more steps of steps 101-103 of the data processing method embodiment in the present application in combination with its hardware.
[0173] The communication interface 503 uses a transceiver device such as but not limited to a transceiver to implement communication between the network device 50 and other devices or communication networks.
[0174] The bus 504 can realize the path for transmitting information between the various components of the network device 50 (for example, the memory 501, the processor 502 and the communication interface 503). The bus 504 can be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0175] The present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the above-mentioned Figure 4 or Figure 6 The illustrated embodiments describe the method.
[0176] The present application also provides a computer-readable storage medium. The computer-readable storage medium may be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above application to execute the above application. Figure 4 or Figure 6 The illustrated embodiments describe the method.
[0177] The communication device provided in the embodiment of the present application may be a chip, which includes: a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit. The processing unit may execute the computer execution instructions stored in the storage unit to enable the chip to execute the above Figure 4 or Figure 6 Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0178] It should be further noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the device embodiment drawings provided in the embodiments of the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0179] Through the description of the above implementation mode, the technicians in the field can clearly understand that the embodiments of the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the embodiments of the present application, software program implementation is a better implementation method in more cases. Based on such an understanding, the technical solution of the embodiments of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0180] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0181] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A method for encrypted communication, characterized in that: include: The client device obtains the pre-shared key PSK; The client device sends the belonging information corresponding to the PSK to the server device, so that the server device determines the key distribution system to which the PSK belongs according to the belonging information, wherein the belonging information includes at least one of the configuration type to which the PSK belongs or the identifier of the provider of the PSK.
2. The method according to claim 1, characterized in that The client device sends the attribution information corresponding to the PSK to the server device, including: The client device sends a handshake request message to the server device, wherein the handshake request message includes a first indication field, a second indication field, and a PSK identifier corresponding to the PSK, wherein the first indication field carries the configuration type to which the PSK belongs, and the second indication field carries the identifier of the provider of the PSK.
3. The method according to claim 2, characterized in that The first indication field is included in a first extended header of the handshake request message, and the second indication field and a PSK identifier corresponding to the PSK are included in a second extended header of the handshake request message.
4. The method according to claim 1, characterized in that: The client device sends the attribution information corresponding to the PSK to the server device, including: The client device sends a handshake request message to the server device, where the handshake request message includes a first indication field, wherein the first indication field carries a configuration type to which the PSK belongs.
5. The method according to claim 4, characterized in that The method further comprises: The client device receives a response message from the server device to the handshake request message, wherein the response message indicates that the server device supports the configuration type to which the PSK belongs; The client device sends an exchange message to the server device, wherein the exchange message carries an identifier of a provider of the PSK and a PSK identifier corresponding to the PSK, wherein the identifier of the provider of the PSK is carried in a second indication field included in the exchange message.
6. The method according to any one of claims 1 to 5, characterized in that The client device obtains a pre-shared key PSK, including: The client device obtains the quantum key QK through the quantum key distribution QKD system; The client device determines that the QK is a PSK.
7. The method according to claim 6, characterized in that The configuration type to which the PSK in the belonging information belongs indicates a quantum key type.
8. The method according to any one of claims 1 to 7, characterized in that The attribution information further includes at least one of a field length of the PSK or a check function of the PSK.
9. A method for encrypted communication, characterized in that: include: The server device receives attribution information corresponding to the PSK from the client device, wherein the attribution information includes at least one of a configuration type to which the PSK belongs or an identifier of a provider of the PSK; The server device determines the key distribution system to which the PSK belongs according to the belonging information.
10. The method according to claim 9, characterized in that The server device receives the attribution information corresponding to the PSK from the client device, including: The server device receives a handshake request message from the client device, wherein the handshake request message includes a first indication field, a second indication field, and a PSK identifier corresponding to the PSK, wherein the first indication field carries the configuration type to which the PSK belongs, and the second indication field carries the identifier of the provider of the PSK.
11. The method according to claim 10, characterized in that The first indication field is included in a first extended header of the handshake request message, and the second indication field and a PSK identifier corresponding to the PSK are included in a second extended header of the handshake request.
12. The method according to claim 9, characterized in that The server device receives the attribution information corresponding to the PSK from the client device, including: The server device receives a handshake request message from the client device, where the handshake request message includes a first indication field, wherein the first indication field carries a configuration type to which the PSK belongs.
13. The method according to claim 12, characterized in that The method further comprises: The server device sends a response message to the client device in response to the handshake request message, wherein the response message indicates that the server device supports the configuration type to which the PSK belongs; The server device receives an exchange message from the client device, wherein the exchange message carries an identifier of a provider of the PSK and a PSK identifier corresponding to the PSK, wherein the identifier of the provider of the PSK is carried in a second indication field included in the exchange message.
14. The method according to any one of claims 9 to 13, characterized in that The configuration type to which the PSK in the belonging information belongs indicates a quantum key type, and the server device determines the key distribution system to which the PSK belongs according to the belonging information, including: The server device determines the quantum key distribution QKD system to which the PSK belongs based on the belonging information.
15. The method according to any one of claims 9 to 14, characterized in that The attribution information further includes at least one of a field length of the PSK or a check function of the PSK.
16. The method according to any one of claims 15, characterized in that The method further comprises: The server device determines whether the PSK satisfies security verification according to at least one of the field length of the PSK or the verification function of the PSK; If so, the server device executes the step of determining the key distribution system to which the PSK belongs according to the belonging information.
17. A client device, characterized in that: The client device includes a transceiver unit and a processing unit, the transceiver unit is used to perform the sending or receiving operation in the method as described in any one of claims 1 to 8, and the processing unit is used to perform the processing operation in the method as described in any one of claims 1 to 8.
18. A server device, characterized in that: The server device includes a transceiver unit and a processing unit, the transceiver unit is used to perform the sending or receiving operation in the method as described in any one of claims 9 to 16, and the processing unit is used to perform the processing operation in the method as described in any one of claims 9 to 16.
19. A network device, characterized in that: comprising a processor coupled to a memory, The memory is used to store instructions; The processor is configured to execute instructions in the memory so that the network device executes the method according to any one of claims 1 to 8.
20. A network device, characterized in that: comprising a processor coupled to a memory, The memory is used to store instructions; The processor is configured to execute instructions in the memory so that the network device executes the method according to any one of claims 9 to 16.
21. An encrypted communication system, characterized in that: The encrypted communication system includes the network device according to claim 19 and the network device according to claim 20.
22. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
23. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 9 to 16 is implemented.
Citation Information
Cited By
Information leakage prevention method and device
CN120074952A
