Data access control method, device, computer equipment and storage medium
By introducing RS encoding and decoding modules into the ORAM system, combining position mapping and buffer Stash, the tampering and integrity problems in the ORAM system data transmission process are solved, and the security and integrity guarantee of data access are achieved.
Patent Information
- Application Number
- CN202510630845.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-05-16
AI Technical Summary
Existing ORAM systems are prone to tampering during data transmission, and defects in encryption algorithms are prone to cause data integrity problems, resulting in reduced security and reliability of data privacy protection.
The RS encoding and decoding module is adopted, combined with position mapping and buffer Stash, and data integrity is restored in the ORAM system through RS error correction code, and a security factor seed is introduced to prevent tampering, ensuring the security and integrity of the data during transmission.
It realizes the recovery of data integrity through the error correction capability of RS code in the ORAM system, improves the security and reliability of the data access process, and prevents data tampering and corruption.
Smart Images

Figure CN120179873B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a data access control method, device, computer equipment and medium. Background Art
[0002] With the rapid development of the internet, numerous mobile smart devices have become interconnected, generating massive amounts of data. To reduce data storage costs, many customers prefer to store their private data on cloud servers. However, relying solely on encryption technologies like AES to ensure the confidentiality of private data is difficult, as data access patterns still pose a risk of leakage. Attackers can infer sensitive information based on information such as the number of customer queries and query paths. The Oblivious Random Access Machine (ORAM) was proposed decades ago to effectively address this security challenge.
[0003] ORAM is a protocol that secures memory access patterns by transforming access to a single memory cell into a computationally indistinguishable sequence of a fixed number of accesses, thereby hiding the original access pattern. As a relatively costly encryption method, it prevents the leakage of searches and access patterns by continuously changing the data storage location and re-encrypting the accessed data. However, while early ORAM solutions protected the security of the data access process, their low access efficiency resulted in a large amount of access overhead, resulting in poor performance of existing ORAM systems. Therefore, in recent years, research has proposed tree-based ORAM solutions to alleviate this situation. Among them, the most traditional and efficient tree-based ORAM solution is Path ORAM, which uses a path to determine the location of the desired target data block, thereby accessing the data block on the corresponding path for obfuscation, greatly reducing the overall access overhead.
[0004] During the implementation of the present invention, it was recognized that the prior art has at least the following technical problems: On the one hand, the use of the ORAM protocol may cause data to be maliciously tampered with during transmission. If these tampering behaviors cannot be detected and repaired in a timely manner, data integrity will be seriously threatened. On the other hand, the construction of the ORAM solution is highly dependent on encryption algorithms and randomization algorithms. If these algorithms have defects or are misused during the implementation process, they can easily cause data integrity issues. Furthermore, current network attackers can use various means such as DDoS attacks, man-in-the-middle attacks, and malware attacks to attack the ORAM solution, thereby compromising data integrity. If data integrity cannot be properly guaranteed, the effectiveness of the ORAM solution will be greatly reduced, and the security and reliability of data privacy protection will also be reduced. Therefore, if these problems that arise when using the ORAM protocol are circumvented and the reliability of the ORAM system and data access security are improved, it has become a difficult problem that needs to be solved urgently. Summary of the Invention
[0005] Embodiments of the present invention provide a data access control method, apparatus, computer equipment, and storage medium to improve data security and integrity when accessing data using an ORAM system.
[0006] In order to solve the above technical problems, an embodiment of the present application provides a data access control method, including:
[0007] Initialize the storage of the data to be stored, including position mapping and RS encoding, and store the encoded data blocks in the ORAM binary tree;
[0008] Upon receiving a data access request, a read / write request is sent to the ORAM binary tree, so that the memory controller searches the buffer Stash for a target data block after receiving the request, and receives the search result, wherein the target data block is a data block corresponding to the request address in the data access request;
[0009] If the search result is yes, processing the target data block according to the read / write request;
[0010] If the search result shows that the target data block does not exist, the real physical memory location of the target data block is determined through the location mapping table, and the path label of the target data block is remapped to a new random path;
[0011] Read the path where the target data block is stored in the ORAM binary tree, and use RS to decode all data blocks contained in the path to store the data to be stored in the buffer Stash;
[0012] Update the buffer Stash and process the target data block according to the read and write request;
[0013] When the data access request is completed, all the read data blocks are encrypted, then all the data blocks are RS-encoded, and all the encrypted data blocks are evicted along the original read path.
[0014] Optionally, the initializing storage of the data to be stored includes:
[0015] When it is detected that data is stored in the untrusted memory for the first time, the detected data is used as the data to be stored, and the data to be stored is used as the basic data block;
[0016] Assign path labels to the base data blocks and record the paths through the position mapping table PosMap;
[0017] Perform encryption operation on the basic data block, perform RS encoding on the encrypted basic data block and introduce a security factor seed to obtain an encrypted coded data block;
[0018] The encrypted data block is stored in an ORAM binary tree.
[0019] Optionally, performing RS encoding on the encrypted basic data block and introducing a security factor seed to obtain an encrypted coded data block includes:
[0020] Divide the encrypted basic data block into several small data blocks of fixed size;
[0021] Perform an XOR operation on each small data block using a security seed coefficient S to generate an obfuscated data block, where the security seed coefficient S is a random value generated by a dynamic generation algorithm based on the encryption key;
[0022] Use the obfuscated data blocks as coefficients to construct data polynomials , data polynomial As the basis of the encoding process, it contains all the obfuscated data block information and is based on the RS encoding method for data polynomials. Generate check information and obtain a check polynomial;
[0023] The data polynomial and the check polynomial are combined to construct a transmission polynomial, and the transmission polynomial is used as the encrypted coded data block.
[0024] Optionally, using all data blocks included in the RS decoding path to store the data to be stored in the buffer Stash includes:
[0025] Read all data blocks on the path found from the position mapping table PosMap;
[0026] Use RS to decode all data blocks contained in the path and decrypt all data blocks to obtain the real data blocks, and store the real data blocks in Stash;
[0027] If, during the RS decoding process, a real data block matches the target data block requested by the system, data integrity and error correction can be verified during the decoding process. If the data is error-free, the data block can proceed to the next step for normal processing. Otherwise, RS error correction is used to restore the data.
[0028] Optionally, the step of using RS to decode all data blocks included in the decoding path and decrypting all data blocks to obtain real data blocks includes:
[0029] Extract the transmission polynomial from the data block read from the ORAM tree;
[0030] Reconstruct the security seed coefficient S';
[0031] Separating the transmission polynomial into a data polynomial and a check polynomial according to the transmission polynomial and the security seed coefficient S';
[0032] Use the RS-encoded verification mechanism to verify the data integrity of the data polynomial and the check polynomial. If the data is damaged or tampered with, the RS error correction capability is used to repair the data.
[0033] Decoding the data polynomial restores the encrypted data block to obtain the real data block.
[0034] Optionally, the RS encoding of all target paths and the expulsion of all encrypted data blocks according to the originally read paths include:
[0035] Perform RS encoding on all target paths and introduce a security seed coefficient to obtain a secondary encoded data block;
[0036] All the secondary encoded data blocks are evicted according to the original read path, and the data blocks in the buffer Stash are traversed. According to the path label of each data block, all data blocks are tried to be placed in the storage bucket on the target path until each storage bucket reaches the capacity limit. Finally, all data blocks continue to be stored in the ORAM binary tree, waiting for the next access call of the system.
[0037] In order to solve the above technical problems, an embodiment of the present application further provides a data access control device, comprising:
[0038] An initialization storage module is used to initialize the storage of the data to be stored, wherein the initialization storage includes position mapping and RS encoding, and stores the encoded data blocks in an ORAM binary tree;
[0039] A request response module is configured to, upon receiving a data access request, send a read / write request to the ORAM binary tree, so that the memory controller searches the buffer Stash for a target data block after receiving the request, and receives the search result, wherein the target data block is the data block corresponding to the request address in the data access request;
[0040] A first processing module, configured to process the target data block according to a read / write request if the search result shows that the target data block exists;
[0041] a second processing module, configured to determine the real physical memory location of the target data block through a location mapping table if the search result shows that the target data block does not exist, and remap the path label of the target data block to a new random path;
[0042] A reading and decoding module is used to read the path where the target data block is stored in the ORAM binary tree, and use RS to decode all data blocks contained in the path to store the data to be stored in the buffer Stash;
[0043] A buffer update module is used to update the buffer Stash and process the target data block according to the read and write request;
[0044] The re-encoding module is used to encrypt all the read data blocks after the data access request is completed, then perform RS encoding on all the data blocks, and evict all the encrypted data blocks according to the original read path.
[0045] Optionally, initializing the storage module includes:
[0046] A basic data block determination submodule is configured to, when detecting that data is stored in an untrusted memory for the first time, use the detected data as data to be stored and use the data to be stored as a basic data block;
[0047] The path generation submodule is used to assign path labels to basic data blocks and record the paths they are located on through the position mapping table PosMap;
[0048] The encryption coding submodule is used to perform encryption operations on the basic data block, perform RS encoding on the encrypted basic data block, and introduce a security factor seed to obtain an encrypted coded data block;
[0049] The data storage submodule is used to store the encrypted coded data block in the ORAM binary tree.
[0050] Optionally, the encryption coding submodule includes:
[0051] A data segmentation unit is used to divide the encrypted basic data block into several small data blocks of fixed size;
[0052] a data obfuscation unit, configured to perform an XOR operation on each small data block using a security seed coefficient S to generate an obfuscated data block, wherein the security seed coefficient S is a random value generated by a dynamic generation algorithm based on an encryption key;
[0053] Polynomial processing unit, used to construct data polynomials using obfuscated data blocks as coefficients , data polynomial As the basis of the encoding process, it contains all the obfuscated data block information and is based on the RS encoding method for data polynomials. Generate check information and obtain a check polynomial;
[0054] The coded data block generating unit is used to combine the data polynomial and the check polynomial to construct a transmission polynomial, and use the transmission polynomial as the encrypted coded data block.
[0055] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above data access control method when executing the computer program.
[0056] In order to solve the above technical problems, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above data access control method are implemented.
[0057] The data access control method, device, computer equipment and storage medium provided by the embodiments of the present invention initialize the storage of the data to be stored, and the initialization storage includes position mapping and Reed-Solomon encoding, and stores the encoded data blocks in an ORAM binary tree; when receiving a data access request, a read / write request is sent to the ORAM binary tree, so that the memory controller searches the buffer Stash for the target data block after receiving the request, and receives the search result; if the search result shows that the target data block exists, the target data block is processed according to the read / write request; if the search result shows that the target data block does not exist, the real physical memory location of the target data block is determined through a position mapping table, and the path label of the target data block is remapped to a new random path; the path where the target data block is stored in the ORAM binary tree is read, and all data blocks contained in the path are decoded using Reed-Solomon encoding, and the data to be stored is stored in the buffer Stash; the buffer Stash is updated, and the target data block is processed according to the read / write request; when the data access request is completed, all read data blocks that have completed the operation are encrypted, and then all data blocks are RS-encoded, and all encrypted and encoded data blocks are evicted according to the original read path. The powerful error correction capability of RS code is realized by setting up RS encoding / decoding modules in the ORAM system. When data is tampered with or damaged during transmission or storage, RS encoding / decoding will restore the original data through the remaining redundant information, ensuring data integrity and improving the security and integrity of the ORAM system during data access. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0059] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0060] Figure 2 is a flow chart of an embodiment of the data access control method of the present application;
[0061] Figure 3 This is a structural example diagram of a verifiable ORAM system based on RS error correction code in the data access control method of this application;
[0062] Figure 4 is a structural diagram of an embodiment of a data access control device according to the present application;
[0063] Figure 5It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are for the purpose of describing specific embodiments only and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0065] In the existing approach, the access protocol of the Path ORAM solution is as follows:
[0066] 1. When ORAM receives a memory read or write request, it first checks whether the required target data block exists in the on-chip stash. If the target block exists, it means it has been hit and the block is taken out and sent to the processor.
[0067] 2. If there is a miss, that is, it does not exist in the buffer Stash, then the path label in the tree where the target data block is located is searched from the position mapping table Position Map (PosMap) and the path label of the mapped target block is re-randomized to confuse external attackers.
[0068] 3. The on-chip ORAM controller actively sends a request to the memory to read all data blocks on the path based on the path label found in the PosMap. To prevent the leakage of private data information, all data blocks (real blocks and virtual blocks) in the bucket nodes on the entire path are read into the stash for execution.
[0069] 4. After the system re-randomizes the mapping of the path labels of the required target blocks, it needs to update the latest path labels and the latest target block values.
[0070] 5. After the processor performs the corresponding operation on the target block, it evicts the originally read data block along the original path and stores it in memory. During the eviction process, if there are not enough real data blocks to fill all bucket nodes, the remaining data blocks on the original path are filled with randomly generated virtual data blocks to confuse external attackers and protect memory access patterns.
[0071] This embodiment defines the concept:
[0072] RS error correction code: Leveraging the powerful error correction capabilities of RS (Reed-Solomon) codes, an RS encoding / decoding module is implemented in the ORAM system. When data is tampered with or damaged during transmission or storage, the RS encoding / decoding module restores the original data using the remaining redundant information, ensuring data integrity.
[0073] Security factor seed: The security seed factor is a randomly generated value that is generated by the client each time data is encoded and participates in the polynomial calculation as part of the encoding process.
[0074] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0075] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0076] See also Figure 1 ,like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0077] Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages, etc.
[0078] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptop computers, desktop computers, etc.
[0079] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0080] It should be noted that the data access control method provided in the embodiment of the present application is executed by a server, and accordingly, the data access control device is set in the server.
[0081] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only illustrative. According to the implementation requirements, there can be any number of terminal devices, networks and servers. The terminal devices 101, 102, 103 in the embodiment of the present application can specifically correspond to application systems in actual production.
[0082] See also Figure 2 , Figure 2 A data access control method provided by an embodiment of the present invention is shown. Figure 1 The server in the example is used as an example, and the details are as follows:
[0083] S201: Initialize the storage of the data to be stored, including position mapping and RS encoding, and store the encoded data blocks in the ORAM binary tree.
[0084] Among them, RS coding is one of the most commonly used erasure codes, supporting arbitrary code rates, code lengths, and fault tolerance. Given two positive integers n and k, an RS(n, k) code encodes n data blocks into k parity blocks, such that any one of the n + k blocks can be recovered from any of the other n blocks. All n + k data / parity blocks form a stripe of size n + k. Therefore, an RS(n, k) code tolerates the loss of any k blocks in a stripe, achieving the Maximum Distance Separability (MDS) property. Furthermore, RS coding satisfies the linear property. That is, given an RS(n, k) code, any data block Bi among n data blocks can be represented as a linear combination of any other n different blocks B0, B1, …, Bn-1 in the same stripe. Bi can be obtained by calculation, where Ci (0 ≤ i ≤ n ≤ 1) is the decoding coefficient specified for the given RS code.
[0085] This embodiment is applicable to the process of data transmission and storage in cloud environments (such as cloud storage, financial transactions, and medical data transmission) to protect privacy data, improve data security and integrity, and prevent external attackers from tampering with and damaging data. Considering that the use of traditional ORAM methods may cause data to be maliciously tampered during transmission, if these tampering behaviors cannot be detected and repaired in time, data integrity will be seriously threatened. Therefore, the system structure diagram of the specific design of this solution is as follows Figure 3 shown. Figure 3 This diagram illustrates the structure of a verifiable ORAM system based on RS error correction codes in the data access control method of this application. In a practical scenario, the upper portion is the untrusted data storage area, and the lower portion is the trusted memory controller. In the untrusted data storage, a tree structure (binary tree) is used to store data to prevent data privacy leaks and reduce ORAM access overhead. The memory controller in the lower portion is located in the trusted area, making it impossible for external attackers to infer the privacy of the data. This solution adds a data encoding / decoding module to the memory controller to add RS error correction codes to the data, preventing tampering and promptly correcting errors to maintain data integrity.
[0086] In a specific optional implementation, in step S201, initializing storage of the data to be stored includes:
[0087] When it is detected that data is stored in the untrusted memory for the first time, the detected data is used as the data to be stored, and the data to be stored is used as the basic data block;
[0088] Assign path labels to the base data blocks and record the paths through the position mapping table PosMap;
[0089] Perform encryption operation on the basic data block, perform RS encoding on the encrypted basic data block and introduce a security factor seed to obtain an encrypted coded data block;
[0090] The encrypted data block is stored in the ORAM binary tree.
[0091] Specifically, when data is first stored in untrusted memory, the memory controller of the ORAM system first assigns and records leaf tags to the data blocks to be stored through the position map table PosMap (Position Map);
[0092] For example, if a data block a needs to be stored in memory, the system will assign it a path label l corresponding to the physical address. Label l is one of the leaf nodes in the current binary tree. The data block a will eventually be stored on the path connecting this leaf node and the root node. The data block a will then be recorded in the position mapping table PosMap so that the system can find the data block next time it is needed. For example, Figure 3 The data block a in the path is marked as the path label l1 and recorded in the position mapping table PosMap, where Stash is the cache library for storing cache, data1, data2, For the stored data, addr1 and addr2 are the cache addresses corresponding to data1 and data2 respectively. i is the path label corresponding to the data block written from the location mapping table to the cache library, l i ' is the path label corresponding to the data block read from the cache library to the location mapping table, l1 and l4 are the path labels of the first and fourth data blocks in the location mapping table, l1' and l4' are the path labels of the first and fourth data blocks in the cache library, LLC is the last level cache (LastLevel Cache), W is data write, R is data read, (W, addr2, data2) means writing data data2 in LLC to cache address addr2 in the cache library, (R, addr1, ) means to transfer data from the storage space address addr1 in the trusted area Read into LLC.
[0093] Currently, the memory in computers is only used to store data. In cloud environments, there are still privacy and security issues such as data tampering and data leakage. Therefore, if the data is not processed in any way, we often say that the memory is untrustworthy, so memory is generally untrustworthy.
[0094] Secondly, this embodiment performs an encryption operation on the data block (common encryption methods, such as AES symmetric encryption) to ensure the confidentiality of the data content; then, RS encoding is performed on the data block and a security factor seed is introduced to prevent data tampering and damage, verify and ensure data integrity; finally, the encrypted and encoded data block is stored in the ORAM binary tree. It should be noted that the process of storing the encrypted and encoded data block in the ORAM binary tree is different from that of ordinary data. The ORAM binary tree is memory, but it stores data in the form of a binary tree. Ordinary data generally needs to read the corresponding data block according to the target data block required by the system and then store it back to the corresponding location. However, ORAM reads all the data blocks on the entire path according to the path label for operation, where only one data block is required by the processor, and then stores all the read data blocks in the memory binary tree.
[0095] In a specific optional implementation, performing RS encoding on the encrypted basic data block and introducing a security factor seed to obtain an encrypted coded data block includes:
[0096] Divide the encrypted basic data block into several small data blocks of fixed size;
[0097] Perform an XOR operation on each small data block using a security seed coefficient S to generate an obfuscated data block, where the security seed coefficient S is a random value generated by a dynamic generation algorithm based on the encryption key;
[0098] Use the obfuscated data blocks as coefficients to construct data polynomials , data polynomial As the basis of the encoding process, it contains all the obfuscated data block information and is based on the RS encoding method for data polynomials. Generate check information and obtain a check polynomial;
[0099] The data polynomial and the check polynomial are combined to construct a transmission polynomial, which is used as an encrypted data block.
[0100] Specifically, during the data encoding phase, in order to ensure that the system can provide additional security in the face of replay attacks and achieve efficient verification of data integrity, the system pre-processes the data. The encrypted data is first divided into multiple small data blocks of fixed size. .
[0101] At the same time, in order to prevent replay attacks, this scheme introduces a dynamically generated security seed coefficient S, which confuses each data block through XOR operation to generate the obfuscated data block , where S is a random value generated by a dynamic generation algorithm based on the encryption key, ensuring the uniqueness of each encoding operation.
[0102] The safety factor S is generated based on the specific conditions of the data being encoded at the time and is not fixed. For example, if a data block a starts encoding at 6:30, then the coefficient S generated by the algorithm with the time factor added will be S1. If a data block b starts encoding at 9:30, then the algorithm with the time factor added will generate a coefficient S2. These two coefficients are different and are dynamically generated based on the characteristics of the data blocks. The details are as follows:
[0103] In the study of dynamic generation of coefficient seeds S, the coefficient seeds may be related to parameters such as data characteristics, encoding time, etc. For example, encoding rate and encoding time are important indicators for measuring the dynamic generation of coefficient seeds.
[0104] In a specific example, the coefficient seed is calculated as follows:
[0105]
[0106] Among them, T i is the time from the start of data encoding to the i-th time interval, N i is the number of characters in the data encoded in the i-th time interval.
[0107] Next, Construct data polynomial for coefficients . Data polynomial As the basis of the encoding process, it contains all the obfuscated data block information.
[0108] In order to verify data integrity and correct potential errors, the system generates verification information based on the RS encoding method. First, a generating polynomial is selected , by the data polynomial Perform modular operation to generate the check polynomial in, is the data polynomial About Generator Polynomials The remaining part is used to check whether the data is complete.
[0109] Among them, G(X) is the generator polynomial because G(X) is used to perform modular operations to generate the final check polynomial R(X) to verify data integrity and to increase the complexity of data encoding to prevent it from being cracked or leaked. G(X) is specifically generated by a random polynomial generated by the system, for example: G(X)=aX 2 +bX+c, where a, b, and c are polynomial coefficients.
[0110] Among them, R (X) is the check polynomial, The mod algorithm is the idea of finding the remainder. For example, 5 mod 3 = 2. Polynomials can also be modulated with each other to obtain new remainder polynomials.
[0111] Finally, the system combines the data polynomial and the check polynomial to construct the transmission polynomial , where 2t is the error correction capability of RS coding, indicating that the coding method can correct errors of up to t symbols. After translation to the power of 2t, Merging can effectively store data blocks and check information, and achieve efficient decoding and error correction.
[0112] This embodiment introduces a security seed coefficient to enhance the RS encoding's defense capabilities in security-sensitive environments, particularly to address the challenge of replay attacks. By adding a randomly generated security seed coefficient to the RS encoding process, each encoded data block is guaranteed to be unique, preventing attackers from deceiving the system through replay attacks and verifying data integrity. Furthermore, the controller includes encryption / decryption circuitry to perform encryption / decryption operations on data blocks, ensuring the confidentiality of the data content.
[0113] It should be noted that by adding a randomly generated security seed coefficient to the RS encoding process, even if the data block content is the same, the encoding results will be different at different times, ensuring that each encoded data block is unique, thereby verifying data integrity and preventing attackers from deceiving the system through replay attacks. This enables data error correction and verifiable storage, thereby improving the overall performance and security of the system and ensuring data stability during transmission and storage.
[0114] S202: When a data access request is received, a read / write request is sent to the ORAM binary tree, so that the memory controller searches the buffer Stash for a target data block after receiving the request, and receives the search result, wherein the target data block is the data block corresponding to the request address in the data access request.
[0115] Specifically, in the controller, the buffer Stash and the position map Position Map (PosMap) are also key components in the ORAM system.
[0116] The buffer Stash is mainly used to store the data blocks on the entire path read from the above-mentioned untrusted memory, and then find the target data block required by the system and return the data to the processor through LLC for read and write operations. After the reading and writing are completed, the buffer Stash will return and store the data block just read along the original path of the binary tree.
[0117] The PosMap is primarily used to mark the path labels of data blocks stored in the binary tree and remaps and updates the path labels of the target data block just read. Typically, the processor issues a data read / write request (Resquest = (op = Read / Write, addr, data)) to the memory through the LLC, thereby accessing the stored data under the protection of the ORAM system.
[0118] S203: If the search result shows that the target data block exists, the target data block is processed according to the read / write request.
[0119] Specifically, if found (Stash hit), the data block is processed according to the operation and returned to the processor.
[0120] S204: If the search result is that the target data block does not exist, the real physical memory location of the target data block is determined through the location mapping table, and the path label of the target data block is remapped to a new random path.
[0121] Specifically, if the target data block is not found (a Stash miss), the system accesses the location mapping table PosMap and searches for the leaf tag of the target data block. The target block's actual physical memory location is determined, and the memory is accessed to load the target path. Simultaneously, the system remaps the target data block's path tag to a new random path to confuse external attackers and updates the PosMap with the new path tag.
[0122] S205: Read the path where the target data block is stored in the ORAM binary tree, and use RS to decode all data blocks included in the path to store the data to be stored in the buffer Stash.
[0123] Specifically, the system reads all data blocks (real data blocks and virtual data blocks) on the path found from the position mapping table PosMap from the ORAM tree in memory into the Stash buffer. Since the data is encrypted and then stored after RS encoding in step 1, it is first necessary to RS decode all data blocks contained in the path, then decrypt all data blocks, and finally store the real data blocks in Stash. If, during the RS decoding process, there is a real data block that matches the target data block requested by the system, the data integrity and error correction can be verified during the decoding process. If the data is error-free, the data block can then proceed to the next step for normal processing. Otherwise, RS error correction is used to restore the data.
[0124] In a specific optional implementation manner, in step S205, using all data blocks included in the RS decoding path to store the data to be stored in the buffer Stash includes:
[0125] Read all data blocks on the path found from the position mapping table PosMap;
[0126] Use RS to decode all data blocks contained in the path and decrypt all data blocks to obtain the real data blocks, and store the real data blocks in Stash;
[0127] If, during the RS decoding process, a real data block matches the target data block requested by the system, data integrity and error correction can be verified during the decoding process. If the data is error-free, the data block can proceed to the next step for normal processing. Otherwise, RS error correction is used to restore the data.
[0128] In a specific optional implementation, all data blocks included in the RS decoding path are used and all data blocks are decrypted to obtain the real data blocks including:
[0129] Extract the transmission polynomial from the data block read from the ORAM tree;
[0130] Reconstruct the security seed coefficient S';
[0131] According to the transmission polynomial and the security seed coefficient S', the transmission polynomial is separated into a data polynomial and a check polynomial;
[0132] Use the RS-encoded verification mechanism to verify the data integrity of the data polynomial and the check polynomial. If the data is damaged or tampered with, the RS error correction capability is used to repair the data.
[0133] Decoding the data polynomial restores the encrypted data block to obtain the real data block.
[0134] Specifically, the RS decoding process is as follows:
[0135] (1) During the decoding process, the system extracts the stored transmission polynomial from the data block read from the ORAM tree , which is composed of the data polynomial Sum check polynomial Combination .
[0136] (2) In order to correctly decode the data, the system first needs to reconstruct the security seed coefficient S, which is a random confusion parameter dynamically generated during encoding. The security seed identification information is embedded in the , and the corresponding security seed S is found through the identification information during decoding. This process ensures that the decoding operation is consistent with the security parameters of the encoding process.
[0137] (3) Extracting transmission polynomials Then, it is decomposed into data polynomials through polynomial separation operation Sum check polynomial First, extract The high-order part of the data polynomial is obtained , and then calculate Separate the check polynomial The separated polynomials represent the data content and its integrity check information respectively, providing input for subsequent decoding and verification.
[0138] (4) Then, to ensure that the extracted data has not been tampered with or damaged, the RS coding verification mechanism is used to verify the data integrity.
[0139] (5) After the data integrity verification is passed, the data polynomial Decoding is performed to restore the encrypted data block. The security seed S used in the obfuscation process is used to restore the original data through an XOR operation during the decoding process: ,in is the data block before decoding, is the restored encrypted data block. Since S is a dynamically generated and highly secure random number, the decoding operation can effectively reverse the obfuscation process of the data block, ensuring that the restored data block is consistent with the original data before encoding.
[0140] (6) Data blocks after integrity verification and data decoding The encrypted data is reassembled into the complete ciphertext data required by the user, which can then be decrypted and transferred to Stash for processing. At this point, the decoded result has passed the RS encoding verification mechanism and the protection of the security seed, ensuring the integrity and security of the data.
[0141] Furthermore, the RS code verification mechanism verifies data integrity in the following way:
[0142] ①Through reconstruction and the generating polynomial , calculate and verify the check polynomial .
[0143] ②The calculated With the extracted The two are compared. If they match, the data integrity verification is successful; otherwise, the data is considered corrupted or tampered with. In the event of a verification failure, the error correction capability of the RS code can be used to attempt to repair the errors in the data.
[0144] The RS decoder can correct up to t symbol errors and reconstruct the complete If the number of erroneous symbols exceeds the error correction capability, the error handling mechanism is triggered and data is requested from ORAM again for recovery.
[0145] S206: Update the buffer Stash and process the target data block according to the read / write request.
[0146] Specifically, the path tag of the target data block read into the buffer Stash is updated. Furthermore, if the system is processing a read request, the target data is returned to the processor; otherwise, if the system is processing a write operation, the contents of the data block are updated. In this case, the target data block in the buffer Stash has the latest value and the latest path tag.
[0147] S207: When the data access request is completed, encrypt all the read data blocks, perform RS encoding on all the data blocks, and evict all the encrypted data blocks along the original read path.
[0148] Specifically, after the operation on the target data block of the request is completed, the system will first encrypt all read data blocks, then perform RS encoding on all target paths and introduce a security seed coefficient (for details, please refer to the description of the above embodiment, which will not be repeated here to avoid repetition). Finally, all encrypted data blocks are evicted along the original read path. During the eviction process, the data blocks in the Stash are traversed, and based on the path label of each data block, an attempt is made to place all data blocks into the storage bucket on the target path until each storage bucket reaches its capacity limit. Therefore, all data blocks will eventually continue to be stored in the ORAM tree, awaiting the next access call from the system.
[0149] It should be noted that by introducing a security seed coefficient in this embodiment, RS encoding not only retains its strong error correction capabilities but also enhances data security and uniqueness. This approach demonstrates significant advantages in security-sensitive applications such as cloud storage, financial transactions, and medical data transmission. It ensures data integrity while providing effective defense against replay attacks, providing a more reliable guarantee for secure data transmission and storage.
[0150] In a specific optional implementation, performing position mapping and RS encoding on all target paths, and expelling all encrypted data blocks according to the originally read paths includes:
[0151] Perform RS encoding on all target paths and introduce a security seed coefficient to obtain a secondary encoded data block;
[0152] All secondary encoded data blocks are evicted according to the original read path, and the data blocks in the buffer Stash are traversed. According to the path label of each data block, all data blocks are tried to be placed in the bucket on the target path until each bucket reaches the capacity limit. Finally, all data blocks continue to be stored in the ORAM binary tree, waiting for the next access call of the system.
[0153] In this embodiment, the data to be stored is initialized for storage, and the initialization storage includes position mapping and RS encoding, and the encoded data block is stored in the ORAM binary tree; when a data access request is received, a read / write request is sent to the ORAM binary tree, so that the memory controller searches the buffer Stash for the target data block after receiving the request, and receives the search result; if the search result shows that the target data block exists, the target data block is processed according to the read / write request; if the search result shows that the target data block does not exist, the real physical memory location of the target data block is determined through the position mapping table, and the path label of the target data block is remapped to a new random path; the path where the target data block is stored in the ORAM binary tree is read, and all data blocks included in the path are decoded using RS, and the data to be stored is stored in the buffer Stash; the buffer Stash is updated, and the target data block is processed according to the read / write request; when the data access request is completed, all read data blocks that have completed the operation are encrypted, and then all data blocks are RS encoded, and all encrypted and encoded data blocks are evicted according to the original read path. The powerful error correction capability of RS code is realized. RS encoding / decoding modules are set up in the ORAM system. When data is tampered with or damaged during transmission or storage, RS encoding / decoding will restore the original data through the remaining redundant information, ensuring data integrity and improving the security of the ORAM system during data access.
[0154] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0155] Figure 4 FIG. 1 shows a principle block diagram of a data access control device corresponding to the data access control method in the above embodiment. Figure 4 As shown, the data access control device includes an initialization storage module 31, a request response module 32, a first processing module 33, a second processing module 34, a read decoding module 35, a buffer update module 36 and a re-encoding module 37. The functional modules are described in detail as follows:
[0156] Initialization storage module 31, used for initializing storage of data to be stored, including position mapping and RS encoding, and storing the encoded data blocks in the ORAM binary tree;
[0157] The request response module 32 is configured to send a read / write request to the ORAM binary tree upon receiving a data access request, so that the memory controller searches the buffer Stash for a target data block after receiving the request, and receives the search result, wherein the target data block is the data block corresponding to the request address in the data access request;
[0158] A first processing module 33 is configured to process the target data block according to the read / write request if the search result shows that the target data block exists;
[0159] A second processing module 34 is configured to determine the real physical memory location of the target data block through a location mapping table if the search result shows that the target data block does not exist, and remap the path label of the target data block to a new random path;
[0160] The reading and decoding module 35 is used to read the path where the target data block is stored in the ORAM binary tree, and use RS to decode all the data blocks contained in the path to store the data to be stored in the buffer Stash;
[0161] The buffer update module 36 is used to update the buffer Stash and process the target data block according to the read and write request;
[0162] The re-encoding module 37 is used to encrypt all the read data blocks after the data access request is completed, then perform RS encoding on all the data blocks, and expel all the encrypted data blocks according to the original read path.
[0163] Optionally, initializing the storage module 31 includes:
[0164] A basic data block determination submodule is configured to, when detecting that data is stored in an untrusted memory for the first time, use the detected data as data to be stored and use the data to be stored as a basic data block;
[0165] The path generation submodule is used to assign path labels to basic data blocks and record the paths they are located on through the position mapping table PosMap;
[0166] The encryption coding submodule is used to perform encryption operations on the basic data block, perform RS encoding on the encrypted basic data block, and introduce a security factor seed to obtain an encrypted coded data block;
[0167] The data storage submodule is used to store the encrypted coded data blocks in the ORAM binary tree.
[0168] Optionally, the encryption coding submodule includes:
[0169] A data segmentation unit is used to divide the encrypted basic data block into several small data blocks of fixed size;
[0170] a data obfuscation unit, configured to perform an XOR operation on each small data block using a security seed coefficient S to generate an obfuscated data block, wherein the security seed coefficient S is a random value generated by a dynamic generation algorithm based on an encryption key;
[0171] Polynomial processing unit, used to construct data polynomials using obfuscated data blocks as coefficients , data polynomial As the basis of the encoding process, it contains all the obfuscated data block information and is based on the RS encoding method for data polynomials. Generate check information and obtain a check polynomial;
[0172] The coded data block generating unit is used to combine the data polynomial and the check polynomial to construct a transmission polynomial, and use the transmission polynomial as the encrypted coded data block.
[0173] The specific definition of the data access control device can be found in the definition of the data access control method above and will not be repeated here. Each module in the aforementioned data access control device may be implemented in whole or in part through software, hardware, or a combination thereof. Each of the aforementioned modules may be embedded in or independent of a processor in a computer device in hardware form, or may be stored in a memory in the computer device in software form, so that the processor can call and execute the corresponding operations of each of the aforementioned modules.
[0174] To solve the above technical problems, the present application also provides a computer device. Figure 5 , Figure 5 This is a basic structural block diagram of the computer device in this embodiment.
[0175] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components connected to the memory 41, the processor 42, and the network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0176] The computer device may be a desktop computer, notebook computer, PDA, cloud server, etc. The computer device may interact with the user via a keyboard, mouse, remote control, touchpad, or voice control device.
[0177] The memory 41 includes at least one type of readable storage medium, including flash memory, a hard disk, a multimedia card, card-type memory (e.g., SD or D-interface display memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or internal memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash memory card, etc. Of course, the memory 41 may also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as the program code of the data access control method. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0178] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute program code stored in the memory 41 or process data, such as executing program code for a data access control method.
[0179] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0180] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores an interface display program, and the interface display program can be executed by at least one processor to enable the at least one processor to perform the steps of the data access control method as described above.
[0181] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of this application.
[0182] Obviously, the embodiments described above are only some of the embodiments of the present application, rather than all of the embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present application specification and the accompanying drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present application.
Claims
1. A data access control method, characterized in that: include: Initialize the storage of the data to be stored, including position mapping and RS encoding, and store the encoded data blocks in the ORAM binary tree; Upon receiving a data access request, a read / write request is sent to the ORAM binary tree, so that the memory controller searches the buffer Stash for a target data block after receiving the request, and receives the search result, wherein the target data block is a data block corresponding to the request address in the data access request; If the search result is yes, processing the target data block according to the read / write request; If the search result shows that the target data block does not exist, the real physical memory location of the target data block is determined through the location mapping table, and the path label of the target data block is remapped to a new random path; Read the path where the target data block is stored in the ORAM binary tree, and use RS to decode all data blocks contained in the path to store the data to be stored in the buffer Stash; Update the buffer Stash and process the target data block according to the read and write request; When the data access request is completed, all the read data blocks are encrypted, then all the data blocks are RS-encoded, and all the encrypted data blocks are evicted along the original read path. The initializing storage of the data to be stored includes: When it is detected that data is stored in the untrusted memory for the first time, the detected data is used as the data to be stored, and the data to be stored is used as the basic data block; Assign path labels to the base data blocks and record the paths through the position mapping table PosMap; Perform encryption operation on the basic data block, perform RS encoding on the encrypted basic data block and introduce a security factor seed to obtain an encrypted coded data block; Storing the encrypted coded data block in an ORAM binary tree; The step of performing RS encoding on the encrypted basic data block and introducing a security factor seed to obtain an encrypted coded data block includes: Divide the encrypted basic data block into several small data blocks of fixed size; Perform an XOR operation on each small data block using a security seed coefficient S to generate an obfuscated data block, where the security seed coefficient S is a random value generated by a dynamic generation algorithm based on the encryption key; Use the obfuscated data blocks as coefficients to construct data polynomials , data polynomial As the basis of the encoding process, it contains all the obfuscated data block information and is based on the RS encoding method for data polynomials. Generate check information and obtain a check polynomial; The data polynomial and the check polynomial are combined to construct a transmission polynomial, and the transmission polynomial is used as the encrypted coded data block.
2. The data access control method according to claim 1, wherein: The step of using all data blocks included in the RS decoding path to store the data to be stored in the buffer Stash includes: Read all data blocks on the path found from the position mapping table PosMap; Use RS to decode all data blocks contained in the path and decrypt all data blocks to obtain the real data blocks, and store the real data blocks in Stash; If, during the RS decoding process, a real data block matches the target data block requested by the system, the data integrity and error correction are verified during the decoding process. If there is no error in the data, the data block proceeds to the next step for normal processing. Otherwise, the data is restored using RS error correction.
3. The data access control method according to claim 2, wherein: The method of using the RS decoding path to decode all data blocks and decrypting all data blocks to obtain the real data blocks includes: Extract the transmission polynomial from the data block read from the ORAM tree; Reconstruct the security seed coefficient S'; Separating the transmission polynomial into a data polynomial and a check polynomial according to the transmission polynomial and the security seed coefficient S'; Use the RS-encoded verification mechanism to verify the data integrity of the data polynomial and the check polynomial. If the data is damaged or tampered with, the RS error correction capability is used to repair the data. Decoding the data polynomial restores the encrypted data block to obtain the real data block.
4. The data access control method according to any one of claims 1 to 3, characterized in that: The method of performing position mapping and RS encoding on all target paths and expelling all encrypted and encoded data blocks according to the originally read paths includes: Perform RS encoding on all target paths and introduce a security seed coefficient to obtain a secondary encoded data block; All the secondary encoded data blocks are evicted according to the original read path, and the data blocks in the buffer Stash are traversed. According to the path label of each data block, all data blocks are tried to be placed in the storage bucket on the target path until each storage bucket reaches the capacity limit. Finally, all data blocks continue to be stored in the ORAM binary tree, waiting for the next access call of the system.
5. A data access control device, characterized in that: The data access control method according to any one of claims 1 to 4 is adopted, wherein the device comprises: An initialization storage module is used to initialize the storage of the data to be stored, wherein the initialization storage includes position mapping and RS encoding, and stores the encoded data blocks in an ORAM binary tree; A request response module is configured to, upon receiving a data access request, send a read / write request to the ORAM binary tree, so that the memory controller searches the buffer Stash for a target data block after receiving the request, and receives the search result, wherein the target data block is the data block corresponding to the request address in the data access request; A first processing module, configured to process the target data block according to a read / write request if the search result shows that the target data block exists; a second processing module, configured to determine the real physical memory location of the target data block through a location mapping table if the search result shows that the target data block does not exist, and remap the path label of the target data block to a new random path; A reading and decoding module is used to read the path where the target data block is stored in the ORAM binary tree, and use RS to decode all data blocks contained in the path to store the data to be stored in the buffer Stash; A buffer update module is used to update the buffer Stash and process the target data block according to the read and write request; The re-encoding module is used to encrypt all the read data blocks after the data access request is completed, then perform RS encoding on all the data blocks, and evict all the encrypted data blocks according to the original read path.
6. The data access control device according to claim 5, wherein: The initialization storage module includes: A basic data block determination submodule is configured to, when detecting that data is stored in an untrusted memory for the first time, use the detected data as data to be stored and use the data to be stored as a basic data block; The path generation submodule is used to assign path labels to basic data blocks and record the paths they are located on through the position mapping table PosMap; The encryption coding submodule is used to perform encryption operations on the basic data block, perform RS encoding on the encrypted basic data block, and introduce a security factor seed to obtain an encrypted coded data block; The data storage submodule is used to store the encrypted coded data block in the ORAM binary tree.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the data access control method according to any one of claims 1 to 4 is implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the data access control method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Data access control method and device, computer equipment and storage medium
CN118277628A