WO2022088194A1 - Security processing apparatus, security processing method, and related device - Google Patents

Security processing apparatus, security processing method, and related device Download PDF

Info

Publication number
WO2022088194A1
WO2022088194A1 PCT/CN2020/125977 CN2020125977W WO2022088194A1 WO 2022088194 A1 WO2022088194 A1 WO 2022088194A1 CN 2020125977 W CN2020125977 W CN 2020125977W WO 2022088194 A1 WO2022088194 A1 WO 2022088194A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
subsystem
target
key
security
Prior art date
Application number
PCT/CN2020/125977
Other languages
French (fr)
Chinese (zh)
Inventor
陈迎国
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2020/125977 priority Critical patent/WO2022088194A1/en
Priority to CN202080006698.1A priority patent/CN114731272B/en
Publication of WO2022088194A1 publication Critical patent/WO2022088194A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords

Definitions

  • the present application relates to the technical field of safe booting of operating systems, and in particular, to a security processing device, a security processing method, and related equipment.
  • An operating system is a computer program that manages computer hardware and software resources.
  • the operating system handles basic tasks such as managing and configuring memory, prioritizing the supply and demand of system resources, controlling input and output devices, operating the network, and managing the file system.
  • An operating system image is a compressed file containing the above computer program, and an operating system image usually contains multiple subsystem images. If the operating system image has been encrypted, during the operating system startup process, each encrypted subsystem image needs to be decrypted in turn to obtain the plaintext of each subsystem image, and the processor will run the plaintext of each subsystem image to start the operating system. .
  • a unified decryption key is used to decrypt the different subsystem images respectively. Specifically, the following two methods are included: (1) The above-mentioned decryption key is in plaintext.
  • the method is stored in the memory of the chip, the processor drives the decryption module to obtain the decryption key, and decrypts each subsystem image; (2)
  • the above-mentioned decryption key is stored in the memory of the chip in the form of ciphertext, and the processor Drive the decryption module to obtain the decryption key, decrypt the decryption key to obtain the decryption key plaintext, and then use the decryption key plaintext to decrypt each subsystem image.
  • the above two methods are easy to crack the ciphertext of the entire operating system image due to the leakage of the decryption key, and the security is low.
  • the embodiments of the present application disclose a security processing device and a related security processing method, so as to improve the security of system startup during operating system startup.
  • an embodiment of the present application provides a security processing device, which may include: a processing unit, a security engine, a first storage unit, and a second storage unit; wherein, the processing unit is configured to separately acquire a Multiple subsystem images of the operating system image; a first storage unit for storing the first key information of the operating system image, the first key information including the root key ciphertext, the life cycle state LCS, the root of trust public key at least one of the key ROTPK hash value, operator information or product information; a second storage unit for storing the target key factor of the target subsystem image in the multiple subsystem images; in the multiple subsystem images, one The subsystem image corresponds to a key factor, and different subsystem images have different key factors; the security engine is used to generate a target decryption key of the target subsystem image according to the first key information and the target key factor; and use the target The decryption key decrypts the target subsystem image to obtain the target image plaintext of the target subsystem image; the processing unit
  • each subsystem image has a different decryption key during the decryption process. Therefore, when the decryption keys of some subsystem images in the operating system are leaked, since the decryption keys of each subsystem image are different, other subsystem images whose decryption keys have not been leaked cannot be decrypted, preventing the operating system from being completely attacked. Thereby improving the security of the operating system.
  • the first key information includes one or more of the root key ciphertext, the life cycle state LCS, the trusted root public key ROTPK hash value, the operator information and the product information, it can further ensure that different subsystems
  • the decryption keys of each subsystem image generated by the image according to its corresponding key factor and the first key information are different.
  • the terminal device is in different life cycle states (such as chip manufacturing CM mode, device manufacturing DM mode and secure SM mode)
  • its LCS value is different
  • the ROTPK of different device manufacturers is different, so the ROTPK hash value is also different
  • the operator information or product information corresponding to terminal devices of different network operators or terminal devices of different models are also different.
  • the decryption key in the embodiment of the present application can effectively prevent the decryption key of the operating system image in a certain life cycle state from being leaked and be used to decrypt the operating system image in other life cycle states; at the same time, it can also prevent some devices from being leaked.
  • the manufacturer's ROTPK is leaked and used to decrypt other device manufacturers' terminal device operating system images; and to prevent the same type of terminal device, or the decryption key of the same operator's terminal device operating system image from being leaked and used to decrypt other devices.
  • the above-mentioned first storage unit may be a one-time programmable device, that is, the first key information stored in the first storage unit cannot be changed after being written for the first time, thereby ensuring that according to the first key information
  • the security and accuracy of each subsystem image decryption key generated by the information further improves the security of the operating system.
  • the above-mentioned security engine is configured to continue decrypting the next subsystem image to obtain the next subsystem image of the next subsystem image after decrypting the target subsystem image to obtain the plaintext of the target image.
  • the image plaintext, the next subsystem image is the subsequent subsystem image of the target subsystem image in the above-mentioned multiple subsystem images.
  • the multiple subsystem images included in the operating system are loaded one by one, and the loading of each subsystem image includes the decryption of each subsystem image and the plaintext of each subsystem image. operation; wherein, the target subsystem image is the subsystem image currently being loaded among the above-mentioned multiple subsystem images.
  • the security engine decrypts the currently loaded subsystem image, that is, the target subsystem image each time, and then decrypts the next subsystem image after the target subsystem image is decrypted. Therefore, even if the target subsystem image is attacked during the decryption process, resulting in the leakage of the target decryption key, due to the different decryption keys of different subsystem images, other subsystem images still cannot be decrypted, which can prevent the entire operating system from being completely attacked. Thereby improving the security of the operating system.
  • the above-mentioned processing unit is specifically configured to: obtain the target subsystem image in the above-mentioned multiple subsystem images; run the plaintext of the target image; Get the next subsystem image; run the next image plaintext.
  • multiple subsystem images of the operating system are loaded in series, that is, one subsystem image is loaded at a time.
  • the processing unit acquires one subsystem image, that is, the target subsystem image each time, and after running the plaintext of the target subsystem image, acquires the next subsystem image, and then runs the next image plaintext.
  • a subsystem image is attacked during the loading process, even if the subsystem image is cracked, other subsystem images are still safe, which can prevent the entire operating system from being cracked, thereby improving the operating system. Security during startup.
  • the above-mentioned processing unit is further configured to: obtain the target security certificate chain of the target subsystem image; among the above-mentioned multiple subsystem images, one subsystem image corresponds to one security certificate chain; from the target security certificate chain Or obtain the target key factor from the decrypted image plaintext, and configure the target key factor to the second storage unit.
  • the above-mentioned decrypted image plaintext is decrypted by the security engine in the above-mentioned multiple subsystem images before decrypting the target subsystem image. Other subsystem images are obtained.
  • the security engine may also verify the target security certificate chain, and after the verification is passed, the processing unit obtains the target key factor , where the target security certificate chain contains at least one level of security certificate, and each level of security certificate will be verified.
  • the manner in which the security engine obtains the target key factor includes: obtaining the target key factor from the target security certificate chain, or obtaining the target key factor from the decrypted image plaintext.
  • the security engine obtains the target key factor from the decrypted image plaintext, since the decrypted subsystem image is trusted, the target key factor obtained from the decrypted image plaintext is also trusted and secure ;
  • the security engine obtains the target key factor from the target security certificate chain, before obtaining the target key factor, the security engine can verify the target security certificate chain. Obtain the target key factor, and the verification process can ensure that the target key factor obtained by the security engine is trusted and secure.
  • the above-mentioned security processing apparatus further includes: a third storage unit, configured to store the above-mentioned multiple subsystem images and multiple security certificate chains corresponding to the multiple subsystem images respectively.
  • the above-mentioned third storage unit may be a readable and writable storage unit, and when the operating system is updated, the processing unit writes a plurality of new subsystems into the third storage unit Mirror to update the original subsystem mirror. Since the security holes in the original subsystem mirror are fixed in the new subsystem mirror, and the new subsystem mirror supports more system functions, it can effectively improve Security during operating system startup.
  • the above-mentioned security engine is specifically used for: decrypting the root key ciphertext to obtain the root key plaintext; according to LCS, ROTPK hash value, target key factor, operator information or product information At least one of the derivation factors is obtained; the target decryption key is generated based on the derivation factors and the root key plaintext.
  • the security engine can obtain the derivation factor of each subsystem image according to at least one of LCS, ROTPK hash value, key factor of each subsystem image, operator information or product information,
  • the decryption key of each subsystem image is generated based on the derivation factor of each subsystem image and the plaintext of the root key. Since the key factor of each subsystem image is different, the decryption key of each subsystem image is different, which improves the performance of each subsystem image.
  • the root key is stored in the first storage unit in the form of ciphertext, which improves the security of the root key and effectively prevents the root key After being leaked, it is used to generate the decryption key of each subsystem image, thereby improving the security of the operating system.
  • the above-mentioned processing unit is further configured to overwrite the target key factor with the first key factor after running the target image plaintext;
  • the above-mentioned security engine is further configured to clear the target decryption key; or use the first key factor to cover the target key factor;
  • the security decryption key or the first preset value of the target subsystem image covers the target decryption key, and the security decryption key is generated according to the first key factor and the first key information.
  • the security engine can overwrite or clear the key factor and decryption key of each subsystem image, because each subsystem image is loaded serially. Therefore, the key factor and decryption key of each subsystem image only exist in the decryption process of the subsystem image, which effectively improves the independence of each subsystem image decryption process and improves the security of the operating system image decryption process. sex.
  • the above-mentioned multiple subsystem images include a first subsystem image and a second subsystem image; during the startup of the operating system, the first subsystem image is decrypted once, and the second subsystem image is decrypted many times. Second-rate.
  • the first subsystem image is a type of subsystem image that is decrypted once during the operating system startup process
  • the second subsystem image is a type of subsystem image that is decrypted multiple times during the operating system startup process.
  • the number of times the subsystem image is decrypted is determined by a specific application scenario, and each second subsystem image uses the same key factor and decryption key during the multiple decryption process.
  • the subsystem image of the operating system may include the first subsystem image and the second font same image.
  • the number of times of decryption of the second subsystem image is determined by the specific application scenario.
  • the above-mentioned security processing apparatus further includes: a fourth storage unit, configured to provide storage space for running the plaintext of the target image.
  • the above-mentioned fourth storage unit may be a random storage unit, which is used to store the mirror images, data and intermediate results of each subsystem during the loading process of the mirror images of each subsystem, so as to ensure that the mirror images of each subsystem are stored. normal operation and smooth startup of the operating system.
  • an embodiment of the present application provides a security processing method, including: obtaining, by a processing unit, multiple subsystem images of an operating system image used for operating system startup respectively; storing, by a first storage unit, a first image of the operating system image Key information, the first key information includes at least one of root key ciphertext, life cycle status LCS, root of trust public key ROTPK hash value, operator information or product information; the second storage unit stores the above The target key factor of the target subsystem image in the multiple subsystem images; in the above multiple subsystem images, one subsystem image corresponds to one key factor, and different subsystem images have different key factors; key information and target key factor to generate the target decryption key of the target subsystem image; and use the target decryption key to decrypt the target subsystem image to obtain the target image plaintext of the target subsystem image; the processing unit runs the target image plaintext .
  • the method further includes: after the security engine decrypts the target subsystem image to obtain the plaintext of the target image, the security engine continues to decrypt the next subsystem image to obtain the next sub-system image.
  • the above-mentioned obtaining, by the processing unit, the multiple subsystem images of the operating system image used for starting the operating system respectively includes: obtaining, by the processing unit, the target subsystem image from the above-mentioned multiple subsystem images; After mirroring the plaintext, the processing unit continues to obtain the next subsystem mirror from the multiple subsystem mirrors; after the processing unit runs the target mirroring plaintext, the security processing method further includes: running the next mirroring plaintext.
  • the above method further includes: acquiring, by the processing unit, a target security certificate chain of the target subsystem image; among the above-mentioned multiple subsystem images, one subsystem image corresponds to one security certificate chain; Obtain the target key factor from the target security certificate chain or the decrypted image plaintext, and configure the target key factor to the second storage unit.
  • generating the target decryption key of the target subsystem image by the security engine according to the first key information and the target key factor includes: decrypting the ciphertext of the root key to obtain the root key Plaintext; splicing one or more of the LCS, ROTPK hash value, target key factor, operator information and product information to obtain the derivation factor; based on the derivation factor and the root key plaintext to generate the target decryption of the target subsystem image key.
  • the above-mentioned method further includes: storing, by a third storage unit, the above-mentioned multiple subsystem images and multiple security certificate chains corresponding to the above-mentioned multiple subsystem images respectively.
  • the method further includes: the processing unit overwrites the target key factor of the target subsystem image with the first key factor; Clearing the target decryption key; or overwriting the target decryption key with the security decryption key of the target subsystem image or the first preset value, where the security decryption key is generated according to the first key factor and the first key information.
  • the above-mentioned multiple subsystem images include a first subsystem image and a second subsystem image; during the startup of the operating system, the first subsystem image is decrypted once, and the second subsystem image is decrypted many times. Second-rate.
  • the above method further includes: providing, by the fourth storage unit, a storage space for running the plaintext of the target image.
  • the present application provides a chip system, where the chip system includes the security processing device provided in any one of the implementation manners of the foregoing first aspect, for implementing the security described in any one of the foregoing second aspect
  • the chip system further includes a memory, and the memory is used for saving necessary or related program instructions and data of the above-mentioned security processing method.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • an embodiment of the present application provides a terminal device, including the security processing device provided by any one of the implementations of the foregoing first aspect, and a discrete device coupled to the security processing device.
  • the present application provides a computer storage medium, where the computer storage medium stores a computer program, and when the computer program is executed by a security processing device, implements the security processing method flow described in any one of the above-mentioned second aspects.
  • an embodiment of the present invention provides a computer program, where the computer program includes instructions, when the computer program is executed by the security processing device, the security element can perform the security processing described in any one of the above-mentioned second aspects. method flow.
  • FIG. 1 is a schematic structural diagram of a security processing device provided by an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of another security processing device provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of another security processing device provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a configuration flow of a target key factor of an operating system subsystem image provided by an embodiment of the present application
  • FIG. 5 is a schematic diagram of hierarchical division of a subsystem image of an operating system provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of hierarchical division of a subsystem image of another operating system provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a derivation process of a target decryption key of each subsystem image provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a security processing method provided by an embodiment of the present application.
  • a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally also includes For other steps or units inherent to these processes, methods, products or devices.
  • Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application.
  • the appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
  • a component may be, but is not limited to, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer.
  • an application running on a computing device and the computing device may be components.
  • One or more components may reside within a process and/or thread of execution, and a component may be localized on one computer and/or distributed between 2 or more computers.
  • these components can execute from various computer readable media having various data structures stored thereon.
  • a component may, for example, be based on a signal having one or more data packets (eg, data from two components interacting with another component between a local system, a distributed system, and/or a network, such as the Internet interacting with other systems via signals) Communicate through local and/or remote processes.
  • data packets eg, data from two components interacting with another component between a local system, a distributed system, and/or a network, such as the Internet interacting with other systems via signals
  • a system on chip also known as a system-on-chip, is an integrated circuit that includes a processor, memory, and on-chip logic.
  • LCS Life cycle status
  • CM Chip Manufacture
  • DM Device Manufacturing
  • Secure Mode Secure Mode
  • KDF key derivation function
  • ROTPK trusted public key
  • Operator information which is used to provide information on network service providers. For example, in the terminal equipment using China Mobile and China Telecom, the operator information is correspondingly different.
  • Operating system image the operating system is a program that manages hardware and software resources on the terminal device, and the operating system image is a file containing the program; the operating system image includes multiple subsystem images, and the multiple subsystem images refer to each subsystem image ciphertext.
  • FIG. 1 is a schematic structural diagram of a security processing device provided by an embodiment of the present application.
  • the security processing device 10 may include a processing unit 101, a security engine 102, a first storage unit 103, and a second storage unit 104. And the processing unit 101, the security engine 102, the first storage unit 103 and the second storage unit 104 may be integrated in the SOC chip.
  • the processing unit 101 is configured to obtain a plurality of subsystem images of the operating system image for operating the operating system respectively.
  • the processing unit 101 may include multiple processors, and the multiple processors may be respectively used to drive the security engine 102 to obtain different subsystem images, and the processors may be a central processing unit (CPU) or other processing cores,
  • the multiple processors may be heterogeneous processors, that is, processors of different types, and the specific implementation scheme of the processors is not described in this embodiment.
  • the security engine 102 obtains one subsystem image of the above-mentioned multiple subsystem images at a time.
  • the operating system image is a program in the non-volatile memory of the memory, and the operating system is, for example, an Android, Windows, or iOS system, which is not limited in this embodiment.
  • the first storage unit 103 is configured to store the first key information of the operating system image, where the first key information may include the root key ciphertext, the life cycle state LCS, and the root-of-trust public key ROTPK hash value , at least one of carrier information or product information.
  • the first key information is programmed into the first storage unit 103 during the production process of the security processing device 10, and cannot be changed thereafter to ensure the security of the first key information.
  • the first storage unit 103 may be a one-time programmable (one-time programmable, OTP) device, such as an electronic fuse eFuse or other memory with similar functions that can only be programmed once.
  • OTP one-time programmable
  • the hash value can be obtained by using a secure hash algorithm (SHA), such as SHA-256, or other hash algorithms, and different devices Manufacturers use different ROTPKs.
  • SHA secure hash algorithm
  • the first key information stored in the first storage unit 103 may also include the above five types of key information.
  • the first key information stored in the first storage unit 103 may also include the above five types of key information.
  • the second storage unit 104 is configured to store the target key factor of the target subsystem image among the multiple subsystem images.
  • one subsystem image corresponds to one key factor, and the keys of different subsystem images factors are different.
  • the second storage unit 104 only stores one key factor at a time, that is, stores the key factor (ie, the target key factor) of the subsystem image (ie, the target subsystem image) currently to be decrypted.
  • the images are loaded in sequence, and the key factor in the second storage unit 104 will also change accordingly.
  • the second storage unit 104 may be a writable and readable storage unit, such as a register or random access memory (random access memory, RAM), such as static random access memory (static random access memory, SRAM), dynamic Random access memory (dynamic random access memory, DRAM) or synchronous dynamic random access memory (synchronous DRAM, SDRAM), double rate SDRAM (dual data rate SDRAM, DDR SDRAM), etc.
  • RAM random access memory
  • static random access memory static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM synchronous DRAM
  • double rate SDRAM double rate SDRAM
  • the security engine 102 is used to generate a target decryption key of the target subsystem image according to the first key information and the target key factor; and use the target decryption key to decrypt the target subsystem image to obtain the target of the target subsystem image.
  • the first key information stored in the first storage unit 103 may include root key ciphertext, LCS, ROTPK hash value, operator information and product information, a total of five , then for the target subsystem image to be decrypted currently, the process of generating the target key factor by the security engine 102 may be as shown in FIG.
  • the security engine 102 first decrypts the root key ciphertext to obtain the root key plaintext, , ROTPK hash value, operator information, product information and target key factor are concatenated to obtain a derivation factor. Finally, based on KDF, the target decryption key of the target subsystem image is obtained according to the root key plaintext and the derivation factor.
  • the first key information stored in the first storage unit is different, the first key information obtained by the security engine 102 is also different; in addition, during the decryption process of each subsystem image, the security engine 102 generates a The first key information used in the decryption key of the image is the same.
  • the security engine 102 may execute software through hardware to implement any steps implemented by the security engine 102 described in the embodiments of the present application. Since the security engine 102 in the form of hardware is independent of the processing unit 101, it is dedicated to implementing related security. Processing, decryption, or verification functions, which help improve performance when decrypting operating system images.
  • the security engine 102 may obtain the first key information from the first storage unit 103 when decrypting the first subsystem image of the operating system, and then save the first key information in the In the security engine 102; when decrypting the subsequent subsystem image, the first key information is no longer obtained from the first storage unit 103, but the first key information saved in the security engine 102 is used to generate the subsequent The decryption key for the subsystem image.
  • the security engine 102 may also obtain the first key information from the first storage unit 103 before generating the decryption key of each subsystem image.
  • the security engine 102 can obtain the target key factor of the target subsystem image from the second storage unit 104 by means of hard-wired transmission;
  • the first key information is obtained from a storage unit 103 .
  • the key factor of each subsystem image stored in the second storage unit 104 can only be read by the security engine 102 in a hard-wired manner, It cannot be read by software or other means, which can effectively prevent the key factor of each subsystem image from being leaked and used to decrypt the corresponding subsystem image, thereby effectively improving the security of the operating system image.
  • the processing unit 101 is further configured to run the plaintext of the target image. Specifically, after the security engine 102 decrypts the target image plaintext of the target subsystem image, the processing unit 101 obtains the target image plaintext and runs it to complete the loading of the target subsystem image. It should be understood that the loading of each subsystem image of the operating system includes: Decryption of each subsystem image, and operation of the plaintext of each subsystem image.
  • the processing unit 101 drives the security engine 102 to obtain the target subsystem image, the security engine 102 decrypts the target subsystem image to obtain the target image plaintext, and the processing unit 101 runs the target image plaintext; after the processing unit 101 runs the target image plaintext, The processing unit 101 continues to obtain the next subsystem image from the above-mentioned multiple subsystem images, the security engine 102 continues to decrypt the next subsystem image to obtain the next image plaintext of the next subsystem image, and the processing unit 101 executes the next subsystem image.
  • the plaintext of the next image where the next subsystem image is the subsequent subsystem image of the target subsystem image in the above-mentioned multiple subsystem images.
  • each subsystem image has a different decryption key during the decryption process. Therefore, when the decryption keys of some subsystem images in the operating system are leaked, since the decryption keys of each subsystem image are different, other subsystem images whose decryption keys have not been leaked cannot be decrypted, preventing the operating system from being completely attacked. Thereby improving the security of the operating system.
  • the first key information includes one or more of the root key ciphertext, the life cycle state LCS, the trusted root public key ROTPK hash value, the operator information and the product information, it can further ensure that different subsystems
  • the decryption keys of each subsystem image generated by the image according to its corresponding key factor and the first key information are different.
  • the terminal device is in different life cycle states (such as chip manufacturing CM mode, device manufacturing DM mode and secure SM mode)
  • its LCS value is different
  • the ROTPK of different device manufacturers is different, so the ROTPK hash value is also different
  • the operator information or product information corresponding to terminal devices of different network operators or terminal devices of different models are also different.
  • the decryption key in the embodiment of the present application can effectively prevent the decryption key of the operating system image in a certain life cycle state from being leaked and be used to decrypt the operating system image in other life cycle states; at the same time, it can also prevent some devices from being leaked.
  • the manufacturer's ROTPK is leaked and used to decrypt other device manufacturers' terminal device operating system images; and to prevent the same type of terminal device, or the decryption key of the same operator's terminal device operating system image from being leaked and used to decrypt other devices.
  • Operating system images of terminal devices of different models or terminal devices using other operators thus ensuring the independence of operating system images between terminal devices of different life cycle states, manufactured by different device manufacturers, using different operators, or different models , thereby improving the security of the operating system.
  • FIG. 5 is a schematic diagram of hierarchical division of a subsystem image of an operating system according to an embodiment of the present application. It should be understood that the type of the subsystem image of the operating system and the hierarchical division method of the subsystem image of the operating system (including the specific number of layers, and the subsystem images included in each layer) are determined by the actual application scenario, and the embodiments of the present application are for this No specific limitation is made.
  • Fig. 5 can be used as an example of the hierarchical division of the subsystem image of the operating system of the mobile terminal device. As shown in Fig.
  • the subsystem image of the operating system is divided into four layers: the first layer of subsystem image (Layer0: ROM image) , the ROM image is solidified in the read-only storage unit on the SOC or other storage units during the manufacturing process of the security processing device 10, and cannot be changed; the second-layer subsystem image (Layer1: bootloader image); third Layer subsystem images include Layer2-0: rich execution environment (REE) image, Layer2-1: Trusted execution environment (TEE) image, Layer2-2: Sensor hub Sensorhub image and Layer2- 3: Low-power Lowpower image; the fourth-layer subsystem image includes Layer3-0: Modem Modem image, Layer3-1: High-fidelity (HiFi) image and Layer3-2: Image signal processing (image signal processor, ISP) image, the four-layer subsystem images shown in Figure 5 are all sensitive to security and need to be decrypted.
  • Layer0 rich execution environment
  • TEE Trusted execution environment
  • Layer2-2 Sensor hub Sensorhub image
  • Layer2- 3 Low-power Lowpower image
  • the fourth-layer subsystem image
  • the processing unit 101 first acquires a ROM image, and runs the ROM image.
  • a subsystem image stored in plaintext.
  • the processing unit 101 drives the security engine 102 to obtain the Bootloader image; the security engine 102 obtains the first key information and the Bootloader image from the first storage unit 103 and the second storage unit 104 respectively. key factor, and generate the decryption key of the Bootloader image according to the first key information and the key factor of the Bootloader image; the security engine 102 uses the decryption key of the Bootloader image to decrypt the Bootloader image to obtain the plaintext of the Bootloader image; processing unit 101 Get and run the plaintext of the Bootloader image.
  • the processing unit 101 sequentially obtains the subsequent REE images, TEE images, Sensorhub images, Lowpower images, and Modem images in the sequence shown in FIG. 5 .
  • HiFi image and ISP image the security engine 102 decrypts the above subsystem images according to the above sequence, to obtain the plaintext of each subsystem image; the processing unit 101 sequentially runs the decrypted plaintext of each subsystem image according to the above sequence.
  • the Sensorhub image is the image related to sensor control
  • Lowpower is the image related to power management
  • Modem is the image related to communication
  • HiFi is the image related to audio
  • ISP is the image related to image and video
  • the security processing device 10 loads each subsystem image in sequence according to a preset order, so as to realize serial loading of the subsystem images during the operating system startup process, that is, each time a subsystem image is loaded, After the current subsystem image is loaded, the next subsystem image is loaded. In this case, if a subsystem image is attacked during the loading process, even if the subsystem image is cracked, other subsystem images are still safe, which can prevent the entire operating system from being cracked, thereby improving the operating system. Security during startup.
  • FIG. 2 is a schematic structural diagram of another security processing device 10 provided by an embodiment of the present application.
  • the security processing device 10 includes the processing unit 101, the security engine 102, and the first storage unit 103 in FIG. 1 in addition to and the second storage unit 104, and perform the corresponding functions of the above-mentioned embodiment in FIG. 1, may also include a third storage unit 105, a fourth storage unit 106 and a fifth storage unit 107, and the fifth storage unit 107
  • the unit 101, the security engine 102, the first storage unit 103, and the second storage unit 104 are jointly integrated in the SOC chip.
  • the third storage unit 105 is configured to store other subsystem images except the first subsystem image among the above-mentioned multiple subsystem images, and store multiple security certificate chains corresponding to each subsystem image respectively.
  • the third storage unit may include non-volatile memory (non-volatile memory), such as flash memory (flash memory), programmable read-only memory (programmable read-only memory, PROM), electrically rewritable memory Read-only memory (electrically alterable read only memory, EAROM), erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (electrically erasable programmable read only memory, EEPROM), and Combinations of the types of memories described above may be included.
  • the third storage unit 105 is used to permanently store the above-mentioned other subsystem images, multiple security certificate chains, and other data or programs that need to be maintained.
  • the above-mentioned processing unit 101 acquires the target subsystem image, further comprising: the processing unit 101 acquires the target subsystem image from the third storage unit 105 or the read-only storage unit in the SOC, and converts the target subsystem image to the The system image is stored in the fourth storage unit 106, and this process is also called loading.
  • the processing unit 101 drives the security engine 102 to acquire the target subsystem image from the fourth storage unit 106 .
  • the security engine 102 before the security engine 102 generates the target decryption key of the target subsystem image according to the first key information and the target key factor, the security engine 102 obtains the target subsystem image from the security certificate chain or The target key factor is obtained from the decrypted image plaintext, and the target key factor is configured in the second storage unit 104.
  • the above-mentioned decrypted image plaintext is that the security engine 102 decrypts the above-mentioned multiple subsystem images before decrypting the target subsystem image. obtained by mirroring other subsystems in the .
  • the processing unit 101 when the LCS in the first key information is SM, the processing unit 101 obtains the target security certificate chain from the third storage unit 105 and stores the target security certificate chain in the fourth The storage unit 106; the processing unit 101 drives the security engine 102 to verify the target security certificate chain. After the verification is passed, the processing unit 101 obtains the target password from the target security certificate chain of the fourth storage unit 106 or the decrypted image plaintext. key factor and configure the target key factor into the second storage unit 104; wherein, the target security certificate chain includes at least a first-level security certificate; it should be understood that, except for the target subsystem image, the security certificate chains of other subsystem images All also include at least a Level 1 security certificate.
  • each level of security certificate in the security certificate chain corresponding to each subsystem mirror is verified level by level.
  • the security certificate of each subsystem mirror is verified. The verification of the chain passes accordingly.
  • the processing unit 101 obtains from the third storage unit 105
  • the target security certificate chain is stored in the fourth storage unit 106; the processing unit 101 obtains the target key factor from the target security certificate chain in the fourth storage unit or the decrypted image plaintext and stores the target key factor configured into the second storage unit 104 .
  • the processing unit 101 after the processing unit 101 runs the target image plaintext, the processing unit 101 overwrites the target key factor with the first key factor; the security engine 102 can clear the generated target decryption key, or use the target key factor
  • the security decryption key of the subsystem image or the first preset value covers the target decryption key, and the security decryption key is generated according to the first key factor and the first key information.
  • each subsystem image corresponds to a different first key factor
  • the first key factor of the target subsystem image can be any value except the target key factor
  • the first preset value can be any different from the target key factor.
  • the numerical value of the decryption key is the numerical value of the decryption key.
  • the target key factor can be prevented from being left in the process of loading the next subsystem image, ensuring that each subsystem image key factor is This ensures the security of the operating system image; at the same time, after decrypting the target subsystem image with the target decryption key, clearing or overwriting the target decryption key can prevent the target decryption key from leaking. It is then used to decrypt the system image, thereby further ensuring the security of the operating system image.
  • the above-mentioned multiple subsystem images include a first subsystem image and a second subsystem image; during the startup process of the operating system, the first subsystem image is decrypted once, and the second subsystem image is decrypted once. Decrypt multiple times.
  • FIG. 5 is a schematic diagram of hierarchical division of a subsystem image of an operating system of a mobile terminal device according to an embodiment of the present application. As shown in Figure 5, the subsystem images of the first layer, the second layer and the third layer are loaded once during the operating system startup process, which is the first subsystem image, and the subsystem image of the fourth layer is loaded during the operating system startup process. Loaded multiple times to mirror the second subsystem.
  • the specific loading times of the second subsystem image is determined by the actual application scenario. For example, when the terminal device shown in Figure 5 is a mobile phone, after the Lowpower image is loaded, its Modem image starts to be loaded. After the loading is completed, the mobile phone has Communication function, when the user turns on the mobile phone in airplane mode, the communication function is unavailable. When the user turns off the airplane mode, the Modem image is loaded again, and the communication function of the mobile phone is restored. In this scenario, the Modem image is loaded twice; the same For ISP mirroring, when the user enables the camera on the mobile phone, the ISP mirroring starts to load. At this time, the terminal device has the function of video recording or photographing. When the user closes the camera program, the video recording or photographing function is unavailable. When the camera is turned on again, the ISP mirroring will be loaded again. It should be understood that for the second subsystem image, the key factor used in each loading process is the same.
  • the security processing apparatus 10 may further include a fourth storage unit 106 for providing storage space for running the plaintext of the target image.
  • the fourth storage unit 106 may be a random access memory RAM or a power-down volatile storage device, such as static random access memory SRAM, dynamic random access memory DRAM or synchronous dynamic random access memory SDRAM, double rate SDRAM Wait.
  • the fourth storage unit 106 is used to provide the space required for the execution of data or instructions.
  • the security processing apparatus 10 may further include a fifth storage unit 107 , when the target subsystem image is the first subsystem image, the fifth storage unit 107 is used to back up the data in the second storage unit 104 data.
  • the data in the second storage unit 104 can be changed in a monotonically increasing or monotonically decreasing manner, that is, the data written in the second storage unit 104 can only be The currently stored data is large or small.
  • the fifth storage unit 107 can be used to back up the data in the second storage unit 104; when the target subsystem image is the second subsystem image, the second storage unit 104 writes The entered data can be any specified value, and is not affected by the current stored data. In this case, the data in the fifth storage unit 107 remains unchanged.
  • the fifth storage unit 107 may be the same memory as the second storage unit 104 .
  • FIG. 6 is a schematic diagram of hierarchical division of another subsystem image of an operating system provided by an embodiment of the present application.
  • FIG. 6 may be a schematic diagram of the subsystem image level division of the operating system image of the monitor.
  • the monitor starts the video recording function when it is powered on, so its ISP image has a higher priority, and its ISP image is deployed to the image in FIG. 6 .
  • the second layer shown is loaded so that the video recording function can be turned on as soon as possible.
  • the operating system includes N-layer subsystem images: the first-layer subsystem image (Layer0: ROM image); the second-layer subsystem image includes Layer1-0: Bootloader image and Layer1-1: Image signal processing ISP mirror; Layer 3 subsystem mirrors include Layer2-0: Rich Execution Environment REE mirror, Layer2-1: Trusted Execution Environment TEE mirror and Layer2-2: Lowpower mirror; Layer 4 subsystem mirror (Layer3: Modem mirror) ; F layer subsystem image (contained specific subsystem images are not shown); N-1 layer image includes M+1 subsystem images, wherein, from the fifth layer to the subsystems included in the N-1 layer Mirrors are not shown, and N and M are positive integers.
  • Layer0 ROM image
  • the second-layer subsystem image includes Layer1-0: Bootloader image and Layer1-1: Image signal processing ISP mirror
  • Layer 3 subsystem mirrors include Layer2-0: Rich Execution Environment REE mirror, Layer2-1: Trusted Execution Environment TEE mirror and Layer2-2: Lowpower mirror
  • Layer 4 subsystem mirror Layer
  • the processing unit 101 first obtains a ROM image, and runs the ROM image, which is solidified inside the SOC.
  • the first subsystem image is stored in plaintext; the fourth storage unit 106 provides storage space for the operation of the ROM image.
  • the processing unit 101 After the processing unit 101 runs the plaintext of the ROM image, the processing unit 101 acquires the Bootloader image from the third storage unit 105, stores the Bootloader image in the fourth storage unit 106, and the processing unit 101 drives the security engine 102 from the fourth storage unit 106.
  • the security engine 102 obtains the first key information from the first storage unit 103, if the first key information at this time includes the life cycle state LCS, and the LCS is SM, the security engine 102 needs Verify the safety certificate chain corresponding to the Bootloader image; the safety engine 102 obtains the safety certificate chain of the Bootloader image from the third storage unit 105 and stores it in the fourth storage unit 106, and the safety engine 102 starts to verify the Bootloader image.
  • the safety certificate chain is verified; after the verification of the safety certificate chain of the Bootloader image is passed, the processing unit 101 obtains the key factor of the Bootloader image from the safety certificate chain of the Bootloader image or the ROM image, and configures it into the second storage In unit 104; the security engine 102 obtains the key factor of the Bootloader image from the second storage unit 104 by hard-wired, and generates the decryption key of the Bootloader image according to the key factor of the Bootloader image and the first key information; the security engine 102 decrypts the bootloader image by using the decryption key of the bootloader image to obtain the plaintext of the bootloader image; the processing unit 101 runs the plaintext of the bootloader image, and the fourth storage unit 106 provides storage space for the operation of the bootloader image.
  • FIG. 4 is a schematic diagram of the configuration flow of the key factor of the operating system subsystem image.
  • the process of changing data in the second storage unit 104 and the fifth storage unit 107 during the operating system startup process will be described below with reference to FIG. 4 .
  • the second storage unit 104 and the fifth storage unit 107 may be registers, and when the target subsystem mirror is the first subsystem mirror, the data in the second storage unit 104 is monotonically increasing
  • the processing unit 101 configures the second storage unit 104 to monotonically increase each time, the data in the second storage unit 104 is increased by a preset value K based on the current data, where the preset value K can be arbitrarily larger than A positive integer of 0. As shown in FIG.
  • FIG. 4 includes three subsystem images, the A subsystem image and the C subsystem image are the first subsystem image, and the B subsystem image is the second subsystem image.
  • the following will describe in detail the process of changing data in the second storage unit 104 and the fifth storage unit 107 during the sequential loading process of the above three subsystem images:
  • the A subsystem image at this time may also be called the target subsystem image.
  • the processing unit 101 starts to load the A subsystem image, the data stored in the second storage unit 104 and the fifth storage unit 107 is the first key factor saved in the previous subsystem image loading process.
  • the processing unit 101 first takes out the first key factor in the fifth storage unit 107 of the previous subsystem image, adds nK to obtain the second key factor corresponding to the A subsystem image, and the first key factor of the A subsystem image.
  • the second key factor is written into the second storage unit 104 and the fifth storage unit 107, and n is a positive integer greater than 0; wherein, when the previous subsystem mirror of the A subsystem mirror is the first subsystem mirror, the previous The first key factor in the second storage unit 104 and the fifth storage unit 107 of the subsystem mirror is the same; when the previous subsystem mirror of the A subsystem mirror is the second subsystem mirror, the The first key factors in the second storage unit 104 and the fifth storage unit 107 are different.
  • the processing unit 101 After the processing unit 101 writes the second key factor of the A subsystem image into the second storage unit 104 and the fifth storage unit 107, the processing unit 101 writes the second key factor of the A subsystem image and the A subsystem image according to the second key factor of the A subsystem image and the A subsystem image.
  • the difference between the target key factors of the second storage unit 104 is configured to monotonically increase, and the above-mentioned preset value K is incremented each time, until the value in the second storage unit 104 is incremented to the target key factor of the A subsystem image, At this time, the processing unit 101 may also write the target key factor of the A subsystem image into the fifth storage unit 107 .
  • the processing unit 101 can drive the second storage unit 104 to monotonically increase three times, each time increasing by 2, until The value in the second storage unit 104 becomes the target key factor 12 of the A subsystem mirror.
  • the processing unit 101 uses the first key factor of the A subsystem image to overwrite the target key factor of the A subsystem image in the second storage unit 104 and the fifth storage unit 107 , specifically, the processing unit 101 configures the second storage unit 104 to monotonically increase according to the difference between the first key factor of the A subsystem image and the target key factor of the A subsystem image, until the second storage unit 104 The value of is incremented to the first key factor of the A subsystem image, and the processing unit 101 simultaneously writes the first key factor of the A subsystem image into the fifth storage unit 107 .
  • the B subsystem image may also be called the target subsystem image at this time. Since the B subsystem image is the second subsystem image, the processing unit 101 directly writes the target key factor of the B subsystem image into the second storage unit 104, and the data in the fifth storage unit 107 remains unchanged. is the first key factor of the A subsystem image. For example, if the first key factor corresponding to the A subsystem image is 16, and the target key factor of the B subsystem image is 10, at this time, the processing unit 101 writes the target key factor 10 of the B subsystem image into the second key factor In the storage unit 104, the data in the fifth storage unit 107 remains unchanged, and is still the first key factor 16 of the A subsystem image.
  • the processing unit 101 After the processing unit 101 runs the image plaintext of the B subsystem image, the processing unit 101 writes the first key factor of the B subsystem image into the second storage unit 104 to cover the target key factor of the B subsystem image.
  • the data in the fifth storage unit 107 remains unchanged, and is the first key factor of the mirror image of the A subsystem; wherein, the first key factor of the mirror image of the B subsystem can be other than the target key factor of the mirror image of the B subsystem any value.
  • the C subsystem image at this time may also be called the target subsystem image. Since the C subsystem image is the first subsystem image, it can be known from the above loading process of the B subsystem image that the second storage unit 104 stores the first key factor of the B subsystem image, and the fifth storage unit 107 stores the first key factor of the B subsystem image. Stored in is the first key factor of the A subsystem image.
  • the steps for the subsequent processing unit 101 to configure the target key factor of the C subsystem image are the same as the corresponding steps in the A subsystem image loading process, which will not be repeated here.
  • the processing unit 101 stores the first key factor.
  • the first key factor of the mirror image of the A subsystem in the fifth storage unit 107 is taken out, and mK is added to obtain the second key factor of the mirror image of the C subsystem, and the second key factor of the mirror image of the C subsystem is written into the In the second storage unit 104 and the fifth storage unit 107, m is a positive integer greater than 0; then on the basis of the second key factor of the C subsystem image, the processing unit 101 begins to configure the second storage unit 104 to monotonically increase data changes locally.
  • the data in the second storage unit 104 is backed up by the fifth storage unit 107, and during the loading process of multiple non-consecutive first subsystem images, the keys of each subsystem image
  • the factor can be continuously monotonically increased, and the key factor of the loaded first subsystem image will not appear again in the subsequent loading process of the first subsystem image, which can effectively prevent the leakage of the key factor and improve the system during the startup of the operating system.
  • Mirror security
  • the above-mentioned second storage unit 104 stores the key factors of each subsystem image in a monotonically increasing manner, in order to ensure that the key factors of each subsystem image are different, thereby ensuring that different subsystem images correspond to different decryption encryption keys. key, and different subsystem images use different decryption keys for decryption.
  • the above-mentioned monotonically increasing manner is only an example listed in the embodiment of the present application, and those skilled in the art may also adopt other manners, such as monotonically decreasing manner, to ensure that different subsystem images correspond to different key factors, Therefore, different subsystem images are decrypted using different decryption keys, which is not specifically limited in this embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of yet another security processing device 10 provided by an embodiment of the present invention, as a partial function of the security processing device 10 in FIG. 1 or FIG. 2 . Refinement of modules.
  • the security engine 102 may include a first engine 1021 , a key management module 1022 and a second engine 1023 .
  • the first engine 1021 is configured to verify the target security certificate chain of the target subsystem image.
  • the key management module 1022 is used to decrypt the root key ciphertext in the first key information to obtain the root key plaintext; then at least one of LCS, ROTPK hash value, operator information, product information and the target The key factors are spliced to obtain a derivation factor; finally, based on the KDF, the target decryption key of the target subsystem image is obtained according to the root key plaintext and the derivation factor.
  • the second engine 1023 is configured to obtain the target subsystem image and the target decryption key, and use the target decryption key to decrypt the target subsystem image to obtain the target image plaintext.
  • FIG. 8 is a schematic flowchart of a security processing method provided by an embodiment of the present invention.
  • the security processing method is applicable to any security processing device in the above-mentioned FIG. 1 to FIG. 3 and including the above-mentioned security processing device. device of.
  • the method may include the following steps S801-S803, wherein, in step S801, a processing unit is used to separately acquire a plurality of subsystem images of an operating system image used for operating the operating system.
  • Step S803 the second storage unit stores the target key factor of the target subsystem image in the multiple subsystem images; in the multiple subsystem images, one subsystem image corresponds to one key factor, and the keys of different subsystem images factors are different.
  • Step S804 the security engine generates the target decryption key of the target subsystem image according to the first key information and the target key factor; and uses the target decryption key to decrypt the target subsystem image to obtain the target of the target subsystem image.
  • Mirror plaintext Step S805: Run the target image plaintext by the processing unit.
  • the method further includes: after the security engine decrypts the target subsystem image to obtain the plaintext of the target image, the security engine continues to decrypt the next subsystem image to obtain the next sub-system image.
  • the above-mentioned obtaining, by the processing unit, the multiple subsystem images of the operating system image used for starting the operating system respectively includes: obtaining, by the processing unit, the target subsystem image from the above-mentioned multiple subsystem images; After mirroring the plaintext, the processing unit continues to obtain the next subsystem mirror from the multiple subsystem mirrors; after the processing unit runs the target mirroring plaintext, the security processing method further includes: running the next mirroring plaintext.
  • the above method further includes: acquiring, by the processing unit, a target security certificate chain of the target subsystem image; among the above-mentioned multiple subsystem images, one subsystem image corresponds to one security certificate chain; Obtain the target key factor from the target security certificate chain or the decrypted image plaintext, and configure the target key factor to the second storage unit.
  • generating the target decryption key of the target subsystem image by the security engine according to the first key information and the target key factor includes: decrypting the ciphertext of the root key to obtain the root key Plaintext; splicing one or more of the LCS, ROTPK hash value, target key factor, operator information and product information to obtain the derivation factor; based on the derivation factor and the root key plaintext to generate the target decryption of the target subsystem image key.
  • the above-mentioned method further includes: storing, by a third storage unit, the above-mentioned multiple subsystem images and multiple security certificate chains corresponding to the above-mentioned multiple subsystem images respectively.
  • the method further includes: the processing unit overwrites the target key factor of the target subsystem image with the first key factor; Clearing the target decryption key; or overwriting the target decryption key with the security decryption key of the target subsystem image or the first preset value, where the security decryption key is generated according to the first key factor and the first key information.
  • the above-mentioned multiple subsystem images include a first subsystem image and a second subsystem image; during the startup of the operating system, the first subsystem image is decrypted once, and the second subsystem image is decrypted many times. Second-rate.
  • the above method further includes: providing, by the fourth storage unit, a storage space for running the plaintext of the target image.
  • the embodiment of the present application further provides a computer storage medium, wherein the computer storage medium can store a computer program, when part of the program in the computer program is executed by the processing unit 101, the processing unit 101 can execute the above method embodiments Part or all of any one of the steps implemented by the processing unit 101 described in; when part of the program in the computer program is executed by the processing unit 101, the processing unit 101 can also be caused to drive the security engine 102 to execute the above method embodiments Some or all of any of the steps described in and implemented by the security engine 102.
  • the above-mentioned computer storage medium may be the third storage unit 105 in the embodiment of the present application, or a read-only storage unit for storing a ROM image.
  • Embodiments of the present application also provide a computer program, where the computer program includes instructions.
  • the processing unit 101 may execute any part or all of the steps implemented by the processing unit 101 as described in the above method embodiments;
  • the processing unit 101 may also be caused to drive the security engine 102 to execute any part or all of the steps implemented by the security engine 102 as described in the above method embodiments.
  • the disclosed apparatus may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the above-mentioned units is only a logical function division.
  • multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical or other forms.
  • the units described above as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)
  • Facsimile Transmission Control (AREA)

Abstract

Disclosed are a security processing apparatus and a security processing method. The security processing apparatus comprises a processing unit, a security engine, a first storage unit, and a second storage unit. The processing unit is used for respectively acquiring a plurality of subsystem mirrors of an operating system mirror for startup of an operating system. The first storage unit is used for storing first key information of the operating system mirror. The second storage unit is used for storing a target key factor of a target subsystem mirror among the plurality of subsystem mirrors. Different subsystem mirrors have different key factors. The security engine is used for generating a target decryption key according to the first key information and the target key factor, and decrypting the target subsystem mirror using the target decryption key to obtain a target mirror plaintext. The processing unit is further used for running the target mirror plaintext. The use of embodiments of the present application can improve the security of the system mirror in startup of the operating system.

Description

一种安全处理装置、安全处理方法及相关设备A safety processing device, safety processing method and related equipment 技术领域technical field
本申请涉及操作系统安全启动技术领域,尤其涉及一种安全处理装置、安全处理方法及相关设备。The present application relates to the technical field of safe booting of operating systems, and in particular, to a security processing device, a security processing method, and related equipment.
背景技术Background technique
操作系统(operating system,OS)是管理计算机硬件与软件资源的计算机程序。操作系统需要处理如管理与配置内存、决定系统资源供需的优先次序、控制输入设备与输出设备、操作网络与管理文件系统等基本事务。An operating system (OS) is a computer program that manages computer hardware and software resources. The operating system handles basic tasks such as managing and configuring memory, prioritizing the supply and demand of system resources, controlling input and output devices, operating the network, and managing the file system.
操作系统镜像是包含上述计算机程序的压缩文件,操作系统镜像通常包含多个子系统镜像。若操作系统镜像经过了加密,在操作系统启动过程中,需要对加密的各子系统镜像依次进行解密,得到各子系统镜像的明文,由处理器运行各子系统镜像的明文,从而启动操作系统。现阶段,在操作系统的多个子系统镜像的解密过程中,采用统一的解密密钥对各个不同的子系统镜像分别进行解密,具体包括以下两种方式:(1)上述解密密钥以明文的方式保存在芯片的存储器中,由处理器驱动解密模块获取解密密钥,并对各子系统镜像进行解密;(2)上述解密密钥以密文的方式保存在芯片的存储器中,由处理器驱动解密模块获取解密密钥,对解密密钥进行解密得到解密密钥明文,然后利用解密密钥明文对各子系统镜像进行解密。An operating system image is a compressed file containing the above computer program, and an operating system image usually contains multiple subsystem images. If the operating system image has been encrypted, during the operating system startup process, each encrypted subsystem image needs to be decrypted in turn to obtain the plaintext of each subsystem image, and the processor will run the plaintext of each subsystem image to start the operating system. . At this stage, in the process of decrypting multiple subsystem images of the operating system, a unified decryption key is used to decrypt the different subsystem images respectively. Specifically, the following two methods are included: (1) The above-mentioned decryption key is in plaintext. The method is stored in the memory of the chip, the processor drives the decryption module to obtain the decryption key, and decrypts each subsystem image; (2) The above-mentioned decryption key is stored in the memory of the chip in the form of ciphertext, and the processor Drive the decryption module to obtain the decryption key, decrypt the decryption key to obtain the decryption key plaintext, and then use the decryption key plaintext to decrypt each subsystem image.
上述两种方式很容易因为解密密钥的泄露而造成整个操作系统镜像密文的破解,安全性较低。The above two methods are easy to crack the ciphertext of the entire operating system image due to the leakage of the decryption key, and the security is low.
发明内容SUMMARY OF THE INVENTION
本申请实施例公开了一种安全处理装置及相关的安全处理方法,以提升操作系统启动中系统启动的安全性。The embodiments of the present application disclose a security processing device and a related security processing method, so as to improve the security of system startup during operating system startup.
第一方面,本申请实施例提供了一种安全处理装置,可包括:处理单元、安全引擎、第一存储单元和第二存储单元;其中,处理单元,用于分别获取用于操作系统启动的操作系统镜像的多个子系统镜像;第一存储单元,用于存储上述操作系统镜像的第一密钥信息,该第一密钥信息包括根密钥密文、生命周期状态LCS、可信根公钥ROTPK哈希值、运营商信息或产品信息中的至少一个;第二存储单元,用于存储上述多个子系统镜像中目标子系统镜像的目标密钥因子;在上述多个子系统镜像中,一个子系统镜像对应一个密钥因子,不同子系统镜像的密钥因子不同;安全引擎,用于根据第一密钥信息和目标密钥因子生成目标子系统镜像的目标解密密钥;并利用该目标解密密钥对目标子系统镜像进行解密,以得到目标子系统镜像的目标镜像明文;处理单元,还用于运行上述目标镜像明文。In a first aspect, an embodiment of the present application provides a security processing device, which may include: a processing unit, a security engine, a first storage unit, and a second storage unit; wherein, the processing unit is configured to separately acquire a Multiple subsystem images of the operating system image; a first storage unit for storing the first key information of the operating system image, the first key information including the root key ciphertext, the life cycle state LCS, the root of trust public key at least one of the key ROTPK hash value, operator information or product information; a second storage unit for storing the target key factor of the target subsystem image in the multiple subsystem images; in the multiple subsystem images, one The subsystem image corresponds to a key factor, and different subsystem images have different key factors; the security engine is used to generate a target decryption key of the target subsystem image according to the first key information and the target key factor; and use the target The decryption key decrypts the target subsystem image to obtain the target image plaintext of the target subsystem image; the processing unit is also used for running the above-mentioned target image plaintext.
可以看出,在本申请实施方式中,通过对不同的子系统镜像配置不同的密钥因子,从而可根据每个子系统镜像的密钥因子和第一密钥信息生成每个子系统镜像的不同解密密钥,即每个子系统镜像在解密过程中其解密密钥不同。因此,当操作系统中部分子系统镜像的解密密钥被泄露时,由于各子系统镜像的解密密钥均不同,其它未泄露解密密钥的子系统 镜像无法被解密,避免操作系统被完全攻击,从而提升了操作系统的安全性。其中,由于第一密钥信息包含根密钥密文、生命周期状态LCS、可信根公钥ROTPK哈希值、运营商信息和产品信息中的一种或多种,可以进一步保证不同子系统镜像根据与其对应的密钥因子和第一密钥信息生成的各子系统镜像的解密密钥不同。当终端设备处于不同的生命周期状态(如芯片制造CM模式、设备制造DM模式和安全SM模式)时,其LCS值不同;不同设备制造商的ROTPK不同,因而ROTPK哈希值也不同;同理,使用不同网络运营商的终端设备或不同型号终端设备对应的运营商信息或产品信息也不同。因此,本申请实施例中的解密密钥可以有效防止某一生命周期状态下操作系统镜像的解密密钥泄露后被利用来解密其它生命周期状态下的操作系统镜像;同时,还可防止部分设备制造商的ROTPK泄露后被用来解密其它设备制造商的终端设备操作系统镜像;以及防止同一型号终端设备、或使用同一运营商的终端设备操作系统镜像的解密密钥泄露后被利用来解密其它型号终端设备或使用其它运营商的终端设备的操作系统镜像,从而确保了不同生命周期状态、不同设备制造商所制造、使用不同运营商、或不同型号的终端设备之间操作系统镜像的独立性,进而提高操作系统的安全性。此外,上述第一存储单元可以为一次性可编程器件,即该第一存储单元中所存储的第一密钥信息在第一次写入后便无法被更改,从而保证了根据第一密钥信息所生成的各子系统镜像解密密钥的安全性和准确性,进一步提升了操作系统的安全性。It can be seen that, in the embodiment of the present application, by configuring different key factors for different subsystem images, different decryption of each subsystem image can be generated according to the key factor and the first key information of each subsystem image key, that is, each subsystem image has a different decryption key during the decryption process. Therefore, when the decryption keys of some subsystem images in the operating system are leaked, since the decryption keys of each subsystem image are different, other subsystem images whose decryption keys have not been leaked cannot be decrypted, preventing the operating system from being completely attacked. Thereby improving the security of the operating system. Among them, since the first key information includes one or more of the root key ciphertext, the life cycle state LCS, the trusted root public key ROTPK hash value, the operator information and the product information, it can further ensure that different subsystems The decryption keys of each subsystem image generated by the image according to its corresponding key factor and the first key information are different. When the terminal device is in different life cycle states (such as chip manufacturing CM mode, device manufacturing DM mode and secure SM mode), its LCS value is different; the ROTPK of different device manufacturers is different, so the ROTPK hash value is also different; in the same way , the operator information or product information corresponding to terminal devices of different network operators or terminal devices of different models are also different. Therefore, the decryption key in the embodiment of the present application can effectively prevent the decryption key of the operating system image in a certain life cycle state from being leaked and be used to decrypt the operating system image in other life cycle states; at the same time, it can also prevent some devices from being leaked. The manufacturer's ROTPK is leaked and used to decrypt other device manufacturers' terminal device operating system images; and to prevent the same type of terminal device, or the decryption key of the same operator's terminal device operating system image from being leaked and used to decrypt other devices. Operating system images of terminal devices of different models or terminal devices using other operators, thus ensuring the independence of operating system images between terminal devices of different life cycle states, manufactured by different device manufacturers, using different operators, or different models , thereby improving the security of the operating system. In addition, the above-mentioned first storage unit may be a one-time programmable device, that is, the first key information stored in the first storage unit cannot be changed after being written for the first time, thereby ensuring that according to the first key information The security and accuracy of each subsystem image decryption key generated by the information further improves the security of the operating system.
在一种可行的实施方式中,上述安全引擎,用于在对目标子系统镜像进行解密以得到目标镜像明文后,继续对下一个子系统镜像进行解密以得到该下一个子系统镜像的下一个镜像明文,该下一个子系统镜像是在上述多个子系统镜像中目标子系统镜像的后续子系统镜像。In a feasible implementation manner, the above-mentioned security engine is configured to continue decrypting the next subsystem image to obtain the next subsystem image of the next subsystem image after decrypting the target subsystem image to obtain the plaintext of the target image. The image plaintext, the next subsystem image is the subsequent subsystem image of the target subsystem image in the above-mentioned multiple subsystem images.
应当理解,在本申请实施方式中,操作系统在启动的过程中,其所包含的多个子系统镜像是逐个加载的,每个子系统镜像的加载包括每子系统镜像的解密以及每个子系统镜像明文的运行;其中,目标子系统镜像为上述多个子系统镜像中当前正在加载的子系统镜像。It should be understood that in the embodiments of the present application, during the startup process of the operating system, the multiple subsystem images included in the operating system are loaded one by one, and the loading of each subsystem image includes the decryption of each subsystem image and the plaintext of each subsystem image. operation; wherein, the target subsystem image is the subsystem image currently being loaded among the above-mentioned multiple subsystem images.
可以看出,在本申请实施例中,安全引擎每次解密当前正在加载的子系统镜像即目标子系统镜像,当目标子系统镜像解密后,再进行下一个子系统镜像的解密。因而,即使目标子系统镜像在解密过程中被攻击,导致目标解密密钥泄露,由于不同子系统镜像的解密密钥不同,其它子系统镜像仍然无法被解密,可以避免整个操作系统被完全攻击,从而提升了操作系统的安全性。It can be seen that, in the embodiment of the present application, the security engine decrypts the currently loaded subsystem image, that is, the target subsystem image each time, and then decrypts the next subsystem image after the target subsystem image is decrypted. Therefore, even if the target subsystem image is attacked during the decryption process, resulting in the leakage of the target decryption key, due to the different decryption keys of different subsystem images, other subsystem images still cannot be decrypted, which can prevent the entire operating system from being completely attacked. Thereby improving the security of the operating system.
在一种可行的实施方式中,上述处理单元,具体用于:在上述多个子系统镜像中获取目标子系统镜像;运行目标镜像明文;在运行目标镜像明文后,继续在上述多个子系统镜像中获取下一个子系统镜像;运行该下一个镜像明文。In a feasible implementation manner, the above-mentioned processing unit is specifically configured to: obtain the target subsystem image in the above-mentioned multiple subsystem images; run the plaintext of the target image; Get the next subsystem image; run the next image plaintext.
可以看出,在本申请实施方式中,在本申请实施方式中,操作系统的多个子系统镜像是串行加载的,即每次加载一个子系统镜像。处理单元每次获取一个子系统镜像即目标子系统镜像,并在运行完目标子系统镜像的明文后,再获取下一个子系统镜像,然后运行该下一个镜像明文。在此种情况下,若一个子系统镜像在加载的过程中被攻击,即使该子系统镜像被破解,但其它子系统镜像仍然是安全的,可以避免整个操作系统被破解,从而提升了操作系统在启动过程中的安全性。It can be seen that, in the embodiments of the present application, multiple subsystem images of the operating system are loaded in series, that is, one subsystem image is loaded at a time. The processing unit acquires one subsystem image, that is, the target subsystem image each time, and after running the plaintext of the target subsystem image, acquires the next subsystem image, and then runs the next image plaintext. In this case, if a subsystem image is attacked during the loading process, even if the subsystem image is cracked, other subsystem images are still safe, which can prevent the entire operating system from being cracked, thereby improving the operating system. Security during startup.
在一种可行的实施方式中,上述处理单元还用于:获取目标子系统镜像的目标安全证书链;在上述多个子系统镜像中,一个子系统镜像对应一个安全证书链;从目标安全证书链或已解密的镜像明文中获取目标密钥因子,并将目标密钥因子配置到第二存储单元,上述已解密的镜像明文是在解密目标子系统镜像之前由安全引擎解密上述多个子系统镜像中其它子系统镜像得到的。In a feasible implementation manner, the above-mentioned processing unit is further configured to: obtain the target security certificate chain of the target subsystem image; among the above-mentioned multiple subsystem images, one subsystem image corresponds to one security certificate chain; from the target security certificate chain Or obtain the target key factor from the decrypted image plaintext, and configure the target key factor to the second storage unit. The above-mentioned decrypted image plaintext is decrypted by the security engine in the above-mentioned multiple subsystem images before decrypting the target subsystem image. Other subsystem images are obtained.
在一种可行的实施方式中,在处理单元从目标安全证书链中获取目标密钥因子之前,安全引擎还可以对目标安全证书链进行校验,校验通过后由处理单元获取目标密钥因子,其中,目标安全证书链包含至少一级安全证书,每级安全证书都会进行校验。In a feasible implementation manner, before the processing unit obtains the target key factor from the target security certificate chain, the security engine may also verify the target security certificate chain, and after the verification is passed, the processing unit obtains the target key factor , where the target security certificate chain contains at least one level of security certificate, and each level of security certificate will be verified.
可以看出,在本申请实施方式中,安全引擎获取目标密钥因子的方式包括:从目标安全证书链中获取目标密钥因子,或者从已解密的镜像明文中获取目标密钥因子。当安全引擎从已解密的镜像明文中获取目标密钥因子时,由于已解密的子系统镜像是受信任的,因而从该已解密的镜像明文获取的目标密钥因子也是受信任的、安全的;当安全引擎从目标安全证书链中获取目标密钥因子时,在获取目标密钥因子之前,安全引擎可以对目标安全证书链进行校验,校验通过后,安全引擎从目标安全证书链中获取目标密钥因子,该校验过程可以确保安全引擎所获取的目标密钥因子是受信任的、安全的。通过上述两种方式,可以确保根据目标密钥因子所生成的目标解密密钥的安全性和正确性。It can be seen that, in the embodiment of the present application, the manner in which the security engine obtains the target key factor includes: obtaining the target key factor from the target security certificate chain, or obtaining the target key factor from the decrypted image plaintext. When the security engine obtains the target key factor from the decrypted image plaintext, since the decrypted subsystem image is trusted, the target key factor obtained from the decrypted image plaintext is also trusted and secure ; When the security engine obtains the target key factor from the target security certificate chain, before obtaining the target key factor, the security engine can verify the target security certificate chain. Obtain the target key factor, and the verification process can ensure that the target key factor obtained by the security engine is trusted and secure. Through the above two methods, the security and correctness of the target decryption key generated according to the target key factor can be ensured.
在一种可行的实施方式中,上述安全处理装置还包括:第三存储单元,用于存储上述多个子系统镜像和与该多个子系统镜像分别对应的多个安全证书链。In a feasible implementation manner, the above-mentioned security processing apparatus further includes: a third storage unit, configured to store the above-mentioned multiple subsystem images and multiple security certificate chains corresponding to the multiple subsystem images respectively.
可以看出,在本申请实施方式中,上述第三存储单元可以为可读可写的存储单元,在操作系统进行更新时,处理单元向该第三存储单元中写入多个新的子系统镜像,以更新原有的子系统镜像,由于原有的子系统镜像中存在的安全漏洞在新的子系统镜像中被修复,且新的子系统镜像支持更多的系统功能,因而可以有效提升操作系统启动过程中的安全性。It can be seen that, in the embodiment of the present application, the above-mentioned third storage unit may be a readable and writable storage unit, and when the operating system is updated, the processing unit writes a plurality of new subsystems into the third storage unit Mirror to update the original subsystem mirror. Since the security holes in the original subsystem mirror are fixed in the new subsystem mirror, and the new subsystem mirror supports more system functions, it can effectively improve Security during operating system startup.
在一种可行的实施方式中,上述安全引擎具体用于:对根密钥密文进行解密,得到根密钥明文;根据LCS、ROTPK哈希值、目标密钥因子、运营商信息或产品信息中的至少一个得到派生因子;基于派生因子和根密钥明文生成目标解密密钥。In a feasible implementation manner, the above-mentioned security engine is specifically used for: decrypting the root key ciphertext to obtain the root key plaintext; according to LCS, ROTPK hash value, target key factor, operator information or product information At least one of the derivation factors is obtained; the target decryption key is generated based on the derivation factors and the root key plaintext.
可以看出,在本申请实施方式中,安全引擎可以根据LCS、ROTPK哈希值、各子系统镜像的密钥因子、运营商信息或产品信息中的至少一个得到各子系统镜像的派生因子,基于各子系统镜像的派生因子和根密钥明文生成各子系统镜像的解密密钥,由于各子系统镜像的密钥因子不同,因而各子系统镜像的解密密钥不同,提高了各子系统镜像之间的独立性,提升了操作系统镜像解密过程的安全性;同时,根密钥以密文的方式保存于第一存储单元,提升了根密钥的安全性,有效地防止根密钥泄露后被用于生成各子系统镜像的解密密钥,从而提升了操作系统的安全性。It can be seen that in the embodiment of the present application, the security engine can obtain the derivation factor of each subsystem image according to at least one of LCS, ROTPK hash value, key factor of each subsystem image, operator information or product information, The decryption key of each subsystem image is generated based on the derivation factor of each subsystem image and the plaintext of the root key. Since the key factor of each subsystem image is different, the decryption key of each subsystem image is different, which improves the performance of each subsystem image. The independence between images improves the security of the operating system image decryption process; at the same time, the root key is stored in the first storage unit in the form of ciphertext, which improves the security of the root key and effectively prevents the root key After being leaked, it is used to generate the decryption key of each subsystem image, thereby improving the security of the operating system.
在一种可行的实施方式中,上述处理单元,还用于在运行目标镜像明文后,利用第一密钥因子覆盖目标密钥因子;上述安全引擎,还用于清除目标解密密钥;或利用目标子系统镜像的安全解密密钥或第一预设值覆盖目标解密密钥,该安全解密密钥根据第一密钥因子和第一密钥信息生成。In a feasible implementation manner, the above-mentioned processing unit is further configured to overwrite the target key factor with the first key factor after running the target image plaintext; the above-mentioned security engine is further configured to clear the target decryption key; or use the first key factor to cover the target key factor; The security decryption key or the first preset value of the target subsystem image covers the target decryption key, and the security decryption key is generated according to the first key factor and the first key information.
可以看出,在本申请实施方式中,在各子系统镜像的镜像明文运行后,安全引擎可以覆盖或者清除各子系统镜像的密钥因子和解密密钥,由于各子系统镜像是串行加载的,因 而每个子系统镜像的密钥因子和解密密钥仅存在于该子系统镜像的解密过程中,有效地提高了各子系统镜像解密过程的独立性,提升了操作系统镜像解密过程的安全性。It can be seen that in the embodiment of the present application, after the image plaintext of each subsystem image runs, the security engine can overwrite or clear the key factor and decryption key of each subsystem image, because each subsystem image is loaded serially. Therefore, the key factor and decryption key of each subsystem image only exist in the decryption process of the subsystem image, which effectively improves the independence of each subsystem image decryption process and improves the security of the operating system image decryption process. sex.
在一种可行的实施方式中,上述多个子系统镜像包括第一子系统镜像和第二子系统镜像;在操作系统启动中,第一子系统镜像被解密一次,第二子系统镜像被解密多次。In a feasible implementation manner, the above-mentioned multiple subsystem images include a first subsystem image and a second subsystem image; during the startup of the operating system, the first subsystem image is decrypted once, and the second subsystem image is decrypted many times. Second-rate.
应当理解,第一子系统镜像为在操作系统启动过程中解密一次的一类子系统镜像,第二子系统镜像为在操作系统启动过程中解密多次的一类子系统镜像,每个第二子系统镜像被解密的次数由具体的应用场景确定,且每个第二子系统镜像在其多次解密的过程中使用的密钥因子和解密密钥相同。It should be understood that the first subsystem image is a type of subsystem image that is decrypted once during the operating system startup process, and the second subsystem image is a type of subsystem image that is decrypted multiple times during the operating system startup process. The number of times the subsystem image is decrypted is determined by a specific application scenario, and each second subsystem image uses the same key factor and decryption key during the multiple decryption process.
可以看出,在本申请实施方式中,操作系统的子系统镜像可以包含第一子系统镜像和第二字体同镜像。在操作系统启动过程中,第二子系统镜像的解密次数由具体的应用场景确定,通过在操作系统中配置不同的第一子系统镜像和第二子系统镜像,可以使操作系统适用于不同的应用场景,从而增加操作系统的通用性。It can be seen that, in the embodiment of the present application, the subsystem image of the operating system may include the first subsystem image and the second font same image. During the startup process of the operating system, the number of times of decryption of the second subsystem image is determined by the specific application scenario. By configuring different first subsystem images and second subsystem images in the operating system, the operating system can be adapted to different application scenarios, thereby increasing the versatility of the operating system.
在一种可行的实施方式中,上述安全处理装置还包括:第四存储单元,用于为目标镜像明文的运行提供存储空间。In a feasible implementation manner, the above-mentioned security processing apparatus further includes: a fourth storage unit, configured to provide storage space for running the plaintext of the target image.
可以看出,在本申请实施方式中,上述第四存储单元可以为随机存储单元,用于在各子系统镜像加载过程中,存储各子系统镜像、数据和中间结果,从而确保各子系统镜像的正常运行和操作系统的顺利启动。It can be seen that, in the embodiment of the present application, the above-mentioned fourth storage unit may be a random storage unit, which is used to store the mirror images, data and intermediate results of each subsystem during the loading process of the mirror images of each subsystem, so as to ensure that the mirror images of each subsystem are stored. normal operation and smooth startup of the operating system.
第二方面,本申请实施例提供了一种安全处理方法,包括:通过处理单元分别获取用于操作系统启动的操作系统镜像的多个子系统镜像;由第一存储单元存储操作系统镜像的第一密钥信息,该第一密钥信息包括根密钥密文、生命周期状态LCS、可信根公钥ROTPK哈希值,运营商信息或产品信息中的至少一个;由第二存储单元存储上述多个子系统镜像中目标子系统镜像的目标密钥因子;在上述多个子系统镜像中,一个子系统镜像对应一个密钥因子,不同子系统镜像的密钥因子不同;由安全引擎根据第一密钥信息和目标密钥因子生成目标子系统镜像的目标解密密钥;并利用目标解密密钥对目标子系统镜像进行解密,以得到目标子系统镜像的目标镜像明文;由处理单元运行目标镜像明文。In a second aspect, an embodiment of the present application provides a security processing method, including: obtaining, by a processing unit, multiple subsystem images of an operating system image used for operating system startup respectively; storing, by a first storage unit, a first image of the operating system image Key information, the first key information includes at least one of root key ciphertext, life cycle status LCS, root of trust public key ROTPK hash value, operator information or product information; the second storage unit stores the above The target key factor of the target subsystem image in the multiple subsystem images; in the above multiple subsystem images, one subsystem image corresponds to one key factor, and different subsystem images have different key factors; key information and target key factor to generate the target decryption key of the target subsystem image; and use the target decryption key to decrypt the target subsystem image to obtain the target image plaintext of the target subsystem image; the processing unit runs the target image plaintext .
在一种可行的实施方式中,上述方法还包括:在上述安全引擎对目标子系统镜像进行解密以得到目标镜像明文后,由安全引擎继续对下一个子系统镜像进行解密以得到该下一个子系统镜像的下一个镜像明文,该下一个子系统镜像是在上述多个子系统镜像中所述目标子系统镜像的后续子系统镜像。In a feasible implementation manner, the method further includes: after the security engine decrypts the target subsystem image to obtain the plaintext of the target image, the security engine continues to decrypt the next subsystem image to obtain the next sub-system image. The next image plaintext of the system image, where the next subsystem image is the subsequent subsystem image of the target subsystem image in the above-mentioned multiple subsystem images.
在一种可行的实施方式中,上述通过处理单元分别获取用于操作系统启动的操作系统镜像的多个子系统镜像包括:由处理单元从上述多个子系统镜像中获取目标子系统镜像;在运行目标镜像明文后,由处理单元继续从上述多个子系统镜像中获取下一个子系统镜像;上述由处理单元运行所述目标镜像明文之后,安全处理方法还包括:运行下一个镜像明文。In a feasible implementation manner, the above-mentioned obtaining, by the processing unit, the multiple subsystem images of the operating system image used for starting the operating system respectively includes: obtaining, by the processing unit, the target subsystem image from the above-mentioned multiple subsystem images; After mirroring the plaintext, the processing unit continues to obtain the next subsystem mirror from the multiple subsystem mirrors; after the processing unit runs the target mirroring plaintext, the security processing method further includes: running the next mirroring plaintext.
在一种可行的实施方式中,上述方法还包括:由处理单元获取目标子系统镜像的目标安全证书链;在上述多个子系统镜像中,一个子系统镜像对应一个安全证书链;由处理单元从目标安全证书链或已解密的镜像明文中获取目标密钥因子,并将目标密钥因子配置到第二存储单元。In a feasible implementation manner, the above method further includes: acquiring, by the processing unit, a target security certificate chain of the target subsystem image; among the above-mentioned multiple subsystem images, one subsystem image corresponds to one security certificate chain; Obtain the target key factor from the target security certificate chain or the decrypted image plaintext, and configure the target key factor to the second storage unit.
在一种可行的实施方式中,上述由安全引擎根据第一密钥信息和目标密钥因子生成目 标子系统镜像的目标解密密钥,包括:对根密钥密文进行解密,得到根密钥明文;根据LCS、ROTPK哈希值,目标密钥因子、运营商信息和产品信息中的一个或多个进行拼接,得到派生因子;基于派生因子和根密钥明文生成目标子系统镜像的目标解密密钥。In a feasible implementation manner, generating the target decryption key of the target subsystem image by the security engine according to the first key information and the target key factor includes: decrypting the ciphertext of the root key to obtain the root key Plaintext; splicing one or more of the LCS, ROTPK hash value, target key factor, operator information and product information to obtain the derivation factor; based on the derivation factor and the root key plaintext to generate the target decryption of the target subsystem image key.
在一种可行的实施方式中,上述方法还包括:由第三存储单元存储上述多个子系统镜像和与上述多个子系统镜像分别对应的多个安全证书链。In a feasible implementation manner, the above-mentioned method further includes: storing, by a third storage unit, the above-mentioned multiple subsystem images and multiple security certificate chains corresponding to the above-mentioned multiple subsystem images respectively.
在一种可行的实施方式中,在上述得到目标子系统镜像的目标镜像明文之后,上述方法还包括:由处理单元利用第一密钥因子覆盖目标子系统镜像的目标密钥因子;由安全引擎清除所述目标解密密钥;或利用目标子系统镜像的安全解密密钥或第一预设值覆盖目标解密密钥,该安全解密密钥根据第一密钥因子和第一密钥信息生成。In a feasible implementation manner, after obtaining the target image plaintext of the target subsystem image, the method further includes: the processing unit overwrites the target key factor of the target subsystem image with the first key factor; Clearing the target decryption key; or overwriting the target decryption key with the security decryption key of the target subsystem image or the first preset value, where the security decryption key is generated according to the first key factor and the first key information.
在一种可行的实施方式中,上述多个子系统镜像包括第一子系统镜像和第二子系统镜像;在操作系统启动中,第一子系统镜像被解密一次,第二子系统镜像被解密多次。In a feasible implementation manner, the above-mentioned multiple subsystem images include a first subsystem image and a second subsystem image; during the startup of the operating system, the first subsystem image is decrypted once, and the second subsystem image is decrypted many times. Second-rate.
在一种可行的实施方式中,上述方法还包括:由第四存储单元为目标镜像明文的运行提供存储空间。In a feasible implementation manner, the above method further includes: providing, by the fourth storage unit, a storage space for running the plaintext of the target image.
第三方面,本申请提供了一种芯片系统,该芯片系统包括上述第一方面中的任意一种实施方式所提供的安全处理装置,用于实现上述第二方面中任意一项所述的安全处理方法流程所涉及的功能。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存上述安全处理方法必要或相关的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其它分立器件。In a third aspect, the present application provides a chip system, where the chip system includes the security processing device provided in any one of the implementation manners of the foregoing first aspect, for implementing the security described in any one of the foregoing second aspect The functions involved in the processing method flow. In a possible design, the chip system further includes a memory, and the memory is used for saving necessary or related program instructions and data of the above-mentioned security processing method. The chip system may be composed of chips, or may include chips and other discrete devices.
第四方面,本申请实施例提供了一种终端设备,包括上述第一方面中的任意一种实施方式所提供的安全处理装置以及耦合于该安全处理装置的分立器件。In a fourth aspect, an embodiment of the present application provides a terminal device, including the security processing device provided by any one of the implementations of the foregoing first aspect, and a discrete device coupled to the security processing device.
第五方面,本申请提供一种计算机存储介质,所述计算机存储介质存储有计算机程序,该计算机程序被安全处理装置执行时实现上述第二方面中任意一项所述的安全处理方法流程。In a fifth aspect, the present application provides a computer storage medium, where the computer storage medium stores a computer program, and when the computer program is executed by a security processing device, implements the security processing method flow described in any one of the above-mentioned second aspects.
第六方面,本发明实施例提供了一种计算机程序,该计算机程序包括指令,当该计算机程序被安全处理装置执行时,使得安全元件可以执行上述第二方面中任意一项所述的安全处理方法流程。In a sixth aspect, an embodiment of the present invention provides a computer program, where the computer program includes instructions, when the computer program is executed by the security processing device, the security element can perform the security processing described in any one of the above-mentioned second aspects. method flow.
附图说明Description of drawings
图1是本申请实施例提供的一种安全处理装置的结构示意图;1 is a schematic structural diagram of a security processing device provided by an embodiment of the present application;
图2是本申请实施例提供的另一种安全处理装置的结构示意图;2 is a schematic structural diagram of another security processing device provided by an embodiment of the present application;
图3是本申请实施例提供的又一种安全处理装置的结构示意图;3 is a schematic structural diagram of another security processing device provided by an embodiment of the present application;
图4是本申请实施例提供的一种操作系统子系统镜像的目标密钥因子的配置流程示意图;4 is a schematic flowchart of a configuration flow of a target key factor of an operating system subsystem image provided by an embodiment of the present application;
图5是本申请实施例提供的一种操作系统的子系统镜像的层级划分示意图;5 is a schematic diagram of hierarchical division of a subsystem image of an operating system provided by an embodiment of the present application;
图6是本申请实施例提供的又一种操作系统的子系统镜像的层级划分示意图;6 is a schematic diagram of hierarchical division of a subsystem image of another operating system provided by an embodiment of the present application;
图7是本申请实施例提供的一种每个子系统镜像的目标解密密钥的派生过程示意图;7 is a schematic diagram of a derivation process of a target decryption key of each subsystem image provided by an embodiment of the present application;
图8是本申请实施例提供的一种安全处理方法的流程示意图。FIG. 8 is a schematic flowchart of a security processing method provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合本申请实施例中的附图对本申请实施例进行描述。本申请的说明书和权利要求书及附图中的术语“子系统镜像”应理解为各子系统镜像的密文;同时,本申请的说明书和权利要求书及附图中的术语“第一”、“第二”、“第三”、“第四”和“第五”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”、“包含”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。The embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. The term "subsystem image" in the description, claims and drawings of this application should be understood as the ciphertext of each subsystem image; at the same time, the term "first" in the description, claims and drawings of this application , "second", "third", "fourth" and "fifth" etc. are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "comprising", "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally also includes For other steps or units inherent to these processes, methods, products or devices. Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
在本说明书中使用的术语“部件”、“模块”、“系统”等用于表示计算机相关的实体、硬件、固件、硬件和软件的组合、软件、或执行中的软件。例如,部件可以是但不限于,在处理器上运行的进程、处理器、对象、可执行文件、执行线程、程序和/或计算机。通过图示,在计算设备上运行的应用和计算设备都可以是部件。一个或多个部件可驻留在进程和/或执行线程中,部件可位于一个计算机上和/或分布在2个或更多个计算机之间。此外,这些部件可从在上面存储有各种数据结构的各种计算机可读介质执行。部件可例如根据具有一个或多个数据分组(例如来自与本地系统、分布式系统和/或网络间的另一部件交互的二个部件的数据,例如通过信号与其它系统交互的互联网)的信号通过本地和/或远程进程来通信。The terms "component", "module", "system" and the like are used in this specification to refer to a computer-related entity, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a computing device and the computing device may be components. One or more components may reside within a process and/or thread of execution, and a component may be localized on one computer and/or distributed between 2 or more computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. A component may, for example, be based on a signal having one or more data packets (eg, data from two components interacting with another component between a local system, a distributed system, and/or a network, such as the Internet interacting with other systems via signals) Communicate through local and/or remote processes.
首先,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。First, some terms in this application will be explained so as to facilitate the understanding of those skilled in the art.
(1)片上系统(system on chip,SOC),也称系统级芯片,是包含处理器、存储器和片上逻辑的集成电路。(1) A system on chip (SOC), also known as a system-on-chip, is an integrated circuit that includes a processor, memory, and on-chip logic.
(2)生命周期状态(life cycle status,LCS),用于指示SOC芯片当前的生命周期状态。LCS通常包括芯片制造(Chip Manufacture,CM)模式、设备制造(Device Manufacture,DM)模式和安全(Secure Mode,SM)模式这三种模式,分别对应芯片生产、整机生产和商用三个阶段。(2) Life cycle status (LCS), which is used to indicate the current life cycle status of the SOC chip. LCS usually includes three modes: chip manufacturing (Chip Manufacture, CM) mode, device manufacturing (Device Manufacture, DM) mode and security (Secure Mode, SM) mode, corresponding to the three stages of chip production, complete machine production and commercial use.
(3)密钥导出函数(key derivation function,KDF),是加解密过程使用到的密钥派生函数,作用是从一个共享的秘密比特串口派生出密钥数据,在密钥协商过程中,密钥派生函数作用在密钥交换所获的秘密比特串上,从中产生所需的会话密钥或进一步加密所需的密钥数据。(3) The key derivation function (KDF) is the key derivation function used in the encryption and decryption process. Its function is to derive key data from a shared secret bit serial port. The key derivation function acts on the secret bit string obtained by the key exchange to generate the required session key or key data required for further encryption.
(4)可信根公钥(root of trusted public key,ROTPK),用于在操作系统的安全启动过程中,对操作系统安全证书中的私钥所生成的签名进行校验,不同的设备制造商使用的ROTPK不同。(4) The root of trusted public key (ROTPK) is used to verify the signature generated by the private key in the operating system security certificate during the secure boot process of the operating system. Different equipment manufacturers The ROTPK used by the merchants is different.
(5)运营商信息,用于提供网络服务供应商的信息,例如,使用中国移动和中国电信的终端设备中,其运营商信息相应不同。(5) Operator information, which is used to provide information on network service providers. For example, in the terminal equipment using China Mobile and China Telecom, the operator information is correspondingly different.
(6)产品信息,用于区分同一设备制造商生产的不同型号的产品。(6) Product information, which is used to distinguish different models of products produced by the same equipment manufacturer.
(7)操作系统镜像,操作系统为管理终端设备上硬件与软件资源的程序,操作系统镜像为包含该程序的文件;操作系统镜像包括多个子系统镜像,该多个子系统镜像指各子系统镜像的密文。(7) Operating system image, the operating system is a program that manages hardware and software resources on the terminal device, and the operating system image is a file containing the program; the operating system image includes multiple subsystem images, and the multiple subsystem images refer to each subsystem image ciphertext.
请参见图1,图1是本申请实施例提供的一种安全处理装置的结构示意图,该安全处理装置10可包括处理单元101、安全引擎102、第一存储单元103和第二存储单元104,且处理单元101、安全引擎102、第一存储单元103和第二存储单元104可以集成在SOC芯片内。其中,处理单元101,用于分别获取用于操作系统启动的操作系统镜像的多个子系统镜像。进一步地,处理单元101可以包括多个处理器,该多个处理器可以分别用于驱动安全引擎102获取不同的子系统镜像,所述处理器可以是中央处理单元(CPU)或其他处理核心,所述多个处理器可以是异构处理器,即不同类型处理器,关于处理器的具体实现方案本实施例不做展开。安全引擎102每次获取上述多个子系统镜像中的一个子系统镜像。操作系统镜像是存储器非易失性存储器中的程序,该操作系统例如是安卓、Windows或iOS系统,本实施例对其不限定。Please refer to FIG. 1. FIG. 1 is a schematic structural diagram of a security processing device provided by an embodiment of the present application. The security processing device 10 may include a processing unit 101, a security engine 102, a first storage unit 103, and a second storage unit 104. And the processing unit 101, the security engine 102, the first storage unit 103 and the second storage unit 104 may be integrated in the SOC chip. The processing unit 101 is configured to obtain a plurality of subsystem images of the operating system image for operating the operating system respectively. Further, the processing unit 101 may include multiple processors, and the multiple processors may be respectively used to drive the security engine 102 to obtain different subsystem images, and the processors may be a central processing unit (CPU) or other processing cores, The multiple processors may be heterogeneous processors, that is, processors of different types, and the specific implementation scheme of the processors is not described in this embodiment. The security engine 102 obtains one subsystem image of the above-mentioned multiple subsystem images at a time. The operating system image is a program in the non-volatile memory of the memory, and the operating system is, for example, an Android, Windows, or iOS system, which is not limited in this embodiment.
第一存储单元103,用于存储所述操作系统镜像的第一密钥信息,所述第一密钥信息可以包括根密钥密文、生命周期状态LCS、可信根公钥ROTPK哈希值、运营商信息或产品信息中的至少一个。例如,第一密钥信息在安全处理装置10生产的过程中即烧写入第一存储单元103中,且此后无法更改,以保证第一密钥信息的安全性。可选地,该第一存储单元103可以是一次性可编程(one time programmable,OTP)器件,例如电子熔断器eFuse或其它功能类似的只可进行一次编程的存储器。对于第一密钥信息中包含的ROTPK哈希值,该哈希值可以使用安全哈希算法(secure hash algorithm,SHA),如SHA-256,或其它散列算法进行运算得到,且不同的设备制造商使用的ROTPK不同。The first storage unit 103 is configured to store the first key information of the operating system image, where the first key information may include the root key ciphertext, the life cycle state LCS, and the root-of-trust public key ROTPK hash value , at least one of carrier information or product information. For example, the first key information is programmed into the first storage unit 103 during the production process of the security processing device 10, and cannot be changed thereafter to ensure the security of the first key information. Optionally, the first storage unit 103 may be a one-time programmable (one-time programmable, OTP) device, such as an electronic fuse eFuse or other memory with similar functions that can only be programmed once. For the ROTPK hash value included in the first key information, the hash value can be obtained by using a secure hash algorithm (SHA), such as SHA-256, or other hash algorithms, and different devices Manufacturers use different ROTPKs.
应当理解,除本申请实施例中所列举的第一密钥信息(即上述五种)外,在操作系统启动过程中,第一存储单元103中存储的第一密钥信息也可以包括上述五种之中和/或上述五种之外的其它一种或多种,本申请实施例对此不做具体限定。It should be understood that, in addition to the first key information (that is, the above five types) listed in the embodiments of the present application, during the operating system startup process, the first key information stored in the first storage unit 103 may also include the above five types of key information. One or more of these types and/or other than the above five types, which are not specifically limited in this embodiment of the present application.
第二存储单元104,用于存储上述多个子系统镜像中目标子系统镜像的目标密钥因子,在上述多个子系统镜像中,一个子系统镜像对应一个密钥因子,不同子系统镜像的密钥因子不同。具体地,第二存储单元104每次只存储一个密钥因子,即存储当前待解密的子系统镜像(即目标子系统镜像)的密钥因子(即目标密钥因子),随着各子系统镜像依次加载,第二存储单元104中的密钥因子也会相应地发生变化。可选地,第二存储单元104可以为可写可读的存储单元,如寄存器或随机存取存储器(random access memory,RAM),例如静态随机存取存储器(static random access memory,SRAM)、动态随机存取存储器(dynamic random access memory,DRAM)或同步动态随机存储器(synchronous DRAM,SDRAM)、双倍速率SDRAM(dual data rate SDRAM,DDR SDRAM)等。本申请中的目标子系统镜像指上述多个子系统镜像中当前待解密的子系统镜像,目标密钥因子指用于生成目标子系统镜像的目标解密密钥的密钥因子。The second storage unit 104 is configured to store the target key factor of the target subsystem image among the multiple subsystem images. Among the multiple subsystem images, one subsystem image corresponds to one key factor, and the keys of different subsystem images factors are different. Specifically, the second storage unit 104 only stores one key factor at a time, that is, stores the key factor (ie, the target key factor) of the subsystem image (ie, the target subsystem image) currently to be decrypted. The images are loaded in sequence, and the key factor in the second storage unit 104 will also change accordingly. Optionally, the second storage unit 104 may be a writable and readable storage unit, such as a register or random access memory (random access memory, RAM), such as static random access memory (static random access memory, SRAM), dynamic Random access memory (dynamic random access memory, DRAM) or synchronous dynamic random access memory (synchronous DRAM, SDRAM), double rate SDRAM (dual data rate SDRAM, DDR SDRAM), etc. The target subsystem image in this application refers to the subsystem image currently to be decrypted among the above-mentioned multiple subsystem images, and the target key factor refers to the key factor used to generate the target decryption key of the target subsystem image.
安全引擎102,用于根据第一密钥信息和目标密钥因子生成目标子系统镜像的目标解密密钥;并利用目标解密密钥对目标子系统镜像进行解密,以得到目标子系统镜像的目标 镜像明文。进一步地,在一种可行的实施方式中,第一存储单元103中存储的第一密钥信息可以包括根密钥密文、LCS、ROTPK哈希值、运营商信息和产品信息,共五种,则对于当前待解密的目标子系统镜像,安全引擎102生成目标密钥因子的过程可以如图7所示:安全引擎102首先对根密钥密文进行解密得到根密钥明文,然后对LCS、ROTPK哈希值、运营商信息、产品信息和目标密钥因子进行拼接,得到一个派生因子,最后,基于KDF,根据根密钥明文和派生因子得到目标子系统镜像的目标解密密钥。当第一存储单元中存储的第一密钥信息不同时,安全引擎102获取的第一密钥信息也相应不同;此外,在每个子系统镜像的解密过程中,安全引擎102在生成每个子系统镜像的解密密钥时使用的第一密钥信息相同。可选的,安全引擎102可以通过硬件执行软件来实现本申请实施例中记载的由安全引擎102所实现的任意步骤,由于硬件形式的安全引擎102独立于处理单元101,专用于实现相关的安全处理、解密或验证功能,有利于提升对操作系统镜像进行解密时的性能。The security engine 102 is used to generate a target decryption key of the target subsystem image according to the first key information and the target key factor; and use the target decryption key to decrypt the target subsystem image to obtain the target of the target subsystem image. Mirror plaintext. Further, in a feasible implementation manner, the first key information stored in the first storage unit 103 may include root key ciphertext, LCS, ROTPK hash value, operator information and product information, a total of five , then for the target subsystem image to be decrypted currently, the process of generating the target key factor by the security engine 102 may be as shown in FIG. 7 : the security engine 102 first decrypts the root key ciphertext to obtain the root key plaintext, , ROTPK hash value, operator information, product information and target key factor are concatenated to obtain a derivation factor. Finally, based on KDF, the target decryption key of the target subsystem image is obtained according to the root key plaintext and the derivation factor. When the first key information stored in the first storage unit is different, the first key information obtained by the security engine 102 is also different; in addition, during the decryption process of each subsystem image, the security engine 102 generates a The first key information used in the decryption key of the image is the same. Optionally, the security engine 102 may execute software through hardware to implement any steps implemented by the security engine 102 described in the embodiments of the present application. Since the security engine 102 in the form of hardware is independent of the processing unit 101, it is dedicated to implementing related security. Processing, decryption, or verification functions, which help improve performance when decrypting operating system images.
在一种可行的实施方式中,安全引擎102可以在对操作系统的首个子系统镜像进行解密时,从第一存储单元103中获取第一密钥信息,然后将该第一密钥信息保存于安全引擎102中;在对后续的子系统镜像进行解密时,不再从第一存储单元103中获取第一密钥信息,而是采用安全引擎102中已保存的第一密钥信息来生成后续子系统镜像的解密密钥。可替换地,安全引擎102也可以在生成每个子系统镜像的解密密钥之前,分别从第一存储单元103中获取第一密钥信息。In a feasible implementation manner, the security engine 102 may obtain the first key information from the first storage unit 103 when decrypting the first subsystem image of the operating system, and then save the first key information in the In the security engine 102; when decrypting the subsequent subsystem image, the first key information is no longer obtained from the first storage unit 103, but the first key information saved in the security engine 102 is used to generate the subsequent The decryption key for the subsystem image. Alternatively, the security engine 102 may also obtain the first key information from the first storage unit 103 before generating the decryption key of each subsystem image.
在一种可行的实施方式中,安全引擎102可以通过硬线传输的方式从第二存储单元104中获取目标子系统镜像的目标密钥因子;以及通过软件读取或硬线传输的方式从第一存储单元103中获取第一密钥信息。In a feasible implementation manner, the security engine 102 can obtain the target key factor of the target subsystem image from the second storage unit 104 by means of hard-wired transmission; The first key information is obtained from a storage unit 103 .
可以看出,在本申请实施例中,在每个子系统镜像的解密过程中,第二存储单元104中存储的每个子系统镜像的密钥因子只能通过硬线方式被安全引擎102读取,无法通过软件或其它方式读取,可以有效防止各子系统镜像的密钥因子外泄后被利用来解密相应的子系统镜像,从而有效地提升了操作系统镜像的安全性。It can be seen that in this embodiment of the present application, during the decryption process of each subsystem image, the key factor of each subsystem image stored in the second storage unit 104 can only be read by the security engine 102 in a hard-wired manner, It cannot be read by software or other means, which can effectively prevent the key factor of each subsystem image from being leaked and used to decrypt the corresponding subsystem image, thereby effectively improving the security of the operating system image.
处理单元101,还用于运行目标镜像明文。具体地,在安全引擎102解密出目标子系统镜像的目标镜像明文后,处理单元101获取目标镜像明文并运行,完成对目标子系统镜像的加载,应当理解,操作系统各子系统镜像的加载包括各子系统镜像的解密,以及各子系统镜像明文的运行。The processing unit 101 is further configured to run the plaintext of the target image. Specifically, after the security engine 102 decrypts the target image plaintext of the target subsystem image, the processing unit 101 obtains the target image plaintext and runs it to complete the loading of the target subsystem image. It should be understood that the loading of each subsystem image of the operating system includes: Decryption of each subsystem image, and operation of the plaintext of each subsystem image.
在一种可行的实现方式中,在操作系统的启动过程中,上述多个子系统镜像是进行串行加载的,即每次加载一个子系统镜像。具体地,处理单元101驱动安全引擎102获取目标子系统镜像,安全引擎102对目标子系统镜像进行解密以得到目标镜像明文,处理单元101运行目标镜像明文;在处理单元101运行目标镜像明文后,处理单元101继续从上述多个子系统镜像中获取下一个子系统镜像,安全引擎102继续对该下一个子系统镜像进行解密以得到该下一个子系统镜像的下一个镜像明文,处理单元101运行该下一个镜像明文,该下一个子系统镜像是上述多个子系统镜像中目标子系统镜像的后续子系统镜像。In a feasible implementation manner, during the startup process of the operating system, the above-mentioned multiple subsystem images are loaded serially, that is, one subsystem image is loaded at a time. Specifically, the processing unit 101 drives the security engine 102 to obtain the target subsystem image, the security engine 102 decrypts the target subsystem image to obtain the target image plaintext, and the processing unit 101 runs the target image plaintext; after the processing unit 101 runs the target image plaintext, The processing unit 101 continues to obtain the next subsystem image from the above-mentioned multiple subsystem images, the security engine 102 continues to decrypt the next subsystem image to obtain the next image plaintext of the next subsystem image, and the processing unit 101 executes the next subsystem image. The plaintext of the next image, where the next subsystem image is the subsequent subsystem image of the target subsystem image in the above-mentioned multiple subsystem images.
可以看出,在本申请实施例中,通过对不同的子系统镜像配置不同的密钥因子,从而可根据每个子系统镜像的密钥因子和第一密钥信息生成每个子系统镜像的不同解密密钥, 即每个子系统镜像在解密过程中其解密密钥不同。因此,当操作系统中部分子系统镜像的解密密钥被泄露时,由于各子系统镜像的解密密钥均不同,其它未泄露解密密钥的子系统镜像无法被解密,避免操作系统被完全攻击,从而提升了操作系统的安全性。其中,由于第一密钥信息包含根密钥密文、生命周期状态LCS、可信根公钥ROTPK哈希值、运营商信息和产品信息中的一种或多种,可以进一步保证不同子系统镜像根据与其对应的密钥因子和第一密钥信息生成的各子系统镜像的解密密钥不同。当终端设备处于不同的生命周期状态(如芯片制造CM模式、设备制造DM模式和安全SM模式)时,其LCS值不同;不同设备制造商的ROTPK不同,因而ROTPK哈希值也不同;同理,使用不同网络运营商的终端设备或不同型号终端设备对应的运营商信息或产品信息也不同。因此,本申请实施例中的解密密钥可以有效防止某一生命周期状态下操作系统镜像的解密密钥泄露后被利用来解密其它生命周期状态下的操作系统镜像;同时,还可防止部分设备制造商的ROTPK泄露后被用来解密其它设备制造商的终端设备操作系统镜像;以及防止同一型号终端设备、或使用同一运营商的终端设备操作系统镜像的解密密钥泄露后被利用来解密其它型号终端设备或使用其它运营商的终端设备的操作系统镜像,从而确保了不同生命周期状态、不同设备制造商所制造、使用不同运营商、或不同型号的终端设备之间操作系统镜像的独立性,进而提高操作系统的安全性。It can be seen that, in the embodiment of the present application, by configuring different key factors for different subsystem images, different decryption of each subsystem image can be generated according to the key factor and the first key information of each subsystem image key, that is, each subsystem image has a different decryption key during the decryption process. Therefore, when the decryption keys of some subsystem images in the operating system are leaked, since the decryption keys of each subsystem image are different, other subsystem images whose decryption keys have not been leaked cannot be decrypted, preventing the operating system from being completely attacked. Thereby improving the security of the operating system. Among them, since the first key information includes one or more of the root key ciphertext, the life cycle state LCS, the trusted root public key ROTPK hash value, the operator information and the product information, it can further ensure that different subsystems The decryption keys of each subsystem image generated by the image according to its corresponding key factor and the first key information are different. When the terminal device is in different life cycle states (such as chip manufacturing CM mode, device manufacturing DM mode and secure SM mode), its LCS value is different; the ROTPK of different device manufacturers is different, so the ROTPK hash value is also different; in the same way , the operator information or product information corresponding to terminal devices of different network operators or terminal devices of different models are also different. Therefore, the decryption key in the embodiment of the present application can effectively prevent the decryption key of the operating system image in a certain life cycle state from being leaked and be used to decrypt the operating system image in other life cycle states; at the same time, it can also prevent some devices from being leaked. The manufacturer's ROTPK is leaked and used to decrypt other device manufacturers' terminal device operating system images; and to prevent the same type of terminal device, or the decryption key of the same operator's terminal device operating system image from being leaked and used to decrypt other devices. Operating system images of terminal devices of different models or terminal devices using other operators, thus ensuring the independence of operating system images between terminal devices of different life cycle states, manufactured by different device manufacturers, using different operators, or different models , thereby improving the security of the operating system.
请参见图5,图5为本申请实施例提供的一种操作系统的子系统镜像的层级划分示意图。应当理解,操作系统的子系统镜像种类、操作系统的子系统镜像层级划分方式(包括具体的层数,以及每层中包含的子系统镜像)由实际的应用场景决定,本申请实施例对此不做具体限定。图5可以作为移动终端设备操作系统的子系统镜像层级划分的一个示例,如图5所示,操作系统的子系统镜像共被划分为四层:第一层子系统镜像(Layer0:ROM镜像),ROM镜像在安全处理装置10制造的过程中即被固化在SOC或其他存储单元上的只读存储单元中,无法被更改;第二层子系统镜像(Layer1:引导加载Bootloader镜像);第三层子系统镜像包括Layer2-0:富执行环境(rich execution environment,REE)镜像、Layer2-1:可信执行环境(trusted execution environment,TEE)镜像、Layer2-2:传感集线器Sensorhub镜像和Layer2-3:低功耗Lowpower镜像;第四层子系统镜像包括Layer3-0:调制解调器Modem镜像、Layer3-1:高保真(high-fidelity,HiFi)镜像和Layer3-2:图像信号处理(image signal processor,ISP)镜像,图5所示的四层子系统镜像都涉及安全敏感,都需要进行解密。Please refer to FIG. 5 , which is a schematic diagram of hierarchical division of a subsystem image of an operating system according to an embodiment of the present application. It should be understood that the type of the subsystem image of the operating system and the hierarchical division method of the subsystem image of the operating system (including the specific number of layers, and the subsystem images included in each layer) are determined by the actual application scenario, and the embodiments of the present application are for this No specific limitation is made. Fig. 5 can be used as an example of the hierarchical division of the subsystem image of the operating system of the mobile terminal device. As shown in Fig. 5, the subsystem image of the operating system is divided into four layers: the first layer of subsystem image (Layer0: ROM image) , the ROM image is solidified in the read-only storage unit on the SOC or other storage units during the manufacturing process of the security processing device 10, and cannot be changed; the second-layer subsystem image (Layer1: bootloader image); third Layer subsystem images include Layer2-0: rich execution environment (REE) image, Layer2-1: Trusted execution environment (TEE) image, Layer2-2: Sensor hub Sensorhub image and Layer2- 3: Low-power Lowpower image; the fourth-layer subsystem image includes Layer3-0: Modem Modem image, Layer3-1: High-fidelity (HiFi) image and Layer3-2: Image signal processing (image signal processor, ISP) image, the four-layer subsystem images shown in Figure 5 are all sensitive to security and need to be decrypted.
下面将以图5为例,描述在一种可行的实施方式下,操作系统的启动过程:(1)处理单元101首先获取ROM镜像,并运行该ROM镜像,ROM镜像是固化在SOC内部的第一个子系统镜像,以明文的方式存储。The following will take FIG. 5 as an example to describe the startup process of the operating system in a feasible implementation manner: (1) The processing unit 101 first acquires a ROM image, and runs the ROM image. A subsystem image, stored in plaintext.
(2)在处理单元101运行ROM镜像后,处理单元101驱动安全引擎102获取Bootloader镜像;安全引擎102从第一存储单元103和第二存储单元104中分别获取第一密钥信息和Bootloader镜像的密钥因子,并根据第一密钥信息和Bootloader镜像的密钥因子生成Bootloader镜像的解密密钥;安全引擎102利用Bootloader镜像的解密密钥对Bootloader镜像进行解密,得到Bootloader镜像的明文;处理单元101获取并运行Bootloader镜像的明文。(2) After the processing unit 101 runs the ROM image, the processing unit 101 drives the security engine 102 to obtain the Bootloader image; the security engine 102 obtains the first key information and the Bootloader image from the first storage unit 103 and the second storage unit 104 respectively. key factor, and generate the decryption key of the Bootloader image according to the first key information and the key factor of the Bootloader image; the security engine 102 uses the decryption key of the Bootloader image to decrypt the Bootloader image to obtain the plaintext of the Bootloader image; processing unit 101 Get and run the plaintext of the Bootloader image.
上述即为ROM镜像和Bootloader镜像加载的具体过程,同理,对于后续的子系统镜像,处理单元101按图5所示顺序依次获取后续的REE镜像、TEE镜像、Sensorhub镜像、Lowpower镜像、Modem镜像、HiFi镜像和ISP镜像;安全引擎102按照上述顺序分别对上述各子系统镜像进行解密,以得到上述各子系统镜像的明文;处理单元101按照上述顺序依次运行被解密的各子系统镜像明文。其中,Sensorhub镜像是与传感器控制相关的镜像、Lowpower是与电源管理相关的镜像、Modem是与通信相关的镜像、HiFi是与音频相关的镜像、ISP则是与图像视频相关的镜像,应当注意,在不同的产品或终端设备上,与上述子系统镜像功能相同的子系统镜像也可使用其它的命名方式,本申请实施例对此不做具体限定。The above is the specific process of loading the ROM image and the Bootloader image. Similarly, for the subsequent subsystem images, the processing unit 101 sequentially obtains the subsequent REE images, TEE images, Sensorhub images, Lowpower images, and Modem images in the sequence shown in FIG. 5 . , HiFi image and ISP image; the security engine 102 decrypts the above subsystem images according to the above sequence, to obtain the plaintext of each subsystem image; the processing unit 101 sequentially runs the decrypted plaintext of each subsystem image according to the above sequence. Among them, the Sensorhub image is the image related to sensor control, Lowpower is the image related to power management, Modem is the image related to communication, HiFi is the image related to audio, ISP is the image related to image and video, it should be noted that, On different products or terminal devices, other naming manners may also be used for the subsystem image that has the same function as the above-mentioned subsystem image, which is not specifically limited in this embodiment of the present application.
可以看出,在本申请实施例中,安全处理装置10按照预设的顺序依次加载各子系统镜像,实现操作系统启动过程中子系统镜像的串行加载,即每次加载一个子系统镜像,在当前子系统镜像加载完成后,进行下一个子系统镜像的加载。在此种情况下,若一个子系统镜像在加载的过程中被攻击,即使该子系统镜像被破解,但其它子系统镜像仍然是安全的,可以避免整个操作系统被破解,从而提升了操作系统在启动过程中的安全性。It can be seen that, in this embodiment of the present application, the security processing device 10 loads each subsystem image in sequence according to a preset order, so as to realize serial loading of the subsystem images during the operating system startup process, that is, each time a subsystem image is loaded, After the current subsystem image is loaded, the next subsystem image is loaded. In this case, if a subsystem image is attacked during the loading process, even if the subsystem image is cracked, other subsystem images are still safe, which can prevent the entire operating system from being cracked, thereby improving the operating system. Security during startup.
请参见图2,图2是本申请实施例提供的另一种安全处理装置10的结构示意图,该安全处理装置10中除了包括图1中的处理单元101、安全引擎102、第一存储单元103和第二存储单元104,以及执行上述图1中实施例的对应功能以外,还可以包括第三存储单元105、第四存储单元106和第五存储单元107,且第五存储单元107可以和处理单元101、安全引擎102、第一存储单元103、第二存储单元104共同集成在SOC芯片内。其中,第三存储单元105用于存储上述多个子系统镜像中除首个子系统镜像外的其它子系统镜像,以及存储与各子系统镜像分别对应的多个安全证书链。可选地,第三存储单元可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory)、可编程只读储存器(programmable read-only memory,PROM)、电可改写只读内存(electrically alterable read only memory,EAROM)、可擦可编程只读内存(erasable programmable read only memory,EPROM)、电可擦可编程只读内存(electrically erasable programmable read only memory,EEPROM),还可以包括上述种类的存储器的组合。第三存储单元105用于永久存储上述其它子系统镜像、多个安全证书链以及其他需要维护的数据或程序。Please refer to FIG. 2. FIG. 2 is a schematic structural diagram of another security processing device 10 provided by an embodiment of the present application. The security processing device 10 includes the processing unit 101, the security engine 102, and the first storage unit 103 in FIG. 1 in addition to and the second storage unit 104, and perform the corresponding functions of the above-mentioned embodiment in FIG. 1, may also include a third storage unit 105, a fourth storage unit 106 and a fifth storage unit 107, and the fifth storage unit 107 The unit 101, the security engine 102, the first storage unit 103, and the second storage unit 104 are jointly integrated in the SOC chip. The third storage unit 105 is configured to store other subsystem images except the first subsystem image among the above-mentioned multiple subsystem images, and store multiple security certificate chains corresponding to each subsystem image respectively. Optionally, the third storage unit may include non-volatile memory (non-volatile memory), such as flash memory (flash memory), programmable read-only memory (programmable read-only memory, PROM), electrically rewritable memory Read-only memory (electrically alterable read only memory, EAROM), erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (electrically erasable programmable read only memory, EEPROM), and Combinations of the types of memories described above may be included. The third storage unit 105 is used to permanently store the above-mentioned other subsystem images, multiple security certificate chains, and other data or programs that need to be maintained.
在一种可行的实施方式中,上述处理单元101获取目标子系统镜像,进一步包括:处理单元101从第三存储单元105或SOC中的只读存储单元中获取目标子系统镜像,并将目标子系统镜像存储在第四存储单元106中,这个过程也叫做加载。例如,处理单元101驱动安全引擎102从第四存储单元106中获取目标子系统镜像。In a feasible implementation manner, the above-mentioned processing unit 101 acquires the target subsystem image, further comprising: the processing unit 101 acquires the target subsystem image from the third storage unit 105 or the read-only storage unit in the SOC, and converts the target subsystem image to the The system image is stored in the fourth storage unit 106, and this process is also called loading. For example, the processing unit 101 drives the security engine 102 to acquire the target subsystem image from the fourth storage unit 106 .
在一种可行的实施方式中,在安全引擎102根据第一密钥信息和目标密钥因子生成目标子系统镜像的目标解密密钥之前,安全引擎102从目标子系统镜像的安全证书链或已解密的镜像明文中获取目标密钥因子,并将目标密钥因子配置到第二存储单元104中,上述已解密的镜像明文是在解密目标子系统镜像之前由安全引擎102解密上述多个子系统镜像中其它子系统镜像得到的。In a feasible implementation manner, before the security engine 102 generates the target decryption key of the target subsystem image according to the first key information and the target key factor, the security engine 102 obtains the target subsystem image from the security certificate chain or The target key factor is obtained from the decrypted image plaintext, and the target key factor is configured in the second storage unit 104. The above-mentioned decrypted image plaintext is that the security engine 102 decrypts the above-mentioned multiple subsystem images before decrypting the target subsystem image. obtained by mirroring other subsystems in the .
进一步地,在一种可行的实施方式中,当第一密钥信息中的LCS为SM时,处理单元 101从第三存储单元105中获取目标安全证书链并将目标安全证书链存入第四存储单元106;处理单元101驱动安全引擎102对目标安全证书链进行校验,校验通过后,处理单元101从第四存储单元106的目标安全证书链中或已解密的镜像明文中获取目标密钥因子并将目标密钥因子配置到第二存储单元104中;其中,目标安全证书链包括至少一级安全证书;应当理解,除目标子系统镜像外,其它各子系统镜像的安全证书链中也都包括至少一级安全证书。此外,各子系统镜像对应安全证书链中的每级安全证书是逐级校验的,当各子系统镜像的安全证书链中每级安全证书都校验通过时,各子系统镜像的安全证书链的校验相应通过。Further, in a feasible implementation manner, when the LCS in the first key information is SM, the processing unit 101 obtains the target security certificate chain from the third storage unit 105 and stores the target security certificate chain in the fourth The storage unit 106; the processing unit 101 drives the security engine 102 to verify the target security certificate chain. After the verification is passed, the processing unit 101 obtains the target password from the target security certificate chain of the fourth storage unit 106 or the decrypted image plaintext. key factor and configure the target key factor into the second storage unit 104; wherein, the target security certificate chain includes at least a first-level security certificate; it should be understood that, except for the target subsystem image, the security certificate chains of other subsystem images All also include at least a Level 1 security certificate. In addition, each level of security certificate in the security certificate chain corresponding to each subsystem mirror is verified level by level. When each level of security certificate in the security certificate chain of each subsystem mirror is verified, the security certificate of each subsystem mirror is verified. The verification of the chain passes accordingly.
可选地,在一种可行的实施方式中,当第一密钥信息中的LCS为CM或DM时,不进行目标安全证书链的校验,即处理单元101从第三存储单元105中获取目标安全证书链并将目标安全证书链存入第四存储单元106;处理单元101从第四存储单元的目标安全证书链中或已解密的镜像明文中获取目标密钥因子并将目标密钥因子配置到第二存储单元104中。Optionally, in a feasible implementation manner, when the LCS in the first key information is CM or DM, the verification of the target security certificate chain is not performed, that is, the processing unit 101 obtains from the third storage unit 105 The target security certificate chain is stored in the fourth storage unit 106; the processing unit 101 obtains the target key factor from the target security certificate chain in the fourth storage unit or the decrypted image plaintext and stores the target key factor configured into the second storage unit 104 .
在一种可行的实施方式中,在处理单元101运行目标镜像明文后,处理单元101利用第一密钥因子覆盖目标密钥因子;安全引擎102可以清除已生成的目标解密密钥,或利用目标子系统镜像的安全解密密钥或第一预设值覆盖目标解密密钥,上述安全解密密钥根据第一密钥因子和第一密钥信息生成。应当注意,每个子系统镜像对应不同的第一密钥因子,目标子系统镜像的第一密钥因子可以是除去目标密钥因子之外的任意值,第一预设值可以是任意不同于目标解密密钥的数值。In a feasible implementation, after the processing unit 101 runs the target image plaintext, the processing unit 101 overwrites the target key factor with the first key factor; the security engine 102 can clear the generated target decryption key, or use the target key factor The security decryption key of the subsystem image or the first preset value covers the target decryption key, and the security decryption key is generated according to the first key factor and the first key information. It should be noted that each subsystem image corresponds to a different first key factor, the first key factor of the target subsystem image can be any value except the target key factor, and the first preset value can be any different from the target key factor. The numerical value of the decryption key.
可以看出,在本申请实施例中,通过利用第一密钥因子覆盖目标密钥因子,可以防止目标密钥因子留到下一个子系统镜像加载的过程中,确保每个子系统镜像密钥因子的独立性和安全性,从而保证了操作系统镜像的安全性;同时,在利用目标解密密钥对目标子系统镜像进行解密后,将目标解密密钥清除或覆盖,可以防止目标解密密钥泄露后被利用来解密系统镜像,从而进一步保证了操作系统镜像的安全性。It can be seen that, in the embodiment of the present application, by using the first key factor to cover the target key factor, the target key factor can be prevented from being left in the process of loading the next subsystem image, ensuring that each subsystem image key factor is This ensures the security of the operating system image; at the same time, after decrypting the target subsystem image with the target decryption key, clearing or overwriting the target decryption key can prevent the target decryption key from leaking. It is then used to decrypt the system image, thereby further ensuring the security of the operating system image.
在一种可行的实施方式中,上述多个子系统镜像包括第一子系统镜像和第二子系统镜像;在操作系统的启动过程中,第一子系统镜像被解密一次,第二子系统镜像被解密多次。请参见图5,图5为本申请实施例提供的一种移动终端设备的操作系统的子系统镜像的层级划分示意图。如图5所示,第一层、第二层和第三层的子系统镜像在操作系统启动过程中加载一次,为第一子系统镜像,第四层的子系统镜像在操作系统启动过程中加载多次,为第二子系统镜像。第二子系统镜像具体的加载次数由实际的应用场景确定,例如,当图5所示的终端设备为手机时,在Lowpower镜像加载完成后,其Modem镜像开始进行加载,加载完毕后,手机具有通信功能,当用户将手机开启飞行模式后,通信功能不可用,当用户关闭飞行模式后,Modem镜像再次进行加载,手机的通信功能恢复,在此种场景下,Modem镜像进行两次加载;同理,对于ISP镜像,当用户启用手机上的相机时,ISP镜像开始进行加载,此时,终端设备具有视频录制或拍照功能,当用户关闭相机程序后,视频录制或拍照功能不可用,当用户再次开启相机时,ISP镜像会再次进行加载。应当理解,对于第二子系统镜像,其每次加载过程中使用的密钥因子相同。In a feasible implementation manner, the above-mentioned multiple subsystem images include a first subsystem image and a second subsystem image; during the startup process of the operating system, the first subsystem image is decrypted once, and the second subsystem image is decrypted once. Decrypt multiple times. Referring to FIG. 5 , FIG. 5 is a schematic diagram of hierarchical division of a subsystem image of an operating system of a mobile terminal device according to an embodiment of the present application. As shown in Figure 5, the subsystem images of the first layer, the second layer and the third layer are loaded once during the operating system startup process, which is the first subsystem image, and the subsystem image of the fourth layer is loaded during the operating system startup process. Loaded multiple times to mirror the second subsystem. The specific loading times of the second subsystem image is determined by the actual application scenario. For example, when the terminal device shown in Figure 5 is a mobile phone, after the Lowpower image is loaded, its Modem image starts to be loaded. After the loading is completed, the mobile phone has Communication function, when the user turns on the mobile phone in airplane mode, the communication function is unavailable. When the user turns off the airplane mode, the Modem image is loaded again, and the communication function of the mobile phone is restored. In this scenario, the Modem image is loaded twice; the same For ISP mirroring, when the user enables the camera on the mobile phone, the ISP mirroring starts to load. At this time, the terminal device has the function of video recording or photographing. When the user closes the camera program, the video recording or photographing function is unavailable. When the camera is turned on again, the ISP mirroring will be loaded again. It should be understood that for the second subsystem image, the key factor used in each loading process is the same.
应当理解,图5所示的子系统镜像的层级划分只是本申请实施例给出的一个具体实例, 第一子系统镜像和第二子系统镜像的加载顺序根据具体场景或终端设备确定。It should be understood that the hierarchical division of the subsystem images shown in FIG. 5 is only a specific example given by the embodiment of the present application, and the loading order of the first subsystem image and the second subsystem image is determined according to specific scenarios or terminal devices.
在一种可行的实施方式中,安全处理装置10还可以包括第四存储单元106,用于为目标镜像明文的运行提供存储空间。可选地,第四存储单元106可以是随机存取存储器RAM或掉电易失性存储设备,如静态随机存取存储器SRAM、动态随机存取存储器DRAM或同步动态随机存储器SDRAM、双倍速率SDRAM等。第四存储单元106用于提供数据或指令运行所需的空间。In a feasible implementation manner, the security processing apparatus 10 may further include a fourth storage unit 106 for providing storage space for running the plaintext of the target image. Optionally, the fourth storage unit 106 may be a random access memory RAM or a power-down volatile storage device, such as static random access memory SRAM, dynamic random access memory DRAM or synchronous dynamic random access memory SDRAM, double rate SDRAM Wait. The fourth storage unit 106 is used to provide the space required for the execution of data or instructions.
在一种可行的实施方式中,安全处理装置10还可以包括第五存储单元107,当目标子系统镜像为第一子系统镜像时,第五存储单元107用于备份第二存储单元104中的数据。进一步地,当目标子系统镜像为第一子系统镜像时,第二存储单元104中的数据可以采用单调递增或单调递减的方式进行变化,即第二存储单元104中写入的数据只能比其当前存储的数据大或者小,此时,第五存储单元107可以用于备份第二存储单元104中的数据;当目标子系统镜像为第二子系统镜像时,第二存储单元104中写入的数据可以是任意指定的值,不受其当前其存储数据的影响,此种情况下,第五存储单元107中的数据保持不变。可选地,第五存储单元107可以是与第二存储单元104相同的存储器。In a feasible implementation manner, the security processing apparatus 10 may further include a fifth storage unit 107 , when the target subsystem image is the first subsystem image, the fifth storage unit 107 is used to back up the data in the second storage unit 104 data. Further, when the target subsystem mirror is the first subsystem mirror, the data in the second storage unit 104 can be changed in a monotonically increasing or monotonically decreasing manner, that is, the data written in the second storage unit 104 can only be The currently stored data is large or small. At this time, the fifth storage unit 107 can be used to back up the data in the second storage unit 104; when the target subsystem image is the second subsystem image, the second storage unit 104 writes The entered data can be any specified value, and is not affected by the current stored data. In this case, the data in the fifth storage unit 107 remains unchanged. Optionally, the fifth storage unit 107 may be the same memory as the second storage unit 104 .
请参见图6,图6是本申请实施例提供的又一种操作系统的子系统镜像的层级划分示意图。图6可以是监控器的操作系统镜像的子系统镜像层级划分示意图,监控器在其开机时即开启视频录制功能,因而其ISP镜像的优先级较高,其ISP镜像被部署到图6中所示的第二层进行加载,以便尽早开启视频录制功能。如图6所示,该操作系统包含N层子系统镜像:第一层子系统镜像(Layer0:ROM镜像);第二层子系统镜像包括Layer1-0:Bootloader镜像和Layer1-1:图像信号处理ISP镜像;第三层子系统镜像包括Layer2-0:富执行环境REE镜像、Layer2-1:可信执行环境TEE镜像和Layer2-2:Lowpower镜像;第四层子系统镜像(Layer3:Modem镜像);第F层子系统镜像(包含的具体子系统镜像未示出);第N-1层镜像包括M+1个子系统镜像,其中,从第五层到第N-1层所包含的子系统镜像未示出,N和M为正整数。Referring to FIG. 6 , FIG. 6 is a schematic diagram of hierarchical division of another subsystem image of an operating system provided by an embodiment of the present application. FIG. 6 may be a schematic diagram of the subsystem image level division of the operating system image of the monitor. The monitor starts the video recording function when it is powered on, so its ISP image has a higher priority, and its ISP image is deployed to the image in FIG. 6 . The second layer shown is loaded so that the video recording function can be turned on as soon as possible. As shown in Figure 6, the operating system includes N-layer subsystem images: the first-layer subsystem image (Layer0: ROM image); the second-layer subsystem image includes Layer1-0: Bootloader image and Layer1-1: Image signal processing ISP mirror; Layer 3 subsystem mirrors include Layer2-0: Rich Execution Environment REE mirror, Layer2-1: Trusted Execution Environment TEE mirror and Layer2-2: Lowpower mirror; Layer 4 subsystem mirror (Layer3: Modem mirror) ; F layer subsystem image (contained specific subsystem images are not shown); N-1 layer image includes M+1 subsystem images, wherein, from the fifth layer to the subsystems included in the N-1 layer Mirrors are not shown, and N and M are positive integers.
下面将以图6为例,详细描述在一种可行的实施方式中,操作系统的启动过程:(1)处理单元101首先获取ROM镜像,并运行该ROM镜像,ROM镜像是固化在SOC内部的第一个子系统镜像,以明文的方式存储;第四存储单元106为ROM镜像的运行提供存储空间。The following will take FIG. 6 as an example to describe in detail the startup process of the operating system in a feasible implementation manner: (1) The processing unit 101 first obtains a ROM image, and runs the ROM image, which is solidified inside the SOC. The first subsystem image is stored in plaintext; the fourth storage unit 106 provides storage space for the operation of the ROM image.
(2)在处理单元101运行ROM镜像的明文后,处理单元101从第三存储单元105中获取Bootloader镜像,将Bootloader镜像存储于第四存储单元106中,处理单元101驱动安全引擎102从第四存储单元106中获取Bootloader镜像;安全引擎102从第一存储单元103中获取第一密钥信息,若此时的第一密钥信息包含生命周期状态LCS,且LCS为SM时,安全引擎102需要对Bootloader镜像对应的安全证书链进行校验;安全引擎102从第三存储单元105中获取Bootloader镜像的安全证书链,并将其存储于第四存储单元106后,安全引擎102开始对Bootloader镜像的安全证书链进行校验;在Bootloader镜像的安全证书链校验通过后,处理单元101从Bootloader镜像的安全证书链中或ROM镜像中获取Bootloader镜像的密钥因子,并将其配置到第二存储单元104中;安全引擎102通过硬线方 式从第二存储单元104中获取Bootloader镜像的密钥因子,并根据Bootloader镜像的密钥因子和第一密钥信息生成Bootloader镜像的解密密钥;安全引擎102利用Bootloader镜像的解密密钥对Bootloader镜像进行解密,得到Bootloader镜像的明文;处理单元101运行Bootloader镜像明文,第四存储单元106为Bootloader镜像的运行提供存储空间。(2) After the processing unit 101 runs the plaintext of the ROM image, the processing unit 101 acquires the Bootloader image from the third storage unit 105, stores the Bootloader image in the fourth storage unit 106, and the processing unit 101 drives the security engine 102 from the fourth storage unit 106. Obtain the Bootloader image from the storage unit 106; the security engine 102 obtains the first key information from the first storage unit 103, if the first key information at this time includes the life cycle state LCS, and the LCS is SM, the security engine 102 needs Verify the safety certificate chain corresponding to the Bootloader image; the safety engine 102 obtains the safety certificate chain of the Bootloader image from the third storage unit 105 and stores it in the fourth storage unit 106, and the safety engine 102 starts to verify the Bootloader image. The safety certificate chain is verified; after the verification of the safety certificate chain of the Bootloader image is passed, the processing unit 101 obtains the key factor of the Bootloader image from the safety certificate chain of the Bootloader image or the ROM image, and configures it into the second storage In unit 104; the security engine 102 obtains the key factor of the Bootloader image from the second storage unit 104 by hard-wired, and generates the decryption key of the Bootloader image according to the key factor of the Bootloader image and the first key information; the security engine 102 decrypts the bootloader image by using the decryption key of the bootloader image to obtain the plaintext of the bootloader image; the processing unit 101 runs the plaintext of the bootloader image, and the fourth storage unit 106 provides storage space for the operation of the bootloader image.
上述以ROM镜像和Bootloader镜像为例,详细介绍了其加载的具体过程,对于后续需要解密的各子系统镜,其按照图6所示的顺序逐个进行加载,此处不再赘述。The above takes the ROM image and the Bootloader image as examples to describe the specific loading process in detail. For each subsystem mirror that needs to be decrypted later, it is loaded one by one according to the sequence shown in FIG. 6 , which will not be repeated here.
请参见图4,图4为操作系统子系统镜像的密钥因子的配置流程示意图。下面将参考图4描述操作系统启动过程中第二存储单元104和第五存储单元107中数据的变化过程。在一种可行的实施方式中,第二存储单元104和第五存储单元107可以为寄存器,且在目标子系统镜像为第一子系统镜像的情况下,第二存储单元104中数据采用单调递增方式进行变化;当处理单元101配置第二存储单元104每次进行单调递增时,第二存储单元104中数据在当前数据的基础上增加预设值K,其中,预设值K可以是任意大于0的正整数。如图4所示,图4中包括三个子系统镜像,A子系统镜像和C子系统镜像为第一子系统镜像,B子系统镜像为第二子系统镜像。下面将详细描述上述三个子系统镜像依次加载过程中,第二存储单元104和第五存储单元107中数据的变化过程:Please refer to FIG. 4 . FIG. 4 is a schematic diagram of the configuration flow of the key factor of the operating system subsystem image. The process of changing data in the second storage unit 104 and the fifth storage unit 107 during the operating system startup process will be described below with reference to FIG. 4 . In a feasible implementation manner, the second storage unit 104 and the fifth storage unit 107 may be registers, and when the target subsystem mirror is the first subsystem mirror, the data in the second storage unit 104 is monotonically increasing When the processing unit 101 configures the second storage unit 104 to monotonically increase each time, the data in the second storage unit 104 is increased by a preset value K based on the current data, where the preset value K can be arbitrarily larger than A positive integer of 0. As shown in FIG. 4 , FIG. 4 includes three subsystem images, the A subsystem image and the C subsystem image are the first subsystem image, and the B subsystem image is the second subsystem image. The following will describe in detail the process of changing data in the second storage unit 104 and the fifth storage unit 107 during the sequential loading process of the above three subsystem images:
(1)当A子系统镜像为当前正在加载的子系统镜像时,此时的A子系统镜像也可称为目标子系统镜像。在处理单元101开始加载A子系统镜像时,第二存储单元104和第五存储单元107中存储的数据为上一个子系统镜像加载过程中保存的第一密钥因子。处理单元101首先将该上一个子系统镜像第五存储单元107中的第一密钥因子取出,加上nK,得到A子系统镜像对应的第二密钥因子,将该A子系统镜像的第二密钥因子写入第二存储单元104和第五存储单元107,n为大于0的正整数;其中,当A子系统镜像的上一个子系统镜像为第一子系统镜像时,该上一个子系统镜像的第二存储单元104和第五存储单元107中的第一密钥因子相同;当A子系统镜像的上一个子系统镜像为第二子系统镜像时,该上一个子系统镜像的第二存储单元104和第五存储单元107中的第一密钥因子不同。(1) When the A subsystem image is the currently loaded subsystem image, the A subsystem image at this time may also be called the target subsystem image. When the processing unit 101 starts to load the A subsystem image, the data stored in the second storage unit 104 and the fifth storage unit 107 is the first key factor saved in the previous subsystem image loading process. The processing unit 101 first takes out the first key factor in the fifth storage unit 107 of the previous subsystem image, adds nK to obtain the second key factor corresponding to the A subsystem image, and the first key factor of the A subsystem image. The second key factor is written into the second storage unit 104 and the fifth storage unit 107, and n is a positive integer greater than 0; wherein, when the previous subsystem mirror of the A subsystem mirror is the first subsystem mirror, the previous The first key factor in the second storage unit 104 and the fifth storage unit 107 of the subsystem mirror is the same; when the previous subsystem mirror of the A subsystem mirror is the second subsystem mirror, the The first key factors in the second storage unit 104 and the fifth storage unit 107 are different.
在处理单元101向第二存储单元104和第五存储单元107中写入A子系统镜像的第二密钥因子后,处理单元101根据A子系统镜像的第二密钥因子和A子系统镜像的目标密钥因子之间的差值配置第二存储单元104进行单调递增,每次递增上述预设值K,直到第二存储单元104中的值递增为A子系统镜像的目标密钥因子,此时,处理单元101还可以将A子系统镜像的目标密钥因子写入第五存储单元107中。举例来说,若A子系统镜像的第二密钥因子为6,目标密钥因子为12,K为2,处理单元101可以驱动第二存储单元104进行三次单调递增,每次递增2,直到第二存储单元104中的数值变为A子系统镜像的目标密钥因子12。在处理单元101运行A子系统镜像的镜像明文后,处理单元101利用A子系统镜像的第一密钥因子覆盖第二存储单元104和第五存储单元107中A子系统镜像的目标密钥因子,具体地,处理单元101根据A子系统镜像的第一密钥因子和A子系统镜像的目标密钥因子之间的差值配置第二存储单元104进行单调递增,直到第二存储单元104中的数值递增为A子系统镜像的第一密钥因子,处理单元101同时将A子系统镜像的第一密钥因子写入第五存储单元107中。After the processing unit 101 writes the second key factor of the A subsystem image into the second storage unit 104 and the fifth storage unit 107, the processing unit 101 writes the second key factor of the A subsystem image and the A subsystem image according to the second key factor of the A subsystem image and the A subsystem image. The difference between the target key factors of the second storage unit 104 is configured to monotonically increase, and the above-mentioned preset value K is incremented each time, until the value in the second storage unit 104 is incremented to the target key factor of the A subsystem image, At this time, the processing unit 101 may also write the target key factor of the A subsystem image into the fifth storage unit 107 . For example, if the second key factor of the A subsystem image is 6, the target key factor is 12, and K is 2, the processing unit 101 can drive the second storage unit 104 to monotonically increase three times, each time increasing by 2, until The value in the second storage unit 104 becomes the target key factor 12 of the A subsystem mirror. After the processing unit 101 runs the image plaintext of the A subsystem image, the processing unit 101 uses the first key factor of the A subsystem image to overwrite the target key factor of the A subsystem image in the second storage unit 104 and the fifth storage unit 107 , specifically, the processing unit 101 configures the second storage unit 104 to monotonically increase according to the difference between the first key factor of the A subsystem image and the target key factor of the A subsystem image, until the second storage unit 104 The value of is incremented to the first key factor of the A subsystem image, and the processing unit 101 simultaneously writes the first key factor of the A subsystem image into the fifth storage unit 107 .
(2)当处理单元101开始加载B子系统镜像时,B子系统镜像此时也可称为目标子系统镜像。由于B子系统镜像为第二子系统镜像,此时,处理单元101直接将B子系统镜像的目标密钥因子写入第二存储单元104中,第五存储单元107中的数据保持不变,为A子系统镜像的第一密钥因子。例如,若A子系统镜像对应的第一密钥因子为16,B子系统镜像的目标密钥因子为10,此时,处理单元101将B子系统镜像的目标密钥因子10写入第二存储单元104中,第五存储单元107中的数据保持不变,仍为A子系统镜像的第一密钥因子16。在处理单元101运行B子系统镜像的镜像明文后,处理单元101将B子系统镜像的第一密钥因子写入第二存储单元104中,以覆盖B子系统镜像的目标密钥因子,第五存储单元107中的数据保持不变,为A子系统镜像的第一密钥因子;其中,B子系统镜像的第一密钥因子可以是除B子系统镜像的目标密钥因子之外的任意值。(2) When the processing unit 101 starts to load the B subsystem image, the B subsystem image may also be called the target subsystem image at this time. Since the B subsystem image is the second subsystem image, the processing unit 101 directly writes the target key factor of the B subsystem image into the second storage unit 104, and the data in the fifth storage unit 107 remains unchanged. is the first key factor of the A subsystem image. For example, if the first key factor corresponding to the A subsystem image is 16, and the target key factor of the B subsystem image is 10, at this time, the processing unit 101 writes the target key factor 10 of the B subsystem image into the second key factor In the storage unit 104, the data in the fifth storage unit 107 remains unchanged, and is still the first key factor 16 of the A subsystem image. After the processing unit 101 runs the image plaintext of the B subsystem image, the processing unit 101 writes the first key factor of the B subsystem image into the second storage unit 104 to cover the target key factor of the B subsystem image. The data in the fifth storage unit 107 remains unchanged, and is the first key factor of the mirror image of the A subsystem; wherein, the first key factor of the mirror image of the B subsystem can be other than the target key factor of the mirror image of the B subsystem any value.
(3)当处理单元101开始加载C子系统镜像时,此时的C子系统镜像也可称为目标子系统镜像。由于C子系统镜像为第一子系统镜像,由上述B子系统镜像的加载过程可知,此时第二存储单元104中存储的为B子系统镜像的第一密钥因子,第五存储单元107中存储的是A子系统镜像的第一密钥因子。后续处理单元101配置C子系统镜像的目标密钥因子的步骤与A子系统镜像加载过程中对应的步骤相同,此处不再赘述。(3) When the processing unit 101 starts to load the C subsystem image, the C subsystem image at this time may also be called the target subsystem image. Since the C subsystem image is the first subsystem image, it can be known from the above loading process of the B subsystem image that the second storage unit 104 stores the first key factor of the B subsystem image, and the fifth storage unit 107 stores the first key factor of the B subsystem image. Stored in is the first key factor of the A subsystem image. The steps for the subsequent processing unit 101 to configure the target key factor of the C subsystem image are the same as the corresponding steps in the A subsystem image loading process, which will not be repeated here.
需要注意的是,在B子系统镜像加载过程中第五存储单元107中数据保持不变,为A子系统镜像的第一密钥因子,当C子系统镜像开始加载时,处理单元101将第五存储单元107中A子系统镜像的第一密钥因子取出,加上mK,得到C子系统镜像的第二密钥因子,并将该C子系统镜像的第二密钥因子分别写入第二存储单元104和第五存储单元107中,m为大于0的正整数;然后在该C子系统镜像的第二密钥因子的基础上,处理单元101开始配置第二存储单元104以单调递增地方式进行数据变化。It should be noted that during the loading process of the B subsystem image, the data in the fifth storage unit 107 remains unchanged, which is the first key factor of the A subsystem image. When the C subsystem image starts to be loaded, the processing unit 101 stores the first key factor. The first key factor of the mirror image of the A subsystem in the fifth storage unit 107 is taken out, and mK is added to obtain the second key factor of the mirror image of the C subsystem, and the second key factor of the mirror image of the C subsystem is written into the In the second storage unit 104 and the fifth storage unit 107, m is a positive integer greater than 0; then on the basis of the second key factor of the C subsystem image, the processing unit 101 begins to configure the second storage unit 104 to monotonically increase data changes locally.
可以看出,在本申请实施例中,通过第五存储单元107备份第二存储单元104中的数据,在多个非连续的第一子系统镜像的加载过程中,各子系统镜像的密钥因子可以连续地单调递增,已加载的第一子系统镜像的密钥因子在后续第一子系统镜像的加载过程中不会再出现,可以有效地防止密钥因子泄露,提升操作系统启动中系统镜像的安全性。It can be seen that in this embodiment of the present application, the data in the second storage unit 104 is backed up by the fifth storage unit 107, and during the loading process of multiple non-consecutive first subsystem images, the keys of each subsystem image The factor can be continuously monotonically increased, and the key factor of the loaded first subsystem image will not appear again in the subsequent loading process of the first subsystem image, which can effectively prevent the leakage of the key factor and improve the system during the startup of the operating system. Mirror security.
应当理解,上述第二存储单元104采用单调递增的方式来存储各子系统镜像的密钥因子,是为了保证各子系统镜像的密钥因子不同,从而确保不同的子系统镜像对应不同的解密密钥,以及不同的子系统镜像采用不同解密密钥进行解密。同时,上述单调递增的方式只是本申请实施例所列举的一种示例,本领域的技术人员也可采用其它的方式,例如单调递减等,来确保不同的子系统镜像对应不同的密钥因子,从而使得不同的子系统镜像采用不同的解密密钥进行解密,本申请实施例对此不做具体限定。It should be understood that the above-mentioned second storage unit 104 stores the key factors of each subsystem image in a monotonically increasing manner, in order to ensure that the key factors of each subsystem image are different, thereby ensuring that different subsystem images correspond to different decryption encryption keys. key, and different subsystem images use different decryption keys for decryption. Meanwhile, the above-mentioned monotonically increasing manner is only an example listed in the embodiment of the present application, and those skilled in the art may also adopt other manners, such as monotonically decreasing manner, to ensure that different subsystem images correspond to different key factors, Therefore, different subsystem images are decrypted using different decryption keys, which is not specifically limited in this embodiment of the present application.
在一种可能的实现方式中,请参见图3,图3是本发明实施例提供的又一种安全处理装置10的结构示意图,作为对图1或图2中的安全处理装置10中部分功能模块的细化。如图3所示,安全引擎102可以包括第一引擎1021、密钥管理模块1022和第二引擎1023。第一引擎1021用于对目标子系统镜像的目标安全证书链进行校验。密钥管理模块1022用于对第一密钥信息中的根密钥密文进行解密,得到根密钥明文;然后对LCS、ROTPK哈希值、运营商信息、产品信息中的至少一个和目标密钥因子进行拼接,得到一个派生因子;最后,基于KDF,根据根密钥明文和派生因子得到目标子系统镜像的目标解密密钥。第二 引擎1023用于获取目标子系统镜像和目标解密密钥,并利用目标解密密钥对目标子系统镜像进行解密,得到目标镜像明文。In a possible implementation manner, please refer to FIG. 3 . FIG. 3 is a schematic structural diagram of yet another security processing device 10 provided by an embodiment of the present invention, as a partial function of the security processing device 10 in FIG. 1 or FIG. 2 . Refinement of modules. As shown in FIG. 3 , the security engine 102 may include a first engine 1021 , a key management module 1022 and a second engine 1023 . The first engine 1021 is configured to verify the target security certificate chain of the target subsystem image. The key management module 1022 is used to decrypt the root key ciphertext in the first key information to obtain the root key plaintext; then at least one of LCS, ROTPK hash value, operator information, product information and the target The key factors are spliced to obtain a derivation factor; finally, based on the KDF, the target decryption key of the target subsystem image is obtained according to the root key plaintext and the derivation factor. The second engine 1023 is configured to obtain the target subsystem image and the target decryption key, and use the target decryption key to decrypt the target subsystem image to obtain the target image plaintext.
请参见图8,图8是本发明实施例提供的一种安全处理方法的流程示意图,该安全处理方法,适用于上述图1-图3中的任意一种安全处理装置以及包含上述安全处理装置的设备。该方法可以包括以下步骤S801-步骤S803,其中,步骤S801:通过处理单元分别获取用于操作系统启动的操作系统镜像的多个子系统镜像。步骤S802:由第一存储单元存储操作系统镜像的第一密钥信息,该第一密钥信息包括根密钥密文、生命周期状态LCS、可信根公钥ROTPK哈希值,运营商信息或产品信息中的至少一个。步骤S803:由第二存储单元存储上述多个子系统镜像中目标子系统镜像的目标密钥因子;在上述多个子系统镜像中,一个子系统镜像对应一个密钥因子,不同子系统镜像的密钥因子不同。步骤S804:由安全引擎根据第一密钥信息和目标密钥因子生成目标子系统镜像的目标解密密钥;并利用目标解密密钥对目标子系统镜像进行解密,以得到目标子系统镜像的目标镜像明文。步骤S805:由处理单元运行目标镜像明文。Please refer to FIG. 8. FIG. 8 is a schematic flowchart of a security processing method provided by an embodiment of the present invention. The security processing method is applicable to any security processing device in the above-mentioned FIG. 1 to FIG. 3 and including the above-mentioned security processing device. device of. The method may include the following steps S801-S803, wherein, in step S801, a processing unit is used to separately acquire a plurality of subsystem images of an operating system image used for operating the operating system. Step S802: the first storage unit stores the first key information of the operating system image, where the first key information includes the root key ciphertext, the life cycle state LCS, the root-of-trust public key ROTPK hash value, and the operator information or at least one of Product Information. Step S803: the second storage unit stores the target key factor of the target subsystem image in the multiple subsystem images; in the multiple subsystem images, one subsystem image corresponds to one key factor, and the keys of different subsystem images factors are different. Step S804: the security engine generates the target decryption key of the target subsystem image according to the first key information and the target key factor; and uses the target decryption key to decrypt the target subsystem image to obtain the target of the target subsystem image. Mirror plaintext. Step S805: Run the target image plaintext by the processing unit.
在一种可行的实施方式中,上述方法还包括:在上述安全引擎对目标子系统镜像进行解密以得到目标镜像明文后,由安全引擎继续对下一个子系统镜像进行解密以得到该下一个子系统镜像的下一个镜像明文,该下一个子系统镜像是在上述多个子系统镜像中所述目标子系统镜像的后续子系统镜像。In a feasible implementation manner, the method further includes: after the security engine decrypts the target subsystem image to obtain the plaintext of the target image, the security engine continues to decrypt the next subsystem image to obtain the next sub-system image. The next image plaintext of the system image, where the next subsystem image is the subsequent subsystem image of the target subsystem image in the above-mentioned multiple subsystem images.
在一种可行的实施方式中,上述通过处理单元分别获取用于操作系统启动的操作系统镜像的多个子系统镜像包括:由处理单元从上述多个子系统镜像中获取目标子系统镜像;在运行目标镜像明文后,由处理单元继续从上述多个子系统镜像中获取下一个子系统镜像;上述由处理单元运行所述目标镜像明文之后,安全处理方法还包括:运行下一个镜像明文。In a feasible implementation manner, the above-mentioned obtaining, by the processing unit, the multiple subsystem images of the operating system image used for starting the operating system respectively includes: obtaining, by the processing unit, the target subsystem image from the above-mentioned multiple subsystem images; After mirroring the plaintext, the processing unit continues to obtain the next subsystem mirror from the multiple subsystem mirrors; after the processing unit runs the target mirroring plaintext, the security processing method further includes: running the next mirroring plaintext.
在一种可行的实施方式中,上述方法还包括:由处理单元获取目标子系统镜像的目标安全证书链;在上述多个子系统镜像中,一个子系统镜像对应一个安全证书链;由处理单元从目标安全证书链或已解密的镜像明文中获取目标密钥因子,并将目标密钥因子配置到第二存储单元。In a feasible implementation manner, the above method further includes: acquiring, by the processing unit, a target security certificate chain of the target subsystem image; among the above-mentioned multiple subsystem images, one subsystem image corresponds to one security certificate chain; Obtain the target key factor from the target security certificate chain or the decrypted image plaintext, and configure the target key factor to the second storage unit.
在一种可行的实施方式中,上述由安全引擎根据第一密钥信息和目标密钥因子生成目标子系统镜像的目标解密密钥,包括:对根密钥密文进行解密,得到根密钥明文;根据LCS、ROTPK哈希值,目标密钥因子、运营商信息和产品信息中的一个或多个进行拼接,得到派生因子;基于派生因子和根密钥明文生成目标子系统镜像的目标解密密钥。In a feasible implementation manner, generating the target decryption key of the target subsystem image by the security engine according to the first key information and the target key factor includes: decrypting the ciphertext of the root key to obtain the root key Plaintext; splicing one or more of the LCS, ROTPK hash value, target key factor, operator information and product information to obtain the derivation factor; based on the derivation factor and the root key plaintext to generate the target decryption of the target subsystem image key.
在一种可行的实施方式中,上述方法还包括:由第三存储单元存储上述多个子系统镜像和与上述多个子系统镜像分别对应的多个安全证书链。In a feasible implementation manner, the above-mentioned method further includes: storing, by a third storage unit, the above-mentioned multiple subsystem images and multiple security certificate chains corresponding to the above-mentioned multiple subsystem images respectively.
在一种可行的实施方式中,在上述得到目标子系统镜像的目标镜像明文之后,上述方法还包括:由处理单元利用第一密钥因子覆盖目标子系统镜像的目标密钥因子;由安全引擎清除所述目标解密密钥;或利用目标子系统镜像的安全解密密钥或第一预设值覆盖目标解密密钥,该安全解密密钥根据第一密钥因子和第一密钥信息生成。In a feasible implementation manner, after obtaining the target image plaintext of the target subsystem image, the method further includes: the processing unit overwrites the target key factor of the target subsystem image with the first key factor; Clearing the target decryption key; or overwriting the target decryption key with the security decryption key of the target subsystem image or the first preset value, where the security decryption key is generated according to the first key factor and the first key information.
在一种可行的实施方式中,上述多个子系统镜像包括第一子系统镜像和第二子系统镜像;在操作系统启动中,第一子系统镜像被解密一次,第二子系统镜像被解密多次。In a feasible implementation manner, the above-mentioned multiple subsystem images include a first subsystem image and a second subsystem image; during the startup of the operating system, the first subsystem image is decrypted once, and the second subsystem image is decrypted many times. Second-rate.
在一种可行的实施方式中,上述方法还包括:由第四存储单元为目标镜像明文的运行提供存储空间。In a feasible implementation manner, the above method further includes: providing, by the fourth storage unit, a storage space for running the plaintext of the target image.
需要说明的是,本申请实施例中所描述的安全处理方法的具体流程,可参见上述图1-图3中所述的申请实施例中的相关描述,此处不再赘述。It should be noted that, for the specific flow of the security processing method described in the embodiments of the present application, reference may be made to the relevant descriptions in the application embodiments described in the foregoing FIG. 1 to FIG. 3 , and details are not repeated here.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有计算机程序,当该计算机程序中的部分程序被处理单元101执行时,使得处理单元101可以执行如上述方法实施例中记载的由处理单元101所实现的任意一种的部分或全部步骤;当该计算机程序中的部分程序被处理单元101执行时,还可使得处理单元101驱动安全引擎102执行如上述方法实施例中记载的由安全引擎102所实现的任意一种的部分或全部步骤。其中,上述计算机存储介质可以是本申请实施例中的第三存储单元105,或用于存储ROM镜像的只读存储单元。The embodiment of the present application further provides a computer storage medium, wherein the computer storage medium can store a computer program, when part of the program in the computer program is executed by the processing unit 101, the processing unit 101 can execute the above method embodiments Part or all of any one of the steps implemented by the processing unit 101 described in; when part of the program in the computer program is executed by the processing unit 101, the processing unit 101 can also be caused to drive the security engine 102 to execute the above method embodiments Some or all of any of the steps described in and implemented by the security engine 102. The above-mentioned computer storage medium may be the third storage unit 105 in the embodiment of the present application, or a read-only storage unit for storing a ROM image.
本申请实施例还提供一种计算机程序,该计算机程序包括指令。当该计算机程序中的部分程序被处理单元101执行时,处理单元101可以执行如上述方法实施例中记载的由处理单元101所实现的任意一种的部分或全部步骤;当该计算机程序中的部分程序被处理单元101执行时,还可使得处理单元101驱动安全引擎102执行如上述方法实施例中记载的由安全引擎102所实现的任意一种的部分或全部步骤。Embodiments of the present application also provide a computer program, where the computer program includes instructions. When part of the program in the computer program is executed by the processing unit 101, the processing unit 101 may execute any part or all of the steps implemented by the processing unit 101 as described in the above method embodiments; When part of the program is executed by the processing unit 101, the processing unit 101 may also be caused to drive the security engine 102 to execute any part or all of the steps implemented by the security engine 102 as described in the above method embodiments.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可能可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments. It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with the present application, certain steps may be performed in other orders or concurrently. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical or other forms.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: The technical solutions described in the embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the present application.

Claims (18)

  1. 一种安全处理装置,其特征在于,包括处理单元、安全引擎、第一存储单元和第二存储单元;其中,A security processing device is characterized by comprising a processing unit, a security engine, a first storage unit and a second storage unit; wherein,
    所述处理单元,用于分别获取用于操作系统启动的操作系统镜像的多个子系统镜像;The processing unit is configured to obtain a plurality of subsystem images of the operating system image used for operating system startup respectively;
    所述第一存储单元,用于存储所述操作系统镜像的第一密钥信息,所述第一密钥信息包括根密钥密文、生命周期状态LCS、可信根公钥ROTPK哈希值、运营商信息或产品信息中的至少一个;The first storage unit is used to store the first key information of the operating system image, where the first key information includes the root key ciphertext, the life cycle state LCS, and the root-of-trust public key ROTPK hash value , at least one of carrier information or product information;
    所述第二存储单元,用于存储所述多个子系统镜像中目标子系统镜像的目标密钥因子;在所述多个子系统镜像中,一个子系统镜像对应一个密钥因子,不同子系统镜像的密钥因子不同;The second storage unit is used to store the target key factor of the target subsystem image in the multiple subsystem images; among the multiple subsystem images, one subsystem image corresponds to one key factor, and different subsystem images correspond to one key factor. different key factors;
    所述安全引擎,用于根据所述第一密钥信息和所述目标密钥因子生成所述目标子系统镜像的目标解密密钥;并利用所述目标解密密钥对所述目标子系统镜像进行解密,以得到所述目标子系统镜像的目标镜像明文;The security engine is configured to generate a target decryption key of the target subsystem image according to the first key information and the target key factor; and use the target decryption key to decipher the target subsystem image. Decrypting to obtain the target image plaintext of the target subsystem image;
    所述处理单元,还用于运行所述目标镜像明文。The processing unit is further configured to run the plaintext of the target image.
  2. 根据权利要求1所述的安全处理装置,其特征在于,所述安全引擎,用于在对所述目标子系统镜像进行解密以得到所述目标镜像明文后,继续对下一个子系统镜像进行解密以得到所述下一个子系统镜像的下一个镜像明文,所述下一个子系统镜像是在所述多个子系统镜像中所述目标子系统镜像的后续子系统镜像。The security processing device according to claim 1, wherein the security engine is configured to continue to decrypt the next subsystem image after decrypting the target subsystem image to obtain the target image plaintext to obtain the next image plaintext of the next subsystem image, where the next subsystem image is a subsequent subsystem image of the target subsystem image in the plurality of subsystem images.
  3. 根据权利要求2所述的安全处理装置,其特征在于,所述处理单元,具体用于:The security processing device according to claim 2, wherein the processing unit is specifically configured to:
    在所述多个子系统镜像中获取所述目标子系统镜像;obtaining the target subsystem image from the plurality of subsystem images;
    运行所述目标镜像明文;run the target image plaintext;
    在运行所述目标镜像明文后,继续在所述多个子系统镜像中获取所述下一个子系统镜像;After running the target image plaintext, continue to acquire the next subsystem image from the multiple subsystem images;
    运行所述下一个镜像明文。Run the next image plaintext.
  4. 根据权利要求1-3中任一项所述的安全处理装置,其特征在于,所述处理单元还用于:The security processing device according to any one of claims 1-3, wherein the processing unit is further configured to:
    获取所述目标子系统镜像的目标安全证书链;在所述多个子系统镜像中,一个子系统镜像对应一个安全证书链;obtaining the target security certificate chain of the target subsystem image; among the multiple subsystem images, one subsystem image corresponds to one security certificate chain;
    从所述目标安全证书链或已解密的镜像明文中获取所述目标密钥因子,并将所述目标密钥因子配置到所述第二存储单元,所述已解密的镜像明文是在解密所述目标子系统镜像之前由所述安全引擎解密所述多个子系统镜像中其它子系统镜像得到的。Obtain the target key factor from the target security certificate chain or the decrypted image plaintext, and configure the target key factor to the second storage unit, and the decrypted image plaintext is in the decryption process. The target subsystem image is obtained by decrypting other subsystem images in the plurality of subsystem images by the security engine.
  5. 根据权利要求4所述的安全处理装置,其特征在于,所述安全处理装置还包括:The security processing device according to claim 4, wherein the security processing device further comprises:
    第三存储单元,用于存储所述多个子系统镜像和与所述多个子系统镜像分别对应的多个安全证书链。The third storage unit is configured to store the multiple subsystem images and multiple security certificate chains corresponding to the multiple subsystem images respectively.
  6. 根据权利要求1-5中任一项所述的安全处理装置,其特征在于,所述安全引擎具体用于:The security processing device according to any one of claims 1-5, wherein the security engine is specifically used for:
    对所述根密钥密文进行解密,得到根密钥明文;Decrypt the root key ciphertext to obtain the root key plaintext;
    根据所述LCS、所述ROTPK哈希值、所述目标密钥因子、所述运营商信息或所述产品信息中的至少一个得到派生因子;Obtain a derivation factor according to at least one of the LCS, the ROTPK hash value, the target key factor, the operator information or the product information;
    基于所述派生因子和所述根密钥明文生成所述目标解密密钥。The target decryption key is generated based on the derivation factor and the root key plaintext.
  7. 根据权利要求1-6中所述的安全处理装置,其特征在于,The security processing device according to claims 1-6, characterized in that:
    所述处理单元,还用于在运行所述目标镜像明文后,利用第一密钥因子覆盖所述目标密钥因子;The processing unit is further configured to overwrite the target key factor with the first key factor after running the target image plaintext;
    所述安全引擎,还用于清除所述目标解密密钥;或利用所述目标子系统镜像的安全解密密钥或第一预设值覆盖所述目标解密密钥,所述安全解密密钥根据所述第一密钥因子和所述第一密钥信息生成。The security engine is further configured to clear the target decryption key; or use the security decryption key of the target subsystem image or the first preset value to overwrite the target decryption key, the security decryption key according to The first key factor and the first key information are generated.
  8. 根据权利要求1-7中任一项所述的安全处理装置,其特征在于,所述多个子系统镜像包括第一子系统镜像和第二子系统镜像;The security processing apparatus according to any one of claims 1-7, wherein the plurality of subsystem images include a first subsystem image and a second subsystem image;
    在所述操作系统启动中,所述第一子系统镜像被解密一次,所述第二子系统镜像被解密多次。During the startup of the operating system, the first subsystem image is decrypted once, and the second subsystem image is decrypted multiple times.
  9. 根据权利要求1-8中任一项所述的安全处理装置,其特征在于,所述安全处理装置还包括:The security processing device according to any one of claims 1-8, wherein the security processing device further comprises:
    第四存储单元,用于为所述目标镜像明文的运行提供存储空间。The fourth storage unit is configured to provide storage space for running the plaintext of the target image.
  10. 一种安全处理方法,其特征在于,所述方法包括:A security processing method, characterized in that the method comprises:
    通过处理单元分别获取用于操作系统启动的操作系统镜像的多个子系统镜像;Acquiring, through the processing unit, respectively, multiple subsystem images of the operating system image used for operating the operating system;
    由第一存储单元存储所述操作系统镜像的第一密钥信息,所述第一密钥信息包括根密钥密文、生命周期状态LCS、可信根公钥ROTPK哈希值,运营商信息或产品信息中的至少一个;The first key information of the operating system image is stored by the first storage unit, and the first key information includes the root key ciphertext, the life cycle state LCS, the trusted root public key ROTPK hash value, and operator information or at least one of the product information;
    由第二存储单元存储所述多个子系统镜像中目标子系统镜像的目标密钥因子;在所述多个子系统镜像中,一个子系统镜像对应一个密钥因子,不同子系统镜像的密钥因子不同;The second storage unit stores the target key factor of the target subsystem image in the multiple subsystem images; among the multiple subsystem images, one subsystem image corresponds to one key factor, and the key factors of different subsystem images different;
    由安全引擎根据所述第一密钥信息和所述目标密钥因子生成所述目标子系统镜像的目标解密密钥;并利用所述目标解密密钥对所述目标子系统镜像进行解密,以得到所述目标子系统镜像的目标镜像明文;A target decryption key of the target subsystem image is generated by the security engine according to the first key information and the target key factor; and the target subsystem image is decrypted by using the target decryption key, to obtaining the target image plaintext of the target subsystem image;
    由所述处理单元运行所述目标镜像明文。The target image plaintext is executed by the processing unit.
  11. 根据权利要求10所述的安全处理方法,其特征在于,所述方法还包括:The security processing method according to claim 10, wherein the method further comprises:
    在所述安全引擎对所述目标子系统镜像进行解密以得到所述目标镜像明文后,由所述安全引擎继续对下一个子系统镜像进行解密以得到所述下一个子系统镜像的下一个镜像明文,所述下一个子系统镜像是在所述多个子系统镜像中所述目标子系统镜像的后续子系统镜像。After the security engine decrypts the target subsystem image to obtain the target image plaintext, the security engine continues to decrypt the next subsystem image to obtain the next image of the next subsystem image plaintext, the next subsystem image is a subsequent subsystem image of the target subsystem image among the plurality of subsystem images.
  12. 根据权利要求11所述的安全处理方法,其特征在于,所述通过处理单元分别获取用于操作系统启动的操作系统镜像的多个子系统镜像包括:由所述处理单元从所述多个子系统镜像中获取所述目标子系统镜像;在运行所述目标镜像明文后,由所述处理单元继续从所述多个子系统镜像中获取所述下一个子系统镜像;The security processing method according to claim 11, wherein the obtaining, by the processing unit, respectively, the multiple subsystem images of the operating system image used for operating the operating system comprises: the processing unit mirrors images from the multiple subsystems Obtain the target subsystem image from the system; after running the target image plaintext, the processing unit continues to obtain the next subsystem image from the multiple subsystem images;
    所述由所述处理单元运行所述目标镜像明文之后,所述方法还包括:运行所述下一个镜像明文。After the processing unit runs the target image plaintext, the method further includes: running the next image plaintext.
  13. 根据权利要求10-12中任一项所述的安全处理方法,其特征在于,所述方法还包括:The security processing method according to any one of claims 10-12, wherein the method further comprises:
    由所述处理单元获取所述目标子系统镜像的目标安全证书链;在所述多个子系统镜像中,一个子系统镜像对应一个安全证书链;obtaining the target security certificate chain of the target subsystem image by the processing unit; among the multiple subsystem images, one subsystem image corresponds to one security certificate chain;
    由所述处理单元从所述目标安全证书链或已解密的镜像明文中获取所述目标密钥因子,并将所述目标密钥因子配置到所述第二存储单元。The processing unit obtains the target key factor from the target security certificate chain or the decrypted image plaintext, and configures the target key factor into the second storage unit.
  14. 根据权利要求10-13中任一项所述的安全处理方法,其特征在于,所述由所述安全引擎根据所述第一密钥信息和所述目标密钥因子生成所述目标子系统镜像的目标解密密钥,包括:The security processing method according to any one of claims 10-13, wherein the security engine generates the target subsystem image according to the first key information and the target key factor target decryption key, including:
    对所述根密钥密文进行解密,得到根密钥明文;根据所述LCS、所述ROTPK哈希值,所述目标密钥因子、所述运营商信息和所述产品信息中的一个或多个进行拼接,得到派生因子;基于所述派生因子和所述根密钥明文生成所述目标子系统镜像的目标解密密钥。Decrypt the root key ciphertext to obtain the root key plaintext; according to the LCS, the ROTPK hash value, one of the target key factor, the operator information and the product information or A derivation factor is obtained by splicing a plurality of them, and a target decryption key of the target subsystem image is generated based on the derivation factor and the plaintext of the root key.
  15. 根据权利要求14所述的安全处理方法,其特征在于,所述方法还包括:The security processing method according to claim 14, wherein the method further comprises:
    由第三存储单元存储所述多个子系统镜像和与所述多个子系统镜像分别对应的多个安全证书链。The plurality of subsystem images and the plurality of security certificate chains respectively corresponding to the plurality of subsystem images are stored by the third storage unit.
  16. 根据权利要求10-15中任一项所述的安全处理方法,其特征在于,在所述得到所述目标子系统镜像的目标镜像明文之后,所述方法还包括:The security processing method according to any one of claims 10-15, wherein after obtaining the target image plaintext of the target subsystem image, the method further comprises:
    由所述处理单元利用第一密钥因子覆盖所述目标子系统镜像的目标密钥因子;overwriting the target key factor of the target subsystem image with the first key factor by the processing unit;
    由所述安全引擎清除所述目标解密密钥;或利用所述目标子系统镜像的安全解密密钥或第一预设值覆盖所述目标解密密钥,所述安全解密密钥根据所述第一密钥因子和所述第一密钥信息生成。The target decryption key is cleared by the security engine; or the target decryption key is overwritten with the security decryption key of the target subsystem image or the first preset value, and the security decryption key is based on the first preset value. A key factor and the first key information are generated.
  17. 根据权利要求10-16中任一项所述的安全处理方法,其特征在于,所述多个子系统镜像包括第一子系统镜像和第二子系统镜像;The security processing method according to any one of claims 10-16, wherein the multiple subsystem images include a first subsystem image and a second subsystem image;
    在所述操作系统启动中,所述第一子系统镜像被解密一次,所述第二子系统镜像被解密多次。During the startup of the operating system, the first subsystem image is decrypted once, and the second subsystem image is decrypted multiple times.
  18. 根据权利要求10-17中任一项所述的安全处理方法,其特征在于,所述方法还包括:The security processing method according to any one of claims 10-17, wherein the method further comprises:
    由所述第四存储单元为所述目标镜像明文的运行提供存储空间。The fourth storage unit provides storage space for running the plaintext of the target image.
PCT/CN2020/125977 2020-11-02 2020-11-02 Security processing apparatus, security processing method, and related device WO2022088194A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/125977 WO2022088194A1 (en) 2020-11-02 2020-11-02 Security processing apparatus, security processing method, and related device
CN202080006698.1A CN114731272B (en) 2020-11-02 2020-11-02 Safety processing device, safety processing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/125977 WO2022088194A1 (en) 2020-11-02 2020-11-02 Security processing apparatus, security processing method, and related device

Publications (1)

Publication Number Publication Date
WO2022088194A1 true WO2022088194A1 (en) 2022-05-05

Family

ID=81381677

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125977 WO2022088194A1 (en) 2020-11-02 2020-11-02 Security processing apparatus, security processing method, and related device

Country Status (2)

Country Link
CN (1) CN114731272B (en)
WO (1) WO2022088194A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060015946A1 (en) * 2004-07-16 2006-01-19 Hitachi, Ltd. Method and apparatus for secure data mirroring a storage system
US20160125187A1 (en) * 2014-11-03 2016-05-05 Rubicon Labs, Inc. System and Method for a Renewable Secure Boot
CN107483590A (en) * 2017-08-22 2017-12-15 郑州云海信息技术有限公司 Cloud data system medium cloud management system and method
WO2019075622A1 (en) * 2017-10-16 2019-04-25 华为技术有限公司 Security element and related device
CN109995522A (en) * 2019-03-08 2019-07-09 东南大学 A kind of secure data mirror method with key agreement function

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594568A (en) * 2012-03-23 2012-07-18 南京小网科技有限责任公司 Method for ensuring safety of mobile equipment software mirror image based on multilevel digital certificate
CN110806919B (en) * 2019-09-25 2021-11-02 苏州浪潮智能科技有限公司 Method and system for protecting virtual machine image in cloud environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060015946A1 (en) * 2004-07-16 2006-01-19 Hitachi, Ltd. Method and apparatus for secure data mirroring a storage system
US20160125187A1 (en) * 2014-11-03 2016-05-05 Rubicon Labs, Inc. System and Method for a Renewable Secure Boot
CN107483590A (en) * 2017-08-22 2017-12-15 郑州云海信息技术有限公司 Cloud data system medium cloud management system and method
WO2019075622A1 (en) * 2017-10-16 2019-04-25 华为技术有限公司 Security element and related device
CN109995522A (en) * 2019-03-08 2019-07-09 东南大学 A kind of secure data mirror method with key agreement function

Also Published As

Publication number Publication date
CN114731272A (en) 2022-07-08
CN114731272B (en) 2024-03-26

Similar Documents

Publication Publication Date Title
US10943013B2 (en) Maintaining keys for trusted boot code
US9935945B2 (en) Trusted management controller firmware
US10877806B2 (en) Method and apparatus for securely binding a first processor to a second processor
US8719585B2 (en) Secure update of boot image without knowledge of secure key
US20170372076A1 (en) Technologies for provisioning and managing secure launch enclave with platform firmware
EP3757848A1 (en) Converged cryptographic engine
US20150277930A1 (en) In-system provisioning of firmware for a hardware platform
JP2024050647A (en) Secure verification of firmware
US11320990B2 (en) NVDIMM serial interface for out-of-band management by a baseboard management controller and method therefor
US20220278837A1 (en) System and method for trusted control flow enforcement using derived encryption keys
US11423150B2 (en) System and method for booting processors with encrypted boot image
US11068599B2 (en) Secure initialization using embedded controller (EC) root of trust
US11468200B2 (en) System and method for cryptographically coupling a media controller to a baseboard management controller
WO2015038447A1 (en) Security processing unit with configurable access control
JP2020004390A (en) Automatic verification method and system
US20230342472A1 (en) Computer System, Trusted Function Component, and Running Method
CN116011041B (en) Key management method, data protection method, system, chip and computer equipment
US11354259B1 (en) Computer system configurations based on accessing data elements presented by baseboard management controllers
GB2457172A (en) Securely downloading boot code to a locked system
WO2022088194A1 (en) Security processing apparatus, security processing method, and related device
US11966748B2 (en) Dynamic boot configuration
US20230114687A1 (en) Self-deploying encrypted hard disk, deployment method thereof, self-deploying encrypted hard disk system and boot method thereof
US20240073007A1 (en) Enforcing access control for embedded controller resources and interfaces
US11196832B2 (en) System and method for providing UEFI protocol access control
CN116226872B (en) Safe starting method and device and related device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20959354

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20959354

Country of ref document: EP

Kind code of ref document: A1