Taixin Semiconductor

News detail

Practical Sharing | The Evolution of MCU Chip Encryption

2021-03-19

Since the birth of the MCU in the 1970s, chip cracking techniques and anti-cracking schemes have been locked in an escalating contest - one measure is always met by a stronger cou…

Since the birth of the MCU in the 1970s, chip cracking techniques and schemes to prevent chip cracking have continually been locked in an escalating contest of one measure versus a stronger countermeasure, with each peak higher than the last. This article shares the development history of microcontroller security protection and, at the end, summarizes the advantages and disadvantages of smart card chips with the highest security level at the current stage.


I. The Single-Board Computer Era


In the early 1970s, embedded systems were control boards composed of discrete components such as CPU, ROM, RAM, I/O buffers, serial ports, and other communication and control interfaces. During this period, apart from legal protection, there were almost no protective measures to prevent intruders from copying data in the ROM area on the single-board computer.


II. The Microcontroller Era


With the development of large-scale integrated circuit technology, the central processing unit (CPU), data memory (RAM), program memory (ROM), and other I/O communication ports were integrated onto a single microcontroller chip, and the microcontroller MCU replaced the single-board computer. As shown in the figure:



During this period, the internal memory EEPROM and the MCU were packaged separately within the same package. Intruders could use microprobes to obtain data.


III. Security Fuse


As the number of intruders increased, MCUs later added a security fuse to prohibit access to data for their own security. As shown in the figure:



Advantages: It is easy to implement; the MCU architecture does not need to be completely redesigned, and only the fuse is used to control data access.


Disadvantages: The fuse is easy to locate and attack. For example, the fuse state can be modified by directly connecting the bit output to the power supply or ground. In some cases, simply cutting the fuse sensing circuit with a laser or focused ion beam is sufficient. Non-invasive attacks are equally successful because an isolated fuse layout differs from a normal memory array; external signals can be combined to place the bit in a state where it cannot be read correctly, thereby allowing access to information stored on the internal chip. Semi-invasive attacks can enable attackers to succeed quickly, but they require opening the chip package to access the die. A well-known method is to erase the security fuse with ultraviolet light.


IV. Security Fuses Become Part of the Memory Array


Later, MCU manufacturers made the security fuse part of the memory array, as shown in the figure:



Ordinary fuses are located very close to the main memory, or simply share some control lines, and are manufactured using the same process as the main memory, making the fuse difficult to locate. Non-invasive attacks can still be used: external signals can be combined to place the fuse bit in a state where it cannot be read correctly. Likewise, semi-invasive attacks can also be used. Of course, attackers need more time to find the security fuse or the part of the control circuit responsible for security monitoring, but these steps can be automated. Invasive attacks will be very difficult and require manual operation, which will cost more to crack.


V. Using Part of the Main Memory to Control External Data Access


Information that locks the address of a specific area at power-up is used as a security fuse. Alternatively, a password is used to control access to memory. For example, Texas Instruments' MSP430F112 can perform readback only after the correct 32-byte password is entered. If it is not entered, readback can only be performed after the password bytes are erased. Although this protection method appears more effective than previous ones, it has some drawbacks: it can be cracked by low-cost non-invasive attacks such as timing analysis and power consumption analysis. If the security fuse state is part of the memory after power-up or reset, this gives attackers an opportunity to crack it using power supply noise, forcing the circuit into an incorrect memory state.


VI. Use of a Top-Layer Metal Mesh


A top-layer metal mesh design is used to increase the difficulty of intrusion. All mesh lines are used to monitor short circuits and open circuits; once triggered, they cause the memory to reset or clear. As shown in the figure:



Ordinary MCUs do not use this protection method because it is difficult to design and can also be triggered under abnormal operating conditions, such as high-intensity electromagnetic field noise, low or high temperatures, abnormal clock signals, or poor power supply. Therefore, some ordinary MCUs use a cheaper dummy top-layer metal mesh, which can be attacked through highly efficient optical analysis and microprobing. In addition, these meshes cannot prevent non-invasive attacks. They also cannot effectively prevent semi-invasive attacks because there is capacitance between the wires, and light can pass between the wires to reach the active area of the circuit. In smart cards, some such mesh lines are also laid between power and ground. Some programmable smart cards go further, simply eliminating the standard programming interface and even the EEPROM read interface, replacing them with a boot module that can erase or mask itself after code is loaded and thereafter respond only to functions supported by the user's embedded software. This effectively prevents non-invasive attacks.


VII. Security Design of Smart Card Chips


In recent years, some smart cards have used memory bus encryption technology to prevent probing attacks. As shown in the figure:



Data is stored in memory in ciphertext form. Even if an intruder obtains data on the data bus, it is impossible to know the key or other sensitive information, such as the data restoration method. This protection measure effectively prevents invasive and semi-invasive attacks. Some smart cards can even use a different bus encryption key for each card, so even if an intruder completely cracks one card, they cannot produce a chip with the same function, because each smart card chip has a unique ID number and smart cards with the same ID number cannot be purchased. It is also worth mentioning that some smart cards design standard module structures such as decoders, register files, ALUs, and I/O circuits using ASIC-like logic. These designs are called mixed logic (Gle Logic) designs. Mixed logic makes it practically impossible to obtain card information for physical attacks by manually locating signals or nodes. It greatly improves the performance and security of the CPU core. With mixed logic design, it is almost impossible to determine the physical location of the bus, effectively preventing reverse engineering and microprobing attacks.


Advantages and Disadvantages of Smart Card Chip Encryption Solutions


For developers, choosing a microcontroller with a more secure design can provide better protection. Compared with most microcontrollers, even smart cards designed ten years ago can provide better protection. Modern smart cards provide more anti-attack protection: internal voltage sensors protect against power glitch attacks, overvoltage, and undervoltage. Clock frequency sensors prevent clock-lowering attacks based on static analysis. They can also prevent clock glitch attacks that increase the clock frequency. Top-layer metal mesh and internal bus hardware encryption can prevent microprobing attacks. However, compared with microcontrollers, smart card chips also have disadvantages, such as high chip prices and difficulty purchasing small quantities. Development tools are expensive, and a non-disclosure agreement must be signed with the manufacturer - even for documentation. Many manufacturers sell large-volume smart cards only to specific customers. Another shortcoming is limited I/O functionality. Ordinary smart card chips usually have only an ISO7816 interface and rarely have dedicated I/O ports. As a result, they cannot replace microcontrollers in most applications and can only be used in industries with very high security requirements, such as pay-TV set-top boxes, bank cards, SIM cards, second-generation ID cards, and high-end encryption chips. Applying smart card chips in the encryption chip field will be a promising direction. Smart card chips have a high security level but few I/O resources, while ordinary MCUs have abundant hardware resources but a lower level of security. Key algorithms and operating parameters in an MCU can be stored in a smart card chip in a special form, thereby achieving powerful functions with high security strength.

Disclaimer: This article is reprinted from IoVSecurity. Author: Wuzhe. The purpose of reprinting this article is to convey more information, and the copyright belongs to the original author.

Zhuhai Taixin Semiconductor Co., Ltd.

Founded in 2016, Zhuhai Taixin Semiconductor Co., Ltd. is a high-tech enterprise integrating integrated circuit design and wireless intelligent communication solutions. We have successively launched long-range, low-power IoT Wi-Fi chips, low-power motor controller chips, and product solutions. The company adheres to a market-oriented and technology-centered approach to provide customers with high-quality chips and product technology solutions.

Core product: long-range, low-power IoT Wi-Fi communication chip. This chip can be used in product fields such as smart homes, security monitoring, drone image transmission, smart meter reading, smart door locks, smart grids, smart hospitals, and logistics robots.