Privacy protection methods and devices
By obtaining encryption public keys and decryption keys from a trusted third party, the client encrypts the dataset and sends it, the server decrypts it and generates a verification value, and the client verifies the decryption result. This solves the problems of data privacy and result reliability in cloud computing, and improves both privacy protection and result accuracy.
Patent Information
- Application Number
- CN202411651180.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-11-19
AI Technical Summary
In a cloud computing environment, once client data is out of control, it becomes difficult to ensure the reliability of the server and the correctness of the calculation results, and it is also impossible to protect the privacy of data and function parameters.
The client requests a trusted third party to generate an encryption public key and a decryption key. The client encrypts the dataset and sends it. The server uses the decryption key and function parameter vector to decrypt the dataset and generates a result verification value. The client then verifies the correctness of the decryption result.
While protecting the privacy of data and function parameters, it improves the reliability and correctness of calculation results, ensuring that the decryption results obtained by the client are consistent with the results processed by the target function.
Smart Images

Figure CN119358028B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, and in particular to a privacy protection method and apparatus. Background Technology
[0002] With the rapid development of cloud computing technology, more and more clients are delegating computing tasks to servers with powerful computing capabilities.
[0003] However, once the client delivers the dataset to the server, the data is no longer under the client's control. It is difficult to ensure that the server will not infer or use the private information contained therein. Furthermore, due to the dynamic nature and reliability issues of the server, as well as the complexity and redundancy of the computing tasks, the client cannot determine whether the server is honestly performing the computing tasks, nor can it determine the correctness of the computing results returned by the server. Therefore, the reliability needs to be improved. Summary of the Invention
[0004] Therefore, it is necessary to provide a privacy protection method and apparatus that can improve reliability in response to the above-mentioned technical problems.
[0005] On the one hand, this application provides a privacy protection method, including:
[0006] A function registration request carrying a target function is sent to a trusted third party. The target function is a function used to process a dataset in the client. The function registration request carries the 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. Based on the function parameter vector and the master private key, a decryption key is generated, and based on the verification parameter set and the function parameter vector, a function public key is generated. The encrypted public key and the decryption key are returned, and the encrypted public key and the function public key are sent to the client.
[0007] Receive the decryption key and the encryption public key returned by the trusted third party;
[0008] Receive a data processing request for the target function sent by the client, wherein the data processing request carries an encrypted dataset generated by encrypting the dataset using the master public key;
[0009] The encrypted dataset is decrypted using the decryption key and the function parameter vector to obtain the decryption result.
[0010] Using the function parameter vector and the verification parameter set, a result verification value is generated;
[0011] The decryption result and the result verification value are sent 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 a verification result. If the verification result indicates that the decryption result is consistent with the result obtained by processing the dataset using the target function, the decryption result is retained.
[0012] On the other hand, this application also provides a privacy protection device, including:
[0013] A request sending module is used to send a function registration request carrying a target function to a trusted third party. The target function is a function used to process a dataset in the client. The function registration request carries the 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. Based on the function parameter vector and the master private key, a decryption key is generated, and based on the verification parameter set and the function parameter vector, a function public key is generated. The encrypted public key and the decryption key are returned, and the encrypted public key and the function public key are sent to the client.
[0014] A key receiving module is used to receive the decryption key and the encryption public key returned by the trusted third party;
[0015] The request receiving module is used to receive a data processing request for the target function sent by the client, wherein the data processing request carries an encrypted dataset generated by encrypting the dataset using the master public key;
[0016] The decryption module is used to decrypt the encrypted dataset using the decryption key and the function parameter vector to obtain the decryption result;
[0017] The verification value generation module is used to generate a result verification value using the function parameter vector and the verification parameter set;
[0018] The result sending module is used to send the decryption result and the result verification value to the client, so that the client can use the result verification value, the verification parameter set and the function public key to verify the decryption result and obtain a verification result. If the verification result indicates that the decryption result is consistent with the result obtained by processing the dataset using the target function, the decryption result is retained.
[0019] On the other hand, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described privacy protection method.
[0020] On the other hand, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described privacy protection method.
[0021] On the other hand, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the above-described privacy protection method.
[0022] The aforementioned privacy protection methods, devices, computer equipment, storage media, and computer program products register a target function with a trusted third party. The trusted third party generates an encryption public key and a master private key, and based on the function parameter vector of the target function and the master private key, generates a decryption key, returns the encryption public key and decryption key, and sends the encryption public key and function public key to the client. This generates a corresponding key for the target function. To obtain the result of directly processing the dataset using the target function, the client encrypts the dataset to generate an encrypted dataset and sends the encrypted dataset, thus protecting the dataset's privacy compared to directly sending the dataset. The client then decrypts the encrypted dataset using the decryption key and function parameter vector to obtain the decryption result. Using the function parameter vector and a verification parameter set, a result verification value is generated and sent to the client. This 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 dataset using the target function, ensuring the correctness of the decryption result. Therefore, reliability is improved while protecting privacy. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a diagram illustrating the application environment of a privacy protection method in one embodiment;
[0025] Figure 2 This is a flowchart illustrating a privacy protection method in one embodiment;
[0026] Figure 3 This is a timing diagram of a privacy protection method in one embodiment;
[0027] Figure 4 This is a structural block diagram of a privacy protection device in one embodiment;
[0028] Figure 5 This is an internal structural diagram of a computer device in one embodiment;
[0029] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0031] The privacy protection method provided in this application embodiment can be applied to, for example... Figure 1 The application environment shown includes a trusted third party 102, a server 104, and a client 106. The trusted third party 102, server 104, and client 106 communicate via a network using a secure communication link. The client is honest and trustworthy. The trusted third party 102 is, for example, a KGC (Key Generation Center). Server 104 can be implemented using a standalone server or a server cluster, or it can be a cloud server. Cloud servers provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Client 106 runs on a terminal. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The trusted third party 102, server 104, and client 106 can be connected directly or indirectly through wired or wireless communication, and this application does not impose any restrictions on this.
[0032] The privacy protection method provided in this application implements a verifiable inner product function encryption (VIPFE) privacy protection method. It improves the inner product function encryption algorithm by utilizing the lemma of polynomial decomposition and the properties of bilinear mapping, and realizes the verification of the correctness of the decryption result, providing a reference for the future application of function encryption in other fields.
[0033] Specifically, server 104 sends a function registration request carrying a target function to trusted third party 102. The target function is a function used to process the dataset in client 106, and the function registration request carries the function parameter vector of the target function. In response to the function registration request, trusted third party 102 generates a decryption key based on the function parameter vector and the master private key, and generates a function public key based on the verification parameter set and the function parameter vector. It then returns an encryption public key and a decryption key, and sends these to client 106. Server 104 receives the decryption key and encryption public key returned by trusted third party 102. Client 106 receives the encryption public key and function public key sent by trusted third party 102. Client 106 uses the master public key to encrypt the dataset, generating an encrypted dataset, and sends a data processing request for the target function to server 104, carrying the encrypted dataset in the data processing request. Server 104 decrypts the encrypted dataset using the decryption key and the function parameter vector, obtains the decryption result, generates a result verification value using the function parameter vector and the verification parameter set, and sends the decryption result and result verification value to client 106. Client 106 verifies the decryption result using the result verification value, the verification parameter set, and the function public key, and obtains the verification result. If the client 106 determines that the verification result represents a decryption result consistent with the result obtained by processing the dataset using the objective function, it retains the decryption result.
[0034] In some embodiments, such as Figure 2 As shown, a privacy protection method is provided. This method can be executed by a terminal or a server, or by both a terminal and a server. This method can be applied to… Figure 1 Taking server 104 as an example, the explanation includes the following steps 202 to 212. Wherein:
[0035] Step 202: Send a function registration request carrying the target function to a trusted third party.
[0036] The objective function is used to process the dataset in the client. The function registration request carries the function parameter vector of the objective function. This request is used by a trusted third party to generate a master private key and an encrypted public key containing the master public key and a verification parameter set. A decryption key is generated based on the function parameter vector and the master private key, and a function public key is generated based on the verification parameter set and the function parameter vector. The encrypted and decryption keys are returned and sent to the client. The objective function can be a function representing a neural network model, denoted by f. The neural network model can be, but is not limited to, a large language model.
[0037] Function parameter vectors are used This means that the function parameter vector is an n-dimensional vector, that is, it contains n function parameters. The i-th function parameter is used Represented by . n can be any integer greater than or equal to 1. A dataset is an n-dimensional vector, meaning it contains n data points. A dataset can be called a data vector, and a dataset can be represented using . express, The i-th data is used Indicates the function parameters. Used for data In this process, the objective function can be understood as a function that performs a vector dot product operation between the data vector and the function parameter vector, i.e. .
[0038] Specifically, use Represents the public key for encryption, used Represents the master public key. Used Represents the public key of the function. (Used) This represents the decryption key. The trusted third party then returns this key to the server. and and will and Send to the client. This represents the master private key. W represents the set of verification parameters.
[0039] Step 204: Receive the decryption key and encryption key returned by the trusted third party.
[0040] Specifically, a trusted third party returns an encryption public key and a decryption key to the server. The server receives and stores the decryption key and encryption key returned by the trusted third party.
[0041] Step 206: Receive a data processing request for the target function sent by the client. The data processing request carries an encrypted dataset generated by encrypting the dataset using the master public key.
[0042] The dataset can be from any domain, such as medical imaging data, experimental results, and vital sign data in the medical field. The data processing request can carry an identifier for the objective function; if the objective function represents a neural network model, then the identifier for the objective function can be the name of that neural network model.
[0043] Specifically, the client receives and stores the encryption public key and function public key sent by a trusted third party. When the client needs to use the server to process the dataset using the target function, the client can encrypt the dataset using the master public key to obtain the encrypted dataset. This avoids directly sending the dataset to the server, preventing the server from obtaining private information from the dataset and performing further analysis, thus protecting privacy.
[0044] Step 208: Decrypt the encrypted dataset using the decryption key and function parameter vector to obtain the decryption result.
[0045] Ideally, the decryption result should match the result generated by directly processing the dataset using the objective function. Therefore, if the decryption result is correct, then the result generated by directly processing the dataset can be obtained.
[0046] Step 210: Use the function parameter vector and the validation parameter set to generate the result validation value.
[0047] Specifically, to verify the correctness of the decryption result, the function parameter vector is required. However, if the function parameter vector is sent directly to the client, the client will receive it. But for the server, the function parameter vector is its private data; sending it directly to the client would be equivalent to leaking the server's private data. By using the function parameter vector and the verification parameter set to generate a verification value and sending it to the client, the function parameter vector can be indirectly involved in the verification process. Thus, the decryption result can be verified while protecting the server's private data.
[0048] Step 212: Send the decryption result and 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. If the verification result indicates that the decryption result is consistent with the result obtained by processing the dataset 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 dataset using the objective function. If they are consistent, the client retains the decryption result; if they are inconsistent, the client may choose not to retain the decryption result.
[0050] In the aforementioned privacy protection method, a target function is registered with a trusted third party. The trusted third party generates an encryption public key and a master private key, and based on the target function's parameter vector and the master private key, generates a decryption key. It then returns the encryption public key and decryption key and sends them to the client. This generates a corresponding key for the target function. To obtain the result of directly processing the dataset using the target function, the client encrypts the dataset to generate an encrypted dataset and sends it. Compared to directly sending the dataset, this protects the dataset's privacy. The client then decrypts the encrypted dataset using the decryption key and the function parameter vector, obtaining the decryption result. Using the function parameter vector and a verification parameter set, a result verification value is generated and sent to the client. Compared to directly sending the function parameter vector to the client for verification, this protects the privacy of the function parameter vector. The client can use the result verification value to verify whether the decryption result matches the result obtained by processing the dataset using the target function, ensuring the correctness of the decryption result. Therefore, reliability is improved while protecting privacy.
[0051] Throughout the process, the server obtains the ciphertext (encrypted dataset), but by decrypting the ciphertext, it can obtain the result of the calculation on the plaintext (dataset) using the objective function. Thus, even without obtaining the plaintext, it can perform calculations and verify the accuracy of the calculation result (decryption result).
[0052] In some embodiments, the function parameter vector is an n-dimensional vector, and the step of a trusted third party generating a verification parameter set includes:
[0053] Generate a multiplicative cyclic group. Determine the integer vector space based on the order of the multiplicative 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 by the order of the multiplicative 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 all integers in the verification integer vector, and perform exponential operations with the generator of the multiplicative cyclic group as the base and the sum of squares as the exponent to obtain the first verification parameter;
[0056] For each integer in the verification integer vector, perform exponentiation with the generator as the base and the integer as the exponent to obtain the second verification parameter corresponding to the integer, and combine the second verification parameters into a second verification parameter vector.
[0057] The first verification parameter and the second verification parameter vector are combined to form a verification parameter set.
[0058] The position of the second verification parameter in the second verification parameter vector corresponds to the position of the integer corresponding to that 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. (Multiplication loop group) The order of the multiplicative cyclic group is denoted by p, and the integer vector space is denoted by p. Integer space is represented by express, Verify integer vectors using The parameter set is represented by W. n is the dimension of the function parameter vector, meaning the function parameter vector contains n function parameters. The generator of the multiplicative cyclic group is represented by... This means that the i-th integer in the integer vector is verified using... express, The first verification parameter is... The second verification parameter can be expressed as Then the verification parameter set W can be represented as Encryption public key It also includes p, and , The generator is ,Right now .
[0059] In some embodiments, a trusted third-party call group generation algorithm is used to generate... ,in, It is a multiplicative cyclic group, and e is a bilinear mapping. To determine the order of the multiplicative cyclic group, select a random number. ,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 results.
[0061] In some embodiments, generating a function public key based on a verification parameter set and a function parameter vector includes:
[0062] For each function parameter in the function parameter vector, perform an exponential operation with the function parameter as the exponent and the second verification parameter corresponding to the function parameter as the base, and obtain the exponential operation result corresponding to the function parameter. 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 function public key is obtained by multiplying the exponential results corresponding to each function parameter in the function parameter vector. The result obtained by performing exponential operations 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 They are equivalent. A trusted third party can also use... Compute function public key A trusted third party can perform a vector dot product operation between the function parameter vector and the verification integer vector, and then perform an exponentiation operation with the generator as the base and the result of the vector dot product 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 the conditions for subsequent verification of the decryption result using the function public key.
[0066] In some embodiments, the cryptographic public key further includes the order and generator of the multiplicative cyclic group, and generates a result verification value using the function parameter vector and the verification parameter set, including:
[0067] A target random number is obtained by randomly selecting an integer from the integer space determined by the order of the multiplication cyclic group.
[0068] The first verification value is obtained by performing an exponential operation with the generator as the base and the target random number as the exponent.
[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 the 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 the 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 the second verification value corresponding to the function parameter.
[0070] The second verification value vector is formed by taking the second verification value corresponding to each function parameter in the function parameter vector;
[0071] The first verification value and the second verification value vector are used to form the result verification value.
[0072] Where d represents the target random number. Represents the first verification value, using Represents the second verification value vector, using Let represent the i-th second verification value in the second verification value vector. , Second verification parameter The purpose is to generate an offset. The target random number d is used for scaling. Its function is to cancel out the target random number d during the verification process. Theoretically: .
[0073] In this embodiment, compared to directly sending the function parameter vector to the client to participate in the verification process, generating a result verification value from the function parameter vector and the verification parameter set, and using the result verification value to participate in the verification process, can ensure that the function parameter vector is not known to the client after the verification is completed, thus 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 steps for generating the sub-private key vector include:
[0075] Randomly select an integer vector from the 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 the integer space determined by the order of the multiplicative cyclic group.
[0076] Based on the function parameter vector and the master private key, a decryption key is generated, including:
[0077] The decryption key is obtained by performing a vector dot product operation on the function parameter vector and the sub-private key vector.
[0078] Wherein, the master private key, i.e., the child private key vector, is... . Sub-private key vector .use This represents the i-th sub-private key. It is an integer vector space.
[0079] Specifically, a trusted third party can use the formula Calculate the decryption key The master public key is generated based on the master private key. A trusted third party performs exponential operations using the generator as the base and the sub-private keys as the exponent to generate sub-public keys. Each sub-private key generates a sub-public key, and all sub-public keys constitute the master public key. The master public key is a vector of sub-public keys, with a one-to-one correspondence between sub-public keys and sub-private keys. The position of a sub-public key in the sub-public key vector corresponds to the position of its corresponding sub-private key in the sub-private key vector. That is, the sub-public key vector can be represented as: .in, This represents the i-th sub-public key.
[0080] In this embodiment, the decryption key is obtained by performing a vector inner product operation between the function parameter vector and the sub-private key vector, which provides a basis and conditions for subsequently using the decryption key to decrypt the encrypted dataset.
[0081] In some embodiments, the dataset is an n-dimensional data vector, the encryption public key further includes the order and generator of the multiplicative cyclic group, the master public key is an n-dimensional sub-public key vector, and the steps for generating the encrypted dataset include:
[0082] An encrypted random number is obtained by randomly selecting an integer from the integer space determined by the order of the multiplicative cyclic group;
[0083] Using the generator of the multiplicative cyclic group as the base and the encrypted random number as the exponent, perform exponentiation to obtain the encrypted data corresponding to the encrypted random number;
[0084] For each data point in the data vector, perform an exponential operation with the generator as the base and the data as the exponent to obtain the 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 the second exponent value corresponding to the data. Multiply the first exponent value and the second exponent value to obtain the encrypted data corresponding to the data. 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 dataset is formed by combining the encrypted data corresponding to the encrypted random number and the encrypted data corresponding to each data point in the data vector.
[0086] Specifically, the client can select a random number from the integer space as the encrypted random number. Represents an encrypted random number, then Right now From the middle A randomly selected integer.
[0087] use This represents the encrypted data corresponding to the encrypted random number. .use Represents the i-th data The corresponding encrypted data, ,in, Representative data The corresponding first index value, Representative data The corresponding second exponent value. (Using...) This represents the encrypted dataset. .
[0088] In this embodiment, the dataset is encrypted using a master public key, which provides the basis and conditions for subsequent decryption of the encrypted dataset.
[0089] In some embodiments, the function parameter vector is an n-dimensional vector. The encrypted dataset is decrypted using a decryption key to obtain the decryption result, including:
[0090] For each encrypted data corresponding to the data in the encrypted dataset, perform an exponential operation with the encrypted data as the base and the function parameter corresponding to the encrypted data as the exponent to obtain the exponent 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] The first decrypted value is obtained by multiplying the exponent values corresponding to the encrypted data for each data point in the data vector.
[0092] The second decrypted value is obtained by performing an exponential operation with the decryption key as the exponent and the encrypted data corresponding to the encrypted random number as the base.
[0093] Determine the ratio of the first decrypted value to the second decrypted value. Ideally, the ratio should be consistent with the result of exponential operation with the generator as the base and the data processing result as the exponent. The data processing result refers to the result obtained by processing the dataset using the objective function.
[0094] Logarithmic operations are performed based on the generator and the ratio to determine the decryption result. Ideally, the decryption result should match the data processing result.
[0095] Here, "ideal case" refers to the case where the calculation is correct. Let y represent the ratio of the first decrypted value to the second decrypted value, then:
[0096]
[0097] use This represents the decryption result, which the server can then use to... Decryption is achieved using the homomorphic properties of linear key states and linear ciphertext states. Of course, discrete logarithms can also be used to calculate it. .in, This is the first decrypted value. This is the second decrypted value.
[0098] use This represents the decryption result. ,but .
[0099] Because in theory: = Therefore, the server can calculate For example, the homomorphic properties of linear key states and linear ciphertexts can be used to decrypt and obtain... Of course, discrete logarithms can also be used to calculate it. .
[0100] In this embodiment, the encrypted dataset is decrypted using a decryption key and a function parameter vector. If the calculation is correct, the decryption result represents the result obtained by the server processing the dataset using the target function. Thus, even if the server does not know the dataset, it can still indirectly obtain the result obtained by the target function processing the dataset by processing the encrypted dataset, ensuring the privacy and security of the dataset.
[0101] In some embodiments, the dataset is an n-dimensional data vector, the encryption public key further includes a bilinear mapping function, the verification parameter set is generated based on a multiplicative cyclic group and includes a first verification parameter and 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 decryption result is verified using the result verification value, the verification parameter set, and the function public key to obtain the verification result, including:
[0102] Auxiliary parameters are generated based on the data vector and the validation parameter set.
[0103] The function public key, the exponent obtained by exponentiation with the generator of the multiplicative cyclic group as the base and the negative decryption result as the exponent, and the auxiliary parameters are multiplied together to obtain the multiplication result.
[0104] Perform a bilinear mapping on the first verification value and the product result to obtain the first mapped value;
[0105] For each data point in the data vector, perform an 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 a bilinear mapping on the ratio of the second verification parameter corresponding to the data to 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.
[0106] The second mapping value is obtained by multiplying the mapping values corresponding to each data point in the data vector.
[0107] The first mapping value is compared with the second mapping value to obtain the verification result.
[0108] In this process, the client verifies the decryption result. To verify the correctness, the client uses the encrypted public key. In the validation parameter set W, an auxiliary parameter is generated, and used... If the auxiliary parameter is represented, then the product result = First mapping value = , This is a bilinear mapping function. (Data) The corresponding mapping value is The second mapping value = .
[0109] Specifically, if the first mapping value and the second mapping value are consistent, the verification result indicates that the decryption result is consistent with the result obtained by processing the dataset using the objective function, and thus the decryption result (i.e., the result obtained by processing the dataset using the objective function) is accepted and retained. If the first mapping value and the second mapping value are inconsistent, the decoding result is not accepted and is retained.
[0110] It's understandable that comparing the first mapping value with the second mapping value is essentially about determining the equation. Whether it is valid. Because...
[0111] ;
[0112] ;
[0113] Verification required and Are they equal?
[0114] By bilinear mapping It can be seen that only verification and comparison are needed. and Whether they are equal, i.e., verification Is this true? Simplifying, we get: .
[0115] According to the lemma of polynomial factorization, It must be true, therefore, in If it is true, explain It is definitely correct; conversely, if If it is not true, then it means This is incorrect, therefore, the client is able to verify the decryption result. Perform a correctness verification.
[0116] Here, by the lemma of polynomial decomposition, we have: It is A metapolynomial, for any input variable There exists a polynomial Make Furthermore, there exists a polynomial-time algorithm to derive the aforementioned polynomial. You can see In order to protect To protect privacy, a verification result value was generated based on the set of verification parameters.
[0117] In this embodiment, based on The premise that it must be true is determined by judging the equation. To verify whether it is true or not. Verify if correct. The correctness of the method is reliable.
[0118] In some embodiments, the verification parameter set further includes a first verification parameter. Based on the data vector and the verification parameter set, an auxiliary parameter is generated, including: for each data point in the data vector, performing an exponential operation with the data as the exponent and the second verification parameter corresponding to the data as the base, to obtain a third exponential value corresponding to the data; multiplying the third exponential values corresponding to each data point in the data vector to obtain a cumulative multiplication result; and using the ratio of the first verification parameter to the cumulative multiplication result as an auxiliary parameter.
[0119] Specifically, the client verifies the obtained decryption result. The correctness is verified using the system public key. Validation 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, providing conditions and basis for verifying the decryption results.
[0122] In some embodiments, such as Figure 3 The diagram illustrates a sequence diagram of a privacy protection method. 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 decryption key to the server, and the encryption public key and function key to the client. The client uses the master public key from the encryption public key to encrypt the dataset, obtaining an encrypted dataset, and sends the encrypted dataset to the server. The server uses the decryption key and the function parameter vector to decrypt the encrypted dataset, obtaining the decryption result, and generates a result verification value, sending the decryption result and the result verification value to the client. The client uses the result verification value and the function public key to verify the decryption result, obtaining a verification result. If the verification is successful (i.e., the equation holds), the decryption result is retained. It should be noted that the function registration request can be sent by either the server or the client.
[0123] The privacy protection method provided in this application can be understood as an improvement on the inner product function encryption algorithm. It implements a privacy protection method that verifies the correctness of decryption results. This method combines a polynomial factorization algorithm with an inner product function encryption algorithm, utilizing the property of bilinear mapping to verify whether the constructed expression is an equation. If it is an equation, it proves that the server's calculation result is true and correct, and the client accepts the result; otherwise, it indicates that the server's calculation result is untrustworthy, and the client refuses to accept the result. This achieves a verifiable computation scheme with privacy protection, enhancing the feasibility and practicality of function encryption algorithms in real-world applications, and improving the trustworthiness and reliability of cloud computing services.
[0124] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0125] Based on the same inventive concept, this application also provides a privacy protection device for implementing the privacy protection method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more privacy protection device embodiments provided below can be found in the limitations of the privacy protection method described above, and will not be repeated here.
[0126] In some embodiments, such as Figure 4 As shown, 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 generation module 410, and a result sending module 412, wherein:
[0127] The request sending module 402 is used to send a function registration request carrying a target function to a trusted third party. The target function is a function used to process the dataset in the client. The function registration request carries the 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. Based on the function parameter vector and the master private key, a decryption key is generated, and based on the verification parameter set and the function parameter vector, a function public key is generated. The encrypted public key and the decryption key are returned, and the encrypted public key and the function public key are sent to the client.
[0128] The key receiving module 404 is used to receive the decryption key and encryption public key returned by a trusted third party.
[0129] The request receiving module 406 is used to receive a data processing request for the target function sent by the client. The data processing request carries an encrypted dataset generated by encrypting the dataset using the master public key.
[0130] The decryption module 408 is used to decrypt the encrypted dataset using the decryption key and the function parameter vector to obtain the decryption result.
[0131] The verification value generation module 410 is used to generate the 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 use the result verification value, the verification parameter set and the function public key to verify the decryption result and obtain the verification result. If the verification result indicates that the decryption result is consistent with the result obtained by processing the dataset using the objective function, the decryption result is retained.
[0133] In some embodiments, the function parameter vector is an n-dimensional vector. The verification parameter set generation module, which generates the verification parameter set, is used to: generate a multiplicative cyclic group; determine an integer vector space based on the order of the multiplicative 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 based on the order of the multiplicative cyclic group; randomly select an integer vector from the integer vector space as the verification integer vector; determine the sum of squares of each integer in the verification integer vector; perform exponential operations with the generator of the multiplicative cyclic group as the base and the sum of squares as the exponent to obtain the first verification parameter; for each integer in the verification integer vector, perform exponential operations with the generator as the base and the integer as the exponent to obtain the second verification parameter corresponding to the integer, and combine the second verification parameters into a second verification parameter vector; and combine the first verification parameter and the second verification parameter vector to form a verification parameter set.
[0134] In some embodiments, the function public key generation module for generating the function public key is used to perform an exponential operation on each function parameter in the 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 the exponential operation result corresponding to the function parameter. 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 together to obtain the 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.
[0135] In some embodiments, the encrypted public key further includes the order and generator of the multiplicative cyclic group. The verification value generation module is further configured to: randomly select an integer from the integer space determined according to the order of the multiplicative cyclic group to obtain a target random number; perform exponentiation 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 exponentiation 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 exponentiation 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; construct a second verification value vector from the second verification values corresponding to each function parameter in the function parameter vector; and construct a result verification value from the first verification value and the second verification value vector.
[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 the private key generation module for generating the sub-private key vector is used to randomly select an integer vector from the integer vector space as the 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 the integer space determined according to the order of the multiplicative cyclic group. The decryption key generation module for generating the decryption key is used to perform a vector inner product operation on the function parameter vector and the sub-private key vector to obtain the decryption key.
[0137] In some embodiments, the dataset is an n-dimensional data vector, the encryption public key further includes the order and generator of the multiplicative cyclic group, the master public key is an n-dimensional sub-public key vector, and the data encryption module that generates the encrypted dataset is used to randomly select an integer from the integer space determined according to the order of the multiplicative cyclic group to obtain an encrypted random number; perform exponentiation operation with the generator of the multiplicative cyclic group as the base and the encrypted random number as the exponent to obtain the encrypted data corresponding to the encrypted random number; for each data in the data vector, perform exponentiation operation with the generator as the base and the data as the exponent to obtain the first exponent value corresponding to the data, perform exponentiation operation with the sub-public key corresponding to the data as the base and the encrypted random number as the exponent to obtain the second exponent value corresponding to the data, and multiply the first exponent value and the second exponent value to obtain the encrypted data corresponding to the data, 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 dataset.
[0138] In some embodiments, the function parameter vector is an n-dimensional vector. The decryption module is further configured to perform an exponential operation on each encrypted data corresponding to a data in the encrypted dataset, with the encrypted data as the base and the function parameter corresponding to the encrypted data as the exponent, to obtain the exponent 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. The exponent values corresponding to the encrypted data corresponding to each data in the data vector are multiplied together to obtain a first decryption value. An exponential operation is performed on the encrypted data corresponding to the encrypted random number as the base and the decryption key as the exponent to obtain a second decryption value. The ratio of the first decryption value to the second decryption value is determined. 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. The data processing result refers to the result obtained by processing the dataset using the objective function. A 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.
[0139] In some embodiments, the dataset is an n-dimensional data vector, the encrypted public key further includes a bilinear mapping function, the verification parameter set is generated based on a multiplicative 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; a verification module for obtaining the verification result is used to generate auxiliary parameters based on the data vector and the verification parameter set; multiply the function public key, the exponentiation result obtained by exponentiation with the generator of the multiplicative cyclic group as the base and the negative decryption result as the exponent, and the auxiliary parameters to obtain a multiplication result; perform a bilinear mapping on the first verification value and the multiplication result to obtain a first mapping value; and perform a bilinear mapping on each number in the data vector. According to the algorithm, an exponential operation is performed with the generator as the base and the data as the exponent to obtain the exponential operation result corresponding to the data. The ratio of the second verification parameter corresponding to the data to the exponential operation result corresponding to the data and the second verification value corresponding to the data are bilinearly mapped 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. The mapping values corresponding to each data in the data vector are multiplied to obtain the second mapping value. The first mapping value and the second mapping value are compared to obtain the verification result.
[0140] In some embodiments, the verification parameter set further includes a first verification parameter. The verification module is further configured to perform an exponential operation on each data point 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; multiply the third exponential values corresponding to each data point in the data vector to obtain a cumulative multiplication result; and use the ratio of the first verification parameter to the cumulative multiplication result as an auxiliary parameter.
[0141] Each module in the aforementioned privacy protection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke 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 as follows: Figure 5As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data involved in privacy protection methods. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a privacy protection method.
[0143] In some embodiments, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a privacy protection method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0144] Those skilled in the art will understand that Figure 5 and Figure 6The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0145] In some embodiments, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the privacy protection method described above.
[0146] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the privacy protection method described above.
[0147] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the privacy protection method described above.
[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, data stored, data displayed, 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 the relevant data must comply with relevant regulations.
[0149] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media 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), magnetic 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0150] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A privacy protection method characterized by, The method comprises: sending a function registration request carrying a target function to a trusted third party, the target function being a function representing a large language model for processing a data set in a client, the function registration request carrying a function parameter vector of the target function, the function registration request being used for 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, 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, the encrypted public key further including a bilinear mapping function, the verification parameter set being generated based on a multiplicative cyclic group and including a first verification parameter and a second verification parameter vector; receiving the decryption key and the encrypted public key returned by the trusted third party; receiving a data processing request for the target function sent by the client, the data processing request carrying an encrypted data set generated by encrypting a 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; generating a result verification value using the function parameter vector and the verification parameter set, the result verification value including a first verification value and a second verification value vector; 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, and retains the decryption result in a case where the verification result represents that the decryption result is consistent with a result obtained by processing the data set using the target function representing a large language model.
2. The method of claim 1, wherein, The function parameter vector is an n-dimensional vector, and the step of generating the verification parameter set comprises: generating a multiplicative cyclic group, determining an integer vector space according to an order of the multiplicative cyclic group and a dimension of the function parameter vector, each integer vector in the integer vector space being an n-dimensional integer vector, and each integer in the n-dimensional integer vector belonging to an integer space determined according to the order of the multiplicative cyclic group; randomly selecting an integer vector from the integer vector space as a verification integer vector; determining a sum of squares of integers in the verification integer vector, performing exponentiation on the sum of squares with a generator of the multiplicative cyclic group as a base to obtain a first verification parameter; for each integer in the verification integer vector, performing exponentiation on the integer with the generator as the base to obtain a second verification parameter corresponding to the integer, and combining the second verification parameters to obtain a second verification parameter vector; combining the first verification parameter and the second verification parameter vector to obtain the verification parameter set.
3. The method of claim 2, wherein, The function public key is generated based on the verification parameter set and the function parameter vector, comprising: For each function parameter in the function parameter vector, an exponential operation is performed on the function parameter with the second verification parameter corresponding to the function parameter as the base number and the function parameter as the exponential, to obtain an exponential operation result corresponding to the function parameter, the position of the function parameter in the function parameter vector being consistent with the position of the second verification parameter corresponding to the function parameter in the second verification parameter vector; The function public key is obtained by multiplying the exponential operation results corresponding to each function parameter in the function parameter vector, and the result obtained by performing an exponential operation on the target processing result with the generator as the base number is consistent with the function public key, the target processing result being a result obtained by processing the target function and the verification integer vector.
4. The method of claim 2, wherein, The encryption public key further includes the order and the generator of the multiplicative cyclic group, and the generating of the result verification value by using the function parameter vector and the verification parameter set includes: An integer is randomly selected from an integer space determined according to the order of the multiplicative cyclic group to obtain a target random number; An exponential operation is performed on the target random number with the generator as the base number to obtain a first verification value; For each function parameter in the function parameter vector, an exponential operation is performed on the function parameter with the first verification value as the base number and the function parameter as the exponential to obtain a first exponential value corresponding to the function parameter, and an exponential operation is performed on the target random number with the second verification parameter corresponding to the function parameter as the base number to obtain a second exponential value corresponding to the function parameter, and a product operation is performed 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; The second verification values corresponding to each function parameter in the function parameter vector are combined to form a second verification value vector; The first verification value and the second verification value vector form the result verification value.
5. The method of claim 1, wherein, The function parameter vector is an n-dimensional vector, the master private key is an n-dimensional sub-private key vector, and the generating of the sub-private key vector includes: 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 multiplicative cyclic group; The generating of the decryption key based on the function parameter vector and the master private key includes: 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 of claim 1, wherein, The data set is an n-dimensional data vector, the encryption public key further includes the order and the generator of the multiplicative cyclic group, the master public key is an n-dimensional sub-public key vector, and the generating of the encrypted data set includes: An integer is randomly selected from an integer space determined according to the order of the multiplicative cyclic group to obtain an encryption random number; An exponential operation is performed on the encryption random number with the generator of the multiplicative cyclic group as the base number to obtain encrypted data corresponding to the encryption random number; Exponentiation is performed on each data in the data vector with the generation element as the base number and the data as the exponent to obtain a first exponent value corresponding to the data, and exponentiation is performed on the encrypted random number with a sub-public key corresponding to the data as the base number and the encrypted random number as the exponent to obtain a second exponent value corresponding to the data, and the first exponent value and the second exponent value are multiplied to obtain encrypted data corresponding to the data, and the sub-public key corresponding to the data is located at a position in the sub-public key 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 are combined to form the encrypted data set.
7. The method of claim 6, wherein, The function parameter vector is an n-dimensional vector, and the encrypted data set is decrypted using the decryption key and the function parameter vector to obtain a decryption result, including: Exponentiation is performed on each encrypted data in the encrypted data set with the encrypted data as the base number and a function parameter corresponding to the encrypted data as the exponent to obtain an exponent value corresponding to the encrypted data, and the function parameter corresponding to the encrypted data is located at a position in the function parameter vector consistent with the position of the data corresponding to the encrypted data in the data vector; The exponent values corresponding to the encrypted data corresponding to each data in the data vector are multiplied to obtain a first decryption value; Exponentiation is performed on the encrypted data corresponding to the encrypted random number with the decryption key as the exponent to obtain a second decryption value; The ratio of the first decryption value to the second decryption value is determined, and in an ideal case, the ratio is consistent with the result of exponentiation with the generation element as the base number and a data processing result as the exponent, and the data processing result refers to a result obtained by processing the data set using the target function; Logarithmic operation is performed on the generation element and the ratio to determine a decryption result, and in an ideal case, 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 decryption result is verified using the result verification value, the verification parameter set, and the function public key to obtain a verification result, including: Based on the data vector and the verification parameter set, an auxiliary parameter is generated; The function public key, an exponent result obtained by exponentiation with the generation element of the multiplicative cyclic group as the base number and the negative decryption result as the exponent, and the auxiliary parameter are multiplied to obtain a multiplication result; Bilinear mapping is performed on the first verification value and the multiplication result to obtain a first mapping value; Exponentiation is performed on each data in the data vector with the generating element as the base and the data as the exponent to obtain an exponentiation result corresponding to the data. A second verification parameter corresponding to the data and the exponentiation result corresponding to the data are bilinearly mapped 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. The mapping values corresponding to each data in the data vector are multiplied to obtain a second mapping value. The first mapping value and the second mapping value are compared to obtain a verification result.
9. The method of claim 8, wherein, The verification parameter set further includes a first verification parameter, and the auxiliary parameter is generated based on the data vector and the verification parameter set, including: Exponentiation is performed on each data in the data vector with the generating element as the base and the data as the exponent to obtain an exponentiation result corresponding to the data. A second verification parameter corresponding to the data and the exponentiation result corresponding to the data are bilinearly mapped 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. The device includes: The request sending module is configured to send a function registration request for a target function to a trusted third party, the target function being a function representing a large language model for processing a data set in a client, the function registration request carrying a function parameter vector of the target function, the function registration request being used by the trusted third party to generate a master public key and an encryption public key containing a master public key and a verification parameter set, to generate a decryption key based on the function parameter vector and the master private key, to generate a function public key based on the verification parameter set and the function parameter vector, to return the encryption public key and the decryption key, and to send the encryption public key and the function public key to the client, the encryption public key further including a bilinear mapping function, and the verification parameter set being generated based on a multiplicative cyclic group and including a first verification parameter and a second verification parameter vector; 10. A privacy protection device, characterized by The key receiving module is configured to receive the decryption key and the encryption public key returned by the trusted third party; The request receiving module is configured to receive a data processing request for the target function sent by the client, the data processing request carrying an encrypted data set generated by encrypting a data set using the master public key; The decryption module is configured to decrypt the encrypted data set using the decryption key and the function parameter vector to obtain a decryption result; The verification value generation module is configured to generate a result verification value using the function parameter vector and the verification parameter set, the result verification value including a first verification value and a second verification value vector; A result sending module is configured 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, and retains the decryption result in a case where the verification result represents that the decryption result is consistent with a result obtained by processing the data set by using the target function representing a large language model.
Citation Information
Patent Citations
Privacy protection-oriented verifiable distributed matrix multiplication outsourcing method
CN116738491A
Privacy protection computer-aided diagnosis method based on inner product function encryption
CN117786735A