MEMORY DEVICE AND METHOD FOR SECURE PROGRAMMING OF NON-VOLATILE MEMORY - Patent application

The secure programming circuit in flash memory devices randomizes bit programming order to prevent side-channel attacks, enhancing data security by obscuring the power consumption patterns, thus protecting against unauthorized data reconstruction.

JP7579920B2Active Publication Date: 2024-11-08WINBOND ELECTRONICS CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023114122
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-07-31
Filing Date
2023-07-12
Publication Date
2024-11-08
Estimated Expiration
2043-07-12

AI Technical Summary

Technical Problem

Flash memory devices are vulnerable to side-channel attacks that allow malicious attackers to reconstruct programmed data by monitoring power consumption or electromagnetic emissions, compromising data security.

Method used

A secure programming circuit (SPC) randomizes the order in which bits are programmed into the flash memory, using a random permutation generated by a reversible binary matrix, making it difficult for attackers to reconstruct the programmed data.

Benefits of technology

The randomization of bit programming order effectively thwarts side-channel attacks, protecting the data stored in flash memory from unauthorized access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007579920000005
    Figure 0007579920000005
  • Figure 0007579920000006
    Figure 0007579920000006
  • Figure 0007579920000007
    Figure 0007579920000007
Patent Text Reader

Abstract

To provide a memory device capable of preventing that a malicious attacker hacks a flash memory to acquire the data stored in a chip.SOLUTION: A secure embedded flash integrated circuit (IC) 102 targeted for a side channel attack 100 includes a flash array (NVM) 106 and a secure programming circuit (SPC) 108. The SPC receives a NVM program instruction so as to program given data words in a given location of the NVM, and programs the given data word bits in random order in the NVM according to the NVM program instruction.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to non-volatile memory, and in particular to a method for secure programming of flash memory devices. [Background technology]

[0002] Flash memory, and especially embedded flash memory, may store sensitive data and therefore needs to be protected from eavesdropping ("hacking").

[0003] U.S. Patent No. 11,188,237 describes several embodiments for improving the security of flash memory to prevent hacking. The embodiments prevent malicious attackers from hacking the flash memory to obtain data stored within the chip. The embodiments include the use of fault detection circuits, address scrambling, dummy arrays, password protection, improved manufacturing techniques, and other mechanisms. Summary of the Invention [Problem to be solved by the invention]

[0004] The present invention prevents malicious attackers from hacking the flash memory to obtain data stored within the chip. [Means for solving the problem]

[0005] One embodiment of the present invention described herein provides a memory device including a non-volatile memory (NVM) and a secure programming circuit (SPC) configured to receive NVM program instructions to program a given data word into a given location of the NVM, and to program bits of the given data word into the NVM in a random order in response to the received NVM program instructions.

[0006] In some embodiments, the given data word consists of 2^N bits, and the SPC is configured to generate a random permutation of 2^N values ​​and program the bits of the given data word in order according to the random permutation. In one embodiment, the SPC is configured to generate the random permutation by multiplying a reversible binary matrix with a vector containing a bit for each count to generate a product and adding a vector of random bits to the product. In an exemplary embodiment, the reversible matrix is ​​a triangular binary matrix including a main diagonal, a first triangle, and a second triangle, where the main diagonal contains "1" values, the first triangle contains "0" values, and the second triangle contains random bits.

[0007] One embodiment of the present invention provides a method for secure programming of a non-volatile memory (NVM), the method including receiving an NVM program instruction to program a given data word into a given location of the NVM, and programming bits of the given data word into the NVM in a random order in response to the NVM program instruction. Effect of the Invention

[0008] The method and system of the present invention can be applied to protect NVM from side-channel attacks. [Brief description of the drawings]

[0009] [Figure 1] FIG. 1 is a block diagram that generally represents a secure embedded flash integrated circuit (IC) in accordance with one embodiment of the present invention. [Diagram 2] FIG. 2 is a flow diagram that generally illustrates a method for secure flash programming according to one embodiment of the present invention. [Diagram 3] FIG. 2 is a flow diagram that generally illustrates a method for generating a permutation map according to one embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] Hackers may attempt to obtain the contents of the NVM (or parts of it) through side-channel attacks, for example, by monitoring power consumption or radiated electromagnetic energy.

[0011] In particular, integrated circuits that contain both flash memory and read / write circuitry for reading and writing to the flash memory (e.g., processors with embedded flash) are typically difficult to hack in a direct manner because the data exchange between the read / write circuitry and the NVM is not directly visible on the external pins of the integrated circuit.

[0012] Some flash memories employ bit-serial programming techniques, where bits of a data word are written serially to an NVM storage array. After erasure, flash cells are typically at a given logical value (e.g., logical 1), so programming a logical 1 value consumes no power, while programming a logical 0 consumes a significant amount of power. By monitoring the power supply current, a hacker may be able to detect when a logical 0 or a logical 1 has been programmed. If the bits are written in a given order (e.g., from LSB to MSB or vice versa), a hacker can easily reconstruct the programmed word.

[0013] Embodiments of the invention disclosed herein provide circuits and methods for protecting NVM from side-channel attacks. In one embodiment, an IC includes a secure programming circuit (SPC) configured to program words into a flash array in a random bit order such that a side-channel attack can reconstruct a useless random shuffle of the programmed word bits.

[0014] In some embodiments, the SPC includes a programming word register configured to store a word to be programmed, a counter configured to count bits to be programmed, a scrambler configured to generate a random permutation of the counts, a multiplexer configured to select bits in the programming word register in response to the random permutation of the counts, and a serial programming circuit configured to program bits in the flash array with values ​​selected by the multiplexer.

[0015] In some embodiments, the scrambler generates a random permutation of the counts by multiplying an invertible (eg, triangular) matrix of random bits with a binary representation of the counts and adding a vector of random bits to the product.

[0016] FIG. 1 is a block diagram that generally depicts a secure embedded flash integrated circuit (IC) 102 that is subject to a side-channel attack 100, in accordance with one embodiment of the present invention.

[0017] The IC 102 includes a processor 104 and a flash memory array 106 (although in some embodiments other types of non-volatile memory may be used). In one embodiment, the flash memory array 106 includes multiple banks, each bank includes multiple words, and each word includes multiple individual non-volatile cells. In some embodiments, each cell stores one bit.

[0018] When processor 104 erases a bank, all cells in the bank are set to a known logic value. Conventionally, the erased value is arbitrarily represented as a logic 1, so no action is required to program a logic 1 in an erased bank.

[0019] To program a word (e.g., 32 bits) into an erased bank of the flash memory array 106, the processor 104 sends a programming instruction to the secure programming circuit (SPC) 108. The programming instruction may include an address field that the SPC stores in a programming address register 110 and a data field that the SPC stores in a programming data register 112. A multiplexer 114 sequentially selects bits of the programming data register and transfers the selected bits to a bit programmer circuit 116 that is configured to program one bit at a time in the flash memory array word pointed to by the programming address register 110. As described above, programming occurs only to programming data register bits that are at logic zero.

[0020] A hacker 118 attempts to read the data that the programmer circuit 116 programs into the flash memory array 106. Using a side channel attack, the hacker observes the power supply current Idd consumed by the IC 102 using a current probe 120 input to an oscilloscope 122. As mentioned, the current consumption of the IC 102 is higher when the programming circuit programs a logic 0 than when a logic 1 is programmed. Thus, by observing the waveform 124 displayed on the oscilloscope screen, the hacker can tell when a logic 0 has been programmed.

[0021] 1, the order of the programmed bits is random and a hacker cannot reconstruct the written data word. For example, when IC 102 programs a security key into flash memory array 106, the key that a hacker reads is bit-scrambled.

[0022] To randomize the order in which the bits of the programming data register 112 are programmed, the SPC 108 further includes a counter 126 configured to count the programmed bits, and a scrambler 130 that randomly scrambles the output of the counter using a one-to-one random mapping. The multiplexer 114 is coupled to the output of the scrambler 130, thus randomly selecting the bits of the programming data register 112 to be programmed. For example, assuming an 8-bit programming data register, the scrambler 130 may output the sequence 2, 7, 0, 1, 5, 3, 4, 6, which is the order in which the programming circuit programs the words into the flash memory. The output of the scrambler 130 is also the bit address input of the programming circuit 116.

[0023] As used herein and in the claims, the term "random" in its various grammatical forms (e.g., "random sequence," "random bits," "random permutation," etc.) refers to both truly random and pseudorandom values ​​or events.

[0024] The configuration of the side channel attack 100 and the configuration of the SPC 102 including the SPC 108 depicted in FIG. 1 and described above are examples given for conceptual clarity. Other configurations may be used in alternative embodiments. For example, in one embodiment, the side channel attack used by the hacker may be the return current to the Vdd pin (not shown). In another embodiment, the hacker may measure the voltage drop across a resistive or inductive path in the printed circuit. In some embodiments, the hacker may measure the electromagnetic waves emitted from the IC 102, and in yet other embodiments, the hacker may use other means such as a microphone, an infrared detector, etc.

[0025] In one embodiment, the counter 126, the scrambler 130, the programming data register 112, and the multiplexer 128 are not required. Instead, the processor 104 sends the bits to the programming circuit 116 in a scrambled order.

[0026] In some embodiments, a flash memory array stores more than one bit per cell. For example, in one embodiment, a flash memory cell may be unprogrammed, lightly programmed, moderately programmed, or strongly programmed. The four states typically represent two stored bits with values ​​00, 01, 10, and 11, respectively ("weakly," "moderately," and "strongly" relate to measurements of charge trapped in the floating gate of the flash cell). A hacker can tell whether 00, 01, 10, or 11 has been programmed into a flash memory cell by observing the current from the Vdd power supply. However, in one embodiment, the order of the bit pairs is scrambled, resulting in the hacker obtaining a scrambled set of bit pairs.

[0027] 2 is a flow diagram 200 that generally illustrates a method for secure flash programming according to one embodiment of the present invention, the flow diagram being performed by SPC 108 (see FIG. 1).

[0028] The flow diagram begins with receive programming word operation 202, where the SPC receives programming instructions (e.g., from processor 104 in FIG. 1) that include an address word and a data word to be programmed into flash memory array 106 (see FIG. 1). The data word may be secret, such as an encryption key.

[0029] Next, in a random permutation operation 204, the IC generates a permutation map of all bits in the programming word. Such a permutation map maps each bit position in the programming word to a unique position using a random one-to-one mapping.

[0030] The SPC then sequentially programs the bits of the programming data word into the flash memory array at the addresses specified by the programming instruction according to the reordered order in serial programming operation 206. For example, bits 0, 1, 2, 3 of the programming data word are mapped to 2, 1, 0, 3, and the SPC first programs bit 2 of the programming data word, then bit 1, followed by bits 0 and 3. After performing operation 206, the flow diagram ends.

[0031] Thus, according to an exemplary flow diagram depicted in FIG. 2, the SPC programs the bits of a programming data word into the flash memory array in a random bit order at addresses dictated by the program instructions, making side-channel attacks difficult.

[0032] The flow diagram depicted in FIG. 2 and described above is provided by way of example. Other suitable flow diagrams may be used in alternative embodiments. For example, in some embodiments, the SPC 108 prepares a permutation map before receiving a program instruction. In one embodiment, while programming bits of a programming data word, it determines the next random bit to be programmed from the bits that have not yet been programmed.

[0033] Permutation Method

[0034] In an embodiment, several methods for generating the permutation map may be used.

[0035] 3 is a flow diagram 300 that generally illustrates a method for generating a permutation map according to one embodiment of the present invention, the method being performed by scrambler 130 (see FIG. 1).

[0036] The flow diagram begins with a random vector generation operation 302, where a scrambler generates random vectors rnd0 to rnd N-1 Generate a vector V of N random bits (shown below for N=8), denoted by JPEG0007579920000001.jpg2825

[0037] Next, in a generate matrix M operation 304, the SPC generates a reversible N×N matrix, in this example with “1” values ​​on the main diagonal and random bits (R i ), and the other triangle has a value of "0". For example, the following (for N=8): i , an upper right diagonal matrix with "0"s in the lower left triangle may be used. JPEG0007579920000002.jpg2950

[0038] The SPC now proceeds to clear count operation 306 to clear the count register, indicating that the first bit (starting at 0) is about to be programmed.

[0039] The SPC then proceeds to generate Vc operation 308 to generate a vector Vc containing the bits of the count (shown below for N=8). JPEG0007579920000003.jpg2823

[0040] Then, in a permutation vector generation operation 310, the SPC generates a permutation vector Vp based on:

[0041] Vp = Vn + M × Vc

[0042] Here, the addition is a binary exclusive-or or the multiplication is a binary AND function. Below, we show operation 310 for N=8. JPEG0007579920000004.jpg2784

[0043] Then, the SPC checks the last bit position (count=2 N-l) has been rearranged, and if so, the flow diagram ends. If the count is not complete in operation 312, the SPC proceeds to increment count operation 314, increments the count, and then proceeds again to operation 308 to rearrange the next value of the count.

[0044] The configuration of flow diagram 300 depicted in FIG. 3 and described above is given by way of example. In alternative embodiments, other configurations may be used. For example, in alternative embodiments, other suitable types of invertible matrices may be used, not limited to triangular ones. As another example, in some embodiments, the Sattolo algorithm is used (see, for example, M. Wilson, "Overview of Sattolo's Algorithm," Algorithms Seminar 2002-2004, F. Chyzak (ed.), INRIA, (2005), pp. 105-108). (However, since the Sattolo algorithm is not sequential, its use requires the addition of appropriate circuitry to output the permutation bits one by one.)

[0045] The configuration of IC 102 including SPC 108 is an example configuration, and the flow diagrams 200 and 300 shown in Figures 1-3 and described above are flow diagrams shown for conceptual clarity only. In alternative embodiments, any other configurations and flow diagrams may be used.

[0046] The different subunits of the IC 102, including the SPC 108, may be implemented using any suitable hardware, software, or combination of hardware and software elements, such as one or more application specific integrated circuits (ASICs) or field programmable gate arrays (FPGAs).

[0047] The processor 104 and / or SPC 108 (see FIG. 1) may include one or more general-purpose processors that are programmed in software to perform the functions described herein. The software may be downloaded to the processor in electronic form, for example over a network or from a host, or alternatively or additionally may be provided and / or stored on a non-transitory, tangible medium, such as magnetic, optical, or electronic memory.

[0048] Although the embodiments described herein are primarily directed to secure NVM programming, the methods and systems described herein may be used in other applications.

[0049] Thus, it is to be understood that the above-described embodiments are given by way of example, and that the present invention is not limited to what has been particularly shown and described above. Rather, the scope of the present invention includes both combinations and subcombinations of the various features described above, as well as variations and modifications not disclosed in the prior art that would occur to one skilled in the art upon reading the above description. Documents incorporated by reference in this patent application are considered integral parts of this application, and terms should be considered as defined herein, except for terms defined in these incorporated documents in a manner that is inconsistent with the definitions expressly or implicitly made herein. [Industrial Applicability]

[0050] The method and system of the present invention can be applied to the secure programming of flash memory devices. [Explanation of symbols]

[0051] 100: Side channel attacks 102: Integrated circuits (ICs) 104: Processor 106: Flash memory array 108: Secure Programming Circuit (SPC) 110: Programming Address Register 112: Programming Data Register 114, 128: Multiplexer 116: Bit programmer circuit 118: Hacker 120: Current probe 122: Oscilloscope 124: Waveform 126: Counter 130: Scrambler 200, 300: Flow diagram 202: Programming word reception operation 204: Random permutation operation 206: Serial programming operation 302: Random Vector Action 304: Matrix generation operation 306: Counter clear operation 308:Vc generation operation 310: Permutation vector generation operation 312: Count completion check operation Idd: Power supply current V: Vector VDD:Power supply

Claims

1. A non-volatile memory (NVM); receiving an NVM program instruction to program a given data word into a given location of said NVM; In response to the NVM program instruction, the bits of the given data word are programmed into the NVM in a random order. It was configured as Secure Programming Circuit (SPC) Including, the given data word comprises 2^N bits, the SPC is configured to generate a random permutation of 2 values ​​and program the bits of the given data word in an order according to the random permutation; The SPC is Multiply the invertible binary matrix by a vector containing a bit for each count to produce a product, Add a vector of random bits to the product and generating the random permutation by the invertible binary matrix is ​​a triangular binary matrix including a main diagonal, a first triangle, and a second triangle, the main diagonal including "1" values, the first triangle including "0" values, and the second triangle including random bits; Memory device.

2. 1. A method for secure programming of a non-volatile memory (NVM), comprising: receiving an NVM program instruction to program a given data word into a given location of the NVM; programming the bits of the given data word into the NVM in a random order in response to the NVM program instruction; Including, the given data word comprises 2^N bits, programming the given data word includes generating a random permutation of 2 N values ​​and programming the bits of the given data word in an order according to the random permutation; Generating the random permutation comprises: multiplying the invertible binary matrix by a vector containing a bit for each count to generate a product; adding a vector of random bits to said product; Including, the invertible binary matrix is ​​a triangular binary matrix including a main diagonal, a first triangle, and a second triangle, the main diagonal including "1" values, the first triangle including "0" values, and the second triangle including random bits; A method for secure programming of an NVM.

Citation Information

Patent Citations

  • Data Security Using Bit Transposition During Memory Accesses

    US20190362105A1