Quic connection establishment method and system, device, electronic equipment and storage medium

By introducing national cryptographic algorithms and certificate signing mechanisms into QUIC connections, the problems of asymmetric handshakes and poor security and controllability of encryption algorithms in the QUIC protocol are solved, enabling more secure and efficient QUIC connection establishment, reducing the risk of reflection attacks, and improving user data security and encrypted transmission capabilities.

CN116566612BActive Publication Date: 2026-06-30GUIZHOU BAISHANCLOUD TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUIZHOU BAISHANCLOUD TECH CO LTD
Filing Date
2022-01-27
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

The asymmetric handshake mechanism of the QUIC protocol increases the possibility of reflection attacks, and the poor security and controllability of existing encryption algorithms affect user data security.

Method used

By introducing national cryptographic algorithms, appropriate national cryptographic information is selected for certificate signing and verification through information exchange between the client and the server, and verification information is generated to complete the connection establishment process, thus avoiding the sending of certificate chains.

Benefits of technology

It reduces the possibility of reflection attacks, improves the security and efficiency of QUIC connections, enhances the ability to securely encrypt and transmit data across different domains, and ensures the security and controllability of user data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116566612B_ABST
    Figure CN116566612B_ABST
Patent Text Reader

Abstract

This invention provides a QUIC connection establishment method, system, device, electronic device, and storage medium. The method includes: receiving a Client Hello message sent by a client, the Client Hello message including first national cryptographic information; selecting second national cryptographic information from the first national cryptographic information and sending a Server Hello message to the client, the Server Hello message including the second national cryptographic information; determining a national cryptographic certificate and signing the national cryptographic certificate using a signature algorithm in the second national cryptographic information to generate verification information; sending a Hand Shake message to the client, the Hand Shake message containing the national cryptographic certificate, the verification information, and a Finished message; and the server completing the connection establishment process with the client. This eliminates the need for the server to send a certificate chain, thus making the information sent by the client and server during the QUIC connection establishment process nearly symmetrical, greatly reducing the possibility of reflection attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and more specifically, to a QUIC connection establishment method and system device, electronic device, and storage medium. Background Technology

[0002] Due to heightened security concerns, the vast majority of traffic accessing the network edge is now HTTPS. However, traditional HTTPS requests are transmitted based on the TCP protocol, which suffers from several issues, including TCP head-of-line blocking, handshake delays, and protocol rigidity. Therefore, the QUIC (Quick UDP Internet Connection) protocol, which balances high reliability and low latency, is gradually becoming a new alternative technology. QUIC is a UDP-based transport protocol that enables multiplexing and security protection. It integrates the advantages of Hypertext Transfer Protocol (HTTP) 2.0, Transport Layer Security (TLS), and Transmission Control Protocol (TCP), while also reducing access latency, facilitating traffic congestion control, and improving error correction mechanisms.

[0003] However, QUIC's handshake is asymmetrical. During the initial handshake, the server typically sends its certificate chain, while the client only needs to send a few bytes. Therefore, compared to TCP+TLS, the UDP+QUIC protocol increases the possibility of reflection attacks. Furthermore, the encryption algorithms used in existing technologies suffer from poor security controllability. Therefore, how to avoid adversely affecting user security information when using the QUIC protocol for communication is the problem this application aims to solve. Summary of the Invention

[0004] To address the above problems, the first aspect of this invention provides a QUIC connection establishment method, applied to a server, comprising:

[0005] Receive a Client Hello message sent by a client, wherein the Client Hello message includes first national cryptographic information;

[0006] Select a second national cryptographic information from the first national cryptographic information and send a Server Hello message to the client, the Server Hello message including the second national cryptographic information;

[0007] The national cryptographic certificate is determined, and the national cryptographic certificate is signed using the signature algorithm in the second national cryptographic information to generate verification information;

[0008] Send a Hand Shake message to the client, the Hand Shake message containing the national cryptographic certificate, the verification information, and a Finished message;

[0009] The server completes the connection establishment process with the client.

[0010] In one implementation, the first national cryptographic information is at least one national cryptographic algorithm suite supported by the client.

[0011] In one implementation, selecting the second national secret information from the first national secret information includes:

[0012] Extract all national cryptographic algorithm suites from the first national cryptographic information, filter them according to a preset filtering strategy, and use the filtered national cryptographic algorithm suites as the second national cryptographic information.

[0013] In one implementation, determining the national cryptographic certificate includes:

[0014] If it is determined that the Client Hello message carries SNI extended information, extract the domain name information from the SNI extended information, and use the national cryptographic certificate corresponding to the domain name information as the national cryptographic certificate, and / or

[0015] If it is determined that the Client Hello message does not carry the SNI extended information, the default national cryptographic certificate will be used as the national cryptographic certificate.

[0016] In one embodiment, the method further includes:

[0017] When interacting with the client, encryption / decryption is performed using the session key and the SM4 algorithm in the second national cryptographic information;

[0018] The session key is generated after the connection between the server and the client is established.

[0019] In one implementation, the generation of the session key includes:

[0020] The Client Hello message also includes a client-side random number and client-side key-share information;

[0021] Get the server-side random number and server-side key-share information;

[0022] A pre-master key is generated based on the client key-share information and the server key-share information;

[0023] The session key is generated based on the client random number, the server random number, and the pre-master key.

[0024] A second aspect of the present invention provides a QUIC connection establishment method, applied to a client, comprising:

[0025] Send a Client Hello message to the server, the Client Hello message including the first national cryptographic information;

[0026] Receive a Server Hello message sent by the server, wherein the Server Hello message includes second national cryptographic information selected from the first national cryptographic information;

[0027] Receive a Hand Shake message sent by the server, the Hand Shake message including a national cryptographic certificate and verification information generated by the server using the signature algorithm in the second national cryptographic information;

[0028] The national cryptographic certificate is verified using the verification information.

[0029] Send a Hand Shake message to the server, the Hand Shake message containing a Finished message;

[0030] The server completes the connection establishment process with the client.

[0031] In one embodiment, the method further includes:

[0032] When interacting with the server, encryption / decryption is performed using the session key and the SM4 algorithm in the second national cryptographic information;

[0033] The session key is generated after the connection between the client and the server is established.

[0034] In one implementation, the generation of the session key includes:

[0035] Obtain client-side random number and client-side key-share information;

[0036] The Server Hello message also includes a server-side random number and server-side key-share information;

[0037] A pre-master key is generated based on the client key-share information and the server key-share information;

[0038] The session key is generated based on the client random number, the server random number, and the pre-master key.

[0039] In one implementation, the Client Hello message further includes SNI extended information, which includes the domain name information requested by the client.

[0040] The SNI extended information is used by the server to select the national cryptographic certificate corresponding to the domain name information.

[0041] In one embodiment, the method further includes:

[0042] The first national cryptographic information is at least one national cryptographic algorithm suite supported by the client.

[0043] A third aspect of the present invention provides a QUIC connection establishment system, comprising: a client and a server;

[0044] The server is configured to receive a Client Hello message sent by the client, the Client Hello message including first national cryptographic information and domain name information; select second national cryptographic information from the first national cryptographic information and send a Server Hello message to the client, the Server Hello message including the second national cryptographic information; determine a national cryptographic certificate based on the domain name information and the second national cryptographic information, and sign the national cryptographic certificate using the signature algorithm in the second national cryptographic information to generate verification information; send a Hand Shake message to the client, the Hand Shake message containing the national cryptographic certificate, the verification information, and a Finished message; the server completes the connection establishment process with the client;

[0045] The client is configured to send a Client Hello message to the server, the Client Hello message including first national cryptographic information; receive a Server Hello message sent by the server, the Server Hello message including second national cryptographic information selected from the first national cryptographic information; receive a Hand Shake message sent by the server, the Hand Shake message including a national cryptographic certificate and verification information generated by the server using the signature algorithm in the second national cryptographic information; verify the national cryptographic certificate using the verification information; send a Hand Shake message to the server, the Hand Shake message including a Finished message; and the server completes the connection establishment process with the client.

[0046] A fourth aspect of the present invention provides a QUIC connection establishment device, applied to a server, comprising:

[0047] The first acquisition module is used to receive a Client Hello message sent by the client, the Client Hello message including the first national cryptographic information and domain name information;

[0048] The selection module is used to select second national secret information from the first national secret information.

[0049] The first sending module is used to send a Server Hello message to the client, wherein the Server Hello message carries the second national cryptographic information;

[0050] The certificate determination module is used to determine the national cryptographic certificate based on the domain name information and the second national cryptographic information;

[0051] The first generation module is used to sign the national cryptographic certificate using the signature algorithm in the second national cryptographic information to generate verification information;

[0052] The first sending module is further configured to send a Hand Shake message to the client, the Hand Shake message including the national cryptographic certificate, the verification information, and a Finished message;

[0053] A fifth aspect of the present invention provides a QUIC connection establishment apparatus, applied to a client, comprising:

[0054] The second sending module is used to send a Client Hello message to the server, wherein the Client Hello message includes the first national cryptographic information;

[0055] The second acquisition module is used to receive a Server Hello message sent by the server, the Server Hello message including second national cryptographic information selected from the first national cryptographic information; and to receive a HandShake message sent by the server, the HandShake message including a national cryptographic certificate and verification information generated by the server through the signature algorithm in the second national cryptographic information;

[0056] The verification module is used to verify the national cryptographic certificate using the verification information;

[0057] The second sending module is also used to send a Hand Shake message to the server, the Hand Shake message containing a Finished message.

[0058] A sixth aspect of the present invention provides an electronic device including a computer-readable storage medium storing a computer program and a processor, wherein the computer program is read and executed by the processor to implement the method described above.

[0059] A seventh aspect of the present invention provides a computer-readable storage medium storing a computer program that, when read and executed by a processor, implements the method described above.

[0060] The eighth aspect of the present invention provides a computer program product, including a computer program that is executed by a processor to implement the method described above.

[0061] In this application, the server does not need to send a certificate chain, thus making the information sent by the client and server during the QUIC connection establishment process more symmetrical, greatly reducing the possibility of reflection attacks. This application introduces the Chinese national cryptographic algorithm during the QUIC connection establishment process. Based on the advantages of the Chinese national cryptographic algorithm, such as security, speed and independent controllability, it can better guarantee the security of user data. At the same time, by adding support for the SNI extended field on the server side, it can return different certificates according to different domain names, which greatly improves the ability to provide secure encrypted transmission for different domain names and the ability to deploy Chinese national cryptographic certificates more efficiently. Attached Figure Description

[0062] Figure 1 A schematic diagram of a QUIC connection establishment system according to an embodiment of the present invention;

[0063] Figure 2 A flowchart of a QUIC connection establishment method according to an embodiment of the present invention;

[0064] Figure 3 A flowchart of a server-side QUIC connection establishment method according to an embodiment of the present invention;

[0065] Figure 4 A flowchart of a server-side QUIC connection establishment method according to another embodiment of the present invention;

[0066] Figure 5 A flowchart illustrating a client-side QUIC connection establishment method according to an embodiment of the present invention;

[0067] Figure 6 A flowchart of a client-side QUIC connection establishment method according to another embodiment of the present invention;

[0068] Figure 7 This is a structural block diagram of a server-side QUIC connection establishment device according to an embodiment of the present invention;

[0069] Figure 8 A structural block diagram of a server-side QUIC connection establishment apparatus according to another embodiment of the present invention;

[0070] Figure 9This is a structural block diagram of a client-side QUIC connection establishment device according to an embodiment of the present invention;

[0071] Figure 10 This is a structural block diagram of a client-side QUIC connection establishment device according to another embodiment of the present invention;

[0072] Figure 11 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0073] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present application.

[0074] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit the scope of this application or its application or use.

[0075] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0076] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0077] Furthermore, the technical solutions of the various embodiments of this application can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by this application.

[0078] The following is combined Figure 1 Figure 5 This application describes a method for establishing a QUIC connection according to exemplary embodiments thereof. It should be noted that the following application scenarios are shown only to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way. Rather, the embodiments of this application can be applied to any applicable scenario.

[0079] This application provides a QUIC connection establishment method, see [link to relevant documentation]. Figure 1 The network system architecture upon which this method is based includes a client and a server. The client and server can establish communication through physical ports or other means.

[0080] It should be noted that a network system architecture can deploy one or more clients, and the same client can connect to multiple servers, and the same server can also communicate with multiple clients.

[0081] In this context, the client and the server are not fixed hardware products for the overall network system architecture. The same hardware, such as a computer or server, may be used as a client in one situation and as a server in another.

[0082] The distinction between client and server in this application can represent a correspondence in communication methods, such as one server corresponding to multiple clients; or it can represent different functions, such as a client for user use and a server for relaying. For the sake of more accurate judgment, this application does not limit the functions or roles of client and server, but simply considers the sender of the connection request in the communication connection as the client and the receiver of the connection request as the server.

[0083] Figure 1 The illustration only schematically depicts a client and a server, with the client communicating with the server. A session connection can be established between the client and the server; this session connection is an outbound connection from the client to the server, i.e., an outgoing communication connection. Other types of session connections can also be established between the client and the server, and this application does not impose any special limitations on them.

[0084] It should be noted that, Figure 1 The number of clients and servers shown is merely illustrative; the actual number can be adjusted according to implementation needs.

[0085] The implementation details of the technical solutions in the embodiments of this application are described in detail below.

[0086] This application provides a QUIC connection establishment method, which can be executed by a QUIC connection establishment device that can be integrated into electronic devices such as computers, servers, and computers. Figure 2 The diagram shows a flowchart of a QUIC connection establishment method according to an embodiment of the present invention; wherein, the QUIC connection establishment method includes:

[0087] S101, the client sends a Client Hello message to the server, the Client Hello message including the first national cryptographic information;

[0088] In one implementation, the first national cryptographic information is at least one national cryptographic algorithm suite supported by the client.

[0089] In this embodiment, the national cryptographic algorithm suite refers to a specified set of national cryptographic algorithms used in the connection establishment process and subsequent information exchange. This specification can be indicated by the abbreviation of the national cryptographic algorithm. A national cryptographic algorithm suite is a complete combination. Based on the national cryptographic algorithms specified in each process of this combination, the client and server can use the specified national cryptographic algorithms to send random numbers, keys, and perform encryption and decryption operations during connection establishment and data exchange. Each client can support at least one national cryptographic algorithm suite, and generally multiple suites; the specific number is not limited here.

[0090] In one implementation, the message packet of the Client Hello message may include: the highest SSL version number supported by the client and a list of Chinese cryptographic algorithm suites supported by the client.

[0091] In one implementation, the message packet of the Client Hello message may further include: handshake message type, message packet length, version number, random number, session ID length, session ID, algorithm suite length, and national cryptographic algorithm suite.

[0092] For example, the information in a Client Hello message packet is as follows:

[0093] Handshake Type: ClientHello;

[0094] Length: 574;

[0095] ProtocolVersionlegacy_version=0x0303;

[0096] Supported_versions=0x0304;

[0097] Random: (Details are too long to be displayed);

[0098] Session ID Length: 32;

[0099] Session ID: (Details are too long to be displayed);

[0100] Cipher Suites Length: 34;

[0101] Cipher Suites (17 suites) (The full details are too long to be displayed here).

[0102] Among them, Handshake Type: ClientHello indicates the handshake message type, which is ClientHello in this case; Length: 574, meaning the length is 574; ProtocolVersionlegacy_version = 0x0303, indicating the version number is 1.2, which must be set to 0x0303, i.e., TLS 1.2, for backward compatibility; Supported_versions = 0x0304, indicating that the client supports the TLS 1.3 version; Random, a random number, which can be a 32-byte value generated by a secure random number generator; Session ID Length: the length of the session ID; Session ID, the session ID, this field must be non-empty for compatibility with previous versions, so clients that do not provide the latest version of the session must generate a new 32-byte value, which does not have to be random, but should be unpredictable to avoid being fixed to a specific value, otherwise, it must be set to empty; Cipher Suites Length, which is the length of the Cipher Suites below; Cipher Suites is the Chinese national cryptographic algorithm suite, indicating that the client provides selectable Chinese national cryptographic encryption methods.

[0103] In one implementation, each national cryptographic algorithm suite includes a national cryptographic signature algorithm, a national cryptographic encryption algorithm, and a national cryptographic hash algorithm.

[0104] In this embodiment, the national cryptographic algorithms are a series of algorithms standardized by the State Cryptography Administration. These include symmetric encryption algorithms, elliptic curve asymmetric encryption algorithms, and hash algorithms, specifically SM1, SM2, SM3, SM4, etc.

[0105] Among them, SM1 is a symmetric encryption algorithm with a encryption strength of 128 bits, implemented in hardware. SM2 is a public-key algorithm published by the State Cryptography Administration, officially known as the Elliptic Curve Cryptography Algorithm, with a encryption strength of 256 bits. SM3 is a cryptographic hash algorithm, a digest algorithm with a hash value length of 32 bytes. The SM3 algorithm is suitable for digital signatures and verification in commercial cryptographic applications and is an improved implementation based on SHA-256. SM4 is a symmetric encryption algorithm, a block cipher algorithm with a encryption strength of 128 bits. The specific structures of the above algorithms will not be elaborated here.

[0106] In one implementation, the message packet of the Client Hello message further includes extended information. Furthermore, each piece of extended information includes three parts: type, length, and data.

[0107] In one implementation, the extended information includes key_share information. The key_share is the public key corresponding to the elliptic curve type; the specific representation of this key_share information will not be elaborated here.

[0108] In one implementation, the extended information includes Signature_algorithms extended information. Signature_algorithms extended information refers to the signature algorithms that the client can support. In this embodiment, it is a Chinese national cryptographic signature algorithm, from which the server can select a suitable Chinese national cryptographic signature algorithm to perform the corresponding signature operation.

[0109] In one embodiment, the extended information further includes SNI extended information, which includes domain name information. In this embodiment, the domain name information is the domain name information of the website that the client wants to access.

[0110] S102, the server selects the second national cryptographic information from the first national cryptographic information and sends a Server Hello message to the client, the Server Hello message including the second national cryptographic information;

[0111] In one implementation, selecting the second national secret information from the first national secret information includes:

[0112] All national cryptographic algorithm suites are extracted from the first national cryptographic information, and then filtered according to a preset filtering strategy. The filtered national cryptographic algorithm suites are then used as the second national cryptographic information. This preset filtering strategy allows for the rapid determination of the second national cryptographic information, thereby increasing the efficiency of QUIC connection establishment.

[0113] In this embodiment, the preset filtering strategy may be as follows: based on the arrangement order of all the national cryptographic algorithm suites in the first national cryptographic information, starting from the first one, determine whether the server supports the national cryptographic algorithm suite. If it supports it, the first national cryptographic algorithm suite is the filtered national cryptographic algorithm suite and the filtering ends; if it does not support it, the server determines whether it supports the second national cryptographic algorithm suite, until all national cryptographic algorithm suites in the first national cryptographic information have been determined (if all national cryptographic algorithm suites in the first national cryptographic information are not supported by the server, the server determines whether the first national cryptographic information contains a standard algorithm suite. If not, an error message is returned).

[0114] In this embodiment, the preset filtering strategy can also be: obtain a list of all national cryptographic algorithm suites supported by the server, starting from the first one, determine whether the national cryptographic algorithm suite is in the first national cryptographic information. If so, the national cryptographic algorithm suite at the first position in the list is the filtered national cryptographic algorithm suite and the filtering ends; if not supported, the server determines whether the national cryptographic algorithm suite at the second position in the list is in the first national cryptographic information, until the list of all national cryptographic algorithm suites supported by the server is completely determined.

[0115] In this embodiment, the preset filtering strategy may also be: to comprehensively determine the filtered national cryptographic algorithm suites based on the arrangement order of all the national cryptographic algorithm suites in the first national cryptographic information and the arrangement order of all national cryptographic algorithm suites supported by the server.

[0116] It should be noted that the above filtering strategy will only select one national cryptographic algorithm suite from the multiple national cryptographic algorithm suites in the first national cryptographic information (even if the server supports multiple national cryptographic algorithm suites).

[0117] In this embodiment, after selecting a national cryptographic algorithm suite, the brief description or name of the national cryptographic algorithm suite can be used as the second national cryptographic information, or the identifier of the national cryptographic algorithm suite by the first national cryptographic information can be used as the second national cryptographic information.

[0118] In this embodiment, the order of all national cryptographic algorithm suites supported by the server can be determined by considering one or more dimensions such as the implementation difficulty, encryption strength, and flexibility of each national cryptographic algorithm suite in the server, either individually or comprehensively; it can also be determined based on experience; or it can be temporarily adjusted based on the actual situation.

[0119] In one implementation, the server may have a mapping table that carries the priority of the national cryptographic algorithm suites, and the preset filtering strategy is to select the national cryptographic algorithm suite with the highest priority as the second national cryptographic information.

[0120] In one implementation, the message packet of the Server Hello message may include: the national cryptographic algorithm suite selected by the server.

[0121] In one implementation, the Server Hello message packet may further include: handshake message type, packet length, version number, random number, session ID length, session ID, and national cryptographic algorithm suite.

[0122] The Server Hello message has a similar structure to the aforementioned Client Hello message, but it differs in that it does not have an algorithm suite length and multiple national cryptographic algorithm suite identifiers. Instead, it has only one national cryptographic algorithm suite identifier, representing a national cryptographic algorithm suite selected from the corresponding Client Hello message packet.

[0123] For example: The Client Hello message packet contains multiple sets of Chinese cryptographic algorithm suites supported by the client. In the specific message packet, this is represented by the length / number of Chinese cryptographic algorithm suites (Cipher Suites Length) and the specific identifier of each Chinese cryptographic algorithm suite (Cipher Suites (17suites)). The corresponding Server Hello message packet contains one Chinese cryptographic algorithm suite selected from the above multiple sets of Chinese cryptographic algorithm suites supported by the client. In the specific message packet, this is represented by the specific identifier of the selected Chinese cryptographic algorithm suite (Cipher Suite) (since there is only one Chinese cryptographic algorithm suite, it is not necessary to carry the length / number of Chinese cryptographic algorithm suites).

[0124] S103, the server determines the national cryptographic certificate and signs the national cryptographic certificate using the signature algorithm in the second national cryptographic information to generate verification information;

[0125] In one implementation, determining the national cryptographic certificate includes:

[0126] If it is determined that the Client Hello message carries SNI extended information, extract the domain name information from the SNI extended information, and use the national cryptographic certificate corresponding to the domain name information as the national cryptographic certificate and / or

[0127] If it is determined that the Client Hello message does not carry the SNI extended information, the default national cryptographic certificate will be used as the national cryptographic certificate.

[0128] In this way, regardless of whether the Client Hello message carries SNI extended information, the corresponding national cryptographic certificate can be determined, which greatly improves the ability to provide secure encrypted transmission for different domain names and the ability to deploy national cryptographic certificates more efficiently.

[0129] For example, the extended information in a Client Hello message can take the following form:

[0130]

[0131] The Server Name Indication extension mentioned above is the SNI extension information, and the domain name information recorded in the SNI extension information is: www.baidu.com.

[0132] In this embodiment, the server can pre-establish a mapping table between domain name information and national cryptographic certificates. After obtaining the domain name information, the national cryptographic certificate is determined according to the mapping table. Alternatively, the mapping table can synchronously record the mapping relationship between empty domain names (i.e., no domain name information) and default national cryptographic certificates. Thus, when the SNI extended information is not carried in the Client Hello message, it is set to obtain an empty domain name, thereby obtaining the default national cryptographic certificate.

[0133] In this embodiment, if it is determined that the Client Hello message does not carry the SNI extended information, the default national cryptographic certificate is used as the national cryptographic certificate. The server can also first determine whether the Client Hello message contains the SNI extended information; if it does, the national cryptographic certificate is obtained through the mapping table; if it does not, the default national cryptographic certificate is directly obtained.

[0134] In this embodiment, the signature algorithm in the second national cryptographic information can be a signature algorithm carried in the national cryptographic algorithm suite. After the server selects a national cryptographic algorithm suite, it signs the national cryptographic certificate according to the signature algorithm in the national cryptographic algorithm suite.

[0135] It should be noted that in this embodiment, the first national cryptographic information includes multiple national cryptographic algorithm suites, such as TLS_SM4_GCM_SM3 and TLS_SM4_CCM_SM3; the second national cryptographic information can be a national cryptographic algorithm suite selected from multiple national cryptographic algorithm suites.

[0136] In this embodiment, the verification information is information obtained by digitally signing using a signature algorithm.

[0137] In one embodiment, the verification information includes information obtained by digitally signing preset information using a signature algorithm, and the preset information itself.

[0138] In one implementation, the preset information may be message summary information or information that both the client and the server have (such as the content of a Client Hello message or a Server Hello message), depending on the actual selection. This implementation does not impose any restrictions on this.

[0139] In one implementation, a private key is used to encrypt a digest of the text to be transmitted, and the resulting ciphertext is called the digital signature of the transmission process.

[0140] S104, the server sends a Hand Shake message to the client, the Hand Shake message containing the national cryptographic certificate, the verification information and the Finished message;

[0141] In this embodiment, the Hand Shake message is an encrypted message packet, and its encryption method can be based on the encryption algorithm in the national cryptographic algorithm suite by the server.

[0142] In one implementation, the Hand Shake message is a data packet containing a national cryptographic certificate, the verification information, and a Finished message.

[0143] In one implementation, the national cryptographic certificate, the verification information, and the Finished message contained in the Hand Shake message can be sent independently.

[0144] In one implementation, the Hand Shake message, the national cryptographic certificate, the verification information, and the Finished message are sent after encryption.

[0145] In this embodiment, the Finished message is the last part of the authentication block, used to provide authentication for the handshake (connection establishment) and key calculation. Specifically, after verifying the national cryptographic certificate, the client generates a Finished message and sends it to the server. Upon receiving the Finished message, the server verifies it. If verification fails, the connection needs to be terminated; if verification succeeds, the client's part is confirmed to be complete. Conversely, after generating verification information, the server also generates a Finished message and sends it to the client.

[0146] S105, the client verifies the national cryptographic certificate using the verification information;

[0147] In this embodiment, the national cryptographic certificate contains the server's public key, and the verification information is obtained by the server encrypting preset information using its private key. After obtaining the above information, the client can decrypt the verification information using the server's public key to obtain the preset information. If the preset information matches the preset information in the verification information, it proves that the national cryptographic certificate has passed verification; if it does not match, the national cryptographic certificate has failed verification. The specific verification process will not be described in detail in this application.

[0148] S106, the client sends a Hand Shake message to the server, the Hand Shake message containing a Finished message;

[0149] In this embodiment, after the client verifies the national cryptographic certificate, it sends a Hand Shake message to the server. In the aforementioned steps, the client has already received the Finished message from the server; therefore, after sending the Finished message to the server, it can start sending and receiving application data through the connection.

[0150] S107, The client and server complete the connection establishment process;

[0151] S108, The client and server generate a session key;

[0152] In one implementation, the processes for generating session keys by the client and server are independent. Both the client and server generate their respective session keys using the same process. Since the parameters for generating the session keys are identical, the same session key can be generated through the same process. After completing the handshake request (connection establishment process), the client and server each generate their session keys. After the handshake is complete (connection established), the client and server use the generated session keys for encrypted communication, thereby improving the security of data transmission.

[0153] In one implementation, the server generates a session key, including:

[0154] The Client Hello message also includes a client-side random number and client-side key-share information;

[0155] Get the server-side random number and server-side key-share information;

[0156] A pre-master key is generated based on the client key-share information and the server key-share information;

[0157] The session key is generated based on the client random number, the server random number, and the pre-master key.

[0158] The server sends a Server Hello message to the client, and the Server Hello message includes a server-side random number and server-side key-share information.

[0159] The key-share information includes, but is not limited to, preset parameters used to calculate the pre-master key; for example: the client sends a request (Client Hello), the extension part carries the supported elliptic curve types, and calculates the client public key (POINT) for each supported elliptic curve type, and the client public key is placed in the key-share information in the extension information; after the server selects the elliptic curve parameters, it multiplies them by the base point of the elliptic curve to obtain the server public key (POINT); then it extracts the corresponding client public key from the key-share information in the Client Hello and calculates the pre-master key; after the client receives the server's server public key (POINT), it calculates the pre-master key.

[0160] In one implementation, the client generates a session key, including:

[0161] Obtain client-side random number and client-side key-share information;

[0162] The Server Hello message also includes a server-side random number and server-side key-share information;

[0163] A pre-master key is generated based on the client key-share information and the server key-share information;

[0164] The session key is generated based on the client random number, the server random number, and the pre-master key.

[0165] The client-side random number and client-side key-share information are sent to the server by being carried in the Client Hello message.

[0166] In this embodiment, the client-side random number and client-side key-share information are generated by the client; the server-side random number and server-side key-share information are generated by the server, and the specific generation method is not limited here.

[0167] In this way, by utilizing the pre-existing information of the session key passed between the client and server during the handshake process (connection establishment process), the session key can be quickly determined without affecting the handshake process (connection establishment process), greatly shortening the time for communication between the two ends after the handshake (connection establishment).

[0168] S109, When the server interacts with the client, it uses the session key and the SM4 algorithm in the second national cryptographic information for encryption / decryption;

[0169] In this embodiment, encryption / decryption is performed using the session key and the SM4 algorithm in the second national cryptographic information. Specifically, when the client sends data, the data is first encrypted using the SM4 algorithm based on the session key before being sent to the server. When the server receives the encrypted data, it first decrypts the data using the SM4 algorithm based on the session key to obtain the corresponding data. Similarly, when the server sends data, it first encrypts the data using the SM4 algorithm based on the session key before being sent to the client. When the client receives the encrypted data, it first decrypts the data using the SM4 algorithm based on the session key to obtain the corresponding data.

[0170] This eliminates the need for the server to send a certificate chain, making the information exchanged between the client and server during QUIC connection establishment nearly symmetrical and significantly reducing the possibility of reflection attacks. Furthermore, the introduction of Chinese cryptographic algorithms into the QUIC connection establishment process leverages the advantages of security, speed, and independent controllability to better guarantee user data security. Simultaneously, by adding support for SNI extended fields on the server side, it can return different certificates based on different domain names, greatly enhancing the ability to provide secure encrypted transmission for different domain names and enabling more efficient deployment of Chinese cryptographic certificates.

[0171] This application provides another QUIC connection establishment method, which is similar to the aforementioned QUIC connection establishment method, except that, as Figure 3 As shown, the QUIC connection establishment method in this embodiment, applied to the server side, includes:

[0172] S201, Receive a Client Hello message sent by the client, wherein the Client Hello message includes the first national cryptographic information;

[0173] In one implementation, the first national cryptographic information is at least one national cryptographic algorithm suite supported by the client.

[0174] S202, Select second national cryptographic information from the first national cryptographic information, and send a ServerHello message to the client, wherein the ServerHello message includes the second national cryptographic information;

[0175] In one implementation, selecting the second national secret information from the first national secret information includes:

[0176] Extract all national cryptographic algorithm suites from the first national cryptographic information, filter them according to a preset filtering strategy, and use the filtered national cryptographic algorithm suites as the second national cryptographic information.

[0177] S203, determine the national cryptographic certificate, and sign the national cryptographic certificate using the signature algorithm in the second national cryptographic information to generate verification information;

[0178] In one implementation, determining the national cryptographic certificate includes:

[0179] If it is determined that the Client Hello message carries SNI extended information, the domain name information in the SNI extended information is extracted, and the national cryptographic certificate corresponding to the domain name information is used as the national cryptographic certificate; and / or if it is determined that the Client Hello message does not carry the SNI extended information, the default national cryptographic certificate is used as the national cryptographic certificate.

[0180] S204, send a Hand Shake message to the client, the Hand Shake message containing the national cryptographic certificate, the verification information and the Finished message;

[0181] S205, the server completes the connection establishment process with the client.

[0182] This eliminates the need for the server to send a certificate chain, making the information exchanged between the client and server during QUIC connection establishment nearly symmetrical and significantly reducing the possibility of reflection attacks. Furthermore, the introduction of Chinese cryptographic algorithms into the QUIC connection establishment process leverages the advantages of security, speed, and independent controllability to better guarantee user data security. Simultaneously, by adding support for SNI extended fields on the server side, it can return different certificates based on different domain names, greatly enhancing the deployment capabilities of Chinese cryptographic certificates.

[0183] This application provides another QUIC connection establishment method, applied to the server side, which is similar to the aforementioned QUIC connection establishment method, except that, as Figure 4 As shown, the method further includes:

[0184] S206, Generate session key;

[0185] In one implementation, generating the session key includes:

[0186] The Client Hello message also includes a client-side random number and client-side key-share information;

[0187] Get the server-side random number and server-side key-share information;

[0188] A pre-master key is generated based on the client key-share information and the server key-share information;

[0189] The session key is generated based on the client random number, the server random number, and the pre-master key.

[0190] S207, When interacting with the client, encryption / decryption is performed using the session key and the SM4 algorithm in the second national cryptographic information;

[0191] The session key is generated after the connection between the server and the client is established.

[0192] This application provides another QUIC connection establishment method, which is similar to the aforementioned QUIC connection establishment method, except that, as Figure 5 As shown, the QUIC connection establishment method in this embodiment, applied to the client, includes:

[0193] S301, Send a Client Hello message to the server, the Client Hello message including the first national cryptographic information;

[0194] In one implementation, the first national cryptographic information is at least one national cryptographic algorithm suite supported by the client.

[0195] In one implementation, the Client Hello message further includes SNI extended information, which includes the domain name information requested by the client; the SNI extended information is used by the server to select the corresponding national cryptographic certificate.

[0196] S302, Receive a Server Hello message sent by the server, wherein the Server Hello message includes second national cryptographic information selected from the first national cryptographic information;

[0197] S303, Receive a Hand Shake message sent by the server, the Hand Shake message including a national cryptographic certificate and verification information generated by the server using the signature algorithm in the second national cryptographic information;

[0198] S304, Verify the national cryptographic certificate using the verification information;

[0199] S305, Send a Hand Shake message to the server, the Hand Shake message containing a Finished message;

[0200] S306, the client completes the connection establishment process with the server.

[0201] This eliminates the need for the server to send a certificate chain, making the information exchanged between the client and server during QUIC connection establishment nearly symmetrical and significantly reducing the possibility of reflection attacks. Furthermore, the introduction of Chinese cryptographic algorithms into the QUIC connection establishment process leverages the advantages of security, speed, and independent controllability to better guarantee user data security. Simultaneously, by adding support for SNI extended fields on the server side, it can return different certificates based on different domain names, greatly enhancing the ability to provide secure encrypted transmission for different domain names and enabling more efficient deployment of Chinese cryptographic certificates.

[0202] This application provides another QUIC connection establishment method, applied to a client, which is similar to the aforementioned QUIC connection establishment method, except that, as Figure 6 As shown, the method further includes:

[0203] S307, Generate session key;

[0204] In one implementation, generating the session key includes:

[0205] The Server Hello message also includes a server-side random number and server-side key-share information;

[0206] Obtain client-side random number and client-side key-share information;

[0207] A pre-master key is generated based on the client key-share information and the server key-share information;

[0208] The session key is generated based on the client random number, the server random number, and the pre-master key.

[0209] The client-side random number and client-side key-share information are sent to the server by being carried in the Client Hello message.

[0210] S308, When interacting with the server, encryption / decryption is performed using the session key and the SM4 algorithm in the second national cryptographic information;

[0211] The session key is generated after the connection between the client and the server is established.

[0212] This application provides a QUIC connection establishment device for executing the QUIC connection establishment method described above. The QUIC connection establishment device will be described in detail below.

[0213] like Figure 7As shown, the QUIC connection establishment device, applied to the server side, includes:

[0214] The first acquisition module 201 is used to receive a Client Hello message sent by the client, wherein the Client Hello message includes first national cryptographic information and domain name information;

[0215] Selection module 202 is used to select second national secret information from the first national secret information.

[0216] The first sending module 203 is used to send a Server Hello message to the client, wherein the Server Hello message carries the second national cryptographic information;

[0217] Certificate determination module 204 is used to determine national cryptographic certificates;

[0218] The first generation module 205 is used to sign the national cryptographic certificate using the signature algorithm in the second national cryptographic information to generate verification information;

[0219] The first sending module is further configured to send a Hand Shake message to the client, the Hand Shake message including the national cryptographic certificate, the verification information, and a Finished message;

[0220] In one implementation, the first national cryptographic information is at least one national cryptographic algorithm suite supported by the client.

[0221] In one embodiment, the selection module 202 is further configured to: extract all the national cryptographic algorithm suites in the first national cryptographic information, filter them according to a preset filtering strategy, and use the filtered national cryptographic algorithm suites as the second national cryptographic information.

[0222] In one implementation, the certificate determination module 204 is further configured to: if it is determined that the Client Hello message carries SNI extended information, extract the domain name information in the SNI extended information, and use the national cryptographic certificate corresponding to the domain name information as the national cryptographic certificate; and / or, if it is determined that the Client Hello message does not carry the SNI extended information, use the default national cryptographic certificate as the national cryptographic certificate.

[0223] This eliminates the need for the server to send a certificate chain, making the information exchanged between the client and server during QUIC connection establishment nearly symmetrical and significantly reducing the possibility of reflection attacks. Furthermore, the introduction of Chinese cryptographic algorithms into the QUIC connection establishment process leverages the advantages of security, speed, and independent controllability to better guarantee user data security. Simultaneously, by adding support for SNI extended fields on the server side, it can return different certificates based on different domain names, greatly enhancing the ability to provide secure encrypted transmission for different domain names and enabling more efficient deployment of Chinese cryptographic certificates.

[0224] This application provides another QUIC connection establishment device, which is similar to the aforementioned QUIC connection establishment device, except that, as Figure 8 As shown, the device further includes:

[0225] The first encryption / decryption module 207 is used to perform encryption / decryption using a session key and the SM4 algorithm in the second national cryptographic information when interacting with the server.

[0226] The session key is generated after the connection between the client and the server is established.

[0227] In one embodiment, the apparatus further includes a first session module 206 for generating the session key.

[0228] In one implementation, the first session module 206 is further configured to: the Client Hello message further includes a client random number and client key-share information; obtain a server random number and server key-share information; generate a pre-master key based on the client key-share information and the server key-share information; and generate the session key based on the client random number, the server random number, and the pre-master key.

[0229] The QUIC connection establishment device and the QUIC connection establishment method provided in the above embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0230] This application provides a QUIC connection establishment device for executing the QUIC connection establishment method described above. The QUIC connection establishment device will be described in detail below.

[0231] like Figure 9 As shown, the QUIC connection establishment device, applied to the client, includes:

[0232] The second sending module 301 is used to send a Client Hello message to the server, wherein the Client Hello message includes the first national cryptographic information;

[0233] The second acquisition module 302 is configured to receive a Server Hello message sent by the server, the Server Hello message including second national cryptographic information selected from the first national cryptographic information; and receive a HandShake message sent by the server, the HandShake message including a national cryptographic certificate and verification information generated by the server through the signature algorithm in the second national cryptographic information;

[0234] Verification module 303 is used to verify the national cryptographic certificate using the verification information;

[0235] The second sending module 301 is also used to send a Hand Shake message to the server, the Hand Shake message containing a Finished message.

[0236] This eliminates the need for the server to send a certificate chain, making the information exchanged between the client and server during QUIC connection establishment nearly symmetrical and significantly reducing the possibility of reflection attacks. Furthermore, the introduction of Chinese cryptographic algorithms into the QUIC connection establishment process leverages the advantages of security, speed, and independent controllability to better guarantee user data security. Simultaneously, by adding support for SNI extended fields on the server side, it can return different certificates based on different domain names, greatly enhancing the ability to provide secure encrypted transmission for different domain names and enabling more efficient deployment of Chinese cryptographic certificates.

[0237] In one implementation, the Client Hello message further includes SNI extended information, which includes the domain name information requested by the client; the SNI extended information is used by the server to select the corresponding national cryptographic certificate.

[0238] In one implementation, the first national cryptographic information is at least one national cryptographic algorithm suite supported by the client.

[0239] This application provides another QUIC connection establishment device, which is similar to the aforementioned QUIC connection establishment device, except that, as Figure 10 As shown, the device further includes:

[0240] The second encryption / decryption module 305 is used to perform encryption / decryption using a session key and the SM4 algorithm in the second national cryptographic information when interacting with the server.

[0241] The session key is generated after the connection between the client and the server is established.

[0242] In one embodiment, the apparatus further includes a second session module 304 for generating the session key.

[0243] In one implementation, the second session module 304 is further configured to: obtain a client random number and client key-share information; the Server Hello message also includes a server random number and server key-share information; generate a pre-master key based on the client key-share information and the server key-share information; and generate the session key based on the client random number, the server random number, and the pre-master key.

[0244] The client-side random number and client-side key-share information are sent to the server by being carried in the Client Hello message.

[0245] The QUIC connection establishment device and the QUIC connection establishment method provided in the above embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0246] This application provides a QUIC connection establishment system for executing the QUIC connection establishment method described above. The QUIC connection establishment system will be described in detail below.

[0247] like Figure 1 As shown, the QUIC connection establishment system includes: a client 30 and a server 20;

[0248] The server is configured to receive a Client Hello message sent by the client, the Client Hello message including first national cryptographic information and domain name information; select second national cryptographic information from the first national cryptographic information and send a Server Hello message to the client, the Server Hello message including the second national cryptographic information; determine a national cryptographic certificate based on the domain name information and the second national cryptographic information, and sign the national cryptographic certificate using the signature algorithm in the second national cryptographic information to generate verification information; send a Hand Shake message to the client, the Hand Shake message containing the national cryptographic certificate, the verification information, and a Finished message; the server completes the connection establishment process with the client;

[0249] The client is configured to send a Client Hello message to the server, the Client Hello message including first national cryptographic information; receive a Server Hello message sent by the server, the Server Hello message including second national cryptographic information selected from the first national cryptographic information; receive a Hand Shake message sent by the server, the Hand Shake message including a national cryptographic certificate and verification information generated by the server using the signature algorithm in the second national cryptographic information; verify the national cryptographic certificate using the verification information; send a Hand Shake message to the server, the Hand Shake message including a Finished message; and complete the connection establishment process with the server.

[0250] The QUIC connection establishment system and the QUIC connection establishment method provided in the above embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0251] This application provides an electronic device, such as... Figure 11 As shown, it includes a computer-readable storage medium 401 storing a computer program and a processor 402, the computer program being read and executed by the processor to implement the method described above.

[0252] The electronic devices provided in the above embodiments of this application and the QUIC connection establishment method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0253] This application provides a computer-readable storage medium storing a computer program that is read and executed by a processor to implement the method described above.

[0254] The technical solutions of the embodiments of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be an air conditioner, refrigeration unit, personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method described in the embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0255] The computer-readable storage medium provided in the above embodiments of this application and the QUIC connection establishment method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0256] This application provides a computer program product, including a computer program that is executed by a processor to implement the method described above.

[0257] The computer program product provided in the above embodiments of this application and the QUIC connection establishment method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application stored therein.

[0258] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0259] The various embodiments in this application are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of the QUIC connection establishment method, system, apparatus, electronic device, and machine-readable storage medium are basically similar to the QUIC connection establishment method embodiment described at the beginning, so the description is relatively simple. Relevant parts can be referred to the description of the QUIC connection establishment method embodiment described at the beginning.

[0260] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.

Claims

1. A method for QUIC connection establishment, characterized in that, Applied to the server side, including: The client receives a Client Hello message sent by the client. The Client Hello message includes first national cryptographic information, which is at least one national cryptographic algorithm suite supported by the client. The Client Hello message also includes a client random number and client key-share information. Select a second national cryptographic information from the first national cryptographic information and send a Server Hello message to the client, the Server Hello message including the second national cryptographic information; The step of selecting the second national secret information from the first national secret information includes: Extract all national cryptographic algorithm suites from the first national cryptographic information, filter them according to a preset filtering strategy, and use the filtered national cryptographic algorithm suites as the second national cryptographic information; The national cryptographic certificate is determined, and the national cryptographic certificate is signed using the signature algorithm in the second national cryptographic information to generate verification information; Send a Hand Shake message to the client, the Hand Shake message containing the national cryptographic certificate, the verification information, and a Finished message; The server completes the connection establishment process with the client. The method further includes: When interacting with the client, encryption / decryption is performed using the session key and the SM4 algorithm in the second national cryptographic information; The session key is generated after the connection between the server and the client is established; The generation of the session key includes: The Client Hello message also includes a client-side random number and client-side key-share information; Get the server-side random number and server-side key-share information; A pre-master key is generated based on the client key-share information and the server key-share information; The session key is generated based on the client random number, the server random number, and the pre-master key.

2. The method of claim 1, wherein, The determination of the national cryptographic certificate includes: If it is determined that the Client Hello message carries SNI extended information, the domain name information in the SNI extended information is extracted, and the national cryptographic certificate corresponding to the domain name information is used as the national cryptographic certificate; and / or if it is determined that the Client Hello message does not carry the SNI extended information, the default national cryptographic certificate is used as the national cryptographic certificate.

3. A QUIC connection establishment method, characterized by, Applied to the client side, including: Send a Client Hello message to the server. The Client Hello message includes first national cryptographic information, which is at least one national cryptographic algorithm suite supported by the client. The Client Hello message also includes a client random number and client key-share information. Receive a Server Hello message sent by the server, wherein the Server Hello message includes second national cryptographic information selected from the first national cryptographic information; Receive a Hand Shake message sent by the server, the Hand Shake message including a national cryptographic certificate and verification information generated by the server using the signature algorithm in the second national cryptographic information; The national cryptographic certificate is verified using the verification information. Send a Hand Shake message to the server, the Hand Shake message containing a Finished message; The server completes the connection establishment process with the client. The method further includes: When interacting with the server, encryption / decryption is performed using the session key and the SM4 algorithm in the second national cryptographic information; The session key is generated after the connection between the client and the server is established; The generation of the session key includes: Obtain client-side random number and client-side key-share information; The Server Hello message also includes a server-side random number and server-side key-share information; A pre-master key is generated based on the client key-share information and the server key-share information; The session key is generated based on the client random number, the server random number, and the pre-master key.

4. The method according to claim 3, characterized in that, The Client Hello message also includes SNI extended information, which includes the domain name information requested by the client. The SNI extended information is used by the server to select the national cryptographic certificate corresponding to the domain name information.

5. A QUIC connection establishment system, characterized in that, include: Client and server; The server is configured to receive a Client Hello message sent by a client, the Client Hello message including first national cryptographic information and domain name information, the first national cryptographic information being at least one national cryptographic algorithm suite supported by the client, the Client Hello message also including a client random number and client key-share information; select second national cryptographic information from the first national cryptographic information and send a Server Hello message to the client, the Server Hello message including the second national cryptographic information; the selection of the second national cryptographic information includes: extracting all national cryptographic algorithm suites from the first national cryptographic information, filtering according to a preset filtering strategy, and using the filtered national cryptographic algorithm suites as the second national cryptographic information; determining a national cryptographic certificate based on the domain name information and the second national cryptographic information, and signing the national cryptographic certificate using the signature algorithm in the second national cryptographic information to generate verification information; and sending a Hand Shake message to the client, the Hand... The Shake message includes the national cryptographic certificate, the verification information, and the Finished message; the server completes the connection establishment process with the client; when interacting with the client, encryption / decryption is performed using the session key and the SM4 algorithm in the second national cryptographic information; the session key is generated after the connection between the server and the client is established; the generation of the session key includes: the Client Hello message also includes a client random number and client key-share information; obtaining the server random number and server key-share information; generating a pre-master key based on the client key-share information and the server key-share information; and generating the session key based on the client random number, the server random number, and the pre-master key. The client is configured to send a Client Hello message to the server, the Client Hello message including first national cryptographic information, which is at least one national cryptographic algorithm suite supported by the client, and also including a client random number and client key-share information; receive a Server Hello message sent by the server, the Server Hello message including second national cryptographic information selected from the first national cryptographic information; receive a Hand Shake message sent by the server, the Hand Shake message including a national cryptographic certificate and verification information generated by the server using the signature algorithm in the second national cryptographic information; verify the national cryptographic certificate using the verification information; and send a Hand Shake message to the server, the Hand Shake message including a national cryptographic certificate and verification information generated by the server using the signature algorithm in the second national cryptographic information; verify the national cryptographic certificate using the verification information; and send a Hand Shake message to the server, the Hand Shake message including a first national cryptographic certificate, which is at least one national cryptographic algorithm suite supported by the client, and also including a client random number and client key-share information; receive a Server Hello message sent by the server, the Server Hello message including first national cryptographic information, which is at least one national cryptographic algorithm suite supported by the client, and also including client random number and client key-share information; receive a Hand Shake message sent by the server, the Hand Shake ... The Shake message includes a Finished message; the server completes the connection establishment process with the client; when interacting with the server, encryption / decryption is performed using the session key and the SM4 algorithm in the second national cryptographic information; the session key is generated after the connection between the client and the server is established; the generation of the session key includes: obtaining a client random number and client key-share information; the ServerHello message also includes a server random number and server key-share information; a pre-master key is generated based on the client key-share information and the server key-share information; the session key is generated based on the client random number, the server random number, and the pre-master key.

6. A QUIC connection establishment device, characterized in that, Applied to the server side, including: The first acquisition module is used to receive a Client Hello message sent by the client. The Client Hello message includes first national cryptographic information and domain name information. The first national cryptographic information is at least one national cryptographic algorithm suite supported by the client. The Client Hello message also includes a client random number and client key-share information. The selection module is used to select second national secret information from the first national secret information. The selection module is specifically used to extract all national cryptographic algorithm suites in the first national cryptographic information, filter them according to a preset filtering strategy, and use the filtered national cryptographic algorithm suites as the second national cryptographic information. The first sending module is used to send a Server Hello message to the client, wherein the Server Hello message carries the second national cryptographic information; The certificate determination module is used to determine the national cryptographic certificate based on the domain name information and the second national cryptographic information; The first generation module is used to sign the national cryptographic certificate using the signature algorithm in the second national cryptographic information to generate verification information; The first sending module is further configured to send a Hand Shake message to the client, the Hand Shake message including the national cryptographic certificate, the verification information, and a Finished message; The device further includes: The first encryption / decryption module is used to perform encryption / decryption using a session key and the SM4 algorithm in the second national cryptographic information when interacting with the server. The session key is generated after the connection between the client and the server is established; The device further includes: a first session module, which is used to generate the session key; The first session module is further configured to: the Client Hello message further includes a client random number and client key-share information; obtain a server random number and server key-share information; generate a pre-master key based on the client key-share information and the server key-share information; and generate the session key based on the client random number, the server random number, and the pre-master key.

7. A QUIC connection establishment device, characterized in that, Applied to the client side, including: The second sending module is used to send a Client Hello message to the server. The Client Hello message includes first national cryptographic information, which is at least one national cryptographic algorithm suite supported by the client. The Client Hello message also includes a client random number and client key-share information. The second acquisition module is used to receive a Server Hello message sent by the server, the Server Hello message including second national cryptographic information selected from the first national cryptographic information; and to receive a Hand Shake message sent by the server, the Hand Shake message including a national cryptographic certificate and verification information generated by the server through the signature algorithm in the second national cryptographic information; The verification module is used to verify the national cryptographic certificate using the verification information; The second sending module is also used to send a Hand Shake message to the server, the Hand Shake message containing a Finished message; The device further includes: The second encryption / decryption module is used to perform encryption / decryption using the session key and the SM4 algorithm in the second national cryptographic information when interacting with the server. The session key is generated after the connection between the client and the server is established; The device further includes: a second session module, which is used to generate the session key; The second session module is further configured to: obtain a client random number and client key-share information; the ServerHello message also includes a server random number and server key-share information; generate a pre-master key based on the client key-share information and the server key-share information; and generate the session key based on the client random number, the server random number, and the pre-master key.

8. An electronic device, characterized in that, It includes a computer-readable storage medium storing a computer program and a processor, the computer program being read and executed by the processor to implement the method as described in any one of claims 1-2 or 3-4.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when read and executed by a processor, implements the method as described in any one of claims 1-2 or 3-4.

10. A computer program product, comprising a computer program, characterized in that, The computer program is executed by a processor to implement the method as described in any one of claims 1-2 or 3-4.