An oblivious random access method based on double buffer data read-write algorithm
By introducing a double buffer and a full binary tree structure into the unintentional random access machine, the problem of information leakage related to data read/write time and buffer size is solved, and efficient data access mode privacy protection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
- Filing Date
- 2023-02-09
- Publication Date
- 2026-05-19
AI Technical Summary
The existing Path ORAM has a problem where data read/write time is related to the size of the user buffer, leading to information leakage.
A data read/write algorithm based on a double buffer is adopted. By deploying a full binary tree structure on the user end and cloud storage, and using double buffers (Stash1 and Stash2) and a location table, random access and encryption of data are achieved, access patterns are hidden, and data read/write time information is prevented from being leaked.
This achieves data read/write time independent of the user-side buffer size, improving data read/write efficiency and protecting the privacy of user access patterns.
Smart Images

Figure CN116090012B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information security, and in particular relates to an unintentional random access method based on a double-buffer data read / write algorithm, which can be applied to secure cloud computing networks. Background Technology
[0002] An Oblivious Random Access Machine (ORAM) is a communication protocol between a user and the cloud that implements key-value storage of data while protecting user access patterns. It assumes the user is trusted, the cloud is untrusted, and the cloud can correctly execute the user's specified operations. Classic ORAMs, such as PATH ORAM, can perform sublinear time data read and write operations without access patterns. The user inputs the required key, and the corresponding value can be quickly obtained through the ORAM. ORAMs typically protect user access patterns and accessed content by continuously changing the storage address of accessed data, constantly shuffling and re-encrypting it. However, the existing PATH ORAM ORAM has an information leakage problem: because data read / write time is related to the number of elements in the user's buffer, hackers can obtain private information about the user's buffer size by analyzing each user's data read / write time; this is referred to as "data read / write time" information leakage. Summary of the Invention
[0003] Therefore, this invention provides an unintentional random access method based on a double-buffered data read / write algorithm, and also provides an unintentional random access method based on a double-buffered data read / write algorithm, newly named DS-ORAM. Compared with the traditional unintentional random access machine, this invention has the following advantages and technical effects: 1) The data read / write algorithm consumption time is independent of the user-end stash size, and does not generate "data read / write time" information leakage; 2) Higher data read / write efficiency is achieved.
[0004] To achieve the objectives of this invention, the following technical solution is adopted:
[0005] An inadvertent random access machine storage system based on a double-buffered data read / write algorithm includes a cloud storage unit and a user terminal, wherein: the cloud storage unit has a full binary tree for storing encrypted data; the user terminal has a first buffer, a second buffer, and a location table located on the user terminal; a portion of the top of the full binary tree is not used for storing data, such that the full binary tree includes m full binary tree subtrees.
[0006] The storage system wherein: m full binary tree subtrees have the same height and the same structure.
[0007] The storage system according to claim 1 is characterized in that: the root node of each of the m full binary subtrees contains Z1 units; each available tree node of the remaining layers contains Z2 units, Z1 and Z2 are both positive integers, and Z1>Z2.
[0008] In the aforementioned storage system, user triplet data (key, value, leaf) is stored on the user's end or in cloud storage.
[0009] In the aforementioned storage system, for any triple (key, value, leaf) stored in a full binary tree in the cloud storage unit, it must exist on the path from the leaf to the root of the subtree.
[0010] The storage system, wherein: the location table is used to store the storage location information of the triples in the cloud after they are shuffled.
[0011] The storage system described herein includes the following access operations: Step 1: Read a path; Step 2: Write the accessed data to a second buffer; Step 3: Write other data to a first buffer; Step 4: Shuffle the data in the first buffer and write it to a temporary path stored by the user; Step 5: Write the data in the second buffer to the root node of the temporary path; Step 6: Encrypt the temporary path and overwrite the original path in the cloud.
[0012] The storage system, wherein step 1 includes: 1) first reading the key value from the location table according to the key value to obtain the leaf value; 2) reading the entire path from the leaf to the root of the subtree, and calling the path with the leaf numbered leaf as P.
[0013] The storage system, wherein step 2 includes: 1) decrypting P using the user's private key to obtain a set of triples; 2) finding data (key, value, leaf) with key value key; 3) randomly assigning a new leaf number to the found triple, let the new leaf number be leaf'; 4) writing (key, value, leaf') into the second buffer, and if the leaf number leaf' is located in the i-th subtree of the full binary tree, then (key, value, leaf') is written into the i-th storage node of the second buffer; 5) storing (key, leaf') in the location table.
[0014] The storage system, wherein step 3 includes: decrypting P to obtain a set of triplet data, wherein the data group other than (key, value, leaf) is called other data, and writing these other data triplets into the first buffer.
[0015] The storage system, wherein step 4 includes: 1) creating a temporary path P' with leaf number leaf on the user end; 2) for each triple in the first buffer, pushing the data one by one into the path closest to the lower level until each node of P' is filled, while satisfying the following condition: assuming a triple in the first buffer is (k,v,l), it can only be placed in the path where the path from leaf l to the subtree root overlaps with the path from leaf leaf to the subtree root; 3) finally all triples in the first buffer are inserted into P'.
[0016] The storage system, wherein step 5 includes: 1) Assuming the root child node of P' is R, if R is full, no further processing is performed, and the data in the second buffer is saved locally on the user's end; otherwise, continue with step 2; 2) Take out triples from the second buffer to fill node R. The rule for taking out data is: assuming the leaf number leaf is located in the i-th subtree, then data can only be taken from the i-th storage node in the second buffer; if there is no more data to take or R is full, the task ends. If R is full and there is still data remaining in the second buffer, the remaining data is saved locally on the user's end.
[0017] The storage system, wherein step 6 includes: 1) encrypting each tree node in path P' using a random symmetric encryption algorithm; 2) submitting path P' to the cloud, overwriting P.
[0018] A data access operation method for a storage system as described above, the access method comprising: step 1: reading a path; step 2: writing the accessed data into a second buffer; step 3: writing other data into a first buffer; step 4: shuffling the data in the first buffer and writing it into a temporary path stored by the user; step 5: writing the data in the second buffer into the root node of the temporary path; step 6: encrypting the temporary path and overwriting the original path in the cloud.
[0019] The data access operation method described herein includes step 1, which includes: 1) firstly reading the key value from the location table based on the key value to obtain the leaf value; 2) reading the entire path from the leaf to the root of the subtree, and calling the path with the leaf numbered leaf P.
[0020] The data access operation method described herein includes step 2, which comprises: 1) decrypting P using the user's private key to obtain a set of triples; 2) finding the data (key, value, leaf) with the key value key; 3) randomly assigning a new leaf number to the found triple, let the new leaf number be leaf'; 4) writing (key, value, leaf') into the second buffer; if the leaf number leaf' is located in the i-th subtree of the full binary tree, then (key, value, leaf') is written into the i-th storage node of the second buffer; 5) storing (key, leaf') in the location table.
[0021] The data access operation method described herein includes step 3, which involves: decrypting path P to obtain a set of triplet data, wherein the data group other than (key, value, leaf) is called other data, and writing these other data triplets into the first buffer.
[0022] The data access operation method described herein includes step 4, which includes: 1) creating a temporary path P' with leaf number leaf on the user end; 2) for each triple in the first buffer, pushing the data one by one into the path closest to the lower level until each node of P' is filled, while satisfying the following condition: assuming a triple in the first buffer is (k,v,l), it can only be placed in the path where the path from leaf l to the subtree root overlaps with the path from leaf leaf to the subtree root; 3) finally, all triples in the first buffer are inserted into P'.
[0023] The data access operation method includes step 5: 1) Assuming the root child node of P' is R, if R is full, no further processing is required, and the data in the second buffer is saved locally on the user's end; otherwise, continue with step 2; 2) Take out triples from the second buffer to fill node R. The rule for taking out data is: assuming the leaf number leaf is located in the i-th subtree, then data can only be taken from the i-th storage node in the second buffer; if there is no more data to take or R is full, the task ends. If R is full and there is still data remaining in the second buffer, the remaining data is saved locally on the user's end.
[0024] The data access operation method includes step 6: 1) encrypting each tree node in path P' using a random symmetric encryption algorithm; 2) submitting path P' to the cloud, overwriting P.
[0025] A computer-readable storage device is characterized by storing processor-executable instructions that, when executed by a processor, cause the processor to perform the data access operation method described above. Attached Figure Description
[0026] Appendix Figure 1 Example diagram of DS-ORAM construction;
[0027] Appendix Figure 2 This is a flowchart of an unintentional random access method based on a double-buffer data read / write algorithm. Detailed Implementation
[0028] The following is in conjunction with the appendix Figure 1 , 2 The specific embodiments of the present invention will be described in detail below. These embodiments are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. Obviously, the embodiments described in this invention are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0029] The terms "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include the specific features, structures, or characteristics described in connection with that embodiment. Therefore, the terms "comprising," "including," "having," and variations thereof in this specification mean "including but not limited to," unless otherwise specifically emphasized.
[0030] like Figure 1 As shown, this invention provides an unintentional random access machine (DS-ORAM) storage system based on a double-buffered data read / write algorithm. It mainly comprises two parts: a cloud storage unit and a user terminal. The cloud storage unit stores a full binary tree in the cloud, named the unintentional random access tree (ORAM tree). The user terminal has a first buffer (Stash1), a second buffer (Stash2), and a position map, as shown below. Figure 1 As shown.
[0031] The ORAM tree is the primary data storage entity, used to store the encrypted data. It is a full binary tree of height L, where L is an integer greater than or equal to 2. The top level, h (where h is an integer greater than or equal to 2 and less than L), is the unused portion of the tree. The tree contains a total of 2... L -2 h There are 2 valid storage nodes. An ORAM tree can be considered as having m=2... hThe ORAM tree consists of m subtrees, each containing a full binary tree. Each subroot in the ORAM tree contains Z1 units; each available tree node at the remaining levels contains Z2 units, where Z1 and Z2 are positive integers, and Z1 > Z2. This structure allows for more data in the buffer to be written to the unintentional random access tree. Each unit stores an encrypted triple. In DS-ORAM, Z1 is typically set to 5, and Z2 is typically set to 4. For a user-required triple (key, value, leaf), it can be stored on the user's end or in the cloud. If stored on the user's end, it exists in either Stash1 or Stash2; if stored in the cloud, it is stored on the path from the leaf to the subtree root. Stash1 stores temporary triples generated during data read / write operations, and these triples are cleared after the data read / write is complete. Stash2 stores triples with relatively long buffer times. Stash2 consists of m sequentially arranged storage nodes, each with sufficient storage capacity. The Position Map is a key-value hash table used to record the position information of triples in the Unintentional Random Access Tree (ORAM tree).
[0032] For any triple (key, value, leaf) stored in the tree, the cryptographic shuffling algorithm guarantees that it must exist on the path from leaf to the root of the subtree. Users store the key-value pairs (key, leaf) in a Position Map to record the position information of the triple after shuffling.
[0033] When a user needs to find this triplet, the Position Map is first read, and the leaf is found based on the key value. Then, the entire path from the leaf to the child root is read, the data of the entire path is downloaded, decrypted and stored in Stash1, and the (key, value, leaf) triplet is found and located in Stash1, so that the value can be read and written.
[0034] After reading and writing are complete, to protect the access mode, the user re-encrypts the entire accessed path using the following method. First, the user assigns a new random leaf value `leaf'` to the read target data block (key, value, leaf), deletes `(key, value, leaf)` from Stash1, and writes the value of `(key, value, leaf')` to Stash2. The writing method to Stash2 is as follows: for a leaf number `leaf'`, it must belong to a certain subtree. Let's assume that leaf `leaf'` is located in the i-th subtree, then `(key, value, leaf')` will be stored in the i-th storage node in Stash2. Then, the following data eviction algorithm is used to evict all data in Stash1 to the path from the read `leaf` to the child root.
[0035] Data eviction algorithm: Given a path from a leaf to the root of a subtree, write the data in Stash1 and Stash2 to this path in the following two steps.
[0036] Step 1) Scan the entire path from the leaf to the subtree root, attempting to fill the path; for a tree node in this path, if it is not yet filled, fill it with a tuple (key) from Stash1. * ,value * leaf * The prerequisite is that the node in this tree must be located on the path from leaf to the root of its subtree and the path from leaf to leaf. * Overlapping paths to the root of the subtree.
[0037] Step 2) Assume that after eviction, the child root of this path contains y valid triples (0≤y≤Z1). Let's assume the original leaf belongs to the j-th subtree. Then, retrieve as many triples as possible from the j-th storage node in Stash2 until the (Z1-y) triple positions of the child root nodes on the leaf-to-subtree root path are filled. Fill any remaining positions with empty triples. Finally, use a random symmetric encryption algorithm to encrypt the tree nodes along the entire leaf-to-child root path and replace the recently visited leaf-to-child root paths.
[0038] Below, in conjunction with the appendix Figure 2 The present invention provides a detailed description of the unintentional random access method based on a double-buffer data read / write algorithm.
[0039] If a user wishes to read or write the corresponding value stored in the ORAM tree based on the input key, they can execute an unintentional random access method based on a double-buffered data read / write algorithm, which includes the following steps.
[0040] Step A1: Read a path.
[0041] 1) The user first reads the leaf value from the Position Map based on the key value. 2) The entire leaf-to-root path is read. This path, numbered leaf, is called P.
[0042] Step A2: Write the accessed data to Stash2.
[0043] 1) Decrypt P using the user's private key to obtain a set of triples (i.e., data from all nodes on the path); 2) Find the data with the key value 'key', let's assume the found key value data is (key, value, leaf); 3) To hide the access pattern, randomly assign a new leaf number to the found triple, let's assume the new leaf number is leaf'; 4) Write (key, value, leaf') to Stash2. Assuming the leaf number leaf' is located in the i-th subtree of DS-ORAM, then (key, value, leaf') needs to be written to the i-th storage node of Stash2; 5) Store (key, leaf') in the Position Map to record the position information of the triple in the ORAM tree.
[0044] Step A3: Write the remaining data to Stash1.
[0045] Decrypting P yields a set of triples, where the data groups other than (key, value, leaf) are called "other data". These other data triples are written into Stash1.
[0046] Step A4: Shuffle the Stash1 data and write it to a temporary path in user storage.
[0047] 1) Create a temporary path P' with leaf number leaf on the user side; 2) For each triple in Stash1, push the data one by one into the path closest to the lower level, until every node of P' is filled, while satisfying the following condition: Assuming a triple in Stash1 is (k,v,l), it can only be placed in the path where l-to-root and leaf-to-root overlap; 3) Finally, all triples in Stash1 are inserted into P'.
[0048] Step A5: Write the Stash2 data to the root node of the temporary path.
[0049] Assume that the child root node in P' is R. If R is full, no further processing is needed, and the data in stash2 is saved locally on the user's computer; otherwise, proceed to step 2. 2) Retrieve triples from Stash2 to fill node R. The data retrieval restriction is: assuming the leaf number is located in the i-th subtree, then data can only be retrieved from the i-th storage node of Stash2. If no more data is available or R is full, the task is completed. If R is full and there is still data remaining in Stash2, the remaining data is saved locally on the user's computer.
[0050] Step A6: Encrypt the temporary path and overwrite the original path. 1) Encrypt each tree node in P' using a random symmetric encryption algorithm; the user saves the private key for future decryption of data blocks; 2) Submit P' to the cloud, overwriting P.
[0051] According to one embodiment of the present invention, a computer-readable storage medium is provided. Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. Therefore, embodiments of this application provide a storage medium storing a plurality of instructions that can be loaded by a processor to execute the steps of any of the methods for maintaining distributed data consistency provided in the embodiments of this application.
[0052] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc. More specifically, it may include specific categories such as static random-access memory (SRAM) and dynamic random-access memory (DRAM).
[0053] Since the instructions stored in the storage medium can execute the data access operation method of the present invention, the beneficial effects that can be achieved by the embodiments of the present invention can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0054] This invention enables data to be written quickly into an unintentional random access tree (ORAM) without exposing the access pattern, and the data read / write time is independent of the number of elements in the buffer, thus solving the problem that the data read / write time of traditional unintentional random access machines is related to the number of elements in the buffer.
[0055] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. An inadvertent random access machine storage system based on a double-buffered data read / write algorithm, comprising a cloud storage unit and a user terminal, characterized in that: The cloud storage unit has a full binary tree for storing encrypted data; the user terminal has a first buffer, a second buffer, and a location table, the location table being a hash table storing key values; the full binary tree has a height of L, and the height of the top layer of the tree, h, is the unused part, where h is an integer greater than or equal to 2 and less than L. The unused part of the full binary tree is not used to store data, so that the full binary tree includes m full binary tree subtrees; The location table is used to store the storage location information of triples in the cloud after they are shuffled; The first buffer is used to store accessed data, which is data with a key value of (key, value, leaf), where leaf represents the leaf number; the second buffer is used to store other data, where the data group other than (key, value, leaf) is called other data.
2. The storage system according to claim 1, characterized in that: m full binary trees have subtrees of the same height and the same structure.
3. The storage system according to claim 1, characterized in that: Each of the m full binary tree subtrees contains Z1 units in its root node; each available tree node in the remaining levels contains Z2 units, where Z1 and Z2 are positive integers and Z1 > Z2.
4. The storage system according to claim 1, characterized in that: User triple data (key, value, leaf) is stored on the user's device or in cloud storage.
5. A data access operation method, used in the storage system as described in any one of claims 1-4, characterized in that... The access operation method includes: Step 1: Reading a path, including: 1) The user first reads the leaf value from the location table based on the key value; 2) Reading the entire path from the leaf to the root of the subtree, and calling the path with the leaf number leaf P; Step 2: Writing the accessed data into the second buffer, including: 1) Decrypting P using the user's private key to obtain a set of triples; 2) Finding the data (key, value, leaf) with the key value key; 3) Randomly assigning a new leaf number to the found triple, let the new leaf number be leaf'; 4) Writing (key, value, leaf') into the second buffer, let the leaf number be l If leaf' is located in the i-th subtree of a full binary tree, then write (key, value, leaf') into the i-th storage node of the second buffer; 5) Store (key, leaf') in the location table; Step 3: Write other data into the first buffer, including: after decrypting P, a set of triplet data is obtained, where the data group other than (key, value, leaf) is called other data, and write these other data triplets into the first buffer; Step 4: Shuffle the data in the first buffer and write it into the temporary path of user storage, including: 1) Create a new path with leaf number leaf on the user end. Temporary path P'; 2) For each triplet in the first buffer, push the data one by one into the path closest to the lower level until each node of P' is filled, while satisfying the following condition: Assuming a triplet in the first buffer is (k,v,l), it can only be placed in the path where the path from leaf l to the subtree root overlaps with the path from leaf to the subtree root; 3) Finally, all triplets in the first buffer are inserted into P'; Step 5: 1) Write the data in the second buffer to the root node of the temporary path, including: Assuming the child root node in P' is R, if R is already full, no further processing is needed. 1) Save the data in the second buffer to the user's local machine; otherwise, continue to step 2; 2) Take out triples from the second buffer to fill node R. The rule for taking out data is: assuming that the leaf number leaf is located in the i-th subtree, then data can only be taken from the i-th storage node in the second buffer; if there is no more data to take or R is full, the task ends. If R is full and there is still data in the second buffer, the remaining data is saved to the user's local machine; Step 6: Encrypt the temporary path and overwrite the original path in the cloud, including: 1) Encrypt each tree node in path P' using a random symmetric encryption algorithm; 2) Submit path P' to the cloud and overwrite P.
6. A computer-readable storage device, characterized in that, The system stores processor-executable instructions that, when executed by the processor, cause the processor to perform the data access operation method according to claim 5.