Post-quantum and national secret hybrid dual-certificate SSL handshake method and device

By adopting a handshake method of post-quantum and Guomini hybrid dual certificates in the SSL protocol, combining post-quantum and Guomini algorithms, the security risks of the SSL protocol in the quantum computing environment are solved, and the resistance to quantum computing attacks is achieved. Improves system security.

CN119071075AActive Publication Date: 2024-12-03中电信量子信息科技集团有限公司

Patent Information

Application Number
CN202411277909.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-03
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

The current SSL protocol has security risks due to the development of quantum computing technology, and a method is needed to enhance its ability to resist quantum computing attacks.

Method used

Using the post-quantum and Guomin hybrid dual certificate SSL handshake method, the hybrid dual certificate corresponding to the hybrid password algorithm suite is supported on the client and server side, and the handshake processing is performed using the hybrid dual certificate corresponding to the hybrid password algorithm suite. Combining the post-quantum and Guomin algorithms, the identity is realized Authentication and key exchange.

Benefits of technology

Improves the security of the system, makes the handshake process resistant to quantum computing attacks, and enhances communication security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071075A_ABST
    Figure CN119071075A_ABST
Patent Text Reader

Abstract

The invention provides a post quantum and national secret hybrid dual certificate SSL handshake method and device, and the method comprises the steps: a server side receives a first handshake message sent by a client side, and if the client side supports a hybrid cryptographic algorithm suite, the first handshake message comprises a cryptographic algorithm suite list supported by the client side and a cryptographic algorithm suite list supported by the client side; the cryptographic algorithm suite list comprises an identifier of a national cryptographic algorithm suite and an identifier of a hybrid cryptographic algorithm suite, and the hybrid cryptographic algorithm suite comprises a national cryptographic algorithm and a post-quantum algorithm; the server side sends a second handshake message to the client side, and if the server side supports the hybrid cryptographic algorithm suite, the second handshake message comprises an identifier of the hybrid cryptographic algorithm suite; and the server performs handshake processing according to the hybrid dual certificates corresponding to the hybrid cryptographic algorithm suite. The hybrid dual certificates corresponding to the hybrid cryptographic algorithm suite are adopted to perform handshake processing, so that the handshake process has the capability of resisting quantum computing attack, and the system security is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and more specifically, to a post-quantum and national secret hybrid dual-certificate SSL handshake method and device. Background Art

[0002] The Secure Sockets Layer (SSL) handshake protocol is the core part of the SSL protocol. It is built on the SSL record protocol and is used to establish a secure connection between the client and the server. During the handshake process, the client and the server exchange keys, negotiate cryptographic algorithms, and protocol versions to ensure the security of subsequent communications.

[0003] In related technologies, the national secret SSL protocol is usually used for handshake processing between the client and the server. Among them, the national secret SSL is an SSL protocol that complies with national standard technical specifications and refers to international standards, and supports SM2, SM3, SM4 domestic encryption algorithms and national secret security protocols.

[0004] However, with the rapid development of quantum computing technology, the currently used SSL protocol has certain security risks. Summary of the invention

[0005] In view of this, an embodiment of the present application provides a post-quantum and national secret hybrid dual-certificate SSL handshake method and device to solve the problem that the currently used SSL protocol has certain security risks.

[0006] In a first aspect, an embodiment of the present application provides a post-quantum and national secret hybrid dual-certificate SSL handshake method, which is applied to a server, and the method includes:

[0007] Receive a first handshake message sent by the client, if the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the list of cryptographic algorithm suites includes: an identifier of a national cryptographic algorithm suite and an identifier of the hybrid cryptographic algorithm suite, the hybrid cryptographic algorithm suite includes: a national cryptographic algorithm and a post-quantum algorithm;

[0008] Sending a second handshake message to the client, if the server supports the hybrid cryptographic algorithm suite, the second handshake message includes: an identifier of the hybrid cryptographic algorithm suite;

[0009] Handshake processing is performed according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite.

[0010] In an optional implementation, the hybrid dual certificate includes: a server hybrid dual certificate, the server hybrid dual certificate includes: a server hybrid signature certificate and a server hybrid encryption certificate, the server hybrid signature certificate includes: a server post-quantum signature public key and a server national secret signature public key, the server hybrid encryption certificate includes: a server post-quantum encryption public key and a server national secret encryption public key;

[0011] The handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite includes:

[0012] Sending the server hybrid signature certificate and the server hybrid encryption certificate to the client;

[0013] The server hybrid signature private key is used to sign the server hybrid encryption certificate, the first random number and the second random number to obtain a first signature, wherein the first handshake message also includes: the first random number generated by the client, and the second handshake message also includes: the second random number generated by the server, and the server hybrid signature private key includes: the server post-quantum signature private key and the server national secret signature private key;

[0014] A key exchange message is sent to the client, wherein the key exchange message includes: the first signature, so that the client verifies the first signature according to the server post-quantum signature public key and the server national secret signature public key.

[0015] In an optional implementation, the handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite further includes:

[0016] Receiving the pre-master key ciphertext sent by the client, the client is used to encrypt the pre-master key generated by the client according to the server post-quantum encryption public key and the server national secret encryption public key to obtain the pre-master key ciphertext;

[0017] The pre-master key ciphertext is decrypted according to the server post-quantum encryption private key and the server national secret encryption private key to obtain the pre-master key to generate a session key between the server and the client.

[0018] In an optional implementation, the hybrid dual certificate further includes: a client hybrid signature certificate, the client hybrid signature certificate includes: a client post-quantum signature public key and a client national secret signature public key; the handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite also includes:

[0019] Receiving the client hybrid signature certificate sent by the client;

[0020] Receiving a certificate verification message sent by the client, wherein the certificate verification message includes: a second signature, where the second signature is obtained by the client using the client post-quantum signature private key and the client national secret signature private key to sign an interactive message between the client and the server;

[0021] The second signature is verified according to the client post-quantum signature public key and the client national secret signature public key.

[0022] In an optional implementation, the receiving the client hybrid signature certificate sent by the client includes:

[0023] A hybrid signature certificate request message sent to the client;

[0024] A hybrid signature certificate response message returned by the client is received, wherein the signature certificate response message includes: the client hybrid signature certificate.

[0025] In an optional embodiment, the method further comprises:

[0026] If the client and / or the server does not support the hybrid cryptographic algorithm suite, a handshake process is performed according to the national cryptographic algorithm suite.

[0027] In a second aspect, the embodiment of the present application further provides a post-quantum and national secret hybrid dual-certificate SSL handshake method, which is applied to a client, and the method includes:

[0028] Send a first handshake message to the server. If the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the list of cryptographic algorithm suites including: an identifier of a national cryptographic algorithm suite and an identifier of a hybrid cryptographic algorithm suite, the hybrid cryptographic algorithm suite including: a national cryptographic algorithm and a post-quantum algorithm;

[0029] receiving a second handshake message sent by the server, where if the server supports the hybrid cryptographic algorithm suite, the second handshake message includes: an identifier of the hybrid cryptographic algorithm suite;

[0030] Handshake processing is performed according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite.

[0031] In an optional implementation, the hybrid dual certificate includes: a server hybrid dual certificate, the server hybrid dual certificate includes: a server hybrid signature certificate and a server hybrid encryption certificate, the server hybrid signature certificate includes: a server post-quantum signature public key and a server national secret signature public key, the server hybrid encryption certificate includes: a server post-quantum encryption public key and a server national secret encryption public key;

[0032] The handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite includes:

[0033] Receiving the server-side hybrid signature certificate and the server-side hybrid encryption certificate sent by the server;

[0034] Receive a key exchange message sent by the server, where the key exchange message includes: a first signature, where the first signature is obtained by the server using the server hybrid signature private key to sign the server hybrid encryption certificate, the first random number, and the second random number;

[0035] The first signature is verified according to the server-side post-quantum signature public key and the server-side national secret signature public key.

[0036] In an optional implementation, the handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite further includes:

[0037] Encrypt the pre-master key generated by the client according to the server post-quantum encryption public key and the server national secret encryption public key to obtain the pre-master key ciphertext;

[0038] The pre-master key ciphertext is sent to the server, so that the server decrypts the pre-master key ciphertext according to the server post-quantum encryption private key and the server national secret encryption private key to obtain the pre-master key, so as to generate a session key between the server and the client.

[0039] In an optional implementation, the hybrid dual certificate further includes: a client hybrid signature certificate, wherein the client hybrid signature certificate includes: a client post-quantum signature public key and a client national secret signature public key;

[0040] The handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite includes:

[0041] Sending the client hybrid signature certificate to the server;

[0042] The client post-quantum signature private key and the client national secret signature private key are used to sign the interactive message between the client and the server to obtain a second signature;

[0043] A certificate verification message is sent to the server, wherein the verification message includes: the second signature, so that the server verifies the second signature according to the client post-quantum signature public key and the client national secret signature public key.

[0044] In an optional implementation, the sending the client hybrid signature certificate to the server includes:

[0045] Receiving a hybrid signature certificate request message sent by the server;

[0046] Return a hybrid signature certificate response message to the server, wherein the signature certificate response message includes: the client hybrid signature certificate.

[0047] In a third aspect, an embodiment of the present application provides a post-quantum and national secret hybrid dual-certificate SSL handshake device, the device comprising:

[0048] A receiving module, configured to receive a first handshake message sent by a client, wherein if the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the list of cryptographic algorithm suites including: an identifier of a national cryptographic algorithm suite and an identifier of the hybrid cryptographic algorithm suite, the hybrid cryptographic algorithm suite including: a national cryptographic algorithm and a post-quantum algorithm;

[0049] A sending module, configured to send a second handshake message to the client, wherein if the server supports the hybrid cryptographic algorithm suite, the second handshake message includes: an identifier of the hybrid cryptographic algorithm suite;

[0050] A processing module is used to perform handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite.

[0051] In a fourth aspect, an embodiment of the present application provides a post-quantum and national secret hybrid dual-certificate SSL handshake device, the device comprising:

[0052] A sending module, configured to send a first handshake message to a server, wherein if the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the list of cryptographic algorithm suites including: an identifier of a national cryptographic algorithm suite and an identifier of a hybrid cryptographic algorithm suite, the hybrid cryptographic algorithm suite including: a national cryptographic algorithm and a post-quantum algorithm;

[0053] A receiving module, configured to receive a second handshake message sent by the server, wherein if the server supports the hybrid cryptographic algorithm suite, the second handshake message includes: an identifier of the hybrid cryptographic algorithm suite;

[0054] A processing module is used to perform handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite.

[0055] The present application provides a post-quantum and national secret hybrid dual-certificate SSL handshake method and device, wherein the method includes: the server receives a first handshake message sent by the client, if the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the cryptographic algorithm suite list includes: the identifier of the national secret algorithm suite and the identifier of the hybrid cryptographic algorithm suite, the hybrid cryptographic algorithm suite includes: the national secret algorithm and the post-quantum algorithm; the server sends a second handshake message to the client, if the server supports the hybrid cryptographic algorithm suite, the second handshake message includes: the identifier of the hybrid cryptographic algorithm suite; the server performs handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite. The use of the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite for handshake processing enables the handshake process to have the ability to resist quantum computing attacks, thereby improving system security. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0057] Figure 1 Schematic diagram of a post-quantum and national secret hybrid dual certificate SSL handshake method provided in an embodiment of the present application Figure 1 ;

[0058] Figure 2 Schematic diagram of a post-quantum and national secret hybrid dual certificate SSL handshake method provided in an embodiment of the present application Figure 2 ;

[0059] Figure 3 Schematic diagram of a post-quantum and national secret hybrid dual certificate SSL handshake method provided in an embodiment of the present application Figure 3 ;

[0060] Figure 4 Schematic diagram of a post-quantum and national secret hybrid dual certificate SSL handshake method provided in an embodiment of the present application Figure 4 ;

[0061] Figure 5 Schematic diagram of a post-quantum and national secret hybrid dual certificate SSL handshake method provided in an embodiment of the present application Figure 5 ;

[0062] Figure 6 Schematic diagram of a post-quantum and national secret hybrid dual certificate SSL handshake method provided in an embodiment of the present application Figure 6 ;

[0063] Figure 7 Schematic diagram of a post-quantum and national secret hybrid dual certificate SSL handshake method provided in an embodiment of the present application Figure 7 ;

[0064] Figure 8 Schematic diagram of a post-quantum and national secret hybrid dual certificate SSL handshake method provided in an embodiment of the present application Figure 8 ;

[0065] Fig. 9 A schematic diagram of a post-quantum and national secret hybrid dual-certificate SSL handshake processing functional module provided in an embodiment of the present application;

[0066] Fig.10 A schematic diagram of a specific post-quantum and national secret hybrid dual-certificate SSL handshake processing process provided in an embodiment of the present application;

[0067] Fig.11 A schematic diagram of the structure of a post-quantum and national secret hybrid dual-certificate SSL handshake device provided in an embodiment of the present application Figure 1 ;

[0068] Fig.12 A schematic diagram of the structure of a post-quantum and national secret hybrid dual-certificate SSL handshake device provided in an embodiment of the present application Figure 2 ;

[0069] Fig.13 A schematic diagram of the structure of the server provided in the embodiment of the present application;

[0070] Fig.14 A schematic diagram of the structure of the client provided in an embodiment of the present application. DETAILED DESCRIPTION

[0071] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0072] First, the professional terms involved in this application are explained:

[0073] Secure Sockets Layer (SSL) is a security protocol used to establish secure, encrypted connections on the Internet. It is located between the transport layer and the application layer, providing secure communication services for applications and protecting the confidentiality and integrity of data during transmission. The SSL protocol consists of the SSL record protocol and the SSL handshake protocol.

[0074] SSL Handshake Protocol: It is the core part of the SSL protocol. It is built on the SSL Record Protocol and is used to establish a secure connection between the client and the server. During the handshake process, the client and the server exchange keys, negotiate cryptographic algorithms, protocol versions and other information to ensure the security of subsequent communications.

[0075] National SSL: The SSL protocol recommended by the State Cryptography Administration follows national standard technical specifications and refers to international standards. It supports SM2 / SM3 / SM4 domestic encryption algorithms and national security protocols.

[0076] Post Quantum Cryptography (PQC) studies a new type of cryptographic algorithm that can resist attacks from quantum computers. These algorithms can not only run safely on traditional computers, but also resist attacks from future quantum computers.

[0077] Kyber: Post-quantum key encapsulation and cryptographic algorithm, a lattice-based post-quantum cryptography algorithm designed to resist future quantum computer attacks and used for encrypted communications and key exchange.

[0078] Dilithium: Post-quantum key signature algorithm, a lattice-based post-quantum cryptography algorithm designed to resist future quantum computer attacks and used for data signing.

[0079] Transport Layer Security (TLS / SSL) protocol: is a set of communication encryption protocols that are widely used in upper-layer network protocols on the Internet that have encryption requirements.

[0080] Currently, the national secret SSL protocol is used for handshake processing between clients and servers. However, with the rapid development of quantum computing technology, the public key cryptography (including RSA, SM2, etc.) system based on discrete logarithms and integer factorization will be directly and quickly broken, which means that the currently used SSL protocol is no longer safe, resulting in certain security risks in the handshake process.

[0081] Based on this, when both the client and the server support a hybrid cryptographic algorithm suite, this application uses a hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite for handshake processing, where the hybrid cryptographic algorithm suite includes: national secret algorithm and post-quantum algorithm. This enables the handshake process to resist quantum computing attacks and improves system security.

[0082] Figure 1 Schematic diagram of the process of the post-quantum and national secret hybrid dual certificate SSL handshake method provided in the embodiment of the present application Figure 1 , the execution subject of this embodiment may be a server.

[0083] like Figure 1 As shown, the method may include:

[0084] S101: Receive a first handshake message sent by a client.

[0085] If the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the cryptographic algorithm suite list includes: the identifier of the national cryptographic algorithm suite and the identifier of the hybrid cryptographic algorithm suite, and the hybrid cryptographic algorithm suite includes: the national cryptographic algorithm and the post-quantum algorithm.

[0086] Among them, the first handshake message can be a ClientHello message. The client usually supports the national encryption algorithm suite, which includes: national encryption algorithms, such as SM2, SM3, and SM4. If the client supports both the national encryption algorithm and the post-quantum algorithm, it means that the client supports the hybrid cryptographic algorithm suite. The first handshake message sent to the server includes: the identifier of the national encryption algorithm suite and the identifier of the hybrid cryptographic algorithm suite.

[0087] In an optional implementation, the identifier of the national encryption algorithm suite is specified in the first handshake message. When the client also supports the post-quantum cryptographic algorithm, a post-quantum extension may be added to the first handshake message, including a post-quantum signature extension (PQC sign extension) and a post-quantum encryption extension (PQC encrypt extension), indicating that the client supports post-quantum signature operations and post-quantum encryption operations.

[0088] S102: Send a second handshake message to the client.

[0089] The server receives the first handshake message sent by the client. If the server supports the national encryption algorithm and the hybrid encryption algorithm, it means that the server supports the hybrid encryption algorithm suite, and then sends a second handshake message to the client, the second handshake message includes: the identifier of the hybrid encryption algorithm suite. The second handshake message can be a ServerHello message.

[0090] In an optional implementation, when the first handshake message contains a post-quantum extension and the server supports a hybrid cryptographic algorithm suite, the post-quantum extension is confirmed in the second handshake message to inform the client that the server supports post-quantum signature operations and post-quantum encryption operations.

[0091] S103: Perform handshake processing according to the hybrid dual certificates corresponding to the hybrid cryptographic algorithm suite.

[0092] Among them, the hybrid dual certificate includes a hybrid signature certificate and a hybrid encryption certificate. When both the client and the server support the hybrid cryptographic algorithm suite, handshake processing is performed according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite to achieve identity authentication and key exchange, which has high security.

[0093] In this embodiment, post-quantum is combined with the national secret classical cryptographic algorithm. While keeping the national secret algorithm unchanged, by adding a post-quantum extension item, the hybrid dual certificate corresponding to the hybrid cryptographic algorithm is used preferentially, so that the cryptographic system has the ability to resist quantum computing attacks. In addition, the hybrid dual certificate system is compatible with the existing national secret dual certificate. It is only a replacement of the algorithm and the certificate. Post-quantum fusion can be achieved with minor changes to the national secret SSL protocol, which greatly reduces the difficulty and workload of migrating from the national secret classical cryptography to post-quantum and keeps the national secret algorithm suite unchanged.

[0094] Figure 2 Schematic diagram of the process of the post-quantum and national secret hybrid dual certificate SSL handshake method provided in the embodiment of the present application Figure 2 ,like Figure 2 As shown, in an optional implementation, the hybrid dual certificate includes: a server-side hybrid dual certificate, the server-side hybrid dual certificate includes: a server-side hybrid signature certificate and a server-side hybrid encryption certificate, the server-side hybrid signature certificate includes: a server-side post-quantum signature public key and a server-side national secret signature public key, the server-side hybrid encryption certificate includes: a server-side post-quantum encryption public key and a server-side national secret encryption public key.

[0095] The above step S103, performing handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite, may include:

[0096] S201. Send the server hybrid signature certificate and server hybrid encryption certificate to the client.

[0097] Among them, the server hybrid signature certificate and the server hybrid encryption certificate are granted and issued to the server by the Certificate Authority (CA) system.

[0098] The server sends the server hybrid signature certificate and server hybrid encryption certificate to the client, and the client receives the server hybrid signature certificate and server hybrid encryption certificate. The server hybrid signature certificate contains: server post-quantum signature public key and server national secret signature public key, where the server post-quantum signature public key is the server signature public key corresponding to the post-quantum algorithm, and the server national secret signature public key is the server signature public key corresponding to the national secret algorithm. The server hybrid encryption certificate contains: server post-quantum encryption public key and server national secret encryption public key, where the server post-quantum encryption public key is the server encryption public key corresponding to the post-quantum algorithm, and the server national secret encryption public key is the server encryption public key corresponding to the national secret algorithm.

[0099] S202: Use the server-side hybrid signature private key to sign the server-side hybrid encryption certificate, the first random number, and the second random number to obtain a first signature.

[0100] The first handshake message also includes: a first random number generated by the client, the second handshake message also includes: a second random number generated by the server, and the server's hybrid signature private key includes: the server's post-quantum signature private key and the server's national secret signature private key.

[0101] Among them, the server-side hybrid signature private key includes: the server-side post-quantum signature private key and the server-side national secret signature private key. The server-side post-quantum signature private key is the server-side signature private key corresponding to the post-quantum algorithm, and the server-side national secret signature private key is the server-side signature private key corresponding to the national secret algorithm.

[0102] The server-side post-quantum signature private key is used to sign the server-side hybrid encryption certificate, the first random number and the second random number to obtain a post-quantum signature, and the server-side national secret signature private key is used to sign the server-side hybrid encryption certificate, the first random number and the second random number to obtain a national secret signature. The first signature includes: a dual digital signature of a national secret signature and a post-quantum signature.

[0103] It is worth noting that, according to the post-quantum signature algorithm, the server-side encryption certificate, the first random number and the second random number can be signed using the server-side post-quantum signature private key to obtain a post-quantum signature. The post-quantum signature algorithms include Dilithium, FALCON, SPHINCS+, Dilithium and other signature algorithms.

[0104] S203: Send a key exchange message to the client.

[0105] The key exchange message includes: the first signature, so that the client can verify the first signature based on the server's post-quantum signature public key and the server's national secret signature public key.

[0106] The server sends a key exchange message to the client, the client receives the key exchange message, and verifies the dual digital signatures of the national secret signature and the post-quantum signature in the first signature according to the server's post-quantum signature public key and the server's national secret signature public key in the server's hybrid signature certificate.

[0107] If both the national secret signature and the post-quantum signature are verified successfully, it is determined that the client's identity authentication of the server is successful, and the server's identity authentication of the client can also be performed. If at least one of the national secret signature and the post-quantum signature is verified unsuccessfully, it is determined that the client's identity authentication of the server is failed, and the handshake terminates.

[0108] In this embodiment, a handshake process is performed between the client and the server based on the server hybrid signature certificate and the server hybrid encryption certificate corresponding to the hybrid cryptographic algorithm suite to achieve identity authentication of the server by the client, so that the cryptographic system has the ability to resist quantum computing attacks.

[0109] Figure 3 Schematic diagram of the process of the post-quantum and national secret hybrid dual certificate SSL handshake method provided in the embodiment of the present application Figure 3 ,like Figure 3 As shown, in an optional implementation, the above step S103, performing handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite, may also include:

[0110] S301, receiving a pre-master key ciphertext sent by a client.

[0111] The client is used to encrypt the pre-master key generated by the client according to the server's post-quantum encryption public key and the server's national secret encryption public key to obtain the pre-master key ciphertext. The pre-master key is used to generate a session key between the server and the client. The client can use the session key for encrypted communication between the server and the client.

[0112] In an optional implementation, the server-side national secret encryption public key is used to encrypt temporary key 1 to obtain the temporary key 1 national secret ciphertext, and the server-side post-quantum encryption public key is used to encrypt temporary key 2 to obtain the temporary key 2 post-quantum ciphertext, and temporary key 1 and temporary key 2 are used to perform an XOR operation to obtain temporary key 3, and the temporary key 3 is used to encrypt the pre-master key generated by the client to obtain the pre-master key ciphertext. The client can send the temporary key 1 national secret ciphertext, the temporary key 2 post-quantum ciphertext, and the pre-master key ciphertext to the server.

[0113] S302. Decrypt the pre-master key ciphertext according to the server's post-quantum encryption private key and the server's national secret encryption private key to obtain the pre-master key to generate a session key between the server and the client.

[0114] The server decrypts the pre-master key ciphertext according to the server post-quantum encryption private key and the server national secret encryption private key to obtain the pre-master key, wherein the server decrypts the temporary key 2 post-quantum ciphertext according to the server post-quantum encryption private key to obtain temporary key 2, and decrypts the temporary key 1 national secret ciphertext according to the server national secret encryption private key to obtain temporary key 1, uses temporary key 1 and temporary key 2 to perform an XOR operation to obtain temporary key 3, uses temporary key 3 to decrypt the pre-master key ciphertext to obtain the pre-master key, and generates a session key between the server and the client based on the pre-master key, that is, the server can use the session key negotiated by both parties to perform encrypted communication between the server and the client.

[0115] In this embodiment, a combination of post-quantum and national secret classical cryptographic algorithms is used to encrypt the pre-master key, so that the server can encrypt the pre-master key, achieve secure transmission of the pre-master key, and enable the cryptographic system to have the ability to resist quantum computing attacks.

[0116] Figure 4 Schematic diagram of the process of the post-quantum and national secret hybrid dual certificate SSL handshake method provided in the embodiment of the present application Figure 4 ,like Figure 4 As shown, in an optional implementation, the hybrid dual certificate also includes: a client hybrid signature certificate, and the client hybrid signature certificate includes: a client post-quantum signature public key and a client national secret signature public key.

[0117] The above step S103, performing handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite, may also include:

[0118] S401, receiving a client hybrid signature certificate sent by a client.

[0119] The client hybrid signature certificate is granted and issued to the client by the Certificate Authority (CA) system.

[0120] The client hybrid signature certificate includes: the client post-quantum signature public key and the client national secret signature public key. The client post-quantum signature public key is the client signature public key corresponding to the post-quantum algorithm, and the client national secret signature public key is the client signature public key corresponding to the national secret algorithm.

[0121] In an optional implementation, receiving a certificate verification message sent by the client may include:

[0122] A hybrid signature certificate request message sent to the client;

[0123] Receive a hybrid signature certificate response message returned by the client, where the signature certificate response message includes: the client hybrid signature certificate.

[0124] The server sends a hybrid signature certificate request message to the client, and the hybrid signature certificate request message is used to request the client's hybrid signature certificate. The client sends a hybrid signature certificate response message to the server based on the hybrid signature certificate request message, and the hybrid signature certificate response message includes: the client's hybrid signature certificate, wherein the interaction messages between the client and the server include: a hybrid signature certificate request message and a hybrid signature certificate response message.

[0125] S402: Receive a certificate verification message sent by the client.

[0126] When the client passes the server identity authentication, the client uses the client post-quantum signature private key and the client national secret signature private key to sign the interaction message between the client and the server to obtain a second signature. The client post-quantum signature private key is the client signature private key corresponding to the post-quantum algorithm, and the client national secret signature private key is the client signature private key corresponding to the national secret algorithm.

[0127] Among them, the interactive message between the client and the server can be an interactive message between the first handshake message sent by the client and the certificate verification message. The client uses the client's post-quantum signature private key to sign the interactive message to obtain a post-quantum signature, and uses the client's national secret signature private key to sign the interactive message to obtain a national secret signature. The second signature includes: a post-quantum signature and a dual digital signature of a post-quantum signature.

[0128] The client sends a certificate verification message to the server, and the certificate verification message includes: a second signature, and the second signature is obtained by the client using the client signature private key corresponding to the hybrid cryptographic algorithm to sign the interactive message between the client and the server.

[0129] S403. Verify the second signature according to the client's post-quantum signature public key and the client's national secret signature public key.

[0130] The server receives the certificate verification message sent by the client, and verifies the post-quantum signature in the second signature according to the client's post-quantum signature public key, and verifies the national secret signature according to the client's national secret signature public key. If both the national secret signature and the post-quantum signature are verified successfully, it is determined that the server has successfully authenticated the client. If at least one of the national secret signature and the post-quantum signature fails to be verified, it is determined that the server has failed to authenticate the client, and the handshake terminates.

[0131] In this embodiment, the signature value is verified based on the client signature certificate to achieve identity authentication of the client by the server. If both parties pass the verification, the SSL secure channel is established successfully, otherwise the establishment fails, thereby enabling the cryptographic system to resist quantum computing attacks.

[0132] In an optional embodiment, the method may further include:

[0133] If the client and / or server does not support the hybrid cipher suite, the handshake is processed according to the national cipher suite.

[0134] If the client does not support the hybrid cryptographic algorithm suite, the first handshake message includes the identifier of the national cryptographic algorithm suite, and the first handshake message does not contain the post-quantum extension item. If the server does not support the hybrid cryptographic algorithm suite, the second handshake message includes the identifier of the national cryptographic algorithm suite, and the post-quantum confirmation item is not confirmed in the second handshake message.

[0135] If the client and / or server does not support the hybrid cryptographic algorithm suite, the handshake process will be performed according to the national cryptographic algorithm suite. The handshake process can be performed according to the dual certificates corresponding to the national cryptographic algorithm suite. The dual certificates corresponding to the national cryptographic algorithm include: the server national cryptographic signature certificate and the server national cryptographic encryption certificate. The server national cryptographic signature certificate contains the server national cryptographic signature public key, and the server national cryptographic encryption certificate contains the server national cryptographic encryption public key.

[0136] The server can send the server's national secret signature certificate and the server's national secret encryption certificate to the client, and use the server's national secret signature private key corresponding to the national secret algorithm suite to sign the server's national secret encryption certificate, the first random number and the second random number to obtain a first signature, and send a key exchange message to the client. The key exchange message includes the first signature. The client verifies the first signature based on the server's national secret signature public key in the server's national secret signature certificate.

[0137] In an optional implementation, a pre-master key ciphertext is received from a client, and the client is used to encrypt the pre-master key generated by the client according to the server's national encryption public key to obtain the pre-master key ciphertext. The server decrypts the pre-master key ciphertext according to the server's national encryption private key corresponding to the national encryption algorithm suite to obtain the pre-master key.

[0138] In an optional implementation, the hybrid dual certificate also includes: a client national secret signature certificate, receiving a client national secret signature certificate and a certificate verification message sent by the client, the certificate verification message including a fourth signature, the second signature is obtained by the client using the client national secret signature private key corresponding to the national secret algorithm suite to sign the interaction message between the client and the server, and the server verifies the second signature based on the client national secret signature public key in the client national secret signature certificate.

[0139] It is worth noting that the specific implementation process of handshake based on the dual certificates corresponding to the national encryption algorithm suite can refer to the implementation process of handshake processing based on the hybrid dual certificates corresponding to the hybrid encryption algorithm mentioned above. The difference is that the hybrid encryption algorithm suite is replaced by the national encryption algorithm suite.

[0140] In this embodiment, when performing the handshake process between the client and the server, by adding a post-quantum extension item, the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite is preferentially used while keeping the national secret algorithm unchanged. When one end does not support it, the dual certificate corresponding to the national secret algorithm is used, so that the entire system can be smoothly migrated to the post-quantum system.

[0141] Figure 5 Schematic diagram of the process of the post-quantum and national secret hybrid dual certificate SSL handshake method provided in the embodiment of the present application Figure 5 The execution subject of this embodiment may be a client.

[0142] like Figure 5 As shown, the method may also include:

[0143] S501: Send a first handshake message to the server.

[0144] If the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the cryptographic algorithm suite list includes: the identifier of the national cryptographic algorithm suite and the identifier of the hybrid cryptographic algorithm suite, the hybrid cryptographic algorithm suite includes: the national cryptographic algorithm and the post-quantum algorithm.

[0145] Among them, the first handshake message can be a ClientHello message. The client usually supports the national encryption algorithm suite, which includes: national encryption algorithms, such as SM2, SM3, and SM4. If the client supports both the national encryption algorithm and the post-quantum algorithm, it means that the client supports the hybrid cryptographic algorithm suite. The first handshake message sent to the server includes: the identifier of the national encryption algorithm suite and the identifier of the hybrid cryptographic algorithm suite.

[0146] If the client does not support the hybrid cryptographic algorithm suite, the first handshake message contains the identifier of the national cryptographic algorithm suite.

[0147] S502: Receive a second handshake message sent by the server.

[0148] The client receives a second handshake message sent by the server. If the server supports the hybrid cryptographic algorithm suite, the second handshake message includes: an identifier of the hybrid cryptographic algorithm suite; if the server does not support the hybrid cryptographic algorithm suite, the second handshake message includes an identifier of the national cryptographic algorithm suite.

[0149] S603: Perform handshake processing according to the hybrid dual certificates corresponding to the hybrid cryptographic algorithm suite.

[0150] Among them, the hybrid dual certificate includes a hybrid signature certificate and a hybrid encryption certificate. When both the client and the server support the hybrid cryptographic algorithm suite, handshake processing is performed according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite to achieve identity authentication and key exchange, which has high security.

[0151] Figure 6 Schematic diagram of the process of the post-quantum and national secret hybrid dual certificate SSL handshake method provided in the embodiment of the present application Figure 6 ,like Figure 6 As shown, in an optional implementation, the hybrid dual certificate includes: a server-side hybrid dual certificate, the server-side hybrid dual certificate includes: a server-side hybrid signature certificate and a server-side hybrid encryption certificate, the server-side hybrid signature certificate includes: a server-side post-quantum signature public key and a server-side national secret signature public key, the server-side hybrid encryption certificate includes: a server-side post-quantum encryption public key and a server-side national secret encryption public key.

[0152] The above step S503, performing handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite, may include:

[0153] S601, receiving a server-side hybrid signature certificate and a server-side hybrid encryption certificate sent by a server.

[0154] The server sends the server hybrid signature certificate and server hybrid encryption certificate to the client, and the client receives the server hybrid signature certificate and server hybrid encryption certificate. The server hybrid signature certificate contains: server post-quantum signature public key and server national secret signature public key, where the server post-quantum signature public key is the server signature public key corresponding to the post-quantum algorithm, and the server national secret signature public key is the server signature public key corresponding to the national secret algorithm. The server hybrid encryption certificate contains: server post-quantum encryption public key and server national secret encryption public key, where the server post-quantum encryption public key is the server encryption public key corresponding to the post-quantum algorithm, and the server national secret encryption public key is the server encryption public key corresponding to the national secret algorithm.

[0155] S602: Receive a key exchange message sent by the server.

[0156] The client receives a key exchange message sent by the server, and the key exchange message includes: a first signature, which is obtained by the server using the server's hybrid signature private key to sign the server's hybrid encryption certificate, the first random number and the second random number, wherein the first handshake message also includes the first random number generated by the client, and the second handshake message also includes: the second random number generated by the server.

[0157] Among them, the first signature includes: a double digital signature of a national secret signature and a post-quantum signature. The post-quantum signature is a signature obtained by the server using the server's post-quantum signature private key to sign the server's hybrid encryption certificate, the first random number and the second random number. The national secret signature is a signature obtained by the server using the server's national secret signature private key to sign the server's hybrid encryption certificate, the first random number and the second random number.

[0158] S603. Verify the first signature according to the server-side post-quantum signature public key and the server-side national secret signature public key.

[0159] The client verifies the dual digital signatures of the national secret signature and the post-quantum signature in the first signature according to the server's post-quantum signature public key and the server's national secret signature public key respectively. If both the national secret signature and the post-quantum signature are verified successfully, it is determined that the client's identity authentication of the server is successful, and the server can also perform identity authentication of the client. If at least one of the national secret signature and the post-quantum signature fails to be verified, it is determined that the client's identity authentication of the server fails, and the handshake terminates.

[0160] Figure 7 Schematic diagram of the process of the post-quantum and national secret hybrid dual certificate SSL handshake method provided in the embodiment of the present application Figure 7 ,like Figure 7 As shown, in an optional implementation, the above step S603, performing handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite, may also include:

[0161] S701. Encrypt the pre-master key generated by the client according to the server's post-quantum encryption public key and the server's national secret encryption public key to obtain the pre-master key ciphertext.

[0162] The client generates a pre-master key, encrypts temporary key 1 with the server's national secret encryption public key, obtains temporary key 1 national secret ciphertext, encrypts temporary key 2 with the server's post-quantum encryption public key, obtains temporary key 2 post-quantum ciphertext, performs an XOR operation with temporary key 1 and temporary key 2, obtains temporary key 3, and uses temporary key 3 to encrypt the pre-master key generated by the client, the pre-master key ciphertext. The client can send temporary key 1 national secret ciphertext, temporary key 2 post-quantum ciphertext, and pre-master key ciphertext to the server.

[0163] S702. Send the pre-master key ciphertext to the server, so that the server decrypts the pre-master key ciphertext according to the server post-quantum encryption private key and the server national secret encryption private key to obtain the pre-master key to generate a session key between the server and the client.

[0164] The client sends the pre-master key ciphertext to the server. The server decrypts the post-quantum ciphertext of temporary key 2 according to the server's post-quantum encryption private key to obtain temporary key 2, and decrypts the national secret ciphertext of temporary key 1 according to the server's national secret encryption private key to obtain temporary key 1. Temporary key 1 and temporary key 2 are XORed to obtain temporary key 3. Temporary key 3 is used to decrypt the pre-master key ciphertext to obtain the pre-master key, and a session key between the server and the client is generated based on the pre-master key. That is, the client can use the session key negotiated by both parties to perform encrypted communication between the server and the client.

[0165] Figure 8 Schematic diagram of the process of the post-quantum and national secret hybrid dual certificate SSL handshake method provided in the embodiment of the present application Figure 8 ,like Figure 8 As shown, in an optional implementation, the hybrid dual certificate also includes: a client hybrid signature certificate, and the client hybrid signature certificate includes: a client post-quantum signature public key and a client national secret signature public key.

[0166] The above step S503, performing handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite, may also include:

[0167] S801. Send the client hybrid signature certificate to the server.

[0168] In an optional implementation, sending the client hybrid signature certificate to the server includes:

[0169] Receive the hybrid signature certificate request message sent by the server;

[0170] Return a hybrid signature certificate response message to the server, the signature certificate response message includes: the client hybrid signature certificate.

[0171] The client receives a hybrid signature certificate request message sent by the server, and the hybrid signature certificate request message is used to request a client hybrid signature certificate. The client sends a hybrid signature certificate response message to the server based on the hybrid signature certificate request message, and the hybrid signature certificate response message includes: the client hybrid signature certificate, wherein the interaction messages between the client and the server include: a hybrid signature certificate request message and a hybrid signature certificate response message.

[0172] S802. Use the client's post-quantum signature private key and the client's national secret signature private key to sign the interactive message between the client and the server to obtain a second signature.

[0173] The client uses the client's post-quantum signature private key to sign the interactive message to obtain a post-quantum signature, and uses the client's national secret signature private key to sign the interactive message to obtain a national secret signature. The second signature includes: a post-quantum signature and a dual digital signature of the post-quantum signature.

[0174] S803. Send a certificate verification message to the server so that the server verifies the second signature based on the client's post-quantum signature public key and the client's national secret signature public key.

[0175] The client sends a certificate verification message to the server, which includes: the second signature. The server verifies the post-quantum signature in the second signature according to the client's post-quantum signature public key, and verifies the national secret signature according to the client's national secret signature public key. If both the national secret signature and the post-quantum signature are verified successfully, it is determined that the server has successfully authenticated the client. If at least one of the national secret signature and the post-quantum signature fails to be verified, it is determined that the server has failed to authenticate the client, and the handshake terminates.

[0176] It is worth noting that the specific implementation process and technical effects of the client's execution of the post-quantum and national encryption mixed dual certificate SSL handshake method can be found in the above-mentioned server's execution of the post-quantum and national encryption mixed dual certificate SSL handshake method, which will not be repeated here.

[0177] Based on the above embodiment, taking the national secret algorithm as SM2 algorithm and the post-quantum algorithm as PQC algorithm as an example, Fig. 9 A schematic diagram of a post-quantum and national secret hybrid dual-certificate SSL handshake processing function module provided in an embodiment of the present application, such as Fig. 9 As shown, it includes: PQC+SM2 hybrid dual certificate module, SM2 dual certificate module, key selection module, SSL handshake module, and communication module.

[0178] PQC+SM2 hybrid dual certificate module: Based on the combination of PQC and SM2 classic cryptographic algorithms, it implements the management of PQC+SM2 hybrid signature certificates (hybrid signature certificates corresponding to the hybrid cryptographic algorithm suite) and PQC+SM2 hybrid encryption certificates (hybrid encryption certificates corresponding to the hybrid cryptographic algorithm suite).

[0179] SM2 dual certificate module: supports key management of the national secret signature certificate (signature certificate corresponding to the national secret algorithm) and encryption certificate (national secret encryption certificate corresponding to the SM2 algorithm) of the SM2 key.

[0180] Key selection module: used for SSL handshake, selects different certificate keys according to the certificate key types supported by the client and server. When both are configured with PQC+SM2 hybrid dual certificates (i.e. both support hybrid cryptographic algorithm suites), use the PQC+SM2 hybrid dual certificate key. When not configured with PQC+SM2 hybrid dual certificates (i.e. support national cryptographic algorithm suites), use the SM2 dual certificate key.

[0181] SSL handshake module: According to the certificate key type selected by the key selection module, use the corresponding SSL handshake protocol to establish an SSL secure channel. When the certificate key is a PQC+SM2 hybrid dual certificate, the handshake protocol is the improved PQC national secret SSL protocol; when the certificate key is an SM2 dual certificate, the handshake protocol is the national secret SSL protocol.

[0182] That is to say, if both the client and the server support mixed cryptographic algorithm suites, the handshake protocol is an improved handshake protocol that integrates PQC national encryption. If at least one of the client and the server does not support mixed cryptographic algorithm suites, the handshake protocol is a national encryption handshake protocol. This allows the client and the server to select the corresponding handshake protocol based on the cryptographic algorithm supported and establish an SSL secure channel.

[0183] Communication module, which realizes data interaction between the client and the server.

[0184] Fig.10 A schematic diagram of a specific post-quantum and national secret hybrid dual certificate SSL handshake processing process provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, the following steps are included:

[0185] Step 1: The client sends a handshake message (ClientHello).

[0186] In the ClientHello message, specify the national encryption algorithm suite. When the client has configured the PQC hybrid dual certificate, add the PQC extension item. Otherwise, do not include the PQC extension item.

[0187] Step 2: The server sends a handshake message (SeverHello).

[0188] When the ClientHello message contains the PQC extension and both parties support the same PQC hybrid signature and PQC encryption algorithm, the PQC extension is confirmed in the SeverHello message, informing the client to use the PQC hybrid dual certificate key. Otherwise, the SeverHello message does not contain the PQC extension, informing the client to use the SM2 dual certificate key, thus confirming the national encryption algorithm suite used by both parties.

[0189] Step 3: The server sends dual certificates.

[0190] When both parties negotiate to use the PQC hybrid dual certificate key, the server sends the PQC hybrid dual certificate (the server hybrid signature certificate and server hybrid encryption certificate corresponding to the hybrid cryptographic algorithm) to the client, otherwise the server sends the SM2 dual certificate (the server national secret signature certificate and server national secret encryption certificate corresponding to the national secret algorithm) to the client.

[0191] Step 4: The server sends a key exchange message.

[0192] The key exchange message contains the server's signature on both random numbers and the server's encryption certificate. When both parties negotiate to use the PQC hybrid dual certificate key, the server uses the server's PQC hybrid signature private key (the server's hybrid signature private key corresponding to the hybrid cryptographic algorithm suite) to sign, otherwise it uses the SM2 signature private key (the server's national secret signature private key corresponding to the national secret algorithm suite) to sign.

[0193] Step 5: The client uses the server's signing certificate to verify the signature and verify the signature of the server's key exchange message.

[0194] When both parties negotiate to use the PQC hybrid dual certificate key, the client uses the server's PQC hybrid signature certificate (the server's hybrid signature certificate corresponding to the hybrid national encryption algorithm suite) to verify the signature, otherwise it uses the server's SM2 signature certificate (the server's national encryption signature certificate corresponding to the national encryption algorithm suite) to verify the signature. If the signature verification fails, the handshake terminates.

[0195] Step 6: The server requests the client's signed certificate.

[0196] When the server specifies two-way authentication (the server verifies the client's identity), a certificate request message is sent to the client; otherwise, the message is not sent.

[0197] Step 7: The client returns the client-signed certificate.

[0198] When the server specifies two-way authentication, the client receives a certificate request and sends the client signature certificate to the server. When both parties agree to use the PQC hybrid dual certificate key, the client PQC hybrid signature certificate (the client hybrid signature certificate corresponding to the hybrid cryptographic algorithm suite) is sent, otherwise the client SM2 signature certificate (the client national secret signature certificate corresponding to the national secret algorithm suite) is sent.

[0199] Step 8: The client generates a pre-master key and encrypts it using the server encryption certificate.

[0200] The pre-master key can be an SSL pre-master key. When both parties negotiate to use the PQC hybrid dual certificate key, the server encryption public key in the server PQC hybrid encryption certificate (the server hybrid encryption certificate corresponding to the hybrid encryption algorithm suite) is used to encrypt the pre-master key. Otherwise, the server encryption public key in the server SM2 encryption certificate (the server national encryption certificate corresponding to the national encryption algorithm suite) is used to encrypt the pre-master key.

[0201] Step 9: The client sends a key exchange message.

[0202] The key exchange message contains the pre-master key ciphertext.

[0203] Step S10: The server uses the server encryption private key to decrypt and obtain the pre-master key plaintext.

[0204] When the two parties agree to use the PQC hybrid dual certificate key, the server-side PQC hybrid encryption private key (the server-side hybrid encryption private key corresponding to the hybrid cryptographic algorithm suite) is used for decryption. Otherwise, the server-side SM2 encryption private key (the server-side national encryption private key corresponding to the national cryptographic algorithm suite) is used for decryption, and the pre-master key plaintext is obtained after decryption.

[0205] Step 11: The client sends a certificate verification message.

[0206] The certificate verification message includes the signature of the interactive message from the client ClientHello to the content of this message by the client using the client signature private key when the server specifies two-way authentication. When both parties negotiate to use the PQC hybrid dual certificate key, the client PQC hybrid signature private key (the client hybrid signature private key corresponding to the hybrid cryptographic algorithm suite) is used for signature, otherwise the client SM2 signature private key (the client national secret signature private key corresponding to the national secret algorithm suite) is used for signature.

[0207] Step 12: The server verifies the signature using the client's signing certificate.

[0208] When the server specifies two-way authentication, the server receives the client certificate verification message and uses the client signing certificate to verify the signature of the interactive messages from the client ClientHello to the content of this message. If the verification fails, the handshake is terminated.

[0209] When both parties agree to use the PQC hybrid dual certificate key, the client PQC hybrid signature certificate (the client hybrid signature certificate corresponding to the hybrid cryptographic algorithm suite) is used to verify the signature, otherwise the client SM2 signature certificate (the client national cryptographic signature certificate corresponding to the national cryptographic algorithm suite) is used to verify the signature.

[0210] Step 13: The client sends a Finish message.

[0211] Step 14: The server sends a handshake end message.

[0212] In this embodiment, both parties use the negotiated algorithm and key protection to verify whether the handshake process is successful and the integrity of the message content. If both parties pass the verification, the SSL secure channel is established successfully, otherwise it fails.

[0213] Based on the same inventive concept, the embodiment of the present application also provides a handshake processing device corresponding to the post-quantum and national secret mixed dual certificate SSL handshake method. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned post-quantum and national secret mixed dual certificate SSL handshake method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0214] Fig.11 A structural schematic diagram of a post-quantum and national secret hybrid dual-certificate SSL handshake device provided in an embodiment of the present application, which can be integrated in the server.

[0215] like Fig.11 As shown, the device may include:

[0216] The receiving module 901 is used to receive a first handshake message sent by the client. If the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the list of cryptographic algorithm suites includes: an identifier of a national cryptographic algorithm suite and an identifier of a hybrid cryptographic algorithm suite, and the hybrid cryptographic algorithm suite includes: a national cryptographic algorithm and a post-quantum algorithm;

[0217] The sending module 902 is used to send a second handshake message to the client. If the server supports the hybrid cryptographic algorithm suite, the second handshake message includes: an identifier of the hybrid cryptographic algorithm suite;

[0218] The processing module 903 is used to perform handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite.

[0219] In an optional implementation, the hybrid dual certificate includes: a server hybrid dual certificate, the server hybrid dual certificate includes: a server hybrid signature certificate and a server hybrid encryption certificate, the server hybrid signature certificate includes: a server post-quantum signature public key and a server national secret signature public key, the server hybrid encryption certificate includes: a server post-quantum encryption public key and a server national secret encryption public key;

[0220] The processing module 903 is specifically used for:

[0221] Send the server hybrid signature certificate and server hybrid encryption certificate to the client;

[0222] The server-side hybrid signature private key is used to sign the server-side hybrid encryption certificate, the first random number and the second random number to obtain a first signature. The first handshake message also includes: the first random number generated by the client, and the second handshake message also includes: the second random number generated by the server. The server-side hybrid signature private key includes: the server-side post-quantum signature private key and the server-side national secret signature private key;

[0223] A key exchange message is sent to the client, which includes: a first signature, so that the client can verify the first signature according to the server's post-quantum signature public key and the server's national secret signature public key.

[0224] In an optional implementation manner, the processing module 903 is specifically configured to:

[0225] The client receives the pre-master key ciphertext sent by the client, and the client encrypts the pre-master key generated by the client according to the server's post-quantum encryption public key and the server's national encryption public key to obtain the pre-master key ciphertext;

[0226] According to the server's post-quantum encryption private key and the server's national secret encryption private key, the pre-master key ciphertext is decrypted to obtain the pre-master key to generate the session key between the server and the client.

[0227] In an optional implementation, the hybrid dual certificate further includes: a client hybrid signature certificate, the client hybrid signature certificate includes: a client post-quantum signature public key and a client national secret signature public key; a processing module 903 is specifically used to:

[0228] The receiving client sends a client hybrid signature certificate;

[0229] Receive a certificate verification message sent by the client, where the certificate verification message includes: a second signature, where the second signature is obtained by the client using the client's post-quantum signature private key and the client's national secret signature private key to sign the interactive message between the client and the server;

[0230] The second signature is verified based on the client's post-quantum signature public key and the client's national secret signature public key.

[0231] In an optional implementation manner, the processing module 903 is specifically configured to:

[0232] A hybrid signature certificate request message sent to the client;

[0233] Receive a hybrid signature certificate response message returned by the client, where the signature certificate response message includes: the client hybrid signature certificate.

[0234] In an optional implementation, the processing module 903 is further configured to:

[0235] If the client and / or server does not support the hybrid cipher suite, the handshake is processed according to the national cipher suite.

[0236] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0237] Fig.12 A schematic diagram of the structure of a post-quantum and national secret hybrid dual-certificate SSL handshake device provided in an embodiment of the present application Figure 2 , the device can be integrated in the client.

[0238] like Fig.12 As shown, the device may include:

[0239] The sending module 1001 is used to send a first handshake message to the server. If the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the list of cryptographic algorithm suites includes: an identifier of a national cryptographic algorithm suite and an identifier of a hybrid cryptographic algorithm suite, and the hybrid cryptographic algorithm suite includes: a national cryptographic algorithm and a post-quantum algorithm;

[0240] The receiving module 1002 is used to receive a second handshake message sent by the server. If the server supports the hybrid cryptographic algorithm suite, the second handshake message includes: an identifier of the hybrid cryptographic algorithm suite;

[0241] The processing module 1003 is used to perform handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite.

[0242] In an optional implementation, the hybrid dual certificate includes: a server hybrid dual certificate, the server hybrid dual certificate includes: a server hybrid signature certificate and a server hybrid encryption certificate, the server hybrid signature certificate includes: a server post-quantum signature public key and a server national secret signature public key, the server hybrid encryption certificate includes: a server post-quantum encryption public key and a server national secret encryption public key;

[0243] The processing module 1003 is specifically used for:

[0244] Receive the server-side hybrid signature certificate and server-side hybrid encryption certificate sent by the server;

[0245] Receive a key exchange message sent by the server, where the key exchange message includes: a first signature, where the first signature is obtained by the server using the server hybrid signature private key to sign the server hybrid encryption certificate, the first random number, and the second random number;

[0246] The first signature is verified based on the server's post-quantum signature public key and the server's national secret signature public key.

[0247] In an optional implementation manner, the processing module 1003 is specifically configured to:

[0248] Encrypt the pre-master key generated by the client according to the server's post-quantum encryption public key and the server's national encryption public key to obtain the pre-master key ciphertext;

[0249] The pre-master key ciphertext is sent to the server, so that the server can decrypt the pre-master key ciphertext according to the server's post-quantum encryption private key and the server's national secret encryption private key to obtain the pre-master key to generate the session key between the server and the client.

[0250] In an optional implementation, the hybrid dual certificate further includes: a client hybrid signature certificate, the client hybrid signature certificate includes: a client post-quantum signature public key and a client national secret signature public key;

[0251] The processing module 1003 is specifically used for:

[0252] Send the client hybrid signature certificate to the server;

[0253] The client's post-quantum signature private key and the client's national secret signature private key are used to sign the interactive message between the client and the server to obtain a second signature;

[0254] A certificate verification message is sent to the server, and the verification message includes: the second signature, so that the server verifies the second signature according to the client's post-quantum signature public key and the client's national secret signature public key.

[0255] In an optional implementation manner, the processing module 1003 is specifically configured to:

[0256] Receive the hybrid signature certificate request message sent by the server;

[0257] Return a hybrid signature certificate response message to the server, the signature certificate response message includes: the client hybrid signature certificate.

[0258] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0259] Fig.13 A schematic diagram of the structure of the server provided in the embodiment of the present application, such as Fig.13 As shown, the server may include: a processor 1101, a memory 1102 and a bus 1103. The memory 1102 stores machine-readable instructions executable by the processor 1101. When the server is on, the processor 1101 communicates with the memory 1102 via the bus 1103, and the processor 1101 executes the machine-readable instructions to execute the method executed by the above-mentioned server.

[0260] Fig.14 A schematic diagram of the structure of the client provided in the embodiment of the present application, such as Fig.14 As shown, the client may include: a processor 1201, a memory 1202 and a bus 1203, the memory 1202 stores machine-readable instructions executable by the processor 1201, and when on the server side, the processor 1201 communicates with the memory 1202 via the bus 1203, and the processor 1201 executes the machine-readable instructions to execute the method executed by the above-mentioned client.

[0261] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes the above method.

[0262] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.

[0263] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0264] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0265] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0266] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0267] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0268] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A post-quantum and national secret hybrid dual-certificate SSL handshake method, It is characterized in that Applied to the server, the method includes: Receive a first handshake message sent by the client, if the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the list of cryptographic algorithm suites includes: an identifier of a national cryptographic algorithm suite and an identifier of the hybrid cryptographic algorithm suite, the hybrid cryptographic algorithm suite includes: a national cryptographic algorithm and a post-quantum algorithm; Sending a second handshake message to the client, if the server supports the hybrid cryptographic algorithm suite, the second handshake message includes: an identifier of the hybrid cryptographic algorithm suite; Handshake processing is performed according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite.

2. The method according to claim 1, It is characterized in that The hybrid dual certificate includes: a server hybrid dual certificate, the server hybrid dual certificate includes: a server hybrid signature certificate and a server hybrid encryption certificate, the server hybrid signature certificate includes: a server post-quantum signature public key and a server national secret signature public key, the server hybrid encryption certificate includes: a server post-quantum encryption public key and a server national secret encryption public key; The handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite includes: Sending the server hybrid signature certificate and the server hybrid encryption certificate to the client; The server hybrid signature private key is used to sign the server hybrid encryption certificate, the first random number and the second random number to obtain a first signature, wherein the first handshake message also includes: the first random number generated by the client, and the second handshake message also includes: the second random number generated by the server, and the server hybrid signature private key includes: the server post-quantum signature private key and the server national secret signature private key; A key exchange message is sent to the client, wherein the key exchange message includes: the first signature, so that the client verifies the first signature according to the server post-quantum signature public key and the server national secret signature public key.

3. The method according to claim 2, It is characterized in that The handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite also includes: Receiving the pre-master key ciphertext sent by the client, the client is used to encrypt the pre-master key generated by the client according to the server post-quantum encryption public key and the server national secret encryption public key to obtain the pre-master key ciphertext; The pre-master key ciphertext is decrypted according to the server post-quantum encryption private key and the server national secret encryption private key to obtain the pre-master key to generate a session key between the server and the client.

4. The method according to claim 2, It is characterized in that The hybrid dual certificate also includes: a client hybrid signature certificate, wherein the client hybrid signature certificate includes: a client post-quantum signature public key and a client national secret signature public key; the handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite also includes: Receiving the client hybrid signature certificate sent by the client; Receiving a certificate verification message sent by the client, wherein the certificate verification message includes: a second signature, where the second signature is obtained by the client using the client post-quantum signature private key and the client national secret signature private key to sign an interactive message between the client and the server; The second signature is verified according to the client post-quantum signature public key and the client national secret signature public key.

5. The method according to claim 4, It is characterized in that The receiving the client hybrid signature certificate sent by the client includes: A hybrid signature certificate request message sent to the client; A hybrid signature certificate response message returned by the client is received, wherein the signature certificate response message includes: the client hybrid signature certificate.

6. The method according to claim 1, It is characterized in that The method further comprises: If the client and / or the server does not support the hybrid cryptographic algorithm suite, a handshake process is performed according to the national cryptographic algorithm suite.

7. A post-quantum and national secret hybrid dual-certificate SSL handshake method, It is characterized in that Applied to a client, the method comprises: Send a first handshake message to the server. If the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the list of cryptographic algorithm suites including: an identifier of a national cryptographic algorithm suite and an identifier of a hybrid cryptographic algorithm suite, the hybrid cryptographic algorithm suite including: a national cryptographic algorithm and a post-quantum algorithm; receiving a second handshake message sent by the server, where if the server supports the hybrid cryptographic algorithm suite, the second handshake message includes: an identifier of the hybrid cryptographic algorithm suite; Handshake processing is performed according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite.

8. The method according to claim 7, It is characterized in that The hybrid dual certificate includes: a server hybrid dual certificate, the server hybrid dual certificate includes: a server hybrid signature certificate and a server hybrid encryption certificate, the server hybrid signature certificate includes: a server post-quantum signature public key and a server national secret signature public key, the server hybrid encryption certificate includes: a server post-quantum encryption public key and a server national secret encryption public key; The handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite includes: Receiving the server-side hybrid signature certificate and the server-side hybrid encryption certificate sent by the server; Receive a key exchange message sent by the server, where the key exchange message includes: a first signature, where the first signature is obtained by the server using the server hybrid signature private key to sign the server hybrid encryption certificate, the first random number, and the second random number; The first signature is verified according to the server-side post-quantum signature public key and the server-side national secret signature public key.

9. The method according to claim 8, It is characterized in that The handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite also includes: Encrypt the pre-master key generated by the client according to the server post-quantum encryption public key and the server national secret encryption public key to obtain the pre-master key ciphertext; The pre-master key ciphertext is sent to the server, so that the server decrypts the pre-master key ciphertext according to the server post-quantum encryption private key and the server national secret encryption private key to obtain the pre-master key, so as to generate a session key between the server and the client.

10. The method according to claim 7, It is characterized in that The hybrid dual certificate also includes: a client hybrid signature certificate, wherein the client hybrid signature certificate includes: a client post-quantum signature public key and a client national secret signature public key; The handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite includes: Sending the client hybrid signature certificate to the server; The client post-quantum signature private key and the client national secret signature private key are used to sign the interactive message between the client and the server to obtain a second signature; A certificate verification message is sent to the server, wherein the verification message includes: the second signature, so that the server verifies the second signature according to the client post-quantum signature public key and the client national secret signature public key.

11. The method according to claim 10, It is characterized in that The sending the client hybrid signature certificate to the server includes: Receiving a hybrid signature certificate request message sent by the server; Return a hybrid signature certificate response message to the server, wherein the signature certificate response message includes: the client hybrid signature certificate.

12. A post-quantum and national secret hybrid dual-certificate SSL handshake device, It is characterized in that The device comprises: A receiving module, configured to receive a first handshake message sent by a client, wherein if the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the list of cryptographic algorithm suites including: an identifier of a national cryptographic algorithm suite and an identifier of the hybrid cryptographic algorithm suite, the hybrid cryptographic algorithm suite including: a national cryptographic algorithm and a post-quantum algorithm; A sending module, configured to send a second handshake message to the client, wherein if the server supports the hybrid cryptographic algorithm suite, the second handshake message includes: an identifier of the hybrid cryptographic algorithm suite; A processing module is used to perform handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite.

13. A post-quantum and national secret hybrid dual-certificate SSL handshake device, It is characterized in that The device comprises: A sending module, configured to send a first handshake message to a server, wherein if the client supports a hybrid cryptographic algorithm suite, the first handshake message includes: a list of cryptographic algorithm suites supported by the client, the list of cryptographic algorithm suites including: an identifier of a national cryptographic algorithm suite and an identifier of a hybrid cryptographic algorithm suite, the hybrid cryptographic algorithm suite including: a national cryptographic algorithm and a post-quantum algorithm; A receiving module, configured to receive a second handshake message sent by the server, wherein if the server supports the hybrid cryptographic algorithm suite, the second handshake message includes: an identifier of the hybrid cryptographic algorithm suite; A processing module is used to perform handshake processing according to the hybrid dual certificate corresponding to the hybrid cryptographic algorithm suite.

Citation Information

Patent Citations

  • Transport layer security (TLS) channel constructing method based on cryptographic algorithm

    CN103118027A

  • Signature and verification method based on hybrid encryption algorithm in cloud storage

    CN107070948A

  • Data transmission method based on post-quantum hybrid encryption and related product

    CN118199859A

  • TLCP communication method and system for resisting quantum attack

    CN118631447A

  • Quantum safe- post quantum cryptography using hybrid approach

    IN202441011528A

Cited By

  • Anti-quantum-attack national secret SSL communication system and anti-quantum-attack national secret SSL communication method

    CN119652507A

  • A quantum attack-resistant national secret SSL communication system and method

    CN119652507B

  • Short message secure transmission method and system based on post-quantum algorithm, and electronic equipment

    CN119766502A

  • Security authentication method and system and electronic equipment

    CN119995964A

  • A security authentication method, system and electronic device

    CN119995964B