IP encryption transmission software framework system adaptive to different IPSec protocols and related method
By using an IP encrypted transmission software framework system that adapts to different IPSec protocols in the Linux system, and using user mode for IPSec protocol processing, it solves the complexity of debugging and troubleshooting caused by kernel mode processing, and achieves high performance and convenience. IPSec protocol processing.
Patent Information
- Application Number
- CN202411099767.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-10-01
AI Technical Summary
In Linux systems, the IPSec protocol processing function is placed in the kernel state, which makes debugging difficult, problem locating, and troubleshooting complex.
Provides an IP encrypted transmission software framework system that adapts to different IPSec protocols. Through the kernel state message interception processing module and the user state IP encrypted transmission service module, the netfilter framework is used to intercept IP messages at the HOOK point, and in the user state Perform encryption or decryption processing, support the replacement of processing modules of different IPSec protocols, and combine the data sending and receiving scheduling framework and configuration management tools to achieve flexible IPSec protocol processing.
It improves the convenience of debugging and troubleshooting without affecting performance, reduces the complexity of problem location and troubleshooting, takes into account both performance and convenience, and improves the overall performance and security of the system.
Smart Images

Figure CN118740515A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer, Internet data transmission and information technology, and in particular to an IP encryption transmission software framework system and related methods adapted to different IPSec protocols, and more specifically to an IP encryption transmission software framework system and data processing method adapted to different IPSec protocols. Background Art
[0002] IPSec (Internet Protocol Security) is a security and confidentiality architecture proposed by the Internet Engineering Task Force (IETF) to protect IP layer communications. IPSec protects the integrity and confidentiality of data in network transmission by encrypting and authenticating IP protocol packets. Although the standard IPSec protocol has been widely used, it is often necessary to make some custom modifications in actual projects to meet the IP encryption requirements of specific projects.
[0003] In Linux systems, the netfilter framework provides a complete set of HOOK function management mechanisms, making packet filtering, network address translation (NAT), and protocol-based connection tracking possible. Netfilter implements packet processing by placing detection points (HOOKs) at several locations in the network process and registering processing functions at each detection point. However, netfilter is a kernel-mode framework. Although placing IPSec protocol processing related functions in kernel-mode processing can improve performance, it also brings problems such as inconvenient debugging, difficulty in locating problems, and serious consequences of failures. Summary of the invention
[0004] In view of this, based on the prior art, since the IPSec protocol processing function is placed in the kernel state, there are problems such as difficulty in debugging, difficulty in problem location, and complex fault handling. The present invention provides an IP encryption transmission software framework system and related methods that can adapt to different IPSec protocols, so as to perform flexible IPSec protocol processing in the user state, taking into account both performance and debugging convenience.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] In a first aspect, the present invention provides an IP encryption transmission software framework system adapted to different IPSec protocols, comprising:
[0007] The kernel-mode message interception processing module uses the netfilter framework to intercept IP messages at different HOOK points, and determines whether to forward them to the user-mode IP encryption transmission service for encryption or decryption processing according to the configuration of the security rules;
[0008] The user-mode IP encryption transmission service module is used to receive IP messages intercepted by the kernel mode, and encrypt, decrypt, and send these IP messages. It consists of a data transmission and reception scheduling framework and an IPSec protocol processing module, and supports the replacement of different IPSec protocol processing modules.
[0009] A user-mode configuration management tool that provides security rule configuration and service start, stop, and status viewing functions.
[0010] Furthermore, the IP encryption transmission service module includes:
[0011] The data transmission and reception scheduling framework is used to receive the IP messages to be processed forwarded by the kernel-state message interception processing module, and call the IPSec protocol processing module to encrypt or decrypt the messages according to the HOOK position and the IP message status, and then send the processed messages to the destination; the framework provides a standard interface for interacting with the IPSec protocol processing module;
[0012] The IPSec protocol processing module is used to encrypt and decrypt IP messages and support IPSec protocol encapsulation and decapsulation; this module implements a standard interface for interacting with the data transmission and reception scheduling framework, and different IPSec protocol processing modules need to be implemented for different IPSec protocols.
[0013] Furthermore, the data transmission and reception scheduling framework includes:
[0014] The kernel data receiving thread is used to receive the IP message to be processed forwarded by the kernel state message interception processing module;
[0015] The encryption thread is used to encrypt the encrypted message by calling the IPSec protocol processing module and send it to the destination;
[0016] The decryption thread is used to decrypt the message to be decrypted by calling the IPSec protocol processing module and send it to the local application.
[0017] Furthermore, the kernel-mode message interception processing includes:
[0018] Security rule management module, used to manage and cache security rules issued from user mode;
[0019] The message interception and forwarding module intercepts messages at multiple HOOKs provided by the netfilter framework and processes the intercepted messages according to security rules. The specific processing methods include releasing, discarding, and forwarding to the user-state IP encrypted transmission service for encryption and decryption.
[0020] In a second aspect, the present invention further provides a data processing method for IP encryption transmission software adapted to different IPSec protocols, using the IP encryption transmission software framework system adapted to different IPSec protocols as described in any one of the first aspects, the data processing method comprising:
[0021] Configure the required security rules through the configuration management tool in the framework system;
[0022] After configuring the security rules, start the user-mode IP encryption transmission service module;
[0023] When the data transmission and reception scheduling framework of the IP encryption transmission service module is started, the configured security rules are initialized and the configured security rules are sent to the kernel state message interception processing module;
[0024] The message interception processing module caches the received security rules for query and use when each netfilter HOOK function in the module is executed;
[0025] Based on the IP encryption transmission software framework system, the IP encryption software implements the sending and / or receiving processing of data.
[0026] Furthermore, based on the IP encryption transmission software framework system, the IP encryption software implements the data transmission processing, including:
[0027] The kernel-mode packet interception processing module intercepts the IP packets sent by the application at the LOCAL_OUT HOOK and searches for the security rule cache;
[0028] If encryption is required, it is forwarded to the kernel data receiving thread of the user-mode data sending and receiving scheduling framework;
[0029] After the kernel data receiving thread receives the IP message, it determines that it is a message to be encrypted and forwards it to the encryption thread;
[0030] The encryption thread calls the IPSec protocol processing module to perform encryption processing to obtain an encrypted IP message;
[0031] The encryption thread sends the encrypted IP message to the destination through the original socket;
[0032] If the LOCAL_OUT HOOK function of the message interception processing module determines that it is an encrypted IP message, it will be released and sent to the destination normally.
[0033] Furthermore, based on the IP encryption transmission software framework system, the IP encryption software receives and processes data, including:
[0034] The kernel-mode message interception processing module intercepts the message sent from the remote end at LOCAL_IN HOOK; searches the security rule cache and determines whether the message needs to be decrypted;
[0035] If decryption is required, the message to be decrypted is forwarded to the kernel data receiving thread of the user-mode data sending and receiving scheduling framework;
[0036] After the kernel data receiving thread receives the IP message, it determines that it is a message to be decrypted and forwards it to the decryption thread;
[0037] The decryption thread calls the IPSec protocol processing module to perform decryption processing to obtain the decrypted IP message;
[0038] The decryption thread calls the original socket to send the decrypted IP message to the loopback device;
[0039] The LOCAL_OUT HOOK function of the message interception processing module determines that the data is sent to the loopback device, and then releases it;
[0040] The LOCAL_IN HOOK function of the message interception processing module determines that the data is sent to the local machine, then releases it and sends it normally to an application program of the local machine.
[0041] Through the above technical solution, it can be known that compared with the prior art, the present invention discloses an IP encryption transmission software framework system that can adapt to different IPSec protocols. By realizing the IP encryption transmission service in user mode, it closely cooperates with the netfilter framework provided by the Linux kernel to realize message interception in kernel mode and message processing in user mode. By defining the data transmission and reception scheduling framework of the IP encryption transmission service and the standard interface of the IPSec protocol processing module, it realizes compatibility with different IPSec protocol processing modules, provides IP encryption transmission service functions, and takes into account both performance and debugging convenience. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0043] Figure 1 A schematic diagram of an IP encryption transmission software framework system adapted to different IPSec protocols provided by the present invention.
[0044] Figure 2The present invention provides a data processing principle diagram of an IP encryption transmission software framework adapted to different IPSec protocols.
[0045] Figure 3 A data processing flow chart of IP encryption transmission software adapted to different IPSec protocols provided by the present invention.
[0046] Figure 4 This is a flow chart of the data transmission process of the IP encryption software provided by the present invention.
[0047] Figure 5 This is a flow chart of the data receiving and processing by the IP encryption software provided by the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] Embodiment 1:
[0050] Reference Figure 1 As shown, an embodiment of the present invention discloses an IP encryption transmission software framework system adapted to different IPSec protocols, which is composed of a kernel-state message interception processing module, a user-state IP encryption transmission service module, and a user-state configuration management tool.
[0051] in:
[0052] (I) Kernel-mode message interception processing module
[0053] The kernel-state packet interception processing module implements the IP packet interception processing function based on the netfilter development framework provided by Linux. The kernel-state packet interception processing module includes two parts: security rule management module and packet interception forwarding module.
[0054] Security rule management module, used to manage and cache security rules issued from user mode;
[0055] The message interception and forwarding module intercepts messages at multiple HOOKs provided by the netfilter framework and processes the intercepted messages according to security rules. The specific processing methods include releasing, discarding, and forwarding to the user-state IP encrypted transmission service for encryption and decryption.
[0056] Among them, security rule management is to manage the security rules issued by the user state, and provide the function of querying related security rules based on five-tuple information. Each security rule provides the encryption processing method of the corresponding message of the corresponding five-tuple information, including open access, secret access, and forbidden access. In the case of secret access, the security rule includes information such as the peer encryption device ID and IP.
[0057] The message interception and forwarding module adds relevant HOOK functions to the PREROUTING, LOCAL_IN, FORWARD, LOCAL_OUT and POSTROUTING HOOKs provided by the netfilter framework to perform specific processing on IP messages in the corresponding stages. The specific IP message processing methods include release, discard, forward to user state, etc. The message interception and forwarding module uses the five-tuple information of the message to query the corresponding security rules from the security rule management, and derives the specific message processing method based on the HOOK position of the message.
[0058] (ii) IP encrypted transmission service module, including a data transmission and reception scheduling framework and an IPSec protocol processing module. The IPSec protocol processing module can be replaced by other IPSEC protocol processing modules with different protocol implementations and the same interface. The IP encrypted transmission service is used to receive IP messages intercepted in the kernel state, and encrypt, decrypt, and send these IP messages;
[0059] 2.1 Data transmission and reception scheduling framework, used to receive the unprocessed IP message forwarded by the kernel-state message interception processing module, and call the IPSec protocol processing module to encrypt or decrypt the message according to the HOOK position and IP message status of the IP message, and then send the processed message to the destination. The framework provides a standard interface for interacting with the IPSec protocol processing module;
[0060] Specifically, Figure 2 As shown in the figure, the data transmission and reception scheduling framework receives the IP message to be processed forwarded by the message interception processing module to the user state, performs corresponding encryption and decryption processing on the message according to the HOOK position and IP message status of the IP message, and then resends it to the local or remote end. The thread model of the data transmission and reception scheduling framework consists of the kernel data receiving thread, encryption thread and decryption thread.
[0061] The kernel data receiving thread is the main thread. It performs some initialization operations when it starts. After the initialization is completed, the kernel data receiving processing loop begins. The initialization operations include log initialization, security rule loading and sending to the kernel, encryption thread pool initialization, decryption thread pool initialization, IP message receiving processing initialization, etc. In the kernel data receiving processing loop, it waits for the IP message forwarded by the receiving kernel, and forwards the message to the encryption thread or decryption thread for processing according to the HOOK position of the message and the message protocol type.
[0062] The encryption thread continuously takes out the IP message to be encrypted from the queue for processing. If the queue is empty, it waits for new messages to arrive. The specific processing process is to first call the IPSec protocol processing module to encrypt the IP message to obtain the encrypted IP message, and then call the original socket to send the encrypted IP message to the remote end.
[0063] The decryption thread continuously takes out the IP messages to be decrypted from the queue for processing. If the queue is empty, it waits for new messages to arrive. The specific processing process is to first call the IPSec protocol processing module to decrypt the IP message to obtain the decrypted IP message, and then call the original socket to send the decrypted IP message to the loopback device.
[0064] 2.2 IPSec protocol processing module, used to encrypt and decrypt IP messages, support IPSec protocol encapsulation and decapsulation. This module implements the standard interface for interacting with the data transmission and reception scheduling framework. Different IPSec protocol processing modules need to be implemented for different IPSec protocols.
[0065] Specifically, IPSec protocol processing provides functions such as encryption and decryption of messages, encapsulation and decapsulation of IPSec protocols, etc. IPSec protocol processing can be replaced by other IPSec protocol processing modules with different protocol implementations but the same interface. The interface between IPSec protocol processing and the data transmission and reception scheduling framework includes initialization, termination, IP message encryption, IP message decryption, scheduled execution of tasks, etc.
[0066] 3. Configuration Management Tools
[0067] The configuration management tool provides security rule configuration and service start, stop and status viewing functions. The security rules are composed of five tuples including source IP address, source port, destination IP address, destination port, protocol number, etc. The security rules of tunnel mode also include information such as the peer encryption device ID and IP.
[0068] The present invention provides an IP encryption transmission software framework system that can adapt to different IPSEC protocols. By realizing the IP encryption transmission service in user state, it closely cooperates with the netfilter framework provided by the Linux kernel to realize message interception in kernel state and message processing in user state. By defining the data transmission and reception scheduling framework of the IP encryption transmission service and the standard interface of the IPSEC protocol processing module, it realizes compatibility with different IPSEC protocol processing modules and provides IP encryption transmission service functions.
[0069] This framework system supports IP encryption transmission services that are transparent to upper layer applications and have specific IPSEC protocol requirements, without changing the overall implementation framework and framework code. By implementing IPSEC protocol processing modules that meet the framework interface requirements, it is possible to quickly implement IP encryption transmission services that are transparent to upper layer applications and have specific IPSEC protocol requirements.
[0070] Embodiment 2:
[0071] Reference Figure 3 As shown, the present invention also provides a data processing method for IP encryption transmission software adapted to different IPSec protocols, using the framework system of embodiment 1, and its working process is as follows:
[0072] Before data processing, the IP encryption software implemented based on the IP encryption transmission software framework needs to configure the required security rules through the configuration management tool in the framework. After configuring the security rules, start the IP encryption transmission service. When the data transmission and reception scheduling framework of the IP encryption transmission service is started, it will initialize the configured security rules and send the configured security rules to the kernel-state message interception processing module. The message interception processing module caches the received security rules for query and use when the netfilter HOOK functions in the module are executed.
[0073] (1) The data transmission processing flow of IP encryption software implemented based on the IP encryption transmission software framework is as follows Figure 2 , Figure 4 The specific description is as follows:
[0074] 1. The application sends an IP message;
[0075] 2. The LOCAL_OUT HOOK function of the message interception processing module intercepts the message sent by the application, searches the security rule cache, and finds that the message needs to be encrypted before being sent, and then forwards the message to the kernel data receiving thread of the user-mode data sending and receiving scheduling framework;
[0076] 3. After receiving the IP message, the kernel data receiving thread of the data sending and receiving scheduling framework determines that it is a message to be encrypted and forwards the message to the encryption thread;
[0077] 4. After receiving the IP message, the encryption thread calls the encryption interface processed by the IPSec protocol to obtain the encrypted IP message;
[0078] 5. The encryption thread calls the original socket to send the encrypted IP message to the destination;
[0079] 6. The LOCAL_OUT HOOK function of the message interception processing module determines that it is an encrypted IP message, so it is released and sent to the destination normally.
[0080] (2) The data receiving and processing flow of the IP encryption software implemented based on the IP encryption transmission software framework is as follows: Figure 2 , Figure 5 The specific description is as follows:
[0081] 1. The message interception processing module LOCAL_IN HOOK function intercepts the message sent from the remote end;
[0082] 2. The message interception processing module searches the security rule cache and determines that the message is an IP encrypted message sent from the remote end, and then forwards the message to the kernel data receiving thread of the user-mode data sending and receiving scheduling framework;
[0083] 3. After receiving the IP message, the kernel data receiving thread of the data sending and receiving scheduling framework determines that it is a message to be decrypted and forwards the message to the decryption thread;
[0084] 4. After receiving the IP message, the decryption thread calls the decryption interface processed by the IPSec protocol to obtain the decrypted IP message;
[0085] 5. The decryption thread calls the original socket to send the decrypted IP message to the loopback device;
[0086] 6. The LOCAL_OUT HOOK function of the message interception processing module determines that the data is sent to the loopback device and releases it;
[0087] 7. The LOCAL_IN HOOK function of the message interception processing module determines that the data is sent to the local machine, so it is released and sent normally to an application on the local machine.
[0088] For example:
[0089] Assume that company A needs to implement secure communication between different branches in its intranet, and needs to use a customized IPSec protocol to meet security requirements. To this end, the company can use the IP encryption transmission software framework system that can adapt to different IPSec protocols of the present invention, develop an IPSec protocol processing module that supports the customized IPSec protocol according to the standard interface provided by the framework, and integrate the newly developed IPSec protocol processing module with the IP encryption transmission software framework to obtain IP transmission encryption software that supports the customized IPSec protocol. The IP encryption transmission software framework system includes the following parts:
[0090] 1) Kernel-mode message interception processing module
[0091] Security rule management module: manages and caches security rules issued from user mode.
[0092] Message interception and forwarding module: intercepts IP messages at the netfilterHOOK point and decides whether to forward the messages to the user state for encryption or decryption based on security rules.
[0093] 2) User-mode IP encryption transmission service
[0094] Data transmission and reception scheduling framework: Receives IP messages forwarded by the kernel state, calls the IPSec protocol processing module for encryption or decryption, and finally sends the message to the destination.
[0095] IPSec protocol processing module: encrypts and decrypts IP messages, and supports protocol encapsulation and decapsulation.
[0096] 3) User-mode configuration management tool: provides functions such as security rule configuration, service start and stop, and status viewing.
[0097] 1. Data sending process
[0098] ①The application sends an IP message.
[0099] ②The message is intercepted by the kernel-mode message interception and forwarding module at the LOCAL_OUT HOOK point.
[0100] ③ The security rule management module searches the cached security rules and determines that the message needs to be encrypted.
[0101] ④The message is forwarded to the kernel data receiving thread of the user-mode data sending and receiving scheduling framework.
[0102] ⑤The kernel data receiving thread passes the message to the encryption thread.
[0103] ⑥The encryption thread calls the IPSec protocol processing module to encrypt the message.
[0104] ⑦The encrypted message is sent to the destination through the original socket.
[0105] 2. Data Receiving and Processing Flow
[0106] a. The remote end sends an encrypted IP message.
[0107] b. The message is intercepted by the kernel-mode message interception and forwarding module at the LOCAL_IN HOOK point.
[0108] c. The security rule management module searches the cached security rules and determines that the message needs to be decrypted.
[0109] d. The message is forwarded to the kernel data receiving thread of the user-mode data sending and receiving scheduling framework.
[0110] e. The kernel data receiving thread passes the message to the decryption thread.
[0111] f. The decryption thread calls the IPSec protocol processing module to decrypt the message.
[0112] g. The decrypted message is sent to the local application through the loopback device.
[0113] This solution supports different IPSec protocol processing modules, and can quickly implement IP encrypted transmission services that support different IPSec protocols without changing the overall framework and code, with strong adaptability. By placing the IPSec protocol processing function in the user state, the system debugging and maintenance convenience is improved, and the complexity of problem location and fault handling is reduced. Although the processing logic is placed in the user state, the system performance is well guaranteed through the reasonable design of the data transmission and reception scheduling framework and efficient thread management. In addition, through the collaboration of the security rule management module and the message interception and forwarding module, the refined control and processing of IP messages are realized, which improves the security of network communications.
[0114] This technical solution can not only meet the security communication needs between different branches of the enterprise intranet, but also provide good flexibility, scalability and debugging and maintenance convenience, effectively improving the overall performance and security of the system.
[0115] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0116] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An IP encryption transmission software framework system adapted to different IPSec protocols, characterized in that: include: The kernel-mode message interception processing module uses the netfilter framework to intercept IP messages at different HOOK points, and determines whether to forward them to the user-mode IP encryption transmission service module for encryption or decryption processing according to the configuration of the security rules; The user-mode IP encryption transmission service module is used to receive IP messages intercepted by the kernel mode, and encrypt, decrypt, and send these IP messages. It consists of a data transmission and reception scheduling framework and an IPSec protocol processing module, and supports the replacement of different IPSec protocol processing modules. A user-mode configuration management tool that provides security rule configuration and service start, stop, and status viewing functions.
2. The IP encryption transmission software framework system adapted to different IPSec protocols according to claim 1 is characterized in that: The IP encryption transmission service module comprises: The data transmission and reception scheduling framework is used to receive the IP messages to be processed forwarded by the kernel-state message interception processing module, and call the IPSec protocol processing module to encrypt or decrypt the messages according to the HOOK position and the IP message status, and then send the processed messages to the destination; the framework provides a standard interface for interacting with the IPSec protocol processing module; The IPSec protocol processing module is used to encrypt and decrypt IP messages and support IPSec protocol encapsulation and decapsulation; this module implements a standard interface for interacting with the data transmission and reception scheduling framework, and different IPSec protocol processing modules need to be implemented for different IPSec protocols.
3. The IP encryption transmission software framework system adapted to different IPSec protocols according to claim 2 is characterized in that: The data transmission and reception scheduling framework includes: The kernel data receiving thread is used to receive the IP message to be processed forwarded by the kernel state message interception processing module; The encryption thread is used to encrypt the encrypted message by calling the IPSec protocol processing module and send it to the destination; The decryption thread is used to decrypt the message to be decrypted by calling the IPSec protocol processing module and send it to the local application.
4. The IP encryption transmission software framework system adapted to different IPSec protocols according to claim 2 is characterized in that: The kernel-mode message interception processing module includes: Security rule management module, used to manage and cache security rules issued from user mode; The message interception and forwarding module intercepts messages at multiple HOOKs provided by the netfilter framework and processes the intercepted messages according to security rules. The specific processing methods include releasing, discarding, and forwarding to the user-state IP encrypted transmission service for encryption and decryption.
5. A data processing method for IP encryption transmission software adapted to different IPSec protocols, characterized in that: Using the IP encryption transmission software framework system adapted to different IPSec protocols as described in any one of claims 1 to 4, the data processing method includes: Configure the required security rules through the configuration management tool in the framework system; After configuring the security rules, start the user-mode IP encryption transmission service module; When the data transmission and reception scheduling framework of the IP encryption transmission service module is started, the configured security rules are initialized and the configured security rules are sent to the kernel state message interception processing module; The message interception processing module caches the received security rules for query and use when each netfilter HOOK function in the module is executed; Based on the IP encryption transmission software framework system, the IP encryption software implements the sending and / or receiving processing of data.
6. A data processing method for IP encryption transmission software adapted to different IPSec protocols, characterized in that: Based on the IP encryption transmission software framework system, the IP encryption software implements the data transmission processing, including: The kernel-mode packet interception processing module intercepts the IP packets sent by the application at the LOCAL_OUT HOOK and searches for the security rule cache; If encryption is required, it is forwarded to the kernel data receiving thread of the user-mode data sending and receiving scheduling framework; After the kernel data receiving thread receives the IP message, it determines that it is a message to be encrypted and forwards it to the encryption thread; The encryption thread calls the IPSec protocol processing module to perform encryption processing to obtain an encrypted IP message; The encryption thread sends the encrypted IP message to the destination through the original socket; If the LOCAL_OUT HOOK function of the message interception processing module determines that it is an encrypted IP message, it will be released and sent to the destination normally.
7. A data processing method for IP encryption transmission software adapted to different IPSec protocols, characterized in that: Based on the IP encryption transmission software framework system, the IP encryption software receives and processes data, including: The kernel-mode message interception processing module intercepts the message sent from the remote end at LOCAL_IN HOOK; searches the security rule cache and determines whether the message needs to be decrypted; If decryption is required, the message to be decrypted is forwarded to the kernel data receiving thread of the user-mode data sending and receiving scheduling framework; After the kernel data receiving thread receives the IP message, it determines that it is a message to be decrypted and forwards it to the decryption thread; The decryption thread calls the IPSec protocol processing module to perform decryption processing to obtain the decrypted IP message; The decryption thread calls the original socket to send the decrypted IP message to the loopback device; The LOCAL_OUT HOOK function of the message interception processing module determines that the data is sent to the loopback device, and then releases it; The LOCAL_IN HOOK function of the message interception processing module determines that the data is sent to the local machine, then releases it and sends it normally to an application program of the local machine.
Citation Information
Patent Citations
Application layer protocol analysis method suitable for home gateway
CN103139315A
Data transmission method of VPN server and VPN server
CN111835613A
Transmission method and device of virtual private network data
CN113055269A
IPsec protocol message encryption and decryption method based on chip scheme
CN115333859A
Decoupled header and packet processing in ipsec
US20070071007A1
Cited By
Data stream low-delay encryption transmission system, method and device, storage medium and program product
CN119603083A
