Decryption method and device based on processing core, electronic equipment and storage medium
By using a hardware authentication unit and an integrated key management module in a dedicated storage area for online hard decryption in a multi-core MCU system, the problem of the risk of key leakage is solved, the acceleration and security of data decryption are achieved, and each process is ensured Core data security.
Patent Information
- Application Number
- CN202410552137.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2024-09-17
AI Technical Summary
In multi-core MCU systems, the risk of key leakage is high, and existing technologies have insufficient security issues through soft decoding or decryption in RAM.
Using a decryption method based on the processing core, through the integrated key management module of the hardware authentication unit and the dedicated storage area, the PIN verification key and decryption algorithm are used to hard decrypt the data online to ensure that the key is managed and protected at the hardware level.
It achieves data decryption acceleration and security improvement in multi-core systems, ensures separate key management for each processing core, prevents key leaks, ensures that data cannot be used when copied, and enhances the overall security of the system.
Smart Images

Figure CN118656845A
Abstract
Description
Technical Field
[0001] The present disclosure relates to hardware decryption technology for multiple processing cores, and more particularly to a decryption method and device based on a processing core, an electronic device, and a storage medium. Background Art
[0002] In the automotive, industrial and other fields, more and more application services need to be processed, and at the same time, there are high real-time and security requirements for the processed data. Therefore, multi-core MCUs are often used to process multiple services to meet the real-time requirements of control. In this case, the multi-core program needs to be encrypted and stored and started to meet security requirements. For multi-core chips, external storage media are mostly soft-decoded, or the ciphertext code is read out to RAM and decrypted by MCU hardware. In this way, the key is visible to the CPU, which poses a risk of key leakage. Summary of the invention
[0003] The present disclosure provides a decryption method and device based on a processing core, an electronic device, and a storage medium to at least solve the above technical problems existing in the prior art.
[0004] According to a first aspect of the present disclosure, a processing core-based decryption method is provided, which is applied to a multi-core heterogeneous chip, wherein the chip includes more than two processing cores, and the two or more processing cores are connected via a bus; the processing core is connected to a hardware authentication unit, and the hardware authentication unit is connected to a first dedicated storage area; the first dedicated storage area stores a personal identification number (PIN) verification key of the processing core; the method includes:
[0005] In response to the processing core being started, triggering the hardware authentication unit to read a PIN verification key from the first dedicated storage area;
[0006] Decrypting the first format text of the processing core using the PIN verification key and the first decryption algorithm to obtain an offset (Ivar_offset, IV) and a starting address in the first format text;
[0007] Determine a first storage area for data to be decrypted based on the IV and the starting address;
[0008] Mapping the first storage area to a storage area corresponding to the hardware authentication unit;
[0009] The hardware authentication unit is triggered to call the PIN verification key and the second decryption algorithm to decrypt the first storage area according to the mapping relationship of the storage area to obtain decrypted data.
[0010] In some embodiments, the method further comprises:
[0011] Determine a current working mode, and when the current working mode is in the first working mode, trigger the processing core to call the decrypted data in the first storage area;
[0012] When currently in the second working mode, the decrypted data in the first storage area is mapped to the second storage area, triggering the processing core to call the decrypted data in the second storage area.
[0013] In some possible implementations, the hardware authentication unit includes an interface unit, a control unit, a key management unit and a bus engine unit; the interface unit is connected to the processing core, the key management unit and the control unit are respectively connected to the interface unit, and the bus engine unit is connected to the control unit; the key management unit is connected to the first dedicated storage area.
[0014] In some possible implementations, a locking area is provided in the first dedicated storage area, and the locking area is only accessible to the interface unit; wherein the PIN verification key is stored in the locking area.
[0015] In some possible implementations, the chip further includes a first memory and a second memory;
[0016] The first memory is connected to the processing core;
[0017] The bus engine unit is connected to the second memory;
[0018] The first format text is stored in the second memory, the first storage area is located in the second memory, and the second storage area is located in the first memory.
[0019] In some possible implementations, the first format text at least includes an IV element, an address element, and a configuration information element.
[0020] In some embodiments, the processing core is connected to the hardware authentication unit via an Advanced eXtensible Interface (AXI); and / or
[0021] The processing core is connected to the hardware authentication unit via an Advanced Peripheral Bus (APB) interface.
[0022] According to a second aspect of the present disclosure, a processing core-based decryption device is provided, which is applied to a multi-core heterogeneous chip, wherein the chip includes two or more processing cores, and the two or more processing cores are connected via a bus; the processing core is connected to a hardware authentication unit, and the hardware authentication unit is connected to a first dedicated storage area; the first dedicated storage area stores a PIN verification key of the processing core; the device includes:
[0023] a first trigger unit, configured to trigger the hardware authentication unit to read a PIN verification key from the first dedicated storage area in response to the processing core being started;
[0024] a decryption unit, configured to decrypt the first format text of the processing core using the PIN verification key and a first decryption algorithm to obtain the IV and the starting address in the first format text;
[0025] a first determining unit, configured to determine a first storage area for data to be decrypted based on the IV and the starting address;
[0026] A first mapping unit, configured to map the first storage area to a storage area corresponding to the hardware authentication unit;
[0027] The second trigger unit is used to trigger the hardware authentication unit to call the PIN verification key and the second decryption algorithm to decrypt the first storage area according to the mapping relationship of the storage area to obtain decrypted data.
[0028] In some embodiments, the device further comprises:
[0029] A second determining unit, used to determine the current working mode, trigger the third triggering unit when the current working mode is the first working mode, and trigger the second mapping unit when the current working mode is the second working mode;
[0030] A third triggering unit, configured to trigger the processing core to call the decrypted data in the first storage area when the processing core is currently in the first working mode;
[0031] A second mapping unit, configured to map the decrypted data in the first storage area to a second storage area;
[0032] A fourth triggering unit is used to trigger the processing core to call the decrypted data in the second storage area.
[0033] In some possible implementations, the hardware authentication unit includes an interface unit, a control unit, a key management unit and a bus engine unit; the interface unit is connected to the processing core, the key management unit and the control unit are respectively connected to the interface unit, and the bus engine unit is connected to the control unit; the key management unit is connected to the first dedicated storage area.
[0034] In some possible implementations, a locking area is provided in the first dedicated storage area, and the locking area is only accessible to the interface unit; wherein the PIN verification key is stored in the locking area.
[0035] In some possible implementations, the chip further includes a first memory and a second memory;
[0036] The first memory is connected to the processing core;
[0037] The bus engine unit is connected to the second memory;
[0038] The first format text is stored in the second memory, the first storage area is located in the second memory, and the second storage area is located in the first memory.
[0039] In some possible implementations, the first format text at least includes an IV element, an address element, and a configuration information element.
[0040] In some embodiments, the processing core is connected to the hardware authentication unit via AXI; and / or
[0041] The processing core is connected to the hardware authentication unit via an APB interface.
[0042] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0043] at least one processor; and
[0044] a memory communicatively connected to the at least one processor; wherein,
[0045] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the processing core-based decryption method described in the present disclosure.
[0046] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the steps of the processing core-based decryption method described in the present disclosure.
[0047] The disclosed processing core-based decryption method, device, electronic device and storage medium, for a multi-core processing system, stores relevant key data in a dedicated storage area through a hardware authentication unit and a dedicated storage area dedicated to the hardware authentication unit, and realizes online hard decryption by setting an integrated key management module inside the hardware authentication unit, thereby accelerating the data decryption speed. The disclosed method uses a region format descriptor (RFD) bin file method to manage the decryption area, can store user passwords in the multi-core system running area, and can use a dedicated storage area to store user passwords and lock them. The user password cannot be read out by software, and is only visible to the hardware authentication unit, thereby ensuring the security of the password. The disclosed method realizes the management of a separate key for each processing core in a multi-core system to ensure the data security of each processing core respectively, and through hardware decryption, it is ensured that the confidential data cannot be used even if it is copied, thereby ensuring the security of the data in the multi-core system.
[0048] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:
[0050] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0051] Figure 1 The process diagram of the decryption method based on the processing core of the embodiment of the present disclosure is shown Figure 1 ;
[0052] Figure 2 A schematic diagram of the logical structure of a hardware authentication unit according to an embodiment of the present disclosure;
[0053] Figure 3 The process diagram of the decryption method based on the processing core of the embodiment of the present disclosure is shown Figure 2 ;
[0054] Figure 4 A schematic diagram showing the structure of the RFD format of an embodiment of the present disclosure is shown;
[0055] Figure 5 The process diagram of the decryption method based on the processing core of the embodiment of the present disclosure is shown Figure 3 ;
[0056] Figure 6 A schematic diagram showing the composition structure of a decryption device based on a processing core according to an embodiment of the present disclosure is shown;
[0057] Figure 7 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0058] In order to make the purpose, features, and advantages of the present disclosure more obvious and easy to understand, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0059] Figure 1 The process diagram of the decryption method based on the processing core of the embodiment of the present disclosure is shown Figure 1 ,like Figure 1 As shown, the processing core-based decryption method of the embodiment of the present disclosure is applied to a multi-core heterogeneous chip, wherein the chip includes more than two processing cores, and the two or more processing cores are connected by a bus. The two or more processing cores are connected by an inter-core communication channel. Specifically, the inter-core communication channel can include two types, one is an inter-core communication channel for transmitting a small amount of data, such as using a mailbox to transmit instructions, and the other is an inter-core communication channel that supports a large amount of data, such as shared memory. Here, the inter-core communication channel is only an exemplary description, and other forms of connection channels can also be used. The processing core is connected to a hardware authentication unit, and the hardware authentication unit of the embodiment of the present disclosure is connected to a first dedicated storage area; the first dedicated storage area stores the PIN verification key of the processing core; as an example, the first dedicated storage area can be implemented by a one-time programmable memory (electronic fuse, efuse) to ensure the security of the PIN verification key. Specifically, the processing core-based decryption method of the embodiment of the present disclosure includes the following processing steps:
[0060] Step 101 : in response to the processing core starting up, trigger the hardware authentication unit to read the PIN verification key from the first dedicated storage area.
[0061] Figure 2 FIG. 1 is a schematic diagram of the logical structure of the hardware authentication unit of the embodiment of the present disclosure, such as Figure 2As shown, the hardware authentication unit of the embodiment of the present disclosure at least includes an interface unit, a control unit, a key management unit and a bus engine unit; the interface unit is connected to the processing core, the key management unit and the control unit are respectively connected to the interface unit, and the bus engine unit is connected to the control unit; the key management unit is connected to the first dedicated storage area. In the embodiment of the present disclosure, the interface unit is connected to the processing core through Figure 2 The register AXI interface (register AXI Interface) and the register APB interface (register APB Interface) in the embodiment of the present disclosure are implemented. By setting the AXI interface and the APB interface, the hardware authentication unit of the embodiment of the present disclosure is connected to each processing core (CPU). The control unit includes a direct controller register director controller and an indirect controller registerindirector controller. The indirect controller is connected to the register AXI interface and the register APB interface respectively. The key management unit includes a register key manager. The register key manager is connected to the processing core through the register APB interface. The register key manager is connected to the first dedicated storage area efuse. The direct controller, the indirect controller and the register key manager are connected to the bus engine. The bus engine is connected to the FLASH memory through the xspi bus interface.
[0062] The hardware authentication unit of the disclosed embodiment is connected to the CPU through AXI32 and APB bus. The CPU can directly operate the memory address through the AXI interface for direct access or indirect access, or access data through indirect access based on the APB bus. The PVK key is obtained from the efuse through the KEY manager module, and the Advanced Encryption Standard (AES) CTR (counter) counter mode is used to decrypt the encrypted data in the storage space.
[0063] like Figure 2As shown, in the embodiment of the present disclosure, when the system of the multi-core processing chip is reset and started, the bootrom reads the serial FLASH sequence (Serial Flash Sequence, SFS) and the region format descriptor (RegionFormat Descriptor, RFD) from the FLASH to the RAM, and parses the SFS to update the FLASH configuration. The system of the multi-core processing chip triggers the hardware authentication unit of the embodiment of the present disclosure to read the PIN verification key (Pin Verification Key, PVK) key from the efuse to the RAM for decryption by the hardware authentication unit of the embodiment of the present disclosure.
[0064] Step 102: Decrypt the first format text of the processing core using the PIN verification key and the first decryption algorithm to obtain the IV and the starting address in the first format text.
[0065] The hardware authentication unit of the embodiment of the present disclosure uses a first decryption algorithm to obtain the IV of the data to be decrypted and the start and end addresses of the data to be decrypted from the RFD. The first decryption algorithm includes IV=0AES-128-CBC algorithm.
[0066] Step 103: determine a first storage area for the data to be decrypted based on the IV and the start address.
[0067] The storage address of the data to be decrypted is determined based on the IV and the starting address, that is, the specific location of the first storage area is determined. The data to be decrypted in the embodiment of the present disclosure may be various applications loaded by the multi-processing core system, or other text data. The first storage area is located at Figure 2 In the flash shown.
[0068] Step 104: Map the address information of the first storage area to the storage area corresponding to the hardware authentication unit.
[0069] In the disclosed embodiment, the storage address of the data to be decrypted is determined based on the IV and the starting address, that is, the specific location of the first storage area is determined.
[0070] Step 105, triggering the hardware authentication unit to call the PIN verification key and the second decryption algorithm to decrypt the first storage area according to the mapping relationship of the storage area to obtain decrypted data.
[0071] In the disclosed embodiment, the second decryption algorithm includes the AES-128-CTR algorithm.
[0072] The chip also includes a first memory and a second memory; the first memory is Figure 2 The RAM in is connected to the processing core; the second memory is Figure 2The flash shown is connected to the bus engine unit. The first format text is stored in the second memory, and the first storage area is located in the second memory.
[0073] The embodiment of the present disclosure stores the relevant key data in the dedicated storage area by setting a hardware authentication unit and a dedicated storage area for access by the hardware authentication unit. By setting an integrated key management module inside the hardware authentication unit, online hard decryption is realized, thereby speeding up the data decryption speed. The present disclosure uses the region format descriptor (RFD) bin file method to manage the decryption area, which can store user passwords in the multi-core system running area, and can use a dedicated storage area to store user passwords and lock them. The user password cannot be read out by software and is only visible to the hardware authentication unit, thereby ensuring the security of the password. The present disclosure implements the management of separate keys for each processing core in the multi-core system to ensure the data security of each processing core respectively, and through hardware decryption, it is ensured that the confidential data cannot be used even if it is copied, thereby ensuring the security of data in the multi-core system.
[0074] Figure 3 The process diagram of the decryption method based on the processing core of the embodiment of the present disclosure is shown Figure 2 ,like Figure 3 As shown, the processing core-based decryption method of the embodiment of the present disclosure is applied to a multi-core heterogeneous chip, wherein the chip includes more than two processing cores, and the two or more processing cores are connected by a bus. The two or more processing cores are connected by an inter-core communication channel. Specifically, the inter-core communication channel can include two types, one is an inter-core communication channel for transmitting a small amount of data, such as using a mailbox to transmit instructions, and the other is an inter-core communication channel that supports a large amount of data, such as shared memory. Here, the inter-core communication channel is only an exemplary description, and other forms of connection channels can also be used. The processing core is connected to a hardware authentication unit, and the hardware authentication unit of the embodiment of the present disclosure is connected to a first dedicated storage area; the first dedicated storage area stores the PIN verification key of the processing core; as an example, the first dedicated storage area can be implemented by a one-time programmable memory (electronic fuse, efuse) to ensure the security of the PIN verification key. Specifically, the processing core-based decryption method of the embodiment of the present disclosure includes the following processing steps:
[0075] Step 301 : In response to the processing core being started, triggering the hardware authentication unit to read a PIN verification key from a first dedicated storage area.
[0076] The hardware authentication unit of the embodiment of the present disclosure at least includes an interface unit, a control unit, a key management unit and a bus engine unit; the interface unit is connected to the processing core, the key management unit and the control unit are respectively connected to the interface unit, and the bus engine unit is connected to the control unit; the key management unit is connected to the first dedicated storage area. For the specific structure of the hardware authentication unit of the embodiment of the present disclosure, see Figure 2 The structure shown will not be described in detail here.
[0077] like Figure 2 As shown, in the embodiment of the present disclosure, when the system of the multi-core processing chip is reset and started, the bootrom reads the serial FLASH sequence (Serial Flash Sequence, SFS) and the region format descriptor (RegionFormat Descriptor, RFD) from the FLASH to the RAM, and parses the SFS to update the FLASH configuration. The system of the multi-core processing chip triggers the hardware authentication unit of the embodiment of the present disclosure to read the PIN verification key (Pin Verification Key, PVK) key from the efuse to the RAM for decryption by the hardware authentication unit of the embodiment of the present disclosure.
[0078] In the embodiment of the present disclosure, in order to ensure the security of the key, the PVK password is burned into the efuse, and a dedicated efuse bank is set in the efuse, and the dedicated efuse bank function is locked, that is, by locking the PVK bank area of the efuse, so that it is only visible to the hardware authentication unit of the embodiment of the present disclosure, preventing key leakage.
[0079] In the disclosed embodiment, the RFD format bin file can also be used to encrypt and manage the data. Figure 4 A schematic diagram showing the structure of the RFD format of an embodiment of the present disclosure is shown as follows: Figure 4 As shown, in the disclosed embodiment, any key from pvk0 to pvk3 can be used to encrypt IV and StartAddr to configuration (CFG) data. As an example, the AES-128-CBC algorithm is used for encryption. The data of this region (Region) is encrypted using pvk_x and IV. As an example, the AES-128-CTR algorithm is used for encryption.
[0080] RFD may include four areas from rfd0 to rfd4. Each rfdx corresponds to a specific processing core. Each processing core may decrypt its data to be decrypted, such as applications, and may run independently, thereby ensuring the security of the code in each processing core.
[0081] like Figure 4As shown, the RFD format bin file contains at least IV cells, address cells, and configuration information cells (CFG). Among them, the address cells include StartAddr and EndAddr, both of which occupy 4 bits. The RFD format bin file can also include KEK cells and IEK cells. KEK and IEK are ignored, so they can be filled with 0. IV cells, KEK cells, and IEK cells all occupy 16 bits. The RFD format bin file can also include Offset and CRC check code cells, such as Figure 4 shown.
[0082] Step 302: Decrypt the first format text of the processing core using the PIN verification key and the first decryption algorithm to obtain the IV and the starting address in the first format text.
[0083] The hardware authentication unit of the embodiment of the present disclosure uses the first decryption algorithm (IV=0AES-128-CBC) to obtain the IV of the data to be decrypted and the start and end addresses of the data to be decrypted from the RFD.
[0084] Step 303: determine a first storage area for the data to be decrypted based on the IV and the start address.
[0085] The storage address of the data to be decrypted is determined based on the IV and the starting address, that is, the specific location of the first storage area is determined. The data to be decrypted in the embodiment of the present disclosure may be various applications loaded by the multi-processing core system, or other text data. The first storage area is located at Figure 2 In the flash shown.
[0086] Step 304: Map the address information of the first storage area to the storage area corresponding to the hardware authentication unit.
[0087] In the disclosed embodiment, the storage address of the data to be decrypted is determined based on the IV and the starting address, that is, the specific location of the first storage area is determined.
[0088] Step 305: trigger the hardware authentication unit to call the PIN verification key and the second decryption algorithm to decrypt the first storage area according to the mapping relationship of the storage area to obtain decrypted data.
[0089] In the disclosed embodiment, the second decryption algorithm includes the AES-128-CTR algorithm.
[0090] Step 306, determine the current working mode. When it is currently in the first working mode, trigger the processing core to call the decrypted data in the first storage area; when it is currently in the second working mode, map the decrypted data in the first storage area to the second storage area, triggering the processing core to call the decrypted data in the second storage area.
[0091] The first operating mode includes an eXecute In Place (XIP) mode, which allows an application to run code directly in the Flash memory without first reading the code into the system RAM. In XIP mode, the Flash memory can be used directly to execute program code, which means that the code can be directly fetched, decoded and executed in the Flash memory. The disclosed embodiment utilizes this mode without loading the code into RAM.
[0092] Therefore, in the XIP mode, the processing core directly calls the decrypted data from the first storage area and executes it.
[0093] The second working mode is the non-XIP mode, which does not allow the application to run the code directly in the Flash memory, and requires the code to be read into the system RAM in advance. In the non-XIP mode, the decrypted data in the first storage area needs to be mapped to the second storage area, i.e., the system RAM, and then the processing core calls the decrypted data in the second storage area to realize the operation of the decrypted data.
[0094] Figure 5 The process diagram of the decryption method based on the processing core of the embodiment of the present disclosure is shown Figure 3 ,like Figure 5 As shown, the decryption method based on the processing core of the embodiment of the present disclosure includes the following processing steps:
[0095] The multi-core processing system is reset and started;
[0096] The bootrom initializes the XSPI interface, that is, the bootrom initializes the hardware authentication unit of the embodiment of the present disclosure.
[0097] The system reads sfs and rfd from the first sector of flash to RAM, parses sfs data, obtains configuration information related to XSPI, i.e., hardware authentication unit, updates flash configuration, including mirrored data packet address information, updates configuration related to XSPI, i.e., hardware authentication unit, and initializes it.
[0098] Make sure the multi-core processing system contains RFD format files and the RFD function is enabled. For the specific structure of the RFD format file, refer to Figure 4 , I will not go into details here.
[0099] The PVK key is read from efuse and written to RAM. The IV information and the start and end addresses of the encrypted data are decrypted from RFD using the IV=0AES-128-CBC algorithm for use by the hardware authentication unit of the disclosed embodiment for decryption. The address information of the first storage area is mapped to the corresponding storage area of the hardware authentication unit so that the hardware authentication unit can decrypt the data to be decrypted in the first storage area.
[0100] XSPI, i.e., the hardware authentication unit of the disclosed embodiment, can determine the area where the encrypted data is located based on the IV information decrypted from the RFD and the start and end addresses of the encrypted data. The hardware authentication unit of the disclosed embodiment uses the acquired PVK to decrypt the data to be decrypted in the first storage area through AES-128-CTR. Specifically, the area start and end addresses are set to the mirror area start address IMG_REGION_START_ADDRn and end address IMG_REGION_END_ADDRn registers corresponding to the hardware authentication unit of the disclosed embodiment according to the IV information and the start and end addresses of the encrypted data.
[0101] Determine the current working mode and whether it is XIP mode.
[0102] If it is in XIP mode, load the bootloader to RAM for execution. Remap the app flash start address to address 0. The hardware authentication unit of the disclosed embodiment decrypts the data to be decrypted, such as the app, in the flash, resets the processing core where the app is located, and runs the app in XIP mode. Specifically, the address of the storage area where the data to be decrypted (app) is located is mapped to the register area corresponding to the hardware authentication unit for the hardware authentication unit to decrypt. After decryption, the processing core directly runs the decrypted data, such as the app, in the flash in XIP mode.
[0103] By enabling the CTR_EN bit in the RFD mirror register, the hardware authentication unit can decrypt the code to be decrypted in the RFD area based on the AES-128-CTR algorithm.
[0104] If it is non-XIP mode, the app decrypted by XSPI is loaded from flash to RAM for execution, and the processing core directly runs the app in RAM.
[0105] The embodiment of the present disclosure stores the relevant key data in the dedicated storage area by setting a hardware authentication unit and a dedicated storage area for access by the hardware authentication unit. By setting an integrated key management module inside the hardware authentication unit, online hard decryption is realized, thereby speeding up the data decryption speed. The present disclosure uses the region format descriptor (RFD) bin file method to manage the decryption area, which can store user passwords in the multi-core system running area, and can use a dedicated storage area to store user passwords and lock them. The user password cannot be read out by software and is only visible to the hardware authentication unit, thereby ensuring the security of the password. The present disclosure implements the management of separate keys for each processing core in the multi-core system to ensure the data security of each processing core respectively, and through hardware decryption, it is ensured that the confidential data cannot be used even if it is copied, thereby ensuring the security of data in the multi-core system.
[0106] Figure 6 The schematic diagram of the structure of the decryption device based on the processing core of the embodiment of the present disclosure is shown as follows: Figure 6 As shown, the decryption device based on the processing core of the embodiment of the present disclosure is applied to a multi-core heterogeneous chip, wherein the chip includes more than two processing cores, and the two or more processing cores are connected through a bus; the processing core is connected to a hardware authentication unit, and the hardware authentication unit is connected to a first dedicated storage area; the first dedicated storage area stores a PIN verification key of the processing core; the decryption device based on the processing core of the embodiment of the present disclosure includes:
[0107] A first trigger unit 60, configured to trigger the hardware authentication unit to read a PIN verification key from the first dedicated storage area in response to the processing core being started;
[0108] A decryption unit 61, configured to decrypt the first format text of the processing core using the PIN verification key and a first decryption algorithm to obtain the IV and the starting address in the first format text;
[0109] A first determining unit 62, configured to determine a first storage area for data to be decrypted based on the IV and the start address;
[0110] A first mapping unit 63, configured to map the first storage area to a storage area corresponding to the hardware authentication unit;
[0111] The second trigger unit 64 is used to trigger the hardware authentication unit to call the PIN verification key and the second decryption algorithm to decrypt the first storage area according to the mapping relationship of the storage area to obtain decrypted data.
[0112] exist Figure 6On the basis of the decryption device based on the processing core shown, the decryption device based on the processing core of the embodiment of the present disclosure further includes:
[0113] The second determination unit ( Figure 6 (not shown), used to determine the current working mode, when it is currently in the first working mode, trigger the third trigger unit, and when it is currently in the second working mode, trigger the second mapping unit;
[0114] The third trigger unit ( Figure 6 (not shown) for triggering the processing core to call the decrypted data in the first storage area when currently in the first working mode;
[0115] The second mapping unit ( Figure 6 (not shown) for mapping the decrypted data in the first storage area to a second storage area;
[0116] The fourth trigger unit ( Figure 6 ), which is not shown in the figure, is used to trigger the processing core to call the decrypted data in the second storage area.
[0117] In some possible implementations, the hardware authentication unit includes an interface unit, a control unit, a key management unit and a bus engine unit; the interface unit is connected to the processing core, the key management unit and the control unit are respectively connected to the interface unit, and the bus engine unit is connected to the control unit; the key management unit is connected to the first dedicated storage area.
[0118] In some possible implementations, a locking area is provided in the first dedicated storage area, and the locking area is only accessible to the interface unit; wherein the PIN verification key is stored in the locking area.
[0119] In some possible implementations, the chip further includes a first memory and a second memory;
[0120] The first memory is connected to the processing core;
[0121] The bus engine unit is connected to the second memory;
[0122] The first format text is stored in the second memory, the first storage area is located in the second memory, and the second storage area is located in the first memory.
[0123] In some possible implementations, the first format text at least includes an IV element, an address element, and a configuration information element.
[0124] In some embodiments, the processing core is connected to the hardware authentication unit via AXI; and / or
[0125] The processing core is connected to the hardware authentication unit via an APB interface.
[0126] In an exemplary embodiment, the first trigger unit 60, the decryption unit 61, the first determination unit 62, the first mapping unit 63, the second trigger unit 64, the second determination unit, the second mapping unit, the third trigger unit, the fourth trigger unit, etc. can be implemented by one or more central processing units (CPU), graphics processing units (GPU), application specific integrated circuits (ASIC), DSP, programmable logic devices (PLD), complex programmable logic devices (CPLD), field programmable gate arrays (FPGA), general-purpose processors, controllers, microcontrollers (MCU), microprocessors, or other electronic components.
[0127] Regarding the device in the above embodiment, the specific manner in which each module and unit performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0128] According to an embodiment of the present disclosure, the present disclosure also records an electronic device and a readable storage medium.
[0129] Figure 7 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0130] like Figure 7As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0131] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0132] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a decryption method based on a processing core. For example, in some embodiments, the decryption method based on a processing core of an embodiment of the present disclosure may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the decryption method based on the processing core described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured in any other appropriate manner (for example, by means of firmware) to execute the steps of the processing core-based decryption method of the aforementioned embodiments.
[0133] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0134] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0135] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0137] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0138] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0139] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0140] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0141] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A processing core-based decryption method, applied to a multi-core heterogeneous chip, wherein the chip includes more than two processing cores, and the two or more processing cores are connected via a bus; characterized in that: The processing core is connected to a hardware authentication unit, and the hardware authentication unit is connected to a first dedicated storage area; The first dedicated storage area stores a personal identification code PIN verification key of the processing core; the method comprises: In response to the processing core being started, triggering the hardware authentication unit to read a PIN verification key from the first dedicated storage area; Decrypting the first format text of the processing core using the PIN verification key and the first decryption algorithm to obtain the offset IV and the starting address in the first format text; Determine a first storage area for data to be decrypted based on the IV and the starting address; Mapping the first storage area to a storage area corresponding to the hardware authentication unit; The hardware authentication unit is triggered to call the PIN verification key and the second decryption algorithm to decrypt the first storage area according to the mapping relationship of the storage area to obtain decrypted data.
2. The method according to claim 1, characterized in that The method further comprises: Determine a current working mode, and when the current working mode is in the first working mode, trigger the processing core to call the decrypted data in the first storage area; When currently in the second working mode, the decrypted data in the first storage area is mapped to the second storage area, triggering the processing core to call the decrypted data in the second storage area.
3. The method according to claim 1, characterized in that The hardware authentication unit includes an interface unit, a control unit, a key management unit and a bus engine unit; the interface unit is connected to the processing core, the key management unit and the control unit are respectively connected to the interface unit, and the bus engine unit is connected to the control unit; the key management unit is connected to the first dedicated storage area.
4. The method according to claim 3, characterized in that A locking area is provided in the first dedicated storage area, and the locking area is only accessible to the interface unit; wherein the PIN verification key is stored in the locking area.
5. The method according to claim 3, characterized in that: The chip also includes a first memory and a second memory; The first memory is connected to the processing core; The bus engine unit is connected to the second memory; The first format text is stored in the second memory, and the first storage area is located in the second memory; The second storage area is located in the first memory.
6. The method according to claim 1, characterized in that The first format text at least includes an IV cell, an address cell, and a configuration information cell.
7. The method according to claim 1, characterized in that The processing core is connected to the hardware authentication unit via an advanced extensible interface AXI; and / or The processing core is connected to the hardware authentication unit via an advanced peripheral bus APB interface.
8. A decryption device based on a processing core, applied to a multi-core heterogeneous chip, wherein the chip includes more than two processing cores, and the two or more processing cores are connected via a bus; characterized in that: The processing core is connected to a hardware authentication unit, and the hardware authentication unit is connected to a first dedicated storage area; The first dedicated storage area stores a personal identification code PIN verification key of the processing core; the device comprises: a first trigger unit, configured to trigger the hardware authentication unit to read a PIN verification key from the first dedicated storage area in response to the processing core being started; a decryption unit, configured to decrypt the first format text of the processing core using the PIN verification key and a first decryption algorithm to obtain the IV and the starting address in the first format text; a first determining unit, configured to determine a first storage area for data to be decrypted based on the IV and the starting address; A first mapping unit, configured to map the first storage area to a storage area corresponding to the hardware authentication unit; The second trigger unit is used to trigger the hardware authentication unit to call the PIN verification key and the second decryption algorithm to decrypt the first storage area according to the mapping relationship of the storage area to obtain decrypted data.
9. The device according to claim 8, characterized in that The device also includes: A second determining unit, used to determine the current working mode, trigger the third triggering unit when the current working mode is the first working mode, and trigger the second mapping unit when the current working mode is the second working mode; A third triggering unit, configured to trigger the processing core to call the decrypted data in the first storage area when the processing core is currently in the first working mode; A second mapping unit, configured to map the decrypted data in the first storage area to a second storage area; A fourth triggering unit is used to trigger the processing core to call the decrypted data in the second storage area.
10. The device according to claim 8, characterized in that The hardware authentication unit includes an interface unit, a control unit, a key management unit and a bus engine unit; the interface unit is connected to the processing core, the key management unit and the control unit are respectively connected to the interface unit, and the bus engine unit is connected to the control unit; the key management unit is connected to the first dedicated storage area.
11. The device according to claim 10, characterized in that A locking area is provided in the first dedicated storage area, and the locking area is only accessible to the interface unit; wherein the PIN verification key is stored in the locking area.
12. The device according to claim 10, characterized in that The chip also includes a first memory and a second memory; The first memory is connected to the processing core; The bus engine unit is connected to the second memory; The first format text is stored in the second memory, and the first storage area is located in the second memory; The second storage area is located in the first memory.
13. The device according to claim 8, characterized in that The first format text at least includes an IV cell, an address cell, and a configuration information cell.
14. The device according to claim 8, characterized in that The processing core is connected to the hardware authentication unit via AXI; and / or The processing core is connected to the hardware authentication unit via an APB interface.
15. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the processing core-based decryption method according to any one of claims 1 to 7.
16. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the steps of the processing core-based decryption method according to any one of claims 1 to 7.
Citation Information
Cited By
Online data encryption and decryption method and apparatus based on eflash-XIP mode, device, and storage medium
WO2026144092A1
