Parameter loading protection method and system against fault attacks, chip and electronic device

CN122818356APending Publication Date: 2026-09-25CHIPSEA TECH SHENZHEN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610952680.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0004]鉴于以上问题,本申请实施例提供一种防故障攻击的参数加载防护方法、系统、芯片及电子设备,以解决上述不利于提高芯片的安全性及运行稳定性的技术问题

Benefits of technology

[0009]本申请实施例中,在芯片运行过程中,当满足参数加载验证条件时,获取第一被控模块的加载参数配置值,根据加载参数配置值与当前参数配置值的比较结果进行验证,确定加载参数配置值和/或当前参数配置值是否出现错误,若加载参数配置值与当前参数配置值不同,则根据默认参数配置值生成对应的默认控制信号;通过上述方式,能够及时识别加载参数配置值和/或当前参数配置值的异常,并及时修正异常配置,有利于提高芯片的安全性及运行稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122818356A_ABST
    Figure CN122818356A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of parameter loading protection, in particular to a parameter loading protection method and system against fault attacks, a chip and electronic equipment. In the embodiment of the application, when a parameter loading verification condition is met during chip operation, a loading parameter configuration value of a first controlled module is acquired, verification is performed according to a comparison result of the loading parameter configuration value and a current parameter configuration value, whether the loading parameter configuration value and / or the current parameter configuration value is incorrect is determined, if the loading parameter configuration value is different from the current parameter configuration value, corresponding default control signals are generated according to default parameter configuration values. Through the above mode, the abnormality of the loading parameter configuration value and / or the current parameter configuration value can be recognized in time, and the abnormal configuration can be corrected in time, so that the safety and operation stability of the chip are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of parameter loading protection technology, and in particular to a parameter loading protection method, system, chip and electronic device for preventing fault attacks. Background Technology

[0002] After the chip is powered on or reset, it reads the configuration values ​​of key parameters from its non-volatile memory (NVM) and controls the functional modules according to the configuration values ​​of the key parameters during chip operation.

[0003] Fault injection attacks are a proactive hardware security attack method that artificially creates brief abnormal conditions, forcing the chip to produce erroneous calculation results during execution. Sensitive information, such as critical parameters, can then be deduced from these erroneous results. Fault injection attacks can occur during chip power-on, reset, or operation. For example, when reading critical parameters after power-on, an attacker can manipulate the power supply, clock, or external electromagnetic interference to cause problems in the chip's reading of critical parameters from the NVM, resulting in incorrect loading of critical parameter configuration values ​​and consequently, errors in the control of functional modules. Similarly, during chip operation, an attacker can manipulate the power supply, clock, or external electromagnetic interference to tamper with the loaded configuration values ​​of critical parameters, leading to incorrect loading of critical parameter configuration values ​​and consequently, errors in the control of functional modules. Such attacks are detrimental to chip security and operational stability. Summary of the Invention

[0004] In view of the above problems, this application provides a parameter loading protection method, system, chip and electronic device for preventing fault attacks, so as to solve the above-mentioned technical problems that are not conducive to improving the security and operational stability of the chip.

[0005] In a first aspect, embodiments of this application provide a parameter loading protection method against fault attacks, including: When the parameter loading verification conditions are met, obtain the loading parameter configuration value of the first controlled module; If the loading parameter configuration value is the same as the current parameter configuration value of the first controlled module, then a corresponding control signal is generated according to the loading parameter configuration value, and the control signal is sent to the first controlled module. If the loaded parameter configuration value is different from the current parameter configuration value of the first controlled module, a corresponding default control signal is generated according to the default parameter configuration value of the first controlled module, and the default control signal is sent to the first controlled module.

[0006] Secondly, embodiments of this application provide a parameter loading protection system to prevent fault attacks, comprising: The first storage module is used to store parameter configuration values; The second storage module is used to store the current parameter configuration values; The third storage module is used to store default parameter configuration values; A loader connected to the first storage module is used to read the parameter configuration value of the first controlled module from the first storage module as the loading parameter configuration value when the parameter loading verification condition is met. A comparator connected to the loader and the second storage module respectively, the comparator being used to compare the loading parameter configuration value with the current parameter configuration value to obtain a comparison result; The control module is connected to the comparator and the third storage module respectively; The comparator is connected to the control module and is also used to send the comparison result to the control module. If the loaded parameter configuration value is the same as the current parameter configuration value of the first controlled module, the control module generates a corresponding control signal according to the loaded parameter configuration value and sends the control signal to the first controlled module. If the loaded parameter configuration value is different from the current parameter configuration value of the first controlled module, a corresponding default control signal is generated according to the default parameter configuration value of the first controlled module and sent to the first controlled module.

[0007] Thirdly, embodiments of this application provide a chip for implementing the above-described parameter loading protection method for preventing fault attacks, or it includes the above-described parameter loading protection system for preventing fault attacks.

[0008] Fourthly, embodiments of this application provide an electronic device, which includes the chip described above.

[0009] In this embodiment, during chip operation, when the parameter loading verification condition is met, the loading parameter configuration value of the first controlled module is obtained. The loading parameter configuration value is compared with the current parameter configuration value to verify whether there is an error in the loading parameter configuration value and / or the current parameter configuration value. If the loading parameter configuration value is different from the current parameter configuration value, a corresponding default control signal is generated based on the default parameter configuration value. Through the above method, abnormalities in the loading parameter configuration value and / or the current parameter configuration value can be identified in a timely manner, and abnormal configurations can be corrected in a timely manner, which is beneficial to improving the security and operational stability of the chip.

[0010] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description

[0011] Figure 1A flowchart illustrating the parameter loading protection method for preventing fault attacks provided in an embodiment of this application is shown.

[0012] Figure 2 A schematic diagram of the parameter loading protection system for preventing fault attacks provided in an embodiment of this application is shown.

[0013] Figure 3 Another structural schematic diagram of the parameter loading protection system against fault attacks provided in this application embodiment is shown.

[0014] Figure 4 A schematic diagram of the random time generator in the parameter loading protection system for preventing fault attacks provided in this application embodiment is shown.

[0015] Figure 5 A schematic diagram of the chip structure provided in an embodiment of this application is shown.

[0016] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0017] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0018] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0019] In the embodiments of this application, it should be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0020] Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0021] In the description of the embodiments of this application, the words "example" or "for example" are used to indicate exemplification, illustration, or description. Any embodiment or design described as "example" or "for example" in the embodiments of this application is not to be construed as being more preferred or having more advantages than another embodiment or design. The use of the words "example" or "for example" is intended to present relative concepts in a clear manner.

[0022] Furthermore, in the embodiments of this application, "multiple" refers to two or more. Therefore, in the embodiments of this application, "multiple" can also be understood as "at least two". "At least one" can be understood as one or more, such as one, two, or more. For example, including at least one means including one, two, or more, and is not limited to which ones are included. For example, including at least one of A, B, and C, then it could include A, B, C, A and B, A and C, B and C, or A and B and C.

[0023] It should be noted that in the embodiments of this application, "and / or" describes the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. In addition, the character " / ", unless otherwise specified, generally indicates that the associated objects before and after it are in an "or" relationship.

[0024] It should be noted that in the embodiments of this application, "connection" can be understood as electrical connection. The connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be a direct connection between A and B, or an indirect connection between A and B through one or more other electrical components.

[0025] One embodiment of this application provides a parameter loading protection method to prevent fault attacks. Please refer to [link / reference]. Figure 1 As shown, the parameter loading protection method for preventing fault attacks includes the following steps S11 to S13: Step S11: When the parameter loading verification conditions are met, obtain the loading parameter configuration value of the first controlled module.

[0026] The first controlled module can be a hardware module or a software module of the chip. The first controlled module can have at least one parameter configuration value, which is used to characterize the control state of a certain function of the first controlled module. For example, the chip can be a microcontroller unit (MCU).

[0027] For example, the first controlled module is a serial port module, and the parameter configuration value can be used to indicate whether the transmitting interface of the serial port module is enabled or disabled; for example, the first controlled module is a serial port module, and there can be two parameter configuration values. The first parameter configuration value can be used to indicate whether the transmitting interface of the serial port module is enabled or disabled, and the second parameter configuration value can be used to indicate whether the receiving interface of the serial port module is enabled or disabled.

[0028] For example, the first controlled module can be a processor, and the parameter configuration value can be used to characterize the state of a certain interface of the processor; for example, the parameter configuration value can be used to characterize the read interface of the processor being enabled or disabled, and the parameter configuration value can be used to characterize the debug interface of the processor being enabled or disabled.

[0029] For example, the first controlled module can be a functional module, which is configured with at least one security mechanism. The parameter configuration value can be used to characterize whether the security mechanism of the functional module is enabled or disabled. The security mechanism can be, for example, address space isolation. When the security mechanism is enabled, the registers / internal SRAM of the Key Vault are only mapped to the Secure address range, and external applications cannot read them.

[0030] The parameter configuration values ​​can be stored in the chip's first storage module. After the chip is powered on or reset, the parameter configuration values ​​are read from the first storage module and stored in the second storage module. During chip operation, the corresponding control signals can be generated based on the parameter configuration values ​​stored in the second storage module to control the first controlled module. For example, the first storage module is Flash, and the second storage module is a register or SRAM (Static Random-Access Memory).

[0031] When the parameter loading verification conditions are met, the parameter loading process is initiated, and the parameter configuration values ​​are reread from the first storage module as the loaded parameter configuration values. At this time, the parameter configuration values ​​stored in the second storage module are the current parameter configuration values.

[0032] Step S12: If the loaded parameter configuration value is the same as the current parameter configuration value of the first controlled module, then generate the corresponding control signal according to the loaded parameter configuration value and send the control signal to the first controlled module.

[0033] The loaded parameter configuration value is a parameter configuration value reread from the first storage module, while the current parameter configuration value is the parameter configuration value currently stored in the second storage module. The current parameter configuration value is obtained from the second storage module, and the loaded parameter configuration value is compared with the current parameter configuration value. If they are the same, there are no errors in the parameter configuration values ​​in either the first or second storage module. A control signal is generated based on the loaded parameter configuration value, and the first controlled module is controlled according to this control signal. For example, the first controlled module is a serial port module. The parameter configuration value can be used to indicate that the serial port module's transmitting interface is enabled, and the control signal is the enable signal for the serial port module's transmitting interface. Alternatively, the parameter configuration value can be used to indicate that the serial port module's transmitting interface is disabled, and the control signal is the disable signal for the serial port module's transmitting interface.

[0034] Replace the current parameter configuration value in the second storage module with the loaded parameter configuration value. If it has not been tampered with, the loaded parameter configuration value will be the current parameter configuration value for the next round of parameter loading process.

[0035] Step S13: If the loaded parameter configuration value is different from the current parameter configuration value of the first controlled module, then generate the corresponding default control signal according to the default parameter configuration value of the first controlled module, and send the default control signal to the first controlled module.

[0036] Among them, the loaded parameter configuration value is different from the current parameter configuration value, and at least one of the parameter configuration values ​​in the first storage module and the second storage module is incorrect: (i) the parameter configuration value in the first storage module is incorrect; (ii) the parameter configuration value in the second storage module is incorrect; or (iii) both the parameter configuration values ​​in the first storage module and the parameter configuration values ​​in the second storage module are incorrect.

[0037] In this case, the loaded parameter configuration value differs from the current parameter configuration value. Errors may occur in the parameter configuration values ​​in the first storage module and / or the second storage module. The first controlled module is then controlled based on the default parameter configuration value. The default parameter configuration value is stored in the chip's third storage module, which is exemplarily a ROM. The default parameter configuration value is the same as the parameter configuration value stored in the first storage module. For example, for the parameter configuration value of the serial port module's transmitting interface, the parameter configuration value stored in the first storage module is the same as the default configuration value stored in the ROM.

[0038] The first controlled module is a serial port module. The default parameter configuration value can be used to indicate that the serial port module's transmitting interface is enabled. The default control signal is the enable signal for the serial port module's transmitting interface. The default parameter configuration value can also be used to indicate that the serial port module's transmitting interface is disabled. The default control signal is the disable signal for the serial port module's transmitting interface.

[0039] Replace the current parameter configuration value in the second storage module with the default parameter configuration value. If it has not been tampered with, the default parameter configuration value will be the current parameter configuration value in the next round of parameter loading process.

[0040] The parameter configuration values ​​of the first controlled module can differ at different stages or in different modes of chip operation. For example, the parameter configuration value used to indicate whether the processor's debug interface is enabled or disabled is 1 during the chip's testing phase, indicating that the processor's debug interface is enabled; and 0 during the chip's actual use phase, indicating that the processor's debug interface is disabled. Similarly, the parameter configuration value used to indicate whether the security mechanism of the first controlled module is enabled or disabled is 0 during the chip's testing phase, indicating that the security mechanism of the first controlled module is disabled; and 1 during the chip's actual use phase, indicating that the security mechanism of the first controlled module is enabled.

[0041] In this embodiment, during chip operation, when the parameter loading verification condition is met, the loaded parameter configuration value of the first controlled module is obtained. The loading parameter configuration value is compared with the current parameter configuration value to verify whether there is an error in the loading parameter configuration value and / or the current parameter configuration value. If the loading parameter configuration value is different from the current parameter configuration value, a corresponding default control signal is generated based on the default parameter configuration value. Through the above method, abnormalities in the loading parameter configuration value and / or the current parameter configuration value can be identified in a timely manner, and abnormal configurations can be corrected in a timely manner, which is beneficial to improving the security and operational stability of the chip.

[0042] In one implementation, the following steps are included before step S11: Step S21: When the chip powers on, obtain the loading parameter configuration value of the first controlled module; Step S22: Generate the corresponding control signal according to the loading parameter configuration value, and send the control signal to the first controlled module.

[0043] After the chip is powered on, it obtains the loading parameter configuration value of the first controlled module from the first storage module, stores the obtained loading parameter configuration value in the second storage module, generates a control signal based on the obtained loading parameter configuration value, and sends the control signal to the first controlled module.

[0044] As one implementation method, obtaining the loading parameter configuration value of the first controlled module includes the following steps: Step S31: Obtain the code value and check code of the parameter configuration value from the first storage module, process the code value of the parameter configuration value using a preset encoding algorithm, and obtain the calculated check code value; Step S32: If the check code is the same as the calculated check code value, then use the code value of the parameter configuration value as the loading parameter configuration value.

[0045] In the first storage module, for each parameter configuration value, both the code value and the check code are stored. The check code is obtained by calculating the code value of the parameter configuration value based on a preset encoding algorithm.

[0046] When retrieving the loading parameter configuration value from the first storage module, the code value of the parameter configuration value is verified according to the check code. After the verification is successful, the code value of the read parameter configuration value is used as the loading parameter configuration value.

[0047] Since both the check code and the check code calculation value are obtained in the same way, that is, by substituting the code value of the parameter configuration value into the preset encoding algorithm, if neither the code value of the parameter configuration value nor the check code has been tampered with, the check code and the check code calculation value will be the same.

[0048] In this embodiment, when acquiring the loading parameter configuration value, the code value of the parameter configuration value is verified according to the check code. This can promptly identify attacks that tamper with the code value of the parameter configuration value and / or the check code, thereby further improving the security and operational stability of the chip.

[0049] In some implementations, the following steps are included after step S32: Step S33: If the check code is different from the calculated check code value, then generate the corresponding default control signal according to the default parameter configuration value of the first controlled module, and send the default control signal to the first controlled module.

[0050] If the check code and the calculated check code value are different, at least one of the code value of the parameter configuration value and the check code in the first storage module is incorrect: (i) the parameter configuration value in the first storage module is incorrect; (ii) the check code in the first storage module is incorrect; or (iii) both the parameter configuration value and the check code in the first storage module are incorrect.

[0051] If the check code differs from the calculated check code, the parameter configuration value and / or check code in the first storage module may be incorrect. The first controlled module will be controlled according to the default parameter configuration value.

[0052] Replace the current parameter configuration value in the second storage module with the default parameter configuration value. If it has not been tampered with, the default parameter configuration value will be the current parameter configuration value in the next round of parameter loading process.

[0053] In some implementations, a positive-negative code mechanism is used to store the parameter configuration value and the check code, where the code value of the parameter configuration value is a positive code and the check code is the negative code of the parameter configuration value; obtaining the loading parameter configuration value of the first controlled module includes the following steps: Step S31a: Obtain the positive code and the inverse code of the parameter configuration value from the first storage module, and invert the positive code of the parameter configuration value to obtain the inverse code calculated value; Step S32a: If the inverse code is the same as the calculated inverse code, then the positive code of the parameter configuration value is used as the loading parameter configuration value.

[0054] In some implementations, the following steps are included after step S32a: Step S33a: If the inverse code and the inverse code are different, generate the corresponding default control signal according to the default parameter configuration value of the first controlled module, and send the default control signal to the first controlled module.

[0055] In some implementations, an ECC (Error Correction Code) algorithm is used to store the parameter configuration values ​​and the checksum, where the checksum is the error correction code for the parameter configuration values, and the preset encoding algorithm is the ECC error correction code algorithm. Obtaining the loading parameter configuration values ​​of the first controlled module includes the following steps: Step S31b: Obtain the code value and error correction code of the parameter configuration value from the first storage module, and process the code value of the parameter configuration value using the ECC error correction code algorithm to obtain the error correction code calculation value; Step S32b: If the error correction code and the error correction code calculation value are the same, then the code value of the parameter configuration value is used as the loading parameter configuration value.

[0056] In some implementations, the following steps are included after step S32b: Step S33b: If the error correction code is different from the calculated error correction code, then generate the corresponding default control signal according to the default parameter configuration value of the first controlled module, and send the default control signal to the first controlled module.

[0057] As one implementation method, the parameter loading protection method for preventing fault attacks in this embodiment performs periodic parameter loading verification, which includes the following steps: Step S41: Generate a first random number using a random number generation circuit; Step S42: Generate a target timing time based on a target random number, wherein the target random number includes a first random number and / or a second random number generated based on the first random number; Step S43: If the target time is reached, then the parameter loading verification condition is satisfied.

[0058] In step S43, the target timing time can be sent to the timer, and the timer will start timing. When the target timing time has elapsed, it is determined that the parameter loading verification condition is met, and the parameter loading protection process can be started. The steps of the parameter loading protection process are steps S11 to S13 mentioned above.

[0059] Random number generation circuits can be, for example, True Random Number Generators (TRNGs). TRNGs utilize the inherent randomness of physical processes to generate a first random number. The first random number generated is unpredictable and is a true random number.

[0060] Among them, at least one target timing time can be directly generated based on the first random number. Since the first random number is unpredictable, the target timing time generated based on the first random number is also unpredictable, and at least one target timing time is random.

[0061] When the speed of generating the first random number cannot meet the application requirements—for example, if the hardware performance of the true random number generator is low and the speed at which the true random number generator generates the first random number is relatively slow—a second random number can be generated based on the first random number, and at least one target timing time can be generated based on the second random number to compensate for the insufficient speed of generating the first true random number. The second random number is a pseudo-random number. For example, the random number generation circuit may also include a linear feedback shift register (LFSR) or any type of random number generator (RNG) and a post-processing circuit. The linear feedback shift register or random number generator can generate a pseudo-random number (second random number) based on the true random number (first random number), and the post-processing circuit performs post-processing on the pseudo-random number to increase its randomness.

[0062] Since the first random number is unpredictable, and the second random number is also somewhat unpredictable, the target timing time generated based on the second random number is also unpredictable, and the target timing time is random.

[0063] In this embodiment, the timing of each target is random, and the time to start the parameter loading process is also random. Compared with the fixed interval of starting the parameter loading process, the probability of the parameter loading process being attacked by faults is reduced, thereby further improving the security and operational stability of the chip.

[0064] One embodiment of this application provides a parameter loading protection system for preventing fault attacks, used to implement the parameter loading protection method for preventing fault attacks described in the above embodiment. Please refer to [link to relevant documentation]. Figure 2As shown, the parameter loading protection system for preventing fault attacks includes: a first storage module 11, a second storage module 12, a third storage module 13, a loader 14, a comparator 15, and a control module 16.

[0065] The first storage module 11 is used to store parameter configuration values, the second storage module 12 is used to store current parameter configuration values, and the third storage module 13 is used to store default parameter configuration values.

[0066] The loader 14 is connected to the first storage module 11. When the parameter loading verification conditions are met, the loader 14 reads the parameter configuration value of the first controlled module from the first storage module 11 and uses it as the loading parameter configuration value.

[0067] Comparator 15 is connected to loader 14 and second storage module 12 respectively. Comparator 15 is used to compare the loaded parameter configuration value with the current parameter configuration value to obtain the comparison result. Comparator 15 is also connected to control module 16 and is used to send the comparison result to control module 16.

[0068] The control module 16 is connected to the comparator 15 and the third storage module 13 respectively. The control module 16 is used to generate a corresponding control signal according to the loaded parameter configuration value and send the control signal to the first controlled module if the loaded parameter configuration value is the same as the current parameter configuration value of the first controlled module; if the loaded parameter configuration value is different from the current parameter configuration value of the first controlled module, the control module generates a corresponding default control signal according to the default parameter configuration value of the first controlled module and sends the default control signal to the first controlled module.

[0069] For details of this embodiment, please refer to the description of the above method embodiments, which will not be repeated here.

[0070] In this embodiment, during chip operation, when the parameter loading verification condition is met, the loaded parameter configuration value of the first controlled module is obtained. The loading parameter configuration value is compared with the current parameter configuration value to verify whether there is an error in the loading parameter configuration value and / or the current parameter configuration value. If the loading parameter configuration value is different from the current parameter configuration value, a corresponding default control signal is generated based on the default parameter configuration value. Through the above method, abnormalities in the loading parameter configuration value and / or the current parameter configuration value can be identified in a timely manner, and abnormal configurations can be corrected in a timely manner, which is beneficial to improving the security and operational stability of the chip.

[0071] In some embodiments, the loader 14 is further configured to read the loading parameter configuration value of the first controlled module from the first storage module when the chip is powered on and stored in the second storage module 12; the control module 16 is further configured to generate a corresponding control signal according to the loading parameter configuration value and send the control signal to the first controlled module.

[0072] In some implementations, the loader 14 is further configured to obtain the code value and check code of the parameter configuration value from the first storage module 11, process the code value of the parameter configuration value using a preset encoding algorithm to obtain the check code calculation value; if the check code and the check code calculation value are the same, the code value of the parameter configuration value is used as the loaded parameter configuration value.

[0073] In some implementations, the loader 14 is further configured to read the default parameter configuration value from the third storage module 13 and store the default parameter configuration value in the second storage module 12 if the check code is different from the check code calculation value; the control module 16 is further configured to generate a corresponding default control signal according to the default parameter configuration value of the first controlled module and send the default control signal to the first controlled module.

[0074] In some implementations, please refer to Figure 3 As shown, the parameter loading protection system for preventing fault attacks also includes a random time generator 171, a timer 172, and a trigger 173.

[0075] The random time generator 171 is used to generate a target random number and generate a target timing time based on the target random number; the timer 172 is used to perform timing and sends a trigger signal to the trigger 173 when the timing duration reaches the target timing time.

[0076] Trigger 173 is used to generate a start signal based on the trigger signal and send the start signal to loader 14; loader 14 is also used to determine that the parameter loading verification condition is met when the start signal is received, that is, loader 14 obtains the loading parameter configuration value of the first controlled module based on the start signal.

[0077] In some implementations, please refer to Figure 4 As shown, the random time generator 171 includes a random number generation circuit 1711 and a random time generation circuit 1712. The random number generation circuit 1711 is used to generate a target random number, and the random time generation circuit 1712 is used to generate a target timing time based on the target random number.

[0078] In some implementations, please refer to Figure 4 As shown, the random number generation circuit 1711 includes a true random number generator, a pseudo random number generator, and a random number storage register. The true random number generator is used to generate a first random number, and the pseudo random number generator is used to generate a second random number based on the first random number. The target random number is either the first random number or the second random number. The random number storage register is used to store the first random number and the second random number.

[0079] For example, the first storage module 11 is Flash, the second storage module 12 is a register, and the third storage module 13 is ROM.

[0080] One embodiment of this application provides a chip 300; please refer to [link / reference]. Figure 5 As shown, chip 300 is used to implement the above-described parameter loading protection method for preventing fault attacks, or chip 300 includes the above-described parameter loading protection system for preventing fault attacks. A chip (Integrated Circuit, IC) is also called a chip, which can be, but is not limited to, a SOC (System on Chip) chip or a SIP (System in Package) chip. For example, chip 300 can be a microcontroller.

[0081] In this embodiment, when the parameter loading verification conditions are met during operation, the chip acquires the loading parameter configuration value of the first controlled module. It then verifies the value by comparing the loading parameter configuration value with the current parameter configuration value to determine if there are any errors in the loading parameter configuration value and / or the current parameter configuration value. If the loading parameter configuration value differs from the current parameter configuration value, a corresponding default control signal is generated based on the default parameter configuration value. This method enables timely identification of anomalies in the loading parameter configuration value and / or the current parameter configuration value, and timely correction of abnormal configurations, thereby improving the chip's security and operational stability.

[0082] This application also provides an electronic device 400, please refer to... Figure 6 As shown, the electronic device 400 includes a device body and a chip 300 as described above disposed within the device body. The electronic device can be, but is not limited to, a weight scale, body fat scale, nutrition scale, pulse oximeter, body composition analyzer, display, USB (Universal Serial Bus) docking station, automobile, smart wearable device, mobile terminal, and smart home device. Smart wearable devices include, but are not limited to, smartwatches, smart bracelets, and neck massagers. Mobile terminals include, but are not limited to, smartphones, laptops, tablets, and POS (point of sales terminal) machines. Smart home devices include, but are not limited to, smart sockets, smart rice cookers, smart robot vacuums, and smart lights.

[0083] In this embodiment, during chip operation, when the parameter loading verification conditions are met, the electronic device acquires the loading parameter configuration value of the first controlled module, verifies it based on the comparison result between the loading parameter configuration value and the current parameter configuration value, and determines whether there is an error in the loading parameter configuration value and / or the current parameter configuration value. If the loading parameter configuration value is different from the current parameter configuration value, a corresponding default control signal is generated based on the default parameter configuration value. Through the above method, abnormalities in the loading parameter configuration value and / or the current parameter configuration value can be identified in a timely manner, and abnormal configurations can be corrected in a timely manner, which is beneficial to improving the security and operational stability of the chip.

[0084] The above description is merely an embodiment of this application. It should be noted that those skilled in the art can make improvements without departing from the inventive concept of this application, but these improvements all fall within the protection scope of this application.

Claims

1. A parameter loading protection method for preventing fault attacks, characterized in that, include: When the parameter loading verification conditions are met, obtain the loading parameter configuration value of the first controlled module; If the loading parameter configuration value is the same as the current parameter configuration value of the first controlled module, then a corresponding control signal is generated according to the loading parameter configuration value, and the control signal is sent to the first controlled module. If the loaded parameter configuration value is different from the current parameter configuration value of the first controlled module, a corresponding default control signal is generated according to the default parameter configuration value of the first controlled module, and the default control signal is sent to the first controlled module.

2. The parameter loading protection method for preventing fault attacks according to claim 1, characterized in that, The parameter loading protection method for preventing fault attacks also includes: When the chip powers on, it acquires the loading parameter configuration value of the first controlled module; The corresponding control signal is generated based on the loading parameter configuration value, and the control signal is sent to the first controlled module.

3. The parameter loading protection method for preventing fault attacks according to claim 1 or 2, characterized in that, The process of obtaining the loading parameter configuration value of the first controlled module includes: The code value and check code of the parameter configuration value are obtained from the first storage module, and the code value of the parameter configuration value is processed by a preset encoding algorithm to obtain the check code calculation value. If the check code is the same as the calculated check code value, then the code value of the parameter configuration value is used as the loading parameter configuration value.

4. The parameter loading protection method for preventing fault attacks according to claim 3, characterized in that, The parameter loading protection method for preventing fault attacks also includes: If the check code is different from the calculated check code value, a corresponding default control signal is generated based on the default parameter configuration value of the first controlled module, and the default control signal is sent to the first controlled module.

5. The parameter loading protection method for preventing fault attacks according to claim 1, characterized in that, The parameter loading protection method for preventing fault attacks performs periodic parameter loading verification, which includes: A first random number is generated using a random number generation circuit; A target timing time is generated based on a target random number, wherein the target random number includes the first random number and / or a second random number generated based on the first random number; If the target time is reached, then the parameter loading verification condition is determined to be met.

6. A parameter loading protection system for preventing fault attacks, characterized in that, include: The first storage module is used to store parameter configuration values; The second storage module is used to store the current parameter configuration values; The third storage module is used to store default parameter configuration values; A loader connected to the first storage module is used to read the parameter configuration value of the first controlled module from the first storage module as the loading parameter configuration value when the parameter loading verification condition is met. A comparator connected to the loader and the second storage module respectively, the comparator being used to compare the loading parameter configuration value with the current parameter configuration value to obtain a comparison result; The control module is connected to the comparator and the third storage module respectively; The comparator is connected to the control module and is also used to send the comparison result to the control module. If the loaded parameter configuration value is the same as the current parameter configuration value of the first controlled module, the control module generates a corresponding control signal according to the loaded parameter configuration value and sends the control signal to the first controlled module. If the loaded parameter configuration value is different from the current parameter configuration value of the first controlled module, a corresponding default control signal is generated according to the default parameter configuration value of the first controlled module and sent to the first controlled module.

7. The parameter loading protection system for preventing fault attacks according to claim 6, characterized in that, The loader is also used to read the parameter configuration value of the first controlled module from the first storage module when the chip is powered on and started, and use it as the loading parameter configuration value, and store the loading parameter configuration value in the second storage module; The control module is also used to generate a corresponding control signal according to the loading parameter configuration value, and send the control signal to the first controlled module.

8. The parameter loading protection system for preventing fault attacks according to claim 6, characterized in that, The loader is further configured to obtain the code value and check code of the parameter configuration value from the first storage module, process the code value of the parameter configuration value using a preset encoding algorithm to obtain the check code calculation value; if the check code is the same as the check code calculation value, then the code value of the parameter configuration value is used as the loading parameter configuration value.

9. The parameter loading protection system for preventing fault attacks according to claim 8, characterized in that, If the check code is different from the calculated check code value, the loader reads the default parameter configuration value from the third storage module and stores the default parameter configuration value in the second storage module; The control module is also used to generate a corresponding default control signal based on the default parameter configuration value, and send the default control signal to the first controlled module.

10. The parameter loading protection system for preventing fault attacks according to claim 6, characterized in that, The parameter loading protection system for preventing fault attacks also includes a random time generator, a timer, and a trigger; The random time generator is used to generate a target random number and generate a target timing time based on the target random number; the timer is used to perform timing and sends a trigger signal to the trigger when the timing duration reaches the target timing time. The trigger is used to generate a start signal based on the trigger signal and send the start signal to the loader; the loader is also used to determine that the parameter loading verification condition is met when the start signal is received.

11. A chip, characterized in that, It is used to implement the parameter loading protection method for preventing fault attacks as described in any one of claims 1 to 5, or it includes the parameter loading protection system for preventing fault attacks as described in any one of claims 6 to 10.

12. An electronic device, characterized in that, Including the chip as described in claim 11.