Quantum-attack-resistant national secret IPSec communication system and quantum-attack-resistant national secret IPSec communication method

By introducing quantum-resistant IPSec device agents into the existing Guomi IPSec system, the mixed use of traditional cryptographic technology and quantum-resistant cryptographic technology is solved, and the problem of the difficulty of transforming existing Guomi IPSec devices in the face of quantum computer attacks is improved, and the system's anti-quantum attack capability and security are improved.

CN119652508APending Publication Date: 2025-03-18SHENZHEN DONJIN COMM TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411800599.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

When the existing Guomi IPSec equipment faces quantum computer attacks, the cost and risk of quantum cryptographic algorithm transformation is high, making it difficult to quickly achieve transformation, resulting in the lack of mature and widely used quantum cryptographic algorithm solutions.

Method used

The existing national secret IPSec system has introduced a quantum-resistant IPSec device agent. Through this agent, the messages of traditional IPSec devices are transformed with quantum cryptography algorithms, and the messages of mixed IPSec devices are inversely transformed, thereby realizing the mixed use of traditional cryptography technology and quantum cryptography technology.

Benefits of technology

This solution effectively integrates quantum cryptographic algorithms without completely replacing the existing national secret IPSec equipment, improving the system's quantum attack resistance, short transformation cycle and low transformation cost, ensuring the security and compatibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652508A_ABST
    Figure CN119652508A_ABST
Patent Text Reader

Abstract

The invention discloses an anti-quantum-attack national secret IPSec communication system and method, and belongs to the technical field of information security. The national secret IPSec communication system capable of resisting the quantum attack in the scheme comprises a traditional IPSec device, an anti-quantum IPSec device agent and a mixed IPSec device. Traditional IPSec equipment does not support an anti-quantum cryptography algorithm, and hybrid IPSec equipment has a traditional cryptography technology and an anti-quantum cryptography technology at the same time. And the anti-quantum IPSec equipment proxy performs anti-quantum cryptography algorithm transformation on a message sent by the traditional IPSec equipment and then sends the message to the mixed IPSec equipment, and performs anti-quantum cryptography algorithm inverse transformation on a message sent by the mixed IPSec equipment and then sends the message to the traditional IPSec equipment. According to the scheme, the quantum attack resistance of the system is improved in a manner of incrementally deploying the anti-quantum IPSec equipment agent on the IPSec equipment, the transformation period is short, and the transformation cost is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to a quantum attack-resistant IPSec communication system and method. Background Art

[0002] With the rapid development of quantum computing technology, traditional public key cryptography systems, such as RSA, Diffie-Hellman and elliptic curve cryptography, face huge security threats. These traditional cryptography systems are expected to become vulnerable to the powerful computing power of quantum computers. The existing national secret IPSec communication technology uses the national secret SM2 algorithm based on elliptic curve cryptography to achieve identity authentication and key exchange. However, in the face of attacks by quantum computers, these algorithms will no longer have sufficient security.

[0003] Quantum-resistant cryptography is a new generation of cryptographic algorithms that can resist attacks from quantum computers, including lattice-based, coding-based, multivariate polynomial-based and other technologies. At present, although relevant studies have proposed adding quantum-resistant algorithms to national secret IPSec devices to resist attacks from quantum computers, the cost and risk of transforming existing traditional national secret IPSec devices into quantum-resistant cryptographic algorithms are high for various reasons, and it is difficult to quickly achieve this transformation in the short term. Therefore, there is currently a lack of mature and widely used quantum-resistant cryptographic algorithm solutions.

[0004] In this context, it is necessary to propose a new technical solution that can effectively integrate quantum-resistant cryptographic algorithms without completely replacing existing national IPSec equipment, ensure the security and compatibility of the system, and achieve a smooth transition and upgrade. Summary of the invention

[0005] The technical problem to be solved by the present invention is: in view of the above-mentioned defects of the prior art, a national secret IPSec communication system and method that is resistant to quantum attacks is provided, and a quantum-resistant cryptographic algorithm is added to the existing national secret IPSec communication system to realize a secure communication system and method that combines traditional cryptographic algorithms and quantum-resistant cryptographic algorithms.

[0006] To achieve the above-mentioned purpose, in a first aspect, the present invention provides a quantum-resistant national secret IPSec communication system, the system comprising a traditional IPSec device, a quantum-resistant IPSec device agent, and a hybrid IPSec device;

[0007] The traditional IPSec device is a national secret IPSec device that does not support quantum-resistant cryptographic algorithms;

[0008] The hybrid IPSec device has both traditional national secret cryptography and quantum-resistant cryptography technology;

[0009] The quantum-resistant IPSec device proxy and the traditional IPSec device are deployed on the same device or on different devices in the same local area network;

[0010] The traditional IPSec device communicates with the hybrid IPSec device through the quantum-resistant IPSec device proxy; the quantum-resistant IPSec device proxy transforms the message sent by the traditional IPSec device with the quantum-resistant cryptographic algorithm before sending it to the hybrid IPSec device, and inversely transforms the message sent by the hybrid IPSec device with the quantum-resistant cryptographic algorithm before sending it to the traditional IPSec device;

[0011] The traditional IPSec device, the quantum-resistant IPSec device agent, and the hybrid IPSec device interact with each other through messages to complete the first-phase main mode interaction process of the national secret IPSec that mixes the traditional cryptographic technology with the quantum-resistant cryptographic technology.

[0012] Preferably, the quantum-resistant IPSec device agent supports establishing connections with multiple traditional IPSec devices at the same time.

[0013] Preferably, the quantum-resistant IPSec device agent distinguishes multiple sessions established between multiple traditional IPSec devices and the hybrid IPSec device according to IP addresses, port numbers, sender cookies, and responder cookies.

[0014] In a second aspect, the present invention provides a quantum attack-resistant national secret IPSec communication method, the method is implemented based on the above-mentioned quantum attack-resistant national secret IPSec communication system, and the method comprises the following steps:

[0015] Step S1, the initiator's traditional IPSec device constructs an initiator's traditional security alliance SA message and sends it to the quantum-resistant IPSec device agent, wherein the initiator's traditional security alliance SA message includes a traditional asymmetric cryptographic algorithm;

[0016] Step S2, the quantum-resistant IPSec device agent modifies the traditional asymmetric cryptographic algorithm in the initiator's traditional security alliance SA message into a hybrid quantum-resistant cryptographic algorithm, and then sends the modified initiator's traditional security alliance SA message to the hybrid IPSec device;

[0017] Step S3, the responder hybrid IPSec device matches the hybrid anti-quantum suggestion payload, constructs the responder security alliance SA message, and sends the responder security alliance SA message and certificate to the anti-quantum IPSec device agent; the certificate includes a hybrid signature certificate and a hybrid encryption certificate, the hybrid signature certificate includes the responder's traditional signature algorithm public key and the responder's anti-quantum signature algorithm public key, and the hybrid encryption certificate includes the responder's traditional encryption algorithm public key and the responder's anti-quantum encryption algorithm public key;

[0018] Step S4, the quantum-resistant IPSec device agent replaces the asymmetric cryptographic algorithm in the responder's security alliance SA message with the traditional asymmetric cryptographic algorithm in the original initiator's traditional security alliance SA message; and then sends the modified responder's security alliance SA message and certificate message to the traditional IPSec device;

[0019] Step S5, the traditional IPSec device randomly generates a first symmetric key Ski and a first nonce data Ni, uses a traditional asymmetric encryption algorithm and a traditional encryption algorithm public key of the responder to encrypt the first symmetric key Ski to generate a first symmetric key ciphertext ESki; uses the first symmetric key Ski to symmetrically encrypt the first nonce data Ni to generate a first nonce data ciphertext ENi; uses the first symmetric key Ski to symmetrically encrypt the initiator identity IDi to generate an initiator identity ciphertext EIDi; constructs a first traditional key exchange parameter XCHi=ESki||ENi||EIDi||CERT_sig_i||CERT_enc_ i, where CERT_sig_i is the initiator's signature certificate, and CERT_enc_i is the initiator's encryption certificate; use the initiator's traditional signature algorithm private key to perform a traditional asymmetric cryptographic algorithm signature on the first traditional signature data Ski|Ni|IDi|CERT_enc_i to generate a first traditional signature value SIGi; construct a first symmetric key ciphertext ESki payload, a first Nonce data ciphertext ENi payload, an initiator's identity ciphertext EIDi payload, an initiator's signature certificate CERT_sig_i payload, an initiator's encryption certificate CERT_enc_i payload, and a first traditional signature value SIGi payload and send them to the quantum-resistant IPSec device agent;

[0020] Step S6, the quantum-resistant IPSec device agent performs quantum-resistant algorithm secondary encryption protection on the first symmetric key ciphertext ESki to generate a first quantum-resistant key exchange parameter PQC_XCHi;

[0021] The quantum-resistant IPSec device agent uses the initiator's quantum-resistant signature algorithm private key to perform a quantum-resistant algorithm secondary signature operation on the first quantum-resistant signature data ESki|ENi|EIDi|CERT_enc_i|SIGi to generate a first quantum-resistant algorithm signature value PQC_SIGi; the initiator's quantum-resistant signature algorithm private key is generated in advance by the quantum-resistant IPSec device agent in collaboration with the traditional IPSec device;

[0022] The quantum-resistant IPSec device agent modifies the first symmetric key ESki payload to the first quantum-resistant key exchange parameter PQC_XCHi payload, adds the first quantum-resistant algorithm signature value PQC_SIGi payload, and leaves other payloads unchanged, and sends it to the hybrid IPSec device;

[0023] Step S7, the hybrid IPSec device calls the quantum-resistant algorithm to decrypt the first quantum-resistant key exchange parameter PQC_XCHi to obtain the first symmetric key ciphertext ESki;

[0024] The hybrid IPSec device uses a traditional asymmetric decryption algorithm and a traditional encryption algorithm private key of the responder to decrypt the first symmetric key Ski; uses the first symmetric key Ski to decrypt the first nonce data Ni and the initiator identity IDi;

[0025] Step S8, the hybrid IPSec device randomly generates a second symmetric key Skr and a second nonce data Nr; uses a traditional asymmetric encryption algorithm and the initiator's traditional encryption algorithm public key to encrypt the second symmetric key Skr to generate a second symmetric key ciphertext ESkr; uses the second symmetric key Skr to symmetrically encrypt the second nonce data Nr to generate a second nonce data ciphertext ENr; uses the second symmetric key Skr to symmetrically encrypt the responder identity IDr to generate a responder identity ciphertext EIDr; constructs a second traditional key exchange parameter XCHr=ESkr||ENr||EIDr||CERT_sig_r||CERT_enc_r, where CERT_sig_r is the responder signature certificate and CERT_enc_r is the responder encryption certificate; uses the responder's traditional signature algorithm private key to sign the second traditional signature data Skr|Nr|IDr|CERT_enc_r using a traditional asymmetric cryptographic algorithm to generate a second traditional signature value SIGr;

[0026] The hybrid IPSec device encrypts the second traditional key exchange parameter XCHr using the initiator's quantum-resistant encryption algorithm public key to generate a hybrid key exchange parameter MixXCHr;

[0027] The hybrid IPSec device uses the responder's quantum-resistant algorithm signature private key to perform a quantum-resistant algorithm signature operation on the second quantum-resistant signature data ESkr|ENr|EIDr|CERT_enc_r|SIGr, generates a second quantum-resistant algorithm signature value PQC_SIGr, and constructs a hybrid signature MixSIGr=SIGr|PQC_SIGr;

[0028] The hybrid IPSec device sends the hybrid key exchange parameter MixXCHr and the hybrid signature MixSIGr to the quantum-resistant IPSec device agent;

[0029] Step S9, the quantum-resistant IPSec device proxy parses the mixed key exchange parameter MixXCHr and decrypts it using the initiator's quantum-resistant encryption private key, and outputs a second traditional key exchange parameter XCHr;

[0030] The quantum-resistant IPSec device agent parses the mixed signature MixSIGr to output the second traditional signature value SIGr and the second quantum-resistant algorithm signature value PQC_SIGr;

[0031] The quantum-resistant IPSec device agent sends the second traditional key exchange parameter XCHr and the second traditional signature value SIGr to the traditional IPSec device;

[0032] Step S10, the traditional IPSec device uses the initiator's traditional encryption algorithm private key to decrypt the second symmetric key Skr; uses the second symmetric key Skr to decrypt the second nonce data Nr and the responder's identity IDr; uses the responder's traditional signature algorithm public key to perform a signature verification operation on the second traditional signature data Skr|Nr|IDr|CERT_enc_r and the signature value SIGr. If the signature verification is successful, execute the subsequent process, otherwise, exit the exchange process;

[0033] Step S11, the traditional IPSec device and the hybrid IPSec device calculate the working key according to the national secret IPSec protocol, perform subsequent message interaction, and complete the first stage main mode interaction process.

[0034] Preferably, in step S6, the specific method of generating the first quantum-resistant key exchange parameter PQC_XCHi is:

[0035] If the negotiated quantum-resistant algorithm is a public key encryption algorithm, the first quantum-resistant key exchange parameter PQC_XCHi=PQC_Encrypt(ESki,pqc_pub_enc_r), where PQC_Encrypt is the quantum-resistant algorithm encryption operation, and pqc_pub_enc_r is the responder's quantum-resistant encryption algorithm public key; if the negotiated quantum-resistant algorithm is a key encapsulation algorithm, the quantum-resistant key encapsulation algorithm is called, the first shared key plaintext SSi and the first shared key ciphertext ESSi are output, and the quantum-resistant first symmetric key ciphertext PQC_ESki=Symmetric_Encrypt(ESki,SSi) is calculated, then the first quantum-resistant key exchange parameter PQC_XCHi=ESSi|PQC_ESki.

[0036] Preferably, in step S7, the hybrid IPSec device calls the quantum-resistant algorithm to decrypt the first quantum-resistant key exchange parameter PQC_XCHi, and the specific method for obtaining the first symmetric key ciphertext ESki is:

[0037] If the negotiated quantum-resistant algorithm is a public key encryption algorithm, the first symmetric key ciphertext ESki=PQC_Decrypt(PQC_XCHi, pqc_pri_enc_r), where PQC_Decrypt is the quantum-resistant algorithm decryption operation; if the negotiated quantum-resistant algorithm is a key encapsulation algorithm, the first quantum-resistant key exchange parameter PQC_XCHi is parsed into the first shared key ciphertext ESSi and the quantum-resistant first symmetric key ciphertext PQC_ESki, and the first shared key plaintext SSi is calculated, SSi=PQC_Decaps(ESSi, pqc_pri_enc_r), where PQC_Decaps is the quantum-resistant key decapsulation algorithm; the symmetric decryption algorithm is called to calculate the first symmetric key ciphertext ESki=Symetric_Decrypt(PQC_ESki, SSi); where pqc_pri_enc_r is the quantum-resistant encryption algorithm private key of the responding party.

[0038] Preferably, in the step S7, after obtaining the first symmetric key ciphertext ESki, the step further includes:

[0039] The hybrid IPSec device uses the initiator's anti-quantum signature algorithm public key to perform anti-quantum signature verification on the first anti-quantum signature data ESki|ENi|EIDi|CERT_enc_i|SIGi and the first anti-quantum algorithm signature value PQC_SIGi. If the verification is successful, perform subsequent operations, otherwise, exit the exchange process;

[0040] After decrypting the first nonce data Ni and the initiator identity IDi using the first symmetric key Ski, the method further includes:

[0041] Use the initiator's traditional signature public key to perform a signature verification operation on the first traditional signature data Ski|Ni|IDi|CERT_enc_i and the first traditional signature value SIGi. If the signature verification is successful, perform subsequent operations; otherwise, exit the exchange process.

[0042] Preferably, in step S8, the hybrid IPSec device uses the initiator's quantum-resistant encryption algorithm public key to encrypt the second traditional key exchange parameter XCHr, and the specific method for generating the hybrid key exchange parameter MixXCHr is:

[0043] If the negotiated quantum-resistant algorithm is a public key encryption algorithm, the second quantum-resistant key exchange parameter PQC_XCHr=PQC_Encrypt(ESkr, pqc_pub_enc_i); if the negotiated quantum-resistant algorithm is a key encapsulation algorithm, the quantum-resistant key encapsulation algorithm is called to output the second shared key plaintext SSr and the second shared key ciphertext ESSr, and the quantum-resistant second symmetric key ciphertext PQC_ESkr=Symmetric_Encrypt(ESkr, SSr) is calculated, then the second quantum-resistant key exchange parameter PQC_XCHr=ESSr|PQC_ESkr; the mixed key exchange parameter MixXCHr=PQC_XCHr||ENr||EIDr||CERT_sig_r||CERT_enc_r is constructed; wherein pqc_pub_enc_i is the public key of the quantum-resistant encryption algorithm of the initiator.

[0044] Preferably, in step S9, the specific method of the quantum-resistant IPSec device proxy parsing the mixed key exchange parameter MixXCHr and decrypting it using the initiator's quantum-resistant encryption private key to output the second traditional key exchange parameter XCHr is:

[0045] If the negotiated quantum-resistant algorithm is a public key encryption algorithm, the second symmetric key ciphertext ESkr=PQC_Decrypt(PQC_XCHr, pqc_pri_enc_i) is calculated; if the negotiated quantum-resistant algorithm is a key encapsulation algorithm, the quantum-resistant key decapsulation algorithm is called to calculate the second shared key plaintext SSr=PQC_Decaps(ESSr, pqc_pri_enc_i), and calculate the second symmetric key ciphertext ESkr=Symmetric_Decrypt(PQC_ESkr, SSr); reconstruct XCHr=ESkr||ENr||EIDr||CERT_sig_r||CERT_enc_r.

[0046] Preferably, in step S9, after the quantum-resistant IPSec device proxy parses the mixed signature MixSIGr to output the second traditional signature value SIGr and the second quantum-resistant algorithm signature value PQC_SIGr, the method further includes:

[0047] The quantum-resistant IPSec device agent uses the responder's quantum-resistant signature algorithm public key to verify the second quantum-resistant signature data ESkr|ENr|EIDr|CERT_enc_r|SIGr and the second quantum-resistant algorithm signature value PQC_SIGr. If the verification is successful, subsequent operations are performed; otherwise, the exchange process is exited.

[0048] The present invention has the following beneficial effects: the quantum attack-resistant national secret IPSec communication system provided by the scheme includes a traditional IPSec device, a quantum-resistant IPSec device agent, and a hybrid IPSec device. The traditional IPSec device is a national secret IPSec device that does not support quantum-resistant cryptographic algorithms, and the hybrid IPSec device has both traditional cryptographic technology and quantum-resistant cryptographic technology. The traditional IPSec device communicates with the hybrid IPSec device through the quantum-resistant IPSec device agent. The quantum-resistant IPSec device agent transforms the message sent by the traditional IPSec device with the quantum-resistant cryptographic algorithm before sending it to the hybrid IPSec device, and inversely transforms the message sent by the hybrid IPSec device with the quantum-resistant cryptographic algorithm before sending it to the traditional IPSec device. The traditional IPSec device, the quantum-resistant IPSec device agent, and the hybrid IPSec device interact with each other to complete the first-stage main mode interaction process of the national secret IPSec with the hybrid traditional cryptographic technology and quantum-resistant cryptographic technology. The scheme improves the system's ability to resist quantum attacks by incrementally deploying quantum-resistant IPSec device agents on IPSec devices, has no impact on existing IPSec devices or systems, has a short transformation cycle, and has low transformation costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0050] Figure 1 A block diagram of a quantum attack-resistant national IPSec communication system provided for one embodiment of the present invention.

[0051] Figure 2 A block diagram of a quantum attack-resistant national IPSec communication system provided in accordance with another embodiment of the present invention.

[0052] Figure 3An interactive diagram of a quantum attack-resistant national secret IPSec communication method provided in an embodiment of the present invention.

[0053] Figure 4 An interactive flow chart of the quantum attack-resistant national secret IPSec communication method provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] The general idea of ​​the present invention is: for traditional IPSec devices that cannot be upgraded to anti-quantum cryptographic algorithms for various reasons, the purpose of supporting IPSec devices with anti-quantum cryptographic algorithm technology is indirectly achieved by incrementally deploying anti-quantum IPSec device agents with anti-quantum cryptographic algorithm technology. Traditional IPSec devices are combined with anti-quantum IPSec device agents to form virtual IPSec devices that support anti-quantum cryptographic algorithms, which has no impact on existing IPSec devices or systems and has low transformation costs.

[0056] The first phase of the main mode exchange process of the traditional national secret IPSec device includes the key exchange and identity authentication process, both of which are completed using the traditional cryptographic algorithm SM2. The present invention introduces a quantum-resistant cryptographic algorithm on the basis of retaining the original SM2 algorithm, and together with the SM2 algorithm, it ensures the security of the key exchange and identity authentication process.

[0057] The embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings of the specification. It should be understood that the embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0058] like Figure 1 As shown, an embodiment of the present invention provides a national secret IPSec communication system that is resistant to quantum attacks, and the system includes a traditional IPSec device, a quantum-resistant IPSec device agent, and a hybrid IPSec device.

[0059] The traditional IPSec device is a national secret IPSec device that does not support quantum-resistant cryptographic algorithms.

[0060] The hybrid IPSec device has both traditional national secret cryptography and anti-quantum cryptography. In the embodiment of the present invention, "hybrid" means integrating traditional national secret cryptography with anti-quantum cryptography, so that the system has the ability to resist quantum attacks while maintaining the security of the original national secret algorithm.

[0061] The quantum-resistant IPSec device proxy and the traditional IPSec device are deployed on the same device or on different devices in the same local area network. The traditional IPSec device establishes a connection with the quantum-resistant IPSec device proxy through the IP address and port number of the quantum-resistant IPSec device proxy.

[0062] The traditional IPSec device communicates with the hybrid IPSec device through the quantum-resistant IPSec device agent; the quantum-resistant IPSec device agent performs quantum-resistant cryptographic algorithm transformation on the message sent by the traditional IPSec device before sending it to the hybrid IPSec device, and performs quantum-resistant cryptographic algorithm inverse transformation on the message sent by the hybrid IPSec device before sending it to the traditional IPSec device. The quantum-resistant cryptographic algorithm transformation refers to performing quantum-resistant transformation on the message sent by the traditional IPSec device, converting the message sent by the traditional IPSec device into a corresponding message sent by an IPSec device with quantum-resistant cryptographic technology, and the transformation includes modifying the traditional asymmetric cryptographic algorithm in the initiator's traditional security alliance SA message into a hybrid quantum-resistant cryptographic algorithm, using the quantum-resistant cryptographic algorithm for secondary encryption or signing, etc. The quantum-resistant cryptographic algorithm inverse transformation refers to performing quantum-resistant inverse transformation on the message sent by the IPSec device, converting the message sent by the hybrid IPSec device into a message that can be processed by the traditional IPSec device, and the inverse transformation includes quantum-resistant decryption, etc.

[0063] The traditional IPSec device, the quantum-resistant IPSec device agent, and the hybrid IPSec device interact with each other through messages to complete the first-phase main mode interaction process of the national secret IPSec that mixes the traditional cryptographic technology with the quantum-resistant cryptographic technology.

[0064] In an embodiment of the present invention, the quantum-resistant IPSec device agent establishes a quantum-resistant hybrid connection with a hybrid IPSec device, and establishes a standard IPSec connection with a traditional IPSec device. During the interaction process of the first phase of the national secret IPSec main mode, the quantum-resistant IPSec device agent parses and modifies the messages from the traditional IPSec device and the hybrid IPSec device, removes the quantum-resistant part of the hybrid IPSec device message, and then forwards it to the traditional IPSec device; adds quantum-resistant support to the traditional IPSec device message, and then forwards it to the hybrid IPSec device. In the subsequent ciphertext transmission phase starting from the fifth message of the first phase main mode, the quantum-resistant IPSec device agent is only responsible for forwarding the message, while the encryption and decryption of the message are completed by the traditional IPSec device and the hybrid IPSec device. This method has the least impact on the existing national secret IPSec devices, making the quantum-resistant IPSec device agent more lightweight, with low transformation cost and short transformation cycle.

[0065] like Figure 2 As shown, in some embodiments of the present invention, the quantum-resistant IPSec device proxy supports establishing connections with multiple traditional IPSec devices at the same time. Further, the quantum-resistant IPSec device proxy distinguishes multiple sessions established between multiple traditional IPSec devices and the hybrid IPSec device based on IP addresses, port numbers, sender cookies, and responder cookies. Each session has its own state and parameters, and multiple sessions can exist at the same time.

[0066] like Figure 3-Figure 4 As shown, an embodiment of the present invention further provides a quantum attack-resistant national secret IPSec communication method, which is applied to the quantum attack-resistant national secret IPSec communication system as described above, and the method includes the following steps:

[0067] Step S1, the initiator's traditional IPSec device constructs an initiator's traditional security association SA message and sends it to the quantum-resistant IPSec device agent, wherein the initiator's traditional security association SA message includes a traditional asymmetric cryptographic algorithm.

[0068] In the embodiment of the present invention, the content of the initiator's traditional security alliance SA message in step S1 is exactly the same as that in the prior art during the first phase of the main mode of IPSec, except that the receiver of the initiator's traditional security alliance SA message is a quantum-resistant IPSec device proxy instead of a hybrid IPSec device. In addition to the traditional asymmetric cryptographic algorithm, the initiator's traditional security alliance SA message also includes the initiator's cookie, encryption algorithm, hash algorithm, authentication method, key period, and other contents.

[0069] The following is an example of the main fields in the traditional security alliance SA message structure of the initiator. Life-Type and Life-Duration indicate the key period, Encryption-Algorithm indicates the encryption algorithm, Hash-Algorithm indicates the hash algorithm, Authentication-Method indicates the authentication method, and Asymmetric-Cryptographic-Algorithm-Type indicates the symmetric cryptographic algorithm. This example only includes the national secret SM2 algorithm.

[0070] Life-Type:1

[0071] Life-Duration:00015180

[0072] Encryption-Algorithm:0081(SM4-CBC)

[0073] Hash-Algorithm:0014(SM3)

[0074] Authentication-Method:000a

[0075] Asymmetric-Cryptographic-Algorithm-Type:0002(SM2)

[0076] Step S2, the quantum-resistant IPSec device agent modifies the traditional asymmetric cryptographic algorithm in the initiator's traditional security association SA message into a hybrid quantum-resistant cryptographic algorithm, and then sends the modified initiator's traditional security association SA message to the hybrid IPSec device.

[0077] In the embodiment of the present invention, after receiving the initiator's traditional security alliance SA message, the quantum-resistant IPSec device agent replaces the traditional asymmetric cryptographic algorithm in the asymmetric cryptographic algorithm field with a hybrid quantum-resistant cryptographic algorithm, and then sends it to the hybrid IPSec device. The modified message structure of the initiator's traditional security alliance SA message example in step S1 is as follows, and the quantum-resistant IPSec device agent replaces the asymmetric encryption algorithm in the Asymmetric-Cryptographic-Algorithm-Type field from SM2 to SM2-MLDSA65-MLKEM768.

[0078] Life-Type:1

[0079] Life-Duration:00015180

[0080] Encryption-Algorithm:0081(SM4-CBC)

[0081] Hash-Algorithm:0014(SM3)

[0082] Authentication-Method:000a

[0083] Asymmetric-Cryptographic-Algorithm-Type:0101(SM2-MLDSA65-MLKEM768)

[0084] Step S3, the responder hybrid IPSec device matches the hybrid anti-quantum proposal payload, constructs the responder security alliance SA message, and sends the responder security alliance SA message and certificate to the anti-quantum IPSec device agent; the certificate includes a hybrid signature certificate and a hybrid encryption certificate, the hybrid signature certificate includes the responder's traditional signature algorithm public key and the responder's anti-quantum signature algorithm public key, and the hybrid encryption certificate includes the responder's traditional encryption algorithm public key and the responder's anti-quantum encryption algorithm public key.

[0085] The content of the responder security alliance SA message is the same as the first phase main mode of the prior art China Secret IPSec, including the responder cookie, encryption algorithm, hash algorithm, authentication method, and key period. The responder security alliance SA message example is as follows. In the following example, the responder selects the asymmetric cryptographic algorithm SM2-MLDSA65-MLKEM768 added by the quantum-resistant IPSec device agent.

[0086] Life-Type:1

[0087] Life-Duration:00015180

[0088] Encryption-Algorithm:0081(SM4-CBC)

[0089] Hash-Algorithm:0014(SM3)

[0090] Authentication-Method:000a

[0091] Key-Length:0080

[0092] Asymmetric-Cryptographic-Algorithm-Type:0101(SM2-MLDSA65-MLKEM768)

[0093] The certificate message sent by the hybrid IPSec device includes a hybrid signature certificate and a hybrid encryption certificate. The hybrid signature certificate includes the responder's traditional signature algorithm public key, the first traditional certificate signature, the responder's anti-quantum signature algorithm public key, and the first anti-quantum certificate signature. The hybrid encryption certificate includes the responder's traditional encryption algorithm public key, the second traditional certificate signature, the responder's anti-quantum encryption algorithm public key, and the second anti-quantum certificate signature. When the responder generates the responder's traditional signature algorithm public key and the responder's anti-quantum signature algorithm public key, it also generates the responder's traditional signature algorithm private key and the responder's anti-quantum signature algorithm private key corresponding to the two. When the responder generates the responder's traditional encryption algorithm public key and the responder's anti-quantum encryption algorithm public key, it also generates the responder's traditional encryption algorithm private key and the responder's anti-quantum encryption algorithm private key corresponding to the two. The first traditional certificate signature, the first anti-quantum certificate signature, the second traditional certificate signature, and the second anti-quantum certificate signature are used to verify the legitimacy of the certificate.

[0094] Step S4, the quantum-resistant IPSec device agent replaces the asymmetric encryption algorithm in the responder's security alliance SA message with the traditional asymmetric encryption algorithm in the original initiator's traditional security alliance SA message; and then sends the modified responder's security alliance SA message and certificate message to the traditional IPSec device.

[0095] In the embodiment of the present invention, the quantum-resistant IPSec device agent replaces the asymmetric cryptographic algorithm in the responder's security association SA message with the traditional asymmetric cryptographic algorithm in the original initiator's traditional security association SA message.

[0096] Corresponding to the message example in step S3, the message example in step S4 is as follows.

[0097] This is an example of a modified responder security association SA message, where Asymmetric-Cryptographic-Algorith m-Type is replaced with SM2.

[0098] Life-Type:1

[0099] Life-Duration:00015180

[0100] Encryption-Algorithm:0081(SM4-CBC)

[0101] Hash-Algorithm:0014(SM3)

[0102] Authentication-Method:000a

[0103] Asymmetric-Cryptographic-Algorithm-Type:0002(SM2)

[0104] Step S5, the traditional IPSec device randomly generates a first symmetric key Ski and a first nonce data Ni, and uses a traditional asymmetric encryption algorithm and a traditional encryption algorithm public key of the responder to encrypt the first symmetric key Ski to generate a first symmetric key ciphertext ESki, ESki = Asymmetric_Encrypt (Ski, pub_enc_r), where pub_enc_r is the traditional encryption algorithm public key of the responder; uses the first symmetric key Ski to symmetrically encrypt the first nonce data Ni to generate a first nonce data ciphertext ENi, ENi = Symmetric_Encrypt (Ni, Ski); uses the first symmetric key Ski to symmetrically encrypt the initiator identity IDi to generate an initiator identity ciphertext EIDi; constructs a first traditional key exchange parameter XCHi = ESki||ENi||EIDi||CERT_sig_i||CERT_enc_i, CERT_sig_i is the initiator's signature certificate, CERT_enc_i is the initiator's encryption certificate, and "||" represents the payload connection; the initiator's traditional signature algorithm private key is used to perform a traditional asymmetric cryptographic algorithm signature on the first traditional signature data Ski|Ni|IDi|CERT_enc_i to generate the first traditional signature value SIGi, SIGi = Asymmetric_Sign (Ski|Ni|IDi|CERT_enc_i, pri_sig_i), where pri_sig_i is the initiator's traditional signature algorithm private key, and "|" represents the byte series connection; construct the first symmetric key ciphertext ESki payload, the first Nonce data ciphertext ENi payload, the initiator's identity ciphertext EIDi payload, the initiator's signature certificate CERT_sig_i payload, the initiator's encryption certificate CERT_enc_i payload, and the first traditional signature value SIGi payload and send them to the quantum-resistant IPSec device agent. The initiator's signature certificate includes the initiator's traditional signature algorithm public key, and the initiator's encryption certificate includes the initiator's traditional encryption algorithm public key.

[0105] The message examples of each payload sent by the traditional IPSec device are as follows, where Encrypted Symmetric Key represents the first symmetric key ciphertext ESki payload, Nonce represents the first Nonce data ciphertext ENi payload, Identifiction represents the initiator identity ciphertext EIDi payload, Certificate Encoding: 4 represents the initiator signature certificate CERT_sig_i payload, Certificate Encoding: 5 represents the initiator encryption certificate CERT_enc_i payload, and Signature represents the first traditional signature value SIGi payload.

[0106] Encrypted Symmetric Key:3079022016b9a85c81388dc8dd6e75966e5d47a0e013763d5f962b0031 5b9e5791c14c72022100ebb32a91b6657284c79679523d31fa5fef985e73da1 4a6d7ec87e1639be1bf7d04208301284aa7a67d4736d03c7846df479aef8d5 202ef880558793a8bdf3c7bc7540410771d53dcb5927d170d104f00876b81fd

[0107] Nonce:ea56d635ef2a0dc1c4b81ef7c78f08c49e927427e99bb6e9b65a2e6c2053525a

[0108] Identifiction:ea56d635ef2a0dc1c4b81ef7c78f08c49e927427e99bb6e9b65a2e6c2053525a

[0109] Certificate Encoding:4

[0110] Certificate Data:308201963082013ba003020102021100addde33a23532ad041aa39656d884203300c06082a8 11ccf5501837505003010310e300c06035504030c057765696465301e170d32343037323930......

[0111] Certificate Encoding:5

[0112] Certificate Data:308201963082013ba003020102021100addde33a23532ad041aa39656d884203300c06082a8 11ccf5501837505003010310e300c06035504030c057765696465301e170d3234303732393…

[0113] Signature:304602210085d8da7fd0c48c53aec295eacc39b65408be574a6eaf978ac53e86a7b b6a53f0022100a74ac03d161eebfdf78fdb46100df825dae3354c42bf80c3342a7a4481c67855

[0114] Step S6: The quantum-resistant IPSec device agent performs quantum-resistant algorithm secondary encryption protection on the first symmetric key ciphertext ESki to generate a first quantum-resistant key exchange parameter PQC_XCHi; if the negotiated quantum-resistant algorithm is a public key encryption algorithm, the first quantum-resistant key exchange parameter PQC_XCHi=PQC_Encrypt(ESki,pqc_pub_enc_r), where PQC_Encrypt is a quantum-resistant algorithm encryption operation, and pqc_pub_enc_r is the responder's quantum-resistant encryption algorithm public key; if the negotiated quantum-resistant algorithm is a key encapsulation algorithm, the quantum-resistant key encapsulation algorithm is called to output the first shared key plaintext SSi and the first shared key ciphertext ESSi, and the quantum-resistant first symmetric key ciphertext PQC_ESki=Symmetric_Encrypt(ESki,SSi) is calculated, and the first quantum-resistant key exchange parameter PQC_XCHi=ESSi|PQC_ESki. The negotiated quantum-resistant algorithm refers to the asymmetric cryptographic algorithm selected by the responder hybrid IPSec device in the responder security alliance SA message in step S3. For example, if the asymmetric cryptographic algorithm in the responder security alliance SA message is SM2-MLDSA65-MLKEM768, it means that the MLKEM768 algorithm is selected, which is a key encapsulation algorithm.

[0115] The anti-quantum IPSec device agent uses the initiator's anti-quantum signature algorithm private key to perform an anti-quantum algorithm secondary signature operation on the first anti-quantum signature data ESki|ENi|EIDi|CERT_enc_i|SIGi to generate a first anti-quantum algorithm signature value PQC_SIGi; PQC_SIGi=PQC_Sign(ESki|ENi|EIDi|CERT_enc_i|SIGi,pqc_pri_sig_i), where PQC_Sign is an anti-quantum algorithm signature operation, and pqc_pri_sig_i is the initiator's anti-quantum signature algorithm private key; the initiator's anti-quantum signature algorithm private key is generated in advance by the anti-quantum IPSec device agent in collaboration with the traditional IPSec device. When the system is initially installed, certificates are usually generated and installed for the sender and responder. The implicit requirement of the certificate here is that it is a hybrid certificate compatible with traditional devices. The quantum-resistant IPSec device agent generates the initiator's quantum-resistant signature algorithm private key, the initiator's quantum-resistant signature algorithm public key, the initiator's quantum-resistant encryption algorithm private key, and the initiator's quantum-resistant encryption algorithm public key based on the traditional key pair provided by the traditional IPsec device, and stores the above keys in the quantum-resistant IPSec device agent. Among them, the initiator's quantum-resistant signature algorithm public key and the initiator's quantum-resistant encryption algorithm public key can be added to the initiator's signature certificate CERT_sig_i payload and the initiator's encryption certificate CERT_enc_i payload by the quantum-resistant IPSec device in step S6 and sent to the hybrid IPSec device.

[0116] The quantum-resistant IPSec device agent modifies the first symmetric key ESki payload to the first quantum-resistant key exchange parameter PQC_XCHi payload, adds the first quantum-resistant algorithm signature value PQC_SIGi payload, leaves other payloads unchanged, and sends it to the hybrid IPSec device.

[0117] An example of a modified payload of the first symmetric key ciphertext ESki in step S5 is shown below.

[0118] Encrypted Symmetric Key:2e120cad579da2b154f5364d8134f06d19fc70b82d27b15b41a86cbadc79133c710813617ff4f734b6d006c148481094......

[0119] An example of a signature payload after adding the first quantum-resistant algorithm signature value PQC_SIGi payload to the message in step S5 is shown below, where PQC Signature represents the newly added first quantum-resistant algorithm signature value PQC_SIGi payload.

[0120] Signature:304602210085d8da7fd0c48c53aec295eacc39b65408be574a6eaf978ac53e86a7b b6a53f0022100a74ac03d161eebfdf78fdb46100df825dae3354c42bf80c3342a7a4481c67855

[0121] PQC Signature:e78b22b0b2ed7d01f03757e95ad04e24ca7c1368d59fa09507811162fc0f810346a195b0 05f5a91a1a114b4d265c6282c80c6ac4f902776793b6bed6a235a999ec179a928b9f8dee70464…

[0122] Step S7, the hybrid IPSec device calls the anti-quantum algorithm to decrypt the first anti-quantum key exchange parameter PQC_XCHi to obtain the first symmetric key ciphertext ESki; if the negotiated anti-quantum algorithm is a public key encryption algorithm, the first symmetric key ciphertext ESki=PQC_Decrypt(PQC_XCHi,pqc_pri_enc_r), where PQC_Decrypt is the anti-quantum algorithm decryption operation; if the negotiated anti-quantum algorithm is a key encapsulation algorithm, the first anti-quantum key exchange parameter PQC_XCHi is parsed into the first A shared key ciphertext ESSi and a quantum-resistant first symmetric key ciphertext PQC_ESki are used to calculate the first shared key plaintext SSi, SSi=PQC_Decaps(ESSi,pqc_pri_enc_r), where PQC_Decaps is the quantum-resistant key decapsulation algorithm; the symmetric decryption algorithm is called to calculate the first symmetric key ciphertext ESki, ESki=Symmetric_Decrypt(PQC_ESki,SSi); where pqc_pri_enc_r is the private key of the quantum-resistant encryption algorithm of the responder.

[0123] The hybrid IPSec device uses the initiator's anti-quantum signature algorithm public key to perform anti-quantum signature verification on the first anti-quantum signature data ESki|ENi|EIDi|CERT_enc_i|SIGi and the first anti-quantum algorithm signature value PQC_SIGi. If the verification is successful, perform subsequent operations, otherwise, exit the exchange process;

[0124] The hybrid IPSec device uses a traditional asymmetric decryption algorithm and a traditional encryption algorithm private key of the responder to decrypt the first symmetric key Ski, Ski = Asymmetric_Decrypt (ESki, pri_enc_r), pri_enc_r is the traditional encryption algorithm private key of the responder; uses the first symmetric key Ski to decrypt the first nonce data Ni and the initiator identity IDi;

[0125] Use the initiator's traditional signature public key to perform a signature verification operation on the first traditional signature data Ski|Ni|IDi|CERT_enc_i and the first traditional signature value SIGi. If the signature verification is successful, perform subsequent operations; otherwise, exit the exchange process.

[0126] Step S8, the hybrid IPSec device randomly generates a second symmetric key Skr and a second nonce data Nr; uses a traditional asymmetric encryption algorithm and the initiator's traditional encryption algorithm public key to encrypt the second symmetric key Skr to generate a second symmetric key ciphertext ESkr, ESKr = Asymmetric_Encrypt (Skr, pub_enc_i), where pub_enc_i is the initiator's traditional encryption algorithm public key; uses the second symmetric key Skr to symmetrically encrypt the second nonce data Nr to generate a second nonce data ciphertext ENr, ENr = Symmetric_Encrypt (Nr, Skr); uses the second symmetric key Skr to symmetrically encrypt the responder identity IDr to generate a responder identity ciphertext EIDr, EIDr =Symmetric_Encrypt(IDr, Skr); construct a second traditional key exchange parameter XCHr=ESkr||ENr||EIDr||CERT_sig_r||CERT_enc_r, where CERT_sig_r is the responder's signature certificate and CERT_enc_r is the responder's encryption certificate; use the responder's traditional signature algorithm private key to perform a traditional asymmetric cryptographic algorithm signature on the second traditional signature data Skr|Nr|IDr|CERT_enc_r to generate a second traditional signature value SIGr, SIGr=Asymmetric_Sign(Skr|Nr|IDr|CERT_enc_r,priv_sig_r), where priv_sig_r is the responder's traditional signature algorithm private key;

[0127] The hybrid IPSec device encrypts the second traditional key exchange parameter XCHr using the initiator's quantum-resistant encryption algorithm public key to generate a hybrid key exchange parameter MixXCHr; if the negotiated quantum-resistant algorithm is a public key encryption algorithm, the second quantum-resistant key exchange parameter PQC_XCHr=PQC_Encrypt(ESkr, pqc_pub_enc_i); if the negotiated quantum-resistant algorithm is a key encapsulation algorithm, the quantum-resistant key encapsulation algorithm is called to output the second shared key plaintext SSr and the second shared key ciphertext ESSr, and the quantum-resistant second symmetric key ciphertext PQC_ESkr=Symmetric_Encrypt(ESkr, SSr) is calculated, then the second quantum-resistant key exchange parameter PQC_XCHr=ESSr|PQC_ESkr; the hybrid key exchange parameter MixXCHr=PQC_XCHr||ENr||EIDr||CERT_sig_r||CERT_enc_r is constructed; wherein pqc_pub_enc_i is the initiator's quantum-resistant encryption algorithm public key.

[0128] The hybrid IPSec device uses the responder's quantum-resistant algorithm signature private key to perform a quantum-resistant algorithm signature operation on the second quantum-resistant signature data ESkr|ENr|EIDr|CERT_enc_r|SIGr to generate a second quantum-resistant algorithm signature value PQC_SIGr, PQC_SIGr=PQC_Sign(ESkr|ENr|EIDr|CERT_enc_r|SIGr, pqc_pri_sig_r), where PQC_Sign is a quantum-resistant algorithm signature operation, pqc_pri_sig_r is the responder's quantum-resistant signature algorithm private key, and a hybrid signature MixSIGr=SIGr|PQC_SIGr is constructed;

[0129] The hybrid IPSec device sends the hybrid key exchange parameter MixXCHr and the hybrid signature MixSIGr to the quantum-resistant IPSec device agent.

[0130] An example of a message payload sent by a hybrid IPSec device is as follows, where Encrypted Symmetric Key represents the second quantum-resistant key exchange parameter PQC_XCHr, Nonce represents the second nonce data ciphertext ENr, Identifiction represents the responder identity ciphertext EIDr, Signature represents the hybrid signature MixSIGr, and the ellipsis portion represents the second quantum-resistant algorithm signature value PQC_SIGr.

[0131] Encrypted Symmetric Key:03233a68c636e86e01945acc3ccfd056236bacfc1c65a76e66bc245d918de177c12fc448fcac2dbf2f8b27f14aecbd2184b9c8dbb6a44f3794e20ec58012858f88f2ce83ac64ded9f9b6b722......

[0132] Nonce:090681c8f8300cf5013c32c400bd56d24b95c16507643c84891311af3df731f7

[0133] Identifiction:85877a4cf1af1d11811b8bed9748dc7ccadf71fd252d8cbaf47aac06f69be11d5a51b38a744415f303c83031f192fa2acc168ce6c0caa56d7ce148f6462a5843b6a77c4 6898794a6e0e9198d4954d168a2206117412fbf7456828afe6abb607f991629f9985bc5263637135d

[0134] Signature:304402202c41cb7c83da67bdd7d4b59d7394cd7a72c87da54f8bc5ccd2521209f4e758a5022053ef26268a1df53dac4bbc56b701bd9ee0af39aa43c0e6ede8ece7caf11bdde6......

[0135] Step S9, the quantum-resistant IPSec device agent parses the mixed key exchange parameter MixXCHr and decrypts it using the initiator's quantum-resistant encryption private key, and outputs the second traditional key exchange parameter XCHr; if the negotiated quantum-resistant algorithm is a public key encryption algorithm, the second symmetric key ciphertext ESkr=PQC_Decrypt(PQC_XCHr, pqc_pri_enc_i) is calculated; if the negotiated quantum-resistant algorithm is a key encapsulation algorithm, the quantum-resistant key decapsulation algorithm is called to calculate the second shared key plaintext SSr=PQC_Decaps(ESSr, pqc_pri_enc_i), and the second symmetric key ciphertext ESkr=Symmetric_Decr ypt(PQC_ESkr, SSr); reconstruct XCHr=ESkr||ENr||EIDr||CERT_sig_r||CERT_enc_r.

[0136] The quantum-resistant IPSec device agent parses the mixed signature MixSIGr to output the second traditional signature value SIGr and the second quantum-resistant algorithm signature value PQC_SIGr.

[0137] The quantum-resistant IPSec device agent uses the responder's quantum-resistant signature algorithm public key to verify the second quantum-resistant signature data ESkr|ENr|EIDr|CERT_enc_r|SIGr and the second quantum-resistant algorithm signature value PQC_SIGr. If the verification is successful, subsequent operations are performed; otherwise, the exchange process is exited.

[0138] The quantum-resistant IPSec device agent sends the second traditional key exchange parameter XCHr and the second traditional signature value SIGr to the traditional IPSec device.

[0139] After the quantum-resistant IPSec device agent modifies the message in step S8, an example of a message sent to a traditional IPSec device is shown below, where Encrypted Symmetric Key represents the second symmetric key ciphertext ESkr, and Signature represents the second traditional signature value SIGr.

[0140] Encrypted Symmetric Key:3079022100f8a5fbb07af89401774c240b2d2f21e0c4b2b76117842661812092b32f3d274b02200a3faef4c21d99437cc46309a5d857860f493b83e61e19582563600c6ba3279c04204db99bf509f6a623b844a9007b2b749665102bc24e31ca82cfb376ca0a31bb0004104c0cd302c033ac2b387cbc8c1a0212e8

[0141] Nonce:090681c8f8300cf5013c32c400bd56d24b95c16507643c84891311af3df731f7

[0142] Identifiction:85877a4cf1af1d11811b8bed9748dc7ccadf71fd252d8cbaf47aac06f69be11d5a51b38a744415f303c83031f192fa2acc168ce6c0caa56d7ce148f6462a5843b6a77c4 6898794a6e0e9198d4954d168a2206117412fbf7456828afe6abb607f991629f9985bc5263637135d

[0143] Signature:304402202c41cb7c83da67bdd7d4b59d7394cd7a72c87da54f8bc5ccd2521209f4e758a5022053ef26268a1df53dac4bbc56b701bd9ee0af39aa43c0e6ede8ece7caf11bdde6

[0144] Step S10, the traditional IPSec device uses the initiator's traditional encryption algorithm private key to decrypt the second symmetric key Skr, Skr = Asymmetric_Decrypt (ESkr, pri_enc_i), pri_enc_i is the initiator's traditional encryption algorithm private key; uses the second symmetric key Skr to decrypt the second nonce data Nr and the responder's identity IDr, Nr = Symmetric_Decrypt (ENr, Skr), IDr = Symmetric_Decrypt (EIDr, Skr); uses the responder's traditional signature algorithm public key to perform a signature verification operation on the second traditional signature data Skr | Nr | IDr | CERT_enc_r and the signature value SIGr. If the signature verification is successful, execute the subsequent process, otherwise, exit the exchange process;

[0145] Step S11, the traditional IPSec device and the hybrid IPSec device calculate the working key according to the national secret IPSec protocol, perform subsequent message interaction, and complete the first phase main mode interaction process. The subsequent message interaction refers to message 5 and message 6 in the first phase main mode of the IPSec protocol, that is, Figure 3 The initiator authentication message and the responder authentication message in.

[0146] The calculation process of the working key is to first use the PRF function to calculate the basic key parameter SKEYID, and then use the PRF function to generate subsequent keys SKEYID_d, SKEYID_a, and SKEYID_e, where SKEYID_d is used to generate session keys, SKEYID_a is used to verify message integrity and data source identity, and SKEYID_e is used to protect message confidentiality.

[0147] The first nonce data Ni and the second nonce data Nr are respectively the initiator random number and the responder random number, which are used to ensure the randomness of the key parameter SKEYID, SKEYID=PRF(HASH(Ni|Nr),COOKIEi|COOKIEr).

[0148] It should be noted that when the existing national secret IPSec equipment is transformed into anti-quantum, it is necessary to evaluate the transformation cycle, transformation cost, and transformation risk of each IPSec device separately. IPSec devices that can be quickly upgraded after evaluation can directly communicate with the hybrid IPSec device in the solution of the present invention after the upgrade is completed. For IPSec devices that are temporarily inconvenient to upgrade or have a long upgrade cycle, it is necessary to communicate with the hybrid IPSec device through the anti-quantum IPSec device proxy to obtain anti-quantum capabilities.

[0149] The present invention has the following beneficial effects: the quantum attack-resistant national secret IPSec communication system provided by the present solution includes a traditional IPSec device, a quantum-resistant IPSec device agent, and a hybrid IPSec device. The traditional IPSec device is a national secret IPSec device that does not support quantum-resistant cryptographic algorithms, and the hybrid IPSec device has both traditional cryptographic technology and quantum-resistant cryptographic technology. The traditional IPSec device communicates with the hybrid IPSec device through the quantum-resistant IPSec device agent. The quantum-resistant IPSec device agent transforms the message sent by the traditional IPSec device with the quantum-resistant cryptographic algorithm before sending it to the hybrid IPSec device, and inversely transforms the message sent by the hybrid IPSec device with the quantum-resistant cryptographic algorithm before sending it to the traditional IPSec device. The traditional IPSec device, the quantum-resistant IPSec device agent, and the hybrid IPSec device interact with each other through messages, completing the first-stage main mode interaction process of the national secret IPSe with the hybrid traditional cryptographic technology and quantum-resistant cryptographic technology. The present solution improves the system's ability to resist quantum attacks by incrementally deploying quantum-resistant IPSec device agents on IPSec devices, has no impact on existing IPSec devices or systems, and has a short transformation cycle and low transformation costs.

[0150] The solution of the present invention effectively integrates quantum-resistant cryptographic algorithms, ensures the security and compatibility of existing national secret IPSec equipment / systems, and achieves smooth transition and upgrade. This not only helps protect existing investments, but also improves the overall security of the system to cope with future quantum computing threats.

[0151] The above are only specific implementations of the present invention, which cannot be used to limit the scope of the present invention. Equivalent changes made by ordinary technicians in this technical field based on this creation, as well as changes known to technicians in this field, should still fall within the scope of the present invention.

Claims

1. A quantum attack-resistant national secret IPSec communication system, characterized in that: The system includes traditional IPSec devices, quantum-resistant IPSec device agents, and hybrid IPSec devices; The traditional IPSec device is a national secret IPSec device that does not support quantum-resistant cryptographic algorithms; The hybrid IPSec device has both traditional national secret cryptography and quantum-resistant cryptography technology; The quantum-resistant IPSec device proxy and the traditional IPSec device are deployed on the same device or on different devices in the same local area network; The traditional IPSec device communicates with the hybrid IPSec device through the quantum-resistant IPSec device proxy; the quantum-resistant IPSec device proxy transforms the message sent by the traditional IPSec device with the quantum-resistant cryptographic algorithm before sending it to the hybrid IPSec device, and inversely transforms the message sent by the hybrid IPSec device with the quantum-resistant cryptographic algorithm before sending it to the traditional IPSec device; The traditional IPSec device, the quantum-resistant IPSec device agent, and the hybrid IPSec device interact with each other through messages to complete the first-phase main mode interaction process of the national secret IPSec that mixes the traditional cryptographic technology with the quantum-resistant cryptographic technology.

2. The quantum attack-resistant national secret IPSec communication system according to claim 1 is characterized in that: The quantum-resistant IPSec device proxy supports establishing connections with multiple traditional IPSec devices at the same time.

3. The quantum attack-resistant national secret IPSec communication system according to claim 2 is characterized in that: The quantum-resistant IPSec device agent distinguishes multiple sessions established between multiple traditional IPSec devices and the hybrid IPSec device according to IP addresses, port numbers, sender cookies, and responder cookies.

4. A quantum attack-resistant national secret IPSec communication method, characterized in that: Applied to the quantum attack-resistant national secret IPSec communication system as claimed in any one of claims 1 to 3, the method comprises the following steps: Step S1, the initiator's traditional IPSec device constructs an initiator's traditional security alliance SA message and sends it to the quantum-resistant IPSec device agent, wherein the initiator's traditional security alliance SA message includes a traditional asymmetric cryptographic algorithm; Step S2, the quantum-resistant IPSec device agent modifies the traditional asymmetric cryptographic algorithm in the initiator's traditional security alliance SA message into a hybrid quantum-resistant cryptographic algorithm, and then sends the modified initiator's traditional security alliance SA message to the hybrid IPSec device; Step S3, the responder hybrid IPSec device matches the hybrid anti-quantum suggestion payload, constructs the responder security alliance SA message, and sends the responder security alliance SA message and certificate to the anti-quantum IPSec device agent; the certificate includes a hybrid signature certificate and a hybrid encryption certificate, the hybrid signature certificate includes the responder's traditional signature algorithm public key and the responder's anti-quantum signature algorithm public key, and the hybrid encryption certificate includes the responder's traditional encryption algorithm public key and the responder's anti-quantum encryption algorithm public key; Step S4, the quantum-resistant IPSec device agent replaces the asymmetric cryptographic algorithm in the responder's security alliance SA message with the traditional asymmetric cryptographic algorithm in the original initiator's traditional security alliance SA message; and then sends the modified responder's security alliance SA message and certificate message to the traditional IPSec device; Step S5, the traditional IPSec device randomly generates a first symmetric key Ski and a first nonce data Ni, uses a traditional asymmetric encryption algorithm and a traditional encryption algorithm public key of the responder to encrypt the first symmetric key Ski to generate a first symmetric key ciphertext ESki; uses the first symmetric key Ski to symmetrically encrypt the first nonce data Ni to generate a first nonce data ciphertext ENi; uses the first symmetric key Ski to symmetrically encrypt the initiator identity IDi to generate an initiator identity ciphertext EIDi; constructs a first traditional key exchange parameter XCHi=ESki||ENi||EIDi||CERT_sig_i||CERT_enc_ i, where CERT_sig_i is the initiator's signature certificate, and CERT_enc_i is the initiator's encryption certificate; use the initiator's traditional signature algorithm private key to perform a traditional asymmetric cryptographic algorithm signature on the first traditional signature data Ski|Ni|IDi|CERT_enc_i to generate a first traditional signature value SIGi; construct a first symmetric key ciphertext ESki payload, a first Nonce data ciphertext ENi payload, an initiator's identity ciphertext EIDi payload, an initiator's signature certificate CERT_sig_i payload, an initiator's encryption certificate CERT_enc_i payload, and a first traditional signature value SIGi payload and send them to the quantum-resistant IPSec device agent; Step S6, the quantum-resistant IPSec device agent performs quantum-resistant algorithm secondary encryption protection on the first symmetric key ciphertext ESki to generate a first quantum-resistant key exchange parameter PQC_XCHi; The quantum-resistant IPSec device agent uses the initiator's quantum-resistant signature algorithm private key to perform a quantum-resistant algorithm secondary signature operation on the first quantum-resistant signature data ESki|ENi|EIDi|CERT_enc_i|SIGi to generate a first quantum-resistant algorithm signature value PQC_SIGi; the initiator's quantum-resistant signature algorithm private key is generated in advance by the quantum-resistant IPSec device agent in collaboration with the traditional IPSec device; The quantum-resistant IPSec device agent modifies the first symmetric key ESki payload to the first quantum-resistant key exchange parameter PQC_XCHi payload, adds the first quantum-resistant algorithm signature value PQC_SIGi payload, and leaves other payloads unchanged, and sends it to the hybrid IPSec device; Step S7, the hybrid IPSec device calls the quantum-resistant algorithm to decrypt the first quantum-resistant key exchange parameter PQC_XCHi to obtain the first symmetric key ciphertext ESki; The hybrid IPSec device uses a traditional asymmetric decryption algorithm and a traditional encryption algorithm private key of the responder to decrypt the first symmetric key Ski; uses the first symmetric key Ski to decrypt the first nonce data Ni and the initiator identity IDi; Step S8, the hybrid IPSec device randomly generates a second symmetric key Skr and a second nonce data Nr; uses a traditional asymmetric encryption algorithm and the initiator's traditional encryption algorithm public key to encrypt the second symmetric key Skr to generate a second symmetric key ciphertext ESkr; uses the second symmetric key Skr to symmetrically encrypt the second nonce data Nr to generate a second nonce data ciphertext ENr; uses the second symmetric key Skr to symmetrically encrypt the responder identity IDr to generate a responder identity ciphertext EIDr; constructs a second traditional key exchange parameter XCHr=ESkr||ENr||EIDr||CERT_sig_r||CERT_enc_r, where CERT_sig_r is the responder signature certificate and CERT_enc_r is the responder encryption certificate; uses the responder's traditional signature algorithm private key to sign the second traditional signature data Skr|Nr|IDr|CERT_enc_r using a traditional asymmetric cryptographic algorithm to generate a second traditional signature value SIGr; The hybrid IPSec device encrypts the second traditional key exchange parameter XCHr using the initiator's quantum-resistant encryption algorithm public key to generate a hybrid key exchange parameter MixXCHr; The hybrid IPSec device uses the responder's quantum-resistant algorithm signature private key to perform a quantum-resistant algorithm signature operation on the second quantum-resistant signature data ESkr|ENr|EIDr|CERT_enc_r|SIGr, generates a second quantum-resistant algorithm signature value PQC_SIGr, and constructs a hybrid signature MixSIGr=SIGr|PQC_SIGr; The hybrid IPSec device sends the hybrid key exchange parameter MixXCHr and the hybrid signature MixSIGr to the quantum-resistant IPSec device agent; Step S9, the quantum-resistant IPSec device proxy parses the mixed key exchange parameter MixXCHr and decrypts it using the initiator's quantum-resistant encryption private key, and outputs a second traditional key exchange parameter XCHr; The quantum-resistant IPSec device agent parses the mixed signature MixSIGr to output the second traditional signature value SIGr and the second quantum-resistant algorithm signature value PQC_SIGr; The quantum-resistant IPSec device agent sends the second traditional key exchange parameter XCHr and the second traditional signature value SIGr to the traditional IPSec device; Step S10, the traditional IPSec device uses the initiator's traditional encryption algorithm private key to decrypt the second symmetric key Skr; uses the second symmetric key Skr to decrypt the second nonce data Nr and the responder's identity IDr; uses the responder's traditional signature algorithm public key to perform a signature verification operation on the second traditional signature data Skr|Nr|IDr|CERT_enc_r and the signature value SIGr. If the signature verification is successful, execute the subsequent process, otherwise, exit the exchange process; Step S11, the traditional IPSec device and the hybrid IPSec device calculate the working key according to the national secret IPSec protocol, perform subsequent message interaction, and complete the first stage main mode interaction process.

5. The quantum attack-resistant national secret IPSec communication method according to claim 4 is characterized in that: In step S6, the specific method of generating the first quantum-resistant key exchange parameter PQC_XCHi is: If the negotiated quantum-resistant algorithm is a public key encryption algorithm, the first quantum-resistant key exchange parameter PQC_XCHi=PQC_Encrypt(ESki,pqc_pub_enc_r), where PQC_Encrypt is the quantum-resistant algorithm encryption operation, and pqc_pub_enc_r is the responder's quantum-resistant encryption algorithm public key; if the negotiated quantum-resistant algorithm is a key encapsulation algorithm, the quantum-resistant key encapsulation algorithm is called, the first shared key plaintext SSi and the first shared key ciphertext ESSi are output, and the quantum-resistant first symmetric key ciphertext PQC_ESki=Symmetric_Encrypt(ESki,SSi) is calculated, then the first quantum-resistant key exchange parameter PQC_XCHi=ESSi|PQC_ESki.

6. The quantum attack-resistant national secret IPSec communication method according to claim 4 is characterized in that: In step S7, the hybrid IPSec device calls the quantum-resistant algorithm to decrypt the first quantum-resistant key exchange parameter PQC_XCHi, and the specific method for obtaining the first symmetric key ciphertext ESki is: If the negotiated quantum-resistant algorithm is a public key encryption algorithm, the first symmetric key ciphertext ESki=PQC_Decrypt(PQC_XCHi, pqc_pri_enc_r), where PQC_Decrypt is the quantum-resistant algorithm decryption operation; if the negotiated quantum-resistant algorithm is a key encapsulation algorithm, the first quantum-resistant key exchange parameter PQC_XCHi is parsed into the first shared key ciphertext ESSi and the quantum-resistant first symmetric key ciphertext PQC_ESki, and the first shared key plaintext SSi is calculated, SSi=PQC_Decaps(ESSi, pqc_pri_enc_r), where PQC_Decaps is the quantum-resistant key decapsulation algorithm; the symmetric decryption algorithm is called to calculate the first symmetric key ciphertext ESki=Symetric_Decrypt(PQC_ESki, SSi); where pqc_pri_enc_r is the quantum-resistant encryption algorithm private key of the responding party.

7. The quantum attack-resistant national secret IPSec communication method according to claim 4 is characterized in that: In the step S7, after obtaining the first symmetric key ciphertext ESki, the step further includes: The hybrid IPSec device uses the initiator's anti-quantum signature algorithm public key to perform anti-quantum signature verification on the first anti-quantum signature data ESki|ENi|EIDi|CERT_enc_i|SIGi and the first anti-quantum algorithm signature value PQC_SIGi. If the verification is successful, perform subsequent operations, otherwise, exit the exchange process; After decrypting the first nonce data Ni and the initiator identity IDi using the first symmetric key Ski, the method further includes: Use the initiator's traditional signature public key to perform a signature verification operation on the first traditional signature data Ski|Ni|IDi|CERT_enc_i and the first traditional signature value SIGi. If the signature verification is successful, perform subsequent operations; otherwise, exit the exchange process.

8. The quantum attack-resistant national secret IPSec communication method according to claim 4 is characterized in that: In step S8, the hybrid IPSec device uses the initiator's quantum-resistant encryption algorithm public key to encrypt the second traditional key exchange parameter XCHr, and the specific method for generating the hybrid key exchange parameter MixXCHr is: If the negotiated quantum-resistant algorithm is a public key encryption algorithm, the second quantum-resistant key exchange parameter PQC_XCHr=PQC_Encrypt(ESkr, pqc_pub_enc_i); if the negotiated quantum-resistant algorithm is a key encapsulation algorithm, the quantum-resistant key encapsulation algorithm is called to output the second shared key plaintext SSr and the second shared key ciphertext ESSr, and the quantum-resistant second symmetric key ciphertext PQC_ESkr=Symmetric_Encrypt(ESkr, SSr) is calculated, then the second quantum-resistant key exchange parameter PQC_XCHr=ESSr|PQC_ESkr; the mixed key exchange parameter MixXCHr=PQC_XCHr||ENr||EIDr||CERT_sig_r||CERT_enc_r is constructed; wherein pqc_pub_enc_i is the public key of the quantum-resistant encryption algorithm of the initiator.

9. The quantum attack-resistant national secret IPSec communication method according to claim 4 is characterized in that: In step S9, the quantum-resistant IPSec device proxy parses the mixed key exchange parameter MixXCHr and decrypts it using the initiator's quantum-resistant encryption private key to output the second traditional key exchange parameter XCHr in the following specific method: If the negotiated quantum-resistant algorithm is a public key encryption algorithm, the second symmetric key ciphertext ESkr=PQC_Decrypt(PQC_XCHr,pqc_pri_enc_i) is calculated; if the negotiated quantum-resistant algorithm is a key encapsulation algorithm, the quantum-resistant key decapsulation algorithm is called to calculate the second shared key plaintext SSr=PQC_Decaps(ESSr,pqc_pri_enc_i), and the second symmetric key ciphertext ESkr=Symmetric_Decrypt(PQC_ESkr,SSr) is calculated; and XCHr=ESkr||ENr||EIDr||CERT_sig_r||CERT_enc_r is reconstructed.

10. The quantum attack-resistant national secret IPSec communication method according to claim 4 is characterized in that: In the step S9, after the quantum-resistant IPSec device proxy parses the mixed signature MixSIGr to output the second traditional signature value SIGr and the second quantum-resistant algorithm signature value PQC_SIGr, the following further comprises: The quantum-resistant IPSec device agent uses the responder's quantum-resistant signature algorithm public key to verify the second quantum-resistant signature data ESkr|ENr|EIDr|CERT_enc_r|SIGr and the second quantum-resistant algorithm signature value PQC_SIGr. If the verification is successful, subsequent operations are performed; otherwise, the exchange process is exited.

Citation Information

Cited By

  • IPSec VPN security gateway communication method fused with post quantum cryptography technology

    CN120498900A

  • IPSec VPN security gateway communication method fusing post-quantum cryptography

    CN120498900B