Data processing method and device for security computing, medium, equipment and product

By mapping the identifier set to a cuckoo hash table and decomposing it into a low-dimensional tensor product in secure multi-party computation, and performing SIMD code homomorphic encryption, the problem of high data communication volume is solved and the computational efficiency is improved.

CN121077643AActive Publication Date: 2025-12-05BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511419786.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2025-12-05
Estimated Expiration
2045-09-29

AI Technical Summary

Technical Problem

In secure multi-party computation, existing technologies suffer from high data communication frequency and volume, which affects computational efficiency.

Method used

Multiple hash functions are used to map the identifier set to the Cuckoo Hash Table, which is then decomposed into the tensor product of two low-dimensional tensors. Single-instruction multiple-data (SIMD) homomorphic encryption is performed on each column element to generate and transmit ciphertext. The number of ciphertexts is reduced by tensor integral decomposition, thereby reducing the amount of communication.

Benefits of technology

By reducing the number of ciphertexts generated, the amount of communication between participants is reduced, thereby improving the processing efficiency of data processing tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121077643A_ABST
    Figure CN121077643A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device for secure computing, a medium, equipment and a product. The participants of the security calculation comprise a first participant and a second participant which respectively hold a first identifier set and a second identifier set, and the method applied to the first participant comprises the following steps: mapping each identifier in the first identifier set into a cuckoo hash table by adopting a plurality of hash functions; decomposing a first tensor formed by elements in the hash table into a tensor product of two low-dimensional tensors; for each column element in the two low-dimensional tensors, performing homomorphic encryption on the SIMD code of the column element to obtain a first ciphertext; the first ciphertext is sent to a second participant, and the second participant is used for generating a second ciphertext according to the second identification set, the multiple hash functions and the first ciphertext and sending the second ciphertext to the first participant; determining an intersection of the two identification sets according to the second ciphertext; and executing a data processing task based on the intersection. The ciphertext generation number and the communication traffic of the first participant and the second participant can be reduced, and the processing efficiency of the data processing task is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of secure multi-party computation, and in particular, to a data processing method and apparatus for secure computation, a medium, a device and a product. BACKGROUND

[0002] Secure multi-party computation, also known as multi-party computation (MPC), can be used to jointly compute a function result by multiple parties without leaking the input data of each party in the function, and the result of the computation is disclosed to one or more parties. Typical applications of secure multi-party computation include, for example, joint statistical analysis of multi-party data with privacy protection, machine learning, etc. The function here is a statistical operation function, a machine learning algorithm, etc. In the process of multi-party secure computation, in order to not leak the data and intermediate results of each party, the data or intermediate results can be held in a shared form by each party. A single party holds a data slice, and the slices held by each party are fused together to restore the corresponding data. Usually, the computation is kept in a shared state. In this way, the number of data communications, the amount of communication, etc. in multi-party secure computation are important factors affecting the efficiency of secure computation. SUMMARY

[0003] This summary is provided to introduce a selection of concepts, which are further described below in the detailed description. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

[0004] In a first aspect, the present disclosure provides a data processing method for secure computation, the participants of the secure computation including a first participant and a second participant, the first participant holding a first set of identifiers, the second participant holding a second set of identifiers, the method being applied to the first participant and comprising: mapping each first identifier in the first set of identifiers to a cuckoo hash table using a plurality of hash functions; decomposing a first tensor formed by each element in the cuckoo hash table into a tensor product of two low-dimensional tensors; homomorphically encrypting a single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain a first ciphertext; sending all the first ciphertexts to the second participant; wherein the second participant is configured to generate a second ciphertext according to the second set of identifiers, the plurality of hash functions and all the first ciphertexts, and send the second ciphertext to the first participant; In response to receiving the second ciphertext sent by the second participant, determining an intersection of the first identifier set and the second identifier set according to the second ciphertext; Performing a first data processing task based on the intersection.

[0005] In a second aspect, the present disclosure provides a data processing method for secure computation, participants of the secure computation include a first participant and a second participant, the first participant holds a first identifier set, and the second participant holds a second identifier set, the method is applied to the second participant, and includes: Receiving a plurality of first ciphertexts sent by the first participant; wherein the first participant is configured to generate the plurality of first ciphertexts according to the first identifier set and a plurality of hash functions, and send the plurality of first ciphertexts to the second participant; Mapping each second identifier in the second identifier set to a simple hash table by using the plurality of hash functions; Generating a second ciphertext according to a single instruction multiple data (SIMD) code of each column element in a second tensor and all the first ciphertexts, and sending the second ciphertext to the first participant; wherein the second tensor is composed of elements in the simple hash table, and the first participant is configured to determine an intersection of the first identifier set and the second identifier set according to the second ciphertext, and perform a first data processing task based on the intersection.

[0006] In a third aspect, the present disclosure provides a data processing apparatus for secure computation, participants of the secure computation include a first participant and a second participant, the first participant holds a first identifier set, and the second participant holds a second identifier set, the apparatus is applied to the first participant, and includes: A first mapping module, configured to map each first identifier in the first identifier set to a cuckoo hash table by using a plurality of hash functions; A tensor integral decomposition module, configured to decompose a first tensor composed of elements in the cuckoo hash table into a tensor product of two low-dimensional tensors; An encryption module, configured to homomorphically encrypt a single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors, to obtain a first ciphertext; A sending module, configured to send all the first ciphertexts to the second participant; wherein the second participant is configured to generate a second ciphertext according to the second identifier set, the plurality of hash functions and all the first ciphertexts, and send the second ciphertext to the first participant; A determining module, configured to determine an intersection of the first identifier set and the second identifier set according to the second ciphertext in response to receiving the second ciphertext sent by the second participant; The execution module is configured to perform a first data processing task based on the intersection.

[0007] In a fourth aspect, the present disclosure provides a data processing apparatus for secure computation, participants of the secure computation include a first participant and a second participant, the first participant holds a first set of identifiers, the second participant holds a second set of identifiers, the apparatus is applied to the second participant, and includes: The receiving module is configured to receive a plurality of first ciphertexts sent by the first participant, wherein the first participant is configured to generate the plurality of first ciphertexts according to the first set of identifiers and a plurality of hash functions, and send the plurality of first ciphertexts to the second participant. The second mapping module is configured to map each second identifier in the second set of identifiers to a simple hash table by using the plurality of hash functions. The generating module is configured to generate a second ciphertext according to a SIMD code of each column element in a second tensor and all the first ciphertexts, and send the second ciphertext to the first participant, wherein the second tensor is composed of elements in the simple hash table, and the first participant is configured to determine an intersection of the first set of identifiers and the second set of identifiers according to the second ciphertext, and perform a first data processing task based on the intersection.

[0008] In a fifth aspect, the present disclosure provides a computer readable medium having a computer program stored thereon, the computer program, when executed by a processing apparatus, implements steps of the data processing method for secure computation provided in the first aspect of the present disclosure, or implements steps of the data processing method for secure computation provided in the second aspect of the present disclosure.

[0009] In a sixth aspect, the present disclosure provides an electronic device, including: a storage apparatus having a computer program stored thereon; and a processing apparatus configured to execute the computer program in the storage apparatus to implement steps of the data processing method for secure computation provided in the first aspect of the present disclosure, or implement steps of the data processing method for secure computation provided in the second aspect of the present disclosure.

[0010] In a seventh aspect, the present disclosure provides a computer program product including a computer program, the computer program, when executed by a processor, implements steps of the data processing method for secure computation provided in the first aspect of the present disclosure, or implements steps of the data processing method for secure computation provided in the second aspect of the present disclosure.

[0011] In the technical solution, the participants of the secure computation include a first participant and a second participant, the first participant holds a first set of identifiers, the second participant holds a second set of identifiers, the first participant maps each first identifier in the first set of identifiers to a cuckoo hash table using a plurality of hash functions, and then the first participant decomposes a first tensor formed by elements in the cuckoo hash table into a tensor product of two low-dimensional tensors. Next, the first participant homomorphically encrypts a single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain a first ciphertext, and sends all the first ciphertexts to the second participant. After receiving the plurality of first ciphertexts sent by the first participant, the second participant generates a second ciphertext according to the second set of identifiers, the plurality of hash functions, and all the first ciphertexts, and sends the second ciphertext to the first participant. After receiving the second ciphertext sent by the second participant, the first participant determines an intersection of the first set of identifiers and the second set of identifiers according to the second ciphertext, and then performs a first data processing task based on the intersection. Before generating the ciphertext, the first participant first decomposes the high-dimensional first tensor into the tensor product of the two low-dimensional tensors, thereby reducing the number of generated ciphertexts, reducing the communication amount between the first participant and the second participant, and improving the processing efficiency of the first data processing task.

[0012] Other features and advantages of the present disclosure will be described in detail in the following detailed description section. BRIEF DESCRIPTION OF DRAWINGS

[0013] The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which: Figure 1 FIG. 1 is a flowchart of a data processing method for secure computation applied to a first participant according to an exemplary embodiment.

[0014] Figure 2 FIG. 2 is a flowchart of a data processing method for secure computation applied to a second participant according to an exemplary embodiment.

[0015] Figure 3 FIG. 3 is a block diagram of a data processing apparatus for secure computation applied to a first participant according to an exemplary embodiment.

[0016] Figure 4 FIG. 4 is a block diagram of a data processing apparatus for secure computation applied to a second participant according to an exemplary embodiment.

[0017] Figure 5FIG. 1 is a structural schematic diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0018] Before introducing the specific embodiments of the present disclosure, first introduce the terms involved in the present disclosure and the specific application scenarios of multi-party secure computation.

[0019] Ring: refers to a set, which defines two operations of addition and multiplication, and forms a commutative group (i.e. Abelian group) for addition, and forms a semi-group for multiplication of elements other than 0, and the multiplication satisfies the distribution rate for addition.

[0020] Secret sharing (Secret Sharing) is also called secret division and secret sharing. The basic principle is to split a secret (such as a key, private data, etc.) into multiple shares (Share), and give them to different second parties for safekeeping. Only when more than the threshold number of parties combine their shares can the secret be restored; the Share obtained from less than the threshold number of parties cannot restore any information of the secret. In multi-party secure computation, the threshold number is usually the same as the number of participants, and the shares into which the secret is split can also be called fragments. Among them, the private data is the data that is not intended to be known by other parties in multi-party secure computation.

[0021] Homomorphic encryption is a technology that allows calculation on encrypted data (i.e. ciphertext) and then decryption to obtain the result. The calculation result of homomorphic encryption is the same as the result of direct calculation of the original data (i.e. plaintext), but the entire calculation process is performed on encrypted data. Among them, there are many encryption algorithms that can be used to implement homomorphic encryption, among which BFV is one of them, which is called BFV homomorphic encryption at this time.

[0022] Private Set Intersection (PSI) is a type of proprietary protocol in the field of secure multi-party computation, which allows both parties to input private sets to jointly calculate the intersection of the sets, and ensures that no additional element information is leaked except the intersection of the sets.

[0023] Traffic: Because the data of the participants in secure computation is on different machines, interaction needs to be completed through network communication, and during the calculation process, ciphertext data will be transmitted on the network, and the amount of data transmitted is the traffic.

[0024] Embodiments of the present disclosure will be described below in greater detail with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be construed as being limited to the embodiments set forth herein; rather, these embodiments are provided so as to more completely and thoroughly understand the present disclosure. It is understood that the drawings and embodiments of the present disclosure are for exemplary purposes only and are not intended to limit the scope of protection of the present disclosure.

[0025] It should be understood that each step recited in the method embodiments of the present disclosure can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0026] The term "comprising" and variations thereof as used herein are open-ended, that is "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Related definitions are given below.

[0027] It should be noted that the terms "first", "second", and the like in the present disclosure are merely used to distinguish different devices, modules or units, and do not imply the order or interdependence of the functions performed by these devices, modules or units.

[0028] It should be noted that the terms "one", "multiple" in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that "one or more" should be understood unless otherwise explicitly indicated in the context.

[0029] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.

[0030] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the type of information involved in the present disclosure, the scope of use, the use scenario, etc. should be informed to the relevant user and the authorization of the relevant user should be obtained by appropriate means, wherein the relevant user can include any type of right subject, such as an individual, an enterprise, or a group.

[0031] For example, in response to receiving an active request of a user, a prompt information is sent to the relevant user to explicitly prompt the relevant user that the operation requested to be performed will require obtaining and using information of the relevant user, so that the relevant user can autonomously select whether to provide information to the software or hardware such as an electronic device, an application program, a server or a storage medium performing the operation of the technical solution of the present disclosure according to the prompt information.

[0032] As an optional but non-limiting implementation manner, in response to receiving an active request of a relevant user, the manner of sending a prompt information to the relevant user may, for example, be a pop-up window manner, and the prompt information may be presented in the form of text in the pop-up window. In addition, the pop-up window may also carry selection controls for the user to select "agree" or "disagree" to provide information to the electronic device.

[0033] It can be understood that the above notification and user authorization process is only illustrative and does not limit the implementation of the present disclosure, and other manners meeting relevant laws and regulations can also be applied to the implementation of the present disclosure.

[0034] It can be understood that the data involved in the technical solution (including but not limited to the data itself, the obtaining, use, storage or deletion of the data) should comply with the requirements of relevant laws and regulations and relevant provisions.

[0035] Figure 1 is a flowchart of a data processing method for secure computation applied to a first participant according to an example embodiment. As Figure 1 indicated, the data processing method for secure computation applied to the first participant can include the following S101-S106.

[0036] In S101, each first identifier in the first identifier set is mapped to a cuckoo hash table using a plurality of hash functions.

[0037] In the present disclosure, the participants of secure computation include a first participant and a second participant, the first participant holds a first identifier set, and the second participant holds a second identifier set, wherein the first identifier set includes a plurality of first identifiers, and the second identifier set includes a plurality of second identifiers, and the identifier may, for example, be an ID. The first participant is used to request to jointly compute the intersection of the first identifier set and the second identifier set with the second participant.

[0038] When the first participant needs to perform a first data processing task based on the intersection of the first identifier set and the second identifier set, the intersection of the identifier sets held by the two parties (i.e., the intersection of the first identifier set and the second identifier set) can be first calculated with the second participant, and then the first data processing task is performed based on the intersection.

[0039] For example, the first participant is a shopping platform A, the second participant is a bank B, the first identifier set includes multiple user identifiers of the shopping platform, and the second identifier set can include multiple user identifiers who open credit cards of the bank B; the shopping platform A can obtain the user identifiers who open the credit cards of the bank B on the shopping platform by securely calculating the intersection of the first identifier set and the second identifier set with the bank B, and then the shopping platform A can recommend the users to use the credit cards to pay when the payment request is initiated by the users corresponding to the user identifiers, at this time, the first data processing task is a credit card payment recommendation task.

[0040] The first participant and the second participant can agree on multiple hash functions in advance, wherein the first participant can map each first identifier in the first identifier set into a cuckoo hash table based on the multiple hash functions agreed with the second participant by using a cuckoo hash algorithm. M The cuckoo hash table includes K first hash buckets, each first hash bucket includes 2 M first storage locations, one first storage location is used to store one bit of the 2 M bit one-hot encoding of the first identifier, and the storage locations not mapped in the K first hash buckets are stored as 0, K and M are integers greater than 1.

[0041] The first hash bucket includes 2 M first storage locations, the one-hot encoding of the first identifier is 2 N bits, and one first storage location is used to store one bit of the one-hot encoding of the first identifier, so that the one-hot encoding of the first identifier completely occupies all storage locations of a first hash bucket, that is, the first identifier is arranged in the corresponding first hash bucket in the form of one-hot encoding.

[0042] K = 2 M , the first identifier and the second identifier are both M+N-bit identifiers, and at this time, the cuckoo hash table is a two-dimensional table of Kx2 20 .

[0043] For example, the first identifier and the second identifier are both 33-bit identifiers, M = 20, and N = 13, so the cuckoo hash table includes 8192 first hash buckets, each first hash bucket includes 2 20 first storage locations, and at this time, the cuckoo hash table is a two-dimensional table of 8192x2 M .

[0044] In S102, the first tensor formed by the elements in the cuckoo hash table is decomposed into the tensor product of two low-dimensional tensors.

[0045] The first tensor is a Kx2 Mcolumns, wherein the first tensor is decomposed into a tensor product of a first low-dimensional tensor and a second low-dimensional tensor, i.e., the first tensor = the first low-dimensional tensor the second low-dimensional tensor, both of which are K x L tensor, is the number of columns of the first low-dimensional tensor and the second low-dimensional tensor, and , the p-th row of the first tensor is equal to the tensor product of the p-th row of the first low-dimensional tensor and the p-th row of the second low-dimensional tensor, p = 0, 1, …, (2 L -1).

[0046] For example, K = 8192, M = 20, then , the first tensor of 8192 x 2 20 is decomposed into two low-dimensional tensors of 8192 x 1024.

[0047] After the mapping obtains the cuckoo hash table, if the ciphertext corresponding to each column element in the first tensor is directly sent to the second participant, 2 M ciphertexts need to be sent to the second participant, and by tensor product decomposition, the amount of ciphertexts can be reduced to

[0048] In S103, for each column element in the two low-dimensional tensors, the single instruction multiple data (SIMD) code of the column element is homomorphically encrypted to obtain the first ciphertext.

[0049] In the present disclosure, for each column element in the two low-dimensional tensors, the column element can be first encoded by single instruction multiple data (SIMD) to obtain the SIMD code of the column element, and then the SIMD code of the column element is homomorphically encrypted to obtain the first ciphertext corresponding to the column element.

[0050] In S104, all first ciphertexts are sent to the second participant, and the second participant is used to generate second ciphertexts according to the second identification set, the plurality of hash functions, and all first ciphertexts, and send the second ciphertexts to the first participant.

[0051] In S105, in response to receiving the second ciphertexts sent by the second participant, the intersection of the first identification set and the second identification set is determined according to the second ciphertexts.

[0052] In S106, the first data processing task is executed based on the intersection.

[0053] ​After obtaining the first ciphertexts corresponding to each column element in the two low-dimensional tensors respectively, the first participant can send them to the second participant; after receiving the first ciphertexts, the second participant can generate the second ciphertext according to the second identifier set, the plurality of hash functions agreed with the first participant, and all the first ciphertexts received from the first participant, and send the second ciphertext to the first participant; after receiving the second ciphertext, the first participant can determine the intersection of the first identifier set and the second identifier set according to the second ciphertext, and then perform the first data processing task based on the intersection. The second ciphertext carries the intersection information of the first identifier set and the second identifier set.

[0054] In the above technical solution, the participants of secure computation include the first participant and the second participant, the first participant holds the first identifier set, the second participant holds the second identifier set, the first participant maps each first identifier in the first identifier set to the cuckoo hash table using a plurality of hash functions, and then the first participant decomposes the first tensor composed of each element in the cuckoo hash table into the tensor product of two low-dimensional tensors; next, the first participant homomorphically encrypts the single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain the first ciphertext, and sends all the first ciphertexts to the second participant; after receiving the plurality of first ciphertexts sent by the first participant, the second participant generates the second ciphertext according to the second identifier set, the plurality of hash functions, and all the first ciphertexts, and sends the second ciphertext to the first participant; after receiving the second ciphertext sent by the second participant, the first participant determines the intersection of the first identifier set and the second identifier set according to the second ciphertext, and then the first participant performs the first data processing task based on the intersection. Before generating the ciphertext, the first participant first decomposes the high-dimensional first tensor into the tensor product of two low-dimensional tensors using tensor product decomposition, thereby reducing the number of ciphertexts generated, reducing the communication amount between the first participant and the second participant, and improving the processing efficiency of the first data processing task.

[0055] Specifically, the second participant can be used to map each second identifier in the second identifier set to a simple hash table using the plurality of hash functions agreed with the first participant, and generate the second ciphertext according to the SIMD code of each column element in the second tensor and all the first ciphertexts.

[0056] The second tensor is composed of elements in the simple hash table. The simple hash table includes K third hash buckets, and each third hash bucket contains 2 Ma second storage position, the number of which is the same as that of the storage positions in each first hash bucket of the cuckoo hash table. The second identifier is stored in the form of an element 1 in the qth storage position in the corresponding third hash bucket, that is, the element of the qth storage position in the third hash bucket corresponding to the second identifier is 1. Wherein, q is the low M bits of the second identifier, and the storage positions in the K third hash buckets that are not mapped are stored as 0.

[0057] In an implementation, the second participant can obtain the low M bits and the high N bits of each second identifier in the second identifier set, where the second identifier is an identifier of M+N bits; then, for each hash function in the plurality of hash functions agreed by the first participant, calculate a first hash value of the low M bits of the second identifier by the hash function; store the low M bits of the second identifier in the form of an element 1 in the qth storage position in the third hash bucket with the first bucket number, where the first bucket number is the exclusive or result of the high N bits of the second identifier and the first hash value. The second identifier can be mapped to a plurality of first hash buckets in the simple hash table based on a plurality of hash functions.

[0058] Wherein, the second participant can divide the second identifier of M+N bits into two parts, that is, the high N bits and the low M bits, and can place the high N bits in the form of an element 0 in the third hash bucket with the bucket number and place the low M bits in the form of an element 1 in the third hash bucket with the bucket number , wherein is the high N bits of the second identifier, is the low M bits of the second identifier, is the first hash value, is the hash function.

[0059] For example, the second participant can generate the second ciphertext according to the SIMD code of each column element in the second tensor and all the first ciphertexts by the following equation:

[0060] Wherein, is the second ciphertext; is the SIMD code of the first column element in the second tensor; is the first ciphertext corresponding to the first column element of the first low-dimensional tensor; j is the first ciphertext corresponding to the first column element of the second low-dimensional tensor. i

[0061]

[0062] Wherein, is the SIMD code of the first column element in the second tensor, i is the SIMD code of the first column element in the second tensor, is the SIMD code of the first column element in the second tensor, i ​​ciphertexts of the SIMD codes of the first column of the first tensor, , ciphertexts of the SIMD codes of the first column of the first tensor. ciphertexts of the SIMD codes of the first column of the first tensor.

[0063] The following describes the specific implementation of determining the intersection of the first set of identities and the second set of identities according to the second ciphertext in S105 in detail. Specifically, the following steps (a1) to (a3) can be implemented: Step (a1): homomorphically decrypt the second ciphertext.

[0064] Step (a2): perform SIMD decoding on the decryption result to obtain the first column vector.

[0065] Step (a3): determine the intersection according to the position information of element 1 in the first column vector.

[0066] Specifically, the first identity corresponding to the one-hot encoding stored in the second hash bucket can be determined as the intersection of the first set of identities and the second set of identities, where the second hash bucket is the first hash bucket with a bucket number equal to the row number of element 1 in the first column vector.

[0067] In addition, in order to further reduce the communication amount, after obtaining the two low-dimensional tensors through S102, the two low-dimensional tensors can be respectively encoded by a const-weight code. Then, a plurality of first ciphertexts are generated based on the two tensors after the const-weight code encoding. Specifically, before S103, the data processing method for secure calculation applied to the first participant can further include the following steps: The two low-dimensional tensors are respectively encoded by a const-weight code to obtain a third tensor and a fourth tensor. Specifically, a hot const-weight codebook can be used to encode the two low-dimensional tensors by a const-weight code, where k - the hot const-weight codebook is a tensor with a size of k , n , d , k , d , k , d , , n , k , ,

[0068] , k , L , d , , ,

[0069] Specifically, the third tensor = the first low-dimensional tensor x k - the hot weight codebook, the fourth tensor = the second low-dimensional tensor x k - the hot weight codebook.

[0070] At this time, the above S103 can homomorphically encrypt the SIMD code of each column element in the third tensor and the fourth tensor to obtain the first ciphertext.

[0071] Correspondingly, the second participant is configured to decode the received first ciphertext to obtain the third ciphertext, and then generate the second ciphertext according to the second identifier set, the plurality of hash functions and all the third ciphertexts, and send the second ciphertext to the first participant.

[0072] Specifically, after receiving the plurality of first ciphertexts sent by the first participant, the second participant can decode the first ciphertext based on the above k - the hot weight codebook to obtain the third ciphertext; then, the second participant can map each second identifier in the second identifier set to a simple hash table using the plurality of hash functions agreed with the first participant, and generate the second ciphertext according to the SIMD code of each column element in the second tensor and all the third ciphertexts.

[0073] Specifically, the vth column of the third ciphertext is equal to the product of the corresponding elements of the u th column of the first ciphertext, where u satisfies k - the element in the vth row and the u th column of the hot weight codebook is 1.

[0074] For example, k - the elements in the 1st row and the 1st column and the 1st row and the 3rd column of the hot weight codebook are 1, k - the elements in the 1st row and other columns of the hot weight codebook are 0, then the 1st column of the third ciphertext is equal to the product of the corresponding elements of the 1st column of the first ciphertext and the 3rd column of the first ciphertext.

[0075] It should be noted that the second ciphertext can be generated according to the SIMD code of each column element in the second tensor and all the third ciphertexts in a similar manner to the generation of the second ciphertext according to the SIMD code of each column element in the second tensor and all the first ciphertexts, and the disclosure will not be repeated here.

[0076] Through the above implementation, the amount of ciphertext transmission can be further reduced to 2 d pieces.

[0077] Figure 2 is a flow chart of a data processing method for secure computing applied to a second participant according to an example embodiment. As Figure 2As shown, the data processing method for secure computation applied to the second participant can include the following S201-S203.

[0078] In S201, a plurality of first ciphertexts sent by a first participant are received, the first participant being configured to generate the plurality of first ciphertexts according to a first set of identifiers and a plurality of hash functions, and send the plurality of first ciphertexts to the second participant.

[0079] In S202, each second identifier in a second set of identifiers is mapped into a simple hash table using the plurality of hash functions.

[0080] The simple hash table includes K third hash buckets, each third hash bucket containing 2 M second storage locations, and each second identifier is stored in the form of an element 1 into a qth storage location in a corresponding third hash bucket, q being a low M-bit of the second identifier, and each storage location in the K third hash buckets that is not mapped is stored as 0, K and M being integers greater than 1.

[0081] In S203, a second ciphertext is generated according to a SIMD code of each column element in a second tensor and all the first ciphertexts, and the second ciphertext is sent to the first participant.

[0082] The second tensor is composed of each element in the simple hash table, and the first participant is configured to determine an intersection of the first set of identifiers and the second set of identifiers according to the second ciphertext, and perform a first data processing task based on the intersection.

[0083] In the technical solution, the participants of the secure computation include a first participant and a second participant, the first participant holds a first set of identifiers, the second participant holds a second set of identifiers, the first participant maps each first identifier in the first set of identifiers to a cuckoo hash table using a plurality of hash functions, then the first participant decomposes a first tensor formed by elements in the cuckoo hash table into a tensor product of two low-dimensional tensors; next, the first participant homomorphically encrypts a single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain a first ciphertext, and sends all the first ciphertexts to the second participant; after receiving the plurality of first ciphertexts sent by the first participant, the second participant generates a second ciphertext according to the second set of identifiers, the plurality of hash functions and all the first ciphertexts, and sends the second ciphertext to the first participant; after receiving the second ciphertext sent by the second participant, the first participant determines an intersection of the first set of identifiers and the second set of identifiers according to the second ciphertext, and then the first participant performs a first data processing task based on the intersection. Before generating the ciphertext, the first participant first decomposes the high-dimensional first tensor into a tensor product of two low-dimensional tensors using tensor decomposition, thereby reducing the number of generated ciphertexts, reducing the communication amount between the first participant and the second participant, and improving the processing efficiency of the first data processing task.

[0084] The following describes a specific implementation of mapping each second identifier in the second set of identifiers to a simple hash table using a plurality of hash functions in S102. Specifically, the following steps (b1) to (b3) can be used to achieve this: Step (b1): For each second identifier in the second set of identifiers, obtain the low M bits and the high N bits of the second identifier.

[0085] The second identifier is an identifier of M+N bits.

[0086] Step (b2): For each hash function in the plurality of hash functions, calculate a first hash value of the low M bits of the second identifier using the hash function.

[0087] Step (b3): Store the low M bits of the second identifier in the form of element 1 in the qth storage location of the third hash bucket with the first bucket number.

[0088] The first bucket number is the exclusive OR of the high N bits of the second identifier and the first hash value.

[0089] In one possible implementation, the first participant is configured to: map each first identifier in the first set of identifiers to a cuckoo hash table using a plurality of hash functions; wherein the cuckoo hash table includes K first hash buckets, and each first hash bucket contains 2 MOne first storage location, one first storage location is used to store the first identifier 2 M For a single-hot encoded bit, 0 is stored in the K storage locations in the first hash bucket that are not mapped. The first tensor, composed of the elements of the Cuckoo Hash Table, is decomposed into the tensor product of two low-dimensional tensors. For each column element in the two low-dimensional tensors, homomorphic encryption is performed on the single instruction multiple data (SIMD) code of that column element to obtain the first ciphertext.

[0090] In one possible implementation, S203 above can generate the second ciphertext based on the SIMD code of each column element in the second tensor and all the first ciphertexts using the following equation:

[0091] in, This is the second ciphertext; For the second tensor SIMD code of column element; The first low-dimensional tensor j The first ciphertext corresponding to the column element; The second low-dimensional tensor i The first ciphertext corresponding to the column elements; the first tensor is decomposed into the tensor product of the first low-dimensional tensor and the second low-dimensional tensor; Let be the number of columns of the first low-dimensional tensor and the second low-dimensional tensor, and .

[0092] In one possible implementation, the first participant is further configured to perform weighted code encoding on the two low-dimensional tensors respectively before homomorphically encrypting the single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain a third tensor and a fourth tensor. The first participant performs homomorphic encryption on the SIMD code of each column element in the third and fourth tensors to obtain the first ciphertext. The second ciphertext is generated based on the SIMD code of each column element in the second tensor and all the first ciphertexts. It can include: For each first ciphertext, the weighted code is used to decode the first ciphertext to obtain the third ciphertext; The second ciphertext is generated based on the SIMD codes of each column element in the second tensor and all the third ciphertexts.

[0093] The specific implementation of each step in the data processing method for secure computing applied to a second participant according to the embodiments of this disclosure has been described in detail in the data processing method for secure computing applied to a first participant according to the embodiments of this disclosure, and will not be repeated here.

[0094] Figure 3 is a data processing apparatus block diagram for secure computation applied to a first participant according to an exemplary embodiment. Wherein, the participants of the secure computation include a first participant and a second participant, the first participant holds a first set of identities, and the second participant holds a second set of identities, as Figure 3 As shown, the data processing apparatus 300 for secure computation applied to the first participant includes: A first mapping module 301, configured to map each first identity in the first set of identities into a cuckoo hash table by using a plurality of hash functions; A tensor integral decomposition module 302, configured to decompose a first tensor composed of each element in the cuckoo hash table into a tensor product of two low-dimensional tensors; An encryption module 303, configured to homomorphically encrypt a single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain a first ciphertext; A sending module 304, configured to send all the first ciphertexts to the second participant; wherein the second participant is configured to generate a second ciphertext according to the second set of identities, the plurality of hash functions, and all the first ciphertexts, and send the second ciphertext to the first participant; A determination module 305, configured to determine an intersection of the first set of identities and the second set of identities according to the second ciphertext in response to receiving the second ciphertext sent by the second participant; An execution module 306, configured to perform a first data processing task based on the intersection.

[0095] In the above technical solution, the participants in secure computation include a first participant and a second participant. The first participant holds a first identifier set, and the second participant holds a second identifier set. The first participant uses multiple hash functions to map each first identifier in the first identifier set to a cuckoo hash table. Then, the first participant decomposes the first tensor formed by each element in the cuckoo hash table into the tensor product of two low-dimensional tensors. Next, for each column element in the two low-dimensional tensors, the first participant performs homomorphic encryption on the single instruction multiple data (SIMD) code of that column element to obtain a first ciphertext, and sends all the first ciphertexts to the second participant. After receiving the multiple first ciphertexts sent by the first participant, the second participant generates a second ciphertext based on the second identifier set, multiple hash functions, and all the first ciphertexts, and sends the second ciphertext to the first participant. After receiving the second ciphertext sent by the second participant, the first participant determines the intersection of the first identifier set and the second identifier set based on the second ciphertext. Then, the first participant executes a first data processing task based on the intersection. Before generating the ciphertext, the first participant first uses tensor integration to decompose the high-dimensional first tensor into the tensor product of two low-dimensional tensors. This reduces the number of ciphertexts generated, thereby reducing the amount of communication between the first and second participants and improving the processing efficiency of the first data processing task.

[0096] Optionally, the cuckoo hash table includes K first hash buckets, each containing 2... M A first storage location, wherein one of the first storage locations is used to store the first identifier 2 M One bit of the one-hot encoding of the bit, where the storage locations in the K first hash buckets that are not mapped are stored as 0, where K and M are both integers greater than 1; The determining module 305 includes: The decryption submodule is used to perform homomorphic decryption on the second ciphertext; The SIMD decoding submodule is used to perform SIMD decoding on the decryption result to obtain the first column vector; The determination submodule is used to determine the intersection based on the position information of element 1 in the first column vector.

[0097] Optionally, the determining submodule is used to determine the first identifier corresponding to the one-hot code stored in the second hash bucket as the intersection; wherein, the second hash bucket is the first hash bucket whose bucket number is the row number of the row where element 1 in the first column vector is located.

[0098] Optionally, the data processing apparatus 300 for secure computing applied to the first participant further includes: The weighted code encoding module is used to perform weighted code encoding on the two low-dimensional tensors respectively before the encryption module 303 performs homomorphic encryption on the single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain the first ciphertext, so as to obtain the third tensor and the fourth tensor. The encryption module 303 is used to perform homomorphic encryption on the SIMD code of each column element in the third tensor and the fourth tensor to obtain the first ciphertext; The second participant is used to perform weighted code decoding on each of the first ciphertexts to obtain the third ciphertext, and generate the second ciphertext based on the second identifier set, the plurality of hash functions and all the third ciphertexts.

[0099] Optionally, the cuckoo hash table includes K first hash buckets, each containing 2... M A first storage location, wherein one of the first storage locations is used to store the first identifier 2 M One bit of the one-hot encoding of the bit, where the storage locations in the K first hash buckets that are not mapped are stored as 0, where K and M are both integers greater than 1; The second participant is used for: The plurality of hash functions are used to map each second identifier in the second identifier set to a simple hash table; wherein, the simple hash table includes K third hash buckets, and the third hash buckets contain 2 M The second identifier is stored as an element 1 in the qth storage location of the corresponding third hash bucket, where q is the lower M bits of the second identifier, and the unmapped storage locations in the K third hash buckets are stored as 0. The second ciphertext is generated based on the SIMD code of each column element in the second tensor and all the first ciphertexts; wherein the second tensor is composed of the elements of the simple hash table.

[0100] Figure 4 This is a block diagram illustrating a data processing apparatus for secure computation applied to a second participant according to an exemplary embodiment. The participants in the secure computation include a first participant and a second participant, wherein the first participant holds a first set of identifiers, and the second participant holds a second set of identifiers, such as... Figure 4 As shown, the data processing apparatus 400 for secure computing applied to the second participant includes: The receiving module 401 is configured to receive a plurality of first ciphertexts sent by the first participant; wherein the first participant is configured to generate the plurality of first ciphertexts according to the first identifier set and a plurality of hash functions, and send the plurality of first ciphertexts to the second participant; The second mapping module 402 is configured to map each second identifier in the second identifier set into a simple hash table by using the plurality of hash functions. The generating module 403 is configured to generate second ciphertext according to the SIMD code of each column element in the second tensor and all the first ciphertext, and send the second ciphertext to the first participant; wherein the second tensor is composed of elements in the simple hash table, and the first participant is configured to determine the intersection of the first identifier set and the second identifier set according to the second ciphertext, and perform the first data processing task based on the intersection.

[0101] In the above technical solution, the participants of the secure computation include the first participant and the second participant, the first participant holds the first identifier set, and the second participant holds the second identifier set; the first participant maps each first identifier in the first identifier set into a cuckoo hash table by using a plurality of hash functions; then, the first participant decomposes a first tensor composed of elements in the cuckoo hash table into the tensor product of two low-dimensional tensors; next, the first participant homomorphically encrypts the single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain first ciphertext, and sends all the first ciphertext to the second participant; after receiving the plurality of first ciphertext sent by the first participant, the second participant generates second ciphertext according to the second identifier set, the plurality of hash functions and all the first ciphertext, and sends the second ciphertext to the first participant; after receiving the second ciphertext sent by the second participant, the first participant determines the intersection of the first identifier set and the second identifier set according to the second ciphertext, and then performs the first data processing task based on the intersection. Before generating the ciphertext, the first participant first decomposes the high-dimensional first tensor into the tensor product of two low-dimensional tensors by using tensor product decomposition, so as to reduce the number of ciphertexts, reduce the communication amount between the first participant and the second participant, and improve the processing efficiency of the first data processing task.

[0102] Optionally, the simple hash table includes K third hash buckets, the third hash bucket contains 2 M second storage locations, the second identifier is stored in the form of an element 1 into the qth storage location in the corresponding third hash bucket, q is the low M bits of the second identifier, and the storage locations in the K third hash buckets that are not mapped are filled with 0, K and M are integers greater than 1. The second mapping module 402 includes: The obtaining sub-module is configured to obtain the low M bits and the high N bits of each second identifier in the second identifier set, wherein the second identifier is an identifier with M+N bits. The calculation submodule is used to calculate the first hash value of the lower M bits of the second identifier for each of the plurality of hash functions; the storage submodule is used to store the lower M bits of the second identifier as element 1 in the qth storage location of the third hash bucket with the first bucket number; wherein, the first bucket number is the XOR result of the higher N bits of the second identifier and the first hash value.

[0103] Optionally, the simple hash table includes K third hash buckets, each containing 2... M The second identifier is stored as element 1 in the qth storage location of the corresponding third hash bucket, where q is the lower M bits of the second identifier. The unmapped storage locations in the K third hash buckets are stored as 0, where K and M are both integers greater than 1. The first participant is used for: The plurality of hash functions are used to map each first identifier in the first identifier set to a cuckoo hash table; wherein, the cuckoo hash table includes K first hash buckets, and each first hash bucket contains 2 M A first storage location, wherein one of the first storage locations is used to store the first identifier 2 M For each bit of the one-hot encoding of a bit, 0 is stored in the storage location in the K first hash buckets that is not mapped. The first tensor, composed of the elements of the cuckoo hash table, is decomposed into the tensor product of two low-dimensional tensors. For each column element in the two low-dimensional tensors, homomorphic encryption is performed on the single instruction multiple data (SIMD) code of that column element to obtain the first ciphertext.

[0104] Optionally, the generation module 403 is used to generate the second ciphertext based on the SIMD code of each column element in the second tensor and all the first ciphertext using the following formula:

[0105] in, This is the second ciphertext; For the second tensor, the first SIMD code of column element; The first low-dimensional tensor j The first ciphertext corresponding to the column element; The second low-dimensional tensor i The first ciphertext corresponding to the column elements; the first tensor is decomposed into the tensor product of the first low-dimensional tensor and the second low-dimensional tensor; Let be the number of columns of the first low-dimensional tensor and the second low-dimensional tensor, and .

[0106] Optionally, the first participant is further configured to perform weight code encoding on the two low-dimensional tensors respectively to obtain a third tensor and a fourth tensor before homomorphically encrypting the single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors. The first participant is configured to homomorphically encrypt the SIMD code of each column element in the third tensor and the fourth tensor to obtain the first ciphertext. The generation module 403 comprises: The weight code decoding submodule is configured to perform weight code decoding on each of the first ciphertexts to obtain a third ciphertext. The generation submodule is configured to generate the second ciphertext according to the SIMD code of each column element in the second tensor and all the third ciphertexts.

[0107] The present disclosure also provides a computer readable medium having stored thereon a computer program, which, when executed by a processing device, implements the steps of the above-described data processing method for secure computing applied to a first participant or the steps of the above-described data processing method for secure computing applied to a second participant.

[0108] The present disclosure also provides a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the above-described data processing method for secure computing applied to a first participant or the steps of the above-described data processing method for secure computing applied to a second participant.

[0109] Reference will be made to the following description Figure 5 which shows a structural schematic diagram of an electronic device (e.g., a terminal device or a server) 600 suitable for use in implementing embodiments of the present disclosure. The terminal device in embodiments of the present disclosure can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), and the like, as well as fixed terminal devices such as digital TVs, desktop computers, and the like. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functions and use range of embodiments of the present disclosure.

[0110] As Figure 5As shown, the electronic device 600 can include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601 that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or loaded into a random access memory (RAM) 603 from a storage device 608. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0111] Generally, the following devices can be connected to the I / O interface 605: input devices 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 608 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 609. The communication devices 609 can allow the electronic device 600 to communicate wirelessly or wired with other devices to exchange data. Although Figure 5 The electronic device 600 is shown with various devices, but it should be understood that all of the illustrated devices are not required to implement or have the electronic device. More or less devices can alternatively be implemented.

[0112] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices 609, or installed from the storage devices 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-described functions defined in the methods of embodiments of the present disclosure are performed.

[0113] It is noted that the aforementioned computer-readable medium of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium can be, for example and without limitation, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include a computer-readable program code transmitted by a computer-readable medium or a carrier wave in a baseband or as part of a carrier wave. Such a propagated computer-readable signal medium can take many forms, including but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. The computer-readable signal medium can also be any computer-readable medium that can be used to carry or store computer-readable program code except the computer-readable storage medium that can be distinguished from the computer-readable signal medium, which can be a computer-readable storage medium that can be used for program execution and interface with external devices. The program code contained in the computer-readable medium can be transmitted using any suitable medium, including but not limited to, a wire, cable, optical fiber, RF (radio frequency), or the like, or any suitable combination of the foregoing.

[0114] In some embodiments, the client, server, or both can communicate using any current known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current known or future developed networks.

[0115] The aforementioned computer-readable medium can be contained in the aforementioned electronic device; or can exist separately without being assembled into the electronic device.

[0116] The computer readable medium carries one or more programs, when the one or more programs are executed by the electronic device, the electronic device is caused to: map each first identifier in a first identifier set to a cuckoo hash table by using a plurality of hash functions; wherein the participants of secure computation include a first participant and a second participant, the first participant holds the first identifier set, and the second participant holds a second identifier set; decompose a first tensor formed by each element in the cuckoo hash table into a tensor product of two low-dimensional tensors; for each column element in the two low-dimensional tensors, homomorphically encrypt a single instruction multiple data (SIMD) code of the column element to obtain a first ciphertext; send all the first ciphertexts to the second participant; wherein the second participant is configured to generate a second ciphertext according to the second identifier set, the plurality of hash functions, and all the first ciphertexts, and send the second ciphertext to the first participant; in response to receiving the second ciphertext sent by the second participant, determine an intersection of the first identifier set and the second identifier set according to the second ciphertext; and perform a first data processing task based on the intersection.

[0117] Alternatively, the computer readable medium carries one or more programs, when the one or more programs are executed by the electronic device, the electronic device is caused to: receive a plurality of first ciphertexts sent by a first participant; wherein the first participant is configured to generate the plurality of first ciphertexts according to a first identifier set and a plurality of hash functions, and send the plurality of first ciphertexts to the second participant, wherein the participants of secure computation include the first participant and a second participant, the first participant holds the first identifier set, and the second participant holds a second identifier set; map each second identifier in the second identifier set to a simple hash table by using the plurality of hash functions; generate a second ciphertext according to a SIMD code of each column element in a second tensor and all the first ciphertexts, and send the second ciphertext to the first participant; wherein the second tensor is formed by each element in the simple hash table, and the first participant is configured to determine an intersection of the first identifier set and the second identifier set according to the second ciphertext, and perform a first data processing task based on the intersection.

[0118] Computer program code for carrying out operations of the present disclosure can be written in any one or more programming languages or combinations of languages including object or visual programming languages specifically, assembly language, C, C++, Java, Smalltalk, or the like. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0119] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may

[0120] The modules involved in the embodiments of the present disclosure can be implemented in the form of software or in the form of hardware. Among them, the name of the module does not constitute a limitation to the module itself in some cases. For example, the first mapping module can also be described as a module that maps each first identifier in the first identifier set to the cuckoo hash table by using a plurality of hash functions.

[0121] The functions described above in the present disclosure can be performed at least in part by one or more hardware logic components. For example, non-limiting example types of hardware logic components that can be used include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SOCs), complex programmable logic devices (CPLDs), etc.

[0122] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0123] According to one or more embodiments of the present disclosure, example 1 provides a data processing method for secure computation, participants of the secure computation include a first participant and a second participant, the first participant holds a first set of identifiers, the second participant holds a second set of identifiers, the method is applied to the first participant, and includes: mapping each first identifier in the first set of identifiers to a cuckoo hash table using a plurality of hash functions; decomposing a first tensor formed by elements in the cuckoo hash table into a tensor product of two low-dimensional tensors; homomorphically encrypting a single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain a first ciphertext; sending all the first ciphertexts to the second participant; wherein the second participant is configured to generate a second ciphertext according to the second set of identifiers, the plurality of hash functions, and all the first ciphertexts, and send the second ciphertext to the first participant; in response to receiving the second ciphertext sent by the second participant, determining an intersection of the first set of identifiers and the second set of identifiers according to the second ciphertext; performing a first data processing task based on the intersection.

[0124] According to one or more embodiments of the present disclosure, example 2 provides the method of example 1, the cuckoo hash table includes K first hash buckets, the first hash bucket contains 2 M storage locations, one of the 2 M storage locations is used to store one bit of the 2-bit one-hot encoding of the first identifier, the storage locations not mapped in the K first hash buckets are stored as 0, K and M are integers greater than 1; The determining the intersection of the first identifier set and the second identifier set according to the second ciphertext comprises: homomorphically decrypting the second ciphertext; SIMD decoding the decryption result to obtain a first column vector; determining the intersection according to position information of element 1 in the first column vector.

[0125] According to one or more embodiments of the present disclosure, example 3 provides the method of example 2, and the determining the intersection according to the position information of element 1 in the first column vector comprises: determining the first identifier corresponding to the one-hot encoding stored in a second hash bucket as the intersection; wherein the second hash bucket is the first hash bucket with a bucket number being a row number of a row in which element 1 in the first column vector is located.

[0126] According to one or more embodiments of the present disclosure, example 4 provides the method of example 1, and before the homomorphically encrypting the single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain the first ciphertext, the method further comprises: performing weight code encoding on the two low-dimensional tensors respectively to obtain a third tensor and a fourth tensor; the homomorphically encrypting the single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain the first ciphertext comprises: homomorphically encrypting the SIMD code of each column element in the third tensor and the fourth tensor to obtain the first ciphertext; wherein the second participant is configured to perform weight code decoding on each of the first ciphertexts to obtain a third ciphertext, and generate the second ciphertext according to the second identifier set, the plurality of hash functions, and all the third ciphertexts.

[0127] According to one or more embodiments of the present disclosure, example 5 provides the method of example 1, and the cuckoo hash table comprises K first hash buckets, each of the first hash buckets contains 2 M first storage positions, one of the first storage positions is used to store one bit of the one-hot encoding of the 2 M bit first identifier, and the storage positions in the K first hash buckets that are not mapped are stored as 0, K and M are integers greater than 1. The second participant is configured to: map each second identifier in the second identifier set to a simple hash table using the plurality of hash functions; wherein the simple hash table comprises K third hash buckets, each of the third hash buckets contains 2 Ma second storage location, the second identifier is stored into a qth storage location in a corresponding third hash bucket in the form of element 1, q is a low M bit of the second identifier, and a storage location in the K third hash buckets that is not mapped is stored as 0; generate the second ciphertext according to a SIMD code of each column element in the second tensor and all the first ciphertexts; wherein the second tensor is composed of elements in the simple hash table.

[0128] According to one or more embodiments of the present disclosure, example 6 provides a data processing method for secure computation, participants of the secure computation include a first participant and a second participant, the first participant holds a first identifier set, the second participant holds a second identifier set, the method is applied to the second participant, and includes: receive a plurality of first ciphertexts sent by the first participant; wherein the first participant is configured to generate the plurality of first ciphertexts according to the first identifier set and a plurality of hash functions, and send the plurality of first ciphertexts to the second participant; map each second identifier in the second identifier set to a simple hash table by using the plurality of hash functions; generate a second ciphertext according to a SIMD code of each column element in the second tensor and all the first ciphertexts, and send the second ciphertext to the first participant; wherein the second tensor is composed of elements in the simple hash table, and the first participant is configured to determine an intersection of the first identifier set and the second identifier set according to the second ciphertext, and perform a first data processing task based on the intersection.

[0129] According to one or more embodiments of the present disclosure, example 7 provides the method of example 6, the simple hash table includes K third hash buckets, the third hash bucket contains 2 M a second storage location, the second identifier is stored into a qth storage location in a corresponding third hash bucket in the form of element 1, q is a low M bit of the second identifier, and a storage location in the K third hash buckets that is not mapped is stored as 0, K and M are both integers greater than 1; The mapping each second identifier in the second identifier set to the simple hash table by using the plurality of hash functions includes: For each second identifier in the second identifier set, obtain a low M bit and a high N bit of the second identifier, wherein the second identifier is an identifier with M+N bits; For each of the plurality of hash functions, a first hash value of the lower M bits of the second identifier is calculated using the hash function; the lower M bits of the second identifier are stored as element 1 in the qth storage location of the third hash bucket with the first bucket number; wherein, the first bucket number is the XOR result of the higher N bits of the second identifier and the first hash value.

[0130] According to one or more embodiments of this disclosure, Example 8 provides the method of Example 6, wherein the simple hash table includes K third hash buckets, the third hash buckets containing 2 M The second identifier is stored as element 1 in the qth storage location of the corresponding third hash bucket, where q is the lower M bits of the second identifier. The unmapped storage locations in the K third hash buckets are stored as 0, where K and M are both integers greater than 1. The first participant is used for: The plurality of hash functions are used to map each first identifier in the first identifier set to a cuckoo hash table; wherein, the cuckoo hash table includes K first hash buckets, and each first hash bucket contains 2 M A first storage location, wherein one of the first storage locations is used to store the first identifier 2 M For each bit of the one-hot encoding of a bit, 0 is stored in the storage location in the K first hash buckets that is not mapped. The first tensor, composed of the elements of the cuckoo hash table, is decomposed into the tensor product of two low-dimensional tensors. For each column element in the two low-dimensional tensors, homomorphic encryption is performed on the single instruction multiple data (SIMD) code of that column element to obtain the first ciphertext.

[0131] According to one or more embodiments of this disclosure, Example 9 provides the method of Example 8, wherein generating the second ciphertext based on the SIMD code of each column element in the second tensor and all the first ciphertext includes: The second ciphertext is generated using the SIMD code of each column element in the second tensor and all of the first ciphertext, according to the following formula:

[0132] in, This is the second ciphertext; For the second tensor, the first SIMD code of column element; The first low-dimensional tensor j The first ciphertext corresponding to the column element; The second low-dimensional tensor ithe first ciphertext corresponding to the column element; the first tensor is decomposed into a form of a tensor product of the first low-dimensional tensor and the second low-dimensional tensor; the number of columns of the first low-dimensional tensor and the second low-dimensional tensor, and .

[0133] According to one or more embodiments of the present disclosure, example 10 provides the method of example 8, wherein the first participant is further configured to perform weight code encoding on the two low-dimensional tensors respectively to obtain a third tensor and a fourth tensor before homomorphically encrypting the single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors; The first participant is configured to homomorphically encrypt the SIMD code of each column element in the third tensor and the fourth tensor to obtain the first ciphertext; The second ciphertext is generated according to the SIMD code of each column element in the second tensor and all the first ciphertexts, including: performing weight code decoding on each of the first ciphertexts to obtain a third ciphertext; generating the second ciphertext according to the SIMD code of each column element in the second tensor and all the third ciphertexts.

[0134] According to one or more embodiments of the present disclosure, example 11 provides a data processing apparatus for secure computation, wherein participants of the secure computation include a first participant and a second participant, the first participant holds a first set of identifiers, and the second participant holds a second set of identifiers, and the apparatus is applied to the first participant and includes: A first mapping module is configured to map each first identifier in the first set of identifiers to a cuckoo hash table using a plurality of hash functions; A tensor product decomposition module is configured to decompose a first tensor composed of each element in the cuckoo hash table into a form of a tensor product of two low-dimensional tensors; An encryption module is configured to homomorphically encrypt a single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain a first ciphertext; A sending module is configured to send all the first ciphertexts to the second participant, wherein the second participant is configured to generate a second ciphertext according to the second set of identifiers, the plurality of hash functions, and all the first ciphertexts, and send the second ciphertext to the first participant; A determination module is configured to determine an intersection of the first set of identifiers and the second set of identifiers according to the second ciphertext in response to receiving the second ciphertext sent by the second participant; An execution module is configured to perform a first data processing task based on the intersection.

[0135] According to one or more embodiments of the present disclosure, example 12 provides a data processing apparatus for secure computation, participants of the secure computation include a first participant and a second participant, the first participant holds a first set of identities, the second participant holds a second set of identities, the apparatus is applied to the second participant, and includes: a receiving module configured to receive a plurality of first ciphertexts sent by the first participant; wherein the first participant is configured to generate the plurality of first ciphertexts according to the first set of identities and a plurality of hash functions, and send the plurality of first ciphertexts to the second participant; a second mapping module configured to map each second identity in the second set of identities to a simple hash table using the plurality of hash functions; a generating module configured to generate a second ciphertext according to a SIMD code of each column element in a second tensor and all the first ciphertexts, and send the second ciphertext to the first participant; wherein the second tensor is composed of each element in the simple hash table, and the first participant is configured to determine an intersection of the first set of identities and the second set of identities according to the second ciphertext, and perform a first data processing task based on the intersection.

[0136] According to one or more embodiments of the present disclosure, example 13 provides a computer readable medium having stored thereon a computer program, which, when executed by a processing apparatus, implements the steps of the method of any one of examples 1-10.

[0137] According to one or more embodiments of the present disclosure, example 14 provides an electronic device, including: a storage apparatus having stored thereon a computer program; a processing apparatus configured to execute the computer program in the storage apparatus to implement the steps of the method of any one of examples 1-10.

[0138] According to one or more embodiments of the present disclosure, example 15 provides a computer program product including a computer program, which, when executed by a processor, implements the steps of the method of any one of examples 1-10.

[0139] The above description is merely preferred embodiments of the present disclosure and a description of the principles of the technology employed. It will be understood by those skilled in the art that the scope of the disclosure involved is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above technical features can be replaced with technical features disclosed in the present disclosure (but not limited to) having similar functions to form technical solutions.

[0140] Further, although operations are depicted in a particular order, this should not be understood as requiring the operations to be performed in the particular order shown or in sequential order, and that certain features of the disclosure can be combined in a single implementation. Similarly, while operations are depicted as being performed by a single entity, operations can be performed by a single entity or multiple entities. Additionally, although several specific implementation details are included throughout the specification, these should not be construed as limitations on the scope of the disclosure, but rather as examples of specific implementations. Certain features described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub-combination.

[0141] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With respect to the devices in the above-described embodiments, the specific manner in which the various modules perform operations has been described in detail in the embodiments relating to the method, and will not be described in detail here.

Claims

1. A data processing method for secure computation, participants of the secure computation comprising a first participant and a second participant, the first participant holding a first set of identities, the second participant holding a second set of identities, characterized in that, The method is applied to the first participant, and comprises: mapping each first identifier in the first identifier set to a cuckoo hash table by using a plurality of hash functions; decomposing a first tensor formed by elements in the cuckoo hash table into a tensor product of two low-dimensional tensors; homomorphically encrypting a single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain first ciphertexts; sending all the first ciphertexts to the second participant; wherein the second participant is configured to generate second ciphertexts according to the second identifier set, the plurality of hash functions and all the first ciphertexts, and send the second ciphertexts to the first participant; in response to receiving the second ciphertexts sent by the second participant, determining an intersection of the first identifier set and the second identifier set according to the second ciphertexts; and performing a first data processing task based on the intersection.

2. The method of claim 1, wherein, The cuckoo hash table comprises K first hash buckets, the first hash buckets contain 2 M M first storage locations, one of the first storage locations is used to store one bit of the 2 M bit one-hot encoding of the first identifier, the storage locations in the K first hash buckets that are not mapped to are stored as 0, K and M are both integers greater than 1; The method further comprises: homomorphically decrypting the second ciphertexts; SIMD decoding the decryption results to obtain a first column vector; determining the intersection according to position information of element 1 in the first column vector.

3. The method of claim 2, wherein, The method further comprises: determining the first identifier corresponding to the one-hot encoding stored in a second hash bucket as the intersection; wherein the second hash bucket is the first hash bucket with a bucket number equal to a row number of a row in which element 1 in the first column vector is located.

4. The method of claim 1, wherein, Before the step of homomorphically encrypting the SIMD code of each column element in the two low-dimensional tensors to obtain the first ciphertexts, the method further comprises: performing weight code encoding on the two low-dimensional tensors to obtain a third tensor and a fourth tensor. The method further comprises: homomorphically encrypting the SIMD code of each column element in the third tensor and the fourth tensor to obtain the first ciphertexts. The second participant is configured to perform weight code decoding on each first ciphertext to obtain third ciphertexts, and generate the second ciphertexts according to the second identifier set, the plurality of hash functions and all the third ciphertexts.

5. The method of claim 1, wherein, The cuckoo hash table comprises K first hash buckets, the first hash buckets contain 2 M M first storage locations, one of the first storage locations is used to store one bit of the 2 M bit one-hot encoding of the first identifier, the storage locations in the K first hash buckets that are not mapped to are stored as 0, K and M are both integers greater than 1. The second participant is configured to: mapping each second identity in the second identity set to a simple hash table using the plurality of hash functions; wherein the simple hash table comprises K third hash buckets, the third hash buckets containing 2 M second storage locations, the second identity being stored in the form of an element 1 into a qth storage location in a corresponding third hash bucket, q being the lower M bits of the second identity, the storage locations in the K third hash buckets that are not mapped to being filled with 0. generate the second ciphertexts according to the SIMD code of each column element in a second tensor and all the first ciphertexts; wherein the second tensor is formed by elements in the simple hash table.

6. A data processing method for secure computation, participants of the secure computation comprising a first participant and a second participant, the first participant holding a first set of identities, the second participant holding a second set of identities, characterized in that, The method is applied to the second participant, and comprises: receiving a plurality of first ciphertexts sent by the first participant; wherein the first participant is configured to generate the plurality of first ciphertexts according to the first identifier set and a plurality of hash functions, and send the plurality of first ciphertexts to the second participant; mapping each second identifier in the second identifier set to a simple hash table by using the plurality of hash functions; and performing weight code decoding on each first ciphertext to obtain third ciphertexts, and generating the second ciphertexts according to the second identifier set, the plurality of hash functions and all the third ciphertexts. generate a second ciphertext according to the SIMD code of each column element in a second tensor and all the first ciphertexts, and send the second ciphertext to the first participant; wherein the second tensor is composed of elements in the simple hash table, and the first participant is configured to determine an intersection of the first identity set and the second identity set according to the second ciphertext, and perform a first data processing task based on the intersection.

7. The method of claim 6, wherein, The simple hash table includes K third hash buckets, the third hash buckets contain 2 M second storage locations, the second identification is stored into the qth storage location in the corresponding third hash bucket in the form of element 1, q is the low M bits of the second identification, the storage locations in the K third hash buckets that are not mapped are filled with 0, K and M are both integers greater than 1. The mapping of each second identity in the second identity set into the simple hash table by using the plurality of hash functions comprises: For each second identity in the second identity set, obtaining a low M-bit and a high N-bit of the second identity, wherein the second identity is an M+N-bit identity; For each hash function in the plurality of hash functions, calculating a first hash value of the low M-bit of the second identity by using the hash function, and storing the low M-bit of the second identity into a qth storage position in a third hash bucket with a first bucket number in the form of an element 1, wherein the first bucket number is an exclusive or result of the high N-bit of the second identity and the first hash value.

8. The method of claim 6, wherein, The simple hash table includes K third hash buckets, the third hash buckets contain 2 M second storage locations, the second identification is stored into the qth storage location in the corresponding third hash bucket in the form of element 1, q is the low M bits of the second identification, the storage locations in the K third hash buckets that are not mapped are filled with 0, K and M are both integers greater than 1. The first participant is configured to: mapping each first identifier in the first identifier set to a cuckoo hash table using the plurality of hash functions; wherein the cuckoo hash table comprises K first hash buckets, each first hash bucket containing 2 M M first storage locations, one of the first storage locations being used to store one bit of a 2 M bit one-hot encoding of the first identifier, and the storage locations in the K first hash buckets that are not mapped to store 0. decompose a first tensor composed of elements in the cuckoo hash table into a tensor product of two low-dimensional tensors; homomorphically encrypt a single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain the first ciphertext.

9. The method of claim 8, wherein, The generation of the second ciphertext according to the SIMD code of each column element in the second tensor and all the first ciphertexts comprises: The generation of the second ciphertext according to the SIMD code of each column element in the second tensor and all the first ciphertexts comprises: wherein, is the second ciphertext; is the SIMD code of the j-th column element in the second tensor; is the first ciphertext corresponding to the i-th column element of the first low-dimensional tensor; j is the first ciphertext corresponding to the i-th column element of the second low-dimensional tensor; the first tensor is decomposed into the tensor product of the first low-dimensional tensor and the second low-dimensional tensor; i is the number of columns of the first low-dimensional tensor and the second low-dimensional tensor, and .​​​ 10. The method of claim 8, wherein, The first participant is further configured to perform weight code encoding on the two low-dimensional tensors respectively before the homomorphic encryption of the SIMD code of each column element in the two low-dimensional tensors, to obtain a third tensor and a fourth tensor; The first participant is configured to homomorphically encrypt the SIMD code of each column element in the third tensor and the fourth tensor to obtain the first ciphertext; The generation of the second ciphertext according to the SIMD code of each column element in the second tensor and all the first ciphertexts comprises: For each first ciphertext, performing weight code decoding on the first ciphertext to obtain a third ciphertext; The generation of the second ciphertext according to the SIMD code of each column element in the second tensor and all the third ciphertexts.

11. A data processing apparatus for secure computation, participants of the secure computation comprising a first participant and a second participant, the first participant holding a first set of identities, the second participant holding a second set of identities, characterized in that, The apparatus applied to the first participant comprises: a first mapping module configured to map each first identity in the first identity set into a cuckoo hash table by using a plurality of hash functions; a tensor product decomposition module configured to decompose a first tensor composed of elements in the cuckoo hash table into a tensor product of two low-dimensional tensors; an encryption module configured to homomorphically encrypt a single instruction multiple data (SIMD) code of each column element in the two low-dimensional tensors to obtain the first ciphertext. a sending module, configured to send all the first ciphertexts to the second participant; wherein the second participant is configured to generate a second ciphertext according to the second set of identifiers, the plurality of hash functions and all the first ciphertexts, and send the second ciphertext to the first participant; a determining module, configured to determine an intersection of the first set of identifiers and the second set of identifiers according to the second ciphertext in response to receiving the second ciphertext sent by the second participant; an executing module, configured to execute a first data processing task based on the intersection.

12. A data processing apparatus for secure computation, participants of the secure computation comprising a first participant and a second participant, the first participant holding a first set of identities, the second participant holding a second set of identities, characterized in that, The apparatus is applied to the second participant, and includes: a receiving module, configured to receive a plurality of first ciphertexts sent by the first participant; wherein the first participant is configured to generate the plurality of first ciphertexts according to the first set of identifiers and a plurality of hash functions, and send the plurality of first ciphertexts to the second participant; a second mapping module, configured to map each second identifier in the second set of identifiers to a simple hash table by using the plurality of hash functions; a generating module, configured to generate a second ciphertext according to a SIMD code of each column element in a second tensor and all the first ciphertexts, and send the second ciphertext to the first participant; wherein the second tensor is composed of elements in the simple hash table, and the first participant is configured to determine an intersection of the first set of identifiers and the second set of identifiers according to the second ciphertext, and execute a first data processing task based on the intersection.

13. A computer readable medium having stored thereon a computer program, characterized in that The computer program is executed by the processing apparatus to implement the steps of the method in any one of claims 1-10.

14. An electronic device, comprising: comprising: a storage device having stored thereon a computer program; a processing device configured to execute the computer program in the storage device to implement the steps of the method in any one of claims 1-10.

15. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1-10. comprising: a storage device having stored thereon a computer program; a processing device configured to execute the computer program in the storage device to implement the steps of the method in any one of claims 1-10. The computer program is executed by the processor to implement the steps of the method in any one of claims 1-10.

Citation Information

Patent Citations

  • Privacy protection method and system based on big data security and privacy calculation

    CN119128960A

  • Safe non-interactive comparison method and device for multi-party set intersection

    CN119519933A

  • Intelligent factory model data set security privacy protection method and device, equipment and medium

    CN120257345A

  • Data encryption communication method and system applied to intelligent cash register

    CN120281573A

  • Data tracing method, system and equipment based on big data analysis

    CN120354268A