[go: up one dir, main page]

WO2014183643A1 - Check method and check device for chip having secure startup function - Google Patents

Check method and check device for chip having secure startup function Download PDF

Info

Publication number
WO2014183643A1
WO2014183643A1 PCT/CN2014/077447 CN2014077447W WO2014183643A1 WO 2014183643 A1 WO2014183643 A1 WO 2014183643A1 CN 2014077447 W CN2014077447 W CN 2014077447W WO 2014183643 A1 WO2014183643 A1 WO 2014183643A1
Authority
WO
WIPO (PCT)
Prior art keywords
chip
key
secure boot
function
boot function
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2014/077447
Other languages
French (fr)
Chinese (zh)
Inventor
王涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2014183643A1 publication Critical patent/WO2014183643A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 verification method and the calibration device of the chip with the safe start function are the Chinese application number 201 310178685. 4 submitted on May 14, 2013, and the invention name is "the verification method of the chip with the safe start function" The priority of the Chinese application of the "verification device” is incorporated herein by reference.
  • the present invention relates to the field of communications technologies, and in particular, to a verification method and a verification device for a chip having a safe start function. Background technique
  • the traditional single board security boot technology is forward and executed sequentially.
  • the core of the technology is a chip that contains a one-time programmable technology (English: Full Time Programmable, abbreviated as: OTP) storage space. Support for secure encryption algorithms.
  • the Central Processing Unit starts its internal fixed user boot (English name: BOOT) program and initializes it, and after initialization, the CPU calls the public key (English full name: Public KEY, abbreviated as: PKEY) to verify The integrity of the user BOOT program, and after determining that the user BOOT program is complete, decrypt the user BOOT program and start the user BOOT program, and then the CPU calls BOOT KEY to verify the user operating system (English full name: Operation System, abbreviated as: OS) the integrity of the program, and after determining the integrity of the user OS program, decrypt the user OS program and start the user OS program, then the CPU will continue to call the secondary master key (English full name: secondary Master Encryption KEY, abbreviated as: SMEK) integrity check and decryption of the user software program, such that the program is integrity checked and decrypted at the first level until the integrity checksum of all programs running on the board The decryption is complete and the board is safely started.
  • the embodiment of the invention provides a verification method and a verification device for a chip with a safe start function, which is used for starting a user BOOT program on a chip with a secure boot function on a single board, and determining that the user BOOT program passes the verification. After that, if the verification device that carries the user BOOT program verifies that the chip with the secure boot function is replaced, the chip with the secure boot function will be stopped to prevent the board from starting, so as to avoid the chip being replaced. Security issues.
  • a first aspect of the present invention provides a verification method for a chip having a secure boot function, including:
  • the verifying device carrying the user BOOT program reads the chip for verifying the safe boot function.
  • the verification device verifies whether the chip having the secure boot function is replaced according to the chip key
  • the verifying device, according to the chip key, whether the chip with the secure boot function is replaced includes:
  • the verification device that carries the user BOOT program is configured to verify that the security startup function is
  • the chip key of the chip includes:
  • the verification device reads a chip key for verifying the chip having the secure boot function from a one-time programmable technology OTP memory space in the chip having the secure boot function.
  • the method further includes:
  • the feature set of the preset chip key is read from the FLASH memory.
  • a second aspect of the present invention provides a verification apparatus for a chip having a secure boot function, the verification apparatus carrying a user-guided BOOT program, the verification apparatus comprising:
  • a reading unit configured to: after starting a user BOOT program on a chip having a secure boot function and determining that the user BOOT program passes the verification, reading a chip key for verifying the chip with the secure boot function;
  • a verification unit configured to verify, after the reading unit reads the chip key, whether the chip with the secure boot function is replaced according to the chip key;
  • an execution unit configured to stop running the chip with the secure boot function if the verification unit determines that the chip with the secure boot function is replaced.
  • the verifying unit includes: a calculating unit, configured to: after the reading unit reads the chip key, use the preset algorithm to The key is processed to obtain a feature of the chip key; the determining unit is configured to determine, after the computing unit calculates the feature of the chip key, whether the feature set of the chip key set in advance is included in the process The obtained characteristics of the chip key;
  • a determining unit configured to determine, when the determining unit determines that a feature set of the chip key obtained in the preset is not included, to determine that the chip with the secure boot function is replaced; And determining, when the determining unit determines that the feature set of the chip key set in advance is included, the feature of the chip key obtained by the processing, and determining that the chip with the secure boot function is not replaced.
  • the reading unit is specifically configured to read, from the one-time programmable technology OTP storage space in the chip with the secure boot function, a chip for verifying the chip with the secure boot function. Key.
  • the verification unit further includes: a check code reading unit, configured to read the feature set of the preset chip key from the FLASH memory.
  • the embodiment of the present invention has the following advantages: After the chip with the secure boot function on the board starts the user BOOT program and determines that the user BOOT program passes the verification, the check of the user BOOT program is carried.
  • the device reads a chip key for verifying the chip with the secure boot function, and verifies whether the chip with the secure boot function is replaced according to the chip key, and if so, stops the safe boot function
  • the chip prevents the board from booting, making it impossible to illegally steal the network or attack the carrier network, ensuring network security. Attachment
  • FIG. 1 is a schematic diagram of a verification method of a chip with a secure boot function according to an embodiment of the present invention
  • FIG. 2 is another schematic diagram of a verification method of a chip with a secure boot function according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram showing the structure of a verification device of a chip having a secure boot function according to an embodiment of the present invention
  • FIG. 4 is another schematic diagram showing the structure of a verification device of a chip having a secure boot function according to an embodiment of the present invention
  • FIG. 5 is another schematic diagram showing the structure of a verifying device of a chip having a secure boot function according to an embodiment of the present invention. detailed description
  • the embodiment of the present invention provides a verification method and a verification device for a chip with a secure boot function, which is used to start a user BOOT program on a chip with a secure boot function on a board and determine that the user BOOT program passes the verification.
  • the verification module that carries the user BOOT program stops running the device if it is verified that the chip with the secure boot function is replaced.
  • a chip with a secure boot function prevents the board from booting and avoids security issues caused by the replacement of the chip.
  • the chip control program with the secure boot function on the board mainly starts with three keys, namely PKEY, BOOT KEY, SMEK, wherein PKEY is used to verify the integrity of the user BOOT program. And under the condition that the user BOOT program is complete, the chip with the secure boot function decrypts and starts the user BOOT program, wherein the BOOT KEY is used to verify the integrity of the user OS program, and under the condition that the user OS program is complete, The chip of the secure boot function decrypts and starts the user OS program, wherein the SMEK is used to verify the integrity of the user software program, and under the condition that the user's software program is complete, the chip with the secure boot function decrypts and starts the user's software. program.
  • the verification device pair carrying the user BOOT program is started after the chip with the security startup function starts the user BOOT program and determines that the user BOOT program passes the verification.
  • the validity of the chip with the secure boot function is verified to verify whether the chip with the secure boot function is replaced.
  • FIG. 1 is a secure boot in the embodiment of the present invention.
  • Embodiments of the verification method of the functional chip include:
  • the verification device carrying the user BOOT program reads the chip key for verifying the chip with the secure boot function
  • the verification device carrying the user BOOT program will read for verifying the safe boot function. Chip key for the chip.
  • the preset chip key is unique, and the chip key is a random value, which is a unique key for identifying the chip allocated by the chip during production, and the chip key can be stored in Any position in the OTP memory space of the chip.
  • the chip having the secure boot function in the embodiment of the present invention may be a CPU having a secure boot function.
  • the verification device verifies whether the chip with the secure boot function is replaced according to the chip key
  • the verification device can check whether the chip having the secure boot function is replaced according to the read chip key.
  • the verification module verifies whether the chip with the secure boot function is replaced according to the read chip key, and if it is determined that the chip with the secure boot function is replaced, the verification module will stop having security. Start the function of the chip to run.
  • the verification module determines that the chip with the secure boot function is not replaced, the step of verifying the user OS program by using the BOOT KEY is continued by the chip with the secure boot function, and is no longer Narration.
  • the verification device that carries the user BOOT program reads the chip for verifying the safe boot function.
  • Chip key and use the chip key to verify whether the chip with the secure boot function is replaced, and in the case that the chip with the secure boot function is replaced, the chip with the secure boot function will be stopped, Prevents the startup of programs on the board, avoids theft of the network or attacks on the carrier's network, and ensures network security.
  • FIG. 2 is an embodiment of a verification method of a chip with a secure boot function according to an embodiment of the present invention, including:
  • the verification device carrying the user BOOT program is read from the OTP storage space in the chip with the secure boot function for verification.
  • a chip key for verifying the chip with the secure boot function is stored in the OTP storage space in the chip with the secure boot function on the board, and the chip key is unique. Uniquely identifies a chip, and the chip key can be stored anywhere on the OTP storage space. In addition, other information can be stored in the OTP storage space, such as: PKEY, BOOT KEY, SMEK, and so on.
  • the check device carrying the user BOOT program will be from the OTP storage space in the chip with the secure boot function. Reading a chip key for verifying the chip with the secure boot function, the specific: the verifying device calculates the chip for verifying the chip with the safe boot function by using an embedded function corresponding to the user BOOT program The key is stored in the OTP storage space in the chip with the secure boot function, and the chip key is read according to the storage location.
  • the verification device processes the chip key by using a preset algorithm to obtain a feature of the chip key, where the preset algorithm may be a hash algorithm. Or an algorithm that can process the chip key to obtain the feature of the chip key.
  • the algorithm used may be set according to a specific situation, which is not limited herein. At least one of a length of a key, a checksum, a parity bit, a sequence of features, and the like.
  • the verification device reads the feature set of the preset chip key from the FLASH memory.
  • step 204 Determine whether the feature set of the chip key set in advance includes the feature of the processed chip key, if otherwise, execute step 205, and if yes, perform step 206; in the embodiment of the present invention, the verification device determines Whether the feature set of the processed chip key is included in the feature set of the preset chip key.
  • step 207 determining that the chip with the secure boot function is replaced, and continuing to step 207;
  • the verification device determines that the feature set of the chip key set in advance includes the feature of the obtained chip key, it is determined that the chip with the secure boot function is not replaced, and if the preset chip density is determined, If the feature set of the key does not contain the feature of the obtained chip key, it is determined that the chip with the secure boot function is replaced, not the original chip with the secure boot function on the board, and therefore, the verifying device will stop. Run the chip with the secure boot function.
  • the verification device determines that the chip with the secure boot function is not replaced, the verification and decryption processing of the program such as the user OS program will continue to be performed by the chip having the secure boot function. Narration.
  • the chip with the secure boot function may be a CPU with a secure boot function.
  • the verification device carrying the user BOOT program can be stored from the OTP storage in the chip with the secure boot function. Reading a chip key for verifying a chip having a secure boot function in space, and using a preset algorithm The chip key is processed to obtain the feature of the chip key, and it is determined whether the feature set of the preset chip key includes the feature of the processed chip key, and if not, the chip with the secure boot function is determined. If it is replaced, the chip with the secure boot function will be stopped to prevent the startup of the program on the board, to avoid theft of the network or attacks on the carrier network, and to ensure network security.
  • the verification apparatus carries a user BOOT program, and includes: a reading unit 301, configured to have The chip of the secure boot function starts the user BOOT program and determines that the user BOOT program passes the check, and reads the chip key for verifying the chip with the secure boot function;
  • a verifying unit 302 configured to verify, after the reading unit 301 reads the chip key, whether the chip having the secure boot function is replaced according to the chip key;
  • the executing unit 303 is configured to stop running the chip with the secure boot function if the verifying unit 302 determines that the chip with the secure boot function is replaced.
  • the reading unit 301 in the verification device that carries the user BOOT program reads for verification.
  • the chip key of the chip of the secure boot function next, the check unit 302 verifies whether the chip with the secure boot function is replaced according to the chip key, and if the check unit 302 determines that the chip with the secure boot function is replaced Then, the execution unit 303 stops running the chip with the secure boot function.
  • the chip with the secure boot function may be a CPU with a secure boot function on the board.
  • the verification device that carries the user BOOT program reads the chip for verifying the safe boot function.
  • Chip key and use the chip key to verify whether the chip with the secure boot function is replaced, and in the case that the chip with the secure boot function is replaced, the chip with the secure boot function will be stopped, Prevents the startup of programs on the board, avoids theft of the network or attacks on the carrier's network, and ensures network security.
  • FIG. 4 is an embodiment of a structure of a verification device for a chip with a safe start function according to an embodiment of the present invention, including :
  • the reading unit 301, the checking unit 302, and the executing unit 303 in the embodiment shown in FIG. 3 are similar to those described in the embodiment shown in FIG. 3, and details are not described herein again.
  • the verification unit 302 includes:
  • the calculating unit 401 is configured to: after the reading unit 301 reads the chip key, process the chip key by using a preset algorithm to obtain a feature of the chip key;
  • the determining unit 402 is configured to determine, after the computing unit 401 calculates the feature of the chip key, whether the feature set of the chip key set in advance includes the feature of the processed chip key;
  • a determining unit 403 configured to determine, when the determining unit 402 determines that the feature set of the chip key that is set in advance is not included in the processed feature of the chip key, to determine that the chip with the secure boot function is replaced; And determining, when the determining unit determines that the feature set of the chip key set in advance is included, the feature of the chip key obtained by the processing, and determining that the chip with the secure boot function is not replaced.
  • the reading unit 301 is specifically configured to read a chip key for verifying a chip having a secure boot function from a one-time programmable technology OTP storage space in a chip having a secure boot function.
  • the verification unit 302 further includes:
  • the check code reading unit 404 is configured to read a feature set of the preset chip key from the FLASH memory.
  • the reading unit 301 in the verification device that carries the user BOOT program reads for verification.
  • the chip key of the chip of the secure boot function, and then the computing unit 401 in the check unit 302 processes the chip key using a preset algorithm to calculate the feature of the chip key; and is verified by the check unit 302
  • the code reading unit 404 reads the feature set of the chip key set in advance from the FLASH memory, and then the determining unit 402 in the checking unit 302 determines whether the feature set in the preset chip key includes the processing.
  • the feature of the chip key if the determining unit 402 determines that the feature set of the chip key that is set in advance does not include the feature of the processed chip key, the determining unit 403 determines that the user BOOT program is replaced; The determining unit 402 determines that the feature set obtained by the calculation of the chip key set in advance includes the processed chip key The feature, the determination unit 403 determines that the user is not replaced BOOT program. And if the determining unit 403 determines that the chip with the secure boot function is replaced, Then, the execution unit 303 stops running the chip with the secure boot function.
  • the verification device of the chip with the secure boot function may be a CPU with a secure boot function on the board.
  • the verification device carrying the user BOOT program can be stored from the OTP storage in the chip with the secure boot function.
  • the chip key for verifying the chip with the secure boot function is read in the space, and the chip key is processed by using a preset algorithm to obtain the feature of the chip key, and the preset chip key is determined. Whether the feature set contains the characteristics of the processed chip key, and if not, it is determined that the chip with the secure boot function is replaced, and the chip with the secure boot function is stopped to prevent the startup of the program on the board. To avoid theft of the network or attacks on the carrier's network, ensuring network security.
  • an embodiment of a structure of a verification device for a chip having a secure boot function includes:
  • a processor 501 a transmitting device 502, a receiving device 503, a memory 504;
  • the processor starts the user BOOT program on the chip with the secure boot function and determines that the user BOOT program passes the verification, reads the chip key for verifying the chip with the secure boot function; and according to the chip key Check if the chip with safe boot function is replaced; if the chip with safe boot function is replaced, stop the chip with safe boot function.
  • the medium can be a read only memory, a magnetic disk or a compact disk or the like.

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

The embodiments of the present invention disclose a check method and check device for a chip having a secure startup function. The method in the embodiments of the present invention comprises: after a chip having a secure startup function starts a user BOOT program, and after it is determined that the check of the user BOOT program has passed, a check device bearing the user BOOT program reading a chip key used for checking the chip having the secure startup function; according to the chip key, the check device checking whether the chip having the secure startup function is replaced or not; and if so, stopping operating the chip having the secure startup function, thereby preventing one board startup, so that a network cannot be illegally embezzled or an operator network cannot be attacked, so as to ensure the network security.

Description

具有安全启动功能的芯 片 的校验方法及校验装置 本申请要求于 2013 年 5 月 14 日提交的中国 申请号为 201 310178685. 4 , 发明名称为 "具有安全启动功能的芯片的校验方法 及校验装置" 的中国申请的优先权, 其全部内容通过引用结合在本申 请中。 技术领域  The verification method and the calibration device of the chip with the safe start function. The application request is the Chinese application number 201 310178685. 4 submitted on May 14, 2013, and the invention name is "the verification method of the chip with the safe start function" The priority of the Chinese application of the "verification device" is incorporated herein by reference. Technical field

本发明涉及通信技术领域,尤其涉及一种具有安全启动功能的芯 片的校验方法及校验装置。 背 景技术  The present invention relates to the field of communications technologies, and in particular, to a verification method and a verification device for a chip having a safe start function. Background technique

传统的单板安全启动技术都是正向的, 且顺序执行的, 技术的核 心是一块包含一次性可编程技术(英文全称为: One Time Programmable, 缩写为: OTP ) 存储空间的芯片, 且该芯片支持安全加密算法。  The traditional single board security boot technology is forward and executed sequentially. The core of the technology is a chip that contains a one-time programmable technology (English: Full Time Programmable, abbreviated as: OTP) storage space. Support for secure encryption algorithms.

现有技术中, 单板的安全启动程序为: 中央处理器 (英文全称为: In the prior art, the secure boot procedure of the board is: Central Processing Unit (English full name:

Central Processing Unit, CPU )启动其内部的固定用户引导(英文名称为: BOOT )程序, 并进行初始化, 且在初始化之后, CPU调用公开密钥(英 文全称为: Public KEY, 缩写为: PKEY )验证用户 BOOT程序的完整性, 且在确定用户 BOOT程序为完整的之后, 对用户 BOOT程序进行解密并 启动用户 BOOT程序,接着 CPU调用 BOOT KEY验证用户操作系统(英 文全称为: Operation System, 缩写为: OS )程序的完整性, 且在确定用 户 OS程序的完整性之后, 对该用户 OS程序进行解密并启动该用户 OS 程序,接着 CPU还将继续调用二级主密钥(英文全称为: secondary Master Encryption KEY, 缩写为: SMEK )对用户软件程序进行完整性校验和解 密, 如此一级一级的对程序进行完整性校验和解密直至所有运行在单板 上的程序的完整性校验和解密完成, 单板安全启动。 The Central Processing Unit (CPU) starts its internal fixed user boot (English name: BOOT) program and initializes it, and after initialization, the CPU calls the public key (English full name: Public KEY, abbreviated as: PKEY) to verify The integrity of the user BOOT program, and after determining that the user BOOT program is complete, decrypt the user BOOT program and start the user BOOT program, and then the CPU calls BOOT KEY to verify the user operating system (English full name: Operation System, abbreviated as: OS) the integrity of the program, and after determining the integrity of the user OS program, decrypt the user OS program and start the user OS program, then the CPU will continue to call the secondary master key (English full name: secondary Master Encryption KEY, abbreviated as: SMEK) integrity check and decryption of the user software program, such that the program is integrity checked and decrypted at the first level until the integrity checksum of all programs running on the board The decryption is complete and the board is safely started.

然而, 在现有技术中, 用于对用户 BOOT程序进行完整性校验的 PKEY是固定的, 容易泄露和被破解, 且由于 BOOT KEY和 SMEK是可 读的, 若这三把密钥被黑客破解, 设备对黑客就变得透明, 黑客若要破 解单板上的单板软件和产品软件, 只需要将原来具有安全功能的承载了 固定 BOOT程序、 用户 BOOT程序、 PKEY, BOOT KEY, SMEK的芯 片替换成原始的、 未使能安全功能的芯片, 就可以克隆出加入了黑客程 序的模块, 从而非法盗用网络或者攻击运营商网络, 因此, 现有技术中 的单板的安全启动程序存在严重的安全漏洞。 However, in the prior art, it is used for integrity check of the user BOOT program. PKEY is fixed, easy to leak and cracked, and because BOOT KEY and SMEK are readable, if these three keys are hacked, the device becomes transparent to the hacker, and the hacker should crack the board on the board. The software and product software can be cloned and added only by replacing the chip with the fixed BOOT program, the user BOOT program, the PKEY, the BOOT KEY, and the SMEK with the original security function. A module of the hacking program, which illegally steals the network or attacks the carrier network. Therefore, the security startup program of the board in the prior art has serious security holes.

发 明 内 容 Invented content

本发明实施例提供了一种具有安全启动功能的芯片的校验方法及 校验装置, 用于在单板上的具有安全启动功能的芯片启动用户 BOOT程 序, 且确定该用户 BOOT程序校验通过之后, 承载该用户 BOOT程序的 校验装置若校验确定该具有安全启动功能的芯片被替换, 则将停止运行 该具有安全启动功能的芯片, 以阻止单板启动, 避免因芯片被替换而带 来的安全性问题。  The embodiment of the invention provides a verification method and a verification device for a chip with a safe start function, which is used for starting a user BOOT program on a chip with a secure boot function on a single board, and determining that the user BOOT program passes the verification. After that, if the verification device that carries the user BOOT program verifies that the chip with the secure boot function is replaced, the chip with the secure boot function will be stopped to prevent the board from starting, so as to avoid the chip being replaced. Security issues.

本发明第一方面提供了一种具有安全启动功能的芯片的校验方 法, 包括:  A first aspect of the present invention provides a verification method for a chip having a secure boot function, including:

在所述具有安全启动功能的芯片启动用户引导 BOOT程序且确定 所述用户 BOOT程序校验通过之后, 承载所述用户 BOOT程序的校验装 置读取用于校验所述具有安全启动功能的芯片的芯片密钥;  After the chip with the secure boot function starts the user booting BOOT program and determines that the user BOOT program passes the verification, the verifying device carrying the user BOOT program reads the chip for verifying the safe boot function. Chip key

所述校验装置根据所述芯片密钥校验所述具有安全启动功能的芯 片是否被替换;  The verification device verifies whether the chip having the secure boot function is replaced according to the chip key;

若是, 则停止运行所述具有安全启动功能的芯片。  If so, the chip with the secure boot function is stopped.

在第一方面第一种可能的实现方式中, 所述校验装置根据所述芯 片密钥校验所述具有安全启动功能的芯片是否被替换包括:  In a first possible implementation manner of the first aspect, the verifying device, according to the chip key, whether the chip with the secure boot function is replaced includes:

利用预先设置的算法对所述芯片密钥进行处理, 得到所述芯片密 钥的特征;  Processing the chip key by using a preset algorithm to obtain a feature of the chip key;

判断预先设置的所述芯片密钥的特征集合中是否包含处理得到的 所述芯片密钥的特征;  Determining whether a feature set of the chip key set in advance includes a feature of the processed chip key;

若否, 则确定所述具有安全启动功能的芯片被替换; 若是, 则确定所述具有安全启动功能的芯片未被替换。 结合第一方面或者第一方面第一种可能的实现方式, 在第二种可 能的实现方式中, 所述承载所述用户 BOOT程序的校验装置读取用于校 验所述具有安全启动功能的芯片的芯片密钥包括: If not, determining that the chip with the secure boot function is replaced; If so, it is determined that the chip with the secure boot function is not replaced. With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner, the verification device that carries the user BOOT program is configured to verify that the security startup function is The chip key of the chip includes:

所述校验装置从所述具有安全启动功能的芯片中的一次性可编程 技术 OTP存储空间中读取用于校验所述具有安全启动功能的芯片的芯片 密钥。  The verification device reads a chip key for verifying the chip having the secure boot function from a one-time programmable technology OTP memory space in the chip having the secure boot function.

结合第一方面或者第一方面第一种可能的实现方式, 在第三种可 能的实现方式中, 该方法还包括:  In combination with the first aspect or the first possible implementation of the first aspect, in a third possible implementation, the method further includes:

从 FLASH 存储器中读取所述预先设置的所述芯片密钥的特征集 合。  The feature set of the preset chip key is read from the FLASH memory.

本发明第二方面提供一种具有安全启动功能的芯片的校验装置, 所述校验装置承载用户引导 BOOT程序, 该校验装置包括:  A second aspect of the present invention provides a verification apparatus for a chip having a secure boot function, the verification apparatus carrying a user-guided BOOT program, the verification apparatus comprising:

读取单元, 用于在具有安全启动功能的芯片启动用户 BOOT程序 且确定所述用户 BOOT程序校验通过之后, 读取用于校验所述具有安全 启动功能的芯片的芯片密钥;  a reading unit, configured to: after starting a user BOOT program on a chip having a secure boot function and determining that the user BOOT program passes the verification, reading a chip key for verifying the chip with the secure boot function;

校验单元, 用于在所述读取单元读取所述芯片密钥之后, 根据所 述芯片密钥校验所述具有安全启动功能的芯片是否被替换;  a verification unit, configured to verify, after the reading unit reads the chip key, whether the chip with the secure boot function is replaced according to the chip key;

执行单元, 用于若所述校验单元确定所述具有安全启动功能的芯 片被替换, 则停止运行所述具有安全启动功能的芯片。  And an execution unit, configured to stop running the chip with the secure boot function if the verification unit determines that the chip with the secure boot function is replaced.

在第二方面第一种可能的实现方式中, 所述校验单元包括: 计算单元, 用于在所述读取单元读取所述芯片密钥之后, 利用预 先设置的算法对所述芯片密钥进行处理, 得到所述芯片密钥的特征; 判断单元, 用于在所述计算单元计算得到所述芯片密钥的特征之 后, 判断预先设置的所述芯片密钥的特征集合中是否包含处理得到的所 述芯片密钥的特征;  In a first possible implementation manner of the second aspect, the verifying unit includes: a calculating unit, configured to: after the reading unit reads the chip key, use the preset algorithm to The key is processed to obtain a feature of the chip key; the determining unit is configured to determine, after the computing unit calculates the feature of the chip key, whether the feature set of the chip key set in advance is included in the process The obtained characteristics of the chip key;

确定单元, 用于在所述判断单元判断得到预先设置的所述芯片密 钥的特征集合中未包含处理得到的所述芯片密钥的特征时, 确定所述具 有安全启动功能的芯片被替换; 及用于在所述判断单元判断计算得到预 先设置的所述芯片密钥的特征集合中包含处理得到的所述芯片密钥的特 征时, 确定所述具有安全启动功能的芯片未被替换。  a determining unit, configured to determine, when the determining unit determines that a feature set of the chip key obtained in the preset is not included, to determine that the chip with the secure boot function is replaced; And determining, when the determining unit determines that the feature set of the chip key set in advance is included, the feature of the chip key obtained by the processing, and determining that the chip with the secure boot function is not replaced.

结合第二方面或者第二方面第一种可能的实现方式, 在第二种可 能的实现方式中, 所述读取单元具体用于从所述具有安全启动功能的芯 片中的一次性可编程技术 OTP存储空间中读取用于校验所述具有安全启 动功能的芯片的芯片密钥。 Combining the second aspect or the first possible implementation manner of the second aspect, In an implementation manner, the reading unit is specifically configured to read, from the one-time programmable technology OTP storage space in the chip with the secure boot function, a chip for verifying the chip with the secure boot function. Key.

在第二方面第三种可能的实现方式中, 所述校验单元还包括: 校验码读取单元, 用于从 FLASH存储器中读取所述预先设置的所 述芯片密钥的特征集合。  In a third possible implementation manner of the second aspect, the verification unit further includes: a check code reading unit, configured to read the feature set of the preset chip key from the FLASH memory.

从以上技术方案可以看出, 本发明实施例具有以下优点: 在单板上的具有安全启动功能的芯片启动用户 BOOT程序且确定 该用户 BOOT程序校验通过之后, 承载该用户 BOOT程序的校验装置读 取用于校验该具有安全启动功能的芯片的芯片密钥, 并根据该芯片密钥 校验该具有安全启动功能的芯片是否被替换, 若是, 则将停止运行该具 有安全启动功能的芯片, 从而阻止单板启动, 使得不能非法盗用网络或 者攻击运营商网络, 确保了网络安全。 附 图 说明  It can be seen from the above technical solution that the embodiment of the present invention has the following advantages: After the chip with the secure boot function on the board starts the user BOOT program and determines that the user BOOT program passes the verification, the check of the user BOOT program is carried. The device reads a chip key for verifying the chip with the secure boot function, and verifies whether the chip with the secure boot function is replaced according to the chip key, and if so, stops the safe boot function The chip prevents the board from booting, making it impossible to illegally steal the network or attack the carrier network, ensuring network security. Attachment

图 1 为本发明实施例中一种具有安全启动功能的芯片的校验方 法的一个示意图;  1 is a schematic diagram of a verification method of a chip with a secure boot function according to an embodiment of the present invention;

图 2 为本发明实施例中一种具有安全启动功能的芯片的校验方 法的另一示意图;  2 is another schematic diagram of a verification method of a chip with a secure boot function according to an embodiment of the present invention;

图 3 为本发明实施例中一种具有安全启动功能的芯片的校验装 置的结构的一个示意图;  3 is a schematic diagram showing the structure of a verification device of a chip having a secure boot function according to an embodiment of the present invention;

图 4 为本发明实施例中一种具有安全启动功能的芯片的校验装 置的结构的另一示意图;  4 is another schematic diagram showing the structure of a verification device of a chip having a secure boot function according to an embodiment of the present invention;

图 5 为本发明实施例中一种具有安全启动功能的芯片的校验装 置的结构的另一示意图。 具体 实 施方 式  FIG. 5 is another schematic diagram showing the structure of a verifying device of a chip having a secure boot function according to an embodiment of the present invention. detailed description

本发明实施例提供了一种具有安全启动功能的芯片的校验方法及 校验装置, 用于在单板上的具有安全启动功能的芯片启动用户 BOOT程 序且确定该用户 BOOT程序校验通过之后,承载该用户 BOOT程序的校 验模块若校验得到该具有安全启动功能的芯片被替换, 则停止运行该具 有安全启动功能的芯片, 以阻止单板启动, 避免因芯片被替换而带来的 安全性问题。 The embodiment of the present invention provides a verification method and a verification device for a chip with a secure boot function, which is used to start a user BOOT program on a chip with a secure boot function on a board and determine that the user BOOT program passes the verification. The verification module that carries the user BOOT program stops running the device if it is verified that the chip with the secure boot function is replaced. A chip with a secure boot function prevents the board from booting and avoids security issues caused by the replacement of the chip.

在本发明实施例中, 单板上的具有安全启动功能的芯片控制程序 启动主要依靠三把密钥,分别是 PKEY、 BOOT KEY, SMEK,其中, PKEY 用于校验用户 BOOT程序的完整性,且在用户 BOOT程序完整的条件下, 具有安全启动功能的芯片解密并启动该用户 BOOT程序, 其中, BOOT KEY用于校验用户 OS程序的完整性, 且在用户 OS程序完整的条件下, 具有安全启动功能的芯片解密并启动该用户 OS程序, 其中, SMEK用 于校验用户软件程序的完整性, 且在用户的软件程序完整的条件下, 具 有安全启动功能的芯片解密并启动用户的软件程序。  In the embodiment of the present invention, the chip control program with the secure boot function on the board mainly starts with three keys, namely PKEY, BOOT KEY, SMEK, wherein PKEY is used to verify the integrity of the user BOOT program. And under the condition that the user BOOT program is complete, the chip with the secure boot function decrypts and starts the user BOOT program, wherein the BOOT KEY is used to verify the integrity of the user OS program, and under the condition that the user OS program is complete, The chip of the secure boot function decrypts and starts the user OS program, wherein the SMEK is used to verify the integrity of the user software program, and under the condition that the user's software program is complete, the chip with the secure boot function decrypts and starts the user's software. program.

在本发明实施例中, 为了使得单板上的程序启动更加安全可靠, 在具有安全启动功能的芯片启动用户 BOOT程序且确定该用户 BOOT程 序校验通过之后承载该用户 BOOT程序的校验装置对该具有安全启动功 能的芯片的合法性进行校验, 以校验该具有安全启动功能的芯片是否被 替换, 为了更好的理解, 请参阅图 1 , 为本发明实施例中一种具有安全 启动功能的芯片的校验方法的实施例, 包括:  In the embodiment of the present invention, in order to make the program startup on the board more secure and reliable, the verification device pair carrying the user BOOT program is started after the chip with the security startup function starts the user BOOT program and determines that the user BOOT program passes the verification. The validity of the chip with the secure boot function is verified to verify whether the chip with the secure boot function is replaced. For better understanding, please refer to FIG. 1 , which is a secure boot in the embodiment of the present invention. Embodiments of the verification method of the functional chip include:

101、在具有安全启动功能的芯片启动用户 BOOT程序且确定用户 BOOT程序校验通过之后, 承载用户 BOOT程序的校验装置读取用于校 验具有安全启动功能的芯片的芯片密钥;  101. After the user BOOT program is started by the chip with the secure boot function and the user BOOT program verification is determined, the verification device carrying the user BOOT program reads the chip key for verifying the chip with the secure boot function;

在本发明实施例中, 在具有安全启动功能的芯片启动用户 BOOT 程序且确定该用户 BOOT程序校验通过之后,承载该用户 BOOT程序的 校验装置将读取用于校验该具有安全启动功能的芯片的芯片密钥。  In the embodiment of the present invention, after the user BOOT program is started by the chip with the secure boot function and it is determined that the user BOOT program is verified, the verification device carrying the user BOOT program will read for verifying the safe boot function. Chip key for the chip.

其中, 该预先设置的芯片密钥具有唯一性, 且该芯片密钥是一个 随机的数值,是芯片在生产时分配的具有唯一性的用于标识芯片的密钥, 该芯片密钥可以存储在芯片的 OTP存储空间中的任意一个位置上。  Wherein, the preset chip key is unique, and the chip key is a random value, which is a unique key for identifying the chip allocated by the chip during production, and the chip key can be stored in Any position in the OTP memory space of the chip.

需要说明的是, 在本发明实施例中具有安全启动功能的芯片可以 是具有安全启动功能的 CPU。  It should be noted that the chip having the secure boot function in the embodiment of the present invention may be a CPU having a secure boot function.

102、 校验装置根据芯片密钥校验具有安全启动功能的芯片是否被 替换;  102. The verification device verifies whether the chip with the secure boot function is replaced according to the chip key;

在本发明实施例中, 校验装置可根据读取的芯片密钥校验该具有 安全启动功能的芯片是否被替换。  In the embodiment of the present invention, the verification device can check whether the chip having the secure boot function is replaced according to the read chip key.

103、 若是, 则停止运行具有安全启动功能的芯片。 在本发明实施例中, 校验模块根据读取的芯片密钥校验具有安全 启动功能的芯片是否被替换, 且若确定该具有安全启动功能的芯片被替 换, 则校验模块将停止具有安全启动功能的芯片的运行。 103. If yes, stop running the chip with the secure boot function. In the embodiment of the present invention, the verification module verifies whether the chip with the secure boot function is replaced according to the read chip key, and if it is determined that the chip with the secure boot function is replaced, the verification module will stop having security. Start the function of the chip to run.

在本发明实施例中, 若校验模块确定该具有安全启动功能的芯片 未被替换,则将由具有安全启动功能的芯片继续执行利用 BOOT KEY对 用户 OS程序进行校验的步骤, 此处不再赘述。  In the embodiment of the present invention, if the verification module determines that the chip with the secure boot function is not replaced, the step of verifying the user OS program by using the BOOT KEY is continued by the chip with the secure boot function, and is no longer Narration.

在本发明实施例中, 具有安全启动功能的芯片启动用户 BOOT程 序且确定该用户 BOOT程序校验通过之后,承载该用户 BOOT程序的校 验装置将读取用于校验具有安全启动功能的芯片的芯片密钥, 并利用该 芯片密钥校验具有安全启动功能的芯片是否被替换, 且在该具有安全启 动功能的芯片被替换的情况下,将停止运行该具有安全启动功能的芯片, 以阻止单板上的程序的启动, 避免盗用网络或者攻击运营商网络的事件 发生, 确保了网络安全。  In the embodiment of the present invention, after the chip with the secure boot function starts the user BOOT program and determines that the user BOOT program passes the verification, the verification device that carries the user BOOT program reads the chip for verifying the safe boot function. Chip key, and use the chip key to verify whether the chip with the secure boot function is replaced, and in the case that the chip with the secure boot function is replaced, the chip with the secure boot function will be stopped, Prevents the startup of programs on the board, avoids theft of the network or attacks on the carrier's network, and ensures network security.

为了更好的理解本发明实施例中的技术方案, 请参阅图 2 , 为本发 明实施例中一种具有安全启动功能的芯片的校验方法的实施例, 包括: For a better understanding of the technical solution in the embodiment of the present invention, refer to FIG. 2, which is an embodiment of a verification method of a chip with a secure boot function according to an embodiment of the present invention, including:

201、在具有安全启动功能的芯片启动用户 BOOT程序且确定用户 BOOT程序校验通过之后, 承载用户 BOOT程序的校验装置从具有安全 启动功能的芯片中的 OTP 存储空间中读取用于校验具有安全启动功能 的芯片的芯片密钥; 201. After the user BOOT program is started by the chip with the secure boot function and the user BOOT program verification is determined, the verification device carrying the user BOOT program is read from the OTP storage space in the chip with the secure boot function for verification. Chip key of a chip with a secure boot function;

在本发明实施例中, 单板上的具有安全启动功能的芯片中的 OTP 存储空间中存储了用于校验该具有安全启动功能的芯片的芯片密钥, 该 芯片密钥具有唯一性, 可唯一标识一块芯片, 且芯片密钥可存储在 OTP 存储空间上的任意位置, 此外, OTP存储空间中还可存储其他的信息, 例如: PKEY、 BOOT KEY、 SMEK等等。  In the embodiment of the present invention, a chip key for verifying the chip with the secure boot function is stored in the OTP storage space in the chip with the secure boot function on the board, and the chip key is unique. Uniquely identifies a chip, and the chip key can be stored anywhere on the OTP storage space. In addition, other information can be stored in the OTP storage space, such as: PKEY, BOOT KEY, SMEK, and so on.

在本发明实施例中, 在具有安全启动功能的芯片启动用户 BOOT 程序且确定该用户 BOOT校验通过之后,承载用户 BOOT程序的校验装 置将从具有安全启动功能的芯片中的 OTP 存储空间中读取用于校验该 具有安全启动功能的芯片的芯片密钥,具体的:校验装置利用用户 BOOT 程序对应的一个嵌入式函数进行计算可得到用于校验具有安全启动功能 的芯片的芯片密钥在具有安全启动功能的芯片中的 OTP 存储空间中的 存储位置, 并按照该存储位置读取该芯片密钥。  In the embodiment of the present invention, after the user BOOT program is started by the chip with the secure boot function and it is determined that the user BOOT check is passed, the check device carrying the user BOOT program will be from the OTP storage space in the chip with the secure boot function. Reading a chip key for verifying the chip with the secure boot function, the specific: the verifying device calculates the chip for verifying the chip with the safe boot function by using an embedded function corresponding to the user BOOT program The key is stored in the OTP storage space in the chip with the secure boot function, and the chip key is read according to the storage location.

202、 利用预先设置的算法对芯片密钥进行处理, 得到芯片密钥的 特征; 202. Process the chip key by using a preset algorithm to obtain a chip key. Characteristic

在本发明实施例中, 校验装置在获得芯片密钥之后, 将利用预先 设置的算法对芯片密钥进行处理, 得到该芯片密钥的特征, 其中, 预置 的算法可以是哈希算法, 或者是其他的可对芯片密钥进行处理得到该芯 片密钥的特征的算法, 在实际应用中, 可根据具体的情况设置所使用的 算法, 此处不做限定, 其中, 特征可以是芯片密钥的长度、 校验和、 奇 偶位、 特征序列等等中的至少一个。  In the embodiment of the present invention, after obtaining the chip key, the verification device processes the chip key by using a preset algorithm to obtain a feature of the chip key, where the preset algorithm may be a hash algorithm. Or an algorithm that can process the chip key to obtain the feature of the chip key. In an actual application, the algorithm used may be set according to a specific situation, which is not limited herein. At least one of a length of a key, a checksum, a parity bit, a sequence of features, and the like.

203、 从 FLASH存储器中读取预先设置的芯片密钥的特征集合; 在本发明实施例中, 校验装置将从 FLASH存储器中读取预先设置 的芯片密钥的特征集合。  203. Read a feature set of the preset chip key from the FLASH memory. In the embodiment of the present invention, the verification device reads the feature set of the preset chip key from the FLASH memory.

204、 判断预先设置的芯片密钥的特征集合中是否包含处理得到的 芯片密钥的特征, , 若否则执行步骤 205 , 若是, 则执行步骤 206; 在本发明实施例中, 校验装置将判断预先设置的芯片密钥的特征 集合中是否包含处理得到的芯片密钥的特征。  204. Determine whether the feature set of the chip key set in advance includes the feature of the processed chip key, if otherwise, execute step 205, and if yes, perform step 206; in the embodiment of the present invention, the verification device determines Whether the feature set of the processed chip key is included in the feature set of the preset chip key.

205、 确定具有安全启动功能的芯片被替换, 继续执行步骤 207 ; 205, determining that the chip with the secure boot function is replaced, and continuing to step 207;

206、 确定具有安全启动功能的芯片未被替换; 206. Determine that the chip with the secure boot function is not replaced;

207、 停止运行具有安全启动功能的芯片。  207. Stop running the chip with safe boot function.

在本发明实施例中, 校验装置若确定预先设置的芯片密钥的特征 集合中包含得到的芯片密钥的特征, 则确定具有安全启动功能的芯片未 被替换, 若确定预先设置的芯片密钥的特征集合中未包含得到的芯片密 钥的特征, 则确定具有安全启动功能的芯片被替换了, 并非是该单板上 的最初的具有安全启动功能的芯片, 因此, 校验装置将停止运行该具有 安全启动功能的芯片。  In the embodiment of the present invention, if the verification device determines that the feature set of the chip key set in advance includes the feature of the obtained chip key, it is determined that the chip with the secure boot function is not replaced, and if the preset chip density is determined, If the feature set of the key does not contain the feature of the obtained chip key, it is determined that the chip with the secure boot function is replaced, not the original chip with the secure boot function on the board, and therefore, the verifying device will stop. Run the chip with the secure boot function.

在本发明实施例中, 若校验装置确定具有安全启动功能的芯片未 被替换, 则将继续由具有安全启动功能的芯片执行对用户 OS程序等程 序的校验及解密处理, 此处不再赘述。  In the embodiment of the present invention, if the verification device determines that the chip with the secure boot function is not replaced, the verification and decryption processing of the program such as the user OS program will continue to be performed by the chip having the secure boot function. Narration.

需要说明的是, 在本发明实施例中, 具有安全启动功能的芯片可 以是具有安全启动功能的 CPU。  It should be noted that, in the embodiment of the present invention, the chip with the secure boot function may be a CPU with a secure boot function.

在本发明实施例中, 在具有安全启动功能的芯片启动用户 BOOT 程序且确定该用户 BOOT程序通过校验之后,承载该用户 BOOT程序的 校验装置可从具有安全启动功能的芯片中的 OTP 存储空间中读取用于 校验具有安全启动功能的芯片的芯片密钥, 且利用预先设置的算法对该 芯片密钥进行处理, 得到该芯片密钥的特征, 且判断预先设置的芯片密 钥的特征集合中是否包含处理得到的该芯片密钥的特征, 若不包含, 则 确定具有安全启动功能的芯片被替换, 将停止运行该具有安全启动功能 的芯片, 以阻止单板上的程序的启动, 避免盗用网络或者攻击运营商网 络的事件发生, 确保了网络安全。 In the embodiment of the present invention, after the user BOOT program is started by the chip with the secure boot function and the user BOOT program is verified to pass the verification, the verification device carrying the user BOOT program can be stored from the OTP storage in the chip with the secure boot function. Reading a chip key for verifying a chip having a secure boot function in space, and using a preset algorithm The chip key is processed to obtain the feature of the chip key, and it is determined whether the feature set of the preset chip key includes the feature of the processed chip key, and if not, the chip with the secure boot function is determined. If it is replaced, the chip with the secure boot function will be stopped to prevent the startup of the program on the board, to avoid theft of the network or attacks on the carrier network, and to ensure network security.

请参阅图 3 ,为本发明实施例中一种具有安全启动功能的芯片的校 验装置的结构的实施例, 该校验装置承载了用户 BOOT程序, 包括: 读取单元 301 , 用于在具有安全启动功能的芯片启动用户 BOOT 程序且确定用户 BOOT程序校验通过之后, 读取用于校验具有安全启动 功能的芯片的芯片密钥;  Referring to FIG. 3, an embodiment of a structure of a calibration apparatus for a chip with a secure boot function is provided in the embodiment of the present invention. The verification apparatus carries a user BOOT program, and includes: a reading unit 301, configured to have The chip of the secure boot function starts the user BOOT program and determines that the user BOOT program passes the check, and reads the chip key for verifying the chip with the secure boot function;

校验单元 302 , 用于在读取单元 301读取芯片密钥之后, 根据芯片 密钥校验具有安全启动功能的芯片是否被替换;  a verifying unit 302, configured to verify, after the reading unit 301 reads the chip key, whether the chip having the secure boot function is replaced according to the chip key;

执行单元 303 ,用于若校验单元 302确定具有安全启动功能的芯片 被替换, 则停止运行具有安全启动功能的芯片。  The executing unit 303 is configured to stop running the chip with the secure boot function if the verifying unit 302 determines that the chip with the secure boot function is replaced.

在本发明实施例中, 在具有安全启动功能的芯片启动用户 BOOT 程序且确定用户 BOOT程序通过校验之后,承载该用户 BOOT程序的校 验装置中的读取单元 301读取用于校验具有安全启动功能的芯片的芯片 密钥, 接着, 校验单元 302根据该芯片密钥校验该具有安全启动功能的 芯片是否被替换, 且若校验单元 302确定该具有安全启动功能的芯片被 替换, 则执行单元 303停止运行该具有安全启动功能的芯片。  In the embodiment of the present invention, after the user BOOT program is started by the chip with the secure boot function and it is determined that the user BOOT program passes the verification, the reading unit 301 in the verification device that carries the user BOOT program reads for verification. The chip key of the chip of the secure boot function, next, the check unit 302 verifies whether the chip with the secure boot function is replaced according to the chip key, and if the check unit 302 determines that the chip with the secure boot function is replaced Then, the execution unit 303 stops running the chip with the secure boot function.

需要说明的是, 在本发明实施例中, 具有安全启动功能的芯片可 以是单板上的具有安全启动功能的 CPU。  It should be noted that, in the embodiment of the present invention, the chip with the secure boot function may be a CPU with a secure boot function on the board.

在本发明实施例中, 具有安全启动功能的芯片启动用户 BOOT程 序且确定该用户 BOOT程序校验通过之后,承载该用户 BOOT程序的校 验装置将读取用于校验具有安全启动功能的芯片的芯片密钥, 并利用该 芯片密钥校验具有安全启动功能的芯片是否被替换, 且在该具有安全启 动功能的芯片被替换的情况下,将停止运行该具有安全启动功能的芯片, 以阻止单板上的程序的启动, 避免盗用网络或者攻击运营商网络的事件 发生, 确保了网络安全。  In the embodiment of the present invention, after the chip with the secure boot function starts the user BOOT program and determines that the user BOOT program passes the verification, the verification device that carries the user BOOT program reads the chip for verifying the safe boot function. Chip key, and use the chip key to verify whether the chip with the secure boot function is replaced, and in the case that the chip with the secure boot function is replaced, the chip with the secure boot function will be stopped, Prevents the startup of programs on the board, avoids theft of the network or attacks on the carrier's network, and ensures network security.

为了更好的理解本发明实施例中的具有安全启动功能的芯片的校 验装置, 请参阅图 4 , 为本发明实施例中具有安全启动功能的芯片的校 验装置的结构的实施例, 包括: 如图 3所示实施例中的读取单元 301、校验单元 302、执行单元 303 , 且与图 3所示实施例中描述的内容相似, 此处不再赘述。 For a better understanding of the verification device of the chip with the safe start function in the embodiment of the present invention, please refer to FIG. 4 , which is an embodiment of a structure of a verification device for a chip with a safe start function according to an embodiment of the present invention, including : The reading unit 301, the checking unit 302, and the executing unit 303 in the embodiment shown in FIG. 3 are similar to those described in the embodiment shown in FIG. 3, and details are not described herein again.

在本发明实施例中, 校验单元 302包括:  In the embodiment of the present invention, the verification unit 302 includes:

计算单元 401 , 用于在读取单元 301读取芯片密钥之后, 利用预先 设置的算法对芯片密钥进行处理, 得到芯片密钥的特征;  The calculating unit 401 is configured to: after the reading unit 301 reads the chip key, process the chip key by using a preset algorithm to obtain a feature of the chip key;

判断单元 402 ,用于在计算单元 401计算得到芯片密钥的特征之后, 判断预先设置的芯片密钥的特征集合中是否包含处理得到的芯片密钥的 特征;  The determining unit 402 is configured to determine, after the computing unit 401 calculates the feature of the chip key, whether the feature set of the chip key set in advance includes the feature of the processed chip key;

确定单元 403 ,用于在判断单元 402判断得到预先设置的所述芯片 密钥的特征集合中未包含处理得到的所述芯片密钥的特征时, 确定所述 具有安全启动功能的芯片被替换; 及用于在所述判断单元判断计算得到 预先设置的所述芯片密钥的特征集合中包含处理得到的所述芯片密钥的 特征时, 确定所述具有安全启动功能的芯片未被替换。  a determining unit 403, configured to determine, when the determining unit 402 determines that the feature set of the chip key that is set in advance is not included in the processed feature of the chip key, to determine that the chip with the secure boot function is replaced; And determining, when the determining unit determines that the feature set of the chip key set in advance is included, the feature of the chip key obtained by the processing, and determining that the chip with the secure boot function is not replaced.

在本发明实施例中, 读取单元 301 具体用于从具有安全启动功能 的芯片中的一次性可编程技术 OTP 存储空间中读取用于校验具有安全 启动功能的芯片的芯片密钥。  In the embodiment of the present invention, the reading unit 301 is specifically configured to read a chip key for verifying a chip having a secure boot function from a one-time programmable technology OTP storage space in a chip having a secure boot function.

在本发明实施例中, 校验单元 302还包括:  In the embodiment of the present invention, the verification unit 302 further includes:

校验码读取单元 404 , 用于从 FLASH存储器中读取预先设置的芯 片密钥的特征集合。  The check code reading unit 404 is configured to read a feature set of the preset chip key from the FLASH memory.

在本发明实施例中, 在具有安全启动功能的芯片启动用户 BOOT 程序且确定用户 BOOT程序通过校验之后,承载该用户 BOOT程序的校 验装置中的读取单元 301读取用于校验具有安全启动功能的芯片的芯片 密钥, 接着, 校验单元 302中的计算单元 401利用预先设置的算法对芯 片密钥进行处理, 计算得到芯片密钥的特征; 并由校验单元 302中的校 验码读取单元 404从 FLASH存储器中读取预先设置的芯片密钥的特征 集合, 接着, 校验单元 302中的判断单元 402判断该预先设置的芯片密 钥的特征集合中的是否包含处理得到的芯片密钥的特征; 若判断单元 402 判断得到预先设置的所述芯片密钥的特征集合中未包含处理得到的 所述芯片密钥的特征时, 确定单元 403确定用户 BOOT程序被替换; 若 判断单元 402判断计算得到预先设置的所述芯片密钥的特征集合中包含 处理得到的所述芯片密钥的特征时, 则确定单元 403确定用户 BOOT程 序未被替换。 且若确定单元 403确定具有安全启动功能的芯片被替换, 则执行单元 303停止运行该具有安全启动功能的芯片。 In the embodiment of the present invention, after the user BOOT program is started by the chip with the secure boot function and it is determined that the user BOOT program passes the verification, the reading unit 301 in the verification device that carries the user BOOT program reads for verification. The chip key of the chip of the secure boot function, and then the computing unit 401 in the check unit 302 processes the chip key using a preset algorithm to calculate the feature of the chip key; and is verified by the check unit 302 The code reading unit 404 reads the feature set of the chip key set in advance from the FLASH memory, and then the determining unit 402 in the checking unit 302 determines whether the feature set in the preset chip key includes the processing. The feature of the chip key; if the determining unit 402 determines that the feature set of the chip key that is set in advance does not include the feature of the processed chip key, the determining unit 403 determines that the user BOOT program is replaced; The determining unit 402 determines that the feature set obtained by the calculation of the chip key set in advance includes the processed chip key The feature, the determination unit 403 determines that the user is not replaced BOOT program. And if the determining unit 403 determines that the chip with the secure boot function is replaced, Then, the execution unit 303 stops running the chip with the secure boot function.

需要说明的是, 在本发明实施例中, 具有安全启动功能的芯片的 校验装置可以是单板上的具有安全启动功能的 CPU。  It should be noted that, in the embodiment of the present invention, the verification device of the chip with the secure boot function may be a CPU with a secure boot function on the board.

在本发明实施例中, 在具有安全启动功能的芯片启动用户 BOOT 程序且确定该用户 BOOT程序通过校验之后,承载该用户 BOOT程序的 校验装置可从具有安全启动功能的芯片中的 OTP 存储空间中读取用于 校验具有安全启动功能的芯片的芯片密钥, 且利用预先设置的算法对该 芯片密钥进行处理, 得到该芯片密钥的特征, 且判断预先设置的芯片密 钥的特征集合中是否包含处理得到的该芯片密钥的特征, 若不包含, 则 确定具有安全启动功能的芯片被替换, 将停止运行该具有安全启动功能 的芯片, 以阻止单板上的程序的启动, 避免盗用网络或者攻击运营商网 络的事件发生, 确保了网络安全。  In the embodiment of the present invention, after the user BOOT program is started by the chip with the secure boot function and the user BOOT program is verified to pass the verification, the verification device carrying the user BOOT program can be stored from the OTP storage in the chip with the secure boot function. The chip key for verifying the chip with the secure boot function is read in the space, and the chip key is processed by using a preset algorithm to obtain the feature of the chip key, and the preset chip key is determined. Whether the feature set contains the characteristics of the processed chip key, and if not, it is determined that the chip with the secure boot function is replaced, and the chip with the secure boot function is stopped to prevent the startup of the program on the board. To avoid theft of the network or attacks on the carrier's network, ensuring network security.

请参阅图 5 ,为本发明实施例中的具有安全启动功能的芯片的校验 装置的结构的实施例, 包括:  Referring to FIG. 5, an embodiment of a structure of a verification device for a chip having a secure boot function according to an embodiment of the present invention includes:

处理器 501、 发送装置 502、 接收装置 503、 存储器 504 ;  a processor 501, a transmitting device 502, a receiving device 503, a memory 504;

其中, 处理器在具有安全启动功能的芯片启动用户 BOOT程序且 确定该用户 BOOT程序通过校验之后, 读取用于校验该具有安全启动功 能的芯片的芯片密钥; 并根据芯片密钥校验具有安全启动功能的芯片是 否被替换; 若具有安全启动功能的芯片被替换, 则停止运行该具有安全 启动功能的芯片。  Wherein, after the processor starts the user BOOT program on the chip with the secure boot function and determines that the user BOOT program passes the verification, reads the chip key for verifying the chip with the secure boot function; and according to the chip key Check if the chip with safe boot function is replaced; if the chip with safe boot function is replaced, stop the chip with safe boot function.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部 分步骤是可以通过程序来指令相关的硬件完成, 所述的程序可以存储于 一种计算机可读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光盘等。  A person skilled in the art can understand that all or part of the steps of implementing the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, the above mentioned storage. The medium can be a read only memory, a magnetic disk or a compact disk or the like.

以上对本发明所提供的一种具有安全启动功能的芯片的校验方法 及校验装置进行了详细介绍, 对于本领域的一般技术人员, 依据本发明 实施例的思想, 在具体实施方式及应用范围上均会有改变之处, 综上所 述, 本说明书内容不应理解为对本发明的限制。  The verification method and the calibration device of the chip with the safe start function provided by the present invention are described in detail above. For the person skilled in the art, according to the idea of the embodiment of the present invention, the specific implementation manner and the application range There is a change in the above, and the contents of the present specification should not be construed as limiting the invention.

Claims

权 利 要 求 书 Claim 1、 一种具有安全启动功能的芯片的校验方法, 其特征在于, 包括: 在所述具有安全启动功能的芯片启动用户引导 BOOT程序且确定所述用户 BOOT程序校验通过之后, 承载所述用户 BOOT程序的校验装置读取用于校验 所述具有安全启动功能的芯片的芯片密钥; A method for verifying a chip with a secure boot function, comprising: after the user having the secure boot function starts a user boot BOOT program and determines that the user BOOT program passes the verification, carrying the a verification device of the user BOOT program reads a chip key for verifying the chip having the secure boot function; 所述校验装置根据所述芯片密钥校验所述具有安全启动功能的芯片是否被 替换;  The verification device verifies whether the chip with the secure boot function is replaced according to the chip key; 若是, 则停止运行所述具有安全启动功能的芯片。  If so, the chip with the secure boot function is stopped. 2、 根据权利要求 1所述校验方法, 其特征在于, 所述校验装置根据所述芯 片密钥校验所述具有安全启动功能的芯片是否被替换包括:  2. The verification method according to claim 1, wherein the verification device verifies whether the chip having the secure boot function is replaced according to the chip key: 利用预先设置的算法对所述芯片密钥进行处理, 得到所述芯片密钥的特征; 判断预先设置的所述芯片密钥的特征集合中是否包含处理得到的所述芯片 密钥的特征;  Processing the chip key by using a preset algorithm to obtain a feature of the chip key; determining whether the feature set of the chip key set in advance includes a feature of the processed chip key; 若否, 则确定所述具有安全启动功能的芯片被替换;  If not, determining that the chip with the secure boot function is replaced; 若是, 则确定所述具有安全启动功能的芯片未被替换。  If so, it is determined that the chip with the secure boot function is not replaced. 3、 根据权利要求 1或 2所述的校验方法, 其特征在于, 所述承载所述用户 BOOT 程序的校验装置读取用于校验所述具有安全启动功能的芯片的芯片密钥 包括:  The verification method according to claim 1 or 2, wherein the verification device that carries the user BOOT program reads a chip key for verifying the chip with the secure boot function, including : 所述校验装置从所述具有安全启动功能的芯片中的一次性可编程技术 OTP 存储空间中读取用于校验所述具有安全启动功能的芯片的芯片密钥。  The verification device reads a chip key for verifying the chip having the secure boot function from the one-time programmable technology OTP storage space in the chip having the secure boot function. 4、 根据权利要求 1或 2所述的校验方法, 其特征在于, 所述方法还包括: 从 FLASH存储器中读取所述预先设置的所述芯片密钥的特征集合。  The verification method according to claim 1 or 2, wherein the method further comprises: reading the feature set of the chip key set in advance from the FLASH memory. 5、 一种具有安全启动功能的芯片的校验装置, 其特征在于, 所述校验装置 承载用户引导 BOOT程序, 该校验装置包括:  5. A calibration device for a chip having a secure boot function, wherein the verification device carries a user-guided BOOT program, the verification device comprising: 读取单元, 用于在具有安全启动功能的芯片启动所述用户 BOOT程序且确 定所述用户 BOOT程序校验通过之后, 读取用于校验所述具有安全启动功能的 芯片的芯片密钥;  a reading unit, configured to: after activating the user BOOT program by the chip having the secure boot function and determining that the user BOOT program passes the verification, reading a chip key for verifying the chip with the secure boot function; 校验单元, 用于在所述读取单元读取所述芯片密钥之后, 根据所述芯片密 钥校验所述具有安全启动功能的芯片是否被替换;  a verification unit, configured to verify, after the reading unit reads the chip key, whether the chip with the secure boot function is replaced according to the chip key; 执行单元, 用于若所述校验单元确定所述具有安全启动功能的芯片被替换, 则停止运行所述具有安全启动功能的芯片。 An execution unit, configured to: if the verification unit determines that the chip with the secure boot function is replaced, Then stop running the chip with the secure boot function. 6、 根据权利要求 5所述的校验装置, 其特征在于, 所述校验单元包括: 计算单元, 用于在所述读取单元读取所述芯片密钥之后, 利用预先设置的 算法对所述芯片密钥进行处理, 得到所述芯片密钥的特征;  The verification device according to claim 5, wherein the verification unit comprises: a calculation unit, configured to use a preset algorithm pair after the reading unit reads the chip key Processing the chip key to obtain a feature of the chip key; 判断单元, 用于在所述计算单元计算得到所述芯片密钥的特征之后, 判断 预先设置的所述芯片密钥的特征集合中是否包含处理得到的所述芯片密钥的特 征;  a determining unit, configured to determine, after the computing unit calculates the feature of the chip key, whether a feature set of the chip key set in advance includes a feature of the processed chip key; 确定单元, 用于在所述判断单元判断得到预先设置的所述芯片密钥的特征 集合中未包含处理得到的所述芯片密钥的特征时, 确定所述具有安全启动功能 的芯片被替换; 及用于在所述判断单元判断计算得到预先设置的所述芯片密钥 的特征集合中包含处理得到的所述芯片密钥的特征时, 确定所述具有安全启动 功能的芯片未被替换。  a determining unit, configured to determine, when the determining unit determines that a feature set of the chip key obtained in the preset is not included, to determine that the chip with the secure boot function is replaced; And determining, when the determining unit determines that the feature set of the chip key set in advance is included, the feature of the chip key obtained by the processing, and determining that the chip with the secure boot function is not replaced. 7、 根据权利要求 5或 6所述的校验装置, 其特征在于, 所述读取单元具体 用于从所述具有安全启动功能的芯片中的一次性可编程技术 OTP存储空间中读 取用于校验所述具有安全启动功能的芯片的芯片密钥。  The verification device according to claim 5 or 6, wherein the reading unit is specifically configured to read from a one-time programmable technology OTP storage space in the chip with the secure boot function. The chip key of the chip with the secure boot function is verified. 8、 根据权利要求 6所述的校验装置, 其特征在于, 所述校验单元还包括: 校验码读取单元,用于从 FLASH存储器中读取所述预先设置的所述芯片密 钥的特征集合。  The verification device according to claim 6, wherein the verification unit further comprises: a check code reading unit, configured to read the preset chip key from the FLASH memory Feature set.
PCT/CN2014/077447 2013-05-14 2014-05-14 Check method and check device for chip having secure startup function Ceased WO2014183643A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2013101786854A CN103279705A (en) 2013-05-14 2013-05-14 Validation method and validation device of chip with secure booting function
CN201310178685.4 2013-05-14

Publications (1)

Publication Number Publication Date
WO2014183643A1 true WO2014183643A1 (en) 2014-11-20

Family

ID=49062220

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/077447 Ceased WO2014183643A1 (en) 2013-05-14 2014-05-14 Check method and check device for chip having secure startup function

Country Status (2)

Country Link
CN (1) CN103279705A (en)
WO (1) WO2014183643A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279705A (en) * 2013-05-14 2013-09-04 上海华为技术有限公司 Validation method and validation device of chip with secure booting function
CN109542518B (en) * 2018-10-09 2020-12-22 华为技术有限公司 Chip and method of starting the chip
WO2020223950A1 (en) * 2019-05-09 2020-11-12 深圳市德明利技术股份有限公司 Method, apparatus and device for preventing data loss and system damage of usb flash disk
CN110990084B (en) * 2019-12-20 2023-01-24 紫光展讯通信(惠州)有限公司 Chip secure starting method and device, storage medium and terminal
CN112733208B (en) * 2020-12-31 2021-10-19 宸芯科技有限公司 Secure boot method and device of chip, secure chip and computer equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175268A (en) * 2006-10-31 2008-05-07 华为技术有限公司 Method and device for controlling operation authority of communication terminal chip
CN102111265A (en) * 2011-01-13 2011-06-29 中国电力科学研究院 Method for encrypting embedded secure access module (ESAM) of power system acquisition terminal
CN102946484A (en) * 2012-11-16 2013-02-27 Tcl通讯(宁波)有限公司 Method for unlocking mobile terminal by near-filed communication and system
CN103164789A (en) * 2013-03-06 2013-06-19 福州瑞芯微电子有限公司 Debug circuit structure provided with safety verification and achieving method of debug circuit structure provided with safety verification
CN103279705A (en) * 2013-05-14 2013-09-04 上海华为技术有限公司 Validation method and validation device of chip with secure booting function

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4656458B1 (en) * 2009-11-09 2011-03-23 Necインフロンティア株式会社 Handy terminal and payment method by handy terminal
CN102301381A (en) * 2011-07-08 2011-12-28 华为技术有限公司 Method and device for information security processing
CN102736586B (en) * 2012-05-21 2016-12-14 奇瑞新能源汽车技术有限公司 The entire car controller of a kind of pure electric automobile and system boot method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175268A (en) * 2006-10-31 2008-05-07 华为技术有限公司 Method and device for controlling operation authority of communication terminal chip
CN102111265A (en) * 2011-01-13 2011-06-29 中国电力科学研究院 Method for encrypting embedded secure access module (ESAM) of power system acquisition terminal
CN102946484A (en) * 2012-11-16 2013-02-27 Tcl通讯(宁波)有限公司 Method for unlocking mobile terminal by near-filed communication and system
CN103164789A (en) * 2013-03-06 2013-06-19 福州瑞芯微电子有限公司 Debug circuit structure provided with safety verification and achieving method of debug circuit structure provided with safety verification
CN103279705A (en) * 2013-05-14 2013-09-04 上海华为技术有限公司 Validation method and validation device of chip with secure booting function

Also Published As

Publication number Publication date
CN103279705A (en) 2013-09-04

Similar Documents

Publication Publication Date Title
CN109669734B (en) Method and apparatus for starting a device
CN102426640B (en) For the fail-safe software product identifiers of Product Validation and activation
TWI581630B (en) Secure key generating apparatus and method, host device and storage device
JP5703391B2 (en) System and method for tamper resistant boot processing
CN104462965B (en) Application integrity verification method and the network equipment
TWI436280B (en) Access authentication method for accessing basic input/output system settings
TW201732669A (en) Controlled secure code authentication
TW201502855A (en) Systems, methods and apparatuses for secure storage of data using a security-enhancing chip
CN107679425B (en) Trusted boot method based on firmware and USBKey combined full disk encryption
TW201802719A (en) Information authentication with security code verification
JP2006323814A (en) System and method for securely booting a computer having a trusted processing module
CN115033294A (en) Systems, methods and apparatus for secure non-volatile memory
CN104794394B (en) A kind of virtual machine starts the method and device of verification
JP6930884B2 (en) BIOS management device, BIOS management system, BIOS management method, and BIOS management program
CN105303094A (en) Safety self-verification system of USB main control chip and safety self-verification method of USB main control chip
US20170154184A1 (en) Operating system agnostic validation of firmware images
WO2014183643A1 (en) Check method and check device for chip having secure startup function
CN111177709A (en) A terminal trusted component execution method, device and computer equipment
CN112148314B (en) Mirror image verification method, device and equipment of embedded system and storage medium
EP3338214B1 (en) Secure computation environment
CN115329321B (en) A firmware boot method, chip, and computing device
KR102089435B1 (en) A secure boot method for secure usb device
WO2022170966A1 (en) Method and apparatus for launching application program on target platform
CN104715208A (en) Platform integrity checking method based on TPM chip
US10771249B2 (en) Apparatus and method for providing secure execution environment for mobile cloud

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

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

Country of ref document: EP

Kind code of ref document: A1