Authenticated Encryption Communication Method, System, Electronic Device and Storage Medium
The key encapsulation algorithm generates ciphertexts of temporary public keys and server long-term public keys, performs identity authentication and key derivation, solving the communication security problem under the threat of quantum computers, and achieving low overhead and high security encrypted communication.
Patent Information
- Application Number
- CN202510347364.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-03-24
AI Technical Summary
Among the existing information security technologies, quantum computers threaten the security of traditional public key cryptography algorithms, resulting in a decrease in the security of communication systems, and the communication overhead of post-quantum signature schemes is relatively large.
The key encapsulation algorithm is used to generate ciphertexts of temporary public keys and server long-term public keys, and identity authentication and key derivation are performed through the client and server, and multiple independent keys are used for encrypted communication.
It realizes encrypted communication with low communication overhead and high security in the quantum computing environment, prevents man-in-the-middle attacks, and ensures forward security and key independence.
Smart Images

Figure CN119853912B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular, to an authenticated encryption communication method, system, electronic device, and storage medium. Background Art
[0002] The Transport Layer Cryptography Protocol (TLCP) in information security technology transmission layer uses a method of separating encryption certificates and signature certificates, performs key negotiation and digital signature through algorithms such as SM2 and RSA, and uses symmetric cryptography algorithms to ensure the confidentiality and integrity of data. However, the emergence of quantum computers poses a serious threat to the existing cryptographic system. Specifically, the Shor algorithm running on a quantum computer can crack discrete logarithm and large integer factorization problems in polynomial time, and the Grover algorithm running on a quantum computer accelerates brute-force attacks, resulting in the insecurity of public key cryptography algorithms and the halving of the security strength of symmetric cryptography algorithms, threatening the security of digital communication systems. Currently, theoretically, a post-quantum signature scheme can be used to replace the relevant traditional public key cryptography operations in TLCP. However, when performing encrypted communication based on the post-quantum signature scheme, a signature needs to be generated and transmitted for each communication, and the signature value is usually long, resulting in a large communication overhead.
[0003] Therefore, there is an urgent need to provide an encrypted communication method with small communication overhead and higher security. Summary of the Invention
[0004] Multiple aspects of the present application provide an authenticated encryption communication method, system, electronic device, and storage medium, with small communication overhead and relatively high security.
[0005] In a first aspect, an embodiment of the present application provides an authenticated encryption communication method, which is applied to a client. The method includes:
[0006] Sending first handshake information to a server, where the first handshake information includes an algorithm list, and the algorithm list contains a key encapsulation algorithm supported by the client and a signature algorithm for verifying a long-term public key;
[0007] Receiving second handshake information sent by the server, where the second handshake information includes a target algorithm selected by the server from the algorithm list, a server long-term public key, and a temporary public key generated based on the target algorithm;
[0008] Based on a set key encapsulation algorithm, using the temporary public key to encapsulate a first shared key to obtain a first ciphertext, and sending the first ciphertext to the server, so that the server decrypts the first ciphertext based on a temporary private key corresponding to the temporary public key to obtain the first shared key;
[0009] Encapsulate the long-term public key of the server based on a set key encapsulation algorithm to obtain a second ciphertext and a second shared key corresponding to the second ciphertext, and send the second ciphertext to the server so that the server decrypts the second ciphertext based on the long-term private key of the server corresponding to the long-term public key of the server to obtain the second shared key;
[0010] Perform identity authentication and derive keys based on the first shared key and the second shared key to obtain multiple independent keys, and perform encrypted communication with the server based on the multiple independent keys.
[0011] In a second aspect, an embodiment of the present application provides an authenticated encryption communication method applied to a server. The method includes:
[0012] Receive first handshake information sent by a client. The first handshake information includes an algorithm list, and the algorithm list contains a key encapsulation algorithm supported by the client and a signature algorithm for verifying a long-term public key;
[0013] Send second handshake information to the client based on the first handshake information. The second handshake information includes a target algorithm selected by the server from the algorithm list, the long-term public key of the server, and a temporary public key generated based on the target algorithm;
[0014] Receive the first ciphertext sent by the client, and decrypt the first ciphertext based on the temporary private key corresponding to the temporary public key to obtain a first shared key. The first ciphertext is obtained by the client encapsulating the first shared key using the temporary public key based on a set key encapsulation algorithm;
[0015] Receive the second ciphertext sent by the client, and decrypt the second ciphertext based on the long-term private key of the server corresponding to the long-term public key of the server to obtain a second shared key. The second ciphertext is obtained by the client encapsulating the long-term public key of the server based on a set key encapsulation algorithm;
[0016] Perform identity authentication and derive keys based on the first shared key and the second shared key to obtain multiple independent keys, and perform encrypted communication with the client based on the multiple independent keys.
[0017] In a third aspect, an embodiment of the present application provides an encrypted communication device applied to a client. The device includes:
[0018] A sending module, configured to send first handshake information to a server. The first handshake information includes an algorithm list, and the algorithm list contains a key encapsulation algorithm supported by the client and a signature algorithm for verifying a long-term public key;
[0019] A receiving module, configured to receive the second handshake information sent by the server, where the second handshake information includes a target algorithm selected by the server from the algorithm list, a server long-term public key, and a temporary public key generated based on the target algorithm;
[0020] A first encapsulation module, configured to encapsulate a first shared key using the temporary public key based on a set key encapsulation algorithm to obtain a first ciphertext, and send the first ciphertext to the server, so that the server decrypts the first ciphertext based on a temporary private key corresponding to the temporary public key to obtain the first shared key;
[0021] A second encapsulation module, configured to encapsulate the server long-term public key based on a set key encapsulation algorithm to obtain a second ciphertext and a second shared key corresponding to the second ciphertext, and send the second ciphertext to the server, so that the server decrypts the second ciphertext based on a server long-term private key corresponding to the server long-term public key to obtain the second shared key;
[0022] An authentication module, configured to perform identity authentication based on the first shared key and the second shared key;
[0023] An encrypted communication module, configured to derive keys based on the first shared key and the second shared key to obtain a plurality of independent keys, and perform encrypted communication with the server based on the plurality of independent keys.
[0024] In a fourth aspect, an embodiment of the present application provides an encrypted communication device, which is applied to a server, and the device includes:
[0025] A receiving module, configured to receive the first handshake information sent by a client, where the first handshake information includes an algorithm list, and the algorithm list includes a key encapsulation algorithm supported by the client and a signature algorithm for verifying a long-term public key;
[0026] A sending module, configured to send second handshake information to the client based on the first handshake information, where the second handshake information includes a target algorithm selected by the server from the algorithm list, a server long-term public key, and a temporary public key generated based on the target algorithm;
[0027] A first decryption module, configured to receive the first ciphertext sent by the client, and decrypt the first ciphertext based on a temporary private key corresponding to the temporary public key to obtain a first shared key, where the first ciphertext is obtained by the client encapsulating the first shared key using the temporary public key based on a set key encapsulation algorithm;
[0028] A second decryption module, configured to receive a second ciphertext sent by the client, and perform a decryption operation on the second ciphertext based on a server long-term private key corresponding to the server long-term public key, to obtain a second shared key, where the second ciphertext is obtained by the client encapsulating the server long-term public key based on a set key encapsulation algorithm;
[0029] An authentication module, configured to perform identity authentication based on the first shared key and the second shared key;
[0030] An encrypted communication module, configured to derive keys based on the first shared key and the second shared key to obtain a plurality of independent keys, and perform encrypted communication with the server based on the plurality of independent keys.
[0031] In a fifth aspect, an embodiment of the present application further provides an electronic device, including: a memory, a processor, and a communication interface; wherein, an executable code is stored on the memory, and when the executable code is executed by the processor, the processor is caused to execute the method described in the first aspect or the second aspect above.
[0032] In a sixth aspect, an embodiment of the present application further provides a non-transitory machine-readable storage medium, on which an executable code is stored, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the method described in the first aspect or the second aspect above.
[0033] In a seventh aspect, an embodiment of the present application further provides a computer program product, including: a computer program, and when the computer program is executed by a processor of an electronic device, the processor is caused to execute the method described in the first aspect or the second aspect above.
[0034] In the embodiments of the present application, by sending first handshake information to the server and receiving second handshake information fed back by the server based on the first handshake information, the target algorithm selected by the server from the algorithm list, the server's long-term public key, and the temporary public key generated based on the target algorithm can be obtained. Then, based on the set key encapsulation algorithm, the temporary public key is used to encapsulate the first shared key to obtain the first ciphertext, and the server's long-term public key is encapsulated based on the set key encapsulation algorithm to obtain the second ciphertext and the second shared key corresponding to the second ciphertext. At this time, the client obtains the first shared key and the second shared key. After that, the client sends the first shared key and the second shared key to the server. The server can decrypt the first ciphertext based on the temporary private key corresponding to the temporary public key to obtain the first shared key, and decrypt the second ciphertext based on the server's long-term private key corresponding to the server's long-term public key to obtain the second shared key. At this time, the server obtains the first shared key and the second shared key. After that, identity authentication and key derivation are performed based on the first shared key and the second shared key to obtain multiple independent keys, and encrypted communication is carried out with the server based on the multiple independent keys, with small communication overhead and high security. Specifically:
[0035] First, by the client sending an algorithm list and the server selecting the supported algorithms therefrom, this design allows the protocol to support multiple encryption algorithms, adapt to different security requirements and environments, and is also convenient for future upgrades to more secure algorithms.
[0036] Second, for the first shared key generated by using the temporary public key and the temporary private key, even if the server's long-term private key is leaked in the future, an attacker cannot decrypt the previous communication content because the temporary key is only valid in the current session and is discarded after the session ends, ensuring forward security.
[0037] Third, by using the server's long-term public key and the signature algorithm, the client can verify the identity of the server and prevent man-in-the-middle attacks (MITM). The encapsulation and verification of the server's long-term public key ensure the credibility of both communication parties.
[0038] Fourth, by using the Key Encapsulation Mechanism (KEM) to encapsulate the temporary public key and the server's long-term public key, the security of the key exchange process is ensured, and KEM is more efficient. Especially when dealing with a large number of concurrent connections, it can reduce the computational overhead.
[0039] Fifth, multiple independent keys are derived from the first shared key and the second shared key through key derivation, enhancing security. In this process, by using two independent shared keys (the first shared key and the second shared key) for key derivation, even if one of the keys is leaked, the other key can still protect the security of the communication. Moreover, each key can be used for different purposes (such as encryption, authentication, etc.), avoiding the risk of abuse of a single key. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0041] Figure 1 is a flowchart of an authentication and encryption communication method provided by an embodiment of the present application;
[0042] Figure 2 is a schematic application diagram of an authentication and encryption communication method provided by an embodiment of the present application;
[0043] Figure 3 is another schematic application diagram of an authentication and encryption communication method provided by an embodiment of the present application;
[0044] Figure 4 is another flowchart of an authentication and encryption communication method provided by an embodiment of the present application;
[0045] Figure 5 is a schematic structural diagram of an authentication and encryption communication device provided by an embodiment of the present application;
[0046] Figure 6 is another schematic structural diagram of an authentication and encryption communication device provided by an embodiment of the present application;
[0047] Figure 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0048] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the scope of protection of the present application.
[0049] In the information security technology, the Transport Layer Cryptography Protocol (TLCP for short) adopts the method of separating encryption certificates and signature certificates, conducts key negotiation and digital signature through algorithms such as SM2 and RSA, and uses symmetric cryptography algorithms to ensure the confidentiality and integrity of data. However, the emergence of quantum computers poses a serious threat to the existing cryptographic system. Specifically, the Shor algorithm running on a quantum computer can break discrete logarithm and large integer factorization problems in polynomial time, and the Grover algorithm running on a quantum computer accelerates brute-force attacks, resulting in the insecurity of public-key cryptography algorithms and the halving of the security strength of symmetric cryptography algorithms, threatening the security of digital communication systems. Currently, theoretically, a post-quantum signature scheme can be used to replace the relevant traditional public-key cryptography operations in TLCP. However, when conducting encrypted communication based on the post-quantum signature scheme, a signature needs to be generated and transmitted for each communication, and the signature value is usually long, resulting in a large communication overhead. Therefore, there is an urgent need to provide an authenticated encryption communication method with small communication overhead and higher security. In view of this, the embodiments of the present application provide an authenticated encryption communication method.
[0050] Figure 1 FIG. is a flowchart of an authenticated encryption communication method provided by an embodiment of the present application. This method is applied to a client, as Figure 1 shown, and this method includes:
[0051] 101. Send a first handshake message to the server. The first handshake message includes an algorithm list, and the algorithm list contains the key encapsulation algorithms supported by the client and the signature algorithms used to verify the long-term public key.
[0052] 102. Receive a second handshake message sent by the server. The second handshake message includes the target algorithm selected by the server from the algorithm list, the server's long-term public key, and a temporary public key generated based on the target algorithm.
[0053] 103. Based on the set key encapsulation algorithm, use the temporary public key to encapsulate the first shared key to obtain a first ciphertext, and send the first ciphertext to the server so that the server decrypts the first ciphertext based on the temporary private key corresponding to the temporary public key to obtain the first shared key.
[0054] 104. Based on the set key encapsulation algorithm, encapsulate the server's long-term public key to obtain a second ciphertext and a second shared key corresponding to the second ciphertext, and send the second ciphertext to the server so that the server decrypts the second ciphertext based on the server's long-term private key corresponding to the server's long-term public key to obtain the second shared key.
[0055] 105. Perform identity authentication and derive keys based on the first shared key and the second shared key to obtain multiple independent keys, and perform encrypted communication with the server based on the multiple independent keys.
[0056] Among them, the first handshake information further includes a first random number, and the second handshake information further includes a second random number. It should be understood that by enabling the client and the server to generate random numbers respectively during the process of encrypted communication between the client and the server, these random numbers can be used as the unique identifier of the current session, preventing attackers from impersonating the client or the server by intercepting and replaying old messages, because the random numbers for each session are different. Moreover, the first random number and the second random number are used in the key derivation process to ensure that the keys generated for each session are unique. Even if the same client and server establish connections multiple times, due to the different random numbers, the generated keys will also be different, thereby enhancing security.
[0057] For ease of understanding, the following Figure 2 gives a specific example of this solution (mainly divided into two stages):
[0058] I. Post-quantum key exchange stage:
[0059] The client generates the first handshake information ClientHello, which contains the first random number r c (with a length of 0 - 256 bits) and an algorithm list. The algorithm list contains the key encapsulation algorithms supported by the client (such as key generation algorithms , encapsulation algorithms and decapsulation algorithms etc.) and signature algorithms for verifying long-term public keys (such as the elliptic curve-based digital signature algorithm ECDSA, the RSA-based signature algorithm RSA-PSS, etc.). During this process, the key derivation process is initialized. Specifically, the client performs key derivation through the key derivation function (HMAC-based Extract-and-Expand Key Derivation Function, abbreviated as HKDF). Specifically, first, the HKDF.Extract function is called to generate an initial key material ES using an initial value (usually all zeros). Then, the client uses the HKDF.Expand function to derive a derived key dES from ES for subsequent key derivation. In addition, it should be noted that Figure 2 in and can be instantiated with different algorithms.
[0060] After the server receives the above first handshake message ClientHello, it generates a second handshake message ServerHello and sends the second handshake message to the client. The second handshake message includes: a second random number r s (with a length of 0 - 256 bits), and a target algorithm selected from the above algorithm list.
[0061] As an optional implementation, the selection of the target algorithm is based on the following:
[0062] 1. Security first: The server usually prefers to select algorithms with higher security. For example, it prefers to select the post - quantum - secure Kyber - 512 rather than the traditional ECDH.
[0063] 2. Compatibility: The server will select an algorithm that both the client and the server support. If the client does not support the algorithm preferred by the server, the server will sequentially select the next supported algorithm.
[0064] 3. Performance consideration: In some cases, the server may select an algorithm based on performance requirements. For example, in a resource - constrained environment, it may select an algorithm with less computational complexity.
[0065] The server sends the server certificate (ServerCertificate) to the client, which contains the server's long - term public key pk s . And, the server generates a temporary key pair through the KEM algorithm (such as ), including (temporary public key pk e , temporary private key sk e ), and sends a message ServerKeyExchange for exchanging key material to the client, which contains the temporary public key pk e . After that, the server sends the ServerHelloDone message, indicating the end of ServerHello.
[0066] After that, the client, based on the Key Encapsulation Mechanism (KEM) algorithm, that is, sets the key encapsulation algorithm uses the temporary public key pk e to encapsulate the first shared key ss e to obtain the first ciphertext ct e , and sends a message ServerKeyExchange for exchanging key material to the server, which contains the first ciphertext ct e .
[0067] After the server receives the first ciphertext ct e , based on the temporary public key pke The corresponding temporary private key sk e Using the de-encapsulation algorithm Perform decryption operation on the first ciphertext ct e to obtain the first shared key ss e . At this time, both the client and the server obtain the unauthenticated temporary shared key (the first shared key ss e ).
[0068] II. KEM-based authentication phase:
[0069] The client encapsulates the server's long-term public key pk based on the set key encapsulation algorithm s to obtain the second ciphertext ct s and the second shared key ss s corresponding to the second ciphertext ct s , and sends the message ClientKemCiphertext for recording the ciphertext to the server, which contains the second ciphertext ct s .
[0070] After receiving the second ciphertext ct s , the server uses the de-encapsulation algorithm s based on the server's long-term private key sk s corresponding to the server's long-term public key pk to perform decryption operation on the second ciphertext ct s to obtain the second shared key ss s . At this time, both the client and the server obtain the shared key for implicit authentication (the first shared key ss e ).
[0071] After that, key derivation is performed based on the first shared key and the second shared key to obtain multiple independent keys, such as Figure 2 the first-phase key CHTS, the second-phase key SHTS, the third-phase key CATS, and the fourth-phase key SATS in . After that, authentication is performed based on the messages generated by the first-phase key and the second-phase key; after the authentication passes the verification, encrypted communication is performed with the server through the third-phase key and the fourth-phase key.
[0072] Specifically, when implemented, the client uses the first-phase key CHTS to generate the completion message CF, which contains the MAC value of the messages from ClientHello to ClientKemCiphertext. At this time, the ClientFinished message is sent. After that, the server verifies the CF. If it is correct, the subsequent operations continue; if it is incorrect, the connection with the client is terminated.
[0073] The client continues to derive the third-phase key (CATS) for encrypting subsequent application data.
[0074] The server uses the second-phase key SHTS to generate the completion message SF, which contains the MAC value for the ClientHello to ClientFinished messages. At this time, the ServerFinished message is sent. Through client verification, if it is correct, the subsequent operations continue; if it is incorrect, the connection with the server is terminated.
[0075] The server continues to derive the fourth-phase key SATS for encrypting subsequent application data.
[0076] The following is a specific description of the key derivation process:
[0077] 1. Early Secret (ES):
[0078] ES is generated from the initial value using HKDF.Extract.
[0079] ES plays an important role in the PSK mode and 0-RTT mode of TLS 1.3. Here, it is only to be consistent with the key derivation process of TLS 1.3.
[0080] 2. Handshake Secret (HS):
[0081] HS (Handshake Secret) is generated using HKDF.Extract from dES, the first shared secret ss e , and the second shared secret ss s .
[0082] 3. Traffic Secret:
[0083] The client handshake traffic secret (CHTS) and the server handshake traffic secret (SHTS) are generated using HKDF.Expand from HS.
[0084] dHS (Derived Handshake Secret) is generated using HKDF.Expand from HS.
[0085] 4. Master Secret (MS):
[0086] MS (Master Secret) is generated using HKDF.Extract from dHS.
[0087] 5. Finished Secret:
[0088] The client finished key fk c and the server finished key fks 。
[0089] For Figure 2 in stage1-stage4, it is equivalent to dividing into four stages, specifically as follows:
[0090] Stage 1: The client sends ClientHello to ClientKeyExchange.
[0091] Stage 2: The server verifies ClientFinished and sends ServerFinished.
[0092] Stage 3: The client verifies ServerFinished and generates an application traffic key.
[0093] Stage 4: Both the client and the server complete the handshake and enter the application data transmission stage.
[0094] Based on the above, the authentication and encryption communication method provided by the embodiments of the present application can obtain the target algorithm selected by the server from the algorithm list, the server's long-term public key, and the temporary public key generated based on the target algorithm by sending the first handshake information to the server and receiving the second handshake information feedback by the server based on the first handshake information. Then, the temporary public key is encapsulated based on the set key encapsulation algorithm to obtain the first ciphertext and the first shared key corresponding to the first ciphertext, and the server's long-term public key is encapsulated based on the set key encapsulation algorithm to obtain the second ciphertext and the second shared key corresponding to the second ciphertext. At this time, the client obtains the first shared key and the second shared key. After that, the client sends the first shared key and the second shared key to the server. The server can decrypt the first ciphertext based on the temporary private key corresponding to the temporary public key to obtain the first shared key, and decrypt the second ciphertext based on the server's long-term private key corresponding to the server's long-term public key to obtain the second shared key. At this time, the server obtains the first shared key and the second shared key. After that, key derivation is performed based on the first shared key and the second shared key to obtain multiple independent keys, and encrypted communication is carried out with the server based on the multiple independent keys, with small communication overhead and high security. Specifically:
[0095] First, by the client sending an algorithm list and the server selecting the supported algorithms from it, this design allows the protocol to support multiple encryption algorithms, adapt to different security requirements and environments, and is also convenient for future upgrades to more secure algorithms.
[0096] Second, the first shared key generated by using the ephemeral public key and ephemeral private key ensures that even if the server's long-term private key is leaked in the future, an attacker cannot decrypt the previous communication content. This is because the ephemeral key is only valid for the current session and is discarded after the session ends, ensuring forward secrecy.
[0097] Third, by using the server's long-term public key and signature algorithm, the client can verify the server's identity and prevent man-in-the-middle (MITM) attacks. The encapsulation and verification of the server's long-term public key ensure the trustworthiness of both communication parties.
[0098] Fourth, by using KEM to encapsulate the ephemeral public key and the server's long-term public key, the security of the key exchange process is ensured, and KEM is more efficient. Especially when dealing with a large number of concurrent connections, it can reduce the computational overhead.
[0099] Fifth, by deriving multiple independent keys from the first shared key and the second shared key through key derivation, the security is enhanced. In this process, by using two independent shared keys (the first shared key and the second shared key) for key derivation, even if one key is leaked, the other key can still protect the security of the communication. Moreover, each key can be used for different purposes (such as encryption, authentication, etc.), avoiding the risk of abuse of a single key.
[0100] In the embodiment of the present application, in addition to the process of one-way authentication (i.e., server-side authentication) described in the above solution, two-way authentication (i.e., two-way authentication between the client and the server) can also be performed. Specifically, after sending the first handshake message to the server, the method further includes: if a two-way authentication request sent by the server is received, the client's long-term public key is sent to the server; receiving the third ciphertext sent by the server, where the third ciphertext is obtained by the server encapsulating the client's long-term public key based on the third key encapsulation algorithm; decrypting the third ciphertext based on the client's long-term private key corresponding to the client's long-term public key to obtain the third shared key; deriving multiple independent keys based on the first shared key and the second shared key, including: deriving multiple independent keys based on the first shared key, the second shared key, and the third shared key.
[0101] For ease of understanding, the following is a specific example in combination with Figure 3 For specific illustration:
[0102] The client generates the first handshake message ClientHello, which contains the first random number r c (with a length of 0 - 256 bits) and an algorithm list, and the algorithm list contains the key encapsulation algorithms supported by the client (such as key generation algorithms and encapsulation algorithms Decapsulation algorithm etc.) and signature algorithms for verifying long-term public keys (such as Elliptic Curve Digital Signature Algorithm ECDSA based on elliptic curves, RSA-PSS signature algorithm based on RSA, etc.). During this process, the key derivation process is initialized. Specifically, the client performs key derivation through a key derivation function (HMAC-based Extract-and-Expand Key Derivation Function, abbreviated as HKDF). Specifically, first, the HKDF.Extract function is called to generate an initial key material ES using an initial value (usually all zeros). Then, the client uses the HKDF.Expand function to derive a derived key dES from ES for subsequent key derivation. In addition.
[0103] After the server receives the above first handshake message ClientHello, it generates a second handshake message ServerHello and sends this second handshake message to the client. The second handshake message includes: a second random number r s (with a length of 0 - 256 bits), and the target algorithm selected from the above algorithm list.
[0104] As an optional implementation, the selection of the target algorithm is based on the following:
[0105] 1. Security first: The server usually prefers to select algorithms with higher security. For example, it prefers to select the post-quantum secure Kyber-512 rather than the traditional ECDH.
[0106] 2. Compatibility: The server will select algorithms that are supported by both the client and the server. If the client does not support the algorithm preferred by the server, the server will sequentially select the next supported algorithm.
[0107] 3. Performance consideration: In some cases, the server may select an algorithm based on performance requirements. For example, in a resource-constrained environment, an algorithm with less computational complexity may be selected.
[0108] The server sends the server certificate (ServerCertificate) to the client, which contains the server's long-term public key pk s . And, the server generates a temporary key pair through a KEM algorithm (such as ), including (temporary public key pk e , temporary private key sk e ), and sends a message ServerKeyExchange for exchanging key materials to the client, which contains the temporary public key pk e, and send a CertificateRequest message to the client, requesting the client to provide a certificate to enable two-way authentication. After that, the server sends a ServerHelloDone message indicating the end of ServerHello.
[0109] After that, the client sends a ClientCertificate message, which contains the client's long-term public key pk c .
[0110] The client is based on the Key Encapsulation Mechanism (KEM) algorithm, that is, set the key encapsulation algorithm Use the ephemeral public key pk e To encapsulate the first shared secret ss e To obtain the first ciphertext ct e , and send a message ServerKeyExchange for exchanging key material to the server, which contains the first ciphertext ct e .
[0111] After the server receives the first ciphertext ct e , based on the ephemeral private key sk e Corresponding to the ephemeral public key pk e Use the decapsulation algorithm To decrypt the first ciphertext ct e To obtain the first shared secret ss e . At this time, both the client and the server obtain an unauthenticated ephemeral shared secret (the first shared secret ss e ).
[0112] The client is based on the set key encapsulation algorithm To encapsulate the server's long-term public key pk s To obtain the second ciphertext ct s And the second shared secret ss s Corresponding to the second ciphertext ct s , and send a message ClientKemCiphertext for recording the ciphertext to the server, which contains the second ciphertext ct s .
[0113] After the server receives the second ciphertext ct s , based on the server's long-term private key sk s Corresponding to the server's long-term public key pk s Use the decapsulation algorithm To decrypt the second ciphertext ct s To obtain the second shared secret ss sAt this time, both the client and the server obtain the shared key (the first shared key ss) for implicit authentication. e )
[0114] The server encapsulates the client's long-term public key pk based on the set key encapsulation algorithm, c to obtain the third ciphertext ct c and the third shared key ss c corresponding to the third ciphertext ct, c and sends the message ServerKemCiphertext for recording the ciphertext to the client, and this message contains the third ciphertext ct c .
[0115] After receiving the third ciphertext ct c , the client uses the client's long-term private key sk c corresponding to the client's long-term public key pk c to perform a decryption operation on the third ciphertext ct using the de-encapsulation algorithm, c to obtain the third shared key ss c .
[0116] After that, key derivation is performed based on the first shared key ss e , the second shared key ss s and the third shared key ss c to obtain multiple independent keys, such as Figure 3 the first-stage key CHTS, the second-stage key SHTS, the third-stage key CATS, and the fourth-stage key SATS in
[0117] Specifically in implementation, the client uses the first-stage key CHTS to generate the completion message CF, which contains the MAC value for the messages from ClientHello to ClientKemCiphertext. At this time, the ClientFinished message is sent. Then, the server verifies the CF. If it is correct, the subsequent operations continue; if it is incorrect, the connection with the client is terminated.
[0118] The client continues to derive the third-stage key (CATS) for encrypting subsequent application data.
[0119] The server uses the second-stage key SHTS to generate the completion message SF, which contains the MAC value for the messages from ClientHello to ClientFinished. At this time, the ServerFinished message is sent. Through the verification of the client, if it is correct, the subsequent operations continue; if it is incorrect, the connection with the server is terminated.
[0120] The server continues to derive the fourth-stage key SATS for encrypting subsequent application data.
[0121] The following is a specific description of the key derivation process:
[0122] 1. Early Secret (ES):
[0123] ES is generated from the initial value using HKDF.Extract.
[0124] ES plays an important role in the PSK mode and 0-RTT mode of TLS 1.3. Here, it is only to be consistent with the key derivation process of TLS 1.3.
[0125] 2. Handshake Secret (HS):
[0126] HS (Handshake Secret) is generated using HKDF.Extract from dES, the first shared secret ss e , the second shared secret ss s , and the third shared secret ss c .
[0127] 3. Traffic Secret:
[0128] The client handshake traffic secret (CHTS) and the server handshake traffic secret (SHTS) are generated using HKDF.Expand from HS.
[0129] dHS (Derived Handshake Secret) is generated using HKDF.Expand from HS.
[0130] 4. Master Secret (MS):
[0131] MS (Master Secret) is generated using HKDF.Extract from dHS.
[0132] 5. Finished Secret:
[0133] The client finished secret fk c and the server finished secret fk s are generated using HKDF.Expand from MS.
[0134] For Figure 3 in stage1-stage4, it is equivalent to dividing into four stages, specifically as follows:
[0135] Stage 1: The client sends ClientHello to ClientKeyExchange.
[0136] Phase 2: The server verifies ClientFinished and sends ServerFinished.
[0137] Phase 3: The client verifies ServerFinished and generates an application traffic key.
[0138] Phase 4: Both the client and the server complete the handshake and enter the application data transfer phase.
[0139] By using the method of mutual authentication, the security of communication between the client and the server can be further improved. Specifically, it should be understood that in mutual authentication, the client also provides a certificate, and the server verifies the identity of the client, thereby preventing man-in-the-middle attacks. And in this mode, both the client and the server verify the identity of each other to ensure the authenticity of both communication parties.
[0140] Figure 4 Another flowchart of an authentication and encryption communication method provided for the embodiments of the present application. This method is applied to the server, as Figure 4 shown, this method includes:
[0141] 401. Receive the first handshake information sent by the client. The first handshake information includes an algorithm list, and the algorithm list contains the key encapsulation algorithms supported by the client and the signature algorithm for verifying the long-term public key.
[0142] 402. Send the second handshake information to the client based on the first handshake information. The second handshake information includes the target algorithm selected by the server from the algorithm list, the server's long-term public key, and the ephemeral public key generated based on the target algorithm.
[0143] 403. Receive the first ciphertext sent by the client, and decrypt the first ciphertext based on the ephemeral private key corresponding to the ephemeral public key to obtain the first shared key. The first ciphertext is obtained by the client encapsulating the first shared key using the ephemeral public key based on the set key encapsulation algorithm.
[0144] 404. Receive the second ciphertext sent by the client, and decrypt the second ciphertext based on the server's long-term private key corresponding to the server's long-term public key to obtain the second shared key. The second ciphertext is obtained by the client encapsulating the server's long-term public key based on the set key encapsulation algorithm.
[0145] 405. Perform identity authentication and key derivation based on the first shared key and the second shared key to obtain multiple independent keys, and perform encrypted communication with the client based on the multiple independent keys.
[0146] In an alternative embodiment, after receiving the first handshake information sent by the client, the method further includes:
[0147] Send a two-way authentication request to the client;
[0148] Receive the client's long-term public key sent by the client based on the two-way authentication request;
[0149] Encapsulate the client's long-term public key based on the third key encapsulation algorithm to obtain a third ciphertext, and send the third ciphertext to the client so that the client decrypts the third ciphertext based on the client's long-term private key corresponding to the client's long-term public key to obtain a third shared key;
[0150] Derive multiple independent keys based on the first shared key and the second shared key, including:
[0151] Derive multiple independent keys based on the first shared key, the second shared key, and the third shared key.
[0152] In an optional embodiment, the multiple independent keys include: a first-stage key, a second-stage key, a third-stage key, and a fourth-stage key; after obtaining the multiple independent keys, the method further includes: performing identity authentication based on the message generated by the first-stage key and the second-stage key; after the identity authentication passes the verification, performing encrypted communication with the server through the third-stage key and the fourth-stage key.
[0153] Figure 4 The method shown can execute the steps in the foregoing embodiments. For the detailed execution process and technical effects, refer to the description in the foregoing embodiments and will not be elaborated here.
[0154] Figure 5 The following is a schematic structural diagram of an encryption communication device provided by an embodiment of the present application. This device is applied to the client, as Figure 5 shown, the device includes:
[0155] A sending module 51, configured to send first handshake information to the server, where the first handshake information includes an algorithm list, and the algorithm list contains the key encapsulation algorithm supported by the client and the signature algorithm for verifying the long-term public key.
[0156] A receiving module 52, configured to receive second handshake information sent by the server, where the second handshake information includes the target algorithm selected by the server from the algorithm list, the server's long-term public key, and a temporary public key generated based on the target algorithm.
[0157] A first encapsulation module 53, configured to encapsulate the first shared key using the temporary public key based on a set key encapsulation algorithm to obtain a first ciphertext, and send the first ciphertext to the server so that the server decrypts the first ciphertext based on the temporary private key corresponding to the temporary public key to obtain the first shared key.
[0158] A second encapsulation module 54, configured to encapsulate the server long-term public key based on a set key encapsulation algorithm to obtain a second ciphertext and a second shared key corresponding to the second ciphertext, and send the second ciphertext to the server, so that the server decrypts the second ciphertext based on the server long-term private key corresponding to the server long-term public key to obtain the second shared key.
[0159] An authentication module 55, configured to perform identity authentication based on the first shared key and the second shared key.
[0160] An encrypted communication module 56, configured to derive keys based on the first shared key and the second shared key to obtain a plurality of independent keys, and perform encrypted communication with the server based on the plurality of independent keys.
[0161] Optionally, the device further includes: a decryption module, configured to send the client long-term public key to the server if a two-way authentication request sent by the server is received; receive a third ciphertext sent by the server, where the third ciphertext is obtained after the server encapsulates the client long-term public key based on a third key encapsulation algorithm; decrypt the third ciphertext based on the client long-term private key corresponding to the client long-term public key to obtain a third shared key; specifically, the encrypted communication module 56 is configured to: derive keys based on the first shared key, the second shared key, and the third shared key to obtain a plurality of independent keys.
[0162] Optionally, the plurality of independent keys include: a first-stage key, a second-stage key, a third-stage key, and a fourth-stage key, and the device further includes: an authentication module, configured to perform identity authentication based on a message generated by the first-stage key and the second-stage key; after the identity authentication passes the verification, perform encrypted communication with the server through the third-stage key and the fourth-stage key.
[0163] Figure 5 The device shown can execute the steps in the foregoing embodiments. For the detailed execution process and technical effects, refer to the descriptions in the foregoing embodiments, which will not be elaborated here.
[0164] Figure 6 Another structural schematic diagram of an encrypted communication device provided by an embodiment of the present application. The device is applied to a server, as Figure 6 shown, the device includes:
[0165] A receiving module 61, configured to receive a first handshake message sent by a client, where the first handshake message includes an algorithm list, and the algorithm list contains a key encapsulation algorithm supported by the client and a signature algorithm for verifying a long-term public key.
[0166] A sending module 62, configured to send a second handshake message to the client based on the first handshake message, where the second handshake message includes a target algorithm selected by the server from the algorithm list, a server long-term public key, and a temporary public key generated based on the target algorithm.
[0167] A first decryption module 63, configured to receive a first ciphertext sent by the client, and perform a decryption operation on the first ciphertext based on a temporary private key corresponding to the temporary public key to obtain a first shared key, where the first ciphertext is obtained by the client encapsulating the first shared key using the temporary public key based on a set key encapsulation algorithm.
[0168] A second decryption module 64, configured to receive a second ciphertext sent by the client, and perform a decryption operation on the second ciphertext based on a server long-term private key corresponding to the server long-term public key to obtain a second shared key, where the second ciphertext is obtained by the client encapsulating the server long-term public key based on a set key encapsulation algorithm.
[0169] An authentication module 65, configured to perform identity authentication based on the first shared key and the second shared key.
[0170] An encrypted communication module 66, configured to derive keys based on the first shared key and the second shared key to obtain a plurality of independent keys, and perform encrypted communication with the server based on the plurality of independent keys.
[0171] Optionally, the apparatus further includes: a decryption module, configured to send a mutual authentication request to the client; receive a client long-term public key sent by the client based on the mutual authentication request; encapsulate the client long-term public key based on a third key encapsulation algorithm to obtain a third ciphertext, and send the third ciphertext to the client, so that the client decrypts the third ciphertext based on a client long-term private key corresponding to the client long-term public key to obtain a third shared key; specifically, the encrypted communication module 66 is configured to: derive keys based on the first shared key, the second shared key, and the third shared key to obtain a plurality of independent keys.
[0172] Optionally, the multiple independent keys include: a first-phase key, a second-phase key, a third-phase key, and a fourth-phase key. The device further includes an authentication module for performing identity authentication based on a message generated by the first-phase key and the second-phase key. After the identity authentication passes the verification, encrypted communication is performed with the server through the third-phase key and the fourth-phase key.
[0173] Figure 6 The device shown can perform the steps in the foregoing embodiments. For the detailed execution process and technical effects, refer to the descriptions in the foregoing embodiments and will not be elaborated here.
[0174] Based on the above, the embodiments of the present application are equivalent to proposing a post-quantum TLCP protocol based on KEM identity authentication - the KEMTLCP protocol. The basic protocol of the KEMTLCP protocol is a one-way authentication protocol (server identity authentication), and optionally client identity authentication, which is called a two-way identity authentication protocol. The characteristics of the KEMTLCP protocol are: no need for dual certificates, only a single certificate is required, which is called a KEM certificate here. The public key stored in the KEM certificate is the KEM public key. The KEMTLCP protocol uses the key encapsulation mechanism to complete key negotiation and identity authentication, and no longer relies on the inefficient and costly post-quantum signature mechanism for identity authentication.
[0175] The embodiments of the present application also provide an electronic device, such as Figure 7 shown. The electronic device may include: a processor 71, a memory 72, and a communication interface 73. Among them, executable code is stored on the memory 72. When the executable code is executed by the processor 71, the processor 71 is caused to implement the encrypted communication method in the foregoing embodiments.
[0176] In addition, the embodiments of the present application provide a non-transitory machine-readable storage medium. Executable code is stored on the non-transitory machine-readable storage medium. When the executable code is executed by the processor of the electronic device, the processor can at least implement the encrypted communication method provided in the foregoing embodiments.
[0177] The embodiments of the present application provide a computer program product. The computer program product includes: a computer program. When the computer program is executed by the processor of the electronic device, the processor is caused to execute the encrypted communication method provided in the foregoing embodiments.
[0178] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0179] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a means for implementing the specified functions in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0180] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the specified functions in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0181] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the specified functions in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0182] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0183] The memory may include non-permanent memory in the computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0184] A computer-readable medium includes permanent and non-permanent, removable and non-removable media that can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0185] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0186] The above are only embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. An authenticated encryption communication method, characterized in that, Applied to the client, the method includes: Sending first handshake information to the server, the first handshake information including an algorithm list, the algorithm list containing the key encapsulation algorithms supported by the client and the signature algorithms for verifying long-term public keys; Receiving second handshake information sent by the server, the second handshake information including the target algorithm selected by the server from the algorithm list, the server's long-term public key, and a temporary public key generated based on the target algorithm, the target algorithm being a key encapsulation algorithm supported by the client, and the key encapsulation algorithm including a set key encapsulation algorithm; Based on the set key encapsulation algorithm, using the temporary public key to encapsulate a first shared key to obtain a first ciphertext, and sending the first ciphertext to the server, so that the server decrypts the first ciphertext based on the temporary private key corresponding to the temporary public key to obtain the first shared key; Based on the set key encapsulation algorithm, using the server's long-term public key for an encapsulation operation to obtain a second ciphertext and a second shared key, and sending the second ciphertext to the server, so that the server decrypts the second ciphertext based on the server's long-term private key corresponding to the server's long-term public key to obtain the second shared key, where the second ciphertext is the encapsulation result of the second shared key; Performing identity authentication and key derivation based on the first shared key and the second shared key to obtain multiple independent keys, and performing encrypted communication with the server based on the multiple independent keys.
2. The method according to claim 1, wherein After sending the first handshake information to the server, the method further includes: If receiving a two-way authentication request sent by the server, sending the client's long-term public key to the server; Receiving a third ciphertext sent by the server, the third ciphertext being obtained after the server encapsulates the client's long-term public key based on a third key encapsulation algorithm; Based on the client's long-term private key corresponding to the client's long-term public key, decrypting the third ciphertext to obtain a third shared key; The key derivation based on the first shared key and the second shared key to obtain multiple independent keys includes: Performing key derivation based on the first shared key, the second shared key, and the third shared key to obtain multiple independent keys.
3. The method according to claim 1 or 2, characterized in that, The multiple independent keys include: a first-stage key, a second-stage key, a third-stage key, and a fourth-stage key; the performing encrypted communication with the server based on the multiple independent keys includes: Performing identity authentication based on a message generated by the first-stage key and the second-stage key; After the identity authentication passes the verification, performing encrypted communication with the server through the third-stage key and the fourth-stage key.
4. An authenticated encryption communication method, characterized in that, Applied to the server, the method includes: Receiving first handshake information sent by the client, the first handshake information including an algorithm list, the algorithm list containing the key encapsulation algorithms supported by the client and the signature algorithms for verifying long-term public keys; Send second handshake information to the client based on the first handshake information, where the second handshake information includes a target algorithm selected by the server from the algorithm list, the server's long-term public key, and a temporary public key generated based on the target algorithm. The target algorithm is a key encapsulation algorithm supported by the client, and the key encapsulation algorithm includes a set key encapsulation algorithm; Receive a first ciphertext sent by the client, and perform a decryption operation on the first ciphertext based on a temporary private key corresponding to the temporary public key to obtain a first shared key. The first ciphertext is obtained by the client encapsulating the first shared key using the temporary public key based on the set key encapsulation algorithm; Receive a second ciphertext sent by the client, and perform a decryption operation on the second ciphertext based on a server long-term private key corresponding to the server long-term public key to obtain a second shared key. Among them, the second ciphertext and the second shared key are obtained by performing an encapsulation operation using the server long-term public key based on the set key encapsulation algorithm, and the second ciphertext is the encapsulation result of the second shared key; Perform identity authentication and key derivation based on the first shared key and the second shared key to obtain multiple independent keys, and perform encrypted communication with the client based on the multiple independent keys.
5. The method according to claim 4, wherein After receiving the first handshake information sent by the client, the method further includes: Send a mutual authentication request to the client; Receive the client's long-term public key sent by the client based on the mutual authentication request; Encapsulate the client's long-term public key based on a third key encapsulation algorithm to obtain a third ciphertext, and send the third ciphertext to the client, so that the client decrypts the third ciphertext based on a client long-term private key corresponding to the client's long-term public key to obtain a third shared key; The key derivation based on the first shared key and the second shared key to obtain multiple independent keys includes: Perform key derivation based on the first shared key, the second shared key, and the third shared key to obtain multiple independent keys.
6. The method according to claim 4 or 5, characterized in that, The multiple independent keys include: a first-stage key, a second-stage key, a third-stage key, and a fourth-stage key; the encrypted communication with the server based on the multiple independent keys includes: Perform identity authentication on a message generated based on the first-stage key and the second-stage key; After the identity authentication passes the verification, perform encrypted communication with the server through the third-stage key and the fourth-stage key.
7. An authenticated encryption communication device, characterized in that, Applied to a client, the device includes: A sending module, configured to send first handshake information to a server, where the first handshake information includes an algorithm list, and the algorithm list includes a key encapsulation algorithm supported by the client and a signature algorithm for verifying a long-term public key; A receiving module, configured to receive the second handshake information sent by the server, where the second handshake information includes a target algorithm selected by the server from the algorithm list, a server long-term public key, and a temporary public key generated based on the target algorithm, the target algorithm being a key encapsulation algorithm supported by the client, and the key encapsulation algorithm including a set key encapsulation algorithm; A first encapsulation module, configured to encapsulate a first shared key using the temporary public key based on the set key encapsulation algorithm to obtain a first ciphertext, and send the first ciphertext to the server, so that the server decrypts the first ciphertext based on a temporary private key corresponding to the temporary public key to obtain the first shared key; A second encapsulation module, configured to perform an encapsulation operation using the server long-term public key based on the set key encapsulation algorithm to obtain a second ciphertext and a second shared key, and send the second ciphertext to the server, so that the server decrypts the second ciphertext based on a server long-term private key corresponding to the server long-term public key to obtain the second shared key, where the second ciphertext is an encapsulation result of the second shared key; An authentication module, configured to perform identity authentication based on the first shared key and the second shared key; An encrypted communication module, configured to derive keys based on the first shared key and the second shared key to obtain a plurality of independent keys, and perform encrypted communication with the server based on the plurality of independent keys.
8. An electronic device, characterized in that, Comprising: A memory, a processor, and a communication interface; wherein, an executable code is stored on the memory, and when the executable code is executed by the processor, the processor executes the authentication and encryption communication method according to any one of claims 1 to 3, or any one of claims 4 to 6.
9. A non-transitory machine-readable storage medium, characterized in that, An executable code is stored on the non-transitory machine-readable storage medium, and when the executable code is executed by a processor of an electronic device, the processor executes the authentication and encryption communication method according to any one of claims 1 to 3, or any one of claims 4 to 6.
10. A computer program product, characterized in that, Comprising: A computer program, and when the computer program is executed by a processor of an electronic device, the processor executes the authentication and encryption communication method according to any one of claims 1 to 3, or any one of claims 4 to 6.
Citation Information
Patent Citations
TLS protocol implementation method based on national cryptographic algorithm supporting hardware acceleration
CN115314214A
Secret key negotiation method based on SM2 encryption certificate and communication system
CN119483917A