A quantum-resistant security enhancement method for secure shell protocol

By using post-quantum cryptography algorithms and quantum key distribution technology in communication networks, the security risks of classical cryptography under quantum computing attacks are solved, and the efficient anti-quantum computing attack capability for network communication is achieved.

CN118659881BActive Publication Date: 2024-12-20中电信量子信息科技集团有限公司
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411122244.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-20
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

Existing classical cryptography algorithms have security risks when facing quantum computing attacks and cannot effectively resist the cracking of quantum computers, especially in applications such as key negotiation, encryption and signature.

Method used

By adopting a quantum security enhancement method in the communication network, using post-quantum cryptography algorithm and quantum key distribution technology, quantum key resistant is generated, and the hash key and initial session key are used for encryption processing, enhancing the quantum resistance of network communication. Computational attack capability.

Benefits of technology

Effectively resist quantum computing attacks, enhance the security of network communication, ensure the confidentiality and integrity of data transmission, and reduce the risk of unauthorized access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118659881B_ABST
    Figure CN118659881B_ABST
Patent Text Reader

Abstract

The present application discloses a method for enhancing the anti-quantum security of a secure shell protocol of a communication network. The method includes: obtaining a first quantum key and a quantum key identifier from a first network node. Exchanging information with a second network device to generate a hash key and an initial session key. Performing post-quantum cryptographic encryption processing on the quantum key identifier according to the hash key and the initial session key, and sending the first encryption result processed by the post-quantum cryptographic encryption to the second network device. Decrypting the received second encryption result to obtain a second decryption result. Generating an anti-quantum session key based on the initial session key, the first encryption result, the second decryption result and the first quantum key to encrypt the communication between the first network device and the second network device. The first network device and the second network device encrypt the communication by using a post-quantum cryptographic algorithm and a quantum key distribution technology, thereby significantly enhancing the ability to resist quantum computing attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security, and more specifically, to a method for enhancing quantum security of a secure shell protocol of a communication network. Background Art

[0002] The leap in computing power represented by quantum computing has a significant impact on the security of related algorithms in classical cryptography. Understandably, with the realization of large-scale quantum computers, it will have a certain impact on key negotiation, encryption, signature and other applications in classical cryptography. Therefore, providing cryptographic technology that can resist quantum computing attacks has become an urgent problem to be solved. Summary of the invention

[0003] The present application provides a method for enhancing the quantum security of a secure shell protocol of a communication network.

[0004] The embodiment of the present application provides a method for enhancing the anti-quantum security of a secure shell protocol of a communication network, wherein the communication network includes a first network device and a second network device, and the method is used for the first network device, and the method includes:

[0005] Acquire a first quantum key and a quantum key identifier from a first network node connected to the first network device;

[0006] exchanging information with the second network device, and generating a hash key and an initial session key according to the first information of the first network device and the second information obtained through the information exchange;

[0007] Performing post-quantum cryptography encryption processing on the quantum key identifier according to the hash key and the initial session key, and sending a first encryption result obtained by the post-quantum cryptography encryption processing to the second network device;

[0008] decrypting the received second encryption result sent by the second network device to obtain a second decryption result, where the second encryption result is obtained by performing post-quantum cryptography encryption processing on the first decryption result by the second network device, and the first decryption result is obtained by decrypting the first encryption result by the second network device;

[0009] A quantum-resistant session key is generated according to the initial session key, the first encryption result, the second decryption result and the first quantum key to encrypt communication between the first network device and the second network device.

[0010] In this way, during the communication process between the first network device and the second network device, the first network device and the second network device apply for a quantum key, and use a post-quantum cryptographic algorithm to encrypt the quantum key to generate an anti-quantum key that can resist quantum computing attacks. The post-quantum cryptographic algorithm is a series of encryption algorithms designed to resist quantum computing attacks. In addition, the first network device and the second network device generate an initial session key through key exchange, and then the initial session key, the anti-quantum key and the quantum key are integrated and used in the communication between the first network device and the second network device. In this way, the ability of the network communication between the first network device and the second network device to resist quantum computing attacks is enhanced.

[0011] In certain embodiments, the method further comprises:

[0012] Accessing a first network node through a pre-established channel;

[0013] Load the security certificate of the second network device or the security certificate of the first network device.

[0014] In this way, before communicating with the second network device, the first network node is accessed through a pre-established channel. The pre-established channel can protect data during the communication process and reduce the risk of unauthorized access during the communication process. Then, the security certificate of the second network device or its own security certificate is loaded. After the security certificate is loaded, it will be used to establish and maintain a secure communication channel to enhance the security of data during transmission.

[0015] In some embodiments, the obtaining the first quantum key and the quantum key identifier from the first network node connected to the first network device includes:

[0016] Using a service node to inject multiple keys into a cryptographic module of the first network device;

[0017] Sending a quantum key application to the service node, wherein the quantum key application is protected by a protection key, and the protection key is a randomly used one from a plurality of keys injected into the cryptographic module;

[0018] receiving a quantum key encryption result obtained by the service node encrypting the first quantum key and the quantum key identifier according to the protection key, where the first quantum key is generated by a first network node connected to the service node and distributed to the service node, and the quantum key identifier is obtained by the first network node identifying the first quantum key according to an identification code of the first network node;

[0019] The quantum key encryption result is decrypted to obtain the first quantum key and the quantum key identifier.

[0020] In this way, the first network device uses the service node to charge multiple keys into the cryptographic module of the first network device. Next, the first network device sends a quantum key application to the service node. The quantum key application is protected by a protection key. The protection key is one randomly used from multiple keys charged into the cryptographic module. Then, the first network device receives the quantum key encryption result obtained by the service node encrypting the first quantum key and the quantum key identifier according to the protection key. The first quantum key is generated by the first network node accessing the service node and distributed to the service node. The quantum key identifier is obtained by the first network node identifying the first quantum key according to the identification code of the first network node. Finally, the first network device decrypts the quantum key encryption result to obtain the first quantum key and the quantum key identifier. In this way, the first network device obtains the first quantum key and the quantum key identifier, which can be used to subsequently generate keys with stronger resistance to quantum computing attacks.

[0021] In some embodiments, performing post-quantum cryptographic encryption processing on the quantum key identifier according to the hash key and the initial session key, and sending a first encryption result obtained by the post-quantum cryptographic encryption processing to the second network device, includes:

[0022] Concatenating the quantum key identifier and a randomly generated first random number to obtain a first session message;

[0023] Encrypting the first session message according to the initial session key to obtain a first encrypted message;

[0024] Performing post-quantum cryptographic derivation processing on the first encrypted message to generate a first quantum-resistant key;

[0025] Performing post-quantum cryptographic encryption and encapsulation processing on the first encrypted message to generate a first encapsulated message in the first encryption result;

[0026] Concatenating the quantum key identifier and the hash key to obtain a first verification message;

[0027] Performing post-quantum cryptographic signature processing on the first verification message to generate a first signature message in the first encryption result;

[0028] The first encryption result is sent to the second network device.

[0029] In this way, the first network device concatenates the quantum key identifier and the randomly generated first random number to obtain the first session message. Then, the first network device encrypts the first session message according to the initial session key to obtain the first encrypted message. Then, the first network device performs post-quantum cryptographic derivation processing on the first encrypted message to generate a first anti-quantum key. And the first encrypted message is encrypted and encapsulated by post-quantum cryptography to generate a first encapsulated message in the first encryption result. Thereafter, the first network device concatenates the quantum key identifier and the hash key to obtain a first verification message. And the obtained first verification message is signed by post-quantum cryptography to generate a first signature message in the first encryption result. Finally, the first network device sends the first encryption result to the second network device. In this way, the first network device obtains a first anti-quantum key with strong anti-quantum capability, obtains a first signature message and a first encrypted message that can generate the first anti-quantum key, and the first signature message can detect the situation where the data is unauthorizedly accessed during the communication process. And the first signature message and the first encrypted message are sent to the second network device, so that the second network device can generate the first anti-quantum key.

[0030] In some implementations, the decrypting the received second encryption result sent by the second network device to obtain the second decryption result includes:

[0031] receiving the second encryption result sent by the second network device, where the second encryption result is obtained by performing post-quantum cryptography encryption processing on the first decryption result by the second network device, and the first decryption result is obtained by performing decryption processing on the first encryption result by the second network device;

[0032] The second encryption result is decrypted to obtain a second decryption result, where the second decryption result includes a second encrypted message and a second signed message.

[0033] In this way, the first network device receives the second encryption result sent by the second network device. The second encryption result is obtained by the second network device encrypting the first decryption result, and the first decryption result is obtained by the second network device decrypting the first encryption result. Then, the first network device decrypts the second encryption result to obtain the second decryption result. The second decryption result includes the second handshake random number, the fourth handshake message and the second signature message. In this way, the first network device determines the availability of the channel for communication with the second network device, and obtains the relevant information of the second network device key. These key-related information can be combined with the relevant key information of the first network device to generate a key with high security and strong resistance to quantum attacks.

[0034] In certain embodiments, the method further comprises:

[0035] Obtaining a second quantum-resistant key according to the second encrypted message;

[0036] A second session message and a quantum key identifier are obtained according to the second encrypted message and the initial session key.

[0037] In this way, the first network device obtains the second quantum-resistant key according to the second encrypted message. Then, the first network device obtains the second session message and the quantum key identifier according to the second encrypted message and the initial session key. The second quantum-resistant key obtained in this way is used for subsequent key generation to obtain a key with strong resistance to quantum computing attacks. The first network device also obtains the quantum key identifier for subsequent signature verification to confirm the accuracy of the quantum key identifier received by the server.

[0038] In certain embodiments, the method further comprises:

[0039] Obtain a second verification message according to the second signature message;

[0040] Perform post-quantum cryptographic signature verification on the second signature message to confirm the correctness of the second verification message, where the second verification message is obtained by concatenating the quantum key identifier and the hash key.

[0041] In this way, the first network device obtains the second verification message according to the second signature message. Then, the first network device performs post-quantum cryptographic signature verification on the second signature message to confirm the correctness of the second verification message, which is obtained by splicing the quantum key identifier and the hash key. In this way, by performing post-quantum cryptographic signature verification on the second signature message to determine the correctness of the second verification message, the integrity of the data related to the second network device received by the first network device is ensured, and the identity of the second network device is verified, providing security for subsequent data transmission.

[0042] In some embodiments, the first encryption result includes a first quantum-resistant key, and the step of generating a quantum-resistant session key according to the initial session key, the first encryption result, the second decryption result, and the first quantum key to encrypt communication between the first network device and the second network device includes:

[0043] Generate a quantum-resistant session key by using the initial session key, the first quantum-resistant key, the second quantum-resistant key and the first quantum key;

[0044] The quantum resistant session key is derived to encrypt communications between the first network device and the second network device.

[0045] In this way, the first network device generates the quantum-resistant session key from the initial session key, the first quantum-resistant key, the second quantum-resistant key and the first quantum key. Then, the first network device derives the quantum-resistant session key and uses the derived key to encrypt the communication between the first network device and the second network device. In this way, by using the quantum-resistant session key generated by combining quantum key distribution technology and post-quantum cryptography technology, the ability of communication between network devices to resist quantum computing attacks is enhanced, and the data transmitted during the communication process is protected.

[0046] The embodiment of the present application provides a method for enhancing the anti-quantum security of a secure shell protocol of a communication network, wherein the communication network includes a first network device and a second network device, and the method is used for the second network device, and the method includes:

[0047] exchanging information with the first network device, and generating a hash key and an initial session key according to the second information of the second network device and the first information obtained through the information exchange;

[0048] receiving a first encryption result obtained by the first network device performing post-quantum cryptographic encryption processing on a quantum key identifier according to the hash key and the initial session key, where the quantum key identifier is obtained by the first network device from the first network node to which it is connected;

[0049] Decrypting the first encryption result to obtain a first decryption result;

[0050] Performing post-quantum cryptographic encryption processing on the first decryption result to obtain a second encryption result, and sending the second encryption result to the first network device;

[0051] A quantum-resistant session key is generated according to the initial session key, the first decryption result, the second encryption result, and the second quantum key to encrypt communication between the first network device and the second network device.

[0052] In this way, during the communication process between the first network device and the second network device, the first network device and the second network device apply for a quantum key, and use a post-quantum cryptographic algorithm to encrypt the quantum key to generate an anti-quantum key that can resist quantum computing attacks. The post-quantum cryptographic algorithm is a series of encryption algorithms designed to resist quantum computing attacks. In addition, the first network device and the second network device generate an initial session key through key exchange, and then the initial session key, the anti-quantum key and the quantum key are integrated and used in the communication between the first network device and the second network device. In this way, the ability of the network communication between the first network device and the second network device to resist quantum computing attacks is enhanced.

[0053] In some embodiments, the first encryption result includes a first encapsulated message, and the method further includes:

[0054] Obtain a first encrypted message according to the first encapsulated message;

[0055] A first session message and the quantum key identifier are obtained according to the first encrypted message and the initial session key.

[0056] In this way, the second network device obtains the first encrypted message according to the first encapsulated message. Then, the second network device obtains the first session message and the quantum key identifier according to the first encrypted message and the initial session key. In this way, the quantum key identifier is obtained, and the second network device can apply for the second quantum key according to the quantum key identifier.

[0057] In some embodiments, the first encryption result includes a first signature message, the first decryption result includes a quantum key identifier, and the method further includes:

[0058] Obtain a first verification message according to the first signed message;

[0059] Performing post-quantum cryptographic signature verification on the first signature message to confirm the correctness of a first verification message, where the first verification message is obtained by concatenating the quantum key identifier and the hash key;

[0060] When the obtained quantum key identifier is correct, a second quantum key is obtained from a second network node connected to the second network device according to the quantum key identifier.

[0061] In this way, the second network device obtains the first verification message according to the first signature message. Then, the second network device performs post-quantum cryptographic signature verification on the first signature message to confirm the correctness of the first verification message, which is obtained by splicing the quantum key identifier and the hash key. When the obtained quantum key identifier is correct, the second network device obtains the second quantum key from the second network node connected to the second network device according to the quantum key identifier. In this way, applying for a quantum key through a quantum key identifier ensures that the second quantum key applied for matches the first quantum key of the first network device, and the second quantum key can be used to generate a key with high security and good resistance to quantum computing attacks.

[0062] In some embodiments, performing post-quantum cryptographic encryption processing on the first decryption result to obtain a second encryption result, and sending the second encryption result to the first network device, includes:

[0063] Concatenating the quantum key identifier and a randomly generated second random number to obtain a second session message;

[0064] Encrypting the second session message according to the initial session key to obtain a second encrypted message;

[0065] Performing post-quantum cryptographic derivation processing on the second encrypted message to generate a second quantum-resistant key;

[0066] Performing post-quantum cryptographic encryption and encapsulation processing on the second encrypted message to generate a second encapsulated message in the second encryption result;

[0067] Concatenating the quantum key identifier and the hash key to obtain a second verification message;

[0068] Performing post-quantum cryptographic signature processing on the second verification message to generate a second signature message in the second encryption result;

[0069] The second encryption result is sent to the first network device.

[0070] In this way, the second network device performs a splicing process on the quantum key identifier and the randomly generated second random number to obtain a second session message. Then, the second network device encrypts the second session message according to the initial session key to obtain a second encrypted message. Then, the second network device performs a post-quantum cryptographic derivation process on the second encrypted message to generate a second anti-quantum key. And the second encrypted message is subjected to a post-quantum cryptographic encryption encapsulation process to generate a second encapsulated message in the second encryption result. The second network device then performs a splicing process on the quantum key identifier and the hash key to obtain a second verification message. Thereafter, the second network device performs a post-quantum cryptographic signature process on the second verification message to generate a second signature message in the second encryption result. Finally, the second network device sends the second encryption result to the first network device. In this way, the second network device obtains a second anti-quantum key with strong anti-quantum capability, obtains a second signature message and a second encrypted message capable of generating a second anti-quantum key, and the second signature message can detect the situation where data is unauthorizedly accessed during the communication process. And the second signature message and the second encrypted message are sent to the first network device, so that the first network device can generate a second anti-quantum key.

[0071] In some embodiments, the first decryption result includes a first encrypted message, and the step of generating a quantum-resistant session key according to the initial session key, the first decryption result, the second encryption result, and the second quantum key to encrypt communication between the first network device and the second network device includes:

[0072] Obtaining a first quantum-resistant key according to the first encrypted message;

[0073] Generate a quantum-resistant session key by using the initial session key, the first quantum-resistant key, the second quantum-resistant key and the second quantum key;

[0074] The quantum resistant session key is derived to encrypt communications between the first network device and the second network device.

[0075] In this way, the second network device obtains the first quantum-resistant key according to the first encrypted message. Then, the second network device generates the quantum-resistant session key from the initial session key, the first quantum-resistant key, the second quantum-resistant key and the second quantum key. Finally, the second network device derives the quantum-resistant session key to encrypt the communication between the first network device and the second network device. In this way, the quantum-resistant session key generated by combining quantum key distribution technology and post-quantum cryptography technology enhances the ability of communication between network devices to resist quantum computing attacks and protects the data transmitted during the communication process.

[0076] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0078] Figure 1 This is one of the flow diagrams of the anti-quantum security enhancement method of the implementation mode of the present application;

[0079] Figure 2 It is an architecture diagram of the quantum security enhancement method of the implementation mode of the present application;

[0080] Figure 3 It is a signaling diagram of the quantum security enhancement method according to an embodiment of the present application;

[0081] Figure 4 This is the second flow chart of the anti-quantum security enhancement method according to the implementation mode of the present application;

[0082] Figure 5 This is the third flow chart of the anti-quantum security enhancement method according to the implementation mode of the present application;

[0083] Figure 6 This is the fourth flow chart of the anti-quantum security enhancement method of the implementation mode of the present application;

[0084] Figure 7 This is the fifth flow chart of the anti-quantum security enhancement method according to the implementation mode of the present application;

[0085] Figure 8 This is the sixth flow chart of the anti-quantum security enhancement method according to the implementation mode of the present application;

[0086] Fig. 9 This is the seventh flow chart of the anti-quantum security enhancement method according to the implementation mode of the present application;

[0087] Fig.10 This is the eighth flow chart of the anti-quantum security enhancement method according to the implementation mode of the present application;

[0088] Fig.11 This is the ninth flow chart of the anti-quantum security enhancement method according to the implementation mode of the present application;

[0089] Fig.12 This is the tenth flowchart of the anti-quantum security enhancement method according to the implementation mode of the present application;

[0090] Fig.13 This is the eleventh flow chart of the anti-quantum security enhancement method according to the implementation mode of the present application;

[0091] Fig.14 This is the twelfth flow chart of the anti-quantum security enhancement method according to the implementation mode of the present application;

[0092] Fig.15 This is the thirteenth flow chart of the anti-quantum security enhancement method according to the implementation mode of the present application. DETAILED DESCRIPTION

[0093] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the embodiments of the present application.

[0094] The leap in computing power represented by quantum computing has a significant impact on the security of related algorithms in classical cryptography. In other words, quantum computing poses a more direct and urgent threat to the cracking of classical cryptography. A series of classical algorithms, such as Diffie-Hellman, RSA, and elliptic curve (ECC), face greater security risks because the number theory problems they are based on, such as large prime number decomposition and discrete logarithms, are no longer difficult in the quantum era. Understandably, with the realization of large quantum computers, it will have a certain impact on key negotiation, encryption, signature and other applications in classical cryptography.

[0095] As a result, the security of the Internet, which uses classical cryptographic algorithms to protect the communication process, is deeply threatened by quantum computing attacks. For example, the Secure Shell Protocol (SSH), which is based on the application layer, is designed to ensure the security of remote login sessions and other network services. The Secure Shell Protocol mainly consists of four parts, among which the user authentication protocol (SSH-USERAUTH, defined by RFC4252) is built on the transport layer protocol, the user connection protocol (SSH-CONNECT, defined by RFC4254) is built on the user connection protocol, and the transport layer protocol (SSH-TRANS, defined according to RFC4253) ensures server authentication, data confidentiality and integrity. It uses high-strength encryption technology, password-based host authentication and integrity protection mechanism. The authentication process mainly relies on RSA or DSS signature algorithms, while the key exchange uses the classic Diffie-Hellman (DH) algorithm. However, these traditional public key infrastructure (PKI) technologies such as RSA algorithm, DSS algorithm and DH algorithm have a potential weakness: they are not able to resist quantum computing attacks. Therefore, the secure shell protocol has a greater security risk when facing quantum computing attacks.

[0096] At present, the international technologies for dealing with the threat of quantum computing attacks are mainly divided into two categories: one is to use asymmetric algorithms for (symmetric) key negotiation and then encrypt and transmit through symmetric algorithms, and study the use of quantum key distribution (QKD) networks for symmetric key negotiation to protect the security of keys; the other is to study post-quantum cryptography (PQC) algorithms to directly replace existing asymmetric algorithms. Quantum key distribution technology uses the principles of quantum mechanics to generate keys that cannot be stolen by third parties, ensuring the security of key transmission. It is particularly suitable for key exchange scenarios and can replace existing asymmetric key negotiation algorithms, such as RSA or ECC, to improve the security of keys. However, quantum key distribution technology cannot currently completely replace all applications of asymmetric algorithms. For example, scenarios such as signature verification, integrity protection, and non-repudiation still require the use of asymmetric algorithms.

[0097] Post-quantum cryptographic algorithms are asymmetric cryptographic algorithms designed based on new mathematical problems, aiming to resist the possible threats posed by quantum computers. NIST has announced the first batch of four post-quantum cryptographic algorithms to be standardized, including Kyber, Dilithium, Falcon, and SPHINCS+. These algorithms cover a variety of technical routes to reduce the risk of a single technology being cracked. Post-quantum cryptographic algorithms can theoretically replace all asymmetric algorithms and are more general. However, the security of post-quantum cryptographic algorithms still depends on the complexity of computational problems, and may face new cracking methods in the future or become unsafe as computing power increases. In addition, the post-quantum cryptographic algorithm standard has not yet been officially announced, and the production and certification of related products also take time, so its large-scale application still requires a long period of time.

[0098] Both post-quantum cryptographic algorithms and quantum key distribution technologies have the ability to resist quantum computing attacks, but each has its limitations. Therefore, providing relatively low-cost and highly secure cryptographic technology that can resist quantum computing attacks has become an urgent problem to be solved.

[0099] Based on the above questions, please refer to Figure 1 The embodiment of the present application provides a method for enhancing the anti-quantum security of a secure shell protocol of a communication network, wherein the communication network includes a first network device and a second network device, and the method is used for the first network device, and the method includes:

[0100] 011: Obtaining a first quantum key and a quantum key identifier from a first network node connected to a first network device;

[0101] 012: Exchange information with the second network device, and generate a hash key and an initial session key according to the first information of the first network device and the second information obtained through the information exchange;

[0102] 013: Perform post-quantum cryptography encryption processing on the quantum key identifier according to the hash key and the initial session key, and send a first encryption result obtained by the post-quantum cryptography encryption processing to the second network device;

[0103] 014: decrypting the second encryption result received and sent by the second network device to obtain a second decryption result, where the second encryption result is obtained by the second network device performing post-quantum cryptography encryption on the first decryption result, and the first decryption result is obtained by the second network device performing decryption on the first encryption result;

[0104] 015: Generate a quantum-resistant session key according to the initial session key, the first encryption result, the second decryption result and the first quantum key to encrypt communication between the first network device and the second network device.

[0105] The embodiment of the present application also provides a first network device, including a memory and a processor. The method of the embodiment of the present application can be implemented by the first network device of the embodiment of the present application. Specifically, a computer program is stored in the memory, and the processor is used to obtain a first quantum key and a quantum key identifier from a first network node connected to the first network device. And exchange information with the second network device, and generate a hash key and an initial session key according to the first information of the first network device and the second information obtained by the information exchange. The processor is also used to perform post-quantum cryptographic encryption on the quantum key identifier according to the hash key and the initial session key, and send the first encryption result obtained by the post-quantum cryptographic encryption to the second network device. And decrypt the second encryption result sent by the second network device to obtain a second decryption result, the second encryption result is obtained by the second network device performing post-quantum cryptographic encryption on the first decryption result, and the first decryption result is obtained by the second network device decrypting the first encryption result. The processor is also used to generate a quantum-resistant session key based on the initial session key, the first encryption result, the second decryption result and the first quantum key to encrypt the communication between the first network device and the second network device.

[0106] The embodiment of the present application also provides a first network device security enhancement device. The method of the embodiment of the present application can be implemented by the first network device security enhancement device of the embodiment of the present application. Specifically, the first network device security enhancement device includes an acquisition module, an exchange module, an encryption module, a decryption module and a derivation module. The acquisition module is used to obtain a first quantum key and a quantum key identifier from a first network node connected to the first network device. The exchange module is used to exchange information with the second network device, and generate a hash key and an initial session key according to the first information of the first network device and the second information obtained by the information exchange. The encryption module is used to perform post-quantum cryptographic encryption processing on the quantum key identifier according to the hash key and the initial session key, and send the first encryption result obtained by the post-quantum cryptographic encryption processing to the second network device. The decryption module is used to decrypt the second encryption result received by the second network device to obtain a second decryption result, the second encryption result is obtained by the second network device performing post-quantum cryptographic encryption processing on the first decryption result, and the first decryption result is obtained by the second network device performing decryption processing on the first encryption result. The derivation module is used to generate a quantum-resistant session key according to the initial session key, the first encryption result, the second decryption result and the first quantum key to encrypt the communication between the first network device and the second network device.

[0107] The present application provides a communication system based on a secure shell protocol, the communication system comprising a first network device, a second network device and a quantum key distribution network of the above-mentioned implementation mode, and the quantum key distribution network is configured to distribute quantum keys to the first network device or the second network device.

[0108] Specifically, the quantum key distribution network includes network nodes and a quantum network link control center. Network nodes are used to store and distribute quantum keys in the quantum key distribution network. The quantum network link center can establish quantum key distribution and relay links between network nodes according to the names of network nodes. Quantum key distribution and relay links are used for functions such as data transfer. The quantum key distribution network is used to realize services such as quantum key generation, quantum key relay, and quantum key provision.

[0109] See also Figure 2 In some embodiments, the first network device and the second network device communicate through an SSH transport layer encrypted channel. If the SSH user authentication protocol or user connection protocol is performed, the SSH transport layer encrypted channel is a key part of the secure shell protocol, which refers to an encrypted communication channel established between the first network device and the second network device, and is responsible for providing server authentication, data confidentiality and integrity, ensuring the security and reliability of the SSH connection. The SSH user authentication protocol is responsible for user authentication of the first network device and supports multiple authentication methods, such as passwords, public key authentication, etc. The first network device accesses a service node, which is a transfer station for the first network device to connect to the network node, and is used to inject keys into the second network device and transfer and store quantum keys. After the first network device sends a quantum key application, the network node sends the quantum key generated by the quantum key distribution network to the service node connected to the first network device, and the service node then sends the quantum key to the first network device. The simple process for the first network device and the second network device to obtain the quantum key is as follows: First, the first network device sends a quantum key application to the service node connected to the first network device. Then, the service node applies for a quantum key from the first network node connected to the service node. Next, the first network node distributes the quantum key generated according to the quantum key application to the service node, and the service node distributes the quantum key to the first network device. At the same time, the quantum network link control center synchronously generates a quantum key for the second network node connected to the second network device, but the quantum key will not be immediately distributed to the second network device, but will be stored in the network node first. The correspondence between the first network device, the second network device, the service node and the network node is provided by the management and control platform.

[0110] It should be noted that the implementation method of the present application uses FIPS203 Module-Lattice-based Key-Encapsulation Mechanism Standard as the PQC key encapsulation algorithm and FIPS 204 Module-Lattice-Based Digital Signature Standard as the PQC digital signature algorithm for example for explanation. The following descriptions of operations related to the PQC algorithm refer to the above FIPS standard. Of course, in other implementations, other algorithms such as the NewHope algorithm, the Sidh algorithm, and the HQC algorithm may also be used as PQC related algorithms. It should also be noted that the embodiments of the present application are directed to the Secure Shell Protocol (SSH) consisting of the four parts of the protocol architecture (SSH-ARCH) defined by RFC4251, the transport layer protocol (SSH-TRANS) defined by RFC4253, the user authentication protocol (SSH-USERAUTH) defined by RFC4252, and the user connection protocol (SSH-CONNECT) defined by RFC4254, hereinafter referred to as the SSH protocol.

[0111] Specifically, the hash key is calculated based on the relevant information in the information exchange according to the SSH protocol, and the initial session key is independently calculated by the first network device and the second network device according to their respective private keys and the other party's public key according to the SSH protocol.

[0112] The first network device sends a quantum key application to a first network node connected to the first network device, and then obtains a first quantum key and a quantum key identifier from the first network node. The first quantum key and the quantum key identifier can be used to generate a key that is resistant to quantum computing attacks. The quantum key identifier helps to use and manage the quantum key.

[0113] Next, the first network device and the second network device exchange information. After the information exchange, the first network device has both its own first information and the second information of the second network device, and generates a hash key and an initial session key based on the information.

[0114] Then, the first network device performs post-quantum cryptographic encryption processing on the quantum key identifier according to the hash key and the initial session key, and sends the first encryption result of the post-quantum cryptographic encryption processing to the second network device. By performing post-quantum cryptographic encryption processing on the quantum key identifier, the quantum key distribution technology is combined with the post-quantum cryptographic algorithm to improve the complexity of the key, and the encryption result is sent to the second network device for sharing so that the communication data of the network device and the second network device in the communication network are consistent.

[0115] The second network device receives the first encryption result sent by the network device, and decrypts the first encryption result to obtain the first decryption result. The second network device then performs post-quantum cryptographic encryption on the first decryption result to obtain the second encryption result. After obtaining the second encryption result, the second network device sends the second encryption result to the network device so that the network device can also share the second network device information and the generated key. The second network device then generates a quantum-resistant session key based on the initial session key, the first decryption result, the second encryption result, and the second quantum key to encrypt the communication between the first network device and the second network device.

[0116] At the same time, the first network device receives the second encryption result sent by the second network device, and decrypts the second encryption result to obtain a second decryption result. The network device then generates a quantum-resistant session key based on the initial session key, the first encryption result, the second decryption result and the first quantum key to encrypt the communication between the first network device and the second network device.

[0117] The following is an example to illustrate the method of the implementation method of the present application. In the embodiment of the present application, the first network device is a client, which is the user end of the SSH protocol. The key between the client and the server is obtained through the SSH transport layer protocol (SSH-TRANS), and the integrity and confidentiality of user data such as SSH remote login are protected. The second network device is a server, which is the server of the SSH protocol. The key between the client and the server is obtained through the SSH transport layer protocol (SSH-TRANS), and the integrity and confidentiality of user data such as SSH remote login are protected. The quantum network node is a network node, and the quantum network node stores and provides the generated quantum key to the server through a trusted channel or provides the generated quantum key to the client through a cryptographic service node. The cryptographic service node is a service node, and the cryptographic service node is used to connect to the quantum network node and provide pre-shared key injection and quantum key services for multiple clients.

[0118] The SSH_MSG_KEXDH_INIT message and the SSH_MSG_KEXDH_REPLY message are messages in the information exchange. The first encryption result is the SSH_MSG_KEXPQCQKD_INIT message, and the second encryption result is the SSH_MSG_KEXPQCQKD_REPLY message.

[0119] The SSH_MSG_KEXINIT-1 message of the client includes the key exchange algorithm, encryption algorithm, MAC algorithm, compression algorithm, etc. supported by the client. The SSH_MSG_KEXINIT-2 message of the server includes the key exchange algorithm, encryption algorithm, MAC algorithm, compression algorithm, etc. supported by the server.

[0120] The SSH_MSG_KEXDH_INIT message and the SSH_MSG_KEXDH_REPLY message are used to calculate the hash key and the initial session key.

[0121] In addition, in the embodiment of the present application, after the client obtains the first quantum key and before the client and the user end exchange messages, the present application selects a number in the Local extensions (192 - 255) interval in the message number (Message Numbers) of the SSH protocol as the message number of the SSH_MSG_KEXPQCQKD_INIT message and the SSH_MSG_KEXPQCQKD_REPLY message defined as a byte type.

[0122] See also Figure 3 , the client sends the first quantum key QK_UUID-1 and quantum key identifier UUID_QK from the first quantum network node connected to the network device. The quantum key identifier helps to manage and use quantum keys. Then, the client sends the client's SSH_MSG_KEXINIT-1 message to the server in accordance with the SSH transport layer protocol defined in RFC4253, and adds a new item "pqc-qkd-aes" to the key exchange algorithm name list (name-list kex_algorithms) of the message. After receiving the client's SSH_MSG_KEXINIT message, the server returns its own SSH_MSG_KEXINIT-2 message to the client, and also adds a new item "pqc-qkd-aes" to the key exchange algorithm name list (name-list kex_algorithms) of the message.

[0123] After the client receives the SSH_MSG_KEXINIT-2 message from the server, it sends the SSH_MSG_KEXDH_INIT message according to the SSH transport layer protocol defined in RFC4253. The server receives the SSH_MSG_KEXDH_INIT message and calculates the hash key H and the initial session key Y1 according to the SSH transport layer protocol defined in RFC4253, and then replies with the SSH_MSG_KEXDH_REPLY message. After receiving the reply message, the client calculates the hash key H and the initial session key Y1 according to the SSH transport layer protocol defined in RFC4253.

[0124] Then, the client performs post-quantum cryptographic encryption on the quantum key identifier UUID_QK according to the hash key H and the initial session key Y1 to obtain the SSH_MSG_KEXPQCQKD_INIT message. Then. The client sends the SSH_MSG_KEXPQCQKD_INIT message to the server. After receiving the SSH_MSG_KEXPQCQKD_INIT message, the server decrypts the SSH_MSG_KEXPQCQKD_INIT message to obtain the first decryption result. The server then encrypts the first decryption result to obtain the SSH_MSG_KEXPQCQKD_REPLY message, and sends the SSH_MSG_KEXPQCQKD_REPLY message to the client. The server generates the quantum-resistant session key Y2 according to the initial session key Y1, the SSH_MSG_KEXPQCQKD_REPLY message, the second quantum key and the SSH_MSG_KEXPQCQKD_INIT message.

[0125] After receiving the SSH_MSG_KEXPQCQKD_REPLY message, the client generates a quantum-resistant session key Y2 based on the initial session key Y1, the SSH_MSG_KEXPQCQKD_REPLY message, the SSH_MSG_KEXPQCQKD_INIT message and the first quantum key.

[0126] In summary, in the anti-quantum security enhancement method, communication system, first network device and second network device of the secure shell protocol of the communication network of the implementation mode of the present application, for the communication process between the first network device and the second network device, the first network device and the second network device apply for a quantum key, and use a post-quantum cryptographic algorithm to encrypt the quantum key to generate an anti-quantum key that can resist quantum computing attacks. The post-quantum cryptographic algorithm is a series of encryption algorithms designed to resist quantum computing attacks. And the first network device and the second network device generate an initial session key through key exchange, and then the initial session key, the anti-quantum key and the quantum key are integrated and used in the communication between the first network device and the second network device. In this way, the ability of the network communication between the first network device and the second network device to resist quantum computing attacks is enhanced.

[0127] See also Figure 4 In some embodiments, the method further comprises:

[0128] 016: Access the first network node through a pre-established channel;

[0129] 017: Load the security certificate of the second network device or the security certificate of the first network device.

[0130] In some implementations, the access module is used to access the first network node through a pre-established channel, and the loading module is used to load the security certificate of the second network device or the security certificate of the first network device.

[0131] In some embodiments, the processor is further configured to access the first network node through a pre-established channel, and load a security certificate of the second network device or a security certificate of the first network device.

[0132] Specifically, before data transmission with the second network device, the network device accesses the first network node through a pre-established channel. The pre-established channel can protect data during data transmission and reduce the risk of unauthorized access during transmission. Then, the network device loads the security certificate of the network device or the security certificate of the second network device. After the security certificate is loaded, it will be used to establish and maintain a secure communication channel to enhance the security of data during transmission.

[0133] Continuing with the above example, please refer again to Figure 3 Before the client and the server transmit data, the client accesses the first quantum network node with the closest physical distance and completed authorization through a trusted channel. A trusted channel refers to a mechanism or protocol that provides a secure communication path between two communication entities. One way to establish it is that the client and the first quantum network node are in the same cabinet and directly connected by a shielded network cable. This channel ensures the confidentiality, integrity and availability of data during transmission, and prevents unauthorized access, tampering or eavesdropping. At the same time, through offline import, the client loads the key pair of the post-quantum cryptography algorithm of the server, which includes an encryption key pair and a signature key pair, or the certificate of the post-quantum cryptography algorithm of the client issued by the certificate system, which includes an encryption certificate and a signature certificate. The offline import method means that the transmission of the key or certificate will not pass through the Internet or other network paths that may be monitored or attacked, ensuring the security of the transmission process. In this way, the client accesses the first quantum network node through a trusted channel and loads the security certificate by offline import, ensuring the confidentiality of network device data and reducing the risk of data leakage.

[0134] See also Figure 5 In some embodiments, step 011 (obtaining a first quantum key and a quantum key identifier from a first network node connected to a first network device) includes:

[0135] 0111: using the service node to inject multiple keys into the cryptographic module of the first network device;

[0136] 0112: Send a quantum key application to the service node. The quantum key application is protected by a protection key, which is a random key from multiple keys injected into the cryptographic module.

[0137] 0113: receiving a quantum key encryption result obtained by the service node encrypting the first quantum key and the quantum key identifier according to the protection key, where the first quantum key is generated by the first network node accessing the service node and distributed to the service node, and the quantum key identifier is obtained by the first network node identifying the first quantum key according to the identification code of the first network node;

[0138] 0114: Decrypt the quantum key encryption result to obtain a first quantum key and a quantum key identifier.

[0139] In some embodiments, the charging module is used to charge a plurality of keys into the cryptographic module of the first network device using the service node. The sending module is used to send a quantum key application to the service node. The receiving module is used to receive a quantum key encryption result obtained by the service node encrypting the first quantum key and the quantum key identifier according to the protection key. The decryption module is used to decrypt the quantum key encryption result to obtain the first quantum key and the quantum key identifier.

[0140] In some embodiments, the processor is further configured to use the service node to inject multiple keys into the cryptographic module of the first network device, and send a quantum key application to the service node. The processor is also configured to receive a quantum key encryption result obtained by the service node encrypting the first quantum key and the quantum key identifier according to the protection key, and decrypt the quantum key encryption result to obtain the first quantum key and the quantum key identifier.

[0141] Specifically, the first network device uses the service node to inject multiple keys into the cryptographic module of the first network device. Next, the first network device sends a quantum key application to the service node. The quantum key application is protected by a protection key, and the protection key is a randomly used one of the multiple keys injected into the cryptographic module. Then, the first network device receives the quantum key encryption result obtained by the service node encrypting the first quantum key and the quantum key identifier according to the protection key. The first quantum key is generated by the first network node accessing the service node and distributed to the service node. The quantum key identifier is obtained by the first network node identifying the first quantum key according to the identification code of the first network node. Finally, the first network device decrypts the quantum key encryption result to obtain the first quantum key and the quantum key identifier.

[0142] Continuing with the above example, please refer again to Figure 3, the client uses the cryptographic service node to pre-charge the client's personal cryptographic module with a total of 1M bits of 128-bit keys. The personal cryptographic module includes but is not limited to the smart cryptographic key (HSM) and the virtual security module (VSM). Then, the client sends a quantum key application to the cryptographic service node and randomly uses a key in the smart cryptographic key as the protection key. The client performs a hash operation (Hash-based Message Authentication Code, HMAC) on the key ID and the application content by using the SM3 algorithm and the protection key. After that, the cryptographic service node also performs a hash operation on the key ID and the application content by using the SM3 algorithm and the protection key to verify the integrity and authenticity of the data. HMAC is a method that uses hash functions and keys to provide data integrity and source authentication.

[0143] After the quantum key application is successful, the client receives the quantum key encryption result obtained by the cryptographic service node by encrypting the first quantum key QK_UUID-1 and the quantum key identifier UUID_QK according to the protection key. The first quantum key QK_UUID-1 is generated by the first quantum network node connected to the cryptographic service node and distributed to the cryptographic service node. The quantum key identifier UUID_QK is obtained by the first quantum network node identifying the first quantum key according to the first quantum network node's universal unique identifier. The client then decrypts the quantum key encryption result according to the protection key to obtain the first quantum key QK_UUID-1 and the quantum key identifier UUID_QK.

[0144] In this way, the client obtains the first quantum key QK_UUID-1 and quantum key identifier UUID_QK, which can be used to subsequently generate keys that are more resistant to quantum computing attacks.

[0145] See also Figure 6 In some embodiments, step 013 (performing post-quantum cryptography encryption processing on the quantum key identifier according to the hash key and the initial session key, and sending the first encryption result obtained by the post-quantum cryptography encryption processing to the second network device) includes:

[0146] 0131: concatenate the quantum key identifier and the randomly generated first random number to obtain a first session message;

[0147] 0132: Encrypt the first session message according to the initial session key to obtain a first encrypted message;

[0148] 0133: Perform post-quantum cryptographic derivation processing on the first encrypted message to generate a first quantum-resistant key;

[0149] 0134: Perform post-quantum cryptographic encryption and encapsulation processing on the first encrypted message to generate a first encapsulated message in a first encryption result;

[0150] 0135: concatenate the quantum key identifier and the hash key to obtain a first verification message;

[0151] 0136: Perform post-quantum cryptographic signature processing on the first verification message to generate a first signature message in the first encryption result;

[0152] 0137: Send the first encryption result to the second network device.

[0153] In some embodiments, the splicing module is used to splice the quantum key identifier and the randomly generated first random number to obtain a first session message. The encryption module is used to encrypt the first session message according to the initial session key to obtain a first encrypted message. The derivation module is used to perform post-quantum cryptographic derivation processing on the first encrypted message to generate a first anti-quantum key. The encryption encapsulation module is used to perform post-quantum cryptographic encryption encapsulation processing on the first encrypted message to generate a first encapsulated message in the first encryption result. The splicing module is also used to splice the quantum key identifier and the hash key to obtain a first verification message. The signature module is used to perform post-quantum cryptographic signature processing on the first verification message to generate a first signature message in the first encryption result. The sending module is used to send the first encryption result to the second network device.

[0154] In some embodiments, the processor is further configured to perform concatenation processing on the quantum key identifier and the randomly generated first random number to obtain a first session message, encrypt the first session message according to the initial session key to obtain a first encrypted message, and perform post-quantum cryptographic derivation processing on the first encrypted message to generate a first anti-quantum key. The processor is further configured to perform post-quantum cryptographic encryption encapsulation processing on the first encrypted message to generate a first encapsulated message in a first encryption result. The processor is further configured to perform concatenation processing on the quantum key identifier and the hash key to obtain a first verification message. The processor is further configured to perform post-quantum cryptographic signature processing on the first verification message to generate a first signature message in a first encryption result, and send the first encryption result to a second network device.

[0155] Specifically, the first network device concatenates the quantum key identifier and the randomly generated first random number to obtain a first session message. Then, the first network device encrypts the first session message according to the initial session key to obtain a first encrypted message. Then, the first network device performs post-quantum cryptographic derivation processing on the first encrypted message to generate a first anti-quantum key. And performs post-quantum cryptographic encryption encapsulation processing on the first encrypted message to generate a first encapsulated message in the first encryption result. Thereafter, the first network device concatenates the quantum key identifier and the hash key to obtain a first verification message. And performs post-quantum cryptographic signature processing on the obtained first verification message to generate a first signature message in the first encryption result. Finally, the first network device sends the first encryption result to the second network device.

[0156] Continuing with the above example, the first encryption result is the SSH_MSG_KEXPQCQKD_INIT message. Figure 3 , when the post-quantum cryptographic certificate is available, the client places the client PQC signature certificate and PQC encryption certificate in the certificates_client message of the SSH_MSG_KEXPQCQKD_INIT message. When the post-quantum cryptographic certificate is not available, the client and the server can import each other's PQC signature public key or PQC encryption public key offline. The content of the SSH_MSG_KEXPQCQKD_INIT message sent by the client is as follows:

[0157] byte SSH_MSG_KEXPQCQKD_INIT

[0158] string certificates_client

[0159] string encap_c

[0160] string sign_c

[0161] The client randomly generates a 128-bit random number R1 and a quantum key identifier UUID_QK (128 bits) to concatenate to obtain the first session message h1, and the concatenation method is (UUID_QK|R1). Next, the client uses the initial session key Y1 generated by the client as the key, and uses the AES symmetric encryption algorithm to encrypt h1 to obtain the first encrypted message m1 (m1=aes_enc(h1,Y1)). The client then uses the first encrypted message m1 as the encrypted message in the PQC key encapsulation algorithm, and runs the G function of the PQC algorithm on m1 to obtain the first quantum-resistant key K1. PQC encryption and encapsulation of m1 is performed to obtain the first encapsulated message f1, and the encapsulation information is used as the encap_c content.

[0162] The client concatenates the quantum key identifier UUID_QK and the hash key H to obtain the first verification message, and the concatenation method is UUID_QK|H. The client then uses the first verification message as M in the PQC signature algorithm to perform PQC signature protection to obtain the first signature message M1, and the signature information is used as the content of sign_c.

[0163] The client sends the SSH_MSG_KEXPQCQKD_INIT message to the server.

[0164] In this way, the client obtains the first quantum-resistant key K1 with strong quantum resistance, the first signed message M1 and the first encrypted message m1 that can generate the first quantum-resistant key. The first signed message M1 can detect unauthorized access to data during the communication process. The first signed message M1 and the first encrypted message m1 are sent to the server, so that the server can generate the first quantum-resistant key.

[0165] See also Figure 7 In some implementations, step 014 (decrypting the second encryption result received and sent by the second network device to obtain a second decryption result) includes:

[0166] 0141: receiving a second encryption result sent by a second network device, where the second encryption result is obtained by the second network device performing post-quantum cryptography encryption processing on the first decryption result, and the first decryption result is obtained by the second network device performing decryption processing on the first encryption result;

[0167] 0142: Decrypt the second encryption result to obtain a second decryption result, where the second decryption result includes a second encrypted message and a second signed message.

[0168] In some embodiments, the receiving module is used to receive a second encryption result sent by the second network device, the second encryption result is obtained by the second network device performing post-quantum cryptographic encryption processing on the first decryption result, and the first decryption result is obtained by the second network device performing decryption processing on the first encryption result. The decryption module is used to decrypt the second encryption result to obtain a second decryption result, and the second decryption result includes a second handshake random number, a fourth handshake message, and a second signature message.

[0169] In some embodiments, the processor is further configured to receive a second encryption result sent by a second network device, the second encryption result being obtained by the second network device performing post-quantum cryptographic encryption processing on the first decryption result, and the first decryption result being obtained by the second network device performing decryption processing on the first encryption result. The processor is further configured to perform decryption processing on the second encryption result to obtain a second decryption result, the second decryption result including a second handshake random number, a fourth handshake message, and a second signature message.

[0170] Specifically, the first network device receives the second encryption result sent by the second network device. The second encryption result is obtained by the second network device encrypting the first decryption result, while the first decryption result is obtained by the second network device decrypting the first encryption result. Then, the first network device decrypts the second encryption result to obtain the second decryption result. The second decryption result includes the second handshake random number, the fourth handshake message and the second signature message. In this way, the first network device determines the availability of the channel for communication with the second network device, and obtains the key information of the second network device. These key information can be combined with the relevant key information of the first network device to generate a key with high security and strong resistance to quantum attacks.

[0171] Continuing with the above example, the second encryption result is the SSH_MSG_KEXPQCQKD_REPLY message. Figure 3 After the client receives the SSH_MSG_KEXPQCQKD_REPLY message sent by the server, the server encrypts the message according to the first decryption result, and the first decryption result is obtained by the server performing PQC key decapsulation on the SSH_MSG_KEXPQCQKD_INIT message sent by the client. The SSH_MSG_KEXPQCQKD_REPLY message sent by the server is decapsulated by the PQC key to obtain the second encrypted message m2 and the second signed message M2.

[0172] In this way, the client determines the availability of the channel used for communication with the server, and obtains the second encrypted message m2 and the second signed message M2 from the server. The second encrypted message m2 and the second signed message M2 can be used to generate a key with high security and strong resistance to quantum attacks.

[0173] See also Figure 8 In some embodiments, the method further comprises:

[0174] 018: Obtain a second quantum-resistant key according to the second encrypted message;

[0175] 019: Obtain a second session message and a quantum key identifier according to the second encrypted message and the initial session key.

[0176] In some embodiments, the derivation module is used to obtain a second quantum-resistant key based on the second encrypted message, and to obtain a second session message and a quantum key identifier based on the second encrypted message and the initial session key.

[0177] In some embodiments, the processor is further configured to obtain a second quantum-resistant key based on the second encrypted message, and to obtain a second session message and a quantum key identifier based on the second encrypted message and the initial session key.

[0178] Specifically, the first network device obtains the second quantum-resistant key according to the second encrypted message. Then, the first network device obtains the second session message and the quantum key identifier according to the second encrypted message and the initial session key. The second quantum-resistant key obtained in this way is used for subsequent key generation to obtain a key with strong resistance to quantum computing attacks. The first network device also obtains the quantum key identifier for subsequent signature verification to confirm the accuracy of the quantum key identifier received by the server.

[0179] Continuing with the above example, please refer again to Figure 3 The client performs PQC key decapsulation on the SSH_MSG_KEXPQCQKD_REPLY message received from the server to obtain the second encrypted message m2. The client then runs the G function of the PQC algorithm on the second encrypted message m2 to obtain the second quantum-resistant key K2. Then, the client obtains the second session message h2 and the quantum key identifier UUID_QK based on the initial session key Y1 and the AES symmetric encryption algorithm.

[0180] In this way, the client obtains the second quantum-resistant key Y2 for subsequent key generation to obtain a key with strong resistance to quantum computing attacks. The client also obtains the quantum key identifier UUID_QK for subsequent signature verification to confirm the accuracy of the quantum key identifier UUID_QK received by the server.

[0181] See also Fig. 9 In some embodiments, the method further comprises:

[0182] 020: Obtain a second verification message according to the second signature message;

[0183] 021: Perform post-quantum cryptographic signature verification on the second signature message to confirm the correctness of the second verification message, which is obtained by concatenating the quantum key identifier and the hash key.

[0184] In some embodiments, the derivation module is further used to obtain a second verification message based on the second signature message, and the verification module is used to perform post-quantum cryptographic verification on the second signature message to confirm the correctness of the second verification message, and the second verification message is obtained by concatenating the quantum key identifier and the hash key.

[0185] In some embodiments, the processor is further used to obtain a second verification message based on the second signature message, and perform post-quantum cryptographic signature verification on the second signature message to confirm the correctness of the second verification message, where the second verification message is obtained by concatenating the quantum key identifier and the hash key.

[0186] Specifically, the first network device obtains the second verification message according to the second signature message. Then, the first network device performs post-quantum cryptographic signature verification on the second signature message to confirm the correctness of the second verification message, which is obtained by splicing the quantum key identifier and the hash key. In this way, by performing post-quantum cryptographic signature verification on the second signature message to determine the correctness of the second verification message, the integrity of the data related to the second network device received by the first network device is ensured, and the identity of the second network device is verified, providing security for subsequent data transmission.

[0187] Continuing with the above example, please refer again to Figure 3 The client obtains the second verification message based on the second signature message M2, and then performs post-quantum cryptographic signature verification on the second signature message M2 to confirm the correctness of the second verification message, that is, to confirm that the correct quantum key identifier UUID_QK has been received.

[0188] In this way, the client and server achieve secure data exchange and communication, ensuring the confidentiality, integrity and authenticity of the data.

[0189] See also Fig.10 In some embodiments, the first encryption result includes a first quantum-resistant key, and step 015 (generating a quantum-resistant session key according to the initial session key, the first encryption result, the second decryption result, and the first quantum key to encrypt communication between the first network device and the second network device) includes:

[0190] 0151: Generate a quantum-resistant session key by using the initial session key, the first quantum-resistant key, the second quantum-resistant key and the first quantum key;

[0191] 0152: Derivation of a quantum-resistant session key to encrypt communication between a first network device and a second network device.

[0192] In some embodiments, the derivation module is further used to generate a quantum-resistant session key from the initial session key, the first quantum-resistant key, the second quantum-resistant key, and the first quantum key. The encryption module is further used to derive the quantum-resistant session key to encrypt the communication between the first network device and the second network device.

[0193] In some embodiments, the processor is further configured to generate a quantum-resistant session key from the initial session key, the first quantum-resistant key, the second quantum-resistant key, and the first quantum key, and to derive the quantum-resistant session key to encrypt communication between the first network device and the second network device.

[0194] Specifically, the first network device generates a quantum-resistant session key from the initial session key, the first quantum-resistant key, the second quantum-resistant key, and the first quantum key. Then, the first network device derives the quantum-resistant session key and uses the derived key to encrypt the communication between the first network device and the second network device. In this way, the quantum-resistant session key generated by combining quantum key distribution technology and post-quantum cryptography technology enhances the ability of communication between network devices to resist quantum computing attacks and protects the data transmitted during the communication process.

[0195] Continuing with the above example, the SSH_MSG_NEWKEYS message itself does not contain any data and is used to indicate that both parties have completed the key exchange process and are ready to use new session keys and algorithms to encrypt subsequent communications. The initialization vector IV is a random or pseudo-random value that is used in the encryption algorithm mode, such as CBC mode, to ensure that even if the same data is encrypted multiple times, different ciphertexts will be produced. The initialization vector IV prevents replay attacks and ensures the randomness of the encryption.

[0196] Please refer to Figure 3 , the client performs an XOR operation on the initial session key Y1, the first quantum key QK_UUID-1, the first quantum-resistant key K1 in the SSH_MSG_KEXPQCQKD_INIT message, and the second quantum-resistant key K2 in the SSH_MSG_KEXPQCQKD_REPLY message to obtain the quantum-resistant session key Y2 (Y2=Y1⊕QK_UUID-1⊕K1⊕K2). Then, the quantum-resistant session key Y2 is derived according to the key derivation method in the SSH transport layer protocol defined in RFC4253 to derive the initialization vector IV, encryption key, and integrity key from the client to the server. The client then sends SSH_MSG_NEWKEYS messages to the server to enable the keys negotiated in the above process for SSH user data transmission protection.

[0197] See also Fig.11 The embodiment of the present application provides a method for enhancing the anti-quantum security of a secure shell protocol of a communication network, wherein the communication network includes a first network device and a second network device, and the method is used for the second network device, and the method includes:

[0198] 031: Exchange information with the first network device, and generate a hash key and an initial session key according to the second information of the second network device and the first information obtained through the information exchange;

[0199] 032: receiving a first encryption result obtained by the first network device performing post-quantum cryptographic encryption processing on the quantum key identifier according to the hash key and the initial session key, where the quantum key identifier is obtained by the first network device from the first network node to which it is connected;

[0200] 033: Decrypt the first encryption result to obtain a first decryption result;

[0201] 034: Perform post-quantum cryptographic encryption processing on the first decryption result to obtain a second encryption result, and send the second encryption result to the first network device;

[0202] 035: Generate a quantum-resistant session key according to the initial session key, the first decryption result, the second encryption result and the second quantum key to encrypt the communication between the first network device and the second network device.

[0203] The embodiment of the present application also provides a second network device, including a memory and a processor. The method of the embodiment of the present application can be implemented by the second network device of the embodiment of the present application. Specifically, a computer program is stored in the memory, and the processor is used to exchange information with the first network device, and generate a hash key and an initial session key according to the second information of the second network device and the first information obtained through the information exchange. And receive the first encryption result of the first network device performing post-quantum cryptographic encryption processing on the quantum key identifier, and the quantum key identifier is obtained by the first network device from the first network node accessed. The processor is also used to decrypt the first encryption result to obtain a first decryption result. And perform post-quantum cryptographic encryption processing on the first decryption result to obtain a second encryption result, and send the second encryption result to the first network device. And generate a quantum-resistant session key based on the initial session key, the first decryption result, the second encryption result and the second quantum key to encrypt the communication between the first network device and the second network device.

[0204] The embodiment of the present application also provides a second network device security enhancement device. The method of the embodiment of the present application can be implemented by the second network device security enhancement device of the embodiment of the present application. Specifically, the second network device security enhancement device includes a switching module, a receiving module, a decryption module, an encryption module and a derivation module. The switching module is used to exchange information with the first network device, and generate a hash key and an initial session key according to the second information of the second network device and the first information obtained by the information exchange. The receiving module is used to receive the first encryption result of the first network device performing post-quantum cryptographic encryption on the quantum key identifier, and the quantum key identifier is obtained by the first network device from the first network node accessed. The decryption module is used to decrypt the first encryption result to obtain the first decryption result. The encryption module is used to perform post-quantum cryptographic encryption on the first decryption result to obtain the second encryption result, and send the second encryption result to the first network device. The derivation module is used to generate a quantum-resistant session key according to the initial session key, the first decryption result, the second encryption result and the second quantum key to encrypt the communication between the first network device and the second network device.

[0205] The present application provides a communication system based on a secure shell protocol, the communication system comprising a second network device of the above-mentioned implementation mode, a first network device and a quantum key distribution network, and the quantum key distribution network is configured to distribute quantum keys to the first network device or the second network device.

[0206] Specifically, the anti-quantum security enhancement method of this embodiment is basically the same as the anti-quantum security enhancement method of the aforementioned embodiment with the first network device as the execution object. For details, please refer to the explanation of the corresponding part. The difference is that this embodiment takes the second network device as the execution object, which will not be repeated here.

[0207] In summary, in the anti-quantum security enhancement method, communication system, first network device and second network device of the secure shell protocol of the communication network of the implementation mode of the present application, for the communication process between the first network device and the second network device, the first network device and the second network device apply for a quantum key, and use a post-quantum cryptographic algorithm to encrypt the quantum key to generate an anti-quantum key that can resist quantum computing attacks. The post-quantum cryptographic algorithm is a series of encryption algorithms designed to resist quantum computing attacks. And the first network device and the second network device generate an initial session key through key exchange, and then the initial session key, the anti-quantum key and the quantum key are integrated and used in the communication between the first network device and the second network device. In this way, the ability of the network communication between the first network device and the second network device to resist quantum computing attacks is enhanced.

[0208] See also Fig.12 In some embodiments, the first encryption result includes a first encapsulated message, and the method further includes:

[0209] 036: Obtain a first encrypted message according to the first encapsulated message;

[0210] 037: Obtain a first session message and a quantum key identifier according to the first encrypted message and the initial session key.

[0211] In some embodiments, the derivation module is used to obtain a first encrypted message based on the first encapsulated message, and the processing module is used to obtain a first session message and a quantum key identifier based on the first encrypted message and the initial session key.

[0212] In some embodiments, the processor is further configured to obtain a first encrypted message based on the first encapsulated message, and obtain a first session message and a quantum key identifier based on the first encrypted message and the initial session key.

[0213] Specifically, the second network device obtains the first encrypted message according to the first encapsulated message. Then, the second network device obtains the first session message and the quantum key identifier according to the first encrypted message and the initial session key. In this way, the quantum key identifier is obtained, and the second network device can apply for the second quantum key according to the quantum key identifier.

[0214] Continuing with the above example, see Figure 3 The server performs PQC decapsulation on the first encapsulated message f1 to obtain the first encrypted message m1, and then obtains the quantum key identifier UUID_QK based on the first encrypted message m1 and the initial session key Y1.

[0215] In this way, the server obtains the quantum key identifier UUID_QK, which can be used to apply for a quantum key.

[0216] See also Fig.13 In some embodiments, the first encryption result includes a first signature message, the first decryption result includes a quantum key identifier, and the method further includes:

[0217] 038: Obtain a first verification message according to the first signature message;

[0218] 039: Perform post-quantum cryptographic signature verification on the first signature message to confirm the correctness of the first verification message, where the first verification message is obtained by concatenating the quantum key identifier and the hash key;

[0219] When the obtained quantum key identifier is correct, a second quantum key is obtained from a second network node connected to the second network device according to the quantum key identifier.

[0220] In some embodiments, the processing module is further used to obtain a first verification message according to the first signature message, and the signature verification module is used to perform post-quantum cryptographic signature verification on the first signature message to confirm the correctness of the first verification message, and the first verification message is obtained by splicing the quantum key identifier and the hash key. The acquisition module is used to obtain a second quantum key from a second network node connected to the second network device according to the quantum key identifier when the obtained quantum key identifier is correct.

[0221] In some embodiments, the processor is also used to obtain a first verification message based on the first signature message, and perform post-quantum cryptographic signature verification on the first signature message to confirm the correctness of the first verification message, the first verification message is obtained by concatenating the quantum key identifier, the first handshake random number, and the signature parameters corresponding to the public key exchange algorithm used by the network device, and when the obtained quantum key identifier is correct, obtain the second quantum key from the service node connected to the second network device, and the second quantum key is distributed to the service node by the second network node.

[0222] Specifically, the second network device obtains the first verification message based on the first signature message. Then, the second network device performs post-quantum cryptographic signature verification on the first signature message to confirm the correctness of the first verification message, which is obtained by splicing the quantum key identifier and the hash key. When the obtained quantum key identifier is correct, the second network device obtains the second quantum key from the second network node connected to the second network device based on the quantum key identifier. In this way, applying for a quantum key through a quantum key identifier ensures that the second quantum key applied for matches the first quantum key of the first network device, and the second quantum key can be used to generate a key with high security and good resistance to quantum computing attacks.

[0223] Continuing with the above example, see Figure 3 , the server obtains the first verification message according to the first signature message M1. Then, the client performs post-quantum cryptographic signature verification on the first signature message M1 to confirm that the correct first verification message has been received, that is, to confirm that the correct quantum key identifier UUID_QK has been received. When the received first verification message is correct, that is, when the received quantum key identifier UUID_QK is correct, the server applies to the second quantum network node connected to the server through the quantum key identifier UUID_QK to obtain the second quantum key QK_UUID-2.

[0224] In this way, it is ensured that the acquired second quantum key QK_UUID-2 matches the first quantum key QK_UUID-1 of the client, and the quantum key is used to generate a key with higher security.

[0225] See also Fig.14 In some implementations, step 034 (performing post-quantum cryptographic encryption processing on the first decryption result to obtain a second encryption result, and sending the second encryption result to the first network device) includes:

[0226] 0341: concatenate the quantum key identifier and the randomly generated second random number to obtain a second session message;

[0227] 0342: Encrypt the second session message according to the initial session key to obtain a second encrypted message;

[0228] 0343: Perform post-quantum cryptographic derivation processing on the second encrypted message to generate a second quantum-resistant key;

[0229] 0344: Perform post-quantum cryptographic encryption and encapsulation processing on the second encrypted message to generate a second encapsulated message in a second encryption result;

[0230] 0345: concatenate the quantum key identifier and the hash key to obtain a second verification message;

[0231] 0346: Perform post-quantum cryptographic signature processing on the second verification message to generate a second signature message in the second encryption result;

[0232] 0347: Send the second encryption result to the first network device.

[0233] In some embodiments, the splicing module is used to splice the quantum key identifier and the randomly generated second random number to obtain a second session message. The encryption module is used to encrypt the second session message according to the initial session key to obtain a second encrypted message. The derivation module is used to perform post-quantum cryptographic derivation processing on the second encrypted message to generate a second anti-quantum key. The encryption module is used to perform post-quantum cryptographic encryption encapsulation processing on the second encrypted message to generate a second encapsulated message in the second encryption result. The splicing module is also used to splice the quantum key identifier and the hash key to obtain a second verification message. The signature module is used to perform post-quantum cryptographic signature processing on the second verification message to generate a second signature message in the second encryption result. The sending module is used to send the second encryption result to the first network device.

[0234] In some embodiments, the processor is further configured to perform concatenation processing on the quantum key identifier and the randomly generated second random number to obtain a second session message, encrypt the second session message according to the initial session key to obtain a second encrypted message, and perform post-quantum cryptographic derivation processing on the second encrypted message to generate a second anti-quantum key. The processor is further configured to perform post-quantum cryptographic encryption encapsulation processing on the second encrypted message to generate a second encapsulated message in a second encryption result, concatenate the quantum key identifier and the hash key to obtain a second verification message, perform post-quantum cryptographic signature processing on the second verification message to generate a second signature message in a second encryption result, and send the second encryption result to the first network device.

[0235] Specifically, the second network device performs a splicing process on the quantum key identifier and the randomly generated second random number to obtain a second session message. Then, the second network device encrypts the second session message according to the initial session key to obtain a second encrypted message. Then, the second network device performs a post-quantum cryptographic derivation process on the second encrypted message to generate a second anti-quantum key. And the second encrypted message is subjected to a post-quantum cryptographic encryption encapsulation process to generate a second encapsulated message in the second encryption result. The second network device then performs a splicing process on the quantum key identifier and the hash key to obtain a second verification message. Thereafter, the second network device performs a post-quantum cryptographic signature process on the second verification message to generate a second signature message in the second encryption result. Finally, the second network device sends the second encryption result to the first network device. In this way, the second network device obtains a second anti-quantum key with strong anti-quantum capability, obtains a second signature message and a second encrypted message capable of generating a second anti-quantum key, and the second signature message can detect the situation where data is unauthorizedly accessed during the communication process. And the second signature message and the second encrypted message are sent to the first network device, so that the first network device can generate a second anti-quantum key.

[0236] Continuing with the above example, the second encryption result is the SSH_MSG_KEXPQCQKD_REPLY message. Figure 3 , when the post-quantum cryptographic certificate is available, the server places the client's PQC signature certificate and PQC encryption certificate in the certificates_server message of the SSH_MSG_KEXPQCQKD_REPLY message. When the post-quantum cryptographic certificate is not available, the client and server can import each other's PQC signature public key or PQC encryption public key offline. The content of the SSH_MSG_KEXPQCQKD_REPLY message sent by the server is as follows:

[0237] byte SSH_MSG_KEXPQCQKD_REPLY

[0238] string certificates_server

[0239] string encap_s

[0240] string sign_s

[0241] The server randomly generates a 128-bit random number R2 and a quantum key identifier UUID_QK (128 bits) to concatenate to obtain the second session message h2, and the concatenation method is (UUID_QK|R2). Next, the server uses the initial session key Y1 generated by the server as the key, and uses the AES symmetric encryption algorithm to encrypt h2 to obtain the second encrypted message m2 (m2=aes_enc(h2,Y1)). The server then uses the first encrypted message m2 as the encrypted message in the PQC key encapsulation algorithm, and runs the G function of the PQC algorithm on m2 to obtain the second quantum-resistant key K2. PQC encryption and encapsulation of m2 is performed to obtain the second encapsulated message f2, and the encapsulation information is used as the encap_s content.

[0242] The server concatenates the quantum key identifier UUID_QK and the hash key H to obtain the second verification message, and the concatenation method is UUID_QK|H. The client then uses the second verification message as M in the PQC signature algorithm to perform PQC signature protection to obtain the second signature message M2, and the signature information is used as the content of sign_s.

[0243] The server sends the SSH_MSG_KEXPQCQKD_REPLY message to the client.

[0244] In this way, the server obtains the second quantum-resistant key K2 with strong quantum resistance, obtains the second signature message M2 and the second encrypted message m2 that can generate the second quantum-resistant key. The second signature message M2 can detect the unauthorized access to the data during the communication process. The second signature message M2 and the second encrypted message m2 are sent to the client, so that the client can generate the second quantum-resistant key.

[0245] See also Fig.15 In some embodiments, the first decryption result includes a first encrypted message, and step 035 (generating a quantum-resistant session key according to the initial session key, the first decryption result, the second encryption result, and the second quantum key to encrypt communication between the first network device and the second network device) includes:

[0246] 0351: Obtain a first quantum-resistant key according to the first encrypted message;

[0247] 0352: Generate the initial session key, the first quantum-resistant key, the second quantum-resistant key and the second quantum key to obtain a quantum-resistant session key;

[0248] 0353: Derivation of a quantum-resistant session key to encrypt communication between a first network device and a second network device.

[0249] In some embodiments, the derivation module is further used to obtain a first quantum-resistant key according to the first encrypted message, and the processing module is further used to generate the initial session key, the first quantum-resistant key, the second quantum-resistant key, and the second quantum key to obtain a quantum-resistant session key. The derivation module is also used to derive the quantum-resistant session key to encrypt the communication between the first network device and the second network device.

[0250] In some embodiments, the processor is further configured to obtain a first quantum-resistant key according to the first encrypted message, and to generate a quantum-resistant session key from the initial session key, the first quantum-resistant key, the second quantum-resistant key, and the second quantum key. The processor is further configured to derive the quantum-resistant session key to encrypt the communication between the first network device and the second network device.

[0251] Specifically, the second network device obtains the first quantum-resistant key according to the first encrypted message. Then, the second network device generates the quantum-resistant session key from the initial session key, the first quantum-resistant key, the second quantum-resistant key and the second quantum key. Finally, the second network device derives the quantum-resistant session key to encrypt the communication between the first network device and the second network device. In this way, the quantum-resistant session key generated by combining quantum key distribution technology and post-quantum cryptography technology enhances the ability of communication between network devices to resist quantum computing attacks, and protects the data transmitted during the communication process.

[0252] Continuing with the above example, see Figure 3 , the server first obtains the first quantum-resistant key K1 according to the first encrypted message m1. Then, the client performs an XOR operation on the initial session key Y1, the first quantum-resistant key K1 in the SSH_MSG_KEXPQCQKD_INIT message, the second quantum key QK_UUID-2, and the second quantum-resistant key K2 in the SSH_MSG_KEXPQCQKD_REPLY message to obtain the quantum-resistant session key Y2 (Y2=Y1⊕QK_UUID-2⊕K1⊕K2). Then, the quantum-resistant session key Y2 is derived according to the key derivation method in the SSH transport layer protocol defined in RFC4253 to derive the initialization vector IV, encryption key, and integrity key from the server to the client. The client then sends SSH_MSG_NEWKEYS messages to the server to enable the keys negotiated in the above process for SSH user data transmission protection.

[0253] The present application also provides a computer-readable storage medium containing a computer program. When the computer program is executed by one or more processors, the one or more processors execute the voice interaction method of the present application.

[0254] It is understood that a computer program includes computer program code. The computer program code may be in source code form, object code form, executable file or some intermediate form. Computer readable storage media may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution medium.

[0255] In the description of this specification, the descriptions with reference to the terms "specifically", "further", "particularly", "understandably", etc. are intended to mean that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not intended to refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0256] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0257] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for enhancing quantum security of a secure shell protocol of a communication network, characterized in that: The communication network includes a first network device and a second network device, the method is used for the first network device, and the method includes: Acquire a first quantum key and a quantum key identifier from a first network node connected to the first network device; exchanging information with the second network device, and generating a hash key and an initial session key according to the first information of the first network device and the second information obtained through the information exchange; Performing post-quantum cryptography encryption processing on the quantum key identifier according to the hash key and the initial session key, and sending a first encryption result obtained by the post-quantum cryptography encryption processing to the second network device; decrypting the received second encryption result sent by the second network device to obtain a second decryption result, where the second encryption result is obtained by performing post-quantum cryptography encryption processing on the first decryption result by the second network device, and the first decryption result is obtained by decrypting the first encryption result by the second network device; A quantum-resistant session key is generated according to the initial session key, the first encryption result, the second decryption result and the first quantum key to encrypt communication between the first network device and the second network device.

2. The method according to claim 1, characterized in that The method further comprises: Accessing a first network node through a pre-established channel; The security certificate of the second network device or the security certificate of the first network device is loaded.

3. The method according to claim 1, characterized in that The first network node connected to the first network device obtains a first quantum key and a quantum key identifier, including: Using a service node to inject multiple keys into a cryptographic module of the first network device; Sending a quantum key application to the service node, wherein the quantum key application is protected by a protection key, and the protection key is a randomly used one from a plurality of keys injected into the cryptographic module; receiving a quantum key encryption result obtained by the service node encrypting the first quantum key and the quantum key identifier according to the protection key, where the first quantum key is generated by a first network node connected to the service node and distributed to the service node, and the quantum key identifier is obtained by the first network node identifying the first quantum key according to an identification code of the first network node; The quantum key encryption result is decrypted to obtain the first quantum key and the quantum key identifier.

4. The method according to claim 1, characterized in that: The step of performing post-quantum cryptographic encryption processing on the quantum key identifier according to the hash key and the initial session key, and sending a first encryption result obtained by the post-quantum cryptographic encryption processing to the second network device includes: Concatenating the quantum key identifier and a randomly generated first random number to obtain a first session message; Encrypting the first session message according to the initial session key to obtain a first encrypted message; Performing post-quantum cryptographic derivation processing on the first encrypted message to generate a first quantum-resistant key; Performing post-quantum cryptographic encryption and encapsulation processing on the first encrypted message to generate a first encapsulated message in the first encryption result; Concatenating the quantum key identifier and the hash key to obtain a first verification message; Performing post-quantum cryptographic signature processing on the first verification message to generate a first signature message in the first encryption result; The first encryption result is sent to the second network device.

5. The method according to claim 1, characterized in that The decrypting the received second encryption result sent by the second network device to obtain the second decryption result includes: receiving the second encryption result sent by the second network device, where the second encryption result is obtained by the second network device performing post-quantum cryptography encryption processing on the first decryption result, and the first decryption result is obtained by the second network device performing decryption processing on the first encryption result; The second encryption result is decrypted to obtain a second decryption result, where the second decryption result includes a second encrypted message and a second signed message.

6. The method according to claim 5, characterized in that The method further comprises: Obtaining a second quantum-resistant key according to the second encrypted message; A second session message and a quantum key identifier are obtained according to the second encrypted message and the initial session key.

7. The method according to claim 5, characterized in that The method further comprises: Obtain a second verification message according to the second signature message; Perform post-quantum cryptographic signature verification on the second signature message to confirm the correctness of the second verification message, where the second verification message is obtained by concatenating the quantum key identifier and the hash key.

8. The method according to claim 6, characterized in that The first encryption result includes a first quantum-resistant key, and the step of generating a quantum-resistant session key according to the initial session key, the first encryption result, the second decryption result, and the first quantum key to encrypt communication between the first network device and the second network device includes: Generate a quantum-resistant session key by using the initial session key, the first quantum-resistant key, the second quantum-resistant key and the first quantum key; The quantum resistant session key is derived to encrypt communications between the first network device and the second network device.

9. A method for enhancing quantum security of a secure shell protocol of a communication network, characterized in that: The communication network includes a first network device and a second network device, the method is used for the second network device, and the method includes: exchanging information with the first network device, and generating a hash key and an initial session key according to the second information of the second network device and the first information obtained through the information exchange; receiving a first encryption result obtained by the first network device performing post-quantum cryptographic encryption processing on a quantum key identifier according to the hash key and the initial session key, where the quantum key identifier is obtained by the first network device from the first network node to which it is connected; Decrypting the first encryption result to obtain a first decryption result; Performing post-quantum cryptographic encryption processing on the first decryption result to obtain a second encryption result, and sending the second encryption result to the first network device; A quantum-resistant session key is generated according to the initial session key, the first decryption result, the second encryption result, and the second quantum key to encrypt communication between the first network device and the second network device.

10. The method according to claim 9, characterized in that The first encryption result includes a first encapsulated message, and the method further includes: Obtain a first encrypted message according to the first encapsulated message; A first session message and the quantum key identifier are obtained according to the first encrypted message and the initial session key.

11. The method according to claim 9, characterized in that The first encryption result includes a first signature message, the first decryption result includes a quantum key identifier, and the method further includes: Obtain a first verification message according to the first signed message; Performing post-quantum cryptographic signature verification on the first signature message to confirm the correctness of a first verification message, where the first verification message is obtained by concatenating the quantum key identifier and the hash key; When the obtained quantum key identifier is correct, a second quantum key is obtained from a second network node connected to the second network device according to the quantum key identifier.

12. The method according to claim 11, characterized in that The performing post-quantum cryptographic encryption processing on the first decryption result to obtain a second encryption result, and sending the second encryption result to the first network device, includes: Concatenating the quantum key identifier and a randomly generated second random number to obtain a second session message; Encrypting the second session message according to the initial session key to obtain a second encrypted message; Performing post-quantum cryptographic derivation processing on the second encrypted message to generate a second quantum-resistant key; Performing post-quantum cryptographic encryption and encapsulation processing on the second encrypted message to generate a second encapsulated message in the second encryption result; Concatenating the quantum key identifier and the hash key to obtain a second verification message; Performing post-quantum cryptographic signature processing on the second verification message to generate a second signature message in the second encryption result; The second encryption result is sent to the first network device.

13. The method according to claim 12, characterized in that The first decryption result includes a first encrypted message, and the step of generating a quantum-resistant session key according to the initial session key, the first decryption result, the second encryption result, and the second quantum key to encrypt communication between the first network device and the second network device includes: Obtaining a first quantum-resistant key according to the first encrypted message; Generate a quantum-resistant session key by using the initial session key, the first quantum-resistant key, the second quantum-resistant key and the second quantum key; The quantum resistant session key is derived to encrypt communications between the first network device and the second network device.

Citation Information

Patent Citations

  • Method and system for achieving SSH protocol based on post-quantum key exchange

    CN108111301A

  • Bidirectional authentication key negotiation method and system supporting domestic cryptographic algorithm based on RLWE

    CN110299995A

  • Method and system for preventing tampering in mail transmission process based on quantum security key

    CN113346995A

  • Encrypted call method and system for realizing end-to-end VoIP (Voice over Internet Protocol) one-call multi-password

    CN115589292A

  • Identity authentication and key exchange method and system

    CN116684093A