Privacy set intersection sharing method and device based on symmetric key protocol
By using the shared master key to encrypt and calculate the data set in a trusted execution environment, the problem of failure to encrypt the intersection result in the existing technology is solved, and data alignment and secret sharing can be completed without leaking the intersection. The privacy and transmission efficiency of private collections are ensured.
Patent Information
- Application Number
- CN202410771289.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-10-01
AI Technical Summary
Existing privacy set intersection calculation technology fails to encrypt and subsequently calculate the intersection results while ensuring the privacy of private sets, resulting in the inability to complete data alignment and secret data sharing without leaking the intersection.
By establishing a shared master key in a trusted execution environment, the data collection of participating parties is encrypted, and the collection intersection is calculated without leaking the intersection to complete data alignment and secret sharing.
It achieves data alignment and secret data sharing without leaking intersections, ensuring the privacy of private collections, reducing communication overhead, and improving transmission efficiency.
Smart Images

Figure CN118734355A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer data security technology, and in particular to a privacy set intersection sharing method and device based on a symmetric key protocol. Background Art
[0002] Sharing data from multiple institutions and exploring the potential value contained therein has become an objective need in the era of big data. The existing centralized data processing methods can no longer meet users' needs for privacy protection. Therefore, privacy computing technology has emerged and has become the mainstream means of data protection. When data is scattered among multiple parties, the data needs to be aligned before calculation and subsequent processing. In particular, private set intersection calculation (PSI) has emerged. There are many related documents in the field of private set intersection calculation. However, the related documents use different technical methods to realize the intersection calculation under the premise of ensuring the privacy of private sets, but none of them consider the scenario of encrypting the intersection result and performing subsequent calculations.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0004] In view of this, the embodiments of the present application at least provide a privacy set intersection sharing method and device based on a symmetric key protocol, which can complete data alignment and data secret sharing without leaking the intersection.
[0005] This application mainly includes the following aspects:
[0006] In a first aspect, an embodiment of the present application provides a privacy set intersection sharing method based on a symmetric key protocol, the method comprising:
[0007] Initialize a first data set held by a first participant and a second data set held by a second participant;
[0008] Establishing a shared master key through a trusted execution environment end and the second participating end; the trusted execution environment end is used to represent an execution area end of an independent processing environment that can provide security and integrity protection;
[0009] The second participant terminal encrypts the second data set using the shared master key, and sends the encrypted second encrypted set to the first participant terminal;
[0010] The first participant terminal instructs the trusted execution environment terminal to encrypt the first data set using the shared master key, and the trusted execution environment terminal sends the first encrypted set obtained after encryption to the first participant terminal;
[0011] The first participant calculates a set intersection based on the first encrypted set and the second encrypted set, and performs data alignment on the set intersection;
[0012] The set intersection after completing data alignment is encrypted by the trusted execution environment and then shared with the first participant end and the second participant end.
[0013] In a second aspect, an embodiment of the present application further provides a privacy set intersection sharing device based on a symmetric key protocol, the device comprising:
[0014] An initialization module, used to initialize a first data set held by a first participant terminal and a second data set held by a second participant terminal;
[0015] A key establishment module, used to establish a shared master key through a trusted execution environment end and the second participating end; the trusted execution environment end is used to represent an execution area end of an independent processing environment that can provide security and integrity protection;
[0016] A first encryption module, configured for the second participant to encrypt the second data set using the shared master key, and send the encrypted second encrypted set to the first participant;
[0017] a second encryption module, configured for the first participant to instruct the trusted execution environment to encrypt the first data set using the shared master key, and the trusted execution environment to send the encrypted first encrypted set to the first participant;
[0018] An intersection calculation module, configured for the first participant to calculate a set intersection based on the first encrypted set and the second encrypted set, and to perform data alignment on the set intersection;
[0019] A sharing module is used to encrypt the set intersection after completing data alignment through the trusted execution environment end and then share it with the first participating end and the second participating end.
[0020] In the third aspect, an embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the privacy set intersection sharing method based on the symmetric key protocol described in the first aspect or any possible implementation scheme of the first aspect.
[0021] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the privacy set intersection sharing method based on a symmetric key protocol described in the above-mentioned first aspect or any possible implementation scheme of the first aspect are executed.
[0022] The privacy set intersection sharing method and device based on the symmetric key protocol provided in the embodiment of the present application encrypts the second data set to obtain the second encrypted set by using the shared master key established by the trusted execution environment end and the second participant end; the first participant end instructs the trusted execution environment end to encrypt the first data set by using the shared master key, and the trusted execution environment end sends the encrypted first encrypted set to the first participant end; the first participant end calculates the set intersection based on the first encrypted set and the second encrypted set, and performs data alignment on the set intersection; the trusted execution environment end encrypts the set intersection after completing the data alignment and shares it with the first participant end and the second participant end. Compared with the related art that uses different technical methods to realize the intersection calculation under the premise of ensuring the privacy of private sets, but does not consider the scenario of encrypting the intersection result and performing subsequent calculations, the embodiment of the present application can complete data alignment and data secret sharing without leaking the intersection while ensuring the privacy of private sets. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 A flowchart of a privacy set intersection sharing method based on a symmetric key protocol provided in an embodiment of the present application is shown;
[0025] Figure 2 One of the functional module diagrams of a privacy set intersection sharing device based on a symmetric key protocol provided in an embodiment of the present application is shown;
[0026] Figure 3 The second functional module diagram of a privacy set intersection sharing device based on a symmetric key protocol provided in an embodiment of the present application is shown;
[0027] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art, under the guidance of the content of the present application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
[0029] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0030] In order to enable those skilled in the art to use the contents of this application, the following implementation methods are provided in combination with the specific application scenario "computer data communication security". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application.
[0031] The following methods, devices, electronic devices or computer-readable storage media of the embodiments of the present application can be applied to any scenario requiring computer data communication security. The embodiments of the present application are not limited to specific application scenarios. Any scheme using the privacy set intersection sharing method and device based on the symmetric key protocol provided by the embodiments of the present application is within the protection scope of the present application.
[0032] It is worth noting that before this application was filed, sharing data from multiple institutions and exploring the potential value contained therein has become an objective need in the big data era. The existing centralized data processing method can no longer meet users' needs for privacy protection. Therefore, privacy computing technology came into being and has become the current mainstream means of data protection. When data is scattered among multiple parties, the data needs to be aligned before calculation and subsequent processing. In particular, privacy set intersection calculation has emerged, and there are many related documents in the field of privacy set intersection calculation. However, the relevant documents use different technical methods to realize intersection calculation under the premise of ensuring the privacy of private sets, but none of them consider the scenario of encrypting the intersection results and performing subsequent calculations.
[0033] In response to the above problems, the embodiment of the present application encrypts the second data set to obtain the second encrypted set by using the shared master key established by the trusted execution environment end and the second participant end; the first participant end instructs the trusted execution environment end to encrypt the first data set by using the shared master key, and the trusted execution environment end sends the encrypted first encrypted set to the first participant end; the first participant end calculates the intersection of the sets based on the first encrypted set and the second encrypted set, and performs data alignment on the intersection of the sets; the trusted execution environment end encrypts the intersection of the sets that completes the data alignment and shares it with the first participant end and the second participant end. In this way, the embodiment of the present application can complete data alignment and data secret sharing without leaking the intersection while ensuring the privacy of the private set under the premise of calculating the intersection.
[0034] To facilitate the understanding of the present application, the technical solution provided by the present application is described in detail below in conjunction with specific embodiments.
[0035] Figure 1 The flowchart of a privacy set intersection sharing method based on a symmetric key protocol provided in an embodiment of the present application. Figure 1 As shown, the privacy set intersection sharing method based on the symmetric key protocol provided in the embodiment of the present application includes the following steps:
[0036] S101: Initialize a first data set held by a first participant and a second data set held by a second participant.
[0037] In a specific implementation, there may be at least two participants, such as a first participant terminal P 0 and the second participant P 1 .
[0038] Exemplarily, the first participant terminal P 0 The first data set held can be N tuples and the second participant terminal P 1 The second data set held can be M tuples
[0039] Among them, N>>M, N and M are both positive integers, Represents the set of congruence classes modulo q, where q is a prime number.
[0040] S102: Establish a shared master key through the trusted execution environment end and the second participating end.
[0041] The trusted execution environment end is used to represent an execution area end of an independent processing environment that can provide security and integrity protection.
[0042] In the specific implementation, through the trusted execution environment end TEE and the second participating end P 1 Establish a shared master key mk.
[0043] Here, the Trusted Execution Environment (TEE) provided in the embodiment of the present application is an execution area end of an independent processing environment with computing and storage functions that can provide security and integrity protection. The basic idea is: in the hardware, an isolated memory is allocated separately for sensitive data, and all calculations of sensitive data are performed in this memory, and except for authorized interfaces, other parts of the hardware cannot access the information in this isolated memory, so as to achieve privacy computing of sensitive data. TEE can be regarded as an independent and trusted execution area, isolated from the participants, and has its own security mechanism and access control policy. The embodiment of the present application uses TEE as the basis for secure computing, and uses its security and independence to ensure the security and privacy of data in the process of privacy set intersection calculation and sharing.
[0044] S103: The second participant uses the shared master key to encrypt the second data set, and sends the encrypted second encrypted set to the first participant.
[0045] In a specific implementation, the second participant terminal P 1 The second data set is encrypted using the shared master key mk to obtain a second encrypted set C. Then, the second participant P 1 Send the second encrypted set C to the first participant P 0 .
[0046] In a possible implementation manner, in S103, the second participant uses the shared master key to encrypt the second data set, and sends the encrypted second encrypted set to the first participant, including the following steps:
[0047] Step 1031: The second participant generates a first encryption key and a second encryption key using the shared master key, and encrypts the second data set according to the first encryption key and the second encryption key.
[0048] In a specific implementation, the second participant terminal P 1 Generate the first encryption key k using the shared master key mk 1 and the second encryption key k 2 , and based on the first encryption key k 1 and the second encryption key k 2 Encrypt the second data set to obtain a second encrypted set
[0049] Here, the embodiment of the present application uses a symmetric key encryption algorithm with homomorphic properties to encrypt the first data set and the second data set, which can not only encrypt the data during the privacy calculation process, but also perform certain calculations on the ciphertext.
[0050] It should be noted that homomorphic encryption is a form of encryption that allows users to perform specific algebraic operations directly on ciphertext, and the data obtained is still encrypted, just like performing the same operation on plaintext and then encrypting the result. The advantage of homomorphic encryption is that users can still analyze and retrieve specific encrypted data when the data is encrypted, which improves the efficiency of data processing, ensures the secure transmission of data, and the correct encrypted data can still obtain the correct decryption result.
[0051] In addition, the pseudorandom function (PRF) is also an important tool in cryptography. It is a deterministic function F: {0,1} λ ×{0,1} in →{0,1} out , where the input is key space × input space. A PRF is secure if, for every input, its output is like in {0,1} out is randomly selected (uniformly sampled) from . That is, given a uniform k∈{0,1} λ and any x∈{0,1} in , y←prf k (x).
[0052] Here, the key pseudo-random generator g:{0,1} λ ×{0,1} λ →Z q , given a uniform key k and a uniform seed s∈{0,1} λ , can generate a Z q Pseudorandom elements in .
[0053] In the specific implementation, the key generation algorithm Gen:1 λ →{0,1} λ , enter 1 λ , the output is from {0,1} λ k uniformly selected from the , thereby generating a shared master key mk, and using the shared master key mk to generate a first encryption key k 1 and the second encryption key k 2 ; Further, based on the pseudo-random function prf, the first encryption key k 1 and the second encryption key k 2 A second encrypted set is obtained by encrypting the second data set.
[0054] Step 1032: The second participant sends the encrypted second encryption set to the first participant.
[0055] S104: The first participant instructs the trusted execution environment to encrypt the first data set using the shared master key, and the trusted execution environment sends the encrypted first encrypted set to the first participant.
[0056] In a specific implementation, the first participating terminal P 0 Instruct the trusted execution environment TEE to encrypt the first data set using the shared master key mk to obtain a first encrypted set T.
[0057] In a possible implementation, in S104, the first participant instructs the trusted execution environment to encrypt the first data set using the shared master key, and the trusted execution environment sends the encrypted first encrypted set to the first participant, including the following steps:
[0058] Step 1041: The first participant instructs the trusted execution environment to generate the first encryption key and the second encryption key using the shared master key.
[0059] Step 1042: The first participant terminal sends the first data set to the trusted execution environment terminal;
[0060] Step 1043: The trusted execution environment end uses a random permutation algorithm to inadvertently shuffle the first data set to obtain the encrypted first encrypted set;
[0061] Step 1044: The trusted execution environment sends the encrypted first encryption set to the first participant.
[0062] In a specific implementation, the first participating terminal P 0Instructs the trusted execution environment TEE to use the shared master key mk to generate the same first encryption key k internally 1 and the second encryption key k 2 , then the first participant P 0 Send the first data set to the trusted execution environment TEE Then, the trusted execution environment TEE uses the random permutation algorithm π to perform the first data set Perform an oblivious shuffle to obtain the first encrypted set Furthermore, the trusted execution environment TEE sends a 0 Send the encrypted first encryption set T. Among them, is uniformly random, and the encryption algorithm Enc is applied component-wise on the plaintext vector.
[0063] It should be noted that the encryption algorithm uses the encryption key Enckey generated by the secret key algorithm to encrypt the original data Plaintext to generate the encrypted data Cliphertext. λ ×Z q →{0,1} λ ×Z q , input x∈Z q and a uniform key k∈{0,1} λ , select a uniformly random r∈{0,1} λ , calculate c = (c 1 ,c 2 ), where c 1 = r,c 2 =x+g k (r).
[0064] S105: The first participant calculates a set intersection based on the first encryption set and the second encryption set, and performs data alignment on the set intersection.
[0065] It should be noted that Private Set Intersection (PSI) allows each participant to input the local data record ID as a private set and jointly calculate the intersection of the sets without leaking any information other than the intersection. Specifically, the data records of each party are associated through the intersection, and the data are aligned. Then, after the data is aligned, the records are split into secret sharing shares as the input for subsequent privacy calculations.
[0066] Here, after calculating the set intersection, the embodiment of the present application also performs data alignment on the set intersection, so that the Private Set Intersection (PSI) can be securely calculated through data alignment, and the communication overhead of the PSI protocol is reduced, that is, the communication volume is reduced, thereby reducing the impact on the low-bandwidth network environment and improving the transmission efficiency. Among them, the communication volume refers to the communication volume involved in the entire process of the PSI protocol operation.
[0067] In a possible implementation manner, the first participant calculates the set intersection according to the following steps:
[0068] The first participant initializes an empty list S; for any i∈[N], the first participant searches the first encrypted set T; If it is found that there is any j∈[M], for the element in the second encrypted set C The second encryption set C With the first encryption set T The same, obtaining the set intersection;
[0069]
[0070] In a possible implementation, data alignment is performed on the set intersection according to the following steps: the first participant selects a uniformly random calculate The first participant will Put it into list S to complete data alignment.
[0071] Here, the principle of the encryption algorithm adopted in the embodiment of the present application is Enc:{0,1} λ ×Z q →{0, 1} λ ×Z q , input x∈Z q and a uniform key k∈{0,1} λ , select a uniformly random r∈{0,1} λ , calculate c = (c 1 , c 2 ), where c 1 = r, c 2 =x+g k (r). Among them, the encryption algorithm in the embodiment of the present application has the following properties:
[0072] (1) For the ciphertext (c 1 , c 2 )←Enc(x) and public plaintext y∈Z q, we can perform addition calculation to get the ciphertext (c 1 , c 2 +y)←Enc(x+y), recorded as Enc(x)+y=Enc(x+y). The above ciphertext can be obtained by c 2 +yg k (c 1 ) decrypted to get x+y;
[0073] (2) For the ciphertext (c 1 , c 2 )←Enc(x) and public plaintext y∈Z q , we can perform multiplication to get the ciphertext (c 1 ,y,c 2 ·y)←Enc(x·y), recorded as y·Enc(x)=Enc(x·y). The above ciphertext can be obtained through c 2 ·yy·g k (c 1 ) is decrypted to obtain x·y.
[0074] (3) For ciphertext Addition calculation can be performed to obtain the ciphertext Recorded as The above ciphertext can be obtained by Decrypted
[0075] Thus, based on the principle of the above encryption algorithm, the first participant P in the embodiment of the present application 0 Choose a uniformly random Calculate Finally, the first participant P 0 Will Put it into the list S. At this time, the data alignment is completed. From now on, the original index will be ignored, and the i-th element in S will be uniformly recorded as
[0076] S106: Encrypting the set intersection after completing data alignment through the trusted execution environment end and sharing it with the first participant end and the second participant end.
[0077] In the specific implementation, the intersection of the set of completed data alignment is encrypted by the trusted execution environment TEE and then shared to the first participating terminal P 0 and the second participant P 1 In this way, the aligned data can be shared secretly. The result of the PSI protocol, that is, the required intersection, needs to be kept confidential in many applications. This application can complete the alignment of data and the secret sharing of data without leaking the intersection.
[0078] In a possible implementation, the step S106 encrypts the set intersection after completing data alignment through the trusted execution environment and then shares it with the first participant and the second participant, including the following steps: the first participant initializes empty lists U and V; for any i∈[|S|], the first participant sends the first encrypted intersection to the trusted execution environment. The trusted execution environment end decrypts to obtain a first decrypted intersection and select a uniformly random calculate Finally, the second encrypted intersection is sent to the first participant. The first participant will Stored in U, calculated Will put it into V; the first participant sends V to the second participant; for any i∈[|V|], the second participant uses the second encryption key k 2 Decrypt and update in,
[0079] It should be noted that the working principle of the decryption algorithm Dec used in the embodiment of the present application is to use the decryption key DecKey to restore the encrypted data Cliphertext to the original data Plaintext. Specifically, Dec: {0, 1} λ ×{0, 1} n ×Z q →Z q , input c=(c 1 , c 2 ) and key k∈{0,1} λ , decrypt x′=c 2 -g k (c 1 ).
[0080] Here, the symmetric key encryption algorithm proposed in the embodiment of the present application has a homomorphic property, allowing calculations on ciphertexts. The data alignment protocol based on the intersection of privacy sets can ensure the privacy security of the information used and generated during the interaction process. Data alignment is performed without leaking private set information, with low communication overhead, and the calculated intersection is not leaked, which can avoid privacy leakage caused by the participants obtaining the intersection. In addition, the method of secret sharing of aligned data can efficiently generate secret sharing shares for subsequent privacy calculations. Among them, most of the calculations are assisted by the large data set party and the trusted execution environment, which uses the computing power resource advantages of the large data set party to improve the efficiency in practical applications, while also avoiding security issues caused by the large data set party directly calculating on plaintext.
[0081] That is to say, the embodiment of the present application utilizes a trusted execution environment to perform auxiliary encryption calculations, ensuring the privacy and security of interactive data, and secretly sharing the aligned data results to avoid data leakage, while also taking into account reducing communication overhead to improve the actual efficiency of protocol execution.
[0082] In an embodiment of the present application, the second data set is encrypted by using the shared master key established by the trusted execution environment end and the second participant end to obtain the second encrypted set; the first participant end instructs the trusted execution environment end to use the shared master key to encrypt the first data set, and the trusted execution environment end sends the first encrypted set obtained after encryption to the first participant end; the first participant end calculates the intersection of the sets based on the first encrypted set and the second encrypted set, and performs data alignment on the intersection of the sets; the trusted execution environment end encrypts the intersection of the sets that completes the data alignment and shares it with the first participant end and the second participant end. In this way, the embodiment of the present application can complete data alignment and data secret sharing without leaking the intersection while ensuring the intersection calculation under the premise of ensuring the privacy of the private set.
[0083] Based on the same application concept, the embodiments of the present application also provide a privacy set intersection sharing device based on a symmetric key protocol corresponding to the privacy set intersection sharing method based on a symmetric key protocol provided in the above embodiments. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the privacy set intersection sharing method based on a symmetric key protocol in the above embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0084] like Figure 2 , Figure 3 As shown, Figure 2 One of the functional module diagrams of a privacy set intersection sharing device 200 based on a symmetric key protocol provided in an embodiment of the present application, Figure 3 This is a second functional module diagram of a privacy set intersection sharing device 200 based on a symmetric key protocol provided in an embodiment of the present application. Figure 2 As shown, the privacy set intersection sharing device 200 based on the symmetric key protocol includes:
[0085] Initialization module 210, used to initialize a first data set held by a first participant terminal and a second data set held by a second participant terminal;
[0086] A key establishment module 220, configured to establish a shared master key through a trusted execution environment end and the second participating end; the trusted execution environment end is used to represent an execution area end of an independent processing environment that can provide security and integrity protection;
[0087] A first encryption module 230, configured for the second participant to encrypt the second data set using the shared master key, and send the encrypted second encrypted set to the first participant;
[0088] A second encryption module 240, configured for the first participant to instruct the trusted execution environment to encrypt the first data set using the shared master key, and the trusted execution environment sends the encrypted first encrypted set to the first participant;
[0089] An intersection calculation module 250, configured for the first participant to calculate a set intersection based on the first encrypted set and the second encrypted set, and to perform data alignment on the set intersection;
[0090] The sharing module 260 is used to encrypt the set intersection after completing the data alignment through the trusted execution environment end and then share it with the first participating end and the second participating end.
[0091] In a possible implementation, Figure 3 As shown, the first encryption module 230 includes:
[0092] An encryption unit 231 is configured for the second participant to generate a first encryption key and a second encryption key using the shared master key, and to encrypt the second data set according to the first encryption key and the second encryption key;
[0093] The sending unit 232 is used for the second participant to send the second encrypted set obtained after encryption to the first participant.
[0094] In a possible implementation, Figure 3 As shown, the second encryption module 240 is specifically used for:
[0095] The first participant terminal instructs the trusted execution environment terminal to generate the first encryption key and the second encryption key by using the shared master key;
[0096] The first participant terminal sends the first data set to the trusted execution environment terminal;
[0097] The trusted execution environment end inadvertently shuffles the first data set using a random permutation algorithm to obtain the encrypted first encrypted set;
[0098] The trusted execution environment terminal sends the encrypted first encryption set to the first participating terminal.
[0099] In a possible implementation, Figure 3As shown, the intersection calculation module 250 is used to calculate the intersection of sets through the first participating end according to the following steps:
[0100] The first participant initializes an empty list S;
[0101] For any i∈[N], the first participant searches the first encryption set T;
[0102]
[0103] If it is found that there is any j∈[M], for the element in the second encrypted set C The second encryption set C With the first encryption set T The same, obtaining the set intersection;
[0104] In a possible implementation, Figure 3 As shown, the intersection calculation module 250 is used to align the data of the set intersection according to the following steps:
[0105] The first participant selects a uniformly random calculate
[0106] The first participant will Put it into list S to complete data alignment.
[0107] In a possible implementation, Figure 3 As shown, the sharing module 260 is specifically used for:
[0108] The first participant initializes empty lists U and V;
[0109] For any i∈[|S|], the first participant sends the first encrypted intersection to the trusted execution environment. The trusted execution environment end decrypts to obtain a first decrypted intersection and select a uniformly random calculate Finally, the second encrypted intersection is sent to the first participant.
[0110] The first participant will Stored in U, calculated Will Put it in V;
[0111] The first participant sends V to the second participant;
[0112] For any i∈[|V|], the second participant uses the second encryption key k 2 Decrypt and update
[0113] in,
[0114] In an embodiment of the present application, the second data set is encrypted by using the shared master key established by the trusted execution environment end and the second participant end to obtain the second encrypted set; the first participant end instructs the trusted execution environment end to use the shared master key to encrypt the first data set, and the trusted execution environment end sends the first encrypted set obtained after encryption to the first participant end; the first participant end calculates the intersection of the sets based on the first encrypted set and the second encrypted set, and performs data alignment on the intersection of the sets; the trusted execution environment end encrypts the intersection of the sets that completes the data alignment and shares it with the first participant end and the second participant end. In this way, the embodiment of the present application can complete data alignment and data secret sharing without leaking the intersection while ensuring the intersection calculation under the premise of ensuring the privacy of the private set.
[0115] Based on the same application concept, see Figure 4 As shown, it is a structural diagram of an electronic device 400 provided in an embodiment of the present application, including: a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114;
[0116] The memory 113 is used to store a computer program. When the computer program is executed by the processor 111, the steps of the privacy set intersection sharing method based on the symmetric key protocol as described in any of the above embodiments are executed.
[0117] Specifically, when the machine-readable instruction is executed by the processor 111, the following processing may be performed:
[0118] Initialize a first data set held by a first participant and a second data set held by a second participant;
[0119] Establishing a shared master key through a trusted execution environment end and the second participating end; the trusted execution environment end is used to represent an execution area end of an independent processing environment that can provide security and integrity protection;
[0120] The second participant terminal encrypts the second data set using the shared master key, and sends the encrypted second encrypted set to the first participant terminal;
[0121] The first participant terminal instructs the trusted execution environment terminal to encrypt the first data set using the shared master key, and the trusted execution environment terminal sends the first encrypted set obtained after encryption to the first participant terminal;
[0122] The first participant calculates a set intersection based on the first encrypted set and the second encrypted set, and performs data alignment on the set intersection;
[0123] The set intersection after completing data alignment is encrypted by the trusted execution environment and then shared with the first participant end and the second participant end.
[0124] Based on the same application concept, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the privacy set intersection sharing method based on the symmetric key protocol provided in the above embodiment are executed.
[0125] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned private set intersection sharing method based on the symmetric key protocol. While ensuring the intersection calculation under the premise of ensuring the privacy of the private set, it can complete data alignment and data secret sharing without leaking the intersection.
[0126] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.
[0127] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0129] It should be noted that the descriptions involving "first", "second", etc. in this application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0130] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0131] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A privacy set intersection sharing method based on a symmetric key protocol, characterized in that: The method comprises: Initialize a first data set held by a first participant and a second data set held by a second participant; Establishing a shared master key through a trusted execution environment end and the second participating end; the trusted execution environment end is used to represent an execution area end of an independent processing environment that can provide security and integrity protection; The second participant terminal encrypts the second data set using the shared master key, and sends the encrypted second encrypted set to the first participant terminal; The first participant terminal instructs the trusted execution environment terminal to encrypt the first data set using the shared master key, and the trusted execution environment terminal sends the first encrypted set obtained after encryption to the first participant terminal; The first participant calculates a set intersection based on the first encrypted set and the second encrypted set, and performs data alignment on the set intersection; The set intersection after completing data alignment is encrypted by the trusted execution environment and then shared with the first participant end and the second participant end.
2. The method according to claim 1, characterized in that The second participant end encrypts the second data set by using the shared master key, and sends the encrypted second encrypted set to the first participant end, including: The second participant generates a first encryption key and a second encryption key using the shared master key, and encrypts the second data set according to the first encryption key and the second encryption key; The second participant sends the encrypted second encrypted set to the first participant.
3. The method according to claim 2, characterized in that The first participant terminal instructs the trusted execution environment terminal to encrypt the first data set by using the shared master key, and the trusted execution environment terminal sends the first encrypted set obtained after encryption to the first participant terminal, including: The first participant terminal instructs the trusted execution environment terminal to generate the first encryption key and the second encryption key by using the shared master key; The first participant terminal sends the first data set to the trusted execution environment terminal; The trusted execution environment end inadvertently shuffles the first data set using a random permutation algorithm to obtain the encrypted first encrypted set; The trusted execution environment terminal sends the encrypted first encryption set to the first participating terminal.
4. The method according to claim 1, characterized in that: The first data set held by the first participant is N tuples And the second data set held by the second participant is M tuples Among them, N>>M, N and M are both positive integers, Z q Represents the set of congruence classes modulo q, where q is a prime number.
5. The method according to claim 4, characterized in that The first participant calculates the set intersection according to the following steps: The first participant initializes an empty list S; For any i∈[N], the first participant searches the first encryption set T; If it is found that there is any j∈[M], for the element in the second encrypted set C The second encryption set C With the first encryption set T The same, obtaining the set intersection; 6. The method according to claim 5, characterized in that The data of the set intersection is aligned according to the following steps: The first participant selects a uniformly random calculate The first participant will Put it into list S to complete data alignment.
7. The method according to claim 6, characterized in that The step of encrypting the set intersection after completing data alignment through the trusted execution environment and then sharing it with the first participant end and the second participant end includes: The first participant initializes empty lists U and V; For any i∈[|S|], the first participant sends the first encrypted intersection to the trusted execution environment. The trusted execution environment end decrypts to obtain a first decrypted intersection and select a uniformly random calculate Finally, the second encrypted intersection is sent to the first participant. The first participant will Stored in U, calculated Will Put it in V; The first participant sends V to the second participant; For any i∈[|V|], the second participant uses the second encryption key k2 to decrypt and update in, 8. A privacy set intersection sharing device based on a symmetric key protocol, characterized in that: The device comprises: An initialization module, used to initialize a first data set held by a first participant terminal and a second data set held by a second participant terminal; A key establishment module, used to establish a shared master key through a trusted execution environment end and the second participating end; the trusted execution environment end is used to represent an execution area end of an independent processing environment that can provide security and integrity protection; A first encryption module, configured for the second participant to encrypt the second data set using the shared master key, and send the encrypted second encrypted set to the first participant; a second encryption module, configured for the first participant to instruct the trusted execution environment to encrypt the first data set using the shared master key, and the trusted execution environment to send the encrypted first encrypted set to the first participant; An intersection calculation module, configured for the first participant to calculate a set intersection based on the first encrypted set and the second encrypted set, and to perform data alignment on the set intersection; A sharing module is used to encrypt the set intersection after completing data alignment through the trusted execution environment end and then share it with the first participating end and the second participating end.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the privacy set intersection sharing method based on the symmetric key protocol as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the privacy set intersection sharing method based on a symmetric key protocol as described in any one of claims 1 to 7 are executed.
Citation Information
Cited By
Encryption sending method and device, equipment, storage medium and product
CN121333657A
Sample alignment method and apparatus, device, and storage medium
US20240323023A1
