CN115359833A - A storage chip test key protection method, device and equipment - Google Patents
A storage chip test key protection method, device and equipment Download PDFInfo
- Publication number
- CN115359833A CN115359833A CN202211078642.4A CN202211078642A CN115359833A CN 115359833 A CN115359833 A CN 115359833A CN 202211078642 A CN202211078642 A CN 202211078642A CN 115359833 A CN115359833 A CN 115359833A
- Authority
- CN
- China
- Prior art keywords
- target key
- key
- chip
- test
- target
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C29/00—Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
- G11C29/04—Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
- G11C29/08—Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
- G11C29/10—Test algorithms, e.g. memory scan [MScan] algorithms; Test patterns, e.g. checkerboard patterns
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C29/00—Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
- G11C29/56—External testing equipment for static stores, e.g. automatic test equipment [ATE]; Interfaces therefor
- G11C29/56008—Error analysis, representation of errors
Landscapes
- Storage Device Security (AREA)
Abstract
Description
技术领域technical field
本申请涉及芯片密钥保护技术领域,尤其涉及一种存储芯片测试密钥保护方法、装置及设备。The present application relates to the technical field of chip key protection, in particular to a storage chip test key protection method, device and equipment.
背景技术Background technique
在存储类芯片领域,不同的晶圆生产工艺往往带来存储模块(Memory cell)的特性变化,因此需要整个存储模块的外围电路控制方法或控制精度也随之变化,其中包括:模拟模块的控制精度的选择、数字模块的控制方法的选择、数据通路的选择、电路工作速度的选择以及其他多个部分的选择或配置。例如,芯片内时钟振荡器(Oscillator)的生成电路的目标时钟是50MHz,考虑工艺的变化或生产过程中的偏差,设计人员通常会给振荡器做多个档位的RC参数选择。在芯片测试时,测试人员会让芯片进入测试模式,找到最接近50MHz的配置参数,然后将此选择信息存到启动存储模块(Boot memory)当中。In the field of storage chips, different wafer production processes often bring about changes in the characteristics of the memory cell, so the control method or control accuracy of the peripheral circuit of the entire memory module also changes accordingly, including: the control of the analog module Selection of accuracy, selection of control method of digital modules, selection of data path, selection of circuit operating speed, and selection or configuration of other multiple parts. For example, the target clock of the generation circuit of the on-chip clock oscillator (Oscillator) is 50MHz. Considering process changes or deviations in the production process, designers usually choose multiple RC parameters for the oscillator. During the chip test, the tester will let the chip enter the test mode, find the configuration parameter closest to 50MHz, and then store this selection information in the boot memory module (Boot memory).
当某一款设计优秀的芯片市场在市场销售情况很好时,其他机构或者个人有可能对该芯片进行开盖、电路拍照并分析,并测试模式下进行电路实测分析。该情况下,如果进入芯片测试的密钥比较简单或者保护强度较低时,其他机构或者个人通常可以通过shmoo测试猜出密钥,或者通过拍照电路逻辑分析推理出密钥。得到密钥后,通过测试机进入芯片测试模式,获取芯片的配置参数,并进行大量、复杂的电路实测分析,最终理解电路的设计思路和设计重点。When a well-designed chip is sold well in the market, other organizations or individuals may open the chip, take pictures of the circuit and analyze it, and conduct actual circuit measurement and analysis in test mode. In this case, if the key to enter the chip test is relatively simple or the protection strength is low, other organizations or individuals can usually guess the key through the shmoo test, or deduce the key through logical analysis of the camera circuit. After obtaining the key, enter the chip test mode through the testing machine, obtain the configuration parameters of the chip, and conduct a large number of complex circuit measurement and analysis, and finally understand the design ideas and design points of the circuit.
因此,通过电路设计保护存储芯片的测试密钥非常重要,可以进一步保护出厂后的芯片电路的配置参数不被改写或不被研究和抄袭。Therefore, it is very important to protect the test key of the memory chip through circuit design, which can further protect the configuration parameters of the chip circuit after leaving the factory from being rewritten or researched and plagiarized.
发明内容Contents of the invention
有鉴于此,本申请实施例提供了一种存储芯片测试密钥保护方法、装置及设备,旨在通过电路设计保护存储芯片的测试密钥。In view of this, the embodiments of the present application provide a storage chip test key protection method, device and equipment, aiming at protecting the storage chip test key through circuit design.
一方面,本申请提出一种存储芯片测试密钥保护方法,所述方法包括:On the one hand, the present application proposes a storage chip test key protection method, the method comprising:
芯片重新上电时,目标密钥处理模块获得预存的目标密钥及目标密钥使能字段,所述目标密钥是除芯片初次测试输入的初始密钥以外的密钥,所述目标密钥使能字段包括用于控制测试控制模块启用的端口电平信号;When the chip is powered on again, the target key processing module obtains the prestored target key and the target key enable field, the target key is a key other than the initial key input for the initial test of the chip, and the target key The enable field includes a port level signal for controlling the enabling of the test control module;
目标密钥处理模块将目标密钥加载至掉电清空数据的目标密钥寄存器;The target key processing module loads the target key into the target key register of power-off clear data;
目标密钥处理模块根据目标密钥使能字段的端口电平信号控制测试控制模块的启用,以便测试控制模块接收并对比用户输入密钥与目标密钥是否一致,判断用户输入密钥是否正确。The target key processing module controls the activation of the test control module according to the port level signal of the target key enable field, so that the test control module receives and compares whether the user input key is consistent with the target key, and judges whether the user input key is correct.
可选的,芯片重新上电时,目标密钥处理模块获得预存的目标密钥及目标密钥使能字段,具体包括:Optionally, when the chip is powered on again, the target key processing module obtains the pre-stored target key and target key enable field, specifically including:
将目标密钥及目标密钥使能字段写入启动存储模块;Write the target key and the target key enable field into the boot storage module;
芯片重新上电,目标密钥处理模块获得启动逻辑模块从启动存储模块中加载的目标密钥及目标密钥使能字段。The chip is powered on again, and the target key processing module obtains the target key and the target key enable field loaded by the boot logic module from the boot storage module.
可选的,将目标密钥及目标密钥使能字段写入启动存储模块,包括:Optionally, write the target key and the target key enable field into the boot storage module, including:
所述目标密钥及目标密钥使能字段通过编程指令写入启动存储模块,所述目标密钥及目标密钥使能字段写入启动存储模块的写入次数根据启动存储模块的可编程次数确定。The target key and the target key enable field are written into the start storage module by programming instructions, and the write times of the target key and the target key enable field are written into the start storage module according to the programmable times of the start storage module Sure.
可选的,目标密钥处理模块将目标密钥加载至掉电清空数据的目标密钥寄存器,进一步包括:Optionally, the target key processing module loads the target key into the target key register of power-off clear data, further including:
目标密钥处理模块对目标密钥进行数据处理形成处理后的目标密钥;The target key processing module performs data processing on the target key to form a processed target key;
将处理后的目标密钥加载至掉电清空数据的目标密钥寄存器。Load the processed target key into the target key register for power-off clear data.
可选的,对目标密钥进行数据处理,包括:Optionally, perform data processing on the target key, including:
对目标密钥进行取反,和/或,对所述目标密钥加固定值。Negating the target key, and/or adding a fixed value to the target key.
可选的,所述芯片重新上电为第二阶段,在第二阶段之前还设置有第一阶段,所述第一阶段包括:Optionally, the chip is powered on again as the second stage, and there is also a first stage before the second stage, and the first stage includes:
芯片初次上电,测试控制模块对比用户输入的初始密钥与预先保存的初始密钥是否一致,若一致,测试控制模块通过测试使能开启芯片初次测试;When the chip is powered on for the first time, the test control module compares whether the initial key input by the user is consistent with the pre-saved initial key. If they are consistent, the test control module passes the test to enable the initial chip test;
芯片初次测试完成,使用编程指令将目标密钥及目标密钥使能字段写入启动存储模块,用于等待芯片重新上电。After the initial test of the chip is completed, the target key and the target key enable field are written into the boot storage module using programming instructions to wait for the chip to be powered on again.
第二方面,本申请还提出一种存储芯片测试密钥保护装置,包括目标密钥处理模块、目标密钥寄存器和测试控制模块,In the second aspect, the present application also proposes a storage chip test key protection device, including a target key processing module, a target key register and a test control module,
目标密钥处理模块用于芯片重新上电时,获得预先保存的目标密钥及目标密钥使能字段,并将目标密钥加载至掉电清空数据的目标密钥寄存器,所述目标密钥是除芯片初次测试输入的初始密钥以外的密钥,所述目标密钥使能字段包括用于控制测试控制模块启用的端口电平信号;The target key processing module is used to obtain the pre-saved target key and the target key enable field when the chip is powered on again, and load the target key into the target key register of power-off clear data, the target key is a key other than the initial key input for the initial test of the chip, and the target key enabling field includes a port level signal for controlling the enabling of the test control module;
目标密钥处理模块还用于根据目标密钥使能字段的端口电平信号控制测试控制模块的启用,以便测试控制模块接收并对比用户输入密钥与目标密钥是否一致,判断用户输入密钥是否正确;The target key processing module is also used to control the enablement of the test control module according to the port level signal of the target key enable field, so that the test control module receives and compares whether the user input key is consistent with the target key, and judges the user input key is it right or not;
所述测试控制模块还设置有用于用户输入密钥的输入端口。The test control module is also provided with an input port for a user to input a key.
可选的,该装置还包括:启动存储模块和启动逻辑模块,Optionally, the device also includes: a startup storage module and a startup logic module,
所述启动存储模块用于存储目标密钥及目标密钥使能字段;The startup storage module is used to store the target key and the target key enable field;
所述启动逻辑模块分别与启动存储模块、目标密钥处理模块电性连接,用于将启动存储模块中的目标密钥及目标密钥使能字段加载到目标密钥处理模块。The startup logic module is electrically connected with the startup storage module and the target key processing module respectively, and is used for loading the target key and the target key enable field in the startup storage module to the target key processing module.
可选的,所述芯片重新上电为第二阶段,在第二阶段之前还设置有第一阶段,在第一阶段,该装置还包括:初始密钥模块,Optionally, the chip is powered on again as the second stage, and there is a first stage before the second stage. In the first stage, the device also includes: an initial key module,
所述初始密钥模块用于保存初始密钥,以便测试控制模块在芯片上电时,对比保存的初始密钥和用户输入初始密钥是否一致,若一致,测试控制模块通过测试使能开启芯片初次测试,以便芯片初次测试完成后,向启动存储模块中写入目标密钥及目标密钥使能字段,用于等待芯片重新上电。The initial key module is used to save the initial key, so that the test control module compares whether the stored initial key is consistent with the user input initial key when the chip is powered on, and if consistent, the test control module enables the chip to be opened by testing The initial test, so that after the initial test of the chip is completed, the target key and the target key enable field are written into the boot storage module to wait for the chip to be powered on again.
第三方面,本申请还提出一种存储芯片测试密钥保护设备,包括存储器和处理器,所述存储器用于存储计算机程序,所述处理器调用所述计算机程序时,实现上述的一种存储芯片测试密钥保护方法。In the third aspect, the present application also proposes a storage chip test key protection device, including a memory and a processor, the memory is used to store a computer program, and when the processor invokes the computer program, the above-mentioned storage Chip test key protection method.
本申请实施例提供了一种存储芯片测试密钥保护方法、装置及设备。在本申请技术方案中,相比于已有技术,不再采用测试控制模块直接获取已保存的密钥与用户输入的密钥对比的固定电路形式,增设了目标密钥处理模块和目标密钥寄存器。在芯片每次断电后目标密钥寄存器数据消失,需要芯片上电,目标密钥处理模块才能获取预存的目标密钥及目标密钥使能,时序较复杂,目标密钥处理模块加载目标密钥存储至掉电数据清空的目标密钥寄存器,目标密钥处理模块根据目标密钥使能字段的端口电平信号控制测试控制模块启用,在目标密钥寄存器获得目标密钥,且测试控制模块处于启用工作状态下,才能对比用户输入的密钥和目标目标密钥寄存器中保存的目标密钥是否一致,进而判断是够开启芯片测试电路,电路复杂度提升,使其他机构或者个人难以通过电路分析获得目标密钥和目标密钥使能字段,使电路能够很好的保护目标密钥和目标密钥使能这两个关键信息。Embodiments of the present application provide a storage chip test key protection method, device and equipment. In the technical solution of this application, compared with the prior art, the test control module no longer uses the fixed circuit form of directly obtaining the stored key and the key input by the user, and adds a target key processing module and a target key register. The data in the target key register disappears every time the chip is powered off, and the target key processing module needs to be powered on to obtain the pre-stored target key and enable the target key. The key is stored in the target key register where the power-down data is cleared, the target key processing module controls the test control module to enable according to the port level signal of the target key enable field, obtains the target key in the target key register, and the test control module In the enabled working state, it is possible to compare whether the key entered by the user is consistent with the target key stored in the target target key register, and then judge whether it is enough to open the chip test circuit. The complexity of the circuit increases, making it difficult for other organizations or individuals to pass through the circuit. The field of target key and target key enablement is obtained through analysis, so that the circuit can well protect the two key information of target key and target key enablement.
附图说明Description of drawings
为更清楚地说明本实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the accompanying drawings that need to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings in the following description are only For some embodiments of the present application, those of ordinary skill in the art can also obtain other drawings based on these drawings without creative effort.
图1为本申请实施例提供的一种存储芯片测试密钥保护方法流程图;Fig. 1 is a flow chart of a storage chip test key protection method provided by an embodiment of the present application;
图2为本申请实施例提供的芯片初次上电时,测试控制模块启动芯片测试电路方法流程图;Fig. 2 is a flow chart of the method for starting the chip test circuit by the test control module when the chip provided by the embodiment of the present application is powered on for the first time;
图3为本申请实施例提供的获得预先保存的目标密钥及目标密钥使能的方法流程图;FIG. 3 is a flowchart of a method for obtaining a pre-saved target key and target key enablement provided by an embodiment of the present application;
图4为本申请实施例提供的一种存储芯片测试密钥保护方法场景流程图;FIG. 4 is a scenario flow chart of a storage chip test key protection method provided in an embodiment of the present application;
图5为本申请实施例提供的一种存储芯片测试密钥保护装置示意图;FIG. 5 is a schematic diagram of a memory chip test key protection device provided in an embodiment of the present application;
图6为本申请实施例提供的存储芯片测试密钥保护装置原理图。FIG. 6 is a schematic diagram of a storage chip test key protection device provided by an embodiment of the present application.
具体实施方式Detailed ways
现有的存储芯片测试保护技术中,通过测试控制模块从测试初始密钥中获取预先保存的初始密钥,并将预先保存的初始密钥与用户输入的密钥对比,电路简单,造成存储芯片测试保护不安全,通过shmoo测试或者通过拍照电路逻辑分析,容易得到测试密钥,拍照电路逻辑分析还可以得到测试模式下的指令。一旦测试密钥被破译,其他机构或者个人可以随意的做电路分析所需的测试实验,优秀电路被抄袭的风险比较大。In the existing memory chip test protection technology, the pre-stored initial key is obtained from the test initial key through the test control module, and the pre-stored initial key is compared with the key input by the user. The circuit is simple and the memory chip is damaged. The test protection is not safe. It is easy to get the test key through the shmoo test or through the logic analysis of the camera circuit, and the instructions in the test mode can also be obtained through the logic analysis of the camera circuit. Once the test key is deciphered, other institutions or individuals can do the test experiments required for circuit analysis at will, and the risk of excellent circuits being plagiarized is relatively high.
相比于已有技术,发明人考虑不再采用测试控制模块直接获取已保存的密钥与用户输入的密钥对比的固定电路形式,增设了目标密钥处理模块和目标密钥寄存器。在芯片每次断电后目标密钥寄存器数据消失,需要芯片上电,目标密钥处理模块才能获取预存的目标密钥及目标密钥使能,时序较复杂,目标密钥处理模块加载目标密钥存储至掉电数据清空的目标密钥寄存器,目标密钥处理模块根据目标密钥使能字段的端口电平信号控制测试控制模块启用,在目标密钥寄存器获得目标密钥,且测试控制模块处于启用工作状态下,才能对比用户输入的密钥和目标目标密钥寄存器中保存的目标密钥是否一致,进而判断是够开启芯片测试电路,电路复杂度提升,使其他机构或者个人难以通过电路分析获得目标密钥和目标密钥使能字段,进一步的,目标密钥处理模块还可对目标密钥进行数据处理后再保存到目标密钥寄存器中,提升其他机构或者个人通过分析电路推理出目标密钥的难度,进一步的,通过编程指令将目标密钥及目标密钥使能写入芯片测试电路的启动存储模块中,不同芯片批次可设置不同的目标密钥,提高对目标密钥的保护力度。若其他机构或者个人通过聚焦离子束(FIB,Focused Ion beam)等方法强行修改目标密钥寄存器内容,但目标密钥寄存器位宽较大,修改难度大,即使修改成功,也仅限一个芯片,远远达不到测试电路实验所需的芯片个数。Compared with the prior art, the inventor considers no longer using the fixed circuit form in which the test control module directly obtains the stored key and compares it with the key input by the user, and adds a target key processing module and a target key register. The data in the target key register disappears every time the chip is powered off, and the target key processing module needs to be powered on to obtain the pre-stored target key and enable the target key. The key is stored in the target key register where the power-down data is cleared, the target key processing module controls the test control module to enable according to the port level signal of the target key enable field, obtains the target key in the target key register, and the test control module In the enabled working state, it is possible to compare whether the key entered by the user is consistent with the target key stored in the target target key register, and then judge whether it is enough to open the chip test circuit. The complexity of the circuit increases, making it difficult for other organizations or individuals to pass through the circuit. Analyze and obtain the target key and the target key enable field. Further, the target key processing module can also perform data processing on the target key and then save it in the target key register, so as to improve other institutions or individuals to infer The difficulty of the target key. Further, the target key and the target key enable are written into the boot memory module of the chip test circuit through programming instructions. Different chip batches can be set with different target keys to improve the accuracy of the target key. protection strength. If other organizations or individuals forcibly modify the contents of the target key register through methods such as focused ion beam (FIB, Focused Ion beam), but the bit width of the target key register is large, the modification is difficult, and even if the modification is successful, it is limited to one chip. It is far from reaching the number of chips required for the test circuit experiment.
本申请实施例中,硬件设备可以包括:In the embodiment of this application, the hardware device may include:
用于存储初始密钥的初始密钥存储器。Initial key store for storing initial keys.
用于芯片上电临时存储目标密钥的目标密钥寄存器。The target key register is used to temporarily store the target key when the chip is powered on.
用于存储目标密钥及目标密钥使能的启动存储模块。A boot storage module used to store the target key and the target key enablement.
用于测试芯片的芯片测试电路,所述启动存储模块设置与芯片测试电路中。The chip testing circuit is used for testing the chip, and the boot storage module is set in the chip testing circuit.
用于对比芯片存储的密钥与用户输入的密钥是否一致的测试控制模块,若一致,测试控制模块控制芯片测试电路开启芯片测试。The test control module is used to compare whether the key stored in the chip is consistent with the key input by the user. If they are consistent, the test control module controls the chip test circuit to start the chip test.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
图1为本申请实施例提供的一种存储芯片测试密钥保护方法流程图,参见图1,一种存储芯片测试密钥保护方法,包括:Fig. 1 is a flow chart of a method for protecting a memory chip test key provided in an embodiment of the present application. Referring to Fig. 1, a method for protecting a memory chip test key includes:
S101、芯片重新上电时,目标密钥处理模块获得预存的目标密钥及目标密钥使能字段。S101. When the chip is powered on again, the target key processing module obtains the pre-stored target key and the target key enable field.
所述目标密钥是除芯片初次测试输入的初始密钥以外的密钥,所述芯片重新上电为第二阶段,在第二阶段之前设置有第一阶段,第一阶段为芯片初次上电时,还未向芯片测试电路中保存目标密钥及目标密钥使能字段,需要通过初始密钥控制芯片测试电路的开启,第一阶段结束后,芯片再次上电均采用目标密钥。The target key is a key other than the initial key input for the initial test of the chip. The chip is powered on again as the second stage. Before the second stage, there is a first stage. The first stage is the initial power-on of the chip. At this time, the target key and the target key enable field have not been saved in the chip test circuit, and the opening of the chip test circuit needs to be controlled by the initial key. After the first stage is over, the target key is used when the chip is powered on again.
所述目标密钥使能字段包括用于控制测试控制模块启用的端口电平信号。The target key enable field includes a port level signal for controlling the enable of the test control module.
S102、目标密钥处理模块将目标密钥加载至掉电清空数据的目标密钥寄存器。S102. The target key processing module loads the target key into a target key register whose data is cleared after power-off.
所述目标密钥寄存器采用掉电清空数据的目标密钥寄存器,在芯片未上电时,外界无法从数据清空的目标密钥寄存器中获取密钥,芯片上电后,目标密钥处理模块可将目标密钥进行数据处理,将数据处理后的目标密钥加载至目标密钥其中,增加其他机构或者个人通过分析电路推理获取密钥的难度,当然,目标密钥处理模块也可不对目标密钥做数据处理。The target key register adopts a target key register that clears data when power is off. When the chip is not powered on, the outside world cannot obtain the key from the target key register that is cleared from data. After the chip is powered on, the target key processing module can Perform data processing on the target key, load the target key after data processing into the target key, and increase the difficulty for other organizations or individuals to obtain the key through analytical circuit reasoning. Of course, the target key processing module may not key for data processing.
S103、目标密钥处理模块根据目标密钥使能字段的端口电平信号控制测试控制模块的启用,以便测试控制模块接收并对比用户输入密钥与目标密钥是否一致,判断用户输入密钥是否正确。S103, the target key processing module controls the enablement of the test control module according to the port level signal of the target key enable field, so that the test control module receives and compares whether the user input key is consistent with the target key, and judges whether the user input key is correct.
芯片上电时,目标密钥处理模块获取目标密钥使能字段,例如字段为:FINAL_KEY_EN=1,则目标密钥处理模块根据目标密钥使能字段的端口电平指示,以目标密钥使能FINAL_KEY_EN高电平开启测试控制模块处于工作状态,进而,控制测试控制模块才能对比用户输入密钥与目标密钥是够一致,但若芯片未上电或目标密钥使能不正确均不能启用测试控制模块。When the chip is powered on, the target key processing module obtains the target key enable field, for example, the field is: FINAL_KEY_EN=1, then the target key processing module uses the target key to enable the field according to the port level indication of the target key enable field. The FINAL_KEY_EN high level can be turned on and the test control module is in the working state. Then, the control test control module can compare the key input by the user with the target key. However, if the chip is not powered on or the target key is not enabled correctly, it cannot be enabled. Test control module.
本申请设置目标密钥处理模块和目标密钥寄存器,在芯片每次断电后目标密钥寄存器数据消失,目标密钥和目标密钥使能字段通过编程指令预存于芯片测试电路的存储中,在每次芯片重新上电,目标密钥处理模块重新获取目标密钥及目标密钥使能,与已知的技术相比,本申请不再仅仅采用第一阶段中的固定电路,需要芯片上电,才能调取目标密钥和目标密钥使能字段,进而开启测试控制模块进入工作状态,此时,用户输入密钥,测试控制模块才能进行用户输入密钥与目标密钥寄存器中保存的密钥对比,时序及电路复杂度均有提升,提高其他机构或者个人通过电路分析判断推理出最终密钥和最终密钥使能字段的难度。This application sets the target key processing module and the target key register. After the chip is powered off each time, the target key register data disappears, and the target key and target key enable fields are pre-stored in the memory of the chip test circuit through programming instructions. Every time the chip is powered on again, the target key processing module reacquires the target key and the target key enablement. Compared with the known technology, this application no longer only uses the fixed circuit in the first stage, but requires power, the target key and the target key enable field can be called, and then the test control module is turned on to enter the working state. Key comparison, timing and circuit complexity are all improved, making it more difficult for other organizations or individuals to deduce the final key and the final key enable field through circuit analysis and judgment.
在本申请一实施例中,上述图1所述的步骤S101中,芯片重新上电时为第二阶段,在第二阶段之前还设置有第一阶段,所述第一阶段为芯片初次上电时,还未预存目标密钥和目标密钥使能时,通过测试控制模块启动芯片测试电路的实现方式下面进行具体介绍。需要说明的是,下文介绍中给出的实现方式仅作为示例性的说明,并不代表本申请实施例的全部实现方式。In an embodiment of the present application, in step S101 described in FIG. 1 above, when the chip is powered on again, it is the second stage, and there is a first stage before the second stage, and the first stage is the initial power-on of the chip When the target key is not pre-stored and the target key is enabled, the implementation of starting the chip test circuit through the test control module will be described in detail below. It should be noted that the implementation manners given in the introduction below are only exemplary descriptions, and do not represent all implementation manners of the embodiments of the present application.
图2为本申请实施例提供的芯片初次上电时,测试控制模块启动芯片测试电路方法流程图,参见图2,第一阶段,包括:Fig. 2 is a flow chart of the method for starting the chip test circuit by the test control module when the chip provided by the embodiment of the present application is powered on for the first time, referring to Fig. 2, the first stage includes:
S201、芯片初次上电,测试控制模块对比用户输入的初始密钥与预先保存的初始密钥是否一致,若一致,测试控制模块通过测试使能开启芯片初次测试。S201. The chip is powered on for the first time, and the test control module compares whether the initial key input by the user is consistent with the pre-stored initial key. If they are consistent, the test control module passes the test enable and starts the initial test of the chip.
所述初始密钥是芯片生产设置的初始密钥,用于出厂前初次启动芯片进行芯片测试时使用,在芯片第一次进行测试时,初始密钥测试采用固定电路,测试控制模块直接对用户输入的初始密钥和预存的初始密钥进行对比,能够快速获得芯片测试电路的使用权限,加快芯片出厂进程。The initial key is the initial key set by chip production, which is used when the chip is started for the first time before leaving the factory for chip testing. When the chip is tested for the first time, the initial key test uses a fixed circuit, and the test control module directly communicates to the user. Comparing the input initial key with the pre-stored initial key can quickly obtain the access to the chip test circuit and speed up the process of chip delivery.
S202、芯片初次测试完成,使用编程指令将目标密钥及目标密钥使能字段写入启动存储模块,用于等待芯片重新上电。S202 , the initial test of the chip is completed, and the target key and the target key enable field are written into the boot storage module by using a programming instruction, so as to wait for the chip to be powered on again.
芯片初次测试完成,测试合格,可安排芯片出厂,为防止其他机构或者个人对电路分析破解,将目标密钥以及目标密钥使能字段写入芯片测试电路内部的启动存储模块,而非采用初始密钥的固定电路进行密钥正确性判断,目标密钥控制模块通过目标密钥及目标密钥使能字段来控制测试控制模块,增加电路复杂程度,提高其他机构或个人通过电路分析推理破解密钥的难度。After the initial test of the chip is completed and the test is passed, the chip can be arranged to leave the factory. In order to prevent other organizations or individuals from analyzing and cracking the circuit, the target key and the target key enable field are written into the startup storage module inside the chip test circuit instead of using the initial The fixed circuit of the key is used to judge the correctness of the key. The target key control module controls the test control module through the target key and the target key enable field, which increases the complexity of the circuit and improves the ability of other organizations or individuals to crack the password through circuit analysis and reasoning. key difficulty.
初始密钥设置是为了方便芯片在出厂前进行快速启动芯片,此时,芯片的还未出厂,芯片安全,可直接通过测试控制模块对比用户输入初始密钥与预先保存的初始密钥对比,获得芯片测试电路的使用权限,提高芯片出厂效率;目标密钥和目标密钥使能字段是用于芯片出厂后,配合目标密钥处理模块进行使用,且只有芯片上电才能调用目标密钥及目标密钥使能,增加电路时序复杂性,及电路的复杂程度,提高芯片出厂后,芯片测试电路的安全性。The initial key setting is to facilitate the chip to quickly start the chip before leaving the factory. At this time, the chip has not yet been shipped, and the chip is safe. You can directly compare the initial key entered by the user with the pre-saved initial key through the test control module. The use authority of the chip test circuit improves the efficiency of chip delivery; the target key and target key enable fields are used for use with the target key processing module after the chip leaves the factory, and the target key and target key can only be called when the chip is powered on. The key enablement increases the complexity of the circuit timing and the complexity of the circuit, and improves the security of the chip test circuit after the chip leaves the factory.
在本申请另一实施例中,上述图1所述的步骤S101实现方式下面进行具体介绍。需要说明的是,下文介绍中给出的实现方式仅作为示例性的说明,并不代表本申请实施例的全部实现方式。In another embodiment of the present application, the implementation manner of step S101 described above in FIG. 1 will be described in detail below. It should be noted that the implementation manners given in the introduction below are only exemplary descriptions, and do not represent all implementation manners of the embodiments of the present application.
图3为本申请实施例提供的获得预先保存的目标密钥及目标密钥使能的方法流程图,对目标密钥处理模块重新获得目标密钥及目标密钥使能进行了进一步的说明,参见图3,芯片重新上电时,获得预先保存的目标密钥及目标密钥使能,包括:FIG. 3 is a flow chart of a method for obtaining a pre-saved target key and target key enablement provided by an embodiment of the present application, further illustrating the target key processing module to obtain the target key and target key enablement again. See Figure 3. When the chip is powered on again, the pre-saved target key and target key enablement are obtained, including:
S301、将目标密钥及目标密钥使能字段写入启动存储模块。S301. Write the target key and the target key enable field into the boot storage module.
所述启动存储模块为芯片测试电路中自有的启动存储模块,芯片启动即可从中调用存储的数据和参数,所述目标密钥及目标密钥使能字段通过编程指令写入启动存储模块,所述目标密钥及目标密钥使能字段写入启动存储模块的写入次数根据启动存储模块的可编程次数确定。The starting storage module is a self-starting storage module in the chip test circuit, and the chip can be started to call stored data and parameters therefrom, and the target key and the target key enabling field are written into the starting storage module by programming instructions, The writing times of the target key and the target key enabling field into the boot storage module are determined according to the programmable times of the boot storage module.
S302、芯片重新上电,目标密钥处理模块获得启动逻辑模块从启动存储模块中加载的目标密钥及目标密钥使能字段。S302. The chip is powered on again, and the target key processing module obtains the target key and the target key enable field loaded by the boot logic module from the boot storage module.
所述启动逻辑可设置于芯片测试电路中与启动存储模块连接,启动逻辑也可设置于目标密钥处理模块中与芯片测试电路中的启动存储模块连接。The startup logic can be arranged in the chip test circuit and connected with the startup storage module, and the startup logic can also be arranged in the target key processing module and connected with the startup storage module in the chip test circuit.
芯片重新上电,启动存储模块从启动存储模块中加载目标密钥及目标密钥使能字段加载到目标密钥处理模块,改变已有技术中密钥存储在固定位置,测试控制模块可直接调用对比的方案,而是最终密钥和最终密钥使能字段存储在启动存储区域,需要通过启动逻辑载入,时序复杂,增加竞争对手通过电路分析判断最终密钥和最终密钥使能字段的难度。The chip is powered on again, and the boot storage module loads the target key and the target key enable field from the boot storage module to the target key processing module, changing the existing technology where the key is stored in a fixed location, and the test control module can be directly called Compared with the scheme, the final key and the final key enable field are stored in the boot storage area, which needs to be loaded through the boot logic, and the timing is complicated, which increases the time for competitors to judge the final key and the final key enable field through circuit analysis. difficulty.
通过编程指令将目标密钥及目标密钥使能字段写入芯片测试电路的启动存储模块中,不同芯片批次可设置不同的目标密钥,提高对目标密钥的保护,当启动存储模块的可编程次数为多次时,可后期对芯片中的目标密钥进行更改,目标密钥不唯一,提高芯片测试电路的安全性。Write the target key and the target key enable field into the start-up storage module of the chip test circuit through programming instructions. Different chip batches can set different target keys to improve the protection of the target key. When the start-up storage module When the number of programmable times is multiple, the target key in the chip can be changed later, and the target key is not unique, which improves the security of the chip test circuit.
上面介绍了本申请实施例提供的一种存储芯片测试密钥保护方法,下面结合具体的应用场景,对该存储芯片测试密钥方法做示例性的说明。A storage chip test key protection method provided by the embodiment of the present application has been introduced above, and the method for the storage chip test key will be exemplarily described below in combination with specific application scenarios.
图4为本申请实施例提供的一种存储芯片测试密钥保护方法场景流程图,参见图4,一种存储芯片测试密钥保护方法,包括:Fig. 4 is a scenario flowchart of a storage chip test key protection method provided in an embodiment of the present application. Referring to Fig. 4, a storage chip test key protection method includes:
S401、芯片设计原厂的测试人员通过测试机台输入初始密钥,测试控制模块将输入初始密钥与预先存储的初始密钥对比,若一致,测试控制模块便通过测试使能(TEST_EN=1)开启芯片初次测试,芯片初次测试包括被测电路的测试功能、或者开启测试通路、或者开启测试指令的识别。S401, the tester of the original chip design factory inputs the initial key through the test machine, and the test control module compares the input initial key with the pre-stored initial key, and if they are consistent, the test control module passes the test enable (TEST_EN=1 ) start the initial test of the chip, and the initial test of the chip includes the test function of the circuit under test, or the opening of the test path, or the recognition of the test instruction.
测试初始密钥的电路为固定电路,一旦生产出来便不可更改。The circuit for testing the initial key is fixed and cannot be changed once produced.
S402、芯片初次测试完成后,可以使用初始密钥匹配正确的前提下,使用编程指令将目标密钥以及目标密钥使能字段一起写入启动存储模块。S402. After the initial test of the chip is completed, the target key and the target key enable field can be written together into the boot storage module by using a programming instruction on the premise that the initial key is matched correctly.
启动存储模块掉电不会丢失存储的信息。The stored information will not be lost when the storage module is powered off.
可同时将芯片的配置参数写入启动存储模块,后续芯片再次上电,芯片的配置参数在目标密钥及目标密钥使能的保护下,也能够减少其他机构或者个人对芯片配置参数的篡改和抄袭。The configuration parameters of the chip can be written into the boot storage module at the same time, and the subsequent chip is powered on again. Under the protection of the target key and the target key enablement, the configuration parameters of the chip can also reduce the tampering of the chip configuration parameters by other institutions or individuals and plagiarism.
S403、芯片再次上电时,启动逻辑(Boot logic)模块负责将启动存储模块的目标密钥以及目标密钥使能字段载入到芯片控制电路的目标密钥处理模块。S403. When the chip is powered on again, the boot logic (Boot logic) module is responsible for loading the target key of the boot storage module and the target key enable field into the target key processing module of the chip control circuit.
S404、目标密钥处理模块(Final key process)负责将载入的目标密钥做取反和/或加上固定值之类的数据处理形成处理后的目标密钥,将处理后的目标密钥加载至目标密钥寄存器(Final key reg),也可以不做数据处理,直接将目标密钥加载至目标密钥寄存器(Final key reg)。S404. The target key processing module (Final key process) is responsible for inverting the loaded target key and/or adding fixed values and other data processing to form a processed target key, and converting the processed target key Load to the target key register (Final key reg), or directly load the target key to the target key register (Final key reg) without data processing.
目标密钥寄存器负责保存目标密钥,每次掉电,目标密钥寄存器内容消失,等待重新上电加载值。The target key register is responsible for saving the target key. Every time the power is turned off, the content of the target key register disappears, and it waits to be re-powered to load the value.
目标密钥处理模块向测试控制模块输出目标密钥使能FINAL_KEY_EN=1用于控制测试控制模块(Test control)的启用。The target key processing module outputs target key enable FINAL_KEY_EN=1 to the test control module for controlling the enablement of the test control module (Test control).
S405、目标密钥使能情况下,测试人员通过测试机台输入目标密钥,测试控制模块负责对比输入的目标密钥与目标密钥是否一致,若一致,开启芯片测试。S405 , when the target key is enabled, the tester inputs the target key through the test machine, and the test control module is responsible for comparing whether the input target key is consistent with the target key, and if they are consistent, the chip test is started.
芯片初次上电时,测试控制模块用于对比预先保存的初始密钥与用户输入的初始密钥,判断是否开启芯片测试电路进行测试。When the chip is powered on for the first time, the test control module is used to compare the pre-saved initial key with the initial key input by the user, and judge whether to open the chip test circuit for testing.
芯片非初次上电时,所述启动存储模块用于存储目标密钥和目标密钥使能,所述启动逻辑用于在芯片上电时,将启动存储模块中存储的目标密钥和目标密钥使能加载至目标密钥处理模块,所述目标密钥处理模块用于将目标密钥加载至目标密钥寄存器,所述目标密钥处理模块还通过目标密钥使能控制测试控制模块启用,所述控制测试模块开启情况下,用于对比用户输入的最终密码与测试密钥中的密码是否一致,若一致,芯片测试电路可开启使用。When the chip is not powered on for the first time, the startup storage module is used to store the target key and the target key enablement, and the startup logic is used to start the target key and the target password stored in the storage module when the chip is powered on. The key can be loaded into the target key processing module, and the target key processing module is used to load the target key into the target key register, and the target key processing module is also enabled by the target key enabling control test control module , when the control test module is turned on, it is used to compare whether the final password input by the user is consistent with the password in the test key, and if they are consistent, the chip test circuit can be turned on and used.
这个结合实施场景的实施例可以落地。This embodiment combined with implementation scenarios can be implemented.
以上为本申请实施例提供一种存储芯片测试密钥保护方法的一些具体实现方式,基于此,本申请还提供了对应的装置及设备。The above provides some specific implementations of a memory chip test key protection method according to the embodiments of the present application. Based on this, the present application also provides corresponding devices and equipment.
下面将从功能模块化的角度对本申请实施例提供的装置进行介绍。The following will introduce the device provided by the embodiment of the present application from the perspective of functional modularization.
图5为本申请实施例提供的一种存储芯片测试密钥保护装置示意图,一种存储芯片测试密钥保护装置,该装置200包括目标密钥处理模块210、目标密钥寄存器220和测试控制模块230。FIG. 5 is a schematic diagram of a memory chip test key protection device provided in an embodiment of the present application. A memory chip test key protection device 200 includes a target
目标密钥处理模块210用于芯片重新上电时,获得预先保存的目标密钥及目标密钥使能字段,并将目标密钥加载至掉电清空数据的目标密钥寄存器220,所述目标密钥是除芯片初次测试输入的初始密钥以外的密钥,所述目标密钥使能字段包括用于控制测试控制模块230启用的端口电平信号;The target
目标密钥处理模块210还用于根据目标密钥使能字段的端口电平信号控制测试控制模块230的启用,以便测试控制模块230接收并对比用户输入密钥与目标密钥是否一致,判断用户输入密钥是否正确;The target
所述测试控制模块230还设置有用于用户输入密钥的输入端口。The
图6为本申请实施例提供的存储芯片测试密钥保护装置原理图,参见图6,一种存储芯片测试密钥保护装置,进一步包括:启动存储模块240和启动逻辑模块250,FIG. 6 is a schematic diagram of a memory chip test key protection device provided in an embodiment of the present application. Referring to FIG. 6 , a memory chip test key protection device further includes: a
所述启动存储模块240用于存储目标密钥及目标密钥使能字段(FINAL_KEY_EN=1)。The
所述启动逻辑模块250分别与启动存储模块、目标密钥处理模块电性连接,用于将启动存储模块240中的目标密钥及目标密钥使能字段加载到目标密钥处理模块210;The
目标密钥处理模块获得目标密钥使能字段,则目标密钥处理模块根据目标密钥使能字段的端口电平指示,例如字段为:FINAL_KEY_EN=1,以目标密钥使能FINAL_KEY_EN高电平开启测试控制模块处于工作状态,以便测试控制模块230接收并对比用户输入密钥与目标密钥是否一致,判断用户输入密钥是否正确。The target key processing module obtains the target key enabling field, and then the target key processing module indicates according to the port level of the target key enabling field, for example, the field is: FINAL_KEY_EN=1, and the FINAL_KEY_EN high level is enabled with the target key The test control module is turned on to be in working state, so that the
所述芯片重新上电为第二阶段,在第二阶段之前还设置有第一阶段,在第一阶段,该装置还包括:初始密钥模块260,Re-powering on the chip is the second stage, and there is a first stage before the second stage. In the first stage, the device also includes: an initial
所述初始密钥模块260用于保存初始密钥,以便测试控制模块在芯片初次上电时,对比保存的初始密钥和用户输入初始密钥是否一致,若一致,测试控制模块230通过测试使能(TEST_EN=1)开启芯片初次测试,以便芯片初次测试完成后,向启动存储模块240中写入目标密钥及目标密钥使能字段,用于等待芯片重新上电。The initial
启动存储模块240的类型包括:一次可编程器件、多次可编程器件及闪存中的任意一种。The type of the
所述目标密钥处理模块210、目标密钥寄存器220及测试控制模块230均设置与芯片控制电路中。The target
启动存储模块240设置与芯片测试电路中,所述启动逻辑模块250设置可设置与芯片测试电路中,也可设置与目标密钥处理模块210中。The
下面将对本申请实施例提供的设备进行介绍。The following will introduce the devices provided by the embodiments of the present application.
本申请还提出一种存储芯片测试密钥保护设备,包括存储器和处理器,所述存储器用于存储计算机程序,所述处理器调用所述计算机程序时,实现上述的存储芯片测试密钥保护方法。The present application also proposes a memory chip test key protection device, including a memory and a processor, the memory is used to store a computer program, and when the processor invokes the computer program, the above-mentioned memory chip test key protection method is implemented .
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。Each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, please refer to part of the description of the method embodiment. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without creative effort.
以上所述仅是本申请示例性的实施方式,并非用于限定本申请的保护范围。The above descriptions are only exemplary implementations of the present application, and are not intended to limit the protection scope of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211078642.4A CN115359833B (en) | 2022-09-05 | Method, device and equipment for protecting test key of memory chip |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211078642.4A CN115359833B (en) | 2022-09-05 | Method, device and equipment for protecting test key of memory chip |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115359833A true CN115359833A (en) | 2022-11-18 |
| CN115359833B CN115359833B (en) | 2025-10-17 |
Family
ID=
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4037214A (en) * | 1976-04-30 | 1977-07-19 | International Business Machines Corporation | Key register controlled accessing system |
| US20090193261A1 (en) * | 2008-01-25 | 2009-07-30 | Mediatek Inc. | Apparatus and method for authenticating a flash program |
| CN101901629A (en) * | 2009-05-25 | 2010-12-01 | 杭州士兰微电子股份有限公司 | Nonvolatile memory protecting system and method |
| CN107229880A (en) * | 2017-05-12 | 2017-10-03 | 深圳市博巨兴实业发展有限公司 | A kind of microprocessor chip with user security debugging function |
| US20190214102A1 (en) * | 2018-01-10 | 2019-07-11 | Samsung Electronics Co., Ltd. | Semiconductor device and method of operating semiconductor device |
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4037214A (en) * | 1976-04-30 | 1977-07-19 | International Business Machines Corporation | Key register controlled accessing system |
| US20090193261A1 (en) * | 2008-01-25 | 2009-07-30 | Mediatek Inc. | Apparatus and method for authenticating a flash program |
| CN101901629A (en) * | 2009-05-25 | 2010-12-01 | 杭州士兰微电子股份有限公司 | Nonvolatile memory protecting system and method |
| CN107229880A (en) * | 2017-05-12 | 2017-10-03 | 深圳市博巨兴实业发展有限公司 | A kind of microprocessor chip with user security debugging function |
| US20190214102A1 (en) * | 2018-01-10 | 2019-07-11 | Samsung Electronics Co., Ltd. | Semiconductor device and method of operating semiconductor device |
Non-Patent Citations (1)
| Title |
|---|
| 王 明: "面向加密芯片高安全性测试电路设计与实现", 中国知网, 22 May 2021 (2021-05-22) * |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8120377B2 (en) | Integrated circuit having secure access to test modes | |
| JP2015049906A (en) | System and method for secure boot rom patch | |
| US20080109594A1 (en) | Non-volatile memory device controlled by a micro-controller | |
| CN113160875A (en) | Chip test system and test method | |
| WO2018160292A1 (en) | Selective restoration and authentication of a secure image | |
| JP2008009721A (en) | Evaluation system and evaluation method thereof | |
| CN114415001A (en) | Chip test mode switching method and system | |
| CN102262569B (en) | Control method for preventing system basic input output system (BIOS) instability caused by complementary metal oxide semiconductor (CMOS) improper setting | |
| CN115359833A (en) | A storage chip test key protection method, device and equipment | |
| US7143229B2 (en) | Single-chip microcomputer with dynamic burn-in test function and dynamic burn-in testing method therefor | |
| CN115359833B (en) | Method, device and equipment for protecting test key of memory chip | |
| CN116312720B (en) | A testability design method, system and terminal for embedded EEPROM | |
| CN106919862A (en) | Chip, authentication circuit and method of chip | |
| CN117494407A (en) | Method for accelerating verification of central processing unit and computing equipment | |
| CN101751064B (en) | Automatic start-up control system and method thereof | |
| CN116755919A (en) | Start control method and device, chip and debugging system thereof | |
| CN113190389B (en) | Self-test method, test device, and computer-readable storage medium | |
| TWI736088B (en) | Electronic device and test mode enabling method thereof | |
| CN104077156B (en) | The restarting systems and its method of programmable CPU | |
| CN113409867A (en) | Nonvolatile memory programming method, nonvolatile memory programming device, electronic device, and storage medium | |
| US20250045373A1 (en) | Method and system for writing authentication information | |
| CN112468296A (en) | Key programming method, system, electronic equipment and storage medium | |
| CN106909341A (en) | The enabled method of the functional module based on register, device and mobile terminal | |
| JP3119474B2 (en) | LSI test method | |
| CN119475306A (en) | Authentication information writing method and authentication information writing system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant |