# US 2026/0089144 A1 · Secure communication implementation method with software and hardware collaborative encryption and network device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0089144 A1
- Document ID: US20260089144A1
- Status: Published application
- Kind: A1
- Application number: 19/202,667
- Filed: 2025-05-08
- Published: 2026-03-26
- Earliest claimed: 2024-06-25
- Assignees: Hangzhou Hikvision Digital Technology Co., Ltd.
- Applicants: Hangzhou Hikvision Digital Technology Co., Ltd.
- Inventors: Bin WANG; Dinglei WANG; Haibin ZHANG; Jiadong CHEN; Yinghui XIE
- Web page: https://patentgrep.com/patent/US20260089144A1

## CPC

- H04L 63/0485: {Networking architectures for enhanced packet encryption processing, e.g. offloading of IPsec packet processing or efficient security association look-up}
- H04L 9/06: the encryption apparatus using shift registers or memories for block-wise {or stream} coding, e.g. DES systems {or RC4; Hash functions; Pseudorandom sequence generators}
- H04L 63/0428: {wherein the data content is protected, e.g. by encrypting or encapsulating the payload}
- H04L 63/123: {received data contents, e.g. message integrity}
- H04L 63/164: {at the network layer}
- H04L 2212/00: Encapsulation of packets
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The present disclosure provides a secure communication implementation method with software and hardware collaborative encryption. The method includes: after receiving a first network packet, querying, by an extended framework for routing and management (XFRM) module, a first mapping table through message identification information of the first network packet to obtain SA information corresponding to the message identification information; encapsulating the SA information in the first network packet and sending an encapsulated first network packet to a programmable logic (PL) hardware module; after receiving the encapsulated first network packet, parsing, by the PL hardware module, the SA information from the encapsulated first network packet, performing Internet protocol security (IPSec) protection on the first network packet based on the SA information to obtain a secured first network packet.

## Claims

### Claim 1

A secure communication implementation method with software and hardware collaborative encryption, applied to a network device, wherein the network device comprises an extended framework for routing and management (XFRM) module and a programmable logic (PL) hardware module, the method comprising:
obtaining, by the XFRM module, message identification information and security association (SA) information corresponding to a first network packet, and recording a corresponding relationship between the message identification information and the SA information in a first mapping table; sending, by the XFRM module, the message identification information and the SA information to the PL hardware module; wherein the PL hardware module records the corresponding relationship between the message identification information and the SA information in a second mapping table;
after receiving the first network packet, querying, by the XFRM module, the first mapping table through the message identification information of the first network packet to obtain the SA information corresponding to the message identification information; encapsulating, by the XFRM module, the SA information in the first network packet and sending an encapsulated first network packet to the PL hardware module;
after receiving the encapsulated first network packet, parsing, by the PL hardware module, the SA information from the encapsulated first network packet, performing Internet protocol security (IPSec) protection on the first network packet based on the SA information to obtain a secured first network packet, and sending the secured first network packet.

### Claim 2 (depends on 1)

The method according to claim 1, wherein after querying, by the XFRM module, the first mapping table through the message identification information of the first network packet to obtain the SA information corresponding to the message identification information, the method further comprises:
checking, by the XFRM module, whether an offload function is enabled; wherein if the offload function is enabled, it indicates that IPSec protection is disabled, if the offload function is disabled, it indicates that the IPSec protection is enabled;
if the offload function is disabled, performing, by the XFRM module, the IPSec protection on the first network packet based on the SA information to obtain a secured first network packet, and sending the secured first network packet;
if the offload function is enabled, performing, by the XFRM module, the operations of encapsulating the SA information in the first network packet and sending the encapsulated first network packet to the PL hardware module.

### Claim 3 (depends on 1)

The method according to claim 1, wherein performing, by the PL hardware module, the IPSec protection on the first network packet based on the SA information to obtain the secured first network packet comprises:
performing, by the PL hardware module, media access control (MAC) parsing on the first network packet to obtain a MAC address and a first inner layer message after the MAC address; performing, by the PL hardware module, Internet protocol (IP) parsing on the first inner layer message to obtain an IP address and a second inner layer message after the IP address;
if the first network packet is an authentication header (AH) network packet or an encapsulating security payload (ESP) network packet, performing, by the PL hardware module, SA parsing on the second inner layer message to obtain the SA information and a payload message after the SA information;
if the SA information comprises symmetric key information and message authentication code key information, encrypting, by the PL hardware module, the payload message with the symmetric key information to obtain a ciphertext payload message, and calculating a message authentication code corresponding to the ciphertext payload message with the message authentication code key information; and
splicing, by the PL hardware module, the ciphertext payload message, the message authentication code, the MAC address, and the IP address to obtain the secured first network packet.

### Claim 4 (depends on 1)

The method according to claim 1, wherein after sending, by the PL hardware module, the secured first network packet, the method further comprises:
after receiving a second network packet in response to the first network packet, querying, by the PL hardware module, the second mapping table through message identification information of the second network packet to obtain the SA information; and
performing, by the PL hardware module, IPSec protection on the second network packet based on the SA information to obtain a secured second network packet, and sending the secured second network packet to the XFRM module so that the XFRM module processes the received second network packet.

### Claim 5 (depends on 4)

The method according to claim 4, wherein performing, by the PL hardware module, the IPSec protection on the second network packet based on the SA information to obtain the secured second network packet comprises:
performing, by the PL hardware module, media access control (MAC) parsing on the second network packet to obtain a MAC address and a first inner layer message after the MAC address; performing, by the PL hardware module, Internet protocol (IP) parsing on the first inner layer message to obtain an IP address and a second inner layer message after the IP address;
if the SA information comprises symmetric key information and message authentication code key information, calculating, by the PL hardware module, a message authentication code corresponding to the second inner layer message with the message authentication code key information, and determining an authentication result of the second network packet based on the message authentication code; decrypting, by the PL hardware module, the second inner layer message with the symmetric key information to obtain a plaintext payload message;
splicing, by the PL hardware module, the plaintext payload message, the authentication result, the MAC address, and the IP address to obtain the secured second network packet.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the XFRM module processes the received second network packet, comprises:
checking, by the XFRM module, whether an offload function is enabled;
if the offload function is enabled, and the second network packet is an authentication header (AH) network packet or an encapsulating security payload (ESP) network packet, parsing, by the XFRM module, the authentication result from the received second network packet; wherein the authentication result indicates that the second network packet passes message authentication or the second network packet does not pass the message authentication;
if the authentication result indicates that the second network packet passes the message authentication, forwarding, by the XFRM module, the second network packet through a physical network port; or, if the authentication result indicates that the second network packet does not pass the message authentication, discarding, by the XFRM module, the second network packet.

### Claim 7 (depends on 1)

The method according to claim 1, wherein sending, by the XFRM module, the message identification information and the SA information to the PL hardware module, wherein the PL hardware module records the corresponding relationship between the message identification information and the SA information in the second mapping table, comprises:
if the SA information is newly added SA information for the message identification information, sending, by the XFRM module, a state add command to the PL hardware module, wherein the state add command carries the message identification information and the newly added SA information; wherein the PL hardware module records the corresponding relationship between the message identification information and the newly added SA information in the second mapping table based on the state add command; or,
if the SA information is updated SA information for the message identification information, sending, by the XFRM module, a state delete command and a state add command to the PL hardware module, wherein the state delete command carries the message identification information, and the state add command carries the message identification information and the updated SA information; wherein the PL hardware module deletes the corresponding relationship between the message identification information and the SA information from the second mapping table based on the state delete command, and records a corresponding relationship between the message identification information and the newly added SA information in the second mapping table based on the state add command.

### Claim 8

A network device, comprising:
an extended framework for routing and management (XFRM) module, configured to:
obtain message identification information and security association (SA) information corresponding to a first network packet, record a corresponding relationship between the message identification information and the SA information in a first mapping table, and send the message identification information and the SA information to a programmable logic (PL) hardware module; wherein the PL hardware module is configured to record the corresponding relationship between the message identification information and the SA information in a second mapping table; and
after receiving the first network packet, query the first mapping table through the message identification information of the first network packet to obtain the SA information corresponding to the message identification information, and encapsulate the SA information in the first network packet and send an encapsulated first network packet to the PL hardware module;
the PL hardware module, configured to:
after receiving the encapsulated first network packet, parse the SA information from the encapsulated first network packet, perform Internet protocol security (IPSec) protection on the first network packet based on the SA information to obtain a secured first network packet, and send the secured first network packet.

### Claim 9 (depends on 8)

The network device according to claim 8, wherein when performing the IPSec protection on the first network packet based on the SA information to obtain the secured first network packet, the PL hardware module is configured to:
perform media access control (MAC) parsing on the first network packet to obtain a MAC address and a first inner layer message after the MAC address; perform Internet protocol (IP) parsing on the first inner layer message to obtain an IP address and a second inner layer message after the IP address;
if the first network packet is an authentication header (AH) network packet or an encapsulating security payload (ESP) network packet, perform SA parsing on the second inner layer message to obtain the SA information and a payload message after the SA information; if the SA information comprises symmetric key information and message authentication code key information, encrypt the payload message with the symmetric key information to obtain a ciphertext payload message, and calculate a message authentication code corresponding to the ciphertext payload message with the message authentication code key information; and splice the ciphertext payload message, the message authentication code, the MAC address, and IP address to obtain the secured first network packet.

### Claim 10 (depends on 8)

The network device according to claim 8, wherein the PL hardware module is further configured to:
after receiving a second network packet in response to the first network packet, query the second mapping table through message identification information of the second network packet to obtain the SA information; and perform IPSec protection on the second network packet based on the SA information to obtain a secured second network packet, and send the secured second network packet to the XFRM module;
wherein the XFRM module is further configured to process the received second network packet.
