Chip supply chain protection device, method and system thereof, chip and electronic equipment

The chip supply chain protection system uses a dynamic password mechanism to secure chip programming, enhancing security and reducing redesign costs by preventing unauthorized access and maintaining functionality despite design defects.

CN119089514APending Publication Date: 2024-12-06HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310656332.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-05
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing chip supply chain is vulnerable to theft and unauthorized programming, with static JTAG interface passwords posing security risks and requiring strict management, and design flaws leading to high costs for redesigns.

Method used

A chip supply chain protection system using a controller, password generation and verification circuit, and non-volatile memory, where a dynamic password is required for programming, ensuring only authorized access and preventing unauthorized use, while maintaining functionality even with design defects.

Benefits of technology

Enhances security by requiring a dynamic password for programming, preventing unauthorized use, and reducing the need for costly redesigns due to design flaws, thus protecting the chip supply chain from theft and illegal copying.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089514A_ABST
    Figure CN119089514A_ABST
Patent Text Reader

Abstract

The invention provides a chip supply chain protection device, a method and a system thereof, a chip and electronic equipment, relates to the technical field of chips, and can improve the safety in a chip supply chain process. The chip supply chain protection device comprises a controller, a password generation and verification circuit, a password server and a nonvolatile memory. And when the nonvolatile memory does not store the configuration information, the controller controls the nonvolatile memory to be in a locked programming mode, and the password generation and verification circuit sends a random number to the password server. The password server obtains a first dynamic password corresponding to the random number according to the random number and a preset first random number-dynamic password corresponding relation, and sends the first dynamic password to the password generation and verification circuit; and the password generation and verification circuit is also used for judging whether the received first dynamic password is correct or not, and if so, sending a release instruction to the controller. And the controller relieves the locked programming mode of the nonvolatile memory and writes the configuration information into the nonvolatile memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of chip technology, and in particular to a chip supply chain protection device and method and system thereof, a chip and an electronic device. Background Art

[0002] Chips are the core components of various electronic devices currently available. From chip manufacturers designing chips to supplying them to electronic device manufacturers, they go through the design, manufacturing, and supply links in between. This process involves many suppliers and channel distributors, and there may be a risk of chip theft.

[0003] After someone steals the chip, they can perform integration work such as functional configuration on the chip and use it for other commercial purposes. Therefore, using technical means to protect the security of the chip supply chain has become a major research hotspot in recent years. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a chip supply chain protection device and its method and system, chip and electronic device. Only the correct dynamic password provided by the password server can program the non-volatile memory, which can improve the security of the chip supply chain process.

[0005] In a first aspect, the present application provides a chip supply chain protection device, which includes a controller, a password generation and verification circuit, a password server, and a non-volatile memory. The controller is used to control the non-volatile memory to be in a locked programming mode when the non-volatile memory does not store configuration information. The password generation and verification circuit is used to send a random number to the password server when the non-volatile memory does not store configuration information. The password server is used to obtain a first dynamic password corresponding to the random number based on the random number and a preset first random number-dynamic password correspondence relationship, and send the first dynamic password to the password generation and verification circuit. The password generation and verification circuit is also used to determine whether the received first dynamic password is correct. If correct, a release instruction is sent to the controller. The controller is also used to release the locked programming mode of the non-volatile memory in response to the release instruction and write configuration information to the non-volatile memory.

[0006] In the present application, when the non-volatile memory does not store configuration information, the controller is used to control the non-volatile memory to be in a locked programming mode, so that the non-volatile memory cannot be programmed, and a password generation and verification circuit is used to generate a random number, and the random number is sent to a password server that is operable by the user and located outside the chip. After the password server receives the random number, it can calculate the first dynamic password corresponding to the random number through the preset first random number-dynamic password correspondence relationship, and send the first dynamic password to the password generation and verification circuit. After the password generation and verification circuit receives the first dynamic password, it can determine whether the first dynamic password is correct. If correct, it sends a release instruction to the controller. After receiving the release instruction, the controller releases the locked programming mode of the non-volatile memory and starts programming the non-volatile memory. In other words, the configuration information is written to the non-volatile memory. After the chip is powered on again, since the configuration information is stored in the non-volatile memory, the chip enters the normal startup process and starts working normally.

[0007] The present application utilizes a password generation and verification circuit to determine that the first dynamic password is correct, and then the controller is used to release the locked programming mode of the non-volatile memory. On the one hand, it can prevent irrelevant personnel from stealing the chip and programming it at will for sale; on the other hand, compared with the related art, in the scheme of the present application, each programming of the non-volatile memory is protected by a random dynamic password. Only with the correct dynamic password provided by the password server can the non-volatile memory be programmed, thereby realizing chip configuration, which can improve the security of the chip supply chain process and avoid any illegal copying.

[0008] Furthermore, when the non-volatile memory does not store configuration information, the solution of the present application does not reset the processor, but puts the non-volatile memory into a locked programming mode. In this way, even if any design defects occur, such as failure of at least one of the OTP controller, JTAG interface, and chip configuration equipment tool, the chip configuration will not be affected, and there is no need to redesign and manufacture the chip, which can save costs.

[0009] In some possible implementations, the chip supply chain protection device also includes a processor, a BootROM hardening circuit, and a memory. The processor is used to run the BootROM hardening circuit. The BootROM hardening circuit is used to load the programming software into the memory and verify the legitimacy of the programming software when the non-volatile memory does not store the configuration information; if the verification passes, the programming software is allowed to run in the memory; otherwise, the programming software is prohibited from running in the memory. The processor is also used to receive a release instruction and run the programming software to program the configuration information when the programming software verification passes. The memory is used to store the configuration information and write the configuration information to the non-volatile memory through the processor and the controller.

[0010] On the one hand, after the chip is powered on, the BootROM hardening circuit can guide the processing 4 to work. On the other hand, the BootROM hardening circuit is also used to load the programming software into the memory when the non-volatile memory does not store the configuration information, and verify the legitimacy of the programming software. If the verification passes, the programming software is allowed to run in the memory; or, when the lock programming mode of the non-volatile memory is released, the programming software starts programming the configuration information; if the verification fails, the programming software is prohibited from running in the memory. In this way, the legitimacy of the programming software can be ensured, and only the programming software signed by the chip manufacturer can be run on the chip. Before the chip configuration is completed, no matter how unrelated personnel steal the chip at any link in the supply chain, it cannot be used normally.

[0011] Optionally, the BootROM curing circuit can verify the signature information of the programming software through a preset asymmetric algorithm public key to determine the legitimacy of the programming software. Of course, the BootROM curing circuit can also verify the legitimacy of the programming software through other methods besides the signature information, and this application does not limit this.

[0012] In some possible implementations, the controller is further configured to control the programming interface of the non-volatile memory to be in a locked state when the non-volatile memory does not store configuration information. The controller controls the non-volatile memory to be in a locked programming mode, which means that the controller controls the programming interface of the non-volatile memory to be in a locked state, so that the non-volatile memory cannot be programmed. It can also be said that when the programming interface of the non-volatile memory is in a locked state, the non-volatile memory cannot write programming information.

[0013] The controller is further configured to open the programming interface of the non-volatile memory in response to the release instruction. The controller releases the locked programming mode of the non-volatile memory, which means that the controller opens the programming interface of the non-volatile memory to allow other modules to program the non-volatile memory. It can also be said that when the programming interface of the non-volatile memory is opened, the non-volatile memory can write programming information.

[0014] In some possible implementations, the password generation and verification circuit is further used to obtain a second dynamic password based on a random number and a preset second random number-dynamic password correspondence relationship. In this way, the password generation and verification circuit determines whether the first dynamic password is correct, which can be achieved by comparing whether the first dynamic password is the same as the second dynamic password. It is also used to compare the second dynamic password with the received first dynamic password. If the first dynamic password is the same as the second dynamic password, it is confirmed that the received first dynamic password is correct. The password generation and verification circuit sends a release instruction to the controller. After receiving the release instruction, the controller releases the lock programming mode of the non-volatile memory and opens the configuration interface of the non-volatile memory.

[0015] On this basis, the password generation and verification circuit can also send a release instruction to the processor. When the programming software passes the verification, the processor can also run the programming software to enable the programming software to program the configuration information. The configuration information programmed by the programming software can be stored in the memory. Since the controller has controlled the configuration interface of the non-volatile memory to open, the memory can write the configuration information to the non-volatile memory through the processor and the controller to realize the chip configuration.

[0016] After the chip is configured and powered on again, the non-volatile memory stores the configuration information. Therefore, the BootROM curing circuit no longer loads the programming software. The processor enters the normal startup branch and loads the normal startup software, allowing the electronic device to work normally.

[0017] In some possible implementations, the first dynamic password calculated by the password server is the same as the second dynamic password calculated by the password generation and verification circuit because the password server used by chip-related personnel and the password generation and verification circuit have pre-agreed on the same random number-dynamic password correspondence. In other words, the first dynamic password calculated by the password server is the same as the second dynamic password calculated by the password generation and verification circuit because the first random number-dynamic password correspondence used by the password server to calculate the first dynamic password and the second random number-dynamic password correspondence used by the password generation and verification circuit to calculate the second dynamic password are calculated by the same algorithm.

[0018] For example, a first random number-dynamic password correspondence relationship used to calculate the first dynamic password and a second random number-dynamic password correspondence relationship used to calculate the second dynamic password are calculated by the same derivation algorithm.

[0019] In some possible implementations, contrary to the aforementioned confirmation that the first dynamic password is correct, an unrelated person steals the chip and calculates the first dynamic password based on the random number and the first random number-dynamic password correspondence. However, since the unrelated person does not know the second random number-dynamic password correspondence used to calculate the second dynamic password, the first random number-dynamic password correspondence used to calculate the first dynamic password is different from the second random number-dynamic password correspondence. Therefore, the calculated first dynamic password is different from the second dynamic password.

[0020] Furthermore, if an unrelated person bypasses the normal configuration process, uses other password servers to receive random numbers, and sends a first dynamic password to the password generation and verification circuit, the password generation and verification circuit compares the first dynamic password with the second dynamic password, confirms that the first dynamic password is wrong, and sends a locking instruction to the controller to keep the chip in locked programming mode to prevent unrelated persons from stealing the chip, bypassing the normal configuration process, performing abnormal configuration on the chip, and naming the chip as other new models for other commercial purposes.

[0021] In some possible implementations, the password generation and verification circuit can also communicate with the password server through the programming software running in the chip. Specifically, the programming software running in the chip interacts with the password generation and verification circuit through the processor, and the processor can establish a connection with the password server through the chip interface, thereby enabling the programming software running in the chip to interact with the password server. In this way, when the non-volatile memory does not store configuration information, the password generation and verification circuit sends a random number to the processor; the processor runs the programming software, the programming software sends a random number to the password server through the processor, and the programming software receives the first dynamic password sent by the password server through the processor.

[0022] Optionally, the programming software can establish a secure communication channel with the password server in the following ways:

[0023] The programming software can generate a temporary public-private key pair (Pks, Pkp), which includes a public key (Pkp) and a private key (Pks). In addition, the programming software is pre-set with the public key (Skp) of the password server used by chip-related personnel. The processor is used to send the public key (Pkp) in the temporary public-private key pair (Pks, Pkp) generated by the programming software to the password server, and establish a secure communication channel with the password server based on the key exchange algorithm through the private key (Pks) in the temporary public-private key pair (Pks, Pkp) and the pre-set public key (Skp) of the password server, and generate a temporary communication shared key.

[0024] The programming software establishes a secure communication channel with the password server through the processor. After generating a temporary communication shared key, the processor is also used to receive the random number sent by the password generation and verification circuit, encrypt the random number using the temporary communication shared key, and send the encrypted random number to the password server.

[0025] The password server is further used to decrypt the encrypted random number using the temporary communication shared key, encrypt the first dynamic password using the temporary communication shared key, and send the encrypted first dynamic password to the processor. The processor is further used to decrypt the encrypted first dynamic password using the temporary communication shared key, and send the decrypted first dynamic password to the password generation and verification circuit, so that the password generation and verification circuit can determine whether the first dynamic password is correct. In this way, the random number and the first dynamic password can be prevented from being leaked during the communication process.

[0026] Of course, when the password generation and verification circuit communicates directly with the password server, a secure communication channel can also be established between the password generation and verification circuit and the password server to generate a temporary communication shared key. However, for the solution where the password generation and verification circuit communicates directly with the password server, since the password generation and verification circuit is a hardware structure, the password generation and verification circuit cannot be changed after the chip is mass-produced.

[0027] As for the solution of enabling the password generation and verification circuit to communicate indirectly with the password server through programming software, even after the chip or even the electronic device is mass-produced, the code in the programming software can be changed to optimize the secure communication between the password generation and verification circuit and the password server.

[0028] In some possible implementations, the controller is further configured to detect whether the non-volatile memory stores configuration information, and send the detection result to the password generation and verification circuit and the processor, so that the password generation and verification circuit and the processor perform subsequent operations.

[0029] In some possible implementations, when the memory writes configuration information to each partition of the non-volatile memory through the processor and the controller, the controller may also lock the partition where the configuration information has been programmed to prevent others from tampering with the configuration information stored in the partition.

[0030] In a second aspect, the present application provides a chip supply chain protection system, which includes a chip and the chip supply chain protection device described in the first aspect, wherein a controller, a password generation and verification circuit, and a non-volatile memory of the chip supply chain protection device are arranged on the chip, and a password server of the chip supply chain protection device is located outside the chip.

[0031] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0032] In a third aspect, the present application provides a chip supply chain protection method, comprising: when the non-volatile memory does not store configuration information, using a controller to control the non-volatile memory to be in a locked programming mode, and sending a random number to a password server through a password generation and verification circuit. Using the password server to obtain a first dynamic password corresponding to the random number based on the random number and a preset first random number-dynamic password correspondence relationship, and sending the first dynamic password to the password generation and verification circuit. Using the password generation and verification circuit to determine whether the received first dynamic password is correct, if correct, a release instruction is sent to the controller. Using the controller to release the locked programming mode of the non-volatile memory, write configuration information to the non-volatile memory.

[0033] In some possible implementations, before writing configuration information to the non-volatile memory, the chip supply chain protection method further includes: running the BootROM hardening circuit through the processor. When the non-volatile memory does not store configuration information, the programming software is loaded into the memory using the BootROM hardening circuit, and the legitimacy of the programming software is verified; if the verification passes, the programming software is allowed to run in the memory; otherwise, the programming software is prohibited from running in the memory. The processor receives a release instruction, and when the programming software passes the verification, the programming software is run to program the configuration information.

[0034] The controller is used to release the lock programming mode of the non-volatile memory and write configuration information into the non-volatile memory, including: using the memory to store the configuration information, and writing the configuration information into the non-volatile memory through the processor and the controller.

[0035] In some possible implementations, when the non-volatile memory does not store configuration information, a controller is used to control the non-volatile memory to be in a locked programming mode, including: when the non-volatile memory does not store configuration information, the controller is used to control the programming interface of the non-volatile memory to be in a locked state.

[0036] The controller is used to release the locked programming mode of the non-volatile memory, including: using the controller to open the programming interface of the non-volatile memory.

[0037] In some possible implementations, the password generation and verification circuit is used to determine whether the received first dynamic password is correct, including: using the password generation and verification circuit to obtain a second dynamic password based on a random number and a preset second random number-dynamic password correspondence relationship, and comparing the second dynamic password with the received first dynamic password. If the first dynamic password is the same as the second dynamic password, it is confirmed that the received first dynamic password is correct.

[0038] In some possible implementations, the first random number-dynamic password correspondence relationship and the second random number-dynamic password correspondence relationship are calculated using the same algorithm.

[0039] In some possible implementations, after using the password generation and verification circuit to determine whether the received first dynamic password is correct, the chip supply chain protection method also includes: when it is confirmed that the first dynamic password is wrong, the password generation and verification circuit sends a lock instruction to the controller to keep the chip in locked programming mode.

[0040] In some possible implementations, when the non-volatile memory does not store the configuration information, the password generation and verification circuit sends the random number to the password server, including: when the non-volatile memory does not store the configuration information, the password generation and verification circuit sends the random number to the processor. The processor runs the programming software, and the programming software sends the random number to the password server through the processor.

[0041] The method uses a password server to send a first dynamic password to a password generation and verification circuit, including: using a processor to run programming software, and the password server sends the first dynamic password to the programming software through the processor.

[0042] In some possible implementations, before the password generation and verification circuit sends a random number to the processor, the chip supply chain protection method also includes: sending the public key of a temporary public-private key pair generated by the programming software to a password server through the processor, and establishing a secure communication channel with the password server through the private key in the temporary public-private key pair and the preset public key of the password server, to generate a temporary communication shared key.

[0043] In some possible implementations, the programming software sends a random number to a password server via a processor, including: encrypting the received random number using a temporary communication shared key via the processor, and sending the encrypted random number to the password server.

[0044] The password server sends the first dynamic password to the programming software through the processor, including: the password server uses a temporary communication shared key to decrypt the encrypted random number, uses the temporary communication shared key to encrypt the first dynamic password, and sends the encrypted first dynamic password to the processor.

[0045] Sending the first dynamic password to the password generation and verification circuit includes: decrypting the encrypted first dynamic password by using a temporary communication shared key through a processor, and sending the decrypted first dynamic password to the password generation and verification circuit.

[0046] In some possible implementations, before using a controller to control the non-volatile memory to be in a locked programming mode and sending a random number to a password server through a password generation and verification circuit, the chip supply chain protection method also includes: using the controller to detect whether the non-volatile memory stores configuration information, and sending the detection result to the password generation and verification circuit.

[0047] In some possible implementations, the chip supply chain protection method further includes: using the controller to lock the partition in the non-volatile memory into which the configuration information has been written, while releasing the lock programming mode of the non-volatile memory and writing configuration information to the non-volatile memory.

[0048] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0049] In a fourth aspect, the present application provides a chip, which is configured by the configuration information written into the non-volatile memory of the chip supply chain protection device described in the first aspect.

[0050] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0051] In a fifth aspect, the present application provides an electronic device, which includes a circuit board and the chip described in the fourth aspect, and the chip is arranged on the circuit board.

[0052] The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A diagram showing the connection relationship between the modules in the mobile phone provided in the embodiment of the present application;

[0054] Figure 2 A flowchart of a chip supply chain provided for an embodiment of the present application;

[0055] Figure 3 A diagram of the relationships between the modules in the chip supply chain protection device provided for related technologies;

[0056] Figure 4 A relationship diagram of various modules in a chip supply chain protection device provided in an embodiment of the present application;

[0057] Figure 5A relationship diagram of various modules in another chip supply chain protection device provided in an embodiment of the present application;

[0058] Figure 6 A relationship diagram of various modules in another chip supply chain protection device provided in an embodiment of the present application;

[0059] Figure 7 A relationship diagram of various modules in another chip supply chain protection device provided in an embodiment of the present application;

[0060] Figure 8 A relationship diagram of various modules in another chip supply chain protection device provided in an embodiment of the present application;

[0061] Fig. 9 A relationship diagram of various modules in another chip supply chain protection device provided in an embodiment of the present application;

[0062] Fig.10 A flowchart of a chip supply chain protection method provided in an embodiment of the present application.

[0063] Reference numerals:

[0064] 11-controller; 12-password generation and verification circuit; 121-password calculation and verification circuit; 122-random number generator; 13-non-volatile memory; 14-processor; 15-memory; 16-BootROM curing circuit; 17-chip configuration communication interface; 21-password server; 22-chip configuration equipment tool. DETAILED DESCRIPTION

[0065] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0066] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0067] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0068] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0069] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

[0070] An embodiment of the present application provides an electronic device, which may be a consumer electronic product, a household electronic product, a vehicle-mounted electronic product, a financial terminal product, a communication electronic product, or other device containing a chip.

[0071] Consumer electronic products include mobile phones, tablet computers, laptops, personal computers (PCs), personal digital assistants (PDAs), smart wearable products (e.g., smart watches, smart bracelets, etc.), virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, drones, etc. Home electronic products include smart door locks, TVs, smart speakers, refrigerators, sweeping robots, etc. Car-mounted electronic products include car navigation systems and car displays, etc. Financial terminal products include automated teller machines (ATMs) and electronic devices for self-service transactions, etc. Communication electronic products include servers, storage devices, radars, base stations, and other communication equipment that contain chips.

[0072] For the sake of convenience, the following uses a mobile phone as an example. Figure 1 As shown, the mobile phone may include a circuit board, a display screen, a battery, a camera, etc. Among them, the circuit board may be integrated with a processor, an internal memory, a charging circuit, etc. Of course, the mobile phone may also include other components, and the circuit board may also be integrated with other circuit structures, which is not limited in the embodiments of the present application.

[0073] The processor may include one or more processing units, for example, the processor may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0074] The internal memory in the mobile phone can be used to store computer executable program codes, which include instructions. The processor executes various functional applications and data processing of the mobile phone by running the instructions stored in the internal memory.

[0075] The processor, internal memory, charging circuit, etc. integrated on the circuit board mentioned above all include one or more chips. The chip can be coupled to the circuit board through pins. The chip can be coupled to an external circuit through a circuit board. For example, the chip can be coupled to a power supply circuit through a circuit board, and the power supply circuit can provide a DC voltage to the chip through the circuit board to power the chip. Alternatively, taking multiple chips as an example, some of the multiple chips can be coupled through traces in the circuit board to work together to achieve specific functions.

[0076] As the core component of various current electronic devices, chips can integrate circuits with various functions to form chips with multiple uses. The chips include but are not limited to digital logic chips, radio frequency chips, and sensor chips.

[0077] like Figure 2 As shown, a typical chip supply chain may include the following steps:

[0078] 1. Chip design: Chip manufacturers complete the design and development of the entire chip and generate chip raw data that can be used for production and manufacturing. Common data formats include GDS-II. Among them, chip raw data may include the layout of the circuit integrated on the chip.

[0079] 2. Wafer manufacturing: The wafer factory uses the raw chip data for processing to produce wafers, which include multiple uncut chips.

[0080] 3. Chip probing test (CPTest): Through wafer testing, chip samples with manufacturing defects can be screened out and marked.

[0081] 4. Packaging: The packaging factory cuts the wafer to form single-particle bare chips, and then packages and wires them to produce finished chips.

[0082] 5. Final test (FT) after chip packaging: chip finished product testing to screen out chip finished products that meet the overall quality requirements. This step can be completed in the packaging factory.

[0083] 6. Chip configuration: Chip manufacturers usually need to perform initial configuration on the chip and burn relevant keys and configuration information to generate a chip product model with specific specifications. This step can be completed in the packaging factory, in the chip manufacturer's own production line, or by a third-party supplier.

[0084] 7. Sales: Chip manufacturers or channel distributors sell finished chips to electronic equipment manufacturers.

[0085] 8. Equipment production: Electronic equipment manufacturers use chips in the manufacture of electronic equipment.

[0086] However, as mentioned in the background technology, the above supply chain process, from chip manufacturers designing chips to supplying them to electronic device manufacturers, goes through design, manufacturing, and supply links in the middle. This process involves many suppliers and channel distributors, etc., and there may be a risk of chip theft. Therefore, how to ensure that the chips used by electronic device manufacturers are consistent with the chips designed by chip manufacturers has always been a major problem in the chip supply chain.

[0087] For example, after the wafer is manufactured and before the chip is configured, the chip may be stolen to bypass the normal chip configuration process, configure the chip abnormally based on its required functions, and name the chip as another new model for other commercial purposes.

[0088] For example, the chip key is cracked through attack means, and then the chip that has not been initially configured is stolen and configured by oneself, or the configuration information of other chips of the same model is changed, and the stolen chip is configured, thereby copying unauthorized commercial chip products and forming an abnormal industrial chain to make profits.

[0089] like Figure 3As shown, based on the above problems, the related technology proposes a chip supply chain protection device, which includes a processor, a one-time programming (OTP) memory device, an OTP controller, a joint test action group (JTAG) interface, a JTAG protection module, and a chip configuration equipment tool.

[0090] The working principle of the chip supply chain protection device is as follows: when the OTP is detected to be blank, the processor is reset and the processor is prohibited from starting the running program. The JTAG interface is closed by default and needs to enter the correct JTAG interface password to open it. After the JTAG interface is opened, the chip configuration equipment tool can be used to perform OTP programming to obtain configuration information, and the configuration information can be burned into a specific OTP through the JTAG interface. Among them, the JTAG interface password is static secret data, which is only known by the internal designers of the chip manufacturer.

[0091] Next, after the correct configuration information is burned into the specific address of the OTP, the processor reset is released and the processor is started to run the program normally.

[0092] In the above process, only the internal designers of the chip manufacturer can open the JTAG interface with the correct JTAG interface password to perform OTP programming. It is difficult for external personnel other than the internal designers of the chip manufacturer to know the correct JTAG interface password. Therefore, external personnel cannot perform OTP programming and cannot use the chip normally, thus achieving the effect of supply chain protection.

[0093] However, the prior art still has the following shortcomings:

[0094] 1. The JTAG interface password is a global static value and needs to rely on the chip manufacturer's strict internal information security management process. Once the JTAG interface password is leaked, all JTAG interfaces can be opened, thus losing their protection.

[0095] 2. After the JTAG interface is opened, once the OTP is programmed, the protection of the chip by the JTAG interface password disappears.

[0096] 3. Before the chip is correctly programmed with OTP, the processor is in a reset state and the chip cannot be used or debugged. Therefore, it is highly dependent on the correct implementation of the solution. Once any design flaw occurs, such as a failure in at least one of the OTP controller, JTAG interface, or chip configuration equipment tool, the OTP cannot be successfully programmed, and the chip needs to be redesigned and manufactured, which has a high technical risk.

[0097] Based on the problems raised by the background technology and the problems existing in the related technology, an embodiment of the present application provides a chip supply chain protection system. The chip supply chain protection system includes a chip and a chip supply chain protection device. The working principle of the chip supply chain protection device is introduced in detail below in conjunction with the accompanying drawings.

[0098] like Figure 4 As shown, the chip supply chain protection device includes a controller 11, a password generation and verification circuit 12, a non-volatile memory 13, and a password server 21. Among them, the controller 11, the password generation and verification circuit 12, and the non-volatile memory 13 can be set on the chip, and the password server 21 is a terminal device outside the chip, for example, the password server 21 can be a server, a computer, and other devices.

[0099] The controller 11 is used to control the non-volatile memory 13 to be in a locked programming mode when no configuration information is stored in the non-volatile memory 13. In some possible implementations, the configuration information includes but is not limited to a chip serial number, a root key, security configuration parameters, and the like.

[0100] The password generation and verification circuit 12 is used to send a random number to the password server 21 when the non-volatile memory 13 does not store the configuration information.

[0101] The password server 21 is used to obtain a first dynamic password corresponding to the random number according to the random number and a preset first random number-dynamic password correspondence relationship, and send the first dynamic password to the password generation and verification circuit 12.

[0102] The password generation and verification circuit 12 is also used to determine whether the received first dynamic password is correct, and if correct, send a release instruction to the controller 11.

[0103] The controller 11 is further used to release the lock programming mode of the non-volatile memory in response to the release instruction, write the configuration information into the non-volatile memory 13, and control the non-volatile memory 13 to perform chip configuration using the configuration information.

[0104] In some possible implementations, the non-volatile memory 13 may be an embedded non-volatile memory. For example, the non-volatile memory 13 may be an OTP, a resistive random access memory (RRAM), a magnetic random access memory (MRAM), an eFuse, an embedded flash memory (eFlash), etc. If the non-volatile memory 13 is a memory that can be programmed once, such as an OTP, then as long as the non-volatile memory 13 is blank, it means that no configuration information is stored in the non-volatile memory 13.

[0105] In some possible implementations, the controller 11 controls the non-volatile memory to be in a locked programming mode, which means that the controller 11 controls the programming interface of the non-volatile memory 13 to be in a locked state, so that the non-volatile memory 13 cannot be programmed. It can also be said that when the programming interface of the non-volatile memory 13 is in a locked state, the non-volatile memory 13 cannot write programming information.

[0106] Accordingly, the controller 11 releases the locked programming mode of the non-volatile memory, which means that the controller 11 opens the programming interface of the non-volatile memory 13, allowing other modules to program the non-volatile memory 13. In other words, when the programming interface of the non-volatile memory 13 is opened, the non-volatile memory 13 can write programming information.

[0107] Of course, the controller 11 may be used to control the non-volatile memory 13 to be in a locked programming mode, or the controller 11 may be used to release the locked programming mode of the non-volatile memory 13 in ways other than locking / opening the programming interface of the non-volatile memory 13, and the embodiments of the present application are not limited to this.

[0108] In the present application, when the non-volatile memory 13 does not store configuration information, the controller 11 is used to control the non-volatile memory to be in a locked programming mode, so that the non-volatile memory 13 cannot be programmed, and the password generation and verification circuit 12 is used to generate a random number, and the random number is sent to the password server 21 that is operable by the user and located outside the chip. After receiving the random number, the password server 21 can calculate the first dynamic password corresponding to the random number through the preset first random number-dynamic password correspondence relationship, and send the first dynamic password to the password generation and verification circuit 12. After receiving the first dynamic password, the password generation and verification circuit 12 can determine whether the first dynamic password is correct. If correct, a release instruction is sent to the controller 11. After receiving the release instruction, the controller 11 releases the locked programming mode of the non-volatile memory and starts programming the non-volatile memory 13. In other words, the configuration information is written into the non-volatile memory 13. After the chip is powered on again, since the configuration information is stored in the non-volatile memory 13, the chip enters the normal startup process and starts working normally.

[0109] The present application utilizes the password generation and verification circuit 12 to determine that the first dynamic password is correct, and then the controller 11 is used to release the locked programming mode of the non-volatile memory. On the one hand, it can prevent irrelevant personnel from stealing the chip and programming it at will for sale; on the other hand, compared with the related art, the present application uses a first dynamic password generated by a random number, and each programming of the non-volatile memory 13 is protected by a random dynamic password. Only with the correct dynamic password provided by the password server can the non-volatile memory 13 be programmed, thereby realizing chip configuration and avoiding any illegal copying.

[0110] Furthermore, when the non-volatile memory 13 does not store configuration information, the solution of the present application does not reset the processor, but puts the non-volatile memory in a locked programming mode. In this way, even if any design defects occur, such as failure of at least one of the OTP controller, JTAG interface, and chip configuration equipment tool, the chip configuration will not be affected, and there is no need to redesign and manufacture the chip, which can save costs.

[0111] The following is a detailed description of the working principle of the chip supply chain protection device to protect the chip supply chain:

[0112] After the chip is powered on, it can first be detected whether the non-volatile memory 13 stores configuration information.

[0113] Among some possible implementations, Figure 4 As shown, the controller 11 is a control module that can program and read data from the non-volatile memory 13 . The controller 11 can be used to detect whether the non-volatile memory 13 stores configuration information and send the detection result to the password generation and verification circuit 12 .

[0114] When the controller 11 detects that the non-volatile memory 13 does not store the configuration information, the controller 11 sends the detection result that the non-volatile memory 13 does not store the configuration information to the password generation and verification circuit 12 .

[0115] On this basis, if Figure 5 As shown, the chip supply chain protection device may further include a processor 14, a memory 15, and a BootROM curing circuit 16, wherein the BootROM curing circuit 16 is a cured BootROM program. The processor 14, the memory 15, and the BootROM curing circuit 16 may be arranged on a chip, and the memory 15 may be a random access memory (RAM).

[0116] The programming software and BootROM curing circuit 16 stored in the memory 15 can be run in the processor 14, so that the programming software interacts with other modules in the chip supply chain protection device through the processor 14. For example, the following programming software communicates with the password server 21 through the processor 14. On this basis, the BootROM curing circuit 16 running in the processor 14 can also load the programming software to work.

[0117] like Figure 5 As shown, in some possible implementations, the controller 11 may also send the detection result that the non-volatile memory 13 does not store the configuration information to the processor 14, so that when the controller 11 detects that the non-volatile memory 13 does not store the configuration information, the BootROM hardening circuit 16 loads the programming software into the memory 15 and verifies the legitimacy of the programming software. If the programming software passes the verification, the programming software is allowed to run in the memory 15; otherwise, the programming software is prohibited from running in the memory 15.

[0118] On the one hand, after the chip is powered on, the BootROM hardening circuit 16 can guide the processor 14 to work. On the other hand, the BootROM hardening circuit 16 is also used to load the programming software into the memory 15 and verify the legitimacy of the programming software when the non-volatile memory 13 does not store the configuration information. If the verification passes, the programming software is allowed to run in the memory 15 when the non-volatile memory is locked; or, when the locked programming mode of the non-volatile memory is released, the programming software starts programming the configuration information; if the verification fails, the programming software is prohibited from running in the memory 15. In this way, the legitimacy of the programming software can be ensured, and only the programming software signed by the chip manufacturer can be run on the chip. Before the chip configuration is completed, no matter how unrelated personnel steal the chip at any link in the supply chain, it cannot be used normally.

[0119] Optionally, the BootROM curing circuit 16 can verify the signature information of the programming software through a preset asymmetric algorithm public key to determine the legitimacy of the programming software. Of course, the BootROM curing circuit 16 can also verify the legitimacy of the programming software through other methods other than signature information, which is not limited in the embodiment of the present application.

[0120] In some possible implementations, when the non-volatile memory 13 does not store configuration information, the controller 11 may actively send a detection result indicating that the non-volatile memory 13 does not store configuration information to the processor 14 and the instruction generation and verification circuit 12 .

[0121] Alternatively, the processor 14 and / or the instruction generation and verification circuit 12 may also actively obtain from the controller 11 a detection result that the non-volatile memory 13 does not store the configuration information.

[0122] Then, if Figure 4 and Figure 5 As shown, when the non-volatile memory 13 does not store the configuration information, the password generation and verification circuit 12 generates a random number in response to the received detection result that the non-volatile memory 13 does not store the configuration information.

[0123] In some possible implementations, the random number generated by the password generation and verification circuit 12 may be a true random number or a pseudo-random number. Compared with the pseudo-random number generated multiple times by the password generation and verification circuit 12, which may have the same risk, optionally, the random number generated by the password generation and verification circuit 12 is a true random number, and the true random numbers generated multiple times by the password generation and verification circuit 12 are all different, which can completely prevent unrelated personnel from abnormally configuring the chip based on a random number and the first dynamic password corresponding to the random number.

[0124] Then, after receiving the random number, the password server 21 can calculate the first dynamic password corresponding to the random number through the preset first random number-dynamic password correspondence relationship, and send the first dynamic password to the password generation and verification circuit 12. After receiving the first dynamic password, the password generation and verification circuit 12 can determine whether the first dynamic password is correct.

[0125] In some possible implementations, the password generation and verification circuit 12 is further used to obtain a second dynamic password based on the random number and a preset second random number-dynamic password correspondence. In this way, the password generation and verification circuit 12 determines whether the first dynamic password is correct by comparing whether the first dynamic password is the same as the second dynamic password. Figure 4 As shown, if the first dynamic password is the same as the second dynamic password, the received first dynamic password is confirmed to be correct, and the password generation and verification circuit 12 sends a release instruction to the controller 11. After receiving the release instruction, the controller 11 releases the lock programming mode of the non-volatile memory and opens the configuration interface of the non-volatile memory 13.

[0126] In some possible implementations, the first dynamic password calculated by the password server 12 is the same as the second dynamic password calculated by the password generation and verification circuit 12 because the password server 21 used by chip-related personnel and the password generation and verification circuit 12 have agreed in advance on the same random number-dynamic password correspondence. In other words, the first dynamic password calculated by the password server 12 is the same as the second dynamic password calculated by the password generation and verification circuit 12 because the first random number-dynamic password correspondence used by the password server 21 to calculate the first dynamic password and the second random number-dynamic password correspondence used by the password generation and verification circuit 12 to calculate the second dynamic password are calculated by the same algorithm.

[0127] For example, a first random number-dynamic password correspondence relationship used to calculate the first dynamic password and a second random number-dynamic password correspondence relationship used to calculate the second dynamic password are calculated by the same derivation algorithm.

[0128] Of course, the first random number-dynamic password correspondence used to calculate the first dynamic password and the second random number-dynamic password correspondence used to calculate the second dynamic password can also be calculated by other algorithms other than the derivation algorithm. The embodiment of the present application is not limited to this, as long as the password server 21 is used to calculate the first random number-dynamic password correspondence of the first dynamic password, and the password generation and verification circuit 12 is used to calculate the second random number-dynamic password correspondence of the second dynamic password, they are calculated by the same algorithm.

[0129] On the contrary, an unrelated person steals the chip and calculates the first dynamic password based on the random number and the correspondence between the first random number and the dynamic password. However, since the unrelated person does not know the correspondence between the second random number and the dynamic password used to calculate the second dynamic password, the first random number and the dynamic password correspondence used to calculate the first dynamic password are different from the second random number and the dynamic password correspondence. Therefore, the calculated first dynamic password is different from the second dynamic password.

[0130] Further, such as Figure 6 As shown, if an unrelated person bypasses the normal configuration process, uses other password servers 21 to receive random numbers, and sends a first dynamic password to the password generation and verification circuit 12, the password generation and verification circuit 12 compares the first dynamic password with the second dynamic password, confirms that the first dynamic password is wrong, and sends a locking instruction to the controller 11 to keep the chip in a locked programming mode to prevent unrelated persons from stealing the chip, bypassing the normal configuration process, performing abnormal configuration on the chip, and naming the chip as other new models for other commercial purposes.

[0131] Among some possible implementations, Figure 4 As shown, the password generation and verification circuit 12 and the password server 21 can communicate directly, so that the password generation and verification circuit 12 sends a random number to the password server 21 and receives the first dynamic password sent by the password server 21.

[0132] In other possible implementations, such as Figure 7 As shown, the password generation and verification circuit 12 can also communicate with the password server 21 through the programming software running in the chip.

[0133] Specifically, the programming software running in the chip interacts with the password generation and verification circuit 12 through the processor 14, and the processor 14 can establish a connection with the password server 21 through the chip interface, thereby enabling the programming software running in the chip to interact with the password server 21.

[0134] The programming software running in the chip can still interact with the password server 21 through the processor 14 . On this basis, the programming software running in the chip can also establish a secure communication channel with the password server 21 .

[0135] Optionally, the programming software and the password server 21 may establish a secure communication channel in the following manner:

[0136] The programming software can generate a temporary public-private key pair (Pks, Pkp), which includes a public key (Pkp) and a private key (Pks). In addition, the programming software is pre-set with the public key (Skp) of the password server 21 used by chip-related personnel. The processor 14 is used to send the public key (Pkp) in the temporary public-private key pair (Pks, Pkp) generated by the programming software to the password server 21, and establish a secure communication channel with the password server 21 based on the key exchange algorithm (Diffiehellman key agreement, DHKA) through the private key (Pks) in the temporary public-private key pair (Pks, Pkp) and the public key (Skp) of the preset password server, and generate a temporary communication shared key.

[0137] The programming software establishes a secure communication channel with the password server 21 through the processor 14. After generating a temporary communication shared key, the processor 14 is also used to receive the random number sent by the password generation and verification circuit 12, encrypt the random number using the temporary communication shared key, and send the encrypted random number to the password server 21.

[0138] The password server 21 is further used to decrypt the encrypted random number using the temporary communication shared key, and to encrypt the first dynamic password using the temporary communication shared key, and to send the encrypted first dynamic password to the processor 14. The processor 14 is further used to decrypt the encrypted first dynamic password using the temporary communication shared key, and to send the decrypted first dynamic password to the password generation and verification circuit 12, so that the password generation and verification circuit 12 can determine whether the first dynamic password is correct. In this way, the random number and the first dynamic password can be prevented from being leaked during the communication process.

[0139] Of course, in the case where the password generation and verification circuit 12 communicates directly with the password server 21, a secure communication channel can also be established between the password generation and verification circuit 12 and the password server 21 to generate a temporary communication shared key. However, for the solution where the password generation and verification circuit 12 communicates directly with the password server 21, since the password generation and verification circuit 12 is a hardware structure, the password generation and verification circuit 12 cannot be changed after the chip is mass-produced.

[0140] As for the solution of enabling indirect communication between the password generation and verification circuit 12 and the password server 21 through programming software, even after the chip or even the electronic device is mass-produced, the code in the programming software can be changed to optimize the secure communication between the password generation and verification circuit 12 and the password server 21.

[0141] Then, if Figure 5 As shown, if the password generation and verification circuit 12 confirms that the received first dynamic password is correct, the password generation and verification circuit 12 can also send a release instruction to the processor 14. In the case where the programming software passes the verification, the processor 14 can also run the programming software to enable the programming software to program the configuration information. The configuration information programmed by the programming software can be stored in the memory 15. Since the controller 11 has controlled the configuration interface of the non-volatile memory 13 to be opened, the memory 15 can write the configuration information into the non-volatile memory 13 through the processor 14 and the controller 11 to realize the chip configuration.

[0142] After the chip is configured and powered on again, the non-volatile memory 13 stores the configuration information, so the BootROM curing circuit 16 no longer loads the programming software, and the processor 14 enters the normal startup branch and loads the normal startup software, so that the electronic device works normally. In some possible implementations, when the memory 15 writes the configuration information to each partition of the non-volatile memory 13 through the processor 14 and the controller 11, the controller 11 can also lock the partition where the configuration information has been programmed to prevent others from tampering with the configuration information stored in the partition.

[0143] Here, the controller 11 locks the partitions in which the configuration information has been programmed, which means that no new configuration information is written into the partitions in the non-volatile memory 13 in which the programming has been completed.

[0144] Among some possible implementations, Figure 8As shown, the industry standard chip supply chain protection device also includes a chip configuration communication interface 17 and a chip configuration equipment tool 22. Among them, the chip configuration communication interface 17 is set on the chip, and the chip configuration equipment tool 22 is set outside the chip. In this way, the embodiment of the present application can also realize the communication between the password generation and verification circuit 12 and the password server 21 without changing the standard chip supply chain protection device. Among them, the chip configuration communication interface 17 can be a JTAG interface.

[0145] When the password generation and verification circuit 12 communicates directly with the password server 21 , the password generation and verification circuit 12 establishes communication with the password server 21 through the chip configuration communication interface 17 and the chip configuration equipment tool 22 .

[0146] When the password generation and verification circuit 12 is enabled to communicate indirectly with the password server 21 through programming software, the processor 14 establishes communication with the password server 21 through the chip configuration communication interface 17 and the chip configuration equipment tool 22 .

[0147] Among some possible implementations, Fig. 9 As shown, the password generation and verification circuit 12 may include a password calculation and verification circuit 121 and a random number generator 122. The random number generator 122 may be a true random number generator or a pseudo random number generator. The true random number generator may generate true random numbers, and the pseudo random number generator may generate pseudo random numbers.

[0148] The password calculation and verification circuit 121 is used to receive the detection result sent by the controller 11 . When the detection result is that the non-volatile memory 13 does not store the configuration information, the password calculation and verification circuit 121 obtains a random number from the random number generator 122 .

[0149] The password calculation and verification circuit 121 is also used to send a random number to the password server 21 and determine whether the first dynamic password is correct. Specifically, the password calculation and verification circuit 121 calculates the second dynamic password according to the random number and the corresponding relationship between the second random number and the dynamic password, and compares whether the first dynamic password is the same as the second dynamic password. The password calculation and verification circuit 121 may include a comparator, and uses the comparator to compare whether the first dynamic password is the same as the second dynamic password.

[0150] In another embodiment, the present application also provides a chip supply chain protection method, such as Fig.10 As shown, the chip supply chain protection method can be implemented in the following ways:

[0151] S110, when the non-volatile memory 13 does not store configuration information, the controller 11 is used to control the non-volatile memory 13 to be in a locked programming mode, and a random number is sent to the password server 21 through the password generation and verification circuit 12.

[0152] In some possible implementations, the non-volatile memory 13 may be an embedded non-volatile memory. For example, the non-volatile memory 13 may be OTP, RRAM, MRAM, eFuse, eFlash, etc. If the non-volatile memory 13 is a one-time programmable memory such as OTP, as long as the non-volatile memory 13 is blank, it means that no configuration information is stored in the non-volatile memory 13.

[0153] In some possible implementations, the controller 11 controls the non-volatile memory to be in a locked programming mode, which means that the controller 11 controls the programming interface of the non-volatile memory 13 to be in a locked state, so that the non-volatile memory 13 cannot be programmed. It can also be said that when the programming interface of the non-volatile memory 13 is in a locked state, the non-volatile memory 13 cannot write programming information.

[0154] Accordingly, the controller 11 releases the locked programming mode of the non-volatile memory, which means that the controller 11 opens the programming interface of the non-volatile memory 13, allowing other modules to program the non-volatile memory 13. In other words, when the programming interface of the non-volatile memory 13 is opened, the non-volatile memory 13 can write programming information.

[0155] Of course, the controller 11 may be used to control the non-volatile memory 13 to be in a locked programming mode, or the controller 11 may be used to release the locked programming mode of the non-volatile memory 13 in ways other than locking / opening the programming interface of the non-volatile memory 13, and the embodiments of the present application are not limited to this.

[0156] In some possible implementations, after the chip is powered on, it may first be detected whether the non-volatile memory 13 stores configuration information. Figure 4 As shown, the controller 11 is a control module that can program and read data from the non-volatile memory 13 . The controller 11 can be used to detect whether the non-volatile memory 13 stores configuration information and send the detection result to the password generation and verification circuit 12 .

[0157] When the controller 11 detects that the non-volatile memory 13 does not store the configuration information, the controller 11 sends the detection result that the non-volatile memory 13 does not store the configuration information to the password generation and verification circuit 12 .

[0158] Among some possible implementations, Figure 5As shown, the chip supply chain protection device may further include a processor 14, a memory 15, and a BootROM curing circuit 16, wherein the BootROM curing circuit 16 is a cured BootROM program. The processor 14, the memory 15, and the BootROM curing circuit 16 may be arranged on a chip, and the memory 15 may be a random access memory (RAM).

[0159] The programming software and BootROM curing circuit 16 stored in the memory 15 can be run in the processor 14, so that the programming software interacts with other modules in the chip supply chain protection device through the processor 14. For example, the following programming software communicates with the password server 21 through the processor 14. On this basis, the BootROM curing circuit 16 running in the processor 14 can also load the programming software to work.

[0160] like Figure 5 As shown, in some possible implementations, the controller 11 may also send the detection result that the non-volatile memory 13 does not store the configuration information to the processor 14, so that when the controller 11 detects that the non-volatile memory 13 does not store the configuration information, the BootROM hardening circuit 16 loads the programming software into the memory 15 and verifies the legitimacy of the programming software. If the programming software passes the verification, the programming software is allowed to run in the memory 15; otherwise, the programming software is prohibited from running in the memory 15.

[0161] On the one hand, after the chip is powered on, the BootROM hardening circuit 16 can guide the processor 14 to work. On the other hand, the BootROM hardening circuit 16 is also used to load the programming software into the memory 15 and verify the legitimacy of the programming software when the non-volatile memory 13 does not store the configuration information. If the verification passes, the programming software is allowed to run in the memory 15 when the non-volatile memory is locked; or, when the locked programming mode of the non-volatile memory is released, the programming software starts programming the configuration information; if the verification fails, the programming software is prohibited from running in the memory 15. In this way, the legitimacy of the programming software can be ensured, and only the programming software signed by the chip manufacturer can be run on the chip. Before the chip configuration is completed, no matter how unrelated personnel steal the chip at any link in the supply chain, it cannot be used normally.

[0162] Optionally, the BootROM curing circuit 16 can verify the signature information of the programming software through a preset asymmetric algorithm public key to determine the legitimacy of the programming software. Of course, the BootROM curing circuit 16 can also verify the legitimacy of the programming software through other methods other than signature information, which is not limited in the embodiment of the present application.

[0163] In some possible implementations, when the non-volatile memory 13 does not store configuration information, the controller 11 may actively send a detection result indicating that the non-volatile memory 13 does not store configuration information to the processor 14 and the instruction generation and verification circuit 12 .

[0164] Alternatively, the processor 14 and / or the instruction generation and verification circuit 12 may also actively obtain from the controller 11 a detection result that the non-volatile memory 13 does not store the configuration information.

[0165] Among some possible implementations, Figure 4 and Figure 5 As shown, when the non-volatile memory 13 does not store the configuration information, the password generation and verification circuit 12 generates a random number in response to the received detection result that the non-volatile memory 13 does not store the configuration information.

[0166] In some possible implementations, the random number generated by the password generation and verification circuit 12 may be a true random number or a pseudo-random number. Compared with the pseudo-random number generated multiple times by the password generation and verification circuit 12, which may have the same risk, optionally, the random number generated by the password generation and verification circuit 12 is a true random number, and the true random numbers generated multiple times by the password generation and verification circuit 12 are all different, which can completely prevent unrelated personnel from abnormally configuring the chip based on a random number and the first dynamic password corresponding to the random number.

[0167] S120 , using the password server 21 to obtain a first dynamic password corresponding to the random number according to the random number and a preset first random number-dynamic password correspondence relationship, and send the first dynamic password to the password generation and verification circuit 12 .

[0168] Among some possible implementations, Figure 4 As shown, the password generation and verification circuit 12 and the password server 21 can communicate directly, so that the password generation and verification circuit 12 sends a random number to the password server 21 and receives the first dynamic password sent by the password server 21.

[0169] In other possible implementations, such as Figure 7 As shown, the password generation and verification circuit 12 can also communicate with the password server 21 through the programming software running in the chip.

[0170] Specifically, the programming software running in the chip interacts with the password generation and verification circuit 12 through the processor 14, and the processor 14 can establish a connection with the password server 21 through the chip interface, thereby enabling the programming software running in the chip to interact with the password server 21.

[0171] The programming software running in the chip can still interact with the password server 21 through the processor 14 . On this basis, the programming software running in the chip can also establish a secure communication channel with the password server 21 .

[0172] Optionally, the programming software and the password server 21 may establish a secure communication channel in the following manner:

[0173] The programming software can generate a temporary public-private key pair (Pks, Pkp), which includes a public key (Pkp) and a private key (Pks). In addition, the programming software is pre-set with the public key (Skp) of the password server 21 used by chip-related personnel. The public key (Pkp) in the temporary public-private key pair (Pks, Pkp) generated by the programming software is sent to the password server 21 through the processor 14, and a secure communication channel is established with the password server 21 based on the key exchange algorithm (Diffiehellman key agreement, DHKA) through the private key (Pks) in the temporary public-private key pair (Pks, Pkp) and the public key (Skp) of the preset password server, to generate a temporary communication shared key.

[0174] The programming software establishes a secure communication channel with the password server 21 through the processor 14. After generating a temporary communication shared key, the processor 14 is used to receive the random number sent by the password generation and verification circuit 12, and the random number is encrypte d using the temporary communication shared key, and the encrypted random number is sent to the password server 21.

[0175] The encrypted random number is decrypted by the password server 21 using the temporary communication shared key, and the first dynamic password is encrypted by the temporary communication shared key, and the encrypted first dynamic password is sent to the processor 14. The encrypted first dynamic password is decrypted by the processor 14 using the temporary communication shared key, and the decrypted first dynamic password is sent to the password generation and verification circuit 12, so that the password generation and verification circuit 12 can determine whether the first dynamic password is correct. In this way, the random number and the first dynamic password can be prevented from being leaked during the communication process.

[0176] Of course, in the case where the password generation and verification circuit 12 communicates directly with the password server 21, a secure communication channel can also be established between the password generation and verification circuit 12 and the password server 21 to generate a temporary communication shared key. However, for the solution where the password generation and verification circuit 12 communicates directly with the password server 21, since the password generation and verification circuit 12 is a hardware structure, the password generation and verification circuit 12 cannot be changed after the chip is mass-produced.

[0177] As for the solution of enabling indirect communication between the password generation and verification circuit 12 and the password server 21 through programming software, even after the chip or even the electronic device is mass-produced, the code in the programming software can be changed to optimize the secure communication between the password generation and verification circuit 12 and the password server 21.

[0178] S130 , using the password generation and verification circuit 12 to determine whether the received first dynamic password is correct, and if correct, sending a release instruction to the controller 11 .

[0179] In some possible implementations, the password generation and verification circuit 12 obtains the second dynamic password based on the random number and the preset second random number-dynamic password correspondence. In this way, the password generation and verification circuit 12 determines whether the first dynamic password is correct by comparing whether the first dynamic password is the same as the second dynamic password. Figure 4 As shown, if the first dynamic password is the same as the second dynamic password, the received first dynamic password is confirmed to be correct, and the password generation and verification circuit 12 sends a release instruction to the controller 11. After receiving the release instruction, the controller 11 releases the lock programming mode of the non-volatile memory and opens the configuration interface of the non-volatile memory 13.

[0180] In some possible implementations, the first dynamic password calculated by the password server 12 is the same as the second dynamic password calculated by the password generation and verification circuit 12 because the password server 21 used by chip-related personnel and the password generation and verification circuit 12 have agreed in advance on the same random number-dynamic password correspondence. In other words, the first dynamic password calculated by the password server 12 is the same as the second dynamic password calculated by the password generation and verification circuit 12 because the first random number-dynamic password correspondence used by the password server 21 to calculate the first dynamic password and the second random number-dynamic password correspondence used by the password generation and verification circuit 12 to calculate the second dynamic password are calculated by the same algorithm.

[0181] For example, a first random number-dynamic password correspondence relationship used to calculate the first dynamic password and a second random number-dynamic password correspondence relationship used to calculate the second dynamic password are calculated by the same derivation algorithm.

[0182] Of course, the first random number-dynamic password correspondence used to calculate the first dynamic password and the second random number-dynamic password correspondence used to calculate the second dynamic password can also be calculated by other algorithms other than the derivation algorithm. The embodiment of the present application is not limited to this, as long as the password server 21 is used to calculate the first random number-dynamic password correspondence of the first dynamic password, and the password generation and verification circuit 12 is used to calculate the second random number-dynamic password correspondence of the second dynamic password, they are calculated by the same algorithm.

[0183] On the contrary, an unrelated person steals the chip and calculates the first dynamic password based on the random number and the correspondence between the first random number and the dynamic password. However, since the unrelated person does not know the correspondence between the second random number and the dynamic password used to calculate the second dynamic password, the first random number and the dynamic password correspondence used to calculate the first dynamic password are different from the second random number and the dynamic password correspondence. Therefore, the calculated first dynamic password is different from the second dynamic password.

[0184] Further, such as Figure 6 As shown, if an unrelated person bypasses the normal configuration process, uses other password servers 21 to receive random numbers, and sends a first dynamic password to the password generation and verification circuit 12, the password generation and verification circuit 12 compares the first dynamic password with the second dynamic password, confirms that the first dynamic password is wrong, and sends a locking instruction to the controller 11 to keep the chip in a locked programming mode to prevent unrelated persons from stealing the chip, bypassing the normal configuration process, performing abnormal configuration on the chip, and naming the chip as other new models for other commercial purposes.

[0185] S140 , using the controller 11 to release the lock programming mode of the non-volatile memory 13 , and write configuration information into the non-volatile memory 13 .

[0186] In the present application, when the non-volatile memory 13 does not store configuration information, the controller 11 is used to control the non-volatile memory to be in a locked programming mode, so that the non-volatile memory 13 cannot be programmed, and the password generation and verification circuit 12 is used to generate a random number, and the random number is sent to the password server 21 that is operable by the user and located outside the chip. After receiving the random number, the password server 21 can calculate the first dynamic password corresponding to the random number through the preset first random number-dynamic password correspondence relationship, and send the first dynamic password to the password generation and verification circuit 12. After receiving the first dynamic password, the password generation and verification circuit 12 can determine whether the first dynamic password is correct. If correct, a release instruction is sent to the controller 11. After receiving the release instruction, the controller 11 releases the locked programming mode of the non-volatile memory and starts programming the non-volatile memory 13. In other words, the configuration information is written into the non-volatile memory 13. After the chip is powered on again, since the configuration information is stored in the non-volatile memory 13, the chip enters the normal startup process and starts working normally.

[0187] The present application utilizes the password generation and verification circuit 12 to determine that the first dynamic password is correct, and then the controller 11 is used to release the locked programming mode of the non-volatile memory. On the one hand, it can prevent irrelevant personnel from stealing the chip and programming it at will for sale; on the other hand, compared with the related art, the present application uses a first dynamic password generated by a random number, and each programming of the non-volatile memory 13 is protected by a random dynamic password. Only with the correct dynamic password provided by the password server can the non-volatile memory 13 be programmed, thereby realizing chip configuration and avoiding any illegal copying.

[0188] Furthermore, when the non-volatile memory 13 does not store configuration information, the solution of the present application does not reset the processor, but puts the non-volatile memory in a locked programming mode. In this way, even if any design defects occur, such as failure of at least one of the OTP controller, JTAG interface, and chip configuration equipment tool, the chip configuration will not be affected, and there is no need to redesign and manufacture the chip, which can save costs.

[0189] Among some possible implementations, Figure 5 As shown, if the password generation and verification circuit 12 confirms that the received first dynamic password is correct, the password generation and verification circuit 12 can also send a release instruction to the processor 14. In the case where the programming software passes the verification, the processor 14 can also run the programming software to enable the programming software to program the configuration information. The configuration information programmed by the programming software can be stored in the memory 15. Since the controller 11 has controlled the configuration interface of the non-volatile memory 13 to be opened, the memory 15 can write the configuration information into the non-volatile memory 13 through the processor 14 and the controller 11 to realize the chip configuration.

[0190] After the chip is configured and powered on again, the non-volatile memory 13 stores the configuration information, so the BootROM curing circuit 16 no longer loads the programming software, and the processor 14 enters the normal startup branch and loads the normal startup software, so that the electronic device works normally. In some possible implementations, when the memory 15 writes the configuration information to each partition of the non-volatile memory 13 through the processor 14 and the controller 11, the controller 11 can also lock the partition where the configuration information has been programmed to prevent others from tampering with the configuration information stored in the partition.

[0191] Here, the controller 11 locks the partitions in which the configuration information has been programmed, which means that no new configuration information is written into the partitions in the non-volatile memory 13 in which the programming has been completed.

[0192] Among some possible implementations, Figure 8 As shown, the industry standard chip supply chain protection device also includes a chip configuration communication interface 17 and a chip configuration equipment tool 22. Among them, the chip configuration communication interface 17 is set on the chip, and the chip configuration equipment tool 22 is set outside the chip. In this way, the embodiment of the present application can also realize the communication between the password generation and verification circuit 12 and the password server 21 without changing the standard chip supply chain protection device. Among them, the chip configuration communication interface 17 can be a JTAG interface.

[0193] When the password generation and verification circuit 12 communicates directly with the password server 21 , the password generation and verification circuit 12 establishes communication with the password server 21 through the chip configuration communication interface 17 and the chip configuration equipment tool 22 .

[0194] When the password generation and verification circuit 12 is enabled to communicate indirectly with the password server 21 through programming software, the processor 14 establishes communication with the password server 21 through the chip configuration communication interface 17 and the chip configuration equipment tool 22 .

[0195] Among some possible implementations, Fig. 9 As shown, the password generation and verification circuit 12 may include a password calculation and verification circuit 121 and a random number generator 122. The random number generator 122 may be a true random number generator or a pseudo random number generator. The true random number generator may generate true random numbers, and the pseudo random number generator may generate pseudo random numbers.

[0196] The password calculation and verification circuit 121 receives the detection result sent by the controller 11 . When the detection result is that the non-volatile memory 13 does not store the configuration information, the password calculation and verification circuit 121 is used to obtain a random number from the random number generator 122 .

[0197] The password calculation and verification circuit 121 is used to send a random number to the password server 21, and determine whether the first dynamic password is correct. Specifically, the password calculation and verification circuit 121 calculates the second dynamic password according to the random number and the corresponding relationship between the second random number and the dynamic password, and compares whether the first dynamic password is the same as the second dynamic password. The password calculation and verification circuit 121 may include a comparator, and the comparator is used to compare whether the first dynamic password is the same as the second dynamic password.

[0198] In yet another embodiment, the present application also provides a chip, which is configured by the configuration information written into the non-volatile memory of the chip supply chain protection device described in the aforementioned embodiment.

[0199] On this basis, an embodiment of the present application further provides an electronic device, which includes a circuit board and the above-mentioned chip, and the chip is arranged on the circuit board.

[0200] The explanation and beneficial effects of the chip obtained by configuring the configuration information written into the non-volatile memory described in the aforementioned embodiment, as well as the electronic device including the chip, are the same as the explanation and beneficial effects of the aforementioned chip supply chain protection device, and will not be repeated here.

[0201] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A chip supply chain protection device, characterized in that: It includes a controller, a password generation and verification circuit, a password server, and a non-volatile memory; When the non-volatile memory does not store configuration information, the controller is used to control the non-volatile memory to be in a locked programming mode, and the password generation and verification circuit is used to send a random number to the password server; The password server is used to obtain a first dynamic password corresponding to the random number according to the random number and a preset first random number-dynamic password correspondence relationship, and send the first dynamic password to the password generation and verification circuit; The password generation and verification circuit is further used to determine whether the received first dynamic password is correct, and if correct, send a release instruction to the controller; The controller is further configured to release the locked programming mode of the non-volatile memory in response to the release instruction and write the configuration information into the non-volatile memory.

2. The chip supply chain protection device according to claim 1, characterized in that: The chip supply chain protection device also includes a processor, a BootROM curing circuit, and a memory; The processor is used to run the BootROM curing circuit; The BootROM curing circuit is used to load the programming software into the memory and verify the legitimacy of the programming software when the non-volatile memory does not store the configuration information; If the verification is passed, the programming software is allowed to run in the memory; otherwise, the programming software is prohibited from running in the memory; The processor is further configured to receive the release instruction, and, if the programming software passes verification, run the programming software to program the configuration information; The memory is used to store the configuration information, and write the configuration information into the non-volatile memory through the processor and the controller.

3. The chip supply chain protection device according to claim 1 or 2, characterized in that: The controller is further configured to control the programming interface of the non-volatile memory to be in a locked state when the non-volatile memory does not store the configuration information; The controller is further configured to open a programming interface of the non-volatile memory in response to the release instruction.

4. The chip supply chain protection device according to any one of claims 1 to 3, characterized in that: The password generation and verification circuit is further used to obtain a second dynamic password according to the random number and a preset second random number-dynamic password correspondence; and is also used to compare the second dynamic password with the received first dynamic password. If the first dynamic password is the same as the second dynamic password, it is confirmed that the received first dynamic password is correct.

5. The chip supply chain protection device according to claim 4, characterized in that: The first random number-dynamic password correspondence relationship and the second random number-dynamic password correspondence relationship are calculated using the same algorithm.

6. The chip supply chain protection device according to any one of claims 1 to 5, characterized in that: The password generation and verification circuit is further configured to send a locking instruction to the controller when confirming that the first dynamic password is wrong, so that the non-volatile memory maintains the locking programming mode.

7. The chip supply chain protection device according to any one of claims 2 to 6, characterized in that: The password generation and verification circuit is further used to send a random number to the processor when the non-volatile memory does not store the configuration information; The processor is also used to run the programming software, the programming software sends the random number to the password server through the processor, and the programming software receives the first dynamic password sent by the password server through the processor.

8. The chip supply chain protection device according to claim 7, characterized in that: The processor is also used to send the public key in the temporary public-private key pair generated by the programming software to the password server, and establish a secure communication channel with the password server through the private key in the temporary public-private key pair and the preset public key of the password server to generate a temporary communication shared key.

9. The chip supply chain protection device according to claim 8, characterized in that: The processor is further configured to encrypt the received random number using the temporary communication shared key, and send the encrypted random number to the password server; The password server is further configured to decrypt the encrypted random number using the temporary communication shared key, encrypt the first dynamic password using the temporary communication shared key, and send the encrypted first dynamic password to the processor; The processor is further configured to decrypt the encrypted first dynamic password using the temporary communication shared key, and send the decrypted first dynamic password to the password generation and verification circuit.

10. The chip supply chain protection device according to any one of claims 1 to 9, characterized in that: The controller is also used to detect whether the non-volatile memory stores the configuration information, and send the detection result to the password generation and verification circuit.

11. The chip supply chain protection device according to any one of claims 1 to 10, characterized in that: The controller is further used to lock the partition in the non-volatile memory into which the configuration information has been written.

12. A chip supply chain protection system, characterized in that: It comprises a chip and the chip supply chain protection device according to any one of claims 1 to 11, wherein the controller, password generation and verification circuit, and non-volatile memory of the chip supply chain protection device are arranged on the chip, and the password server of the chip supply chain protection device is located outside the chip.

13. A chip supply chain protection method, characterized in that: include: When the non-volatile memory does not store configuration information, the controller is used to control the non-volatile memory to be in a locked programming mode, and a random number is sent to the password server through a password generation and verification circuit; Using the password server to obtain a first dynamic password corresponding to the random number according to the random number and a preset first random number-dynamic password correspondence relationship, and sending the first dynamic password to the password generation and verification circuit; Using the password generation and verification circuit to determine whether the received first dynamic password is correct, and if correct, sending a release instruction to the controller; The controller is used to release the lock programming mode of the non-volatile memory, and the configuration information is written into the non-volatile memory.

14. The chip supply chain protection method according to claim 13, characterized in that: Before writing the configuration information into the non-volatile memory, the chip supply chain protection method further includes: Running the BootROM curing circuit through a processor; When the non-volatile memory does not store configuration information, the programming software is loaded into the memory by using the BootROM hardening circuit, and the legitimacy of the programming software is verified; if the verification passes, the programming software is allowed to run in the memory; otherwise, the programming software is prohibited from running in the memory; Receiving the release instruction through the processor, and running the programming software to program the configuration information if the programming software passes the verification; The step of releasing the locked programming mode of the non-volatile memory by using the controller and writing the configuration information into the non-volatile memory comprises: The memory is used to store the configuration information, and the processor and the controller are used to write the configuration information into the non-volatile memory.

15. The chip supply chain protection method according to claim 13 or 14, characterized in that: When the non-volatile memory does not store configuration information, the controller is used to control the non-volatile memory to be in a locked programming mode, including: When the non-volatile memory does not store the configuration information, controlling the programming interface of the non-volatile memory to be in a locked state through the controller; The controller is used to release the locked programming mode of the non-volatile memory, comprising: The controller is used to open a programming interface of the non-volatile memory.

16. The chip supply chain protection method according to any one of claims 13 to 15, characterized in that: The step of using the password generation and verification circuit to determine whether the received first dynamic password is correct includes: The password generation and verification circuit is used to obtain a second dynamic password according to the random number and a preset second random number-dynamic password correspondence, and the second dynamic password is compared with the received first dynamic password. If the first dynamic password is the same as the second dynamic password, it is confirmed that the received first dynamic password is correct.

17. The chip supply chain protection method according to claim 16, characterized in that: The first random number-dynamic password correspondence relationship and the second random number-dynamic password correspondence relationship are calculated using the same algorithm.

18. The chip supply chain protection method according to any one of claims 13 to 17, characterized in that: After using the password generation and verification circuit to determine whether the received first dynamic password is correct, the chip supply chain protection method further includes: When it is confirmed that the first dynamic password is wrong, the password generation and verification circuit sends a locking instruction to the controller so that the non-volatile memory maintains the locking programming mode.

19. The chip supply chain protection method according to any one of claims 14 to 18, characterized in that: When the non-volatile memory does not store configuration information, sending a random number to the password server through a password generation and verification circuit includes: When the nonvolatile memory does not store the configuration information, the password generation and verification circuit sends a random number to the processor; Utilizing the processor to run the programming software, the programming software sends the random number to the password server through the processor; The step of using the password server to send the first dynamic password to a password generation and verification circuit includes: The programming software is run by the processor, and the password server sends the first dynamic password to the programming software through the processor.

20. The chip supply chain protection method according to claim 19, characterized in that: Before the password generation and verification circuit sends the random number to the processor, the chip supply chain protection method further includes: The processor sends the public key of the temporary public-private key pair generated by the programming software to the password server, and establishes a secure communication channel with the password server through the private key in the temporary public-private key pair and the preset public key of the password server to generate a temporary communication shared key.

21. The chip supply chain protection method according to claim 20, characterized in that: The programming software sends the random number to the password server through the processor, including: Encrypting the received random number by the processor using the temporary communication shared key, and sending the encrypted random number to the password server; The password server sends the first dynamic password to the programming software through the processor, including: Decrypting the encrypted random number by using the temporary communication shared key through the password server, encrypting the first dynamic password by using the temporary communication shared key, and sending the encrypted first dynamic password to the processor; The step of sending the first dynamic password to a password generation and verification circuit comprises: The processor decrypts the encrypted first dynamic password using the temporary communication shared key, and sends the decrypted first dynamic password to the password generation and verification circuit.

22. The chip supply chain protection method according to any one of claims 13 to 21, characterized in that: Before the controller is used to control the non-volatile memory to be in a locked programming mode and the password generation and verification circuit sends a random number to the password server, the chip supply chain protection method further includes: The controller is used to detect whether the non-volatile memory stores the configuration information, and the detection result is sent to the password generation and verification circuit.

23. The chip supply chain protection method according to any one of claims 13 to 22, characterized in that: In the process of releasing the locked programming mode of the non-volatile memory by using the controller and writing the configuration information into the non-volatile memory, the chip supply chain protection method further includes: The controller is used to lock the partition in the nonvolatile memory into which the configuration information has been written.

24. A chip, characterized in that: The chip is configured by the configuration information written into the non-volatile memory of the chip supply chain protection device according to any one of claims 1-11.

25. An electronic device, characterized in that: The electronic device comprises a circuit board and the chip according to claim 24, wherein the chip is arranged on the circuit board.