Key generation method and device, computer program product and electronic equipment

By adding quantum security key exchange cryptographic group and quantum-resistant signature algorithm to the TLS1.3 protocol, the session key generation is negotiated, which solves the problem of the elliptic curve key exchange mode threat to quantum computing, and improves the security of the TLS1.3 protocol Sex and flexibility.

CN119276497APending Publication Date: 2025-01-07CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411620796.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

In the TLS1.3 protocol, the elliptic curve key exchange mode is relatively fragile to quantum computing, resulting in low security.

Method used

Add a quantum secure key exchange cryptographic group to the encrypted communication request of the TLS1.3 protocol, configure algorithm information, add quantum signature algorithm, and generate session keys through the key exchange field negotiation between the client and server to ensure key negotiation The security of the algorithm.

Benefits of technology

It effectively avoids the problem of the key negotiation algorithm being threatened by quantum computing, improves the security and reliability of the TLS1.3 protocol, and improves the flexibility and compatibility of the protocol, reducing the complexity of the upgrade.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276497A_ABST
    Figure CN119276497A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a key generation method and device, a computer program product and electronic equipment, and relates to the technical field of network and security, and the method comprises the steps: adding a quantum security key exchange password group in an encrypted communication request sent by a client based on a quantum security transport layer security protocol, algorithm information in the quantum security key exchange password group is configured; adding an anti-quantum signature algorithm in the encrypted communication request, and selecting a key negotiation algorithm in the encrypted communication request to determine a first key exchange field corresponding to the client; selecting a key negotiation algorithm in a response message sent by the server in response to the encrypted communication request to determine a second key exchange field corresponding to the server; and performing key negotiation according to the first key exchange field and the second key exchange field to generate a session key. The security of the protocol can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] The TLS1.3 protocol is not only used on websites, but also protects the security of most interfaces and mobile application backgrounds, and has a wide range of application scenarios.

[0003] In the related technology, TLS1.3 provides two key exchange modes, namely elliptic curve key exchange mode and pre-shared key mode. The elliptic curve key exchange mode is widely used, but it is threatened by quantum computing, has poor security, and the configuration of the TLS1.3 protocol has certain limitations. Summary of the invention

[0004] The purpose of the present disclosure is to provide a key generation method, a key generation device, a computer program product and an electronic device, thereby overcoming, at least to a certain extent, the problem of low security of the transport layer security protocol due to the threat of quantum computing caused by the limitations and defects of the relevant technology.

[0005] According to one aspect of the present disclosure, a key generation method is provided, including: adding a quantum-safe key exchange cipher group in an encrypted communication request sent by a client based on a quantum-safe transport layer security protocol, and configuring algorithm information in the quantum-safe key exchange cipher group; adding a quantum-resistant signature algorithm in the encrypted communication request, and selecting a key negotiation algorithm in the encrypted communication request to determine a first key exchange field corresponding to the client; selecting a key negotiation algorithm in a response message sent by a server in response to the encrypted communication request to determine a second key exchange field corresponding to the server; performing key negotiation according to the first key exchange field and the second key exchange field to generate a session key.

[0006] In an exemplary embodiment of the present disclosure, configuring the algorithm information in the quantum secure key exchange cipher suite includes: adding a quantum secure key exchange cipher suite in the first extended field in the encrypted communication request, and configuring the number of algorithms, the types of algorithms, and the arrangement of algorithms; wherein the number of algorithms is positively correlated with the security requirement strength of the system, and the types of algorithms include traditional algorithms and anti-quantum algorithms.

[0007] In an exemplary embodiment of the present disclosure, adding a quantum-resistant signature algorithm to the encrypted communication request includes: adding a quantum-resistant signature algorithm to a second extended field of the encrypted communication request, wherein the quantum-resistant signature algorithm adopts a single mode.

[0008] In an exemplary embodiment of the present disclosure, the selecting a key agreement algorithm in the encrypted communication request to determine the first key exchange field corresponding to the client includes: obtaining the first public key of a traditional algorithm and the public key of an anti-quantization algorithm in the key agreement algorithm in the third extended field of the encrypted communication request; and concatenating the first public key of the traditional algorithm and the public key of the anti-quantization algorithm according to the arrangement of the traditional algorithm and the anti-quantization algorithm in the key agreement algorithm to generate the first key exchange field.

[0009] In an exemplary embodiment of the present disclosure, the key agreement algorithm is selected in the response information sent by the server in response to the encrypted communication request to determine the second key exchange field corresponding to the server, including: selecting the key agreement algorithm in the response message, and determining the second public key of the traditional algorithm and the ciphertext of the quantization-resistant algorithm in the key agreement algorithm; the second public key of the traditional algorithm and the ciphertext of the quantization-resistant algorithm are concatenated in accordance with the arrangement order of the key agreement algorithm to generate the second key exchange field.

[0010] In an exemplary embodiment of the present disclosure, the ciphertext is obtained by encrypting a random number generated by the server using a public key of a quantization-resistant algorithm.

[0011] In an exemplary embodiment of the present disclosure, the performing key negotiation according to the first key exchange field and the second key exchange field to generate a session key includes: determining a traditional key of the traditional algorithm according to a first public key of the traditional algorithm in the first key exchange field and a second public key of the traditional algorithm in the second key exchange field; determining a quantization-resistant key of the quantization-resistant algorithm according to a public key of the quantization-resistant algorithm in the first key exchange field and a ciphertext of the quantization-resistant algorithm in the second key exchange field; and splicing the traditional key and the quantization-resistant key according to the arrangement of the traditional algorithm and the quantization-resistant algorithm to generate the session key.

[0012] According to one aspect of the present disclosure, a key generation device is provided, including: an interactive cipher group configuration module, used to add a quantum-safe key exchange cipher group in an encrypted communication request sent by a client based on a quantum-safe transport layer security protocol, and configure algorithm information in the quantum-safe key exchange cipher group; a first negotiation algorithm determination module, used to add a quantum-resistant signature algorithm in the encrypted communication request, and select a key negotiation algorithm in the encrypted communication request to determine a first key exchange field corresponding to the client; a second negotiation algorithm determination module, used to select a key negotiation algorithm in a response message sent by a server in response to the encrypted communication request to determine a second key exchange field corresponding to the server; and a session key generation module, used to perform key negotiation according to the first key exchange field and the second key exchange field to generate a session key.

[0013] According to one aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-mentioned key generation methods.

[0014] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned key generation methods by executing the executable instructions.

[0015] According to one aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-mentioned key generation methods.

[0016] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned key generation methods by executing the executable instructions.

[0017] In the technical solution provided in the embodiment of the present disclosure, on the one hand, since a quantum-safe key exchange cipher group is added to the encrypted communication request sent based on the transport layer security protocol, algorithm information is configured, and a quantum-resistant signature algorithm is added, and the session key is jointly negotiated based on the first key exchange field of the client and the second key exchange field of the server, the problem that the key negotiation algorithm used by the transport layer security protocol is threatened by quantum computing is avoided, thereby improving the security and reliability of the transport layer security protocol. On the other hand, a quantum-safe key exchange cipher group is added to the encrypted communication request sent based on the transport layer security protocol, and the algorithm information therein is configured. Since the algorithm information can be flexibly configured according to actual needs, the flexibility and configurability of the protocol are improved, and the scope of application is also improved. On the other hand, the extended function of the transport layer security protocol is utilized to improve the compatibility of the protocol and reduce the complexity of the upgrade.

[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0020] Figure 1 The data transmission diagram in the related art is schematically shown.

[0021] Figure 2 A flowchart of a key generation method in an embodiment of the present disclosure is schematically shown.

[0022] Figure 3 A schematic diagram schematically illustrates configuration of a client in an embodiment of the present disclosure.

[0023] Figure 4 A schematic diagram schematically shows the configuration of the server in an embodiment of the present disclosure.

[0024] Figure 5 The specific flow chart of data transmission in the embodiment of the present disclosure is schematically shown.

[0025] Figure 6 The block diagram of the key generation device in the embodiment of the present disclosure is schematically shown.

[0026] Figure 7 The block diagram of the electronic device according to the embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0027] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0028] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0029] TLS1.3 is the latest version of the Transport Layer Security protocol, which is designed to provide faster access speeds and stronger security. The predecessor of the TLS protocol is the Secure Sockets Layer protocol (SSL).

[0030] TLS1.3 introduces a new key negotiation mechanism PSK, supports 0-RTT data transmission, and eliminates insecure encryption components and hash algorithms. These improvements make TLS1.3 more secure than previous versions and can resist more security threats.

[0031] TLS1.3 reduces the round-trip time of handshake, thereby increasing the speed of network communication. For example, by extending ClientHello and ServerHello to exchange keys, the KeyExchange process in TLS1.2 is omitted, which also saves a handshake.

[0032] In the related art, reference Figure 1 As shown in , TLS1.3 provides two key exchange modes, namely Elliptic Curve Key Exchange (ECDHE) and Pre-Shared Key (PSK). Among them, the ECDHE mode is widely used and cannot guarantee quantum security.

[0033] The present disclosure provides a key generation method that can be applied to the TLS 1.3 protocol.

[0034] refer to Figure 2 As shown in , the key generation method mainly includes the following steps:

[0035] In step S210, in the encrypted communication request sent by the client based on the quantum-secure transport layer security protocol, a quantum-secure key exchange cipher suite is added, and algorithm information in the quantum-secure key exchange cipher suite is configured;

[0036] In step S220, a quantum-resistant signature algorithm is added to the encrypted communication request, and a key agreement algorithm is selected in the encrypted communication request to determine a first key exchange field corresponding to the client;

[0037] In step S230, in a response message sent by the server in response to the encrypted communication request, a key agreement algorithm is selected to determine a second key exchange field corresponding to the server;

[0038] In step S240, key negotiation is performed according to the first key exchange field and the second key exchange field to generate a session key.

[0039] The technical solution provided in the embodiments of the present disclosure, on the one hand, adds a quantum-safe key exchange cipher group to the encrypted communication request sent based on the transport layer security protocol, configures the algorithm information, adds a quantum-resistant signature algorithm, and jointly negotiates the session key based on the first key exchange field of the client and the second key exchange field of the server, thereby avoiding the problem that the key negotiation algorithm used by the transport layer security protocol is threatened by quantum computing, thereby improving the security and reliability of the transport layer security protocol. On the other hand, by adding a quantum-safe key exchange cipher group to the encrypted communication request sent based on the transport layer security protocol and configuring the algorithm information therein, since the algorithm information can be flexibly configured according to actual needs, the flexibility and configurability of the protocol are improved, and the scope of application is also improved. On the other hand, by utilizing the extended function of the transport layer security protocol, the compatibility of the protocol is improved and the complexity of the upgrade is reduced.

[0040] Next, refer to Figure 2 The key generation method in the embodiment of the present disclosure is specifically described as shown in FIG.

[0041] In step S210, a quantum secure key exchange cipher suite is added to the encrypted communication request sent by the client based on the quantum secure transport layer security protocol, and algorithm information in the quantum secure key exchange cipher suite is configured.

[0042] In the disclosed embodiment, the transport layer security protocol may be TLS 1.3 protocol. TLS 1.3 protocol is a security protocol used to establish a secure connection between communicating parties to ensure the privacy of communication and the security of data.

[0043] This transport layer security protocol can be applied to websites and can also protect the security of most API interfaces and mobile application backgrounds. However, the key negotiation algorithm ECDHE used in the TLS1.3 protocol is threatened by quantum computing, which affects the security of the TLS1.3 protocol and further affects the security of applications using the TLS1.3 protocol. Therefore, the protocol needs to be quantum-safe.

[0044] The TLS 1.3 protocol has multiple extension fields, based on which security upgrades can be performed during the TLS handshake process. For example, the supported_groups field, signature_algorithms field, and key_share field in the Extension field of the TLS 1.3 protocol can be used for quantum security design.

[0045] For the client, the extension field in the encrypted communication request sent based on the quantum-safe TLS1.3 protocol can be configured and extended. First, a quantum-safe key exchange cipher suite can be added to the encrypted communication request to configure the algorithm information in the quantum-safe key exchange cipher suite. The quantum-safe key exchange cipher suite is used to determine the algorithm for key exchange. The algorithm information may include one or more of the number of algorithms, the type of algorithms, and the arrangement of algorithms. The encrypted communication request can be the ClientHello sent by the client. ClientHello is used to transmit the client's capabilities and preferences to the server. The client will send an encrypted communication request ClientHello when it wants to renegotiate or respond to a renegotiation request initiated by the server (indicated by the HelloRequest message) after a new connection is established.

[0046] In addition, the number of algorithms, the types of algorithms, and the arrangement of algorithms in the quantum secure key exchange cipher suite can be configured according to actual security requirements. Among them, the number of algorithms can be configured according to the security requirement strength of the system, and the number of algorithms can be positively correlated with the security requirement strength of the system. For example, the higher the security requirement strength of the system, the more algorithms there are; the lower the security requirement strength of the system, the fewer algorithms there are. The number of algorithms can be 2 or 3. The types of algorithms can include traditional algorithms and anti-quantization algorithms. Traditional algorithms can be, for example, X25519 algorithms or Scloud algorithms, and of course, other types of traditional algorithms; anti-quantization algorithms can be ML-KEM-768 algorithms.

[0047] Among them, the X25519 algorithm is a key exchange algorithm based on elliptic curve cryptography, which only relies on the x-coordinate of the point on the elliptic curve for calculation. The Scloud algorithm is an encryption algorithm based on IND-CCA-KEM (IND-CPA secure KEM), which is mainly used for key exchange and encrypted communication in cloud environments. The ML-KEM-768 algorithm is used to resist quantum attacks.

[0048] The arrangement of algorithms is used to indicate the order of arrangement of traditional algorithms and anti-quantization algorithms, and the arrangement of algorithms can be used to determine the arrangement of session keys. For example, when the number of algorithms is 2, the traditional algorithm can be arranged in the first place and the anti-quantization algorithm can be arranged in the second place; or, the anti-quantization algorithm can be arranged in the first place and the traditional algorithm can be arranged in the second place. When the number of algorithms is 3, the traditional algorithm can be arranged in the first place, the anti-quantization algorithm can be arranged in the second place, and another anti-quantization algorithm can be arranged in the third place; or, the anti-quantization algorithm can be arranged in the first place, and the two traditional algorithms can be arranged in the second place and the third place. The arrangement order of traditional algorithms and anti-quantization algorithms is not specifically limited here.

[0049] For example, a quantum secure key exchange cipher suite may be configured in an encrypted communication request sent by a client, and the configuration information may be, for example, X25519&ML-KEM-768 or ML-KEM-768&X25519&Scloud.

[0050] In some embodiments, a quantum-secure key exchange cipher suite may be added to the first extension field of the quantum-secure TLS1.3 encrypted communication request, and the first extension field may be, for example, a support_group field. Based on this, a quantum-secure key exchange cipher suite may be added to the support_group extension field of the quantum-secure TLS1.3 ClientHello, and the quantum-secure key exchange cipher suite may be configured, for example, as X25519&ML-KEM-768 or ML-KEM-768&X25519&Scloud.

[0051] In step S220, a quantum-resistant signature algorithm is added to the encrypted communication request, and a key agreement algorithm is selected in the encrypted communication request to determine a first key exchange field corresponding to the client.

[0052] In the disclosed embodiment, a quantum-resistant signature algorithm may be added to an encrypted communication request, wherein the quantum-resistant signature algorithm may adopt a single algorithm mode, which means that only the quantum-resistant signature algorithm exists, and there is no need to mix the quantum-resistant signature algorithm with the traditional algorithm. The quantum-resistant signature algorithm may be the ML-DSA-44-SHA3 algorithm.

[0053] Exemplarily, a quantum-resistant signature algorithm may be added to a second extension field in an encrypted communication request sent by the client. The second extension field may be a field different from the first extension field. For example, the second extension field may be a signature_algorithms field.

[0054] In addition, a key agreement algorithm can also be selected in the encrypted communication request sent by the client. Exemplarily, a key agreement algorithm can be selected in the third extension field of the encrypted communication request. The third extension field is different from the second extension field and the first extension field. The third extension field can be, for example, the Key ShareEntry field in the key_share field. The key agreement algorithm can be a hybrid key agreement algorithm or other key agreement algorithms. For example, the key agreement algorithm selected in the third extension field Key Share Entry field can be the X25519 & ML-KEM-768 hybrid key agreement algorithm, that is, the traditional algorithm X25519 algorithm and the anti-quantization algorithm ML-KEM-768 algorithm can be selected, and the algorithms are arranged in such a way that the traditional algorithm X25519 is arranged in the first place and the anti-quantization algorithm ML-KEM-768 is arranged in the second place.

[0055] Furthermore, the first key exchange field corresponding to the client can be determined according to the key negotiation algorithm. The first key exchange field can be a Key Exchange field. The first key exchange field Key Exchange contains the key required by the selected key negotiation algorithm. When determining the first key exchange field, it can be determined according to the attribute information of the traditional algorithm and the anti-quantization algorithm in the key negotiation algorithm. The attribute information can be the public key of the traditional algorithm and the public key of the anti-quantization algorithm. Among them, the public key of the traditional algorithm refers to the first public key of the traditional algorithm calculated by the client. The public key of the anti-quantization algorithm refers to the public key of the anti-quantization algorithm calculated by the client. The first key exchange field may include the first public key of the traditional algorithm and the public key of the anti-quantization algorithm, and the first public key of the traditional algorithm and the public key of the anti-quantization algorithm can be connected in series according to the arrangement of the traditional algorithm and the anti-quantization algorithm.

[0056] Exemplarily, when the hybrid key negotiation algorithm is the X25519 & ML-KEM-768 hybrid key algorithm, the first key exchange field may contain the first public key of the X25519 algorithm and the public key of the ML-KEM-768 algorithm. In addition, the first public key of the X25519 algorithm and the public key of the ML-KEM-768 algorithm in the first key exchange field may be connected in series according to the arrangement of the traditional algorithm and the anti-quantization algorithm. For example, the first public key of the X25519 algorithm may be arranged in the first position, and the public key of the ML-KEM-768 algorithm may be arranged in the second position.

[0057] For example, reference Figure 3 As shown in , a quantum secure key exchange cipher suite can be added to the first extension field in the encrypted communication request ClientHello sent by the client, for example, adding X25519&ML-KEM-768 or ML-KEM-768&X25519&Scloud. Add a quantum-resistant signature algorithm in the second extension field, for example, adding the ML-DSA-44-SHA3 algorithm. Select a key agreement algorithm in the third extension field. The generated first key exchange field Key Exchange field corresponding to the client may include the first public key of the X25519 algorithm and the public key of the ML-KEM-768 algorithm connected in series in an arrangement manner, such as Pk1||Q_Pk1.

[0058] Next, in step S230, a key agreement algorithm is selected in a response message sent by the server in response to the encrypted communication request to determine a second key exchange field corresponding to the server.

[0059] In the embodiment of the present disclosure, after receiving the encrypted communication request sent by the client, the server may respond to the encrypted communication request and reply a response message to the client. The response message may be a ServerHello message. The ServerHello message may include a selected encryption suite, a random number, a session identifier, and a possible certificate.

[0060] Further, the key agreement algorithm may be selected in the response message replied by the server. Exemplarily, the key agreement algorithm may be selected in the fourth extension field in the response message replied by the server. The fourth extension field may be the Key Share Entry field in the extension field key_share in the ServerHello information.

[0061] It should be noted that the key agreement algorithm selected in the fourth extension field of the response message can be the same as the key agreement algorithm selected in the communication encryption request, so as to ensure consistency and security. Based on this, when the key agreement algorithm selected in the encrypted communication request sent by the client is a hybrid key agreement algorithm composed of the X25519 algorithm and the ML-KEM-768 algorithm, the key agreement algorithm in the response message sent by the receiving end can also be a hybrid key agreement algorithm composed of the X25519 algorithm and the ML-KEM-768 algorithm.

[0062] When the key negotiation algorithm of the fourth extension field in the response message is a hybrid key negotiation algorithm composed of the X25519 algorithm and the ML-KEM-768 algorithm, the second key exchange field of the server can be determined according to the attribute information of the traditional algorithm and the anti-quantization algorithm. The attribute information can be the second public key of the traditional algorithm and the ciphertext of the anti-quantization algorithm. Among them, the second public key of the traditional algorithm refers to the public key of the traditional algorithm calculated by the server, and the second public key is different from the first public key of the traditional algorithm calculated by the client.

[0063] Exemplarily, the second key exchange field can be expressed as a Key Exchange field. The second key exchange field of the server may include the second public key corresponding to the X25519 algorithm and the ciphertext generated by the ML-KEM-768 algorithm based on public key encryption. Among them, the ciphertext can be the ciphertext obtained by encrypting the random number generated by the server based on the public key of the ML-KEM-768 algorithm. In addition, the second public key corresponding to the traditional algorithm and the ciphertext corresponding to the anti-quantization algorithm can be concatenated according to the arrangement order of the traditional algorithm and the anti-quantization algorithm. For example, the second key exchange field includes the concatenated second public key of the X25519 algorithm and the ciphertext generated by the public key encryption based on the ML-KEM-768 algorithm.

[0064] For example, reference Figure 4 As shown in, a key agreement algorithm can be selected in the fourth extended field of the response message generated by the server, and the corresponding second key exchange field of the server may include the second public key of the X25519 algorithm concatenated in an arrangement manner and the ciphertext obtained by encrypting the random number generated by the server with the public key based on the ML-KEM-768 algorithm.

[0065] In step S240, key negotiation is performed according to the first key exchange field and the second key exchange field to generate a session key.

[0066] In the disclosed embodiment, the communicating parties may concatenate multiple key agreement algorithms generated through negotiation in the order of the algorithms of the selected cipher suite to generate a final session key.

[0067] Exemplarily, the traditional key of the traditional algorithm can be determined by negotiation based on the first public key of the traditional algorithm in the first key exchange field and the second public key of the traditional algorithm in the second key exchange field. The quantization-resistant key of the quantization-resistant algorithm can be determined by negotiation based on the public key of the quantization-resistant algorithm in the first key exchange field and the ciphertext of the quantization-resistant algorithm in the second key exchange field. Further, the keys negotiated by each algorithm can be spliced ​​in the order of arrangement of the algorithms to generate a session key. Exemplarily, the traditional key of the traditional algorithm and the quantization-resistant key of the quantization-resistant algorithm can be spliced ​​in series according to the arrangement of the traditional algorithm and the quantization-resistant algorithm to generate a session key.

[0068] In the disclosed embodiment, the extended function of the extended field in the TLS1.3 protocol is used to improve the compatibility of the protocol and reduce the complexity of upgrading and transformation. The number and arrangement of the cryptographic negotiation algorithms of the communicating parties can be configured as needed to improve the flexibility of the protocol. Adding a quantum-safe cryptographic group to the original cryptographic group can provide higher security in the current and future quantum computing environment.

[0069] After determining the session key, data transmission between the client and the server can be achieved based on the session key. Exemplarily, the client can encrypt the data to be transmitted based on the session key, thereby achieving encrypted transmission of the data. In some embodiments, the client can encrypt the data to be transmitted based on the session key to obtain encrypted data and send it to the server. After receiving the encrypted data, the server can decrypt it based on the session key to obtain ciphertext, and reply based on the ciphertext to generate reply data, and encrypt the reply data based on the session key to send it to the client, thereby achieving encrypted transmission of data between the client and the server.

[0070] In the disclosed embodiments, since a quantum-safe key exchange cipher suite and a quantum-resistant signature algorithm are added to the transport layer security protocol TLS1.3, and a session key is negotiated based on a first key exchange field of the client and a second key exchange field of the server, the problem that the key negotiation algorithm used may be threatened by quantum computing is avoided, thereby improving the security of the TLS1.3 protocol and the security of applications using the TLS1.3 protocol.

[0071] Figure 5 A flowchart of data transmission is schematically shown in FIG. Figure 5 As shown in , it mainly includes the following steps:

[0072] In step S510, the client sends an encrypted communication request to the server.

[0073] The encrypted communication request may be a ClientHello sent by the client. Figure 5As shown in , a quantum secure key exchange cipher group can be added to the first extended field support_group field of the encrypted communication request ClientHello to configure the algorithm information in the quantum secure key exchange cipher group, such as the number of configured algorithms, the type of algorithms, and the order of arrangement of the algorithms. For example, the first extended field support_group can be configured as X25519&ML-KEM-768, that is, the number of algorithms is two, and the types of algorithms include the X25519 algorithm and the ML-KEM-768 algorithm. The order of arrangement of the algorithms is that the X25519 algorithm is arranged first, and the ML-KEM-768 algorithm is arranged second.

[0074] In the second extended field signature_algorithms of the encrypted communication request ClientHello, add the quantum-resistant signature algorithm, which may be the ML-DSA-44-SHA3 algorithm.

[0075] The key agreement algorithm is selected in the Key ShareEntry field in the third extended field key_share field of the encrypted communication request ClientHello. The Key Share Entry field can be configured as X25519&ML-KEM-768. The first key exchange field Key Exchange field corresponding to the client may include the first public key of the X25519 algorithm and the public key of the ML-KEM-768 algorithm connected in series in an arrangement manner. For example, the first public key of the X25519 algorithm can be represented as Pk1, and the public key of the ML-KEM-768 algorithm can be represented as Q_Pk1.

[0076] In step S520, the server sends a response message corresponding to the encrypted communication request to the client.

[0077] The response message may be a ServerHello message. The key agreement algorithm may be selected in the fourth extension field of the response message. For example, the key agreement algorithm may be selected in the Key Share Entry field in the key_share corresponding to the ServerHello message. The Key Share Entry field may be configured as X25519&ML-KEM-768.

[0078] The second key exchange field Key Exchange field corresponding to the server may include the second public key of the X25519 algorithm and the ciphertext obtained by encrypting the random number generated by the server based on the public key of the ML-KEM-768 algorithm in series according to the arrangement method. For example, the second public key of the X25519 algorithm can be expressed as Pk2, and the ciphertext obtained by encrypting the random number generated by the server based on the public key of the ML-KEM-768 algorithm can be expressed as Q_c.

[0079] In step S530, the client sends application data to the server based on the generated session key.

[0080] In step S540, the server sends reply data corresponding to the application data to the client based on the generated session key.

[0081] In the disclosed embodiment, the rich extended functions of the TLS1.3 protocol are utilized to add quantum-safe key exchange cipher suites, add quantum-resistant signature algorithms, and select key negotiation algorithms in the first extension field, the second extension field, and the third extension field, thereby improving the compatibility of the protocol and reducing the complexity of upgrading and transformation. The number and arrangement of the cryptographic negotiation algorithms of the communicating parties can be configured as needed to improve the flexibility of the protocol. Adding a quantum-safe cipher suite to the original cipher suite can provide higher security in the current and future quantum computing environments.

[0082] The present disclosure also provides a key generation device. Figure 6 As shown, the key generation device 600 mainly includes the following modules:

[0083] The interactive cipher suite configuration module 601 is used to add a quantum secure key exchange cipher suite to the encrypted communication request sent by the client based on the quantum secure transport layer security protocol, and configure the algorithm information in the quantum secure key exchange cipher suite;

[0084] A first negotiation algorithm determination module 602 is used to add a quantum-resistant signature algorithm to the encrypted communication request and select a key negotiation algorithm in the encrypted communication request to determine a first key exchange field corresponding to the client;

[0085] A second negotiation algorithm determination module 603, configured to select a key negotiation algorithm in a response message sent by the server in response to the encrypted communication request, so as to determine a second key exchange field corresponding to the server;

[0086] The session key generation module 604 is used to perform key negotiation according to the first key exchange field and the second key exchange field to generate a session key.

[0087] Provided is a key generation method, comprising: adding a quantum-safe key exchange cipher suite to an encrypted communication request sent by a client based on a quantum-safe transport layer security protocol, and configuring algorithm information in the quantum-safe key exchange cipher suite; adding a quantum-resistant signature algorithm to the encrypted communication request, and selecting a key negotiation algorithm in the encrypted communication request to determine a first key exchange field corresponding to the client; selecting a key negotiation algorithm in a response message sent by a server in response to the encrypted communication request to determine a second key exchange field corresponding to the server; performing key negotiation according to the first key exchange field and the second key exchange field to generate a session key.

[0088] In an exemplary embodiment of the present disclosure, configuring the algorithm information in the quantum secure key exchange cipher suite includes: adding a quantum secure key exchange cipher suite in the first extended field in the encrypted communication request, and configuring the number of algorithms, the types of algorithms, and the arrangement of algorithms; wherein the number of algorithms is positively correlated with the security requirement strength of the system, and the types of algorithms include traditional algorithms and anti-quantum algorithms.

[0089] In an exemplary embodiment of the present disclosure, adding a quantum-resistant signature algorithm to the encrypted communication request includes: adding a quantum-resistant signature algorithm to a second extended field of the encrypted communication request, wherein the quantum-resistant signature algorithm adopts a single mode.

[0090] In an exemplary embodiment of the present disclosure, the selecting a key agreement algorithm in the encrypted communication request to determine the first key exchange field corresponding to the client includes: obtaining the first public key of a traditional algorithm and the public key of an anti-quantization algorithm in the key agreement algorithm in the third extended field of the encrypted communication request; and concatenating the first public key of the traditional algorithm and the public key of the anti-quantization algorithm according to the arrangement of the traditional algorithm and the anti-quantization algorithm in the key agreement algorithm to generate the first key exchange field.

[0091] In an exemplary embodiment of the present disclosure, the key agreement algorithm is selected in the response information sent by the server in response to the encrypted communication request to determine the second key exchange field corresponding to the server, including: selecting the key agreement algorithm in the response message, and determining the second public key of the traditional algorithm and the ciphertext of the quantization-resistant algorithm in the key agreement algorithm; the second public key of the traditional algorithm and the ciphertext of the quantization-resistant algorithm are concatenated in accordance with the arrangement order of the key agreement algorithm to generate the second key exchange field.

[0092] In an exemplary embodiment of the present disclosure, the ciphertext is obtained by encrypting a random number generated by the server using a public key of a quantization-resistant algorithm.

[0093] In an exemplary embodiment of the present disclosure, the performing key negotiation according to the first key exchange field and the second key exchange field to generate a session key includes: determining a traditional key of the traditional algorithm according to a first public key of the traditional algorithm in the first key exchange field and a second public key of the traditional algorithm in the second key exchange field; determining a quantization-resistant key of the quantization-resistant algorithm according to a public key of the quantization-resistant algorithm in the first key exchange field and a ciphertext of the quantization-resistant algorithm in the second key exchange field; and splicing the traditional key and the quantization-resistant key according to the arrangement of the traditional algorithm and the quantization-resistant algorithm to generate the session key.

[0094] It should be noted that the specific details of each module in the above-mentioned key generation device have been described in detail in the corresponding key generation method, so they will not be repeated here.

[0095] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0096] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0097] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0098] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0099] Refer to the following Figure 7 An electronic device 700 according to this embodiment of the present disclosure is described. Figure 7 The electronic device 700 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0100] like Figure 7 As shown, the electronic device 700 is in the form of a general computing device. The components of the electronic device 700 may include, but are not limited to: the at least one processing unit 710, the at least one storage unit 720, a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710), and a display unit 740.

[0101] The storage unit stores program codes, which can be executed by the processing unit 710, so that the processing unit 710 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 710 can perform the following steps: Figure 2 Follow the steps shown in .

[0102] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 7201 and / or a cache storage unit 7202 , and may further include a read-only storage unit (ROM) 7203 .

[0103] The storage unit 720 may also include a program / utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0104] Bus 730 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0105] The electronic device 700 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 700, and / or communicate with any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 750. Furthermore, the electronic device 700 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 760. As shown, the network adapter 760 communicates with other modules of the electronic device 700 via a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0106] It should be noted that, in some embodiments of the present disclosure, a computer program product is also provided. The computer program product includes a computer program. When the computer program is executed by a processor, the above method is implemented.

[0107] In one embodiment, a computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing a computer program. The readable storage medium may be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, and other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk (HDD), solid-state drive (SSD), and the like. Exemplarily, a computer program product may be implemented as a non-volatile storage medium storing a computer program, such as a read-only memory, a NAND flash memory (Nand Flash), and the like. In one embodiment, a computer program product may be an intangible product containing a computer program. Exemplarily, a computer program product may be implemented as a virtual digital product, such as a digital file such as an executable file, an installation package, etc. storing a computer program.

[0108] The code of the computer program can be written in one or more programming languages. Programming languages ​​such as C language, Java, C++, etc. The program code can be executed entirely on the user computing device, or partially on the user computing device, or as a separate software package, or partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (e.g., an Internet connection provided by an operator).

[0109] The computer program may be carried or transmitted via electrical, magnetic, optical, electromagnetic, infrared, or other signals. The electronic device may convert the signal carrying the computer program into a digital signal, thereby running the computer program. When the computer program is run on an electronic device, its code is used to enable the electronic device to execute (more specifically, the processor of the electronic device may execute) the method steps of various exemplary embodiments of the present disclosure.

[0110] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0111] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0112] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0113] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing what is disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be considered merely as exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.

[0114] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A key generation method, characterized in that: include: In the encrypted communication request sent by the client based on the quantum-secure transport layer security protocol, add a quantum-secure key exchange cipher suite and configure the algorithm information in the quantum-secure key exchange cipher suite; Adding a quantum-resistant signature algorithm to the encrypted communication request, and selecting a key agreement algorithm in the encrypted communication request to determine a first key exchange field corresponding to the client; In a response message sent by the server in response to the encrypted communication request, selecting a key agreement algorithm to determine a second key exchange field corresponding to the server; Key negotiation is performed according to the first key exchange field and the second key exchange field to generate a session key.

2. The key generation method according to claim 1, characterized in that: The algorithm information in the configuration quantum secure key exchange cipher suite includes: Add a quantum secure key exchange cipher suite to the first extension field in the encrypted communication request, and configure the number of algorithms, the type of algorithms, and the arrangement of the algorithms; The number of algorithms is positively correlated with the security requirement strength of the system, and the types of algorithms include traditional algorithms and anti-quantization algorithms.

3. The key generation method according to claim 1, characterized in that: Adding a quantum-resistant signature algorithm to the encrypted communication request includes: A quantum-resistant signature algorithm is added to the second extension field of the encrypted communication request, and the quantum-resistant signature algorithm adopts a single mode.

4. The key generation method according to claim 1, characterized in that: The step of selecting a key negotiation algorithm in the encrypted communication request to determine a first key exchange field corresponding to the client includes: In the third extended field of the encrypted communication request, obtaining a first public key of a conventional algorithm and a public key of a quantization-resistant algorithm in the key agreement algorithm; The first public key of the traditional algorithm and the public key of the quantization-resistant algorithm are concatenated according to the arrangement of the traditional algorithm and the quantization-resistant algorithm in the key agreement algorithm to generate the first key exchange field.

5. The key generation method according to claim 1, characterized in that: The selecting, in the response information sent by the server in response to the encrypted communication request, a key agreement algorithm to determine a second key exchange field corresponding to the server, comprises: Selecting a key agreement algorithm in the response message, and determining a second public key of a conventional algorithm and a ciphertext of a quantization-resistant algorithm in the key agreement algorithm; The second public key of the traditional algorithm and the ciphertext of the quantization-resistant algorithm are concatenated in series according to the arrangement order of the key agreement algorithm to generate the second key exchange field.

6. The key generation method according to claim 5, characterized in that: The ciphertext is obtained by encrypting the random number generated by the server using the public key of the anti-quantization algorithm.

7. The key generation method according to claim 1, characterized in that: The performing key negotiation according to the first key exchange field and the second key exchange field to generate a session key includes: Determining a traditional key of the traditional algorithm according to a first public key of the traditional algorithm in the first key exchange field and a second public key of the traditional algorithm in the second key exchange field; Determining a quantization-resistant key of the quantization-resistant algorithm according to the public key of the quantization-resistant algorithm in the first key exchange field and the ciphertext of the quantization-resistant algorithm in the second key exchange field; The traditional key and the anti-quantization key are concatenated according to the arrangement of the traditional algorithm and the anti-quantization algorithm to generate the session key.

8. A key generation device, characterized in that: include: An interactive cipher suite configuration module is used to add a quantum-secure key exchange cipher suite to an encrypted communication request sent by a client based on a quantum-secure transport layer security protocol, and configure algorithm information in the quantum-secure key exchange cipher suite; A first negotiation algorithm determination module is used to add a quantum-resistant signature algorithm to the encrypted communication request and select a key negotiation algorithm in the encrypted communication request to determine a first key exchange field corresponding to the client; A second negotiation algorithm determination module, configured to select a key negotiation algorithm in a response message sent by the server in response to the encrypted communication request, so as to determine a second key exchange field corresponding to the server; The session key generation module is used to perform key negotiation according to the first key exchange field and the second key exchange field to generate a session key.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the key generation method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the key generation method according to any one of claims 1 to 7 by executing the executable instructions.

Citation Information

Cited By

  • SSH communication method and device based on quantum key and medium

    CN120128339A