Privacy protection method and device

By requesting the encryption key to reconcile the key to the trust third party in the cloud computing environment, the client encrypts the data set and verify the calculation results of the server, solve the problem of data privacy and reliability in cloud computing, realize the data, and realize the data. Private protection and reliability of calculation results.

CN119358028AActive Publication Date: 2025-01-24CHINA ELECTRONICS RELIABILITY AND ENVIRONMENTAL TESTING INSTITUTE ((THE FIFTH INSTITUTE OF ELECTRONICS MINISTRY OF INDUSTRY AND INFORMATION TECHNOLOGY) (CHINA SAIBAO LABORATORY)
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411651180.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-01-24
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

In a cloud computing environment, when a client handes the data set to the server for processing, it is difficult for the server to ensure that the server will not use private information, and it is impossible to judge the server's honesty and the correctness of the calculation results, resulting in insufficient reliability.

Method used

By sending a function registration request to a trusted third party, an encryption public key and a decryption key are generated and distributed. The client encrypts the data set and sends it to the server. The server uses the decryption key to decrypt and verify the result to ensure that the decryption result is correct. sex.

Benefits of technology

While protecting data privacy, it improves the reliability of data processing by the server and ensures that the decryption results received by the client are consistent with the expected results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119358028A_ABST
    Figure CN119358028A_ABST
Patent Text Reader

Abstract

The invention relates to a privacy protection method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: sending a function registration request carrying a target function to a trusted third party, and receiving a decryption key and an encryption public key returned by the trusted third party; receiving a data processing request sent by a client for the target function, the data processing request carrying an encrypted data set generated by encrypting the data set, decrypting the encrypted data set by using the decryption key and the function parameter vector to obtain a decryption result, generating a result verification value by using the function parameter vector and the verification parameter set, and sending the result verification value to the client, and sending the decryption result and the result verification value to the client, so that the client verifies the decryption result by using the result verification value, the verification parameter set and the function public key, and keeping the decryption result under the condition that the verification result represents that the decryption result is consistent with a result obtained by processing the data set by using the target function. By adopting the method, the reliability can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security technology, and in particular to a privacy protection method and device. Background Art

[0002] With the rapid development of cloud computing technology, more and more clients are entrusting computing tasks to servers with powerful computing capabilities.

[0003] However, once the client delivers the data set to the server, the data is out of the client's control, and it is difficult to ensure that the server will not infer or use the private information therein. Due to various factors such as the dynamic nature of the server, reliability issues, and the complexity and redundancy of computing tasks, the client can neither judge whether the server performs computing tasks honestly nor the correctness of the computing results returned by the server, and its reliability needs to be improved. Summary of the invention

[0004] Based on this, it is necessary to provide a privacy protection method and device that can improve reliability in response to the above technical problems.

[0005] On the one hand, the present application provides a privacy protection method, comprising:

[0006] Sending a function registration request for a target function to a trusted third party, where the target function is a function used to process a data set in a client, and the function registration request carries a function parameter vector of the target function, and the function registration request is used by the trusted third party to generate a master private key and an encrypted public key including a master public key and a verification parameter set, generate a decryption key based on the function parameter vector and the master private key, and generate a function public key based on the verification parameter set and the function parameter vector, return the encrypted public key and the decryption key, and send the encrypted public key and the function public key to the client;

[0007] Receiving the decryption key and the encryption public key returned by the trusted third party;

[0008] receiving a data processing request for the target function sent by the client, wherein the data processing request carries an encrypted data set generated by encrypting the data set using the master public key;

[0009] Decrypting the encrypted data set using the decryption key and the function parameter vector to obtain a decryption result;

[0010] Generate a result verification value using the function parameter vector and the verification parameter set;

[0011] The decryption result and the result verification value are sent to the client, so that the client verifies the decryption result by using the result verification value, the verification parameter set and the function public key to obtain a verification result, and retains the decryption result when the verification result indicates that the decryption result is consistent with a result obtained by processing the data set using the target function.

[0012] On the other hand, the present application also provides a privacy protection device, including:

[0013] A request sending module, used to send a function registration request carrying a target function to a trusted third party, where the target function is a function used to process a data set in a client, and the function registration request carries a function parameter vector of the target function, and the function registration request is used by the trusted third party to generate a master private key and an encrypted public key containing a master public key and a verification parameter set, generate a decryption key based on the function parameter vector and the master private key, and generate a function public key based on the verification parameter set and the function parameter vector, return the encrypted public key and the decryption key, and send the encrypted public key and the function public key to the client;

[0014] A secret key receiving module, used for receiving the decryption key and the encryption public key returned by the trusted third party;

[0015] A request receiving module, configured to receive a data processing request for the target function sent by the client, wherein the data processing request carries an encrypted data set generated by encrypting the data set using the master public key;

[0016] A decryption module, used to decrypt the encrypted data set using the decryption key and the function parameter vector to obtain a decryption result;

[0017] A verification value generating module, used to generate a result verification value using the function parameter vector and the verification parameter set;

[0018] A result sending module is used to send the decryption result and the result verification value to the client, so that the client verifies the decryption result by using the result verification value, the verification parameter set and the function public key to obtain a verification result. When the verification result indicates that the decryption result is consistent with the result obtained by processing the data set using the target function, the decryption result is retained.

[0019] On the other hand, the present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned privacy protection method when executing the computer program.

[0020] On the other hand, the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned privacy protection method are implemented.

[0021] On the other hand, the present application also provides a computer program product, including a computer program, which implements the steps in the above-mentioned privacy protection method when executed by a processor.

[0022] The above privacy protection method, device, computer device, storage medium and computer program product register the target function with a trusted third party. The trusted third party generates an encryption public key and a master private key, and generates a decryption key based on the function parameter vector and the master private key of the target function, returns the encryption public key and the decryption key, and sends the encryption public key and the function public key to the client. Thus, the corresponding key is generated for the target function. In order to obtain the result obtained by directly processing the data set using the target function, the client encrypts the data set to generate an encrypted data set, and sends the encrypted data set. Compared with directly sending the data set, the privacy of the data set is protected. The encrypted data set is decrypted using the decryption key and the function parameter vector to obtain the decryption result, and the result verification value is generated using the function parameter vector and the verification parameter set. The decryption result and the result verification value are sent to the client. Compared with directly sending the function parameter vector to the client for verification, the privacy of the function parameter vector is protected. The client can use the result verification value to verify whether the decryption result is consistent with the result obtained by processing the data set using the target function, thereby ensuring the correctness of the decryption result. Therefore, reliability is improved while protecting privacy. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0024] FIG1 is a diagram of an application environment of a privacy protection method in one embodiment;

[0025] FIG2 is a schematic diagram of a process flow of a privacy protection method in one embodiment;

[0026] FIG3 is a timing diagram of a privacy protection method in one embodiment;

[0027] FIG4 is a structural block diagram of a privacy protection device in one embodiment;

[0028] FIG5 is a diagram showing the internal structure of a computer device in one embodiment;

[0029] FIG. 6 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0031] The privacy protection method provided in the embodiment of the present application can be applied in the application environment shown in Figure 1. The application environment includes a trusted third party 102, a server 104 and a client 106. Among them, the trusted third party 102, the server 104 and the client 106 communicate through the network, and the communication link adopted is a secure communication link. The client is honest and trustworthy. The trusted third party 102 is, for example, a KGC (Key Generation Center). The server 104 can be implemented by an independent server or a server cluster composed of multiple servers, or a cloud server, which is used to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms. The client 106 runs on a terminal. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The trusted third party 102, the server 104 and the client 106 may be connected directly or indirectly via wired or wireless communication, which is not limited in the present application.

[0032] The privacy protection method provided in this application implements a privacy protection method of Verifiable Inner Product Functional Encryption (VIPFE), improves the inner product function encryption algorithm by using the lemma of polynomial decomposition and the properties of bilinear mapping, realizes the verification of the correctness of the decryption result, and provides a reference for the future application of function encryption in other fields.

[0033] Specifically, the server 104 sends a function registration request for a target function to the trusted third party 102. The target function is a function used to process a data set in the client 106, and the function registration request carries a function parameter vector of the target function. In response to the function registration request, the trusted third party 102 generates a decryption key based on the function parameter vector and the master private key, generates a function public key based on the verification parameter set and the function parameter vector, returns an encryption public key and a decryption key, and sends the encryption public key and the function public key to the client 106. The server 104 receives the decryption key and the encryption public key returned by the trusted third party 102. The client 106 receives the encryption public key and the function public key sent by the trusted third party 102. The client 106 encrypts the data set using the master public key to generate an encrypted data set, and sends a data processing request for the target function to the server 104, in which the encrypted data set is carried. The server 104 decrypts the encrypted data set using the decryption key and the function parameter vector to obtain a decryption result, generates a result verification value using the function parameter vector and the verification parameter set, and sends the decryption result and the result verification value to the client 106. The client 106 verifies the decryption result using the result verification value, the verification parameter set and the function public key to obtain a verification result. The client 106 retains the decryption result when it is determined that the verification result indicates that the decryption result is consistent with the result obtained by processing the data set using the target function.

[0034] In some embodiments, as shown in FIG2 , a privacy protection method is provided, which can be executed by a terminal or a server, or by both a terminal and a server. The method is applied to the server 104 in FIG1 as an example for explanation, and includes the following steps 202 to 212. Among them:

[0035] Step 202: Send a function registration request for the target function to a trusted third party.

[0036] Among them, the target function is a function used to process the data set in the client, the function registration request carries the function parameter vector of the target function, and the function registration request is used by a trusted third party to generate a master private key and an encrypted public key containing a master public key and a verification parameter set, generate a decryption key based on the function parameter vector and the master private key, and generate a function public key based on the verification parameter set and the function parameter vector, return the encrypted public key and the decrypted key, and send the encrypted public key and the function public key to the client. The target function can be a function representing a neural network model, and f represents the target function. The neural network model can be, but is not limited to, a large language model.

[0037] Function parameter vector Indicates that the function parameter vector is an n-dimensional vector, that is, it contains n function parameters. , the i-th function parameter is n can be any integer greater than or equal to 1. A data set is an n-dimensional vector, which contains n data. The data set can be called a data vector. The data set can be represented by express, , the i-th data is used Indicates the function parameters. For data The objective function can be understood as a function that performs vector inner product operations on the data vector and the function parameter vector, that is, .

[0038] Specifically, use Represents the encryption public key, Represents the master public key. Represents the public key of a function. represents the decryption key. The trusted third party returns to the server and , and and Sent to the client. Represents the master private key. W represents the verification parameter set.

[0039] Step 204: Receive the decryption key and encryption key returned by the trusted third party.

[0040] Specifically, the trusted third party returns the encryption public key and the decryption key to the server. The server receives and stores the decryption key and the encryption key returned by the trusted third party.

[0041] Step 206: receiving a data processing request for the target function sent by the client, wherein the data processing request carries an encrypted data set generated by encrypting the data set using the master public key.

[0042] The data set may be a data set in any field, for example, medical imaging data, experimental results, vital signs data, etc. in the medical field. The data processing request may carry the identifier of the objective function. When the objective function represents a neural network model, the identifier of the objective function may be the name of the neural network model.

[0043] Specifically, the client receives and stores the encryption public key and function public key sent by the trusted third party. When the client needs to use the server to process the data set using the target function, the client can use the master public key to encrypt the data set to obtain the encrypted data set. In this way, it is possible to avoid sending the data set directly to the server, prevent the server from obtaining private information in the data set, and further analyze the data in the data set, thereby protecting privacy.

[0044] Step 208: Decrypt the encrypted data set using the decryption key and the function parameter vector to obtain a decryption result.

[0045] In an ideal case, the decryption result is consistent with the result generated by directly processing the data set using the target function. Therefore, if the decryption result is correct, the result generated by directly processing the data set can be obtained.

[0046] Step 210, using the function parameter vector and the verification parameter set, generating a result verification value.

[0047] Specifically, in order to verify whether the decryption result is correct, the function parameter vector needs to be involved. However, if the function parameter vector is sent directly to the client, the client will get the function parameter vector. However, for the server, the function parameter vector is the server's private data. If the function parameter vector is sent directly to the client, it is equivalent to leaking the server's private data. By using the function parameter vector and the verification parameter set to generate a result verification value and sending the result verification value to the client, the function parameter vector can be indirectly involved in the verification process. Therefore, while the decryption result can be verified, the private data on the server side is protected.

[0048] Step 212, sending the decryption result and the result verification value to the client, so that the client verifies the decryption result using the result verification value, the verification parameter set and the function public key to obtain a verification result. When the verification result indicates that the decryption result is consistent with the result obtained by processing the data set using the target function, the decryption result is retained.

[0049] Specifically, the server sends the decryption result and the result verification value to the client. The client can verify the decryption result based on the result verification value. The purpose of the verification is to determine whether the decryption result is consistent with the result obtained by directly processing the data set using the target function. If they are consistent, the client retains the decryption result. If they are inconsistent, the client may not retain the decryption result.

[0050] In the above privacy protection method, the target function is registered with a trusted third party, and the trusted third party generates an encryption public key and a master private key, and generates a decryption key based on the function parameter vector of the target function and the master private key, returns the encryption public key and the decryption key, and sends the encryption public key and the function public key to the client. Thus, the corresponding key is generated for the target function. In order to obtain the result obtained by directly processing the data set using the target function, the client encrypts the data set to generate an encrypted data set, and sends the encrypted data set. Compared with directly sending the data set, the privacy of the data set is protected. The encrypted data set is decrypted using the decryption key and the function parameter vector to obtain the decryption result, and the result verification value is generated using the function parameter vector and the verification parameter set. The decryption result and the result verification value are sent to the client, which protects the privacy of the function parameter vector compared to directly sending the function parameter vector to the client for verification. The client can use the result verification value to verify whether the decryption result is consistent with the result obtained by processing the data set using the target function, thereby ensuring the correctness of the decryption result. Therefore, reliability is improved while protecting privacy.

[0051] During the whole process, the server obtains the ciphertext (encrypted data set), but by decrypting the ciphertext, it can obtain the result of calculating the plaintext (data set) through the objective function. Therefore, calculations can be performed and the accuracy of the calculation results (decryption results) can be verified without obtaining the plaintext.

[0052] In some embodiments, the function parameter vector is an n-dimensional vector, and the step of generating the verification parameter set by the trusted third party includes:

[0053] Generate a multiplication cyclic group, determine an integer vector space according to the order of the multiplication cyclic group and the dimension of the function parameter vector, each integer vector in the integer vector space is an n-dimensional integer vector, and each integer in the n-dimensional integer vector belongs to the integer space determined according to the order of the multiplication cyclic group;

[0054] Randomly select an integer vector from the integer vector space as the verification integer vector,

[0055] Determine the sum of squares of the integers in the verification integer vector, perform an exponential operation with the generator of the multiplication cyclic group as the base and the sum of squares as the exponent, and obtain a first verification parameter;

[0056] For each integer in the verification integer vector, perform an exponential operation with the generator as the base and the integer as the exponent to obtain a second verification parameter corresponding to the integer, and form each second verification parameter into a second verification parameter vector;

[0057] The first verification parameter and the second verification parameter vector constitute a verification parameter set.

[0058] The position of the second verification parameter in the second verification parameter vector is consistent with the position of the integer corresponding to the second verification parameter in the integer vector, that is, the i-th integer in the integer vector corresponds to the i-th second verification parameter in the second verification parameter vector. The order of the multiplicative cyclic group is denoted by p, and the integer vector space is denoted by Integer space is represented by express, . Verify that the integer vector is The verification parameter set is represented by W. n is the dimension of the function parameter vector, that is, the function parameter vector contains n function parameters. The generator of the multiplication cyclic group is Indicates that the i-th integer in the integer vector is verified using express, . Then the first verification parameter is , the second verification parameter can be expressed as , then the verification parameter set W can be expressed as . Encryption public key Also included is p, and , The generator of ,Right now .

[0059] In some embodiments, the trusted third party calls the group generation algorithm to generate ,in, is a multiplicative cyclic group, e is a bilinear map, is the order of the multiplicative cyclic group, and a random number is selected ,calculate .

[0060] In this embodiment, a verification parameter set is generated by using a verification integer vector and a generator, which provides conditions for subsequent verification of the decryption result.

[0061] In some embodiments, generating a function public key based on the verification parameter set and the function parameter vector includes:

[0062] For each function parameter in the function parameter vector, an exponential operation is performed with the second verification parameter corresponding to the function parameter as the base and the function parameter as the exponent to obtain an exponential operation result corresponding to the function parameter, and the position of the function parameter in the function parameter vector is consistent with the position of the second verification parameter corresponding to the function parameter in the second verification parameter vector;

[0063] The exponential operation results corresponding to each function parameter in the function parameter vector are multiplied to obtain the function public key. The result obtained by performing the exponential operation with the generator as the base and the target processing result as the exponent is consistent with the function public key. The target processing result refers to the result obtained by processing the target function and the verification integer vector.

[0064] Specifically, the function public key The calculation formula is: .because It can be seen that and are equivalent. A trusted third party can also use Calculate the public key of the function That is, the trusted third party can perform a vector inner product operation on the function parameter vector and the verification integer vector, and then perform an exponential operation with the generator as the base and the result of the vector inner product operation as the exponent to obtain the function public key.

[0065] In this embodiment, since the result obtained by performing exponential operation with the generator as the base and the target processing result as the exponent is consistent with the function public key, the target processing result refers to the result obtained by processing the target function and the verification integer vector, which provides conditions for subsequent verification of the decryption result using the function public key.

[0066] In some embodiments, the encrypted public key also includes the order and generator of the multiplication cyclic group, and generates a result verification value using the function parameter vector and the verification parameter set, including:

[0067] Randomly select an integer from the integer space determined by the order of the multiplication cyclic group to obtain a target random number;

[0068] Perform an exponential operation with the generator as the base and the target random number as the exponent to obtain a first verification value;

[0069] For each function parameter in the function parameter vector, perform an exponential operation with the first verification value as the base and the function parameter as the exponent to obtain a first exponential value corresponding to the function parameter, perform an exponential operation with the second verification parameter corresponding to the function parameter as the base and the target random number as the exponent to obtain a second exponential value corresponding to the function parameter, and perform a product operation on the first exponential value and the second exponential value corresponding to the function parameter to obtain a second verification value corresponding to the function parameter;

[0070] The second verification value corresponding to each function parameter in the function parameter vector is used to form a second verification value vector;

[0071] The first verification value and the second verification value vector are used to form a result verification value.

[0072] Here, d represents the target random number. Represents the first verification value, using Represents the second verification value vector, using represents the i-th second verification value in the second verification value vector, then , . Second verification parameter The purpose of is to generate an offset. The purpose of the target random number d is to perform scaling. The role of is to offset the target random number d during the verification process. In theory: .

[0073] In this embodiment, compared to directly sending the function parameter vector to the client to participate in the verification process, the function parameter vector and the verification parameter set are used to generate a result verification value, and the result verification value is used to participate in the verification process. When the verification is completed, the function parameter vector can be ensured not to be known by the client, thereby protecting the privacy of the function parameter vector.

[0074] In some embodiments, the function parameter vector is an n-dimensional vector, and the master private key is an n-dimensional sub-private key vector; the step of generating the sub-private key vector includes:

[0075] An integer vector is randomly selected from an integer vector space as a sub-private key vector, each integer vector in the integer vector space is an n-dimensional integer vector, and each integer in the n-dimensional integer vector belongs to an integer space determined according to the order of the multiplication cyclic group;

[0076] Generate a decryption key based on the function parameter vector and the master private key, including:

[0077] Perform a vector inner product operation on the function parameter vector and the sub-private key vector to obtain the decryption key.

[0078] Among them, the master private key, that is, the sub-private key vector is . is the child private key vector .use Represents the i-th child private key. is an integer vector space.

[0079] Specifically, the trusted third party can use the formula Calculate the decryption key The master public key is generated based on the master private key. The trusted third party uses the generator as the base and the sub-private key as the exponent to perform exponential calculations to generate sub-public keys. Each sub-private key generates a sub-public key, and each sub-public key constitutes the master public key. The master public key is a sub-public key vector. The sub-public key corresponds to the sub-private key one by one, and the position of the sub-public key in the sub-public key vector is consistent with the position of the sub-private key corresponding to the sub-public key in the sub-private key vector. That is, the sub-public key vector can be expressed as: .in, Represents the i-th child public key.

[0080] In this embodiment, a vector inner product operation is performed using the function parameter vector and the sub-private key vector to obtain a decryption key, which provides a basis and condition for subsequently using the decryption key to decrypt the encrypted data set.

[0081] In some embodiments, the data set is an n-dimensional data vector, the encryption public key also includes the order and generator of the multiplication cyclic group, the master public key is an n-dimensional sub-public key vector, and the step of generating the encrypted data set includes:

[0082] Randomly select an integer from the integer space determined by the order of the multiplication cyclic group to obtain a cryptographic random number;

[0083] Perform exponential operation with the generator of the multiplication cyclic group as the base and the encrypted random number as the exponent to obtain the encrypted data corresponding to the encrypted random number;

[0084] For each data in the data vector, perform an exponential operation with the generator as the base and the data as the exponent to obtain a first exponent value corresponding to the data, perform an exponential operation with the sub-public key corresponding to the data as the base and the encrypted random number as the exponent to obtain a second exponent value corresponding to the data, perform a product operation on the first exponent value and the second exponent value to obtain the encrypted data corresponding to the data, and the position of the sub-public key corresponding to the data in the sub-public key is consistent with the position of the data in the data vector;

[0085] The encrypted data corresponding to the encrypted random number and the encrypted data corresponding to each data in the data vector constitute an encrypted data set.

[0086] Specifically, the client can select a random number from the integer space as the encryption random number. represents an encrypted random number, then Right now It is from A randomly selected integer.

[0087] use Represents the encrypted data corresponding to the encrypted random number, then .use Represents the i-th data The corresponding encrypted data is ,in, Representative data The corresponding first index value is, Representative data The corresponding second index value. represents the encrypted data set, then .

[0088] In this embodiment, the master public key is used to encrypt the data set, which provides a basis and conditions for the subsequent decryption of the encrypted data set.

[0089] In some embodiments, the function parameter vector is an n-dimensional vector, and the encrypted data set is decrypted using the decryption key to obtain a decryption result, including:

[0090] For each encrypted data corresponding to the data in the encrypted data set, an exponential operation is performed with the encrypted data as the base and the function parameter corresponding to the encrypted data as the exponent to obtain the exponential value corresponding to the encrypted data. The position of the function parameter corresponding to the encrypted data in the function parameter vector is consistent with the position of the data corresponding to the encrypted data in the data vector;

[0091] Multiplying the exponential values ​​corresponding to the encrypted data corresponding to each data in the data vector to obtain a first decrypted value;

[0092] Performing an exponential operation with the encrypted data corresponding to the encrypted random number as the base and the decryption key as the exponent to obtain a second decrypted value;

[0093] Determine a ratio of the first decrypted value to the second decrypted value, where ideally, the ratio is consistent with a result of performing an exponential operation with the generator as the base and the data processing result as the exponent, where the data processing result refers to a result obtained by processing the data set using the objective function;

[0094] Logarithmic operation is performed based on the generator and the ratio to determine the decryption result. Ideally, the decryption result is consistent with the data processing result.

[0095] The ideal situation refers to the situation where the calculation is correct. Let y represent the ratio of the first decrypted value to the second decrypted value, then:

[0096]

[0097] use Represents the decryption result, the server can Decryption is done using the linear key homomorphic property and the linear ciphertext homomorphic property. Of course, discrete logarithms can also be used to calculate .in, is the first decrypted value, is the second decrypted value.

[0098] use Represents the decryption result, ,but .

[0099] Because theoretically: = , so the server can calculate For example, we can use the linear key homomorphism property and the linear ciphertext homomorphism property to decrypt Of course, discrete logarithms can also be used to calculate .

[0100] In this embodiment, the encrypted data set is decrypted using a decryption key and a function parameter vector. When the calculation is correct, the decrypted result represents the result obtained by the server using the target function to process the data set. Therefore, when the server is unknown to the data set, the result obtained by the target function to process the data set can still be indirectly obtained by processing the encrypted data set, thereby ensuring the privacy and security of the data set.

[0101] In some embodiments, the data set is an n-dimensional data vector, the encryption public key also includes a bilinear mapping function, the verification parameter set is generated based on a multiplication cyclic group and includes a first verification parameter and a second verification parameter vector, the result verification value is generated based on the verification parameter set and includes a first verification value and a second verification value vector; the decryption result is verified using the result verification value, the verification parameter set and the function public key to obtain a verification result, including:

[0102] Generate auxiliary parameters based on the data vector and the verification parameter set;

[0103] Multiply the function public key, the exponential result obtained by performing an exponential operation with the generator of the multiplication cyclic group as the base and the negative decryption result as the exponent, and the auxiliary parameter to obtain a multiplication result;

[0104] Performing bilinear mapping on the first verification value and the multiplication result to obtain a first mapping value;

[0105] For each data in the data vector, perform an exponential operation with the generator as the base and the data as the exponent to obtain an exponential operation result corresponding to the data, perform bilinear mapping on the ratio of the second verification parameter corresponding to the data and the exponential operation result corresponding to the data and the second verification value corresponding to the data to obtain a mapping value corresponding to the data, the position of the second verification parameter corresponding to the data in the second verification parameter vector is consistent with the position of the data in the data vector, and the position of the second verification value corresponding to the data in the second verification value vector is consistent with the position of the data in the data vector;

[0106] Multiply the mapping values ​​corresponding to each data in the data vector to obtain a second mapping value;

[0107] The first mapping value is compared with the second mapping value to obtain a verification result.

[0108] Among them, the client verifies the decryption result The correctness of the client uses the encrypted public key Verify the parameter set W to generate an auxiliary parameter, using represents auxiliary parameters, then the multiplication result = . First mapping value = , is a bilinear mapping function. Data The corresponding mapping value is , the second mapping value = .

[0109] Specifically, when the first mapping value is consistent with the second mapping value, the verification result indicates that the decryption result is consistent with the result obtained by processing the data set using the target function, so the decryption result, i.e., the result obtained by processing the data set using the target function, is received or retained. When the first mapping value is inconsistent with the second mapping value, the decoding result is not received or retained.

[0110] It can be understood that comparing the first mapping value with the second mapping value is actually to determine the equation Is it true?

[0111] ;

[0112] ;

[0113] Requires verification and Are they equal?

[0114] By bilinear mapping It can be seen that we only need to verify the comparison and Whether they are equal, that is, verification Is it true? Simplifying it, we can get: .

[0115] From the polynomial decomposition lemma, we know that It must be established, therefore, If established, explain is definitely correct. On the contrary, if If not established, it means is wrong, so the client can decrypt the result Verify correctness.

[0116] Among them, the polynomial decomposition lemma is: is a For any input variable , there exists a polynomial Make , In addition, there is a polynomial time algorithm to solve the above polynomial . You can see In order to protect To protect privacy, a verification result value is generated based on the verification parameter set.

[0117] In this embodiment, based on The premise must be established by judging the equation Is it established? To verify Is it correct? Verify The correctness of the method is reliable.

[0118] In some embodiments, the verification parameter set also includes a first verification parameter, and auxiliary parameters are generated based on the data vector and the verification parameter set, including: for each data in the data vector, performing an exponential operation with the second verification parameter corresponding to the data as the base and the data as the exponent to obtain a third exponential value corresponding to the data; multiplying the third exponential values ​​corresponding to each data in the data vector to obtain a cumulative result; and using the ratio of the first verification parameter to the cumulative result as an auxiliary parameter.

[0119] Specifically, the client verifies the decryption result The correctness of the system public key Verify auxiliary parameter set Generate an auxiliary parameter .

[0120] In theory: .

[0121] In this embodiment, auxiliary parameters are generated based on the data vector and the verification parameter set, which provide conditions and basis for verifying the decryption result.

[0122] In some embodiments, as shown in FIG3, a timing diagram of a privacy protection method is provided. Specifically, the server sends a function registration request carrying a function parameter vector to a trusted third party. The trusted third party generates a private key, an encryption public key, a decryption key, and a function public key, and sends the encryption public key and the decryption key to the server, and sends the encryption public key and the function key to the client. The client encrypts the data set using the master public key in the encryption public key to obtain an encrypted data set, and sends the encrypted data set to the server. The server decrypts the encrypted data set using the decryption key and the function parameter vector to obtain a decryption result, and generates a result verification value, and sends the decryption result and the result verification value to the client. The client verifies the decryption result using the result verification value and the function public key to obtain a verification result. If the verification is successful (i.e., the equation holds true), the decryption result is retained. It should be noted that the function registration request can be sent by the client in addition to the server.

[0123] The privacy protection method provided by this application can be understood as an improvement on the inner product function encryption algorithm, and realizes a privacy protection method that can verify the correctness of the decryption result. This method combines the polynomial decomposition algorithm with the inner product function encryption algorithm, and uses the properties of bilinear mapping to verify whether the constructed formula is an equation. If it is an equation, it can be proved that the server calculation result is true and correct, and the client receives the result; otherwise, it means that the server calculation result is unreliable, and the client refuses to receive the result. Thus, a verifiable computing scheme with privacy protection function is realized, the feasibility and practicality of the function encryption algorithm in practical applications are enhanced, and the credibility and reliability of cloud computing services are improved.

[0124] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0125] Based on the same inventive concept, the embodiment of the present application also provides a privacy protection device for implementing the privacy protection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more privacy protection device embodiments provided below can refer to the limitations on the privacy protection method above, and will not be repeated here.

[0126] In some embodiments, as shown in FIG. 4 , a privacy protection device is provided, including: a request sending module 402, a key receiving module 404, a request receiving module 406, a decryption module 408, a verification value generating module 410 and a result sending module 412, wherein:

[0127] The request sending module 402 is used to send a function registration request for a target function to a trusted third party. The target function is a function used to process a data set in a client. The function registration request carries a function parameter vector of the target function. The function registration request is used by the trusted third party to generate a master private key and an encrypted public key containing a master public key and a verification parameter set, generate a decryption key based on the function parameter vector and the master private key, and generate a function public key based on the verification parameter set and the function parameter vector, return the encrypted public key and the decryption key, and send the encrypted public key and the function public key to the client.

[0128] The secret key receiving module 404 is used to receive the decryption key and encryption public key returned by the trusted third party.

[0129] The request receiving module 406 is used to receive a data processing request for a target function sent by a client, wherein the data processing request carries an encrypted data set generated by encrypting the data set using the master public key.

[0130] The decryption module 408 is used to decrypt the encrypted data set using the decryption key and the function parameter vector to obtain a decryption result.

[0131] The verification value generation module 410 is used to generate a result verification value using the function parameter vector and the verification parameter set.

[0132] The result sending module 412 is used to send the decryption result and the result verification value to the client, so that the client can verify the decryption result using the result verification value, the verification parameter set and the function public key to obtain the verification result. When the verification result indicates that the decryption result is consistent with the result obtained by processing the data set using the target function, the decryption result is retained.

[0133] In some embodiments, the function parameter vector is an n-dimensional vector, and a verification parameter set generation module for generating a verification parameter set is used to: generate a multiplication cyclic group, determine an integer vector space according to the order of the multiplication cyclic group and the dimension of the function parameter vector, each integer vector in the integer vector space is an n-dimensional integer vector, and each integer in the n-dimensional integer vector belongs to the integer space determined according to the order of the multiplication cyclic group; randomly select an integer vector from the integer vector space as a verification integer vector; determine the sum of squares of each integer in the verification integer vector, perform an exponential operation with the generator of the multiplication cyclic group as the base and the square sum as the exponent, and obtain a first verification parameter; for each integer in the verification integer vector, perform an exponential operation with the generator as the base and the integer as the exponent, obtain a second verification parameter corresponding to the integer, and form each second verification parameter into a second verification parameter vector; and form the first verification parameter and the second verification parameter vector into a verification parameter set.

[0134] In some embodiments, a function public key generation module for generating a function public key is used to perform an exponential operation on each function parameter in a function parameter vector, with the second verification parameter corresponding to the function parameter as the base and the function parameter as the exponent, to obtain an exponential operation result corresponding to the function parameter, and the position of the function parameter in the function parameter vector is consistent with the position of the second verification parameter corresponding to the function parameter in the second verification parameter vector; the exponential operation results corresponding to each function parameter in the function parameter vector are multiplied to obtain the function public key, and the result obtained by performing an exponential operation with the generator as the base and the target processing result as the exponent is consistent with the function public key, and the target processing result refers to the result obtained by processing the target function and the verification integer vector.

[0135] In some embodiments, the encrypted public key also includes the order and generator of the multiplication cyclic group, and the verification value generation module is also used to randomly select an integer from the integer space determined according to the order of the multiplication cyclic group to obtain a target random number; perform an exponential operation with the generator as the base and the target random number as the exponent to obtain a first verification value; for each function parameter in the function parameter vector, perform an exponential operation with the first verification value as the base and the function parameter as the exponent to obtain a first exponent value corresponding to the function parameter; perform an exponential operation with the second verification parameter corresponding to the function parameter as the base and the target random number as the exponent to obtain a second exponent value corresponding to the function parameter; multiply the first exponent value and the second exponent value corresponding to the function parameter to obtain a second verification value corresponding to the function parameter; the second verification values ​​corresponding to each function parameter in the function parameter vector constitute a second verification value vector; the first verification value and the second verification value vector constitute a result verification value.

[0136] In some embodiments, the function parameter vector is an n-dimensional vector, the master private key is an n-dimensional sub-private key vector, and a private key generation module for generating a sub-private key vector is used to randomly select an integer vector from an integer vector space as a sub-private key vector, each integer vector in the integer vector space is an n-dimensional integer vector, and each integer in the n-dimensional integer vector belongs to an integer space determined according to the order of the multiplication cyclic group; a decryption key generation module for generating a decryption key is used to perform a vector inner product operation on the function parameter vector and the sub-private key vector to obtain a decryption key.

[0137] In some embodiments, the data set is an n-dimensional data vector, the encryption public key also includes the order and generator of the multiplication cyclic group, the master public key is an n-dimensional sub-public key vector, and the data encryption module for generating the encrypted data set is used to randomly select an integer from the integer space determined according to the order of the multiplication cyclic group to obtain an encrypted random number; perform exponential operation with the generator of the multiplication cyclic group as the base and the encrypted random number as the exponent to obtain encrypted data corresponding to the encrypted random number; for each data in the data vector, perform exponential operation with the generator as the base and the data as the exponent to obtain a first exponent value corresponding to the data, perform exponential operation with the sub-public key corresponding to the data as the base and the encrypted random number as the exponent to obtain a second exponent value corresponding to the data, multiply the first exponent value by the second exponent value to obtain the encrypted data corresponding to the data, and the position of the sub-public key corresponding to the data in the sub-public key is consistent with the position of the data in the data vector; the encrypted data corresponding to the encrypted random number and the encrypted data corresponding to each data in the data vector constitute an encrypted data set.

[0138] In some embodiments, the function parameter vector is an n-dimensional vector, and the decryption module is further used to perform an exponential operation on each encrypted data corresponding to the data in the encrypted data set, with the encrypted data as the base and the function parameter corresponding to the encrypted data as the exponent, to obtain the exponential value corresponding to the encrypted data, and the position of the function parameter corresponding to the encrypted data in the function parameter vector is consistent with the position of the data corresponding to the encrypted data in the data vector; multiply the exponential values ​​corresponding to the encrypted data corresponding to each data in the data vector to obtain a first decrypted value; perform an exponential operation on the encrypted data corresponding to the encrypted random number as the base and the decryption key as the exponent to obtain a second decrypted value; determine the ratio of the first decrypted value to the second decrypted value, and ideally, the ratio is consistent with the result of the exponential operation with the generator as the base and the data processing result as the exponent, and the data processing result refers to the result obtained by processing the data set using the target function; perform logarithmic operation based on the generator and the ratio to determine the decryption result, and ideally, the decryption result is consistent with the data processing result.

[0139] In some embodiments, the data set is an n-dimensional data vector, the encryption public key also includes a bilinear mapping function, the verification parameter set is generated based on a multiplication cyclic group and includes a second verification parameter vector, the result verification value is generated based on the verification parameter set and includes a first verification value and a second verification value vector; a verification module for obtaining a verification result is used to generate auxiliary parameters based on the data vector and the verification parameter set; multiply the function public key, the exponential result obtained by performing an exponential operation with a generator of the multiplication cyclic group as the base and a negative decryption result as the exponent, and the auxiliary parameters to obtain a multiplication result; bilinearly map the first verification value and the multiplication result to obtain a first mapping value; for each number in the data vector Data, perform exponential operation with the generator as the base and the data as the exponent to obtain the exponential operation result corresponding to the data, perform bilinear mapping on the ratio of the second verification parameter corresponding to the data and the exponential operation result corresponding to the data and the second verification value corresponding to the data to obtain the mapping value corresponding to the data, the position of the second verification parameter corresponding to the data in the second verification parameter vector is consistent with the position of the data in the data vector, and the position of the second verification value corresponding to the data in the second verification value vector is consistent with the position of the data in the data vector; perform cumulative multiplication on the mapping values ​​corresponding to each data in the data vector to obtain the second mapping value; compare the first mapping value with the second mapping value to obtain a verification result.

[0140] In some embodiments, the verification parameter set also includes a first verification parameter, and the verification module is also used to perform an exponential operation on each data in the data vector, using the second verification parameter corresponding to the data as the base and the data as the exponent to obtain a third exponential value corresponding to the data; multiplying the third exponential values ​​corresponding to each data in the data vector to obtain a cumulative result; and using the ratio of the first verification parameter to the cumulative result as an auxiliary parameter.

[0141] Each module in the above privacy protection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0142] In some embodiments, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG5. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the privacy protection method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a privacy protection method is implemented.

[0143] In some embodiments, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a privacy protection method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0144] Those skilled in the art will understand that the structures shown in FIGS. 5 and 6 are merely block diagrams of partial structures related to the scheme of the present application, and do not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than those shown in the figures, or combine certain components, or have a different arrangement of components.

[0145] In some embodiments, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned privacy protection method when executing the computer program.

[0146] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned privacy protection method are implemented.

[0147] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above-mentioned privacy protection method when executed by a processor.

[0148] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0150] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0151] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A privacy protection method, characterized in that: The method comprises: Sending a function registration request for a target function to a trusted third party, where the target function is a function used to process a data set in a client, and the function registration request carries a function parameter vector of the target function, and the function registration request is used by the trusted third party to generate a master private key and an encrypted public key including a master public key and a verification parameter set, generate a decryption key based on the function parameter vector and the master private key, and generate a function public key based on the verification parameter set and the function parameter vector, return the encrypted public key and the decryption key, and send the encrypted public key and the function public key to the client; Receiving the decryption key and the encryption public key returned by the trusted third party; receiving a data processing request for the target function sent by the client, wherein the data processing request carries an encrypted data set generated by encrypting the data set using the master public key; Decrypting the encrypted data set using the decryption key and the function parameter vector to obtain a decryption result; Generate a result verification value using the function parameter vector and the verification parameter set; The decryption result and the result verification value are sent to the client, so that the client verifies the decryption result by using the result verification value, the verification parameter set and the function public key to obtain a verification result, and retains the decryption result when the verification result indicates that the decryption result is consistent with a result obtained by processing the data set using the target function.

2. The method according to claim 1, characterized in that The function parameter vector is an n-dimensional vector, and the step of generating the verification parameter set includes: Generate a multiplication cyclic group, and determine an integer vector space according to the order of the multiplication cyclic group and the dimension of the function parameter vector, wherein each integer vector in the integer vector space is an n-dimensional integer vector, and each integer in the n-dimensional integer vector belongs to the integer space determined according to the order of the multiplication cyclic group; Randomly selecting an integer vector from the integer vector space as a verification integer vector; Determine the sum of squares of the integers in the verification integer vector, perform an exponential operation with the generator of the multiplication cyclic group as the base and the sum of squares as the exponent, and obtain a first verification parameter; For each integer in the verification integer vector, perform an exponential operation with the generator as the base and the integer as the exponent to obtain a second verification parameter corresponding to the integer, and form a second verification parameter vector with each of the second verification parameters; The first verification parameter and the second verification parameter vector constitute the verification parameter set.

3. The method according to claim 2, characterized in that The generating a function public key based on the verification parameter set and the function parameter vector comprises: For each function parameter in the function parameter vector, an exponential operation is performed with the second verification parameter corresponding to the function parameter as a base and the function parameter as an exponent to obtain an exponential operation result corresponding to the function parameter, wherein the position of the function parameter in the function parameter vector is consistent with the position of the second verification parameter corresponding to the function parameter in the second verification parameter vector; The exponential operation results corresponding to each function parameter in the function parameter vector are multiplied to obtain a function public key. The result obtained by performing an exponential operation with the generator as the base and the target processing result as the exponent is consistent with the function public key. The target processing result refers to the result obtained by processing the target function and the verification integer vector.

4. The method according to claim 2, characterized in that: The encrypted public key also includes the order and generator of the multiplication cyclic group, and the use of the function parameter vector and the verification parameter set to generate a result verification value includes: Randomly select an integer from the integer space determined by the order of the multiplication cyclic group to obtain a target random number; Performing an exponential operation with the generator as the base and the target random number as the exponent to obtain a first verification value; For each function parameter in the function parameter vector, perform an exponential operation with the first verification value as the base and the function parameter as the exponent to obtain a first exponential value corresponding to the function parameter, perform an exponential operation with the second verification parameter corresponding to the function parameter as the base and the target random number as the exponent to obtain a second exponential value corresponding to the function parameter, and perform a product operation on the first exponential value corresponding to the function parameter and the second exponential value to obtain a second verification value corresponding to the function parameter; The second verification value corresponding to each function parameter in the function parameter vector is used to form a second verification value vector; The first verification value and the second verification value vector are used to form a result verification value.

5. The method according to claim 1, characterized in that The function parameter vector is an n-dimensional vector, the master private key is an n-dimensional sub-private key vector, and the steps of generating the sub-private key vector include: Randomly selecting an integer vector from an integer vector space as a sub-private key vector, wherein each integer vector in the integer vector space is an n-dimensional integer vector, and each integer in the n-dimensional integer vector belongs to an integer space determined according to the order of a multiplicative cyclic group; The step of generating a decryption key based on the function parameter vector and the master private key comprises: A vector inner product operation is performed on the function parameter vector and the sub-private key vector to obtain a decryption key.

6. The method according to claim 1, characterized in that The data set is an n-dimensional data vector, the encrypted public key also includes the order and generator of the multiplication cyclic group, the master public key is an n-dimensional sub-public key vector, and the steps of generating the encrypted data set include: Randomly select an integer from an integer space determined according to the order of the multiplication cyclic group to obtain an encrypted random number; Performing an exponential operation with the generator of the multiplication cyclic group as the base and the encrypted random number as the exponent to obtain encrypted data corresponding to the encrypted random number; For each data in the data vector, perform an exponential operation with the generator as the base and the data as the exponent to obtain a first exponent value corresponding to the data, perform an exponential operation with the sub-public key corresponding to the data as the base and the encrypted random number as the exponent to obtain a second exponent value corresponding to the data, perform a product operation on the first exponent value and the second exponent value to obtain encrypted data corresponding to the data, and the position of the sub-public key corresponding to the data in the sub-public key is consistent with the position of the data in the data vector; The encrypted data corresponding to the encrypted random number and the encrypted data corresponding to each data in the data vector constitute the encrypted data set.

7. The method according to claim 6, characterized in that The function parameter vector is an n-dimensional vector, and the decryption key and the function parameter vector are used to decrypt the encrypted data set to obtain a decryption result, including: For each encrypted data corresponding to the data in the encrypted data set, an exponential operation is performed with the encrypted data as the base and the function parameter corresponding to the encrypted data as the exponent to obtain an exponential value corresponding to the encrypted data, and the position of the function parameter corresponding to the encrypted data in the function parameter vector is consistent with the position of the data corresponding to the encrypted data in the data vector; Multiplying the exponent values ​​corresponding to the encrypted data corresponding to each data in the data vector to obtain a first decrypted value; Performing an exponential operation with the encrypted data corresponding to the encrypted random number as the base and the decryption key as the exponent to obtain a second decrypted value; Determine a ratio of the first decrypted value to the second decrypted value, wherein, ideally, the ratio is consistent with a result of performing an exponential operation with the generator as the base and a data processing result as the exponent, wherein the data processing result refers to a result obtained by processing the data set using the objective function; A logarithmic operation is performed based on the generator and the ratio to determine a decryption result. Ideally, the decryption result is consistent with the data processing result.

8. The method according to any one of claims 1 to 7, characterized in that: The data set is an n-dimensional data vector, the encrypted public key also includes a bilinear mapping function, the verification parameter set is generated based on a multiplication cyclic group and includes a second verification parameter vector, and the result verification value is generated based on the verification parameter set and includes a first verification value and a second verification value vector; The step of verifying the decryption result by using the result verification value, the verification parameter set and the function public key to obtain a verification result includes: generating auxiliary parameters based on the data vector and the verification parameter set; Multiply the function public key, an exponential result obtained by performing an exponential operation with the generator of the multiplication cyclic group as the base and the negative of the decryption result as the exponent, and the auxiliary parameter to obtain a multiplication result; Performing bilinear mapping on the first verification value and the multiplication result to obtain a first mapping value; For each data in the data vector, perform an exponential operation with the generator as the base and the data as the exponent to obtain an exponential operation result corresponding to the data, perform bilinear mapping on the ratio of the second verification parameter corresponding to the data and the exponential operation result corresponding to the data and the second verification value corresponding to the data to obtain a mapping value corresponding to the data, the position of the second verification parameter corresponding to the data in the second verification parameter vector is consistent with the position of the data in the data vector, and the position of the second verification value corresponding to the data in the second verification value vector is consistent with the position of the data in the data vector; Multiplying the mapping values ​​corresponding to each data in the data vector to obtain a second mapping value; The first mapping value is compared with the second mapping value to obtain a verification result.

9. The method according to claim 8, characterized in that The verification parameter set further includes a first verification parameter, and the generating of an auxiliary parameter based on the data vector and the verification parameter set includes: For each data in the data vector, perform an exponential operation with the second verification parameter corresponding to the data as a base and the data as an exponent to obtain a third exponential value corresponding to the data; Multiply the third exponent values ​​corresponding to each data in the data vector to obtain a multiplication result; The ratio of the first verification parameter to the cumulative result is used as an auxiliary parameter.

10. A privacy protection device, characterized in that: The device comprises: A request sending module, used to send a function registration request carrying a target function to a trusted third party, where the target function is a function used to process a data set in a client, and the function registration request carries a function parameter vector of the target function, and the function registration request is used by the trusted third party to generate a master private key and an encrypted public key containing a master public key and a verification parameter set, generate a decryption key based on the function parameter vector and the master private key, and generate a function public key based on the verification parameter set and the function parameter vector, return the encrypted public key and the decryption key, and send the encrypted public key and the function public key to the client; A secret key receiving module, used to receive the decryption key and the encryption public key returned by the trusted third party; A request receiving module, configured to receive a data processing request for the target function sent by the client, wherein the data processing request carries an encrypted data set generated by encrypting the data set using the master public key; A decryption module, used to decrypt the encrypted data set using the decryption key and the function parameter vector to obtain a decryption result; A verification value generating module, used to generate a result verification value using the function parameter vector and the verification parameter set; A result sending module is used to send the decryption result and the result verification value to the client, so that the client verifies the decryption result by using the result verification value, the verification parameter set and the function public key to obtain a verification result. When the verification result indicates that the decryption result is consistent with the result obtained by processing the data set using the target function, the decryption result is retained.

Citation Information

Patent Citations

  • Outsourcing encrypted data-orientated verifiable intersection operation method and system

    CN105812141A

  • Privacy protection-oriented verifiable distributed matrix multiplication outsourcing method

    CN116738491A

  • Privacy protection computer-aided diagnosis method based on inner product function encryption

    CN117786735A