WO2016184180A1 - 一种系统安全启动方法及装置 - Google Patents

一种系统安全启动方法及装置 Download PDF

Info

Publication number
WO2016184180A1
WO2016184180A1 PCT/CN2016/073720 CN2016073720W WO2016184180A1 WO 2016184180 A1 WO2016184180 A1 WO 2016184180A1 CN 2016073720 W CN2016073720 W CN 2016073720W WO 2016184180 A1 WO2016184180 A1 WO 2016184180A1
Authority
WO
WIPO (PCT)
Prior art keywords
boot
area
authentication
boot area
information
Prior art date
Application number
PCT/CN2016/073720
Other languages
English (en)
French (fr)
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 中兴通讯股份有限公司
Publication of WO2016184180A1 publication Critical patent/WO2016184180A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/575Secure boot

Definitions

  • the present invention relates to the field of electronic communications, and in particular, to a system security startup method and apparatus.
  • BOOT is usually used to boot the central processor.
  • this startup method since the BOOT program needs to be continuously upgraded, if an unexpected event such as a power outage occurs during the upgrade, the BOOT program will be lost; if the BOOT is Tampering into an illegal BOOT will cause the system to run unsafe programs, increasing the security risks of the system equipment.
  • a safe BOOT module is generally used to safely boot the BOOT to prevent the system from running an illegal BOOT; and the dual BOOT technology is adopted to effectively reduce the risk that the system cannot be started due to BOOT damage.
  • the current security BOOT module generally does not have the function of authenticating dual BOOTs, that is, the security BOOT always authenticates and loads the BOOT from the fixed location of the memory, and cannot load and reserve the standby BOOT from other addresses according to the user requirements; and for the dual BOOT technology, currently large Most solutions use external logic devices (such as EPLD, FPGA, etc.) or multiple storage media (such as registers) to switch between BOOTs, which obviously increases equipment cost, power consumption and PCB area.
  • the invention provides a system security startup method and device, which are used to solve the problem that the prior art cannot realize the double BOOT security authentication and the double BOOT relies excessively on the external device.
  • a system security startup method which divides a storage area into at least two levels of BOOTs: wherein the first level BOOT stores BOOT boot area information, and each level BOOT stores at least two BOOTs. Information about the BOOT area, the method includes:
  • the BOOT boot area obtains control information of the level from the storage information of the i-th BOOT, and selects a BOOT area to be authenticated from the BOOT according to the control information;
  • the method further includes:
  • Boot area loading step the central controller loads the BOOT boot area after authentication.
  • the control information is modified to select other BOOT areas except the selected BOOT area and the BOOT area that fails to be authenticated;
  • the BOOT area is selected according to the modified control information
  • the BOOT boot area authenticates the selected BOOT area
  • the selected BOOT area is authenticated according to the security information.
  • the selected BOOT area is authenticated according to the security information, including:
  • a system security boot device is provided.
  • system security boot device can be built into the central controller (CPU) as a security engine module; it can also be used as a software function to cooperate with the CPU to achieve secure booting of the system.
  • CPU central controller
  • the system safety starting device mainly includes:
  • Storage module generally corresponds to the memory in the embedded system, such as FLASH.
  • the device includes at least two levels of BOOT, and the first level BOOT stores the BOOT boot area information, and each level of the BOOT stores the information of at least two BOOT areas;
  • the acquiring module is configured to: obtain, by the BOOT booting area, control information of the level from the level i BOOT storage information, and select a BOOT area to be authenticated from the level BOOT according to the control information;
  • the apparatus further comprises a boot area loading module:
  • the device further comprises a control module:
  • the BOOT area is selected according to the modified control information
  • the authentication module comprises:
  • An obtaining unit configured to obtain security information of the level BOOT area from the storage module
  • an authentication unit configured to authenticate, by the BOOT boot area, the selected BOOT area according to the security information.
  • the authentication unit is specifically configured to:
  • the invention divides the storage area on the single chip into multiple levels, the first level stores the information of the BOOT boot area; the other level stores the information of at least two BOOT areas.
  • the BOOT boot area obtains control information from the storage information of each level of the BOOT; according to the control information, the BOOT area to be authenticated may be selected, and the selected BOOT area is authenticated and loaded, and if the authentication fails, the BOOT area is Select a BOOT area to be authenticated in the other BOOT areas of the BOOT.
  • the invention can realize the multi-BOOT security authentication function through the software control method without relying on the external logic device, thereby ensuring the reliability of the BOOT and effectively reducing the system failure due to the upgrade BOOT. The risk of starting.
  • FIG. 1 is a schematic flowchart of a system security startup method according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a physical partition structure of a storage area of a multi-level BOOT according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a physical partition structure of a storage area of a dual BOOT according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a system security startup method for a multi-level BOOT according to an embodiment of the present invention
  • FIG. 5 is a flowchart of a method for securely starting a dual BOOT system according to an embodiment of the present invention
  • FIG. 7 is a flowchart of control of a dual BOOT area according to an embodiment of the present invention.
  • FIG. 8 is a flowchart of authentication of a BOOT area according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a system security starting device according to an embodiment of the present invention.
  • the present invention provides a system security startup method, which divides the storage area into at least two levels of BOOT: wherein, the first level BOOT storage BOOT boot area information. Each level of BOOT stores the information of at least two BOOT areas. See Figure 1, which includes the following steps:
  • the BOOT boot area acquires control information of the level from the storage information of the i-th BOOT, and selects a BOOT area to be authenticated from the BOOT according to the control information;
  • the invention divides the storage area on the single chip into multiple levels, the first level stores the information of the BOOT boot area; the other level stores the information of at least two BOOT areas.
  • the BOOT boot area obtains control information from the storage information of each level of the BOOT; according to the control information, the BOOT area to be authenticated may be selected, and the selected BOOT area is authenticated and loaded, and if the authentication fails, the BOOT area is Select a BOOT area to be authenticated in the other BOOT areas of the BOOT.
  • the invention can realize the dual BOOT security authentication function through the software control method without relying on the external logic device, thereby ensuring the reliability of the BOOT.
  • the present invention divides the storage area into at least two levels of BOOTs: wherein the first level BOOT stores BOOT boot area information, and each level BOOT of each level BOOT stores information of at least two BOOT areas.
  • BOOT is divided into BASEBOOT+ BOOT architectures according to different application functions.
  • the BOOT boot area ie, BASEBOOT
  • the BASEBOOT function set should be as small as possible.
  • the physical partition of the flash memory (FLASH) of the multi-level BOOT when the storage area is allocated see FIG.
  • the first level BOOT boot area is sequentially divided on a single memory chip, The primary BOOT zone of the second to Nth stages, the secondary BOOT zone of the second to Nth stages, the BOOT control zone, and the security information zone. among them:
  • the function set of the first level BOOT boot area is as simple and stable as possible, and the function change point is put into other BOOTs to reduce the possibility of the first level BOOT upgrade.
  • the master-slave BOOT area structure is adopted.
  • the main BOOT area is one, and the BOOT area is at least one.
  • the BOOT control area is used to store BOOT control information of each level of BOOT.
  • the BOOT boot area selects the master-slave BOOT area of other levels of BOOT according to the control information.
  • the safety information area stores the safety information of all levels of BOOT and is used for safety certification of each BOOT area.
  • the physical partition of the FLASH of the dual BOOT when the storage area is allocated see FIG.
  • the single memory chip is divided into a first-level BOOT boot area and a second-level master-slave BOOT area.
  • Each level contains corresponding control information and security information.
  • the length of the field of the first level BOOT, the main BOOT area, and the BOOT area is the same.
  • the storage information of the first-level BOOT boot area includes a BASEBOOT version, a public key, a reserved field, and security information.
  • the public key is used for the security certification of the BOOT boot zone to the subsequent BOOT level.
  • the security information is set according to the security BOOT function requirements of the CPU.
  • the security certification of BASEBOOT is authenticated by the security BOOT module of the CPU.
  • the storage information of the primary BOOT area includes: a primary BOOT version, security information, and a save field; the storage information from the BOOT area includes: a BOOT version, a reserved field, security information, and a BOOT control word.
  • the BOOT of other levels except the first level adopts the RSA asymmetric encryption and decryption method, and the private key is saved by the operator or the equipment manufacturer, and cannot be leaked.
  • the public key is part of the BOOT boot area (packaged with BASEBOOT). When the BASEBOOT authentication is passed, the public key is considered to be legal and used for decryption of subsequent BOOTs.
  • the version signature is a signature obtained by hashing (HASH) encryption of the master and slave BOOT area versions by the private key.
  • the BOOT control word is used to select the primary BOOT or the BOOT.
  • the BOOT is divided into multiple levels for storage in the same chip. Therefore, for the working flow chart of multi-level BOOT authentication loading, refer to FIG. 4, after the central controller is started, the first level BASEBOOT is authenticated and loaded; The BOOT selects the BOOT area in each BOOT in order, and authenticates and loads the selected BOOT area until the Nth level BOOT runs successfully. If the selected BOOT area fails to be authenticated, the other BOOT areas of the BOOT are selected for authentication and loading.
  • the system startup method provided in this embodiment, as shown in FIG. 5, specifically includes the following steps:
  • Step 501 After the central controller is started, the BASEBOOT is authenticated, and when the authentication is passed, the first-level BOOT is loaded and run, otherwise the user is notified by resetting or by using a prompt light.
  • the central controller needs to be loaded after the BOOT boot area is authenticated, ensuring the security of the BOOT boot area.
  • Step 502 The first stage BOOT selects the primary and secondary BOOT areas of the second level BOOT according to the dual BOOT control words of the second level BOOT, and sets the dual BOOT area control words.
  • a dual BOOT zone control word is set to select an unselected BOOT zone among the two BOOT zones. After the current BOOT area is authenticated or failed to be loaded, the first-level BOOT can select the second-level BOOT for authentication loading from another BOOT area in the two BOOT areas.
  • Step 503 The first level BOOT performs security authentication on the selected second level BOOT according to the security information: if the authentication passes, the second level BOOT is loaded, and the double BOOT control word is set to select the currently selected BOOT area; if the authentication fails, If the CPU is reset, the above steps are repeated. If the two BOOTs of the BOOT are failed to be authenticated or cannot be operated normally, the CPU will be reset and cannot run normally. Therefore, the indicator is used to alarm.
  • the switching between the dual BOOTs can be realized by setting the dual BOOT control words twice.
  • the switching between the master and slave BOOT is realized by the control words 0 and 1. If the control word is 1, the main BOOT area is selected, and if the control word is 0, the slave BOOT is selected. After the BOOT boot area is selected and the BOOT area is selected, the double BOOT control word can be inverted. If the selected BOOT authentication succeeds and the loading is successful, the BOOT control word is reversed again. If the authentication fails or the load fails, the watchdog overflows reset and the CPU is started.
  • the dual BOOT switching can also be implemented by the following method: after selecting the BOOT area, it is not necessary to set a control word. When the authentication fails or the operation is abnormal, the dual BOOT control word is set to be reversed; after the authentication is passed, the control word is kept unchanged.
  • the present invention sets the BOOT control word: if the current BOOT fails to be authenticated/loaded, the CPU can be reset to select another BOOT area to achieve the switching function between the BOOT areas.
  • the reliability of the BOOT can be effectively ensured, and the risk that the system cannot be started due to the upgrade of the BOOT is effectively reduced.
  • the BOOT area After the BOOT area is selected, the BOOT area obtains the security information from the storage information of the BOOT, and performs security authentication on the selected BOOT according to the security information. Referring to FIG. 8, the following steps are specifically included:
  • the HASH algorithm can be selected by itself, and is not limited here. However, it is necessary to ensure that the HASH algorithm used for the BOOT version signature is consistent with the HASH algorithm used for authentication. After the second level of BOOT authentication, it can be loaded and run normally.
  • the present invention also provides a system security starting device, as shown in FIG.
  • the storage module includes at least two levels of BOOT, and the first level BOOT stores the BOOT boot area information, and each level of the BOOT stores the information of at least two BOOT areas;
  • the obtaining module is configured to: obtain, by the BOOT booting area, control information of the level from the level i BOOT storage information, and select a BOOT area to be authenticated from the level BOOT according to the control information;
  • the apparatus further includes a boot area loading module:
  • central processing unit central controller
  • the device further includes a control module:
  • control information is modified to select other BOOT areas except the selected BOOT area and the BOOT area where the authentication fails.
  • the BOOT area is selected according to the modified control information
  • the recovery control information selects the current BOOT area.
  • the authentication module includes:
  • An obtaining unit configured to obtain security information of the level BOOT from the storage module
  • the authentication unit is used by the BOOT boot area to authenticate the selected BOOT according to the security information.
  • the authentication unit is specifically used,
  • the system security startup method selects the master-slave BOOT area according to the control word of the next-level BOOT, and performs security authentication on the selected BOOT area according to the security information: when the authentication passes, the selected one is loaded. BOOT; If the authentication fails, the dual BOOT control word is set and reset at the same time; after reset, the BOOT is selected from the other BOOT areas of the level for authentication loading: if the running process is abnormal, the dual BOOT control word is set and reset at the same time, so that After the reset, other BOOT areas in this level select a BOOT area for authentication loading. And so on, until the Nth level BOOT is loaded and running. Therefore, compared with the prior art, the present invention can simultaneously implement the secure BOOT and the dual BOOT by software means without relying on external devices, thereby ensuring safe and reliable startup of the system, and reducing system equipment cost and power consumption.
  • the invention is applicable to an embedded system, in particular a base station device, for implementing BOOT security authentication and dual BOOT functions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本发明公开了一种系统安全启动方法及装置。本发明将存储区域分为至少两级BOOT:其中,第一级BOOT存储BOOT引导区信息,其他级BOOT中每级BOOT均存储至少两个BOOT区的信息。该方法包括:BOOT引导区根据从存储区域中获取某一级BOOT控制信息选取一待认证BOOT区,并对所选BOOT区进行认证,若BOOT区认证且加载成功后,处理下一级BOOT信息;若认证失败,则在该级BOOT的其他BOOT区中选取一待认证BOOT区进行认证后加载。本发明在不依赖外部逻辑器件条件下,即可同时实现了安全BOOT和双BOOT功能,保证了BOOT的可靠性。

Description

一种系统安全启动方法及装置 技术领域
本发明涉及电子通信领域,尤其涉及一种系统安全启动方法及装置。
背景技术
随着各种通信业务的不断增长,嵌入式系统,特别是基站设备,对于系统启动的安全性、可靠性要求越来越高。目前通常采用BOOT来引导中央处理器启动,但是该种启动方法存在一定的缺陷:由于BOOT程序需要不断升级,如果升级时遇到断电等突发事件,将会导致BOOT程序丢失;如果BOOT被篡改成一个非法BOOT,则会导致系统运行不安全的程序,增加了系统设备的安全隐患。
现有技术中为克服上述的启动缺陷,通常采用安全BOOT模块来安全引导BOOT启动,防止系统运行非法BOOT;采用双BOOT技术来有效降低因BOOT损坏而导致系统无法启动的风险。然而目前的安全BOOT模块一般不具备认证双BOOT的功能,即安全BOOT总是从存储器固定位置去认证加载BOOT,不能按照用户要求从其他地址去认证加载备用BOOT;而对于双BOOT技术,目前大多数方案均要借用外部逻辑器件(如EPLD、FPGA等)或者多个存储介质(如寄存器)实现BOOT之间的切换,这显然增加了设备成本、功耗和PCB板的面积。
因此,现有技术中存在不能实现双BOOT的安全认证以及双BOOT之间切换实现过分依赖外部器件的问题,不符合嵌入式产品需具备的低功耗、低成本、体积小等特点。
发明内容
本发明提供一种系统安全启动方法及装置,用以解决现有技术不能实现双BOOT的安全认证以及双BOOT过分依赖外部器件实现的问题。
依据本发明的一个方面,提供了一种系统安全启动方法,将存储区域分为至少两级BOOT:其中,第一级BOOT存储BOOT引导区信息,其他级BOOT中每级BOOT均存储至少两个BOOT区的信息,所述方法包括:
获取步骤:所述BOOT引导区从第i级BOOT的存储信息中获取该级的控制信息,并根据所述控制信息从该级BOOT中选取一待认证BOOT区;
认证步骤:所述BOOT引导区对所选BOOT区进行认证,若认证成功,则引导中央控制器对所选的BOOT区加载运行;若认证失败,则在该级BOOT的其他BOOT区中选取一待认证BOOT区,重复该步骤,直到认证成功,加载选取的BOOT区,并在加载成功后,令i=i+1,i最小取2,返回所述获取步骤。
优选地,在所述获取步骤前,还包括:
引导区加载步骤:所述中央控制器对所述BOOT引导区进行认证后加载。
优选地,所述BOOT引导区选取一待认证BOOT区后,修改所述控制信息使其选定除所选BOOT区以及认证失败的BOOT区外的其他BOOT区;
当所选BOOT区认证/加载失败,根据修改后的控制信息选取BOOT区;
当所选BOOT区加载成功,恢复所述控制信息选定当前BOOT区。
优选地,所述BOOT引导区对所选BOOT区进行认证时,
从所述该级BOOT的存储信息获取安全信息;
根据所述安全信息对所选BOOT区进行认证。
优选地,根据所述安全信息对所选BOOT区进行认证,包括:
对所选的BOOT区的版本进行哈希运算,获取哈希值;
从所述BOOT引导区的存储信息中获取BOOT区的认证公钥;
根据所述认证公钥对所选BOOT区的版本签名进行解密,获取解密值;
判断所述哈希值与所述解密值是否一致,当所述哈希值和解密值一致时,认证通过;否则,认证失败。
依据本发明的另一个方面,提供了一种系统安全启动装置。
在嵌入式系统中,系统安全启动装置既可以当作安全引擎模块内置在中央控制器(CPU)中;也可以作为软件功能,配合CPU共同实现系统的安全启动。
该系统安全启动装置主要包括:
存储模块:一般对应嵌入式系统中的存储器,如FLASH。包括至少两级BOOT,第一级BOOT存储BOOT引导区信息,其他级BOOT中每级BOOT均存储至少两个BOOT区的信息;
获取模块:用于所述BOOT引导区从第i级BOOT存储信息中获取该级的控制信息,并根据所述控制信息从该级BOOT中选取一待认证BOOT区;
认证模块:用于所述BOOT引导区对所选BOOT区进行认证,若认证成功,则引导中央控制器对所选的BOOT区加载运行;若认证失败,则在该级BOOT的其他BOOT区中选取一待认证BOOT区,重复该步骤,直到认证成功,加载选取的BOOT区,并在加载成功后,令i=i+1,i最小取2,并由所述获取模块继续处理。
优选地,所述装置还包括引导区加载模块:
用于所述中央控制器对所述BOOT引导区进行认证后加载。
优选地,所述装置还包括控制模块:
用于所述BOOT引导区选取一待认证BOOT区后,修改所述控制信息使其选定除所选BOOT区以及认证失败的BOOT区外的其他BOOT区;
当所选BOOT区认证/加载失败,根据修改后的控制信息选取BOOT区;
当所选BOOT区加载成功,恢复所述控制信息选定当前BOOT区。
优选地,所述认证模块包括:
获取单元,用于从所述存储模块中获取该级BOOT区的安全信息;
认证单元,用于所述BOOT引导区根据所述安全信息对所选BOOT区进行认证。
优选地,所述认证单元具体用于,
对所选的BOOT区的版本进行哈希运算,获取哈希值;
从所述存储模块的BOOT引导区存储信息中获取BOOT区的认证公钥;
根据所述认证公钥对所选BOOT区的版本签名进行解密,获取解密值;
判断所述哈希值与所述解密值是否一致,当所述哈希值和解密值一致时,认证通过;否则失败。
本发明有益效果如下:
本发明将单芯片上的存储区域划分多级,第一级存储BOOT引导区的信息;其他级存储至少两个BOOT区的信息。在加载时,BOOT引导区从每级BOOT的存储信息中获取控制信息;根据该控制信息可以选取待认证的BOOT区,并对所选的BOOT区进行认证后加载,若认证失败,则在该级BOOT的其他BOOT区中选取一待认证BOOT区。与现有技术相比,本发明在不依赖外部逻辑器件的条件下,通过软件控制方法即可同时实现了多BOOT的安全认证功能,保证了BOOT的可靠性,有效降低因升级BOOT导致系统无法启动的风险。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例的系统安全启动方法的流程示意图;
图2为本发明实施例的多级BOOT的存储区域物理分区结构示意图;
图3为本发明实施例的双BOOT的存储区域物理分区结构示意图;
图4为本发明实施例的多级BOOT的系统安全启动方法的流程图;
图5为本发明实施例的双BOOT的系统安全启动方法的流程图;
图6为本发明实施例的双BOOT区的切换流程图;
图7为本发明实施例的双BOOT区的控制流程图;
图8为本发明实施例的BOOT区的认证流程图;
图9为本发明实施例的系统安全启动装置的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
为了解决目前双BOOT的安全认证以及双BOOT之间切换过分依赖外部器件实现的问题,本发明提供了一种系统安全启动方法,将存储区域分为至少两级BOOT:其中,第一级BOOT存储BOOT引导区信息,其他级BOOT中每级BOOT均存储至少两个BOOT区的信息,参见图1,具体包括步骤:
获取步骤S101:BOOT引导区从第i级BOOT的存储信息中获取该级的控制信息,并根据控制信息从该级BOOT中选取一待认证BOOT区;
认证步骤S102:BOOT引导区对所选BOOT区进行认证,若认证成功,则引导中央处理器对所选的BOOT区加载运行;若认证失败,则在该级BOOT的其他BOOT区中选取一待认证BOOT区,重复该步骤,直到认证成功,加载选取的BOOT区,并在加载成功后,令i=i+1,i最小取2,返回获取步骤。
本发明将单芯片上的存储区域划分多级,第一级存储BOOT引导区的信息;其他级存储至少两个BOOT区的信息。在加载时,BOOT引导区从每级BOOT的存储信息中获取控制信息;根据该控制信息可以选取待认证的BOOT区,并对所选的BOOT区进行认证后加载,若认证失败,则在该级BOOT的其他BOOT区中选取一待认证BOOT区。通过本发明在不依赖外部逻辑器件的条件下,通过软件控制方法即可同时实现双BOOT的安全认证功能,保证了BOOT的可靠性。
以下结合附图以及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不限定本发明。
本发明将存储区域分为至少两级BOOT:其中,第一级BOOT存储BOOT引导区信息,其他级BOOT中每级BOOT均存储至少两个BOOT区的信息。通过在存储区域中配置各个BOOT的信息,在实际加载时,通过读写操作即可实现BOOT的选定、切换以及认证。
具体地,本发明中根据应用功能不同,将BOOT划分成BASEBOOT+各级BOOT架构。本发明中BOOT引导区(即BASEBOOT)主要完成各级主从BOOT区的选择、BOOT区的认证等最小功能。BASEBOOT功能集要尽量小,一旦研发调试完成,基本就不改动,确保外场不升级。其他各级BOOT用于完成相关驱动初始化、应用程序引导以及和应用相关的参数传递等功能,可能会由于需求变化或者版本的错误(BUG)而存在升级的可能性。
本发明的一个实施例中,在分配存储区域时,多级BOOT的闪存(FLASH)的物理分区,参见图2。本实施例中在单一存储器芯片上依次划分第一级BOOT引导区、 第二级至第N级的主BOOT区、第二级至第N级的从BOOT区、BOOT控制区以及安全信息区。其中:
第一级BOOT引导区的功能集尽量简单稳定,将功能变化点放入其他BOOT中,减少第一级BOOT升级的可能性。对其他级BOOT采用主从BOOT区结构,本发明中主BOOT区为一个,从BOOT区至少为一个。BOOT控制区用于存放各级BOOT的BOOT控制信息。BOOT引导区根据控制信息选择其他级BOOT的主从BOOT区。安全信息区存放各级BOOT的安全信息,用于各个BOOT区的安全认证。
本发明的一个实施例中,在分配存储区域时,双BOOT的FLASH的物理分区,参见图3。本实施例中单一存储器芯片分为第一级BOOT引导区、第二级主从BOOT区。其中每级中包含了相应的控制信息和安全信息。第一级BOOT、主BOOT区以及从BOOT区的字段长度大小相同。
具体地,第一级BOOT引导区的存储信息包括BASEBOOT版本、公钥、保留字段以及安全信息。其中,公钥用于BOOT引导区对后续BOOT级的安全认证。安全信息根据CPU的安全BOOT功能要求进行设置,BASEBOOT的安全认证由CPU的安全BOOT模块认证。
主BOOT区的存储信息包括:主BOOT版本、安全信息以及保存字段;从BOOT区的存储信息包括:从BOOT版本、保留字段、安全信息以及BOOT控制字。其中,除第一级外的其他级的BOOT采用RSA非对称加解密方法,私钥由运营商或设备商进行保存,不可外泄。公钥作为BOOT引导区一部分(和BASEBOOT一起打包)。当BASEBOOT认证通过时,则认为此公钥合法,用于后续各级BOOT的解密。版本签名,是通过私钥分别对主从BOOT区版本进行哈希(HASH)加密计算后,得到的一个签名。BOOT控制字用于选择主BOOT还是从BOOT。
本发明中将BOOT分为多级在同一芯片中进行存储,因此针对多级BOOT认证加载的工作流程图,具体参见图4,中央控制器启动后,认证并加载第一级BASEBOOT;接着第一级BOOT依序在各级BOOT中选取BOOT区,对所选的BOOT区进行认证并加载,直至第N级BOOT成功运行。若所选BOOT区认证失败,则选取本级BOOT的其他BOOT区进行认证并加载。
下面以两级BOOT、双BOOT区为例对具体的选取及认证过程进行详细说明。上述介绍了芯片中存储区域中除第一级BOOT外的其他级都包含BOOT控制信息,用于存放BOOT控制字。BOOT引导区根据BOOT控制字来选择后一级BOOT的主从BOOT区。在后续认证加载过程中,BOOT引导区根据实际运行情况对BOOT控制字进行修改,用以实现BOOT区之间的切换功能。本实施例所提供的系统启动方法,参见图5,具体包括如下步骤:
步骤501,中央控制器启动后,对BASEBOOT进行认证,认证通过,则加载运行第一级BOOT,否则复位或者通过提示灯等方式告知用户。本实施例中,在系统启 动后,中央控制器需对BOOT引导区进行认证后加载,保证了BOOT引导区的安全性。
步骤502,第一级BOOT根据第二级BOOT的双BOOT控制字选择第二级BOOT的主从BOOT区,并设置双BOOT区控制字。
这里设置双BOOT区控制字以选定两个BOOT区中的未被选取的BOOT区。这样保证当前BOOT区认证或加载失败后,第一级BOOT能够从两个BOOT区中的另一个BOOT区选择第二级BOOT进行认证加载。
步骤503,第一级BOOT根据安全信息对被选第二级BOOT进行安全认证:若认证通过,则加载第二级BOOT,设置双BOOT控制字选定当前所选的BOOT区;若认证失败,则CPU复位,重复上述步骤,如果该级BOOT的两个BOOT区都认证失败或者不可正常运行,则会导致CPU不断复位,无法正常运行,因此本实施例采用指示灯来告警。
基于上述可知,本实施例通过两次设置双BOOT控制字,即可实现双BOOT之间的切换。对于BOOT控制字的设置方式,具体参见图6和图7,通过控制字0、1实现主从BOOT的切换。控制字为1则选取主BOOT区,控制字为0则选取从BOOT。BOOT引导区选择完BOOT区后,即可对双BOOT控制字进行取反。如果被选BOOT认证成功且加载成功,则将BOOT控制字再次取反。如果认证失败或加载失败,看门狗溢出复位,启动CPU。需要说明的是,双BOOT切换也可以通过下述的方式实现:在选取BOOT区后,不需要设置控制字。而当认证失败或者运行异常后,则设置双BOOT控制字取反;认证通过后,保持控制字不变即可。
本发明根据当前运行BOOT的运行情况,设置BOOT控制字:当前BOOT如果认证/加载失败,则能使得CPU复位后选择另一个BOOT区,达到BOOT区之间的切换功能。通过采用不断更改BOOT控制字的形式来切换BOOT区,可以有效保证BOOT的可靠性,有效降低升级BOOT导致系统无法启动的风险。
BOOT引导区选定BOOT区后,从该级BOOT的存储信息中获取安全信息,并根据安全信息对被选BOOT进行安全认证,参见图8,具体包括如下步骤:
对所选BOOT版本进行HASH运算,得到一个HASH值VAL1;
获取BASEBOOT存储信息中的公钥,并根据公钥对所选BOOT版本签名解密,得到VAL2;
将VAL1和VAL2进行比较:如果相等,则被选BOOT认证通过,否则将CPU复位,下次启动时从两个BOOT区中选择另一个BOOT进行认证。
对于HASH算法可以自行选择,这里不做限定,但需要保证BOOT版本签名采用的HASH算法和认证使用的HASH算法一致即可。第二级BOOT认证后,就可以正常加载运行。
本发明还提供了一种系统安全启动装置,如图9所示,具体包括:
存储模块:包括至少两级BOOT,第一级BOOT存储BOOT引导区信息,其他级BOOT中每级BOOT均存储至少两个BOOT区的信息;
获取模块:用于BOOT引导区从第i级BOOT存储信息中获取该级的控制信息,并根据控制信息从该级BOOT中选取一待认证BOOT区;
认证模块:用于BOOT引导区对所选BOOT区进行认证,若认证成功,则引导中央控制器对所选的BOOT区加载运行;若认证失败,则在该级BOOT的其他BOOT区中选取一待认证BOOT区,重复该步骤,直到认证成功,加载选取的BOOT区,并在加载成功后,令i=i+1,i最小取2,并由获取模块继续处理。
进一步地,该装置还包括引导区加载模块:
用于中央处理器(中央控制器)对BOOT引导区进行认证后加载。
进一步地,该装置还包括控制模块:
用于BOOT引导区选取一待认证BOOT区后,修改控制信息使其选定除所选BOOT区以及认证失败的BOOT区外的其他BOOT区;
当所选BOOT认证/加载失败,根据修改后的控制信息选取BOOT区;
当所选BOOT加载成功,恢复控制信息选定当前BOOT区。
进一步地,认证模块包括:
获取单元,用于从存储模块中获取该级BOOT的安全信息;
认证单元,用于BOOT引导区根据安全信息对所选BOOT进行认证。
进一步地,认证单元具体用于,
对所选的BOOT区的版本进行哈希运算,获取哈希值;
从存储模块的BOOT引导区存储信息中获取BOOT区的认证公钥;
根据认证公钥对所选BOOT区的版本签名进行解密,获取解密值;
判断哈希值与解密值是否一致,当哈希值和解密值一致时,认证通过;否则失败。
综上所述,本发明所提供的系统安全启动方法,根据下一级BOOT的控制字选择主从BOOT区,并根据安全信息对被选BOOT区进行安全认证:当认证通过,则加载所选BOOT;若认证失败,则设置双BOOT控制字,同时复位;复位后,从本级其他BOOT区中的选择一BOOT进行认证加载:如果运行过程异常,则设置双BOOT控制字,同时复位,使得复位后,本级其他BOOT区选择一BOOT区进行认证加载。依此类推,直到第N级BOOT加载运行。因此,与现有技术相比本发明能够在不依赖外部器件的条件下,通过软件手段同时实现安全BOOT和双BOOT,既可以保证系统安全、可靠启动,又可以降低系统设备成本和功耗。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。
虽然通过实施例描述了本申请,本领域的技术人员知道,本申请有许多变形和变 化而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。
工业实用性
本发明适用于嵌入式系统,特别是基站设备,用以实现BOOT的安全认证和双BOOT功能。

Claims (10)

  1. 一种系统安全启动方法,其中,将存储区域分为至少两级BOOT:其中,第一级BOOT存储BOOT引导区信息,其他级BOOT中每级BOOT均存储至少两个BOOT区的信息,所述方法包括:
    获取步骤:所述BOOT引导区从第i级BOOT的存储信息中获取该级的控制信息,并根据所述控制信息从该级BOOT中选取一待认证BOOT区;
    认证步骤:所述BOOT引导区对所选BOOT区进行认证,若认证成功,则引导中央控制器对所选的BOOT区加载运行;若认证失败,则在该级BOOT的其他BOOT区中选取一待认证BOOT区,重复该步骤,直到认证成功,加载选取的BOOT区,并在加载成功后,令i=i+1,i最小取2,返回所述获取步骤。
  2. 如权利要求1所述的方法,其中,在所述获取步骤前,还包括:
    引导区加载步骤:所述中央控制器对所述BOOT引导区进行认证后加载。
  3. 如权利要求1所述的方法,其中,所述BOOT引导区选取一待认证BOOT区后,修改所述控制信息使其选定除所选BOOT区以及认证失败的BOOT区外的其他BOOT区;
    当所选BOOT区认证/加载失败,根据修改后的控制信息选取BOOT区;
    当所选BOOT区加载成功,恢复所述控制信息选定当前BOOT区。
  4. 如权利要求1所述的方法,其中,所述BOOT引导区对所选BOOT区进行认证时,
    从所述该级BOOT的存储信息获取安全信息;
    根据所述安全信息对所选BOOT区进行认证。
  5. 如权利要求4所述的方法,其中,根据所述安全信息对所选BOOT区进行认证,包括:
    对所选的BOOT区的版本进行哈希运算,获取哈希值;
    从所述BOOT引导区的存储信息中获取BOOT区的认证公钥;
    根据所述认证公钥对所选BOOT区的版本签名进行解密,获取解密值;
    判断所述哈希值与所述解密值是否一致,当所述哈希值和解密值一致时,认证通过;当所述哈希值和解密值不一致时,认证失败。
  6. 一种系统安全启动装置,其中,包括:
    存储模块:包括至少两级BOOT,第一级BOOT存储BOOT引导区信息,其他 级BOOT中每级BOOT均存储至少两个BOOT区的信息;
    获取模块:设置为使所述BOOT引导区从第i级BOOT存储信息中获取该级的控制信息,并根据所述控制信息从该级BOOT中选取一待认证BOOT区;
    认证模块:设置为使所述BOOT引导区对所选BOOT区进行认证,若认证成功,则引导中央控制器对所选的BOOT区加载运行;若认证失败,则在该级BOOT的其他BOOT区中选取一待认证BOOT区,重复该步骤,直到认证成功,加载选取的BOOT区,并在加载成功后,令i=i+1,i最小取2,并由所述获取模块继续处理。
  7. 如权利要求6所述的装置,其中,所述装置还包括引导区加载模块:
    设置为使所述中央控制器对所述BOOT引导区进行认证后加载。
  8. 如权利要求6所述的装置,其中,所述装置还包括控制模块:
    设置为在所述BOOT引导区选取一待认证BOOT区后,修改所述控制信息使其选定除所选BOOT区以及认证失败的BOOT区外的其他BOOT区;
    当所选BOOT区认证/加载失败,根据修改后的控制信息选取BOOT区;
    当所选BOOT区加载成功,恢复所述控制信息选定当前BOOT区。
  9. 如权利要求6所述的装置,其中,所述认证模块包括:
    获取单元,设置为从所述存储模块中获取该级BOOT的安全信息;
    认证单元,设置为使所述BOOT引导区根据所述安全信息对所选BOOT区进行认证。
  10. 如权利要求9所述的装置,其中,所述认证单元设置为,
    对所选的BOOT区的版本进行哈希运算,获取哈希值;
    从所述存储模块的BOOT引导区存储信息中获取BOOT区的认证公钥;
    根据所述认证公钥对所选BOOT区的版本签名进行解密,获取解密值;
    判断所述哈希值与所述解密值是否一致,当所述哈希值和解密值一致时,认证通过;当所述哈希值和解密值不一致时,认证失败。
PCT/CN2016/073720 2015-10-30 2016-02-06 一种系统安全启动方法及装置 WO2016184180A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510725213.5A CN106650455B (zh) 2015-10-30 2015-10-30 一种系统安全启动方法及装置
CN201510725213.5 2015-10-30

Publications (1)

Publication Number Publication Date
WO2016184180A1 true WO2016184180A1 (zh) 2016-11-24

Family

ID=57319279

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/073720 WO2016184180A1 (zh) 2015-10-30 2016-02-06 一种系统安全启动方法及装置

Country Status (2)

Country Link
CN (1) CN106650455B (zh)
WO (1) WO2016184180A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304140A (zh) * 2017-01-12 2018-07-20 中兴通讯股份有限公司 闪存数据管理方法、装置及微控制器

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110347444B (zh) * 2019-07-12 2022-06-07 深圳忆联信息系统有限公司 一种ssd多状态切换的启动方法及其系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329632A (zh) * 2008-04-30 2008-12-24 中兴通讯股份有限公司 一种使用boot启动cpu的方法与装置
CN101751273A (zh) * 2008-12-15 2010-06-23 中国科学院声学研究所 用于嵌入式系统的安全引导装置及方法
CN102650944A (zh) * 2011-02-28 2012-08-29 国民技术股份有限公司 一种操作系统安全引导装置及引导方法
WO2015143989A1 (zh) * 2014-03-25 2015-10-01 华为技术有限公司 一种内核可信启动方法和装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033790B (zh) * 2010-12-15 2015-06-03 中兴通讯股份有限公司 一种嵌入式系统bootrom的升级方法和装置
CN102509047B (zh) * 2011-11-09 2014-08-27 北京赛科世纪数码科技有限公司 校验机顶盒中程序代码的方法和系统
CN102736933A (zh) * 2012-05-16 2012-10-17 中兴通讯股份有限公司 Boot文件加载方法及装置
CN103677923A (zh) * 2013-12-13 2014-03-26 中国航空工业集团公司第六三一研究所 一种boot引导程序运行保护方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329632A (zh) * 2008-04-30 2008-12-24 中兴通讯股份有限公司 一种使用boot启动cpu的方法与装置
CN101751273A (zh) * 2008-12-15 2010-06-23 中国科学院声学研究所 用于嵌入式系统的安全引导装置及方法
CN102650944A (zh) * 2011-02-28 2012-08-29 国民技术股份有限公司 一种操作系统安全引导装置及引导方法
WO2015143989A1 (zh) * 2014-03-25 2015-10-01 华为技术有限公司 一种内核可信启动方法和装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304140A (zh) * 2017-01-12 2018-07-20 中兴通讯股份有限公司 闪存数据管理方法、装置及微控制器
CN108304140B (zh) * 2017-01-12 2023-04-07 中兴通讯股份有限公司 闪存数据管理方法、装置及微控制器

Also Published As

Publication number Publication date
CN106650455A (zh) 2017-05-10
CN106650455B (zh) 2021-09-24

Similar Documents

Publication Publication Date Title
JP6319609B2 (ja) 信頼できるカーネル起動方法および装置
EP2962241B1 (en) Continuation of trust for platform boot firmware
US8904162B2 (en) Methods and apparatus for performing secure BIOS upgrade
US20220171841A1 (en) Remote attestation for multi-core processor
US10733288B2 (en) Verifying controller code and system boot code
US9703635B2 (en) Method, computer program, and computer for restoring set of variables
US10826904B2 (en) Local verification of code authentication
CN110110526B (zh) 一种基于安全芯片的安全启动装置及方法
US9755831B2 (en) Key extraction during secure boot
US20160055113A1 (en) Redundant System Boot Code in a Secondary Non-Volatile Memory
US8589672B2 (en) Method for securely merging multiple nodes having trusted platform modules
KR20140068867A (ko) 부팅 프로세스 동안 구성요소들을 인증하기 위한 시스템 및 방법
KR20060130200A (ko) 런타임 안전 보장을 위한 자율 메모리 체커 및 이의 방법
US10592661B2 (en) Package processing
JP2024050647A (ja) ファームウェアのセキュアな検証
US20100082955A1 (en) Verification of chipset firmware updates
US20200089507A1 (en) Low power embedded device using a write-once register to speed up the secure boot from sleep states of the device
US11379588B2 (en) System validation by hardware root of trust (HRoT) device and system management mode (SMM)
US9262631B2 (en) Embedded device and control method thereof
US11423150B2 (en) System and method for booting processors with encrypted boot image
US11200065B2 (en) Boot authentication
JP2016099837A (ja) 情報処理装置、サーバ装置、情報処理システム、制御方法及びコンピュータプログラム
WO2014206170A1 (zh) 一种验证方法及设备
TWI604336B (zh) 使用外部裝置之運行時驗證技術
CN115859310A (zh) 集成可信度量和业务安全的方法、装置及设备

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: 16795667

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: 16795667

Country of ref document: EP

Kind code of ref document: A1