A multi-domain encryption / decryption engine processing method, apparatus, device, and storage medium

By configuring virtual functional units and processing channels of multi-domain encryption and decryption engines, hardware-level isolation and scheduling are achieved, solving the problems of high communication overhead and insufficient concurrent processing in existing technologies, and improving the efficiency and security of encryption and decryption services.

CN123116308APending Publication Date: 2026-11-17SIENGINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611613689.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-19
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies suffer from high communication overhead and insufficient concurrent processing capabilities in encryption and decryption engines in multi-domain scenarios. Furthermore, security isolation relies on software, posing potential risks and failing to meet the requirements for high performance and security.

Method used

The encryption/decryption engine is configured to support multiple virtual functional units, each of which is allocated an independent register access space. Within each unit, processing channels are divided, and security identifiers are configured through DMA data access requests to achieve hardware-level isolation and scheduling. Cryptographic operations are performed using a shared key context buffer.

Benefits of technology

It reduces communication latency, improves concurrent processing efficiency, ensures data security and isolation, and meets the high performance and security requirements in multi-domain scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123116308A_ABST
    Figure CN123116308A_ABST
Patent Text Reader

Abstract

This invention discloses a multi-domain encryption / decryption engine processing method, apparatus, device, and storage medium, relating to the field of encryption / decryption engine technology. The method includes: configuring the encryption / decryption engine to support multiple virtual functional units (VFUs); allocating independent register access space to each VFU and mapping it to different security domains to independently receive encryption / decryption requests; dividing multiple processing channels within each VFU and scheduling encryption / decryption requests between the VFUs and between the processing channels within each VFU; responding to the scheduling result, controlling the scheduled processing channel to initiate a DMA data access request, configuring a security identifier for the DMA data access request, accessing the memory region with corresponding permissions, and obtaining the data to be processed; and utilizing the algorithm core within the encryption / decryption engine to perform cryptographic operations based on the data to be processed and according to the scheduling result. This application can support multi-domain scenarios, reduce communication overhead, and improve concurrent processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of encryption and decryption engine technology, specifically to a multi-domain encryption and decryption engine processing method, apparatus, device, and storage medium. Background Technology

[0002] With the continuous development of integrated circuit technology and system architecture, modern computing systems (especially in fields such as intelligent vehicles and edge computing servers) are evolving towards multi-domain convergence. In a complex System-on-Chip (SoC), multiple operating systems or virtual machine instances often need to run simultaneously, such as intelligent cockpit systems, autonomous driving systems, and gateway systems. These different systems constitute multiple independent security domains or host domains. To ensure the security, integrity, and trustworthiness of data interaction and authentication between these domains, the system typically needs to be equipped with a hardware encryption / decryption engine to provide cryptographic operation services.

[0003] In existing technical solutions, the on-chip integrated encryption / decryption engine or HSM (Hardware Security Module) typically exists as a single shared hardware resource. To support encryption / decryption and signature verification needs in multi-domain scenarios, current technologies generally adopt a centralized service model. Specifically, the encryption / decryption engine is usually exclusively managed by a specific security domain or hypervisor (virtualization layer), and other business domains cannot directly access this hardware resource. When other domains need to perform encryption, decryption, signing, or verification operations, they must send a service request to the management domain through an IPC (InterProcessor Communication) mechanism, such as the RPMSG (Remote Processor Message) channel. After receiving the request, the management domain performs permission verification and task scheduling, then calls the encryption / decryption engine to perform the computation, and finally returns the result to the requesting domain through the IPC channel.

[0004] However, as business scenarios place increasingly higher demands on performance, the aforementioned existing technical solutions have gradually revealed the following defects and shortcomings: First, the communication overhead is high and the processing efficiency is low. Because service calls are made via IPC, each encryption / decryption request involves multiple context switches and data copying operations. Requested data needs to be copied from the request domain memory to shared memory, then from the management domain to the engine input buffer, and finally copied back after computation. This complex software interaction process introduces significant latency, limiting the throughput of the encryption / decryption service and making it difficult to meet the low-latency requirements of high-performance scenarios (such as high-definition video stream encryption and real-time signing of massive amounts of sensor data).

[0005] Secondly, insufficient concurrent processing capabilities easily lead to performance bottlenecks. Existing encryption / decryption engines typically function as a single instance, requiring all domain requests to enter the same software queue for serial or limited concurrent processing. When multiple domains simultaneously initiate high-concurrency requests, request backlog can easily occur in the management domain, resulting in excessively long waiting times for subsequent requests. This architecture lacks hardware-level resource isolation and parallel scheduling mechanisms, failing to effectively guarantee the real-time performance of encryption / decryption services in critical business domains (such as the autonomous driving domain), and is ill-suited to the concurrent sharing requirements of multi-domain scenarios.

[0006] Finally, security isolation relies on software, which presents potential risks. Current solutions primarily depend on access control within the management domain software for data isolation between different domains. If the management domain software is vulnerable or compromised, unauthorized access to data between different security domains may occur. The lack of hardware-level virtualization isolation mechanisms makes it difficult for encryption / decryption engines to physically ensure the independence and security of key contexts and data streams across different domains. Summary of the Invention

[0007] This application provides a multi-domain encryption / decryption engine processing method, apparatus, device, and storage medium, which can support multi-domain scenarios, reduce communication overhead, and improve concurrent processing efficiency.

[0008] In a first aspect, embodiments of this application provide a multi-domain encryption / decryption engine processing method, the multi-domain encryption / decryption engine processing method comprising: The encryption / decryption engine is configured to support multiple virtual functional units, each of which is allocated an independent register access space, and each of which is mapped to a different security domain to independently receive encryption / decryption requests initiated by the corresponding security domain. Multiple processing channels are divided within each virtual functional unit to schedule encryption and decryption requests between the multiple virtual functional units and between the multiple processing channels within each virtual functional unit; In response to the scheduling result, the scheduled processing channel is controlled to initiate a DMA data access request, and a security identifier is configured for the DMA data access request, so that the DMA data access request carries the security identifier and accesses the memory area with corresponding permissions after being verified by the firewall, in order to obtain the data to be processed. Using the algorithm core within the encryption / decryption engine, cryptographic operations are performed based on the data to be processed and according to the scheduling result, wherein multiple processing channels within the same virtual functional unit share a key context buffer.

[0009] In conjunction with the first aspect, in one implementation, allocating independent register access space for each of the virtual functional units includes: Each virtual functional unit is configured with the same set of registers, and the independent register access space is achieved by setting different register base addresses.

[0010] In conjunction with the first aspect, in one implementation, the division of multiple processing channels within each virtual functional unit includes: Each processing channel is configured with independent register control, status register, interrupt flag, and DMA access flag; The multiple processing channels share the same key context buffer to perform encryption and decryption operations using the same key.

[0011] In conjunction with the first aspect, in one implementation, scheduling encryption / decryption requests between the plurality of virtual functional units and between the plurality of processing channels within each virtual functional unit includes: At least one of a fixed priority strategy, a round-robin strategy, or a load weight strategy is used to determine the access order among multiple virtual functional units and the access order among multiple processing channels within the same virtual functional unit.

[0012] In conjunction with the first aspect, in one implementation, the adoption of a load weighting strategy includes: Based on the load of encryption and decryption tasks in different systems, the weight of virtual functional units or processing channels with higher loads is set to obtain higher execution priority. Alternatively, priority can be set based on the nature of the encryption / decryption task objects. If the task objects are of the same nature, they are set to the same priority; if the task objects are of different natures, priority is set based on the amount of data.

[0013] In conjunction with the first aspect, in one implementation, configuring a security identifier for the DMA data access request includes: Configure a domain ID for DMA access, so that each DMA access carries the domain ID to distinguish different security domains; The security attributes of the virtual functional unit are inherited from the security attributes of the main device.

[0014] In conjunction with the first aspect, in one implementation, configuring a security identifier for the DMA data access request further includes: Configure a non-secure identifier (NSAID) for DMA access, such that each DMA access carries the NSAID to distinguish a specific data stream in non-secure memory.

[0015] Secondly, embodiments of this application provide a multi-domain encryption / decryption engine processing apparatus, the multi-domain encryption / decryption engine processing apparatus comprising: The configuration module is used to configure the encryption / decryption engine to support multiple virtual functional units, allocate independent register access space for each virtual functional unit, and map each virtual functional unit to a different security domain to independently receive encryption / decryption requests initiated by the corresponding security domain. The scheduling module is used to divide multiple processing channels within each virtual functional unit and schedule encryption and decryption requests between the multiple virtual functional units and between the multiple processing channels within each virtual functional unit. The control module is used to respond to the scheduling result, control the scheduled processing channel to initiate a DMA data access request, and configure a security identifier for the DMA data access request, so that the DMA data access request carries the security identifier and accesses the memory area with corresponding permissions after being verified by the firewall, in order to obtain the data to be processed. The computation module is used to perform cryptographic operations based on the data to be processed and according to the scheduling result using the algorithm core within the encryption / decryption engine, wherein multiple processing channels within the same virtual functional unit share a key context buffer.

[0016] Thirdly, embodiments of this application provide a multi-domain encryption / decryption engine processing device, which includes a processor, a memory, and a multi-domain encryption / decryption engine processing program stored in the memory and executable by the processor. When the multi-domain encryption / decryption engine processing program is executed by the processor, it implements the steps of the multi-domain encryption / decryption engine processing method described above.

[0017] Fourthly, embodiments of this application provide a computer-readable storage medium storing a multi-domain encryption / decryption engine processing program, wherein when the multi-domain encryption / decryption engine processing program is executed by a processor, it implements the steps of the multi-domain encryption / decryption engine processing method described above.

[0018] The beneficial effects of the technical solutions provided in this application include: The multi-domain encryption / decryption engine processing method in this application configures the encryption / decryption engine to support multiple virtual functional units, allocates an independent register access space for each virtual functional unit, and maps each virtual functional unit to a different security domain to independently receive encryption / decryption requests initiated by the corresponding security domain. Within each virtual functional unit, multiple processing channels are divided, and encryption / decryption requests between multiple virtual functional units and between multiple processing channels within each virtual functional unit are scheduled. In response to the scheduling result, the scheduled processing channel is controlled to initiate a DMA data access request, and a security identifier is configured for the DMA data access request. This allows the DMA data access request to carry the security identifier, pass firewall verification, and access the memory area with the corresponding permissions to obtain the data to be processed. Utilizing the algorithm core within the encryption / decryption engine, cryptographic operations are performed based on the data to be processed and according to the scheduling result, wherein multiple processing channels within the same virtual functional unit share a key context buffer.

[0019] This application achieves hardware isolation and independent control between multiple domains by configuring multiple virtual functional units with independent register access spaces and mapping them to different security domains. By dividing multiple processing channels within the virtual functional units and implementing hierarchical scheduling, combined with the design of a shared key context buffer between channels, the concurrent processing efficiency of encryption and decryption tasks is significantly improved and the key loading overhead is reduced. At the same time, by configuring a security identifier for DMA data access requests in response to scheduling results and accessing memory after firewall verification, access control and security during data transfer are ensured. Thus, while ensuring multi-domain security isolation, efficient, secure and concurrent encryption and decryption services are achieved. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating an embodiment of the multi-domain encryption / decryption engine processing method of this application; Figure 2 This is a block diagram of the encryption / decryption engine in this application; Figure 3 This is a functional module diagram of an embodiment of the multi-domain encryption / decryption engine processing device of this application; Figure 4 This is a schematic diagram of the hardware structure of the multi-domain encryption / decryption engine processing device involved in the embodiments of this application. Detailed Implementation

[0021] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0023] Firstly, embodiments of this application provide a multi-domain encryption / decryption engine processing method.

[0024] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the multi-domain encryption / decryption engine processing method of this application. Figure 1 As shown, the multi-domain encryption / decryption engine processing methods include: S1. Configure the encryption / decryption engine to support multiple virtual functional units, allocate an independent register access space for each virtual functional unit, and map each virtual functional unit to a different security domain to independently receive encryption / decryption requests initiated by the corresponding security domain. See Figure 2 As shown, in step S1, the encryption / decryption engine is physically divided into multiple Virtual Functions (VFs) using hardware virtualization technology. Specifically, the encryption / decryption engine supports multiple VF function configuration modules through the Advanced Peripheral Bus (APB) interface. In a preferred embodiment of this application, the number of virtual function units is eight, meaning the encryption / decryption engine can simultaneously provide encryption / decryption, digest, and signature verification services to eight different virtual machines or operating systems (i.e., different security domains, such as the ADAS domain, the IVI domain, and the gateway domain).

[0025] To achieve hardware-level isolation, step S1 allocates an independent register access space for each virtual functional unit. In one embodiment, allocating an independent register access space for each virtual functional unit includes configuring an identical set of registers for each virtual functional unit and implementing the independent register access space by setting different register base addresses. For example, the register base address of VF0 is 0x1000, and the register base address of VF1 is 0x2000. Although the register functions are defined the same, the access addresses do not interfere with each other.

[0026] Understandably, existing technologies typically employ a single engine instance coupled with inter-processor communication (IPC, such as RPMSG) to serve multiple domains, resulting in significant context switching and data copying overhead. Step S1, by allocating independent register access space for each VF, allows different security domains to directly access hardware resources through their respective mapped VFs, without needing software forwarding through an intermediate management domain. This not only achieves hardware-level resource isolation, preventing unauthorized interference between different domains, but also significantly reduces communication latency and improves the response speed of encryption and decryption requests in multi-domain scenarios.

[0027] S2. Divide multiple processing channels within each virtual functional unit, and schedule encryption and decryption requests between the multiple virtual functional units and between the multiple processing channels within each virtual functional unit; In step S2, to further explore the concurrency potential within a single domain, multiple processing channels are divided within each virtual functional unit. In a preferred embodiment of this application, each VF includes two channels. Dividing each virtual functional unit into multiple processing channels includes configuring independent register control, status registers, interrupt flags, and DMA (Direct Memory Access) access flags for each processing channel. This means that within the same operating system, concurrent threads can handle different encryption / decryption tasks, and each channel has independent software registers for access control.

[0028] Since multiple VFs and multiple Channels share backend computing resources, arbitration scheduling is required. The scheduling of encryption / decryption requests between the multiple virtual functional units and between the multiple processing channels within each virtual functional unit includes: employing at least one of a fixed priority strategy, a round-robin strategy, or a load-weight strategy to determine the access order between the multiple virtual functional units and the access order between the multiple processing channels within the same virtual functional unit, respectively.

[0029] Specifically, the arbitration mechanism is highly flexible. In this embodiment, the encryption / decryption engine CryptoEngine supports eight VF function configuration modules through the APB interface; each VF has the same set of registers, only the base addresses of the registers are different; each VF includes two channels, each channel has its own register control; the two channels share the same Key Context Buffer, that is, they use the same key for encryption and decryption operations; The two channels used two different arbitration methods: Fixed mode: Channel 0 always has a higher priority than Channel 1. Round-robin method: Channel 0 and Channel 1 have the same priority. Two arbitration methods are used among the 8 VFs: Fixed method: VFs with higher priority are executed first, and VFs with lower priority are executed later. Round-robin method: VFs have the same priority.

[0030] Specifically, regarding arbitration between Virtual Function Units (VFs), if the current SoC simultaneously supports both the In-Virtual Operating System (IVI) and the Advanced Driver Assistance System (ADAS), ADAS obviously has higher security and real-time requirements. Therefore, the VF priority corresponding to ADAS can be set to high priority, and the VF priority corresponding to IVI can be set to low priority (fixed priority strategy). Furthermore, the workload of encryption / decryption tasks in different systems can be evaluated, and the weight of virtual functional units or processing channels with higher workloads can be set larger to obtain higher execution priority (load weight strategy).

[0031] For arbitration between channels, if the encrypted or decrypted tasks or objects are of the same nature, the two channels can be set to the same priority (round-robin method). If the encryption / decryption operation performed by Channel 0 is for video and the encryption / decryption operation performed by Channel 1 is for audio, since the data volume of video is much larger than that of audio, the priority setting of Channel 0 should be higher than that of Channel 1.

[0032] Understandably, in existing technologies, engines typically operate on a single queue, making it easy for high-priority tasks to be blocked by low-priority tasks. Step S2, through a multi-channel design within the VF and a flexible arbitration mechanism, not only achieves inter-domain isolation but also intra-domain concurrency. By using dynamic priority scheduling based on service type (e.g., video / voice) or system importance (e.g., autonomous driving / cockpit), the real-time performance of critical services is ensured, performance bottlenecks are avoided, and the overall throughput of the engine is significantly improved.

[0033] S3. In response to the scheduling result, control the scheduled processing channel to initiate a DMA data access request, and configure a security identifier for the DMA data access request, so that the DMA data access request carries the security identifier and accesses the memory area with corresponding permissions after being verified by the firewall, so as to obtain the data to be processed. In step S3, after the encryption / decryption request is successfully scheduled, the engine needs to acquire data for processing. At this time, the scheduled processing channel initiates a DMA data access request. To ensure the security of data access, the Crypto Engine's DMA access permission configuration is handled by the Secure Control module.

[0034] In specific implementation, configuring a security identifier for the DMA data access request includes configuring a Domain ID for the DMA access, so that each DMA access carries the Domain ID to distinguish different security domains. The security attributes of the virtual functional unit (VF) inherit the security attributes of the master device. This means that VF does not need to configure security attributes separately, but automatically adopts the security level of the requesting master device (such as a CPU core, DMA controller, etc.), simplifying the configuration process and ensuring consistency in security.

[0035] Furthermore, configuring a security identifier for the DMA data access request further includes configuring a non-security identifier (NSAID) for the DMA access, such that each DMA access carries the NSAID to distinguish specific data streams in non-security memory.

[0036] After configuring the security identifier, the step of enabling the DMA data access request to access the memory area with corresponding permissions after passing firewall verification by carrying the security identifier includes: the firewall unit receiving the DMA data access request carrying the Domain ID or the NSAID; verifying the legality of the Domain ID or the NSAID according to preset access control rules, and allowing access to DRM video stream data in the corresponding secure memory area or non-secure memory area only when the verification is successful.

[0037] Understandably, current technologies for data isolation between multiple domains primarily rely on software access control, which carries the risk of unauthorized access. Step S3 uses a hardware-level Secure Control module to bind security identifiers (DomainID / NSAID) to DMA requests and works in conjunction with the FireWall firewall for hardware verification, ensuring that data from different domains can only access memory areas within their authorized scope. In particular, by using NSAID to support the retrieval of DRM video stream data in insecure memory, the requirements for high-definition video content protection are met, achieving fine-grained secure access control.

[0038] S4. Using the algorithm core within the encryption / decryption engine, perform cryptographic operations based on the data to be processed and according to the scheduling result, wherein multiple processing channels within the same virtual functional unit share a key context buffer.

[0039] In step S4, after obtaining the data to be processed, the encryption / decryption engine performs specific cryptographic operations using its algorithm cores. To support multiple algorithm standards, the encryption / decryption engine has three built-in engines, each configured with multiple computing cores. Specifically, this includes: performing AES or SHA operations through the International Algorithm Engine (IPS Engine), which supports four computing cores; and / or performing SM3 or SM4 operations through the Chinese Cryptographic Algorithm Engine (SMX Engine), which supports four computing cores; and / or performing RSA, ECDSA, or SM2 operations through the Public Key Algorithm Engine (PKHSEngine), which supports two computing cores.

[0040] During operation, multiple processing channels within the same virtual functional unit share a key context buffer, meaning they use the same key for encryption and decryption. Although the channels share a key context, each channel has independent register control, status, and interrupt ID.

[0041] Understandably, in existing technologies, if multiple channels are completely independent, keys often need to be loaded repeatedly, resulting in wasted bandwidth and latency. Step S4 reduces key loading overhead and improves key reuse efficiency by designing a shared key context buffer for multiple channels within the same VF. Simultaneously, by configuring multiple types of algorithm cores (IPS / SMX / PKHS) and enabling multiple computing cores to work in parallel, the parallel computing requirements for various cryptographic algorithms (international algorithms, national cryptographic algorithms, and public-key algorithms) in high-performance scenarios are met, significantly improving the overall performance of signature verification and encryption / decryption operations.

[0042] In summary, the multi-domain encryption / decryption engine processing method in this application configures the encryption / decryption engine to support multiple virtual functional units, allocates an independent register access space for each virtual functional unit, and maps each virtual functional unit to a different security domain to independently receive encryption / decryption requests initiated by the corresponding security domain. Within each virtual functional unit, multiple processing channels are divided, and encryption / decryption requests between multiple virtual functional units and between multiple processing channels within each virtual functional unit are scheduled. In response to the scheduling result, the scheduled processing channel is controlled to initiate a DMA data access request, and a security identifier is configured for the DMA data access request. This allows the DMA data access request to carry the security identifier, pass firewall verification, and access the memory area with the corresponding permissions to obtain the data to be processed. The algorithm core within the encryption / decryption engine is used to perform cryptographic operations based on the data to be processed and according to the scheduling result, wherein multiple processing channels within the same virtual functional unit share a key context buffer.

[0043] This application achieves hardware isolation and independent control between multiple domains by configuring multiple virtual functional units with independent register access spaces and mapping them to different security domains. By dividing multiple processing channels within the virtual functional units and implementing hierarchical scheduling, combined with the design of a shared key context buffer between channels, the concurrent processing efficiency of encryption and decryption tasks is significantly improved and the key loading overhead is reduced. At the same time, by configuring a security identifier for DMA data access requests in response to scheduling results and accessing memory after firewall verification, access control and security during data transfer are ensured. Thus, while ensuring multi-domain security isolation, efficient, secure and concurrent encryption and decryption services are achieved.

[0044] Secondly, embodiments of this application also provide a multi-domain encryption / decryption engine processing device.

[0045] In one embodiment, reference is made to Figure 3 , Figure 3 This is a functional module diagram of an embodiment of the multi-domain encryption / decryption engine processing device of this application. Figure 3 As shown, the multi-domain encryption / decryption engine processing device includes: The configuration module is used to configure the encryption / decryption engine to support multiple virtual functional units, allocate independent register access space for each virtual functional unit, and map each virtual functional unit to a different security domain to independently receive encryption / decryption requests initiated by the corresponding security domain. The scheduling module is used to divide multiple processing channels within each virtual functional unit and schedule encryption and decryption requests between the multiple virtual functional units and between the multiple processing channels within each virtual functional unit. The control module is used to respond to the scheduling result, control the scheduled processing channel to initiate a DMA data access request, and configure a security identifier for the DMA data access request, so that the DMA data access request carries the security identifier and accesses the memory area with corresponding permissions after being verified by the firewall, in order to obtain the data to be processed. The computation module is used to perform cryptographic operations based on the data to be processed and according to the scheduling result using the algorithm core within the encryption / decryption engine, wherein multiple processing channels within the same virtual functional unit share a key context buffer.

[0046] Furthermore, in one embodiment, the configuration module allocates an independent register access space for each of the virtual functional units, including: Each virtual functional unit is configured with the same set of registers, and the independent register access space is achieved by setting different register base addresses.

[0047] Furthermore, in one embodiment, the scheduling module divides multiple processing channels within each virtual functional unit, including: Each processing channel is configured with independent register control, status register, interrupt flag, and DMA access flag; The multiple processing channels share the same key context buffer to perform encryption and decryption operations using the same key.

[0048] Further, in one embodiment, the scheduling module schedules encryption / decryption requests between multiple virtual functional units and between multiple processing channels within each virtual functional unit, including: At least one of a fixed priority strategy, a round-robin strategy, or a load weight strategy is used to determine the access order among multiple virtual functional units and the access order among multiple processing channels within the same virtual functional unit.

[0049] Furthermore, in one embodiment, the scheduling module employs a load weighting strategy, including: Based on the load of encryption and decryption tasks in different systems, the weight of virtual functional units or processing channels with higher loads is set to obtain higher execution priority. Alternatively, priority can be set based on the nature of the encryption / decryption task objects. If the task objects are of the same nature, they are set to the same priority; if the task objects are of different natures, priority is set based on the amount of data.

[0050] Furthermore, in one embodiment, the control module configures a security identifier for the DMA data access request, including: Configure a domain ID for DMA access, so that each DMA access carries the domain ID to distinguish different security domains; The security attributes of the virtual functional unit are inherited from the security attributes of the main device.

[0051] Furthermore, in one embodiment, the control module configures a security identifier for the DMA data access request, and further includes: Configure a non-secure identifier (NSAID) for DMA access, such that each DMA access carries the NSAID to distinguish a specific data stream in non-secure memory.

[0052] The functions of each module in the multi-domain encryption and decryption engine processing device correspond to the steps in the multi-domain encryption and decryption engine processing method embodiment. Their functions and implementation processes will not be described in detail here.

[0053] Thirdly, embodiments of this application provide a multi-domain encryption / decryption engine processing device, which can be a personal computer (PC), laptop computer, server, or other device with data processing capabilities.

[0054] Reference Figure 4 , Figure 4 This is a schematic diagram of the hardware structure of the multi-domain encryption / decryption engine processing device involved in the embodiments of this application. In the embodiments of this application, the multi-domain encryption / decryption engine processing device may include a processor, a memory, a communication interface, and a communication bus.

[0055] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.

[0056] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting devices within the multi-domain encryption / decryption engine processing device, as well as interfaces used for interconnecting the multi-domain encryption / decryption engine processing device with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.

[0057] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0058] The processor can be a general-purpose processor, which can call the multi-domain encryption / decryption engine processing program stored in memory and execute the multi-domain encryption / decryption engine processing method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the multi-domain encryption / decryption engine processing program is called can be referred to in the various embodiments of the multi-domain encryption / decryption engine processing method of this application, and will not be repeated here.

[0059] Those skilled in the art will understand that Figure 4The hardware structure shown does not constitute a limitation of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0060] Fourthly, embodiments of this application also provide a computer-readable storage medium.

[0061] The present application stores a multi-domain encryption / decryption engine processing program on a computer-readable storage medium, wherein when the multi-domain encryption / decryption engine processing program is executed by a processor, it implements the steps of the multi-domain encryption / decryption engine processing method as described above.

[0062] The method implemented when the multi-domain encryption / decryption engine processing program is executed can be referred to in various embodiments of the multi-domain encryption / decryption engine processing method of this application, and will not be repeated here.

[0063] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0064] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.

[0065] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.

[0066] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.

[0067] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.

[0068] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.

[0069] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A multi-domain encryption / decryption engine processing method, characterized in that, The multi-domain encryption / decryption engine processing method includes: The encryption / decryption engine is configured to support multiple virtual functional units, each of which is allocated an independent register access space, and each of which is mapped to a different security domain to independently receive encryption / decryption requests initiated by the corresponding security domain. Multiple processing channels are divided within each virtual functional unit to schedule encryption and decryption requests between the multiple virtual functional units and between the multiple processing channels within each virtual functional unit; In response to the scheduling result, the scheduled processing channel is controlled to initiate a DMA data access request, and a security identifier is configured for the DMA data access request, so that the DMA data access request carries the security identifier and accesses the memory area with corresponding permissions after being verified by the firewall, in order to obtain the data to be processed. Using the algorithm core within the encryption / decryption engine, cryptographic operations are performed based on the data to be processed and according to the scheduling result, wherein multiple processing channels within the same virtual functional unit share a key context buffer.

2. The multi-domain encryption / decryption engine processing method as described in claim 1, characterized in that, The allocation of independent register access space for each of the virtual functional units includes: Each virtual functional unit is configured with the same set of registers, and the independent register access space is achieved by setting different register base addresses.

3. The multi-domain encryption / decryption engine processing method as described in claim 1, characterized in that, The process involves dividing each virtual functional unit into multiple processing channels, including: Each processing channel is configured with independent register control, status register, interrupt flag, and DMA access flag; The multiple processing channels share the same key context buffer to perform encryption and decryption operations using the same key.

4. The multi-domain encryption / decryption engine processing method as described in claim 1, characterized in that, The scheduling of encryption / decryption requests between the multiple virtual functional units and between the multiple processing channels within each virtual functional unit includes: At least one of a fixed priority strategy, a round-robin strategy, or a load weight strategy is used to determine the access order among multiple virtual functional units and the access order among multiple processing channels within the same virtual functional unit.

5. The multi-domain encryption / decryption engine processing method as described in claim 1, characterized in that, The load weighting strategy includes: Based on the load of encryption and decryption tasks in different systems, the weight of virtual functional units or processing channels with higher loads is set to obtain higher execution priority. Alternatively, priority can be set based on the nature of the encryption / decryption task objects. If the task objects are of the same nature, they are set to the same priority; if the task objects are of different natures, priority is set based on the amount of data.

6. The multi-domain encryption / decryption engine processing method as described in claim 1, characterized in that, Configuring a security identifier for the DMA data access request includes: Configure a domain ID for DMA access, so that each DMA access carries the domain ID to distinguish different security domains; The security attributes of the virtual functional unit are inherited from the security attributes of the main device.

7. The multi-domain encryption / decryption engine processing method as described in claim 6, characterized in that, Configuring a security identifier for the DMA data access request further includes: Configure a non-secure identifier (NSAID) for DMA access, such that each DMA access carries the NSAID to distinguish a specific data stream in non-secure memory.

8. A multi-domain encryption / decryption engine processing device, characterized in that, The multi-domain encryption / decryption engine processing device includes: The configuration module is used to configure the encryption / decryption engine to support multiple virtual functional units, allocate independent register access space for each virtual functional unit, and map each virtual functional unit to a different security domain to independently receive encryption / decryption requests initiated by the corresponding security domain. The scheduling module is used to divide multiple processing channels within each virtual functional unit and schedule encryption and decryption requests between the multiple virtual functional units and between the multiple processing channels within each virtual functional unit. The control module is used to respond to the scheduling result, control the scheduled processing channel to initiate a DMA data access request, and configure a security identifier for the DMA data access request, so that the DMA data access request carries the security identifier and accesses the memory area with corresponding permissions after being verified by the firewall, in order to obtain the data to be processed. The computation module is used to perform cryptographic operations based on the data to be processed and according to the scheduling result using the algorithm core within the encryption / decryption engine, wherein multiple processing channels within the same virtual functional unit share a key context buffer.

9. A multi-domain encryption / decryption engine processing device, characterized in that, The multi-domain encryption / decryption engine processing device includes a processor, a memory, and a multi-domain encryption / decryption engine processing program stored in the memory and executable by the processor, wherein when the multi-domain encryption / decryption engine processing program is executed by the processor, it implements the steps of the multi-domain encryption / decryption engine processing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a multi-domain encryption / decryption engine processing program, wherein when the multi-domain encryption / decryption engine processing program is executed by a processor, it implements the steps of the multi-domain encryption / decryption engine processing method as described in any one of claims 1 to 7.