Method and device for information protection for non-volatile memory

By using a die-dependent seed to rearrange address and data information in the controller, the problem of computational time consumption and bypassing security measures in side-channel attacks is solved, and robust information protection in non-volatile memory is achieved.

CN113468518BActive Publication Date: 2024-11-01REALTEK SEMICON CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010235475.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-30
Publication Date
2024-11-01
Estimated Expiration
2040-03-30

AI Technical Summary

Technical Problem

Existing technologies for defending against side-channel attacks suffer from computational overhead and the possibility that hackers can bypass security measures by replacing flash memory, thus jeopardizing system security.

Method used

A die-dependent seed is used to rearrange address and data information. The address information rearrangement circuit and data conversion circuit in the controller protect the non-volatile memory and ensure information security.

Benefits of technology

Without incurring additional costs, it provides robust information protection mechanisms to defend against side-channel attacks, avoid side effects, and ensure normal system operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113468518B_ABST
    Figure CN113468518B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for information protection for a non-volatile memory, wherein the method is applied to a controller. The method comprises: obtaining a first die dependency seed and a second die dependency seed, wherein the first die dependency seed and the second die dependency seed correspond to a die used to implement the non-volatile memory; rearranging multiple groups of address information of an address according to the first die dependency seed to protect the address carried by at least one address signal between the controller and the non-volatile memory; and rearranging multiple subsets of a set of data according to the second die dependency seed to protect the set of data carried by at least one data signal between the controller and the non-volatile memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to memory control, and more particularly to a method for protecting information in a non-volatile memory (NVM) and related apparatus, such as a controller, an electronic device including the controller, etc. Background Art

[0002] For side channel attacks, hackers can perform reverse engineering based on the controller integrated circuit (IC) reading or writing behavior of the flash memory through a logic analyzer or a current meter, such as performing correlation analysis to determine whether the program is performing a certain operation behavior, and further analyzing patterns to attack a certain read or write address. In the related art, a protection method for content encryption is proposed to try to solve the above problems, but there may be additional problems, such as certain side effects. For example, the calculation of the above protection method (especially encryption / decryption, etc.) is very time-consuming, which can reduce system performance. In addition, although the manufacturer can encrypt different versions of firmware, hackers can directly replace the old flash memory in the old electronic product with the new flash memory in the new electronic product, so that the new version of the firmware can run on the old version of the IC platform to analyze the read or write pattern, which can bring a great threat to system security. Therefore, a novel method and related architecture are needed to solve the problems of the related art without side effects or less likely to cause side effects. Summary of the invention

[0003] The object of the present invention is to provide a method for protecting information in a non-volatile memory and related equipment, such as a controller, an electronic device including the controller, etc., to solve the above-mentioned problems.

[0004] At least one embodiment of the present invention provides a method for information protection for a non-volatile memory, wherein the method is applied to a controller. The method includes: obtaining a first die-dependent seed and a second die-dependent seed, wherein the first die-dependent seed and the second die-dependent seed correspond to a die used to implement the non-volatile memory; rearranging multiple sets of address information of an address according to the first die-dependent seed to protect the address carried by at least one address signal between the controller and the non-volatile memory; and rearranging multiple subsets of a set of data according to the second die-dependent seed to protect the set of data carried by at least one data signal between the controller and the non-volatile memory.

[0005] In addition to the above method, the present invention also provides a controller, which can be applied to information protection for a non-volatile memory. The controller includes a core circuit, and an address information rearrangement circuit and a data conversion circuit respectively coupled to the core circuit. The core circuit can be used to control the controller according to predetermined information loaded from the non-volatile memory to control the operation of an electronic device, wherein the electronic device includes the controller and the non-volatile memory. In addition, the address information rearrangement circuit can be used to perform address information rearrangement, wherein the address information rearrangement circuit obtains a first die-dependent seed, and rearranges multiple sets of address information of an address according to the first die-dependent seed to protect the address carried by at least one address signal between the controller and the non-volatile memory. In addition, the data conversion circuit can be used to perform data conversion, wherein the data conversion circuit obtains a second die-dependent seed, and rearranges multiple subsets of a set of data according to the second die-dependent seed to protect the set of data carried by at least one data signal between the controller and the non-volatile memory. For example, the first die dependency seed and the second die dependency seed correspond to a die used to implement the non-volatile memory.

[0006] According to some embodiments, the present invention also provides an electronic device comprising the above-mentioned controller, wherein the electronic device comprises the non-volatile memory.

[0007] In addition to the above method, the present invention also provides a device for information protection for a non-volatile memory. The device includes an address information rearrangement circuit and a data conversion circuit. In addition, the address information rearrangement circuit can be used to perform address information rearrangement, wherein the address information rearrangement circuit obtains a first die dependency seed, and rearranges multiple sets of address information of an address according to the first die dependency seed to protect the address carried by at least one address signal between the controller and the non-volatile memory. In addition, the data conversion circuit can be used to perform data conversion, wherein the data conversion circuit obtains a second die dependency seed, and rearranges multiple subsets of a set of data according to the second die dependency seed to protect the set of data carried by at least one data signal between the controller and the non-volatile memory. For example, the first die dependency seed and the second die dependency seed correspond to the die used to implement the non-volatile memory.

[0008] The method and related equipment proposed by the present invention can ensure that the electronic device can operate properly under various conditions, wherein the above-mentioned related equipment is, for example, the controller, the electronic device, etc. In addition, implementation according to the relevant embodiments of the present invention does not increase a lot of additional costs. Therefore, the problems of the related art can be properly solved. Compared with the related art, the present invention can achieve a robust information protection mechanism without side effects or with less possibility of side effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 FIG. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention.

[0010] Figure 2 The present invention is a flowchart of a method for protecting information in a non-volatile memory according to an embodiment of the present invention.

[0011] Figure 3 Show Figure 2 The method shown is a write control scheme in one embodiment of the present invention.

[0012] Figure 4 Show Figure 2 The method shown is a reading control scheme in one embodiment of the present invention.

[0013] Figure 5 Show Figure 2 The method shown is a hybrid conversion control scheme in one embodiment of the present invention.

[0014] Figure 6 Show Figure 2 The method shown is an address information rearrangement control scheme in one embodiment of the present invention.

[0015] Figure 7 Show Figure 2 The method shown is a data conversion control scheme in one embodiment of the present invention.

[0016] Figure 8 Show Figure 7 Another example of read and restore operations of the data conversion control scheme is shown.

[0017] Fig. 9 Show Figure 7 Another example of read and restore operations of the data conversion control scheme is shown.

[0018] Fig.10 Show Figure 7 Another example of read and restore operations of the data conversion control scheme is shown. DETAILED DESCRIPTION

[0019] Figure 1 1 is a schematic diagram of an electronic device 100 according to an embodiment of the present invention. The electronic device 100 may include a controller 100C and a non-volatile memory 100M coupled to each other, but the present invention is not limited thereto. For example, the electronic device 100 may also include other components such as a touch-sensitive display module, one or more sound output modules, one or more wireless transmission modules, etc., wherein at least a portion (e.g., a portion or all) of these components may be coupled to each other through a bus and coupled to the controller 100C. For ease of understanding, examples of the electronic device 100 may include (but are not limited to): a multifunctional mobile phone, a wearable device, a tablet, and a personal computer, such as a laptop computer.

[0020] The controller 100C may include a core circuit 101, a storage unit 110, an address information rearrangement circuit 120, a seed generation circuit 130 and a data conversion circuit 140. In particular, the seed generation circuit 130 may include a seed generator 130SG (such as a timer) and a plurality of seed converters 131, 132, 133, 134 and 135, and the data conversion circuit 140 may include a data subset rearrangement circuit 142 and an integrity code selective arrangement circuit 144, wherein the address information rearrangement circuit 120 and the data conversion circuit 140 may be coupled between the core circuit 101 and the NVM interface circuit of the controller 100C, and the NVM interface circuit may read or write the NVM 100M for the controller 100C through a set of signals such as IO0, IO1, IO2, IO3, CLK, etc. between the controller 100C and the NVM 100M, but the present invention is not limited thereto. In some embodiments, at least a portion (e.g., a portion or all) of the storage unit 110, the address information rearrangement circuit 120, the seed generation circuit 130, and the data conversion circuit 140 may be integrated into the core circuit 101. In addition, the controller 100C (e.g., its NVM interface circuit) may comply with the Joint Electron Device Engineering Council (JEDEC) specification or other specifications.

[0021] According to this embodiment, the core circuit 101 can control the controller 100C according to the predetermined information loaded from the NVM 100M to control the operation of the electronic device 100. In addition, the controller 100C can be used to protect the information of the NVM 100M to resist various improper behaviors of hackers. The address information rearrangement circuit 120 and the data conversion circuit 140 can respectively perform address information rearrangement and data conversion, and in particular, information protection is performed through the related control of certain seeds such as a plurality of die-dependent seeds Seed1 and Seed2 pre-stored in the storage unit 110 and a plurality of converted seeds Seed3.1, Seed3.2, Seed3.3, Seed3.4 and Seed3.5 generated by the seed generation circuit 130. For example, the storage unit 110 may provide the die dependency seed Seed1 to the address information rearrangement circuit 120, so that the address information rearrangement circuit 120 performs the address information rearrangement according to the die dependency seed Seed1, and the storage unit 110 and the seed generation circuit 130 may respectively provide the die dependency seed Seed2 and the conversion seeds See3.1, Seed3.2, Seed3.3, Seed3.4 and Seed3.5 to the data conversion circuit 140, so that the data conversion circuit 140 (for example, the data subset rearrangement circuit 142) performs the data conversion according to the die dependency seed Seed2 and the conversion seeds See3.1, Seed3.2, Seed3.3, Seed3.4 and Seed3.5. The data conversion may include data subset rearrangement, and in particular, may also include selective arrangement of integrity codes, wherein the data subset rearrangement circuit 142 may perform the data subset rearrangement based on the die dependency seed Seed2, and the integrity code selective arrangement circuit 144 may perform the integrity code selective arrangement based on the conversion seeds See3.1, Seed3.2, Seed3.3, Seed3.4 and Seed3.5, but the present invention is not limited to this.

[0022] like Figure 1As shown, the seed generator 130SG can generate an initial seed Seed3, and the seed converters 131, 132, 133, 134 and 135 can convert the initial seed Seed3 into conversion seeds Seed3.1, Seed3.2, Seed3.3, Seed3.4 and Seed3.5 respectively to perform the data conversion. Please note that the initial seed Seed3 can be updated as time changes, and the conversion seeds Seed3.1, Seed3.2, Seed3.3, Seed3.4 and Seed3.5 can be updated as the initial seed Seed3 changes. Therefore, the data conversion based on these seeds can bring about various changes in the data signals (such as signals IO0, IO1, IO2 and IO3, especially, the data being transmitted thereby) between the controller 100C and the NVM 100M.

[0023] In addition, the die dependency seeds Seed1 and Seed2 may correspond to the die used to implement the NVM 100M. When the die is replaced with another die used to implement the NVM 100M, the die dependency seeds Seed1 and Seed2 may be updated to correspond to the other die. For example, a plurality of electronic devices {100} may be obtained through mass production. For a plurality of dies used to implement the respective NVM {100M} of these electronic devices {100}, the die dependency seeds Seed1 and Seed2 of each die are different from the die dependency seeds Seed1 and Seed2 of any other die among these dies. Based on Figure 1 With the architecture shown, the present invention can implement a robust information protection mechanism without side effects or with a low probability of causing side effects.

[0024] In the above embodiment, the NVM 100M may be implemented by flash memory such as NAND flash memory and NOR flash memory, electrically erasable programmable read-only memory (EPRON), etc. In addition, the storage unit 110 may be implemented by a one-time programming memory element such as an electronic fuse (e-fuse), a register such as a secure register, etc. For example, the storage unit 110 may include at least one electronic fuse and / or at least one secure register. In addition, the address information rearrangement circuit 120 and the data conversion circuit 140 (especially, the data subset rearrangement circuit 142 therein) may be implemented by a plurality of sets of switches, etc. For example, the address information rearrangement circuit 120 may include a set of switches, and the set of switches may be used to exchange two or more address lines in a set of address lines according to the die-dependent seed Seed1 to perform the address information rearrangement. For another example, the data conversion circuit 140 (especially, the data subset rearrangement circuit 142 therein) may include a set of switches, and the set of switches may be used to exchange two or more data lines in a set of data lines according to the die dependency seed Seed2 to perform the data subset rearrangement.

[0025] Figure 2 According to an embodiment of the present invention, a method for NVM such as Figure 1 The flowchart of the method for protecting information of the NVM 100M shown in FIG. 1 is a flowchart of the method for protecting information of the NVM 100M shown in FIG. 1. The method can be applied to related devices such as the controller 100C, the electronic device 100 including the controller 100C, and can be executed by the controller 100C. For example, steps S10 to S18 and S20 to S28 can be executed in the writing phase PHASE(0) (e.g., the production phase) and the reading phase PHASE(1) (e.g., the end user phase) of the electronic device 100, respectively, but the present invention is not limited thereto. For ease of understanding, Figure 2 The first die dependency seed and the second die dependency seed described in the illustrated workflow may be described as die dependency seeds Seed1 and Seed2, respectively.

[0026] In step S10 , the controller 100C obtains die-dependent seeds Seed1 and Seed2 . For example, the address information rearrangement circuit 120 and the data conversion circuit 140 may obtain the die-dependent seeds Seed1 and Seed2 from the storage unit 110 , respectively.

[0027] In step S12, the controller 100C (e.g., the address information rearrangement circuit 120) rearranges the multiple sets of address information of the address according to the die-dependent seed Seed1 to protect the address carried by at least one address signal between the controller 100C and the NVM 100M, wherein the address in the write phase PHASE(0) may represent a write address. For example, the controller 100C may utilize the set of switches in the address information rearrangement circuit 120 to exchange two or more address lines in a set of address lines according to the die-dependent seed Seed1 to rearrange the multiple sets of address information of the address.

[0028] In step S14, the controller 100C (e.g., the data conversion circuit 140) rearranges a plurality of subsets of a set of data (e.g., a set of write data) according to the die-dependent seed Seed2 to protect the set of data carried by at least one data signal between the controller 100C and the NVM 100M. For example, the controller 100C may utilize the set of switches in the data conversion circuit 140 (particularly, the data subset rearrangement circuit 142 therein) to exchange two or more data lines in a set of data lines according to the die-dependent seed Seed2 to rearrange the plurality of subsets of the set of data.

[0029] In step S16, the controller 100C performs a write operation on the NVM 100M according to the address (eg, the write address) described in step S12, and in particular, writes the set of data (eg, the set of write data) rearranged in step S14 into the NVM 100M.

[0030] In step S18, the controller 100C determines whether the writing in the writing phase PHASE(0) is completed. If so, the controller 100C may leave the writing phase PHASE(0), for example, during a subsequent boot (e.g., the next boot), enter the reading phase PHASE(1), in particular, enter step S20; if not, the controller 100C may stay in the writing phase PHASE(0) to continue writing, in particular, enter step S10.

[0031] In step S20 , the controller 100C obtains the die-dependent seeds Seed1 and Seed2 . For example, the address information rearrangement circuit 120 and the data conversion circuit 140 may obtain the die-dependent seeds Seed1 and Seed2 from the storage unit 110 , respectively.

[0032] In step S22, the controller 100C (e.g., the address information rearrangement circuit 120) rearranges multiple sets of address information of an address according to the die-dependent seed Seed1 to protect the address carried by at least one address signal between the controller 100C and the NVM 100M, wherein the address in the read phase PHASE(1) may represent a read address. For example, the controller 100C may utilize the set of switches in the address information rearrangement circuit 120 to exchange two or more address lines in the set of address lines according to the die-dependent seed Seed1 to rearrange the multiple sets of address information of the address.

[0033] In step S24, the controller 100C performs a read operation on the NVM 100M according to the address (e.g., the read address) described in step S22, and in particular, reads a set of data (e.g., a set of read data) from the NVM 100M. For example, this set of data can be loaded into a random access memory (RAM) in the controller 100C, but the present invention is not limited thereto.

[0034] In step S26, the controller 100C (e.g., the data conversion circuit 140) rearranges the plurality of subsets of the set of data (e.g., the set of read data) in step S24 according to the die-dependent seed Seed2 to protect the set of data carried by at least one data signal between the controller 100C and the NVM 100M. For example, the controller 100C may utilize the set of switches in the data conversion circuit 140 (particularly, the data subset rearrangement circuit 142 therein) to exchange two or more data lines in the set of data lines according to the die-dependent seed Seed2 to rearrange the plurality of subsets of the set of data.

[0035] In step S28, the controller 100C determines whether the reading in the reading phase PHASE(1) is completed. If so, the controller 100C may leave the reading phase PHASE(1) to end the reading. Figure 2 If not, the controller 100C may stay in the reading phase PHASE (1) to continue reading, in particular, enter step S20. For example, when leaving the reading phase PHASE (1), the controller 100C has loaded the predetermined information control (e.g., program related information, such as multiple instructions and their data) into the RAM to control the operation of the electronic device 100, but the present invention is not limited thereto.

[0036] For a better understanding, the method can be used Figure 2 The workflow shown in FIG. 1 is used to illustrate the present invention, but the present invention is not limited thereto. According to some embodiments, one or more steps may be performed in Figure 2 Add, delete or modify the workflow shown.

[0037] According to some embodiments, Figure 1 The NVM 100M shown may include a corresponding NVM-side information protection circuit architecture, which may be equivalent to the controller-side information protection circuit architecture composed of the storage unit 110, the address information rearrangement circuit 120, the seed generation circuit 130, and the data conversion circuit 140 in the controller 100C, so as to operate according to the method, but the present invention is not limited thereto. For example, it is assumed that a series of available addresses available for 100C to control the NVM 100M are all valid addresses, and each represents a series of storage locations with the same size, such as a series of pages. Seed1 may be a seed that changes according to a predetermined sequence, wherein for the same die, the predetermined sequence is the same regardless of whether it is in the write phase PHASE(0) or the read phase PHASE(1). In this case, regardless of how the group of address lines are exchanged, the group of data in the write phase PHASE(0), such as the group of write data, can be written somewhere in the NVM 100M, and can also be read according to the same address line exchange. Therefore, NVM 100M does not need to perform the reverse rearrangement of the address information rearrangement, nor does it need to set up a corresponding reverse address information rearrangement circuit. In addition, Seed2 can be a seed that changes according to another predetermined sequence, wherein for the same bare chip, the other predetermined sequence is the same regardless of whether it is in the write phase PHASE (0) or the read phase PHASE (1). In this case, regardless of how the group of data lines are exchanged, the group of data in the write phase PHASE (0), such as the group of write data, can be written to a certain place in NVM 100M, and can also be read out to be restored (recovered) according to the same data line exchange. Therefore, NVM 100M does not need to perform the reverse rearrangement of the data subset rearrangement, nor does it need to set up a corresponding reverse data subset rearrangement circuit.

[0038] According to some embodiments, the controller 110C (e.g., the core circuit 101) may parse the header in the information from the NVM 100M to obtain the die-dependency seeds Seed1 and Seed2 from the header, and provide the die-dependency seeds Seed1 and Seed2 to the address information rearrangement circuit 120 and the data conversion circuit 140. For example, the corresponding NVM-side information protection circuit architecture may obtain the die-dependency seeds Seed1 and Seed2 from the corresponding storage unit (e.g., an electronic fuse or a security register) therein, embed or insert the die-dependency seeds Seed1 and Seed2 into the header, and combine the header with encrypted data such as an image for transmission to the controller 110C.

[0039] Figure 3 Show Figure 2 The method is a write control scheme in one embodiment of the present invention. For the address information rearrangement circuit 120, the address information rearrangement may include address information shifting, such as shifting the binary version 0001_0010_0011_0100 of 0x1234 to become the binary version 0010_0011_0100_0001 of 0x2341. In particular, the address information rearrangement may further include scrambling, such as scrambling the binary version 0010_0011_0100_0001 of 0x2341 to become the binary version 0100_1100_0001_1000 of 0x4C18. For the data subset rearrangement circuit 142, the data subset rearrangement may include data subset shifting, such as shifting the binary version 1010_1011_1100_1101 of 0xABCD to become the binary version 1011_1100_1101_1010 of 0xBCDA. In particular, the data subset rearrangement may further include concatenation, such as concatenating the binary version 1011_1100_1101_1010 of 0xBCDA to become the binary version 0111_1100_1110_0101 of 0x7CE5. After transmitting the command, the controller 110C may transmit the address (such as the write address such as the address processed by the address information rearrangement), and then write the data (such as the set of write data). For example, the address information rearrangement circuit 120 and the data conversion circuit 140 (especially, the data subset rearrangement circuit 142 therein) can respectively use their respective modulo calculation circuits to apply a modulo operator mod to the die-dependent seeds Seed1 and Seed2, and in particular, perform a modulo operation on the die-dependent seeds Seed1 and Seed2 to generate modulo operation results, so as to perform the address information rearrangement and the data subset rearrangement according to these modulo operation results. For the sake of simplicity, similar contents in this embodiment are not repeated here.

[0040] Figure 4 Show Figure 2 The method shown is a reading control scheme in one embodiment of the present invention. Figure 3 In the write control scheme shown, after transmitting the command, the controller 110C may transmit the address (e.g., the read address, such as the address after the address information is rearranged), and then read the data (e.g., the set of read data). For the sake of simplicity, similar contents in this embodiment are not repeated here.

[0041] Figure 5 Show Figure 2The method shown is a hybrid conversion control scheme in one embodiment of the present invention. Figure 1 At least a portion (e.g., a portion or all) of the controller-side information protection circuit architecture shown can be integrated into the hybrid conversion module 500. An address and its integrity code such as a cyclic redundancy check (CRC) code can be respectively carried in signals ADDR and CRC.ADDR, and the data at this address and its integrity code such as a CRC code can be respectively carried in signals DATA and CRC.DATA. For example, the hybrid conversion module 500 can pre-calculate the integrity codes of a series of data, such as their CRC codes {C0, ..., C3}, {C4, ..., C7}, ..., {C120, ..., C127}, etc., and store these integrity codes such as these CRC codes in a CRC table. In addition, the hybrid conversion module 500 can utilize the rearrangement circuit and the splicing circuit therein to rearrange the seeds according to the corresponding seeds, such as Seed (1), Seed (2) and Seed (3), and can utilize a multiplexer (MUX) to select one of the plurality of rearrangement results and one of the plurality of splicing results according to the corresponding seeds, such as Seed (4), for output. For the sake of simplicity, similar contents in this embodiment are not repeated here.

[0042] Figure 6 Show Figure 2 The method shown is an address information rearrangement control scheme in one embodiment of the present invention. Figure 1 In the illustrated structure, the electronic device 100 may include a plurality of physical lines between the controller 100C and the NVM 100M. These physical lines include a group of physical lines corresponding to the signals IO0, IO1, IO2 and IO3, and this group of physical lines may be used as the group of address lines or the group of data lines at different times (or phases). In particular, the controller 100C may perform command transmission, address transmission, and data transmission or reception in the command phase CMD_Phase, the address phase Address_Phase and the data phase Data_Phase, respectively. For example, when the controller 100C performs the rearrangement of the address information in the address phase Address_Phase, the group of physical lines represents the group of address lines, and the corresponding signals IO0, IO1, IO2 and IO3 transmitted thereon represent address signals. For another example, when the controller 100C performs the rearrangement of the data subset in the data phase Data_Phase, the group of physical lines represents the group of data lines, and the corresponding signals IO0, IO1, IO2 and IO3 transmitted thereon represent data signals.

[0043] According to the present embodiment, the physical positions of the set of physical lines are physical line positions P0, P1, P2 and P3, and can be exchanged by using the above-mentioned switches to become any of various rearrangement results. For example, at one time point, the physical line positions P0, P1, P2 and P3 can be exchanged to become physical line positions P1, P3, P2 and P0; at another time point, the physical line positions P0, P1, P2 and P3 can be exchanged to become physical line positions P2, P3, P1 and P0; and at other time points, the physical line positions P0, P1, P2 and P3 can be exchanged to become other rearrangement results. For the sake of simplicity, similar contents in the present embodiment are not repeated here.

[0044] According to some embodiments, the data conversion circuit 140 (e.g., the integrity code selective arrangement circuit 144) may determine whether the integrity code transmission function is enabled according to the conversion seed Seed3.1 to generate a first determination result, wherein the first determination result indicates whether the integrity code transmission function is enabled. The integrity code transmission function may be used to transmit the group of data (e.g., the group of data in step S24, such as the group of read data) together with one of the integrity codes of the plurality of groups of data according to the conversion seed Seed3.2, and the plurality of groups of data include the group of data, wherein the respective integrity codes of the plurality of groups of data may be used to perform error detection on the plurality of groups of data respectively. Examples of the above-mentioned integrity codes may include (but are not limited to): CRC code, hash value, parity-check code, etc. When the first judgment result indicates that the integrity code transmission function is enabled, the data conversion circuit 140 (e.g., the integrity code selective arrangement circuit 144) may determine which of the respective integrity codes of the plurality of sets of data is selected as the integrity code according to the conversion seed Seed3.2 to generate a second judgment result, wherein the second judgment result indicates which of the respective integrity codes of the plurality of sets of data is selected as the integrity code for the data conversion. In addition, for transmitting the set of data together with the integrity code, the data conversion circuit 140 (e.g., the integrity code selective arrangement circuit 144) may determine the relative position of the integrity code relative to the plurality of subsets of the set of data according to the conversion seed Seed3.3 (e.g., the integrity code such as the CRC code may be located before the set of data, after the set of data, or between two subsets of the plurality of subsets of the set of data) for the data conversion. In addition, the data conversion circuit 140 (e.g., the integrity code selective arrangement circuit 144) may determine whether to use the integrity code to perform error detection on the corresponding set of data in the plurality of sets of data according to the conversion seed Seed3.4. The data conversion circuit 140 (e.g., the integrity code selective arrangement circuit 144) may generate a self-generated integrity code such as a self-generated CRC code based on the corresponding set of data, and compare the integrity code such as the CRC code with the self-generated integrity code such as the self-generated CRC code, wherein the sameness of the two indicates no error, and the difference between the two indicates an error. The data conversion circuit 140 (e.g., the integrity code selective arrangement circuit 144) may also determine the respective rearrangement positions of the respective integrity codes of the multiple sets of data (e.g., the positions of the integrity codes such as the CRC codes, such as relative positions of other integrity codes in the respective integrity codes of the multiple sets of data, and / or relative positions of the multiple sets of data) based on the conversion seed Seed3.5 for error detection of the multiple sets of data.

[0045] Figure 7 Show Figure 2The method shown is a data conversion control scheme in one embodiment of the present invention. In addition to performing the address information rearrangement and the data subset rearrangement (e.g., exchanging physical lines according to the die-dependent seeds Seed1 and Seed2, respectively), the controller 100C can use the data conversion circuit 140 (e.g., the integrity code selective arrangement circuit 144) to perform the integrity code selective arrangement. Since the reading phase PHASE (1) is used as an example in this embodiment, the NVM 100M (e.g., the NVM-side information protection circuit architecture therein) can perform its own integrity code selective arrangement to generate a selective arrangement result for output to the controller 100C, and the controller 100C can perform its own integrity code selective arrangement when reading the NVM 100M to restore the multiple sets of data.

[0046] like Figure 7 As shown, the plurality of sets of data such as data 1, 2, 3, 4, 5, 6, 7 and 8 and their respective integrity codes such as CRC codes c0, c1, c2, c3, c4, c5, c6 and c7, together with the dummy data shown by the shadow, can be stored in a set of addresses {Addr} such as 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9 and 0xA in the NVM 100M, wherein the dummy data can be stored at address 0x6, and the respective subsets of data 1, 2, 3, 4, 5, 6, 7 and 8 {1.1, 1.2, 1.3, 1.4}, {2.1, 2.2, 2.3, 2.4}, {3.1, 3.2, 3.3, 3 .4}, {4.1,4.2,4.3,4.4}, {5.1,5.2,5.3,5.4}, {6.1,6.2,6.3,6.4}, {7.1,7.2,7.3,7.4} and {8.1,8.2,8.3,8.4} and CRC codes {c0,c1,c2,c3} and {c4,c5,c6,c7} can be rearranged and stored in other addresses of the group address {Addr}, respectively.

[0047] According to the present embodiment, the controller 100C may read the NVM 100M at a certain time point to receive the rearranged subsets {1.1, 1.2, 1.3, 1.4}, {2.1, 2.2, 2.3, 2.4}, {3.1, 3.2, 3.3, 3.4} and {4.1, 4.2, 4.3, 4.4} carried by the signals IO0, IO1, IO2 and IO3 from the NVM 100M, together with the CRC codes c5, c6 and c2 randomly appearing in the front or the back, and may restore the data 1, 2, 3 and 4 from the information carried by the signals IO0, IO1, IO2 and IO3, for example, by its own integrity code selective arrangement and the data subset rearrangement. In particular, the data conversion circuit 140 (e.g., the integrity code selective arrangement circuit 144) may perform error detection on the data 6 (previously or subsequently read) according to the CRC code c6. For the sake of simplicity, similar contents in the present embodiment are not repeated here.

[0048] Figure 8 Show Figure 7 Another example of the read and restore operation of the data conversion control scheme shown. The controller 100C may read the NVM 100M at another time point to receive the rearranged subsets {5.1, 5.2, 5.3, 5.4}, {6.1, 6.2, 6.3, 6.4}, {7.1, 7.2, 7.3, 7.4} and {8.1, 8.2, 8.3, 8.4} carried by the signals IO0, IO1, IO2 and IO3 from the NVM 100M, together with the CRC codes c1, c7 and c6 randomly appearing thereafter, and may restore the data 5, 6, 7 and 8 from the information carried by the signals IO0, IO1, IO2 and IO3, for example, by selectively permuting its own integrity code and the data subset rearrangement. In particular, the data conversion circuit 140 (e.g., the integrity code selective permutation circuit 144) may perform error detection on the data 7 according to the CRC code c7. For the sake of brevity, similar contents in this embodiment are not repeated here.

[0049] Fig. 9 Show Figure 7Another example of the read and restore operation of the data conversion control scheme shown. The controller 100C may read the NVM 100M at another time point to receive the rearranged subsets {1.1, 1.2, 1.3, 1.4}, {2.1, 2.2, 2.3, 2.4}, {3.1, 3.2, 3.3, 3.4}, {4.1, 4.2, 4.3, 4.4} carried by the signals IO0, IO1, IO2 and IO3 from the NVM 100M, together with the CRC codes c7 and c1 that appear randomly in the front or back, and may restore the data 1, 2, 3 and 4 from the information carried by the signals IO0, IO1, IO2 and IO3, for example, by selectively permuting its own integrity code and the data subset rearrangement. In particular, the data conversion circuit 140 (e.g., the integrity code selective permutation circuit 144) may perform error detection on the data 1 according to the CRC code c1. For the sake of brevity, similar contents in this embodiment are not repeated here.

[0050] Fig.10 Show Figure 7 Another example of the read and restore operation of the data conversion control scheme shown. The controller 100C may read the NVM 100M at another time point to receive the rearranged subsets {1.1, 1.2, 1.3, 1.4}, {2.1, 2.2, 2.3, 2.4}, {3.1, 3.2, 3.3, 3.4}, {4.1, 4.2, 4.3, 4.4} carried by the signals IO0, IO1, IO2 and IO3 from the NVM 100M, together with the CRC codes c6 and c2 randomly appearing in (e.g., between certain subsets), and may restore the data 1, 2, 3 and 4 from the information carried by the signals IO0, IO1, IO2 and IO3, for example, by selectively permuting its own integrity code and rearranging the data subsets. For the sake of simplicity, similar contents in this embodiment are not repeated here.

[0051] Based on the above embodiments, the present invention provides a device for performing information protection on NVM 100M, and examples of the above devices may include (but are not limited to): electronic device 100, controller 100C and the controller-side information protection circuit architecture therein, NVM 100M and the NVM-side information protection circuit architecture therein, etc.

[0052] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the claims of the present invention should fall within the scope of the present invention.

[0053] Description of Reference Numerals

[0054] 100: Electronic devices

[0055] 100C: Controller

[0056] 100M:NVM

[0057] 101: Core Circuit

[0058] 110: Storage unit

[0059] 120: Address information rearrangement circuit

[0060] 130: Seed generation circuit

[0061] 130SG: Seed Generator

[0062] 131,132,133,134,135: Seed Converter

[0063] 140: Data conversion circuit

[0064] 142: Data subset rearrangement circuit

[0065] 144: Integrity code selective arrangement circuit

[0066] IO0,IO1,IO2,IO3,CLK,ADDR,CRC.ADDR,DATA,CRC.DATA: signal

[0067] Seed1,Seed2,Seed3,Seed3.1,Seed3.2,Seed3.3,Seed3.4,Seed3.5,Seed(1),Seed(2),Seed(3),Seed(4): Seed

[0068] S10,S12,S14,S16,S18,S20,S22,S24,S26,S28: Steps

[0069] PHASE(0): writing phase

[0070] PHASE(1): Reading phase

[0071] mod: modulus operator

[0072] 500: Mixed conversion module

[0073] C0~C3,C4~C7,C120~C127,c0,c1,c2,c3,c4,c5,c6,c7: CRC code

[0074] P0, P1, P2, P3: entity line position

[0075] CMD_Phase: Command Phase

[0076] Address_Phase: Address phase

[0077] Data_Phase: Data phase

[0078] Addr: Address

[0079] 1,2,3,4,5,6,7,8: data

[0080] 1.1,1.2,1.3,1.4,2.1,2.2,2.3,2.4,3.1,3.2,3.3,3.4,4.1,4.2,4.3,4.4,5.1,5.2,5.3,5.4,6.1,6.2,6.3,6.4,7.1,7.2,7.3,7.4,8.1,8.2,8.3,8.4: subsets.

Claims

1. A method for protecting information in a non-volatile memory, the method being applied to a controller, the method comprising: Obtaining a first die dependency seed and a second die dependency seed, wherein the first die dependency seed and the second die dependency seed correspond to a die used to implement the non-volatile memory; Rearranging multiple sets of address information of an address according to the first die-dependent seed to protect the address carried by at least one address signal between the controller and the non-volatile memory; as well as re-arranging a plurality of subsets of a set of data according to the second die-dependency seed to protect the set of data carried by at least one data signal between the controller and the non-volatile memory; in, The step of rearranging multiple sets of address information of an address according to the first die-dependent seed further comprises: using a set of switches to swap two or more address lines in a set of address lines according to the first die-dependent seed to rearrange the multiple sets of address information of the address; The step of rearranging multiple subsets of a set of data according to the second die dependency seed also includes: using a set of switches to exchange two or more data lines in a set of data lines according to the second die dependency seed to rearrange the multiple subsets of the set of data.

2. The method of claim 1, wherein the controller comprises a storage unit; and the step of obtaining the first die dependency seed and the second die dependency seed further comprises: At least one die dependency seed of the first die dependency seed and the second die dependency seed is obtained from the storage unit, wherein the at least one die dependency seed is pre-stored in the storage unit.

3. The method of claim 1 , wherein the step of obtaining the first die dependency seed and the second die dependency seed further comprises: A header in the information from the non-volatile memory is parsed to obtain at least one of the first die dependency seed and the second die dependency seed from the header.

4. The method of claim 1, further comprising: Using a seed generator in the controller to generate an initial seed, wherein the initial seed is updated as time changes; Utilizing a plurality of seed converters in the controller to convert the initial seed into a plurality of conversion seeds for data conversion, wherein the plurality of conversion seeds are updated as the initial seed changes, and the plurality of conversion seeds include a first conversion seed and a second conversion seed; and determining whether an integrity code transmission function is enabled based on the first conversion seed to generate a first determination result, wherein the integrity code transmission function is used to transmit the group of data together with one of the respective integrity codes of multiple groups of data based on the second conversion seed, the multiple groups of data including the group of data, and the first determination result indicates whether the integrity code transmission function is enabled.

5. The method of claim 4, wherein the first determination result indicates that the integrity code transmission function is enabled; and the method further comprises: Which one of the respective integrity codes of the multiple groups of data is selected as the integrity code is determined based on the second conversion seed to generate a second determination result, wherein the second determination result indicates which one of the respective integrity codes of the multiple groups of data is selected as the integrity code for performing the data conversion.

6. A controller for protecting information in a non-volatile memory, the controller comprising: a core circuit for controlling the controller according to predetermined information loaded from the non-volatile memory to control the operation of the electronic device, wherein the electronic device includes the controller and the non-volatile memory; an address information rearrangement circuit, coupled to the core circuit, for performing address information rearrangement, wherein the address information rearrangement circuit obtains a first die-dependent seed, and rearranges multiple sets of address information of an address according to the first die-dependent seed, so as to protect the address carried by at least one address signal between the controller and the non-volatile memory; as well as a data conversion circuit coupled to the core circuit and configured to perform data conversion, wherein the data conversion circuit obtains a second die-dependency seed and rearranges a plurality of subsets of a set of data according to the second die-dependency seed to protect the set of data carried by at least one data signal between the controller and the non-volatile memory; wherein the first die dependency seed and the second die dependency seed correspond to a die used to implement the non-volatile memory; in, The step of rearranging multiple sets of address information of an address according to the first die-dependent seed further comprises: using a set of switches to swap two or more address lines in a set of address lines according to the first die-dependent seed to rearrange the multiple sets of address information of the address; The step of rearranging multiple subsets of a set of data according to the second die dependency seed also includes: using a set of switches to exchange two or more data lines in a set of data lines according to the second die dependency seed to rearrange the multiple subsets of the set of data.

7. An electronic device comprising the controller as claimed in claim 6, wherein the electronic device comprises the non-volatile memory.

8. A device for protecting information in a non-volatile memory, the device comprising: an address information rearrangement circuit, configured to rearrange address information, wherein the address information rearrangement circuit obtains a first die-dependent seed and rearranges multiple sets of address information of an address according to the first die-dependent seed to protect the address carried by at least one address signal between the controller and the non-volatile memory; as well as a data conversion circuit configured to perform data conversion, wherein the data conversion circuit obtains a second die-dependent seed and rearranges a plurality of subsets of a set of data according to the second die-dependent seed to protect the set of data carried by at least one data signal between the controller and the non-volatile memory; wherein the first die dependency seed and the second die dependency seed correspond to a die used to implement the non-volatile memory; in, The step of rearranging multiple sets of address information of an address according to the first die-dependent seed further comprises: using a set of switches to swap two or more address lines in a set of address lines according to the first die-dependent seed to rearrange the multiple sets of address information of the address; The step of rearranging multiple subsets of a set of data according to the second die dependency seed also includes: using a set of switches to exchange two or more data lines in a set of data lines according to the second die dependency seed to rearrange the multiple subsets of the set of data.