Memory device and method for temporarily storing content

By using reversible destructive reading and reverse operations in the memory, the problem of the memory being vulnerable to tampering attacks is solved, data security and system stability are achieved, and the integrity and security of the stored content are ensured.

CN109697172BActive Publication Date: 2024-09-10INFINEON TECHNOLOGIES AG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201811242463.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2017-10-24
Filing Date
2018-10-24
Publication Date
2024-09-10
Estimated Expiration
2038-10-24

AI Technical Summary

Technical Problem

It is difficult for existing technologies to effectively protect memory from tampering attacks, especially in electronic devices. Attackers can obtain confidential data or damage the correct operation of the device by tampering with the memory.

Method used

Using a memory device with first and second buffer memories, the integrity of the data is ensured by performing a reversible destructive read operation in the memory to invalidate the stored content, and applying a reverse operation when reading to restore the original content. Security.

Benefits of technology

Effectively prevent data tampering and attacks, ensure the security of stored content and system stability, and improve resistance to attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109697172B_ABST
    Figure CN109697172B_ABST
Patent Text Reader

Abstract

According to one embodiment, a memory device is described, which has: a memory; a first buffer memory; a first buffer memory control unit, the first buffer memory control unit is configured to invalidate the storage content in the memory by means of modification when storing storage content from the memory into the first buffer memory; a second buffer memory and a second buffer memory control unit, the second buffer memory control unit is configured to read storage content from the memory to verify whether the storage content read from the memory is valid, and if the storage content read from the memory is invalid, apply the inverse operation of the modification to the read storage content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments generally relate to memory devices and methods for temporarily storing content. Background Art

[0002] Electronic devices must be protected from attacks in many applications. Typical examples are chip cards, which process and store confidential data (such as keys or passwords) or data that must be protected from tampering (such as the balance on a prepaid card), or control devices, such as those in vehicles, whose correct operation is crucial for the safety of the user. A potential attack point for electronic devices is their memory. By tampering with this memory, an attacker could gain access to confidential data or compromise the correct operation of the electronic device. Therefore, effective mechanisms are desirable for protecting electronic memories, and in particular their stored contents. Summary of the Invention

[0003] According to one embodiment, a memory device is provided, comprising: a memory; a first buffer memory; a first buffer memory control unit, which is configured to invalidate the storage content in the memory by means of a modification (for example, by changing the useful data relative to its checksum) when storing storage content from the memory in the first buffer memory; a second buffer memory and a second buffer memory control unit, which is configured to read storage content from the memory to check whether the storage content read from the memory is valid and, if the storage content read from the memory is invalid, to apply a reversal of the modification to the storage content read.

[0004] According to another embodiment, a method for temporarily storing content according to the above-mentioned memory device is provided. BRIEF DESCRIPTION OF THE DRAWINGS

[0005] The accompanying drawings do not reflect actual scale, but are intended to illustrate the principles of various embodiments. In the following, various embodiments are described with reference to the following drawings.

[0006] Figure 1 A data processing device having a main memory, a cache memory and a processor is shown.

[0007] Figure 2 A data processing device having a main memory, two cache memories and a processor is shown.

[0008] Figure 3 A data processing device having a main memory, two cache memories, associated cache controllers, and a processor is shown.

[0009] Figure 4 A memory device according to one embodiment is shown.

[0010] Figure 5 A flow chart is shown that illustrates a method for temporarily storing content according to one embodiment. DETAILED DESCRIPTION

[0011] The following detailed description relates to the accompanying drawings, which illustrate details and embodiments. These embodiments are described in detail so that those skilled in the art can implement the present invention. Other embodiments are also feasible and the embodiments can be changed in structure, logic and electricity without departing from the subject matter of the present invention. Different embodiments are not necessarily mutually exclusive, but different embodiments can be combined with each other to produce new embodiments. Within the scope of this specification, the terms "connect", "couple" and "couple" are used to describe direct and indirect connections, direct or indirect connections and direct or indirect couplings.

[0012] Buffer memory, typically called cache or cache memory, is typically used to compensate for relatively slow access to memory.

[0013] Figure 1 A data processing device 100 is shown having a main memory 101 , a cache memory 102 and a processor 103 .

[0014] The processor 103 accesses the main memory 101 and reads instructions (program code) and data to be processed from the main memory 101. However, the processor 103 may be fast so that it can process data and instructions (commands) faster than the main memory 101 can provide the instructions and data. Therefore, a cache memory 102 is provided in which the storage contents from the main memory are temporarily stored block by block. Since the processor has a higher access speed to the cache memory 102 than to the main memory, it can access the storage contents from the main memory faster.

[0015] If data processing device 100 is a secure controller in which mutable data is transferred from an original memory (e.g., main memory 101, such as RAM (Random Access Memory)) to another memory (e.g., cache 102), it may be necessary to render the original data in main memory 101 unusable after the transfer by performing a destructive read. This ensures that only one instance of the data always exists in the system (composed of main memory and cache). This prevents attacks that aim to erroneously access other (i.e., older) versions of the data.

[0016] However, there are scenarios in which, although the original data should be destroyed from the perspective of the first buffer memory, the original data should always be readable from the perspective of the second buffer memory. An example of this is a system having a data cache and a separate instruction cache.

[0017] Figure 2 A data processing device 200 is shown having a main memory 201 , a first cache memory 202 , a second cache memory 203 and a processor 204 .

[0018] As in Figure 1 As in the example in , the processor 204 accesses the main memory 201 and reads instructions (program codes) and data to be processed from the main memory 201 .

[0019] However, with Figure 1 Differently, there are two cache memories 202 and 203. For example, the first cache memory 202 is a data cache memory for temporarily storing ("caching") data to be processed, and the second cache memory 203 is an instruction cache memory for temporarily storing instructions (program codes).

[0020] If the program code and the data to be processed are present in mixed form in the main memory 201, i.e., there are data blocks that contain both the program code and the data to be processed, as is the case in certain architectures (e.g., when using literals), and if the cache memories 202, 203 are loaded block by block (as is common), it is necessary that the same data blocks remain readable and loadable to both cache memories 202, 203.

[0021] This is achieved by completely abandoning destructive reading, which however makes the system vulnerable to attacks.

[0022] Another possibility is that the first cache memory 202 (i.e., the cache memory that is read from first) first writes the memory content back to the original memory 201 before the second cache memory 203 can read the memory content from the original memory. However, this requires a knowledge of whether the memory content is actually present in the first cache memory 202, which results in high system complexity and significant performance losses due to the necessary re-copying.

[0023] According to various embodiments, a reversible destructive read is performed when storing the memory content from the main memory 201 into the first cache memory 202 .

[0024] This makes it possible that when the memory content is read into the second cache memory 203 , the original memory content can be restored if the reversal rules of the reversible destructive read are known, which was initiated by reading into the first cache memory 202 .

[0025] Thus, destructive reading itself is not an operation that destroys the data, but rather an operation that transforms the data. The transformation (or modification) is, for example, selected so that it modifies the stored content as comprehensively as possible and in a way that cannot be easily reversed. Thus, for example, negation is a major modification, but easily reversible by reapplication. Modifications performed using nonlinear / linear feedback shift registers ((N)LFSRs) or suitable encryption functions also result in significant modifications, but cannot be reversed again using the same logic circuit and are therefore not easily reversible.

[0026] For example, a modification function is selected for the transformation, which modification function must be applied to the data repeatedly relatively frequently until the original data are restored.

[0027] The modification of the storage content and the reversal of the modification of the storage content are performed, for example, by a cache controller of the cache memory 202 , 203 .

[0028] Figure 3 A data processing device 300 is shown, which has a main memory 301 , a first cache memory 302 , a second cache memory 303 , a processor 304 , a first cache controller 305 and a second cache controller 306 .

[0029] The first cache controller 305 has a memory interface to the main memory 301 and a memory interface to the first cache memory 302 , and controls storage of storage content from the main memory 301 in the first cache memory 302 .

[0030] The second cache controller 306 has a memory interface to the main memory 301 and a memory interface to the second cache memory 303 , and controls storage of storage content from the main memory 301 in the second cache memory 303 .

[0031] According to one embodiment, the first cache controller 305 stores the storage content stored in the first cache memory 302 and modified, for example, by the processor 304, back to the main memory 301. Similarly, the first cache controller 305 can modify the storage content in the main memory 301 and invalidate it, for example, according to the reversible modification as described above.

[0032] According to one embodiment, the second cache controller 306 has read-only access to the main memory 301 , ie, it cannot write into the main memory 301 and in particular does not modify the storage content in the main memory 301 .

[0033] In order to reversibly modify the storage content, the first cache controller 305 can, for example, only transform the error identification code attached to the storage content (eg, attached to the storage word) without transforming the entire storage content.

[0034] It can be proposed that the first cache controller 305 can only check for errors in the stored content, with the error identification code remaining in its original (unmodified) state. This means that the first cache controller cannot compensate for changes to the error identification code during error checking. Therefore, reversible modifications can be irreversible from the perspective of the first cache controller 305, as the first cache controller 305 does not support the reverse operation. This improves system security.

[0035] According to one embodiment, the second cache controller 306 can check the storage content for errors when reading the storage content including the corresponding error identification code, such as the storage word, not only under the assumption that the error identification code has not been modified but also under the assumption that the error identification code has been modified.

[0036] If such a double check is to be avoided—or if the memory content (without the error identification code) itself is part of a reversible modification—then the reverse transformation can be specifically triggered by the second cache controller 306 using supplementary prediction information, such as a supplementary prediction bit. For example, the first cache controller 305 sets a prediction bit in the memory content, indicating that the memory content has been reversibly transformed by the first cache controller. In response, the second cache controller 306 can apply the inverse of the transformation to the memory content when it reads the memory content and detects that the prediction bit (for example, prediction information) is set. This prediction bit itself generates only one bit of security.

[0037] By modifying a sufficient number of bits (eg, 32 bits or more), high security and attack recognition probability can be designed.

[0038] Another approach (when a very high level of security is not required) is to simply mark the memory content as corrupted using an additional command bit. However, this results in additional memory requirements and reduced security. Therefore, the reversible modification (by inverting the bit) is only applied to one bit here.

[0039] Data processing device 300 may be, for example, a safety controller having a data cache memory 302 and an instruction cache memory 303. Main memory 301 may be, for example, an external RAM that both caches 302 and 303 can access and that stores memory contents in the size of a cache block plus an additional error detection code. A cache block is a unit used by caches 302 and 303 for temporary storage. This means that when caches 302 and 303 need to temporarily store content, they read an entire data block of the size of the cache block from the memory and store it.

[0040] Because data from RAM 301 can be modified in data cache 302 by processor (CPU) 304 through storing data (memory operations), and there is a risk that these modifications will be lost by reloading the original data from RAM 301 (e.g., forced by an attack), according to one embodiment, the corresponding original data block in RAM 301 is reversibly and destructively read when loading a data block into data cache 302. In this case, cache controller 305 of data cache 302 reversibly modifies the error identification codeword (or generally, error identification data) of the data block in RAM 301.

[0041] Instruction cache 303 does not necessarily need to destroy the original data block when storing it, as it is a read-only cache and data modification by CPU 304 is not possible. If instruction cache 303 is to load a data block that was previously loaded by data cache 302 and has been reversibly modified, cache controller 306 of instruction cache 303, according to this embodiment, can check the data block not only based on the uncorrupted error code but also based on the reversibly corrupted (modified) error code of the data block. To facilitate this, a further bit can be provided that supplements the data block and indicates whether the data block has been reversibly corrupted. Cache controller 305 of data cache 302 inverts this bit during a destructive read. It should be noted that, depending on various embodiments, the cache controller can generally be a memory controller associated with the cache, which can also be located in RAM 301 itself, for example. Similarly, the term "buffer memory control unit" can generally be understood as a control unit that is associated with a buffer memory and assumes control of the buffer memory.

[0042] The mechanism described above can be used, for example, in a safety controller that is implemented as a system on a chip (Single Chip).

[0043] In summary, a memory device is provided according to various embodiments, such as Figure 4As shown in .

[0044] Figure 4 A memory device 400 according to one embodiment is shown.

[0045] The memory device 400 has a memory 401 , a first buffer memory 402 and a first buffer memory control unit 403 which is configured to invalidate the memory contents in the memory 401 by means of modification when storing the memory contents from the memory 401 in the first buffer memory 402 .

[0046] In addition, the memory device 400 has a second buffer memory 404 and a second buffer memory control unit 405, and the second buffer memory control unit is configured to read the storage content from the memory 401 to check whether the storage content read from the memory 401 is valid, and if the storage content read from the memory 401 is invalid, apply the reverse operation of the modification to the read storage content.

[0047] According to various embodiments, when the first buffer memory temporarily stores a data block, the first buffer memory (e.g., cache) or its associated control device performs a reversible modification of the data block in the memory. This is used to prevent the same data block from existing twice in the system (composed of the memory and the buffer memory), which would be vulnerable to attacks. The reversible modification invalidates the storage content in the memory 401. Invalidation can be understood here as making the storage content no longer meet certain check rules after the modification. For example, the storage content has useful data and a checksum, and the useful data or the checksum or both are modified during the modification so that the checksum is no longer a correct checksum for the useful data (e.g., based on a specific error detection code or error correction code, according to which a checksum had already been generated for the useful data before the modification).

[0048] The second buffer memory (or its associated control device) is capable of determining whether a data block to be stored by the second buffer memory has been reversibly modified and, if necessary, compensating for the modification. For example, the second buffer memory can cancel the modification or immediately compensate for the modification, so that the second buffer memory can also correctly perform error detection using the modified error code, even if the modification involves modifying the error code.

[0049] Memory device 400 corresponds, for example, to the memory of an electronic integrated circuit, such as a chip card (with any form factor) or a control unit (eg with a microcontroller), in particular a safety control unit, such as a control unit in a vehicle.

[0050] The first buffer memory control unit is configured, for example, to control storage of storage content in the first buffer memory, and the second buffer memory control unit is configured, for example, to control storage of storage content in the second buffer memory.

[0051] Figure 5 A flow chart 500 is shown illustrating a method for temporarily storing content.

[0052] In 501 , when storing the stored content from the memory in the first buffer memory, the stored content in the memory is modified so that the stored content becomes invalid.

[0053] In 502, the storage content is read from the memory to store the storage content in a second buffer memory.

[0054] In 503, it is checked whether the storage content read from the memory is valid.

[0055] In 504 , if the memory content read from the memory is invalid, the inverse operation of the modification is applied to the memory content read.

[0056] In summary, some embodiments are described below.

[0057] Embodiment 1 is a memory device, as in Figure 4 As shown in .

[0058] Embodiment 2 is the memory device according to embodiment 1, wherein the second buffer memory control unit is configured to store the read storage content modified by an inverse operation of the modification in the second buffer memory.

[0059] Embodiment 3 is a memory device according to any one of embodiments 1 to 2, wherein the storage content includes instructions and data to be processed with the help of the instructions, and the first buffer memory is a buffer memory for providing the data to be processed to the processor, and the second buffer memory is a buffer memory for providing the instructions to the processor.

[0060] Embodiment 4 is a memory device according to any one of embodiments 1 to 3, wherein error code information is stored for the storage content in the memory, and the first buffer memory control unit is configured to invalidate the storage content in the memory by modifying the stored error code information.

[0061] Embodiment 5 is a memory device according to embodiment 4, wherein the second buffer memory control unit is configured to check whether the storage content read from the memory is valid based on the stored error code information.

[0062] Embodiment 6 is a memory device according to embodiment 5, wherein the second buffer memory control unit is configured to verify whether the storage content read from the memory is valid by verifying whether the storage content is error-free based on the stored error code information through the second buffer memory control unit.

[0063] Embodiment 7 is a memory device according to embodiment 6, wherein the application of the inverse operation of the modification comprises: checking whether the stored content is error-free according to error code information, wherein the error code information is generated from the stored error code information by applying the inverse operation of the modification.

[0064] Embodiment 8 is the memory device according to any one of embodiments 1 to 7, wherein the storage content is a data block, and the first buffer memory and the second buffer memory temporarily store the storage content in the form of the data block.

[0065] Embodiment 9 is the memory device according to any one of embodiments 1 to 8, wherein the modification of the storage content comprises: changing one or more bits of the storage content or changing one or more bits of error code information of the storage content.

[0066] Embodiment 10 is the memory device according to any one of embodiments 1 to 9, wherein the first buffer memory control unit has read and write access to the memory and the second buffer memory control unit has read-only access to the memory.

[0067] Embodiment 11 is the memory device of any one of embodiments 1 to 10, wherein the modification is irreversible for the first buffer memory control unit and reversible for the second buffer memory control unit.

[0068] Embodiment 12 is a memory device according to any one of embodiments 1 to 11, wherein a prediction bit is stored for storage content in the memory, the prediction bit indicating whether the storage content has been modified and the first buffer memory control unit is configured to set the prediction bit when reading or modifying the storage content.

[0069] Embodiment 13 is the memory device according to embodiment 12, wherein the second buffer memory control unit is configured to check whether the storage content read from the memory is valid based on the stored prediction bit.

[0070] Example 14 is a method for temporarily storing content, such as Figure 5 As shown in .

[0071] Embodiment 15 is the method according to embodiment 14, comprising storing the read memory content modified by the inverse operation of the modification in a second buffer memory.

[0072] Embodiment 16 is a method according to embodiment 14 or 15, wherein the storage content includes instructions and data to be processed with the help of the instructions, and the first buffer memory is a buffer memory for providing the data to be processed to the processor, and the second buffer memory is a buffer memory for providing the instructions to the processor.

[0073] Embodiment 17 is a method according to any one of embodiments 14 to 16, wherein error code information is stored for the storage content in the memory, and the storage content in the memory is invalidated by modifying the stored error code information.

[0074] Embodiment 18 is a method according to embodiment 17, comprising: checking, based on the stored error code information: whether the storage content read from the memory is valid.

[0075] Embodiment 19 is a method according to embodiment 18, comprising: verifying whether the storage content read from the memory is valid by verifying whether the storage content is error-free based on stored error code information.

[0076] Example 20 is a method according to Example 19, wherein the application of the reverse operation of the modification includes: checking whether the stored content is error-free according to the error code information, and generating the error code information from the stored error code information by applying the reverse operation of the modification.

[0077] Embodiment 21 is a method according to any one of embodiments 14 to 20, wherein the storage content is a data block and the first buffer memory and the second buffer memory temporarily store the storage content in the form of data blocks.

[0078] Embodiment 22 is a method according to any one of embodiments 14 to 21, wherein the modification of the stored content comprises: changing one or more bits of the stored content or changing one or more bits of error code information of the stored content.

[0079] Embodiment 23 is a method according to any one of embodiments 14 to 22, wherein a first buffer memory control unit for the first buffer memory has read and write access to the memory, and a second buffer memory control unit for the second buffer memory has read-only access to the memory.

[0080] Embodiment 24 is the method according to any one of embodiments 14 to 23, wherein the modification is irreversible for a first buffer memory control unit for the first buffer memory and is reversible for a second buffer memory control unit for the second buffer memory.

[0081] Embodiment 25 is a method according to any one of embodiments 14 to 24, wherein a prediction bit is stored for the storage content in the memory, the prediction bit indicating whether the storage content has been modified, and the method includes setting the prediction bit when reading the storage content to store in the first buffer memory or when modifying the storage content.

[0082] Embodiment 26 is a method according to embodiment 25, wherein whether the storage content read from the memory is valid is checked based on the stored prediction bits.

[0083] It should be noted that all the above-mentioned exemplary embodiments can be combined with one another in any desired manner.

[0084] While the present invention has been particularly shown and described with reference to specific embodiments, it will be understood by those skilled in the art that numerous changes in design and detail can be made to the embodiments without departing from the spirit and scope of the invention as defined by the following claims. The scope of the invention is therefore determined by the appended claims and is intended to include all changes that come within the literal meaning and equivalency range of the claims.

Claims

1. A memory device comprising: Memory; a first buffer memory; a first buffer memory control unit configured to, in response to storing storage content from the memory into the first buffer memory, invalidate storage content in a storage area of ​​the memory for subsequent reading of storage content from the memory for the first buffer memory by means of modification by transforming at least a portion of the read storage content; a second buffer memory; A second buffer memory control unit, the second buffer memory control unit is configured to read storage content from the memory to verify whether the storage content read from the memory is valid, and if the storage content read from the memory is invalid, apply a reverse operation of the modification to the read storage content.

2. The memory device according to claim 1, The second buffer memory control unit is configured to store the read storage content modified by means of a reverse operation of the modification in the second buffer memory.

3. The memory device according to claim 1 or 2, The storage content includes instructions and data to be processed by means of the instructions, and the first buffer memory is a buffer memory for providing the data to be processed to the processor, and the second buffer memory is a buffer memory for providing the instructions to the processor.

4. The memory device according to claim 1 or 2, Error code information is stored for the storage content in the memory, and the first buffer memory control unit is configured to invalidate the storage content in the memory by modifying the stored error code information.

5. The memory device according to claim 4, The second buffer memory control unit is configured to check, based on the stored error code information, whether the storage content read from the memory is valid.

6. The memory device according to claim 5, The second buffer memory control unit is configured to check whether the storage content read from the memory is valid by checking whether the storage content is error-free according to the stored error code information by the second buffer memory control unit.

7. The memory device according to claim 6, The application of the modified reverse operation includes: Checking whether the stored content is error-free according to error code information, which is generated from the stored error code information by applying the reverse operation of the modification.

8. The memory device according to claim 1 or 2, The storage content is a data block, and the first buffer memory and the second buffer memory temporarily store the storage content in a data block manner.

9. The memory device according to claim 1 or 2, The modifications to the stored content include: Change one or more bits of the stored content or change one or more bits of the error code information of the stored content.

10. The memory device according to claim 1 or 2, The first buffer memory control unit has read and write access to the memory, while the second buffer memory control unit has read-only access to the memory.

11. The memory device according to claim 1 or 2, The modification is irreversible for the first buffer memory control unit and reversible for the second buffer memory control unit.

12. The memory device according to claim 1 or 2, A prediction bit is stored for the storage content in the memory, the prediction bit indicating whether the storage content has been modified, and the first buffer memory control unit is configured to set the prediction bit when reading or modifying the storage content.

13. The memory device according to claim 12, The second buffer memory control unit is configured to check, based on the stored prediction bits, whether the storage content read from the memory is valid.

14. A method for temporarily storing content, the method comprising: In response to storing the storage content from the memory in the first buffer memory, modifying the storage content in the storage area of ​​the memory by transforming at least a portion of the read storage content so that the storage content becomes invalid for subsequent reading of the storage content from the memory for the first buffer memory, wherein the read storage content is stored in the storage area; reading storage content from the memory to store the storage content in a second buffer memory; Verify that the content read from the memory is valid, and If the memory content read from the memory is invalid, the inverse operation of the modification is applied to the read memory content.