Outsourced data alignment method based on function secret sharing
By using a function-based secret sharing method and the PSM-Share and PSM-Eval algorithms for hash mapping and equality detection, the problems of high communication overhead and asymmetric alignment in outsourced data alignment are solved, and efficient and symmetric data alignment and privacy protection are achieved.
Patent Information
- Application Number
- CN202310011611.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-05
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2043-01-05
AI Technical Summary
In existing technologies, the communication overhead of outsourced data alignment is too high and the alignment is asymmetric, resulting in excessive server burden and insufficient user privacy protection.
A function-based secret sharing method is adopted, and PSM-Share and PSM-Eval algorithms are used for hash mapping, encoding and equality detection to achieve symmetric outsourced data alignment, reduce communication overhead and ensure user privacy protection.
It effectively reduces communication overhead, achieves symmetrical data alignment, reduces server burden, ensures that all participants can obtain outsourced data alignment results, and improves user privacy protection.
Smart Images

Figure CN116015653B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of privacy data technology and relates to a method for outsourced data alignment, specifically a method for outsourced data alignment based on function secret sharing. The method is a prerequisite for vertical federated learning scenarios and can be used to achieve data alignment in finance, education, medical care, and transportation. Background Art
[0002] In today's era, Internet technology is developing rapidly and penetrating deeper into people's daily lives. The amount of user data is growing exponentially. The increase in data volume makes it more difficult to store and process it locally. Therefore, the method of outsourcing data to a third party for calculation and then returning the results has emerged. This calculation method is called outsourced computing.
[0003] Outsourced computing allows users to upload private data to one or more servers to complete complex computing tasks. This private data is referred to as outsourced data. A commonly discussed scenario for outsourced computing is implementing machine learning or neural network model training on vertically partitioned data. However, the outsourced computing solutions in these scenarios often assume that the outsourced data is already aligned or that the privacy of sample IDs is not considered. Data alignment involves aligning the sample IDs of these data to obtain the intersection of each user's samples, and then training the model on this intersection. Aligning outsourced data involves aligning the data on an outsourced third-party server to obtain the intersection of each user's data. Failure to align outsourced data before use and processing raises serious practical and security concerns. First, before data alignment, the server cannot obtain complete data for subsequent computing tasks. Second, during alignment, the sample ID is often essential information, such as an ID number or mobile phone number, which is user-specific and important. At this time, the ID cannot be directly outsourced in plain text and needs to be encrypted. This generally refers to the use of currently popular technical safeguards such as anonymization, ciphertext calculation, or de-identification to protect the user privacy in the sample ID. Aligning outsourced data between users allows independent data to be associated, and users can use this stored data to make operational or strategic decisions.
[0004] The essence of outsourced data alignment is the process of outsourcing the intersection of users' respective data. The basic principle is to use a hash function to map the sample IDs of user data to a uniformly distributed space, transmit the mapped sample IDs, and compare and find the intersection. During the transmission process, certain encryption methods are used to encrypt the data of both users. Currently, outsourced data alignment is mainly achieved through the technical method of Circuit-PSI. Under the premise of protecting the privacy of user data, Circuit-PSI participants can obtain the intersection data of all data sets without knowing or inferring the non-intersection data of other participants. Moreover, arbitrary symmetric function calculation tasks can be performed on the intersection without displaying the intersection externally. However, the current use of Circuit-PSI technical methods to achieve outsourced data alignment still has many challenges. For example, in their paper "Efficient Circuit-Based PSI with Linear Communication," published in the journal Advances in Cryptology–EUROCRYPT 2019 in April 2019, Benny Pinkas et al. proposed an efficient Circuit-PSI solution based on the OPPRF function. This solution consists of three main phases: hash mapping, encoding, and intersection. In the hash mapping phase, the sample IDs of the participating parties' data are hashed into a uniformly distributed address space of a given size using simple hashing and cuckoo hashing techniques, and any remaining hash positions are filled with random numbers. In the encoding phase, the hashed sample IDs are encoded using the efficient OPPRF function, allowing each party to securely obtain the encoded sample ID of the other party. In the intersection phase, the party that obtains the encoded sample ID compares the encoded sample IDs of both parties to obtain the intersection, and a secure comparison circuit is used to obtain the data alignment result. This technical approach reduces the call complexity of the secure comparison circuit to linear, but the communication overhead, that is, the total amount of data required to be transmitted during the entire circuit operation, remains high. For example, when calculating 2 20 For the intersection of elements, this method incurs 2.5GB of communication overhead. Clearly, such a large amount of communication overhead places a significant burden on the servers responsible for secure outsourced computing tasks. Furthermore, this technical solution's data alignment is asymmetric. That is, after the intersection phase, only the participant who obtains the encoded sample IDs of both parties can obtain the intersection result. The other party cannot obtain the intersection of both participants' samples, making it impossible to align the outsourced data with the intersection result. Summary of the Invention
[0005] The purpose of the present invention is to solve the alignment problem before data outsourcing. In response to the shortcomings of the above-mentioned prior art, a method for outsourced data alignment based on function secret sharing is provided to solve the problems of excessive communication overhead and asymmetric alignment technology in the prior art.
[0006] To achieve the above object, the technical solution adopted by the present invention includes the following steps:
[0007] (1) Initialization parameters:
[0008] Initialize a longitudinal federated learning system consisting of two participants, user A and user B, from different types of institutions, and two servers S0 and S1 for outsourcing data. User A’s sample ID set X = {x1, x2, ..., x m ,...,x M}, user B’s sample ID set Y = {y1, y2, ..., y n ,...,y N}, the empty cuckoo hash table T0 to be mapped by user A and the empty simple hash table T1 to be mapped by user B both include H bins. The two hash functions used by user A to construct the cuckoo hash table T0' and user B to construct the simple hash table T1' are f0 and f1, where x m represents the mth sample ID of user A, M represents the total number of sample IDs of user A, M≥1, y n represents the nth sample ID of user B, N represents the total number of sample IDs of user B, N ≥ 1, H = (1 + ε)M, ε represents the empirical parameter, ε ≥ 0;
[0009] (2) Two users perform hash mapping on their respective sample IDs:
[0010] User A uses the two hash functions f0 and f1 used by Cuckoo Hash to convert x m Mapped to a bin of the empty cuckoo hash table T0, we get x m The mapping value of the bin is f0(x m ) or f1(x m ), the remaining HM empty bins are filled with random values using the cuckoo hash table T0'={x1,x2,...,x h ,...,x H}; User B uses the two hash functions f0 and f1 used in simple hashing to convert y n Mapped to the two bins of the empty simple hash table T1, we get y n The mapping values of the bins are f0(y n ) and f1(y n ) of a simple hash table T1'={y1,y2,...,yh ,...,y H}, where x h represents the sample ID stored in the h-th bin of the cuckoo hash table T0', y h represents the sample ID stored in the h-th bin of the simple hash table T1', 1≤h≤H;
[0011] (3) Two users encode the cuckoo hash table T0' and the simple hash table T1':
[0012] (3a) Initialize the pseudo-random function F with the key K;
[0013] (3b) User A and user B encode the cuckoo hash table T0′ using the key K of the pseudo-random function F according to the oblivious pseudo-random function protocol, and obtain the encoded cuckoo hash table T0″ of user A = F K (T0')={x1',x2',...,x h ',...,x H '}, where x h ' represents the coded sample ID stored in the h-th bin of the coded cuckoo hash table T0", 1≤h≤H;
[0014] (3c) User B uses the key K to encode the simple hash table T1', and obtains the simple hash table T1" after user B's encoding = F K (T1') = {y1',y2',...,y h ',...,y H '}, and user B sends the encoded simple hash table T1" to servers S0 and S1 at the same time, where y h ' represents the encoded sample ID in the hth bin of the encoded simple hash table T1";
[0015] (4) User A performs function secret sharing on the encoded cuckoo hash table T0":
[0016] User A uses the PSM-Share algorithm to encode each encoded sample ID x in the encoded cuckoo hash table T0". h 'Perform function secret sharing to obtain a set of key function pairs containing H key function pairs in, represents the hth key function pair in the set P of key function pairs;
[0017] (5) User A splits the shared key function pair set P and sends them to two servers respectively:
[0018] User A splits the key function pair set P to obtain two key function subsets And send the key function subset P0 to server S0, and the key function subset P1 to server S1;
[0019] (6) Two users and two servers obtain the results of outsourced data alignment:
[0020] (6a) User A uses the mapping function g to map each sample ID x in the cuckoo hash table T0' h Mapping is performed to obtain a binary vector set U={u1,u2,...,u h ,...,u H}, and sends the binary vector set U to server S0 and server S1 at the same time; user B uses the mapping function g to convert each sample ID y in the simple hash table T1' h Mapping is performed to obtain a binary vector set V = {v1, v2, ..., v h ,...,v H}, and send the binary vector set V to server S0 and server S1 at the same time, where u h represents the hth binary vector of the binary vector set U, v h represents the hth binary vector of the vector set V;
[0021] (6b) Server S0 uses the PSM-Eval algorithm to evaluate each key function in the key function subset P0. and each encoded sample IDy in the encoded simple hash table T1' h 'Perform equality check to obtain the sample IDx stored in the hth bin of the cuckoo hash table T0' h and the sample IDy stored in the hth bin of the simple hash table T1' h The equality test value subset Q0 = { <s1> 0, <s2>0,..., h >0,..., H >0}; Server S1 uses the PSM-Eval algorithm to evaluate each key function in the key function subset P1. and each encoded sample IDy in the encoded simple hash table T1' h 'Perform equality check to obtain the sample IDx stored in the hth bin of the cuckoo hash table T0' h and the sample ID y stored in the hth bin of the simple hash table T1' h The equality test value subset Q1 = { <s1> 1, <s2>1,..., h >1,..., H >1}, where h >0 represents the hth test value of the equality test value subset Q0, h >1 indicates the hth test value of the equality test value subset Q1;
[0022] (6c) Server S0 and server S1 check each test value in the equality test value subset Q0 h >0 and each test value in the equality test value subset Q1 h >1 to perform additive operation and obtain the equality detection value set Q={s1,s2,...,s h ,...,s H }={ <s1> 0+ <s1> 1, <s2> 0+ <s2>1,..., h >0+ h >1,...,<s H >0+<s H >1}, where s h represents the hth test value of the equality test value set Q, which is 0 or 1;
[0023] (6d) Server S0 and server S1 check each test value s in the equality test value set Q h and each binary vector u in the binary vector sets U and V h and v h Perform multiplication calculations respectively to obtain the results of outsourced data alignment {s1·u1,s2·u2,...,s h ·u h ,...,s H ·u H } and {s1·v1,s2·v2,...,s h ·v h ,...,s H ·v H }.
[0024] Compared with the prior art, the present invention has the following advantages:
[0025] First, this invention replaces the high-communication-overhead secure comparison circuit with a functional secret sharing approach. It uses the PSM-Share and PSM-Eval algorithms, designed based on the principle of functional secret sharing, to obtain the outsourced data alignment results. Existing Circuit-PSI technology solutions for outsourced data alignment typically use a secure comparison circuit to calculate intersections, which incurs high communication overhead. Compared to existing technologies, this reduces communication overhead, significantly alleviating the server burden.
[0026] Second, the present invention achieves symmetrical data alignment, meaning both participating users can obtain the results of the outsourced data alignment. Existing Circuit-PSI technology solutions typically achieve data alignment asymmetrically, meaning only one participant can obtain the intersection result, while the other cannot. Compared to existing technologies, the present invention effectively resolves the asymmetric technical issue of outsourced data alignment. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a flow chart for implementing the present invention. DETAILED DESCRIPTION
[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings and specific embodiments. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. 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.
[0029] See also Figure 1 The present invention provides a technical solution: an outsourced data alignment method based on function secret sharing, comprising the following steps:
[0030] Step 1) Initialize parameters:
[0031] Initialize a longitudinal federated learning system consisting of two participants, user A and user B, from different types of institutions, and two servers S0 and S1 for outsourcing data. User A’s sample ID set X = {x1, x2, ..., x m ,...,x M }, user B’s sample ID set Y = {y1, y2, ..., y n ,...,y N }, the empty cuckoo hash table T0 to be mapped by user A and the empty simple hash table T1 to be mapped by user B both include H bins. The two hash functions used by user A to construct the cuckoo hash table T0' and user B to construct the simple hash table T1' are f0 and f1, where x m represents the mth sample ID of user A, M represents the total number of sample IDs of user A, M≥1, y n represents the nth sample ID of user B, N represents the total number of sample IDs of user B, N ≥ 1, H = (1 + ε)M, ε represents the empirical parameter, ε ≥ 0;
[0032] In this embodiment, the selection of the number H of bins in the cuckoo hash table may affect the probability of hash success. According to experience, when the number of hash functions used by the user to construct the cuckoo hash table is 2 and the number of bins in the cuckoo hash table is H = 2.4M, the probability of hash failure is very small, ensuring the success of the cuckoo hash table construction. ε is set to 1.4, and the hash functions f0 and f1 of the user-constructed cuckoo hash table and simple hash table are expressed as follows:
[0033] f0,f1:{0,1} l →[H]
[0034] Among them, {0,1} l represents a binary string of length l, → represents a generation operation;
[0035] Step 2) The two users perform hash mapping on their respective sample IDs:
[0036] User A uses the two hash functions f0 and f1 used by Cuckoo Hash to convert x m Mapped to a bin of the empty cuckoo hash table T0, we get x m The mapping value of the bin is f0(x m ) or f1(x m ), the remaining HM empty bins are filled with random values using the cuckoo hash table T0'={x1,x2,...,x h ,...,x H }; User B uses the two hash functions f0 and f1 used in simple hashing to convert y n Mapped to the two bins of the empty simple hash table T1, we get y n The mapping values of the bins are f0(y n ) and f1(y n ) of a simple hash table T1'={y1,y2,...,y h ,...,y H }, where x h represents the sample ID stored in the h-th bin of the cuckoo hash table T0', y h represents the sample ID stored in the h-th bin of the simple hash table T1', 1≤h≤H;
[0037] In this embodiment, the cuckoo hash table can effectively reduce the number of comparisons between data. Each bin only stores one sample ID, which has the advantage of fast query speed. When the simple hash table is used for mapping, multiple sample IDs may exist in one bin. Therefore, in order to determine whether the sample ID in the cuckoo hash table is also in the simple hash table, only O(M) comparisons are required. In contrast, the simplest idea of calculating the intersection of two sets is to compare each element in one set with each element in the other set one by one, which requires O(MN) comparisons. The steps for obtaining the cuckoo hash table T0' and the simple hash table T1' are as follows:
[0038] The steps to obtain the cuckoo hash table T0' are as follows: User A calculates the sample IDx m The two hash values f0(x m ) and f1(x m ), and determine whether the bin corresponding to a randomly selected hash value from the two hash values is empty. If so, set the sample IDx m Store in this bin, otherwise, according to x m The calculated hash value and judgment method process the original data in the bin and convert x m Store it in this bin and get x m The bin mapping value is f0(x m ) or f1(x m ), the remaining HM empty bins are filled with random values in the cuckoo hash table T0';
[0039] The steps to obtain the simple hash table T1' are: User B calculates the sample IDy n The two hash values f0(y n ) and f1(y n ), for these two hash values, the sample IDy n Stored in hash value f0(y n ) and f1(y n ) corresponding to the bin, and get y n The mapping values of the bins are f0(y n ) and f1(y n )'s simple hash table T1';
[0040] Step 3) Two users encode the cuckoo hash table T0' and the simple hash table T1':
[0041] (3a) Initialize the pseudo-random function F with the key K;
[0042] (3b) User A and user B encode the cuckoo hash table T0′ using the key K of the pseudo-random function F according to the oblivious pseudo-random function protocol, and obtain the encoded cuckoo hash table T0″ of user A = F K (T0')={x1',x2',...,x h ',...,x H '}, where x h ' represents the coded sample ID stored in the h-th bin of the coded cuckoo hash table T0", 1≤h≤H;
[0043] (3c) User B uses the key K to encode the simple hash table T1', and obtains the simple hash table T1" after user B's encoding = F K (T1') = {y1',y2',...,y h ',...,y H '}, and user B sends the encoded simple hash table T1" to servers S0 and S1 at the same time, where y h ' represents the encoded sample ID in the hth bin of the encoded simple hash table T1";
[0044] In this embodiment, users A and B use the key K of the pseudorandom function F to encode the cuckoo hash table T0' according to the oblivious pseudorandom function protocol. At this point, key K is known only to user B, so user B can use key K to encode the simple hash table T1'. This process prevents user A from colluding with any server to steal user B's data. The main function of this step is to encode the hashed sample ID, enhancing the privacy of the sample ID and preventing user A from colluding with any server to steal user B's data. The oblivious pseudorandom function F is expressed as:
[0045] F:{0,1} λ ×{0,1} l →{0,1} l
[0046] Among them, {0,1} λ represents a binary string of length λ, → represents a generation operation;
[0047] Step 4) User A performs function secret sharing on the encoded cuckoo hash table T0":
[0048] User A uses the PSM-Share algorithm to encode each encoded sample ID x in the encoded cuckoo hash table T0". h 'Perform function secret sharing to obtain a set of key function pairs containing H key function pairs in, represents the hth key function pair in the set P of key function pairs;
[0049] In this embodiment, the PSM-Share algorithm encodes the sample IDx h 'Confused into two decision trees, corresponding to the key function pair The key function in and And send it to two servers S0 and S1 respectively. At this time, even if user B conspires with the server and provides the key K of the pseudo-random function F, it still cannot obtain any useful information of user A. The main function of this step is that user B conspires with any server and steals user A's data. User A uses the PSM-Share algorithm to encode each encoded sample IDx in the encoded cuckoo hash table T0". h 'Perform function secret sharing, the implementation steps are:
[0050] (4a) x h 'Decompose bit by bit into x' h(1) ,...,x' h(i) ,...,x' h(l) ∈{0,1};
[0051] (4b) Randomly select an initialization string And calculate the string
[0052] (4c) for x h Each bit of 'x' h(i) Do the following:
[0053] (a) Using a pseudo-random generator G, and r1 (i-1) Generate as seeds
[0054]
[0055] (b) When x' h(i) =0, let Keep←L,Lose←R, otherwise Keep←R,Lose←L;
[0056] (c) Calculation
[0057] (d) Order
[0058] (e) For d = 0 and 1, calculate
[0059] (4d) Calculation
[0060] (4e) Initialize the string and After splicing, the hth key function pair is obtained as and
[0061] Among them, x' h(i) Represents each encoded sample IDx in the encoded cuckoo hash table T0” h 'The i-th bit, 0≤i≤l, l represents x h ' bit length, l ≥ 1, G represents a pseudo-random generator, the expression is G:{0,1} λ →{0,1} 2(λ+1) , Z represents a mapping from λ-bit binary strings to the Abelian group The mapping function in is expressed as Represents a pseudo-random Abelian group, d represents the subscript of the string, which takes a value of 0 or 1, → represents the generation operation, represents an exclusive OR operation, ← represents an assignment operation, and || represents a connection operation;
[0062] Step 5) User A splits the shared key function pair set P and sends them to two servers respectively:
[0063] User A splits the key function pair set P to obtain two key function subsets and And send the key function subset P0 to server S0, and the key function subset P1 to server S1;
[0064] Step 6) The two users and two servers obtain the results of the outsourced data alignment:
[0065] (6a) User A uses the mapping function g to map each sample ID x in the cuckoo hash table T0' h Mapping is performed to obtain a binary vector set U={u1,u2,...,u h ,...,u H }, and sends the binary vector set U to server S0 and server S1 at the same time; user B uses the mapping function g to convert each sample ID y in the simple hash table T1' h Mapping is performed to obtain a binary vector set V = {v1, v2, ..., v h ,...,v H }, and send the binary vector set V to server S0 and server S1 at the same time, where u h represents the hth binary vector of the binary vector set U, v h represents the hth binary vector of the vector set V;
[0066] (6b) Server S0 uses the PSM-Eval algorithm to evaluate each key function in the key function subset P0. and each encoded sample IDy in the encoded simple hash table T1' h 'Perform equality check to obtain the sample IDx stored in the hth bin of the cuckoo hash table T0' h and the sample IDy stored in the hth bin of the simple hash table T1' h The equality test value subset Q0 = { <s1> 0, <s2>0,..., h >0,..., H >0}; Server S1 uses the PSM-Eval algorithm to evaluate each key function in the key function subset P1. and each encoded sample IDy in the encoded simple hash table T1' h 'Perform equality check to obtain the sample IDx stored in the hth bin of the cuckoo hash table T0' h and the sample ID y stored in the hth bin of the simple hash table T1' h The equality test value subset Q1 = { <s1> 1, <s2>1,..., h >1,..., H >1}, where h >0 represents the hth test value of the equality test value subset Q0, h >1 indicates the hth test value of the equality test value subset Q1;
[0067] (6c) Server S0 and server S1 check each test value in the equality test value subset Q0 h >0 and each test value in the equality test value subset Q1 h >1 to perform additive operation and obtain the equality detection value set Q={s1,s2,...,s h ,...,s H }={ <s1> 0+ <s1> 1, <s2> 0+ <s2>1,..., h >0+ h >1,..., H >0+ H >1}, where s h represents the hth test value of the equality test value set Q, which is 0 or 1;
[0068] (6d) Server S0 and server S1 check each test value s in the equality test value set Q h and each binary vector u in the binary vector sets U and V h and v h Perform multiplication calculations respectively to obtain the results of outsourced data alignment {s1·u1,s2·u2,...,s h ·u h ,...,s H ·u H } and {s1·v1,s2·v2,...,s h ·v h ,...,s H ·v H };
[0069] In this embodiment, the process of equality detection is essentially based on the encoded sample IDy in the encoded simple hash table T1". h 'Traverse the encoded sample IDx h 'The process of confusing two decision trees. In any decision tree, each node is marked with two attributes: Keep and Lose. In the process of traversal, if the encoding sample IDy h 'Traverse and encode sample IDx h 'If one of the bits in the string decomposed bit by bit is the same, the traversal path will pass through the Keep node, otherwise it will pass through the Lose node. As long as a Loss node is passed during the traversal, the equality test values obtained by servers S0 and S1 are h >0 and h >1 will become the same value, which is a Boolean share of 0. Otherwise, the equality test value obtained by servers S0 and S1 h >0 and h >1 is a Boolean share of 1, and the mapping function g is expressed as:
[0070] g:x h ,y h →{0, 1} α ,x h ∈T0',y h ∈T1'
[0071] Among them, {0, 1} α represents a binary vector of length α, → represents a mapping relationship;
[0072] Server S0 uses the PSM-Eval algorithm to evaluate each key function in the key function subset P0. and each encoded sample IDy in the encoded simple hash table T1' h Perform equality check, server S1 uses PSM-Eval algorithm to check each key function in key function subset P1 and each encoded sample IDy in the encoded simple hash table T1' h To perform equality testing, the implementation steps are:
[0073] (6c-1) Server S d Bundle Decompose into r (0) ||t (0) ||O (1) ||...||O (l+1) , y h Decompose bit by bit into bit strings
[0074] (6c-2) for y h Every bit of Do the following:
[0075] (a) Decomposition of O (i) get Then make
[0076] (b) Calculation Bundle Decompose into
[0077] (c) When season otherwise
[0078] (6c-3) Calculate the hth detection value
[0079] in, Represents each encoded sample IDy in the encoded simple hash table T1” h The i-th bit of represents an exclusive OR operation, ← represents an assignment operation, and || represents a connection operation. < / s2> < / s1> < / s1> < / s1> < / s1> < / s2> < / s1> < / s1> < / s1> < / s1>
Claims
1. A method for outsourced data alignment based on function secret sharing, characterized in that: The specific steps include: (1) Initialization parameters: Initialize a longitudinal federated learning system consisting of two participants, user A and user B, from different types of institutions, and two servers S0 and S1 for outsourcing data. User A’s sample ID set X = {x1, x2, ..., x m ,...,x M }, user B’s sample ID set Y = {y1, y2, ..., y n ,...,y N }, the empty cuckoo hash table T0 to be mapped by user A and the empty simple hash table T1 to be mapped by user B both include H bins. The two hash functions used by user A to construct the cuckoo hash table T0' and user B to construct the simple hash table T1' are f0 and f1, where x m represents the mth sample ID of user A, M represents the total number of sample IDs of user A, M≥1, y n represents the nth sample ID of user B, N represents the total number of sample IDs of user B, N ≥ 1, H = (1 + ε)M, ε represents the empirical parameter, ε ≥ 0; (2) Two users perform hash mapping on their respective sample IDs: User A uses the two hash functions f0 and f1 used by Cuckoo Hash to convert x m Mapped to a bin of the empty cuckoo hash table T0, we get x m The mapping value of the bin is f0(x m ) or f1(x m ), the remaining HM empty bins are filled with random values using the cuckoo hash table T0'={x1,x2,...,x h ,...,x H }; User B uses the two hash functions f0 and f1 used in simple hashing to convert y n Mapped to the two bins of the empty simple hash table T1, we get y n The mapping values of the bins are f0(y n ) and f1(y n ) of a simple hash table T1'={y1,y2,...,y h ,...,y H }, where x h represents the sample ID stored in the h-th bin of the cuckoo hash table T0', y h represents the sample ID stored in the h-th bin of the simple hash table T1', 1≤h≤H; (3) Two users encode the cuckoo hash table T0' and the simple hash table T1': (3a) Initialize the pseudo-random function F with the key K; (3b) User A and user B encode the cuckoo hash table T0′ using the key K of the pseudo-random function F according to the oblivious pseudo-random function protocol, and obtain the encoded cuckoo hash table T0″ of user A = F K (T0')={x1',x2',...,x h ',...,x H '}, where x h ' represents the coded sample ID stored in the h-th bin of the coded cuckoo hash table T0", 1≤h≤H; (3c) User B uses the key K to encode the simple hash table T1', and obtains the simple hash table T1" after user B's encoding = F K (T1') = {y1',y2',...,y h ',...,y H '}, and user B sends the encoded simple hash table T1" to servers S0 and S1 at the same time, where y h ' represents the encoded sample ID in the hth bin of the encoded simple hash table T1"; (4) User A performs function secret sharing on the encoded cuckoo hash table T0": User A uses the PSM-Share algorithm to encode each encoded sample IDx in the encoded cuckoo hash table T0". h 'Perform function secret sharing to obtain a set of key function pairs containing H key function pairs in, represents the hth key function pair in the set P of key function pairs; (5) User A splits the shared key function pair set P and sends them to two servers respectively: User A splits the key function pair set P to obtain two key function subsets and And send the key function subset P0 to server S0, and the key function subset P1 to server S1; (6) Two users and two servers obtain the results of outsourced data alignment: (6a) User A uses the mapping function g to map each sample ID x in the cuckoo hash table T0' h Mapping is performed to obtain a binary vector set U={u1,u2,...,u h ,...,u H }, and sends the binary vector set U to server S0 and server S1 at the same time; user B uses the mapping function g to convert each sample ID y in the simple hash table T1' h Mapping is performed to obtain a binary vector set V = {v1, v2, ..., v h ,...,v H }, and send the binary vector set V to server S0 and server S1 at the same time, where u h represents the hth binary vector of the binary vector set U, v h represents the hth binary vector of the vector set V; (6b) Server S0 uses the PSM-Eval algorithm to evaluate each key function in the key function subset P0. and each encoded sample IDy in the encoded simple hash table T1' h 'Perform equality check to obtain the sample IDx stored in the hth bin of the cuckoo hash table T0' h and the sample IDy stored in the hth bin of the simple hash table T1' h The equality test value subset Q0 = {s 10 ,s 20 ,...,s h0 ,...,s H0 }; Server S1 uses the PSM-Eval algorithm to evaluate each key function in the key function subset P1. and each encoded sample IDy in the encoded simple hash table T1' h 'Perform equality check to obtain the sample IDx stored in the hth bin of the cuckoo hash table T0' h and the sample IDy stored in the hth bin of the simple hash table T1' h The equality test value subset Q1 = {s 11 ,s 21 ,...,s h1 ,...,s H1 }, where s h0 represents the hth test value of the equality test value subset Q0, s h1 represents the hth test value of the equality test value subset Q1; (6c) Server S0 and server S1 check each test value s in the equality test value subset Q0 h0 And each test value s in the equality test value subset Q1 h1 Perform additive operations to obtain the equality test value set Q = {s1, s2, ..., s h ,...,s H }={s 10 +s 11 ,s 20 +s 21 ,...,s h0 +s h1 ,...,s H0 +s H1 }, where s h represents the hth test value of the equality test value set Q, which is 0 or 1; (6d) Server S0 and server S1 check each test value s in the equality test value set Q h and each binary vector u in the binary vector sets U and V h and v h Perform multiplication calculations respectively to obtain the results of outsourced data alignment {s1·u1,s2·u2,...,s h ·u h ,...,s H ·u H } and {s1·v1,s2·v2,...,s h ·v h ,...,s H ·v H }.
2. According to the outsourced data alignment method based on functional secret sharing according to claim 1, the hash functions f0 and f1 in step (1) are expressed as follows: f0,f1:{0,1} l →[H] in, { 0,1} l Represents a binary string of length l, → represents a generation operation.
3. According to the outsourced data alignment method based on functional secret sharing according to claim 1, the cuckoo hash table T0' and the simple hash table T1' in step (2) are obtained by: The steps to obtain the cuckoo hash table T0' are as follows: User A calculates the sample IDx m The two hash values f0(x m ) and f1(x m ), and determine whether the bin corresponding to a randomly selected hash value from the two hash values is empty. If so, set the sample IDx m Store in this bin, otherwise, according to x m The calculated hash value and judgment method process the original data in the bin and convert x m Store it in this bin and get x m The bin mapping value is f0(x m ) or f1(x m ), the remaining HM empty bins are filled with random values in the cuckoo hash table T0'; The steps to obtain the simple hash table T1' are: User B calculates the sample IDy n The two hash values f0(y n ) and f1(y n ), for these two hash values, the sample IDy n Stored in hash value f0(y n ) and f1(y n ) corresponding to the bin, and get y n The mapping values of the bins are f0(y n ) and f1(y n )'s simple hash table T1'.
4. The outsourced data alignment method based on function secret sharing according to claim 1 is characterized in that: The inadvertent pseudo-random function F described in step (2) is expressed as: F:{0,1} λ ×{0,1} l →{0,1} l Among them, {0,1} λ represents a binary string of length λ, and → represents a generation operation.
5. The outsourced data alignment method based on function secret sharing according to claim 1 is characterized in that: In step (4), the PSM-Share algorithm is used to encode each encoded sample IDx in the encoded cuckoo hash table T0". h 'Perform function secret sharing, the implementation steps are: (4a) x h 'Decompose bit by bit into x h ' (1) ,...,x h ' (i) ,...,x h ' (l) ∈{0,1}; (4b) Randomly select an initialization string r1 (0) ∈{0,1} λ , and calculate the string (4c) for x h Each bit of 'x h ' (i) Do the following: (4c-1) Using pseudo-random generator G, and r1 (i-1) Generate as seeds and (4c-2) When x h ' (i) =0, let Keep←L,Lose←R, otherwise Keep←R,Lose←L; (4c-3) Calculation (4c-4) Order (4c-5) For d = 0 and 1, calculate (4d) Calculation (4e) Initialize the string and Splice and get the hth key function pair as and Among them, x h ' (i) Represents each encoded sample IDx in the encoded cuckoo hash table T0” h 'The i-th bit, 0≤i≤l, l represents x h ' bit length, l ≥ 1, G represents a pseudo-random generator, the expression is G:{0,1} λ →{0,1} 2(λ+1) , Z represents a mapping from λ-bit binary strings to the Abelian group The mapping function in is expressed as Z: Represents a pseudo-random Abelian group, d represents the subscript of the string, which takes the value 0 or 1, → represents the generation operation, represents an exclusive OR operation, ← represents an assignment operation, and || represents a connection operation.
6. The outsourced data alignment method based on function secret sharing according to claim 1 is characterized in that: The mapping function g described in step (6a) is expressed as: g:x h ,and h →{0,1} α ,x h ∈T0',y h ∈T1' Among them, {0, 1} α represents a binary vector of length α, → represents a mapping relationship.
7. The outsourced data alignment method based on function secret sharing according to claim 1 is characterized in that: In step (6b), server S0 uses the PSM-Eval algorithm to evaluate each key function in the key function subset P0. and each encoded sample IDy in the encoded simple hash table T1' h Perform equality check, server S1 uses PSM-Eval algorithm to check each key function in key function subset P1 and each encoded sample IDy in the encoded simple hash table T1' h To perform equality testing, the implementation steps are: (6c-1) Server S d Bundle Decompose into r (0) ||t (0) ||O (1) ||...||O (l+1) , y h Decompose bit by bit into bit strings (6c-2) for y h Every bit of Do the following: (6c-2a) decomposition of O (i) get Then make (6c-2b) Calculation Bundle Decompose into (6c-2c) season otherwise (6c-3) Calculate the hth detection value in, Represents each encoded sample IDy in the encoded simple hash table T1” h The i-th bit of represents an exclusive OR operation, ← represents an assignment operation, and || represents a connection operation.
Citation Information
Patent Citations
Efficient privacy set intersection calculation method and system based on assistance of cloud server
CN112910631A
Hidden set intersection method for longitudinal federated learning data alignment
CN115378693A