A high-efficient deterministic oblivious key-value storage method and system

CN122601173APending Publication Date: 2026-08-18UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610564274.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-27
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0007]现有技术中,基于哈希函数和随机线性编码的构建方案,往往无法以可忽略的概率或确定性地保证构建成功,常依赖概率性方法,影响了方案的确定性和稳定部署能力

Benefits of technology

[0033] This application maintains high encoding and decoding efficiency while ensuring the deterministic success rate of unintentional key-value storage construction. This is because, during the encoding phase, by selecting a suitable uniformly random hash function and performing graph acyclicity determination, it fundamentally eliminates the root causes of potential failures in traditional probabilistic encoding schemes. Simultaneously, the resulting additional computational and storage overhead is kept within an acceptable range, ensuring the overall efficiency of the algorithm. Therefore, this application guarantees zero failures in the encoding algorithm while keeping the resulting additional computational and storage overhead within an acceptable range, ensuring the overall efficiency of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122601173A_ABST
    Figure CN122601173A_ABST
Patent Text Reader

Abstract

The application discloses a kind of high-efficiency deterministic involuntary key-value storage method and system, the method includes encoding step and decoding step;In the encoding step, the input key-value pair set is encoded, and the involuntary key-value storage structure is formed;Decoding algorithm takes the involuntary key-value storage structure and any specified key selected from key space as input, and outputs the value uniquely corresponding to the specified key after calculation, selects uniform random hash function in the encoding stage and executes graph acyclic determination, executes determination until the graph constructed based on the hash function reselected is acyclic graph.Thereby, it can guarantee that the involuntary key-value storage is built with the success of determined, while maintaining high encoding and decoding efficiency, because it fundamentally eliminates the root cause of possible failure of traditional probabilistic encoding scheme by selecting appropriate uniform random hash function and executing graph acyclic determination in the encoding stage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information security technology, and in particular to an efficient deterministic inadvertent key-value storage method and system. Background Technology

[0002] In data management and distributed systems, key-value stores (KVS) are a type of storage and retrieval mechanism centered on key-value mappings. They encode a given set of key-value pairs into a key-value storage data structure, and then decode the corresponding value using a specific key. KVS has wide applications in distributed caching and session management, configuration and metadata storage, and object storage indexing. However, traditional KVS primarily focuses on functional correctness and system performance, often neglecting to keep the keys and their mappings confidential. In cryptographic and privacy-preserving computing applications, the keys and their mappings are often sensitive information themselves. Therefore, relying solely on conventional encryption and access control is insufficient to meet the requirement of "hiding the mapping and its distinguishable information while ensuring correct decoding," thus limiting the direct use of KVS in relevant cryptographic protocols.

[0003] Based on the above requirements, the cryptographic primitive Oblivious Key-Value Store (OKVS) was developed to securely encode and hide a set of secret mappings while ensuring that they can be correctly decoded.

[0004] Unintentional key-value stores are a specific data structure that requires that for any given set of key-value pairs to be encoded, the encoding and decoding operations for each key-value pair in the set must be consistent. Furthermore, if the values ​​to be encoded are all random values, then for any two different sets of keys, the resulting unintentional key-value stores are computationally indistinguishable.

[0005] Specifically, in the field of information security and privacy computing, Oblivious Key-Value Store (OKVS) is an important cryptographic primitive that can securely encode and hide a set of secret mappings. The data structure of the oblivious key-value store obtained by OKVS is computationally indistinguishable. This characteristic makes oblivious key-value stores a key component for implementing protocols such as privacy set intersection, oblivious transmission, and oblivious pseudo-random functions.

[0006] Unintentional key-value storage is a specific data structure consisting of two algorithms: encoding and decoding. The encoding algorithm takes a set of key-value pairs as input, where all keys are selected from a preset key space, and the value corresponding to each key is randomly selected from the value space. After execution, the algorithm outputs an unintentional key-value storage structure that completely encodes and stores all key-value pair information from the input set. The decoding algorithm takes the unintentional key-value storage structure and any specified key selected from the key space as input, calculates it, and outputs the unique value corresponding to that specified key.

[0007] In existing technologies, construction schemes based on hash functions and random linear encoding often cannot guarantee successful construction with negligible probability or determinism, frequently relying on probabilistic methods, which affects the determinism and stable deployment capability of the scheme. In addition, some deterministic construction methods, such as polynomial interpolation construction schemes, can guarantee success, but often at the cost of encoding and query efficiency, making it difficult to balance efficiency and reliability.

[0008] Therefore, how to maintain high encoding and decoding efficiency while ensuring the certainty of OKVS construction has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0009] The purpose of this invention is to overcome the shortcomings of the prior art and provide an efficient deterministic unintentional key-value storage method and system. This invention aims to provide an efficient deterministic unintentional key-value storage method to maintain excellent system performance while ensuring that the encoding algorithm does not fail.

[0010] The objective of this invention is achieved through the following technical solution:

[0011] In a first aspect, this application discloses an efficient and deterministic method for unintentional key-value storage, including an encoding step and a decoding step; in the encoding step, the input set of key-value pairs is encoded to form an unintentional key-value storage structure; the decoding algorithm takes the unintentional key-value storage structure and any specified key selected from the key space as input, calculates and outputs the value uniquely corresponding to the specified key, selects a uniformly random hash function in the encoding stage and performs a graph acyclicity determination, and performs the determination until the graph constructed based on the reselected hash function is an acyclic graph.

[0012] Furthermore, the encoding step includes: obtaining a set of key-value pairs to be encoded, the set containing multiple key-value pairs consisting of a key and its corresponding value; determining the size parameters of a first array and a second array, and initializing the first array and the second array; selecting a pair of hash functions to map any key in the key space to the two arrays respectively; using the pair of hash functions to calculate the first position and the second position corresponding to the key, so as to construct the key-value pair as an edge and add it to the graph; checking whether there is a cycle in the constructed graph, if there is a cycle, then selecting a new pair of hash functions and reconstructing the graph based on the new hash functions, until the constructed graph is an acyclic graph, traversing the acyclic graph to obtain an ordered set of edges; assigning values ​​to the key-value pairs corresponding to each edge in the order of the ordered set of edges to determine the values ​​of each element in the first array and the second array; the output unintentional key-value storage structure includes the first array, the second array, and the pair of hash functions;

[0013] Furthermore, the decoding steps include: obtaining the target key and the unintentional key-value storage structure; using a pair of hash functions in the structure to calculate the first position and the second position corresponding to the target key; reading the value of the first position from the first array, reading the value of the second position from the second array, and adding the two together, with the result being the decoded value corresponding to the target key and output.

[0014] Furthermore, using the aforementioned key-value pair set , as input; where the key belongs to the key space. , which is a bit string of arbitrary length, i.e. The value belongs to the value space. This space is for containing Galois field of elements, i.e. ,gather Size is .

[0015] Furthermore, the unintentional key-value storage structure is as follows:

[0016]

[0017] in, , These are the first array and the second array, with lengths of respectively. , Elements in the first and second arrays ; Let be a pair of uniformly random hash functions, with domain . The value ranges are respectively and .

[0018] Furthermore, using hash functions Calculate the first and second positions corresponding to the key to construct an edge and add it to the graph, including:

[0019] , ;

[0020] right ,calculate To obtain the first and second positions, connect them. For the edge ,Will Add to diagram edge set .

[0021] Furthermore, following the order of the ordered edge set, values ​​are assigned to the key-value pairs corresponding to each edge in sequence to determine the values ​​of each element in the first and second arrays, including:

[0022] right ,calculate , ;

[0023] like If all are empty, then let , value space Random value in the middle, ;

[0024] like If it is not empty, then let ;

[0025] like If it is not empty, then let ;

[0026] in, A set of key-value pairs The key in Corresponding value.

[0027] right ,like If it is empty, assign it a random value. .

[0028] right ,like If it is empty, assign it a random value. .

[0029] Furthermore, the process of obtaining the target key and the unintentional key-value storage structure involves using a pair of hash functions in the structure to calculate the first and second positions corresponding to the target key; reading the value at the first position from the first array, reading the value at the second position from the second array, and adding the two together; the result is then used as the decoded value corresponding to the target key and output.

[0030] Enter any key Unintentional key-value storage structure Calculate the first and second positions corresponding to the target key. , Read the value at the first position from the first array, read the value at the second position from the second array, and then calculate the key. Corresponding value And return.

[0031] Secondly, this application discloses an efficient deterministic unintentional key-value storage system, including a processor and a memory. The memory stores a computer program for implementing the efficient deterministic unintentional key-value storage method, and the processor performs read and write operations on the memory.

[0032] The beneficial effects of this invention are:

[0033] This application maintains high encoding and decoding efficiency while ensuring the deterministic success rate of unintentional key-value storage construction. This is because, during the encoding phase, by selecting a suitable uniformly random hash function and performing graph acyclicity determination, it fundamentally eliminates the root causes of potential failures in traditional probabilistic encoding schemes. Simultaneously, the resulting additional computational and storage overhead is kept within an acceptable range, ensuring the overall efficiency of the algorithm. Therefore, this application guarantees zero failures in the encoding algorithm while keeping the resulting additional computational and storage overhead within an acceptable range, ensuring the overall efficiency of the algorithm. Attached Figure Description

[0034] Figure 1 Here is a diagrammatic example of a loop in the coding stage diagram G according to some embodiments of this application;

[0035] Figure 2 for Figure 1 The corresponding matrix representation of the graph structure;

[0036] Figure 3 This is a schematic example of a loop in the decoding stage diagram G according to some embodiments of this application;

[0037] Figure 4 for Figure 1 The corresponding matrix representation of the graph structure. Detailed Implementation

[0038] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0039] Before introducing the solutions of the embodiments of this application, we will first introduce the Oblivious Key-Value Store (OKVS).

[0040] OKVS allows a party to share its own key set. With a set of encoded values Construct a specific data structure for any known input It can correctly decode the corresponding encoded value. Unintentional key-value storage requirements: For any given set of key-value pairs to be encoded... The encoding and decoding operations for each key-value pair in the set must be consistent. Specifically, when the encoding algorithm successfully receives the set... It outputs a valid unintentional key-value storage structure. Then, if this storage structure is associated with any specific key in the set... If the key is provided as input to the decoding algorithm, the output of the decoding algorithm must be exactly equal to the value corresponding to the key in the original set. Furthermore, if all encoded values ​​are random, then for any two different key sets... and Any adversary with probabilistic multinomial-time computation capabilities cannot effectively distinguish the unintentional key-value storage structures generated by these two key sets with a significant advantage that is beyond negligible.

[0041] To ensure deterministic success while maintaining high encoding and decoding efficiency in the unintentional key-value store construction method, this application discloses an efficient deterministic unintentional key-value store method consisting of two algorithms: encoding and decoding. In the unintentional key-value store construction method, the encoding algorithm encodes the input set of key-value pairs to form an unintentional key-value store structure. The decoding algorithm takes the unintentional key-value store structure and any specified key selected from the key space as input, calculates it, and outputs the value uniquely corresponding to the specified key.

[0042] The method specifically includes encoding and decoding steps, which will be described step by step for better explanation:

[0043] S10, Encoding Algorithm;

[0044] Obtain a set of key-value pairs to be encoded, wherein the set contains multiple key-value pairs consisting of a key and its corresponding value; for example, a set of key-value pairs. As input, and the keys therein belong to the key space. , which is a bit string of arbitrary length, i.e. The value belongs to the value space. This space is for containing Galois field of elements, i.e. ,gather Size is .

[0045] After the algorithm is executed, it outputs an unintentional key-value storage structure. ,in, , They are respectively of length , In this embodiment, the arrays are defined as a first array and a second array. Elements in the first array and the second array... Choose a pair of hash functions, as defined. Let be a pair of uniformly random hash functions, with domain . The value ranges are respectively and The structure fully encodes and stores all key-value pair information in the input set, and uses two hash functions to map any key in the key space to two arrays respectively.

[0046] Specifically, the encoding process may include the following steps:

[0047] S11. Based on the set of input key-value pairs Determine the unintentional key-value storage structure The size parameters of the first and second arrays ,Require In this example The value satisfies: To meet The smallest power of 2, .

[0048] S12, Then initialize the first array. The second array The lengths are respectively Elements in two arrays Initialize to empty.

[0049] S13, Initialization Diagram , and For the set of vertices, Let be the set of edges. , , Initialize to an empty set.

[0050] S14. Uniformly and randomly select a pair of hash functions. The first and second positions corresponding to the key are calculated using the hash function pair, and the key value is used to construct an edge to be added to the graph, including:

[0051] , ;

[0052] right ,calculate To obtain the first and second positions, connect them. For the edge ,Will Add to diagram edge set Then, check if there are cycles in the constructed graph. If there are cycles, select a new pair of hash functions and rebuild the graph based on the new hash functions until the constructed graph is an acyclic graph.

[0053] Specifically, check the current graph Does a cycle exist? It may or may not exist.

[0054] If a combination exists, then as follows: Figure 1 and Figure 2 As shown, clear the edge set and re-execute step S14; if no combination exists, then proceed as follows. Figure 3 and Figure 4 As shown, perform a save. Then execute the subsequent S15.

[0055] S15, Viewing the diagram Perform a depth-first traversal algorithm to obtain an ordered set of edges. .

[0056] S16. Following the order of the ordered edge set, assign values ​​to the key-value pairs corresponding to each edge in sequence to determine the values ​​of each element in the first array and the second array, specifically including:

[0057] right ,calculate , ;

[0058] like If all are empty, then let , value space Random value in the middle, ;

[0059] like If it is not empty, then let ;

[0060] like If it is not empty, then let ;

[0061] in, A set of key-value pairs The key in Corresponding value.

[0062] right ,like If it is empty, assign it a random value. .

[0063] right ,like If it is empty, assign it a random value. .

[0064] As mentioned above, the output unintentional key-value storage structure includes at least the first array, the second array, and the pair of hash functions.

[0065] To better understand, the output of the unintentional key-value storage structure in the above embodiments will be discussed. The meanings of each field are summarized in the table below.

[0066]

[0067] S20. The decoding stage includes: obtaining the target key and the unintentional key-value storage structure; using a pair of hash functions in the structure to calculate the first position and the second position corresponding to the target key; reading the value of the first position from the first array, reading the value of the second position from the second array, and adding the two together; the result is used as the decoded value corresponding to the target key and output.

[0068] In this embodiment, the decoding stage uses the unintentional key-value storage structure. and from key space Any specified key selected in The input is the target key, and after calculation, the output is the value that uniquely corresponds to the specified key.

[0069] For example, enter any key. Unintentional key-value storage structure Calculate the first and second positions corresponding to the target key. , Read the value at the first position from the first array, read the value at the second position from the second array, and then calculate the key. Corresponding value And return.

[0070] An efficient deterministic unintentional key-value storage system according to an embodiment of this application includes a processor and a memory. The memory stores a computer program for implementing the efficient deterministic unintentional key-value storage method, and the processor performs read and write operations on the memory.

[0071] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. An efficient and deterministic method for unintentional key-value storage, comprising an encoding step and a decoding step; in the encoding step, an input set of key-value pairs is encoded to form an unintentional key-value storage structure; the decoding algorithm takes the unintentional key-value storage structure and any specified key selected from the key space as input, calculates and outputs the value uniquely corresponding to the specified key, characterized in that: During the encoding phase, a uniformly random hash function is selected and a graph acyclicity determination is performed. This determination is repeated until the graph constructed based on the reselected hash function is acyclic.

2. The efficient deterministic unintentional key-value storage method according to claim 1, characterized in that: The encoding steps include: Obtain a set of key-value pairs to be encoded, the set of key-value pairs containing multiple key-value pairs consisting of a key and its corresponding value; determine the size parameters of the first array and the second array, and initialize the first array and the second array; select a pair of hash functions to map any key in the key space to the two arrays respectively; The first and second positions corresponding to the key are calculated using the pair of hash functions to construct the key value as an edge and add it to the graph; check whether there is a cycle in the constructed graph. If there is a cycle, select a new pair of hash functions and reconstruct the graph based on the new hash functions until the constructed graph is an acyclic graph. Traverse the acyclic graph to obtain an ordered set of edges. Following the order of the ordered set of edges, the key-value pairs corresponding to each edge are assigned values ​​in turn to determine the values ​​of each element in the first array and the second array; the output unintentional key-value storage structure includes the first array, the second array, and the pair of hash functions.

3. The efficient deterministic unintentional key-value storage method according to claim 2, characterized in that: The decoding steps include: Obtain the target key and the unintentional key-value storage structure, and use a pair of hash functions in the structure to calculate the first position and the second position corresponding to the target key; read the value of the first position from the first array, read the value of the second position from the second array, and add the two together. The result is used as the decoded value corresponding to the target key and output.

4. The efficient deterministic unintentional key-value storage method according to claim 3, characterized in that: With the set of key-value pairs , as input; Among them, the key belongs to the key space. , which is a bit string of arbitrary length, i.e. The value belongs to the value space. This space is for containing Galois field of elements, i.e. ,gather Size is .

5. The efficient deterministic unintentional key-value storage method according to claim 4, characterized in that: The unintentional key-value storage structure is as follows: in, , These are the first array and the second array, with lengths of respectively. , Elements in the first and second arrays ; Let be a pair of uniformly random hash functions, with domain . The value ranges are respectively and .

6. The efficient deterministic unintentional key-value storage method according to claim 5, characterized in that, Using hash functions Calculate the first and second positions corresponding to the key to construct an edge and add it to the graph, including: , ; right ,calculate To obtain the first and second positions, connect them. For the edge ,Will Add to diagram edge set .

7. The efficient deterministic unintentional key-value storage method according to claim 6, characterized in that, Following the ordered set of edges, values ​​are assigned to the key-value pairs corresponding to each edge in sequence to determine the values ​​of each element in the first and second arrays, including: right ,calculate , ; like If all are empty, then let , value space Random value in the middle, ; like If it is not empty, then let ; like If it is not empty, then let ; in, A set of key-value pairs The key in Corresponding value; right ,like If it is empty, assign it a random value. ; right ,like If it is empty, assign it a random value. .

8. The efficient deterministic unintentional key-value storage method according to claim 7, characterized in that, The process of obtaining the target key and the unintentional key-value storage structure involves using a pair of hash functions in the structure to calculate the first and second positions corresponding to the target key; reading the value at the first position from the first array, reading the value at the second position from the second array, and adding the two together; the result is then used as the decoded value corresponding to the target key and output. Enter any key Unintentional key-value storage structure Calculate the first and second positions corresponding to the target key. , Read the value at the first position from the first array, read the value at the second position from the second array, and then calculate the key. Corresponding value And return.

9. A high-efficiency deterministic unintentional key-value storage system, comprising a processor and a memory, characterized in that, The memory stores a computer program for implementing the efficient deterministic unintentional key-value storage method according to any one of claims 1-8, and the processor performs read and write operations on the memory.