A resource scheduling method and related apparatus for an encryption / decryption system
Patent Information
- Application Number
- CN202211156956.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-09-22
AI Technical Summary
[0003]相关技术中,硬件加解密逻辑通常被设计为尽可能大的吞吐量以完成高性能的加解密计算,但是在一些功耗受限的应用场景下,大量硬件逻辑的高频率工作会导致瞬时功耗过高,不能满足应用需求;另一方面,加解密逻辑往往会用到较多的存储资源,在全部或者部分加解密逻辑未进行加解密工作的情况下,其占用的存储资源不能被利用,造成了资源浪费
[0040] By acquiring control parameters, the encryption and decryption calculation modules in the encryption and decryption system are divided into a first encryption and decryption calculation module and a second encryption and decryption calculation module. The first encryption and decryption calculation module is then used for encryption and decryption calculations, and the storage unit of the second encryption and decryption calculation module is reused, which avoids the waste of storage resources and improves the resource utilization rate of the encryption and decryption system.
Smart Images

Figure CN115629850B_ABST
Abstract
Description
Technical Field
[0001] This application relates, and particularly to, a resource scheduling method, resource scheduling device, terminal equipment, and computer-readable storage medium for an encryption / decryption system. Background Technology
[0002] With the continuous development of information technology, in order to enable encryption and decryption systems to complete encryption and decryption tasks for different applications, the hardware encryption and decryption logic inside the chip can be designed to maximize throughput in order to complete high-performance encryption and decryption calculations.
[0003] In related technologies, hardware encryption and decryption logic is usually designed to achieve the highest possible throughput to complete high-performance encryption and decryption calculations. However, in some power-constrained application scenarios, the high-frequency operation of a large number of hardware logics can lead to excessive instantaneous power consumption, which cannot meet the application requirements. On the other hand, encryption and decryption logic often uses a lot of storage resources. If all or part of the encryption and decryption logic is not performing encryption and decryption work, the storage resources it occupies cannot be utilized, resulting in resource waste.
[0004] Therefore, how to improve the resource utilization rate of encryption and decryption systems is a key issue of concern to those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a resource scheduling method, resource scheduling device, terminal equipment, and computer-readable storage medium for an encryption / decryption system, thereby improving the resource utilization rate of the encryption / decryption system.
[0006] To address the aforementioned technical problems, this application provides a resource scheduling method for an encryption / decryption system, comprising:
[0007] Obtain control parameters;
[0008] Based on the control parameters, the first encryption / decryption calculation module and the second encryption / decryption calculation module are determined from multiple encryption / decryption calculation modules;
[0009] Control all the first encryption / decryption calculation modules to process the data to be processed, and obtain the processed data;
[0010] Connect the signal lines of all storage units of the second encryption / decryption calculation module to multiplexed signal lines so that other devices can read and write to the storage units based on the multiplexed signal lines.
[0011] Optionally, obtain control parameters, including:
[0012] Obtain the target encryption / decryption rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal;
[0013] Determine whether the target encryption / decryption rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal meet preset conditions;
[0014] If so, the encryption / decryption target rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal are used as the control parameters.
[0015] Optionally, determining the first encryption / decryption calculation module and the second encryption / decryption calculation module from multiple encryption / decryption calculation modules based on the control parameters includes:
[0016] Based on the number of encryption / decryption modules used in the control parameters and the storage unit multiplexing signal, the first encryption / decryption calculation module used for encryption and decryption and the second encryption / decryption calculation module used for storage multiplexing are determined among all encryption / decryption calculation modules.
[0017] Optionally, after the encryption / decryption target rate meets preset conditions, the method further includes:
[0018] The clock frequency is calculated by performing clock frequency calculation on the encryption / decryption target rate to obtain the target clock frequency;
[0019] Set the target clock frequency for the first encryption / decryption calculation module.
[0020] Optionally, control all the first encryption / decryption calculation modules to process the data to be processed, and obtain processed data, including:
[0021] The power supply control signal and data input control signal are determined based on the control parameters;
[0022] Power is supplied to the first encryption / decryption calculation module based on the power supply control signal;
[0023] Based on the data input control signal, the data to be processed is input to all the first encryption / decryption calculation modules;
[0024] The data to be processed is obtained by processing the data through all the first encryption and decryption calculation modules.
[0025] Optionally, after obtaining the processed data, the method further includes:
[0026] The processed data is output in a first-in, first-out (FIFO) order.
[0027] Optionally, the signal lines of all storage units of the second encryption / decryption calculation module are connected to multiplexed signal lines so that other devices can read and write to the storage units based on the multiplexed signal lines, including:
[0028] Based on the control parameters, the storage cell multiplexing signal sets the corresponding multiplexing signal line to the enabled state;
[0029] Connect the signal lines of all storage units of the second encryption / decryption calculation module to the multiplexed signal lines so that other devices can read and write to the storage units based on the multiplexed signal lines.
[0030] This application also provides a resource scheduling device for an encryption / decryption system, comprising:
[0031] The parameter acquisition module is used to acquire control parameters;
[0032] The parameter processing module is used to determine the first encryption / decryption calculation module and the second encryption / decryption calculation module from multiple encryption / decryption calculation modules based on the control parameters.
[0033] The encryption / decryption module scheduling module is used to control all the first encryption / decryption calculation modules to process the data to be processed and obtain the processed data;
[0034] The storage unit scheduling module is used to connect the signal lines of all storage units of the second encryption / decryption calculation module to multiplexed signal lines, so that other devices can read and write to the storage units based on the multiplexed signal lines.
[0035] This application also provides a terminal device, including:
[0036] Memory, used to store computer programs;
[0037] A processor, used to implement the resource scheduling method as described above when executing the computer program.
[0038] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the resource scheduling method described above.
[0039] This application provides a resource scheduling method for an encryption / decryption system, comprising: acquiring control parameters; determining a first encryption / decryption calculation module and a second encryption / decryption calculation module from a plurality of encryption / decryption calculation modules based on the control parameters; controlling all the first encryption / decryption calculation modules to process the data to be processed to obtain processed data; and connecting the signal lines of the storage units of all the second encryption / decryption calculation modules to multiplexed signal lines so that other devices can read and write access to the storage units based on the multiplexed signal lines.
[0040] By acquiring control parameters, the encryption and decryption calculation modules in the encryption and decryption system are divided into a first encryption and decryption calculation module and a second encryption and decryption calculation module. The first encryption and decryption calculation module is then used for encryption and decryption calculations, and the storage unit of the second encryption and decryption calculation module is reused, which avoids the waste of storage resources and improves the resource utilization rate of the encryption and decryption system.
[0041] This application also provides a resource scheduling device, terminal equipment, and computer-readable storage medium for an encryption / decryption system, which have the above-mentioned beneficial effects, and will not be elaborated here. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0043] Figure 1 A flowchart illustrating a resource scheduling method for an encryption / decryption system provided in this application embodiment;
[0044] Figure 2 This is a schematic diagram of the structure of an encryption / decryption system provided in an embodiment of this application;
[0045] Figure 3 This is a schematic diagram of the structure of a resource scheduling device for an encryption / decryption system provided in an embodiment of this application;
[0046] Figure 4 This is a schematic diagram of the structure of a terminal device provided in this application. Detailed Implementation
[0047] The core of this application is to provide a resource scheduling method, resource scheduling device, terminal equipment, and computer-readable storage medium for an encryption / decryption system, thereby improving the resource utilization rate of the encryption / decryption system.
[0048] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] In related technologies, hardware encryption and decryption logic is usually designed to achieve the highest possible throughput to complete high-performance encryption and decryption calculations. However, in some power-constrained application scenarios, the high-frequency operation of a large number of hardware logics can lead to excessive instantaneous power consumption, which cannot meet the application requirements. On the other hand, encryption and decryption logic often uses a lot of storage resources. If all or part of the encryption and decryption logic is not performing encryption and decryption work, the storage resources it occupies cannot be utilized, resulting in resource waste.
[0050] Therefore, this application provides a resource scheduling method for an encryption / decryption system. By obtaining control parameters, the multiple encryption / decryption calculation modules in the encryption / decryption system are divided into a first encryption / decryption calculation module and a second encryption / decryption calculation module. Then, the first encryption / decryption calculation module is used to perform encryption / decryption calculations, and the storage unit of the second encryption / decryption calculation module is reused, thereby avoiding the waste of storage resources and improving the resource utilization rate of the encryption / decryption system.
[0051] The following example illustrates a resource scheduling method for an encryption / decryption system provided in this application.
[0052] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a resource scheduling method for an encryption / decryption system provided in an embodiment of this application.
[0053] In this embodiment, the method may include:
[0054] S101, Obtain control parameters;
[0055] This step aims to obtain control parameters. These control parameters are used to control the encryption and decryption process. In other words, this step aims to obtain parameters that control the resources of the encryption and decryption system.
[0056] The parameters obtained may include the encryption / decryption target rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal.
[0057] Furthermore, it can be determined whether the acquired parameters meet the corresponding conditions. For example, it can be determined whether the acquired encryption / decryption target rate is within the corresponding rate range.
[0058] Optionally, this step may include:
[0059] Step 1: Obtain the target encryption / decryption rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal;
[0060] Step 2: Determine whether the encryption / decryption target rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal meet the preset conditions;
[0061] Step 3: If so, the encryption / decryption target rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal are used as control parameters.
[0062] As can be seen, this optional solution mainly describes how to obtain control parameters. In this optional solution, the target encryption / decryption rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal are obtained. It is evident that in this application, the target encryption / decryption rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal are first obtained from external sources. The target encryption / decryption rate represents the speed of encryption / decryption calculations, the number of encryption / decryption modules used represents the number of modules required during the encryption / decryption process, and the storage unit multiplexing signal represents the number or address of storage units that need to be multiplexed. Then, it is determined whether the target encryption / decryption rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal meet preset conditions; if so, these parameters are used as control parameters.
[0063] The preset conditions can be set based on the experience of technical personnel, historical data, or the performance of the encryption / decryption system.
[0064] S102, Based on control parameters, determine the first encryption / decryption calculation module and the second encryption / decryption calculation module from multiple encryption / decryption calculation modules;
[0065] Based on S101, this step aims to determine the first encryption / decryption calculation module and the second encryption / decryption calculation module based on control parameters.
[0066] The number of the first encryption / decryption calculation module and the second encryption / decryption calculation module can be one or more.
[0067] The first encryption / decryption calculation module is mainly used for encryption / decryption calculations, while the second encryption / decryption calculation module mainly reuses its storage units to improve the resource utilization of the encryption / decryption system.
[0068] Optionally, this step may include:
[0069] Based on the number of encryption / decryption modules used and the storage unit multiplexing signal in the control parameters, the first encryption / decryption calculation module used for encryption and decryption and the second encryption / decryption calculation module used for storage multiplexing are determined among all encryption / decryption calculation modules.
[0070] As can be seen, the technical solution of this application mainly describes how to determine the classification of computing modules. In this optional solution, based on the number of encryption / decryption modules used and the storage unit multiplexing signal in the control parameters, the first encryption / decryption computing module used for encryption and decryption and the second encryption / decryption computing module used for storage multiplexing are determined among all encryption / decryption computing modules.
[0071] Furthermore, after the encryption / decryption target rate meets the preset conditions, this embodiment may also include:
[0072] Step 1: Calculate the clock frequency of the encryption / decryption target rate to obtain the target clock frequency;
[0073] Step 2: Set the target clock frequency for the first encryption / decryption calculation module.
[0074] As can be seen, the technical solution of this application mainly describes how to set the target clock frequency of the encryption / decryption system. In this optional solution, firstly, the clock frequency is calculated based on the target encryption / decryption rate to obtain the target clock frequency; then, the target clock frequency is set for the first encryption / decryption calculation module. Therefore, in this optional solution, after determining the target encryption / decryption rate, the target clock frequency can be calculated. Finally, the target clock frequency is set for the encryption / decryption calculation module.
[0075] S103, control all first encryption / decryption calculation modules to process the data to be processed, and obtain the processed data;
[0076] Building upon S102, this step aims to control all first encryption / decryption calculation modules to process the data to be processed, thereby obtaining processed data. The encryption / decryption calculation methods used by the first encryption / decryption calculation modules can employ any existing encryption / decryption method, and are not specifically limited here.
[0077] Furthermore, this step may include:
[0078] Step 1: Determine the power supply control signal and data input control signal based on the control parameters;
[0079] Step 2: Power the first encryption / decryption calculation module based on the power supply control signal;
[0080] Step 3: Input the data to be processed to all the first encryption / decryption calculation modules based on the data input control signal;
[0081] Step 4: Process the data to be processed through all the first encryption and decryption calculation modules to obtain the processed data.
[0082] As can be seen, this optional solution mainly describes how to perform encryption and decryption calculations. In this optional solution, the power supply control signal and data input control signal are determined based on control parameters; the power supply control signal supplies power to the first encryption and decryption calculation module; the data to be processed is input to all the first encryption and decryption calculation modules based on the data input control signal; and the data to be processed is processed by all the first encryption and decryption calculation modules to obtain the processed data.
[0083] Furthermore, after obtaining the processed data, it also includes:
[0084] The processed data is output in a first-in, first-out (FIFO) order.
[0085] As can be seen, this optional solution also explains how to output the processed data. Specifically, it selects a first-in, first-out (FIFO) order to output the processed data.
[0086] S104, connect the signal lines of all storage units of the second encryption / decryption calculation module to the multiplexed signal lines so that other devices can read and write to the storage units based on the multiplexed signal lines.
[0087] Building upon S102, this step aims to connect the signal lines of the storage units of all second encryption / decryption calculation modules to multiplexed signal lines, so that other devices can access the storage units for reading and writing based on the multiplexed signal lines.
[0088] Furthermore, this step may include:
[0089] Step 1: Based on the control parameters, the storage cell multiplexing signal sets the corresponding multiplexing signal line to the enabled state;
[0090] Step 2: Connect the signal lines of all storage units of the second encryption / decryption calculation module to multiplexed signal lines so that other devices can read and write to the storage units based on the multiplexed signal lines.
[0091] In summary, this embodiment divides the multiple encryption and decryption calculation modules in the encryption and decryption system into a first encryption and decryption calculation module and a second encryption and decryption calculation module by acquiring control parameters. Then, the first encryption and decryption calculation module is used to perform encryption and decryption calculations, and the storage unit of the second encryption and decryption calculation module is reused, which avoids the waste of storage resources and improves the resource utilization rate of the encryption and decryption system.
[0092] The following specific embodiment further illustrates the resource scheduling method of an encryption / decryption system provided in this application.
[0093] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of an encryption / decryption system provided in an embodiment of this application.
[0094] The encryption / decryption system in this embodiment may include a parameter adaptation module, a dynamic management module, and an array of encryption / decryption calculation modules.
[0095] The parameter adaptation module's input signals include the encryption / decryption target rate h (h≥0 and h≤H, where H is the maximum encryption / decryption rate the system can achieve), the number of encryption / decryption modules n (n≥1 and n≤N, where there are N encryption / decryption calculation modules in the array), and the SRAM multiplexing signal Smux1 (an N-bit signal, where a value of 1 for the nth bit indicates that the SRAM in the nth encryption / decryption calculation module is reused). The output signals include the parameter adaptation result R (an N-bit signal indicating whether the input parameters can be successfully adapted; all N bits being 0 indicates failure, otherwise success; a value of 1 for the nth bit indicates that the nth encryption / decryption calculation module will be used for encryption / decryption calculations), the encryption / decryption module's operating frequency Freq, and the SRAM control signal Smux2 (same as Smux1). The input signals h and n of the parameter adaptation module must satisfy H / h≥n, and the total number of 1s in the Smux1 signal must be ≤Nn for the parameter adaptation module to complete the adaptation.
[0096] The dynamic management module's interface signals include the parameter adaptation result R, the SRAM control signal Smux2, the encryption / decryption module's operating frequency Freq, the output clock signal Clk, the output power control signal P (an N-bit signal, where the nth bit being 1 indicates normal power supply to the nth encryption / decryption module, and 0 indicates power disconnection to the nth encryption / decryption module; signal P is composed of 1s from R and Smux2), N sets of external SRAM interface signals SRAME_n (each set of interface signals includes the corresponding SRAM's enable signal, address signal, and data signal), and N sets of internal SRAM interface signals SRAMI_n (each set of interface signals includes the corresponding SRAM's enable signal, address signal, and data signal). The Freq signal output from the parameter adaptation module is input to the dynamic management module, which adjusts the output clock signal Clk (using DPLL) according to the Freq value to ensure that the actual frequency of the Clk signal is consistent with the Freq value. The output signal P of the dynamic management module directly controls the power supply of N encryption / decryption calculation modules, providing power only to the encryption / decryption calculation modules that perform encryption / decryption calculations and SRAM multiplexing.
[0097] The encryption / decryption calculation module array contains N encryption / decryption calculation modules and 1 encryption / decryption resource scheduling module. The encryption / decryption calculation modules are used to perform the actual encryption / decryption operations, while the main function of the encryption / decryption resource scheduling module is to schedule the corresponding encryption / decryption calculation modules to work according to the parameter adaptation result R. This includes allocating the data to be processed to different encryption / decryption calculation modules and outputting the processed data from different encryption / decryption calculation modules in sequence.
[0098] Based on the structure of the encryption / decryption system described above, the operation steps in this embodiment may include:
[0099] Step 1: Input the encryption / decryption target rate h, the number of targets occupied by the encryption / decryption module n, and the SRAM multiplexing signal Smux1. The parameter adaptation module calculates the input parameters. If H / h≥n and the total number of 1s in the Smux1 signal≤Nn, it means that the parameter adaptation is successful and jumps to (2). Otherwise, it jumps to the beginning of (1) and re-inputs the parameters.
[0100] Step 2: The dynamic management module calculates P based on R and Smux2 and outputs it to the encryption / decryption calculation module array;
[0101] Step 3: The dynamic management module adjusts the frequency of the clock signal Clk according to the Freq value and outputs it to the encryption / decryption calculation module array;
[0102] Step 4: The dynamic management module enables the corresponding SRAME_n and SRAMI_n signals according to the position corresponding to 1 in the N-bit Smux2. That is, when the nth bit in Smux2 is 1, SRAME_n and SRAMI_n are enabled, and the remaining SRAME_m and SRAMEI_m are disabled (the mth bit in Smux2 is 0). After SRAME_n and SRAMI_n are enabled, the SRAME_n[0:Q-1] and SRAMI_n[0:Q-1] signals are connected together (assuming that the bit width of the SRAME_n and SRAMI_n signals is Q).
[0103] Step 5: The encryption / decryption calculation module array shuts off the power to the unused encryption / decryption calculation modules according to the P value in step 2. When the value of the nth bit in the N-bit P value is 0, the power to the nth encryption / decryption calculation module is shut off.
[0104] Step 6: The encryption / decryption calculation module that is not powered off operates under the Clk output in step 3;
[0105] Step 7: The encryption and decryption resource scheduling module in the encryption and decryption calculation module array schedules the input data to be processed to the valid encryption and decryption calculation module according to the R value (scheduling can be done in ascending order; for example, when the 1st, 2nd, and 3rd bits of R are 1, the 1st group of data to be processed is scheduled to the 1st encryption and decryption calculation module, the 2nd group of data to be processed is scheduled to the 2nd encryption and decryption calculation module, and the 3rd group of data to be processed is scheduled to the 3rd encryption and decryption calculation module).
[0106] Step 8: After the encryption / decryption calculation module completes the encryption / decryption calculation, the encryption / decryption resource scheduling module outputs the encryption / decryption results of each module according to the input order (first-in, first-out; the first group of data to be processed is output after the calculation is completed, the second group of data to be processed is output after the calculation is completed, and so on). Thus, some encryption / decryption calculation modules can be used to complete the encryption / decryption calculation under Clk, effectively reducing instantaneous power consumption while meeting the encryption / decryption throughput requirements. Furthermore, the SRAM in the encryption / decryption calculation module corresponding to Smux2 can be read and written via the SRAME_n signal, thereby effectively utilizing idle encryption / decryption calculation module resources.
[0107] As can be seen, this embodiment divides the multiple encryption and decryption calculation modules in the encryption and decryption system into a first encryption and decryption calculation module and a second encryption and decryption calculation module by acquiring control parameters. Then, the first encryption and decryption calculation module is used to perform encryption and decryption calculations, and the storage unit of the second encryption and decryption calculation module is reused, which avoids the waste of storage resources and improves the resource utilization rate of the encryption and decryption system.
[0108] The resource scheduling device of the encryption / decryption system provided in the embodiments of this application is described below. The resource scheduling device of the encryption / decryption system described below can be referred to in correspondence with the resource scheduling method of the encryption / decryption system described above.
[0109] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of a resource scheduling device for an encryption / decryption system provided in an embodiment of this application.
[0110] In this embodiment, the device may include:
[0111] Parameter acquisition module 100 is used to acquire control parameters;
[0112] The parameter processing module 200 is used to determine the first encryption / decryption calculation module and the second encryption / decryption calculation module from multiple encryption / decryption calculation modules based on control parameters;
[0113] The encryption / decryption module scheduling module 300 is used to control all the first encryption / decryption calculation modules to process the data to be processed and obtain the processed data;
[0114] The storage unit scheduling module 400 is used to connect the signal lines of the storage units of all the second encryption and decryption calculation modules to the multiplexed signal lines, so that other devices can read and write to the storage units based on the multiplexed signal lines.
[0115] Optionally, the parameter acquisition module 100 is specifically used to acquire the encryption / decryption target rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal; determine whether the encryption / decryption target rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal meet preset conditions; if so, the encryption / decryption target rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal are used as control parameters.
[0116] Optionally, the parameter processing module 200 is specifically used to determine, based on the number of encryption / decryption modules used and the storage unit multiplexing signal in the control parameters, the first encryption / decryption calculation module used for encryption and decryption and the second encryption / decryption calculation module used for storage multiplexing among all encryption / decryption calculation modules.
[0117] Optionally, the encryption / decryption module scheduling module 300 is specifically used to determine the power supply control signal and the data input control signal based on the control parameters; to supply power to the first encryption / decryption calculation module based on the power supply control signal; to input the data to be processed to all the first encryption / decryption calculation modules based on the data input control signal; and to process the data to be processed by all the first encryption / decryption calculation modules to obtain the processed data.
[0118] Optionally, the storage unit scheduling module 400 is specifically used to set the corresponding multiplexing signal line to an enabled state based on the storage unit multiplexing signal of the control parameters; and to connect the signal lines of the storage units of all the second encryption and decryption calculation modules to the multiplexing signal lines so that other devices can read and write to the storage units based on the multiplexing signal lines.
[0119] This application also provides a terminal device, please refer to... Figure 4 , Figure 4 This application provides a schematic diagram of the structure of a terminal device, which may include:
[0120] Memory, used to store computer programs;
[0121] A processor, used to execute computer programs, can implement the resource scheduling methods of any of the encryption / decryption systems described above.
[0122] like Figure 4 The diagram shows the structural composition of a terminal device, which may include a processor 10, a memory 11, a communication interface 12, and a communication bus 13. The processor 10, memory 11, and communication interface 12 all communicate with each other through the communication bus 13.
[0123] In this embodiment, the processor 10 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic devices.
[0124] The processor 10 can call the program stored in the memory 11. Specifically, the processor 10 can execute the operations in the embodiment of the abnormal IP identification method.
[0125] The memory 11 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment, the memory 11 stores at least a program for implementing the following functions:
[0126] Obtain control parameters;
[0127] The first encryption / decryption calculation module and the second encryption / decryption calculation module are determined from multiple encryption / decryption calculation modules based on control parameters;
[0128] Control all first encryption / decryption calculation modules to process the data to be processed, and obtain the processed data;
[0129] Connect the signal lines of the storage units of all the second encryption / decryption calculation modules to multiplexed signal lines so that other devices can read and write to the storage units based on the multiplexed signal lines.
[0130] In one possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.
[0131] In addition, memory 11 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
[0132] Communication interface 12 can be an interface for the communication module, used to connect with other devices or systems.
[0133] Of course, it should be noted that, Figure 4 The structure shown does not constitute a limitation on the terminal device in the embodiments of this application. In practical applications, the terminal device may include more than Figure 4 More or fewer components as shown, or combinations of certain components.
[0134] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps of the resource scheduling method of any of the above-described encryption / decryption systems.
[0135] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0136] For a description of the computer-readable storage medium provided in this application, please refer to the above method embodiments; further details will not be repeated here.
[0137] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0138] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0139] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0140] The resource scheduling method, resource scheduling device, terminal equipment, and computer-readable storage medium of the encryption / decryption system provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A resource scheduling method for an encryption / decryption system, characterized in that, include: Obtain control parameters; Based on the control parameters, the first encryption / decryption calculation module and the second encryption / decryption calculation module are determined from multiple encryption / decryption calculation modules; Control all the first encryption / decryption calculation modules to process the data to be processed, and obtain the processed data; Connect the signal lines of all storage units of the second encryption / decryption calculation module to multiplexed signal lines so that other devices can read and write to the storage units based on the multiplexed signal lines; The acquisition of control parameters includes: Obtain the target encryption / decryption rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal; Determine whether the target encryption / decryption rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal meet preset conditions; If so, the encryption / decryption target rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal are used as the control parameters; The process of determining the first encryption / decryption calculation module and the second encryption / decryption calculation module from multiple encryption / decryption calculation modules based on the control parameters includes: Based on the number of encryption / decryption modules used in the control parameters and the storage unit multiplexing signal, determine the first encryption / decryption calculation module used for encryption and decryption and the second encryption / decryption calculation module used for storage multiplexing among all encryption / decryption calculation modules; The method further includes, after the encryption / decryption target rate meets the preset conditions: The clock frequency is calculated by performing clock frequency calculation on the encryption / decryption target rate to obtain the target clock frequency; Set the target clock frequency for the first encryption / decryption calculation module.
2. The resource scheduling method according to claim 1, characterized in that, Control all the first encryption / decryption calculation modules to process the data to be processed, and obtain the processed data, including: The power supply control signal and data input control signal are determined based on the control parameters; Power is supplied to the first encryption / decryption calculation module based on the power supply control signal; Based on the data input control signal, the data to be processed is input to all the first encryption / decryption calculation modules; The data to be processed is obtained by processing the data through all the first encryption and decryption calculation modules.
3. The resource scheduling method according to claim 2, characterized in that, After obtaining the processed data, the process also includes: The processed data is output in a first-in, first-out (FIFO) order.
4. The resource scheduling method according to claim 1, characterized in that, Connect the signal lines of all storage units of the second encryption / decryption calculation module to multiplexed signal lines so that other devices can read and write to the storage units based on the multiplexed signal lines, including: Based on the control parameters, the storage cell multiplexing signal sets the corresponding multiplexing signal line to the enabled state; Connect the signal lines of all storage units of the second encryption / decryption calculation module to the multiplexed signal lines so that other devices can read and write to the storage units based on the multiplexed signal lines.
5. A resource scheduling device for an encryption / decryption system, characterized in that, include: The parameter acquisition module is used to acquire control parameters; The parameter processing module is used to determine the first encryption / decryption calculation module and the second encryption / decryption calculation module from multiple encryption / decryption calculation modules based on the control parameters. The encryption / decryption module scheduling module is used to control all the first encryption / decryption calculation modules to process the data to be processed and obtain the processed data; The storage unit scheduling module is used to connect the signal lines of all storage units of the second encryption / decryption calculation module to multiplexed signal lines, so that other devices can read and write access to the storage units based on the multiplexed signal lines; Specifically, the parameter acquisition module is used to: acquire the encryption / decryption target rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal; determine whether the encryption / decryption target rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal meet preset conditions; if so, use the encryption / decryption target rate, the number of encryption / decryption modules used, and the storage unit multiplexing signal as the control parameters; Specifically, the parameter processing module is used to: determine the first encryption / decryption calculation module used for encryption and decryption and the second encryption / decryption calculation module used for storage multiplexing among all encryption / decryption calculation modules based on the number of encryption / decryption modules used in the control parameters and the storage unit multiplexing signal; Wherein, after the encryption / decryption target rate meets the preset conditions, the device is further configured to: calculate the clock frequency of the encryption / decryption target rate to obtain the target clock frequency; and set the target clock frequency for the first encryption / decryption calculation module.
6. A terminal device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the resource scheduling method as described in any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the resource scheduling method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
System for realizing SM4 algorithm at super-speed as well as operating method of system
CN104579636A
Encryption and decryption verification method and device based on FPGA and storage medium
CN112613046A