Session channel establishment method, device, equipment, medium and program product
Patent Information
- Application Number
- CN202611019692.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-09
- Publication Date
- 2026-10-16
AI Technical Summary
[0005]本申请提供一种会话通道的建立方法、装置、设备、介质以及程序产品,用以解决现有MACsec密钥协商的量子安全性不高的技术问题
[0051]The session channel establishment method, apparatus, device, medium, and program product provided in this application, upon responding to a session channel establishment request, generates a master session key based on a quantum-resistant key encapsulation algorithm, then generates an encrypted secure association key based on the quantum-resistant key derivation function and the master session key, and establishes a session channel between the communication initiator and the communication receiver based on the encrypted secure association key. This application addresses the vulnerability of traditional public-key cryptography to quantum computing attacks by generating the master session key using a quantum-resistant key encapsulation algorithm. Subsequently, it uses a quantum-resistant key derivation function to generate an encrypted secure association key based on the master session key, ensuring the irreversibility of the key generation process. Finally, the encrypted secure association key is combined with a symmetric encryption algorithm to encrypt data, improving the security of the session channel. Through these steps, the low-latency characteristics of the MACsec protocol are preserved during session channel establishment, while avoiding the infrastructure modification costs incurred by replacing traditional symmetric encryption algorithms.
Smart Images

Figure CN122932962A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of quantum communication, and more particularly to a method, apparatus, device, medium, and program product for establishing a session channel. Background Technology
[0002] Link-layer security is the core guarantee for secure data transmission in network scenarios such as Ethernet communication, financial private networks, government private networks, and industrial internet. It can effectively resist network attacks such as link-layer eavesdropping and tampering, and ensure the integrity, confidentiality, and legitimacy of data transmission. Media Access Control Security (MACsec), as a standardized link-layer security encryption technology, is widely used in various high-security wired Ethernet communication scenarios due to its advantages of being lightweight, highly adaptable, and easy to deploy.
[0003] Currently, existing MACsec key agreement systems still rely on traditional public-key algorithms such as RSA or ECC. The security of traditional RSA and ECC public-key algorithms depends on the mathematical complexity of large number factorization and discrete logarithms, which cannot withstand the efficient cracking capabilities of quantum computing. This makes the key agreement process based on the Connectivity Association Key (CAK) of the MACsec Key Agreement (MKA protocol) a weak link in the overall link security. Attackers can use a "collect first, then decrypt" attack method to continuously intercept current financial transaction traffic transmitted via MACsec encryption. Then, they can use quantum computing devices to decrypt historical encrypted data in batches, causing long-term leakage of confidential data and seriously threatening the stability of the financial system and the information security of critical areas. Therefore, session channels established based on the existing MACsec key agreement system are difficult to defend against known quantum computing attacks, making the session channel insecure.
[0004] Therefore, there is an urgent need for a scheme to establish a session channel that also has quantum security. Summary of the Invention
[0005] This application provides a method, apparatus, device, medium, and program product for establishing a session channel to solve the technical problem of low quantum security in existing MACsec key negotiation.
[0006] Firstly, this application provides a method for establishing a session channel, comprising:
[0007] In response to the request to establish a session channel, a master session key is generated based on a quantum-resistant key encapsulation algorithm;
[0008] Based on the quantum-resistant key derivation function and the master session key, an encrypted secure association key is generated.
[0009] A session channel is established between the communication initiator and the communication receiver based on the encrypted security association key.
[0010] In one possible implementation, based on the quantum-resistant key derivation function and the master session key, an encrypted secure association key is generated, including:
[0011] Using a quantum-resistant key derivation function, the master session key is converted into a connection association key;
[0012] Determine the connection association key name corresponding to the connection association key;
[0013] Using a quantum-resistant key derivation function, a secure association key, a key encryption key, and a verification key are generated based on the connection association key name and the connection association key.
[0014] The security association key is encrypted based on the key encryption key to generate an encrypted security association key.
[0015] The verification key is used to generate an integrity verification value for the data sent by the communication initiator, so that the communication receiver can verify the integrity of the data based on the integrity verification value.
[0016] In one possible implementation, the method further includes:
[0017] The encrypted security association key is sent to both the communication initiator and the communication receiver via protocol frames.
[0018] In one possible implementation, the master session key is generated based on a quantum-resistant key encapsulation algorithm, including:
[0019] Public key infrastructure enables both the receiving and initiating ends of a communication to obtain each other's quantum-resistant public keys.
[0020] At the communication initiator, a quantum-resistant key encapsulation algorithm is used to encapsulate the quantum-resistant keys of both parties to generate the master session key.
[0021] The master session key is then sent to the receiving end, enabling the receiving end to decrypt the master session key using its own private key and complete the key negotiation.
[0022] In one possible implementation, before generating the master session key based on the quantum-resistant key encapsulation algorithm, the following steps are also included:
[0023] Perform a quantum-resistant key negotiation process so that the communication initiator and the communication receiver determine the quantum-resistant key encapsulation algorithm from the set of quantum-resistant algorithms.
[0024] In one possible implementation, a session channel is established between the communication initiator and the communication receiver based on an encrypted security association key, including:
[0025] An initial session channel is established between the communication initiator and the communication receiver based on the encrypted security association key.
[0026] The data in the initial session channel is encrypted using a symmetric encryption algorithm to obtain the session channel.
[0027] Secondly, this application provides a device for establishing a session channel, comprising:
[0028] The response module is used to generate the master session key based on the quantum-resistant key encapsulation algorithm in response to the session channel establishment request.
[0029] The generation module is used to generate an encrypted secure association key based on the quantum-resistant key derivation function and the master session key;
[0030] The module establishes a session channel between the communication initiator and the communication receiver based on the encrypted security association key.
[0031] In one possible implementation, the generation module is further configured to:
[0032] Using a quantum-resistant key derivation function, the master session key is converted into a connection association key;
[0033] Determine the connection association key name corresponding to the connection association key;
[0034] Using a quantum-resistant key derivation function, a secure association key, a key encryption key, and a verification key are generated based on the connection association key name and the connection association key.
[0035] The security association key is encrypted based on the key encryption key to generate an encrypted security association key.
[0036] The verification key is used to generate an integrity verification value for the data sent by the communication initiator, so that the communication receiver can verify the integrity of the data based on the integrity verification value.
[0037] In one possible implementation, the response module is also used for:
[0038] The encrypted security association key is sent to both the communication initiator and the communication receiver via protocol frames.
[0039] In one possible implementation, the response module is also used for:
[0040] Public key infrastructure enables both the receiving and initiating ends of a communication to obtain each other's quantum-resistant public keys.
[0041] At the communication initiator, a quantum-resistant key encapsulation algorithm is used to encapsulate the quantum-resistant keys of both parties to generate the master session key.
[0042] The master session key is then sent to the receiving end, enabling the receiving end to decrypt the master session key using its own private key and complete the key negotiation.
[0043] In one possible implementation, the response module is also used for:
[0044] Perform a quantum-resistant key negotiation process so that the communication initiator and the communication receiver determine the quantum-resistant key encapsulation algorithm from the set of quantum-resistant algorithms.
[0045] In one possible implementation, the setup module is also used for:
[0046] An initial session channel is established between the communication initiator and the communication receiver based on the encrypted security association key.
[0047] The data in the initial session channel is encrypted using a symmetric encryption algorithm to obtain the session channel.
[0048] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the aforementioned method.
[0049] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the aforementioned method.
[0050] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0051] The session channel establishment method, apparatus, device, medium, and program product provided in this application, upon responding to a session channel establishment request, generates a master session key based on a quantum-resistant key encapsulation algorithm, then generates an encrypted secure association key based on the quantum-resistant key derivation function and the master session key, and establishes a session channel between the communication initiator and the communication receiver based on the encrypted secure association key. This application addresses the vulnerability of traditional public-key cryptography to quantum computing attacks by generating the master session key using a quantum-resistant key encapsulation algorithm. Subsequently, it uses a quantum-resistant key derivation function to generate an encrypted secure association key based on the master session key, ensuring the irreversibility of the key generation process. Finally, the encrypted secure association key is combined with a symmetric encryption algorithm to encrypt data, improving the security of the session channel. Through these steps, the low-latency characteristics of the MACsec protocol are preserved during session channel establishment, while avoiding the infrastructure modification costs incurred by replacing traditional symmetric encryption algorithms. Attached Figure Description
[0052] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0053] Figure 1 A flowchart illustrating a method for establishing a session channel provided in this application. Figure 1 ;
[0054] Figure 2 A flowchart illustrating a method for establishing a session channel provided in this application. Figure 2 ;
[0055] Figure 3 A schematic diagram of the structure of a session channel establishment device provided in this application;
[0056] Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application.
[0057] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0058] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.
[0059] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize or refuse.
[0060] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0061] It should be noted that the method, apparatus, device, medium, and program product for establishing a session channel provided in this application can be used in the field of quantum communication, or in any field other than quantum communication. The application field of the method, apparatus, device, medium, and program product for establishing a session channel in this application is not limited.
[0062] Link-layer security is a core safeguard for secure data transmission in network scenarios such as Ethernet communication, financial private networks, government private networks, and industrial internet. It can effectively resist network attacks such as link-layer eavesdropping, tampering, and forgery, ensuring the integrity, confidentiality, and legitimacy of data transmission. MACsec, as a standardized link-layer security encryption technology, is widely used in various high-security wired Ethernet communication scenarios due to its lightweight, highly adaptable, and easy-to-deploy advantages.
[0063] Currently, existing MACsec key negotiation systems still rely on traditional public-key algorithms such as RSA or ECC. The security of traditional RSA and ECC public-key algorithms depends on the mathematical complexity of large number factorization and discrete logarithms, which cannot withstand the efficient cracking capabilities of quantum computing. This makes the CAK key negotiation process based on the MKA protocol a weak link in the overall link security. Attackers can use a "collect first, then decrypt" attack method to continuously intercept current financial transaction traffic transmitted via MACsec encryption. Then, they can use quantum computing devices to decrypt historical encrypted data in batches, causing long-term leakage of confidential data and seriously threatening the stability of the financial system and the information security of critical areas. Therefore, session channels established based on the existing MACsec key negotiation system are difficult to defend against known quantum computing attacks, making the session channel's security low.
[0064] Therefore, there is an urgent need for a scheme to establish a session channel that also has quantum security.
[0065] The session channel establishment method, apparatus, device, medium, and program product provided in this application, upon responding to a session channel establishment request, generates a master session key based on a quantum-resistant key encapsulation algorithm, then generates an encrypted secure association key based on the quantum-resistant key derivation function and the master session key, and establishes a session channel between the communication initiator and the communication receiver based on the encrypted secure association key. This application can be implemented based on a MACsec link architecture between the communication initiator, the communication receiver, and the two, thereby switching the core key generation mechanism in the session establishment process to a quantum-resistant technology path without deviating from the existing application architecture, thus enhancing the long-term security of the session channel establishment process.
[0066] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0067] Figure 1 A flowchart illustrating a method for establishing a session channel provided in this application. Figure 1 ,like Figure 1 As shown in the embodiments of this application, the method for establishing a session channel includes:
[0068] S101. In response to the request to establish a session channel, generate a master session key based on a quantum-resistant key encapsulation algorithm.
[0069] The communication initiator can be a switching device, network interface card, or module with secure communication processing capabilities deployed on the link sending side, and the communication receiving end can be a corresponding switching device, network interface card, or secure communication module deployed on the link receiving side.
[0070] The establishment request for a session channel can be triggered by the first arrival of a service flow or by a link establishment command issued by the service management platform. Specifically, when the first frame of service data, such as a financial transaction message or Ethernet service traffic, is detected to be flowing in, and a transmission demand is determined, the MKA key negotiation and MACsec secure session channel creation process is automatically triggered, and a session channel link is created as needed; or, based on service scheduling policies, scheduled tasks, and manual maintenance instructions, the service management platform issues a link establishment control command to the network devices at both ends in advance; upon receiving the command, the network devices at both ends immediately initiate CAK key negotiation and secure session channel establishment.
[0071] Quantum-resistant key encapsulation algorithms are used to generate shared keys during the session establishment phase. Specifically, they replace the negotiation process that originally relied on traditional public-key cryptography with a negotiation process based on the principle of quantum-resistant cryptography.
[0072] The master session key is a consistent key material obtained by the communication initiator and the communication receiver through this quantum-resistant key encapsulation algorithm. It is used as the basic input for subsequent key derivation and session channel establishment.
[0073] For example, in response to a request to establish a session channel, the communication initiator and the communication receiver first execute a quantum-resistant key negotiation process to determine a quantum-resistant key encapsulation algorithm; further, a master session key is generated based on the quantum-resistant key encapsulation algorithm determined through negotiation.
[0074] In addition, to ensure the consistency of subsequent processing steps in the establishment of subsequent session channels, the communication receiving end and the communication initiating end can also bind the session identifier, the corresponding device identifiers of both ends, and the context of the master session key, so as to distinguish the key materials generated by different sessions.
[0075] The master session key is generated based on a quantum-resistant key encapsulation algorithm, which does not rely on RSA or ECC algorithms. This ensures that the intercepted and long-term stored link-layer negotiation traffic does not correspond to a directly recoverable historical session key in a quantum computing scenario, thus providing a long-term security foundation for the establishment of subsequent security associations.
[0076] In one possible implementation, before generating the master session key based on the quantum-resistant key encapsulation algorithm, the following steps are also included:
[0077] Perform a quantum-resistant key negotiation process so that the communication initiator and the communication receiver determine the quantum-resistant key encapsulation algorithm from the set of quantum-resistant algorithms.
[0078] Master Session Key (MSK)
[0079] The quantum-resistant key negotiation process is used to perform algorithm capability matching and algorithm selection before the session channel is established, in order to determine the quantum-resistant key encapsulation algorithm required for the session channel establishment. The quantum-resistant algorithm set pre-configures multiple candidate quantum-resistant key encapsulation algorithms for negotiation; this set of quantum-resistant algorithms can be loaded by the communication device's software protocol stack, or distributed by the public key infrastructure to the communication initiator and receiver, enabling both parties to negotiate within the same candidate range.
[0080] Quantum-resistant key encapsulation algorithms can include lattice-based algorithms, encoding-based algorithms, or other key encapsulation algorithms that meet quantum-resistant security requirements. The specific algorithm used is jointly determined by the communication initiator and the communication receiver during the negotiation process. Based on the multi-configuration options of the quantum-resistant algorithm set, different security requirements can be met, and it supports compatible communication with traditional MKA devices, significantly reducing deployment costs.
[0081] For example, after receiving a session channel establishment request, the initiating end first sends an information negotiation message carrying algorithm identifiers. This message may include a set of quantum-resistant algorithm identifiers supported by the initiating end, version information, and negotiation parameters. The receiving end parses the message, selects algorithm identifiers compatible with the peer from its own supported algorithm set, and feeds back the selection results to the initiating end. The initiating and receiving ends confirm the consistency of candidate algorithms according to the same negotiation rules, ultimately determining the quantum-resistant key encapsulation algorithm used for subsequent main session key generation; the confirmed quantum-resistant key encapsulation algorithm, such as Module-Lattice-Based Key-EncapsulationMechanism, is abbreviated as ML-KEM.
[0082] By first executing a quantum-resistant key negotiation process, the communication initiator and receiver can complete the algorithm consistency selection within the same set of quantum-resistant algorithms. The subsequent key encapsulation process can be directly executed based on the agreed-upon algorithm, thereby enabling the session establishment process to introduce quantum-resistant security capabilities while maintaining compatibility with the link-layer secure communication architecture, and giving the key foundation in the session establishment phase higher quantum security.
[0083] In one possible implementation, the master session key is generated based on a quantum-resistant key encapsulation algorithm, and the specific process is as follows:
[0084] Public key infrastructure enables both the receiving and initiating ends of a communication to obtain each other's quantum-resistant public keys.
[0085] At the communication initiator, a quantum-resistant key encapsulation algorithm is used to encapsulate the quantum-resistant keys of both parties to generate the master session key.
[0086] The master session key is then sent to the receiving end, enabling the receiving end to decrypt the master session key using its own private key and complete the key negotiation.
[0087] In summary, after receiving the session channel establishment request and determining the quantum-resistant key encapsulation algorithm, the communication initiator executes the following steps for the master session key: First, it reads and verifies the certificates of both the communication receiver and the communication initiator through the public key infrastructure (PKI), and then obtains the corresponding quantum-resistant public keys for both parties. Subsequently, based on the determined quantum-resistant key encapsulation algorithm, the communication initiator encapsulates the quantum-resistant keys of both parties to generate the master session key, and sends the negotiation information containing the master session key to the communication receiver. Further, after receiving the negotiation information, the communication receiver calls its own stored private key to perform a decapsulation operation, recovers the master session key consistent with that of the communication initiator, and completes the key negotiation between the two parties accordingly. The public key infrastructure (PKI) can be deployed in existing authentication servers or certificate service nodes; this application does not limit its deployment in this regard.
[0088] For example, in a financial transaction scenario, after obtaining the quantum-resistant public keys of communication initiator A and communication receiver B through PKI, communication initiator A generates a master session key using a quantum-resistant key encapsulation algorithm and sends the master session key to communication receiver B. Communication receiver B decrypts the master session key using its own private key to obtain the key generated by communication initiator A, thus completing key negotiation.
[0089] The establishment of the master session key is accomplished using a quantum-resistant key encapsulation algorithm, enabling the key negotiation phase to be switched to a quantum-secure path. Since the receiving end relies solely on its own private key to recover the shared key, the negotiation results are consistent and can be integrated with existing link-layer secure communication architectures, thereby enhancing the long-term security of the session establishment phase.
[0090] S102. Generate an encrypted secure association key based on the quantum-resistant key derivation function and the master session key.
[0091] The quantum-resistant key derivation function (KDF) is used to further convert the master session key into key material that can directly serve the establishment of the session channel; the secure association key (SAK) is a service protection key used for link layer security association.
[0092] A secure association key for the current session is generated using a quantum-resistant key derivation function and the master session key. This secure association key is then encrypted to form an encrypted secure association key. By first generating the master session key using a quantum-resistant key encapsulation algorithm, then converting the master session key into a secure association key using a quantum-resistant key derivation function, and finally encrypting this secure association key, the key negotiation layer, key derivation layer, and key protection layer can be processed separately. Each layer is bound to the current session context, thus ensuring the consistency and confidentiality of the secure association key formation process.
[0093] In one possible implementation, an encrypted secure association key is generated based on a quantum-resistant key derivation function and the master session key, as follows:
[0094] Using a quantum-resistant key derivation function, the master session key is converted into a connection association key;
[0095] Determine the connection association key name corresponding to the connection association key;
[0096] Using a quantum-resistant key derivation function, a secure association key, a key encryption key, and a verification key are generated based on the connection association key name and the connection association key.
[0097] The security association key is encrypted based on the key encryption key to generate an encrypted security association key.
[0098] The verification key is used to generate an integrity verification value for the data sent by the communication initiator, so that the communication receiver can verify the integrity of the data based on the integrity verification value.
[0099] The Connectivity Association Key Name (CKN) is a random string used to identify the connectivity association key derived from the master session key. The Key Encryption Key (KEK) is used to encrypt and encapsulate the connectivity association key. The Integrity Check Key (ICK) is used to generate an integrity check value for the data sent by the communication initiator, enabling the communication receiver to verify data integrity based on this check value.
[0100] For example, after generating the master session key, it is first input into a quantum-resistant key derivation function and combined with session context transformation to obtain a connection association key. Then, the connection association key name is determined based on the session identifier, link identifier, or negotiation identifier. Further, using the connection association key name and the connection association key as joint input, a security association key, a key encryption key, and a verification key are generated again through the quantum-resistant key derivation function. Finally, the security association key is encrypted using the key encryption key to obtain the encrypted security association key. The security association key, key encryption key, and verification key are all derived from the same master session key using different identifiers, ensuring that each key is distinct in its purpose and preventing the mixing of derivation results. The verification key is synchronously configured at the communication initiator to calculate an integrity check value for the sent business data. After receiving the data, the communication receiver compares this integrity check value using the corresponding verification rules to confirm the integrity of the data during transmission.
[0101] After the session channel is established, when the communication receiving end and the communication initiating end transmit data based on the session channel, the communication initiating end uses the verification key to generate an integrity verification value and sends it along with the service data. After receiving the service data, the communication receiving end performs consistency verification based on the integrity verification value to determine whether the service data has been tampered with during transmission.
[0102] Understandably, the master session key is transformed step-by-step through a quantum-resistant key derivation function to form a secure associated key system with usage isolation characteristics. This secure associated key is then encrypted using a key encryption key, thereby improving the security of session key distribution and storage. The verification key independently performs integrity verification, enabling the communication receiver to perform data verification based on the integrity verification value, thus enhancing the security of link-layer session establishment and data transmission.
[0103] In one possible implementation, the method further includes:
[0104] The encrypted security association key is sent to both the communication initiator and the communication receiver via protocol frames.
[0105] Protocol frames (EAP over LAN, or EAPoL frames for short) are used as a transport protocol for key distribution.
[0106] For example, based on the address identifier, session identifier, or security association identifier corresponding to the communication receiving end and the communication initiating end respectively, the encrypted security association key is written into the data bearer area of the protocol frame, and together with the destination identifier in the frame header, the targeted transmission is completed.
[0107] Protocol frames enable both the receiving and sending ends to synchronously receive the same encrypted security association key, thus achieving key consistency at the protocol layer and laying the foundation for establishing a session channel based on this key. Furthermore, the transmission process via protocol frames is compatible with existing link-layer message processing mechanisms, thereby maintaining the availability of the existing communication architecture while ensuring reliable distribution of the encrypted security association key.
[0108] S103. Based on the encrypted security association key, establish a session channel between the communication initiator and the communication receiver.
[0109] The encrypted security association key is the direct input basis for establishing a session channel. Its role is not to directly participate in the processing of business messages, but to restore a consistent security association key after both parties have completed the corresponding processing, and to create corresponding sending security association and receiving security association based on it.
[0110] For example, the communicating parties recover or determine the security association key based on the encrypted security association key and establish a security association entry corresponding to the current session. This entry may at least include a security association number, key lifecycle parameters, and the security association key itself or its protected reference. Subsequently, the communicating parties activate the corresponding service protection state based on the established security association entry, thereby forming a session channel between the communication initiator and the communication receiver. If a key lifecycle expires, the device restarts, or a policy switch occurs during the operation of the session channel, the session channel establishment request is re-initiated, the master session key and security association key are updated according to the aforementioned S101 to S103 process, and the new security association is switched to the active state.
[0111] In one possible implementation, a session channel is established between the communication initiator and the communication receiver based on the encrypted security association key, as follows:
[0112] An initial session channel is established between the communication initiator and the communication receiver based on the encrypted security association key.
[0113] The data in the initial session channel is encrypted using a symmetric encryption algorithm to obtain the session channel.
[0114] For example, the communication initiator and the communication receiver decrypt the encrypted security association key to generate a sending security association and a receiving security association. Based on the sending security association and the receiving security association, an initial session channel (MACsec channel) between the communication receiver and the communication initiator is obtained. Then, the data in the MACsec channel is encrypted using a symmetric encryption algorithm to establish the final session channel.
[0115] Data encryption is achieved through a symmetric encryption algorithm, preserving the low-latency characteristics of the MACsec protocol while ensuring long-term data security.
[0116] The session channel establishment method provided in this embodiment, upon responding to a session channel establishment request, generates a master session key based on a quantum-resistant key encapsulation algorithm, then generates an encrypted secure association key based on the quantum-resistant key derivation function and the master session key, and establishes a session channel between the communication initiator and the communication receiver based on the encrypted secure association key. This application addresses the vulnerability of traditional public-key cryptography to quantum computing attacks by generating the master session key using a quantum-resistant key encapsulation algorithm. Subsequently, an encrypted secure association key is generated based on the master session key using a quantum-resistant key derivation function, ensuring the irreversibility of the key generation process. Finally, the encrypted secure association key is combined with a symmetric encryption algorithm to encrypt data, improving the security of the session channel. Through these steps, the low-latency characteristics of the MACsec protocol are preserved during the session channel establishment process, while avoiding the infrastructure modification costs incurred by replacing traditional symmetric encryption algorithms.
[0117] Figure 2 A flowchart illustrating a method for establishing a session channel provided in this application. Figure 2 ,like Figure 2 As shown, the communication receiver and communication initiator execute a key negotiation process to determine a quantum-resistant key encapsulation algorithm. Then, they distribute and obtain their respective quantum-resistant public keys through a Public Key Infrastructure (PKI). After obtaining its own quantum-resistant key and the communication receiver's quantum-resistant public key, the communication initiator uses the determined quantum-resistant key encapsulation algorithm to encapsulate both parties' quantum-resistant keys, generating a master session key. This master session key is then sent to the communication receiver, enabling the communication receiver to decrypt the master session key using its own private key, thus completing the key negotiation.
[0118] After obtaining the master session key, a quantum-resistant key derivation function is used to convert it into a connection association key. In a specific example, the quantum-resistant key derivation function processes the master session key using a hash function to generate a fixed-length connection association key; the connection association key name corresponding to the connection association key is then determined. Subsequently, the quantum-resistant key derivation function is used again to derive a secure association key, a key encryption key, and a verification key based on the connection association key and the connection association key name.
[0119] Furthermore, the security association key is encrypted using the key encryption key to obtain the encrypted security association key. Based on the encrypted security association key, an initial session channel is established between the communication receiver and the communication initiator. Then, the data in the initial session channel is encrypted using a symmetric encryption algorithm to generate the session channel.
[0120] In summary, this application generates quantum-safe master session keys by embedding a quantum-resistant key encapsulation algorithm into the MKA protocol. To accommodate existing symmetric encryption infrastructure, a layered architecture is designed: the quantum-resistant key encapsulation algorithm handles key generation, while the symmetric encryption algorithm handles data encryption. Furthermore, to address protocol compatibility issues, a layered derivation of the associated key and secure associated key is used through a quantum-resistant key derivation function, and a key encryption and integrity verification mechanism is designed (the key encryption key encrypts the secure associated key, and the verification key generates an integrity verification value). In addition, a progressive migration to traditional MKA devices is achieved based on the adaptability selection of the quantum-resistant algorithm set, ensuring the feasibility and scalability of the technical solution.
[0121] Figure 3 This application provides a schematic diagram of the structure of a device for establishing a session channel, as shown below. Figure 3 As shown, the session channel establishment apparatus 300 provided in this application embodiment includes:
[0122] The response module 301 is used to generate a master session key based on a quantum-resistant key encapsulation algorithm in response to a session channel establishment request.
[0123] The generation module 302 is used to generate an encrypted secure association key based on the quantum-resistant key derivation function and the master session key;
[0124] Module 303 is used to establish a session channel between the communication initiator and the communication receiver based on the encrypted security association key.
[0125] In one possible implementation, the generation module 302 is further configured to:
[0126] Using a quantum-resistant key derivation function, the master session key is converted into a connection association key;
[0127] Determine the connection association key name corresponding to the connection association key;
[0128] Using a quantum-resistant key derivation function, a secure association key, a key encryption key, and a verification key are generated based on the connection association key name and the connection association key.
[0129] The security association key is encrypted based on the key encryption key to generate an encrypted security association key.
[0130] The verification key is used to generate an integrity verification value for the data sent by the communication initiator, so that the communication receiver can verify the integrity of the data based on the integrity verification value.
[0131] In one possible implementation, the response module 301 is further configured to:
[0132] The encrypted security association key is sent to the communication initiator and the communication receiver respectively through the protocol frame.
[0133] In one possible implementation, the response module 301 is further configured to:
[0134] Public key infrastructure enables both the receiving and initiating ends of a communication to obtain each other's quantum-resistant public keys.
[0135] At the communication initiator, a quantum-resistant key encapsulation algorithm is used to encapsulate the quantum-resistant keys of both parties to generate the master session key.
[0136] The master session key is then sent to the receiving end, enabling the receiving end to decrypt the master session key using its own private key and complete the key negotiation.
[0137] In one possible implementation, the response module 301 is further configured to:
[0138] Perform a quantum-resistant key negotiation process so that the communication initiator and the communication receiver can determine the quantum-resistant key encapsulation algorithm from the set of quantum-resistant algorithms.
[0139] In one possible implementation, the establishment module 303 is further configured to:
[0140] An initial session channel is established between the communication initiator and the communication receiver based on the encrypted security association key.
[0141] The data in the initial session channel is encrypted using a symmetric encryption algorithm to obtain the session channel.
[0142] The session channel establishment device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0143] Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 4 As shown, the electronic device 40 provided in this embodiment includes at least one processor 401 and a memory 402. Optionally, the device 40 further includes a communication component 403. The processor 401, memory 402, and communication component 403 are connected via a bus 404.
[0144] In a specific implementation, at least one processor 401 executes computer execution instructions stored in memory 402, causing at least one processor 401 to perform the above-described method.
[0145] The specific implementation process of processor 401 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0146] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method; its implementation principle and technical effect are similar and will not be described in detail here.
[0147] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the technical solution of the above method embodiments. Its implementation principle and technical effects are similar, and will not be repeated here.
[0148] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0149] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0150] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0151] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0152] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0153] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0154] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0155] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only.
[0156] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for establishing a session channel, characterized in that, include: In response to the request to establish a session channel, a master session key is generated based on a quantum-resistant key encapsulation algorithm; Based on the quantum-resistant key derivation function and the master session key, an encrypted secure association key is generated; Based on the encrypted security association key, a session channel is established between the communication initiator and the communication receiver.
2. The method according to claim 1, characterized in that, The generation of the encrypted secure association key based on the quantum-resistant key derivation function and the master session key includes: The master session key is converted into a connection association key using the quantum-resistant key derivation function. Determine the connection association key name corresponding to the connection association key; Using the quantum-resistant key derivation function, the security association key, key encryption key, and verification key are generated based on the connection association key name and the connection association key; The security association key is encrypted based on the key encryption key to generate the encrypted security association key; The verification key is used to generate an integrity verification value for the data sent by the communication initiator, so that the communication receiver can verify the integrity of the data based on the integrity verification value.
3. The method according to claim 2, characterized in that, The method further includes: The encrypted security association key is sent to the communication initiator and the communication receiver respectively via protocol frames.
4. The method according to claim 1, characterized in that, The master session key is generated based on a quantum-resistant key encapsulation algorithm, including: Through public key infrastructure, the communication receiver and the communication initiator can obtain each other's quantum-resistant public keys; Through the communication initiator, the quantum-resistant key encapsulation algorithm is used to encapsulate the quantum-resistant keys of both parties to generate the master session key; The master session key is then sent to the communication receiving end, so that the communication receiving end can decrypt the master session key using its own private key to complete the key negotiation.
5. The method according to claim 4, characterized in that, Before generating the master session key based on the quantum-resistant key encapsulation algorithm, the following steps are also included: A quantum-resistant key negotiation process is executed so that the communication initiator and the communication receiver determine the quantum-resistant key encapsulation algorithm from a set of quantum-resistant algorithms.
6. The method according to claim 1, characterized in that, The establishment of a session channel between the communication initiator and the communication receiver based on the encrypted security association key includes: Based on the encrypted security association key, an initial session channel is established between the communication initiator and the communication receiver. The data in the initial session channel is encrypted using a symmetric encryption algorithm to obtain the session channel.
7. A device for establishing a session channel, characterized in that, include: The response module is used to generate the master session key based on the quantum-resistant key encapsulation algorithm in response to the session channel establishment request. The generation module is used to generate an encrypted secure association key based on the quantum-resistant key derivation function and the master session key; A module is established to create a session channel between the communication initiator and the communication receiver based on the encrypted security association key.
8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.