CN116566612A - QUIC connection establishment method and system, device, electronic equipment and storage medium - Google Patents

QUIC connection establishment method and system, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116566612A
CN116566612A CN202210101952.7A CN202210101952A CN116566612A CN 116566612 A CN116566612 A CN 116566612A CN 202210101952 A CN202210101952 A CN 202210101952A CN 116566612 A CN116566612 A CN 116566612A
Authority
CN
China
Prior art keywords
information
server
client
national
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210101952.7A
Other languages
Chinese (zh)
Inventor
卢江滨
李逸骏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guizhou Baishancloud Technology Co Ltd
Original Assignee
Guizhou Baishancloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guizhou Baishancloud Technology Co Ltd filed Critical Guizhou Baishancloud Technology Co Ltd
Priority to CN202210101952.7A priority Critical patent/CN116566612A/en
Publication of CN116566612A publication Critical patent/CN116566612A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a QUIC connection establishment method, a system, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving Client Hello information sent by a Client, wherein the Client Hello information comprises first country secret information; selecting second country secret information from the first country secret information, and sending a Server Hello message to the client, wherein the Server Hello message comprises the second country secret information; determining a national secret certificate, and signing the national secret certificate through a signature algorithm in second national secret information to generate verification information; sending a Hand Shake message to the client, wherein the Hand Shake message comprises the national secret certificate, the verification information and the Finished message; and the server side completes the connection establishment process with the client side. Therefore, the server is not required to send a certificate chain, so that the sent information of the client and the server tends to be symmetrical in the QUIC connection establishment process, and the possibility of reflection attack is greatly reduced.

Description

QUIC connection establishment method and system, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and a system device for establishing a quitc connection, an electronic device, and a storage medium.
Background
For the importance of security, most of the traffic accessed by the network edge is https traffic nowadays. However, conventional https requests are transmitted based on the TCP protocol, which has some problems including TCP queue head blocking, handshake delay, protocol rigidification, etc. The QUIC (Quick UDP Internet Connection) protocol, which enables both high reliability and low latency, is therefore becoming a new alternative. The QUIC protocol is a transmission protocol based on UDP, can realize multiplexing and security protection, integrates the advantages of a hypertext transfer protocol (HyperText Transfer Protocol, HTTP) 2.0, a security transport layer protocol (Transport Layer Security, TLS) and a transmission control protocol (Transmission Control Protocol, TCP), and also realizes reduced access delay, more convenient traffic congestion control, better error correction mechanism and the like.
However, the handshake mode of the QUIC is asymmetric, when the first handshake is performed, the server side usually sends its own certificate chain, and the client side only needs to send a few bytes, so that compared with the udp+quic protocol and the tcp+tls protocol, the possibility of reflection attack is increased, and the encryption algorithm used in the prior art has the problem of poor security controllability. Therefore, how to avoid the adverse effect on the security information of the user in the case of communication using the QUIC protocol is a problem to be solved by the present application.
Disclosure of Invention
In order to solve the above problems, a first aspect of the present invention provides a QUIC connection establishment method, applied to a server, including:
receiving Client Hello information sent by a Client, wherein the Client Hello information comprises first country secret information;
selecting second country secret information from the first country secret information, and sending a Server Hello message to the client, wherein the Server Hello message comprises the second country secret information;
determining a national secret certificate, and signing the national secret certificate through a signature algorithm in second national secret information to generate verification information;
sending a Hand Shake message to the client, wherein the Hand Shake message comprises the national secret certificate, the verification information and the Finished message;
and the server side completes the connection establishment process with the client side.
In one embodiment, the first cryptographic information is at least one cryptographic algorithm suite supported by the client.
In one embodiment, the selecting the second cryptographic information from the first cryptographic information includes:
and extracting all the national cryptographic algorithm kits in the first national cryptographic information, screening according to a preset screening strategy, and taking the screened national cryptographic algorithm kits as the second national cryptographic information.
In one embodiment, the determining the cryptographic certificate includes:
if the Client Hello message is determined to carry SNI extension information, extracting domain name information in the SNI extension information, taking a national secret certificate corresponding to the domain name information as the national secret certificate, and/or
If the fact that the Client Hello message does not carry the SNI expansion information is determined, a default national encryption certificate is used as the national encryption certificate.
In one embodiment, the method further comprises:
when the client performs data interaction, encrypting/decrypting is performed through the session key and an SM4 algorithm in the second cryptographic information;
the session key is generated after the connection between the server and the client is established.
In one embodiment, the generation of the session key includes:
the Client Hello message also comprises a Client random number and Client key-share information;
acquiring a server random number and server key-share information;
generating a premaster secret key according to the client key-share information and the server key-share information;
and generating the session key according to the client random number, the server random number and the premaster secret key.
The second aspect of the present invention provides a QUIC connection establishment method, applied to a client, comprising:
sending Client Hello information to a server, wherein the Client Hello information comprises first country secret information;
receiving a Server Hello message sent by the Server, wherein the Server Hello message comprises second country secret information selected from the first country secret information;
receiving a Hand vibration message sent by the server, wherein the Hand vibration message comprises a national secret certificate and verification information generated by the server through a signature algorithm in the second national secret information;
verifying the national encryption certificate through the verification information;
sending a Hand Shake message to a server, wherein the Hand Shake message comprises a finish message;
and the server side completes the connection establishment process with the client side.
In one embodiment, the method further comprises:
when the server performs data interaction with the server, encryption/decryption is performed through a session key and an SM4 algorithm in the second cryptographic information;
the session key is generated after the connection between the client and the server is established.
In one embodiment, the generation of the session key includes:
acquiring a client random number and client key-share information;
The Server Hello message also comprises a Server random number and Server key-share information;
generating a premaster secret key according to the client key-share information and the server key-share information;
and generating the session key according to the client random number, the server random number and the premaster secret key.
In one embodiment, the Client Hello message further includes SNI extension information, where the SNI extension information includes domain name information requested by the Client;
the SNI extension information is used for the server to select a national certificate corresponding to the domain name information.
In one embodiment, the method further comprises:
the first cryptographic information is at least one cryptographic algorithm suite supported by the client.
A third aspect of the present invention provides a QUIC connection setup system comprising: a client and a server;
the server is used for receiving Client Hello information sent by the Client, wherein the Client Hello information comprises first country information and domain name information; selecting second country secret information from the first country secret information, and sending a Server Hello message to the client, wherein the Server Hello message comprises the second country secret information; determining a national cryptographic certificate according to the domain name information and the second national cryptographic information, and signing the national cryptographic certificate through a signing algorithm in the second national cryptographic information to generate verification information; sending a Hand Shake message to the client, wherein the Hand Shake message comprises the national secret certificate, the verification information and the Finished message; the server completes the connection establishment process with the client;
The Client is configured to send a Client Hello message to the server, where the Client Hello message includes first cryptographic information; receiving a Server Hello message sent by the Server, wherein the Server Hello message comprises second country secret information selected from the first country secret information; receiving a Hand vibration message sent by the server, wherein the Hand vibration message comprises a national secret certificate and verification information generated by the server through a signature algorithm in the second national secret information; verifying the national encryption certificate through the verification information; sending a Hand Shake message to a server, wherein the Hand Shake message comprises a finish message; and the server side completes the connection establishment process with the client side.
A fourth aspect of the present invention provides a quitc connection establishment apparatus, applied to a server, comprising:
the first acquisition module is used for receiving Client Hello information sent by the Client, wherein the Client Hello information comprises first country information and domain name information;
a selecting module for selecting second country secret information from the first country secret information,
the first sending module is used for sending a Server Hello message to the client, wherein the Server Hello message carries the second cryptographic information;
The certificate determining module is used for determining a national cryptographic certificate according to the domain name information and the second national cryptographic information;
the first generation module is used for signing the national encryption certificate through a signature algorithm in the second national encryption information to generate verification information;
the first sending module is further configured to send a Hand Shake message to the client, where the Hand Shake message includes the cryptographic certificate, the verification information, and the Finished message;
a fifth aspect of the present invention provides a quitc connection establishment apparatus, applied to a client, comprising:
the second sending module is used for sending Client Hello information to the server, wherein the Client Hello information comprises first national secret information;
the second acquisition module is used for receiving a Server Hello message sent by the Server, wherein the Server Hello message comprises second country secret information selected from the first country secret information; receiving a Hand vibration message sent by the server, wherein the Hand vibration message comprises a national secret certificate and verification information generated by the server through a signature algorithm in the second national secret information;
the verification module is used for verifying the national cryptographic certificate through the verification information;
The second sending module is further configured to send a Hand Shake message to the server, where the Hand Shake message includes a finish message.
A sixth aspect of the invention provides an electronic device comprising a computer readable storage medium storing a computer program and a processor, the computer program implementing a method as described above when read and run by the processor.
A seventh aspect of the invention provides a computer readable storage medium storing a computer program which, when read and executed by a processor, implements a method as described above.
An eighth aspect of the invention provides a computer program product comprising a computer program for execution by a processor to perform a method as described above.
In the application, a certificate chain is not required to be sent by the server, so that the sending information of the client and the server tends to be symmetrical in the QUIC connection establishment process, and the possibility of reflection attack is greatly reduced; the national encryption algorithm is introduced in the QUIC connection establishment process, and the national encryption algorithm has the advantages of safety, rapidness and autonomous controllability, so that the user data safety can be better ensured; meanwhile, by adding support for SNI extension fields at the service end, different certificates can be returned according to different domain names, and the capability of providing secure encryption transmission for the different domain names and the deployment capability of the national encryption certificates are greatly improved.
Drawings
FIG. 1 is a schematic diagram of a QUIC connection establishment system in accordance with an embodiment of the present invention;
FIG. 2 is a flow chart of a QUIC connection establishment method in accordance with an embodiment of the present invention;
FIG. 3 is a flowchart of a server-side QUIC connection establishment method according to an embodiment of the present invention;
FIG. 4 is a flowchart of a server-side QUIC connection establishment method according to another embodiment of the present invention;
FIG. 5 is a flow chart of a client side QUIC connection establishment method in accordance with an embodiment of the present invention;
FIG. 6 is a flowchart of a client side QUIC connection establishment method in accordance with another embodiment of the present invention;
FIG. 7 is a block diagram of a server-side QUIC connection establishment apparatus in accordance with an embodiment of the present invention;
FIG. 8 is a block diagram of a server-side QUIC connection establishment apparatus in accordance with another embodiment of the present invention;
FIG. 9 is a block diagram of the client side QUIC connection establishment device in accordance with an embodiment of the present invention;
FIG. 10 is a block diagram of a client-side QUIC connection establishment apparatus in accordance with another embodiment of the present invention;
fig. 11 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application unless it is specifically stated otherwise.
The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the application, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
In addition, the technical solutions of the embodiments of the present application may be combined with each other, but it is necessary to be based on the fact that those skilled in the art can implement the technical solutions, and when the technical solutions are contradictory or cannot be implemented, the combination of the technical solutions should be considered to be absent, and is not within the scope of protection claimed in the present application.
A method for performing a QUIC connection setup according to an exemplary embodiment of the present application is described below in connection with fig. 1 and 5. It should be noted that the following application scenario is only shown for the convenience of understanding the spirit and principles of the present application, and embodiments of the present application are not limited in any way in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
The embodiment of the application provides a QUIC connection establishment method, referring to FIG. 1, a network system architecture based on which the method is based comprises a client and a server. The client and the server can establish a communication mode through a physical port and the like.
It should be noted that, one or more clients may be deployed in the network system architecture, where the same client may be connected to multiple servers, and the same server may also be connected to multiple clients in a communication manner.
The client and the server are not determined hardware products for the whole network system architecture, and the same hardware, such as a computer, a server, etc., may be used as a client in one case and may be used as a server in another case.
The division of the client and the server in the present application may represent a correspondence relationship in a communication manner, for example, one server may correspond to a plurality of clients; also represented are different usage functions, such as clients for users and servers for intermediaries. In order to facilitate more accurate judgment, in the present application, functions, roles, etc. of the client and the server are not limited, and only a client transmitting a connection request in communication connection is considered as a client and a server receiving the connection request is considered as a server.
Only one client and one server are schematically depicted in fig. 1, which client is communicatively connected to the server. A session connection may be established between the client and the server, where the session connection is an outbound connection, i.e., an outbound communication connection, between the client and the server. Other types of session connection can be established between the client and the server, which is not particularly limited in this application.
It should be noted that the numbers of clients and servers in fig. 1 are merely illustrative, and the specific number may be adjusted according to implementation requirements.
Implementation details of the technical solutions of the embodiments of the present application are set forth in detail below.
The application provides a QUIC connection establishment method, which can be executed by a QUIC connection establishment device, and the QUIC connection establishment device can be integrated in electronic equipment such as a computer, a server, a computer and the like. FIG. 2 is a flow chart of a QUIC connection establishment method according to an embodiment of the present invention; the QUIC connection establishment method comprises the following steps:
s101, a Client sends a Client Hello message to a server, wherein the Client Hello message comprises first national encryption information;
in one embodiment, the first cryptographic information is at least one cryptographic algorithm suite supported by the client.
In this embodiment, the cryptographic algorithm suite is a cryptographic algorithm specification that is composed of cryptographic algorithms and relates to a connection establishment process and a subsequent information interaction process, where the cryptographic algorithm specification may be a specific cryptographic algorithm specified by an abbreviation of the cryptographic algorithm. The system comprises a client, a server, a client and a server, wherein the client is provided with a cryptographic algorithm set, the cryptographic algorithm set is a complete combination, and the client and the server can use the appointed cryptographic algorithm to transmit random numbers, secret keys and the like, encrypt and decrypt and the like when carrying out specific connection establishment and data interaction based on the cryptographic algorithm in each process appointed in the combination; the number of the cryptographic algorithm suites supportable by each client is greater than or equal to one, typically a plurality of, and the specific number is not limited herein.
In one embodiment, the message packet of the Client Hello message may include: the highest version number of ssl supported by the client and the list of cryptographic algorithm suites supported by the client.
In one embodiment, the message packet of the Client Hello message may further specifically include: handshake message type, message packet length, version number, random number, session ID length, session ID, algorithm suite length, national encryption algorithm suite.
Examples are as follows: the information of a Client Hello message packet is:
Handshake Type:ClientHello;
Length:574;
ProtocolVersionlegacy_version=0x0303;
Supported_versions=0x0304;
random: (the specific content is too long and is not displayed);
Session ID Length:32;
session ID: (the specific content is too long and is not displayed);
Cipher Suites Length:34;
cipher suite (17 suite) (details are too long and are not shown here).
The Handshake Type is ClientHello, which represents the Handshake message Type, and is ClientHello; length 574, i.e. Length 574; protocol version _ version=0x0303, representing a version number of 1.2, where the provision must be set here to 0x0303, i.e. TLS1.2, for backward compatibility; supported_versions=0x0304, representing that the version number Supported by the client is TLS1.3; random, a Random number, which may be 32 bytes generated by a secure Random number generator; session ID Length: the length of the session ID; session ID, this field must be non-empty in order to be compatible with the previous version, so clients that did not provide sessions before the latest version must generate a new 32 byte value, which need not be random, but should be unpredictable to avoid implementation being fixed at a particular value, otherwise it must be set to empty; cipher Suites Length, the length of the following Cipher suite; cipher suite is a family cryptographic algorithm suite that represents clients that provide alternative family cryptographic means.
In one embodiment, each cryptographic algorithm suite includes a cryptographic signature algorithm, a cryptographic encryption algorithm, and a cryptographic hash algorithm.
In this embodiment, the national encryption algorithm is a series of algorithms for the national code office to set standards. The method comprises a symmetric encryption algorithm, an elliptic curve asymmetric encryption algorithm and a hashing algorithm, and concretely comprises SM1, SM2, SM3, SM4 and the like.
The SM1 is a symmetric encryption algorithm, the encryption strength is 128 bits, and the encryption algorithm is realized by adopting hardware. SM2 is a public key algorithm published by the national institutes of cryptography, and is all called elliptic curve algorithm, and its encryption strength is 256 bits. SM3, cipher hash algorithm, digest algorithm, hash value length is 32 bytes, SM3 algorithm is suitable for digital signature and verification in commercial cipher application, and is an algorithm improved on SHA-256 basis. SM4, symmetric encryption algorithm, block cipher algorithm, encryption strength 128 bits. The specific structure of the algorithm is not described herein.
In one embodiment, the message package of the Client Hello message further includes extension information. Further, in the extension information, each extension information includes three parts of a type (type), a length (length), and data (data).
In one embodiment, the extension information includes key_share information. The key_share is a public key corresponding to the elliptic curve type, and a specific presentation form of the key_share information is not described herein.
In one embodiment, the extension information includes signature_algorithms extension information. The signature_algorithms extension information is a Signature algorithm that can be supported by the client, in this embodiment, a national cryptographic Signature algorithm is selected by the server to execute a corresponding Signature operation.
In one embodiment, the extension information further includes SNI extension information, where the SNI extension information includes domain name information, and in this embodiment, the domain name information is domain name information of a website to be accessed by the client.
S102, a Server side selects second country secret information from the first country secret information and sends a Server Hello message to the client side, wherein the Server Hello message comprises the second country secret information;
in one embodiment, the selecting the second cryptographic information from the first cryptographic information includes:
and extracting all the national cryptographic algorithm kits in the first national cryptographic information, screening according to a preset screening strategy, and taking the screened national cryptographic algorithm kits as the second national cryptographic information. The second national secret information can be rapidly determined through a preset screening strategy, so that the efficiency of QUIC connection establishment is improved.
In this embodiment, the preset screening policy may be: judging whether the server supports the national cipher algorithm suite or not from the first position according to the arrangement sequence of all the national cipher algorithm suites in the first national cipher information, and if so, the national cipher algorithm suite of the first position is the screened national cipher algorithm suite and finishes screening; if not, the server judges whether the second state secret algorithm suite is supported or not until all state secret algorithm suites in the first state secret information are judged completely (if all state secret algorithm suites in the first state secret information are not supported by the server, the server judges whether the first state secret information contains the standard algorithm suite or not, and if not, the server returns error information).
In this embodiment, the preset screening policy may also be: acquiring a list of all the national cryptographic algorithm suites supported by the server, starting from the first position, judging whether the national cryptographic algorithm suites are in the first national cryptographic information, if so, obtaining the national cryptographic algorithm suites in the first position in the list as screened national cryptographic algorithm suites, and ending screening; if not, the server judges whether the second national cipher algorithm suite in the list is in the first national cipher information or not, until the list of all the national cipher algorithm suites supported by the server is judged to be finished.
In this embodiment, the preset screening policy may further be: and comprehensively determining the screened national cryptographic algorithm suite according to the arrangement sequence of all the national cryptographic algorithm suites in the first national cryptographic information and the arrangement sequence of all the national cryptographic algorithm suites supported by the server.
It should be noted that, in the above-mentioned screening policy, only one cryptographic algorithm set is selected from the multiple cryptographic algorithm sets of the first cryptographic information (even if the server side supports the multiple cryptographic algorithm sets therein).
In this embodiment, after a cryptographic algorithm suite is screened out, a brief description or a name of the cryptographic algorithm suite may be used as second cryptographic information, or an identifier of the cryptographic algorithm suite by the first cryptographic information may be used as second cryptographic information.
In this embodiment, the arrangement sequence of all the cryptographic algorithm suites supported by the server may be determined by performing individual consideration or comprehensive consideration according to one or more dimensions such as implementation difficulty, encryption strength, usage flexibility and the like of each cryptographic algorithm suite in the server; or may be empirically determined; the temporary adjustment determination can also be performed according to actual conditions.
In one embodiment, a mapping table may be set in the server, where the mapping table carries priorities of the cryptographic algorithm packages, and the preset screening policy is to select the cryptographic algorithm package with the highest priority as the second cryptographic information.
In one embodiment, the message packet of the Server Hello message may include: and the server selects a cryptographic algorithm suite.
In one embodiment, the message packet of the Server Hello message may further specifically include: handshake message type, message packet length, version number, random number, session ID length, session ID, national cryptographic algorithm suite.
The Server Hello message has a similar structure to the message package of the Client Hello message, but is different in that it does not have an algorithm suite length and a plurality of cryptographic algorithm suite identifiers, but only has one cryptographic algorithm suite identifier, which represents one cryptographic algorithm suite selected from the corresponding Client Hello message package.
Illustrating: the Client Hello message packet contains a plurality of sets of Client-side supported cryptographic algorithm kits, and the form of the Client-side supported cryptographic algorithm kits is represented in a specific message packet, wherein the form is a cryptographic algorithm kit length/cryptographic algorithm kit number (Cipher Suites Length) and specific identification (Cipher suite (17 suite)) of each cryptographic algorithm kit are sequentially displayed; the message package of the corresponding Server Hello message contains a cryptographic algorithm package selected from the cryptographic algorithm packages supported by the plurality of sets of clients, which is embodied in a specific message package, and a specific identifier (Cipher Suite) of the cryptographic algorithm package is selected (since there is only one cryptographic algorithm package, the cryptographic algorithm package length/the cryptographic algorithm package number need not be carried).
S103, the server determines a national cryptographic certificate, signs the national cryptographic certificate through a signature algorithm in second national cryptographic information, and generates verification information;
in one embodiment, the determining the cryptographic certificate includes:
if the Client Hello message is determined to carry SNI extension information, extracting domain name information in the SNI extension information, and taking a national secret certificate corresponding to the domain name information as the national secret certificate and/or
If the fact that the Client Hello message does not carry the SNI expansion information is determined, a default national encryption certificate is used as the national encryption certificate.
Therefore, whether the Client Hello message carries SNI extension information or not can determine the corresponding national secret certificate, so that the capability of providing secure encryption transmission for different domain names and the deployment capability of the national secret certificate with higher efficiency are greatly improved.
For example, the extension information of the Client Hello message may be in the form of:
server Name Indication extension in the extension information is SNI extension information, and domain name information recorded in the SNI extension information is: www.baidu.com.
In this embodiment, the server may pre-establish a mapping table of domain name information and a national secret certificate, and determine the national secret certificate according to the mapping table after obtaining the domain name information; the mapping relation between the null domain name (i.e. no domain name information) and the default national cryptographic certificate can be synchronously recorded in the mapping table, so that when the Client Hello message does not carry the SNI expansion information, the null domain name is set to be acquired, and the default national cryptographic certificate is acquired.
In this embodiment, if it is determined that the Client Hello message does not carry the SNI extension information, a default cryptographic certificate is used as the cryptographic certificate. The server side can judge whether the Client Hello message contains the SNI extension information or not, if so, the server side obtains the national secret certificate through the mapping table, and if not, the server side directly obtains the default national secret certificate.
In this embodiment, the signature algorithm in the second cryptographic information may be a signature algorithm carried in a cryptographic algorithm suite, and after the server selects a cryptographic algorithm suite, the server signs the cryptographic certificate according to the signature algorithm in the cryptographic algorithm suite.
It should be noted that, in this embodiment, the first cryptographic information includes a plurality of cryptographic algorithm sets; such as tls_sm4_gcm_sm3, tls_sm4_ccm_sm3, etc.; the second cryptographic information may be one cryptographic algorithm set selected from a plurality of cryptographic algorithm sets.
In this embodiment, the verification information is information obtained by performing digital signature through a signature algorithm.
In one embodiment, the verification information includes information obtained by digitally signing the preset information by a signature algorithm, and the preset information.
In an embodiment, the preset information may be summary information of the message or information (such as content in Client Hello message or Server Hello message) of both the Client and the Server, which is specifically based on actual selection, and this is not limited in this embodiment.
In one embodiment, the digest of the text to be transmitted is encrypted using a private key, and the resulting ciphertext is referred to as the digital signature of the transmission.
S104, the server side sends a Hand vibration message to the client side, wherein the Hand vibration message comprises the national encryption certificate, the verification information and the Finished message;
in this embodiment, the Hand Shake message is an encrypted message packet, and the encryption manner may be that the server side performs based on an encryption algorithm in the cryptographic algorithm suite.
In one embodiment, the Hand Shake message is a data packet, and includes a cryptographic certificate, the authentication information and the Finished message.
In one embodiment, the cryptographic certificate, the authentication information and the Finished message contained in the Hand vibration message may be sent separately.
In one embodiment, the Hand Shake message, the cryptographic certificate, the authentication information, and the Finished message are sent after being encrypted.
In this embodiment, the Finished message is the last part of the message in the authentication block, and is used to provide handshaking (connection establishment) and authentication of the computation key. After the client side completes the verification of the national cryptographic certificate, generating a Finished message and sending the Finished message to the server side, and after the server side receives the Finished message, verifying the Finished message, if the verification is not passed, the connection needs to be terminated, and if the verification is passed, the part of the client side is confirmed to be Finished; otherwise, after generating the verification information, the server side also generates a Finished message and sends the Finished message to the client side.
S105, the client verifies the national cryptographic certificate through the verification information;
in this embodiment, the public key of the server is recorded in the national encryption certificate, and the verification information is obtained by encrypting preset information by the server through a private key; after the client acquires the information, the verification information can be decrypted through the public key of the server to obtain preset information; if the preset information is consistent with the preset information in the verification information, the national encryption certificate is verified; if not, the national cryptographic certificate is not verified. For the specific verification process, the present application will not be described in detail.
S106, the client sends a Hand Shake message to the server, wherein the Hand Shake message comprises a finish message;
in this embodiment, after the client verifies that the national certificate passes, sending a Hand vibration message to the server, where in the foregoing step, the client has received a finish message from the server; it can begin sending and receiving application data over the connection after sending the Finished message to the server.
S107, the client and the server complete a connection establishment process;
s108, the client and the server generate a session key;
in one embodiment, the process of generating the session key by the client and the server are independent, and the client and the server generate respective session keys through the same process respectively; since the parameters of generating the session key are the same, the same session key can be generated through the same process. After the handshake request (connection establishment process) is completed, the client and the server respectively generate session keys, so that after the handshake is completed (connection establishment), the client and the server carry out encrypted communication through the generated session keys, and further the security of data transmission is improved.
In one embodiment, the server generates a session key, including:
The Client Hello message also comprises a Client random number and Client key-share information;
acquiring a server random number and server key-share information;
generating a premaster secret key according to the client key-share information and the server key-share information;
and generating the session key according to the client random number, the server random number and the premaster secret key.
The Server sends a Server Hello message to the client, wherein the Server Hello message comprises a Server random number and Server key-share information.
The key-share information includes, but is not limited to, preset parameters for calculating a premaster secret; for example: a Client sends a request (Client Hello), an expansion part carries supported elliptic curve types, a Client public key (POINT) is calculated for each supported elliptic curve type, and the Client public key is placed in key-share information in expansion information; after selecting elliptic curve parameters, the server multiplies the elliptic curve base POINT to obtain a server public key (Point); then extracting a corresponding Client public key in key_share information in Client Hello, and calculating a premaster secret key; the client calculates a premaster secret after receiving a server public key (POINT) of the server.
In one embodiment, the client generates a session key comprising:
acquiring a client random number and client key-share information;
the Server Hello message also comprises a Server random number and Server key-share information;
generating a premaster secret key according to the client key-share information and the server key-share information;
and generating the session key according to the client random number, the server random number and the premaster secret key.
Wherein, the client random number and the client key-share information; and the Client Hello message is carried and sent to the server.
In this embodiment, the client random number and the client key-share information are generated by the client; the server random number and the server key-share information are generated by the server, and the specific generation mode is not limited herein.
In this way, the client and the server use the pre-information of the message passing session key in the handshake process (connection establishment process) to quickly determine the session key without affecting the handshake process (connection establishment process), thereby greatly shortening the time for two-end communication after handshake (connection establishment).
S109, when the server side performs data interaction with the client side, encryption/decryption is performed through the session key and an SM4 algorithm in the second cryptographic information;
In this embodiment, encryption/decryption is performed by using the session key and the SM4 algorithm in the second cryptographic information, which specifically includes: when the client transmits data, the data is encrypted by an SM4 algorithm based on a session key and then transmitted to the server, and when the server receives the encrypted data, the server decrypts the data by the SM4 algorithm based on the session key to obtain corresponding data; similarly, when the server side sends data, the data is encrypted by the SM4 algorithm based on the session key and then sent to the client side, and when the client side receives the encrypted data, the data is decrypted by the SM4 algorithm based on the session key and then the corresponding data is obtained.
Therefore, a certificate chain is not required to be sent by the server, so that the sent information of the client and the server tends to be symmetrical in the QUIC connection establishment process, and the possibility of reflection attack is greatly reduced; thus, a national encryption algorithm is introduced in the QUIC connection establishment process, and the national encryption algorithm has the advantages of safety, rapidness and autonomous controllability, so that the user data safety can be better ensured; meanwhile, by adding support for SNI extension fields at the service end, different certificates can be returned according to different domain names, and the capability of providing secure encryption transmission for the different domain names and the deployment capability of the national encryption certificates are greatly improved.
The present embodiment provides another quit connection establishment method, which is similar to the above-mentioned quit connection establishment method, and is different in that, as shown in fig. 3, the quit connection establishment method in the present embodiment is applied to a server, and includes:
s201, receiving Client Hello information sent by a Client, wherein the Client Hello information comprises first national encryption information;
in one embodiment, the first cryptographic information is at least one cryptographic algorithm suite supported by the client.
S202, selecting second country secret information from the first country secret information, and sending a Server Hello message to the client, wherein the Server Hello message comprises the second country secret information;
in one embodiment, the selecting the second cryptographic information from the first cryptographic information includes:
and extracting all the national cryptographic algorithm kits in the first national cryptographic information, screening according to a preset screening strategy, and taking the screened national cryptographic algorithm kits as the second national cryptographic information.
S203, determining a national cryptographic certificate, and signing the national cryptographic certificate through a signature algorithm in second national cryptographic information to generate verification information;
in one embodiment, the determining the cryptographic certificate includes:
Extracting domain name information in the SNI extension information if the Client Hello message is determined to carry SNI extension information, and taking a national secret certificate corresponding to the domain name information as the national secret certificate, and/or taking a default national secret certificate as the national secret certificate if the Client Hello message is determined to not carry SNI extension information;
s204, sending a Hand Shake message to the client, wherein the Hand Shake message comprises the national cryptographic certificate, the verification information and the Finished message;
s205, the server completes the connection establishment process with the client.
Therefore, a certificate chain is not required to be sent by the server, so that the sent information of the client and the server tends to be symmetrical in the QUIC connection establishment process, and the possibility of reflection attack is greatly reduced; thus, a national encryption algorithm is introduced in the QUIC connection establishment process, and the national encryption algorithm has the advantages of safety, rapidness and autonomous controllability, so that the user data safety can be better ensured; meanwhile, by adding support for SNI extension fields at the server side, different certificates can be returned according to different domain names, and the deployment capability of the national cryptographic certificate is greatly improved.
The embodiment of the present application provides another quit connection establishment method, which is similar to the above-mentioned quit connection establishment method, and is different from the above-mentioned quit connection establishment method in that, as shown in fig. 4, the method further includes:
S206, generating a session key;
in one embodiment, the generating the session key includes:
the Client Hello message also comprises a Client random number and Client key-share information;
acquiring a server random number and server key-share information;
generating a premaster secret key according to the client key-share information and the server key-share information;
and generating the session key according to the client random number, the server random number and the premaster secret key.
S207, when the client performs data interaction, encryption/decryption is performed through the session key and an SM4 algorithm in the second national encryption information;
the session key is generated after the connection between the server and the client is established.
The present embodiment provides another quit connection establishment method, which is similar to the above-mentioned quit connection establishment method, and is different in that, as shown in fig. 5, the quit connection establishment method in the present embodiment is applied to a client, and includes:
s301, sending a Client Hello message to a server, wherein the Client Hello message comprises first cryptographic information;
in one embodiment, the first cryptographic information is at least one cryptographic algorithm suite supported by the client.
In one embodiment, the Client Hello message further includes SNI extension information, where the SNI extension information includes domain name information requested by the Client; the SNI extension information is used for the server to select the corresponding national cryptographic certificate.
S302, receiving a Server Hello message sent by the Server, wherein the Server Hello message comprises second country secret information selected from the first country secret information;
s303, receiving a Hand Shake message sent by the server, wherein the Hand Shake message comprises a national secret certificate and verification information generated by the server through a signature algorithm in the second national secret information;
s304, verifying the national encryption certificate through the verification information;
s305, sending a Hand Shake message to a server, wherein the Hand Shake message comprises a finish message;
s306, the client completes the connection establishment process with the server.
Therefore, a certificate chain is not required to be sent by the server, so that the sent information of the client and the server tends to be symmetrical in the QUIC connection establishment process, and the possibility of reflection attack is greatly reduced; thus, a national encryption algorithm is introduced in the QUIC connection establishment process, and the national encryption algorithm has the advantages of safety, rapidness and autonomous controllability, so that the user data safety can be better ensured; meanwhile, by adding support for SNI extension fields at the service end, different certificates can be returned according to different domain names, and the capability of providing secure encryption transmission for the different domain names and the deployment capability of the national encryption certificates are greatly improved.
The embodiment of the present application provides another quit connection establishment method, which is similar to the above-mentioned quit connection establishment method, and is different from the above-mentioned quit connection establishment method in that, as shown in fig. 6, the method further includes:
s307, generating a session key;
in one embodiment, the generating the session key includes:
the Server Hello message also comprises a Server random number and Server key-share information;
acquiring a client random number and client key-share information;
generating a premaster secret key according to the client key-share information and the server key-share information;
and generating the session key according to the client random number, the server random number and the premaster secret key.
Wherein, the client random number and the client key-share information; and the Client Hello message is carried and sent to the server.
S308, encrypting/decrypting through a session key and an SM4 algorithm in the second national encryption information when the server performs data interaction with the server;
the session key is generated after the connection between the client and the server is established.
The embodiment of the application provides a QUIC connection establishment device, which is used for executing the QUIC connection establishment method disclosed by the invention, and the QUIC connection establishment device is described in detail below.
As shown in fig. 7, the QUIC connection establishment apparatus, applied to a server, includes:
a first obtaining module 201, configured to receive a Client Hello message sent by a Client, where the Client Hello message includes first country information and domain name information;
a selection module 202, configured to select second country secret information from the first country secret information,
a first sending module 203, configured to send a Server Hello message to the client, where the Server Hello message carries the second cryptographic information;
a certificate determination module 204 for determining a national cryptographic certificate;
the first generation module 205 is configured to sign the cryptographic certificate through a signature algorithm in the second cryptographic information, and generate verification information;
the first sending module is further configured to send a Hand Shake message to the client, where the Hand Shake message includes the cryptographic certificate, the verification information, and the Finished message;
in one embodiment, the first cryptographic information is at least one cryptographic algorithm suite supported by the client.
In one embodiment, the selection module 202 is further configured to: extracting all the national cryptographic algorithm kits in the first national cryptographic information, screening according to a preset screening strategy, and taking the screened national cryptographic algorithm kits as the second national cryptographic information.
In one embodiment, the certificate determination module 204 is further configured to: extracting domain name information in the SNI extension information if the Client Hello message is determined to carry the SNI extension information, and taking a national secret certificate corresponding to the domain name information as the national secret certificate, and/or taking a default national secret certificate as the national secret certificate if the Client Hello message is determined to not carry the SNI extension information.
Therefore, a certificate chain is not required to be sent by the server, so that the sent information of the client and the server tends to be symmetrical in the QUIC connection establishment process, and the possibility of reflection attack is greatly reduced; thus, a national encryption algorithm is introduced in the QUIC connection establishment process, and the national encryption algorithm has the advantages of safety, rapidness and autonomous controllability, so that the user data safety can be better ensured; meanwhile, by adding support for SNI extension fields at the service end, different certificates can be returned according to different domain names, and the capability of providing secure encryption transmission for the different domain names and the deployment capability of the national encryption certificates are greatly improved.
Another quitc connection establishment device is provided in an embodiment of the present application, which is similar to the quitc connection establishment device described above, except that, as shown in fig. 8, the device further includes:
A first encryption/decryption module 207, configured to encrypt/decrypt data with the server through a session key and an SM4 algorithm in the second cryptographic information;
the session key is generated after the connection between the client and the server is established.
In one embodiment, the apparatus further comprises: a first session module 206 for generating the session key.
In one embodiment, the first session module 206 is further configured to: the Client Hello message also comprises a Client random number and Client key-share information; acquiring a server random number and server key-share information; generating a premaster secret key according to the client key-share information and the server key-share information; and generating the session key according to the client random number, the server random number and the premaster secret key.
The quitc connection establishment device provided by the above embodiment of the present application and the quitc connection establishment method provided by the embodiment of the present application have the same advantages as the method adopted, operated or implemented by the application program stored therein, because of the same inventive concept.
The embodiment of the application provides a QUIC connection establishment device, which is used for executing the QUIC connection establishment method disclosed by the invention, and the QUIC connection establishment device is described in detail below.
As shown in fig. 9, the quitc connection establishment device, applied to a client, comprises:
a second sending module 301, configured to send a Client Hello message to a server, where the Client Hello message includes first cryptographic information;
a second obtaining module 302, configured to receive a Server Hello message sent by the Server, where the Server Hello message includes second country secret information selected from the first country secret information; receiving a Hand vibration message sent by the server, wherein the Hand vibration message comprises a national secret certificate and verification information generated by the server through a signature algorithm in the second national secret information;
a verification module 303, configured to verify the cryptographic certificate through the verification information;
the second sending module 301 is further configured to send a Hand Shake message to the server, where the Hand Shake message includes a Finished message.
Therefore, a certificate chain is not required to be sent by the server, so that the sent information of the client and the server tends to be symmetrical in the QUIC connection establishment process, and the possibility of reflection attack is greatly reduced; thus, a national encryption algorithm is introduced in the QUIC connection establishment process, and the national encryption algorithm has the advantages of safety, rapidness and autonomous controllability, so that the user data safety can be better ensured; meanwhile, by adding support for SNI extension fields at the service end, different certificates can be returned according to different domain names, and the capability of providing secure encryption transmission for the different domain names and the deployment capability of the national encryption certificates are greatly improved.
In one embodiment, the Client Hello message further includes SNI extension information, where the SNI extension information includes domain name information requested by the Client; the SNI extension information is used for the server to select the corresponding national cryptographic certificate.
In one embodiment, the first cryptographic information is at least one cryptographic algorithm suite supported by the client.
Another quitc connection establishment device is provided in an embodiment of the present application, which is similar to the quitc connection establishment device described above, except that, as shown in fig. 10, the device further includes:
the second encryption/decryption module 305 is configured to encrypt/decrypt data with the server through a session key and an SM4 algorithm in the second cryptographic information;
the session key is generated after the connection between the client and the server is established.
In one embodiment, the apparatus further comprises: a second session module 304 for generating the session key.
In one embodiment, the second session module 304 is further configured to: acquiring a client random number and client key-share information; the Server Hello message also comprises a Server random number and Server key-share information; generating a premaster secret key according to the client key-share information and the server key-share information; and generating the session key according to the client random number, the server random number and the premaster secret key.
Wherein, the client random number and the client key-share information; and the Client Hello message is carried and sent to the server.
The quitc connection establishment device provided by the above embodiment of the present application and the quitc connection establishment method provided by the embodiment of the present application have the same advantages as the method adopted, operated or implemented by the application program stored therein, because of the same inventive concept.
The embodiment of the application provides a QUIC connection establishment system, which is used for executing the QUIC connection establishment method disclosed by the invention, and the QUIC connection establishment system is described in detail below.
As shown in fig. 1, the quitc connection establishment system includes: a client 30 and a server 20;
the server is used for receiving Client Hello information sent by the Client, wherein the Client Hello information comprises first country information and domain name information; selecting second country secret information from the first country secret information, and sending a Server Hello message to the client, wherein the Server Hello message comprises the second country secret information; determining a national cryptographic certificate according to the domain name information and the second national cryptographic information, and signing the national cryptographic certificate through a signing algorithm in the second national cryptographic information to generate verification information; sending a Hand Shake message to the client, wherein the Hand Shake message comprises the national secret certificate, the verification information and the Finished message; the server completes the connection establishment process with the client;
The Client is configured to send a Client Hello message to the server, where the Client Hello message includes first cryptographic information; receiving a Server Hello message sent by the Server, wherein the Server Hello message comprises second country secret information selected from the first country secret information; receiving a Hand vibration message sent by the server, wherein the Hand vibration message comprises a national secret certificate and verification information generated by the server through a signature algorithm in the second national secret information; verifying the national encryption certificate through the verification information; sending a Hand Shake message to a server, wherein the Hand Shake message comprises a finish message; and the client completes the connection establishment process with the server.
The quitc connection establishment system provided by the above embodiment of the present application and the quitc connection establishment method provided by the embodiment of the present application have the same advantages as the method adopted, operated or implemented by the application program stored therein, because of the same inventive concept.
An embodiment of the present application provides an electronic device, as shown in fig. 11, comprising a computer readable storage medium 401 storing a computer program and a processor 402, the computer program implementing a method as described above when being read and executed by the processor.
The electronic device provided by the above embodiment of the present application and the quitc connection establishment method provided by the embodiment of the present application have the same advantages as the method adopted, operated or implemented by the application program stored therein, because of the same inventive concept.
Embodiments of the present application provide a computer readable storage medium storing a computer program which, when read and executed by a processor, implements a method as described above.
The technical solution of the embodiment of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be an air conditioner, a refrigeration apparatus, a personal computer, a server, or a network device, etc.) or processor to perform all or part of the steps of the method of the embodiment of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The computer readable storage medium provided by the above embodiments of the present application and the quitc connection establishment method provided by the embodiments of the present application have the same advantageous effects as the method adopted, operated or implemented by the application program stored therein, because of the same inventive concept.
Embodiments of the present application provide a computer program product comprising a computer program for execution by a processor to implement a method as described above.
The computer program product provided by the above-mentioned embodiments of the present application and the quitc connection establishment method provided by the embodiments of the present application have the same advantageous effects as the method adopted, operated or implemented by the application program stored therein, because of the same inventive concept.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this application, all embodiments are described in a related manner, and identical and similar parts of the embodiments are all referred to each other, and each embodiment is mainly described in the differences from other embodiments. In particular, with respect to the QUIC connection establishment method, system, apparatus, electronic device, machine readable storage medium embodiments, since they are substantially similar to the front end described QUIC connection establishment method embodiments, the description is relatively simple, and the relevant points are found in the partial description of the front end described QUIC connection establishment method embodiments.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be made by one skilled in the art without departing from the spirit and scope of the invention, and the scope of the invention should be assessed accordingly to that of the appended claims.

Claims (17)

1. The QUIC connection establishment method is characterized by being applied to a server and comprising the following steps:
receiving Client Hello information sent by a Client, wherein the Client Hello information comprises first country secret information;
selecting second country secret information from the first country secret information, and sending a Server Hello message to the client, wherein the Server Hello message comprises the second country secret information;
Determining a national secret certificate, and signing the national secret certificate through a signature algorithm in second national secret information to generate verification information;
sending a Hand Shake message to the client, wherein the Hand Shake message comprises the national secret certificate, the verification information and the Finished message;
and the server side completes the connection establishment process with the client side.
2. The method of claim 1, wherein the first cryptographic information is at least one cryptographic algorithm suite supported by the client.
3. The method of claim 1, wherein selecting second country secret information from the first country secret information comprises:
and extracting all the national cryptographic algorithm kits in the first national cryptographic information, screening according to a preset screening strategy, and taking the screened national cryptographic algorithm kits as the second national cryptographic information.
4. The method of claim 1, wherein the determining the national cryptographic certificate comprises:
extracting domain name information in the SNI extension information if the Client Hello message is determined to carry SNI extension information, and taking a national secret certificate corresponding to the domain name information as the national secret certificate, or taking a default national secret certificate as the national secret certificate if the Client Hello message is determined to not carry SNI extension information.
5. The method according to claim 1, wherein the method further comprises:
when the client performs data interaction, encryption/decryption is performed through a session key and an SM4 algorithm in the second cryptographic information;
the session key is generated after the connection between the server and the client is established.
6. The method of claim 5, wherein the generation of the session key comprises:
the Client Hello message also comprises a Client random number and Client key-share information;
acquiring a server random number and server key-share information;
generating a premaster secret key according to the client key-share information and the server key-share information;
and generating the session key according to the client random number, the server random number and the premaster secret key.
7. A quitc connection establishment method, characterized by being applied to a client, comprising:
sending Client Hello information to a server, wherein the Client Hello information comprises first country secret information;
receiving a Server Hello message sent by the Server, wherein the Server Hello message comprises second country secret information selected from the first country secret information;
receiving a Hand vibration message sent by the server, wherein the Hand vibration message comprises a national secret certificate and verification information generated by the server through a signature algorithm in the second national secret information;
Verifying the national encryption certificate through the verification information;
sending a Hand Shake message to a server, wherein the Hand Shake message comprises a finish message;
and the server side completes the connection establishment process with the client side.
8. The method of claim 7, wherein the method further comprises:
when the server performs data interaction with the server, encryption/decryption is performed through a session key and an SM4 algorithm in the second cryptographic information;
the session key is generated after the connection between the client and the server is established.
9. The method of claim 8, wherein the generation of the session key comprises:
acquiring a client random number and client key-share information;
the Server Hello message also comprises a Server random number and Server key-share information;
generating a premaster secret key according to the client key-share information and the server key-share information;
and generating the session key according to the client random number, the server random number and the premaster secret key.
10. The method of claim 7, wherein the Client Hello message further comprises SNI extension information, the SNI extension information comprising domain name information requested by a Client;
The SNI extension information is used for a server to select a national certificate corresponding to the domain name information.
11. The method of claim 7, wherein the method further comprises:
the first cryptographic information is at least one cryptographic algorithm suite supported by the client.
12. A quitc connection establishment system, comprising: a client and a server;
the server is used for receiving Client Hello information sent by the Client, wherein the Client Hello information comprises first country information and domain name information; selecting second country secret information from the first country secret information, and sending a Server Hello message to the client, wherein the Server Hello message comprises the second country secret information; determining a national cryptographic certificate according to the domain name information and the second national cryptographic information, and signing the national cryptographic certificate through a signing algorithm in the second national cryptographic information to generate verification information; sending a Hand Shake message to the client, wherein the Hand Shake message comprises the national secret certificate, the verification information and the Finished message; the server completes the connection establishment process with the client;
the Client is configured to send a Client Hello message to the server, where the Client Hello message includes first cryptographic information; receiving a Server Hello message sent by the Server, wherein the Server Hello message comprises second country secret information selected from the first country secret information; receiving a Hand vibration message sent by the server, wherein the Hand vibration message comprises a national secret certificate and verification information generated by the server through a signature algorithm in the second national secret information; verifying the national encryption certificate through the verification information; sending a Hand Shake message to a server, wherein the Hand Shake message comprises a finish message; and the server side completes the connection establishment process with the client side.
13. A quitc connection establishment device, characterized by being applied to a server, comprising:
the first acquisition module is used for receiving Client Hello information sent by the Client, wherein the Client Hello information comprises first country information and domain name information;
a selecting module for selecting second country secret information from the first country secret information,
the first sending module is used for sending a Server Hello message to the client, wherein the Server Hello message carries the second cryptographic information;
the certificate determining module is used for determining a national cryptographic certificate according to the domain name information and the second national cryptographic information;
the first generation module is used for signing the national encryption certificate through a signature algorithm in the second national encryption information to generate verification information;
the first sending module is further configured to send a Hand Shake message to the client, where the Hand Shake message includes the cryptographic certificate, the verification information, and the Finished message.
14. A quitc connection establishment apparatus, characterized by being applied to a client, comprising:
the second sending module is used for sending Client Hello information to the server, wherein the Client Hello information comprises first national secret information;
The second acquisition module is used for receiving a Server Hello message sent by the Server, wherein the Server Hello message comprises second country secret information selected from the first country secret information; receiving a Hand vibration message sent by the server, wherein the Hand vibration message comprises a national secret certificate and verification information generated by the server through a signature algorithm in the second national secret information;
the verification module is used for verifying the national cryptographic certificate through the verification information;
the second sending module is further configured to send a Hand Shake message to the server, where the Hand Shake message includes a finish message.
15. An electronic device comprising a computer readable storage medium storing a computer program and a processor, the computer program implementing the method of any of claims 1-6 or 7-11 when read and executed by the processor.
16. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when read and executed by a processor, implements the method according to any of claims 1-6 or 7-11.
17. A computer program product comprising a computer program, characterized in that the computer program is executed by a processor to implement the method of any one of claims 1-6 or 7-11.
CN202210101952.7A 2022-01-27 2022-01-27 QUIC connection establishment method and system, device, electronic equipment and storage medium Pending CN116566612A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210101952.7A CN116566612A (en) 2022-01-27 2022-01-27 QUIC connection establishment method and system, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210101952.7A CN116566612A (en) 2022-01-27 2022-01-27 QUIC connection establishment method and system, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116566612A true CN116566612A (en) 2023-08-08

Family

ID=87490265

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210101952.7A Pending CN116566612A (en) 2022-01-27 2022-01-27 QUIC connection establishment method and system, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116566612A (en)

Similar Documents

Publication Publication Date Title
CN111835752B (en) Lightweight authentication method based on equipment identity and gateway
JP7119040B2 (en) Data transmission method, device and system
CN107948189B (en) Asymmetric password identity authentication method and device, computer equipment and storage medium
US7600122B2 (en) Methods and apparatus for accelerating secure session processing
US7082534B2 (en) Method and apparatus for performing accelerated authentication and decryption using data blocks
CN108650227B (en) Handshaking method and system based on datagram secure transmission protocol
US7979707B2 (en) Secure seed generation protocol
WO2009076811A1 (en) A method, a system, a client and a server for key negotiating
US8468339B2 (en) Efficient security information distribution
US20040161110A1 (en) Server apparatus, key management apparatus, and encrypted communication method
CN112422507B (en) National secret SSL encryption method based on identification algorithm
EP3633949A1 (en) Method and system for performing ssl handshake
EP3476078B1 (en) Systems and methods for authenticating communications using a single message exchange and symmetric key
WO2010078755A1 (en) Method and system for transmitting electronic mail, wlan authentication and privacy infrastructure (wapi) terminal thereof
WO2011076008A1 (en) System and method for transmitting files between wapi teminal and application sever
CN112087428A (en) Anti-quantum computing identity authentication system and method based on digital certificate
CN107534552B (en) Method executed at server device, client device and server device
CN115766119A (en) Communication method, communication apparatus, communication system, and storage medium
CN116566612A (en) QUIC connection establishment method and system, device, electronic equipment and storage medium
CN113918971A (en) Block chain based message transmission method, device, equipment and readable storage medium
CN117729056B (en) Equipment identity authentication method and system
CN113239379B (en) SCEP (secure certificate privacy protocol) -based national secret certificate issuing method and system
JP4104315B2 (en) Key management system, key management apparatus, information encryption apparatus, information decryption apparatus, and storage medium storing program
CN108833452B (en) Method for encrypting front-end and back-end separated data
Smyth TLS 1.3 for engineers: An exploration of the TLS 1.3 specification and Oracle’s Java implementation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination