Communication method based on post-quantum key encapsulation algorithm
By introducing a communication method based on post-quantum key packaging algorithm into the TLS protocol, the problem that the TLS protocol cannot cope with the threat of quantum computing technology is solved, and higher communication security and compatibility are achieved.
Patent Information
- Application Number
- CN202411600139.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-04
AI Technical Summary
The existing TLS protocol cannot cope with the threat of quantum computing technology and is low in security.
The communication method based on the post-quantum key packaging algorithm is adopted, and random messages and public keys are encapsulated by generating public-private key pairs, using CPA-safe post-quantum key packaging algorithm, and adapting this mechanism in the TLS protocol framework.
It provides security protection against quantum computing attacks, improves communication security, while maintaining good compatibility with existing systems, making it easier to deploy and apply at scale.
Smart Images

Figure CN119561680A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum encryption communication technology, and in particular to a communication method based on a post-quantum key encapsulation algorithm. Background Art
[0002] The Transport Layer Security (TLS) protocol is a very important basic security protocol on the Internet. It is widely used, including web browsing, FTP file downloading, SMTP protocol email, etc. The TLS protocol has always attracted attention from the relevant industry and academia due to its wide application. For such practical network security protocols, not only its security should be considered, but also its execution efficiency and whether it is easy to deploy in practice. However, at present, the vast majority of security protocols widely deployed in network information systems (such as public network infrastructure such as the Internet) are implemented using traditional public key cryptography systems such as Diffie-Hellman, RSA, and ECC, and the same is true for the TLS protocol. The security of these traditional public key cryptography systems is often based on classical number theory problems such as large integer decomposition problems and discrete logarithm problems.
[0003] Quantum computing is a revolutionary computing paradigm that uses the basic principles of quantum mechanics to process information. Unlike traditional classical computers, quantum computers use the superposition and entanglement properties of quantum bits (qubits) to demonstrate exponential computing power in specific problem areas. The theoretical basis of quantum computers can be traced back to the 1980s, but in recent years, breakthroughs have been made in hardware implementation. Quantum computers have shown great advantages in certain specific problems, especially in the fields of large number factorization, database search, and complex system optimization. This increase in computing power poses a major threat to existing cryptographic systems. In particular, the security of widely used public key cryptographic systems, such as RSA and elliptic curve cryptography, is mainly based on the computational difficulty of large number factorization and discrete logarithm problems. However, these problems can be effectively solved under the quantum computing model, which means that when large-scale quantum computers are realized, most of the existing public key cryptographic systems will no longer be secure. Traditional secure transmission protocols based on public key cryptography cannot prevent the security threats brought by quantum computers. Therefore, it is imperative to design and deploy post-quantum security protocol solutions that can resist quantum computing attacks. Summary of the invention
[0004] The purpose of the present invention is to solve the problem that TLS protocol communication in the prior art cannot cope with the threat of quantum computing technology and has low security, and to provide a communication method based on a post-quantum key encapsulation algorithm, which provides security protection for communication against quantum computing attacks and improves communication security.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions: A communication method based on a post-quantum key encapsulation algorithm, characterized in that it comprises the following steps: S1: Generate a public-private key pair and send a handshake message from the user to the server; S2: Generate a random message from the message space, use the CPA secure post-quantum key encapsulation algorithm to encapsulate the random message and public key, and send a handshake message from the server to the user; S3: decrypt the private key and ciphertext and calculate the intermediate variables of the TLS protocol. The user end and the server end receive the intermediate variables required for negotiating the key in the TLS protocol. S4: The server side calculates the signature information using a mask function, and the user side receives the signature information and compares it with the original signature information. If the comparison is successful, data transmission is performed.
[0006] Through the method of the present invention, a post-quantum key encapsulation mechanism based on the LAC algorithm is adopted to provide security protection against quantum computing attacks for communication. At the same time, the CPA secure key encapsulation mechanism is adapted to the TLS protocol framework, providing future-oriented security protection, while maintaining good compatibility with existing systems, and facilitating large-scale deployment and application.
[0007] Preferably, step S2 includes: generating a random message from the message space, encrypting the random message and the public key using a post-quantum public key encryption algorithm to obtain a ciphertext; calculating a shared key based on the ciphertext, and outputting an encapsulation result.
[0008] Preferably, step S4 includes: the user end performs identity authentication after receiving the signature information. If the signature information is the same as the original signature information, the TLS two-end key negotiation is successful, the session key is calculated and the key is derived with the server. If the signature information is not the same as the original signature, the user end rejects the signature information and terminates the key negotiation.
[0009] Preferably, in step S3, when the private key and ciphertext are decrypted, if the decryption result is a null value, the output is null; otherwise, the decryption result is assigned to the shared key and then output.
[0010] Preferably, the calculation of the intermediate variables of the TLS protocol includes: using a hash key derivation function, inputting the intermediate variables and the shared key to obtain HS; using a hash key derivation function, inputting HS and the hash result of the i-th message to obtain the remaining intermediate variables.
[0011] Preferably, the user end and the server end receive the intermediate variables required for negotiating the key in the TLS protocol, including: using a hash key derivation function, inputting the intermediate variables of the TLS protocol, and obtaining a random number tK Cand random number tK S .
[0012] In the TLS (Transport Layer Security) protocol, tK C It is part of the Client Hello message and represents a random number. During the TLS handshake process, the client sends a Client Hello message containing a random number called tK C Similarly, tK S It is part of the Server Hello message.
[0013] The role of random numbers in TLS is to ensure the uniqueness and security of each handshake. It is used to generate keys and other parameters used in subsequent handshake processes.
[0014] Preferably, a constant is input into a hash key derivation function to obtain an intermediate variable, thereby obtaining a handshake message from the user end to the server end.
[0015] Preferably, in step S2, the key encapsulation result includes a shared key and a ciphertext, and the shared key is a random message generated from a message space.
[0016] Preferably, the CPA secure post-quantum key encapsulation algorithm includes a key generation function, a key encapsulation function and a key decapsulation function. The key generation function uses a post-quantum public key encryption algorithm to generate a public-private key pair, and the key decapsulation function uses a post-quantum public key encryption algorithm to decrypt the encapsulation result generated by the key encapsulation function.
[0017] Preferably, in step S1, generating a public-private key pair includes: obtaining a random number, expanding the random number into a sufficiently long pseudo-random byte stream to obtain a sampling ring; sampling the sampling ring to obtain a ring element; randomly sampling from a central binomial distribution to obtain a private key and noise, calculating the product of the ring element and the private key and adding the noise to obtain a public key.
[0018] Therefore, the present invention has the following beneficial effects: adopting the post-quantum key encapsulation mechanism based on the LAC algorithm provides security protection against quantum computing attacks for communication. At the same time, the CPA secure key encapsulation mechanism is adapted to the TLS protocol framework, providing future-oriented security protection, while maintaining good compatibility with existing systems, facilitating large-scale deployment and application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a flowchart of the overall steps of TLS protocol communication based on the CPA secure post-quantum key encapsulation algorithm in the present invention.
[0020] Figure 2This is a schematic diagram of a two-terminal communication protocol adapted based on the CPA secure post-quantum key encapsulation algorithm in Example 2. DETAILED DESCRIPTION
[0021] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments: Embodiment 1: This embodiment provides a communication method based on a post-quantum key encapsulation algorithm, such as Figure 1 As shown, the operation process is as follows: Step 1, generate a public-private key pair, and send a handshake message from the user end to the server end; Step 2, generate a random message from the message space, use the CPA secure post-quantum key encapsulation algorithm to encapsulate the random message and the public key, and send a handshake message from the server end to the user end; Step 3, decrypt the private key and ciphertext and calculate the intermediate variables of the TLS protocol, and the user end and the server end receive the intermediate variables required for negotiating the key in the TLS protocol; Step 4, the server end calculates the signature information using the mask function, the user end receives the signature information and compares it with the original signature information, and if the comparison is successful, data transmission is performed.
[0022] The handshake subprotocol of the TLS protocol is mainly an authentication key negotiation protocol, which is used to achieve mutual authentication between the server and the client and generate a shared key between the two ends. The shared key will subsequently be used for encryption and authentication of application data, providing end-to-end security services for Internet communications.
[0023] The TLS protocol communication method based on the post-quantum key encapsulation algorithm provided in this embodiment adopts a post-quantum key encapsulation mechanism based on the LAC algorithm, which provides security protection against quantum computing attacks for communication. At the same time, the CPA secure key encapsulation mechanism is adapted to the TLS protocol framework, providing future-oriented security protection, while maintaining good compatibility with existing systems, and facilitating large-scale deployment and application.
[0024] At the same time, with the rapid development of quantum computing technology, it is becoming increasingly urgent to establish a secure communication infrastructure that is resistant to quantum attacks. The TLS protocol communication method of the post-quantum key encapsulation algorithm provided in this embodiment provides a feasible solution for secure communications in the future quantum computing era, which helps to promote the transition of the entire industry to the post-quantum era. It has significant advantages in post-quantum security, computing efficiency, system performance, protocol compatibility, technical autonomy and foresight, and provides important technical support for building the next generation of secure and efficient network communication infrastructure.
[0025] The following further illustrates the technical solution and technical effects of the present invention through specific examples and specific application scenarios. The following examples are explanations of the present invention and the present invention is not limited to the following examples.
[0026] The specific manifestations are: Step 1: Generate a public-private key pair and send a handshake message from the client to the server.
[0027] In this embodiment, a post-quantum public key encryption algorithm is used to generate a public-private key pair. The specific process includes: Get a random number, expand the random number into a sufficiently long pseudo-random byte stream to obtain a sampling ring; sample the sampling ring to obtain a ring element; randomly sample from the central binomial distribution to obtain a private key and noise, calculate the product of the ring element and the private key and add the noise to obtain the public key.
[0028] Post-quantum public key encryption algorithm is an encryption algorithm that can resist quantum computer attacks and can protect the security of data in the era of quantum computers.
[0029] The handshake messages Client Hello and Client Key Share sent from the client to the server include key negotiation and other extensions related to TLS connection establishment, denoted as CH, which is calculated by inputting a constant into the hash key derivation function.
[0030] Step 2: Generate a random message from the message space, use the CPA secure post-quantum key encapsulation algorithm to encapsulate the random message and public key, and send a handshake message from the server to the user.
[0031] CPA security refers to the security of a cryptographic scheme in the face of chosen-plaintext attacks. In this attack, an attacker can choose a plaintext message and obtain the corresponding ciphertext. CPA security ensures that even if an attacker obtains part of the plaintext and ciphertext, he cannot directly crack the key or infer the complete plaintext content, thus ensuring the security of communication.
[0032] In this embodiment, the CPA secure post-quantum key encapsulation algorithm is used to encapsulate the random message and the public key, including: generating a random message from the message space, encrypting the random message and the public key using the post-quantum public key encryption algorithm to obtain a ciphertext; assigning the value of the random message to the shared key, and outputting the encapsulation result, where the output encapsulation result includes the shared key and the ciphertext.
[0033] The server sends a Server Hello (SH) message containing extensions related to key negotiation to the client. The user and server can derive key materials based on the negotiation results of CH and SH.
[0034] If the CH message sent by the user does not meet the needs of the server (for example, it does not contain the DH component supported by the server), the server will send a Hello Retry Request message to the client, requiring the client to resend a CH message that meets the requirements.
[0035] Step 3: Decrypt the private key and ciphertext and calculate the intermediate variables of the TLS protocol. The user and server receive the intermediate variables required to negotiate the key in the TLS protocol.
[0036] The private key and ciphertext are decrypted using the post-quantum public key encryption algorithm. If the decryption result is a null value, the output is null; otherwise, the decryption result is assigned to the shared key and then output.
[0037] Using the key material and the hash values of the first two messages, a Handshake Key can be calculated using the hash key derivation function HKDF. The information in the handshake phase is then protected by this key.
[0038] Specifically: using the hash key derivation function, input the intermediate variable and the shared key to obtain HS; using the hash key derivation function, input HS and the hash result of the second message to obtain CHTS; using the hash key derivation function, input HS and the hash result of the 0th message (message) to obtain dHS.
[0039] HS stands for Handshake Key, which refers to the key generated during the TLS handshake process.
[0040] The key material obtained through key negotiation may not be random enough, and the negotiation process can be known by attackers. A key derivation function is needed to obtain a more secure key from the initial key material (the key calculated by PSK or DH key negotiation).
[0041] The hash key derivation function HKDF is the algorithm used in this embodiment. It uses the negotiated key material and the hash value of the handshake phase message as input to output a new key with stronger security. HKDF includes a two-stage process of extract_then_expand. The extract process increases the randomness of the key material.
[0042] Use the hash key derivation function to input the intermediate variable CHTS of the TLS protocol to obtain the random number tK C ; Use the hash key derivation function to input the intermediate variable SHTS of the TLS protocol to obtain the random number tK S .
[0043] In the TLS (Transport Layer Security) protocol, tK C It is part of the Client Hello message and represents a random number. During the TLS handshake process, the client sends a Client Hello message containing a random number called tK C Similarly, tK SIt is part of the Server Hello message.
[0044] Step 4: The server side calculates the signature information using the mask function. The client side receives the signature information and compares it with the original signature information. If the comparison is successful, data transmission is performed.
[0045] If the comparison is successful, it means that the TLS client and server have successfully negotiated the key. Then the client and server are notified to use the negotiated symmetric key for encryption negotiation.
[0046] Based on the above, the TLS protocol communication method based on the post-quantum key encapsulation algorithm provided in this embodiment has the following features: Beneficial effects: (1) The post-quantum key encapsulation mechanism based on the LAC algorithm is adopted to provide security protection against quantum computing attacks for communication. As a lattice-based cryptographic algorithm, the LAC algorithm is based on the difficult problems in the lattice and is believed to be able to resist known quantum algorithm attacks.
[0047] (2) This embodiment uses the CPA-secure key encapsulation mechanism, which has higher computational efficiency than the CCA-secure mechanism. Although CPA security is slightly less secure under certain attack models, it can still provide sufficient security in practical applications, especially within a carefully designed protocol framework. This choice reflects the trade-off between security and efficiency, significantly improving system performance while ensuring necessary security.
[0048] (3) The CPA secure key encapsulation mechanism is successfully adapted to the TLS protocol framework. As the most advanced secure transport layer protocol, TLS has a broad application base. By integrating the post-quantum key encapsulation mechanism into this mature framework, the present invention not only provides future-oriented security, but also maintains good compatibility with existing systems, facilitating large-scale deployment and application.
[0049] Embodiment 2: This embodiment provides a communication method based on a post-quantum key encapsulation algorithm. This embodiment is brought into a specific application scenario to describe how to implement the communication method based on the post-quantum key encapsulation algorithm in Embodiment 1.
[0050] Post-quantum cryptography is an emerging branch of cryptography in response to the threat of quantum computing. Its core goal is to design and implement cryptographic algorithms that can resist attacks from quantum computers while maintaining high efficiency on classical computers. The main research directions of post-quantum cryptography include lattice-based cryptosystems, encoding-based cryptosystems, multivariate public key cryptosystems, hash-based signature schemes, and supersingular elliptic curve isomorphism cryptosystems. Among them, lattice-based cryptosystems have received special attention due to their strong security proofs and relatively high efficiency. The security of these systems is usually based on difficult problems in lattices, such as the shortest vector problem (SVP) and the closest vector problem (CVP), which are considered difficult to solve effectively even for quantum computers.
[0051] Key encapsulation is an important concept in public key cryptography, which provides a method to securely transmit symmetric keys. Key encapsulation is often used in hybrid cryptographic systems, combining the flexibility of public key cryptography and the efficiency of symmetric cryptography. The security of key encapsulation is usually divided into two categories: chosen plaintext attack (CPA) security and chosen ciphertext attack (CCA) security. Although CPA-secure key encapsulation is less secure under certain attack models, it is usually more efficient, which makes it advantageous in certain application scenarios.
[0052] This embodiment adopts a post-quantum key encapsulation algorithm based on CPA security. Specifically, the post-quantum key encapsulation algorithm using CPA security consists of three main algorithms: a key generation function, a key encapsulation function, and a key decapsulation function. The key generation function is responsible for generating a public key and a private key pair; the key encapsulation function uses the public key to generate a random session key and the corresponding ciphertext; the key decapsulation function uses the private key to recover the session key from the ciphertext.
[0053] At the same time, this embodiment also integrates the quantum public key encryption algorithm into the post-quantum key encapsulation algorithm based on CPA security, and finally adapts it to the TLS protocol framework to further improve information security.
[0054] Specifically include: 1. Post-quantum public key encryption algorithm LAC.
[0055] The calculation process is as follows: 1. Key generation function Gen() process.
[0056] (1) Sampling seeds a : seed a ←Sample(); The Sample() function is used to randomly extract elements from the specified sequence and return a new list as the result.
[0057] (2) Generate ring element a: a∈R q ←Expand(seed a );R q Represents a ring, using the Expand() function to expand the random number seed a Expand it into a sufficiently long pseudo-random byte stream, and then sample it to get the ring element a.
[0058] (3) Sampling private key element s and noise e: B means that sampling using the Sample() function follows the central binomial distribution.
[0059] (4) Calculate the public key element b: b←as+e.
[0060] (5) Output the public and private key pair pk and sk: pk=(seed a , b), sk=(S).
[0061] 2. Encryption function Enc() process.
[0062] (1) Input: Secret message m, public key pk = (seed a , b).
[0063] (2) Generate ring element a: a∈R q ←Expand(seed a ).
[0064] (3) Encode the secret message m to obtain The ECCEnc function is used for error detection and correction coding and represents the codeword that converts the secret message m into an error correction code.
[0065] (4) Sampling random number r and noise e1: r,e1∈R q ←Sample B (); Random number r and noise e1 are both sampling ring R q The elements on.
[0066] (5) Sampling noise e2: e2∈R q ←Sample B '().
[0067] (6) Calculate the ciphertext element c1: c1=ar+e1.
[0068] (7) Calculate the ciphertext element c2: q represents the modulus, and its typical value is 256.
[0069] (8) Output ciphertext ct: ct=(c1,c2)
[0070] 3. Decryption function Dec() process.
[0071] (1) Input: Ciphertext ct = (c1, c2), private key sk = (s).
[0072] (2) Calculate polynomial
[0073] (3) Calculate polynomial The ROUND function rounds a number to a given number of digits.
[0074] (4) Output the decryption result m:
[0075] The introduction of ECCDec() ensures the second and third steps of the algorithm During recovery, even if there are a few errors, m can still be correctly recovered through the error correction in step 4, thus improving the decryption success rate.
[0076] 2. CPA-secure post-quantum key encapsulation algorithm.
[0077] Based on the post-quantum public key encryption algorithm in the first step, a CPA-secure post-quantum key encapsulation algorithm is designed. Post-quantum migration refers to the process of upgrading existing cryptographic systems and security protocols to be resistant to quantum computer attacks. This is a complex and long-term task involving work at multiple levels. First, a comprehensive vulnerability assessment of the existing system is required to identify components that may be threatened by quantum computing. Second, appropriate post-quantum algorithms need to be selected to replace these vulnerable components. This process needs to consider the algorithm's security, efficiency, and compatibility with existing systems.
[0078] Assuming H is a hash function, the optimization design process of the CPA-secure post-quantum key encapsulation algorithm is as follows: 1. Key generation function KEMGen() process.
[0079] (1) Generate a public-private key pair (pk, sk)←Gen(); this process is consistent with the key generation function Gen() process in the post-quantum public key encryption algorithm LAC.
[0080] (2) Output result: (pk, sk).
[0081] 2. Key encapsulation function KEMEncaps() process.
[0082] (1) From the message space Generate a random message m: This is a random selection, just choose the message you need to encrypt.
[0083] (2) Encrypt the message to obtain the ciphertext c: c←Enc(pk, m); This process is consistent with the encryption function Enc() process in the post-quantum public key encryption algorithm LAC.
[0084] (3) Calculate the shared key K: K: = m; the value of the shared key is the generated random message m.
[0085] (4) Output packaging result: (K, c).
[0086] 3. Key decapsulation function KEMDecaps() process.
[0087] (1) Calculate the decryption result m′: m′:=Dec(sk, c); This process is consistent with the decryption function Dec() process in the post-quantum public key encryption algorithm LAC.
[0088] (2) If m′ is a null value, the output is null, otherwise the output is: K:=m′, and the shared key is the decryption result of the random message.
[0089] Compared with the existing IND-CCA security scheme, the above method has less computational complexity and higher computational performance in practical applications.
[0090] TLS (Transport Layer Security) 1.3 protocol is a TLS encryption protocol designed to provide faster access speed and stronger security. Compared with previous versions, TLS1.3 introduces a new key negotiation mechanism PSK, supports 0-RTT data transmission, eliminates insecure encryption components and hash algorithms, reduces the round-trip time of handshake, and improves the security of TLS protocol communication.
[0091] This embodiment adapts the CPA-secure post-quantum key encapsulation algorithm to TLS1.3. The designed post-quantum TLS protocol communication protocol two-end communication process is as follows: Both parties in communication: (1) User side; (2) Server side: static public-private key pair (pk S ,sk S ).
[0092] Communication process such as Figure 2 As shown: (1) Client → Server: The key is generated using the key generation function in the post-quantum key encapsulation algorithm, and the handshake messages Client Hello and Client Key Share are sent from the client to the server, denoted as CH. The calculation method is to enter the constant in the hash key derivation function to obtain dES←HKDF(constant).
[0093] Among them, dES is an intermediate variable and HKDF is a hash key derivation function.
[0094] (2) Server → User: The generated key is encapsulated using the key encapsulation function in the post-quantum key encapsulation algorithm, and the handshake messages Server Hello and Server Key Share, denoted as SH, are sent from the server to the client.
[0095] (3) User side → Server side: The user side uses the key decapsulation function in the post-quantum key encapsulation algorithm to calculate the decapsulation result.
[0096] (4) User side: calculate four intermediate results.
[0097] HS←HKDF.Ext(dES,K) CHTS←HKDF.Ext4(HS,T2) CHTS←HKDF.Ext5(HS,T2) dHS←HKDF.Ext0(HS,T0) Among them, T i Represents the hash result of the i-th message; HKDF.Ext, HKDF.Ext4, HKDF.Ext5, and HKDF.Ext0 are functions inherent in the TLS protocol, and the generated HS, CTHS, and dHS are all intermediate variables.
[0098] (5) Server and user: accept tK C ←HKDF.TK(CHTS).
[0099] (6) Server and user: accept tK S ←HKDF.TK(SHTS).
[0100] tKC and tK S They are all random numbers used in the key generation process. They are intermediate variables required for negotiating keys in TLS, including user-side random numbers and server-side random numbers.
[0101] (7) Server → User: Use the mask function MAC to calculate {SF}←MAC(fk S , T7).
[0102] The mask function MAC (Message Authentication Code) is a hash function with a secret key, which is used to verify the integrity and authenticity of the information. SF represents the original signature information, which is used for identity authentication, and {SF} is the signature information calculated by the server.
[0103] (8) User side: If MAC(fk S , T7) is not equal to SF, then exit; if MAC(fk S , T7) is equal to SF, it means that the TLS two-end key negotiation is successful and data transmission can be carried out.
[0104] The CPA secure key encapsulation mechanism is adapted to the TLS1.3 protocol framework for communication. As the most advanced secure transport layer protocol, TLS1.3 has a wide range of applications. By integrating the post-quantum key encapsulation mechanism into this mature framework, the present invention not only provides future-oriented security, but also maintains good compatibility with existing systems, facilitating large-scale deployment and application.
[0105] The above-described embodiment is only a preferred solution of the present invention and does not limit the present invention in any form. There are other variations and modifications without exceeding the technical solution described in the claims.
Claims
1. A communication method based on a post-quantum key encapsulation algorithm, characterized in that: include: S1: Generate a public-private key pair and send a handshake message from the user to the server; S2: Generate a random message from the message space, use the CPA secure post-quantum key encapsulation algorithm to encapsulate the random message and public key, and send a handshake message from the server to the user; S3: decrypt the private key and ciphertext and calculate the intermediate variables of the TLS protocol. The user end and the server end receive the intermediate variables required for negotiating the key in the TLS protocol. S4: The server side calculates the signature information using a mask function, and the user side receives the signature information and compares it with the original signature information. If the comparison is successful, data transmission is performed.
2. A communication method based on a post-quantum key encapsulation algorithm according to claim 1, characterized in that: The step S2 includes: generating a random message from the message space, encrypting the random message and the public key using a post-quantum public key encryption algorithm to obtain a ciphertext; calculating a shared key based on the ciphertext, and outputting an encapsulation result.
3. A communication method based on a post-quantum key encapsulation algorithm according to claim 1 or 2, characterized in that: The step S4 includes: the user end performs identity authentication after receiving the signature information. If the signature information is the same as the original signature information, the TLS two-end key negotiation is successful, the session key is calculated and the key is derived with the server end. If the signature information is not the same as the original signature, the user end rejects the signature information and terminates the key negotiation.
4. A communication method based on a post-quantum key encapsulation algorithm according to claim 2, characterized in that: In step S3, when the private key and the ciphertext are decrypted, if the decryption result is a null value, the output is null; otherwise, the decryption result is assigned to the shared key and then output.
5. A communication method based on a post-quantum key encapsulation algorithm according to claim 2 or 4, characterized in that: The calculation of the intermediate variables of the TLS protocol includes: using a hash key derivation function, inputting the intermediate variables and a shared key to obtain HS; using a hash key derivation function, inputting HS and a hash result of the i-th message to obtain the remaining intermediate variables.
6. A communication method based on a post-quantum key encapsulation algorithm according to claim 1, 2 or 4, characterized in that: The user end and the server end receive the intermediate variables required for negotiating the key in the TLS protocol, including: using a hash key derivation function, inputting the intermediate variables of the TLS protocol to obtain a random number tK C and random number tK S .
7. A communication method based on a post-quantum key encapsulation algorithm according to claim 1, 2 or 4, characterized in that: Constants are input into the hash key derivation function to obtain intermediate variables, thereby obtaining a handshake message from the user end to the server end.
8. A communication method based on a post-quantum key encapsulation algorithm according to claim 2 or 4, characterized in that: In step S2, the key encapsulation result includes a shared key and a ciphertext, and the shared key is a random message generated from a message space.
9. A communication method based on a post-quantum key encapsulation algorithm according to claim 1, 2 or 4, characterized in that: The CPA secure post-quantum key encapsulation algorithm includes a key generation function, a key encapsulation function and a key decapsulation function. The key generation function uses a post-quantum public key encryption algorithm to generate a public-private key pair, and the key decapsulation function uses a post-quantum public key encryption algorithm to decrypt the encapsulation result generated by the key encapsulation function.
10. A communication method based on a post-quantum key encapsulation algorithm according to claim 1, 2 or 4, characterized in that: In step S1, generating a public-private key pair includes: obtaining a random number, expanding the random number into a sufficiently long pseudo-random byte stream to obtain a sampling ring; sampling the sampling ring to obtain a ring element; randomly sampling from a central binomial distribution to obtain a private key and noise; calculating the product of the ring element and the private key and adding the noise to obtain a public key element, and using the public key element to generate a public key.
Citation Information
Cited By
A post-quantum key negotiation system and method based on IKE protocol
CN119788442A
Data processing unit (DPU)
CN120567412A